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.
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.
* 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
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
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.
Currently we use a `MutationObserver` to update the label gap when the label content changes. This is unnecessary on any appearance aside from `outline`.
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.
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.
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`.
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.
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.
* 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)
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
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
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(...))`
```
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).
* 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).
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
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
* Since the schematics are also built through Gulp, we need to specify the `exclude` option in the `tsconfig`. Bazel warns because those options will be ignored. Similarly to all other tsconfig files, we should suppress the warnings.
* Instead of hard-coding the rule directories and potentially forgetting about adding directories if new rules have been created, we automatically resolve the directories through `glob`. Glob is already used in various schematic parts, and can be used here as well.
* Reworks the breaking change tslint rule to remove the logic that checks that there are no expired breaking changes.
* Adds a new script that can be used to get an overview of the pending and expired breaking changes.
This is not a bug fix because the styleext file is basically empty. But in case we add styles to the styleext template file, we should automatically properly inline the styles if `--inlineStyle` is specified.