Commit Graph

4599 Commits

Author SHA1 Message Date
Paul Gschwendtner 2dff30161d chore(schematics): re-enable linting for ignored file (#13542)
* 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)
2018-10-10 11:28:53 -07:00
Paul Gschwendtner b0a1dafa8e fix(schematics): template content exceeds max line length (#13521)
* 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`.
2018-10-10 11:28:40 -07:00
Paul Gschwendtner c14c34e84a docs: show all available schematics in the schematics guide (#13520)
* docs: show all available schematics in the schematics guide

* Updates the outdated `schematics` guide to mention the new available component schematics.

* Address feedback
2018-10-10 11:28:08 -07:00
mmalerba f1386824ab demo(prerender): add theme to prerender demo (#13516) 2018-10-10 11:27:50 -07:00
Kristiyan Kostadinov c4a422abad build: fix custom lint rule throwing errors in IDE on invalid files (#13488)
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})`).
2018-10-10 11:27:12 -07:00
Paul Gschwendtner e0856645e0 build: enable sourcemaps for bazel (#13471)
* 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.
2018-10-10 11:27:05 -07:00
Paul Gschwendtner 4ada0c46fa build: fix firebase app type warnings (#13469)
* The `firebase` packages comes by default without typings. Firebase defines the app types as peer dependencies, so we should fix those.
2018-10-10 11:26:57 -07:00
Paul Gschwendtner d1e59a21fc fix(ng-add): do not add theme file if existing theme is set up (#13468)
* 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
2018-10-10 11:26:49 -07:00
Jeremy Elbourn 21de68e6d7 docs: update readme for Q4 2018 (#13463) 2018-10-10 11:26:38 -07:00
Michael Prentice 4a0eb2bc70 fix(schematics): tree folder icons do not have enough contrast (#13462)
addresses aXe/Lighthouse a11y audit failures
2018-10-10 11:26:30 -07:00
Paul Gschwendtner b06a897b5b build: ensure dependencies are properly locked (#13482)
* 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.
2018-10-10 11:26:05 -07:00
vivian-hu 2e4a51180b chore: bump verion to 7.0.0-rc.1 w/ changelog (#13501) 2018-10-08 17:34:05 -07:00
Jeremy Elbourn 9cd3132607 chore: fix implicit-any error in drag-styling.ts (#13500) 2018-10-08 17:09:46 -07:00
Kristiyan Kostadinov f3555f164e refactor(drag-drop): convert cdk-drop into a directive (#13441)
Converts `cdk-drop` into a directive and moves the handful of structural styles into JS.

Fixes #13341.
2018-10-08 15:59:44 -07:00
Paul Gschwendtner 4b15b78a44 build(docs): ensure const types are not truncated (#13457)
* 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`.
2018-10-05 16:36:08 -07:00
Paul Gschwendtner 4a9bbcb60d fix(schematics): name is required when generating the drag-drop schematic (#13452)
* 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`)
2018-10-05 16:34:34 -07:00
Paul Gschwendtner da63c6f850 build: switch to yarn (#13362)
* build: switch to yarn

* Use more recent version of Yarn
2018-10-05 14:37:41 -07:00
Jeremy Elbourn 4fc5ee1571 docs: clean up and clarify theming docs (#13435)
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
2018-10-05 14:36:35 -07:00
Paul Gschwendtner b7de6be7ed chore(docs): hide value accessors from docs (#13453)
* 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.
2018-10-05 14:14:04 -07:00
Kristiyan Kostadinov e4cf0599e7 refactor(live-announcer): run outside NgZone (#10631)
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.
2018-10-05 13:52:22 -07:00
Joey Perrott a706c8c619 fix(expansion-panel): correct jump in panel sizing during animation (#12509) 2018-10-05 11:26:53 -07:00
Kristiyan Kostadinov 0060bd7ec8 fix(form-field): not updating outline when prefix/suffix is added or removed (#13253)
Fixes the form field's outline not reacting to the prefix/suffix being toggled after init.

Fixes #13251.
2018-10-05 11:12:58 -07:00
Kristiyan Kostadinov 1c60acf728 docs(button-toggle): add appearance docs and example (#13416)
As discussed in #12443, these changes add some docs and a live example for the button toggle `appearance`.
2018-10-05 11:10:55 -07:00
Paul Gschwendtner 900c1f7e71 refactor(schematics): better margin for drag-drop schematic (#13447)
* 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)
2018-10-05 11:10:18 -07:00
Paul Gschwendtner 321c01d723 build(docs): deprecated state of type alias not showing up (#13449)
* 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)
2018-10-05 11:09:50 -07:00
Kristiyan Kostadinov b8c1024a09 refactor: add support for noImplicitAny (#13381)
Enables the `noImplicitAny` compiler option and fixes all of the resulting compiler errors.

Fixes #13330.
2018-10-05 09:17:17 -07:00
Kristiyan Kostadinov 9e5fd9133a fix(icon): handle references for pages with base tag (#12428)
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.
2018-10-05 09:07:21 -07:00
Michael Nahkies 3fc0d36850 feat(datepicker): add ng-content to datepicker header (#13236)
* 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
2018-10-05 09:05:29 -07:00
Kristiyan Kostadinov 4f43f5c63d fix(chips): content not centered vertically on IE in some cases (#13260)
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`.
2018-10-05 09:02:23 -07:00
Paul Gschwendtner 15a1ab7d89 fix(ng-add): allow using noop animations (#13429)
* 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
2018-10-04 14:47:05 -07:00
Joey Perrott 7b3de83d6f chore: remove orphaned duplicate comment (#13433) 2018-10-04 14:40:22 -07:00
Paul Gschwendtner 72ccd8b831 feat(schematics): create drag-drop schematic (#13368)
* 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)
2018-10-04 11:53:40 -07:00
Paul Gschwendtner 3254992a8e build: update bazel typescript rules (#13408)
* 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)
2018-10-04 11:52:59 -07:00
Adrian PALUMBO cdf83097f4 docs(form-field): invert "visibility" icon for password example (#13417)
Based on  https://material.io/design/components/text-fields.html#outlined-text-field
2018-10-04 11:52:03 -07:00
Kristiyan Kostadinov 84d8f5beb8 fix(experimental/dialog): clean up open dialogs on destroy (#13421)
Cleans up all of the open dialogs when a dialog from `cdk-experimental/dialog` is destroyed.
2018-10-04 11:49:38 -07:00
Marco Lrv 2ed191648b docs(bottom-sheet): fix typo in example (#13425) 2018-10-04 11:46:52 -07:00
Kristiyan Kostadinov bf66d57b6d fix(tabs): disabled tab link not preventing router navigation (#10358)
Fixes users being able to navigate to a new route by clicking on a disabled `mat-tab-link`.

Fixes #10354.
2018-10-04 10:15:01 -07:00
Kristiyan Kostadinov eb95e614da fix(chips): ripple not clipping correctly in safari (#12244)
Fixes the ripple on a `mat-chip` not being clipped to the rounded corners on Safari.
2018-10-04 10:13:35 -07:00
Paul Gschwendtner 6a7327351f build(docs): show exported constants in docs (#13168)
* 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.
2018-10-04 10:11:09 -07:00
Paul Gschwendtner afb035232d fix(checkbox): ripple not hiding after click/touch (#13295)
* 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
2018-10-04 10:06:59 -07:00
Kristiyan Kostadinov 3583913583 fix(button-toggle): remove extra focus indication added by firefox (#13367)
Resets the extra focus indication that Firefox adds on top of our custom indication.
2018-10-04 10:02:59 -07:00
Kristiyan Kostadinov cb5b15e63c fix(select): allow extra content to be projected after label in mat-optgroup (#13396)
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.
2018-10-04 09:57:33 -07:00
Kristiyan Kostadinov d58db5d147 fix(button-toggle): not setting proper border in vertical mode (#13397)
Looks like something that slipped through when refactoring the previous PR to support multiple appearances. The selector that was supposed to set the proper borders in vertical mode was incorrect.
2018-10-04 09:55:42 -07:00
mmalerba 6ee91499f4 fix(virtual-scroll): don't set both right and left on the content (#13412)
wrapper

Otherwise it prevents the horizontal scrollbar from showing when
`contain: content` is used. Fixes #13231
2018-10-04 09:52:18 -07:00
Kristiyan Kostadinov 8dfd2ee776 fix(autocomplete): closing parent overlay when pressing escpe (#13413)
Currently we only listen for keydown events on the autocomplete trigger, however because the escape handler doesn't go through the `OverlayKeyboardDispatcher`, it means parent overlay will still receive the event, causing unintended side effects like the parent dialog closing when escape is pressed on an autocomplete. These changes switch the closing actions to go through the `OverlayRef.keydownEvents()`.
2018-10-04 09:49:58 -07:00
vivian-hu a620fca9d8 Fix(script): schedule presubmit at same time and fix a typo in file name (#13418)
* fix(script): make the presubmit run at same time

* fix(script): fix typo in file name
2018-10-03 16:28:06 -07:00
Paul Gschwendtner f91c0b75d5 docs(schematics): add drawing for CDK shared logic (#13394)
* Adds a drawing which has been created before implementing the shared schematic logic with the CDK. This drawing should be in the repository because it avoids recurring questions about the CLI workflow.
2018-10-03 14:52:34 -07:00
Kristiyan Kostadinov 342c7495f0 docs(drag-drop): fix cross-browser inconsistencies in demos (#13364)
Fixes the text in the drag&drop demos not being centered horizontally on some browsers, as well as the handle being too tall on IE11.
2018-10-03 14:30:24 -07:00
Paul Gschwendtner 4a0b09a106 fix(schematics): proper error if name is not specified (#13379) 2018-10-03 14:23:19 -07:00
Paul Gschwendtner 7cd3ef5801 build: fix bazel schematic setup on windows (#13393)
* Currently running tests of the schematic is not working on Windows because there is a bug within the `rules_nodejs`. See: https://github.com/bazelbuild/rules_nodejs/issues/352
2018-10-03 14:20:57 -07:00