22921 Commits

Author SHA1 Message Date
dario-piotrowicz b39db80f91 test(animations): add route animation delay to pages tests (#45144)
PR #44550 introduced an animation for pages/tabs transitions in the
animations example application, after such change intermittent e2e
failures started to occur (see for example: #45083), add a delay to
account for such animation to all the animations pages/tabs e2e tests so
to fix the flakyness caused by the animation

PR Close #45144
2022-02-24 18:41:56 +00:00
Martin Sikora 3b86dda068 refactor(http): change <script>'s ownerDocument in jsonp teardown (#36807)
handler

Cancel pending json handler by adopting its <script> element into
another document
(https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block)
This way the browser will prevent the script from being parsed and executed.

Fixes #34818

PR Close #36807
2022-02-24 17:24:34 +00:00
Martin Sikora 64da1daa78 fix(common): canceled JSONP requests won't throw console error with missing callback function (#36807)
This commit fixes a use-case where unsubscribing from a JSONP request will result in "Uncaught ReferenceError: ng_jsonp_callback_xy is not defined"
thrown into console. Unsubscribing won't remove its associated callback function because the requested script will finish
loading anyway and will try to call the handler.

PR Close #34818

PR Close #36807
2022-02-24 17:24:34 +00:00
JoostK d388522745 fix(localize): avoid imports into compiler-cli package (#45180)
The compiler-cli's declaration files are not necessarily compatible with web
environments that use `@angular/localize`, and would inadvertently include
`typescript` declaration files in any compilation unit that uses
`@angular/localize` (which increases parsing time and memory usage during
builds) using a default import that only type-checks when
`allowSyntheticDefaultImports` is enabled.

Fixes #45179

PR Close #45180
2022-02-24 17:12:10 +00:00
dario-piotrowicz 4f1870362e docs: remove activatedRouteData backward accesses in aio guides (#45140)
developers should not access the router-outlet directive in their
template before defining a template variable for it, such
implementation is present in a couple of aio guides, fix such guides
so that they show the more correct way of accessing the outlet's data

resolves #36173

PR Close #45140
2022-02-24 00:55:19 +00:00
ivanwonder 6c906a5bb9 fix(compiler-cli): Support resolve animation name from the DTS (#45169)
Before this, the compiler resolves the value in the DTS as dynamic.
If the `trigger` is imported from `@angular/animations`, this PR will
use FFR to simulate the actual implementation in JS and extracts the
animation name.

PR Close #45169
2022-02-24 00:54:33 +00:00
dario-piotrowicz 6c61d20476 fix(animations): allow animations with unsupported CSS properties (#45185)
currently animations with unsupported CSS properties cause a hard error
and the crash of the animation itself, instead of this behaviour just
ignore such properties and provide a warning for the developer in
the console (only in dev mode)

this change also introduces a general way to present warnings
in the animations code

resolves #23195

PR Close #45185
2022-02-24 00:53:50 +00:00
Andrew Scott e914da145b release: cut the v13.2.4 release (#45181) 13.2.4 2022-02-23 12:35:31 -08:00
Alan Cohen 6550c59df5 docs: fix test description to match code example (#45101)
PR Close #45101
2022-02-23 08:58:41 -08:00
Daniele Maltese 032276253f fix(docs-infra): removed duplicated style in aio examples (#45157)
Removed duplicated style in aio example scss files.

PR Close #45157
2022-02-22 15:35:17 -08:00
Renovate Bot d607d0b93c build: update ossf/scorecard-action commit hash to 3662744 (#45162)
PR Close #45162
2022-02-22 12:48:12 -08:00
Paul Gschwendtner c02e4d72bc ci: update SHA for components-repo-unit-tests job to fix flakiness (#45166)
This commit attemps to fix the flakiness that shows up sometimes
in the `components-repo-unit-tests` job. See:

https://app.circleci.com/pipelines/github/angular/angular/43024/workflows/fa9bc546-179a-4215-a7f1-db123efa0fa4/jobs/1126909

We updated Firefox/Chromium in dev-infra, hoping to fix this non-reproducable
flakiness (also checked memory/CPU consumption in the test). So far it looks like
the update helped in the COMP repo so we should try it here as well.

PR Close #45166
2022-02-22 10:20:32 -08:00
Renovate Bot 4d2ef0f5df build: update scorecard action dependencies to 040feef (#45135)
PR Close #45135
2022-02-18 13:57:04 -08:00
JoostK 1a4b489692 perf(animations): improve algorithm to balance animation namespaces (#45113)
The prior approach would consider all existing namespaces from back to front
to find the one that's the closest ancestor for a given host element. An
expensive `contains` operation was used which needed to traverse all the
way up the document root _for each existing namespace_. This commit implements
an optimization where the closest namespace is found by traversing up from
the host element, avoiding repeated DOM traversal.

Closes #45055

PR Close #45113
2022-02-18 13:44:44 -08:00
Andrew Kushnir cbd23ee0de perf(core): make IterableDiffers and KeyValueDiffers tree-shakable (#45094) (#45115)
This commit removed references to the `IterableDiffers` and `KeyValueDiffers` classes from the `ApplicationModule`, which effectively make them tree-shakable. Both classes have `prov` static field with the right setup, so they'll be properly initialized when referenced.

PR Close #45094

PR Close #45115
2022-02-18 13:43:05 -08:00
manuelkroiss 5d08390584 docs: replace deprecated SwUpdate#available/activated with new API (#44858)
Since `SwUpdate#available` and `SwUpdate#activated` are deprecated, the new way should be included in the docs instead of the deprecated one.

docs: added missing imports

added imports for VersionReadyEvent, filter, and map

docs: updated service-worker-communications.md

rewrite of SwUpdate service to describe the new versionUpdates property

docs: Apply suggestions from code review

Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>

docs: added events

added VERSION_DETECTED and VERSION_INSTALLATION_FAILED

docs: Apply suggestions from code review

Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>

PR Close #44858
2022-02-18 13:40:35 -08:00
dario-piotrowicz 9b1d3d2fce fix(docs-infra): make hamburger menu non focusable when not visible (#45067)
the header hamburger menu gets removed from the page by moving it
outside the screen, it can however still be accessed via keyboard
navigation, add a visibility hidden to the element to prevent such
behavior

PR Close #45067
2022-02-18 13:36:11 -08:00
dario-piotrowicz f71eb58036 docs(animations): remove query call in animations example (#45126)
the query call used for the transition between the Home and About tabs
doesn't work as intented since it doesn't find any matching element,
remove such quering since it is not needed

PR Close #45126
2022-02-18 13:35:23 -08:00
David Wolf f7a2dd88aa docs(forms): remove type duplicate from button in reactive-forms example (#45124)
PR Close #45124
2022-02-18 13:35:00 -08:00
AlirezaEbrahimkhani 031e23b06a docs: solve the problem with Dynamic Component guide example (#45123)
solve ExpressionChangedAfterItHasBeenChecked error by changing the angular lifecycle hook ngAfterViewInit to ngOnInit

resolves angular#44925

PR Close #45123
2022-02-18 13:33:16 -08:00
Alan Cohen 5b0980f050 docs: fix test examples to use withContext (#45100)
PR Close #45100
2022-02-18 13:32:45 -08:00
Alex Rickabaugh 54d09a6bc0 release: cut the v13.2.3 release (#45116)
PR Close #45116
13.2.3
2022-02-16 15:50:24 -08:00
Renovate Bot 782f678236 build: update scorecard action dependencies to c4e058a (#45036)
PR Close #45036
2022-02-16 13:52:24 -08:00
JiaLiPassion 62cec95981 test(zone.js): add integration test for zone.js Mocha patch (#45047)
Add integration test for `Mocha` patch from `zone.js` to verify the
issue #42384 is fixed

PR Close #45047
2022-02-16 13:51:52 -08:00
JiaLiPassion 2ec696a50f fix(zone.js): patch global instead of Mocha object (#45047)
Close #42834

In the new version fo Mocha, all global test functions are from `global`
object instead of `Mocha` object. Adn the current `zone.js` Mocha
patch's logic looks like this.

```
global.describe = Mocha.describe = function() {
  return originalMochaDescribe.apply(this, arguments);
}
```

and `originalMochaDescribe` is the unpathced Mocha implementation
looks like this

```
function describe() {
  return context.describe(...);
}
```

And the `context` will finally delegate to `global.describe()`,
so the current `zone.js` patch causes infinite loop.

This commit will not patch function of `Mocha` object any longer.

PR Close #45047
2022-02-16 13:51:52 -08:00
Aristeidis Bampakos 119fbddb83 docs: clarify install of build schematics deps (#45104)
PR Close #45104
2022-02-16 13:44:47 -08:00
Yousaf Nawaz e8e09d3455 docs: fix typos (#45103)
correct word 'questionaire' to 'questionnaire' in Building dynamic forms guide

PR Close #45103
2022-02-16 13:42:45 -08:00
AlirezaEbrahimkhani d7c20c8886 docs: fix case types guide (#45095)
fix case types guide text for more detailed guidance

PR Close #45095
2022-02-16 13:36:08 -08:00
AlirezaEbrahimkhani 3e1fad406a docs: remove duplicate link (#45095)
The link to complete schema, is exactly the same as the one above

PR Close #45095
2022-02-16 13:36:08 -08:00
zuckjet aeeb1b55d3 docs(localize): fix angular.json syntax error about i18n (#45048)
In chapter internationlization at section "Deploy multiple locales" the
syntax for angular.json is wrong.

Close #45032

PR Close #45048
2022-02-15 12:31:12 -08:00
AlirezaEbrahimkhani 331383b39b docs: fix grammatical error (#45092)
'an' is replaced with 'a' for the adjective 'straightforward'

resolves angular#45075

PR Close #45092
2022-02-15 12:29:59 -08:00
Jessica Janiuk 0050b01b62 perf(animations): made errors in the animations package tree shakeable (#45079)
This moves all the error strings into exported functions that can be tree shaken away.

PR Close #45079
2022-02-14 16:13:36 -08:00
Jessica Janiuk e632fd1f0f test(animations): Fix e2e intermittent failures (#45083)
This addresses a problem with animations e2e tests that were failing intermittently due to a missing timeout value

PR Close #45083
2022-02-14 15:45:41 -08:00
mgechev 128038e486 docs: extend the LTS for ngUpgrade with a year (#45078)
PR Close #45078
2022-02-14 14:06:59 -08:00
dario-piotrowicz 42c8533f42 docs(animations): clarify information about query with :leave (#45059)
add information to the query api docs clarifying that elements with
a trigger can be queried via `:leave` when their parent is leaving

this exception is potentially something to be changed (see #45058)
but for the time being the docs can be updated to make the users
aware of such behavior

PR Close #45059
2022-02-14 14:05:22 -08:00
Mina Hosseini Moghadam 2cc8fb0a08 docs: change dependencies to devDependencies in document (#45053)
after installing @angular/localize package, it will be placed in devDependencies object
PR Close #45053
2022-02-14 14:03:45 -08:00
Patrick Cameron 4013db6fd2 fix(docs-infra): fix broken link in Glossary (#45068)
Fix broken link in Glossary document

PR Close #45068
2022-02-14 12:51:30 -08:00
Dario Piotrowicz 95ee74a66c docs(animations): improve aio animations guides info around :enter/:leave (#44550)
improve the aio animations guide information around elements entering and
leaving, this includes, querying them, their transitions and also improvements
to the animations guide live examples

PR Close #44550
2022-02-14 09:16:30 -08:00
markostanimirovic a782be62e9 refactor(docs-infra): replace deprecated toPromise usages (#45045)
This commit replaces deprecated `Observable.toPromise` usages
with `lastValueFrom`.

PR Close #45045
2022-02-11 14:34:28 -08:00
markostanimirovic dc4115d7ed refactor(docs-infra): replace deprecated subscribe usages (#45046)
This commit replaces deprecated `Observable.subscribe` usages.

PR Close #45046
2022-02-11 14:33:46 -08:00
Renovate Bot d8a18717da build: update angular (#45040)
Update Angular packages to latest versions.

PR Close #45040
2022-02-10 09:16:14 -08:00
Srdjan Milic dd177e2c18 refactor(http): deprecated symbol used (#44985)
Support for passing an error value to "throwError" method will be removed in v8 of rxjs. More info at https://rxjs.dev/api/index/function/throwError#throwerror

PR Close #44985
2022-02-09 11:46:32 -08:00
dario-piotrowicz 0b8208690c docs: improve try-it-now card focus area (#45002)
the focus/interactable area for the try-it-now card is wider than
necessary, reduce such width to the appropriate size

PR Close #45002
2022-02-09 10:23:08 -08:00
Renovate Bot 7af1f0a265 build: update scorecard action dependencies to 7f9dca2 (#45026)
PR Close #45026
2022-02-09 10:21:47 -08:00
Renovate Bot d0b88a6810 build: update angular (#44981) (#45027)
Updates Angular

PR Close #44981

PR Close #45027
2022-02-09 10:18:09 -08:00
Renovate Bot fd860e3ef7 build: lock file maintenance (#45027)
Lock file maintenance, patch port #44993.

PR Close #45027
2022-02-09 10:18:09 -08:00
Renovate Bot a01ae487d7 build: update dependency google-closure-compiler to v20220202 (#45013)
PR Close #45013
2022-02-08 11:16:08 -08:00
Renovate Bot 3769de2caa build: update scorecard action dependencies to 230611d (#45012)
PR Close #45012
2022-02-08 11:15:36 -08:00
Amer Yousuf 835b326759 docs(forms): improve email validator directive docs (#45014)
PR Close #45014
2022-02-08 09:57:58 -08:00
Andrew Kushnir 92cf9fbebe fix(core): ViewContainerRef.createComponent should consult module injector when custom one is provided (#44966)
Before Ivy, it was only possible to call the `ViewContainerRef.createComponent` function with the ComponentFactory as the first argument. An instance of a `ComponentFactory` resolved via `ComponentFactoryResolver` contained a reference to an `NgModule` where the component is declared. As a result, the component maintained a DI connection with the module injector tree (by retrieving an instance of `NgModuleRef` internally), even when the custom injector was provided (we try to find a token in a custom injector first and consult module injector after that).

With Ivy, we expanded the `ViewContainerRef.createComponent` function API to support direct references to the Component classes without going through the factory resolution step. As a result, there was no connection to the NgModule that declares the component. Thus, if you provide a custom injector, this is the only injector that is taken into account.

This commit updates the logic for the factory-less case to try retrieving an instance of an `NgModuleRef` using the DI tree which `ViewContainerRef` belongs to. The `NgModuleRef` instance is then used to get a hold of a module injector tree. This brings the factory-less and factory-based logic to more consistent state.

Closes #44897.

PR Close #44966
2022-02-08 09:57:21 -08:00