* fix(virtual-scroll): fix several small bugs
fixes include:
* ensure content wrapper is at least as wide as the viewport
* run change detection when data source emits but the data length remains the same
* improve error message when no virtual scroll strategy is provided
* add docs on using a custom virtual scroll strategy
* address comments
* address feedback
Fixes the `enterPredicate` being called with the item's current container, rather than the one it is being moved into. Also tweaks the function signature to avoid unnecessary null checks and expands the description.
* Fixes the `disableClose` option not working for `cdk-experimental/dialog`.
* Updates our unit tests that were supposed to catch the issue, but didn't. Also updates similar tests for `material/dialog` and `material/bottom-sheet`.
Fixes#13583.
Fixes the `Dialog` emitting some of its events twice on certain browsers due to an issue in `@angular/animations` which invokes the animation `done` callback twice.
Fixes#13585.
* As we've already moved the ng-update foundation to the CDK, and therefore introduced an `optionalDependency` on `parse5` for the CDK, we should also move the last `parse5` call from `@angular/material` to the `@angular/cdk`. This way we don't depend on `parse5` for both packages + we can re-use the abstract utility function within the CDK schematics if we need them.
* The `parse5` runtime check is actually not working because NodeJS would throw already if we just `require("parse5")`. Since we marked `parse5` as a dependency and the default NodeJS `module not found` message is clear enough, we can remove this check from the `ng-add` command as well.
* Since we already track all available schematics in the schematics guide, we should remove the outdated `README.md` for the Angular Material schematics.
* Also while being at it, we should remove the readme for the CDK schematics as well because there is no useful information stored within that readme (the source is self-explaining; and documented mostly)
* Fixes the free-dragging example in the docs site going under other UI elements if they're dragged too far.
* Fixes one of the buttons on the tooltip demo being uneven.
Fixes#13510.
* Since the CLI is able to prompt for required schema properties, we should automatically prompt for a name when a developer wants to generate a CDK or Material component.
* build: build cdk with angular from source
* Continues the long-term Bazel goal by fixing the CDK bazel build
targets. Also builds the CDK targets with Angular from source.
Follow up's will try to make serving, and testing possible.
* Build package on CI
* No longer compile with AOT compiler that generates factory files that cannot be packaged into "ng_package"
* Re-enables linting for the `build-component` file which has been originally copied from `@schematics/angular`. For some reason, linting has been disabled explicitly for this file. This re-enables TSLint.
* Also fixes a few shadowed variable failures (this logic comes from the `@schematics/angular:component` schematic and **should** be kept as similar as possible)
* Assuming most of the CLI projects have the line limit at around `100`, one line within the `address-form` TS template file exceeds this average max-line-length boundary by `17`.
* Since the NodeJS rules execute built code in a sandbox, we need to enable source map support. This is recommended by the `Bazel NodeJS` rules.
* Also introduces support for repository-wide defaults. This will be helpful when fully switching to Bazel.
* fix(ng-add): do not add theme file if existing theme is set up
* No longer adds other theme files to the workspace configuration if a custom theme has been generated in a previous run already.
* Instead of silently doing nothing if a prebuilt theme is being generated while another prebuilt theme is already defined, we now replace the previous prebuilt theme with the new theme.
* Do not overwrite existing custom-theme files
* Similar to the other component generation schematics in `@angular/material`, the drag-drop schematic in `@angular/cdk` requires a name to be specified. If we don't mark this as required, a runtime exception will be thrown (`Cannot read property 'replace' of undefined`)
* Since we recently added logic for showing constants in the docs, we should avoid showing the value accessor constants which are actually just used kind-of internally.
Switches to running the timeout from the `LiveAnnouncer` outside the `NgZone`, because it does all of its DOM manipulation directly on the element and it doesn't have to trigger Angular's change detection.
* Improves the margin of the drag-drop schematic containers. Since the component does not have any inner padding, the containers would show up at the edge of the page. This happens if someone just runs `ng add @angular/cdk` and `ng g @angular/cdk:drag-drop myComponent`.
* Indents wrapped attributes in HTML template files. The goal of the schematics should be also to generate resources that can be used for learning. Right now it's not 100% clear where the child element starts (see: https://google.github.io/styleguide/htmlcssguide.html#HTML_Line-Wrapping)
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router).
Fixes#9276.
* feat(datepicker): add ng-content to datepicker header
- add ng-content to datepicker header to simplify
customization of this component
- fix tests using calendarHeaderComponent property
to correctly reference the custom component
- add test to prove that custom component was
rendered
Closes#13212
* test(datepicker): code review fixes
- remove unnecessary tests
- simplify demo code
Fixes the chip content not being centered on IE when using a chip avatar. The issue comes from the fact that IE's centering doesn't work if the element has a `min-height`, but not a `height`.
* Currently we always install `@angular/animations` and add the `BrowserAnimationsModule` to the project module. There should be a prompt/option that allows developers to use the `NoopAnimationsModule`.
* Also no longer adds the `BrowserAnimationsModule` if the project already uses the `NoopAnimationsModule` (avoiding magic). Same applies for the `NoopAnimationsModule`. We won't add the noop animations module if the browser animations module is configured.
Handle existing animation modules
* Creates a CDK schematic that can be used to generate a component that uses the CDK Drag & Drop module. The code is based on the `sorting` example of the drag-drop (just a bit trimmed to keep the code simple)
* Updates the Bazel TypeScript rules.
* Fixes a test case which doesn't match the name of the upgrade data it runs with (`css-names` --> `css-selectors`)
* Removes Bazel version check (the NodeJS rules automatically check the Bazel version based on the version of the NodeJS rules)
* Currently constants which are exported, will not show up in the docs. This introduces support for displaying `constants` in the docs.
* Also creates a Nunjucks plugin that supports highlighting specific code snippets. This is helpful when rendering a type in the docs (similar to angular/aio)
* Marks most animation constants as `@docs-private` because those shouldn't be relevant to users.
* Currently if someone toggles the slide-toggle through mouse interaction, the persistent ripple will show up besides one transient ripple. The persistent ripple should only show up if the native checkbox element was focused through keyboard.
Fixes#13291
Allows for consumers to project extra content into the label of `mat-optgroup`. Currently any content that isn't a `mat-option` won't be rendered.
Fixes#11489.