Commit Graph

3821 Commits

Author SHA1 Message Date
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
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
Paul Gschwendtner 3f8ee748dd fix(schematics): @angular/material schematics not working (#13406)
* Due to the upgrade to TypeScript 3.0.0 and the fact that we refer to the actual sources instead of `../../../dist/packages/cdk` (for path mappings), TypeScript will output the Material schematics in an incorrect output structure. This can be fixed by taking advantage of the new "Project References" feature.

https://github.com/angular/material2-builds/tree/master/schematics/lib/schematics (Notice the additional `lib/schematics` folder in the `@angular/material/schematics` folder).
2018-10-03 14:16:42 -07:00
vivian-hu c07184dc70 use pointer cursor for native select when not disabled (#13184) 2018-10-03 11:50:24 -07:00
Kristiyan Kostadinov ffa4a06cad fix(bottom-sheet): dismiss bottom sheet on destroy (#13120)
Dismisses the open bottom sheet if the service is destroyed.
2018-10-03 11:48:30 -07:00
Kristiyan Kostadinov bef9a17c62 fix(list): selection list not marking options as selected correctly when setting value with duplicates (#13363)
Along the same lines as #13361. Fixes the selection list not marking all selected options correctly when an array with duplicate values is assigned programmatically.
2018-10-03 11:13:32 -07:00
Kristiyan Kostadinov 56f2e50273 chore: fix drag-drop test failure (#13400)
Fixes a failure in `cdk/drag-drop` that was due to a couple of conflicting PRs getting in close to each other.
2018-10-03 10:20:43 -07:00
vivian-hu aea43ebcca Revert "avoid multiple async calls (#13301)" (#13399)
This reverts commit 381c03725c.
2018-10-02 15:38:17 -07:00
Amit Portnoy 381c03725c avoid multiple async calls (#13301) 2018-10-02 15:30:35 -07:00
Kristiyan Kostadinov 4345245cf3 chore: fix compilation error in master (#13398)
Fixes a compilation error that got introduced in master because of the TS 3.1 update.
2018-10-02 15:21:10 -07:00
Kristiyan Kostadinov fe3f37ac6f fix(paginator): icons and labels not centered vertically on IE (#12495)
Fixes the text and icons inside the paginator not being centered vertically on IE11.

Fixes #12491.
2018-10-02 13:41:13 -07:00
Kristiyan Kostadinov 4d4ee182de refactor(selection): avoid awkward null check for onChange event (#12348)
Doesn't type the `SelectionModel.onChange` event to `Subject | null` anymore, in order to avoid having people null-check it on every consumption.

Fixes #12347.
2018-10-02 13:40:46 -07:00
Juliano f44d6db73a fix(datepicker): change overlay position strategy so the calendar is kept on-screen (#11607)
* change withPush strategy to true

* address @crisbeto's comment
2018-10-02 13:40:09 -07:00
Kristiyan Kostadinov e8a6ea19e0 fix(chips): selectionChange event firing when value has not changed (#13173)
Fixes the `selectionChange` event always firing for the setter, `select`, `deselect` and `selectViaInteraction`, even if the value hasn't changed. Also gets rid of some repetition around emitting the event.
2018-10-02 13:39:16 -07:00
nename0 63f2ef4d7f pref(table): prevent unnecessary reflow with sticky row (#12786)
The offset of a sticky row is calculated by summing up the heights of
the previous sticky rows. As the access to the height causes a forced
reflow this is now skipped when there is only one row.
2018-10-02 13:37:56 -07:00
Kristiyan Kostadinov 707a7ee7a5 fix(scrolling): viewport ruler resize event running inside the NgZone (#12909)
Fixes the `resize` and `orientationchange` events from the `ViewportRuler` being run inside the `NgZone`, even though the intention is that they shouldn't be. The issue comes from the fact that we call `merge` outside the `NgZone`, however the thing that causes the event to be bound is the subscription right after it.

Fixes #12883.
2018-10-02 13:33:35 -07:00
Kristiyan Kostadinov 3e1cff0618 fix(grid-list): incorrectly laying out tiles for nested list (#13086)
Fixes the grid list picking up the tiles of other nested grid lists, causing them to not being laid out correctly.

Fixes #13074.
2018-10-02 13:32:42 -07:00
Kristiyan Kostadinov 3c55caaf1e fix(a11y): not being able to escape disabled focus trap using arrow keys (#13133)
Currently when a focus trap is disabled, we set the `tabindex` of the anchors to -1 in order to allow people to tab out of it. This doesn't work if somebody is navigating with the arrow keys using a screen reader, because the element is still focusable which means that the screen reader will focus it eventually, causing focus to be trapped. These changes remove the `tabindex` if the focus trap is disabled instead.

**Note:** An alternate approach to this can be to hide the element using `display: none`, but I opted to remove the `tabindex` in order to avoid a style recalculation.

Fixes #13132.
2018-10-02 13:31:30 -07:00
Kristiyan Kostadinov 730e6a30a1 fix(menu): incorrectly styling keyboard focus, if trigger is right clicked before opening (#13136)
Currently `mat-menu` displays focus indication only if it has been opened by keyboard. We detect how the menu was opened using a `mousedown` event. The issue comes from the fact that `mousedown` also fires for right or middle button clicks, event though a subsequent `click` won't fire, which will throw off our detection if the user opens the menu with their keyboard afterwards. These changes add a check that ensures that only left button clicks are considered as opening.
2018-10-02 13:30:45 -07:00
Kristiyan Kostadinov ff23527b47 refactor(table): allow readonly array in data source input (#13137)
Adds `ReadonlyArray` and `Observable<ReadonlyArray>` to the list of accepted types for the `CdkTable.dataSource` input.

Fixes #13126.
2018-10-02 13:29:01 -07:00
Kristiyan Kostadinov f5dd24aab5 fix(overlay): incorrectly calculating centered position on a scrolled page with pushing (#13185)
Fixes a centered flexible overlay with pushing, on a scrolled page, not calculating the position properly. There were a couple of issues:
* We were using the `top` viewport offset to calculate along the X axis, as well as `left` to calculate along Y.
* We weren't accounting correctly for the scroll position.

Fixes #11868.
2018-10-02 13:27:51 -07:00
Kristiyan Kostadinov 38e7dd24cf fix(drag-drop): avoid interfering with element clicks (#13152)
Resolves a long-standing TODO about starting the drag&drop sequence after the user has dragged over a certain amount of pixels, rather than starting it immediately on `mousedown`/`touchstart`. This prevents random clicks and taps on the element from being interpreted as dragging and avoids potentially interrupting the native click events on children of `CdkDrag`.
2018-10-02 13:25:32 -07:00
Kristiyan Kostadinov 3de38511e6 feat(bottom-sheet): add injection token for default options (#13172)
Introduces the `MAT_BOTTOM_SHEET_DEFAULT_OPTIONS` token which can be used to set the default options for `MatBottomSheet`.

Fixes #13149.
2018-10-02 13:24:15 -07:00
Kristiyan Kostadinov ab44d50f5f fix(form-field): blue box inside focused native select on IE (#13187)
Resets the blue box that the user agent draws inside focused `select` elements in IE11.
2018-10-02 13:21:42 -07:00
Kristiyan Kostadinov 238aef04c3 fix(overlay): wait for panel to detach before removing panelClass (#13199)
Currently we remove the `panelClass` as soon as `detach` is called, however the pane may still be animating. These changes wait for the panel to be done animating and to be removed from the DOM, before removing the class.

Fixes #13189.
2018-10-02 13:20:16 -07:00
Kristiyan Kostadinov d6ba25fb1a fix(select): handle home and end keys on closed select (#13278)
Moves the selection to the first/last item when pressing home/end on a closed `mat-select`, similarly to a native `select`.
2018-10-02 13:17:13 -07:00
Jeremy Elbourn c9681bf014 chore: update to TypeScript 3.1 (#13384)
With TypeScript 3.1, several native DOM types have been updated. Notably, `document.documentElement` and `document.activeElement` are now nullable. APIs relating to `matchMedia` were also updated.
2018-10-02 10:38:58 -07:00
Kristiyan Kostadinov bfc1286fe7 feat(badge): allow badge to be disabled (#13196)
Adds the `matBadgeDisabled` input that allows for a badge to be styled as if it was disabled. This allows it to blend in when it's attached to an element that is also disabled.

Fixes #13191.
2018-10-02 10:37:29 -07:00
Kristiyan Kostadinov 0886cef8e9 fix(autocomplete): dividers in list throwing off keyboard navigation (#13224)
Since we count on the options being a particular height, having 1px dividers between them ends up throwing off the keyboard navigation. These changes add an offset to the dividers to avoid the issue.

Fixes #13200.
2018-10-02 10:36:37 -07:00
vivian-hu 6da7d233ec fix(select): give native select a bigger clickable area (#13228) 2018-10-02 10:35:22 -07:00
Kristiyan Kostadinov 311d78689f fix(chips): set aria-invalid on chip input (#13249)
Currently we set `aria-invalid` automatically on inputs inside a form field, but not on one inside a chip list. These changes add `aria-invalid` to the chip input, when the related chip list is invalid.

Fixes #13205.
2018-10-02 10:34:12 -07:00
Kristiyan Kostadinov 119fafd3a4 fix(slide-toggle): clear tabindex from host element (#13311)
Along the same lines as #13308. Currently we forward the `tabindex` from the host to the underlying `input`, however we never clear the `tabindex` from the host, which means that we end up with two layers of focusable elements.
2018-10-02 10:32:44 -07:00
Paul Gschwendtner db873341a3 build: fix e2e rate limit failures (#13376)
* Since the `webdriver-manager` always tries to query the versions of all Selenium drivers, we currently run into rate limit failures that cause the E2E tests to not run properly.
2018-10-01 14:13:48 -07:00