22850 Commits

Author SHA1 Message Date
George Kalpakas 94c9e47dbe Revert "fix(docs-infra): content overflow in mobile (#44851)" (#44899)
This reverts commit c2e09e0911, because it
messes up the table layouts on some resolutions/pages. See #44891 for
details.

Fixes #44891

PR Close #44899
2022-01-31 17:10:50 +00:00
Dylan Hunn 6b7fffcbeb fix(forms): Update the typed forms migration schematic to find all files. (#44881)
We were breaking out of the loop that walks the source tree due to an incorrect return.

PR Close #44881
2022-01-28 21:59:35 +00:00
fru2 641f27a9c9 fix(docs-infra): content overflow in mobile (#44851)
When reading the docs page on mobile, some page tend to scroll in horizontal direction quite a lot which is unpleasant

Fixes #44850

PR Close #44851
2022-01-28 18:01:47 +00:00
Paul Gschwendtner ab63ed3448 test(docs-infra): fix type checking errors with new jasmine types (#44876)
The jasmine types for `spyObj.calls().all()` seem to be more specific,
relying on `ThisType<Fn>` to determine the context/receiver for an invoked
spy. This type does not work as expected with class members as it seems.

This commit fixes three of these type checking failures by explicitly casting
the spy context to the actual class owning the method member.

PR Close #44876
2022-01-28 17:50:15 +00:00
Renovate Bot b89ee0819b build: update angular (#44876)
Updates to the latest versions of Angular organization NPM packages.

PR Close #44876
2022-01-28 17:50:15 +00:00
Renovate Bot 553c8d1366 build: lock file maintenance (#44876)
Cleans up the lock file by maximizing the versions as allowed per our
version ranges.

PR Close #44876
2022-01-28 17:50:15 +00:00
Maarten Tibau f398717502 docs: fix typo in update guide (#44853)
PR Close #44853
2022-01-28 17:37:25 +00:00
Aristeidis Bampakos c9abf34d88 docs: fix GitHub broken link in update guide (#44875)
PR Close #44875
2022-01-28 16:08:28 +00:00
George Kalpakas 96d2c58647 fix(docs-infra): fix links to CLI commands source code (#44835)
Recently, the [CLI repository][1] switched to not prefixing tag names
with a `v`. Update the `versionInfo` generated for CLI commands docs, so
that the links to the source code (which include the tag name) are
correct.

Fixes #44822

[1]: https://github.com/angular/angular-cli

PR Close #44835
2022-01-28 16:07:47 +00:00
Theodore Brown 49ca5bb1d8 refactor(forms): remove dead code (#37614)
This functionally dead code was originally introduced via pull request
were added to verify the fix, and the many comments on that issue after
it was closed indicate that it wasn't actually resolved.

In fact, setting `selectedIndex` does absolutely nothing here, since
the selected index is immediately overridden by setting the `value`
property. A working fix (with tests) for the IE/Safari bug is in pull
request #23784. Originally this dead code was removed as part of that PR,
but @AndrewKushnir recommended creating a separate PR for the cleanup.

PR Close #37614
2022-01-28 16:07:11 +00:00
dario-piotrowicz f6c2934f5b docs(core): edit and add docs for ng-container (#44762)
PR Close #44762
2022-01-28 15:55:33 +00:00
Andrew Kushnir 1169fae366 docs: update survey id (#44865)
The survey id is used as a key in the local storage to keep the state (don't show the message again). Reusing this survey id will make the message invisible to some users who already have that key in local storage.

PR Close #44865
2022-01-27 21:52:35 +00:00
mgechev 522b845bec docs: enable the survey banner (#44861)
PR Close #44861
2022-01-27 11:43:54 -08:00
Paul Gschwendtner 2fa2f7d34a ci: only build test targets for components repo unit test job (#44832)
To speed up the components CI job (avoiding it being a bottleneck in FW),
we will stop building everything in `src/...`, but rather only build targets
which are needed to run all tests within `src/...`.

This notably should avoid unnecessary NPM package building. Arguably that
part would also be valuable to have, but we already test the `ng_package`
rule in FW itself, plus we run snapshot tests in the components repo as well.

PR Close #44832
2022-01-27 09:22:24 -08:00
Paul Gschwendtner af19c440e2 ci: re-enable components repo unit tests job (#44832)
Re-enables the components-repo unit tests job that we previously
disabled due to the devmode target change that caused conflicts
with `angular/components` patching `ng_module.bzl` of `@angular/bazel`.

PR Close #44832
2022-01-27 09:22:24 -08:00
Andrew Scott 9f7157e560 refactor(compiler-cli): Tolerate source span errors in indexer (#44825)
When the indexer encounters a location where the source span doesn't
match up with the expected identifier, the current visitor code throws
an error. Instead, this change creates an error and moves on to the next
template item. This allows the indexer to continue analysis even when
there are errors in the source mapping. In addition, it still allows callers
to surface those errors in their own way while still providing as much indexed
information as possible about a node.

PR Close #44825
2022-01-27 09:20:09 -08:00
Renovate Bot 30ddeabca6 build: update dependency globby to v13 (#44801)
PR Close #44801
2022-01-27 09:18:58 -08:00
Renovate Bot 4a91d9b0a0 build: update dependency rules_pkg to v0.6.0 (#44818)
PR Close #44818
2022-01-26 17:37:42 -08:00
Jessica Janiuk fcc6528159 test(animations): Add bundling size regression test for animations package (#44826)
This adds a size regression test for the animations package to the test suite.

PR Close #44826
2022-01-26 12:54:36 -08:00
Andrew Kushnir dc0cac235f docs: cleanup CHANGELOG.md file (#44842)
PR Close #44842
2022-01-26 12:37:05 -08:00
Andrew Kushnir de1e35b944 release: cut the v13.2.0 release (#44838) 13.2.0 2022-01-26 11:44:41 -08:00
Dylan Hunn a38ae0aefa refactor(forms): Temporarily disable the typed forms migration. (#44828)
It's best to disable this optional migration in the minor release, although it shouldn't run anyway -- we don't want people accidentally running it.

This PR will be rolled back after the minor is out.

PR Close #44828
2022-01-25 17:03:48 -08:00
Andrew Scott fe3e4d6865 fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788)
An `ng-template` with an inline template (i.e. has a structural
directive) would previously not get an `undefined` `tagName` because the
logic assumed the element would be `t.Element` or `t.Content` and read
the tag name from the `name` property. For a `t.Template`, this exists
instead on the `t.tagName`. The final result would be an `tagName` of `undefined`
for the parent `t.Template`, causing failures in the indexer downstream.

This `undefined` value is actually expected in the renderer code, even
though the type does not specify this possibility. This change updates
the type of `tagName` to be `string|null` and explicitly handles the
case where there is a structural directive on an `ng-template`. You can
see how the two are differentiated in the compliance code that was
modified in this commit.

PR Close #44788
2022-01-25 14:15:45 -08:00
George Kalpakas 6cb7c3ebe3 build(docs-infra): update dgeni-packages to v0.29.3 (#44810)
This version includes angular/dgeni-packages#318 and thus fixes the
rendering of overridden methods in API docs.

Fixes #44468

PR Close #44810
2022-01-25 09:24:41 -08:00
Renovate Bot 966343bb92 build: update angular (#44771)
PR Close #44771
2022-01-25 09:24:00 -08:00
Tim Bowersox 7e93513425 docs: add link to AbstractControlOptions reference (#44764)
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 7c7a1a1724 docs: exclude setValue from async-validator-usage docregion (#44764)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 62217efb7e docs: add missing return statement to validate() (#44764)
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 1fa14e0c84 docs: remove trailing space in code example (#44764)
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox a71eb4c18e docs: fix UniqueAlterEgoValidatorDirective (#44764)
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox ffd62b9f11 docs: expand async validators in reactive forms (#44764)
* Hone docregions for code examples
* Add more detailed description

PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox e545dd8130 docs: revise text for adding async validators to template-driven forms (#44764)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 4883b7d9c7 docs: restore UniqueAlterEgoValidator (#44764)
Update the docregion for the directive class to differentiate them

PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 8eb1f76341 docs: fix UniqueAlterEgoValidatorDirective (#44764)
* Use correct class name in providers
* Update parameter & return signature for validate()
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 37bbd97d6e docs: update async validators section (#44764)
* Update the UniqueAlterEgoValidator code example
* Add async-validator docregion to hero-form-reactive.component.2.ts
* Fix typo under Implementing a custom async validator
* Add h3 sections for adding async validators to reactive & template-driven forms
PR Close #44764
2022-01-24 14:53:17 -08:00
Tim Bowersox 9e9e82d7c7 docs: add note about using NG_ASYNC_VALIDATORS (#44764)
When setting up an async validator in a template-driven form, it's necessary to register the directive with NG_ASYNC_VALIDATORS instead of NG_VALIDATORS. This was not mentioned in the docs.
PR Close #44764
2022-01-24 14:53:17 -08:00
Jessica Janiuk e12dfa535b test(animations): Add bundling symbol test for animations package (#44809)
This adds a full bundling animation symbols test to the test suite.

PR Close #44809
2022-01-24 14:52:31 -08:00
iRealNirmal fa7c7afbe9 refactor(forms): update required validator and checkbox validator to inherit abstractValidator (#44162)
Modified required validator and checkbox validator to inherit abstractValidator.

For every validato type different PR will be raised as discussed in #42378.

Closes #42267

PR Close #44162
2022-01-24 14:50:58 -08:00
Kristiyan Kostadinov a4aa9b3c28 Revert "feat(core): allow for injector to be specified when creating an embedded view (#44666)" (#44807)
This reverts commit b49ffcd50e.

PR Close #44807
2022-01-24 12:22:22 -08:00
Kristiyan Kostadinov 40f27a31d2 Revert "feat(common): add injector input to ngTemplateOutlet (#44761)" (#44807)
This reverts commit ed21f5c753.

PR Close #44807
2022-01-24 12:22:22 -08:00
Kristiyan Kostadinov 94bfcdd9de fix(core): error if NgZone.isInAngularZone is called with a noop zone (#44800)
When the user opts into the noop `NgZone`, they usually still interact with the static methods on the non-noop class. This change adds a check to handle the case where zone.js hasn't been loaded.

Fixes #44784.

PR Close #44800
2022-01-24 10:44:44 -08:00
Wiley Marques f0a8303abe docs(router): fixing pathMatch doc to style code correctly (#44796)
PR Close #44796
2022-01-24 10:42:52 -08:00
Andrew Scott abd1bc8039 fix(compiler): correct spans when parsing bindings with comments (#44785)
The previous fix for correcting spans with comments in
https://github.com/angular/angular/commit/59eef29a6c5d568ca80595cd7018e21ad406c85d
had the unfortunate side effect of _breaking_ the spans with comments
when there was leading whitespace. This happened because the previous
fix was testing one without a comment, identifying that the offset shouldn't
have anything added to it, and then removing that offset adjustment
(`offsets[i] + (expressionText.length - sourceToLex.length)`).

Upon further investigation, this offset adjustment _was actually
necessary_ for when the input had comments, but this was only because
the `stripComments` function used `trim` to remove whitespace for these
cases. This is the real problem -- not only does it create a ton of confusion
but also it means that the behavior of the lexer and resulting spans is
different between inputs with comments and inputs without comments.

After reviewing how the `inputLength` of `_ParseAST` was used, it
appears that the correct behavior would be to _not_ trim the input. The
`inputLength` is used to advance the current index beyond points which
have been processed. This _should_ include any whitespace. Additionally,
`inputLength` doesn't appear to be needed at all. When there was no
comment in the input, it was always equal to the `input.length` anyways.
When there _is_ a comment, it should include that comment anyways to
advance the index beyond the comment.

PR Close #44785
2022-01-24 10:41:54 -08:00
Andrew Scott 7316e72ec5 fix(compiler-cli): properly index <svg> elements when on a template (#44785)
The original fix for svg elements in
https://github.com/angular/angular/commit/92b23f48519a1adb460a431c356bcd9917fb059d
did not account for svg elements when they also had a structural
directive on them, making the node a template. This resulted in the
logic added in fix above not being applied.

PR Close #44785
2022-01-24 10:41:54 -08:00
Doug Parker ac2f262e9a docs: add extended diagnostics documentation (#44704)
This includes the initial documentation for extended diagnostics with a page for each of the two initial checks. They follow the same general formula, and hopefully in the future they can be properly generated from metadata rather than copy-pasted as they are currently.

PR Close #44704
2022-01-24 10:41:13 -08:00
George Kalpakas f2fa67eb0b fix(docs-infra): track error docs during serve-and-sync (#44704)
Refs #42966.

Look for changes in error docs (i.e. docs under `aio/content/error/`) in
`authors-package`, so that such docs are tracked when running the
`serve-and-sync` script.

PR Close #44704
2022-01-24 10:41:13 -08:00
George Kalpakas 9bee561956 fix(docs-infra): track error docs during serve-and-sync (#44704)
Refs #42966.

Look for changes in error docs (i.e. docs under `aio/content/error/`) in
`authors-package`, so that such docs are tracked when running the
`serve-and-sync` script.

PR Close #44704
2022-01-24 10:41:13 -08:00
Andrew Kushnir fce521e4d2 release: cut the v13.2.0-rc.1 release (#44804) 13.2.0-rc.1 2022-01-24 09:41:52 -08:00
Oleg Postoev ade305757b refactor(common): unused return value from attemptFocus (#44457)
The function attemptFocus had a return value that nowhere is used. But it still saves in the bundle.

PR Close #44457
2022-01-21 13:11:32 -08:00
JoostK ed67a074ce fix(compiler): properly compile DI factories when coverage reporting is enabled (#44732)
When running tests with code coverage using Istanbul, the code is
instrumented with coverage reporting statements. These statements are
also inserted into synthesized constructors, preventing Angular from
properly recognizing them as synthesized constructor.

This commit changes the regex to detect synthesized constructors to allow
for statements within the constructor before the `super(...arguments);`
call. This is limited to code that does not contain a `}`, but this
is sufficient to support Istanbul's coverage instrumentation statements.

The tests have been extended with an input file that is being
instrumented using `babel-plugin-istanbul` for both ES2015 and ES5
targets, in order to verify that the approach works for real-world
usages.

Fixes #31337

PR Close #44732
2022-01-21 13:10:43 -08:00