* 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`.
* docs: show all available schematics in the schematics guide
* Updates the outdated `schematics` guide to mention the new available component schematics.
* Address feedback
Fixes errors being thrown by the decorator validation rule when run in an IDE. The errors can happen, because the rule is run for each key stroke and the user might not be done typing out the definition yet. The two cases where it was throwing were when a decorator is added without being called (e.g. `@Component class Something`) and when defining a new property that doesn't have an initializer yet (e.g. `@Component({selector})`).
* 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
* Since we lock our dependencies in the `yarn.lock` file, we need to enforce that the lock file is in sync with the `package.json` file (similar as in angular/angular)
* Since we cache the dependenices & the yarn cache within Travis, it can happen that the node modules are stale (there is no checksum mechanism in Travis). In that case we need to purge the node modules and re-install.
* By default TypeScript truncates the types when calling `typeToString`. Since we don't want to truncate the types automatically, we need to work around: https://github.com/angular/dgeni-packages/issues/276 until there is a possibility to change this using the `tsHost`.
* 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`)
This makes some minor wording changes to the main theming guide and
mostly rewrites the theming-your-own-component guide. Edited for
clarify, brevity, and language.
Fixes#13206
* 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)
* Currently if a type alias is marked as `@deprecated`, we don't add an indication as for the constants. Now a similar indication will be added if a type alias is deprecated.
* Similarly to the constants and `angular.io`, we will display the actual type of the `type-alias` in a better-looking & more clear way.
* Also fixes that the constant code "overview" does not include the trailing semicolon (Angular.io also adds a trailing semicolon)
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.