@covalent/core 3.1.2 → 4.0.0
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/bundles/covalent-core-user-profile.umd.js +1 -9
- package/bundles/covalent-core-user-profile.umd.js.map +1 -1
- package/bundles/covalent-core-user-profile.umd.min.js.map +1 -1
- package/esm2015/user-profile/user-profile.module.js +3 -11
- package/fesm2015/covalent-core-user-profile.js +1 -9
- package/fesm2015/covalent-core-user-profile.js.map +1 -1
- package/package.json +1 -1
- package/schematics/components.js +1 -14
- package/schematics/components.js.map +1 -1
- package/theming/_all-theme.scss +0 -14
- package/theming/prebuilt/blue-grey-deep-orange.css +0 -248
- package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
- package/theming/prebuilt/blue-orange.css +0 -248
- package/theming/prebuilt/blue-orange.css.map +1 -1
- package/theming/prebuilt/indigo-pink.css +0 -248
- package/theming/prebuilt/indigo-pink.css.map +1 -1
- package/theming/prebuilt/orange-light-blue.css +0 -248
- package/theming/prebuilt/orange-light-blue.css.map +1 -1
- package/theming/prebuilt/teal-orange.css +0 -248
- package/theming/prebuilt/teal-orange.css.map +1 -1
- package/typography/_all-typography.scss +0 -10
- package/user-profile/covalent-core-user-profile.metadata.json +1 -1
- package/bundles/covalent-core-chips.umd.js +0 -1507
- package/bundles/covalent-core-chips.umd.js.map +0 -1
- package/bundles/covalent-core-chips.umd.min.js +0 -16
- package/bundles/covalent-core-chips.umd.min.js.map +0 -1
- package/bundles/covalent-core-data-table.umd.js +0 -2756
- package/bundles/covalent-core-data-table.umd.js.map +0 -1
- package/bundles/covalent-core-data-table.umd.min.js +0 -16
- package/bundles/covalent-core-data-table.umd.min.js.map +0 -1
- package/bundles/covalent-core-expansion-panel.umd.js +0 -853
- package/bundles/covalent-core-expansion-panel.umd.js.map +0 -1
- package/bundles/covalent-core-expansion-panel.umd.min.js +0 -16
- package/bundles/covalent-core-expansion-panel.umd.min.js.map +0 -1
- package/bundles/covalent-core-loading.umd.js +0 -1534
- package/bundles/covalent-core-loading.umd.js.map +0 -1
- package/bundles/covalent-core-loading.umd.min.js +0 -16
- package/bundles/covalent-core-loading.umd.min.js.map +0 -1
- package/bundles/covalent-core-media.umd.js +0 -749
- package/bundles/covalent-core-media.umd.js.map +0 -1
- package/bundles/covalent-core-media.umd.min.js +0 -16
- package/bundles/covalent-core-media.umd.min.js.map +0 -1
- package/bundles/covalent-core-nav-links.umd.js +0 -197
- package/bundles/covalent-core-nav-links.umd.js.map +0 -1
- package/bundles/covalent-core-nav-links.umd.min.js +0 -2
- package/bundles/covalent-core-nav-links.umd.min.js.map +0 -1
- package/bundles/covalent-core-notifications.umd.js +0 -275
- package/bundles/covalent-core-notifications.umd.js.map +0 -1
- package/bundles/covalent-core-notifications.umd.min.js +0 -2
- package/bundles/covalent-core-notifications.umd.min.js.map +0 -1
- package/bundles/covalent-core-paging.umd.js +0 -491
- package/bundles/covalent-core-paging.umd.js.map +0 -1
- package/bundles/covalent-core-paging.umd.min.js +0 -2
- package/bundles/covalent-core-paging.umd.min.js.map +0 -1
- package/bundles/covalent-core-sidesheet.umd.js +0 -145
- package/bundles/covalent-core-sidesheet.umd.js.map +0 -1
- package/bundles/covalent-core-sidesheet.umd.min.js +0 -2
- package/bundles/covalent-core-sidesheet.umd.min.js.map +0 -1
- package/bundles/covalent-core-steps.umd.js +0 -1756
- package/bundles/covalent-core-steps.umd.js.map +0 -1
- package/bundles/covalent-core-steps.umd.min.js +0 -16
- package/bundles/covalent-core-steps.umd.min.js.map +0 -1
- package/bundles/covalent-core-tab-select.umd.js +0 -732
- package/bundles/covalent-core-tab-select.umd.js.map +0 -1
- package/bundles/covalent-core-tab-select.umd.min.js +0 -16
- package/bundles/covalent-core-tab-select.umd.min.js.map +0 -1
- package/bundles/covalent-core-virtual-scroll.umd.js +0 -785
- package/bundles/covalent-core-virtual-scroll.umd.js.map +0 -1
- package/bundles/covalent-core-virtual-scroll.umd.min.js +0 -16
- package/bundles/covalent-core-virtual-scroll.umd.min.js.map +0 -1
- package/chips/README.md +0 -99
- package/chips/_chips-theme.scss +0 -87
- package/chips/chips.component.d.ts +0 -287
- package/chips/chips.component.scss +0 -147
- package/chips/chips.module.d.ts +0 -2
- package/chips/covalent-core-chips.d.ts +0 -4
- package/chips/covalent-core-chips.metadata.json +0 -1
- package/chips/index.d.ts +0 -1
- package/chips/package.json +0 -11
- package/chips/public-api.d.ts +0 -2
- package/data-table/README.md +0 -134
- package/data-table/_data-table-theme.scss +0 -115
- package/data-table/covalent-core-data-table.d.ts +0 -4
- package/data-table/covalent-core-data-table.metadata.json +0 -1
- package/data-table/data-table-cell/data-table-cell.component.d.ts +0 -22
- package/data-table/data-table-cell/data-table-cell.component.scss +0 -58
- package/data-table/data-table-column/data-table-column.component.d.ts +0 -63
- package/data-table/data-table-column/data-table-column.component.scss +0 -80
- package/data-table/data-table-row/data-table-row.component.d.ts +0 -20
- package/data-table/data-table-row/data-table-row.component.scss +0 -12
- package/data-table/data-table-table/data-table-table.component.d.ts +0 -6
- package/data-table/data-table-table/data-table-table.component.scss +0 -7
- package/data-table/data-table.component.d.ts +0 -356
- package/data-table/data-table.component.scss +0 -93
- package/data-table/data-table.module.d.ts +0 -2
- package/data-table/directives/data-table-template.directive.d.ts +0 -6
- package/data-table/index.d.ts +0 -1
- package/data-table/package.json +0 -11
- package/data-table/public-api.d.ts +0 -8
- package/data-table/services/data-table.service.d.ts +0 -31
- package/esm2015/chips/chips.component.js +0 -1115
- package/esm2015/chips/chips.module.js +0 -23
- package/esm2015/chips/covalent-core-chips.js +0 -10
- package/esm2015/chips/index.js +0 -7
- package/esm2015/chips/public-api.js +0 -8
- package/esm2015/data-table/covalent-core-data-table.js +0 -10
- package/esm2015/data-table/data-table-cell/data-table-cell.component.js +0 -88
- package/esm2015/data-table/data-table-column/data-table-column.component.js +0 -218
- package/esm2015/data-table/data-table-row/data-table-row.component.js +0 -132
- package/esm2015/data-table/data-table-table/data-table-table.component.js +0 -43
- package/esm2015/data-table/data-table.component.js +0 -1640
- package/esm2015/data-table/data-table.module.js +0 -39
- package/esm2015/data-table/directives/data-table-template.directive.js +0 -32
- package/esm2015/data-table/index.js +0 -7
- package/esm2015/data-table/public-api.js +0 -14
- package/esm2015/data-table/services/data-table.service.js +0 -116
- package/esm2015/expansion-panel/covalent-core-expansion-panel.js +0 -10
- package/esm2015/expansion-panel/expansion-panel-group.component.js +0 -212
- package/esm2015/expansion-panel/expansion-panel.component.js +0 -272
- package/esm2015/expansion-panel/expansion-panel.module.js +0 -31
- package/esm2015/expansion-panel/index.js +0 -7
- package/esm2015/expansion-panel/public-api.js +0 -9
- package/esm2015/loading/covalent-core-loading.js +0 -10
- package/esm2015/loading/directives/loading.directive.js +0 -231
- package/esm2015/loading/index.js +0 -7
- package/esm2015/loading/loading.component.js +0 -302
- package/esm2015/loading/loading.module.js +0 -30
- package/esm2015/loading/public-api.js +0 -11
- package/esm2015/loading/services/loading.factory.js +0 -297
- package/esm2015/loading/services/loading.service.js +0 -319
- package/esm2015/media/covalent-core-media.js +0 -10
- package/esm2015/media/directives/media-toggle.directive.js +0 -207
- package/esm2015/media/index.js +0 -7
- package/esm2015/media/media.module.js +0 -20
- package/esm2015/media/public-api.js +0 -9
- package/esm2015/media/services/media.service.js +0 -169
- package/esm2015/nav-links/covalent-core-nav-links.js +0 -10
- package/esm2015/nav-links/index.js +0 -7
- package/esm2015/nav-links/nav-links.component.js +0 -138
- package/esm2015/nav-links/nav-links.module.js +0 -37
- package/esm2015/nav-links/public-api.js +0 -8
- package/esm2015/notifications/covalent-core-notifications.js +0 -10
- package/esm2015/notifications/index.js +0 -7
- package/esm2015/notifications/notification-count.component.js +0 -191
- package/esm2015/notifications/notifications.module.js +0 -20
- package/esm2015/notifications/public-api.js +0 -8
- package/esm2015/paging/covalent-core-paging.js +0 -10
- package/esm2015/paging/index.js +0 -7
- package/esm2015/paging/paging-bar.component.js +0 -412
- package/esm2015/paging/paging.module.js +0 -20
- package/esm2015/paging/public-api.js +0 -8
- package/esm2015/sidesheet/covalent-core-sidesheet.js +0 -10
- package/esm2015/sidesheet/index.js +0 -7
- package/esm2015/sidesheet/public-api.js +0 -8
- package/esm2015/sidesheet/sidesheet.component.js +0 -72
- package/esm2015/sidesheet/sidesheet.module.js +0 -27
- package/esm2015/steps/covalent-core-steps.js +0 -10
- package/esm2015/steps/index.js +0 -7
- package/esm2015/steps/nav/nav-step-link/nav-step-link.component.js +0 -144
- package/esm2015/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +0 -371
- package/esm2015/steps/nav/nav-steps-vertical/nav-steps-vertical.component.js +0 -130
- package/esm2015/steps/public-api.js +0 -14
- package/esm2015/steps/step-body/step-body.component.js +0 -83
- package/esm2015/steps/step-header/step-header.component.js +0 -79
- package/esm2015/steps/step.component.js +0 -312
- package/esm2015/steps/steps.component.js +0 -234
- package/esm2015/steps/steps.module.js +0 -44
- package/esm2015/tab-select/covalent-core-tab-select.js +0 -10
- package/esm2015/tab-select/index.js +0 -7
- package/esm2015/tab-select/public-api.js +0 -9
- package/esm2015/tab-select/tab-option.component.js +0 -82
- package/esm2015/tab-select/tab-select.component.js +0 -291
- package/esm2015/tab-select/tab-select.module.js +0 -31
- package/esm2015/virtual-scroll/covalent-core-virtual-scroll.js +0 -10
- package/esm2015/virtual-scroll/index.js +0 -7
- package/esm2015/virtual-scroll/public-api.js +0 -9
- package/esm2015/virtual-scroll/virtual-scroll-container.component.js +0 -391
- package/esm2015/virtual-scroll/virtual-scroll-row.directive.js +0 -25
- package/esm2015/virtual-scroll/virtual-scroll.module.js +0 -21
- package/expansion-panel/README.md +0 -116
- package/expansion-panel/_expansion-panel-theme.scss +0 -80
- package/expansion-panel/covalent-core-expansion-panel.d.ts +0 -4
- package/expansion-panel/covalent-core-expansion-panel.metadata.json +0 -1
- package/expansion-panel/expansion-panel-group.component.d.ts +0 -31
- package/expansion-panel/expansion-panel-group.component.scss +0 -0
- package/expansion-panel/expansion-panel.component.d.ts +0 -82
- package/expansion-panel/expansion-panel.component.scss +0 -50
- package/expansion-panel/expansion-panel.module.d.ts +0 -2
- package/expansion-panel/index.d.ts +0 -1
- package/expansion-panel/package.json +0 -11
- package/expansion-panel/public-api.d.ts +0 -3
- package/fesm2015/covalent-core-chips.js +0 -1151
- package/fesm2015/covalent-core-chips.js.map +0 -1
- package/fesm2015/covalent-core-data-table.js +0 -2309
- package/fesm2015/covalent-core-data-table.js.map +0 -1
- package/fesm2015/covalent-core-expansion-panel.js +0 -528
- package/fesm2015/covalent-core-expansion-panel.js.map +0 -1
- package/fesm2015/covalent-core-loading.js +0 -1179
- package/fesm2015/covalent-core-loading.js.map +0 -1
- package/fesm2015/covalent-core-media.js +0 -411
- package/fesm2015/covalent-core-media.js.map +0 -1
- package/fesm2015/covalent-core-nav-links.js +0 -193
- package/fesm2015/covalent-core-nav-links.js.map +0 -1
- package/fesm2015/covalent-core-notifications.js +0 -228
- package/fesm2015/covalent-core-notifications.js.map +0 -1
- package/fesm2015/covalent-core-paging.js +0 -451
- package/fesm2015/covalent-core-paging.js.map +0 -1
- package/fesm2015/covalent-core-sidesheet.js +0 -118
- package/fesm2015/covalent-core-sidesheet.js.map +0 -1
- package/fesm2015/covalent-core-steps.js +0 -1384
- package/fesm2015/covalent-core-steps.js.map +0 -1
- package/fesm2015/covalent-core-tab-select.js +0 -416
- package/fesm2015/covalent-core-tab-select.js.map +0 -1
- package/fesm2015/covalent-core-virtual-scroll.js +0 -453
- package/fesm2015/covalent-core-virtual-scroll.js.map +0 -1
- package/loading/README.md +0 -180
- package/loading/_loading-theme.scss +0 -10
- package/loading/covalent-core-loading.d.ts +0 -4
- package/loading/covalent-core-loading.metadata.json +0 -1
- package/loading/directives/loading.directive.d.ts +0 -71
- package/loading/index.d.ts +0 -1
- package/loading/loading.component.d.ts +0 -87
- package/loading/loading.component.scss +0 -42
- package/loading/loading.module.d.ts +0 -2
- package/loading/package.json +0 -11
- package/loading/public-api.d.ts +0 -5
- package/loading/services/loading.factory.d.ts +0 -66
- package/loading/services/loading.service.d.ts +0 -118
- package/media/covalent-core-media.d.ts +0 -4
- package/media/covalent-core-media.metadata.json +0 -1
- package/media/directives/media-toggle.directive.d.ts +0 -42
- package/media/index.d.ts +0 -1
- package/media/media.module.d.ts +0 -2
- package/media/package.json +0 -11
- package/media/public-api.d.ts +0 -3
- package/media/services/media.service.d.ts +0 -31
- package/nav-links/README.md +0 -1
- package/nav-links/covalent-core-nav-links.d.ts +0 -4
- package/nav-links/covalent-core-nav-links.metadata.json +0 -1
- package/nav-links/index.d.ts +0 -1
- package/nav-links/nav-links.component.d.ts +0 -51
- package/nav-links/nav-links.component.scss +0 -15
- package/nav-links/nav-links.module.d.ts +0 -2
- package/nav-links/package.json +0 -11
- package/nav-links/public-api.d.ts +0 -2
- package/notifications/README.md +0 -69
- package/notifications/_notification-count-theme.scss +0 -27
- package/notifications/covalent-core-notifications.d.ts +0 -4
- package/notifications/covalent-core-notifications.metadata.json +0 -1
- package/notifications/index.d.ts +0 -1
- package/notifications/notification-count.component.d.ts +0 -74
- package/notifications/notification-count.component.scss +0 -90
- package/notifications/notifications.module.d.ts +0 -2
- package/notifications/package.json +0 -11
- package/notifications/public-api.d.ts +0 -2
- package/paging/README.md +0 -141
- package/paging/_paging-bar-theme.scss +0 -26
- package/paging/covalent-core-paging.d.ts +0 -4
- package/paging/covalent-core-paging.metadata.json +0 -1
- package/paging/index.d.ts +0 -1
- package/paging/package.json +0 -11
- package/paging/paging-bar.component.d.ts +0 -115
- package/paging/paging-bar.component.scss +0 -23
- package/paging/paging.module.d.ts +0 -2
- package/paging/public-api.d.ts +0 -2
- package/sidesheet/README.md +0 -68
- package/sidesheet/covalent-core-sidesheet.d.ts +0 -4
- package/sidesheet/covalent-core-sidesheet.metadata.json +0 -1
- package/sidesheet/index.d.ts +0 -1
- package/sidesheet/package.json +0 -11
- package/sidesheet/public-api.d.ts +0 -2
- package/sidesheet/sidesheet.component.d.ts +0 -13
- package/sidesheet/sidesheet.component.scss +0 -101
- package/sidesheet/sidesheet.module.d.ts +0 -2
- package/steps/README.md +0 -159
- package/steps/_steps-theme.scss +0 -108
- package/steps/covalent-core-steps.d.ts +0 -4
- package/steps/covalent-core-steps.metadata.json +0 -1
- package/steps/index.d.ts +0 -1
- package/steps/nav/README.md +0 -90
- package/steps/nav/nav-step-link/nav-step-link.component.d.ts +0 -42
- package/steps/nav/nav-step-link/nav-step-link.component.scss +0 -17
- package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.d.ts +0 -79
- package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.scss +0 -83
- package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.d.ts +0 -18
- package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.scss +0 -18
- package/steps/package.json +0 -11
- package/steps/public-api.d.ts +0 -8
- package/steps/step-body/step-body.component.d.ts +0 -25
- package/steps/step-body/step-body.component.scss +0 -29
- package/steps/step-header/step-header.component.d.ts +0 -35
- package/steps/step-header/step-header.component.scss +0 -90
- package/steps/step.component.d.ts +0 -97
- package/steps/steps.component.d.ts +0 -60
- package/steps/steps.component.scss +0 -55
- package/steps/steps.module.d.ts +0 -2
- package/tab-select/README.md +0 -93
- package/tab-select/covalent-core-tab-select.d.ts +0 -4
- package/tab-select/covalent-core-tab-select.metadata.json +0 -1
- package/tab-select/index.d.ts +0 -1
- package/tab-select/package.json +0 -11
- package/tab-select/public-api.d.ts +0 -3
- package/tab-select/tab-option.component.d.ts +0 -20
- package/tab-select/tab-option.component.scss +0 -0
- package/tab-select/tab-select.component.d.ts +0 -62
- package/tab-select/tab-select.component.scss +0 -3
- package/tab-select/tab-select.module.d.ts +0 -2
- package/virtual-scroll/README.md +0 -68
- package/virtual-scroll/covalent-core-virtual-scroll.d.ts +0 -4
- package/virtual-scroll/covalent-core-virtual-scroll.metadata.json +0 -1
- package/virtual-scroll/index.d.ts +0 -1
- package/virtual-scroll/package.json +0 -11
- package/virtual-scroll/public-api.d.ts +0 -3
- package/virtual-scroll/virtual-scroll-container.component.d.ts +0 -73
- package/virtual-scroll/virtual-scroll-container.component.scss +0 -7
- package/virtual-scroll/virtual-scroll-row.directive.d.ts +0 -5
- package/virtual-scroll/virtual-scroll.module.d.ts +0 -2
@@ -1,1384 +0,0 @@
|
|
1
|
-
import { Directive, TemplateRef, ViewContainerRef, EventEmitter, Component, ViewChild, ContentChild, Input, Output, ContentChildren, ElementRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Renderer2, NgModule } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { TemplatePortalDirective, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
4
|
-
import { ViewportRuler, ScrollingModule } from '@angular/cdk/scrolling';
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
6
|
-
import { MatRippleModule } from '@angular/material/core';
|
7
|
-
import { mixinDisableRipple, mixinDisabled, tdCollapseAnimation, CovalentCommonModule } from '@covalent/core/common';
|
8
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
9
|
-
import { Subject, merge, of } from 'rxjs';
|
10
|
-
import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
11
|
-
import { Directionality } from '@angular/cdk/bidi';
|
12
|
-
import { RIGHT_ARROW, LEFT_ARROW } from '@angular/cdk/keycodes';
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @fileoverview added by tsickle
|
16
|
-
* Generated from: step.component.ts
|
17
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
18
|
-
*/
|
19
|
-
/** @enum {string} */
|
20
|
-
const StepState = {
|
21
|
-
None: "none",
|
22
|
-
Required: "required",
|
23
|
-
Complete: "complete",
|
24
|
-
};
|
25
|
-
class TdStepLabelDirective extends TemplatePortalDirective {
|
26
|
-
/**
|
27
|
-
* @param {?} templateRef
|
28
|
-
* @param {?} viewContainerRef
|
29
|
-
*/
|
30
|
-
constructor(templateRef, viewContainerRef) {
|
31
|
-
super(templateRef, viewContainerRef);
|
32
|
-
}
|
33
|
-
}
|
34
|
-
TdStepLabelDirective.decorators = [
|
35
|
-
{ type: Directive, args: [{
|
36
|
-
selector: '[td-step-label]ng-template',
|
37
|
-
},] }
|
38
|
-
];
|
39
|
-
/** @nocollapse */
|
40
|
-
TdStepLabelDirective.ctorParameters = () => [
|
41
|
-
{ type: TemplateRef },
|
42
|
-
{ type: ViewContainerRef }
|
43
|
-
];
|
44
|
-
class TdStepActionsDirective extends TemplatePortalDirective {
|
45
|
-
/**
|
46
|
-
* @param {?} templateRef
|
47
|
-
* @param {?} viewContainerRef
|
48
|
-
*/
|
49
|
-
constructor(templateRef, viewContainerRef) {
|
50
|
-
super(templateRef, viewContainerRef);
|
51
|
-
}
|
52
|
-
}
|
53
|
-
TdStepActionsDirective.decorators = [
|
54
|
-
{ type: Directive, args: [{
|
55
|
-
selector: '[td-step-actions]ng-template',
|
56
|
-
},] }
|
57
|
-
];
|
58
|
-
/** @nocollapse */
|
59
|
-
TdStepActionsDirective.ctorParameters = () => [
|
60
|
-
{ type: TemplateRef },
|
61
|
-
{ type: ViewContainerRef }
|
62
|
-
];
|
63
|
-
class TdStepSummaryDirective extends TemplatePortalDirective {
|
64
|
-
/**
|
65
|
-
* @param {?} templateRef
|
66
|
-
* @param {?} viewContainerRef
|
67
|
-
*/
|
68
|
-
constructor(templateRef, viewContainerRef) {
|
69
|
-
super(templateRef, viewContainerRef);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
TdStepSummaryDirective.decorators = [
|
73
|
-
{ type: Directive, args: [{
|
74
|
-
selector: '[td-step-summary]ng-template',
|
75
|
-
},] }
|
76
|
-
];
|
77
|
-
/** @nocollapse */
|
78
|
-
TdStepSummaryDirective.ctorParameters = () => [
|
79
|
-
{ type: TemplateRef },
|
80
|
-
{ type: ViewContainerRef }
|
81
|
-
];
|
82
|
-
class TdStepBase {
|
83
|
-
}
|
84
|
-
/* tslint:disable-next-line */
|
85
|
-
/** @type {?} */
|
86
|
-
const _TdStepMixinBase = mixinDisableRipple(mixinDisabled(TdStepBase));
|
87
|
-
class TdStepComponent extends _TdStepMixinBase {
|
88
|
-
/**
|
89
|
-
* @param {?} _viewContainerRef
|
90
|
-
*/
|
91
|
-
constructor(_viewContainerRef) {
|
92
|
-
super();
|
93
|
-
this._viewContainerRef = _viewContainerRef;
|
94
|
-
this._active = false;
|
95
|
-
this._state = StepState.None;
|
96
|
-
/**
|
97
|
-
* activated?: function
|
98
|
-
* Event emitted when [TdStepComponent] is activated.
|
99
|
-
*/
|
100
|
-
this.activated = new EventEmitter();
|
101
|
-
/**
|
102
|
-
* deactivated?: function
|
103
|
-
* Event emitted when [TdStepComponent] is deactivated.
|
104
|
-
*/
|
105
|
-
this.deactivated = new EventEmitter();
|
106
|
-
}
|
107
|
-
/**
|
108
|
-
* @return {?}
|
109
|
-
*/
|
110
|
-
get stepContent() {
|
111
|
-
return this._contentPortal;
|
112
|
-
}
|
113
|
-
/**
|
114
|
-
* active?: boolean
|
115
|
-
* Toggles [TdStepComponent] between active/deactive.
|
116
|
-
* @param {?} active
|
117
|
-
* @return {?}
|
118
|
-
*/
|
119
|
-
set active(active) {
|
120
|
-
this._setActive(coerceBooleanProperty(active));
|
121
|
-
}
|
122
|
-
/**
|
123
|
-
* @return {?}
|
124
|
-
*/
|
125
|
-
get active() {
|
126
|
-
return this._active;
|
127
|
-
}
|
128
|
-
/**
|
129
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
130
|
-
* Sets state of [TdStepComponent] depending on value.
|
131
|
-
* Defaults to [StepState.None | 'none'].
|
132
|
-
* @param {?} state
|
133
|
-
* @return {?}
|
134
|
-
*/
|
135
|
-
set state(state) {
|
136
|
-
switch (state) {
|
137
|
-
case StepState.Complete:
|
138
|
-
this._state = StepState.Complete;
|
139
|
-
break;
|
140
|
-
case StepState.Required:
|
141
|
-
this._state = StepState.Required;
|
142
|
-
break;
|
143
|
-
default:
|
144
|
-
this._state = StepState.None;
|
145
|
-
break;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
/**
|
149
|
-
* @return {?}
|
150
|
-
*/
|
151
|
-
get state() {
|
152
|
-
return this._state;
|
153
|
-
}
|
154
|
-
/**
|
155
|
-
* @return {?}
|
156
|
-
*/
|
157
|
-
ngOnInit() {
|
158
|
-
this._contentPortal = new TemplatePortal(this._content, this._viewContainerRef);
|
159
|
-
}
|
160
|
-
/**
|
161
|
-
* Toggle active state of [TdStepComponent]
|
162
|
-
* retuns 'true' if successful, else 'false'.
|
163
|
-
* @return {?}
|
164
|
-
*/
|
165
|
-
toggle() {
|
166
|
-
return this._setActive(!this._active);
|
167
|
-
}
|
168
|
-
/**
|
169
|
-
* Opens [TdStepComponent]
|
170
|
-
* retuns 'true' if successful, else 'false'.
|
171
|
-
* @return {?}
|
172
|
-
*/
|
173
|
-
open() {
|
174
|
-
return this._setActive(true);
|
175
|
-
}
|
176
|
-
/**
|
177
|
-
* Closes [TdStepComponent]
|
178
|
-
* retuns 'true' if successful, else 'false'.
|
179
|
-
* @return {?}
|
180
|
-
*/
|
181
|
-
close() {
|
182
|
-
return this._setActive(false);
|
183
|
-
}
|
184
|
-
/**
|
185
|
-
* Returns 'true' if [state] equals to [StepState.Complete | 'complete'], else 'false'.
|
186
|
-
* @return {?}
|
187
|
-
*/
|
188
|
-
isComplete() {
|
189
|
-
return this._state === StepState.Complete;
|
190
|
-
}
|
191
|
-
/**
|
192
|
-
* Method executed when the disabled value changes
|
193
|
-
* @param {?} v
|
194
|
-
* @return {?}
|
195
|
-
*/
|
196
|
-
onDisabledChange(v) {
|
197
|
-
if (v && this._active) {
|
198
|
-
this._active = false;
|
199
|
-
this._onDeactivated();
|
200
|
-
}
|
201
|
-
}
|
202
|
-
/**
|
203
|
-
* Method to change active state internally and emit the [activated] event if 'true' or [deactivated]
|
204
|
-
* event if 'false'. (Blocked if [disabled] is 'true')
|
205
|
-
* returns true if successfully changed state
|
206
|
-
* @private
|
207
|
-
* @param {?} newActive
|
208
|
-
* @return {?}
|
209
|
-
*/
|
210
|
-
_setActive(newActive) {
|
211
|
-
if (this.disabled) {
|
212
|
-
return false;
|
213
|
-
}
|
214
|
-
if (this._active !== newActive) {
|
215
|
-
this._active = newActive;
|
216
|
-
if (newActive) {
|
217
|
-
this._onActivated();
|
218
|
-
}
|
219
|
-
else {
|
220
|
-
this._onDeactivated();
|
221
|
-
}
|
222
|
-
return true;
|
223
|
-
}
|
224
|
-
return false;
|
225
|
-
}
|
226
|
-
/**
|
227
|
-
* @private
|
228
|
-
* @return {?}
|
229
|
-
*/
|
230
|
-
_onActivated() {
|
231
|
-
this.activated.emit();
|
232
|
-
}
|
233
|
-
/**
|
234
|
-
* @private
|
235
|
-
* @return {?}
|
236
|
-
*/
|
237
|
-
_onDeactivated() {
|
238
|
-
this.deactivated.emit();
|
239
|
-
}
|
240
|
-
}
|
241
|
-
TdStepComponent.decorators = [
|
242
|
-
{ type: Component, args: [{
|
243
|
-
selector: 'td-step',
|
244
|
-
inputs: ['disabled', 'disableRipple'],
|
245
|
-
template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n"
|
246
|
-
}] }
|
247
|
-
];
|
248
|
-
/** @nocollapse */
|
249
|
-
TdStepComponent.ctorParameters = () => [
|
250
|
-
{ type: ViewContainerRef }
|
251
|
-
];
|
252
|
-
TdStepComponent.propDecorators = {
|
253
|
-
_content: [{ type: ViewChild, args: [TemplateRef, { static: true },] }],
|
254
|
-
stepLabel: [{ type: ContentChild, args: [TdStepLabelDirective,] }],
|
255
|
-
stepActions: [{ type: ContentChild, args: [TdStepActionsDirective,] }],
|
256
|
-
stepSummary: [{ type: ContentChild, args: [TdStepSummaryDirective,] }],
|
257
|
-
label: [{ type: Input }],
|
258
|
-
sublabel: [{ type: Input }],
|
259
|
-
active: [{ type: Input, args: ['active',] }],
|
260
|
-
state: [{ type: Input, args: ['state',] }],
|
261
|
-
activated: [{ type: Output }],
|
262
|
-
deactivated: [{ type: Output }]
|
263
|
-
};
|
264
|
-
if (false) {
|
265
|
-
/**
|
266
|
-
* @type {?}
|
267
|
-
* @private
|
268
|
-
*/
|
269
|
-
TdStepComponent.prototype._active;
|
270
|
-
/**
|
271
|
-
* @type {?}
|
272
|
-
* @private
|
273
|
-
*/
|
274
|
-
TdStepComponent.prototype._state;
|
275
|
-
/**
|
276
|
-
* @type {?}
|
277
|
-
* @private
|
278
|
-
*/
|
279
|
-
TdStepComponent.prototype._contentPortal;
|
280
|
-
/** @type {?} */
|
281
|
-
TdStepComponent.prototype._content;
|
282
|
-
/** @type {?} */
|
283
|
-
TdStepComponent.prototype.stepLabel;
|
284
|
-
/** @type {?} */
|
285
|
-
TdStepComponent.prototype.stepActions;
|
286
|
-
/** @type {?} */
|
287
|
-
TdStepComponent.prototype.stepSummary;
|
288
|
-
/**
|
289
|
-
* label?: string
|
290
|
-
* Sets label of [TdStepComponent] header.
|
291
|
-
* Defaults to 'Step #'
|
292
|
-
* @type {?}
|
293
|
-
*/
|
294
|
-
TdStepComponent.prototype.label;
|
295
|
-
/**
|
296
|
-
* sublabel?: string
|
297
|
-
* Sets sublabel of [TdStepComponent] header.
|
298
|
-
* @type {?}
|
299
|
-
*/
|
300
|
-
TdStepComponent.prototype.sublabel;
|
301
|
-
/**
|
302
|
-
* activated?: function
|
303
|
-
* Event emitted when [TdStepComponent] is activated.
|
304
|
-
* @type {?}
|
305
|
-
*/
|
306
|
-
TdStepComponent.prototype.activated;
|
307
|
-
/**
|
308
|
-
* deactivated?: function
|
309
|
-
* Event emitted when [TdStepComponent] is deactivated.
|
310
|
-
* @type {?}
|
311
|
-
*/
|
312
|
-
TdStepComponent.prototype.deactivated;
|
313
|
-
/**
|
314
|
-
* @type {?}
|
315
|
-
* @private
|
316
|
-
*/
|
317
|
-
TdStepComponent.prototype._viewContainerRef;
|
318
|
-
}
|
319
|
-
|
320
|
-
/**
|
321
|
-
* @fileoverview added by tsickle
|
322
|
-
* Generated from: steps.component.ts
|
323
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
324
|
-
*/
|
325
|
-
/**
|
326
|
-
* @record
|
327
|
-
*/
|
328
|
-
function IStepChangeEvent() { }
|
329
|
-
if (false) {
|
330
|
-
/** @type {?} */
|
331
|
-
IStepChangeEvent.prototype.newStep;
|
332
|
-
/** @type {?} */
|
333
|
-
IStepChangeEvent.prototype.prevStep;
|
334
|
-
}
|
335
|
-
/** @enum {string} */
|
336
|
-
const StepMode = {
|
337
|
-
Vertical: "vertical",
|
338
|
-
Horizontal: "horizontal",
|
339
|
-
};
|
340
|
-
class TdStepsComponent {
|
341
|
-
constructor() {
|
342
|
-
this._mode = StepMode.Vertical;
|
343
|
-
/**
|
344
|
-
* stepChange?: function
|
345
|
-
* Method to be executed when [stepChange] event is emitted.
|
346
|
-
* Emits an [IStepChangeEvent] implemented object.
|
347
|
-
*/
|
348
|
-
this.stepChange = new EventEmitter();
|
349
|
-
}
|
350
|
-
/**
|
351
|
-
* @param {?} steps
|
352
|
-
* @return {?}
|
353
|
-
*/
|
354
|
-
set stepsContent(steps) {
|
355
|
-
if (steps) {
|
356
|
-
this._steps = steps;
|
357
|
-
this._registerSteps();
|
358
|
-
}
|
359
|
-
}
|
360
|
-
/**
|
361
|
-
* @return {?}
|
362
|
-
*/
|
363
|
-
get steps() {
|
364
|
-
return this._steps.toArray();
|
365
|
-
}
|
366
|
-
/**
|
367
|
-
* mode?: StepMode or ["vertical" | "horizontal"]
|
368
|
-
* Defines if the mode of the [TdStepsComponent]. Defaults to [StepMode.Vertical | "vertical"]
|
369
|
-
* @param {?} mode
|
370
|
-
* @return {?}
|
371
|
-
*/
|
372
|
-
set mode(mode) {
|
373
|
-
if (mode === StepMode.Horizontal) {
|
374
|
-
this._mode = StepMode.Horizontal;
|
375
|
-
}
|
376
|
-
else {
|
377
|
-
this._mode = StepMode.Vertical;
|
378
|
-
}
|
379
|
-
}
|
380
|
-
/**
|
381
|
-
* @return {?}
|
382
|
-
*/
|
383
|
-
get mode() {
|
384
|
-
return this._mode;
|
385
|
-
}
|
386
|
-
/**
|
387
|
-
* Executed after content is initialized, loops through any [TdStepComponent] children elements,
|
388
|
-
* assigns them a number and subscribes as an observer to their [activated] event.
|
389
|
-
* @return {?}
|
390
|
-
*/
|
391
|
-
ngAfterContentInit() {
|
392
|
-
this._registerSteps();
|
393
|
-
}
|
394
|
-
/**
|
395
|
-
* Unsubscribes from [TdStepComponent] children elements when component is destroyed.
|
396
|
-
* @return {?}
|
397
|
-
*/
|
398
|
-
ngOnDestroy() {
|
399
|
-
this._deregisterSteps();
|
400
|
-
}
|
401
|
-
/**
|
402
|
-
* Returns 'true' if [mode] equals to [StepMode.Horizontal | 'horizontal'], else 'false'.
|
403
|
-
* @return {?}
|
404
|
-
*/
|
405
|
-
isHorizontal() {
|
406
|
-
return this._mode === StepMode.Horizontal;
|
407
|
-
}
|
408
|
-
/**
|
409
|
-
* Returns 'true' if [mode] equals to [StepMode.Vertical | 'vertical'], else 'false'.
|
410
|
-
* @return {?}
|
411
|
-
*/
|
412
|
-
isVertical() {
|
413
|
-
return this._mode === StepMode.Vertical;
|
414
|
-
}
|
415
|
-
/**
|
416
|
-
* @return {?}
|
417
|
-
*/
|
418
|
-
areStepsActive() {
|
419
|
-
return (this._steps.filter((/**
|
420
|
-
* @param {?} step
|
421
|
-
* @return {?}
|
422
|
-
*/
|
423
|
-
(step) => {
|
424
|
-
return step.active;
|
425
|
-
})).length > 0);
|
426
|
-
}
|
427
|
-
/**
|
428
|
-
* Wraps previous and new [TdStepComponent] numbers in an object that implements [IStepChangeEvent]
|
429
|
-
* and emits [stepChange] event.
|
430
|
-
* @private
|
431
|
-
* @param {?} step
|
432
|
-
* @return {?}
|
433
|
-
*/
|
434
|
-
_onStepSelection(step) {
|
435
|
-
if (this.prevStep !== step) {
|
436
|
-
/** @type {?} */
|
437
|
-
const prevStep = this.prevStep;
|
438
|
-
this.prevStep = step;
|
439
|
-
/** @type {?} */
|
440
|
-
const event = {
|
441
|
-
newStep: step,
|
442
|
-
prevStep,
|
443
|
-
};
|
444
|
-
this._deactivateAllBut(step);
|
445
|
-
this.stepChange.emit(event);
|
446
|
-
}
|
447
|
-
}
|
448
|
-
/**
|
449
|
-
* Loops through [TdStepComponent] children elements and deactivates them ignoring the one passed as an argument.
|
450
|
-
* @private
|
451
|
-
* @param {?} activeStep
|
452
|
-
* @return {?}
|
453
|
-
*/
|
454
|
-
_deactivateAllBut(activeStep) {
|
455
|
-
this._steps
|
456
|
-
.filter((/**
|
457
|
-
* @param {?} step
|
458
|
-
* @return {?}
|
459
|
-
*/
|
460
|
-
(step) => step !== activeStep))
|
461
|
-
.forEach((/**
|
462
|
-
* @param {?} step
|
463
|
-
* @return {?}
|
464
|
-
*/
|
465
|
-
(step) => {
|
466
|
-
step.active = false;
|
467
|
-
}));
|
468
|
-
}
|
469
|
-
/**
|
470
|
-
* @private
|
471
|
-
* @return {?}
|
472
|
-
*/
|
473
|
-
_registerSteps() {
|
474
|
-
this._subcriptions = [];
|
475
|
-
this._steps.toArray().forEach((/**
|
476
|
-
* @param {?} step
|
477
|
-
* @return {?}
|
478
|
-
*/
|
479
|
-
(step) => {
|
480
|
-
/** @type {?} */
|
481
|
-
const subscription = step.activated.asObservable().subscribe((/**
|
482
|
-
* @return {?}
|
483
|
-
*/
|
484
|
-
() => {
|
485
|
-
this._onStepSelection(step);
|
486
|
-
}));
|
487
|
-
this._subcriptions.push(subscription);
|
488
|
-
}));
|
489
|
-
}
|
490
|
-
/**
|
491
|
-
* @private
|
492
|
-
* @return {?}
|
493
|
-
*/
|
494
|
-
_deregisterSteps() {
|
495
|
-
if (this._subcriptions) {
|
496
|
-
this._subcriptions.forEach((/**
|
497
|
-
* @param {?} subs
|
498
|
-
* @return {?}
|
499
|
-
*/
|
500
|
-
(subs) => {
|
501
|
-
subs.unsubscribe();
|
502
|
-
}));
|
503
|
-
this._subcriptions = undefined;
|
504
|
-
}
|
505
|
-
}
|
506
|
-
}
|
507
|
-
TdStepsComponent.decorators = [
|
508
|
-
{ type: Component, args: [{
|
509
|
-
selector: 'td-steps',
|
510
|
-
template: "<div *ngIf=\"isHorizontal()\" class=\"td-steps-header\">\n <ng-template let-step let-index=\"index\" let-last=\"last\" ngFor [ngForOf]=\"steps\">\n <td-step-header\n class=\"td-step-horizontal-header\"\n (keydown.enter)=\"step.open()\"\n [number]=\"index + 1\"\n [active]=\"step.active\"\n [disableRipple]=\"step.disableRipple\"\n [disabled]=\"step.disabled\"\n [state]=\"step.state\"\n (click)=\"step.open()\"\n >\n <ng-template td-step-header-label [cdkPortalOutlet]=\"step.stepLabel\"></ng-template>\n <ng-template td-step-header-label [ngIf]=\"!step.stepLabel\">{{ step.label }}</ng-template>\n <ng-template td-step-header-sublabel [ngIf]=\"true\">{{ step.sublabel | truncate: 30 }}</ng-template>\n </td-step-header>\n <span *ngIf=\"!last\" class=\"td-horizontal-line\"></span>\n </ng-template>\n</div>\n<div *ngFor=\"let step of steps; let index = index; let last = last\" class=\"td-step\">\n <td-step-header\n class=\"td-step-vertical-header\"\n (keydown.enter)=\"step.toggle()\"\n [number]=\"index + 1\"\n [active]=\"step.active\"\n [disabled]=\"step.disabled\"\n [disableRipple]=\"step.disableRipple\"\n [state]=\"step.state\"\n (click)=\"step.toggle()\"\n *ngIf=\"isVertical()\"\n >\n <ng-template td-step-header-label [cdkPortalOutlet]=\"step.stepLabel\"></ng-template>\n <ng-template td-step-header-label [ngIf]=\"!step.stepLabel\">{{ step.label }}</ng-template>\n <ng-template td-step-header-sublabel [ngIf]=\"true\">{{ step.sublabel }}</ng-template>\n </td-step-header>\n <ng-template [ngIf]=\"isVertical() || step.active || (!areStepsActive() && prevStep === step)\">\n <td-step-body [active]=\"step.active\" [state]=\"step.state\">\n <div *ngIf=\"isVertical()\" class=\"td-line-wrapper\">\n <div *ngIf=\"!last\" class=\"td-vertical-line\"></div>\n </div>\n <ng-template td-step-body-content [cdkPortalOutlet]=\"step.stepContent\"></ng-template>\n <ng-template td-step-body-actions [cdkPortalOutlet]=\"step.stepActions\"></ng-template>\n <ng-template td-step-body-summary [cdkPortalOutlet]=\"step.stepSummary\"></ng-template>\n </td-step-body>\n </ng-template>\n</div>\n",
|
511
|
-
/* tslint:disable-next-line */
|
512
|
-
host: {
|
513
|
-
class: 'td-steps',
|
514
|
-
},
|
515
|
-
styles: [".td-line-wrapper,.td-step{position:relative}.td-steps-header{-ms-flex-direction:row;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row}.td-line-wrapper{min-height:1px;width:24px}.td-horizontal-line{-ms-flex:1;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;flex:1;height:1px;min-width:15px;position:relative;top:36px}::ng-deep :not([dir=rtl]) .td-horizontal-line{left:-6px;right:-3px}::ng-deep [dir=rtl] .td-horizontal-line{left:-3px;right:-6px}.td-vertical-line{border-left-style:solid;border-left-width:1px;bottom:-16px;position:absolute;top:-16px}::ng-deep :not([dir=rtl]) .td-vertical-line{left:20px;right:auto}::ng-deep [dir=rtl] .td-vertical-line{left:auto;right:20px}"]
|
516
|
-
}] }
|
517
|
-
];
|
518
|
-
TdStepsComponent.propDecorators = {
|
519
|
-
stepsContent: [{ type: ContentChildren, args: [TdStepComponent, { descendants: true },] }],
|
520
|
-
mode: [{ type: Input, args: ['mode',] }],
|
521
|
-
stepChange: [{ type: Output }]
|
522
|
-
};
|
523
|
-
if (false) {
|
524
|
-
/**
|
525
|
-
* @type {?}
|
526
|
-
* @private
|
527
|
-
*/
|
528
|
-
TdStepsComponent.prototype._subcriptions;
|
529
|
-
/**
|
530
|
-
* @type {?}
|
531
|
-
* @private
|
532
|
-
*/
|
533
|
-
TdStepsComponent.prototype._mode;
|
534
|
-
/**
|
535
|
-
* @type {?}
|
536
|
-
* @private
|
537
|
-
*/
|
538
|
-
TdStepsComponent.prototype._steps;
|
539
|
-
/** @type {?} */
|
540
|
-
TdStepsComponent.prototype.prevStep;
|
541
|
-
/**
|
542
|
-
* stepChange?: function
|
543
|
-
* Method to be executed when [stepChange] event is emitted.
|
544
|
-
* Emits an [IStepChangeEvent] implemented object.
|
545
|
-
* @type {?}
|
546
|
-
*/
|
547
|
-
TdStepsComponent.prototype.stepChange;
|
548
|
-
}
|
549
|
-
|
550
|
-
/**
|
551
|
-
* @fileoverview added by tsickle
|
552
|
-
* Generated from: step-header/step-header.component.ts
|
553
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
554
|
-
*/
|
555
|
-
class TdStepHeaderBase {
|
556
|
-
}
|
557
|
-
/* tslint:disable-next-line */
|
558
|
-
/** @type {?} */
|
559
|
-
const _TdStepHeaderMixinBase = mixinDisableRipple(mixinDisabled(TdStepHeaderBase));
|
560
|
-
class TdStepHeaderComponent extends _TdStepHeaderMixinBase {
|
561
|
-
constructor() {
|
562
|
-
super(...arguments);
|
563
|
-
/**
|
564
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
565
|
-
* Sets styles for state of header.
|
566
|
-
* Defaults to [StepState.None | 'none'].
|
567
|
-
*/
|
568
|
-
this.state = StepState.None;
|
569
|
-
}
|
570
|
-
/**
|
571
|
-
* Returns 'true' if [state] equals to [StepState.Complete | 'complete'], else 'false'.
|
572
|
-
* @return {?}
|
573
|
-
*/
|
574
|
-
isComplete() {
|
575
|
-
return this.state === StepState.Complete;
|
576
|
-
}
|
577
|
-
/**
|
578
|
-
* Returns 'true' if [state] equals to [StepState.Required | 'required'], else 'false'.
|
579
|
-
* @return {?}
|
580
|
-
*/
|
581
|
-
isRequired() {
|
582
|
-
return this.state === StepState.Required;
|
583
|
-
}
|
584
|
-
}
|
585
|
-
TdStepHeaderComponent.decorators = [
|
586
|
-
{ type: Component, args: [{
|
587
|
-
selector: 'td-step-header',
|
588
|
-
inputs: ['disabled', 'disableRipple'],
|
589
|
-
template: "<div\n class=\"td-step-header\"\n [class.mat-disabled]=\"disabled\"\n matRipple\n [matRippleDisabled]=\"disabled || disableRipple\"\n [tabIndex]=\"disabled ? -1 : tabIndex || 0\"\n>\n <div\n class=\"td-circle\"\n [class.mat-inactive]=\"(!active && !isComplete()) || disabled\"\n [class.mat-active]=\"active && !disabled\"\n *ngIf=\"!isRequired() && !isComplete()\"\n >\n <span *ngIf=\"active || !isComplete()\">{{ number || '' }}</span>\n </div>\n <div class=\"td-complete\" *ngIf=\"isComplete()\">\n <mat-icon class=\"mat-complete\">check_circle</mat-icon>\n </div>\n <div class=\"td-triangle\" [class.bg-muted]=\"disabled\" *ngIf=\"isRequired()\">\n <mat-icon class=\"mat-warn\">warning</mat-icon>\n </div>\n <div\n class=\"td-step-label-wrapper\"\n [class.mat-inactive]=\"(!active && !isComplete()) || disabled\"\n [class.mat-warn]=\"isRequired() && !disabled\"\n >\n <div class=\"td-step-label\">\n <ng-content select=\"[td-step-header-label]\"></ng-content>\n </div>\n <div class=\"td-step-sublabel\">\n <ng-content select=\"[td-step-header-sublabel]\"></ng-content>\n </div>\n </div>\n <span class=\"td-step-header-separator\"></span>\n <mat-icon class=\"td-edit-icon\" *ngIf=\"isComplete() && !active && !disabled\">mode_edit</mat-icon>\n</div>\n",
|
590
|
-
styles: [".td-step-header{-ms-flex:1;-ms-flex-align:center;-ms-flex-direction:row;-ms-flex-line-pack:center;-ms-flex-pack:start;align-content:center;align-items:center;box-sizing:border-box;display:-ms-flexbox;display:flex;flex:1;flex-direction:row;height:72px;justify-content:flex-start;max-width:100%;min-width:120px;outline:none;position:relative}.td-step-header:hover:not(.mat-disabled){cursor:pointer}.td-step-header mat-icon.td-edit-icon{margin:0 8px}.td-step-header mat-icon.mat-warn{font-size:24px;height:24px;width:24px}.td-step-header mat-icon.mat-complete{font-size:28px;height:24px;left:-2px;position:relative;top:2px;width:24px}.td-step-header .td-circle{-ms-flex:none;border-radius:99%;flex:none;height:24px;line-height:24px;text-align:center;width:24px}.td-step-header .td-circle mat-icon{font-weight:700;margin-top:2px}.td-step-header .td-triangle>mat-icon{font-size:25px}.td-step-header .td-complete{font-size:0}::ng-deep :not([dir=rtl]) .td-step-header .td-circle,::ng-deep :not([dir=rtl]) .td-step-header .td-complete,::ng-deep :not([dir=rtl]) .td-step-header .td-triangle{margin-left:8px;margin-right:0}::ng-deep [dir=rtl] .td-step-header .td-circle,::ng-deep [dir=rtl] .td-step-header .td-complete,::ng-deep [dir=rtl] .td-step-header .td-triangle{margin-left:0;margin-right:8px}.td-step-header .td-circle,.td-step-header .td-complete{font-size:14px}.td-step-header .td-step-label-wrapper{padding-left:8px;padding-right:8px}.td-step-header .td-step-header-separator{-ms-flex:1;box-sizing:border-box;flex:1}"]
|
591
|
-
}] }
|
592
|
-
];
|
593
|
-
TdStepHeaderComponent.propDecorators = {
|
594
|
-
number: [{ type: Input }],
|
595
|
-
active: [{ type: Input }],
|
596
|
-
state: [{ type: Input }],
|
597
|
-
tabIndex: [{ type: Input }]
|
598
|
-
};
|
599
|
-
if (false) {
|
600
|
-
/**
|
601
|
-
* Number assigned to [TdStepHeaderComponent].
|
602
|
-
* @type {?}
|
603
|
-
*/
|
604
|
-
TdStepHeaderComponent.prototype.number;
|
605
|
-
/**
|
606
|
-
* active?: boolean
|
607
|
-
* Sets for active/inactive states on header.
|
608
|
-
* @type {?}
|
609
|
-
*/
|
610
|
-
TdStepHeaderComponent.prototype.active;
|
611
|
-
/**
|
612
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
613
|
-
* Sets styles for state of header.
|
614
|
-
* Defaults to [StepState.None | 'none'].
|
615
|
-
* @type {?}
|
616
|
-
*/
|
617
|
-
TdStepHeaderComponent.prototype.state;
|
618
|
-
/**
|
619
|
-
* tabIndex?: number
|
620
|
-
* tabIndex of the step header for a11y
|
621
|
-
* @type {?}
|
622
|
-
*/
|
623
|
-
TdStepHeaderComponent.prototype.tabIndex;
|
624
|
-
}
|
625
|
-
|
626
|
-
/**
|
627
|
-
* @fileoverview added by tsickle
|
628
|
-
* Generated from: step-body/step-body.component.ts
|
629
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
630
|
-
*/
|
631
|
-
class TdStepBodyComponent {
|
632
|
-
constructor() {
|
633
|
-
/**
|
634
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
635
|
-
* Sets styles for state of body.
|
636
|
-
* Defaults to [StepState.None | 'none'].
|
637
|
-
*/
|
638
|
-
this.state = StepState.None;
|
639
|
-
}
|
640
|
-
/**
|
641
|
-
* @return {?}
|
642
|
-
*/
|
643
|
-
get hasContent() {
|
644
|
-
return (this.contentRef &&
|
645
|
-
(this.contentRef.nativeElement.children.length > 0 || !!this.contentRef.nativeElement.textContent.trim()));
|
646
|
-
}
|
647
|
-
/**
|
648
|
-
* @return {?}
|
649
|
-
*/
|
650
|
-
get hasActions() {
|
651
|
-
return (this.actionsRef &&
|
652
|
-
(this.actionsRef.nativeElement.children.length > 0 || !!this.actionsRef.nativeElement.textContent.trim()));
|
653
|
-
}
|
654
|
-
/**
|
655
|
-
* @return {?}
|
656
|
-
*/
|
657
|
-
get hasSummary() {
|
658
|
-
return (this.summaryRef &&
|
659
|
-
(this.summaryRef.nativeElement.children.length > 0 || !!this.summaryRef.nativeElement.textContent.trim()));
|
660
|
-
}
|
661
|
-
/**
|
662
|
-
* Returns 'true' if [state] equals to [StepState.Complete | 'complete'], else 'false'.
|
663
|
-
* @return {?}
|
664
|
-
*/
|
665
|
-
isComplete() {
|
666
|
-
return this.state === StepState.Complete;
|
667
|
-
}
|
668
|
-
}
|
669
|
-
TdStepBodyComponent.decorators = [
|
670
|
-
{ type: Component, args: [{
|
671
|
-
selector: 'td-step-body',
|
672
|
-
template: "<ng-content></ng-content>\n<div class=\"td-step-body\">\n <div class=\"td-step-content-wrapper\" [@tdCollapse]=\"!active\">\n <div #contentRef cdkScrollable [class.td-step-content]=\"hasContent\">\n <ng-content select=\"[td-step-body-content]\"></ng-content>\n </div>\n <div #actionsRef [class.td-step-actions]=\"hasActions\">\n <ng-content select=\"[td-step-body-actions]\"></ng-content>\n </div>\n </div>\n <div #summaryRef [@tdCollapse]=\"active || !isComplete()\" [class.td-step-summary]=\"hasSummary\">\n <ng-content select=\"[td-step-body-summary]\"></ng-content>\n </div>\n</div>\n",
|
673
|
-
animations: [tdCollapseAnimation],
|
674
|
-
styles: [":host{-ms-flex-direction:row;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row}:host .td-step-body{-ms-flex:1;box-sizing:border-box;flex:1;overflow-x:hidden}:host .td-step-body .td-step-content-wrapper.ng-animating,:host .td-step-body .td-step-summary.ng-animating{overflow:hidden}:host .td-step-body .td-step-content{overflow-x:auto}:host .td-step-body .td-step-actions{-ms-flex-direction:row;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row}"]
|
675
|
-
}] }
|
676
|
-
];
|
677
|
-
TdStepBodyComponent.propDecorators = {
|
678
|
-
contentRef: [{ type: ViewChild, args: ['contentRef', { read: ElementRef, static: true },] }],
|
679
|
-
actionsRef: [{ type: ViewChild, args: ['actionsRef', { read: ElementRef, static: true },] }],
|
680
|
-
summaryRef: [{ type: ViewChild, args: ['summaryRef', { read: ElementRef, static: true },] }],
|
681
|
-
active: [{ type: Input }],
|
682
|
-
state: [{ type: Input }]
|
683
|
-
};
|
684
|
-
if (false) {
|
685
|
-
/** @type {?} */
|
686
|
-
TdStepBodyComponent.prototype.contentRef;
|
687
|
-
/** @type {?} */
|
688
|
-
TdStepBodyComponent.prototype.actionsRef;
|
689
|
-
/** @type {?} */
|
690
|
-
TdStepBodyComponent.prototype.summaryRef;
|
691
|
-
/**
|
692
|
-
* active?: boolean
|
693
|
-
* Sets for active/inactive states on body.
|
694
|
-
* @type {?}
|
695
|
-
*/
|
696
|
-
TdStepBodyComponent.prototype.active;
|
697
|
-
/**
|
698
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
699
|
-
* Sets styles for state of body.
|
700
|
-
* Defaults to [StepState.None | 'none'].
|
701
|
-
* @type {?}
|
702
|
-
*/
|
703
|
-
TdStepBodyComponent.prototype.state;
|
704
|
-
}
|
705
|
-
|
706
|
-
/**
|
707
|
-
* @fileoverview added by tsickle
|
708
|
-
* Generated from: nav/nav-step-link/nav-step-link.component.ts
|
709
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
710
|
-
*/
|
711
|
-
class TdNavStepLinkComponent extends _TdStepMixinBase {
|
712
|
-
/**
|
713
|
-
* @param {?} _changeDetectorRef
|
714
|
-
* @param {?} elementRef
|
715
|
-
*/
|
716
|
-
constructor(_changeDetectorRef, elementRef) {
|
717
|
-
super();
|
718
|
-
this._changeDetectorRef = _changeDetectorRef;
|
719
|
-
this.elementRef = elementRef;
|
720
|
-
this._active = false;
|
721
|
-
this._state = StepState.None;
|
722
|
-
}
|
723
|
-
/**
|
724
|
-
* state?: StepState or ['none' | 'required' | 'complete']
|
725
|
-
* Sets state of component depending on value.
|
726
|
-
* Defaults to [StepState.None | 'none'].
|
727
|
-
* @param {?} state
|
728
|
-
* @return {?}
|
729
|
-
*/
|
730
|
-
set state(state) {
|
731
|
-
switch (state) {
|
732
|
-
case StepState.Complete:
|
733
|
-
this._state = StepState.Complete;
|
734
|
-
break;
|
735
|
-
case StepState.Required:
|
736
|
-
this._state = StepState.Required;
|
737
|
-
break;
|
738
|
-
default:
|
739
|
-
this._state = StepState.None;
|
740
|
-
break;
|
741
|
-
}
|
742
|
-
}
|
743
|
-
/**
|
744
|
-
* @return {?}
|
745
|
-
*/
|
746
|
-
get state() {
|
747
|
-
return this._state;
|
748
|
-
}
|
749
|
-
/**
|
750
|
-
* active?: boolean
|
751
|
-
* Toggles component between active/deactive.
|
752
|
-
* @param {?} active
|
753
|
-
* @return {?}
|
754
|
-
*/
|
755
|
-
set active(active) {
|
756
|
-
this._active = coerceBooleanProperty(active);
|
757
|
-
this._changeDetectorRef.markForCheck();
|
758
|
-
}
|
759
|
-
/**
|
760
|
-
* @return {?}
|
761
|
-
*/
|
762
|
-
get active() {
|
763
|
-
return this._active;
|
764
|
-
}
|
765
|
-
/**
|
766
|
-
* @param {?} click
|
767
|
-
* @return {?}
|
768
|
-
*/
|
769
|
-
_handleClick(click) {
|
770
|
-
if (this.disabled) {
|
771
|
-
click.preventDefault();
|
772
|
-
click.stopImmediatePropagation();
|
773
|
-
}
|
774
|
-
}
|
775
|
-
}
|
776
|
-
TdNavStepLinkComponent.decorators = [
|
777
|
-
{ type: Component, args: [{
|
778
|
-
selector: '[td-step-link],[tdStepLink]',
|
779
|
-
template: "<td-step-header\n class=\"td-step-header-wrapper\"\n [tabIndex]=\"-1\"\n [number]=\"number\"\n [active]=\"active\"\n [disableRipple]=\"disableRipple || disabled\"\n [disabled]=\"disabled\"\n [state]=\"state\"\n>\n <ng-template td-step-header-label [ngIf]=\"true\">{{ label }}</ng-template>\n <ng-template td-step-header-sublabel [ngIf]=\"true\">{{ sublabel | truncate: 30 }}</ng-template>\n <ng-content></ng-content>\n</td-step-header>\n",
|
780
|
-
inputs: ['disabled', 'disableRipple'],
|
781
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
782
|
-
/* tslint:disable-next-line */
|
783
|
-
host: {
|
784
|
-
'[class.td-step-link]': 'true',
|
785
|
-
'[attr.tabindex]': 'disabled ? -1 : (tabIndex || 0)',
|
786
|
-
'[attr.disabled]': 'disabled || null',
|
787
|
-
'[class.mat-disabled]': 'disabled || null',
|
788
|
-
'(click)': '_handleClick($event)',
|
789
|
-
},
|
790
|
-
styles: [":host{-ms-flex-align:center;-ms-flex-direction:row;-ms-flex-line-pack:center;-ms-flex-pack:start;align-content:center;align-items:center;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row;justify-content:flex-start;max-width:100%}:host.mat-disabled{pointer-events:none}:host .td-step-header-wrapper{width:100%}"]
|
791
|
-
}] }
|
792
|
-
];
|
793
|
-
/** @nocollapse */
|
794
|
-
TdNavStepLinkComponent.ctorParameters = () => [
|
795
|
-
{ type: ChangeDetectorRef },
|
796
|
-
{ type: ElementRef }
|
797
|
-
];
|
798
|
-
TdNavStepLinkComponent.propDecorators = {
|
799
|
-
state: [{ type: Input, args: ['state',] }],
|
800
|
-
label: [{ type: Input }],
|
801
|
-
sublabel: [{ type: Input }],
|
802
|
-
active: [{ type: Input, args: ['active',] }],
|
803
|
-
tabIndex: [{ type: Input }]
|
804
|
-
};
|
805
|
-
if (false) {
|
806
|
-
/**
|
807
|
-
* @type {?}
|
808
|
-
* @private
|
809
|
-
*/
|
810
|
-
TdNavStepLinkComponent.prototype._active;
|
811
|
-
/**
|
812
|
-
* @type {?}
|
813
|
-
* @private
|
814
|
-
*/
|
815
|
-
TdNavStepLinkComponent.prototype._state;
|
816
|
-
/** @type {?} */
|
817
|
-
TdNavStepLinkComponent.prototype.number;
|
818
|
-
/**
|
819
|
-
* label?: string
|
820
|
-
* Label to display in step header
|
821
|
-
* Defaults to empty
|
822
|
-
* @type {?}
|
823
|
-
*/
|
824
|
-
TdNavStepLinkComponent.prototype.label;
|
825
|
-
/**
|
826
|
-
* sublabel?: string
|
827
|
-
* Sublabel to display in step header
|
828
|
-
* Defaults to empty
|
829
|
-
* @type {?}
|
830
|
-
*/
|
831
|
-
TdNavStepLinkComponent.prototype.sublabel;
|
832
|
-
/**
|
833
|
-
* tabIndex?: number
|
834
|
-
* tabIndex for component
|
835
|
-
* @type {?}
|
836
|
-
*/
|
837
|
-
TdNavStepLinkComponent.prototype.tabIndex;
|
838
|
-
/**
|
839
|
-
* @type {?}
|
840
|
-
* @private
|
841
|
-
*/
|
842
|
-
TdNavStepLinkComponent.prototype._changeDetectorRef;
|
843
|
-
/** @type {?} */
|
844
|
-
TdNavStepLinkComponent.prototype.elementRef;
|
845
|
-
}
|
846
|
-
|
847
|
-
/**
|
848
|
-
* @fileoverview added by tsickle
|
849
|
-
* Generated from: nav/nav-steps-horizontal/nav-steps-horizontal.component.ts
|
850
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
851
|
-
*/
|
852
|
-
class TdNavStepsHorizontalComponent {
|
853
|
-
/**
|
854
|
-
* @param {?} _elementRef
|
855
|
-
* @param {?} _viewportRuler
|
856
|
-
* @param {?} _dir
|
857
|
-
* @param {?} _renderer
|
858
|
-
* @param {?} _changeDetectorRef
|
859
|
-
*/
|
860
|
-
constructor(_elementRef, _viewportRuler, _dir, _renderer, _changeDetectorRef) {
|
861
|
-
this._elementRef = _elementRef;
|
862
|
-
this._viewportRuler = _viewportRuler;
|
863
|
-
this._dir = _dir;
|
864
|
-
this._renderer = _renderer;
|
865
|
-
this._changeDetectorRef = _changeDetectorRef;
|
866
|
-
this._separators = [];
|
867
|
-
/**
|
868
|
-
* Emits when the component is destroyed.
|
869
|
-
*/
|
870
|
-
this._destroyed = new Subject();
|
871
|
-
this._widthSubject = new Subject();
|
872
|
-
this._scrollDistance = 0;
|
873
|
-
this._scrollDistanceChanged = false;
|
874
|
-
/**
|
875
|
-
* Whether the controls for pagination should be displayed
|
876
|
-
*/
|
877
|
-
this._showPaginationControls = false;
|
878
|
-
/**
|
879
|
-
* Whether the step list can be scrolled more towards the end.
|
880
|
-
*/
|
881
|
-
this._disableScrollAfter = true;
|
882
|
-
/**
|
883
|
-
* Whether the step list can be scrolled more towards the beginning.
|
884
|
-
*/
|
885
|
-
this._disableScrollBefore = true;
|
886
|
-
}
|
887
|
-
/*
|
888
|
-
* Current width of the element container
|
889
|
-
*/
|
890
|
-
/**
|
891
|
-
* @return {?}
|
892
|
-
*/
|
893
|
-
get nativeElementWidth() {
|
894
|
-
/** @type {?} */
|
895
|
-
const element = (/** @type {?} */ (this._elementRef.nativeElement));
|
896
|
-
// Need to take into account border, margin and padding that might be around all the crumbs
|
897
|
-
/** @type {?} */
|
898
|
-
const style = window.getComputedStyle(element);
|
899
|
-
/** @type {?} */
|
900
|
-
const borderLeft = parseInt(style.borderLeft, 10);
|
901
|
-
/** @type {?} */
|
902
|
-
const borderRight = parseInt(style.borderRight, 10);
|
903
|
-
/** @type {?} */
|
904
|
-
const marginLeft = parseInt(style.marginLeft, 10);
|
905
|
-
/** @type {?} */
|
906
|
-
const marginRight = parseInt(style.marginRight, 10);
|
907
|
-
/** @type {?} */
|
908
|
-
const paddingLeft = parseInt(style.paddingLeft, 10);
|
909
|
-
/** @type {?} */
|
910
|
-
const paddingRight = parseInt(style.paddingRight, 10);
|
911
|
-
return (element.getBoundingClientRect().width -
|
912
|
-
borderLeft -
|
913
|
-
borderRight -
|
914
|
-
marginLeft -
|
915
|
-
marginRight -
|
916
|
-
paddingLeft -
|
917
|
-
paddingRight);
|
918
|
-
}
|
919
|
-
/**
|
920
|
-
* @return {?}
|
921
|
-
*/
|
922
|
-
ngAfterContentInit() {
|
923
|
-
merge(this._widthSubject.asObservable().pipe(distinctUntilChanged()), this._viewportRuler.change(150), this._dir ? this._dir.change : of(undefined), this._steps.changes)
|
924
|
-
.pipe(takeUntil(this._destroyed))
|
925
|
-
.subscribe((/**
|
926
|
-
* @return {?}
|
927
|
-
*/
|
928
|
-
() => {
|
929
|
-
this._configureSteps();
|
930
|
-
this.updatePagination();
|
931
|
-
this._changeDetectorRef.markForCheck();
|
932
|
-
}));
|
933
|
-
this._configureSteps();
|
934
|
-
this._changeDetectorRef.markForCheck();
|
935
|
-
}
|
936
|
-
/**
|
937
|
-
* @return {?}
|
938
|
-
*/
|
939
|
-
ngAfterContentChecked() {
|
940
|
-
if (this._elementRef && this._elementRef.nativeElement) {
|
941
|
-
this._widthSubject.next(this.nativeElementWidth);
|
942
|
-
}
|
943
|
-
if (this._scrollDistanceChanged) {
|
944
|
-
this._updateStepScrollPosition();
|
945
|
-
this._scrollDistanceChanged = false;
|
946
|
-
this._changeDetectorRef.markForCheck();
|
947
|
-
}
|
948
|
-
}
|
949
|
-
/**
|
950
|
-
* @return {?}
|
951
|
-
*/
|
952
|
-
ngOnDestroy() {
|
953
|
-
this._destroyed.next();
|
954
|
-
this._destroyed.complete();
|
955
|
-
}
|
956
|
-
/**
|
957
|
-
* Listen to right and left key events to move the the viewport.
|
958
|
-
* @param {?} event
|
959
|
-
* @return {?}
|
960
|
-
*/
|
961
|
-
_handleKeydown(event) {
|
962
|
-
switch (event.keyCode) {
|
963
|
-
case LEFT_ARROW:
|
964
|
-
this._scrollHeader('before');
|
965
|
-
event.preventDefault();
|
966
|
-
break;
|
967
|
-
case RIGHT_ARROW:
|
968
|
-
this._scrollHeader('after');
|
969
|
-
event.preventDefault();
|
970
|
-
break;
|
971
|
-
default:
|
972
|
-
// do something
|
973
|
-
}
|
974
|
-
}
|
975
|
-
/**
|
976
|
-
* Updates the view whether pagination should be enabled or not.
|
977
|
-
* @return {?}
|
978
|
-
*/
|
979
|
-
updatePagination() {
|
980
|
-
this._checkPaginationEnabled();
|
981
|
-
this._checkScrollingControls();
|
982
|
-
this._updateStepScrollPosition();
|
983
|
-
}
|
984
|
-
/**
|
985
|
-
* The layout direction of the containing app.
|
986
|
-
* @return {?}
|
987
|
-
*/
|
988
|
-
_getLayoutDirection() {
|
989
|
-
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
990
|
-
}
|
991
|
-
/**
|
992
|
-
* Performs the CSS transformation on the step list that will cause the list to scroll.
|
993
|
-
* @return {?}
|
994
|
-
*/
|
995
|
-
_updateStepScrollPosition() {
|
996
|
-
/** @type {?} */
|
997
|
-
const translateX = this._getLayoutDirection() === 'ltr' ? -this.scrollDistance : this.scrollDistance;
|
998
|
-
// Move step list the amount of pixels scrolled
|
999
|
-
this._stepList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
|
1000
|
-
// Setting the `transform` on IE will change the scroll offset of the parent, causing the
|
1001
|
-
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
1002
|
-
// it doesn't get thrown off.
|
1003
|
-
if (this._getLayoutDirection() === 'ltr') {
|
1004
|
-
this._stepListContainer.nativeElement.scrollLeft = 0;
|
1005
|
-
}
|
1006
|
-
else {
|
1007
|
-
this._stepListContainer.nativeElement.scrollLeft = this._getMaxScrollDistance();
|
1008
|
-
}
|
1009
|
-
}
|
1010
|
-
/**
|
1011
|
-
* Sets the distance in pixels that the step header should be transformed in the X-axis.
|
1012
|
-
* @return {?}
|
1013
|
-
*/
|
1014
|
-
get scrollDistance() {
|
1015
|
-
return this._scrollDistance;
|
1016
|
-
}
|
1017
|
-
/**
|
1018
|
-
* @param {?} v
|
1019
|
-
* @return {?}
|
1020
|
-
*/
|
1021
|
-
set scrollDistance(v) {
|
1022
|
-
this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), v));
|
1023
|
-
// Mark that the scroll distance has changed so that after the view is checked, the CSS
|
1024
|
-
// transformation can move the header.
|
1025
|
-
this._scrollDistanceChanged = true;
|
1026
|
-
this._checkScrollingControls();
|
1027
|
-
}
|
1028
|
-
/**
|
1029
|
-
* Moves the step list in the 'before' or 'after' direction (towards the beginning of the list or
|
1030
|
-
* the end of the list, respectively).
|
1031
|
-
* @param {?} scrollDir
|
1032
|
-
* @return {?}
|
1033
|
-
*/
|
1034
|
-
_scrollHeader(scrollDir) {
|
1035
|
-
// Move the scroll distance one-half the length of the step list's viewport.
|
1036
|
-
this.scrollDistance += ((scrollDir === 'before' ? -1 : 1) * this._stepListContainer.nativeElement.offsetWidth) / 2;
|
1037
|
-
}
|
1038
|
-
/**
|
1039
|
-
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
1040
|
-
* step list is wider than the size of the header container, then the pagination controls should
|
1041
|
-
* be shown.
|
1042
|
-
* @return {?}
|
1043
|
-
*/
|
1044
|
-
_checkPaginationEnabled() {
|
1045
|
-
/** @type {?} */
|
1046
|
-
const isEnabled = this._stepList.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;
|
1047
|
-
if (!isEnabled) {
|
1048
|
-
this.scrollDistance = 0;
|
1049
|
-
}
|
1050
|
-
if (isEnabled !== this._showPaginationControls) {
|
1051
|
-
this._changeDetectorRef.markForCheck();
|
1052
|
-
}
|
1053
|
-
this._showPaginationControls = isEnabled;
|
1054
|
-
}
|
1055
|
-
/**
|
1056
|
-
* Evaluate whether the before and after controls should be enabled or disabled.
|
1057
|
-
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
1058
|
-
* before button. If the header is at the end of the list (scroll distance is equal to the
|
1059
|
-
* maximum distance we can scroll), then disable the after button.
|
1060
|
-
* @return {?}
|
1061
|
-
*/
|
1062
|
-
_checkScrollingControls() {
|
1063
|
-
// Check if the pagination arrows should be activated.
|
1064
|
-
this._disableScrollBefore = this.scrollDistance === 0;
|
1065
|
-
this._disableScrollAfter = this.scrollDistance === this._getMaxScrollDistance();
|
1066
|
-
this._changeDetectorRef.markForCheck();
|
1067
|
-
}
|
1068
|
-
/**
|
1069
|
-
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
1070
|
-
* is equal to the difference in width between the step list container and step header container.
|
1071
|
-
* @return {?}
|
1072
|
-
*/
|
1073
|
-
_getMaxScrollDistance() {
|
1074
|
-
return this._stepList.nativeElement.scrollWidth - this._stepListContainer.nativeElement.offsetWidth || 0;
|
1075
|
-
}
|
1076
|
-
/**
|
1077
|
-
* Set the step line separators and display numbers
|
1078
|
-
* @private
|
1079
|
-
* @return {?}
|
1080
|
-
*/
|
1081
|
-
_configureSteps() {
|
1082
|
-
this._separators.forEach((/**
|
1083
|
-
* @param {?} separator
|
1084
|
-
* @return {?}
|
1085
|
-
*/
|
1086
|
-
(separator) => {
|
1087
|
-
this._renderer.removeChild(this._stepList.nativeElement, separator);
|
1088
|
-
}));
|
1089
|
-
/** @type {?} */
|
1090
|
-
const stepsArray = this._steps.toArray();
|
1091
|
-
// set the index number of the step so can display that number in circle
|
1092
|
-
stepsArray.forEach((/**
|
1093
|
-
* @param {?} step
|
1094
|
-
* @param {?} index
|
1095
|
-
* @return {?}
|
1096
|
-
*/
|
1097
|
-
(step, index) => {
|
1098
|
-
if (index > 0 && index < stepsArray.length) {
|
1099
|
-
/** @type {?} */
|
1100
|
-
const separator = this._renderer.createElement('div');
|
1101
|
-
this._renderer.addClass(separator, 'td-horizontal-line');
|
1102
|
-
this._separators.push(separator);
|
1103
|
-
this._renderer.insertBefore(this._stepList.nativeElement, separator, step.elementRef.nativeElement);
|
1104
|
-
}
|
1105
|
-
step.number = index + 1;
|
1106
|
-
}));
|
1107
|
-
}
|
1108
|
-
}
|
1109
|
-
TdNavStepsHorizontalComponent.decorators = [
|
1110
|
-
{ type: Component, args: [{
|
1111
|
-
selector: 'nav[td-steps][horizontal]',
|
1112
|
-
template: "<div class=\"td-steps-header\">\n <div\n class=\"td-step-header-pagination td-step-header-pagination-before mat-elevation-z4\"\n aria-hidden=\"true\"\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore\"\n [class.td-step-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_scrollHeader('before')\"\n >\n <div class=\"td-step-header-pagination-chevron\"></div>\n </div>\n <div #stepListContainer class=\"td-steps-header-container\" (keydown)=\"_handleKeydown($event)\">\n <div #stepList class=\"td-steps-header-list\">\n <ng-content></ng-content>\n </div>\n </div>\n <div\n class=\"td-step-header-pagination td-step-header-pagination-after mat-elevation-z4\"\n aria-hidden=\"true\"\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter\"\n [class.td-step-header-pagination-disabled]=\"_disableScrollAfter\"\n (click)=\"_scrollHeader('after')\"\n >\n <div class=\"td-step-header-pagination-chevron\"></div>\n </div>\n</div>\n",
|
1113
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1114
|
-
/* tslint:disable-next-line */
|
1115
|
-
host: {
|
1116
|
-
'class': 'td-steps td-steps-horizontal',
|
1117
|
-
'[class.td-step-header-pagination-controls-enabled]': '_showPaginationControls',
|
1118
|
-
'[class.td-step-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
1119
|
-
},
|
1120
|
-
styles: [":host{display:block;width:100%}.td-steps-header,.td-steps-header-list{-ms-flex-direction:row;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row}.td-steps-header-container{-ms-flex-positive:1;display:-ms-flexbox;display:flex;flex-grow:1;overflow:hidden;z-index:1}.td-steps-header-list{-ms-flex-align:center;-ms-flex-line-pack:center;-ms-flex-pack:start;-ms-flex-positive:1;align-content:center;align-items:center;flex-grow:1;justify-content:flex-start;max-width:100%;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.td-step-header-pagination{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;cursor:pointer;display:none;justify-content:center;min-width:32px;position:relative;z-index:2}:host.td-step-header-pagination-controls-enabled .td-step-header-pagination{display:-ms-flexbox;display:flex}.td-step-header-pagination-before,:host.td-step-header-rtl .td-step-header-pagination-after{padding-left:4px}.td-step-header-pagination-before .td-step-header-pagination-chevron,:host.td-step-header-rtl .td-step-header-pagination-after .td-step-header-pagination-chevron{-ms-transform:rotate(-135deg);transform:rotate(-135deg)}.td-step-header-pagination-after,:host.td-step-header-rtl .td-step-header-pagination-before{padding-right:4px}.td-step-header-pagination-after .td-step-header-pagination-chevron,:host.td-step-header-rtl .td-step-header-pagination-before .td-step-header-pagination-chevron{-ms-transform:rotate(45deg);transform:rotate(45deg)}.td-step-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:\"\";height:8px;width:8px}.td-step-header-pagination-disabled{box-shadow:none;cursor:default}.td-horizontal-line{-ms-flex:1;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;flex:1;height:1px;min-width:20px}"]
|
1121
|
-
}] }
|
1122
|
-
];
|
1123
|
-
/** @nocollapse */
|
1124
|
-
TdNavStepsHorizontalComponent.ctorParameters = () => [
|
1125
|
-
{ type: ElementRef },
|
1126
|
-
{ type: ViewportRuler },
|
1127
|
-
{ type: Directionality, decorators: [{ type: Optional }] },
|
1128
|
-
{ type: Renderer2 },
|
1129
|
-
{ type: ChangeDetectorRef }
|
1130
|
-
];
|
1131
|
-
TdNavStepsHorizontalComponent.propDecorators = {
|
1132
|
-
_steps: [{ type: ContentChildren, args: [TdNavStepLinkComponent, { descendants: true },] }],
|
1133
|
-
_stepListContainer: [{ type: ViewChild, args: ['stepListContainer', { static: true },] }],
|
1134
|
-
_stepList: [{ type: ViewChild, args: ['stepList', { static: true },] }]
|
1135
|
-
};
|
1136
|
-
if (false) {
|
1137
|
-
/**
|
1138
|
-
* @type {?}
|
1139
|
-
* @private
|
1140
|
-
*/
|
1141
|
-
TdNavStepsHorizontalComponent.prototype._separators;
|
1142
|
-
/**
|
1143
|
-
* Emits when the component is destroyed.
|
1144
|
-
* @type {?}
|
1145
|
-
* @private
|
1146
|
-
*/
|
1147
|
-
TdNavStepsHorizontalComponent.prototype._destroyed;
|
1148
|
-
/**
|
1149
|
-
* @type {?}
|
1150
|
-
* @private
|
1151
|
-
*/
|
1152
|
-
TdNavStepsHorizontalComponent.prototype._widthSubject;
|
1153
|
-
/**
|
1154
|
-
* @type {?}
|
1155
|
-
* @private
|
1156
|
-
*/
|
1157
|
-
TdNavStepsHorizontalComponent.prototype._scrollDistance;
|
1158
|
-
/**
|
1159
|
-
* @type {?}
|
1160
|
-
* @private
|
1161
|
-
*/
|
1162
|
-
TdNavStepsHorizontalComponent.prototype._scrollDistanceChanged;
|
1163
|
-
/**
|
1164
|
-
* Whether the controls for pagination should be displayed
|
1165
|
-
* @type {?}
|
1166
|
-
*/
|
1167
|
-
TdNavStepsHorizontalComponent.prototype._showPaginationControls;
|
1168
|
-
/**
|
1169
|
-
* Whether the step list can be scrolled more towards the end.
|
1170
|
-
* @type {?}
|
1171
|
-
*/
|
1172
|
-
TdNavStepsHorizontalComponent.prototype._disableScrollAfter;
|
1173
|
-
/**
|
1174
|
-
* Whether the step list can be scrolled more towards the beginning.
|
1175
|
-
* @type {?}
|
1176
|
-
*/
|
1177
|
-
TdNavStepsHorizontalComponent.prototype._disableScrollBefore;
|
1178
|
-
/** @type {?} */
|
1179
|
-
TdNavStepsHorizontalComponent.prototype._steps;
|
1180
|
-
/** @type {?} */
|
1181
|
-
TdNavStepsHorizontalComponent.prototype._stepListContainer;
|
1182
|
-
/** @type {?} */
|
1183
|
-
TdNavStepsHorizontalComponent.prototype._stepList;
|
1184
|
-
/**
|
1185
|
-
* @type {?}
|
1186
|
-
* @private
|
1187
|
-
*/
|
1188
|
-
TdNavStepsHorizontalComponent.prototype._elementRef;
|
1189
|
-
/**
|
1190
|
-
* @type {?}
|
1191
|
-
* @private
|
1192
|
-
*/
|
1193
|
-
TdNavStepsHorizontalComponent.prototype._viewportRuler;
|
1194
|
-
/**
|
1195
|
-
* @type {?}
|
1196
|
-
* @private
|
1197
|
-
*/
|
1198
|
-
TdNavStepsHorizontalComponent.prototype._dir;
|
1199
|
-
/**
|
1200
|
-
* @type {?}
|
1201
|
-
* @private
|
1202
|
-
*/
|
1203
|
-
TdNavStepsHorizontalComponent.prototype._renderer;
|
1204
|
-
/**
|
1205
|
-
* @type {?}
|
1206
|
-
* @private
|
1207
|
-
*/
|
1208
|
-
TdNavStepsHorizontalComponent.prototype._changeDetectorRef;
|
1209
|
-
}
|
1210
|
-
|
1211
|
-
/**
|
1212
|
-
* @fileoverview added by tsickle
|
1213
|
-
* Generated from: nav/nav-steps-vertical/nav-steps-vertical.component.ts
|
1214
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1215
|
-
*/
|
1216
|
-
class TdNavStepsVerticalComponent {
|
1217
|
-
/**
|
1218
|
-
* @param {?} _renderer
|
1219
|
-
* @param {?} _changeDetectorRef
|
1220
|
-
*/
|
1221
|
-
constructor(_renderer, _changeDetectorRef) {
|
1222
|
-
this._renderer = _renderer;
|
1223
|
-
this._changeDetectorRef = _changeDetectorRef;
|
1224
|
-
this._separators = [];
|
1225
|
-
/**
|
1226
|
-
* Emits when the component is destroyed.
|
1227
|
-
*/
|
1228
|
-
this._destroyed = new Subject();
|
1229
|
-
}
|
1230
|
-
/**
|
1231
|
-
* @return {?}
|
1232
|
-
*/
|
1233
|
-
ngAfterContentInit() {
|
1234
|
-
this._steps.changes.pipe(takeUntil(this._destroyed)).subscribe((/**
|
1235
|
-
* @return {?}
|
1236
|
-
*/
|
1237
|
-
() => {
|
1238
|
-
this._configureSteps();
|
1239
|
-
this._changeDetectorRef.markForCheck();
|
1240
|
-
}));
|
1241
|
-
this._configureSteps();
|
1242
|
-
this._changeDetectorRef.markForCheck();
|
1243
|
-
}
|
1244
|
-
/**
|
1245
|
-
* @return {?}
|
1246
|
-
*/
|
1247
|
-
ngOnDestroy() {
|
1248
|
-
this._destroyed.next();
|
1249
|
-
this._destroyed.complete();
|
1250
|
-
}
|
1251
|
-
/**
|
1252
|
-
* Set the step line separators and display numbers
|
1253
|
-
* @private
|
1254
|
-
* @return {?}
|
1255
|
-
*/
|
1256
|
-
_configureSteps() {
|
1257
|
-
this._separators.forEach((/**
|
1258
|
-
* @param {?} separator
|
1259
|
-
* @return {?}
|
1260
|
-
*/
|
1261
|
-
(separator) => {
|
1262
|
-
this._renderer.removeChild(this._stepList.nativeElement, separator);
|
1263
|
-
}));
|
1264
|
-
/** @type {?} */
|
1265
|
-
const stepsArray = this._steps.toArray();
|
1266
|
-
// set the index number of the step so can display that number in circle
|
1267
|
-
stepsArray.forEach((/**
|
1268
|
-
* @param {?} step
|
1269
|
-
* @param {?} index
|
1270
|
-
* @return {?}
|
1271
|
-
*/
|
1272
|
-
(step, index) => {
|
1273
|
-
if (index > 0 && index < stepsArray.length) {
|
1274
|
-
/** @type {?} */
|
1275
|
-
const separator = this._renderer.createElement('div');
|
1276
|
-
this._renderer.addClass(separator, 'td-vertical-line-wrapper');
|
1277
|
-
/** @type {?} */
|
1278
|
-
const separatorChild = this._renderer.createElement('div');
|
1279
|
-
this._renderer.addClass(separatorChild, 'td-vertical-line');
|
1280
|
-
this._renderer.appendChild(separator, separatorChild);
|
1281
|
-
this._separators.push(separator);
|
1282
|
-
this._renderer.insertBefore(this._stepList.nativeElement, separator, step.elementRef.nativeElement);
|
1283
|
-
}
|
1284
|
-
step.number = index + 1;
|
1285
|
-
}));
|
1286
|
-
}
|
1287
|
-
}
|
1288
|
-
TdNavStepsVerticalComponent.decorators = [
|
1289
|
-
{ type: Component, args: [{
|
1290
|
-
selector: 'nav[td-steps][vertical]',
|
1291
|
-
template: "<div class=\"td-steps-header\">\n <div class=\"td-steps-header-container\">\n <div #stepList class=\"td-steps-header-list\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n",
|
1292
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1293
|
-
/* tslint:disable-next-line */
|
1294
|
-
host: {
|
1295
|
-
class: 'td-steps td-steps-vertical',
|
1296
|
-
},
|
1297
|
-
styles: [".td-vertical-line-wrapper{position:relative}.td-vertical-line-wrapper .td-vertical-line{border-left-style:solid;border-left-width:1px;height:34px;position:absolute;top:-16px}::ng-deep :not([dir=rtl]) .td-vertical-line-wrapper .td-vertical-line{left:20px;right:auto}::ng-deep [dir=rtl] .td-vertical-line-wrapper .td-vertical-line{left:auto;right:20px}"]
|
1298
|
-
}] }
|
1299
|
-
];
|
1300
|
-
/** @nocollapse */
|
1301
|
-
TdNavStepsVerticalComponent.ctorParameters = () => [
|
1302
|
-
{ type: Renderer2 },
|
1303
|
-
{ type: ChangeDetectorRef }
|
1304
|
-
];
|
1305
|
-
TdNavStepsVerticalComponent.propDecorators = {
|
1306
|
-
_steps: [{ type: ContentChildren, args: [TdNavStepLinkComponent, { descendants: true },] }],
|
1307
|
-
_stepList: [{ type: ViewChild, args: ['stepList', { static: true },] }]
|
1308
|
-
};
|
1309
|
-
if (false) {
|
1310
|
-
/**
|
1311
|
-
* @type {?}
|
1312
|
-
* @private
|
1313
|
-
*/
|
1314
|
-
TdNavStepsVerticalComponent.prototype._separators;
|
1315
|
-
/**
|
1316
|
-
* Emits when the component is destroyed.
|
1317
|
-
* @type {?}
|
1318
|
-
* @private
|
1319
|
-
*/
|
1320
|
-
TdNavStepsVerticalComponent.prototype._destroyed;
|
1321
|
-
/** @type {?} */
|
1322
|
-
TdNavStepsVerticalComponent.prototype._steps;
|
1323
|
-
/** @type {?} */
|
1324
|
-
TdNavStepsVerticalComponent.prototype._stepList;
|
1325
|
-
/**
|
1326
|
-
* @type {?}
|
1327
|
-
* @private
|
1328
|
-
*/
|
1329
|
-
TdNavStepsVerticalComponent.prototype._renderer;
|
1330
|
-
/**
|
1331
|
-
* @type {?}
|
1332
|
-
* @private
|
1333
|
-
*/
|
1334
|
-
TdNavStepsVerticalComponent.prototype._changeDetectorRef;
|
1335
|
-
}
|
1336
|
-
|
1337
|
-
/**
|
1338
|
-
* @fileoverview added by tsickle
|
1339
|
-
* Generated from: steps.module.ts
|
1340
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1341
|
-
*/
|
1342
|
-
/** @type {?} */
|
1343
|
-
const TD_STEPS = [
|
1344
|
-
TdStepsComponent,
|
1345
|
-
TdStepComponent,
|
1346
|
-
TdStepHeaderComponent,
|
1347
|
-
TdStepBodyComponent,
|
1348
|
-
TdStepLabelDirective,
|
1349
|
-
TdStepActionsDirective,
|
1350
|
-
TdStepSummaryDirective,
|
1351
|
-
TdNavStepsHorizontalComponent,
|
1352
|
-
TdNavStepsVerticalComponent,
|
1353
|
-
TdNavStepLinkComponent,
|
1354
|
-
];
|
1355
|
-
class CovalentStepsModule {
|
1356
|
-
}
|
1357
|
-
CovalentStepsModule.decorators = [
|
1358
|
-
{ type: NgModule, args: [{
|
1359
|
-
imports: [CommonModule, MatIconModule, MatRippleModule, PortalModule, ScrollingModule, CovalentCommonModule],
|
1360
|
-
declarations: [TD_STEPS],
|
1361
|
-
exports: [TD_STEPS],
|
1362
|
-
},] }
|
1363
|
-
];
|
1364
|
-
|
1365
|
-
/**
|
1366
|
-
* @fileoverview added by tsickle
|
1367
|
-
* Generated from: public-api.ts
|
1368
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1369
|
-
*/
|
1370
|
-
|
1371
|
-
/**
|
1372
|
-
* @fileoverview added by tsickle
|
1373
|
-
* Generated from: index.ts
|
1374
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1375
|
-
*/
|
1376
|
-
|
1377
|
-
/**
|
1378
|
-
* @fileoverview added by tsickle
|
1379
|
-
* Generated from: covalent-core-steps.ts
|
1380
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1381
|
-
*/
|
1382
|
-
|
1383
|
-
export { CovalentStepsModule, StepMode, StepState, TdNavStepLinkComponent, TdNavStepsHorizontalComponent, TdNavStepsVerticalComponent, TdStepActionsDirective, TdStepBase, TdStepBodyComponent, TdStepComponent, TdStepHeaderBase, TdStepHeaderComponent, TdStepLabelDirective, TdStepSummaryDirective, TdStepsComponent, _TdStepHeaderMixinBase, _TdStepMixinBase };
|
1384
|
-
//# sourceMappingURL=covalent-core-steps.js.map
|