Commit Graph

612 Commits

Author SHA1 Message Date
Jeremy Elbourn 5fb022f2b3 chore: update master to angular version 8 beta (#15392)
This allows us to cherry-pick @kara's static query updates from the
`ivy-2019` branch.

This change includes:
* Adding missing dependencies for various Angular subpackages
* Add umd assets where they are now necessary
* Configure bazel to target ES5 output as a workaround for https://github.com/angular/angular/issues/29107
* Updates most npm dependencies to the @npm// workspace
* Updates general workspace setup, RBE config, ngcontainer
* Update to rxjs 6.4.0 (building from source no longer needed)
* Added rxjs_shims for ts_web_test and ts_devserver targets
* Removed index.bzl and angular_material_setup_workspace (not needed anymore since material won't be built from source)
* Use browser_repositories() from @npm_bazel_karma which have pinned browsers that work on all platforms
* Change dgeni processor functions from arrow function to `function` to
work around `@npm//di` not supporting arrow functions

Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2019-03-06 15:16:47 -08:00
Kristiyan Kostadinov 4704653cad feat(drag-drop): add the ability to customize how the position is constrained (#15137) 2019-03-06 09:58:54 -08:00
Kristiyan Kostadinov 9d60a5da4c fix(sort): remove arrow when sort header is disabled (#15212)
Doesn't render the arrow for a disabled header, unless it is the active one. This prevents it from taking up space when it won't be used.

Fixes #14986.
2019-03-06 09:45:44 -08:00
Kristiyan Kostadinov f4a59f0349 refactor(stepper): remove dependency on @angular/forms (#15134)
While looking at #15085, I noticed that the only place in the CDK where we use `@angular/forms` is to type an optional input in the stepper. These changes replace the typing with a partial representation of the `AbstractControl` so that we can drop the dependency.
2019-03-05 11:44:36 -08:00
Kristiyan Kostadinov 4614fb8e52 fix(badge): disable animations when using NoopAnimationsModule (#11408) 2019-03-05 09:09:27 -08:00
Kristiyan Kostadinov 1f7ce05e2d chore(select): fix api golden failure (#15384)
Fixes a failure in the API golden files that made it into master.
2019-03-05 08:30:47 -08:00
Kristiyan Kostadinov b00790a881 build: anchors not working correctly in markdown (#15379)
Fixes anchor links being rewritten to `/guides` in the docs.

Fixes #15377.
2019-03-04 11:17:31 -08:00
Paul Gschwendtner 66d38fc596 feat(selection-list): support specifying theme color (#15237)
Currently the selection list always uses the `accent` color for the underlying
pseudo checkbox of list options. In order to make this configurable by the
user, we add a `color` input that matches our other usages of the `color`
input in order to be consistent.

Since we want to allow that a color can be specified for the `<mat-selection-list>` and
that it's possible to overwrite the color for an individual list option, we don't use the
color mixin as it brings in a lot of overhead and also doesn't make it easy to provide
the desired precedence for individual options. Also we **can't** set the color class
on the `<mat-selection-list>` as the pseudo checkbox will then ignore the color class
set for the individual list option.

Closes #15234
2019-02-22 07:11:32 -08:00
Kristiyan Kostadinov dfa40fc7fb feat(menu): allow focus restoration to be disabled (#15205)
Allows for focus restoration to be disabled in a menu, similarly to some other components. In some cases restoring focus automatically might not make sense (e.g. if the user closes the menu by selecting something which then opens a dialog) and this allows consumers to customize the behavior as needed.

Fixes #15168.
2019-02-22 07:10:49 -08:00
Kristiyan Kostadinov 629460f1f9 feat(drag-drop): add the ability to disable sorting in a list (#15064)
Adds the ability to disable sorting inside of a `CdkDropList`. This allows for use cases where one list is considered the source and one or more connected lists are the destinations, and the user isn't supposed to sort the items within the source list.

Fixes #14838.
2019-02-22 07:07:04 -08:00
Kristiyan Kostadinov bcf278179b feat(drag-drop): allow for dragging sequence to be delayed (#14732)
Adds the `cdkDragStartDelay` input that allows for the dragging sequence to be delayed by X amount of milliseconds.

Fixes #13908.
2019-02-22 07:04:40 -08:00
Paul Gschwendtner bb69483e77 build: publish script should should note where to paste changelog (#15218)
Currently we still cannot cut the Github release automatically because
the publish script does not have API access. Though it's sometimes
not quite clear for the caretaker what he needs to do manually. In
the meanwhile we make this _slighty_ more clear by adding a
note that indicates where the release notes should be copy-pasted
to.
2019-02-19 17:34:12 -08:00
Kristiyan Kostadinov b98eb0307b fix(list): disableRipple on selection list not affecting list options after init (#14858)
Along the same lines as #14836. Fixes changes to `disableRipple` not being propagated immediately the list options.
2019-02-14 09:57:02 -08:00
Kristiyan Kostadinov e2c9873196 feat(a11y): add injection token configure default politeness and duration (#15126)
Adds an injection token that allows consumers to configure the default `politeness` and `duration` for the live announcer.

Fixes #15121.
2019-02-14 09:56:46 -08:00
Paul Gschwendtner 45e90a673b build: fix invalid npm "build" script (#15182) 2019-02-13 17:13:06 -08:00
Kristiyan Kostadinov 35e89e5344 fix: errors when building theme using CSS variables (#15140)
* Adds an extra theme to the build that will allow us to verify that everything still works if somebody passes in the palette colors as CSS variables.
* Fixes a handful of places where Sass would either throw an error or would produce invalid CSS.

Fixes #15107.
2019-02-13 07:30:11 -08:00
Kristiyan Kostadinov 3163cc6d74 fix(dialog): don't assign aria-label to close button if button has text (#11093)
No longer adds the `aria-label` to the `mat-dialog-close` directive, if the element that it's being applied to has text. This prevents the label from being read instead of the button text.

Fixes #11084.
2019-02-13 07:29:38 -08:00
Jeremy Elbourn 7cd002dff6 build(release-script): npm logout after publishing (#15170) 2019-02-12 12:36:07 -08:00
Kristiyan Kostadinov 8ddcb5ba20 fix(drag-drop): standalone draggable drag class not being applied with OnPush change detection (#14727)
Fixes the styling that is applied while an item is dragged not being applied with `OnPush` change detection.
2019-02-07 11:55:02 -08:00
Kristiyan Kostadinov 2da7c11e22 refactor(paginator): remove extra exposed properties (#14809)
Makes the `_pageIndex` and `_length` properties private so they don't pollute the public API and because they already have public getters.
2019-02-07 11:53:59 -08:00
Paul Gschwendtner 6517e1a834 build: publish script should prompt for upstream remote (#15092) 2019-02-07 09:42:57 -08:00
Paul Gschwendtner acf07d18a9 build: publish script should not print error if tag does not exist (#15080)
Currently the publish script prints an error if the release tag does not exist locally yet. This is not expected since the function
that calls `git` to check if a given tag exists, returns a boolean and should not additionally print the git `stderr`.

Note we can also look into attaching the release notes automatically, but since the release notes are making the URL too large and Github denies too large URL's, this is something we can explore in a follow-ups.
2019-02-05 07:36:18 -08:00
John Crowson 3e935e9b79 feat(dialog): add ariaLabelledBy config option (#14943)
Adds the ability to set the `aria-labelledby` of a dialog without mat-dialog-title.
2019-02-05 07:32:54 -08:00
Kristiyan Kostadinov 33081878ab feat(overlay): allow for scroll strategy to be swapped out (#15067)
With #12306 we added the ability to swap out position strategies, however that won't be enough to handle all use cases since the consumer is still locked into the scroll strategy that they chose at the start. E.g. when switching an overlay from a dialog to a dropdown, it might not make sense to block scrolling anymore. These changes add an API to allow for the scroll strategy to be swapped.
2019-02-05 07:21:56 -08:00
Kristiyan Kostadinov cfe46dff32 fix(table): allow for a caption to be projected (#14965)
Fixes consumers not being allowed to project a caption into a CDK table.

Fixes #14948.
2019-01-30 14:01:40 -08:00
Paul Gschwendtner a6cc98fa6e feat(stepper): allow disabling ripples of headers (#14972)
* Adds a way for developers to disable ripples of the `MatStepHeader`. This is useful because currently developers have no way of specifically disabling ripples for a stepper (only disabling globally is possible)

Closes #14940.
2019-01-30 14:00:35 -08:00
Kristiyan Kostadinov 0ab81138cd fix(tree,scrolling): don't require user DataSource to extend DataSource (#14966)
Currently the way we verify that the passed in data source is by using `instanceof` which assumes that the consumer has extended our `DataSource`. In `cdk/table` we do the verification by checking whether the object matches the interface of a `DataSource` instead.

These changes add a utility method to check whether something is a data source and refactor the `tree` and `scrolling` entry points to be consistent with `table`.
2019-01-29 19:29:33 -08:00
Paul Gschwendtner ddd347dac6 build: simplify api golden target names (#14973)
* In order to make it easier to test/update goldens, the Bazel targets are updated to the match the actual golden file paths. This is useful because developers can then use terminal autocompletion to go to the desired golden file, and just need to add the `_api` suffix. This easier than manually constructing the Bazel API target name which is not intuitive and takes up time.
2019-01-28 16:07:28 -08:00
mmalerba e7b0e40bfa fix(stepper): ensure step state is not minified (#14933)
* fix(stepper): ensure step state is not minified

* update api goldens

* address feedback

* fix number state
2019-01-25 11:41:57 -08:00
Kristiyan Kostadinov 5a18ea61e5 feat(drag-drop): add service for attaching drag&drop to arbitrary DOM nodes (#14437)
* Adds the  `DragDrop` service that simplifies the construction logic for `DragRef` and `DropListRef` and allows consumers to attach drag&drop functionality to arbitrary DOM nodes, rather than having to go through the directives.
* Reworks `DragRef` and `DragDropRef` to make them easier to construct.
* Normalizes some of the instances where some parameters only accept an `ElementRef`, whereas others accept `ElementRef | HTMLElement`.
2019-01-25 09:07:15 -08:00
Kristiyan Kostadinov e66131744a feat(tabs): add automatic scrolling when holding down paginator (#14632)
Adds some code that automatically keeps scrolling the tab header while holding down one of the paginator buttons. This is useful on long lists of tabs where the user might have to click a lot to reach the tab that they want.

Fixes #6510.
2019-01-23 11:42:07 -08:00
Paul Gschwendtner f0708b4639 build: add missing bazel action names (#14910)
In order to have proper action names when running bazel, we should add progress messages for all custom rules. Currently Bazel always uses the first input as action name, but this is *very* confusing since failures lead to the input file, instead of the associated Bazel action.

Note that this is not really a progress_message, but it is consistent with native bazel actions (e.g. `StarlarkAction`)
2019-01-23 11:17:40 -08:00
Paul Gschwendtner e1b9c2d4ec build: remove unused dgeni package configurations (#14909)
* Removes some configuration parts of the Dgeni docs package which are overwritten by Bazel using the `apiDocsPackage`. Globs do not work within Bazel.
2019-01-23 11:17:14 -08:00
Kristiyan Kostadinov 342e6f0ad8 feat(tooltip): allow for default position to be configured (#14872)
Allows for the default position of `MatTooltip` to be set via an injection token.

Fixes #14862.
2019-01-23 11:13:03 -08:00
Paul Gschwendtner 1f3324ec1f build: allow recovering from failed publish script (#14906)
* build: fix version bumps not detected in release script

* build: allow recovering from failed publish script

* Currently if anything fails after the creating the local git tag, it's not possible to just re-run the release script because the script fails with an error saying that the local tag already exists. We can be smart about this and just use the existing tag if it refers to the expected SHA.
* Additionally if anything fails after pushing the release tag to the remote, it's not possible to re-run the release script because the tag exists remotely. We can be smart about this and just use the remote tag if it refers to the expected SHA.
2019-01-22 09:30:17 -08:00
Paul Gschwendtner 5a8dd1e9a5 build: update outdated api goldens (#14854)
* build: update outdated api goldens

* Fix failing drag-drop test
2019-01-17 11:34:19 -08:00
Kristiyan Kostadinov 9d2cb6c296 refactor(tabs): fix incorrect types for outputs (#14815)
Corrects some inaccurate types on a couple of the outputs of the `MatTabHeader`.
2019-01-17 11:33:00 -08:00
Kristiyan Kostadinov 463ac9e49a fix(list): disableRipple on list input not taking effect after init (#14836)
Fixes the `disableRipple` on the list not having an effect if it's changed through the input after init.

Fixes #14824.
2019-01-17 11:31:38 -08:00
Kristiyan Kostadinov 651549f7af feat(overlay): allow for connected overlay to be positioned relative to a point (#14616)
Allows for the connected overlay's origin to be set to a point on the page, rather than a DOM element. This allows people to easily implement right click context menus.

Relates to #5007.
2019-01-16 10:40:58 -08:00
Michael Hoffmann f6d0ea80ca docs(cdk-stepper): add guide to create stepper (#14710)
* docs(cdk-stepper): add guide to create stepper

* Added guide how to create a custom stepper using the CDK
* Added a material example to demonstrate the custom CDK stepper
* Made steps from CdkStepper public as it is necessary to build
a custom stepper

* Review comments
2019-01-16 10:37:01 -08:00
Paul Gschwendtner 2307489dff build: publish docs-content bazel artifacts (#14634) 2019-01-15 19:55:24 -08:00
Kristiyan Kostadinov 5773a5b694 chore(tabs): update api goldens (#14844)
Fixes the tabs API goldens not being up to date.
2019-01-15 19:41:38 -08:00
Kristiyan Kostadinov 0fd6456807 refactor(drag-drop): clean up DragRef public API (#14654)
Cleans up the API of the DragRef before we can expose it through the public API by making the handle, custom placeholder and custom preview easier to configure.
2019-01-14 17:16:41 -08:00
Paul Gschwendtner 4b786bd10a build: fix api goldens for dialog changes (#14830)
* Fixes the API goldens which haven't been updated for https://github.com/angular/material2/commit/b62f3f3b4a0fe5713aeef459d56ff1adcea853bb properly due to not being rebased on ec9f9c836c
2019-01-14 17:13:41 -08:00
Will Howell b62f3f3b4a feat(dialog): support adding and removing classes via dialogRef (#14772)
* feat(dialog): support adding/removing panelClasses to open dialogRef

Fixes #6206

* address comments
2019-01-14 15:39:34 -08:00
Kristiyan Kostadinov f6b428854c fix(icon): clean up cached references in icon registry on destroy (#14801)
The icon registry can end up caching some fairly large SVG elements which may end up being retained, because we're using a regular `Map`. These changes clear out all the references if the registry is destroyed.
2019-01-14 15:36:24 -08:00
Paul Gschwendtner 4701c7bc54 build: switch to docs-content from examples package (#14612)
With https://github.com/angular/material.angular.io/pull/565 the docs-content will be pulled from the `@angular/material-examples` package. Changes needed on this repository:

* Since we update some styles and logic in favor of simplicity, we need to update the Dgeni templates to conform with these changes.
* Remove the unnecessary `examplesPath` property member because we now compute the `docs-content/` asset paths in a consistent way and don't want to mix up the source locations.
2019-01-11 14:44:03 -08:00
Paul Gschwendtner 326f8bb32f build: run e2e tests with bazel (#14656)
* Builds the e2e app with Bazel
* Serves the e2e app with Bazel
* Runs the e2e tests with Bazel protractor rules
2019-01-11 14:43:04 -08:00
Paul Gschwendtner 5d86a1fe09 build: fix incorrect amd module names (#14786)
* Our UMD bundles currently have wrong AMD module names for secondary entry-points which are dash-cased. e.g. AMD module name for the bottom-sheet is `@angular/material/bottomSheet`.
* Our UMD bundles currently reference incorrect rollup globals. e.g. the AMD module name is `ng.material-experimental.{secondary}`, while it should be `ng.materialExperimental`.
2019-01-11 14:42:10 -08:00
Paul Gschwendtner 85b90e0cdb build: fix public api goldens (#14770) 2019-01-09 11:18:49 -08:00