Commit Graph

4405 Commits

Author SHA1 Message Date
Paul Gschwendtner 3283e522e4 build: update travis to use most recent nodejs LTS version (#13104) 2018-09-13 12:05:45 -07:00
Paul Gschwendtner a5bc79c706 feat(ng-add): add x-prompts to install schematics (#13058)
* Recently the Angular CLI project introduced prompt support for schematics. Even though they seem to not run when using `7.0.0-beta.2` of the CLI, we should already ship the simple prompts for the `ng add` command.
* Renames the `/schematics/install` folder to `/schematics/ng-add`. (this makes it consistent with the actual schematic name and other packages that ship the `ng-add` schematic (e.g. `@angular/elements`)
2018-09-13 12:01:16 -07:00
Paul Gschwendtner 90af397d9b refactor(schematics): constructor check rule does not check all diagnostics (#13103)
* Currently if the node of a diagnostic couldn't be resolved, or the `className` is not part of the upgrade data, we accidentally `return` instead of `continuing` the `for of` loop that checks every determined diagnostic.
* Adds missing upgrade data for a V7 merged breaking change: https://github.com/angular/material2/pull/8286
* Renames the `test-cases/v5` directory to `test-cases/v6` because the test-cases are running against version target: `v6`.
* Adds test cases for V7 constructor checks data; test cases for property name change from #8286
2018-09-13 11:36:35 -07:00
Paul Gschwendtner 239c781f59 refactor(schematics): add tests for component walker (#13106)
* The `ComponentWalker` is a major part of the update schematics and we should verify that external resource files are resolved properly. All test-cases currently just use inline stylesheets or templates.
* Removes the `color` helper function.
* Removes the superfluous utility function for retrieving a `StringLiteral`'s text content.
2018-09-13 10:43:49 -07:00
Kristiyan Kostadinov 18d0fa869e feat(select): align panel appearance and animation with 2018 material design spec (#12975) 2018-09-11 20:00:46 -07:00
Kristiyan Kostadinov bd21f21a59 fix(button-toggle): underlying input not disabled when group is disabled (#11610)
Fixes the underlying `input` element inside a `mat-button-toggle` not being disabled when the parent toggle group is disabled via a data binding.

Fixes #11608.
2018-09-11 15:26:55 -07:00
Kristiyan Kostadinov a7de64a4cd fix(tabs): pagination state not updated when tab content changes (#12911)
Fixes the displayed state of the tabs pagination not being updated when the content of the tabs changes. The issue comes from the fact that the content change callback runs outside the `NgZone`.

Fixes #12901.
2018-09-11 15:26:24 -07:00
Sriram Sureshkumar 0c8efa54d4 docs(chips): fix autocomplete-chips example with addonblur enabled (#12971) 2018-09-11 15:22:06 -07:00
Muhammad Mahin Khan 62ff575ef1 docs(tree): typo in comment (#12968)
A typo for word data in the comment
2018-09-11 15:20:52 -07:00
Joey Perrott 5b503003a4 doc(paginator): clarify MatPaginatorIntl changes stream usage. (#13029) 2018-09-11 15:16:07 -07:00
Paul Gschwendtner 4f58d5a424 fix(examples): form-field custom control example not working (#13043)
* Removes a workaround that allowed the secondary component of the form-field-custom-control to use the primary asset files (`form-field-custom-control-example.(html|css` are reserved for the primary example component). This workaround caused the example to not render properly inside of StackBlitz.
* Fixes that the build-example-module task does not properly detect stylesheet additional files.
* Depends on https://github.com/angular/material.angular.io/pull/516
Fixes #13021
2018-09-11 15:15:37 -07:00
Kristiyan Kostadinov c5076bab74 docs(a11y): add docs about a11y style utilities (#13067)
Adds a couple of paragraphs about the utility styles that come with `cdk/a11y`.
2018-09-11 15:14:08 -07:00
Paul Gschwendtner 714c205312 feat(schematics): compatibility with Angular CLI 6.2.0 (#13078)
* Upgrades the devkit dependencies to the latest versions.
* Adds support for the newly introduced and published `project.targets` instead of `project.architect` (see: https://github.com/angular/angular-cli/commit/307160806cb48c95ecb8982854f452303801ac9f)
* Compatibility behavior for a published but non-announced breaking change within the schematic context (see: https://github.com/angular/angular-cli/commit/9720077a4b5ae628ddfaf5f1a26bac3b04bdf637#diff-e73df838d6700d187eff76a50c7e1c53R233`)
* Supports the new `project.targets` schema within the update schematics (in order to properly determine `tsconfig` files)
* Due to the fact that the @angular-devkit/schematics now handles Bazel better, the template files will be resolved through NodeJS. This means that the template files need to be referenced in the @//:node_modules label.

Fixes #11438
2018-09-11 15:13:35 -07:00
Paul Gschwendtner 6b2f00897f docs: component-grouper does not always include components (#13079)
* Currently we group the Dgeni docs by entry-points (we just call it *grouping by components*). Technically there are "component groups" that do not even include any component/directive (e.g. `cdk/coercion`, `cdk/platform`). This renames the component grouper to `entry point grouper`.
* No longer displays interfaces, classes, type-aliases etc. as `additional` "parts of an entry-point". (As mentioned above; sometimes classes are the primary export of an entry-point).
2018-09-11 15:12:58 -07:00
Kristiyan Kostadinov 664ef4c9d3 fix(drag-drop): incorrectly calculating index when sorting horizontally (#13082)
Fixes the list index not being calculated correctly, because the items are being sorted in memory based on their `top` position, even though the dragging is horizontal.

Fixes #13072.
2018-09-11 15:12:47 -07:00
Joey Perrott 6575ade81a chore: use computed radius size for checkbox ripple during 2018 material spec update transition (#13038) 2018-09-11 12:33:28 -07:00
Kristiyan Kostadinov 948e563ed9 fix(ripple): ripples not being cleared if touch sequence is canceled (#12936)
If the browser's touch sequence gets canceled by something, the `touchend` event won't fire which means that the ripples won't be cleared from the ripple container. These changes add an extra handler to make sure that they are.
2018-09-11 10:58:50 -07:00
Kristiyan Kostadinov cfb83a0ebc fix(grid-list): better handling of negative columns (#12939)
Currently if, by any chance, assigns a negative number to the `cols` of a grid list, they'll get a cryptic error like `Invalid array length`, because down-the-line we use that number to create an array. These changes ensure that the value is always a positive number.
2018-09-11 10:58:08 -07:00
Daniel Schuba e24f24a6a0 fix(tree): theming nested notes (#12938)
changes nested-tree-nodes to be styled the same as tree-nodes
2018-09-11 10:57:46 -07:00
Paul Gschwendtner 722dfb3633 fix(tooltip): not showing up on touch devices (#12940)
* Currently if someone long presses a tooltip trigger on a touch device, the tooltip will not show up. This is because the `longpress` event does reset immediately and not fire if a `slide` event is being recognized. The `slide` event most likely fires most of the time because of a `threshold = 0` (for smooth sliding)

Fixes #12917
2018-09-11 10:45:03 -07:00
Paul Gschwendtner 0389d12309 fix(tooltip): text fields not editable if tooltip is applied in safari (#12959)
Applying `matTooltip` directly on a `<input>` or `<textarea>` element causes HammerJS to add a `user-select: none` inline style. This prevents users from typing into the text fields in Safari.

Since the `user-select: none` is not needed for the `longpress` event, we can just **always reset** the `user-select` if a tooltip is applied on a text-field because we want to avoid such issues.

Fixes #12953
2018-09-11 10:43:40 -07:00
Kristiyan Kostadinov be510149e8 refactor(list): remove redundant focus logic (#12965)
Currently both the regular list and the selection list have focus and blur handlers whose job it is to toggle a focused class. This is redundant, because the same can be achieved with a `:focus` selector, without having to go through change detection.
2018-09-11 10:43:22 -07:00
Kristiyan Kostadinov cbfbaded96 fix(form-field): don't set up mutation observer on non-outline appearances (#12976)
Currently we use a `MutationObserver` to update the label gap when the label content changes. This is unnecessary on any appearance aside from `outline`.
2018-09-11 10:42:59 -07:00
Kristiyan Kostadinov 62136c16c4 refactor(focus-monitor): accept ElementRef in focusVia (#12978)
Looks like something that was missed in #12712. For consistency with `monitor` and `stopMonitoring`, accepts an `ElementRef` in `focusVia`.
2018-09-11 10:42:19 -07:00
Kristiyan Kostadinov f39e0911ca fix(portal): remove dependency on deprecated parentInjector (#12986)
The `ViewContainerRef.parentInjector` property is deprecated. These changes remove our dependency on it.
2018-09-11 10:41:40 -07:00
vivian-hu 69fa76236a feat(list): add new '<mat-action-list>' (#12415)
An action-list is a list where each list item is a native '<button>' element, meant to be used in cases where each list item has a single action with no sub-action, navigation or selection.
2018-09-11 10:41:20 -07:00
Kristiyan Kostadinov 8ee5fb66c6 fix(drag-drop): text selection not disabled on safari if user drags out of the viewport (#12864)
Currently we disable text selection on all draggable elements and their handles, however that doesn't seem to be enough on Safari, because moving your cursor towards the end of the viewport causes the entire body text to be marked. These changes also disable text marking on the entire body while the user is dragging.
2018-09-11 10:40:20 -07:00
Kristiyan Kostadinov ec0de52b68 fix(drag-drop): dragging class not being applied on drop container (#12921)
Fixes the `cdk-drop-dragging` class not being applied to the drop container after 5d0ec23b1d. The introduction of the `onStable` call caused the event to be bound outside the `NgZone`.
2018-09-11 10:39:42 -07:00
Kristiyan Kostadinov fb7bf900c0 fix(drag-drop): DOM element not being returned to initial container on drop (#12948)
Currently when an item is dropped, we return it to its initial position in the DOM so Angular can take over and re-render it if necessary, however this breaks down if the item is the only child of the drop container and we weren't able to grab a reference element that we can use to restore its position. These changes address the issue by using the initial drop container as a reference.

Fixes #12944.
2018-09-11 10:39:27 -07:00
Kristiyan Kostadinov d1c27ae1c4 refactor(drag-drop): expose delta in moved event (#12952)
Since we now have the delta of the movement easily available, we can expose it via the `cdkDragMoved` event.
2018-09-11 10:39:11 -07:00
Kristiyan Kostadinov 951add921d fix(drag-drop): incorrectly picking up transitions on non-transform properties (#12966)
Currently we wait for the transition on a dropped item to end before completing the sequence or timing it out. Our current approach works for a single property transition (e.g. `transition: transform 300ms`), but will break down for multi-property ones (`transition: opacity 300ms, transform: 600ms`) or ones that don't target `transform` at all. The following changes rework the logic to handle the extra cases.
2018-09-11 10:38:51 -07:00
Jeremy Elbourn 5718975b57 Revert "feat(button): align with 2018 material design spec (#12537)" (#13080)
This reverts commit 4ddbde93ea.
2018-09-11 10:31:05 -07:00
Joey Perrott 1908b3e8eb chore(dialog): update dialog animations for 2018 material spec update (#13059) 2018-09-11 10:21:38 -07:00
Paul Gschwendtner 041a41d4a7 build(dashboard): switch to new @angular/fire package (#13051)
Switches the dashboard to the new scoped name for the `angularfire2` package.
2018-09-10 16:09:29 -07:00
Paul Gschwendtner e1b040d0e1 build(docs): fix directive metadata not showing up in docs (#13057)
* Due to the recent update to TypeScript 3.0.0, the new TS version conflicts with the internal TypeScript version from `dgeni-packages`. This causes the selector, exported-as to not show up in the docs.
* Removes the selector blacklist and `md-`prefix filter. All of the blacklisted selectors have been removed (except the autosize selector; but the whole class has been deprecated now)
2018-09-10 16:06:35 -07:00
Paul Gschwendtner 05563d95f8 chore(schematics): add missing constructor checks data (#13052)
Adds the constructor signature check data for https://github.com/angular/material2/pull/11706 which is already published in `7.0.0-beta.0`.
2018-09-10 16:03:24 -07:00
Paul Gschwendtner d74f94c335 build: run publish sanity checks before building (#13060)
Runs the publish sanity checks before building the release output of Angular Material. Building the release output is very time consuming, and therefore the sanity checks should run before.

Closes #12918
2018-09-10 15:54:25 -07:00
Ben Lesh 0a25fca2d7 fix(typings): update typings to support more strict typings in RxJS 6.3.2 (#12979) 2018-09-10 13:23:27 -07:00
Paul Gschwendtner 9886b1b198 refactor(schematics): avoid typescript version conflicts (#12989)
The Angular Material schematics parse TypeScript sources files and pass the AST to the `@schematics/angular` package which defined an explicit dependency on `typescript`. Since we currently just always require the flattened `typescript` dependency (`node_modules/typescript`), there could be either no TypeScript version or a different TypeScript version that causes the AST operations of the `@schematics/angular` utility functions to not work properly (e.g. different `SyntaxKind` ids)

We should primarily try to load the same TypeScript version that has been shipped with the `@schematics/angular`. If that one couldn't be found, fall back to the top level `typescript` version.

Includes workaround for Bazel ts module resolution
2018-09-10 07:20:16 -07:00
Paul Gschwendtner c54c89769c refactor(schematics): constructor checks should respect assignability (#13050)
Reworks the constructor signature check rule to take advantage of the TypeScript pre-emit diagnostics. This is necessary because there is no public API to check the relation of two types (e.g. checking if the super-call arguments are assignable to the actual constructor parameter signature)

This now means that the constructor checks respect type assignability (e.g. it won't throw incorrectly if a developer does something like:

```ts
class ExtendedPlatform extends Platform {}

new NativeDateAdapter(a, new ExtendedPlatform(...))`
```
2018-09-10 07:19:26 -07:00
Kristiyan Kostadinov 7c4fa66d53 build: don't allow trailing whitespace in CSS files (#13014)
Similar to TS files, doesn't allow trailing whitespace in CSS.
2018-09-06 15:14:43 -07:00
Paul Gschwendtner 098f25a2fd refactor(schematics): enable strict null checks (#12983)
* Enables strict null checks for the schematics and fixes a few potential unsafe accesses.
* Supports specifying a project for `ng-add`.
2018-09-06 13:53:21 -07:00
Paul Gschwendtner e124418d07 refactor(ng-update): better check for updated constructor signatures (#12970)
Instead of just checking the length of the constructor arguments, we now check the types of the constructor or super call. This means that we can *way* better report invalid signatures for constructor changes like for the `MatCalendar` (https://github.com/angular/material2/pull/9775). Just relying on the length of arguments means that *order*  is being ignored.

This also makes maintaining the constructor signature changes easier (there are a lot of instances for V7).
2018-09-05 16:31:24 -07:00
Kristiyan Kostadinov 86be1dcb19 docs(overlay): add note about pre-built styles (#12993)
Adds a note about the pre-built overlay styles since we have not mention of them anywhere else in the docs.

Fixes #8717.
2018-09-05 13:39:26 -07:00
Paul Gschwendtner 5d9ab9eeb2 refactor(schematics): re-add disabled aliases (#12982)
* Due to a devkit issue, we temporarily had to remove the schematic aliases in order to be able to run the tests. Since this issue has been fixed a long time ago, we can re-add the aliases.
* Also adds more aliases to other schematics for consistency.
* Locks the devkit and schematics version because there is an ongoing type definition bug within the devkit (https://unpkg.com/@angular-devkit/core@0.7.5/src/virtual-fs/host/test.d.ts).
2018-09-05 10:39:14 -07:00
Paul Gschwendtner fe642115de fix(ng-update): do not throw if imports without named bindings are used (#12866) (#12984)
Currently if someone uses a namespace import or an import without named bindings in an Angular application, the `ng-update` schematics from Angular Material will fail due to missing safety checks before casting.

Fixes #11571
2018-09-05 10:29:55 -07:00
Kristiyan Kostadinov 4ddbde93ea feat(button): align with 2018 material design spec (#12537)
Aligns the button component with the latest Material design spec.
2018-09-05 08:03:11 -07:00
Paul Gschwendtner dc6688df04 build: skip duplicate commit entries in changelog (#12943)
Ensures that commits are not showing up multiple times in the changelog.

Commits can show up multiple times, if a changelog has been generated on a publish branch and has been copied over to "master". In that case, the changelog will already contain the commits that have been cherry-picked into the publish branch. These shouldn't be added twice.

Closes #12915
2018-09-04 15:12:17 -07:00
Paul Gschwendtner cfb4f58eda refactor(schematics): split up upgrade data for target version (#12951) 2018-09-04 11:54:08 -07:00
Paul Gschwendtner da95e34ef6 build: update dgeni packages (#12956)
* Upgrades to the latest Dgeni packages version that includes a fix which ensures that the docs for the `Platform` show up properly.

See: https://github.com/angular/dgeni-packages/commit/ab957d1234b49624fb999e321479a8b7493a114a
2018-09-04 11:50:26 -07:00