@angular/cdk 2.0.0-beta.10 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/package.json +2 -2
- package/a11y/typings/aria-describer.d.ts +51 -0
- package/a11y/typings/aria-reference.d.ts +15 -0
- package/a11y/typings/focus-monitor.d.ts +106 -0
- package/a11y/typings/index.metadata.json +1 -1
- package/a11y/typings/public_api.d.ts +5 -3
- package/bidi/package.json +2 -2
- package/bundles/cdk-a11y.umd.js +639 -25
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +9 -0
- package/bundles/cdk-a11y.umd.min.js.map +1 -0
- package/bundles/cdk-bidi.umd.min.js +9 -0
- package/bundles/cdk-bidi.umd.min.js.map +1 -0
- package/bundles/cdk-coercion.umd.min.js +9 -0
- package/bundles/cdk-coercion.umd.min.js.map +1 -0
- package/bundles/cdk-collections.umd.min.js +9 -0
- package/bundles/cdk-collections.umd.min.js.map +1 -0
- package/bundles/cdk-keycodes.umd.min.js +9 -0
- package/bundles/cdk-keycodes.umd.min.js.map +1 -0
- package/bundles/cdk-observers.umd.min.js +9 -0
- package/bundles/cdk-observers.umd.min.js.map +1 -0
- package/bundles/cdk-overlay.umd.js +49 -75
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +9 -0
- package/bundles/cdk-overlay.umd.min.js.map +1 -0
- package/bundles/cdk-platform.umd.min.js +9 -0
- package/bundles/cdk-platform.umd.min.js.map +1 -0
- package/bundles/cdk-portal.umd.min.js +9 -0
- package/bundles/cdk-portal.umd.min.js.map +1 -0
- package/bundles/cdk-rxjs.umd.js.map +1 -1
- package/bundles/cdk-rxjs.umd.min.js +9 -0
- package/bundles/cdk-rxjs.umd.min.js.map +1 -0
- package/bundles/cdk-scrolling.umd.min.js +9 -0
- package/bundles/cdk-scrolling.umd.min.js.map +1 -0
- package/bundles/cdk-stepper.umd.js +460 -0
- package/bundles/cdk-stepper.umd.js.map +1 -0
- package/bundles/cdk-stepper.umd.min.js +9 -0
- package/bundles/cdk-stepper.umd.min.js.map +1 -0
- package/bundles/cdk-table.umd.js +8 -8
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +9 -0
- package/bundles/cdk-table.umd.min.js.map +1 -0
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +9 -0
- package/bundles/cdk.umd.min.js.map +1 -0
- package/coercion/package.json +2 -2
- package/collections/package.json +2 -2
- package/collections/typings/selection.d.ts +3 -3
- package/{@angular/cdk → esm2015}/a11y.js +617 -17
- package/esm2015/a11y.js.map +1 -0
- package/{@angular/cdk → esm2015}/bidi.js +0 -0
- package/{@angular/cdk → esm2015}/bidi.js.map +0 -0
- package/{@angular → esm2015}/cdk.js +1 -1
- package/{@angular → esm2015}/cdk.js.map +1 -1
- package/{@angular/cdk → esm2015}/coercion.js +0 -0
- package/{@angular/cdk → esm2015}/coercion.js.map +0 -0
- package/{@angular/cdk → esm2015}/collections.js +0 -0
- package/{@angular/cdk → esm2015}/collections.js.map +0 -0
- package/{@angular/cdk → esm2015}/keycodes.js +0 -0
- package/{@angular/cdk → esm2015}/keycodes.js.map +0 -0
- package/{@angular/cdk → esm2015}/observers.js +0 -0
- package/{@angular/cdk → esm2015}/observers.js.map +0 -0
- package/{@angular/cdk → esm2015}/overlay.js +44 -66
- package/esm2015/overlay.js.map +1 -0
- package/{@angular/cdk → esm2015}/platform.js +0 -0
- package/{@angular/cdk → esm2015}/platform.js.map +0 -0
- package/{@angular/cdk → esm2015}/portal.js +0 -0
- package/{@angular/cdk → esm2015}/portal.js.map +0 -0
- package/{@angular/cdk → esm2015}/rxjs.js +0 -0
- package/esm2015/rxjs.js.map +1 -0
- package/{@angular/cdk → esm2015}/scrolling.js +0 -0
- package/{@angular/cdk → esm2015}/scrolling.js.map +0 -0
- package/esm2015/stepper.js +418 -0
- package/esm2015/stepper.js.map +1 -0
- package/{@angular/cdk → esm2015}/table.js +8 -8
- package/esm2015/table.js.map +1 -0
- package/{@angular/cdk → esm5}/a11y.es5.js +622 -17
- package/esm5/a11y.es5.js.map +1 -0
- package/{@angular/cdk → esm5}/bidi.es5.js +0 -0
- package/{@angular/cdk → esm5}/bidi.es5.js.map +0 -0
- package/{@angular → esm5}/cdk.es5.js +1 -1
- package/{@angular → esm5}/cdk.es5.js.map +1 -1
- package/{@angular/cdk → esm5}/coercion.es5.js +0 -0
- package/{@angular/cdk → esm5}/coercion.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/collections.es5.js +0 -0
- package/{@angular/cdk → esm5}/collections.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/keycodes.es5.js +0 -0
- package/{@angular/cdk → esm5}/keycodes.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/observers.es5.js +0 -0
- package/{@angular/cdk → esm5}/observers.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/overlay.es5.js +46 -71
- package/esm5/overlay.es5.js.map +1 -0
- package/{@angular/cdk → esm5}/platform.es5.js +0 -0
- package/{@angular/cdk → esm5}/platform.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/portal.es5.js +0 -0
- package/{@angular/cdk → esm5}/portal.es5.js.map +0 -0
- package/{@angular/cdk → esm5}/rxjs.es5.js +0 -0
- package/esm5/rxjs.es5.js.map +1 -0
- package/{@angular/cdk → esm5}/scrolling.es5.js +0 -0
- package/{@angular/cdk → esm5}/scrolling.es5.js.map +0 -0
- package/esm5/stepper.es5.js +451 -0
- package/esm5/stepper.es5.js.map +1 -0
- package/{@angular/cdk → esm5}/table.es5.js +8 -8
- package/esm5/table.es5.js.map +1 -0
- package/keycodes/package.json +2 -2
- package/observers/package.json +2 -2
- package/overlay/package.json +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/{overlay-state.d.ts → overlay-config.d.ts} +5 -7
- package/overlay/typings/overlay-container.d.ts +1 -6
- package/overlay/typings/overlay-ref.d.ts +3 -3
- package/overlay/typings/overlay.d.ts +2 -2
- package/overlay/typings/position/connected-position-strategy.d.ts +1 -3
- package/overlay/typings/public_api.d.ts +1 -1
- package/overlay/typings/scroll/reposition-scroll-strategy.d.ts +1 -1
- package/package.json +5 -5
- package/platform/package.json +2 -2
- package/portal/package.json +2 -2
- package/portal/typings/portal-injector.d.ts +19 -0
- package/rxjs/package.json +2 -2
- package/rxjs/typings/rx-chain.d.ts +1 -1
- package/rxjs/typings/rx-operators.d.ts +1 -1
- package/scrolling/package.json +2 -2
- package/stepper/index.d.ts +8 -0
- package/stepper/index.metadata.json +11 -0
- package/stepper/package.json +7 -0
- package/stepper/typings/index.d.ts +4 -0
- package/stepper/typings/index.metadata.json +1 -0
- package/stepper/typings/public_api.d.ts +5 -0
- package/stepper/typings/step-label.d.ts +12 -0
- package/stepper/typings/stepper-button.d.ts +11 -0
- package/stepper/typings/stepper.d.ts +93 -0
- package/stepper.d.ts +8 -0
- package/stepper.metadata.json +11 -0
- package/table/package.json +2 -2
- package/table/typings/index.metadata.json +1 -1
- package/typings/a11y/aria-describer.d.ts +51 -0
- package/typings/a11y/aria-reference.d.ts +15 -0
- package/typings/a11y/focus-monitor.d.ts +106 -0
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/a11y/public_api.d.ts +5 -3
- package/typings/collections/selection.d.ts +3 -3
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/{overlay-state.d.ts → overlay-config.d.ts} +5 -7
- package/typings/overlay/overlay-container.d.ts +1 -6
- package/typings/overlay/overlay-ref.d.ts +3 -3
- package/typings/overlay/overlay.d.ts +2 -2
- package/typings/overlay/position/connected-position-strategy.d.ts +1 -3
- package/typings/overlay/public_api.d.ts +1 -1
- package/typings/overlay/scroll/reposition-scroll-strategy.d.ts +1 -1
- package/typings/portal/portal-injector.d.ts +19 -0
- package/typings/rxjs/rx-chain.d.ts +1 -1
- package/typings/rxjs/rx-operators.d.ts +1 -1
- package/typings/stepper/index.d.ts +4 -0
- package/typings/stepper/index.metadata.json +1 -0
- package/typings/stepper/public_api.d.ts +5 -0
- package/typings/stepper/step-label.d.ts +12 -0
- package/typings/stepper/stepper-button.d.ts +11 -0
- package/typings/stepper/stepper.d.ts +93 -0
- package/typings/table/index.metadata.json +1 -1
- package/@angular/cdk/a11y.es5.js.map +0 -1
- package/@angular/cdk/a11y.js.map +0 -1
- package/@angular/cdk/overlay.es5.js.map +0 -1
- package/@angular/cdk/overlay.js.map +0 -1
- package/@angular/cdk/rxjs.es5.js.map +0 -1
- package/@angular/cdk/rxjs.js.map +0 -1
- package/@angular/cdk/table.es5.js.map +0 -1
- package/@angular/cdk/table.js.map +0 -1
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Component, ContentChild, ContentChildren, Directive, EventEmitter, Inject, Input, NgModule, Optional, Output, TemplateRef, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';
|
|
9
|
+
import { ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE } from '@angular/cdk/keycodes';
|
|
10
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
11
|
+
import { BidiModule, Directionality } from '@angular/cdk/bidi';
|
|
12
|
+
import { CommonModule } from '@angular/common';
|
|
13
|
+
var CdkStepLabel = (function () {
|
|
14
|
+
/**
|
|
15
|
+
* @param {?} template
|
|
16
|
+
*/
|
|
17
|
+
function CdkStepLabel(template) {
|
|
18
|
+
this.template = template;
|
|
19
|
+
}
|
|
20
|
+
return CdkStepLabel;
|
|
21
|
+
}());
|
|
22
|
+
CdkStepLabel.decorators = [
|
|
23
|
+
{ type: Directive, args: [{
|
|
24
|
+
selector: '[cdkStepLabel]',
|
|
25
|
+
},] },
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* @nocollapse
|
|
29
|
+
*/
|
|
30
|
+
CdkStepLabel.ctorParameters = function () { return [
|
|
31
|
+
{ type: TemplateRef, },
|
|
32
|
+
]; };
|
|
33
|
+
/**
|
|
34
|
+
* Used to generate unique ID for each stepper component.
|
|
35
|
+
*/
|
|
36
|
+
var nextId = 0;
|
|
37
|
+
/**
|
|
38
|
+
* Change event emitted on selection changes.
|
|
39
|
+
*/
|
|
40
|
+
var StepperSelectionEvent = (function () {
|
|
41
|
+
function StepperSelectionEvent() {
|
|
42
|
+
}
|
|
43
|
+
return StepperSelectionEvent;
|
|
44
|
+
}());
|
|
45
|
+
var CdkStep = (function () {
|
|
46
|
+
/**
|
|
47
|
+
* @param {?} _stepper
|
|
48
|
+
*/
|
|
49
|
+
function CdkStep(_stepper) {
|
|
50
|
+
this._stepper = _stepper;
|
|
51
|
+
/**
|
|
52
|
+
* Whether user has seen the expanded step content or not .
|
|
53
|
+
*/
|
|
54
|
+
this.interacted = false;
|
|
55
|
+
this._editable = true;
|
|
56
|
+
this._optional = false;
|
|
57
|
+
this._customCompleted = null;
|
|
58
|
+
}
|
|
59
|
+
Object.defineProperty(CdkStep.prototype, "editable", {
|
|
60
|
+
/**
|
|
61
|
+
* @return {?}
|
|
62
|
+
*/
|
|
63
|
+
get: function () { return this._editable; },
|
|
64
|
+
/**
|
|
65
|
+
* @param {?} value
|
|
66
|
+
* @return {?}
|
|
67
|
+
*/
|
|
68
|
+
set: function (value) {
|
|
69
|
+
this._editable = coerceBooleanProperty(value);
|
|
70
|
+
},
|
|
71
|
+
enumerable: true,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(CdkStep.prototype, "optional", {
|
|
75
|
+
/**
|
|
76
|
+
* Whether the completion of step is optional or not.
|
|
77
|
+
* @return {?}
|
|
78
|
+
*/
|
|
79
|
+
get: function () { return this._optional; },
|
|
80
|
+
/**
|
|
81
|
+
* @param {?} value
|
|
82
|
+
* @return {?}
|
|
83
|
+
*/
|
|
84
|
+
set: function (value) {
|
|
85
|
+
this._optional = coerceBooleanProperty(value);
|
|
86
|
+
},
|
|
87
|
+
enumerable: true,
|
|
88
|
+
configurable: true
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(CdkStep.prototype, "completed", {
|
|
91
|
+
/**
|
|
92
|
+
* Return whether step is completed or not.
|
|
93
|
+
* @return {?}
|
|
94
|
+
*/
|
|
95
|
+
get: function () {
|
|
96
|
+
return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* @param {?} value
|
|
100
|
+
* @return {?}
|
|
101
|
+
*/
|
|
102
|
+
set: function (value) {
|
|
103
|
+
this._customCompleted = coerceBooleanProperty(value);
|
|
104
|
+
},
|
|
105
|
+
enumerable: true,
|
|
106
|
+
configurable: true
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(CdkStep.prototype, "_defaultCompleted", {
|
|
109
|
+
/**
|
|
110
|
+
* @return {?}
|
|
111
|
+
*/
|
|
112
|
+
get: function () {
|
|
113
|
+
return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;
|
|
114
|
+
},
|
|
115
|
+
enumerable: true,
|
|
116
|
+
configurable: true
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Selects this step component.
|
|
120
|
+
* @return {?}
|
|
121
|
+
*/
|
|
122
|
+
CdkStep.prototype.select = function () {
|
|
123
|
+
this._stepper.selected = this;
|
|
124
|
+
};
|
|
125
|
+
return CdkStep;
|
|
126
|
+
}());
|
|
127
|
+
CdkStep.decorators = [
|
|
128
|
+
{ type: Component, args: [{ selector: 'cdk-step',
|
|
129
|
+
template: "<ng-template><ng-content></ng-content></ng-template>",
|
|
130
|
+
encapsulation: ViewEncapsulation.None,
|
|
131
|
+
preserveWhitespaces: false,
|
|
132
|
+
},] },
|
|
133
|
+
];
|
|
134
|
+
/**
|
|
135
|
+
* @nocollapse
|
|
136
|
+
*/
|
|
137
|
+
CdkStep.ctorParameters = function () { return [
|
|
138
|
+
{ type: CdkStepper, decorators: [{ type: Inject, args: [forwardRef(function () { return CdkStepper; }),] },] },
|
|
139
|
+
]; };
|
|
140
|
+
CdkStep.propDecorators = {
|
|
141
|
+
'stepLabel': [{ type: ContentChild, args: [CdkStepLabel,] },],
|
|
142
|
+
'content': [{ type: ViewChild, args: [TemplateRef,] },],
|
|
143
|
+
'stepControl': [{ type: Input },],
|
|
144
|
+
'label': [{ type: Input },],
|
|
145
|
+
'editable': [{ type: Input },],
|
|
146
|
+
'optional': [{ type: Input },],
|
|
147
|
+
'completed': [{ type: Input },],
|
|
148
|
+
};
|
|
149
|
+
var CdkStepper = (function () {
|
|
150
|
+
/**
|
|
151
|
+
* @param {?} _dir
|
|
152
|
+
*/
|
|
153
|
+
function CdkStepper(_dir) {
|
|
154
|
+
this._dir = _dir;
|
|
155
|
+
this._linear = false;
|
|
156
|
+
this._selectedIndex = 0;
|
|
157
|
+
/**
|
|
158
|
+
* Event emitted when the selected step has changed.
|
|
159
|
+
*/
|
|
160
|
+
this.selectionChange = new EventEmitter();
|
|
161
|
+
/**
|
|
162
|
+
* The index of the step that the focus can be set.
|
|
163
|
+
*/
|
|
164
|
+
this._focusIndex = 0;
|
|
165
|
+
this._groupId = nextId++;
|
|
166
|
+
}
|
|
167
|
+
Object.defineProperty(CdkStepper.prototype, "linear", {
|
|
168
|
+
/**
|
|
169
|
+
* Whether the validity of previous steps should be checked or not.
|
|
170
|
+
* @return {?}
|
|
171
|
+
*/
|
|
172
|
+
get: function () { return this._linear; },
|
|
173
|
+
/**
|
|
174
|
+
* @param {?} value
|
|
175
|
+
* @return {?}
|
|
176
|
+
*/
|
|
177
|
+
set: function (value) { this._linear = coerceBooleanProperty(value); },
|
|
178
|
+
enumerable: true,
|
|
179
|
+
configurable: true
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(CdkStepper.prototype, "selectedIndex", {
|
|
182
|
+
/**
|
|
183
|
+
* The index of the selected step.
|
|
184
|
+
* @return {?}
|
|
185
|
+
*/
|
|
186
|
+
get: function () { return this._selectedIndex; },
|
|
187
|
+
/**
|
|
188
|
+
* @param {?} index
|
|
189
|
+
* @return {?}
|
|
190
|
+
*/
|
|
191
|
+
set: function (index) {
|
|
192
|
+
if (this._anyControlsInvalid(index)
|
|
193
|
+
|| index < this._selectedIndex && !this._steps.toArray()[index].editable) {
|
|
194
|
+
// remove focus from clicked step header if the step is not able to be selected
|
|
195
|
+
this._stepHeader.toArray()[index].nativeElement.blur();
|
|
196
|
+
}
|
|
197
|
+
else if (this._selectedIndex != index) {
|
|
198
|
+
this._emitStepperSelectionEvent(index);
|
|
199
|
+
this._focusIndex = this._selectedIndex;
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
enumerable: true,
|
|
203
|
+
configurable: true
|
|
204
|
+
});
|
|
205
|
+
Object.defineProperty(CdkStepper.prototype, "selected", {
|
|
206
|
+
/**
|
|
207
|
+
* The step that is selected.
|
|
208
|
+
* @return {?}
|
|
209
|
+
*/
|
|
210
|
+
get: function () { return this._steps[this.selectedIndex]; },
|
|
211
|
+
/**
|
|
212
|
+
* @param {?} step
|
|
213
|
+
* @return {?}
|
|
214
|
+
*/
|
|
215
|
+
set: function (step) {
|
|
216
|
+
this.selectedIndex = this._steps.toArray().indexOf(step);
|
|
217
|
+
},
|
|
218
|
+
enumerable: true,
|
|
219
|
+
configurable: true
|
|
220
|
+
});
|
|
221
|
+
/**
|
|
222
|
+
* Selects and focuses the next step in list.
|
|
223
|
+
* @return {?}
|
|
224
|
+
*/
|
|
225
|
+
CdkStepper.prototype.next = function () {
|
|
226
|
+
this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Selects and focuses the previous step in list.
|
|
230
|
+
* @return {?}
|
|
231
|
+
*/
|
|
232
|
+
CdkStepper.prototype.previous = function () {
|
|
233
|
+
this.selectedIndex = Math.max(this._selectedIndex - 1, 0);
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Returns a unique id for each step label element.
|
|
237
|
+
* @param {?} i
|
|
238
|
+
* @return {?}
|
|
239
|
+
*/
|
|
240
|
+
CdkStepper.prototype._getStepLabelId = function (i) {
|
|
241
|
+
return "mat-step-label-" + this._groupId + "-" + i;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Returns unique id for each step content element.
|
|
245
|
+
* @param {?} i
|
|
246
|
+
* @return {?}
|
|
247
|
+
*/
|
|
248
|
+
CdkStepper.prototype._getStepContentId = function (i) {
|
|
249
|
+
return "mat-step-content-" + this._groupId + "-" + i;
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Returns position state of the step with the given index.
|
|
253
|
+
* @param {?} index
|
|
254
|
+
* @return {?}
|
|
255
|
+
*/
|
|
256
|
+
CdkStepper.prototype._getAnimationDirection = function (index) {
|
|
257
|
+
var /** @type {?} */ position = index - this._selectedIndex;
|
|
258
|
+
if (position < 0) {
|
|
259
|
+
return this._layoutDirection() === 'rtl' ? 'next' : 'previous';
|
|
260
|
+
}
|
|
261
|
+
else if (position > 0) {
|
|
262
|
+
return this._layoutDirection() === 'rtl' ? 'previous' : 'next';
|
|
263
|
+
}
|
|
264
|
+
return 'current';
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Returns the type of icon to be displayed.
|
|
268
|
+
* @param {?} index
|
|
269
|
+
* @return {?}
|
|
270
|
+
*/
|
|
271
|
+
CdkStepper.prototype._getIndicatorType = function (index) {
|
|
272
|
+
var /** @type {?} */ step = this._steps.toArray()[index];
|
|
273
|
+
if (!step.completed || this._selectedIndex == index) {
|
|
274
|
+
return 'number';
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
return step.editable ? 'edit' : 'done';
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* @param {?} newIndex
|
|
282
|
+
* @return {?}
|
|
283
|
+
*/
|
|
284
|
+
CdkStepper.prototype._emitStepperSelectionEvent = function (newIndex) {
|
|
285
|
+
var /** @type {?} */ stepsArray = this._steps.toArray();
|
|
286
|
+
this.selectionChange.emit({
|
|
287
|
+
selectedIndex: newIndex,
|
|
288
|
+
previouslySelectedIndex: this._selectedIndex,
|
|
289
|
+
selectedStep: stepsArray[newIndex],
|
|
290
|
+
previouslySelectedStep: stepsArray[this._selectedIndex],
|
|
291
|
+
});
|
|
292
|
+
this._selectedIndex = newIndex;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* @param {?} event
|
|
296
|
+
* @return {?}
|
|
297
|
+
*/
|
|
298
|
+
CdkStepper.prototype._onKeydown = function (event) {
|
|
299
|
+
switch (event.keyCode) {
|
|
300
|
+
case RIGHT_ARROW:
|
|
301
|
+
if (this._layoutDirection() === 'rtl') {
|
|
302
|
+
this._focusPreviousStep();
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this._focusNextStep();
|
|
306
|
+
}
|
|
307
|
+
break;
|
|
308
|
+
case LEFT_ARROW:
|
|
309
|
+
if (this._layoutDirection() === 'rtl') {
|
|
310
|
+
this._focusNextStep();
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
this._focusPreviousStep();
|
|
314
|
+
}
|
|
315
|
+
break;
|
|
316
|
+
case SPACE:
|
|
317
|
+
case ENTER:
|
|
318
|
+
this.selectedIndex = this._focusIndex;
|
|
319
|
+
break;
|
|
320
|
+
default:
|
|
321
|
+
// Return to avoid calling preventDefault on keys that are not explicitly handled.
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
event.preventDefault();
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* @return {?}
|
|
328
|
+
*/
|
|
329
|
+
CdkStepper.prototype._focusNextStep = function () {
|
|
330
|
+
this._focusStep((this._focusIndex + 1) % this._steps.length);
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* @return {?}
|
|
334
|
+
*/
|
|
335
|
+
CdkStepper.prototype._focusPreviousStep = function () {
|
|
336
|
+
this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* @param {?} index
|
|
340
|
+
* @return {?}
|
|
341
|
+
*/
|
|
342
|
+
CdkStepper.prototype._focusStep = function (index) {
|
|
343
|
+
this._focusIndex = index;
|
|
344
|
+
this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* @param {?} index
|
|
348
|
+
* @return {?}
|
|
349
|
+
*/
|
|
350
|
+
CdkStepper.prototype._anyControlsInvalid = function (index) {
|
|
351
|
+
this._steps.toArray()[this._selectedIndex].interacted = true;
|
|
352
|
+
if (this._linear && index >= 0) {
|
|
353
|
+
return this._steps.toArray().slice(0, index).some(function (step) { return step.stepControl.invalid; });
|
|
354
|
+
}
|
|
355
|
+
return false;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* @return {?}
|
|
359
|
+
*/
|
|
360
|
+
CdkStepper.prototype._layoutDirection = function () {
|
|
361
|
+
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
362
|
+
};
|
|
363
|
+
return CdkStepper;
|
|
364
|
+
}());
|
|
365
|
+
CdkStepper.decorators = [
|
|
366
|
+
{ type: Directive, args: [{
|
|
367
|
+
selector: '[cdkStepper]',
|
|
368
|
+
},] },
|
|
369
|
+
];
|
|
370
|
+
/**
|
|
371
|
+
* @nocollapse
|
|
372
|
+
*/
|
|
373
|
+
CdkStepper.ctorParameters = function () { return [
|
|
374
|
+
{ type: Directionality, decorators: [{ type: Optional },] },
|
|
375
|
+
]; };
|
|
376
|
+
CdkStepper.propDecorators = {
|
|
377
|
+
'_steps': [{ type: ContentChildren, args: [CdkStep,] },],
|
|
378
|
+
'linear': [{ type: Input },],
|
|
379
|
+
'selectedIndex': [{ type: Input },],
|
|
380
|
+
'selected': [{ type: Input },],
|
|
381
|
+
'selectionChange': [{ type: Output },],
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Button that moves to the next step in a stepper workflow.
|
|
385
|
+
*/
|
|
386
|
+
var CdkStepperNext = (function () {
|
|
387
|
+
/**
|
|
388
|
+
* @param {?} _stepper
|
|
389
|
+
*/
|
|
390
|
+
function CdkStepperNext(_stepper) {
|
|
391
|
+
this._stepper = _stepper;
|
|
392
|
+
}
|
|
393
|
+
return CdkStepperNext;
|
|
394
|
+
}());
|
|
395
|
+
CdkStepperNext.decorators = [
|
|
396
|
+
{ type: Directive, args: [{
|
|
397
|
+
selector: 'button[cdkStepperNext]',
|
|
398
|
+
host: { '(click)': '_stepper.next()' }
|
|
399
|
+
},] },
|
|
400
|
+
];
|
|
401
|
+
/**
|
|
402
|
+
* @nocollapse
|
|
403
|
+
*/
|
|
404
|
+
CdkStepperNext.ctorParameters = function () { return [
|
|
405
|
+
{ type: CdkStepper, },
|
|
406
|
+
]; };
|
|
407
|
+
/**
|
|
408
|
+
* Button that moves to the previous step in a stepper workflow.
|
|
409
|
+
*/
|
|
410
|
+
var CdkStepperPrevious = (function () {
|
|
411
|
+
/**
|
|
412
|
+
* @param {?} _stepper
|
|
413
|
+
*/
|
|
414
|
+
function CdkStepperPrevious(_stepper) {
|
|
415
|
+
this._stepper = _stepper;
|
|
416
|
+
}
|
|
417
|
+
return CdkStepperPrevious;
|
|
418
|
+
}());
|
|
419
|
+
CdkStepperPrevious.decorators = [
|
|
420
|
+
{ type: Directive, args: [{
|
|
421
|
+
selector: 'button[cdkStepperPrevious]',
|
|
422
|
+
host: { '(click)': '_stepper.previous()' }
|
|
423
|
+
},] },
|
|
424
|
+
];
|
|
425
|
+
/**
|
|
426
|
+
* @nocollapse
|
|
427
|
+
*/
|
|
428
|
+
CdkStepperPrevious.ctorParameters = function () { return [
|
|
429
|
+
{ type: CdkStepper, },
|
|
430
|
+
]; };
|
|
431
|
+
var CdkStepperModule = (function () {
|
|
432
|
+
function CdkStepperModule() {
|
|
433
|
+
}
|
|
434
|
+
return CdkStepperModule;
|
|
435
|
+
}());
|
|
436
|
+
CdkStepperModule.decorators = [
|
|
437
|
+
{ type: NgModule, args: [{
|
|
438
|
+
imports: [BidiModule, CommonModule],
|
|
439
|
+
exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
|
|
440
|
+
declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]
|
|
441
|
+
},] },
|
|
442
|
+
];
|
|
443
|
+
/**
|
|
444
|
+
* @nocollapse
|
|
445
|
+
*/
|
|
446
|
+
CdkStepperModule.ctorParameters = function () { return []; };
|
|
447
|
+
/**
|
|
448
|
+
* Generated bundle index. Do not edit.
|
|
449
|
+
*/
|
|
450
|
+
export { CdkStepperModule, StepperSelectionEvent, CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious };
|
|
451
|
+
//# sourceMappingURL=stepper.es5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.es5.js","sources":["../../../src/cdk/stepper/index.ts","../../../src/cdk/stepper/public_api.ts","../../../src/cdk/stepper/stepper-button.ts","../../../src/cdk/stepper/stepper.ts","../../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport {CdkStepperModule,StepContentPositionState,StepperSelectionEvent,CdkStep,CdkStepper,CdkStepLabel,CdkStepperNext,CdkStepperPrevious} from './public_api';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\nexport class CdkStepperModule {static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction CdkStepperModule_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperModule.ctorParameters;\n}\n\n\nexport {StepContentPositionState,StepperSelectionEvent,CdkStep,CdkStepper} from './stepper';\nexport {CdkStepLabel} from './step-label';\nexport {CdkStepperNext,CdkStepperPrevious} from './stepper-button';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive} from '@angular/core';\nimport {CdkStepper} from './stepper';\n/**\n * Button that moves to the next step in a stepper workflow.\n */\nexport class CdkStepperNext {\n/**\n * @param {?} _stepper\n */\nconstructor(public _stepper: CdkStepper) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'button[cdkStepperNext]',\n host: {'(click)': '_stepper.next()'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, },\n];\n}\n\nfunction CdkStepperNext_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperNext.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperNext.ctorParameters;\n/** @type {?} */\nCdkStepperNext.prototype._stepper;\n}\n\n/**\n * Button that moves to the previous step in a stepper workflow.\n */\nexport class CdkStepperPrevious {\n/**\n * @param {?} _stepper\n */\nconstructor(public _stepper: CdkStepper) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'button[cdkStepperPrevious]',\n host: {'(click)': '_stepper.previous()'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, },\n];\n}\n\nfunction CdkStepperPrevious_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperPrevious.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperPrevious.ctorParameters;\n/** @type {?} */\nCdkStepperPrevious.prototype._stepper;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n Directive,\n // This import is only used to define a generic type. The current TypeScript version incorrectly\n // considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)\n // tslint:disable-next-line:no-unused-variable\n ElementRef,\n Component,\n ContentChild,\n ViewChild,\n TemplateRef,\n ViewEncapsulation,\n Optional,\n Inject,\n forwardRef\n} from '@angular/core';\nimport {LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE} from '@angular/cdk/keycodes';\nimport {CdkStepLabel} from './step-label';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {AbstractControl} from '@angular/forms';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\n/**\n * Used to generate unique ID for each stepper component.\n */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n/**\n * Change event emitted on selection changes.\n */\nexport class StepperSelectionEvent {\n/**\n * Index of the step now selected.\n */\nselectedIndex: number;\n/**\n * Index of the step previously selected.\n */\npreviouslySelectedIndex: number;\n/**\n * The step instance now selected.\n */\nselectedStep: CdkStep;\n/**\n * The step instance previously selected.\n */\npreviouslySelectedStep: CdkStep;\n}\n\nfunction StepperSelectionEvent_tsickle_Closure_declarations() {\n/**\n * Index of the step now selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.selectedIndex;\n/**\n * Index of the step previously selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.previouslySelectedIndex;\n/**\n * The step instance now selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.selectedStep;\n/**\n * The step instance previously selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.previouslySelectedStep;\n}\n\nexport class CdkStep {\n/**\n * Template for step label if it exists.\n */\nstepLabel: CdkStepLabel;\n/**\n * Template for step content.\n */\ncontent: TemplateRef<any>;\n/**\n * The top level abstract control of the step.\n */\nstepControl: AbstractControl;\n/**\n * Whether user has seen the expanded step content or not .\n */\ninteracted = false;\n/**\n * Label of the step.\n */\nlabel: string;\n/**\n * @return {?}\n */\nget editable() { return this._editable; }\n/**\n * @param {?} value\n * @return {?}\n */\nset editable(value: any) {\n this._editable = coerceBooleanProperty(value);\n }\nprivate _editable = true;\n/**\n * Whether the completion of step is optional or not.\n * @return {?}\n */\nget optional() { return this._optional; }\n/**\n * @param {?} value\n * @return {?}\n */\nset optional(value: any) {\n this._optional = coerceBooleanProperty(value);\n }\nprivate _optional = false;\n/**\n * Return whether step is completed or not.\n * @return {?}\n */\nget completed() {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n/**\n * @param {?} value\n * @return {?}\n */\nset completed(value: any) {\n this._customCompleted = coerceBooleanProperty(value);\n }\nprivate _customCompleted: boolean | null = null;\n/**\n * @return {?}\n */\nprivate get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n/**\n * @param {?} _stepper\n */\nconstructor(\nprivate _stepper: CdkStepper) { }\n/**\n * Selects this step component.\n * @return {?}\n */\nselect(): void {\n this._stepper.selected = this;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n moduleId: module.id,\n selector: 'cdk-step',\n templateUrl: 'step.html',\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, decorators: [{ type: Inject, args: [forwardRef(() => CdkStepper), ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'stepLabel': [{ type: ContentChild, args: [CdkStepLabel, ] },],\n'content': [{ type: ViewChild, args: [TemplateRef, ] },],\n'stepControl': [{ type: Input },],\n'label': [{ type: Input },],\n'editable': [{ type: Input },],\n'optional': [{ type: Input },],\n'completed': [{ type: Input },],\n};\n}\n\nfunction CdkStep_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStep.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStep.ctorParameters;\n/** @type {?} */\nCdkStep.propDecorators;\n/**\n * Template for step label if it exists.\n * @type {?}\n */\nCdkStep.prototype.stepLabel;\n/**\n * Template for step content.\n * @type {?}\n */\nCdkStep.prototype.content;\n/**\n * The top level abstract control of the step.\n * @type {?}\n */\nCdkStep.prototype.stepControl;\n/**\n * Whether user has seen the expanded step content or not .\n * @type {?}\n */\nCdkStep.prototype.interacted;\n/**\n * Label of the step.\n * @type {?}\n */\nCdkStep.prototype.label;\n/** @type {?} */\nCdkStep.prototype._editable;\n/** @type {?} */\nCdkStep.prototype._optional;\n/** @type {?} */\nCdkStep.prototype._customCompleted;\n/** @type {?} */\nCdkStep.prototype._stepper;\n}\n\nexport class CdkStepper {\n/**\n * The list of step components that the stepper is holding.\n */\n_steps: QueryList<CdkStep>;\n/**\n * The list of step headers of the steps in the stepper.\n */\n_stepHeader: QueryList<ElementRef>;\n/**\n * Whether the validity of previous steps should be checked or not.\n * @return {?}\n */\nget linear() { return this._linear; }\n/**\n * @param {?} value\n * @return {?}\n */\nset linear(value: any) { this._linear = coerceBooleanProperty(value); }\nprivate _linear = false;\n/**\n * The index of the selected step.\n * @return {?}\n */\nget selectedIndex() { return this._selectedIndex; }\n/**\n * @param {?} index\n * @return {?}\n */\nset selectedIndex(index: number) {\n if (this._anyControlsInvalid(index)\n || index < this._selectedIndex && !this._steps.toArray()[index].editable) {\n // remove focus from clicked step header if the step is not able to be selected\n this._stepHeader.toArray()[index].nativeElement.blur();\n } else if (this._selectedIndex != index) {\n this._emitStepperSelectionEvent(index);\n this._focusIndex = this._selectedIndex;\n }\n }\nprivate _selectedIndex: number = 0;\n/**\n * The step that is selected.\n * @return {?}\n */\nget selected() { return this._steps[this.selectedIndex]; }\n/**\n * @param {?} step\n * @return {?}\n */\nset selected(step: CdkStep) {\n this.selectedIndex = this._steps.toArray().indexOf(step);\n }\n/**\n * Event emitted when the selected step has changed.\n */\nselectionChange = new EventEmitter<StepperSelectionEvent>();\n/**\n * The index of the step that the focus can be set.\n */\n_focusIndex: number = 0;\n/**\n * Used to track unique ID for each stepper component.\n */\n_groupId: number;\n/**\n * @param {?} _dir\n */\nconstructor(\nprivate _dir: Directionality) {\n this._groupId = nextId++;\n }\n/**\n * Selects and focuses the next step in list.\n * @return {?}\n */\nnext(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n/**\n * Selects and focuses the previous step in list.\n * @return {?}\n */\nprevious(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n/**\n * Returns a unique id for each step label element.\n * @param {?} i\n * @return {?}\n */\n_getStepLabelId(i: number): string {\n return `mat-step-label-${this._groupId}-${i}`;\n }\n/**\n * Returns unique id for each step content element.\n * @param {?} i\n * @return {?}\n */\n_getStepContentId(i: number): string {\n return `mat-step-content-${this._groupId}-${i}`;\n }\n/**\n * Returns position state of the step with the given index.\n * @param {?} index\n * @return {?}\n */\n_getAnimationDirection(index: number): StepContentPositionState {\n const /** @type {?} */ position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n/**\n * Returns the type of icon to be displayed.\n * @param {?} index\n * @return {?}\n */\n_getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const /** @type {?} */ step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n/**\n * @param {?} newIndex\n * @return {?}\n */\nprivate _emitStepperSelectionEvent(newIndex: number): void {\n const /** @type {?} */ stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._selectedIndex = newIndex;\n }\n/**\n * @param {?} event\n * @return {?}\n */\n_onKeydown(event: KeyboardEvent) {\n switch (event.keyCode) {\n case RIGHT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusPreviousStep();\n } else {\n this._focusNextStep();\n }\n break;\n case LEFT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusNextStep();\n } else {\n this._focusPreviousStep();\n }\n break;\n case SPACE:\n case ENTER:\n this.selectedIndex = this._focusIndex;\n break;\n default:\n // Return to avoid calling preventDefault on keys that are not explicitly handled.\n return;\n }\n event.preventDefault();\n }\n/**\n * @return {?}\n */\nprivate _focusNextStep() {\n this._focusStep((this._focusIndex + 1) % this._steps.length);\n }\n/**\n * @return {?}\n */\nprivate _focusPreviousStep() {\n this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);\n }\n/**\n * @param {?} index\n * @return {?}\n */\nprivate _focusStep(index: number) {\n this._focusIndex = index;\n this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();\n }\n/**\n * @param {?} index\n * @return {?}\n */\nprivate _anyControlsInvalid(index: number): boolean {\n this._steps.toArray()[this._selectedIndex].interacted = true;\n if (this._linear && index >= 0) {\n return this._steps.toArray().slice(0, index).some(step => step.stepControl.invalid);\n }\n return false;\n }\n/**\n * @return {?}\n */\nprivate _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdkStepper]',\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Directionality, decorators: [{ type: Optional }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'_steps': [{ type: ContentChildren, args: [CdkStep, ] },],\n'linear': [{ type: Input },],\n'selectedIndex': [{ type: Input },],\n'selected': [{ type: Input },],\n'selectionChange': [{ type: Output },],\n};\n}\n\nfunction CdkStepper_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepper.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepper.ctorParameters;\n/** @type {?} */\nCdkStepper.propDecorators;\n/**\n * The list of step components that the stepper is holding.\n * @type {?}\n */\nCdkStepper.prototype._steps;\n/**\n * The list of step headers of the steps in the stepper.\n * @type {?}\n */\nCdkStepper.prototype._stepHeader;\n/** @type {?} */\nCdkStepper.prototype._linear;\n/** @type {?} */\nCdkStepper.prototype._selectedIndex;\n/**\n * Event emitted when the selected step has changed.\n * @type {?}\n */\nCdkStepper.prototype.selectionChange;\n/**\n * The index of the step that the focus can be set.\n * @type {?}\n */\nCdkStepper.prototype._focusIndex;\n/**\n * Used to track unique ID for each stepper component.\n * @type {?}\n */\nCdkStepper.prototype._groupId;\n/** @type {?} */\nCdkStepper.prototype._dir;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, TemplateRef} from '@angular/core';\nexport class CdkStepLabel {\n/**\n * @param {?} template\n */\nconstructor(public template: TemplateRef<any>) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdkStepLabel]',\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: TemplateRef, },\n];\n}\n\nfunction CdkStepLabel_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepLabel.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepLabel.ctorParameters;\n/** @type {?} */\nCdkStepLabel.prototype.template;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AIUA,MAAA,YAAA,CAAA;;;;IAIA,WAAA,CAFqB,QAA0B,EAE/C;QAFqB,IAArB,CAAA,QAAqB,GAAA,QAAA,CAA0B;KAAC;;AACzC,YAAP,CAAA,UAAO,GAAoC;IAG3C,EAFE,IAAA,EAAM,SAAA,EAAW,IAAA,EAAM,CAAA;gBAGvB,QAAQ,EAFE,gBAAA;aAGX,EAFC,EAAG;CAGJ,CAFC;;;;AAED,YAAD,CAAA,cAAC,GAAA,MAAA;IAKD,EAAC,IAAI,EAAE,WAAW,GAAG;CACpB,CAAC,AAGF,AAUC;;ADJD;;;AAGA,IAFC,MAAA,GAAA,CAAA,CAAA;;;;AAYD,AAAA,MAAA,qBAAA,CAAA;CAiBC;AAED,AAuBA,AAAA,MAAA,OAAA,CAAA;;;;IAsEA,WAAA,CAtDuB,QAAU,EAsDjC;QAtDuB,IAAvB,CAAA,QAAuB,GAAA,QAAA,CAAU;;;;QAAjC,IAAA,CAAA,UAnCG,GAAA,KAAA,CAAA;QAWO,IAAV,CAAA,SAAU,GAAY,IAAA,CAAK;QAQjB,IAAV,CAAA,SAAU,G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O,EACE,CAAA,UAAE,EAAW,YAAA,CAAa;gBAAnC,OAAO,EACE,CAAA,OAAE,EAAQ,UAAA,EAAY,YAAA,EAAc,cAAA,EAAgB,kBAAA,CAAmB;gBAAhF,YAAY,EACE,CAAA,OAAE,EAAQ,UAAA,EAAY,YAAA,EAAc,cAAA,EAAgB,kBAAA,CAAmB;aAAtF,EACC,EAAG;CAAJ,CACC;;;;AAED,gBAAD,CAAA,cAAC,GAAA,MAAA,EAEA,CANgC,AASjC,AAWA,AACA,AACA,AAAmE;;AD1CnE;;GAEG,AAEH,AAA+J;;"}
|
|
@@ -37,8 +37,8 @@ var BaseRowDef = (function () {
|
|
|
37
37
|
*/
|
|
38
38
|
BaseRowDef.prototype.ngOnChanges = function (changes) {
|
|
39
39
|
// Create a new columns differ if one does not yet exist. Initialize it based on initial value
|
|
40
|
-
// of the columns property.
|
|
41
|
-
var /** @type {?} */ columns = changes['columns'].currentValue;
|
|
40
|
+
// of the columns property or an empty array if none is provided.
|
|
41
|
+
var /** @type {?} */ columns = changes['columns'].currentValue || [];
|
|
42
42
|
if (!this._columnsDiffer && columns) {
|
|
43
43
|
this._columnsDiffer = this._differs.find(columns).create();
|
|
44
44
|
this._columnsDiffer.diff(columns);
|
|
@@ -142,8 +142,7 @@ var CdkHeaderRow = (function () {
|
|
|
142
142
|
return CdkHeaderRow;
|
|
143
143
|
}());
|
|
144
144
|
CdkHeaderRow.decorators = [
|
|
145
|
-
{ type: Component, args: [{
|
|
146
|
-
selector: 'cdk-header-row',
|
|
145
|
+
{ type: Component, args: [{ selector: 'cdk-header-row',
|
|
147
146
|
template: CDK_ROW_TEMPLATE,
|
|
148
147
|
host: {
|
|
149
148
|
'class': 'cdk-header-row',
|
|
@@ -151,6 +150,7 @@ CdkHeaderRow.decorators = [
|
|
|
151
150
|
},
|
|
152
151
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
153
152
|
encapsulation: ViewEncapsulation.None,
|
|
153
|
+
preserveWhitespaces: false,
|
|
154
154
|
},] },
|
|
155
155
|
];
|
|
156
156
|
/**
|
|
@@ -166,8 +166,7 @@ var CdkRow = (function () {
|
|
|
166
166
|
return CdkRow;
|
|
167
167
|
}());
|
|
168
168
|
CdkRow.decorators = [
|
|
169
|
-
{ type: Component, args: [{
|
|
170
|
-
selector: 'cdk-row',
|
|
169
|
+
{ type: Component, args: [{ selector: 'cdk-row',
|
|
171
170
|
template: CDK_ROW_TEMPLATE,
|
|
172
171
|
host: {
|
|
173
172
|
'class': 'cdk-row',
|
|
@@ -175,6 +174,7 @@ CdkRow.decorators = [
|
|
|
175
174
|
},
|
|
176
175
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
177
176
|
encapsulation: ViewEncapsulation.None,
|
|
177
|
+
preserveWhitespaces: false,
|
|
178
178
|
},] },
|
|
179
179
|
];
|
|
180
180
|
/**
|
|
@@ -705,13 +705,13 @@ var CdkTable = (function () {
|
|
|
705
705
|
return CdkTable;
|
|
706
706
|
}());
|
|
707
707
|
CdkTable.decorators = [
|
|
708
|
-
{ type: Component, args: [{
|
|
709
|
-
selector: 'cdk-table',
|
|
708
|
+
{ type: Component, args: [{ selector: 'cdk-table',
|
|
710
709
|
template: CDK_TABLE_TEMPLATE,
|
|
711
710
|
host: {
|
|
712
711
|
'class': 'cdk-table',
|
|
713
712
|
},
|
|
714
713
|
encapsulation: ViewEncapsulation.None,
|
|
714
|
+
preserveWhitespaces: false,
|
|
715
715
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
716
716
|
},] },
|
|
717
717
|
];
|