Skip to content

Commit b238107

Browse files
author
Tobias Schweizer
committed
Merge branch 'master' into tobiasschweizer/calendar-header-comp
# Conflicts: # src/demo-app/datepicker/datepicker-demo.ts # src/lib/datepicker/datepicker.ts
2 parents 2b4d4d2 + d84612e commit b238107

File tree

131 files changed

+9046
-3203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+9046
-3203
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
# This may be unnecessary once rules_nodejs uses nodejs 8
3737
- run: bazel run @nodejs//:npm run postinstall
3838
- run: bazel build src/...
39+
- run: bazel test src/...
3940
- save_cache:
4041
key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }}
4142
paths:

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
/src/lib/tabs/** @andrewseguin
3333
/src/lib/toolbar/** @devversion
3434
/src/lib/tooltip/** @andrewseguin
35+
/src/lib/badge/** @amcdnl
3536

3637
# Angular Material core
3738
/src/lib/core/* @jelbourn
@@ -129,6 +130,7 @@
129130
/src/demo-app/toolbar/** @devversion
130131
/src/demo-app/tooltip/** @andrewseguin
131132
/src/demo-app/typography/** @crisbeto
133+
/src/demo-app/badge/** @amcdnl
132134

133135
# E2E app
134136
/e2e/* @jelbourn

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,29 @@ addons:
1818
branches:
1919
only:
2020
- master
21+
- 5.2.x
2122

2223
jobs:
2324
include:
2425
- env: "MODE=lint"
2526
- env: "MODE=aot"
2627
- env: "MODE=payload"
2728
- env: "MODE=prerender"
28-
# Closure Compiler CI check is temporarily disabled until a new version of
29-
# the tool is released with https://github.com/google/closure-compiler/pull/2600
30-
# - env: "MODE=closure-compiler"
3129
- env: "MODE=e2e"
3230
- env: "MODE=saucelabs_required"
3331
- env: "MODE=browserstack_required"
3432
- env: "MODE=travis_required"
3533
- env: "DEPLOY_MODE=build-artifacts"
34+
if: type = push
3635
- env: "DEPLOY_MODE=docs-content"
36+
if: type = push
3737
- env: "DEPLOY_MODE=screenshot-tool"
38+
if: type = cron
3839
- env: "DEPLOY_MODE=dashboard"
40+
if: type = cron
41+
# Closure Compiler CI check is temporarily disabled until a new version of
42+
# the tool is released with https://github.com/google/closure-compiler/pull/2600
43+
# - env: "MODE=closure-compiler"
3944
env:
4045
global:
4146
- LOGS_DIR=/tmp/angular-material2-build/logs

BUILD.bazel

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,67 @@ filegroup(
1414
# TODO(alexeagle): figure out what to do
1515
srcs = glob(["/".join(["node_modules", pkg, "**", ext]) for pkg in [
1616
"@angular",
17-
"jasmine",
18-
"typescript",
19-
"tslib",
20-
"zone.js",
2117
"@types",
22-
"tsickle",
23-
"hammerjs",
24-
"protobufjs",
2518
"bytebuffer",
26-
"reflect-metadata",
19+
"hammerjs",
20+
"jasmine",
2721
"minimist",
2822
"moment",
23+
"protobufjs",
24+
"protractor",
25+
"reflect-metadata",
26+
"tsickle",
27+
"tslib",
28+
"tsutils",
29+
"typescript",
30+
"zone.js",
2931
] for ext in [
3032
"*.js",
3133
"*.json",
3234
"*.d.ts",
33-
]]),
35+
]] + [
36+
"node_modules/http-server/**",
37+
]),
38+
)
39+
40+
41+
# Glob pattern that matches all Angular testing bundles.
42+
ANGULAR_TESTING = [
43+
"node_modules/@angular/*/bundles/*-testing.umd.js",
44+
# The compiler and the dynamic platform-browser should be visible only in tests
45+
"node_modules/@angular/compiler/bundles/*.umd.js",
46+
"node_modules/@angular/platform-browser-dynamic/bundles/*.umd.js",
47+
]
48+
49+
filegroup(
50+
name = "angular_bundles",
51+
srcs = glob(["node_modules/@angular/*/bundles/*.umd.js"], exclude = ANGULAR_TESTING),
52+
)
53+
54+
filegroup(
55+
name = "angular_test_bundles",
56+
testonly = 1,
57+
srcs = glob(ANGULAR_TESTING),
3458
)
3559

60+
filegroup(
61+
name = "tslib_bundle",
62+
testonly = 1,
63+
srcs = glob(["node_modules/tslib/tslib.js"]),
64+
)
65+
66+
# Files necessary for unit tests that use zonejs
67+
filegroup(
68+
name = "web_test_bootstrap_scripts",
69+
# The order of these deps is important.
70+
# Do not sort.
71+
srcs = [
72+
"//:node_modules/reflect-metadata/Reflect.js",
73+
"//:node_modules/zone.js/dist/zone.js",
74+
"//:node_modules/zone.js/dist/async-test.js",
75+
"//:node_modules/zone.js/dist/sync-test.js",
76+
"//:node_modules/zone.js/dist/fake-async-test.js",
77+
"//:node_modules/zone.js/dist/proxy.js",
78+
"//:node_modules/zone.js/dist/jasmine-patch.js",
79+
],
80+
)

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
<a name="6.0.0-beta-0"></a>
2+
# [6.0.0-beta-0](https://github.com/angular/material2/compare/5.2.0...6.0.0-beta-0) (2018-02-12)
3+
4+
5+
### Bug Fixes
6+
7+
* **overlay:** validate that ConnectedPositionStrategy positions are passed in correctly at runtime ([#9466](https://github.com/angular/material2/issues/9466)) ([6a8ce02](https://github.com/angular/material2/commit/6a8ce02))
8+
9+
10+
### Features
11+
12+
* add bottom sheet component ([#9764](https://github.com/angular/material2/issues/9764)) ([bbf62cd](https://github.com/angular/material2/commit/bbf62cd))
13+
* **datepicker:** @Output for year and month selected in multiyear/year ([#9678](https://github.com/angular/material2/issues/9678)) ([c2e108e](https://github.com/angular/material2/commit/c2e108e))
14+
* **expansion:** add accordion expand/collapse all ([#6929](https://github.com/angular/material2/issues/6929)) ([#7461](https://github.com/angular/material2/issues/7461)) ([3aceb73](https://github.com/angular/material2/commit/3aceb73))
15+
* **form-field, chip:** merge new form-field and chip features to master ([#9762](https://github.com/angular/material2/issues/9762)) ([4a5287c](https://github.com/angular/material2/commit/4a5287c)), closes [#9743](https://github.com/angular/material2/issues/9743) [#9759](https://github.com/angular/material2/issues/9759) [#9767](https://github.com/angular/material2/issues/9767)
16+
* **schematics:** add initial schematics utils ([#9451](https://github.com/angular/material2/issues/9451)) ([673d56e](https://github.com/angular/material2/commit/673d56e))
17+
* **tabs:** add ability to lazy load tab content ([#8921](https://github.com/angular/material2/issues/8921)) ([6feaf62](https://github.com/angular/material2/commit/6feaf62))
18+
19+
20+
21+
<a name="5.2.1"></a>
22+
## [5.2.1 ghillie-soup](https://github.com/angular/material2/compare/5.2.0...5.2.1) (2018-02-12)
23+
24+
25+
### Bug Fixes
26+
27+
* **autocomplete:** escape key inconsistency on IE ([#9777](https://github.com/angular/material2/issues/9777)) ([180750e](https://github.com/angular/material2/commit/180750e))
28+
* **button:** better accessibility for flat buttons in high-contrast ([#9783](https://github.com/angular/material2/issues/9783)) ([0d0c6d4](https://github.com/angular/material2/commit/0d0c6d4))
29+
* **datepicker:** add max/min filter to multi year and year views ([#9727](https://github.com/angular/material2/issues/9727)) ([0793142](https://github.com/angular/material2/commit/0793142))
30+
* **datepicker:** changed after checked error if focused datepicker inputs turn disabled ([#9717](https://github.com/angular/material2/issues/9717)) ([01ad7bd](https://github.com/angular/material2/commit/01ad7bd)), closes [#9559](https://github.com/angular/material2/issues/9559)
31+
* **global-position-strategy:** ignoring width and height from OverlayConfig ([#9774](https://github.com/angular/material2/issues/9774)) ([b425a46](https://github.com/angular/material2/commit/b425a46)), closes [#9715](https://github.com/angular/material2/issues/9715)
32+
* **overlay:** dimension not updated after init ([#8765](https://github.com/angular/material2/issues/8765)) ([c36b512](https://github.com/angular/material2/commit/c36b512))
33+
* **select:** options inside option group not being rendered when wrapped with ng-container ([#9769](https://github.com/angular/material2/issues/9769)) ([38fddfe](https://github.com/angular/material2/commit/38fddfe)), closes [#9736](https://github.com/angular/material2/issues/9736)
34+
* **selection-list:** external changes to selection model not being reflected ([#9846](https://github.com/angular/material2/issues/9846)) ([82df181](https://github.com/angular/material2/commit/82df181)), closes [#9838](https://github.com/angular/material2/issues/9838)
35+
* **slider:** invisible in high contrast mode ([#9792](https://github.com/angular/material2/issues/9792)) ([94bbffc](https://github.com/angular/material2/commit/94bbffc))
36+
* **slider:** unable to reset value by setting it back to undefined ([#9768](https://github.com/angular/material2/issues/9768)) ([c2e2744](https://github.com/angular/material2/commit/c2e2744)), closes [#9740](https://github.com/angular/material2/issues/9740)
37+
* **radio:** add aria-describedby passthrough to radio button input ([#9741](https://github.com/angular/material2/issues/9741)) ([cd159f5](https://github.com/angular/material2/commit/cd159f5))
38+
39+
40+
141
<a name="5.2.0"></a>
242
# [5.2.0 selenium-scramble](https://github.com/angular/material2/compare/5.1.0...5.2.0) (2018-02-05)
343

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ sass_repositories()
2626
git_repository(
2727
name = "build_bazel_rules_typescript",
2828
remote = "https://github.com/bazelbuild/rules_typescript.git",
29-
commit = "89d2c75066bea3d9c942f29dd1d2ea543c58d6d5",
29+
tag = "0.10.0",
3030
)
3131

3232
# Setup TypeScript Bazel workspace
33-
load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace")
33+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
3434
ts_setup_workspace()
3535

3636
# Add Angular rules

guides/creating-a-custom-form-field-control.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,43 @@ private _placeholder: string;
157157

158158
#### `ngControl`
159159

160-
This property allows the form field control to specify the `@angular/forms` control that is bound to
161-
this component. Since we haven't set up our component to act as a `ControlValueAccessor`, we'll just
162-
set this to `null` in our component. In any real component, you would probably want to implement
163-
`ControlValueAccessor` so that your component can work with `formControl` and `ngModel`.
160+
This property allows the form field control to specify the `@angular/forms` control that is bound to this component. Since we haven't set up our component to act as a `ControlValueAccessor`, we'll just set this to `null` in our component.
164161

165162
```ts
166-
ngControl = null;
163+
ngControl: NgControl = null;
167164
```
168165

169-
If you did implement `ControlValueAccessor`, you could simply inject the `NgControl` and make it
170-
publicly available. (For additional information about `ControlValueAccessor` see the
171-
[API docs](https://angular.io/api/forms/ControlValueAccessor).)
166+
It is likely you will want to implement `ControlValueAccessor` so that your component can work with `formControl` and `ngModel`. If you do implement `ControlValueAccessor` you will need to get a reference to the `NgControl` associated with your control and make it publicly available.
167+
168+
The easy way is to add it as a public property to your constructor and let dependency injection handle it:
172169

173170
```ts
174-
constructor(..., @Optional() @Self() public ngControl: NgControl) { ... }
171+
constructor(
172+
...,
173+
@Optional() @Self() public ngControl: NgControl,
174+
...,
175+
) { }
175176
```
176177

178+
Note that if your component implements `ControlValueAccessor`, it may already be set up to provide `NG_VALUE_ACCESSOR` (in the `providers` part of the component's decorator, or possibly in a module declaration). If so you may get a *cannot instantiate cyclic dependency* error.
179+
180+
To resolve this, remove the `NG_VALUE_ACCESSOR` provider and instead set the value accessor directly:
181+
182+
```ts
183+
constructor(
184+
...,
185+
@Optional() @Self() public ngControl: NgControl,
186+
...,
187+
) {
188+
// Setting the value accessor directly (instead of using
189+
// the providers) to avoid running into a circular import.
190+
if (this.ngControl != null) { this.ngControl.valueAccessor = this; }
191+
}
192+
```
193+
194+
For additional information about `ControlValueAccessor` see the [API docs](https://angular.io/api/forms/ControlValueAccessor).
195+
196+
177197
#### `focused`
178198

179199
This property indicates whether or not the form field control should be considered to be in a

0 commit comments

Comments
 (0)