Commit Graph

4738 Commits

Author SHA1 Message Date
Kristiyan Kostadinov 89701ef2ae fix(drag-drop): incorrectly laying out items with different height or margins (#13849)
Currently the `CdkDropList` makes some assumptions about the items not having a margin between each other. It also won't lay out and animate items with varying heights, in some cases. The following changes rework the directive to allow it to handle both varying heights and different margins.

Fixes #13483.
2018-11-02 17:21:41 -07:00
Kristiyan Kostadinov 50f999b5e5 fix(snack-bar): set appropriate role based on passed in politeness (#13864)
Currently we always have a `role` of `alert` on the snack bar container which has an implicit politeness of `assertive` and which can override the message announced by the live announcer. These changes set the role to `status` if it's set to `polite` or remove the role completely if the politeness is turned off.

Fixes #13493.
2018-11-02 17:21:24 -07:00
Kristiyan Kostadinov 99d2512888 fix(portal): use portal's ComponentFactoryResolver in portal outlet directive (#13886)
Follow-up from #12677 where we missed to add the new functionality to the `CdkPortalOutlet` directive.

Fixes #9712.
2018-11-02 17:21:09 -07:00
Kristiyan Kostadinov 8922100495 fix(virtual-scroll): not removing view from container if it's outside the template cache (#13916)
Currently when detaching a view, we check whether it would fit in the cache, and if it doesn't, we destroy it. Since we destroy the view on it's own, the `ViewContainerRef` still has a reference to it, which means that we'll trigger change detection on it the next time the data changes. These changes switch to destroying the view through the view container.

Fixes #13901.
2018-11-02 17:20:51 -07:00
Paul Gschwendtner 85e4a1df01 build: circleci git config being updated too early (#13950)
* Due to the fact that we try to run `git config --global` before
CircleCI set up the global Git configuration, the publish task is still
broken. This _should_ fix it.
2018-11-02 15:29:57 -07:00
Paul Gschwendtner 2a9e132e4f build: switch away missing deps from @npm namespace (#13949) 2018-11-02 15:29:33 -07:00
Paul Gschwendtner c64503e0bf build: build material-examples with bazel (#13932)
This includes a `genrule` to create the generated `ExampleModule`
2018-11-02 14:38:34 -07:00
Greg Magolan 150c964c32 fix: bazel support for downstream apps (#13836) 2018-11-02 14:33:07 -07:00
Paul Gschwendtner 94c60d661a build: fix publish snapshot job not working (#13948)
Fixes that the publish snapshot job is not able to push the artifacts to Github.
2018-11-02 14:29:57 -07:00
Aidan Fleischer 44f616a929 docs: remove tilde from Sass imports for CLI (#13926)
Under the current build of Angular CLI ( with Angular Material v.7.0.2), adding the `~` in the @import command is unnecessary.
2018-11-01 17:10:35 -07:00
Paul Gschwendtner eb59e56eaf fix(ng-update): do not throw if typescript version is outdated (#13927)
* Running `ng update` doesn't necessarily mean that the `typescript` version is updated automatically. Therefore we need to avoid using the `isStringLiteralLike` method which has been added in `2.8`. Note that this does not mean that we cannot _compile_ with a higher TypeScript version.. we should just ensure that _at runtime_, imports from `typescript` are working for TypeScript@2.x.x
2018-11-01 16:59:22 -07:00
Paul Gschwendtner ece6b2d6be fix(ng-update): do not fail if @schematics/angular version is outdated (#13929)
* Currently the `ng update` could potentially fail if the version of `@schematics/angular` is outdated on the given project. We should avoid to depend on `@schematics/angular` for the `ng-update` schematic.
* No longer fails if the workspace configuration could not be found. It's very uncommon that someone tries to update a CLI project that still uses `.angular-cli.json` because:

     1) The CLI version for the project doesn't support `ng update` with custom downstream migrations
     2) In case the developer runs a different CLI version for _that_ outdated project, the CLI technically does run for an invalid project.

Even though, this is a rare case, it doesn't hurt not throwing if the workspace configuration couldn't be found when running `ng update`.
2018-11-01 16:57:53 -07:00
Paul Gschwendtner 62f35dd67c build: move snapshot publish job to circleci (#13882)
Also switch to a single GitHub deploy token
2018-11-01 16:53:28 -07:00
Paul Gschwendtner 44a86005db build: material-moment-adapter should not depend on all material packages (#13931)
Since we have the ability to only build specific parts of Material with Bazel, the `material-moment-adapter` should just depend on it's *actual*  dependencies and not on the _whole set_ of Material entry-points.
2018-11-01 16:52:28 -07:00
Kristiyan Kostadinov a619ddccc8 build(drag-drop): clean up bazel config (#13934)
Removes the `sass_binary` since we don't ship CSS with `cdk/drag-drop` anymore and removes `cdk/overlay` from the dependencies.
2018-11-01 16:21:57 -07:00
Paul Gschwendtner 4b431fec21 fix(button): stroked button crops applied badges (#13912)
Since we hide overflow for stroked buttons in order to properly handle the `border-radius` for the child ripple container and focus overlay, badges which are applied on the button will be clipped.

In order to fix this bug, we just remove the `overflow: hidden` and go back to the initial implemenation where the border radius is inherited for the child elements. Just to keep https://github.com/angular/material2/issues/13738 resolved, we ensure that the child elements fully cover the actual button element for the _correct_ border radius.

Fixes #13909
2018-11-01 14:42:52 -07:00
Paul Gschwendtner 28fb3abe77 build: changelog task prompt for release name (#13915) 2018-10-31 17:14:49 -07:00
Adrien Crivelli 94e4a27db1 docs(virtual-scroll): fix minor typo (#13892) 2018-10-31 11:38:43 -07:00
Jeremy Elbourn 7c38fdaae7 docs: update dev instructions for the repo (#13890) 2018-10-31 11:38:17 -07:00
Michael Prentice 6afc9712fd build: update codelyzer (#13891)
fix warning with incompatible peerDependencies
2018-10-31 11:23:03 -07:00
Paul Gschwendtner 052673c62b chore(schematics): improve messages for ng-add (#13840)
In order to make the "failure" or "warning" messages with `ng-add` look more friendly and structured, we manually wrap the messages. Additionally `chalk` is being used more often in order to make it clear if something failed/passed or is just a warning.
2018-10-31 09:51:52 -07:00
Paul Gschwendtner 6a7ac9f5f8 build: do not run browserstack in parallel (#13861)
* No longer runs BrowserStack in parallel because it causes rate limit exceptions that didn't show up if we just had one tunnel per job.
2018-10-31 09:48:09 -07:00
Jeremy Elbourn f2c7205d66 Revert "fix: workaround for es2015 inheritance not always working (#13834)" (#13868)
This reverts commit a22a9fa3d7.

This change caused a new issue where Closure Compiler was not able to do
dead-code elimination due to the function call with unknown side
effects.
2018-10-30 12:55:38 -07:00
Kristiyan Kostadinov 7cfa0c544c chore: add yarn logs to gitignore (#13884)
Adds the yarn-related logs to a gitignore so people don't try to commit them accidentally. See #13814.
2018-10-30 12:29:10 -07:00
Kristiyan Kostadinov d0f0f0afd1 build: add tooling to avoid jit issues with empty NgModule definitions (#13843)
* Expands the decorator validation rule to allow us to run a regex against all the arguments of a decorator. This allows us to guard against cases like #13792.
* Fixes a similar issue as #13792 in the `LayoutModule` which was caught after the new changes to the rule.
2018-10-30 11:34:51 -07:00
Paul Gschwendtner 30a8490299 build: update dgeni-packages (#13881)
* Updates `dgeni-packages` to the most recent version that includes an improvement for parameter types in the docs (148bc949e5880357817b21f1da09ac056ca9c0b0)
* Fixes that the `@angular/bazel` dependency is not being inserted at the proper position (alphabetically)
2018-10-30 10:36:28 -07:00
Kristiyan Kostadinov a9e550e5bf fix(stepper): don't handle enter/space when modifier key is pressed (#13827)
Along the same lines as #13790. Doesn't handle the prevent the default action for ENTER and SPACE when one of the modifier keys is pressed, in order to avoid interefering with the native keyboard shortcuts.
2018-10-29 08:14:08 -07:00
Paul Gschwendtner a22a9fa3d7 fix: workaround for es2015 inheritance not always working (#13834)
Since the inherited `ctorParameters` can be either a static array or a function that returns an array, the workaround that landed with e9103a6 does not fully solve the issue, which developers experience when using Angular Material with ES2015. This improves the workaround and ensures that it handles both scenarios properly.

Also the workaround has been moved into a separate function in order to remove code duplication. This should also make it easier to delete the workaround if we need to.
2018-10-29 08:13:49 -07:00
Kristiyan Kostadinov 0589881a3b fix(list): remove disabled selection list hover feedback on mobile (#13850)
Currently on mobile devices we counteract the `:hover` styling by removing the background, however this ends up removing the disabled styling.
2018-10-29 08:13:29 -07:00
Paul Gschwendtner c4331048ec build(schematics): version placeholders not replaced (#13688)
Since we copy the schematics after the version placeholders have been inlined, the version range that uses the NG version placeholder is not replaced properly.

This is not problematic because by default we determine the NG version based on the installed `@angular/core` version.

```
 addPackageToPackageJson(host, '@angular/animations',
        ngCoreVersionTag || requiredAngularVersionRange);
```
2018-10-29 08:12:46 -07:00
Kristiyan Kostadinov ab5127b6e1 docs: add example for cdk platform (#13821)
Since the overview for `cdk/platform` is pretty bare on the docs site at the moment, these changes add an example that illustrates how the utilities can be used.
2018-10-29 08:11:53 -07:00
Paul Gschwendtner 91d4c0f649 build: share release output between circle jobs (#13838)
Also support parallel Karma instances on CircleCI
2018-10-29 08:11:35 -07:00
Greg Magolan b3a00376cd build: update to Angular 7.0.1 http_archive & @angular/bazel package (#13831)
* Update to Angular & @angular/bazel 7.0.1
* Remove sha256 from io_bazel_rules_sass http_archive
2018-10-29 07:57:56 -07:00
Paul Gschwendtner a479366c76 build: test remaining packages with bazel (#13844)
* Sets up Bazel build and testing for the `cdk-experimental`, `material-experimental` and `material-moment-adapter` package.
2018-10-29 07:51:02 -07:00
mmalerba 0bd8899917 chore: bump version and create 7.0.2 changelog (#13830) 2018-10-26 11:43:29 -07:00
Paul Gschwendtner ea9354e48e build: suppress warnings when building tests with bazel (#13816)
* Suppress Bazel warnings when compiling the unit tests. This is necessary for the test tsconfig because TypeScript does not inherit third-party `tsconfig` options.
2018-10-25 11:58:35 -07:00
Kristiyan Kostadinov f230633296 fix(radio): don't show hover ripples on touch devices (#13701)
On touch devices `:hover` styling persists after the user has tapped. These changes hide the persistent ripple if the user isn't able to hover, in order to avoid confusion with the other ripples.

Related to #13675.
2018-10-25 11:58:13 -07:00
Kristiyan Kostadinov fbbe463354 feat(stepper): add CdkStepHeader directive and fix CdkStepper error on init (#10614)
* Adds the `CdkStepHeader` directive which is the equivalent of `MatStepHeader` and can be used by consumers when building custom steppers.
* Fixes an error that was being thrown on init when using a `cdkStepper` directly.

Fixes #10611.
2018-10-25 11:55:38 -07:00
Nathan d2d8a1f675 feat(drag-utils): add utility function for cloning array items from one array to another (#13743)
* feat(drag-utils): add utility function for cloning array items from one array to another

creates a utility helper for cloning an array item into the array of the drop container
compliments moveItemInArray and transferArrayItem

partially closes #13100

* feat(drag-utils): add utility function for cloning array items from one array to another

resolves issues surfaced from code review

* feat(drag-utils): add utility function for cloning array items from one array to another

cuts extra space between parens

* removes link in comments, and clarifies function definition as recommended in review

* resolves nits
2018-10-25 08:21:19 -07:00
Kristiyan Kostadinov 4fbbb9d52d feat(ng-add): add preview URLs for theme choices (#13723)
Adds URLs that people can use to preview a theme, before selecting it, when going through the ng-add prompts.
Formatting is aligned with https://github.com/angular/angular-cli/blob/907ce5c94c774147c4b52870b3522aed4e087c76/packages/schematics/angular/ng-new/schema.json#L121

Fixes #13708.

**A couple of notes:**
* Blocked until https://github.com/angular/material.angular.io/pull/549 is merged and released.
* Marking this as `patch`, even though it's a `feat`, since it's basically just message changes.
2018-10-25 08:17:19 -07:00
Kristiyan Kostadinov 04716b1ad0 fix(expansion-panel): don't handle enter/space if modifier is pressed (#13790)
Doesn't `preventDefault` and handle the enter and space key presses if the user is pressing any of the modifier keys.

Fixes #13783.
2018-10-25 08:15:35 -07:00
Kristiyan Kostadinov 5d54920e81 fix(tooltip): add fallback for touch devices if Hammer isn't loaded (#13580)
Unlike other components that we use Hammer on, the tooltip won't show up at all on a touch device if Hammer isn't loaded. These changes add a fallback to using a `touchstart` event to trigger the tooltip.

Also fixes the `_manualListeners` not being cleared on Android.

Fixes #13536.
2018-10-24 16:13:35 -07:00
Kristiyan Kostadinov bbeb5ef46c fix(stepper): incorrect border color in dark theme for header with label position (#13791)
Fixes the extra border that gets added in `labelPosition="bottom"` not being colored based on the theme.
2018-10-24 16:12:29 -07:00
mmalerba 65dd75d8ec fix(cdk-platform): pass {} to @NgModule since passing nothing breaks (#13792)
in JIT mode
2018-10-24 16:12:00 -07:00
Kristiyan Kostadinov e40e6c10b9 chore: update dev environment guide to use yarn (#13800) 2018-10-24 15:36:00 -07:00
Paul Gschwendtner f5d42cd599 refactor(schematics): group ng-generate schematics in folder (#13794)
* Similarly to the CDK schematics, schematics that can be (ng-)`generated` should be grouped into its own directory. This cleans up the schematics folder and makes it clear where each schematic lives.
* Removes a tslint ignore comment in a schematic test.
2018-10-24 15:35:46 -07:00
Paul Gschwendtner 631c991d8f build: use angular 7.0.0 w/ bazel (#13793)
* Switches away from the temporary `angular/angular:bazel` branch and uses a version of Angular that is based on `master` and comes after `v7.0.0`.
2018-10-24 15:35:35 -07:00
Kristiyan Kostadinov 530c0eb1c5 docs(drag-drop): add doc section and live example for customizing the placeholder (#13777)
Adds a paragraph about the `cdkDragPlaceholder` and sets up a live example.

Fixes #13765.
2018-10-24 15:35:22 -07:00
Paul Gschwendtner b30ec56364 build: run browserstack on circleci (#13749) 2018-10-24 15:35:06 -07:00
Paul Gschwendtner bec5823719 build: test material with bazel (#13670)
* build: test material with bazel

* Supports testing `src/lib` with Bazel.

* Add prebuilt theme to all Material tests

* Always include prebuilt theme. Rebase changes for paginator spec
2018-10-24 15:34:40 -07:00