Skip to content

Commit fcb94ff

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stepper2
2 parents aee0abf + a34787d commit fcb94ff

File tree

265 files changed

+3494
-1933
lines changed

Some content is hidden

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

265 files changed

+3494
-1933
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ jobs:
2828
- env: "MODE=browserstack_required"
2929
- env: "MODE=travis_required"
3030
- stage: Deploy
31-
script: ./scripts/ci/publish-artifacts.sh
32-
env: "MODE=release"
33-
31+
env: "DEPLOY_MODE=build-artifacts"
32+
- env: "DEPLOY_MODE=docs-content"
33+
- env: "DEPLOY_MODE=screenshot-tool"
34+
- env: "DEPLOY_MODE=dashboard"
3435
env:
3536
global:
3637
- LOGS_DIR=/tmp/angular-material2-build/logs
@@ -51,7 +52,7 @@ before_script:
5152
- mkdir -p $LOGS_DIR
5253

5354
script:
54-
- ./scripts/ci/build-and-test.sh
55+
- ./scripts/ci/travis-script.sh
5556

5657
cache:
5758
directories:

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
<a name="2.0.0-beta.8"></a>
2+
# [2.0.0-beta.8 plasma-abacus](https://github.com/angular/material2/compare/2.0.0-beta.7...2.0.0-beta.8) (2017-07-06)
3+
4+
5+
### Highlights
6+
* This version marks the release of `@angular/cdk` (component dev kit)! This package contains
7+
general building blocks for UI components decoupled from the visuals of Material Design. In the
8+
initial release, code from Angular Material's `core/` have been moved for `a11y/`, `bidi/`,
9+
`coercion/`, `observe-content/`, `platform/`, `portal/`. The `@angular/material` package now
10+
re-exports these symbols, marked as deprecated. The re-exports will be removed in a subsequent
11+
release.
12+
* Initial version of data-table component. There is both a `<cdk-table>` (the core) and the
13+
`<md-table>` (with Material Design styles). See the documentation on material.angular.io for more
14+
information.
15+
* Initial version of `<md-paginator>` and `<md-sort-header>` components, which can be used either
16+
with `<md-table>` or any other table.
17+
* Both `@angular/material` and `@angular/cdk` are now strict null compliant.
18+
19+
20+
### Breaking changes
21+
* `@angular/material` now depends on `@angular/cdk` as a peer dependency.
22+
* Some types have expanded to include `| null` or `| undefined` for strict null compatibility. If
23+
your application uses strict null checks, you may have to update the types in your app to match up
24+
with the more accurate types coming from Angular Material.
25+
* Angular Material no longer adds RxJS operators to the prototype of `Observable`. If your app
26+
depended on these operators being added by Angular Material, you will need to import them
27+
explicitly.
28+
29+
30+
### Bug Fixes
31+
32+
* **autocomplete:** allow number zero as value ([#5364](https://github.com/angular/material2/issues/5364)) ([9137fd9](https://github.com/angular/material2/commit/9137fd9)), closes [#5363](https://github.com/angular/material2/issues/5363)
33+
* **autocomplete:** don't scroll panel when option is visible ([#4905](https://github.com/angular/material2/issues/4905)) ([d3af57d](https://github.com/angular/material2/commit/d3af57d))
34+
* **autocomplete:** not closing when tapping away on mobile ([#5260](https://github.com/angular/material2/issues/5260)) ([1dcaca7](https://github.com/angular/material2/commit/1dcaca7))
35+
* **autocomplete:** reopening when clicking an option in IE ([#5172](https://github.com/angular/material2/issues/5172)) ([fe31210](https://github.com/angular/material2/commit/fe31210)), closes [#5165](https://github.com/angular/material2/issues/5165)
36+
* **autosize:** resize when form value changes. Fixes [#4657](https://github.com/angular/material2/issues/4657) ([#5315](https://github.com/angular/material2/issues/5315)) ([8c9c11a](https://github.com/angular/material2/commit/8c9c11a))
37+
* **button-toggle:** fix standalone button toggle style ([#5121](https://github.com/angular/material2/issues/5121)) ([3d8c833](https://github.com/angular/material2/commit/3d8c833))
38+
* **datepicker:** pass layout direction to touchUi dialog ([#5052](https://github.com/angular/material2/issues/5052)) ([8b6efb1](https://github.com/angular/material2/commit/8b6efb1))
39+
* **datepicker:** use theme foreground color ([#5290](https://github.com/angular/material2/issues/5290)) ([51bf26e](https://github.com/angular/material2/commit/51bf26e))
40+
* **dialog:** set aria-labelledby based on the md-dialog-title ([#5178](https://github.com/angular/material2/issues/5178)) ([aee984a](https://github.com/angular/material2/commit/aee984a))
41+
* **directionality:** error on platform-server ([#5234](https://github.com/angular/material2/issues/5234)) ([49dfe60](https://github.com/angular/material2/commit/49dfe60))
42+
* **input:** theming mixin error ([#5254](https://github.com/angular/material2/issues/5254)) ([37efb54](https://github.com/angular/material2/commit/37efb54)), closes [#5232](https://github.com/angular/material2/issues/5232)
43+
* **input:** underline showing at end if text-align is set ([#5280](https://github.com/angular/material2/issues/5280)) ([5c9391d](https://github.com/angular/material2/commit/5c9391d)), closes [#5272](https://github.com/angular/material2/issues/5272)
44+
* **memory:** Unsubscribe event listeners when using Observable.fromEvent ([#5325](https://github.com/angular/material2/issues/5325)) ([1b351cd](https://github.com/angular/material2/commit/1b351cd))
45+
* **menu:** role being set on the wrong element ([#5191](https://github.com/angular/material2/issues/5191)) ([2239668](https://github.com/angular/material2/commit/2239668))
46+
* **overlay:** remove webkit tap highlight from backdrop ([#5258](https://github.com/angular/material2/issues/5258)) ([8feddd4](https://github.com/angular/material2/commit/8feddd4))
47+
* **select:** align first option to trigger when it is inside a group ([#5153](https://github.com/angular/material2/issues/5153)) ([d39cb12](https://github.com/angular/material2/commit/d39cb12))
48+
* **select:** expose focus method ([#5255](https://github.com/angular/material2/issues/5255)) ([7b2d4ae](https://github.com/angular/material2/commit/7b2d4ae)), closes [#5251](https://github.com/angular/material2/issues/5251)
49+
* **select:** md-optgroup not using typography styles ([#5193](https://github.com/angular/material2/issues/5193)) ([b5bf6f5](https://github.com/angular/material2/commit/b5bf6f5))
50+
* **select:** page scrolling down when selecting option with space ([#5192](https://github.com/angular/material2/issues/5192)) ([2361385](https://github.com/angular/material2/commit/2361385))
51+
* **snackbar:** clear timeout upon dismiss ([#4860](https://github.com/angular/material2/issues/4860)) ([146160c](https://github.com/angular/material2/commit/146160c))
52+
* **tabs:** server-side rendering error ([#5348](https://github.com/angular/material2/issues/5348)) ([0174377](https://github.com/angular/material2/commit/0174377))
53+
* **unique-selection-dispatcher:** remove listeners on destroy ([#5164](https://github.com/angular/material2/issues/5164)) ([f9bbbe7](https://github.com/angular/material2/commit/f9bbbe7))
54+
55+
56+
### Features
57+
58+
* **data-table:** initial version. Too many commits to list.
59+
* **directionality:** a provider to get directionality ([#4044](https://github.com/angular/material2/issues/4044)) ([61d979e](https://github.com/angular/material2/commit/61d979e)), closes [#3600](https://github.com/angular/material2/issues/3600)
60+
* **input:** add custom error state matcher ([#4750](https://github.com/angular/material2/issues/4750)) ([f73cc97](https://github.com/angular/material2/commit/f73cc97))
61+
* **pagination:** initial pagination component ([#5156](https://github.com/angular/material2/issues/5156)) ([85fb00a](https://github.com/angular/material2/commit/85fb00a))
62+
* **sort:** add ability to manage and display sorting ([#5307](https://github.com/angular/material2/issues/5307)) ([b328d36](https://github.com/angular/material2/commit/b328d36))
63+
* **tab-nav-bar:** support disabling tab links ([#5257](https://github.com/angular/material2/issues/5257)) ([fc809ed](https://github.com/angular/material2/commit/fc809ed)), closes [#5208](https://github.com/angular/material2/issues/5208)
64+
* add support for strict null checks ([#5094](https://github.com/angular/material2/issues/5094)) ([2bf7024](https://github.com/angular/material2/commit/2bf7024))
65+
* remove uses of rxjs patch operators ([#5314](https://github.com/angular/material2/issues/5314)) ([e488e3f](https://github.com/angular/material2/commit/e488e3f)), closes [#2622](https://github.com/angular/material2/issues/2622)
66+
* move a11y, bidi, platform, rxjs, and portal to cdk ([#5386](https://github.com/angular/material2/issues/5386)) ([fde35e4](https://github.com/angular/material2/commit/fde35e4))
67+
* move observe-content to cdk ([#5438](https://github.com/angular/material2/issues/5438)) ([b00f838](https://github.com/angular/material2/commit/b00f838))
68+
69+
70+
171
<a name="2.0.0-beta.7"></a>
272
# [2.0.0-beta.7 glass-delicatessen](https://github.com/angular/material2/compare/2.0.0-beta.6...2.0.0-beta.7) (2017-06-19)
373

README.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ This is the home for the Angular team's Material Design components built for and
1111
[Contributing](https://github.com/angular/material2/blob/master/CONTRIBUTING.md) |
1212
[Plunker Template](http://plnkr.co/edit/o077B6uEiiIgkC0S06dd?p=preview)
1313

14-
### Installation
15-
16-
The latest release of Angular Material can be installed from npm
17-
18-
`npm install @angular/material`
19-
20-
A snapshot build with the latest changes from
21-
[master](https://github.com/angular/material2/tree/master) is also available.
22-
Note that this snapshot build should not be considered stable and may break between releases.
23-
24-
`npm install --save angular/material2-builds angular/cdk-builds`
25-
2614
### Getting started
2715

2816
See our [Getting Started Guide][getting-started]
@@ -44,7 +32,7 @@ label.
4432
High level stuff planned for Q3 2017 (July - September):
4533
- As many bug fixes as humanly possible
4634
- Additional features for data-table
47-
- More accessibility improvements
35+
- Continued accessibility improvements
4836
- Nested menus
4937
- All components are OnPush
5038
- Improved documentation, guides, examples, and navigation on material.angular.io
@@ -64,6 +52,7 @@ High level stuff planned for Q3 2017 (July - September):
6452
| cards | | [Docs][2] |
6553
| checkbox | | [Docs][3] |
6654
| chips | Chip-remove, integration with input in-progress | [Docs][26] |
55+
| data-table | Sticky headers & incremental row rendering in-progress | [Docs][28] |
6756
| datepicker | | [Docs][25] |
6857
| dialog | | [Docs][22] |
6958
| expansion-panel | Needs documentation | - |
@@ -72,6 +61,7 @@ High level stuff planned for Q3 2017 (July - September):
7261
| input | | [Docs][5] |
7362
| list | Selection and action list planned Q3 | [Docs][8] |
7463
| menu | Nested menu planned Q3 | [Docs][17] |
64+
| paginator | | [Docs][29] |
7565
| progress-bar | | [Docs][12] |
7666
| progress-spinner | | [Docs][11] |
7767
| radio | | [Docs][4] |
@@ -81,25 +71,25 @@ High level stuff planned for Q3 2017 (July - September):
8171
| slide-toggle | | [Docs][14] |
8272
| slider | | [Docs][16] |
8373
| snackbar / toast | | [Docs][21] |
74+
| sort-header | | [Docs][30] |
8475
| tabs | | [Docs][13] |
8576
| textarea | | [Docs][5] |
8677
| toolbar | | [Docs][7] |
8778
| tooltip | | [Docs][18] |
88-
| |
79+
| ---------------- | ------------------------------------------------------ | ------------ |
8980
| theming | | [Guide][20] |
9081
| typography | | [Guide][27] |
9182
| layout | See [angular/flex-layout][lay_rp] | [Wiki][0] |
83+
| cdk | Launched, documentation in-progress | |
9284

9385

9486
#### In progress, planned, and non-planned features
9587

9688
| Feature | Status | Docs | Issue |
9789
|------------------|-------------------------------------|--------------|----------------|
98-
| @angular/cdk | Coming soon | - | |
99-
| data-table | Coming soon | - | [#581][0581] |
100-
| tree | Design in-progress | - | [#3175][3175] |
101-
| stepper | Not started, planned Q3 2017 | - | [#508][0508] |
102-
| sticky-header | Not started, planned Q3 2017 | - | [#474][0474] |
90+
| tree | In-progress ([sneak peak][31]) | - | [#3175][3175] |
91+
| stepper | In-progress, planned Q3 2017 | - | [#508][0508] |
92+
| sticky-header | In-progress, planned Q3 2017 | - | [#474][0474] |
10393
| virtual-repeat | Not started, planned Q4 2017 | - | [#823][0823] |
10494
| fab speed-dial | Not started, not planned | - | [#860][0860] |
10595
| fab toolbar | Not started, not planned | - | - |
@@ -134,6 +124,10 @@ High level stuff planned for Q3 2017 (July - September):
134124
[25]: https://material.angular.io/components/component/datepicker
135125
[26]: https://material.angular.io/components/component/chips
136126
[27]: https://material.angular.io/guide/typography
127+
[28]: https://material.angular.io/components/component/table
128+
[29]: https://material.angular.io/components/component/paginator
129+
[30]: https://material.angular.io/components/component/sort
130+
[31]: https://tina-material-tree.firebaseapp.com/simple-tree
137131

138132
[0107]: https://github.com/angular/material2/issues/107
139133
[0119]: https://github.com/angular/material2/issues/119

e2e/components/checkbox-e2e.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ describe('checkbox', () => {
99

1010
it('should be checked when clicked, and unchecked when clicked again', async () => {
1111
let checkboxEl = element(by.id('test-checkbox'));
12-
let inputEl = element(by.css('input[id=input-test-checkbox]'));
13-
let checked: string;
12+
let inputEl = element(by.css('input[id=test-checkbox-input]'));
1413

1514
screenshot('start');
1615
checkboxEl.click();
@@ -33,7 +32,7 @@ describe('checkbox', () => {
3332
});
3433

3534
it('should toggle the checkbox when pressing space', () => {
36-
let inputEl = element(by.css('input[id=input-test-checkbox]'));
35+
let inputEl = element(by.css('input[id=test-checkbox-input]'));
3736

3837
expect(inputEl.getAttribute('checked'))
3938
.toBeFalsy('Expect checkbox "checked" property to be false');

e2e/components/icon-e2e.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {browser, by, element} from 'protractor';
2-
import {screenshot} from '../screenshot';
32

43

54
describe('icon', () => {

e2e/components/input-e2e.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,14 @@ describe('input', () => {
4343
expect(input.getAttribute('value')).toBe('0');
4444
});
4545
});
46+
47+
describe('textarea', () => {
48+
beforeEach(() => browser.get('/input'));
49+
50+
it('should update input value when user types', () => {
51+
let input = element(by.id('text-area'));
52+
input.sendKeys('abc123');
53+
expect(input.getAttribute('value')).toBe('abc123');
54+
});
55+
});
4656
});

e2e/components/menu-e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Key, protractor, browser, by, element, ElementFinder} from 'protractor';
1+
import {Key, protractor, browser, by, element} from 'protractor';
22
import {screenshot} from '../screenshot';
33
import {
44
expectToExist,

e2e/components/sidenav-e2e.spec.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {browser, by, element, ExpectedConditions} from 'protractor';
2+
const EC = ExpectedConditions;
3+
4+
describe('sidenav', () => {
5+
describe('opening and closing', () => {
6+
beforeEach(() => browser.get('/sidenav'));
7+
8+
let input = element(by.tagName('md-sidenav'));
9+
10+
11+
it('should be closed', () => {
12+
expect(input.isDisplayed()).toBeFalsy();
13+
});
14+
15+
it('should open', () => {
16+
element(by.buttonText('Open sidenav')).click();
17+
expect(input.isDisplayed()).toBeTruthy();
18+
});
19+
20+
it('should close again', () => {
21+
element(by.buttonText('Open sidenav')).click();
22+
element(by.buttonText('Open sidenav')).click();
23+
browser.wait(EC.presenceOf(element(by.className('mat-sidenav-closed'))), 1000);
24+
expect(input.isDisplayed()).toBeFalsy();
25+
});
26+
});
27+
});

guides/bidirectionality.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Angular Material bi-directionality
2+
3+
### Setting a text-direction for your application
4+
The [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
5+
is typically applied to `<html>` or `<body>` element of a page. However, it can be used on any
6+
element to apply a text-direction to a smaller subset of the page.
7+
8+
All Angular Material components automatically reflect the LTR/RTL direction
9+
of their container.
10+
11+
### Reading the text-direction in your own components
12+
`@angular/cdk` provides a `Directionality` injectable that can be used by any component
13+
in your application. To consume this injectable, you must import `BidiModule`
14+
from `@angular/cdk`.
15+
16+
`Directionality` provides two useful properties:
17+
* `value`: the current text direction, either `'ltr'` or `'rtl'`.
18+
* `change`: an `Observable` that emits whenever the text-direction changes. Note that this only
19+
captures changes from `dir` attributes _inside the Angular application context_. It will not
20+
emit for changes to `dir` on `<html>` and `<body>`, as these are assumed to be static.
21+
22+
#### Example
23+
```ts
24+
@Component({ /* ... */})
25+
export class MyCustomComponent {
26+
private dir: Direction;
27+
28+
constructor(directionality: Directionality) {
29+
this.dir = directionality.value;
30+
directionality.change.subscribe(() => {
31+
this.dir = directionality.value;
32+
});
33+
}
34+
}
35+
```

guides/getting-started.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ For existing apps, follow these steps to begin using Angular Material.
99
npm install --save @angular/material @angular/cdk
1010
```
1111

12+
A snapshot build with the latest changes from master is also available. Note that this snapshot
13+
build should not be considered stable and may break between releases.
14+
15+
```bash
16+
npm install --save angular/material2-builds angular/cdk-builds
17+
```
18+
1219
## Step 2: Animations
1320

1421
Some Material components depend on the Angular animations module in order to be able to do
@@ -128,15 +135,16 @@ Note that `md-icon` supports any font or svg icons; using Material Icons is one
128135

129136
## Appendix: Configuring SystemJS
130137

131-
If your project is using SystemJS for module loading, you will need to add `@angular/material`
132-
to the SystemJS configuration:
138+
If your project is using SystemJS for module loading, you will need to add `@angular/material` and
139+
`@angular/cdk` to the SystemJS configuration:
133140

134141
```js
135142
System.config({
136143
// existing configuration options
137144
map: {
138145
// ...
139146
'@angular/material': 'npm:@angular/material/bundles/material.umd.js',
147+
'@angular/cdk': 'npm:@angular/cdk/bundles/cdk.umd.js'
140148
// ...
141149
}
142150
});

0 commit comments

Comments
 (0)