Commit graph

29561 commits

Author SHA1 Message Date
Christoph Guttandin
29d3891782 fix(animations): handle structured AnimateTimings (#31107)
This commit makes sure structured AnimateTimings are not procesed any further when building the AST.

Fixes: #22752

PR Close #31107
2022-04-05 08:41:38 -07:00
Renovate Bot
035ba83b16 build: update dependency entities to v4 (#45509)
PR Close #45509
2022-04-04 14:54:15 -07:00
Andrew Scott
d56a537196 feat(migrations): Add migration to add explicit Route/Routes type (#45084)
Places that use `pathMatch` need an explicit `Route` or `Routes` type on
the variable so TypeScript does not infer the type as just 'string'.

PR Close #45084
2022-04-04 14:53:45 -07:00
Cédric Exbrayat
5aeaedfa03 refactor(core): validate element is known in JIT mode (#45492)
Renames, simplifies and documents the function in charge of validating if an element is known in JIT mode.

PR Close #45492
2022-04-04 09:34:41 -07:00
George Kalpakas
adf4b6d33d build(docs-infra): upgrade cli command docs sources to 0e8f3c34b (#45511)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](c0a0bfb65...0e8f3c34b):

**Modified**
- help/update.json

PR Close #45511
2022-04-04 09:33:59 -07:00
Alan Agius
b2d06527df fix(docs-infra): update Angular packages to latest minor version (#45502)
This is needed because Angular CLI 13.3 contains fixes that are needed for Stackblitz Node 16 to compile Sass. We also added `copyfiles` in `aio/tools/examples/shared/package.json` as `yarn sync-deps` was failing due to the missing dependency.

PR Close #45502
2022-04-04 09:23:54 -07:00
piyush132000
c0c18b7113 docs: add animations to readme file (#45488)
Updated readme file for adding animations topic in advance topics of Angular

PR Close #45488
2022-04-04 09:17:49 -07:00
mgechev
8b1a2f1048 docs: change roadmap updated date (#45500)
PR Close #45500
2022-04-01 13:33:07 -07:00
mgechev
085d94e094 docs: add details about ssr efforts (#45500)
PR Close #45500
2022-04-01 13:33:07 -07:00
Chabbey François
71e9068377 docs: fix typo in CHANGELOG.md (#45494)
Fix typo

PR Close #45494
2022-03-31 12:50:21 -07:00
Renovate Bot
99154cfaf2 build: update github/codeql-action action to v2 (#45491)
PR Close #45491
2022-03-31 12:48:17 -07:00
Dylan Hunn
2b12959826 docs: release notes for the v13.3.1 release (#45486)
PR Close #45486
2022-03-30 14:30:03 -07:00
Dylan Hunn
115aafbe51 release: cut the v14.0.0-next.10 release (#45484)
PR Close #45484
2022-03-30 14:10:34 -07:00
AlirezaEbrahimkhani
e1e440d65a docs: add Angular university website to resources list (#45437)
PR Close #45437
2022-03-29 17:13:07 -07:00
Willian Corrêa
82956dcbd3 Update aio/content/marketing/resources.json (#45076)
Co-authored-by: Alan Agius <alan.agius4@gmail.com>
PR Close #45076
2022-03-29 17:11:54 -07:00
Willian Corrêa
eb9dd8d267 docs: add Rangle's Angular Training book (#45076)
PR Close #45076
2022-03-29 17:11:54 -07:00
dario-piotrowicz
7d9492353d fix(docs-infra): implement focus trap for aio search results (#44989)
currently if a user tries to navigate via keyboard, once the are
presented with search results, the search results panel remains
present and can potentially hide most of the content on the page,
in such case keyboard navigation will be severly hindered and
the only option for the user would be to go back to the seach input
text and clear its value, fix such inconvenience by looping the
focus in the header area close to the search results and the
results panel itself

note: an alternative implementation using the cdkTrapFocus has been
attempted in PR #45194, such alternative implementation presented a
number of (minor) drawbacks (including the increase main bundle size
due to the inclusion of the A11yModule), so it was agreed to proceed
with the manual implementation present in these changes instead.

PR Close #44989
2022-03-29 16:56:03 -07:00
zverbeta
8e09445610 test: update aio payload size golden to reflect Angular update (#45376)
PR Close #45376
2022-03-29 15:25:49 -07:00
zverbeta
099fedc9b3 docs: add notification to support ukraine (#45376)
PR Close #45376
2022-03-29 15:25:49 -07:00
JoostK
06050ac2b4 fix(compiler-cli): handle inline type-check blocks in nullish coalescing extended check (#45454)
This commit fixes an inconsistency where a type check location for an inline
type check block would be interpreted to occur in a type-checking shim instead.
This resulted in a missing template mapping, causing a crash due to an unsafe
non-null assertion operator.

In the prior commit the `TcbLocation` has been extended with an `isShimFile`
field that is now being used to look for the template mapping in the correct
location. Additionally, the non-null assertion operator is refactored such
that a missing template mapping will now ignore the warning instead of crashing
the compiler.

Fixes #45413

PR Close #45454
2022-03-29 14:09:33 -07:00
JoostK
ff32301bf5 refactor(compiler-cli): track whether a TcbPosition corresponds with a shim file (#45454)
Extends `TcbPosition` with a field that indicates whether the `tcbPath` is a
type-checking shim file, or an original source file with an inline type check
block.

This field is used in an upcoming commit that fixes an inconsistency with how
inline type check blocks are incorrectly interpreted as a type-checking shim
file instead.

PR Close #45454
2022-03-29 14:09:33 -07:00
JoostK
b2758d781b refactor(compiler-cli): rename ShimLocation to TcbLocation (#45454)
Inline type check blocks (TCBs) are emitted into the original source file, but
node positions would still be represented as a `ShimLocation` with a `shimPath`
corresponding with the type-checking shim file. This results in inconsistencies,
as the `positionInShimFile` field of `ShimLocation` would not correspond with
the `shimPath` of that `ShimLocation`.

This commit is a precursor to letting `ShimLocation` also represent the correct
location for inline type check blocks, by renaming the interface to
`TcbLocation`. A followup commit addresses the actual inconsistency.

PR Close #45454
2022-03-29 14:09:33 -07:00
Renovate Bot
e55e98dce5 build: update all non-major dependencies (#45374)
PR Close #45374
2022-03-29 13:22:26 -07:00
Alex Rickabaugh
2142ffd295 feat(compiler-cli): propagate standalone flag to runtime (#44973)
This commit carries the `standalone` flag forward from a directive/pipe
into its generated directive/pipe definition, allowing the runtime to
recognize standalone entities.

PR Close #44973
2022-03-29 13:06:26 -07:00
Alex Rickabaugh
6f653e05f9 feat(compiler-cli): standalone types imported into NgModule scopes (#44973)
This commit implements the next step of Angular's "standalone" functionality,
by allowing directives/components/pipes declared as `standalone` to be imported
into NgModules. Errors are raised when such a type is not standalone but is
included in an NgModule's imports.

PR Close #44973
2022-03-29 13:06:26 -07:00
Alex Rickabaugh
459766b8aa test(compiler-cli): split standalone tests into component & module tests (#44973)
This just helps organize the standalone tests a little bit.

PR Close #44973
2022-03-29 13:06:26 -07:00
Alex Rickabaugh
60ef6e5aeb refactor(compiler-cli): move error for declaring standalone things (#44973)
This commit moves the error for declaring a standalone directive/component/
pipe to the `LocalModuleScopeRegistry`. Previously the error was produced
by the `NgModuleHandler` directly.

Producing the error in the scope registry allows the scope to be marked as
poisoned when the error occurs, preventing spurious downstream errors from
surfacing.

PR Close #44973
2022-03-29 13:06:26 -07:00
Alex Rickabaugh
3d13343975 fix(compiler-cli): better error messages for NgModule structural issues (#44973)
This commit improves the error messages generated by the compiler when NgModule
scope analysis finds structural issues within a compilation. In particular,
errors are now shown on a node within the metadata of the NgModule which
produced the error, as opposed to the node of the erroneous declaration/import/
export. For example, if an NgModule declares `declarations: [FooCmp]` and
`FooCmp` is not annotated as a directive, component, or pipe, the error is now
shown on the reference to `FooCmp` in the `declarations` array expression.
Previously, the error would have been shown on `FooCmp` itself, with a mention
in the error text of the NgModule name.

Additional error context in some cases has been moved to related information
attached to the diagnostic, which further improves the legibility of such
errors. Error text has also been adjusted to be more succinct, since more info
about the error is now delivered through context.

PR Close #44973
2022-03-29 13:06:26 -07:00
Alex Rickabaugh
f027bfb8e4 refactor(compiler-cli): remove NgModule tracking from scope data (#44973)
Before the `SemanticSymbol` system which now powers incremental compilation,
the compiler previously needed to track which NgModules contributed to the
scope of a component in order to recompile correctly if something changed.
This commit removes that legacy field (which had no consumers) as well as the
logic to populate it.

PR Close #44973
2022-03-29 13:06:26 -07:00
Paul Gschwendtner
6e1fce529a test: update aio payload size golden to reflect Angular update (#45461)
Updates the AIO payload size goldens to reflect the Angular update
affecting both the `aio` and `aio_local` build (due to CLI devkit
changes affecting both goldens, and the Angular update also affecting
the non-local `aio` build / job).

Overall, the Material themes got a little larger, but this is
not caused by the framwork, so not relevant here.

PR Close #45461
2022-03-29 09:26:00 -07:00
Paul Gschwendtner
209a73ede6 test: update api goldens to reflect api-golden bazel rule change (#45461)
The API golden Bazel rule has changed in the shared dev-infra code. Instead
of putting golden API reports into the golden folder as per their original
location in the NPM package, golden reports are now stored based on the
package exports. This makes it more obvious how entry-points are consumable

As part of this change, since the API golden rule now consutls the NPM package
`exports` field, the `localize/tools` entry-point golden file is now generated.

Previously it wasn't generated due to it not having a secondary entry-point
`package.json` file. Such package json files should not be needed anymore
and will be gone in future APF versions.

PR Close #45461
2022-03-29 09:26:00 -07:00
Renovate Bot
468c7768a6 build: update angular (#45461)
PR Close #45461
2022-03-29 09:25:59 -07:00
dario-piotrowicz
16e635ca49 fix(docs-infra): update a11y min-scores (#45209)
update (decrease) the value of some of the accessibility MIN_SCORES_PER_PAGE
after recent changes

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
0fc4571b85 fix(docs-infra): assign different aria labels to main aio navs (#45209)
assign different aria labels to the primary nav and the one used for
guides and docs, so that impaired users can more easily distinguish the
two

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
734bd8d953 fix(docs-infra): remove redundant main roles (#45209)
remove redundant main role as pages should always have a
single element with a main role (also remove the role assigne
to the main tag as that is implied)

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
be5dce2cdd fix(docs-infra): wrap the main aio mat-toolbar in a header (#45209)
wrap the main aio mat-toolbar in a header element to provide better
accessibility

resolves #16938 (the first point)

PR Close #45209
2022-03-29 09:23:12 -07:00
dario-piotrowicz
7ef071769f fix(docs-infra): remove navigation role to aio-top-menu ul (#45209)
currently the navigation ul used in aio-top-menu has a role of
navigation, but listitems should be owned by list parents
(see more: https://www.w3.org/TR/wai-aria-1.1/#listitem)
so wrap the ul in a nav and remove the role="navigation" from the
ul element to fix such issue

resolves #44562
resolves #16938 (the second point)

PR Close #45209
2022-03-29 09:23:12 -07:00
Michael-Doner
6e4cb48bc5 docs: adjust contributing, developing and overview markdown files (#45464)
Adjust the contributing, developing and overview markdown files based on the new repository location angular/angular

PR Close #45464
2022-03-29 09:22:50 -07:00
Dylan Hunn
801d11dd8a Revert "fix(compiler): scope css keyframes in emulated view encapsulation (#42608)" (#45466)
This reverts commit f03e313f24.

PR Close #45466
2022-03-29 09:12:19 -07:00
dario-piotrowicz
f03e313f24 fix(compiler): scope css keyframes in emulated view encapsulation (#42608)
Ensure that keyframes rules, defined within components with emulated
view encapsulation, are scoped to avoid collisions with keyframes in
other components.

This is achieved by renaming these keyframes to add a prefix that makes
them unique across the application.

In order to enable the handling of keyframes names defined as strings
the previous strategy of replacing quoted css content with `%QUOTED%`
(introduced in commit 7f689a2) has been removed and in its place now
only specific characters inside quotes are being replaced with
placeholder text (those are `;`, `:` and `,`, more can be added in
the future if the need arises).

Closes #33885

BREAKING CHANGE:

Keyframes names are now prefixed with the component's "scope name".
For example, the following keyframes rule in a component definition,
whose "scope name" is host-my-cmp:

   @keyframes foo { ... }

will become:

   @keyframes host-my-cmp_foo { ... }

Any TypeScript/JavaScript code which relied on the names of keyframes rules
will no longer match.

The recommended solutions in this case are to either:
- change the component's view encapsulation to the `None` or `ShadowDom`
- define keyframes rules in global stylesheets (e.g styles.css)
- define keyframes rules programmatically in code.

PR Close #42608
2022-03-28 17:12:25 -07:00
Andrew Kushnir
bf98c646f7 docs: add image directive to public roadmap (#45448)
PR Close #45448
2022-03-28 10:30:26 -07:00
Maddie Klein
d43c0e973f fix(http): Throw error when headers are supplied in JSONP request (#45210)
JSONP does not support headers being set on requests. This
enables JSONP to throw an error when headers are supplied
in the request to prevent attempts to set them.

BREAKING CHANGE: JSONP will throw an error when headers are set on a reques

JSONP does not support headers being set on requests. Before when
a request was sent to a JSONP backend that had headers set the headers
were ignored. The JSONP backend will now throw an error if it
receives a request that has any headers set. Any uses of JSONP
on requests with headers set will need to remove the headers
to avoid the error.

Closes #9141

PR Close #45210
2022-03-28 09:38:19 -07:00
Kristiyan Kostadinov
b36dec6b5b fix(forms): not picking up disabled state if group is swapped out and disabled (#43499)
Fixes a long-standing issue where swapping out the `FormGroup` and calling `disable` immediately afterwards doesn't actually disable the `ControlValueAccessor`.

Fixes #22556.

PR Close #43499
2022-03-28 09:26:19 -07:00
Renovate Bot
3d2a60e027 build: update dependency @bazel/ibazel to ^0.16.0 (#45259)
PR Close #45259
2022-03-28 09:25:26 -07:00
Paul Gschwendtner
c996b477a9 build: replace bazel devserver with shared dev-infra implementation (#45452)
As part of the devtools migration, we copied the custom http server/
dev-server from the `angular/components` repo. This server implementation
has now moved to the shared dev-infra code, and we can clean up the
copy in this repository now.

PR Close #45452
2022-03-28 09:23:28 -07:00
JiaLiPassion
aebf165359 fix(zone.js): should ignore multiple resolve call (#45283)
Close #44913

The following case is not handled correctly by `zone.js`.
```
const delayedPromise = new Promise((resolve) => {
  setTimeout(resolve, 1, 'timeout');
});

new Promise((resolve) => {
  resolve(delayedPromise);
  resolve('second call');
}).then(console.log);
```

It should output `timeout`, since the promise is resolved by the
1st resolve, the `second call` should be ignored.

So this is a bug that the original implementation not ensure the
`resolve` is only called once.

PR Close #45283
2022-03-25 17:31:03 -07:00
Kristiyan Kostadinov
d36fa111eb fix(core): avoid Closure Compiler error in restoreView (#45445)
Closure Compiler in advanced optimization mode may end up inlining the `ɵɵrestoreView` into the event listener which can lead to a runtime null pointer exception after the changes in #43075.

These changes add an annotation to prevent function inlining of the specific instruction.

PR Close #45445
2022-03-25 17:19:30 -07:00
Andrew Scott
96c7cc933e docs: deprecated relativeLinkResolution in the Router (#45308)
The `relativeLinkResolution` option was added as an option to opt-in to
corrected behavior when generating links relative to a route that has an
empty path parent. This was needed to avoid a breaking change. Since
then, we have switched the default to be the corrected behavior.
It's time to close the turn the lights off on this option so we no
longer have to maintain and document buggy behavior.

PR Close #45308
2022-03-25 16:50:46 -07:00
Paul Gschwendtner
31434943f1 build: disable payload size uploading within bazel (#45446)
Uploading payload size is unreliable from within Bazel. This is
because tests might not run for every commit, tests might have
been cached from a pull request RBE-build (causing payload uploading
to be skipped most of the time as every change comes from a PR)

We should disable the uploading as this is a fundamental problem
(good thing to note now) that we can solve with better payload
size tracking that we want to establish as part of dev-infra.

PR Close #45446
2022-03-25 16:50:09 -07:00
arturovt
4ea70e36b9 fix(zone.js): swallow the error when the element callback is not patchable (#45400)
The `patchCallbacks` is used for patching the `document.registerElement` and
`customElements.define`. We explicitly wrap the patching code into try-catch since
callbacks may be already patched by other web components frameworks (e.g. LWC), and they
make those properties non-writable. This means that patching callback will throw an error
`cannot assign to read-only property`. See this code as an example:
https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186
We don't want to stop the application rendering if we couldn't patch some
callback, e.g. `attributeChangedCallback`.

PR Close #42546

PR Close #45400
2022-03-25 16:31:09 -07:00