@angular/material 8.1.4 → 8.2.3
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/_theming.scss +13 -11
- package/autocomplete/typings/autocomplete-trigger.d.ts +5 -2
- package/autocomplete/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +48 -20
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +5 -6
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +1 -1
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +1 -1
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +24 -4
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +1 -1
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +20 -18
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +22 -2
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +2 -2
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +28 -5
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +1 -1
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +15 -2
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- package/bundles/material-icon.umd.js +103 -42
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +1 -1
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +4 -1
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +35 -19
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +1 -1
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +1 -1
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +34 -23
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +3 -0
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +14 -2
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +1 -1
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +3 -1
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +1 -1
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +6 -3
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +7 -8
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +0 -1
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +1 -1
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +14 -4
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +1390 -1208
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +2 -2
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +16 -1
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material.umd.js +1767 -1346
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -19
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +1 -1
- package/button/typings/index.metadata.json +1 -1
- package/card/typings/index.metadata.json +1 -1
- package/chips/typings/chip.d.ts +4 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/common-behaviors/common-module.d.ts +2 -2
- package/core/typings/datetime/date-adapter.d.ts +1 -1
- package/core/typings/datetime/native-date-adapter.d.ts +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/ripple/ripple-renderer.d.ts +2 -2
- package/core/typings/ripple/ripple.d.ts +1 -1
- package/datepicker/typings/datepicker-intl.d.ts +2 -0
- package/datepicker/typings/index.metadata.json +1 -1
- package/dialog/typings/dialog-config.d.ts +9 -7
- package/dialog/typings/dialog-content-directives.d.ts +2 -0
- package/dialog/typings/dialog-ref.d.ts +10 -0
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +44 -19
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/button.js +3 -5
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +1 -1
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +1 -1
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +22 -5
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +19 -17
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +15 -2
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +23 -5
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/form-field.js +15 -2
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +1 -1
- package/esm2015/icon.js +93 -40
- package/esm2015/icon.js.map +1 -1
- package/esm2015/list.js +4 -1
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +3 -3
- package/esm2015/menu.js +31 -10
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +1 -1
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-spinner.js +31 -23
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +3 -0
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +14 -2
- package/esm2015/select.js.map +1 -1
- package/esm2015/slide-toggle.js +3 -1
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +6 -2
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +7 -8
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +0 -1
- package/esm2015/sort.js.map +1 -1
- package/esm2015/table.js +9 -4
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +1094 -890
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/tooltip.js +15 -1
- package/esm2015/tooltip.js.map +1 -1
- package/esm5/autocomplete.es5.js +48 -19
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/button.es5.js +5 -6
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +1 -1
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +1 -1
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +25 -5
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +21 -19
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +22 -2
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +28 -5
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/form-field.es5.js +15 -2
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +1 -1
- package/esm5/icon.es5.js +101 -40
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/list.es5.js +4 -1
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +3 -3
- package/esm5/menu.es5.js +33 -17
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +1 -1
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +34 -23
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +3 -0
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +14 -2
- package/esm5/select.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +3 -1
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +6 -3
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +7 -8
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +0 -1
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/table.es5.js +14 -4
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +1384 -1207
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +16 -1
- package/esm5/tooltip.es5.js.map +1 -1
- package/form-field/typings/form-field.d.ts +2 -0
- package/form-field/typings/index.metadata.json +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/icon-registry.d.ts +17 -11
- package/icon/typings/icon.d.ts +3 -2
- package/icon/typings/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/menu/typings/index.d.ts +2 -2
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-trigger.d.ts +2 -5
- package/package.json +5 -5
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-spinner/typings/index.metadata.json +1 -1
- package/progress-spinner/typings/progress-spinner.d.ts +3 -2
- package/radio/typings/index.metadata.json +1 -1
- package/schematics/ng-add/setup-project.js +8 -8
- package/schematics/ng-add/setup-project.js.map +1 -1
- package/schematics/ng-add/theming/theming.js +6 -6
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-update/index.js +2 -2
- package/schematics/ng-update/index.js.map +1 -1
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +2 -0
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slider/typings/index.metadata.json +1 -1
- package/slider/typings/slider.d.ts +2 -2
- package/snack-bar/typings/index.metadata.json +1 -1
- package/sort/typings/index.metadata.json +1 -1
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/table-data-source.d.ts +5 -0
- package/tabs/typings/index.d.ts +2 -2
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/paginated-tab-header.d.ts +8 -5
- package/tabs/typings/public-api.d.ts +4 -4
- package/tabs/typings/tab-body.d.ts +11 -3
- package/tabs/typings/tab-group.d.ts +24 -11
- package/tabs/typings/tab-header.d.ts +12 -5
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +38 -19
- package/tooltip/typings/index.metadata.json +1 -1
- package/typings/autocomplete/autocomplete-trigger.d.ts +5 -2
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/button/button.d.ts +1 -1
- package/typings/button/index.metadata.json +1 -1
- package/typings/card/index.metadata.json +1 -1
- package/typings/chips/chip.d.ts +4 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/common-behaviors/common-module.d.ts +2 -2
- package/typings/core/datetime/date-adapter.d.ts +1 -1
- package/typings/core/datetime/native-date-adapter.d.ts +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/ripple/ripple-renderer.d.ts +2 -2
- package/typings/core/ripple/ripple.d.ts +1 -1
- package/typings/datepicker/datepicker-intl.d.ts +2 -0
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/dialog/dialog-config.d.ts +9 -7
- package/typings/dialog/dialog-content-directives.d.ts +2 -0
- package/typings/dialog/dialog-ref.d.ts +10 -0
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/autocomplete-trigger.d.ts +5 -2
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +1 -1
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/card/index.metadata.json +1 -1
- package/typings/esm5/chips/chip.d.ts +4 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/common-behaviors/common-module.d.ts +2 -2
- package/typings/esm5/core/datetime/date-adapter.d.ts +1 -1
- package/typings/esm5/core/datetime/native-date-adapter.d.ts +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/ripple/ripple-renderer.d.ts +2 -2
- package/typings/esm5/core/ripple/ripple.d.ts +1 -1
- package/typings/esm5/datepicker/datepicker-intl.d.ts +2 -0
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/dialog/dialog-config.d.ts +9 -7
- package/typings/esm5/dialog/dialog-content-directives.d.ts +2 -0
- package/typings/esm5/dialog/dialog-ref.d.ts +10 -0
- package/typings/esm5/dialog/index.metadata.json +1 -1
- package/typings/esm5/form-field/form-field.d.ts +2 -0
- package/typings/esm5/form-field/index.metadata.json +1 -1
- package/typings/esm5/grid-list/index.d.ts +1 -1
- package/typings/esm5/grid-list/index.metadata.json +1 -1
- package/typings/esm5/icon/icon-registry.d.ts +17 -11
- package/typings/esm5/icon/icon.d.ts +3 -2
- package/typings/esm5/icon/index.metadata.json +1 -1
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/menu/index.d.ts +2 -2
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-trigger.d.ts +2 -5
- package/typings/esm5/progress-spinner/index.metadata.json +1 -1
- package/typings/esm5/progress-spinner/progress-spinner.d.ts +3 -2
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +2 -0
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/slider/slider.d.ts +2 -2
- package/typings/esm5/snack-bar/index.metadata.json +1 -1
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/table-data-source.d.ts +5 -0
- package/typings/esm5/tabs/index.d.ts +2 -2
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/paginated-tab-header.d.ts +8 -5
- package/typings/esm5/tabs/public-api.d.ts +4 -4
- package/typings/esm5/tabs/tab-body.d.ts +11 -3
- package/typings/esm5/tabs/tab-group.d.ts +24 -11
- package/typings/esm5/tabs/tab-header.d.ts +12 -5
- package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +38 -19
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/form-field/form-field.d.ts +2 -0
- package/typings/form-field/index.metadata.json +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/icon-registry.d.ts +17 -11
- package/typings/icon/icon.d.ts +3 -2
- package/typings/icon/index.metadata.json +1 -1
- package/typings/list/index.metadata.json +1 -1
- package/typings/menu/index.d.ts +2 -2
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-trigger.d.ts +2 -5
- package/typings/progress-spinner/index.metadata.json +1 -1
- package/typings/progress-spinner/progress-spinner.d.ts +3 -2
- package/typings/radio/index.metadata.json +1 -1
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +2 -0
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slider/index.metadata.json +1 -1
- package/typings/slider/slider.d.ts +2 -2
- package/typings/snack-bar/index.metadata.json +1 -1
- package/typings/sort/index.metadata.json +1 -1
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/table-data-source.d.ts +5 -0
- package/typings/tabs/index.d.ts +2 -2
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/paginated-tab-header.d.ts +8 -5
- package/typings/tabs/public-api.d.ts +4 -4
- package/typings/tabs/tab-body.d.ts +11 -3
- package/typings/tabs/tab-group.d.ts +24 -11
- package/typings/tabs/tab-header.d.ts +12 -5
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +38 -19
- package/typings/tooltip/index.metadata.json +1 -1
package/bundles/material.umd.js
CHANGED
|
@@ -59,7 +59,7 @@ var __assign = function() {
|
|
|
59
59
|
* Current version of Angular Material.
|
|
60
60
|
* @type {?}
|
|
61
61
|
*/
|
|
62
|
-
var VERSION$1 = new core.Version('8.
|
|
62
|
+
var VERSION$1 = new core.Version('8.2.3');
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @fileoverview added by tsickle
|
|
@@ -99,7 +99,14 @@ var AnimationDurations = /** @class */ (function () {
|
|
|
99
99
|
// Can be removed once the Material primary entry-point no longer
|
|
100
100
|
// re-exports all secondary entry-points
|
|
101
101
|
/** @type {?} */
|
|
102
|
-
var VERSION$2 = new core.Version('8.
|
|
102
|
+
var VERSION$2 = new core.Version('8.2.3');
|
|
103
|
+
/**
|
|
104
|
+
* \@docs-private
|
|
105
|
+
* @return {?}
|
|
106
|
+
*/
|
|
107
|
+
function MATERIAL_SANITY_CHECKS_FACTORY() {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
103
110
|
/**
|
|
104
111
|
* Injection token that configures whether the Material sanity checks are enabled.
|
|
105
112
|
* @type {?}
|
|
@@ -108,13 +115,6 @@ var MATERIAL_SANITY_CHECKS = new core.InjectionToken('mat-sanity-checks', {
|
|
|
108
115
|
providedIn: 'root',
|
|
109
116
|
factory: MATERIAL_SANITY_CHECKS_FACTORY,
|
|
110
117
|
});
|
|
111
|
-
/**
|
|
112
|
-
* \@docs-private
|
|
113
|
-
* @return {?}
|
|
114
|
-
*/
|
|
115
|
-
function MATERIAL_SANITY_CHECKS_FACTORY() {
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
118
|
/**
|
|
119
119
|
* Module that captures anything that should be loaded and/or run for *all* Angular Material
|
|
120
120
|
* components. This includes Bidi, etc.
|
|
@@ -661,7 +661,7 @@ DateAdapter = /** @class */ (function () {
|
|
|
661
661
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
662
662
|
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
663
663
|
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
664
|
-
* method on all of
|
|
664
|
+
* method on all of its `@Input()` properties that accept dates. It is therefore possible to
|
|
665
665
|
* support passing values from your backend directly to these properties by overriding this method
|
|
666
666
|
* to also deserialize the format used by your backend.
|
|
667
667
|
* @param value The value to be deserialized into a date object.
|
|
@@ -673,7 +673,7 @@ DateAdapter = /** @class */ (function () {
|
|
|
673
673
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
674
674
|
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
675
675
|
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
676
|
-
* method on all of
|
|
676
|
+
* method on all of its `\@Input()` properties that accept dates. It is therefore possible to
|
|
677
677
|
* support passing values from your backend directly to these properties by overriding this method
|
|
678
678
|
* to also deserialize the format used by your backend.
|
|
679
679
|
* @param {?} value The value to be deserialized into a date object.
|
|
@@ -685,7 +685,7 @@ DateAdapter = /** @class */ (function () {
|
|
|
685
685
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
686
686
|
* string). The default implementation does not allow any deserialization, it simply checks that
|
|
687
687
|
* the given value is already a valid date object or null. The `<mat-datepicker>` will call this
|
|
688
|
-
* method on all of
|
|
688
|
+
* method on all of its `\@Input()` properties that accept dates. It is therefore possible to
|
|
689
689
|
* support passing values from your backend directly to these properties by overriding this method
|
|
690
690
|
* to also deserialize the format used by your backend.
|
|
691
691
|
* @param {?} value The value to be deserialized into a date object.
|
|
@@ -907,7 +907,7 @@ var NativeDateAdapter = /** @class */ (function (_super) {
|
|
|
907
907
|
* will produce `'8/13/1800'`.
|
|
908
908
|
*
|
|
909
909
|
* TODO(mmalerba): drop this variable. It's not being used in the code right now. We're now
|
|
910
|
-
* getting the string representation of a Date object from
|
|
910
|
+
* getting the string representation of a Date object from its utc representation. We're keeping
|
|
911
911
|
* it here for sometime, just for precaution, in case we decide to revert some of these changes
|
|
912
912
|
* though.
|
|
913
913
|
*/
|
|
@@ -1865,7 +1865,7 @@ var /**
|
|
|
1865
1865
|
* \@docs-private
|
|
1866
1866
|
*/
|
|
1867
1867
|
RippleRenderer = /** @class */ (function () {
|
|
1868
|
-
function RippleRenderer(_target, _ngZone,
|
|
1868
|
+
function RippleRenderer(_target, _ngZone, elementOrElementRef, platform$$1) {
|
|
1869
1869
|
var _this = this;
|
|
1870
1870
|
this._target = _target;
|
|
1871
1871
|
this._ngZone = _ngZone;
|
|
@@ -1953,7 +1953,7 @@ RippleRenderer = /** @class */ (function () {
|
|
|
1953
1953
|
});
|
|
1954
1954
|
// Only do anything if we're on the browser.
|
|
1955
1955
|
if (platform$$1.isBrowser) {
|
|
1956
|
-
this._containerElement =
|
|
1956
|
+
this._containerElement = coercion.coerceElement(elementOrElementRef);
|
|
1957
1957
|
// Specify events which need to be registered on the trigger.
|
|
1958
1958
|
this._triggerEvents
|
|
1959
1959
|
.set('mousedown', this._onMousedown)
|
|
@@ -2107,16 +2107,18 @@ RippleRenderer = /** @class */ (function () {
|
|
|
2107
2107
|
/** Sets up the trigger event listeners */
|
|
2108
2108
|
/**
|
|
2109
2109
|
* Sets up the trigger event listeners
|
|
2110
|
-
* @param {?}
|
|
2110
|
+
* @param {?} elementOrElementRef
|
|
2111
2111
|
* @return {?}
|
|
2112
2112
|
*/
|
|
2113
2113
|
RippleRenderer.prototype.setupTriggerEvents = /**
|
|
2114
2114
|
* Sets up the trigger event listeners
|
|
2115
|
-
* @param {?}
|
|
2115
|
+
* @param {?} elementOrElementRef
|
|
2116
2116
|
* @return {?}
|
|
2117
2117
|
*/
|
|
2118
|
-
function (
|
|
2118
|
+
function (elementOrElementRef) {
|
|
2119
2119
|
var _this = this;
|
|
2120
|
+
/** @type {?} */
|
|
2121
|
+
var element = coercion.coerceElement(elementOrElementRef);
|
|
2120
2122
|
if (!element || element === this._triggerElement) {
|
|
2121
2123
|
return;
|
|
2122
2124
|
}
|
|
@@ -3385,11 +3387,21 @@ var MatFormField = /** @class */ (function (_super) {
|
|
|
3385
3387
|
_this._hintLabelId = "mat-hint-" + nextUniqueId$2++;
|
|
3386
3388
|
// Unique id for the internal form field label.
|
|
3387
3389
|
_this._labelId = "mat-form-field-label-" + nextUniqueId$2++;
|
|
3390
|
+
/* Holds the previous direction emitted by directionality service change emitter.
|
|
3391
|
+
This is used in updateOutlineGap() method to update the width and position of the gap in the
|
|
3392
|
+
outline. Only relevant for the outline appearance. The direction is getting updated in the
|
|
3393
|
+
UI after directionality service change emission. So the outlines gaps are getting
|
|
3394
|
+
updated in updateOutlineGap() method before connectionContainer child direction change
|
|
3395
|
+
in UI. We may get wrong calculations. So we are storing the previous direction to get the
|
|
3396
|
+
correct outline calculations*/
|
|
3397
|
+
_this._previousDirection = 'ltr';
|
|
3388
3398
|
_this._labelOptions = labelOptions ? labelOptions : {};
|
|
3389
3399
|
_this.floatLabel = _this._labelOptions.float || 'auto';
|
|
3390
3400
|
_this._animationsEnabled = _animationMode !== 'NoopAnimations';
|
|
3391
3401
|
// Set the default through here so we invoke the setter on the first run.
|
|
3392
3402
|
_this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';
|
|
3403
|
+
_this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?
|
|
3404
|
+
_defaults.hideRequiredMarker : false;
|
|
3393
3405
|
return _this;
|
|
3394
3406
|
}
|
|
3395
3407
|
Object.defineProperty(MatFormField.prototype, "appearance", {
|
|
@@ -3627,7 +3639,10 @@ var MatFormField = /** @class */ (function (_super) {
|
|
|
3627
3639
|
this._dir.change.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
3628
3640
|
* @return {?}
|
|
3629
3641
|
*/
|
|
3630
|
-
function () {
|
|
3642
|
+
function () {
|
|
3643
|
+
_this.updateOutlineGap();
|
|
3644
|
+
_this._previousDirection = _this._dir.value;
|
|
3645
|
+
}));
|
|
3631
3646
|
}
|
|
3632
3647
|
};
|
|
3633
3648
|
/**
|
|
@@ -4008,7 +4023,7 @@ var MatFormField = /** @class */ (function (_super) {
|
|
|
4008
4023
|
* @return {?}
|
|
4009
4024
|
*/
|
|
4010
4025
|
function (rect) {
|
|
4011
|
-
return this.
|
|
4026
|
+
return this._previousDirection === 'rtl' ? rect.right : rect.left;
|
|
4012
4027
|
};
|
|
4013
4028
|
MatFormField.decorators = [
|
|
4014
4029
|
{ type: core.Component, args: [{selector: 'mat-form-field',
|
|
@@ -4583,14 +4598,6 @@ var MatAutocompleteTrigger = /** @class */ (function () {
|
|
|
4583
4598
|
*/
|
|
4584
4599
|
function () { return _this.optionSelections; })));
|
|
4585
4600
|
}))));
|
|
4586
|
-
if (typeof window !== 'undefined') {
|
|
4587
|
-
_zone.runOutsideAngular((/**
|
|
4588
|
-
* @return {?}
|
|
4589
|
-
*/
|
|
4590
|
-
function () {
|
|
4591
|
-
window.addEventListener('blur', _this._windowBlurHandler);
|
|
4592
|
-
}));
|
|
4593
|
-
}
|
|
4594
4601
|
this._scrollStrategy = scrollStrategy;
|
|
4595
4602
|
}
|
|
4596
4603
|
Object.defineProperty(MatAutocompleteTrigger.prototype, "autocompleteDisabled", {
|
|
@@ -4614,6 +4621,32 @@ var MatAutocompleteTrigger = /** @class */ (function () {
|
|
|
4614
4621
|
enumerable: true,
|
|
4615
4622
|
configurable: true
|
|
4616
4623
|
});
|
|
4624
|
+
/**
|
|
4625
|
+
* @return {?}
|
|
4626
|
+
*/
|
|
4627
|
+
MatAutocompleteTrigger.prototype.ngAfterViewInit = /**
|
|
4628
|
+
* @return {?}
|
|
4629
|
+
*/
|
|
4630
|
+
function () {
|
|
4631
|
+
var _this = this;
|
|
4632
|
+
if (typeof window !== 'undefined') {
|
|
4633
|
+
this._zone.runOutsideAngular((/**
|
|
4634
|
+
* @return {?}
|
|
4635
|
+
*/
|
|
4636
|
+
function () {
|
|
4637
|
+
window.addEventListener('blur', _this._windowBlurHandler);
|
|
4638
|
+
}));
|
|
4639
|
+
if (platform._supportsShadowDom()) {
|
|
4640
|
+
/** @type {?} */
|
|
4641
|
+
var element = this._element.nativeElement;
|
|
4642
|
+
/** @type {?} */
|
|
4643
|
+
var rootNode = element.getRootNode ? element.getRootNode() : null;
|
|
4644
|
+
// We need to take the `ShadowRoot` off of `window`, because the built-in types are
|
|
4645
|
+
// incorrect. See https://github.com/Microsoft/TypeScript/issues/27929.
|
|
4646
|
+
this._isInsideShadowRoot = rootNode instanceof ((/** @type {?} */ (window))).ShadowRoot;
|
|
4647
|
+
}
|
|
4648
|
+
}
|
|
4649
|
+
};
|
|
4617
4650
|
/**
|
|
4618
4651
|
* @param {?} changes
|
|
4619
4652
|
* @return {?}
|
|
@@ -4787,13 +4820,14 @@ var MatAutocompleteTrigger = /** @class */ (function () {
|
|
|
4787
4820
|
* @return {?}
|
|
4788
4821
|
*/
|
|
4789
4822
|
function (event) {
|
|
4823
|
+
// If we're in the Shadow DOM, the event target will be the shadow root, so we have to
|
|
4824
|
+
// fall back to check the first element in the path of the click event.
|
|
4790
4825
|
/** @type {?} */
|
|
4791
|
-
var clickTarget = (/** @type {?} */ (event.
|
|
4826
|
+
var clickTarget = (/** @type {?} */ ((_this._isInsideShadowRoot && event.composedPath ? event.composedPath()[0] :
|
|
4827
|
+
event.target)));
|
|
4792
4828
|
/** @type {?} */
|
|
4793
|
-
var formField = _this._formField ?
|
|
4794
|
-
|
|
4795
|
-
return _this._overlayAttached &&
|
|
4796
|
-
clickTarget !== _this._element.nativeElement &&
|
|
4829
|
+
var formField = _this._formField ? _this._formField._elementRef.nativeElement : null;
|
|
4830
|
+
return _this._overlayAttached && clickTarget !== _this._element.nativeElement &&
|
|
4797
4831
|
(!formField || !formField.contains(clickTarget)) &&
|
|
4798
4832
|
(!!_this._overlayRef && !_this._overlayRef.overlayElement.contains(clickTarget));
|
|
4799
4833
|
})));
|
|
@@ -5034,9 +5068,17 @@ var MatAutocompleteTrigger = /** @class */ (function () {
|
|
|
5034
5068
|
var index = this.autocomplete._keyManager.activeItemIndex || 0;
|
|
5035
5069
|
/** @type {?} */
|
|
5036
5070
|
var labelCount = _countGroupLabelsBeforeOption(index, this.autocomplete.options, this.autocomplete.optionGroups);
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5071
|
+
if (index === 0 && labelCount === 1) {
|
|
5072
|
+
// If we've got one group label before the option and we're at the top option,
|
|
5073
|
+
// scroll the list to the top. This is better UX than scrolling the list to the
|
|
5074
|
+
// top of the option, because it allows the user to read the top group's label.
|
|
5075
|
+
this.autocomplete._setScrollTop(0);
|
|
5076
|
+
}
|
|
5077
|
+
else {
|
|
5078
|
+
/** @type {?} */
|
|
5079
|
+
var newScrollPosition = _getOptionScrollPosition(index + labelCount, AUTOCOMPLETE_OPTION_HEIGHT, this.autocomplete._getScrollTop(), AUTOCOMPLETE_PANEL_HEIGHT);
|
|
5080
|
+
this.autocomplete._setScrollTop(newScrollPosition);
|
|
5081
|
+
}
|
|
5040
5082
|
};
|
|
5041
5083
|
/**
|
|
5042
5084
|
* This method listens to a stream of panel closing actions and resets the
|
|
@@ -5428,6 +5470,7 @@ var MatAutocompleteTrigger = /** @class */ (function () {
|
|
|
5428
5470
|
{ type: core.Directive, args: [{
|
|
5429
5471
|
selector: "input[matAutocomplete], textarea[matAutocomplete]",
|
|
5430
5472
|
host: {
|
|
5473
|
+
'class': 'mat-autocomplete-trigger',
|
|
5431
5474
|
'[attr.autocomplete]': 'autocompleteAttribute',
|
|
5432
5475
|
'[attr.role]': 'autocompleteDisabled ? null : "combobox"',
|
|
5433
5476
|
'[attr.aria-autocomplete]': 'autocompleteDisabled ? null : "list"',
|
|
@@ -6852,20 +6895,19 @@ var MatButton = /** @class */ (function (_super) {
|
|
|
6852
6895
|
/** Focuses the button. */
|
|
6853
6896
|
/**
|
|
6854
6897
|
* Focuses the button.
|
|
6855
|
-
* @param {?=}
|
|
6898
|
+
* @param {?=} origin
|
|
6856
6899
|
* @param {?=} options
|
|
6857
6900
|
* @return {?}
|
|
6858
6901
|
*/
|
|
6859
6902
|
MatButton.prototype.focus = /**
|
|
6860
6903
|
* Focuses the button.
|
|
6861
|
-
* @param {?=}
|
|
6904
|
+
* @param {?=} origin
|
|
6862
6905
|
* @param {?=} options
|
|
6863
6906
|
* @return {?}
|
|
6864
6907
|
*/
|
|
6865
|
-
function (
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
this._getHostElement().focus(options);
|
|
6908
|
+
function (origin, options) {
|
|
6909
|
+
if (origin === void 0) { origin = 'program'; }
|
|
6910
|
+
this._focusMonitor.focusVia(this._getHostElement(), origin, options);
|
|
6869
6911
|
};
|
|
6870
6912
|
/**
|
|
6871
6913
|
* @return {?}
|
|
@@ -8051,7 +8093,7 @@ var MatCard = /** @class */ (function () {
|
|
|
8051
8093
|
{ type: core.Component, args: [{selector: 'mat-card',
|
|
8052
8094
|
exportAs: 'matCard',
|
|
8053
8095
|
template: "<ng-content></ng-content><ng-content select=\"mat-card-footer\"></ng-content>",
|
|
8054
|
-
styles: [".mat-card{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}@media (-ms-high-contrast:active){.mat-card{outline:solid 1px}}.mat-card-actions,.mat-card-content,.mat-card-subtitle{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media (max-width:599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card-content>:first-child,.mat-card>:first-child{margin-top:0}.mat-card-content>:last-child:not(.mat-card-footer),.mat-card>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child{margin-left:0;margin-right:0}.mat-card-subtitle:not(:first-child),.mat-card-title:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],
|
|
8096
|
+
styles: [".mat-card{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}@media (-ms-high-contrast:active){.mat-card{outline:solid 1px}}.mat-card-actions,.mat-card-content,.mat-card-subtitle{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media (max-width:599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card-content>:first-child,.mat-card>:first-child{margin-top:0}.mat-card-content>:last-child:not(.mat-card-footer),.mat-card>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child,.mat-card-actions .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-subtitle:not(:first-child),.mat-card-title:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],
|
|
8055
8097
|
encapsulation: core.ViewEncapsulation.None,
|
|
8056
8098
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
8057
8099
|
host: {
|
|
@@ -8453,7 +8495,7 @@ var MatCheckbox = /** @class */ (function (_super) {
|
|
|
8453
8495
|
// component will be only marked for check, but no actual change detection runs automatically.
|
|
8454
8496
|
// Instead of going back into the zone in order to trigger a change detection which causes
|
|
8455
8497
|
// *all* components to be checked (if explicitly marked or not using OnPush), we only trigger
|
|
8456
|
-
// an explicit change detection for the checkbox view and
|
|
8498
|
+
// an explicit change detection for the checkbox view and its children.
|
|
8457
8499
|
this._changeDetectorRef.detectChanges();
|
|
8458
8500
|
};
|
|
8459
8501
|
// Implemented as part of ControlValueAccessor.
|
|
@@ -8921,10 +8963,11 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
8921
8963
|
__extends(MatChip, _super);
|
|
8922
8964
|
function MatChip(_elementRef, _ngZone, platform$$1, globalRippleOptions,
|
|
8923
8965
|
// @breaking-change 8.0.0 `animationMode` parameter to become required.
|
|
8924
|
-
animationMode) {
|
|
8966
|
+
animationMode, _changeDetectorRef) {
|
|
8925
8967
|
var _this = _super.call(this, _elementRef) || this;
|
|
8926
8968
|
_this._elementRef = _elementRef;
|
|
8927
8969
|
_this._ngZone = _ngZone;
|
|
8970
|
+
_this._changeDetectorRef = _changeDetectorRef;
|
|
8928
8971
|
/**
|
|
8929
8972
|
* Whether the chip has focus.
|
|
8930
8973
|
*/
|
|
@@ -8962,7 +9005,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
8962
9005
|
_this.removed = new core.EventEmitter();
|
|
8963
9006
|
_this._addHostClassName();
|
|
8964
9007
|
_this._chipRipple = new RippleRenderer(_this, _ngZone, _elementRef, platform$$1);
|
|
8965
|
-
_this._chipRipple.setupTriggerEvents(_elementRef
|
|
9008
|
+
_this._chipRipple.setupTriggerEvents(_elementRef);
|
|
8966
9009
|
_this.rippleConfig = globalRippleOptions || {};
|
|
8967
9010
|
_this._animationsDisabled = animationMode === 'NoopAnimations';
|
|
8968
9011
|
return _this;
|
|
@@ -9012,7 +9055,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9012
9055
|
* @return {?}
|
|
9013
9056
|
*/
|
|
9014
9057
|
function () {
|
|
9015
|
-
return this._value
|
|
9058
|
+
return this._value !== undefined
|
|
9016
9059
|
? this._value
|
|
9017
9060
|
: this._elementRef.nativeElement.textContent;
|
|
9018
9061
|
},
|
|
@@ -9126,6 +9169,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9126
9169
|
if (!this._selected) {
|
|
9127
9170
|
this._selected = true;
|
|
9128
9171
|
this._dispatchSelectionChange();
|
|
9172
|
+
this._markForCheck();
|
|
9129
9173
|
}
|
|
9130
9174
|
};
|
|
9131
9175
|
/** Deselects the chip. */
|
|
@@ -9141,6 +9185,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9141
9185
|
if (this._selected) {
|
|
9142
9186
|
this._selected = false;
|
|
9143
9187
|
this._dispatchSelectionChange();
|
|
9188
|
+
this._markForCheck();
|
|
9144
9189
|
}
|
|
9145
9190
|
};
|
|
9146
9191
|
/** Select this chip and emit selected event */
|
|
@@ -9156,6 +9201,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9156
9201
|
if (!this._selected) {
|
|
9157
9202
|
this._selected = true;
|
|
9158
9203
|
this._dispatchSelectionChange(true);
|
|
9204
|
+
this._markForCheck();
|
|
9159
9205
|
}
|
|
9160
9206
|
};
|
|
9161
9207
|
/** Toggles the current selected state of this chip. */
|
|
@@ -9173,6 +9219,7 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9173
9219
|
if (isUserInput === void 0) { isUserInput = false; }
|
|
9174
9220
|
this._selected = !this.selected;
|
|
9175
9221
|
this._dispatchSelectionChange(isUserInput);
|
|
9222
|
+
this._markForCheck();
|
|
9176
9223
|
return this.selected;
|
|
9177
9224
|
};
|
|
9178
9225
|
/** Allows for programmatic focusing of the chip. */
|
|
@@ -9314,6 +9361,20 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9314
9361
|
selected: this._selected
|
|
9315
9362
|
});
|
|
9316
9363
|
};
|
|
9364
|
+
/**
|
|
9365
|
+
* @private
|
|
9366
|
+
* @return {?}
|
|
9367
|
+
*/
|
|
9368
|
+
MatChip.prototype._markForCheck = /**
|
|
9369
|
+
* @private
|
|
9370
|
+
* @return {?}
|
|
9371
|
+
*/
|
|
9372
|
+
function () {
|
|
9373
|
+
// @breaking-change 9.0.0 Remove this method once the _changeDetectorRef is a required param.
|
|
9374
|
+
if (this._changeDetectorRef) {
|
|
9375
|
+
this._changeDetectorRef.markForCheck();
|
|
9376
|
+
}
|
|
9377
|
+
};
|
|
9317
9378
|
MatChip.decorators = [
|
|
9318
9379
|
{ type: core.Directive, args: [{
|
|
9319
9380
|
selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",
|
|
@@ -9344,7 +9405,8 @@ var MatChip = /** @class */ (function (_super) {
|
|
|
9344
9405
|
{ type: core.NgZone },
|
|
9345
9406
|
{ type: platform.Platform },
|
|
9346
9407
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [MAT_RIPPLE_GLOBAL_OPTIONS,] }] },
|
|
9347
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
9408
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] },
|
|
9409
|
+
{ type: core.ChangeDetectorRef }
|
|
9348
9410
|
]; };
|
|
9349
9411
|
MatChip.propDecorators = {
|
|
9350
9412
|
avatar: [{ type: core.ContentChild, args: [MatChipAvatar, { static: false },] }],
|
|
@@ -11103,7 +11165,7 @@ MatDialogConfig = /** @class */ (function () {
|
|
|
11103
11165
|
*/
|
|
11104
11166
|
this.hasBackdrop = true;
|
|
11105
11167
|
/**
|
|
11106
|
-
* Custom class for the backdrop
|
|
11168
|
+
* Custom class for the backdrop.
|
|
11107
11169
|
*/
|
|
11108
11170
|
this.backdropClass = '';
|
|
11109
11171
|
/**
|
|
@@ -11119,7 +11181,7 @@ MatDialogConfig = /** @class */ (function () {
|
|
|
11119
11181
|
*/
|
|
11120
11182
|
this.height = '';
|
|
11121
11183
|
/**
|
|
11122
|
-
* Max-width of the dialog. If a number is provided, pixel units
|
|
11184
|
+
* Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw.
|
|
11123
11185
|
*/
|
|
11124
11186
|
this.maxWidth = '80vw';
|
|
11125
11187
|
/**
|
|
@@ -11135,7 +11197,7 @@ MatDialogConfig = /** @class */ (function () {
|
|
|
11135
11197
|
*/
|
|
11136
11198
|
this.ariaLabelledBy = null;
|
|
11137
11199
|
/**
|
|
11138
|
-
* Aria label to assign to the dialog element
|
|
11200
|
+
* Aria label to assign to the dialog element.
|
|
11139
11201
|
*/
|
|
11140
11202
|
this.ariaLabel = null;
|
|
11141
11203
|
/**
|
|
@@ -11489,6 +11551,10 @@ MatDialogRef = /** @class */ (function () {
|
|
|
11489
11551
|
* Subject for notifying the user that the dialog has started closing.
|
|
11490
11552
|
*/
|
|
11491
11553
|
this._beforeClosed = new rxjs.Subject();
|
|
11554
|
+
/**
|
|
11555
|
+
* Current state of the dialog.
|
|
11556
|
+
*/
|
|
11557
|
+
this._state = 0 /* OPEN */;
|
|
11492
11558
|
// Pass the id along to the container.
|
|
11493
11559
|
_containerInstance._id = id;
|
|
11494
11560
|
// Emit when opening animation completes
|
|
@@ -11574,6 +11640,7 @@ MatDialogRef = /** @class */ (function () {
|
|
|
11574
11640
|
function (event) {
|
|
11575
11641
|
_this._beforeClosed.next(dialogResult);
|
|
11576
11642
|
_this._beforeClosed.complete();
|
|
11643
|
+
_this._state = 2 /* CLOSED */;
|
|
11577
11644
|
_this._overlayRef.detachBackdrop();
|
|
11578
11645
|
// The logic that disposes of the overlay depends on the exit animation completing, however
|
|
11579
11646
|
// it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback
|
|
@@ -11588,6 +11655,7 @@ MatDialogRef = /** @class */ (function () {
|
|
|
11588
11655
|
}), event.totalTime + 100);
|
|
11589
11656
|
}));
|
|
11590
11657
|
this._containerInstance._startExitAnimation();
|
|
11658
|
+
this._state = 1 /* CLOSING */;
|
|
11591
11659
|
};
|
|
11592
11660
|
/**
|
|
11593
11661
|
* Gets an observable that is notified when the dialog is finished opening.
|
|
@@ -11801,6 +11869,18 @@ MatDialogRef = /** @class */ (function () {
|
|
|
11801
11869
|
function () {
|
|
11802
11870
|
return this.beforeClosed();
|
|
11803
11871
|
};
|
|
11872
|
+
/** Gets the current state of the dialog's lifecycle. */
|
|
11873
|
+
/**
|
|
11874
|
+
* Gets the current state of the dialog's lifecycle.
|
|
11875
|
+
* @return {?}
|
|
11876
|
+
*/
|
|
11877
|
+
MatDialogRef.prototype.getState = /**
|
|
11878
|
+
* Gets the current state of the dialog's lifecycle.
|
|
11879
|
+
* @return {?}
|
|
11880
|
+
*/
|
|
11881
|
+
function () {
|
|
11882
|
+
return this._state;
|
|
11883
|
+
};
|
|
11804
11884
|
/** Fetches the position strategy object from the overlay ref. */
|
|
11805
11885
|
/**
|
|
11806
11886
|
* Fetches the position strategy object from the overlay ref.
|
|
@@ -12132,7 +12212,7 @@ var MatDialog = /** @class */ (function () {
|
|
|
12132
12212
|
[MatDialogConfig, config]
|
|
12133
12213
|
]));
|
|
12134
12214
|
/** @type {?} */
|
|
12135
|
-
var containerPortal = new portal.ComponentPortal(MatDialogContainer, config.viewContainerRef, injector);
|
|
12215
|
+
var containerPortal = new portal.ComponentPortal(MatDialogContainer, config.viewContainerRef, injector, config.componentFactoryResolver);
|
|
12136
12216
|
/** @type {?} */
|
|
12137
12217
|
var containerRef = overlay$$1.attach(containerPortal);
|
|
12138
12218
|
return containerRef.instance;
|
|
@@ -12390,6 +12470,10 @@ var MatDialogClose = /** @class */ (function () {
|
|
|
12390
12470
|
this.dialogRef = dialogRef;
|
|
12391
12471
|
this._elementRef = _elementRef;
|
|
12392
12472
|
this._dialog = _dialog;
|
|
12473
|
+
/**
|
|
12474
|
+
* Default to "button" to prevents accidental form submits.
|
|
12475
|
+
*/
|
|
12476
|
+
this.type = 'button';
|
|
12393
12477
|
}
|
|
12394
12478
|
/**
|
|
12395
12479
|
* @return {?}
|
|
@@ -12429,7 +12513,7 @@ var MatDialogClose = /** @class */ (function () {
|
|
|
12429
12513
|
host: {
|
|
12430
12514
|
'(click)': 'dialogRef.close(dialogResult)',
|
|
12431
12515
|
'[attr.aria-label]': 'ariaLabel || null',
|
|
12432
|
-
'type': '
|
|
12516
|
+
'[attr.type]': 'type',
|
|
12433
12517
|
}
|
|
12434
12518
|
},] },
|
|
12435
12519
|
];
|
|
@@ -12441,6 +12525,7 @@ var MatDialogClose = /** @class */ (function () {
|
|
|
12441
12525
|
]; };
|
|
12442
12526
|
MatDialogClose.propDecorators = {
|
|
12443
12527
|
ariaLabel: [{ type: core.Input, args: ['aria-label',] }],
|
|
12528
|
+
type: [{ type: core.Input }],
|
|
12444
12529
|
dialogResult: [{ type: core.Input, args: ['mat-dialog-close',] }],
|
|
12445
12530
|
_matDialogClose: [{ type: core.Input, args: ['matDialogClose',] }]
|
|
12446
12531
|
};
|
|
@@ -13400,6 +13485,22 @@ var MatDatepickerIntl = /** @class */ (function () {
|
|
|
13400
13485
|
*/
|
|
13401
13486
|
this.switchToMultiYearViewLabel = 'Choose month and year';
|
|
13402
13487
|
}
|
|
13488
|
+
/** Formats a range of years. */
|
|
13489
|
+
/**
|
|
13490
|
+
* Formats a range of years.
|
|
13491
|
+
* @param {?} start
|
|
13492
|
+
* @param {?} end
|
|
13493
|
+
* @return {?}
|
|
13494
|
+
*/
|
|
13495
|
+
MatDatepickerIntl.prototype.formatYearRange = /**
|
|
13496
|
+
* Formats a range of years.
|
|
13497
|
+
* @param {?} start
|
|
13498
|
+
* @param {?} end
|
|
13499
|
+
* @return {?}
|
|
13500
|
+
*/
|
|
13501
|
+
function (start, end) {
|
|
13502
|
+
return start + " \u2013 " + end;
|
|
13503
|
+
};
|
|
13403
13504
|
MatDatepickerIntl.decorators = [
|
|
13404
13505
|
{ type: core.Injectable, args: [{ providedIn: 'root' },] },
|
|
13405
13506
|
];
|
|
@@ -13981,7 +14082,7 @@ var MatMonthView = /** @class */ (function () {
|
|
|
13981
14082
|
};
|
|
13982
14083
|
MatMonthView.decorators = [
|
|
13983
14084
|
{ type: core.Component, args: [{selector: 'mat-month-view',
|
|
13984
|
-
template: "<table class=\"mat-calendar-table\" role=\"presentation\"><thead class=\"mat-calendar-table-header\"><tr><th *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th></tr><tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr></thead><tbody mat-calendar-body [label]=\"_monthLabel\" [rows]=\"_weeks\" [todayValue]=\"_todayDate\" [selectedValue]=\"_selectedDate\" [labelMinRequiredCells]=\"3\" [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\" (selectedValueChange)=\"_dateSelected($event)\" (keydown)=\"_handleCalendarBodyKeydown($event)\"></tbody></table>",
|
|
14085
|
+
template: "<table class=\"mat-calendar-table\" role=\"presentation\"><thead class=\"mat-calendar-table-header\"><tr><th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th></tr><tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr></thead><tbody mat-calendar-body [label]=\"_monthLabel\" [rows]=\"_weeks\" [todayValue]=\"_todayDate\" [selectedValue]=\"_selectedDate\" [labelMinRequiredCells]=\"3\" [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\" (selectedValueChange)=\"_dateSelected($event)\" (keydown)=\"_handleCalendarBodyKeydown($event)\"></tbody></table>",
|
|
13985
14086
|
exportAs: 'matMonthView',
|
|
13986
14087
|
encapsulation: core.ViewEncapsulation.None,
|
|
13987
14088
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
@@ -14921,7 +15022,11 @@ var MatCalendarHeader = /** @class */ (function () {
|
|
|
14921
15022
|
var minYearOfPage = activeYear - getActiveOffset(this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);
|
|
14922
15023
|
/** @type {?} */
|
|
14923
15024
|
var maxYearOfPage = minYearOfPage + yearsPerPage - 1;
|
|
14924
|
-
|
|
15025
|
+
/** @type {?} */
|
|
15026
|
+
var minYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(minYearOfPage, 0, 1));
|
|
15027
|
+
/** @type {?} */
|
|
15028
|
+
var maxYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(maxYearOfPage, 0, 1));
|
|
15029
|
+
return this._intl.formatYearRange(minYearName, maxYearName);
|
|
14925
15030
|
},
|
|
14926
15031
|
enumerable: true,
|
|
14927
15032
|
configurable: true
|
|
@@ -19202,7 +19307,8 @@ var /**
|
|
|
19202
19307
|
* \@docs-private
|
|
19203
19308
|
*/
|
|
19204
19309
|
SvgIconConfig = /** @class */ (function () {
|
|
19205
|
-
function SvgIconConfig(data) {
|
|
19310
|
+
function SvgIconConfig(data, options) {
|
|
19311
|
+
this.options = options;
|
|
19206
19312
|
// Note that we can't use `instanceof SVGElement` here,
|
|
19207
19313
|
// because it'll break during server-side rendering.
|
|
19208
19314
|
if (!!((/** @type {?} */ (data))).nodeName) {
|
|
@@ -19222,9 +19328,10 @@ SvgIconConfig = /** @class */ (function () {
|
|
|
19222
19328
|
* - Loads icons from URLs and extracts individual icons from icon sets.
|
|
19223
19329
|
*/
|
|
19224
19330
|
var MatIconRegistry = /** @class */ (function () {
|
|
19225
|
-
function MatIconRegistry(_httpClient, _sanitizer, document) {
|
|
19331
|
+
function MatIconRegistry(_httpClient, _sanitizer, document, _errorHandler) {
|
|
19226
19332
|
this._httpClient = _httpClient;
|
|
19227
19333
|
this._sanitizer = _sanitizer;
|
|
19334
|
+
this._errorHandler = _errorHandler;
|
|
19228
19335
|
/**
|
|
19229
19336
|
* URLs and cached SVG elements for individual icons. Keys are of the format "[namespace]:[icon]".
|
|
19230
19337
|
*/
|
|
@@ -19265,6 +19372,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19265
19372
|
* @this {THIS}
|
|
19266
19373
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19267
19374
|
* @param {?} url
|
|
19375
|
+
* @param {?=} options
|
|
19268
19376
|
* @return {THIS}
|
|
19269
19377
|
*/
|
|
19270
19378
|
MatIconRegistry.prototype.addSvgIcon = /**
|
|
@@ -19273,10 +19381,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19273
19381
|
* @this {THIS}
|
|
19274
19382
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19275
19383
|
* @param {?} url
|
|
19384
|
+
* @param {?=} options
|
|
19276
19385
|
* @return {THIS}
|
|
19277
19386
|
*/
|
|
19278
|
-
function (iconName, url) {
|
|
19279
|
-
return (/** @type {?} */ (this)).addSvgIconInNamespace('', iconName, url);
|
|
19387
|
+
function (iconName, url, options) {
|
|
19388
|
+
return (/** @type {?} */ (this)).addSvgIconInNamespace('', iconName, url, options);
|
|
19280
19389
|
};
|
|
19281
19390
|
/**
|
|
19282
19391
|
* Registers an icon using an HTML string in the default namespace.
|
|
@@ -19289,6 +19398,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19289
19398
|
* @this {THIS}
|
|
19290
19399
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19291
19400
|
* @param {?} literal SVG source of the icon.
|
|
19401
|
+
* @param {?=} options
|
|
19292
19402
|
* @return {THIS}
|
|
19293
19403
|
*/
|
|
19294
19404
|
MatIconRegistry.prototype.addSvgIconLiteral = /**
|
|
@@ -19297,10 +19407,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19297
19407
|
* @this {THIS}
|
|
19298
19408
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19299
19409
|
* @param {?} literal SVG source of the icon.
|
|
19410
|
+
* @param {?=} options
|
|
19300
19411
|
* @return {THIS}
|
|
19301
19412
|
*/
|
|
19302
|
-
function (iconName, literal) {
|
|
19303
|
-
return (/** @type {?} */ (this)).addSvgIconLiteralInNamespace('', iconName, literal);
|
|
19413
|
+
function (iconName, literal, options) {
|
|
19414
|
+
return (/** @type {?} */ (this)).addSvgIconLiteralInNamespace('', iconName, literal, options);
|
|
19304
19415
|
};
|
|
19305
19416
|
/**
|
|
19306
19417
|
* Registers an icon by URL in the specified namespace.
|
|
@@ -19315,6 +19426,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19315
19426
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
19316
19427
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19317
19428
|
* @param {?} url
|
|
19429
|
+
* @param {?=} options
|
|
19318
19430
|
* @return {THIS}
|
|
19319
19431
|
*/
|
|
19320
19432
|
MatIconRegistry.prototype.addSvgIconInNamespace = /**
|
|
@@ -19324,10 +19436,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19324
19436
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
19325
19437
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19326
19438
|
* @param {?} url
|
|
19439
|
+
* @param {?=} options
|
|
19327
19440
|
* @return {THIS}
|
|
19328
19441
|
*/
|
|
19329
|
-
function (namespace, iconName, url) {
|
|
19330
|
-
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));
|
|
19442
|
+
function (namespace, iconName, url, options) {
|
|
19443
|
+
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, options));
|
|
19331
19444
|
};
|
|
19332
19445
|
/**
|
|
19333
19446
|
* Registers an icon using an HTML string in the specified namespace.
|
|
@@ -19342,6 +19455,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19342
19455
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
19343
19456
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19344
19457
|
* @param {?} literal SVG source of the icon.
|
|
19458
|
+
* @param {?=} options
|
|
19345
19459
|
* @return {THIS}
|
|
19346
19460
|
*/
|
|
19347
19461
|
MatIconRegistry.prototype.addSvgIconLiteralInNamespace = /**
|
|
@@ -19351,17 +19465,18 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19351
19465
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
19352
19466
|
* @param {?} iconName Name under which the icon should be registered.
|
|
19353
19467
|
* @param {?} literal SVG source of the icon.
|
|
19468
|
+
* @param {?=} options
|
|
19354
19469
|
* @return {THIS}
|
|
19355
19470
|
*/
|
|
19356
|
-
function (namespace, iconName, literal) {
|
|
19471
|
+
function (namespace, iconName, literal, options) {
|
|
19357
19472
|
/** @type {?} */
|
|
19358
19473
|
var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
19359
19474
|
if (!sanitizedLiteral) {
|
|
19360
19475
|
throw getMatIconFailedToSanitizeLiteralError(literal);
|
|
19361
19476
|
}
|
|
19362
19477
|
/** @type {?} */
|
|
19363
|
-
var svgElement = (/** @type {?} */ (this))._createSvgElementForSingleIcon(sanitizedLiteral);
|
|
19364
|
-
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));
|
|
19478
|
+
var svgElement = (/** @type {?} */ (this))._createSvgElementForSingleIcon(sanitizedLiteral, options);
|
|
19479
|
+
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement, options));
|
|
19365
19480
|
};
|
|
19366
19481
|
/**
|
|
19367
19482
|
* Registers an icon set by URL in the default namespace.
|
|
@@ -19372,6 +19487,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19372
19487
|
* @template THIS
|
|
19373
19488
|
* @this {THIS}
|
|
19374
19489
|
* @param {?} url
|
|
19490
|
+
* @param {?=} options
|
|
19375
19491
|
* @return {THIS}
|
|
19376
19492
|
*/
|
|
19377
19493
|
MatIconRegistry.prototype.addSvgIconSet = /**
|
|
@@ -19379,10 +19495,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19379
19495
|
* @template THIS
|
|
19380
19496
|
* @this {THIS}
|
|
19381
19497
|
* @param {?} url
|
|
19498
|
+
* @param {?=} options
|
|
19382
19499
|
* @return {THIS}
|
|
19383
19500
|
*/
|
|
19384
|
-
function (url) {
|
|
19385
|
-
return (/** @type {?} */ (this)).addSvgIconSetInNamespace('', url);
|
|
19501
|
+
function (url, options) {
|
|
19502
|
+
return (/** @type {?} */ (this)).addSvgIconSetInNamespace('', url, options);
|
|
19386
19503
|
};
|
|
19387
19504
|
/**
|
|
19388
19505
|
* Registers an icon set using an HTML string in the default namespace.
|
|
@@ -19393,6 +19510,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19393
19510
|
* @template THIS
|
|
19394
19511
|
* @this {THIS}
|
|
19395
19512
|
* @param {?} literal SVG source of the icon set.
|
|
19513
|
+
* @param {?=} options
|
|
19396
19514
|
* @return {THIS}
|
|
19397
19515
|
*/
|
|
19398
19516
|
MatIconRegistry.prototype.addSvgIconSetLiteral = /**
|
|
@@ -19400,10 +19518,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19400
19518
|
* @template THIS
|
|
19401
19519
|
* @this {THIS}
|
|
19402
19520
|
* @param {?} literal SVG source of the icon set.
|
|
19521
|
+
* @param {?=} options
|
|
19403
19522
|
* @return {THIS}
|
|
19404
19523
|
*/
|
|
19405
|
-
function (literal) {
|
|
19406
|
-
return (/** @type {?} */ (this)).addSvgIconSetLiteralInNamespace('', literal);
|
|
19524
|
+
function (literal, options) {
|
|
19525
|
+
return (/** @type {?} */ (this)).addSvgIconSetLiteralInNamespace('', literal, options);
|
|
19407
19526
|
};
|
|
19408
19527
|
/**
|
|
19409
19528
|
* Registers an icon set by URL in the specified namespace.
|
|
@@ -19416,6 +19535,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19416
19535
|
* @this {THIS}
|
|
19417
19536
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
19418
19537
|
* @param {?} url
|
|
19538
|
+
* @param {?=} options
|
|
19419
19539
|
* @return {THIS}
|
|
19420
19540
|
*/
|
|
19421
19541
|
MatIconRegistry.prototype.addSvgIconSetInNamespace = /**
|
|
@@ -19424,10 +19544,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19424
19544
|
* @this {THIS}
|
|
19425
19545
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
19426
19546
|
* @param {?} url
|
|
19547
|
+
* @param {?=} options
|
|
19427
19548
|
* @return {THIS}
|
|
19428
19549
|
*/
|
|
19429
|
-
function (namespace, url) {
|
|
19430
|
-
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(url));
|
|
19550
|
+
function (namespace, url, options) {
|
|
19551
|
+
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(url, options));
|
|
19431
19552
|
};
|
|
19432
19553
|
/**
|
|
19433
19554
|
* Registers an icon set using an HTML string in the specified namespace.
|
|
@@ -19440,6 +19561,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19440
19561
|
* @this {THIS}
|
|
19441
19562
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
19442
19563
|
* @param {?} literal SVG source of the icon set.
|
|
19564
|
+
* @param {?=} options
|
|
19443
19565
|
* @return {THIS}
|
|
19444
19566
|
*/
|
|
19445
19567
|
MatIconRegistry.prototype.addSvgIconSetLiteralInNamespace = /**
|
|
@@ -19448,9 +19570,10 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19448
19570
|
* @this {THIS}
|
|
19449
19571
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
19450
19572
|
* @param {?} literal SVG source of the icon set.
|
|
19573
|
+
* @param {?=} options
|
|
19451
19574
|
* @return {THIS}
|
|
19452
19575
|
*/
|
|
19453
|
-
function (namespace, literal) {
|
|
19576
|
+
function (namespace, literal, options) {
|
|
19454
19577
|
/** @type {?} */
|
|
19455
19578
|
var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
19456
19579
|
if (!sanitizedLiteral) {
|
|
@@ -19458,7 +19581,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19458
19581
|
}
|
|
19459
19582
|
/** @type {?} */
|
|
19460
19583
|
var svgElement = (/** @type {?} */ (this))._svgElementFromString(sanitizedLiteral);
|
|
19461
|
-
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));
|
|
19584
|
+
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement, options));
|
|
19462
19585
|
};
|
|
19463
19586
|
/**
|
|
19464
19587
|
* Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
|
|
@@ -19762,7 +19885,15 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19762
19885
|
var url = _this._sanitizer.sanitize(core.SecurityContext.RESOURCE_URL, iconSetConfig.url);
|
|
19763
19886
|
// Swallow errors fetching individual URLs so the
|
|
19764
19887
|
// combined Observable won't necessarily fail.
|
|
19765
|
-
|
|
19888
|
+
/** @type {?} */
|
|
19889
|
+
var errorMessage = "Loading icon set URL: " + url + " failed: " + err.message;
|
|
19890
|
+
// @breaking-change 9.0.0 _errorHandler parameter to be made required
|
|
19891
|
+
if (_this._errorHandler) {
|
|
19892
|
+
_this._errorHandler.handleError(new Error(errorMessage));
|
|
19893
|
+
}
|
|
19894
|
+
else {
|
|
19895
|
+
console.error(errorMessage);
|
|
19896
|
+
}
|
|
19766
19897
|
return rxjs.of(null);
|
|
19767
19898
|
})));
|
|
19768
19899
|
}));
|
|
@@ -19810,7 +19941,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19810
19941
|
var config = iconSetConfigs[i];
|
|
19811
19942
|
if (config.svgElement) {
|
|
19812
19943
|
/** @type {?} */
|
|
19813
|
-
var foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);
|
|
19944
|
+
var foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName, config.options);
|
|
19814
19945
|
if (foundIcon) {
|
|
19815
19946
|
return foundIcon;
|
|
19816
19947
|
}
|
|
@@ -19843,7 +19974,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19843
19974
|
* @param {?} svgText
|
|
19844
19975
|
* @return {?}
|
|
19845
19976
|
*/
|
|
19846
|
-
function (svgText) { return _this._createSvgElementForSingleIcon(svgText); })));
|
|
19977
|
+
function (svgText) { return _this._createSvgElementForSingleIcon(svgText, config.options); })));
|
|
19847
19978
|
};
|
|
19848
19979
|
/**
|
|
19849
19980
|
* Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
|
|
@@ -19889,18 +20020,20 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19889
20020
|
* Creates a DOM element from the given SVG string, and adds default attributes.
|
|
19890
20021
|
* @private
|
|
19891
20022
|
* @param {?} responseText
|
|
20023
|
+
* @param {?=} options
|
|
19892
20024
|
* @return {?}
|
|
19893
20025
|
*/
|
|
19894
20026
|
MatIconRegistry.prototype._createSvgElementForSingleIcon = /**
|
|
19895
20027
|
* Creates a DOM element from the given SVG string, and adds default attributes.
|
|
19896
20028
|
* @private
|
|
19897
20029
|
* @param {?} responseText
|
|
20030
|
+
* @param {?=} options
|
|
19898
20031
|
* @return {?}
|
|
19899
20032
|
*/
|
|
19900
|
-
function (responseText) {
|
|
20033
|
+
function (responseText, options) {
|
|
19901
20034
|
/** @type {?} */
|
|
19902
20035
|
var svg = this._svgElementFromString(responseText);
|
|
19903
|
-
this._setSvgAttributes(svg);
|
|
20036
|
+
this._setSvgAttributes(svg, options);
|
|
19904
20037
|
return svg;
|
|
19905
20038
|
};
|
|
19906
20039
|
/**
|
|
@@ -19915,6 +20048,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19915
20048
|
* @private
|
|
19916
20049
|
* @param {?} iconSet
|
|
19917
20050
|
* @param {?} iconName
|
|
20051
|
+
* @param {?=} options
|
|
19918
20052
|
* @return {?}
|
|
19919
20053
|
*/
|
|
19920
20054
|
MatIconRegistry.prototype._extractSvgIconFromSet = /**
|
|
@@ -19924,9 +20058,10 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19924
20058
|
* @private
|
|
19925
20059
|
* @param {?} iconSet
|
|
19926
20060
|
* @param {?} iconName
|
|
20061
|
+
* @param {?=} options
|
|
19927
20062
|
* @return {?}
|
|
19928
20063
|
*/
|
|
19929
|
-
function (iconSet, iconName) {
|
|
20064
|
+
function (iconSet, iconName, options) {
|
|
19930
20065
|
// Use the `id="iconName"` syntax in order to escape special
|
|
19931
20066
|
// characters in the ID (versus using the #iconName syntax).
|
|
19932
20067
|
/** @type {?} */
|
|
@@ -19942,13 +20077,13 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19942
20077
|
// If the icon node is itself an <svg> node, clone and return it directly. If not, set it as
|
|
19943
20078
|
// the content of a new <svg> node.
|
|
19944
20079
|
if (iconElement.nodeName.toLowerCase() === 'svg') {
|
|
19945
|
-
return this._setSvgAttributes((/** @type {?} */ (iconElement)));
|
|
20080
|
+
return this._setSvgAttributes((/** @type {?} */ (iconElement)), options);
|
|
19946
20081
|
}
|
|
19947
20082
|
// If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note
|
|
19948
20083
|
// that the same could be achieved by referring to it via <use href="#id">, however the <use>
|
|
19949
20084
|
// tag is problematic on Firefox, because it needs to include the current page path.
|
|
19950
20085
|
if (iconElement.nodeName.toLowerCase() === 'symbol') {
|
|
19951
|
-
return this._setSvgAttributes(this._toSvgElement(iconElement));
|
|
20086
|
+
return this._setSvgAttributes(this._toSvgElement(iconElement), options);
|
|
19952
20087
|
}
|
|
19953
20088
|
// createElement('SVG') doesn't work as expected; the DOM ends up with
|
|
19954
20089
|
// the correct nodes, but the SVG content doesn't render. Instead we
|
|
@@ -19959,7 +20094,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
19959
20094
|
var svg = this._svgElementFromString('<svg></svg>');
|
|
19960
20095
|
// Clone the node so we don't remove it from the parent icon set element.
|
|
19961
20096
|
svg.appendChild(iconElement);
|
|
19962
|
-
return this._setSvgAttributes(svg);
|
|
20097
|
+
return this._setSvgAttributes(svg, options);
|
|
19963
20098
|
};
|
|
19964
20099
|
/**
|
|
19965
20100
|
* Creates a DOM element from the given SVG string.
|
|
@@ -20005,6 +20140,15 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
20005
20140
|
function (element) {
|
|
20006
20141
|
/** @type {?} */
|
|
20007
20142
|
var svg = this._svgElementFromString('<svg></svg>');
|
|
20143
|
+
/** @type {?} */
|
|
20144
|
+
var attributes = element.attributes;
|
|
20145
|
+
// Copy over all the attributes from the `symbol` to the new SVG, except the id.
|
|
20146
|
+
for (var i = 0; i < attributes.length; i++) {
|
|
20147
|
+
var _a = attributes[i], name_1 = _a.name, value = _a.value;
|
|
20148
|
+
if (name_1 !== 'id') {
|
|
20149
|
+
svg.setAttribute(name_1, value);
|
|
20150
|
+
}
|
|
20151
|
+
}
|
|
20008
20152
|
for (var i = 0; i < element.childNodes.length; i++) {
|
|
20009
20153
|
if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {
|
|
20010
20154
|
svg.appendChild(element.childNodes[i].cloneNode(true));
|
|
@@ -20019,20 +20163,25 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
20019
20163
|
* Sets the default attributes for an SVG element to be used as an icon.
|
|
20020
20164
|
* @private
|
|
20021
20165
|
* @param {?} svg
|
|
20166
|
+
* @param {?=} options
|
|
20022
20167
|
* @return {?}
|
|
20023
20168
|
*/
|
|
20024
20169
|
MatIconRegistry.prototype._setSvgAttributes = /**
|
|
20025
20170
|
* Sets the default attributes for an SVG element to be used as an icon.
|
|
20026
20171
|
* @private
|
|
20027
20172
|
* @param {?} svg
|
|
20173
|
+
* @param {?=} options
|
|
20028
20174
|
* @return {?}
|
|
20029
20175
|
*/
|
|
20030
|
-
function (svg) {
|
|
20176
|
+
function (svg, options) {
|
|
20031
20177
|
svg.setAttribute('fit', '');
|
|
20032
20178
|
svg.setAttribute('height', '100%');
|
|
20033
20179
|
svg.setAttribute('width', '100%');
|
|
20034
20180
|
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
|
20035
20181
|
svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.
|
|
20182
|
+
if (options && options.viewBox) {
|
|
20183
|
+
svg.setAttribute('viewBox', options.viewBox);
|
|
20184
|
+
}
|
|
20036
20185
|
return svg;
|
|
20037
20186
|
};
|
|
20038
20187
|
/**
|
|
@@ -20155,9 +20304,10 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
20155
20304
|
MatIconRegistry.ctorParameters = function () { return [
|
|
20156
20305
|
{ type: http.HttpClient, decorators: [{ type: core.Optional }] },
|
|
20157
20306
|
{ type: platformBrowser.DomSanitizer },
|
|
20158
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
20307
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
20308
|
+
{ type: core.ErrorHandler, decorators: [{ type: core.Optional }] }
|
|
20159
20309
|
]; };
|
|
20160
|
-
/** @nocollapse */ MatIconRegistry.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MatIconRegistry_Factory() { return new MatIconRegistry(core.ɵɵinject(http.HttpClient, 8), core.ɵɵinject(platformBrowser.DomSanitizer), core.ɵɵinject(common.DOCUMENT, 8)); }, token: MatIconRegistry, providedIn: "root" });
|
|
20310
|
+
/** @nocollapse */ MatIconRegistry.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MatIconRegistry_Factory() { return new MatIconRegistry(core.ɵɵinject(http.HttpClient, 8), core.ɵɵinject(platformBrowser.DomSanitizer), core.ɵɵinject(common.DOCUMENT, 8), core.ɵɵinject(core.ErrorHandler, 8)); }, token: MatIconRegistry, providedIn: "root" });
|
|
20161
20311
|
return MatIconRegistry;
|
|
20162
20312
|
}());
|
|
20163
20313
|
/**
|
|
@@ -20166,10 +20316,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
20166
20316
|
* @param {?} httpClient
|
|
20167
20317
|
* @param {?} sanitizer
|
|
20168
20318
|
* @param {?=} document
|
|
20319
|
+
* @param {?=} errorHandler
|
|
20169
20320
|
* @return {?}
|
|
20170
20321
|
*/
|
|
20171
|
-
function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document) {
|
|
20172
|
-
return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);
|
|
20322
|
+
function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document, errorHandler) {
|
|
20323
|
+
return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);
|
|
20173
20324
|
}
|
|
20174
20325
|
/**
|
|
20175
20326
|
* \@docs-private
|
|
@@ -20182,6 +20333,7 @@ var ICON_REGISTRY_PROVIDER = {
|
|
|
20182
20333
|
[new core.Optional(), new core.SkipSelf(), MatIconRegistry],
|
|
20183
20334
|
[new core.Optional(), http.HttpClient],
|
|
20184
20335
|
platformBrowser.DomSanitizer,
|
|
20336
|
+
[new core.Optional(), core.ErrorHandler],
|
|
20185
20337
|
[new core.Optional(), (/** @type {?} */ (common.DOCUMENT))],
|
|
20186
20338
|
],
|
|
20187
20339
|
useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
|
|
@@ -20315,10 +20467,11 @@ var funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
|
|
|
20315
20467
|
*/
|
|
20316
20468
|
var MatIcon = /** @class */ (function (_super) {
|
|
20317
20469
|
__extends(MatIcon, _super);
|
|
20318
|
-
function MatIcon(elementRef, _iconRegistry, ariaHidden, _location) {
|
|
20470
|
+
function MatIcon(elementRef, _iconRegistry, ariaHidden, _location, _errorHandler) {
|
|
20319
20471
|
var _this = _super.call(this, elementRef) || this;
|
|
20320
20472
|
_this._iconRegistry = _iconRegistry;
|
|
20321
20473
|
_this._location = _location;
|
|
20474
|
+
_this._errorHandler = _errorHandler;
|
|
20322
20475
|
_this._inline = false;
|
|
20323
20476
|
// If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
|
|
20324
20477
|
// the right thing to do for the majority of icon use-cases.
|
|
@@ -20456,8 +20609,10 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
20456
20609
|
var svgIconChanges = changes['svgIcon'];
|
|
20457
20610
|
if (svgIconChanges) {
|
|
20458
20611
|
if (this.svgIcon) {
|
|
20459
|
-
var _a = this._splitIconName(this.svgIcon),
|
|
20460
|
-
this._iconRegistry.getNamedSvgIcon(
|
|
20612
|
+
var _a = this._splitIconName(this.svgIcon), namespace_1 = _a[0], iconName_1 = _a[1];
|
|
20613
|
+
this._iconRegistry.getNamedSvgIcon(iconName_1, namespace_1)
|
|
20614
|
+
.pipe(operators.take(1))
|
|
20615
|
+
.subscribe((/**
|
|
20461
20616
|
* @param {?} svg
|
|
20462
20617
|
* @return {?}
|
|
20463
20618
|
*/
|
|
@@ -20465,7 +20620,17 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
20465
20620
|
* @param {?} err
|
|
20466
20621
|
* @return {?}
|
|
20467
20622
|
*/
|
|
20468
|
-
function (err) {
|
|
20623
|
+
function (err) {
|
|
20624
|
+
/** @type {?} */
|
|
20625
|
+
var errorMessage = "Error retrieving icon " + namespace_1 + ":" + iconName_1 + "! " + err.message;
|
|
20626
|
+
// @breaking-change 9.0.0 _errorHandler parameter to be made required.
|
|
20627
|
+
if (_this._errorHandler) {
|
|
20628
|
+
_this._errorHandler.handleError(new Error(errorMessage));
|
|
20629
|
+
}
|
|
20630
|
+
else {
|
|
20631
|
+
console.error(errorMessage);
|
|
20632
|
+
}
|
|
20633
|
+
}));
|
|
20469
20634
|
}
|
|
20470
20635
|
else if (svgIconChanges.previousValue) {
|
|
20471
20636
|
this._clearSvgElement();
|
|
@@ -20767,7 +20932,8 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
20767
20932
|
{ type: core.ElementRef },
|
|
20768
20933
|
{ type: MatIconRegistry },
|
|
20769
20934
|
{ type: String, decorators: [{ type: core.Attribute, args: ['aria-hidden',] }] },
|
|
20770
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [MAT_ICON_LOCATION,] }] }
|
|
20935
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [MAT_ICON_LOCATION,] }] },
|
|
20936
|
+
{ type: core.ErrorHandler, decorators: [{ type: core.Optional }] }
|
|
20771
20937
|
]; };
|
|
20772
20938
|
MatIcon.propDecorators = {
|
|
20773
20939
|
inline: [{ type: core.Input }],
|
|
@@ -21476,8 +21642,11 @@ var MatListOption = /** @class */ (function (_super) {
|
|
|
21476
21642
|
'[class.mat-list-item-with-avatar]': '_avatar || _icon',
|
|
21477
21643
|
// Manually set the "primary" or "warn" class if the color has been explicitly
|
|
21478
21644
|
// set to "primary" or "warn". The pseudo checkbox picks up these classes for
|
|
21479
|
-
// its theme.
|
|
21645
|
+
// its theme.
|
|
21480
21646
|
'[class.mat-primary]': 'color === "primary"',
|
|
21647
|
+
// Even though accent is the default, we need to set this class anyway, because the list might
|
|
21648
|
+
// be placed inside a parent that has one of the other colors with a higher specificity.
|
|
21649
|
+
'[class.mat-accent]': 'color !== "primary" && color !== "warn"',
|
|
21481
21650
|
'[class.mat-warn]': 'color === "warn"',
|
|
21482
21651
|
'[attr.aria-selected]': 'selected',
|
|
21483
21652
|
'[attr.aria-disabled]': 'disabled',
|
|
@@ -22991,8 +23160,9 @@ var _MatMenuBase = /** @class */ (function () {
|
|
|
22991
23160
|
* @return {?}
|
|
22992
23161
|
*/
|
|
22993
23162
|
function (origin) {
|
|
22994
|
-
var _this = this;
|
|
22995
23163
|
if (origin === void 0) { origin = 'program'; }
|
|
23164
|
+
/** @type {?} */
|
|
23165
|
+
var manager = this._keyManager;
|
|
22996
23166
|
// When the content is rendered lazily, it takes a bit before the items are inside the DOM.
|
|
22997
23167
|
if (this.lazyContent) {
|
|
22998
23168
|
this._ngZone.onStable.asObservable()
|
|
@@ -23000,10 +23170,30 @@ var _MatMenuBase = /** @class */ (function () {
|
|
|
23000
23170
|
.subscribe((/**
|
|
23001
23171
|
* @return {?}
|
|
23002
23172
|
*/
|
|
23003
|
-
function () { return
|
|
23173
|
+
function () { return manager.setFocusOrigin(origin).setFirstItemActive(); }));
|
|
23004
23174
|
}
|
|
23005
23175
|
else {
|
|
23006
|
-
|
|
23176
|
+
manager.setFocusOrigin(origin).setFirstItemActive();
|
|
23177
|
+
}
|
|
23178
|
+
// If there's no active item at this point, it means that all the items are disabled.
|
|
23179
|
+
// Move focus to the menu panel so keyboard events like Escape still work. Also this will
|
|
23180
|
+
// give _some_ feedback to screen readers.
|
|
23181
|
+
if (!manager.activeItem && this._directDescendantItems.length) {
|
|
23182
|
+
/** @type {?} */
|
|
23183
|
+
var element = this._directDescendantItems.first._getHostElement().parentElement;
|
|
23184
|
+
// Because the `mat-menu` is at the DOM insertion point, not inside the overlay, we don't
|
|
23185
|
+
// have a nice way of getting a hold of the menu panel. We can't use a `ViewChild` either
|
|
23186
|
+
// because the panel is inside an `ng-template`. We work around it by starting from one of
|
|
23187
|
+
// the items and walking up the DOM.
|
|
23188
|
+
while (element) {
|
|
23189
|
+
if (element.getAttribute('role') === 'menu') {
|
|
23190
|
+
element.focus();
|
|
23191
|
+
break;
|
|
23192
|
+
}
|
|
23193
|
+
else {
|
|
23194
|
+
element = element.parentElement;
|
|
23195
|
+
}
|
|
23196
|
+
}
|
|
23007
23197
|
}
|
|
23008
23198
|
};
|
|
23009
23199
|
/**
|
|
@@ -23615,19 +23805,20 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
23615
23805
|
complete: (/**
|
|
23616
23806
|
* @return {?}
|
|
23617
23807
|
*/
|
|
23618
|
-
function () { return _this.
|
|
23808
|
+
function () { return _this._setIsMenuOpen(false); })
|
|
23619
23809
|
});
|
|
23620
23810
|
}
|
|
23621
23811
|
else {
|
|
23622
|
-
this.
|
|
23812
|
+
this._setIsMenuOpen(false);
|
|
23623
23813
|
}
|
|
23624
23814
|
}
|
|
23625
23815
|
else {
|
|
23626
|
-
this.
|
|
23816
|
+
this._setIsMenuOpen(false);
|
|
23627
23817
|
if (menu.lazyContent) {
|
|
23628
23818
|
menu.lazyContent.detach();
|
|
23629
23819
|
}
|
|
23630
23820
|
}
|
|
23821
|
+
this._restoreFocus();
|
|
23631
23822
|
};
|
|
23632
23823
|
/**
|
|
23633
23824
|
* This method sets the menu state to open and focuses the first item if
|
|
@@ -23676,24 +23867,18 @@ var MatMenuTrigger = /** @class */ (function () {
|
|
|
23676
23867
|
this.menu.setElevation(depth);
|
|
23677
23868
|
}
|
|
23678
23869
|
};
|
|
23870
|
+
/** Restores focus to the element that was focused before the menu was open. */
|
|
23679
23871
|
/**
|
|
23680
|
-
*
|
|
23681
|
-
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
23682
|
-
*/
|
|
23683
|
-
/**
|
|
23684
|
-
* This method resets the menu when it's closed, most importantly restoring
|
|
23685
|
-
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
23872
|
+
* Restores focus to the element that was focused before the menu was open.
|
|
23686
23873
|
* @private
|
|
23687
23874
|
* @return {?}
|
|
23688
23875
|
*/
|
|
23689
|
-
MatMenuTrigger.prototype.
|
|
23690
|
-
*
|
|
23691
|
-
* focus to the menu trigger if the menu was opened via the keyboard.
|
|
23876
|
+
MatMenuTrigger.prototype._restoreFocus = /**
|
|
23877
|
+
* Restores focus to the element that was focused before the menu was open.
|
|
23692
23878
|
* @private
|
|
23693
23879
|
* @return {?}
|
|
23694
23880
|
*/
|
|
23695
23881
|
function () {
|
|
23696
|
-
this._setIsMenuOpen(false);
|
|
23697
23882
|
// We should reset focus if the user is navigating using a keyboard or
|
|
23698
23883
|
// if we have a top-level trigger which might cause focus to be lost
|
|
23699
23884
|
// when clicking on the backdrop.
|
|
@@ -24822,6 +25007,9 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
24822
25007
|
if (changes['disabled']) {
|
|
24823
25008
|
this.stateChanges.next();
|
|
24824
25009
|
}
|
|
25010
|
+
if (changes['typeaheadDebounceInterval'] && this._keyManager) {
|
|
25011
|
+
this._keyManager.withTypeAhead(this.typeaheadDebounceInterval);
|
|
25012
|
+
}
|
|
24825
25013
|
};
|
|
24826
25014
|
/**
|
|
24827
25015
|
* @return {?}
|
|
@@ -25331,6 +25519,11 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
25331
25519
|
if (correspondingOption) {
|
|
25332
25520
|
this._keyManager.setActiveItem(correspondingOption);
|
|
25333
25521
|
}
|
|
25522
|
+
else if (!this.panelOpen) {
|
|
25523
|
+
// Otherwise reset the highlighted option. Note that we only want to do this while
|
|
25524
|
+
// closed, because doing it while open can shift the user's focus unnecessarily.
|
|
25525
|
+
this._keyManager.setActiveItem(-1);
|
|
25526
|
+
}
|
|
25334
25527
|
}
|
|
25335
25528
|
this._changeDetectorRef.markForCheck();
|
|
25336
25529
|
};
|
|
@@ -25389,7 +25582,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
25389
25582
|
function () {
|
|
25390
25583
|
var _this = this;
|
|
25391
25584
|
this._keyManager = new a11y.ActiveDescendantKeyManager(this.options)
|
|
25392
|
-
.withTypeAhead()
|
|
25585
|
+
.withTypeAhead(this.typeaheadDebounceInterval)
|
|
25393
25586
|
.withVerticalOrientation()
|
|
25394
25587
|
.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')
|
|
25395
25588
|
.withAllowedModifierKeys(['shiftKey']);
|
|
@@ -25480,7 +25673,10 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
25480
25673
|
this._propagateChanges(option.value);
|
|
25481
25674
|
}
|
|
25482
25675
|
else {
|
|
25483
|
-
|
|
25676
|
+
if (wasSelected !== option.selected) {
|
|
25677
|
+
option.selected ? this._selectionModel.select(option) :
|
|
25678
|
+
this._selectionModel.deselect(option);
|
|
25679
|
+
}
|
|
25484
25680
|
if (isUserInput) {
|
|
25485
25681
|
this._keyManager.setActiveItem(option);
|
|
25486
25682
|
}
|
|
@@ -26217,6 +26413,7 @@ var MatSelect = /** @class */ (function (_super) {
|
|
|
26217
26413
|
ariaLabel: [{ type: core.Input, args: ['aria-label',] }],
|
|
26218
26414
|
ariaLabelledby: [{ type: core.Input, args: ['aria-labelledby',] }],
|
|
26219
26415
|
errorStateMatcher: [{ type: core.Input }],
|
|
26416
|
+
typeaheadDebounceInterval: [{ type: core.Input }],
|
|
26220
26417
|
sortComparator: [{ type: core.Input }],
|
|
26221
26418
|
id: [{ type: core.Input }],
|
|
26222
26419
|
openedChange: [{ type: core.Output }],
|
|
@@ -26491,6 +26688,7 @@ var MatTooltip = /** @class */ (function () {
|
|
|
26491
26688
|
* @return {?}
|
|
26492
26689
|
*/
|
|
26493
26690
|
function (value) {
|
|
26691
|
+
var _this = this;
|
|
26494
26692
|
this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);
|
|
26495
26693
|
// If the message is not a string (e.g. number), convert it to a string and trim it.
|
|
26496
26694
|
this._message = value != null ? ("" + value).trim() : '';
|
|
@@ -26499,7 +26697,21 @@ var MatTooltip = /** @class */ (function () {
|
|
|
26499
26697
|
}
|
|
26500
26698
|
else {
|
|
26501
26699
|
this._updateTooltipMessage();
|
|
26502
|
-
this.
|
|
26700
|
+
this._ngZone.runOutsideAngular((/**
|
|
26701
|
+
* @return {?}
|
|
26702
|
+
*/
|
|
26703
|
+
function () {
|
|
26704
|
+
// The `AriaDescriber` has some functionality that avoids adding a description if it's the
|
|
26705
|
+
// same as the `aria-label` of an element, however we can't know whether the tooltip trigger
|
|
26706
|
+
// has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the
|
|
26707
|
+
// issue by deferring the description by a tick so Angular has time to set the `aria-label`.
|
|
26708
|
+
Promise.resolve().then((/**
|
|
26709
|
+
* @return {?}
|
|
26710
|
+
*/
|
|
26711
|
+
function () {
|
|
26712
|
+
_this._ariaDescriber.describe(_this._elementRef.nativeElement, _this.message);
|
|
26713
|
+
}));
|
|
26714
|
+
}));
|
|
26503
26715
|
}
|
|
26504
26716
|
},
|
|
26505
26717
|
enumerable: true,
|
|
@@ -27290,7 +27502,7 @@ var MatPaginatorIntl = /** @class */ (function () {
|
|
|
27290
27502
|
var endIndex = startIndex < length ?
|
|
27291
27503
|
Math.min(startIndex + pageSize, length) :
|
|
27292
27504
|
startIndex + pageSize;
|
|
27293
|
-
return startIndex + 1 + "
|
|
27505
|
+
return startIndex + 1 + " \u2013 " + endIndex + " of " + length;
|
|
27294
27506
|
});
|
|
27295
27507
|
}
|
|
27296
27508
|
MatPaginatorIntl.decorators = [
|
|
@@ -28183,7 +28395,6 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28183
28395
|
if (!trackedDiameters.has(_document.head)) {
|
|
28184
28396
|
trackedDiameters.set(_document.head, new Set([BASE_SIZE]));
|
|
28185
28397
|
}
|
|
28186
|
-
_this._styleRoot = _getShadowRoot(_elementRef.nativeElement, _document) || _document.head;
|
|
28187
28398
|
_this._fallbackAnimation = platform$$1.EDGE || platform$$1.TRIDENT;
|
|
28188
28399
|
_this._noopAnimations = animationMode === 'NoopAnimations' &&
|
|
28189
28400
|
(!!defaults && !defaults._forceAnimations);
|
|
@@ -28195,11 +28406,6 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28195
28406
|
_this.strokeWidth = defaults.strokeWidth;
|
|
28196
28407
|
}
|
|
28197
28408
|
}
|
|
28198
|
-
// On IE and Edge, we can't animate the `stroke-dashoffset`
|
|
28199
|
-
// reliably so we fall back to a non-spec animation.
|
|
28200
|
-
/** @type {?} */
|
|
28201
|
-
var animationClass = "mat-progress-spinner-indeterminate" + (_this._fallbackAnimation ? '-fallback' : '') + "-animation";
|
|
28202
|
-
_elementRef.nativeElement.classList.add(animationClass);
|
|
28203
28409
|
return _this;
|
|
28204
28410
|
}
|
|
28205
28411
|
Object.defineProperty(MatProgressSpinner.prototype, "diameter", {
|
|
@@ -28215,14 +28421,9 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28215
28421
|
*/
|
|
28216
28422
|
function (size) {
|
|
28217
28423
|
this._diameter = coercion.coerceNumberProperty(size);
|
|
28218
|
-
|
|
28219
|
-
|
|
28220
|
-
|
|
28221
|
-
/** @type {?} */
|
|
28222
|
-
var diametersForElement = trackedDiameters.get(this._styleRoot);
|
|
28223
|
-
if (!diametersForElement || !diametersForElement.has(this._diameter)) {
|
|
28224
|
-
this._attachStyleNode();
|
|
28225
|
-
}
|
|
28424
|
+
// If this is set before `ngOnInit`, the style root may not have been resolved yet.
|
|
28425
|
+
if (!this._fallbackAnimation && this._styleRoot) {
|
|
28426
|
+
this._attachStyleNode();
|
|
28226
28427
|
}
|
|
28227
28428
|
},
|
|
28228
28429
|
enumerable: true,
|
|
@@ -28266,6 +28467,26 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28266
28467
|
enumerable: true,
|
|
28267
28468
|
configurable: true
|
|
28268
28469
|
});
|
|
28470
|
+
/**
|
|
28471
|
+
* @return {?}
|
|
28472
|
+
*/
|
|
28473
|
+
MatProgressSpinner.prototype.ngOnInit = /**
|
|
28474
|
+
* @return {?}
|
|
28475
|
+
*/
|
|
28476
|
+
function () {
|
|
28477
|
+
/** @type {?} */
|
|
28478
|
+
var element = this._elementRef.nativeElement;
|
|
28479
|
+
// Note that we need to look up the root node in ngOnInit, rather than the constructor, because
|
|
28480
|
+
// Angular seems to create the element outside the shadow root and then moves it inside, if the
|
|
28481
|
+
// node is inside an `ngIf` and a ShadowDom-encapsulated component.
|
|
28482
|
+
this._styleRoot = _getShadowRoot(element, this._document) || this._document.head;
|
|
28483
|
+
this._attachStyleNode();
|
|
28484
|
+
// On IE and Edge, we can't animate the `stroke-dashoffset`
|
|
28485
|
+
// reliably so we fall back to a non-spec animation.
|
|
28486
|
+
/** @type {?} */
|
|
28487
|
+
var animationClass = "mat-progress-spinner-indeterminate" + (this._fallbackAnimation ? '-fallback' : '') + "-animation";
|
|
28488
|
+
element.classList.add(animationClass);
|
|
28489
|
+
};
|
|
28269
28490
|
Object.defineProperty(MatProgressSpinner.prototype, "_circleRadius", {
|
|
28270
28491
|
/** The radius of the spinner, adjusted for stroke width. */
|
|
28271
28492
|
get: /**
|
|
@@ -28347,8 +28568,6 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28347
28568
|
* @return {?}
|
|
28348
28569
|
*/
|
|
28349
28570
|
function () {
|
|
28350
|
-
/** @type {?} */
|
|
28351
|
-
var styleTag = this._document.createElement('style');
|
|
28352
28571
|
/** @type {?} */
|
|
28353
28572
|
var styleRoot = this._styleRoot;
|
|
28354
28573
|
/** @type {?} */
|
|
@@ -28357,14 +28576,18 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
28357
28576
|
var diameters = MatProgressSpinner._diameters;
|
|
28358
28577
|
/** @type {?} */
|
|
28359
28578
|
var diametersForElement = diameters.get(styleRoot);
|
|
28360
|
-
|
|
28361
|
-
|
|
28362
|
-
|
|
28363
|
-
|
|
28364
|
-
|
|
28365
|
-
|
|
28579
|
+
if (!diametersForElement || !diametersForElement.has(currentDiameter)) {
|
|
28580
|
+
/** @type {?} */
|
|
28581
|
+
var styleTag = this._document.createElement('style');
|
|
28582
|
+
styleTag.setAttribute('mat-spinner-animation', currentDiameter + '');
|
|
28583
|
+
styleTag.textContent = this._getAnimationText();
|
|
28584
|
+
styleRoot.appendChild(styleTag);
|
|
28585
|
+
if (!diametersForElement) {
|
|
28586
|
+
diametersForElement = new Set();
|
|
28587
|
+
diameters.set(styleRoot, diametersForElement);
|
|
28588
|
+
}
|
|
28589
|
+
diametersForElement.add(currentDiameter);
|
|
28366
28590
|
}
|
|
28367
|
-
diametersForElement.add(currentDiameter);
|
|
28368
28591
|
};
|
|
28369
28592
|
/** Generates animation styles adjusted for the spinner's diameter. */
|
|
28370
28593
|
/**
|
|
@@ -29382,6 +29605,9 @@ var MatRadioButton = /** @class */ (function (_super) {
|
|
|
29382
29605
|
// Needs to be -1 so the `focus` event still fires.
|
|
29383
29606
|
'[attr.tabindex]': '-1',
|
|
29384
29607
|
'[attr.id]': 'id',
|
|
29608
|
+
'[attr.aria-label]': 'null',
|
|
29609
|
+
'[attr.aria-labelledby]': 'null',
|
|
29610
|
+
'[attr.aria-describedby]': 'null',
|
|
29385
29611
|
// Note: under normal conditions focus shouldn't land on this element, however it may be
|
|
29386
29612
|
// programmatically set, for example inside of a focus trap, in this case we want to forward
|
|
29387
29613
|
// the focus to the native element.
|
|
@@ -31418,7 +31644,7 @@ var MatSlideToggle = /** @class */ (function (_super) {
|
|
|
31418
31644
|
// slide-toggle component will be only marked for check, but no actual change detection runs
|
|
31419
31645
|
// automatically. Instead of going back into the zone in order to trigger a change detection
|
|
31420
31646
|
// which causes *all* components to be checked (if explicitly marked or not using OnPush),
|
|
31421
|
-
// we only trigger an explicit change detection for the slide-toggle view and
|
|
31647
|
+
// we only trigger an explicit change detection for the slide-toggle view and its children.
|
|
31422
31648
|
this._changeDetectorRef.detectChanges();
|
|
31423
31649
|
};
|
|
31424
31650
|
MatSlideToggle.decorators = [
|
|
@@ -31429,6 +31655,8 @@ var MatSlideToggle = /** @class */ (function (_super) {
|
|
|
31429
31655
|
'[id]': 'id',
|
|
31430
31656
|
// Needs to be `-1` so it can still receive programmatic focus.
|
|
31431
31657
|
'[attr.tabindex]': 'disabled ? null : -1',
|
|
31658
|
+
'[attr.aria-label]': 'null',
|
|
31659
|
+
'[attr.aria-labelledby]': 'null',
|
|
31432
31660
|
'[class.mat-checked]': 'checked',
|
|
31433
31661
|
'[class.mat-disabled]': 'disabled',
|
|
31434
31662
|
'[class.mat-slide-toggle-label-before]': 'labelPosition == "before"',
|
|
@@ -31875,7 +32103,9 @@ var MatSlider = /** @class */ (function (_super) {
|
|
|
31875
32103
|
*/
|
|
31876
32104
|
function () {
|
|
31877
32105
|
if (this.displayWith) {
|
|
31878
|
-
|
|
32106
|
+
// Value is never null but since setters and getters cannot have
|
|
32107
|
+
// different types, the value getter is also typed to return null.
|
|
32108
|
+
return this.displayWith((/** @type {?} */ (this.value)));
|
|
31879
32109
|
}
|
|
31880
32110
|
// Note that this could be improved further by rounding something like 0.999 to 1 or
|
|
31881
32111
|
// 0.899 to 0.9, however it is very performance sensitive, because it gets called on
|
|
@@ -32105,13 +32335,11 @@ var MatSlider = /** @class */ (function (_super) {
|
|
|
32105
32335
|
/**
|
|
32106
32336
|
* Whether mouse events should be converted to a slider position by calculating their distance
|
|
32107
32337
|
* from the right or bottom edge of the slider as opposed to the top or left.
|
|
32108
|
-
* @private
|
|
32109
32338
|
* @return {?}
|
|
32110
32339
|
*/
|
|
32111
32340
|
MatSlider.prototype._shouldInvertMouseCoords = /**
|
|
32112
32341
|
* Whether mouse events should be converted to a slider position by calculating their distance
|
|
32113
32342
|
* from the right or bottom edge of the slider as opposed to the top or left.
|
|
32114
|
-
* @private
|
|
32115
32343
|
* @return {?}
|
|
32116
32344
|
*/
|
|
32117
32345
|
function () {
|
|
@@ -32723,6 +32951,9 @@ var MatSlider = /** @class */ (function (_super) {
|
|
|
32723
32951
|
'[class.mat-slider-has-ticks]': 'tickInterval',
|
|
32724
32952
|
'[class.mat-slider-horizontal]': '!vertical',
|
|
32725
32953
|
'[class.mat-slider-axis-inverted]': '_invertAxis',
|
|
32954
|
+
// Class binding which is only used by the test harness as there is no other
|
|
32955
|
+
// way for the harness to detect if mouse coordinates need to be inverted.
|
|
32956
|
+
'[class.mat-slider-invert-mouse-coords]': '_shouldInvertMouseCoords()',
|
|
32726
32957
|
'[class.mat-slider-sliding]': '_isSliding',
|
|
32727
32958
|
'[class.mat-slider-thumb-label-showing]': 'thumbLabel',
|
|
32728
32959
|
'[class.mat-slider-vertical]': 'vertical',
|
|
@@ -33056,7 +33287,7 @@ var SimpleSnackBar = /** @class */ (function () {
|
|
|
33056
33287
|
SimpleSnackBar.decorators = [
|
|
33057
33288
|
{ type: core.Component, args: [{selector: 'simple-snack-bar',
|
|
33058
33289
|
template: "<span>{{data.message}}</span><div class=\"mat-simple-snackbar-action\" *ngIf=\"hasAction\"><button mat-button (click)=\"action()\">{{data.action}}</button></div>",
|
|
33059
|
-
styles: [".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;
|
|
33290
|
+
styles: [".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}"],
|
|
33060
33291
|
encapsulation: core.ViewEncapsulation.None,
|
|
33061
33292
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
33062
33293
|
host: {
|
|
@@ -33647,17 +33878,16 @@ var MatSnackBar = /** @class */ (function () {
|
|
|
33647
33878
|
// Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as
|
|
33648
33879
|
// appropriate. This class is applied to the overlay element because the overlay must expand to
|
|
33649
33880
|
// fill the width of the screen for full width snackbars.
|
|
33650
|
-
this._breakpointObserver.observe(layout.Breakpoints.
|
|
33881
|
+
this._breakpointObserver.observe(layout.Breakpoints.HandsetPortrait).pipe(operators.takeUntil(overlayRef.detachments())).subscribe((/**
|
|
33651
33882
|
* @param {?} state
|
|
33652
33883
|
* @return {?}
|
|
33653
33884
|
*/
|
|
33654
33885
|
function (state$$1) {
|
|
33655
|
-
|
|
33656
|
-
|
|
33657
|
-
}
|
|
33658
|
-
|
|
33659
|
-
|
|
33660
|
-
}
|
|
33886
|
+
/** @type {?} */
|
|
33887
|
+
var classList = overlayRef.overlayElement.classList;
|
|
33888
|
+
/** @type {?} */
|
|
33889
|
+
var className = 'mat-snack-bar-handset';
|
|
33890
|
+
state$$1.matches ? classList.add(className) : classList.remove(className);
|
|
33661
33891
|
}));
|
|
33662
33892
|
this._animateSnackBar(snackBarRef, config);
|
|
33663
33893
|
this._openedSnackBarRef = snackBarRef;
|
|
@@ -34567,7 +34797,6 @@ var MatSortHeader = /** @class */ (function (_super) {
|
|
|
34567
34797
|
host: {
|
|
34568
34798
|
'(click)': '_handleClick()',
|
|
34569
34799
|
'(mouseenter)': '_setIndicatorHintVisible(true)',
|
|
34570
|
-
'(longpress)': '_setIndicatorHintVisible(true)',
|
|
34571
34800
|
'(mouseleave)': '_setIndicatorHintVisible(false)',
|
|
34572
34801
|
'[attr.aria-sort]': '_getAriaSortAttribute()',
|
|
34573
34802
|
'[class.mat-sort-header-disabled]': '_isDisabled()',
|
|
@@ -35599,6 +35828,11 @@ var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
35599
35828
|
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
|
|
35600
35829
|
* properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
|
|
35601
35830
|
* which defines how row data is converted to a string for filter matching.
|
|
35831
|
+
*
|
|
35832
|
+
* **Note:** This class is meant to be a simple data source to help you get started. As such
|
|
35833
|
+
* it isn't equipped to handle some more advanced cases like robust i18n support or server-side
|
|
35834
|
+
* interactions. If your app needs to support more advanced use cases, consider implementing your
|
|
35835
|
+
* own `DataSource`.
|
|
35602
35836
|
* @template T
|
|
35603
35837
|
*/
|
|
35604
35838
|
var /**
|
|
@@ -35608,6 +35842,11 @@ var /**
|
|
|
35608
35842
|
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
|
|
35609
35843
|
* properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
|
|
35610
35844
|
* which defines how row data is converted to a string for filter matching.
|
|
35845
|
+
*
|
|
35846
|
+
* **Note:** This class is meant to be a simple data source to help you get started. As such
|
|
35847
|
+
* it isn't equipped to handle some more advanced cases like robust i18n support or server-side
|
|
35848
|
+
* interactions. If your app needs to support more advanced use cases, consider implementing your
|
|
35849
|
+
* own `DataSource`.
|
|
35611
35850
|
* @template T
|
|
35612
35851
|
*/
|
|
35613
35852
|
MatTableDataSource = /** @class */ (function (_super) {
|
|
@@ -35691,7 +35930,7 @@ MatTableDataSource = /** @class */ (function (_super) {
|
|
|
35691
35930
|
/** @type {?} */
|
|
35692
35931
|
var valueB = _this.sortingDataAccessor(b, active);
|
|
35693
35932
|
// If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if
|
|
35694
|
-
// one value exists while the other doesn't. In this case, existing value should come
|
|
35933
|
+
// one value exists while the other doesn't. In this case, existing value should come last.
|
|
35695
35934
|
// This avoids inconsistent results when comparing values to undefined/null.
|
|
35696
35935
|
// If neither value exists, return 0 (equal).
|
|
35697
35936
|
/** @type {?} */
|
|
@@ -35882,7 +36121,7 @@ MatTableDataSource = /** @class */ (function (_super) {
|
|
|
35882
36121
|
var dataStream = this._data;
|
|
35883
36122
|
// Watch for base data or filter changes to provide a filtered set of data.
|
|
35884
36123
|
/** @type {?} */
|
|
35885
|
-
var filteredData = rxjs.combineLatest(dataStream, this._filter)
|
|
36124
|
+
var filteredData = rxjs.combineLatest([dataStream, this._filter])
|
|
35886
36125
|
.pipe(operators.map((/**
|
|
35887
36126
|
* @param {?} __0
|
|
35888
36127
|
* @return {?}
|
|
@@ -35893,7 +36132,7 @@ MatTableDataSource = /** @class */ (function (_super) {
|
|
|
35893
36132
|
})));
|
|
35894
36133
|
// Watch for filtered data or sort changes to provide an ordered set of data.
|
|
35895
36134
|
/** @type {?} */
|
|
35896
|
-
var orderedData = rxjs.combineLatest(filteredData, sortChange)
|
|
36135
|
+
var orderedData = rxjs.combineLatest([filteredData, sortChange])
|
|
35897
36136
|
.pipe(operators.map((/**
|
|
35898
36137
|
* @param {?} __0
|
|
35899
36138
|
* @return {?}
|
|
@@ -35904,7 +36143,7 @@ MatTableDataSource = /** @class */ (function (_super) {
|
|
|
35904
36143
|
})));
|
|
35905
36144
|
// Watch for ordered data or page changes to provide a paged set of data.
|
|
35906
36145
|
/** @type {?} */
|
|
35907
|
-
var paginatedData = rxjs.combineLatest(orderedData, pageChange)
|
|
36146
|
+
var paginatedData = rxjs.combineLatest([orderedData, pageChange])
|
|
35908
36147
|
.pipe(operators.map((/**
|
|
35909
36148
|
* @param {?} __0
|
|
35910
36149
|
* @return {?}
|
|
@@ -36506,11 +36745,12 @@ var MatTabBodyPortal = /** @class */ (function (_super) {
|
|
|
36506
36745
|
return MatTabBodyPortal;
|
|
36507
36746
|
}(portal.CdkPortalOutlet));
|
|
36508
36747
|
/**
|
|
36509
|
-
*
|
|
36748
|
+
* Base class with all of the `MatTabBody` functionality.
|
|
36510
36749
|
* \@docs-private
|
|
36750
|
+
* @abstract
|
|
36511
36751
|
*/
|
|
36512
|
-
var
|
|
36513
|
-
function
|
|
36752
|
+
var _MatTabBodyBase = /** @class */ (function () {
|
|
36753
|
+
function _MatTabBodyBase(_elementRef, _dir, changeDetectorRef) {
|
|
36514
36754
|
var _this = this;
|
|
36515
36755
|
this._elementRef = _elementRef;
|
|
36516
36756
|
this._dir = _dir;
|
|
@@ -36577,7 +36817,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36577
36817
|
}
|
|
36578
36818
|
}));
|
|
36579
36819
|
}
|
|
36580
|
-
Object.defineProperty(
|
|
36820
|
+
Object.defineProperty(_MatTabBodyBase.prototype, "position", {
|
|
36581
36821
|
/** The shifted index position of the tab body, where zero represents the active center tab. */
|
|
36582
36822
|
set: /**
|
|
36583
36823
|
* The shifted index position of the tab body, where zero represents the active center tab.
|
|
@@ -36600,7 +36840,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36600
36840
|
* special position states that transition the tab from the left or right before centering.
|
|
36601
36841
|
* @return {?}
|
|
36602
36842
|
*/
|
|
36603
|
-
|
|
36843
|
+
_MatTabBodyBase.prototype.ngOnInit = /**
|
|
36604
36844
|
* After initialized, check if the content is centered and has an origin. If so, set the
|
|
36605
36845
|
* special position states that transition the tab from the left or right before centering.
|
|
36606
36846
|
* @return {?}
|
|
@@ -36613,7 +36853,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36613
36853
|
/**
|
|
36614
36854
|
* @return {?}
|
|
36615
36855
|
*/
|
|
36616
|
-
|
|
36856
|
+
_MatTabBodyBase.prototype.ngOnDestroy = /**
|
|
36617
36857
|
* @return {?}
|
|
36618
36858
|
*/
|
|
36619
36859
|
function () {
|
|
@@ -36624,7 +36864,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36624
36864
|
* @param {?} event
|
|
36625
36865
|
* @return {?}
|
|
36626
36866
|
*/
|
|
36627
|
-
|
|
36867
|
+
_MatTabBodyBase.prototype._onTranslateTabStarted = /**
|
|
36628
36868
|
* @param {?} event
|
|
36629
36869
|
* @return {?}
|
|
36630
36870
|
*/
|
|
@@ -36641,7 +36881,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36641
36881
|
* The text direction of the containing app.
|
|
36642
36882
|
* @return {?}
|
|
36643
36883
|
*/
|
|
36644
|
-
|
|
36884
|
+
_MatTabBodyBase.prototype._getLayoutDirection = /**
|
|
36645
36885
|
* The text direction of the containing app.
|
|
36646
36886
|
* @return {?}
|
|
36647
36887
|
*/
|
|
@@ -36654,7 +36894,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36654
36894
|
* @param {?} position
|
|
36655
36895
|
* @return {?}
|
|
36656
36896
|
*/
|
|
36657
|
-
|
|
36897
|
+
_MatTabBodyBase.prototype._isCenterPosition = /**
|
|
36658
36898
|
* Whether the provided position state is considered center, regardless of origin.
|
|
36659
36899
|
* @param {?} position
|
|
36660
36900
|
* @return {?}
|
|
@@ -36671,7 +36911,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36671
36911
|
* @param {?=} dir
|
|
36672
36912
|
* @return {?}
|
|
36673
36913
|
*/
|
|
36674
|
-
|
|
36914
|
+
_MatTabBodyBase.prototype._computePositionAnimationState = /**
|
|
36675
36915
|
* Computes the position state that will be used for the tab-body animation trigger.
|
|
36676
36916
|
* @private
|
|
36677
36917
|
* @param {?=} dir
|
|
@@ -36699,7 +36939,7 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36699
36939
|
* @private
|
|
36700
36940
|
* @return {?}
|
|
36701
36941
|
*/
|
|
36702
|
-
|
|
36942
|
+
_MatTabBodyBase.prototype._computePositionFromOrigin = /**
|
|
36703
36943
|
* Computes the position state based on the specified origin position. This is used if the
|
|
36704
36944
|
* tab is becoming visible immediately after creation.
|
|
36705
36945
|
* @private
|
|
@@ -36713,210 +36953,175 @@ var MatTabBody = /** @class */ (function () {
|
|
|
36713
36953
|
}
|
|
36714
36954
|
return 'right-origin-center';
|
|
36715
36955
|
};
|
|
36716
|
-
|
|
36717
|
-
{ type: core.
|
|
36718
|
-
|
|
36719
|
-
|
|
36720
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
36721
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
36722
|
-
animations: [matTabsAnimations.translateTab],
|
|
36723
|
-
host: {
|
|
36724
|
-
'class': 'mat-tab-body',
|
|
36725
|
-
},
|
|
36956
|
+
_MatTabBodyBase.decorators = [
|
|
36957
|
+
{ type: core.Directive, args: [{
|
|
36958
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
36959
|
+
selector: 'do-not-use-abstract-mat-tab-body-base'
|
|
36726
36960
|
},] },
|
|
36727
36961
|
];
|
|
36728
36962
|
/** @nocollapse */
|
|
36729
|
-
|
|
36963
|
+
_MatTabBodyBase.ctorParameters = function () { return [
|
|
36730
36964
|
{ type: core.ElementRef },
|
|
36731
36965
|
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
36732
36966
|
{ type: core.ChangeDetectorRef }
|
|
36733
36967
|
]; };
|
|
36734
|
-
|
|
36968
|
+
_MatTabBodyBase.propDecorators = {
|
|
36735
36969
|
_onCentering: [{ type: core.Output }],
|
|
36736
36970
|
_beforeCentering: [{ type: core.Output }],
|
|
36737
36971
|
_afterLeavingCenter: [{ type: core.Output }],
|
|
36738
36972
|
_onCentered: [{ type: core.Output }],
|
|
36739
|
-
_portalHost: [{ type: core.ViewChild, args: [portal.PortalHostDirective, { static: false },] }],
|
|
36740
36973
|
_content: [{ type: core.Input, args: ['content',] }],
|
|
36741
36974
|
origin: [{ type: core.Input }],
|
|
36742
36975
|
animationDuration: [{ type: core.Input }],
|
|
36743
36976
|
position: [{ type: core.Input }]
|
|
36744
36977
|
};
|
|
36745
|
-
return
|
|
36746
|
-
}());
|
|
36747
|
-
|
|
36748
|
-
/**
|
|
36749
|
-
* @fileoverview added by tsickle
|
|
36750
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
36751
|
-
*/
|
|
36752
|
-
// Boilerplate for applying mixins to MatTabLabelWrapper.
|
|
36753
|
-
/**
|
|
36754
|
-
* \@docs-private
|
|
36755
|
-
*/
|
|
36756
|
-
var
|
|
36757
|
-
// Boilerplate for applying mixins to MatTabLabelWrapper.
|
|
36758
|
-
/**
|
|
36759
|
-
* \@docs-private
|
|
36760
|
-
*/
|
|
36761
|
-
MatTabLabelWrapperBase = /** @class */ (function () {
|
|
36762
|
-
function MatTabLabelWrapperBase() {
|
|
36763
|
-
}
|
|
36764
|
-
return MatTabLabelWrapperBase;
|
|
36978
|
+
return _MatTabBodyBase;
|
|
36765
36979
|
}());
|
|
36766
|
-
/** @type {?} */
|
|
36767
|
-
var _MatTabLabelWrapperMixinBase = mixinDisabled(MatTabLabelWrapperBase);
|
|
36768
36980
|
/**
|
|
36769
|
-
*
|
|
36981
|
+
* Wrapper for the contents of a tab.
|
|
36770
36982
|
* \@docs-private
|
|
36771
36983
|
*/
|
|
36772
|
-
var
|
|
36773
|
-
__extends(
|
|
36774
|
-
function
|
|
36775
|
-
|
|
36776
|
-
_this.elementRef = elementRef;
|
|
36777
|
-
return _this;
|
|
36984
|
+
var MatTabBody = /** @class */ (function (_super) {
|
|
36985
|
+
__extends(MatTabBody, _super);
|
|
36986
|
+
function MatTabBody(elementRef, dir, changeDetectorRef) {
|
|
36987
|
+
return _super.call(this, elementRef, dir, changeDetectorRef) || this;
|
|
36778
36988
|
}
|
|
36779
|
-
|
|
36780
|
-
|
|
36781
|
-
|
|
36782
|
-
|
|
36783
|
-
|
|
36784
|
-
|
|
36785
|
-
|
|
36786
|
-
* @return {?}
|
|
36787
|
-
*/
|
|
36788
|
-
function () {
|
|
36789
|
-
this.elementRef.nativeElement.focus();
|
|
36790
|
-
};
|
|
36791
|
-
/**
|
|
36792
|
-
* @return {?}
|
|
36793
|
-
*/
|
|
36794
|
-
MatTabLabelWrapper.prototype.getOffsetLeft = /**
|
|
36795
|
-
* @return {?}
|
|
36796
|
-
*/
|
|
36797
|
-
function () {
|
|
36798
|
-
return this.elementRef.nativeElement.offsetLeft;
|
|
36799
|
-
};
|
|
36800
|
-
/**
|
|
36801
|
-
* @return {?}
|
|
36802
|
-
*/
|
|
36803
|
-
MatTabLabelWrapper.prototype.getOffsetWidth = /**
|
|
36804
|
-
* @return {?}
|
|
36805
|
-
*/
|
|
36806
|
-
function () {
|
|
36807
|
-
return this.elementRef.nativeElement.offsetWidth;
|
|
36808
|
-
};
|
|
36809
|
-
MatTabLabelWrapper.decorators = [
|
|
36810
|
-
{ type: core.Directive, args: [{
|
|
36811
|
-
selector: '[matTabLabelWrapper]',
|
|
36812
|
-
inputs: ['disabled'],
|
|
36989
|
+
MatTabBody.decorators = [
|
|
36990
|
+
{ type: core.Component, args: [{selector: 'mat-tab-body',
|
|
36991
|
+
template: "<div class=\"mat-tab-body-content\" #content [@translateTab]=\"{ value: _position, params: {animationDuration: animationDuration} }\" (@translateTab.start)=\"_onTranslateTabStarted($event)\" (@translateTab.done)=\"_translateTabComplete.next($event)\"><ng-template matTabBodyHost></ng-template></div>",
|
|
36992
|
+
styles: [".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}"],
|
|
36993
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
36994
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
36995
|
+
animations: [matTabsAnimations.translateTab],
|
|
36813
36996
|
host: {
|
|
36814
|
-
'
|
|
36815
|
-
'[attr.aria-disabled]': '!!disabled',
|
|
36997
|
+
'class': 'mat-tab-body',
|
|
36816
36998
|
}
|
|
36817
36999
|
},] },
|
|
36818
37000
|
];
|
|
36819
37001
|
/** @nocollapse */
|
|
36820
|
-
|
|
36821
|
-
{ type: core.ElementRef }
|
|
37002
|
+
MatTabBody.ctorParameters = function () { return [
|
|
37003
|
+
{ type: core.ElementRef },
|
|
37004
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
37005
|
+
{ type: core.ChangeDetectorRef }
|
|
36822
37006
|
]; };
|
|
36823
|
-
|
|
36824
|
-
}
|
|
37007
|
+
MatTabBody.propDecorators = {
|
|
37008
|
+
_portalHost: [{ type: core.ViewChild, args: [portal.PortalHostDirective, { static: false },] }]
|
|
37009
|
+
};
|
|
37010
|
+
return MatTabBody;
|
|
37011
|
+
}(_MatTabBodyBase));
|
|
36825
37012
|
|
|
36826
37013
|
/**
|
|
36827
37014
|
* @fileoverview added by tsickle
|
|
36828
37015
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
36829
37016
|
*/
|
|
36830
37017
|
/**
|
|
36831
|
-
*
|
|
37018
|
+
* Used to generate unique ID's for each tab component
|
|
36832
37019
|
* @type {?}
|
|
36833
37020
|
*/
|
|
36834
|
-
var
|
|
37021
|
+
var nextId$1 = 0;
|
|
36835
37022
|
/**
|
|
36836
|
-
*
|
|
36837
|
-
* provide a small affordance to the label next to it.
|
|
36838
|
-
* @type {?}
|
|
37023
|
+
* A simple change event emitted on focus or selection changes.
|
|
36839
37024
|
*/
|
|
36840
|
-
var
|
|
37025
|
+
var /**
|
|
37026
|
+
* A simple change event emitted on focus or selection changes.
|
|
37027
|
+
*/
|
|
37028
|
+
MatTabChangeEvent = /** @class */ (function () {
|
|
37029
|
+
function MatTabChangeEvent() {
|
|
37030
|
+
}
|
|
37031
|
+
return MatTabChangeEvent;
|
|
37032
|
+
}());
|
|
36841
37033
|
/**
|
|
36842
|
-
*
|
|
36843
|
-
* Set a little conservatively in order to handle fake events dispatched on touch devices.
|
|
37034
|
+
* Injection token that can be used to provide the default options the tabs module.
|
|
36844
37035
|
* @type {?}
|
|
36845
37036
|
*/
|
|
36846
|
-
var
|
|
37037
|
+
var MAT_TABS_CONFIG = new core.InjectionToken('MAT_TABS_CONFIG');
|
|
37038
|
+
// Boilerplate for applying mixins to MatTabGroup.
|
|
36847
37039
|
/**
|
|
36848
|
-
*
|
|
36849
|
-
* while the user is holding their pointer.
|
|
36850
|
-
* @type {?}
|
|
37040
|
+
* \@docs-private
|
|
36851
37041
|
*/
|
|
36852
|
-
var
|
|
37042
|
+
var
|
|
37043
|
+
// Boilerplate for applying mixins to MatTabGroup.
|
|
36853
37044
|
/**
|
|
36854
|
-
*
|
|
36855
|
-
* @abstract
|
|
37045
|
+
* \@docs-private
|
|
36856
37046
|
*/
|
|
36857
|
-
|
|
36858
|
-
function
|
|
36859
|
-
var _this = this;
|
|
37047
|
+
MatTabGroupMixinBase = /** @class */ (function () {
|
|
37048
|
+
function MatTabGroupMixinBase(_elementRef) {
|
|
36860
37049
|
this._elementRef = _elementRef;
|
|
36861
|
-
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
36865
|
-
|
|
36866
|
-
|
|
37050
|
+
}
|
|
37051
|
+
return MatTabGroupMixinBase;
|
|
37052
|
+
}());
|
|
37053
|
+
/** @type {?} */
|
|
37054
|
+
var _MatTabGroupMixinBase = mixinColor(mixinDisableRipple(MatTabGroupMixinBase), 'primary');
|
|
37055
|
+
/**
|
|
37056
|
+
* Base class with all of the `MatTabGroupBase` functionality.
|
|
37057
|
+
* \@docs-private
|
|
37058
|
+
* @abstract
|
|
37059
|
+
*/
|
|
37060
|
+
var _MatTabGroupBase = /** @class */ (function (_super) {
|
|
37061
|
+
__extends(_MatTabGroupBase, _super);
|
|
37062
|
+
function _MatTabGroupBase(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {
|
|
37063
|
+
var _this = _super.call(this, elementRef) || this;
|
|
37064
|
+
_this._changeDetectorRef = _changeDetectorRef;
|
|
37065
|
+
_this._animationMode = _animationMode;
|
|
36867
37066
|
/**
|
|
36868
|
-
* The
|
|
37067
|
+
* The tab index that should be selected after the content has been checked.
|
|
36869
37068
|
*/
|
|
36870
|
-
|
|
37069
|
+
_this._indexToSelect = 0;
|
|
36871
37070
|
/**
|
|
36872
|
-
*
|
|
37071
|
+
* Snapshot of the height of the tab body wrapper before another tab is activated.
|
|
36873
37072
|
*/
|
|
36874
|
-
|
|
37073
|
+
_this._tabBodyWrapperHeight = 0;
|
|
36875
37074
|
/**
|
|
36876
|
-
*
|
|
37075
|
+
* Subscription to tabs being added/removed.
|
|
36877
37076
|
*/
|
|
36878
|
-
|
|
37077
|
+
_this._tabsSubscription = rxjs.Subscription.EMPTY;
|
|
36879
37078
|
/**
|
|
36880
|
-
*
|
|
37079
|
+
* Subscription to changes in the tab labels.
|
|
36881
37080
|
*/
|
|
36882
|
-
|
|
37081
|
+
_this._tabLabelSubscription = rxjs.Subscription.EMPTY;
|
|
37082
|
+
_this._dynamicHeight = false;
|
|
37083
|
+
_this._selectedIndex = null;
|
|
36883
37084
|
/**
|
|
36884
|
-
*
|
|
37085
|
+
* Position of the tab header.
|
|
36885
37086
|
*/
|
|
36886
|
-
|
|
37087
|
+
_this.headerPosition = 'above';
|
|
36887
37088
|
/**
|
|
36888
|
-
*
|
|
37089
|
+
* Output to enable support for two-way binding on `[(selectedIndex)]`
|
|
36889
37090
|
*/
|
|
36890
|
-
|
|
37091
|
+
_this.selectedIndexChange = new core.EventEmitter();
|
|
36891
37092
|
/**
|
|
36892
|
-
*
|
|
37093
|
+
* Event emitted when focus has changed within a tab group.
|
|
36893
37094
|
*/
|
|
36894
|
-
|
|
36895
|
-
this._selectedIndex = 0;
|
|
37095
|
+
_this.focusChange = new core.EventEmitter();
|
|
36896
37096
|
/**
|
|
36897
|
-
* Event emitted when the
|
|
37097
|
+
* Event emitted when the body animation has completed
|
|
36898
37098
|
*/
|
|
36899
|
-
|
|
37099
|
+
_this.animationDone = new core.EventEmitter();
|
|
36900
37100
|
/**
|
|
36901
|
-
* Event emitted when
|
|
37101
|
+
* Event emitted when the tab selection has changed.
|
|
36902
37102
|
*/
|
|
36903
|
-
|
|
36904
|
-
|
|
36905
|
-
|
|
37103
|
+
_this.selectedTabChange = new core.EventEmitter(true);
|
|
37104
|
+
_this._groupId = nextId$1++;
|
|
37105
|
+
_this.animationDuration = defaultConfig && defaultConfig.animationDuration ?
|
|
37106
|
+
defaultConfig.animationDuration : '500ms';
|
|
37107
|
+
return _this;
|
|
37108
|
+
}
|
|
37109
|
+
Object.defineProperty(_MatTabGroupBase.prototype, "dynamicHeight", {
|
|
37110
|
+
/** Whether the tab group should grow to the size of the active tab. */
|
|
37111
|
+
get: /**
|
|
37112
|
+
* Whether the tab group should grow to the size of the active tab.
|
|
36906
37113
|
* @return {?}
|
|
36907
37114
|
*/
|
|
36908
|
-
function () {
|
|
36909
|
-
|
|
36910
|
-
|
|
36911
|
-
|
|
36912
|
-
|
|
36913
|
-
|
|
36914
|
-
|
|
36915
|
-
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
}
|
|
36919
|
-
Object.defineProperty(MatPaginatedTabHeader.prototype, "selectedIndex", {
|
|
37115
|
+
function () { return this._dynamicHeight; },
|
|
37116
|
+
set: /**
|
|
37117
|
+
* @param {?} value
|
|
37118
|
+
* @return {?}
|
|
37119
|
+
*/
|
|
37120
|
+
function (value) { this._dynamicHeight = coercion.coerceBooleanProperty(value); },
|
|
37121
|
+
enumerable: true,
|
|
37122
|
+
configurable: true
|
|
37123
|
+
});
|
|
37124
|
+
Object.defineProperty(_MatTabGroupBase.prototype, "selectedIndex", {
|
|
36920
37125
|
/** The index of the active tab. */
|
|
36921
37126
|
get: /**
|
|
36922
37127
|
* The index of the active tab.
|
|
@@ -36928,890 +37133,617 @@ var MatPaginatedTabHeader = /** @class */ (function () {
|
|
|
36928
37133
|
* @return {?}
|
|
36929
37134
|
*/
|
|
36930
37135
|
function (value) {
|
|
36931
|
-
|
|
36932
|
-
if (this._selectedIndex != value) {
|
|
36933
|
-
this._selectedIndexChanged = true;
|
|
36934
|
-
this._selectedIndex = value;
|
|
36935
|
-
if (this._keyManager) {
|
|
36936
|
-
this._keyManager.updateActiveItemIndex(value);
|
|
36937
|
-
}
|
|
36938
|
-
}
|
|
37136
|
+
this._indexToSelect = coercion.coerceNumberProperty(value, null);
|
|
36939
37137
|
},
|
|
36940
37138
|
enumerable: true,
|
|
36941
37139
|
configurable: true
|
|
36942
37140
|
});
|
|
36943
|
-
|
|
36944
|
-
|
|
36945
|
-
|
|
36946
|
-
|
|
36947
|
-
* @return {?}
|
|
36948
|
-
*/
|
|
36949
|
-
function () {
|
|
36950
|
-
var _this = this;
|
|
36951
|
-
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
36952
|
-
rxjs.fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions$1)
|
|
36953
|
-
.pipe(operators.takeUntil(this._destroyed))
|
|
36954
|
-
.subscribe((/**
|
|
37141
|
+
Object.defineProperty(_MatTabGroupBase.prototype, "animationDuration", {
|
|
37142
|
+
/** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */
|
|
37143
|
+
get: /**
|
|
37144
|
+
* Duration for the tab animation. Will be normalized to milliseconds if no units are set.
|
|
36955
37145
|
* @return {?}
|
|
36956
37146
|
*/
|
|
36957
|
-
function () {
|
|
36958
|
-
|
|
36959
|
-
|
|
36960
|
-
rxjs.fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions$1)
|
|
36961
|
-
.pipe(operators.takeUntil(this._destroyed))
|
|
36962
|
-
.subscribe((/**
|
|
37147
|
+
function () { return this._animationDuration; },
|
|
37148
|
+
set: /**
|
|
37149
|
+
* @param {?} value
|
|
36963
37150
|
* @return {?}
|
|
36964
37151
|
*/
|
|
36965
|
-
function () {
|
|
36966
|
-
|
|
36967
|
-
}
|
|
36968
|
-
|
|
37152
|
+
function (value) {
|
|
37153
|
+
this._animationDuration = /^\d+$/.test(value) ? value + 'ms' : value;
|
|
37154
|
+
},
|
|
37155
|
+
enumerable: true,
|
|
37156
|
+
configurable: true
|
|
37157
|
+
});
|
|
37158
|
+
Object.defineProperty(_MatTabGroupBase.prototype, "backgroundColor", {
|
|
37159
|
+
/** Background color of the tab group. */
|
|
37160
|
+
get: /**
|
|
37161
|
+
* Background color of the tab group.
|
|
37162
|
+
* @return {?}
|
|
37163
|
+
*/
|
|
37164
|
+
function () { return this._backgroundColor; },
|
|
37165
|
+
set: /**
|
|
37166
|
+
* @param {?} value
|
|
37167
|
+
* @return {?}
|
|
37168
|
+
*/
|
|
37169
|
+
function (value) {
|
|
37170
|
+
/** @type {?} */
|
|
37171
|
+
var nativeElement = this._elementRef.nativeElement;
|
|
37172
|
+
nativeElement.classList.remove("mat-background-" + this.backgroundColor);
|
|
37173
|
+
if (value) {
|
|
37174
|
+
nativeElement.classList.add("mat-background-" + value);
|
|
37175
|
+
}
|
|
37176
|
+
this._backgroundColor = value;
|
|
37177
|
+
},
|
|
37178
|
+
enumerable: true,
|
|
37179
|
+
configurable: true
|
|
37180
|
+
});
|
|
37181
|
+
/**
|
|
37182
|
+
* After the content is checked, this component knows what tabs have been defined
|
|
37183
|
+
* and what the selected index should be. This is where we can know exactly what position
|
|
37184
|
+
* each tab should be in according to the new selected index, and additionally we know how
|
|
37185
|
+
* a new selected tab should transition in (from the left or right).
|
|
37186
|
+
*/
|
|
36969
37187
|
/**
|
|
37188
|
+
* After the content is checked, this component knows what tabs have been defined
|
|
37189
|
+
* and what the selected index should be. This is where we can know exactly what position
|
|
37190
|
+
* each tab should be in according to the new selected index, and additionally we know how
|
|
37191
|
+
* a new selected tab should transition in (from the left or right).
|
|
36970
37192
|
* @return {?}
|
|
36971
37193
|
*/
|
|
36972
|
-
|
|
37194
|
+
_MatTabGroupBase.prototype.ngAfterContentChecked = /**
|
|
37195
|
+
* After the content is checked, this component knows what tabs have been defined
|
|
37196
|
+
* and what the selected index should be. This is where we can know exactly what position
|
|
37197
|
+
* each tab should be in according to the new selected index, and additionally we know how
|
|
37198
|
+
* a new selected tab should transition in (from the left or right).
|
|
36973
37199
|
* @return {?}
|
|
36974
37200
|
*/
|
|
36975
37201
|
function () {
|
|
36976
37202
|
var _this = this;
|
|
37203
|
+
// Don't clamp the `indexToSelect` immediately in the setter because it can happen that
|
|
37204
|
+
// the amount of tabs changes before the actual change detection runs.
|
|
36977
37205
|
/** @type {?} */
|
|
36978
|
-
var
|
|
36979
|
-
|
|
36980
|
-
|
|
36981
|
-
|
|
36982
|
-
|
|
36983
|
-
|
|
36984
|
-
|
|
36985
|
-
|
|
36986
|
-
|
|
36987
|
-
|
|
36988
|
-
|
|
36989
|
-
|
|
36990
|
-
|
|
36991
|
-
|
|
36992
|
-
|
|
36993
|
-
|
|
36994
|
-
|
|
36995
|
-
|
|
36996
|
-
|
|
36997
|
-
|
|
36998
|
-
|
|
36999
|
-
|
|
37000
|
-
|
|
37001
|
-
|
|
37002
|
-
|
|
37003
|
-
|
|
37004
|
-
|
|
37005
|
-
|
|
37006
|
-
|
|
37007
|
-
|
|
37008
|
-
this._keyManager.change.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
37009
|
-
* @param {?} newFocusIndex
|
|
37206
|
+
var indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);
|
|
37207
|
+
// If there is a change in selected index, emit a change event. Should not trigger if
|
|
37208
|
+
// the selected index has not yet been initialized.
|
|
37209
|
+
if (this._selectedIndex != indexToSelect) {
|
|
37210
|
+
/** @type {?} */
|
|
37211
|
+
var isFirstRun_1 = this._selectedIndex == null;
|
|
37212
|
+
if (!isFirstRun_1) {
|
|
37213
|
+
this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
|
|
37214
|
+
}
|
|
37215
|
+
// Changing these values after change detection has run
|
|
37216
|
+
// since the checked content may contain references to them.
|
|
37217
|
+
Promise.resolve().then((/**
|
|
37218
|
+
* @return {?}
|
|
37219
|
+
*/
|
|
37220
|
+
function () {
|
|
37221
|
+
_this._tabs.forEach((/**
|
|
37222
|
+
* @param {?} tab
|
|
37223
|
+
* @param {?} index
|
|
37224
|
+
* @return {?}
|
|
37225
|
+
*/
|
|
37226
|
+
function (tab, index) { return tab.isActive = index === indexToSelect; }));
|
|
37227
|
+
if (!isFirstRun_1) {
|
|
37228
|
+
_this.selectedIndexChange.emit(indexToSelect);
|
|
37229
|
+
}
|
|
37230
|
+
}));
|
|
37231
|
+
}
|
|
37232
|
+
// Setup the position for each tab and optionally setup an origin on the next selected tab.
|
|
37233
|
+
this._tabs.forEach((/**
|
|
37234
|
+
* @param {?} tab
|
|
37235
|
+
* @param {?} index
|
|
37010
37236
|
* @return {?}
|
|
37011
37237
|
*/
|
|
37012
|
-
function (
|
|
37013
|
-
|
|
37014
|
-
|
|
37238
|
+
function (tab, index) {
|
|
37239
|
+
tab.position = index - indexToSelect;
|
|
37240
|
+
// If there is already a selected tab, then set up an origin for the next selected tab
|
|
37241
|
+
// if it doesn't have one already.
|
|
37242
|
+
if (_this._selectedIndex != null && tab.position == 0 && !tab.origin) {
|
|
37243
|
+
tab.origin = indexToSelect - _this._selectedIndex;
|
|
37244
|
+
}
|
|
37015
37245
|
}));
|
|
37246
|
+
if (this._selectedIndex !== indexToSelect) {
|
|
37247
|
+
this._selectedIndex = indexToSelect;
|
|
37248
|
+
this._changeDetectorRef.markForCheck();
|
|
37249
|
+
}
|
|
37016
37250
|
};
|
|
37017
37251
|
/**
|
|
37018
37252
|
* @return {?}
|
|
37019
37253
|
*/
|
|
37020
|
-
|
|
37254
|
+
_MatTabGroupBase.prototype.ngAfterContentInit = /**
|
|
37021
37255
|
* @return {?}
|
|
37022
37256
|
*/
|
|
37023
37257
|
function () {
|
|
37024
|
-
|
|
37025
|
-
|
|
37026
|
-
|
|
37027
|
-
|
|
37028
|
-
|
|
37029
|
-
|
|
37030
|
-
|
|
37031
|
-
|
|
37032
|
-
|
|
37033
|
-
|
|
37034
|
-
|
|
37035
|
-
|
|
37036
|
-
|
|
37037
|
-
|
|
37038
|
-
|
|
37039
|
-
|
|
37040
|
-
|
|
37041
|
-
|
|
37042
|
-
|
|
37043
|
-
|
|
37044
|
-
|
|
37045
|
-
|
|
37258
|
+
var _this = this;
|
|
37259
|
+
this._subscribeToTabLabels();
|
|
37260
|
+
// Subscribe to changes in the amount of tabs, in order to be
|
|
37261
|
+
// able to re-render the content as new tabs are added or removed.
|
|
37262
|
+
this._tabsSubscription = this._tabs.changes.subscribe((/**
|
|
37263
|
+
* @return {?}
|
|
37264
|
+
*/
|
|
37265
|
+
function () {
|
|
37266
|
+
/** @type {?} */
|
|
37267
|
+
var indexToSelect = _this._clampTabIndex(_this._indexToSelect);
|
|
37268
|
+
// Maintain the previously-selected tab if a new tab is added or removed and there is no
|
|
37269
|
+
// explicit change that selects a different tab.
|
|
37270
|
+
if (indexToSelect === _this._selectedIndex) {
|
|
37271
|
+
/** @type {?} */
|
|
37272
|
+
var tabs = _this._tabs.toArray();
|
|
37273
|
+
for (var i = 0; i < tabs.length; i++) {
|
|
37274
|
+
if (tabs[i].isActive) {
|
|
37275
|
+
// Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
|
|
37276
|
+
// event, otherwise the consumer may end up in an infinite loop in some edge cases like
|
|
37277
|
+
// adding a tab within the `selectedIndexChange` event.
|
|
37278
|
+
_this._indexToSelect = _this._selectedIndex = i;
|
|
37279
|
+
break;
|
|
37280
|
+
}
|
|
37281
|
+
}
|
|
37282
|
+
}
|
|
37283
|
+
_this._subscribeToTabLabels();
|
|
37284
|
+
_this._changeDetectorRef.markForCheck();
|
|
37285
|
+
}));
|
|
37046
37286
|
};
|
|
37047
37287
|
/**
|
|
37048
37288
|
* @return {?}
|
|
37049
37289
|
*/
|
|
37050
|
-
|
|
37290
|
+
_MatTabGroupBase.prototype.ngOnDestroy = /**
|
|
37051
37291
|
* @return {?}
|
|
37052
37292
|
*/
|
|
37053
37293
|
function () {
|
|
37054
|
-
this.
|
|
37055
|
-
this.
|
|
37056
|
-
this._stopScrolling.complete();
|
|
37294
|
+
this._tabsSubscription.unsubscribe();
|
|
37295
|
+
this._tabLabelSubscription.unsubscribe();
|
|
37057
37296
|
};
|
|
37058
|
-
/**
|
|
37297
|
+
/** Re-aligns the ink bar to the selected tab element. */
|
|
37059
37298
|
/**
|
|
37060
|
-
*
|
|
37061
|
-
* @param {?} event
|
|
37299
|
+
* Re-aligns the ink bar to the selected tab element.
|
|
37062
37300
|
* @return {?}
|
|
37063
37301
|
*/
|
|
37064
|
-
|
|
37065
|
-
*
|
|
37066
|
-
* @param {?} event
|
|
37302
|
+
_MatTabGroupBase.prototype.realignInkBar = /**
|
|
37303
|
+
* Re-aligns the ink bar to the selected tab element.
|
|
37067
37304
|
* @return {?}
|
|
37068
37305
|
*/
|
|
37069
|
-
function (
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
return;
|
|
37073
|
-
}
|
|
37074
|
-
switch (event.keyCode) {
|
|
37075
|
-
case keycodes.HOME:
|
|
37076
|
-
this._keyManager.setFirstItemActive();
|
|
37077
|
-
event.preventDefault();
|
|
37078
|
-
break;
|
|
37079
|
-
case keycodes.END:
|
|
37080
|
-
this._keyManager.setLastItemActive();
|
|
37081
|
-
event.preventDefault();
|
|
37082
|
-
break;
|
|
37083
|
-
case keycodes.ENTER:
|
|
37084
|
-
case keycodes.SPACE:
|
|
37085
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
37086
|
-
this._itemSelected(event);
|
|
37087
|
-
break;
|
|
37088
|
-
default:
|
|
37089
|
-
this._keyManager.onKeydown(event);
|
|
37306
|
+
function () {
|
|
37307
|
+
if (this._tabHeader) {
|
|
37308
|
+
this._tabHeader._alignInkBarToSelectedTab();
|
|
37090
37309
|
}
|
|
37091
37310
|
};
|
|
37092
37311
|
/**
|
|
37093
|
-
*
|
|
37312
|
+
* @param {?} index
|
|
37313
|
+
* @return {?}
|
|
37314
|
+
*/
|
|
37315
|
+
_MatTabGroupBase.prototype._focusChanged = /**
|
|
37316
|
+
* @param {?} index
|
|
37317
|
+
* @return {?}
|
|
37094
37318
|
*/
|
|
37319
|
+
function (index) {
|
|
37320
|
+
this.focusChange.emit(this._createChangeEvent(index));
|
|
37321
|
+
};
|
|
37095
37322
|
/**
|
|
37096
|
-
*
|
|
37323
|
+
* @private
|
|
37324
|
+
* @param {?} index
|
|
37097
37325
|
* @return {?}
|
|
37098
37326
|
*/
|
|
37099
|
-
|
|
37100
|
-
*
|
|
37327
|
+
_MatTabGroupBase.prototype._createChangeEvent = /**
|
|
37328
|
+
* @private
|
|
37329
|
+
* @param {?} index
|
|
37101
37330
|
* @return {?}
|
|
37102
37331
|
*/
|
|
37103
|
-
function () {
|
|
37104
|
-
var _this = this;
|
|
37332
|
+
function (index) {
|
|
37105
37333
|
/** @type {?} */
|
|
37106
|
-
var
|
|
37107
|
-
|
|
37108
|
-
|
|
37109
|
-
|
|
37110
|
-
if (textContent !== this._currentTextContent) {
|
|
37111
|
-
this._currentTextContent = textContent || '';
|
|
37112
|
-
// The content observer runs outside the `NgZone` by default, which
|
|
37113
|
-
// means that we need to bring the callback back in ourselves.
|
|
37114
|
-
this._ngZone.run((/**
|
|
37115
|
-
* @return {?}
|
|
37116
|
-
*/
|
|
37117
|
-
function () {
|
|
37118
|
-
_this.updatePagination();
|
|
37119
|
-
_this._alignInkBarToSelectedTab();
|
|
37120
|
-
_this._changeDetectorRef.markForCheck();
|
|
37121
|
-
}));
|
|
37334
|
+
var event = new MatTabChangeEvent;
|
|
37335
|
+
event.index = index;
|
|
37336
|
+
if (this._tabs && this._tabs.length) {
|
|
37337
|
+
event.tab = this._tabs.toArray()[index];
|
|
37122
37338
|
}
|
|
37339
|
+
return event;
|
|
37123
37340
|
};
|
|
37124
37341
|
/**
|
|
37125
|
-
*
|
|
37126
|
-
*
|
|
37127
|
-
*
|
|
37128
|
-
*
|
|
37129
|
-
* page.
|
|
37342
|
+
* Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
|
|
37343
|
+
* on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
|
|
37344
|
+
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
|
37345
|
+
* manually.
|
|
37130
37346
|
*/
|
|
37131
37347
|
/**
|
|
37132
|
-
*
|
|
37133
|
-
*
|
|
37134
|
-
*
|
|
37135
|
-
*
|
|
37136
|
-
*
|
|
37348
|
+
* Subscribes to changes in the tab labels. This is needed, because the \@Input for the label is
|
|
37349
|
+
* on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
|
|
37350
|
+
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
|
37351
|
+
* manually.
|
|
37352
|
+
* @private
|
|
37137
37353
|
* @return {?}
|
|
37138
37354
|
*/
|
|
37139
|
-
|
|
37140
|
-
*
|
|
37141
|
-
*
|
|
37142
|
-
*
|
|
37143
|
-
*
|
|
37144
|
-
*
|
|
37355
|
+
_MatTabGroupBase.prototype._subscribeToTabLabels = /**
|
|
37356
|
+
* Subscribes to changes in the tab labels. This is needed, because the \@Input for the label is
|
|
37357
|
+
* on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
|
|
37358
|
+
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
|
37359
|
+
* manually.
|
|
37360
|
+
* @private
|
|
37145
37361
|
* @return {?}
|
|
37146
37362
|
*/
|
|
37147
37363
|
function () {
|
|
37148
|
-
this
|
|
37149
|
-
this.
|
|
37150
|
-
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
get: /**
|
|
37155
|
-
* Tracks which element has focus; used for keyboard navigation
|
|
37364
|
+
var _this = this;
|
|
37365
|
+
if (this._tabLabelSubscription) {
|
|
37366
|
+
this._tabLabelSubscription.unsubscribe();
|
|
37367
|
+
}
|
|
37368
|
+
this._tabLabelSubscription = rxjs.merge.apply(void 0, this._tabs.map((/**
|
|
37369
|
+
* @param {?} tab
|
|
37156
37370
|
* @return {?}
|
|
37157
37371
|
*/
|
|
37158
|
-
function () {
|
|
37159
|
-
return this._keyManager ? (/** @type {?} */ (this._keyManager.activeItemIndex)) : 0;
|
|
37160
|
-
},
|
|
37161
|
-
/** When the focus index is set, we must manually send focus to the correct label */
|
|
37162
|
-
set: /**
|
|
37163
|
-
* When the focus index is set, we must manually send focus to the correct label
|
|
37164
|
-
* @param {?} value
|
|
37372
|
+
function (tab) { return tab._stateChanges; }))).subscribe((/**
|
|
37165
37373
|
* @return {?}
|
|
37166
37374
|
*/
|
|
37167
|
-
function (
|
|
37168
|
-
|
|
37169
|
-
|
|
37170
|
-
}
|
|
37171
|
-
this._keyManager.setActiveItem(value);
|
|
37172
|
-
},
|
|
37173
|
-
enumerable: true,
|
|
37174
|
-
configurable: true
|
|
37175
|
-
});
|
|
37176
|
-
/**
|
|
37177
|
-
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
37178
|
-
* providing a valid index and return true.
|
|
37179
|
-
*/
|
|
37375
|
+
function () { return _this._changeDetectorRef.markForCheck(); }));
|
|
37376
|
+
};
|
|
37377
|
+
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
|
37180
37378
|
/**
|
|
37181
|
-
*
|
|
37182
|
-
*
|
|
37379
|
+
* Clamps the given index to the bounds of 0 and the tabs length.
|
|
37380
|
+
* @private
|
|
37183
37381
|
* @param {?} index
|
|
37184
37382
|
* @return {?}
|
|
37185
37383
|
*/
|
|
37186
|
-
|
|
37187
|
-
*
|
|
37188
|
-
*
|
|
37384
|
+
_MatTabGroupBase.prototype._clampTabIndex = /**
|
|
37385
|
+
* Clamps the given index to the bounds of 0 and the tabs length.
|
|
37386
|
+
* @private
|
|
37189
37387
|
* @param {?} index
|
|
37190
37388
|
* @return {?}
|
|
37191
37389
|
*/
|
|
37192
37390
|
function (index) {
|
|
37193
|
-
|
|
37194
|
-
|
|
37195
|
-
|
|
37196
|
-
|
|
37197
|
-
var tab = this._items ? this._items.toArray()[index] : null;
|
|
37198
|
-
return !!tab && !tab.disabled;
|
|
37391
|
+
// Note the `|| 0`, which ensures that values like NaN can't get through
|
|
37392
|
+
// and which would otherwise throw the component into an infinite loop
|
|
37393
|
+
// (since Math.max(NaN, 0) === NaN).
|
|
37394
|
+
return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
|
|
37199
37395
|
};
|
|
37396
|
+
/** Returns a unique id for each tab label element */
|
|
37200
37397
|
/**
|
|
37201
|
-
*
|
|
37202
|
-
*
|
|
37203
|
-
*/
|
|
37204
|
-
/**
|
|
37205
|
-
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
37206
|
-
* scrolling is enabled.
|
|
37207
|
-
* @param {?} tabIndex
|
|
37398
|
+
* Returns a unique id for each tab label element
|
|
37399
|
+
* @param {?} i
|
|
37208
37400
|
* @return {?}
|
|
37209
37401
|
*/
|
|
37210
|
-
|
|
37211
|
-
*
|
|
37212
|
-
*
|
|
37213
|
-
* @param {?} tabIndex
|
|
37402
|
+
_MatTabGroupBase.prototype._getTabLabelId = /**
|
|
37403
|
+
* Returns a unique id for each tab label element
|
|
37404
|
+
* @param {?} i
|
|
37214
37405
|
* @return {?}
|
|
37215
37406
|
*/
|
|
37216
|
-
function (
|
|
37217
|
-
|
|
37218
|
-
this._scrollToLabel(tabIndex);
|
|
37219
|
-
}
|
|
37220
|
-
if (this._items && this._items.length) {
|
|
37221
|
-
this._items.toArray()[tabIndex].focus();
|
|
37222
|
-
// Do not let the browser manage scrolling to focus the element, this will be handled
|
|
37223
|
-
// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
|
|
37224
|
-
// should be the full width minus the offset width.
|
|
37225
|
-
/** @type {?} */
|
|
37226
|
-
var containerEl = this._tabListContainer.nativeElement;
|
|
37227
|
-
/** @type {?} */
|
|
37228
|
-
var dir = this._getLayoutDirection();
|
|
37229
|
-
if (dir == 'ltr') {
|
|
37230
|
-
containerEl.scrollLeft = 0;
|
|
37231
|
-
}
|
|
37232
|
-
else {
|
|
37233
|
-
containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
|
|
37234
|
-
}
|
|
37235
|
-
}
|
|
37407
|
+
function (i) {
|
|
37408
|
+
return "mat-tab-label-" + this._groupId + "-" + i;
|
|
37236
37409
|
};
|
|
37237
|
-
/**
|
|
37410
|
+
/** Returns a unique id for each tab content element */
|
|
37238
37411
|
/**
|
|
37239
|
-
*
|
|
37412
|
+
* Returns a unique id for each tab content element
|
|
37413
|
+
* @param {?} i
|
|
37240
37414
|
* @return {?}
|
|
37241
37415
|
*/
|
|
37242
|
-
|
|
37243
|
-
*
|
|
37416
|
+
_MatTabGroupBase.prototype._getTabContentId = /**
|
|
37417
|
+
* Returns a unique id for each tab content element
|
|
37418
|
+
* @param {?} i
|
|
37244
37419
|
* @return {?}
|
|
37245
37420
|
*/
|
|
37246
|
-
function () {
|
|
37247
|
-
return
|
|
37421
|
+
function (i) {
|
|
37422
|
+
return "mat-tab-content-" + this._groupId + "-" + i;
|
|
37248
37423
|
};
|
|
37249
|
-
/** Performs the CSS transformation on the tab list that will cause the list to scroll. */
|
|
37250
37424
|
/**
|
|
37251
|
-
*
|
|
37425
|
+
* Sets the height of the body wrapper to the height of the activating tab if dynamic
|
|
37426
|
+
* height property is true.
|
|
37427
|
+
*/
|
|
37428
|
+
/**
|
|
37429
|
+
* Sets the height of the body wrapper to the height of the activating tab if dynamic
|
|
37430
|
+
* height property is true.
|
|
37431
|
+
* @param {?} tabHeight
|
|
37252
37432
|
* @return {?}
|
|
37253
37433
|
*/
|
|
37254
|
-
|
|
37255
|
-
*
|
|
37434
|
+
_MatTabGroupBase.prototype._setTabBodyWrapperHeight = /**
|
|
37435
|
+
* Sets the height of the body wrapper to the height of the activating tab if dynamic
|
|
37436
|
+
* height property is true.
|
|
37437
|
+
* @param {?} tabHeight
|
|
37256
37438
|
* @return {?}
|
|
37257
37439
|
*/
|
|
37258
|
-
function () {
|
|
37259
|
-
|
|
37260
|
-
|
|
37261
|
-
|
|
37262
|
-
var platform$$1 = this._platform;
|
|
37440
|
+
function (tabHeight) {
|
|
37441
|
+
if (!this._dynamicHeight || !this._tabBodyWrapperHeight) {
|
|
37442
|
+
return;
|
|
37443
|
+
}
|
|
37263
37444
|
/** @type {?} */
|
|
37264
|
-
var
|
|
37265
|
-
|
|
37266
|
-
//
|
|
37267
|
-
//
|
|
37268
|
-
|
|
37269
|
-
|
|
37270
|
-
// browsers to blur the content of the element.
|
|
37271
|
-
this._tabList.nativeElement.style.transform = "translateX(" + Math.round(translateX) + "px)";
|
|
37272
|
-
// Setting the `transform` on IE will change the scroll offset of the parent, causing the
|
|
37273
|
-
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
|
37274
|
-
// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
|
|
37275
|
-
// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
|
|
37276
|
-
// @breaking-change 9.0.0 Remove null check for `platform` after it can no longer be undefined.
|
|
37277
|
-
if (platform$$1 && (platform$$1.TRIDENT || platform$$1.EDGE)) {
|
|
37278
|
-
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
37445
|
+
var wrapper = this._tabBodyWrapper.nativeElement;
|
|
37446
|
+
wrapper.style.height = this._tabBodyWrapperHeight + 'px';
|
|
37447
|
+
// This conditional forces the browser to paint the height so that
|
|
37448
|
+
// the animation to the new height can have an origin.
|
|
37449
|
+
if (this._tabBodyWrapper.nativeElement.offsetHeight) {
|
|
37450
|
+
wrapper.style.height = tabHeight + 'px';
|
|
37279
37451
|
}
|
|
37280
37452
|
};
|
|
37281
|
-
|
|
37282
|
-
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
|
|
37283
|
-
get: /**
|
|
37284
|
-
* Sets the distance in pixels that the tab header should be transformed in the X-axis.
|
|
37285
|
-
* @return {?}
|
|
37286
|
-
*/
|
|
37287
|
-
function () { return this._scrollDistance; },
|
|
37288
|
-
set: /**
|
|
37289
|
-
* @param {?} value
|
|
37290
|
-
* @return {?}
|
|
37291
|
-
*/
|
|
37292
|
-
function (value) {
|
|
37293
|
-
this._scrollTo(value);
|
|
37294
|
-
},
|
|
37295
|
-
enumerable: true,
|
|
37296
|
-
configurable: true
|
|
37297
|
-
});
|
|
37298
|
-
/**
|
|
37299
|
-
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
37300
|
-
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
37301
|
-
* length of the tab list view window.
|
|
37302
|
-
*
|
|
37303
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37304
|
-
* should be called sparingly.
|
|
37305
|
-
*/
|
|
37453
|
+
/** Removes the height of the tab body wrapper. */
|
|
37306
37454
|
/**
|
|
37307
|
-
*
|
|
37308
|
-
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
37309
|
-
* length of the tab list view window.
|
|
37310
|
-
*
|
|
37311
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37312
|
-
* should be called sparingly.
|
|
37313
|
-
* @param {?} direction
|
|
37455
|
+
* Removes the height of the tab body wrapper.
|
|
37314
37456
|
* @return {?}
|
|
37315
37457
|
*/
|
|
37316
|
-
|
|
37317
|
-
*
|
|
37318
|
-
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
37319
|
-
* length of the tab list view window.
|
|
37320
|
-
*
|
|
37321
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37322
|
-
* should be called sparingly.
|
|
37323
|
-
* @param {?} direction
|
|
37458
|
+
_MatTabGroupBase.prototype._removeTabBodyWrapperHeight = /**
|
|
37459
|
+
* Removes the height of the tab body wrapper.
|
|
37324
37460
|
* @return {?}
|
|
37325
37461
|
*/
|
|
37326
|
-
function (
|
|
37327
|
-
/** @type {?} */
|
|
37328
|
-
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
37329
|
-
// Move the scroll distance one-third the length of the tab list's viewport.
|
|
37462
|
+
function () {
|
|
37330
37463
|
/** @type {?} */
|
|
37331
|
-
var
|
|
37332
|
-
|
|
37464
|
+
var wrapper = this._tabBodyWrapper.nativeElement;
|
|
37465
|
+
this._tabBodyWrapperHeight = wrapper.clientHeight;
|
|
37466
|
+
wrapper.style.height = '';
|
|
37467
|
+
this.animationDone.emit();
|
|
37333
37468
|
};
|
|
37334
|
-
/**
|
|
37469
|
+
/** Handle click events, setting new selected index if appropriate. */
|
|
37335
37470
|
/**
|
|
37336
|
-
*
|
|
37337
|
-
* @param {?}
|
|
37471
|
+
* Handle click events, setting new selected index if appropriate.
|
|
37472
|
+
* @param {?} tab
|
|
37473
|
+
* @param {?} tabHeader
|
|
37474
|
+
* @param {?} index
|
|
37338
37475
|
* @return {?}
|
|
37339
37476
|
*/
|
|
37340
|
-
|
|
37341
|
-
*
|
|
37342
|
-
* @param {?}
|
|
37477
|
+
_MatTabGroupBase.prototype._handleClick = /**
|
|
37478
|
+
* Handle click events, setting new selected index if appropriate.
|
|
37479
|
+
* @param {?} tab
|
|
37480
|
+
* @param {?} tabHeader
|
|
37481
|
+
* @param {?} index
|
|
37343
37482
|
* @return {?}
|
|
37344
37483
|
*/
|
|
37345
|
-
function (
|
|
37346
|
-
|
|
37347
|
-
|
|
37484
|
+
function (tab, tabHeader, index) {
|
|
37485
|
+
if (!tab.disabled) {
|
|
37486
|
+
this.selectedIndex = tabHeader.focusIndex = index;
|
|
37487
|
+
}
|
|
37348
37488
|
};
|
|
37489
|
+
/** Retrieves the tabindex for the tab. */
|
|
37349
37490
|
/**
|
|
37350
|
-
*
|
|
37351
|
-
*
|
|
37352
|
-
*
|
|
37353
|
-
* should be called sparingly.
|
|
37354
|
-
*/
|
|
37355
|
-
/**
|
|
37356
|
-
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
37357
|
-
*
|
|
37358
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37359
|
-
* should be called sparingly.
|
|
37360
|
-
* @param {?} labelIndex
|
|
37491
|
+
* Retrieves the tabindex for the tab.
|
|
37492
|
+
* @param {?} tab
|
|
37493
|
+
* @param {?} idx
|
|
37361
37494
|
* @return {?}
|
|
37362
37495
|
*/
|
|
37363
|
-
|
|
37364
|
-
*
|
|
37365
|
-
*
|
|
37366
|
-
*
|
|
37367
|
-
* should be called sparingly.
|
|
37368
|
-
* @param {?} labelIndex
|
|
37496
|
+
_MatTabGroupBase.prototype._getTabIndex = /**
|
|
37497
|
+
* Retrieves the tabindex for the tab.
|
|
37498
|
+
* @param {?} tab
|
|
37499
|
+
* @param {?} idx
|
|
37369
37500
|
* @return {?}
|
|
37370
37501
|
*/
|
|
37371
|
-
function (
|
|
37372
|
-
|
|
37373
|
-
|
|
37374
|
-
if (!selectedLabel) {
|
|
37375
|
-
return;
|
|
37376
|
-
}
|
|
37377
|
-
// The view length is the visible width of the tab labels.
|
|
37378
|
-
/** @type {?} */
|
|
37379
|
-
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
37380
|
-
var _a = selectedLabel.elementRef.nativeElement, offsetLeft = _a.offsetLeft, offsetWidth = _a.offsetWidth;
|
|
37381
|
-
/** @type {?} */
|
|
37382
|
-
var labelBeforePos;
|
|
37383
|
-
/** @type {?} */
|
|
37384
|
-
var labelAfterPos;
|
|
37385
|
-
if (this._getLayoutDirection() == 'ltr') {
|
|
37386
|
-
labelBeforePos = offsetLeft;
|
|
37387
|
-
labelAfterPos = labelBeforePos + offsetWidth;
|
|
37388
|
-
}
|
|
37389
|
-
else {
|
|
37390
|
-
labelAfterPos = this._tabList.nativeElement.offsetWidth - offsetLeft;
|
|
37391
|
-
labelBeforePos = labelAfterPos - offsetWidth;
|
|
37392
|
-
}
|
|
37393
|
-
/** @type {?} */
|
|
37394
|
-
var beforeVisiblePos = this.scrollDistance;
|
|
37395
|
-
/** @type {?} */
|
|
37396
|
-
var afterVisiblePos = this.scrollDistance + viewLength;
|
|
37397
|
-
if (labelBeforePos < beforeVisiblePos) {
|
|
37398
|
-
// Scroll header to move label to the before direction
|
|
37399
|
-
this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
|
|
37400
|
-
}
|
|
37401
|
-
else if (labelAfterPos > afterVisiblePos) {
|
|
37402
|
-
// Scroll header to move label to the after direction
|
|
37403
|
-
this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
|
|
37502
|
+
function (tab, idx) {
|
|
37503
|
+
if (tab.disabled) {
|
|
37504
|
+
return null;
|
|
37404
37505
|
}
|
|
37506
|
+
return this.selectedIndex === idx ? 0 : -1;
|
|
37405
37507
|
};
|
|
37406
|
-
|
|
37407
|
-
|
|
37408
|
-
|
|
37409
|
-
|
|
37410
|
-
|
|
37411
|
-
|
|
37412
|
-
|
|
37413
|
-
|
|
37414
|
-
|
|
37415
|
-
|
|
37416
|
-
|
|
37417
|
-
|
|
37418
|
-
|
|
37419
|
-
|
|
37420
|
-
|
|
37421
|
-
|
|
37422
|
-
|
|
37423
|
-
|
|
37424
|
-
|
|
37425
|
-
|
|
37426
|
-
|
|
37427
|
-
|
|
37428
|
-
|
|
37429
|
-
* should be called sparingly.
|
|
37430
|
-
* @return {?}
|
|
37431
|
-
*/
|
|
37432
|
-
function () {
|
|
37433
|
-
/** @type {?} */
|
|
37434
|
-
var isEnabled = this._tabList.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;
|
|
37435
|
-
if (!isEnabled) {
|
|
37436
|
-
this.scrollDistance = 0;
|
|
37437
|
-
}
|
|
37438
|
-
if (isEnabled !== this._showPaginationControls) {
|
|
37439
|
-
this._changeDetectorRef.markForCheck();
|
|
37440
|
-
}
|
|
37441
|
-
this._showPaginationControls = isEnabled;
|
|
37508
|
+
_MatTabGroupBase.decorators = [
|
|
37509
|
+
{ type: core.Directive, args: [{
|
|
37510
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
37511
|
+
selector: 'do-not-use-abstract-mat-tab-group-base'
|
|
37512
|
+
},] },
|
|
37513
|
+
];
|
|
37514
|
+
/** @nocollapse */
|
|
37515
|
+
_MatTabGroupBase.ctorParameters = function () { return [
|
|
37516
|
+
{ type: core.ElementRef },
|
|
37517
|
+
{ type: core.ChangeDetectorRef },
|
|
37518
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_TABS_CONFIG,] }, { type: core.Optional }] },
|
|
37519
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
37520
|
+
]; };
|
|
37521
|
+
_MatTabGroupBase.propDecorators = {
|
|
37522
|
+
dynamicHeight: [{ type: core.Input }],
|
|
37523
|
+
selectedIndex: [{ type: core.Input }],
|
|
37524
|
+
headerPosition: [{ type: core.Input }],
|
|
37525
|
+
animationDuration: [{ type: core.Input }],
|
|
37526
|
+
backgroundColor: [{ type: core.Input }],
|
|
37527
|
+
selectedIndexChange: [{ type: core.Output }],
|
|
37528
|
+
focusChange: [{ type: core.Output }],
|
|
37529
|
+
animationDone: [{ type: core.Output }],
|
|
37530
|
+
selectedTabChange: [{ type: core.Output }]
|
|
37442
37531
|
};
|
|
37443
|
-
|
|
37444
|
-
|
|
37445
|
-
|
|
37446
|
-
|
|
37447
|
-
|
|
37448
|
-
|
|
37449
|
-
|
|
37450
|
-
|
|
37451
|
-
|
|
37452
|
-
|
|
37453
|
-
|
|
37454
|
-
|
|
37455
|
-
|
|
37456
|
-
|
|
37457
|
-
|
|
37458
|
-
|
|
37459
|
-
|
|
37460
|
-
|
|
37461
|
-
|
|
37462
|
-
|
|
37463
|
-
|
|
37464
|
-
|
|
37465
|
-
|
|
37466
|
-
|
|
37467
|
-
|
|
37468
|
-
|
|
37469
|
-
|
|
37470
|
-
|
|
37471
|
-
|
|
37472
|
-
|
|
37473
|
-
|
|
37474
|
-
|
|
37475
|
-
|
|
37476
|
-
|
|
37532
|
+
return _MatTabGroupBase;
|
|
37533
|
+
}(_MatTabGroupMixinBase));
|
|
37534
|
+
/**
|
|
37535
|
+
* Material design tab-group component. Supports basic tab pairs (label + content) and includes
|
|
37536
|
+
* animated ink-bar, keyboard navigation, and screen reader.
|
|
37537
|
+
* See: https://material.io/design/components/tabs.html
|
|
37538
|
+
*/
|
|
37539
|
+
var MatTabGroup = /** @class */ (function (_super) {
|
|
37540
|
+
__extends(MatTabGroup, _super);
|
|
37541
|
+
function MatTabGroup(elementRef, changeDetectorRef, defaultConfig, animationMode) {
|
|
37542
|
+
return _super.call(this, elementRef, changeDetectorRef, defaultConfig, animationMode) || this;
|
|
37543
|
+
}
|
|
37544
|
+
MatTabGroup.decorators = [
|
|
37545
|
+
{ type: core.Component, args: [{selector: 'mat-tab-group',
|
|
37546
|
+
exportAs: 'matTabGroup',
|
|
37547
|
+
template: "<mat-tab-header #tabHeader [selectedIndex]=\"selectedIndex\" [disableRipple]=\"disableRipple\" (indexFocused)=\"_focusChanged($event)\" (selectFocusedIndex)=\"selectedIndex = $event\"><div class=\"mat-tab-label\" role=\"tab\" matTabLabelWrapper mat-ripple cdkMonitorElementFocus *ngFor=\"let tab of _tabs; let i = index\" [id]=\"_getTabLabelId(i)\" [attr.tabIndex]=\"_getTabIndex(tab, i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"_tabs.length\" [attr.aria-controls]=\"_getTabContentId(i)\" [attr.aria-selected]=\"selectedIndex == i\" [attr.aria-label]=\"tab.ariaLabel || null\" [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\" [class.mat-tab-label-active]=\"selectedIndex == i\" [disabled]=\"tab.disabled\" [matRippleDisabled]=\"tab.disabled || disableRipple\" (click)=\"_handleClick(tab, tabHeader, i)\"><div class=\"mat-tab-label-content\"><ng-template [ngIf]=\"tab.templateLabel\"><ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template></ng-template><ng-template [ngIf]=\"!tab.templateLabel\">{{tab.textLabel}}</ng-template></div></div></mat-tab-header><div class=\"mat-tab-body-wrapper\" [class._mat-animation-noopable]=\"_animationMode === 'NoopAnimations'\" #tabBodyWrapper><mat-tab-body role=\"tabpanel\" *ngFor=\"let tab of _tabs; let i = index\" [id]=\"_getTabContentId(i)\" [attr.aria-labelledby]=\"_getTabLabelId(i)\" [class.mat-tab-body-active]=\"selectedIndex == i\" [content]=\"tab.content\" [position]=\"tab.position\" [origin]=\"tab.origin\" [animationDuration]=\"animationDuration\" (_onCentered)=\"_removeTabBodyWrapperHeight()\" (_onCentering)=\"_setTabBodyWrapperHeight($event)\"></mat-tab-body></div>",
|
|
37548
|
+
styles: [".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{padding:0 12px}}@media (max-width:959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height .5s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}"],
|
|
37549
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
37550
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
37551
|
+
inputs: ['color', 'disableRipple'],
|
|
37552
|
+
host: {
|
|
37553
|
+
'class': 'mat-tab-group',
|
|
37554
|
+
'[class.mat-tab-group-dynamic-height]': 'dynamicHeight',
|
|
37555
|
+
'[class.mat-tab-group-inverted-header]': 'headerPosition === "below"',
|
|
37556
|
+
},
|
|
37557
|
+
},] },
|
|
37558
|
+
];
|
|
37559
|
+
/** @nocollapse */
|
|
37560
|
+
MatTabGroup.ctorParameters = function () { return [
|
|
37561
|
+
{ type: core.ElementRef },
|
|
37562
|
+
{ type: core.ChangeDetectorRef },
|
|
37563
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_TABS_CONFIG,] }, { type: core.Optional }] },
|
|
37564
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
37565
|
+
]; };
|
|
37566
|
+
MatTabGroup.propDecorators = {
|
|
37567
|
+
_tabs: [{ type: core.ContentChildren, args: [MatTab,] }],
|
|
37568
|
+
_tabBodyWrapper: [{ type: core.ViewChild, args: ['tabBodyWrapper', { static: false },] }],
|
|
37569
|
+
_tabHeader: [{ type: core.ViewChild, args: ['tabHeader', { static: false },] }]
|
|
37477
37570
|
};
|
|
37571
|
+
return MatTabGroup;
|
|
37572
|
+
}(_MatTabGroupBase));
|
|
37573
|
+
|
|
37574
|
+
/**
|
|
37575
|
+
* @fileoverview added by tsickle
|
|
37576
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
37577
|
+
*/
|
|
37578
|
+
// Boilerplate for applying mixins to MatTabLabelWrapper.
|
|
37579
|
+
/**
|
|
37580
|
+
* \@docs-private
|
|
37581
|
+
*/
|
|
37582
|
+
var
|
|
37583
|
+
// Boilerplate for applying mixins to MatTabLabelWrapper.
|
|
37584
|
+
/**
|
|
37585
|
+
* \@docs-private
|
|
37586
|
+
*/
|
|
37587
|
+
MatTabLabelWrapperBase = /** @class */ (function () {
|
|
37588
|
+
function MatTabLabelWrapperBase() {
|
|
37589
|
+
}
|
|
37590
|
+
return MatTabLabelWrapperBase;
|
|
37591
|
+
}());
|
|
37592
|
+
/** @type {?} */
|
|
37593
|
+
var _MatTabLabelWrapperMixinBase = mixinDisabled(MatTabLabelWrapperBase);
|
|
37594
|
+
/**
|
|
37595
|
+
* Used in the `mat-tab-group` view to display tab labels.
|
|
37596
|
+
* \@docs-private
|
|
37597
|
+
*/
|
|
37598
|
+
var MatTabLabelWrapper = /** @class */ (function (_super) {
|
|
37599
|
+
__extends(MatTabLabelWrapper, _super);
|
|
37600
|
+
function MatTabLabelWrapper(elementRef) {
|
|
37601
|
+
var _this = _super.call(this) || this;
|
|
37602
|
+
_this.elementRef = elementRef;
|
|
37603
|
+
return _this;
|
|
37604
|
+
}
|
|
37605
|
+
/** Sets focus on the wrapper element */
|
|
37478
37606
|
/**
|
|
37479
|
-
*
|
|
37480
|
-
* is equal to the difference in width between the tab list container and tab header container.
|
|
37481
|
-
*
|
|
37482
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37483
|
-
* should be called sparingly.
|
|
37484
|
-
*/
|
|
37485
|
-
/**
|
|
37486
|
-
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
37487
|
-
* is equal to the difference in width between the tab list container and tab header container.
|
|
37488
|
-
*
|
|
37489
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37490
|
-
* should be called sparingly.
|
|
37607
|
+
* Sets focus on the wrapper element
|
|
37491
37608
|
* @return {?}
|
|
37492
37609
|
*/
|
|
37493
|
-
|
|
37494
|
-
*
|
|
37495
|
-
* is equal to the difference in width between the tab list container and tab header container.
|
|
37496
|
-
*
|
|
37497
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
37498
|
-
* should be called sparingly.
|
|
37610
|
+
MatTabLabelWrapper.prototype.focus = /**
|
|
37611
|
+
* Sets focus on the wrapper element
|
|
37499
37612
|
* @return {?}
|
|
37500
37613
|
*/
|
|
37501
37614
|
function () {
|
|
37502
|
-
|
|
37503
|
-
var lengthOfTabList = this._tabList.nativeElement.scrollWidth;
|
|
37504
|
-
/** @type {?} */
|
|
37505
|
-
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
37506
|
-
return (lengthOfTabList - viewLength) || 0;
|
|
37615
|
+
this.elementRef.nativeElement.focus();
|
|
37507
37616
|
};
|
|
37508
|
-
/** Tells the ink-bar to align itself to the current label wrapper */
|
|
37509
37617
|
/**
|
|
37510
|
-
* Tells the ink-bar to align itself to the current label wrapper
|
|
37511
37618
|
* @return {?}
|
|
37512
37619
|
*/
|
|
37513
|
-
|
|
37514
|
-
* Tells the ink-bar to align itself to the current label wrapper
|
|
37620
|
+
MatTabLabelWrapper.prototype.getOffsetLeft = /**
|
|
37515
37621
|
* @return {?}
|
|
37516
37622
|
*/
|
|
37517
37623
|
function () {
|
|
37518
|
-
|
|
37519
|
-
var selectedItem = this._items && this._items.length ?
|
|
37520
|
-
this._items.toArray()[this.selectedIndex] : null;
|
|
37521
|
-
/** @type {?} */
|
|
37522
|
-
var selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
37523
|
-
if (selectedLabelWrapper) {
|
|
37524
|
-
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
37525
|
-
}
|
|
37526
|
-
else {
|
|
37527
|
-
this._inkBar.hide();
|
|
37528
|
-
}
|
|
37624
|
+
return this.elementRef.nativeElement.offsetLeft;
|
|
37529
37625
|
};
|
|
37530
|
-
/** Stops the currently-running paginator interval. */
|
|
37531
37626
|
/**
|
|
37532
|
-
* Stops the currently-running paginator interval.
|
|
37533
37627
|
* @return {?}
|
|
37534
37628
|
*/
|
|
37535
|
-
|
|
37536
|
-
* Stops the currently-running paginator interval.
|
|
37629
|
+
MatTabLabelWrapper.prototype.getOffsetWidth = /**
|
|
37537
37630
|
* @return {?}
|
|
37538
37631
|
*/
|
|
37539
37632
|
function () {
|
|
37540
|
-
this.
|
|
37541
|
-
};
|
|
37542
|
-
/**
|
|
37543
|
-
* Handles the user pressing down on one of the paginators.
|
|
37544
|
-
* Starts scrolling the header after a certain amount of time.
|
|
37545
|
-
* @param direction In which direction the paginator should be scrolled.
|
|
37546
|
-
*/
|
|
37547
|
-
/**
|
|
37548
|
-
* Handles the user pressing down on one of the paginators.
|
|
37549
|
-
* Starts scrolling the header after a certain amount of time.
|
|
37550
|
-
* @param {?} direction In which direction the paginator should be scrolled.
|
|
37551
|
-
* @return {?}
|
|
37552
|
-
*/
|
|
37553
|
-
MatPaginatedTabHeader.prototype._handlePaginatorPress = /**
|
|
37554
|
-
* Handles the user pressing down on one of the paginators.
|
|
37555
|
-
* Starts scrolling the header after a certain amount of time.
|
|
37556
|
-
* @param {?} direction In which direction the paginator should be scrolled.
|
|
37557
|
-
* @return {?}
|
|
37558
|
-
*/
|
|
37559
|
-
function (direction) {
|
|
37560
|
-
var _this = this;
|
|
37561
|
-
// Avoid overlapping timers.
|
|
37562
|
-
this._stopInterval();
|
|
37563
|
-
// Start a timer after the delay and keep firing based on the interval.
|
|
37564
|
-
rxjs.timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
|
|
37565
|
-
// Keep the timer going until something tells it to stop or the component is destroyed.
|
|
37566
|
-
.pipe(operators.takeUntil(rxjs.merge(this._stopScrolling, this._destroyed)))
|
|
37567
|
-
.subscribe((/**
|
|
37568
|
-
* @return {?}
|
|
37569
|
-
*/
|
|
37570
|
-
function () {
|
|
37571
|
-
var _a = _this._scrollHeader(direction), maxScrollDistance = _a.maxScrollDistance, distance = _a.distance;
|
|
37572
|
-
// Stop the timer if we've reached the start or the end.
|
|
37573
|
-
if (distance === 0 || distance >= maxScrollDistance) {
|
|
37574
|
-
_this._stopInterval();
|
|
37575
|
-
}
|
|
37576
|
-
}));
|
|
37577
|
-
};
|
|
37578
|
-
/**
|
|
37579
|
-
* Scrolls the header to a given position.
|
|
37580
|
-
* @param position Position to which to scroll.
|
|
37581
|
-
* @returns Information on the current scroll distance and the maximum.
|
|
37582
|
-
*/
|
|
37583
|
-
/**
|
|
37584
|
-
* Scrolls the header to a given position.
|
|
37585
|
-
* @private
|
|
37586
|
-
* @param {?} position Position to which to scroll.
|
|
37587
|
-
* @return {?} Information on the current scroll distance and the maximum.
|
|
37588
|
-
*/
|
|
37589
|
-
MatPaginatedTabHeader.prototype._scrollTo = /**
|
|
37590
|
-
* Scrolls the header to a given position.
|
|
37591
|
-
* @private
|
|
37592
|
-
* @param {?} position Position to which to scroll.
|
|
37593
|
-
* @return {?} Information on the current scroll distance and the maximum.
|
|
37594
|
-
*/
|
|
37595
|
-
function (position) {
|
|
37596
|
-
/** @type {?} */
|
|
37597
|
-
var maxScrollDistance = this._getMaxScrollDistance();
|
|
37598
|
-
this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
|
|
37599
|
-
// Mark that the scroll distance has changed so that after the view is checked, the CSS
|
|
37600
|
-
// transformation can move the header.
|
|
37601
|
-
this._scrollDistanceChanged = true;
|
|
37602
|
-
this._checkScrollingControls();
|
|
37603
|
-
return { maxScrollDistance: maxScrollDistance, distance: this._scrollDistance };
|
|
37604
|
-
};
|
|
37605
|
-
/** @nocollapse */
|
|
37606
|
-
MatPaginatedTabHeader.ctorParameters = function () { return [
|
|
37607
|
-
{ type: core.ElementRef },
|
|
37608
|
-
{ type: core.ChangeDetectorRef },
|
|
37609
|
-
{ type: scrolling.ViewportRuler },
|
|
37610
|
-
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
37611
|
-
{ type: core.NgZone },
|
|
37612
|
-
{ type: platform.Platform },
|
|
37613
|
-
{ type: String }
|
|
37614
|
-
]; };
|
|
37615
|
-
return MatPaginatedTabHeader;
|
|
37616
|
-
}());
|
|
37617
|
-
|
|
37618
|
-
/**
|
|
37619
|
-
* @fileoverview added by tsickle
|
|
37620
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
37621
|
-
*/
|
|
37622
|
-
/**
|
|
37623
|
-
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
37624
|
-
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
37625
|
-
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
37626
|
-
* left and right across the header.
|
|
37627
|
-
* \@docs-private
|
|
37628
|
-
*/
|
|
37629
|
-
var MatTabHeader = /** @class */ (function (_super) {
|
|
37630
|
-
__extends(MatTabHeader, _super);
|
|
37631
|
-
function MatTabHeader(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1,
|
|
37632
|
-
// @breaking-change 9.0.0 `_animationMode` parameter to be made required.
|
|
37633
|
-
animationMode) {
|
|
37634
|
-
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1, animationMode) || this;
|
|
37635
|
-
_this._disableRipple = false;
|
|
37636
|
-
return _this;
|
|
37637
|
-
}
|
|
37638
|
-
Object.defineProperty(MatTabHeader.prototype, "disableRipple", {
|
|
37639
|
-
/** Whether the ripple effect is disabled or not. */
|
|
37640
|
-
get: /**
|
|
37641
|
-
* Whether the ripple effect is disabled or not.
|
|
37642
|
-
* @return {?}
|
|
37643
|
-
*/
|
|
37644
|
-
function () { return this._disableRipple; },
|
|
37645
|
-
set: /**
|
|
37646
|
-
* @param {?} value
|
|
37647
|
-
* @return {?}
|
|
37648
|
-
*/
|
|
37649
|
-
function (value) { this._disableRipple = coercion.coerceBooleanProperty(value); },
|
|
37650
|
-
enumerable: true,
|
|
37651
|
-
configurable: true
|
|
37652
|
-
});
|
|
37653
|
-
/**
|
|
37654
|
-
* @protected
|
|
37655
|
-
* @param {?} event
|
|
37656
|
-
* @return {?}
|
|
37657
|
-
*/
|
|
37658
|
-
MatTabHeader.prototype._itemSelected = /**
|
|
37659
|
-
* @protected
|
|
37660
|
-
* @param {?} event
|
|
37661
|
-
* @return {?}
|
|
37662
|
-
*/
|
|
37663
|
-
function (event) {
|
|
37664
|
-
event.preventDefault();
|
|
37633
|
+
return this.elementRef.nativeElement.offsetWidth;
|
|
37665
37634
|
};
|
|
37666
|
-
|
|
37667
|
-
{ type: core.
|
|
37668
|
-
|
|
37669
|
-
|
|
37670
|
-
inputs: ['selectedIndex'],
|
|
37671
|
-
outputs: ['selectFocusedIndex', 'indexFocused'],
|
|
37672
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
37673
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
37635
|
+
MatTabLabelWrapper.decorators = [
|
|
37636
|
+
{ type: core.Directive, args: [{
|
|
37637
|
+
selector: '[matTabLabelWrapper]',
|
|
37638
|
+
inputs: ['disabled'],
|
|
37674
37639
|
host: {
|
|
37675
|
-
'class
|
|
37676
|
-
'[
|
|
37677
|
-
|
|
37678
|
-
},
|
|
37640
|
+
'[class.mat-tab-disabled]': 'disabled',
|
|
37641
|
+
'[attr.aria-disabled]': '!!disabled',
|
|
37642
|
+
}
|
|
37679
37643
|
},] },
|
|
37680
37644
|
];
|
|
37681
37645
|
/** @nocollapse */
|
|
37682
|
-
|
|
37683
|
-
{ type: core.ElementRef }
|
|
37684
|
-
{ type: core.ChangeDetectorRef },
|
|
37685
|
-
{ type: scrolling.ViewportRuler },
|
|
37686
|
-
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
37687
|
-
{ type: core.NgZone },
|
|
37688
|
-
{ type: platform.Platform },
|
|
37689
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
37646
|
+
MatTabLabelWrapper.ctorParameters = function () { return [
|
|
37647
|
+
{ type: core.ElementRef }
|
|
37690
37648
|
]; };
|
|
37691
|
-
|
|
37692
|
-
|
|
37693
|
-
_inkBar: [{ type: core.ViewChild, args: [MatInkBar, { static: true },] }],
|
|
37694
|
-
_tabListContainer: [{ type: core.ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
37695
|
-
_tabList: [{ type: core.ViewChild, args: ['tabList', { static: true },] }],
|
|
37696
|
-
_nextPaginator: [{ type: core.ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
37697
|
-
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }],
|
|
37698
|
-
disableRipple: [{ type: core.Input }]
|
|
37699
|
-
};
|
|
37700
|
-
return MatTabHeader;
|
|
37701
|
-
}(MatPaginatedTabHeader));
|
|
37649
|
+
return MatTabLabelWrapper;
|
|
37650
|
+
}(_MatTabLabelWrapperMixinBase));
|
|
37702
37651
|
|
|
37703
37652
|
/**
|
|
37704
37653
|
* @fileoverview added by tsickle
|
|
37705
37654
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
37706
37655
|
*/
|
|
37707
37656
|
/**
|
|
37708
|
-
*
|
|
37657
|
+
* Config used to bind passive event listeners
|
|
37709
37658
|
* @type {?}
|
|
37710
37659
|
*/
|
|
37711
|
-
var
|
|
37660
|
+
var passiveEventListenerOptions$1 = (/** @type {?} */ (platform.normalizePassiveListenerOptions({ passive: true })));
|
|
37712
37661
|
/**
|
|
37713
|
-
*
|
|
37714
|
-
|
|
37715
|
-
|
|
37716
|
-
* A simple change event emitted on focus or selection changes.
|
|
37662
|
+
* The distance in pixels that will be overshot when scrolling a tab label into view. This helps
|
|
37663
|
+
* provide a small affordance to the label next to it.
|
|
37664
|
+
* @type {?}
|
|
37717
37665
|
*/
|
|
37718
|
-
|
|
37719
|
-
function MatTabChangeEvent() {
|
|
37720
|
-
}
|
|
37721
|
-
return MatTabChangeEvent;
|
|
37722
|
-
}());
|
|
37666
|
+
var EXAGGERATED_OVERSCROLL = 60;
|
|
37723
37667
|
/**
|
|
37724
|
-
*
|
|
37668
|
+
* Amount of milliseconds to wait before starting to scroll the header automatically.
|
|
37669
|
+
* Set a little conservatively in order to handle fake events dispatched on touch devices.
|
|
37725
37670
|
* @type {?}
|
|
37726
37671
|
*/
|
|
37727
|
-
var
|
|
37728
|
-
// Boilerplate for applying mixins to MatTabGroup.
|
|
37672
|
+
var HEADER_SCROLL_DELAY = 650;
|
|
37729
37673
|
/**
|
|
37730
|
-
*
|
|
37674
|
+
* Interval in milliseconds at which to scroll the header
|
|
37675
|
+
* while the user is holding their pointer.
|
|
37676
|
+
* @type {?}
|
|
37731
37677
|
*/
|
|
37732
|
-
var
|
|
37733
|
-
// Boilerplate for applying mixins to MatTabGroup.
|
|
37678
|
+
var HEADER_SCROLL_INTERVAL = 100;
|
|
37734
37679
|
/**
|
|
37680
|
+
* Base class for a tab header that supported pagination.
|
|
37735
37681
|
* \@docs-private
|
|
37682
|
+
* @abstract
|
|
37736
37683
|
*/
|
|
37737
|
-
|
|
37738
|
-
function
|
|
37684
|
+
var MatPaginatedTabHeader = /** @class */ (function () {
|
|
37685
|
+
function MatPaginatedTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {
|
|
37686
|
+
var _this = this;
|
|
37739
37687
|
this._elementRef = _elementRef;
|
|
37740
|
-
|
|
37741
|
-
|
|
37742
|
-
|
|
37743
|
-
|
|
37744
|
-
|
|
37745
|
-
|
|
37746
|
-
* Material design tab-group component. Supports basic tab pairs (label + content) and includes
|
|
37747
|
-
* animated ink-bar, keyboard navigation, and screen reader.
|
|
37748
|
-
* See: https://material.io/design/components/tabs.html
|
|
37749
|
-
*/
|
|
37750
|
-
var MatTabGroup = /** @class */ (function (_super) {
|
|
37751
|
-
__extends(MatTabGroup, _super);
|
|
37752
|
-
function MatTabGroup(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {
|
|
37753
|
-
var _this = _super.call(this, elementRef) || this;
|
|
37754
|
-
_this._changeDetectorRef = _changeDetectorRef;
|
|
37755
|
-
_this._animationMode = _animationMode;
|
|
37688
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
37689
|
+
this._viewportRuler = _viewportRuler;
|
|
37690
|
+
this._dir = _dir;
|
|
37691
|
+
this._ngZone = _ngZone;
|
|
37692
|
+
this._platform = _platform;
|
|
37693
|
+
this._animationMode = _animationMode;
|
|
37756
37694
|
/**
|
|
37757
|
-
* The
|
|
37695
|
+
* The distance in pixels that the tab labels should be translated to the left.
|
|
37758
37696
|
*/
|
|
37759
|
-
|
|
37697
|
+
this._scrollDistance = 0;
|
|
37760
37698
|
/**
|
|
37761
|
-
*
|
|
37699
|
+
* Whether the header should scroll to the selected index after the view has been checked.
|
|
37762
37700
|
*/
|
|
37763
|
-
|
|
37701
|
+
this._selectedIndexChanged = false;
|
|
37764
37702
|
/**
|
|
37765
|
-
*
|
|
37703
|
+
* Emits when the component is destroyed.
|
|
37766
37704
|
*/
|
|
37767
|
-
|
|
37705
|
+
this._destroyed = new rxjs.Subject();
|
|
37768
37706
|
/**
|
|
37769
|
-
*
|
|
37707
|
+
* Whether the controls for pagination should be displayed
|
|
37770
37708
|
*/
|
|
37771
|
-
|
|
37772
|
-
_this._dynamicHeight = false;
|
|
37773
|
-
_this._selectedIndex = null;
|
|
37709
|
+
this._showPaginationControls = false;
|
|
37774
37710
|
/**
|
|
37775
|
-
*
|
|
37711
|
+
* Whether the tab list can be scrolled more towards the end of the tab label list.
|
|
37776
37712
|
*/
|
|
37777
|
-
|
|
37713
|
+
this._disableScrollAfter = true;
|
|
37778
37714
|
/**
|
|
37779
|
-
*
|
|
37715
|
+
* Whether the tab list can be scrolled more towards the beginning of the tab label list.
|
|
37780
37716
|
*/
|
|
37781
|
-
|
|
37717
|
+
this._disableScrollBefore = true;
|
|
37782
37718
|
/**
|
|
37783
|
-
*
|
|
37719
|
+
* Stream that will stop the automated scrolling.
|
|
37784
37720
|
*/
|
|
37785
|
-
|
|
37721
|
+
this._stopScrolling = new rxjs.Subject();
|
|
37722
|
+
this._selectedIndex = 0;
|
|
37786
37723
|
/**
|
|
37787
|
-
* Event emitted when the
|
|
37724
|
+
* Event emitted when the option is selected.
|
|
37788
37725
|
*/
|
|
37789
|
-
|
|
37726
|
+
this.selectFocusedIndex = new core.EventEmitter();
|
|
37790
37727
|
/**
|
|
37791
|
-
* Event emitted when
|
|
37792
|
-
*/
|
|
37793
|
-
_this.selectedTabChange = new core.EventEmitter(true);
|
|
37794
|
-
_this._groupId = nextId$1++;
|
|
37795
|
-
_this.animationDuration = defaultConfig && defaultConfig.animationDuration ?
|
|
37796
|
-
defaultConfig.animationDuration : '500ms';
|
|
37797
|
-
return _this;
|
|
37798
|
-
}
|
|
37799
|
-
Object.defineProperty(MatTabGroup.prototype, "dynamicHeight", {
|
|
37800
|
-
/** Whether the tab group should grow to the size of the active tab. */
|
|
37801
|
-
get: /**
|
|
37802
|
-
* Whether the tab group should grow to the size of the active tab.
|
|
37803
|
-
* @return {?}
|
|
37728
|
+
* Event emitted when a label is focused.
|
|
37804
37729
|
*/
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
|
|
37730
|
+
this.indexFocused = new core.EventEmitter();
|
|
37731
|
+
// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
|
|
37732
|
+
_ngZone.runOutsideAngular((/**
|
|
37808
37733
|
* @return {?}
|
|
37809
37734
|
*/
|
|
37810
|
-
function (
|
|
37811
|
-
|
|
37812
|
-
|
|
37813
|
-
|
|
37814
|
-
|
|
37735
|
+
function () {
|
|
37736
|
+
rxjs.fromEvent(_elementRef.nativeElement, 'mouseleave')
|
|
37737
|
+
.pipe(operators.takeUntil(_this._destroyed))
|
|
37738
|
+
.subscribe((/**
|
|
37739
|
+
* @return {?}
|
|
37740
|
+
*/
|
|
37741
|
+
function () {
|
|
37742
|
+
_this._stopInterval();
|
|
37743
|
+
}));
|
|
37744
|
+
}));
|
|
37745
|
+
}
|
|
37746
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "selectedIndex", {
|
|
37815
37747
|
/** The index of the active tab. */
|
|
37816
37748
|
get: /**
|
|
37817
37749
|
* The index of the active tab.
|
|
@@ -37823,428 +37755,828 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
37823
37755
|
* @return {?}
|
|
37824
37756
|
*/
|
|
37825
37757
|
function (value) {
|
|
37826
|
-
|
|
37758
|
+
value = coercion.coerceNumberProperty(value);
|
|
37759
|
+
if (this._selectedIndex != value) {
|
|
37760
|
+
this._selectedIndexChanged = true;
|
|
37761
|
+
this._selectedIndex = value;
|
|
37762
|
+
if (this._keyManager) {
|
|
37763
|
+
this._keyManager.updateActiveItemIndex(value);
|
|
37764
|
+
}
|
|
37765
|
+
}
|
|
37827
37766
|
},
|
|
37828
37767
|
enumerable: true,
|
|
37829
37768
|
configurable: true
|
|
37830
37769
|
});
|
|
37831
|
-
|
|
37832
|
-
|
|
37833
|
-
|
|
37834
|
-
|
|
37770
|
+
/**
|
|
37771
|
+
* @return {?}
|
|
37772
|
+
*/
|
|
37773
|
+
MatPaginatedTabHeader.prototype.ngAfterViewInit = /**
|
|
37774
|
+
* @return {?}
|
|
37775
|
+
*/
|
|
37776
|
+
function () {
|
|
37777
|
+
var _this = this;
|
|
37778
|
+
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
37779
|
+
rxjs.fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions$1)
|
|
37780
|
+
.pipe(operators.takeUntil(this._destroyed))
|
|
37781
|
+
.subscribe((/**
|
|
37835
37782
|
* @return {?}
|
|
37836
37783
|
*/
|
|
37837
|
-
function () {
|
|
37838
|
-
|
|
37839
|
-
|
|
37784
|
+
function () {
|
|
37785
|
+
_this._handlePaginatorPress('before');
|
|
37786
|
+
}));
|
|
37787
|
+
rxjs.fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions$1)
|
|
37788
|
+
.pipe(operators.takeUntil(this._destroyed))
|
|
37789
|
+
.subscribe((/**
|
|
37840
37790
|
* @return {?}
|
|
37841
37791
|
*/
|
|
37842
|
-
function (
|
|
37843
|
-
|
|
37844
|
-
}
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
|
|
37848
|
-
|
|
37849
|
-
|
|
37792
|
+
function () {
|
|
37793
|
+
_this._handlePaginatorPress('after');
|
|
37794
|
+
}));
|
|
37795
|
+
};
|
|
37796
|
+
/**
|
|
37797
|
+
* @return {?}
|
|
37798
|
+
*/
|
|
37799
|
+
MatPaginatedTabHeader.prototype.ngAfterContentInit = /**
|
|
37800
|
+
* @return {?}
|
|
37801
|
+
*/
|
|
37802
|
+
function () {
|
|
37803
|
+
var _this = this;
|
|
37804
|
+
/** @type {?} */
|
|
37805
|
+
var dirChange = this._dir ? this._dir.change : rxjs.of(null);
|
|
37806
|
+
/** @type {?} */
|
|
37807
|
+
var resize = this._viewportRuler.change(150);
|
|
37808
|
+
/** @type {?} */
|
|
37809
|
+
var realign = (/**
|
|
37810
|
+
* @return {?}
|
|
37811
|
+
*/
|
|
37812
|
+
function () {
|
|
37813
|
+
_this.updatePagination();
|
|
37814
|
+
_this._alignInkBarToSelectedTab();
|
|
37815
|
+
});
|
|
37816
|
+
this._keyManager = new a11y.FocusKeyManager(this._items)
|
|
37817
|
+
.withHorizontalOrientation(this._getLayoutDirection())
|
|
37818
|
+
.withWrap();
|
|
37819
|
+
this._keyManager.updateActiveItem(0);
|
|
37820
|
+
// Defer the first call in order to allow for slower browsers to lay out the elements.
|
|
37821
|
+
// This helps in cases where the user lands directly on a page with paginated tabs.
|
|
37822
|
+
typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame(realign) : realign();
|
|
37823
|
+
// On dir change or window resize, realign the ink bar and update the orientation of
|
|
37824
|
+
// the key manager if the direction has changed.
|
|
37825
|
+
rxjs.merge(dirChange, resize, this._items.changes).pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
37826
|
+
* @return {?}
|
|
37827
|
+
*/
|
|
37828
|
+
function () {
|
|
37829
|
+
realign();
|
|
37830
|
+
_this._keyManager.withHorizontalOrientation(_this._getLayoutDirection());
|
|
37831
|
+
}));
|
|
37832
|
+
// If there is a change in the focus key manager we need to emit the `indexFocused`
|
|
37833
|
+
// event in order to provide a public event that notifies about focus changes. Also we realign
|
|
37834
|
+
// the tabs container by scrolling the new focused tab into the visible section.
|
|
37835
|
+
this._keyManager.change.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
37836
|
+
* @param {?} newFocusIndex
|
|
37837
|
+
* @return {?}
|
|
37838
|
+
*/
|
|
37839
|
+
function (newFocusIndex) {
|
|
37840
|
+
_this.indexFocused.emit(newFocusIndex);
|
|
37841
|
+
_this._setTabFocus(newFocusIndex);
|
|
37842
|
+
}));
|
|
37843
|
+
};
|
|
37844
|
+
/**
|
|
37845
|
+
* @return {?}
|
|
37846
|
+
*/
|
|
37847
|
+
MatPaginatedTabHeader.prototype.ngAfterContentChecked = /**
|
|
37848
|
+
* @return {?}
|
|
37849
|
+
*/
|
|
37850
|
+
function () {
|
|
37851
|
+
// If the number of tab labels have changed, check if scrolling should be enabled
|
|
37852
|
+
if (this._tabLabelCount != this._items.length) {
|
|
37853
|
+
this.updatePagination();
|
|
37854
|
+
this._tabLabelCount = this._items.length;
|
|
37855
|
+
this._changeDetectorRef.markForCheck();
|
|
37856
|
+
}
|
|
37857
|
+
// If the selected index has changed, scroll to the label and check if the scrolling controls
|
|
37858
|
+
// should be disabled.
|
|
37859
|
+
if (this._selectedIndexChanged) {
|
|
37860
|
+
this._scrollToLabel(this._selectedIndex);
|
|
37861
|
+
this._checkScrollingControls();
|
|
37862
|
+
this._alignInkBarToSelectedTab();
|
|
37863
|
+
this._selectedIndexChanged = false;
|
|
37864
|
+
this._changeDetectorRef.markForCheck();
|
|
37865
|
+
}
|
|
37866
|
+
// If the scroll distance has been changed (tab selected, focused, scroll controls activated),
|
|
37867
|
+
// then translate the header to reflect this.
|
|
37868
|
+
if (this._scrollDistanceChanged) {
|
|
37869
|
+
this._updateTabScrollPosition();
|
|
37870
|
+
this._scrollDistanceChanged = false;
|
|
37871
|
+
this._changeDetectorRef.markForCheck();
|
|
37872
|
+
}
|
|
37873
|
+
};
|
|
37874
|
+
/**
|
|
37875
|
+
* @return {?}
|
|
37876
|
+
*/
|
|
37877
|
+
MatPaginatedTabHeader.prototype.ngOnDestroy = /**
|
|
37878
|
+
* @return {?}
|
|
37879
|
+
*/
|
|
37880
|
+
function () {
|
|
37881
|
+
this._destroyed.next();
|
|
37882
|
+
this._destroyed.complete();
|
|
37883
|
+
this._stopScrolling.complete();
|
|
37884
|
+
};
|
|
37885
|
+
/** Handles keyboard events on the header. */
|
|
37886
|
+
/**
|
|
37887
|
+
* Handles keyboard events on the header.
|
|
37888
|
+
* @param {?} event
|
|
37889
|
+
* @return {?}
|
|
37890
|
+
*/
|
|
37891
|
+
MatPaginatedTabHeader.prototype._handleKeydown = /**
|
|
37892
|
+
* Handles keyboard events on the header.
|
|
37893
|
+
* @param {?} event
|
|
37894
|
+
* @return {?}
|
|
37895
|
+
*/
|
|
37896
|
+
function (event) {
|
|
37897
|
+
// We don't handle any key bindings with a modifier key.
|
|
37898
|
+
if (keycodes.hasModifierKey(event)) {
|
|
37899
|
+
return;
|
|
37900
|
+
}
|
|
37901
|
+
switch (event.keyCode) {
|
|
37902
|
+
case keycodes.HOME:
|
|
37903
|
+
this._keyManager.setFirstItemActive();
|
|
37904
|
+
event.preventDefault();
|
|
37905
|
+
break;
|
|
37906
|
+
case keycodes.END:
|
|
37907
|
+
this._keyManager.setLastItemActive();
|
|
37908
|
+
event.preventDefault();
|
|
37909
|
+
break;
|
|
37910
|
+
case keycodes.ENTER:
|
|
37911
|
+
case keycodes.SPACE:
|
|
37912
|
+
this.selectFocusedIndex.emit(this.focusIndex);
|
|
37913
|
+
this._itemSelected(event);
|
|
37914
|
+
break;
|
|
37915
|
+
default:
|
|
37916
|
+
this._keyManager.onKeydown(event);
|
|
37917
|
+
}
|
|
37918
|
+
};
|
|
37919
|
+
/**
|
|
37920
|
+
* Callback for when the MutationObserver detects that the content has changed.
|
|
37921
|
+
*/
|
|
37922
|
+
/**
|
|
37923
|
+
* Callback for when the MutationObserver detects that the content has changed.
|
|
37924
|
+
* @return {?}
|
|
37925
|
+
*/
|
|
37926
|
+
MatPaginatedTabHeader.prototype._onContentChanges = /**
|
|
37927
|
+
* Callback for when the MutationObserver detects that the content has changed.
|
|
37928
|
+
* @return {?}
|
|
37929
|
+
*/
|
|
37930
|
+
function () {
|
|
37931
|
+
var _this = this;
|
|
37932
|
+
/** @type {?} */
|
|
37933
|
+
var textContent = this._elementRef.nativeElement.textContent;
|
|
37934
|
+
// We need to diff the text content of the header, because the MutationObserver callback
|
|
37935
|
+
// will fire even if the text content didn't change which is inefficient and is prone
|
|
37936
|
+
// to infinite loops if a poorly constructed expression is passed in (see #14249).
|
|
37937
|
+
if (textContent !== this._currentTextContent) {
|
|
37938
|
+
this._currentTextContent = textContent || '';
|
|
37939
|
+
// The content observer runs outside the `NgZone` by default, which
|
|
37940
|
+
// means that we need to bring the callback back in ourselves.
|
|
37941
|
+
this._ngZone.run((/**
|
|
37942
|
+
* @return {?}
|
|
37943
|
+
*/
|
|
37944
|
+
function () {
|
|
37945
|
+
_this.updatePagination();
|
|
37946
|
+
_this._alignInkBarToSelectedTab();
|
|
37947
|
+
_this._changeDetectorRef.markForCheck();
|
|
37948
|
+
}));
|
|
37949
|
+
}
|
|
37950
|
+
};
|
|
37951
|
+
/**
|
|
37952
|
+
* Updates the view whether pagination should be enabled or not.
|
|
37953
|
+
*
|
|
37954
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
37955
|
+
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
37956
|
+
* page.
|
|
37957
|
+
*/
|
|
37958
|
+
/**
|
|
37959
|
+
* Updates the view whether pagination should be enabled or not.
|
|
37960
|
+
*
|
|
37961
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
37962
|
+
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
37963
|
+
* page.
|
|
37964
|
+
* @return {?}
|
|
37965
|
+
*/
|
|
37966
|
+
MatPaginatedTabHeader.prototype.updatePagination = /**
|
|
37967
|
+
* Updates the view whether pagination should be enabled or not.
|
|
37968
|
+
*
|
|
37969
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
37970
|
+
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
37971
|
+
* page.
|
|
37972
|
+
* @return {?}
|
|
37973
|
+
*/
|
|
37974
|
+
function () {
|
|
37975
|
+
this._checkPaginationEnabled();
|
|
37976
|
+
this._checkScrollingControls();
|
|
37977
|
+
this._updateTabScrollPosition();
|
|
37978
|
+
};
|
|
37979
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "focusIndex", {
|
|
37980
|
+
/** Tracks which element has focus; used for keyboard navigation */
|
|
37850
37981
|
get: /**
|
|
37851
|
-
*
|
|
37982
|
+
* Tracks which element has focus; used for keyboard navigation
|
|
37852
37983
|
* @return {?}
|
|
37853
37984
|
*/
|
|
37854
|
-
function () {
|
|
37985
|
+
function () {
|
|
37986
|
+
return this._keyManager ? (/** @type {?} */ (this._keyManager.activeItemIndex)) : 0;
|
|
37987
|
+
},
|
|
37988
|
+
/** When the focus index is set, we must manually send focus to the correct label */
|
|
37855
37989
|
set: /**
|
|
37990
|
+
* When the focus index is set, we must manually send focus to the correct label
|
|
37856
37991
|
* @param {?} value
|
|
37857
37992
|
* @return {?}
|
|
37858
37993
|
*/
|
|
37859
37994
|
function (value) {
|
|
37860
|
-
|
|
37861
|
-
|
|
37862
|
-
nativeElement.classList.remove("mat-background-" + this.backgroundColor);
|
|
37863
|
-
if (value) {
|
|
37864
|
-
nativeElement.classList.add("mat-background-" + value);
|
|
37995
|
+
if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
|
|
37996
|
+
return;
|
|
37865
37997
|
}
|
|
37866
|
-
this.
|
|
37998
|
+
this._keyManager.setActiveItem(value);
|
|
37867
37999
|
},
|
|
37868
38000
|
enumerable: true,
|
|
37869
38001
|
configurable: true
|
|
37870
38002
|
});
|
|
37871
38003
|
/**
|
|
37872
|
-
*
|
|
37873
|
-
*
|
|
37874
|
-
* each tab should be in according to the new selected index, and additionally we know how
|
|
37875
|
-
* a new selected tab should transition in (from the left or right).
|
|
38004
|
+
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
38005
|
+
* providing a valid index and return true.
|
|
37876
38006
|
*/
|
|
37877
38007
|
/**
|
|
37878
|
-
*
|
|
37879
|
-
*
|
|
37880
|
-
*
|
|
37881
|
-
* a new selected tab should transition in (from the left or right).
|
|
38008
|
+
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
38009
|
+
* providing a valid index and return true.
|
|
38010
|
+
* @param {?} index
|
|
37882
38011
|
* @return {?}
|
|
37883
38012
|
*/
|
|
37884
|
-
|
|
37885
|
-
*
|
|
37886
|
-
*
|
|
37887
|
-
*
|
|
37888
|
-
* a new selected tab should transition in (from the left or right).
|
|
38013
|
+
MatPaginatedTabHeader.prototype._isValidIndex = /**
|
|
38014
|
+
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
38015
|
+
* providing a valid index and return true.
|
|
38016
|
+
* @param {?} index
|
|
37889
38017
|
* @return {?}
|
|
37890
38018
|
*/
|
|
37891
|
-
function () {
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
38019
|
+
function (index) {
|
|
38020
|
+
if (!this._items) {
|
|
38021
|
+
return true;
|
|
38022
|
+
}
|
|
37895
38023
|
/** @type {?} */
|
|
37896
|
-
var
|
|
37897
|
-
|
|
37898
|
-
|
|
37899
|
-
|
|
38024
|
+
var tab = this._items ? this._items.toArray()[index] : null;
|
|
38025
|
+
return !!tab && !tab.disabled;
|
|
38026
|
+
};
|
|
38027
|
+
/**
|
|
38028
|
+
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
38029
|
+
* scrolling is enabled.
|
|
38030
|
+
*/
|
|
38031
|
+
/**
|
|
38032
|
+
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
38033
|
+
* scrolling is enabled.
|
|
38034
|
+
* @param {?} tabIndex
|
|
38035
|
+
* @return {?}
|
|
38036
|
+
*/
|
|
38037
|
+
MatPaginatedTabHeader.prototype._setTabFocus = /**
|
|
38038
|
+
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
38039
|
+
* scrolling is enabled.
|
|
38040
|
+
* @param {?} tabIndex
|
|
38041
|
+
* @return {?}
|
|
38042
|
+
*/
|
|
38043
|
+
function (tabIndex) {
|
|
38044
|
+
if (this._showPaginationControls) {
|
|
38045
|
+
this._scrollToLabel(tabIndex);
|
|
38046
|
+
}
|
|
38047
|
+
if (this._items && this._items.length) {
|
|
38048
|
+
this._items.toArray()[tabIndex].focus();
|
|
38049
|
+
// Do not let the browser manage scrolling to focus the element, this will be handled
|
|
38050
|
+
// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
|
|
38051
|
+
// should be the full width minus the offset width.
|
|
37900
38052
|
/** @type {?} */
|
|
37901
|
-
var
|
|
37902
|
-
|
|
37903
|
-
|
|
38053
|
+
var containerEl = this._tabListContainer.nativeElement;
|
|
38054
|
+
/** @type {?} */
|
|
38055
|
+
var dir = this._getLayoutDirection();
|
|
38056
|
+
if (dir == 'ltr') {
|
|
38057
|
+
containerEl.scrollLeft = 0;
|
|
37904
38058
|
}
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
Promise.resolve().then((/**
|
|
37908
|
-
* @return {?}
|
|
37909
|
-
*/
|
|
37910
|
-
function () {
|
|
37911
|
-
_this._tabs.forEach((/**
|
|
37912
|
-
* @param {?} tab
|
|
37913
|
-
* @param {?} index
|
|
37914
|
-
* @return {?}
|
|
37915
|
-
*/
|
|
37916
|
-
function (tab, index) { return tab.isActive = index === indexToSelect; }));
|
|
37917
|
-
if (!isFirstRun_1) {
|
|
37918
|
-
_this.selectedIndexChange.emit(indexToSelect);
|
|
37919
|
-
}
|
|
37920
|
-
}));
|
|
37921
|
-
}
|
|
37922
|
-
// Setup the position for each tab and optionally setup an origin on the next selected tab.
|
|
37923
|
-
this._tabs.forEach((/**
|
|
37924
|
-
* @param {?} tab
|
|
37925
|
-
* @param {?} index
|
|
37926
|
-
* @return {?}
|
|
37927
|
-
*/
|
|
37928
|
-
function (tab, index) {
|
|
37929
|
-
tab.position = index - indexToSelect;
|
|
37930
|
-
// If there is already a selected tab, then set up an origin for the next selected tab
|
|
37931
|
-
// if it doesn't have one already.
|
|
37932
|
-
if (_this._selectedIndex != null && tab.position == 0 && !tab.origin) {
|
|
37933
|
-
tab.origin = indexToSelect - _this._selectedIndex;
|
|
38059
|
+
else {
|
|
38060
|
+
containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
|
|
37934
38061
|
}
|
|
37935
|
-
}));
|
|
37936
|
-
if (this._selectedIndex !== indexToSelect) {
|
|
37937
|
-
this._selectedIndex = indexToSelect;
|
|
37938
|
-
this._changeDetectorRef.markForCheck();
|
|
37939
38062
|
}
|
|
37940
38063
|
};
|
|
38064
|
+
/** The layout direction of the containing app. */
|
|
37941
38065
|
/**
|
|
38066
|
+
* The layout direction of the containing app.
|
|
37942
38067
|
* @return {?}
|
|
37943
38068
|
*/
|
|
37944
|
-
|
|
38069
|
+
MatPaginatedTabHeader.prototype._getLayoutDirection = /**
|
|
38070
|
+
* The layout direction of the containing app.
|
|
37945
38071
|
* @return {?}
|
|
37946
38072
|
*/
|
|
37947
38073
|
function () {
|
|
37948
|
-
|
|
37949
|
-
|
|
37950
|
-
|
|
37951
|
-
|
|
37952
|
-
|
|
38074
|
+
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
38075
|
+
};
|
|
38076
|
+
/** Performs the CSS transformation on the tab list that will cause the list to scroll. */
|
|
38077
|
+
/**
|
|
38078
|
+
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
38079
|
+
* @return {?}
|
|
38080
|
+
*/
|
|
38081
|
+
MatPaginatedTabHeader.prototype._updateTabScrollPosition = /**
|
|
38082
|
+
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
38083
|
+
* @return {?}
|
|
38084
|
+
*/
|
|
38085
|
+
function () {
|
|
38086
|
+
/** @type {?} */
|
|
38087
|
+
var scrollDistance = this.scrollDistance;
|
|
38088
|
+
/** @type {?} */
|
|
38089
|
+
var platform$$1 = this._platform;
|
|
38090
|
+
/** @type {?} */
|
|
38091
|
+
var translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
|
|
38092
|
+
// Don't use `translate3d` here because we don't want to create a new layer. A new layer
|
|
38093
|
+
// seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
|
|
38094
|
+
// and ripples will exceed the boundaries of the visible tab bar.
|
|
38095
|
+
// See: https://github.com/angular/components/issues/10276
|
|
38096
|
+
// We round the `transform` here, because transforms with sub-pixel precision cause some
|
|
38097
|
+
// browsers to blur the content of the element.
|
|
38098
|
+
this._tabList.nativeElement.style.transform = "translateX(" + Math.round(translateX) + "px)";
|
|
38099
|
+
// Setting the `transform` on IE will change the scroll offset of the parent, causing the
|
|
38100
|
+
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
|
38101
|
+
// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
|
|
38102
|
+
// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
|
|
38103
|
+
// @breaking-change 9.0.0 Remove null check for `platform` after it can no longer be undefined.
|
|
38104
|
+
if (platform$$1 && (platform$$1.TRIDENT || platform$$1.EDGE)) {
|
|
38105
|
+
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
38106
|
+
}
|
|
38107
|
+
};
|
|
38108
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "scrollDistance", {
|
|
38109
|
+
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
|
|
38110
|
+
get: /**
|
|
38111
|
+
* Sets the distance in pixels that the tab header should be transformed in the X-axis.
|
|
37953
38112
|
* @return {?}
|
|
37954
38113
|
*/
|
|
37955
|
-
function () {
|
|
37956
|
-
|
|
37957
|
-
|
|
37958
|
-
|
|
37959
|
-
|
|
37960
|
-
|
|
37961
|
-
|
|
37962
|
-
|
|
37963
|
-
|
|
37964
|
-
|
|
37965
|
-
|
|
37966
|
-
|
|
37967
|
-
|
|
37968
|
-
|
|
37969
|
-
|
|
37970
|
-
|
|
37971
|
-
|
|
37972
|
-
|
|
37973
|
-
|
|
37974
|
-
|
|
37975
|
-
|
|
38114
|
+
function () { return this._scrollDistance; },
|
|
38115
|
+
set: /**
|
|
38116
|
+
* @param {?} value
|
|
38117
|
+
* @return {?}
|
|
38118
|
+
*/
|
|
38119
|
+
function (value) {
|
|
38120
|
+
this._scrollTo(value);
|
|
38121
|
+
},
|
|
38122
|
+
enumerable: true,
|
|
38123
|
+
configurable: true
|
|
38124
|
+
});
|
|
38125
|
+
/**
|
|
38126
|
+
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
38127
|
+
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
38128
|
+
* length of the tab list view window.
|
|
38129
|
+
*
|
|
38130
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38131
|
+
* should be called sparingly.
|
|
38132
|
+
*/
|
|
38133
|
+
/**
|
|
38134
|
+
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
38135
|
+
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
38136
|
+
* length of the tab list view window.
|
|
38137
|
+
*
|
|
38138
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38139
|
+
* should be called sparingly.
|
|
38140
|
+
* @param {?} direction
|
|
38141
|
+
* @return {?}
|
|
38142
|
+
*/
|
|
38143
|
+
MatPaginatedTabHeader.prototype._scrollHeader = /**
|
|
38144
|
+
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
38145
|
+
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
38146
|
+
* length of the tab list view window.
|
|
38147
|
+
*
|
|
38148
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38149
|
+
* should be called sparingly.
|
|
38150
|
+
* @param {?} direction
|
|
38151
|
+
* @return {?}
|
|
38152
|
+
*/
|
|
38153
|
+
function (direction) {
|
|
38154
|
+
/** @type {?} */
|
|
38155
|
+
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
38156
|
+
// Move the scroll distance one-third the length of the tab list's viewport.
|
|
38157
|
+
/** @type {?} */
|
|
38158
|
+
var scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;
|
|
38159
|
+
return this._scrollTo(this._scrollDistance + scrollAmount);
|
|
38160
|
+
};
|
|
38161
|
+
/** Handles click events on the pagination arrows. */
|
|
38162
|
+
/**
|
|
38163
|
+
* Handles click events on the pagination arrows.
|
|
38164
|
+
* @param {?} direction
|
|
38165
|
+
* @return {?}
|
|
38166
|
+
*/
|
|
38167
|
+
MatPaginatedTabHeader.prototype._handlePaginatorClick = /**
|
|
38168
|
+
* Handles click events on the pagination arrows.
|
|
38169
|
+
* @param {?} direction
|
|
38170
|
+
* @return {?}
|
|
38171
|
+
*/
|
|
38172
|
+
function (direction) {
|
|
38173
|
+
this._stopInterval();
|
|
38174
|
+
this._scrollHeader(direction);
|
|
38175
|
+
};
|
|
38176
|
+
/**
|
|
38177
|
+
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
38178
|
+
*
|
|
38179
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38180
|
+
* should be called sparingly.
|
|
38181
|
+
*/
|
|
38182
|
+
/**
|
|
38183
|
+
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
38184
|
+
*
|
|
38185
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38186
|
+
* should be called sparingly.
|
|
38187
|
+
* @param {?} labelIndex
|
|
38188
|
+
* @return {?}
|
|
38189
|
+
*/
|
|
38190
|
+
MatPaginatedTabHeader.prototype._scrollToLabel = /**
|
|
38191
|
+
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
38192
|
+
*
|
|
38193
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38194
|
+
* should be called sparingly.
|
|
38195
|
+
* @param {?} labelIndex
|
|
38196
|
+
* @return {?}
|
|
38197
|
+
*/
|
|
38198
|
+
function (labelIndex) {
|
|
38199
|
+
/** @type {?} */
|
|
38200
|
+
var selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
|
|
38201
|
+
if (!selectedLabel) {
|
|
38202
|
+
return;
|
|
38203
|
+
}
|
|
38204
|
+
// The view length is the visible width of the tab labels.
|
|
38205
|
+
/** @type {?} */
|
|
38206
|
+
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
38207
|
+
var _a = selectedLabel.elementRef.nativeElement, offsetLeft = _a.offsetLeft, offsetWidth = _a.offsetWidth;
|
|
38208
|
+
/** @type {?} */
|
|
38209
|
+
var labelBeforePos;
|
|
38210
|
+
/** @type {?} */
|
|
38211
|
+
var labelAfterPos;
|
|
38212
|
+
if (this._getLayoutDirection() == 'ltr') {
|
|
38213
|
+
labelBeforePos = offsetLeft;
|
|
38214
|
+
labelAfterPos = labelBeforePos + offsetWidth;
|
|
38215
|
+
}
|
|
38216
|
+
else {
|
|
38217
|
+
labelAfterPos = this._tabList.nativeElement.offsetWidth - offsetLeft;
|
|
38218
|
+
labelBeforePos = labelAfterPos - offsetWidth;
|
|
38219
|
+
}
|
|
38220
|
+
/** @type {?} */
|
|
38221
|
+
var beforeVisiblePos = this.scrollDistance;
|
|
38222
|
+
/** @type {?} */
|
|
38223
|
+
var afterVisiblePos = this.scrollDistance + viewLength;
|
|
38224
|
+
if (labelBeforePos < beforeVisiblePos) {
|
|
38225
|
+
// Scroll header to move label to the before direction
|
|
38226
|
+
this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
|
|
38227
|
+
}
|
|
38228
|
+
else if (labelAfterPos > afterVisiblePos) {
|
|
38229
|
+
// Scroll header to move label to the after direction
|
|
38230
|
+
this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
|
|
38231
|
+
}
|
|
37976
38232
|
};
|
|
37977
38233
|
/**
|
|
37978
|
-
*
|
|
37979
|
-
|
|
37980
|
-
|
|
37981
|
-
*
|
|
38234
|
+
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
38235
|
+
* tab list is wider than the size of the header container, then the pagination controls should
|
|
38236
|
+
* be shown.
|
|
38237
|
+
*
|
|
38238
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38239
|
+
* should be called sparingly.
|
|
37982
38240
|
*/
|
|
37983
|
-
function () {
|
|
37984
|
-
this._tabsSubscription.unsubscribe();
|
|
37985
|
-
this._tabLabelSubscription.unsubscribe();
|
|
37986
|
-
};
|
|
37987
|
-
/** Re-aligns the ink bar to the selected tab element. */
|
|
37988
38241
|
/**
|
|
37989
|
-
*
|
|
38242
|
+
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
38243
|
+
* tab list is wider than the size of the header container, then the pagination controls should
|
|
38244
|
+
* be shown.
|
|
38245
|
+
*
|
|
38246
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38247
|
+
* should be called sparingly.
|
|
37990
38248
|
* @return {?}
|
|
37991
38249
|
*/
|
|
37992
|
-
|
|
37993
|
-
*
|
|
38250
|
+
MatPaginatedTabHeader.prototype._checkPaginationEnabled = /**
|
|
38251
|
+
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
38252
|
+
* tab list is wider than the size of the header container, then the pagination controls should
|
|
38253
|
+
* be shown.
|
|
38254
|
+
*
|
|
38255
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38256
|
+
* should be called sparingly.
|
|
37994
38257
|
* @return {?}
|
|
37995
38258
|
*/
|
|
37996
38259
|
function () {
|
|
37997
|
-
|
|
37998
|
-
|
|
38260
|
+
/** @type {?} */
|
|
38261
|
+
var isEnabled = this._tabList.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;
|
|
38262
|
+
if (!isEnabled) {
|
|
38263
|
+
this.scrollDistance = 0;
|
|
37999
38264
|
}
|
|
38265
|
+
if (isEnabled !== this._showPaginationControls) {
|
|
38266
|
+
this._changeDetectorRef.markForCheck();
|
|
38267
|
+
}
|
|
38268
|
+
this._showPaginationControls = isEnabled;
|
|
38000
38269
|
};
|
|
38001
38270
|
/**
|
|
38002
|
-
*
|
|
38003
|
-
*
|
|
38004
|
-
|
|
38005
|
-
|
|
38006
|
-
*
|
|
38007
|
-
*
|
|
38271
|
+
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
38272
|
+
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
38273
|
+
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
38274
|
+
* maximum distance we can scroll), then disable the after button.
|
|
38275
|
+
*
|
|
38276
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38277
|
+
* should be called sparingly.
|
|
38008
38278
|
*/
|
|
38009
|
-
function (index) {
|
|
38010
|
-
this.focusChange.emit(this._createChangeEvent(index));
|
|
38011
|
-
};
|
|
38012
38279
|
/**
|
|
38013
|
-
*
|
|
38014
|
-
*
|
|
38280
|
+
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
38281
|
+
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
38282
|
+
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
38283
|
+
* maximum distance we can scroll), then disable the after button.
|
|
38284
|
+
*
|
|
38285
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38286
|
+
* should be called sparingly.
|
|
38015
38287
|
* @return {?}
|
|
38016
38288
|
*/
|
|
38017
|
-
|
|
38018
|
-
*
|
|
38019
|
-
*
|
|
38289
|
+
MatPaginatedTabHeader.prototype._checkScrollingControls = /**
|
|
38290
|
+
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
38291
|
+
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
38292
|
+
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
38293
|
+
* maximum distance we can scroll), then disable the after button.
|
|
38294
|
+
*
|
|
38295
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38296
|
+
* should be called sparingly.
|
|
38020
38297
|
* @return {?}
|
|
38021
38298
|
*/
|
|
38022
|
-
function (
|
|
38023
|
-
|
|
38024
|
-
|
|
38025
|
-
|
|
38026
|
-
|
|
38027
|
-
event.tab = this._tabs.toArray()[index];
|
|
38028
|
-
}
|
|
38029
|
-
return event;
|
|
38299
|
+
function () {
|
|
38300
|
+
// Check if the pagination arrows should be activated.
|
|
38301
|
+
this._disableScrollBefore = this.scrollDistance == 0;
|
|
38302
|
+
this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
|
|
38303
|
+
this._changeDetectorRef.markForCheck();
|
|
38030
38304
|
};
|
|
38031
38305
|
/**
|
|
38032
|
-
*
|
|
38033
|
-
*
|
|
38034
|
-
*
|
|
38035
|
-
*
|
|
38306
|
+
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
38307
|
+
* is equal to the difference in width between the tab list container and tab header container.
|
|
38308
|
+
*
|
|
38309
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38310
|
+
* should be called sparingly.
|
|
38036
38311
|
*/
|
|
38037
38312
|
/**
|
|
38038
|
-
*
|
|
38039
|
-
*
|
|
38040
|
-
*
|
|
38041
|
-
*
|
|
38042
|
-
*
|
|
38313
|
+
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
38314
|
+
* is equal to the difference in width between the tab list container and tab header container.
|
|
38315
|
+
*
|
|
38316
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38317
|
+
* should be called sparingly.
|
|
38043
38318
|
* @return {?}
|
|
38044
38319
|
*/
|
|
38045
|
-
|
|
38046
|
-
*
|
|
38047
|
-
*
|
|
38048
|
-
*
|
|
38049
|
-
*
|
|
38050
|
-
*
|
|
38320
|
+
MatPaginatedTabHeader.prototype._getMaxScrollDistance = /**
|
|
38321
|
+
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
38322
|
+
* is equal to the difference in width between the tab list container and tab header container.
|
|
38323
|
+
*
|
|
38324
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
38325
|
+
* should be called sparingly.
|
|
38051
38326
|
* @return {?}
|
|
38052
38327
|
*/
|
|
38053
38328
|
function () {
|
|
38054
|
-
|
|
38055
|
-
|
|
38056
|
-
|
|
38057
|
-
|
|
38058
|
-
|
|
38059
|
-
* @param {?} tab
|
|
38060
|
-
* @return {?}
|
|
38061
|
-
*/
|
|
38062
|
-
function (tab) { return tab._stateChanges; }))).subscribe((/**
|
|
38063
|
-
* @return {?}
|
|
38064
|
-
*/
|
|
38065
|
-
function () { return _this._changeDetectorRef.markForCheck(); }));
|
|
38066
|
-
};
|
|
38067
|
-
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
|
38068
|
-
/**
|
|
38069
|
-
* Clamps the given index to the bounds of 0 and the tabs length.
|
|
38070
|
-
* @private
|
|
38071
|
-
* @param {?} index
|
|
38072
|
-
* @return {?}
|
|
38073
|
-
*/
|
|
38074
|
-
MatTabGroup.prototype._clampTabIndex = /**
|
|
38075
|
-
* Clamps the given index to the bounds of 0 and the tabs length.
|
|
38076
|
-
* @private
|
|
38077
|
-
* @param {?} index
|
|
38078
|
-
* @return {?}
|
|
38079
|
-
*/
|
|
38080
|
-
function (index) {
|
|
38081
|
-
// Note the `|| 0`, which ensures that values like NaN can't get through
|
|
38082
|
-
// and which would otherwise throw the component into an infinite loop
|
|
38083
|
-
// (since Math.max(NaN, 0) === NaN).
|
|
38084
|
-
return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
|
|
38329
|
+
/** @type {?} */
|
|
38330
|
+
var lengthOfTabList = this._tabList.nativeElement.scrollWidth;
|
|
38331
|
+
/** @type {?} */
|
|
38332
|
+
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
38333
|
+
return (lengthOfTabList - viewLength) || 0;
|
|
38085
38334
|
};
|
|
38086
|
-
/**
|
|
38335
|
+
/** Tells the ink-bar to align itself to the current label wrapper */
|
|
38087
38336
|
/**
|
|
38088
|
-
*
|
|
38089
|
-
* @param {?} i
|
|
38337
|
+
* Tells the ink-bar to align itself to the current label wrapper
|
|
38090
38338
|
* @return {?}
|
|
38091
38339
|
*/
|
|
38092
|
-
|
|
38093
|
-
*
|
|
38094
|
-
* @param {?} i
|
|
38340
|
+
MatPaginatedTabHeader.prototype._alignInkBarToSelectedTab = /**
|
|
38341
|
+
* Tells the ink-bar to align itself to the current label wrapper
|
|
38095
38342
|
* @return {?}
|
|
38096
38343
|
*/
|
|
38097
|
-
function (
|
|
38098
|
-
|
|
38344
|
+
function () {
|
|
38345
|
+
/** @type {?} */
|
|
38346
|
+
var selectedItem = this._items && this._items.length ?
|
|
38347
|
+
this._items.toArray()[this.selectedIndex] : null;
|
|
38348
|
+
/** @type {?} */
|
|
38349
|
+
var selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
38350
|
+
if (selectedLabelWrapper) {
|
|
38351
|
+
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
38352
|
+
}
|
|
38353
|
+
else {
|
|
38354
|
+
this._inkBar.hide();
|
|
38355
|
+
}
|
|
38099
38356
|
};
|
|
38100
|
-
/**
|
|
38357
|
+
/** Stops the currently-running paginator interval. */
|
|
38101
38358
|
/**
|
|
38102
|
-
*
|
|
38103
|
-
* @param {?} i
|
|
38359
|
+
* Stops the currently-running paginator interval.
|
|
38104
38360
|
* @return {?}
|
|
38105
38361
|
*/
|
|
38106
|
-
|
|
38107
|
-
*
|
|
38108
|
-
* @param {?} i
|
|
38362
|
+
MatPaginatedTabHeader.prototype._stopInterval = /**
|
|
38363
|
+
* Stops the currently-running paginator interval.
|
|
38109
38364
|
* @return {?}
|
|
38110
38365
|
*/
|
|
38111
|
-
function (
|
|
38112
|
-
|
|
38366
|
+
function () {
|
|
38367
|
+
this._stopScrolling.next();
|
|
38113
38368
|
};
|
|
38114
38369
|
/**
|
|
38115
|
-
*
|
|
38116
|
-
*
|
|
38370
|
+
* Handles the user pressing down on one of the paginators.
|
|
38371
|
+
* Starts scrolling the header after a certain amount of time.
|
|
38372
|
+
* @param direction In which direction the paginator should be scrolled.
|
|
38117
38373
|
*/
|
|
38118
38374
|
/**
|
|
38119
|
-
*
|
|
38120
|
-
*
|
|
38121
|
-
* @param {?}
|
|
38375
|
+
* Handles the user pressing down on one of the paginators.
|
|
38376
|
+
* Starts scrolling the header after a certain amount of time.
|
|
38377
|
+
* @param {?} direction In which direction the paginator should be scrolled.
|
|
38122
38378
|
* @return {?}
|
|
38123
38379
|
*/
|
|
38124
|
-
|
|
38125
|
-
*
|
|
38126
|
-
*
|
|
38127
|
-
* @param {?}
|
|
38380
|
+
MatPaginatedTabHeader.prototype._handlePaginatorPress = /**
|
|
38381
|
+
* Handles the user pressing down on one of the paginators.
|
|
38382
|
+
* Starts scrolling the header after a certain amount of time.
|
|
38383
|
+
* @param {?} direction In which direction the paginator should be scrolled.
|
|
38128
38384
|
* @return {?}
|
|
38129
38385
|
*/
|
|
38130
|
-
function (
|
|
38131
|
-
|
|
38132
|
-
|
|
38133
|
-
|
|
38134
|
-
|
|
38135
|
-
|
|
38136
|
-
|
|
38137
|
-
|
|
38138
|
-
|
|
38139
|
-
|
|
38140
|
-
|
|
38141
|
-
|
|
38386
|
+
function (direction) {
|
|
38387
|
+
var _this = this;
|
|
38388
|
+
// Avoid overlapping timers.
|
|
38389
|
+
this._stopInterval();
|
|
38390
|
+
// Start a timer after the delay and keep firing based on the interval.
|
|
38391
|
+
rxjs.timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
|
|
38392
|
+
// Keep the timer going until something tells it to stop or the component is destroyed.
|
|
38393
|
+
.pipe(operators.takeUntil(rxjs.merge(this._stopScrolling, this._destroyed)))
|
|
38394
|
+
.subscribe((/**
|
|
38395
|
+
* @return {?}
|
|
38396
|
+
*/
|
|
38397
|
+
function () {
|
|
38398
|
+
var _a = _this._scrollHeader(direction), maxScrollDistance = _a.maxScrollDistance, distance = _a.distance;
|
|
38399
|
+
// Stop the timer if we've reached the start or the end.
|
|
38400
|
+
if (distance === 0 || distance >= maxScrollDistance) {
|
|
38401
|
+
_this._stopInterval();
|
|
38402
|
+
}
|
|
38403
|
+
}));
|
|
38142
38404
|
};
|
|
38143
|
-
/** Removes the height of the tab body wrapper. */
|
|
38144
38405
|
/**
|
|
38145
|
-
*
|
|
38146
|
-
* @
|
|
38147
|
-
|
|
38148
|
-
MatTabGroup.prototype._removeTabBodyWrapperHeight = /**
|
|
38149
|
-
* Removes the height of the tab body wrapper.
|
|
38150
|
-
* @return {?}
|
|
38406
|
+
* Scrolls the header to a given position.
|
|
38407
|
+
* @param position Position to which to scroll.
|
|
38408
|
+
* @returns Information on the current scroll distance and the maximum.
|
|
38151
38409
|
*/
|
|
38152
|
-
function () {
|
|
38153
|
-
/** @type {?} */
|
|
38154
|
-
var wrapper = this._tabBodyWrapper.nativeElement;
|
|
38155
|
-
this._tabBodyWrapperHeight = wrapper.clientHeight;
|
|
38156
|
-
wrapper.style.height = '';
|
|
38157
|
-
this.animationDone.emit();
|
|
38158
|
-
};
|
|
38159
|
-
/** Handle click events, setting new selected index if appropriate. */
|
|
38160
38410
|
/**
|
|
38161
|
-
*
|
|
38162
|
-
* @
|
|
38163
|
-
* @param {?}
|
|
38164
|
-
* @
|
|
38165
|
-
* @return {?}
|
|
38411
|
+
* Scrolls the header to a given position.
|
|
38412
|
+
* @private
|
|
38413
|
+
* @param {?} position Position to which to scroll.
|
|
38414
|
+
* @return {?} Information on the current scroll distance and the maximum.
|
|
38166
38415
|
*/
|
|
38167
|
-
|
|
38168
|
-
*
|
|
38169
|
-
* @
|
|
38170
|
-
* @param {?}
|
|
38171
|
-
* @
|
|
38172
|
-
* @return {?}
|
|
38416
|
+
MatPaginatedTabHeader.prototype._scrollTo = /**
|
|
38417
|
+
* Scrolls the header to a given position.
|
|
38418
|
+
* @private
|
|
38419
|
+
* @param {?} position Position to which to scroll.
|
|
38420
|
+
* @return {?} Information on the current scroll distance and the maximum.
|
|
38173
38421
|
*/
|
|
38174
|
-
function (
|
|
38175
|
-
|
|
38176
|
-
|
|
38177
|
-
|
|
38422
|
+
function (position) {
|
|
38423
|
+
/** @type {?} */
|
|
38424
|
+
var maxScrollDistance = this._getMaxScrollDistance();
|
|
38425
|
+
this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
|
|
38426
|
+
// Mark that the scroll distance has changed so that after the view is checked, the CSS
|
|
38427
|
+
// transformation can move the header.
|
|
38428
|
+
this._scrollDistanceChanged = true;
|
|
38429
|
+
this._checkScrollingControls();
|
|
38430
|
+
return { maxScrollDistance: maxScrollDistance, distance: this._scrollDistance };
|
|
38178
38431
|
};
|
|
38179
|
-
|
|
38432
|
+
MatPaginatedTabHeader.decorators = [
|
|
38433
|
+
{ type: core.Directive, args: [{
|
|
38434
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
38435
|
+
selector: 'do-not-use-abstract-mat-paginated-tab-header'
|
|
38436
|
+
},] },
|
|
38437
|
+
];
|
|
38438
|
+
/** @nocollapse */
|
|
38439
|
+
MatPaginatedTabHeader.ctorParameters = function () { return [
|
|
38440
|
+
{ type: core.ElementRef },
|
|
38441
|
+
{ type: core.ChangeDetectorRef },
|
|
38442
|
+
{ type: scrolling.ViewportRuler },
|
|
38443
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
38444
|
+
{ type: core.NgZone },
|
|
38445
|
+
{ type: platform.Platform },
|
|
38446
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38447
|
+
]; };
|
|
38448
|
+
return MatPaginatedTabHeader;
|
|
38449
|
+
}());
|
|
38450
|
+
|
|
38451
|
+
/**
|
|
38452
|
+
* @fileoverview added by tsickle
|
|
38453
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
38454
|
+
*/
|
|
38455
|
+
/**
|
|
38456
|
+
* Base class with all of the `MatTabHeader` functionality.
|
|
38457
|
+
* \@docs-private
|
|
38458
|
+
* @abstract
|
|
38459
|
+
*/
|
|
38460
|
+
var _MatTabHeaderBase = /** @class */ (function (_super) {
|
|
38461
|
+
__extends(_MatTabHeaderBase, _super);
|
|
38462
|
+
function _MatTabHeaderBase(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1,
|
|
38463
|
+
// @breaking-change 9.0.0 `_animationMode` parameter to be made required.
|
|
38464
|
+
animationMode) {
|
|
38465
|
+
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1, animationMode) || this;
|
|
38466
|
+
_this._disableRipple = false;
|
|
38467
|
+
return _this;
|
|
38468
|
+
}
|
|
38469
|
+
Object.defineProperty(_MatTabHeaderBase.prototype, "disableRipple", {
|
|
38470
|
+
/** Whether the ripple effect is disabled or not. */
|
|
38471
|
+
get: /**
|
|
38472
|
+
* Whether the ripple effect is disabled or not.
|
|
38473
|
+
* @return {?}
|
|
38474
|
+
*/
|
|
38475
|
+
function () { return this._disableRipple; },
|
|
38476
|
+
set: /**
|
|
38477
|
+
* @param {?} value
|
|
38478
|
+
* @return {?}
|
|
38479
|
+
*/
|
|
38480
|
+
function (value) { this._disableRipple = coercion.coerceBooleanProperty(value); },
|
|
38481
|
+
enumerable: true,
|
|
38482
|
+
configurable: true
|
|
38483
|
+
});
|
|
38180
38484
|
/**
|
|
38181
|
-
*
|
|
38182
|
-
* @param {?}
|
|
38183
|
-
* @param {?} idx
|
|
38485
|
+
* @protected
|
|
38486
|
+
* @param {?} event
|
|
38184
38487
|
* @return {?}
|
|
38185
38488
|
*/
|
|
38186
|
-
|
|
38187
|
-
*
|
|
38188
|
-
* @param {?}
|
|
38189
|
-
* @param {?} idx
|
|
38489
|
+
_MatTabHeaderBase.prototype._itemSelected = /**
|
|
38490
|
+
* @protected
|
|
38491
|
+
* @param {?} event
|
|
38190
38492
|
* @return {?}
|
|
38191
38493
|
*/
|
|
38192
|
-
function (
|
|
38193
|
-
|
|
38194
|
-
return null;
|
|
38195
|
-
}
|
|
38196
|
-
return this.selectedIndex === idx ? 0 : -1;
|
|
38494
|
+
function (event) {
|
|
38495
|
+
event.preventDefault();
|
|
38197
38496
|
};
|
|
38198
|
-
|
|
38199
|
-
{ type: core.
|
|
38200
|
-
|
|
38201
|
-
|
|
38202
|
-
|
|
38497
|
+
_MatTabHeaderBase.decorators = [
|
|
38498
|
+
{ type: core.Directive, args: [{
|
|
38499
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
38500
|
+
selector: 'do-not-use-abstract-mat-tab-header-base'
|
|
38501
|
+
},] },
|
|
38502
|
+
];
|
|
38503
|
+
/** @nocollapse */
|
|
38504
|
+
_MatTabHeaderBase.ctorParameters = function () { return [
|
|
38505
|
+
{ type: core.ElementRef },
|
|
38506
|
+
{ type: core.ChangeDetectorRef },
|
|
38507
|
+
{ type: scrolling.ViewportRuler },
|
|
38508
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
38509
|
+
{ type: core.NgZone },
|
|
38510
|
+
{ type: platform.Platform },
|
|
38511
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38512
|
+
]; };
|
|
38513
|
+
_MatTabHeaderBase.propDecorators = {
|
|
38514
|
+
disableRipple: [{ type: core.Input }]
|
|
38515
|
+
};
|
|
38516
|
+
return _MatTabHeaderBase;
|
|
38517
|
+
}(MatPaginatedTabHeader));
|
|
38518
|
+
/**
|
|
38519
|
+
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
38520
|
+
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
38521
|
+
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
38522
|
+
* left and right across the header.
|
|
38523
|
+
* \@docs-private
|
|
38524
|
+
*/
|
|
38525
|
+
var MatTabHeader = /** @class */ (function (_super) {
|
|
38526
|
+
__extends(MatTabHeader, _super);
|
|
38527
|
+
function MatTabHeader(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1,
|
|
38528
|
+
// @breaking-change 9.0.0 `_animationMode` parameter to be made required.
|
|
38529
|
+
animationMode) {
|
|
38530
|
+
return _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1, animationMode) || this;
|
|
38531
|
+
}
|
|
38532
|
+
MatTabHeader.decorators = [
|
|
38533
|
+
{ type: core.Component, args: [{selector: 'mat-tab-header',
|
|
38534
|
+
template: "<div class=\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\" #previousPaginator aria-hidden=\"true\" mat-ripple [matRippleDisabled]=\"_disableScrollBefore || disableRipple\" [class.mat-tab-header-pagination-disabled]=\"_disableScrollBefore\" (click)=\"_handlePaginatorClick('before')\" (mousedown)=\"_handlePaginatorPress('before')\" (touchend)=\"_stopInterval()\"><div class=\"mat-tab-header-pagination-chevron\"></div></div><div class=\"mat-tab-label-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\"><div #tabList class=\"mat-tab-list\" [class._mat-animation-noopable]=\"_animationMode === 'NoopAnimations'\" role=\"tablist\" (cdkObserveContent)=\"_onContentChanges()\"><div class=\"mat-tab-labels\"><ng-content></ng-content></div><mat-ink-bar></mat-ink-bar></div></div><div class=\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\" #nextPaginator aria-hidden=\"true\" mat-ripple [matRippleDisabled]=\"_disableScrollAfter || disableRipple\" [class.mat-tab-header-pagination-disabled]=\"_disableScrollAfter\" (mousedown)=\"_handlePaginatorPress('after')\" (click)=\"_handlePaginatorClick('after')\" (touchend)=\"_stopInterval()\"><div class=\"mat-tab-header-pagination-chevron\"></div></div>",
|
|
38535
|
+
styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-pagination-after,.mat-tab-header-rtl .mat-tab-header-pagination-before{padding-right:4px}.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:'';height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}.mat-tab-labels{display:flex}[mat-align-tabs=center] .mat-tab-labels{justify-content:center}[mat-align-tabs=end] .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{min-width:72px}}"],
|
|
38536
|
+
inputs: ['selectedIndex'],
|
|
38537
|
+
outputs: ['selectFocusedIndex', 'indexFocused'],
|
|
38203
38538
|
encapsulation: core.ViewEncapsulation.None,
|
|
38204
38539
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
38205
|
-
inputs: ['color', 'disableRipple'],
|
|
38206
38540
|
host: {
|
|
38207
|
-
'class': 'mat-tab-
|
|
38208
|
-
'[class.mat-tab-
|
|
38209
|
-
'[class.mat-tab-
|
|
38541
|
+
'class': 'mat-tab-header',
|
|
38542
|
+
'[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
38543
|
+
'[class.mat-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
|
38210
38544
|
},
|
|
38211
38545
|
},] },
|
|
38212
38546
|
];
|
|
38213
38547
|
/** @nocollapse */
|
|
38214
|
-
|
|
38548
|
+
MatTabHeader.ctorParameters = function () { return [
|
|
38215
38549
|
{ type: core.ElementRef },
|
|
38216
38550
|
{ type: core.ChangeDetectorRef },
|
|
38217
|
-
{ type:
|
|
38551
|
+
{ type: scrolling.ViewportRuler },
|
|
38552
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
38553
|
+
{ type: core.NgZone },
|
|
38554
|
+
{ type: platform.Platform },
|
|
38218
38555
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38219
38556
|
]; };
|
|
38220
|
-
|
|
38221
|
-
|
|
38222
|
-
|
|
38223
|
-
|
|
38224
|
-
|
|
38225
|
-
|
|
38226
|
-
|
|
38227
|
-
animationDuration: [{ type: core.Input }],
|
|
38228
|
-
backgroundColor: [{ type: core.Input }],
|
|
38229
|
-
selectedIndexChange: [{ type: core.Output }],
|
|
38230
|
-
focusChange: [{ type: core.Output }],
|
|
38231
|
-
animationDone: [{ type: core.Output }],
|
|
38232
|
-
selectedTabChange: [{ type: core.Output }]
|
|
38557
|
+
MatTabHeader.propDecorators = {
|
|
38558
|
+
_items: [{ type: core.ContentChildren, args: [MatTabLabelWrapper,] }],
|
|
38559
|
+
_inkBar: [{ type: core.ViewChild, args: [MatInkBar, { static: true },] }],
|
|
38560
|
+
_tabListContainer: [{ type: core.ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
38561
|
+
_tabList: [{ type: core.ViewChild, args: ['tabList', { static: true },] }],
|
|
38562
|
+
_nextPaginator: [{ type: core.ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
38563
|
+
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }]
|
|
38233
38564
|
};
|
|
38234
|
-
return
|
|
38235
|
-
}(
|
|
38565
|
+
return MatTabHeader;
|
|
38566
|
+
}(_MatTabHeaderBase));
|
|
38236
38567
|
|
|
38237
38568
|
/**
|
|
38238
38569
|
* @fileoverview added by tsickle
|
|
38239
38570
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
38240
38571
|
*/
|
|
38241
38572
|
/**
|
|
38242
|
-
*
|
|
38243
|
-
*
|
|
38573
|
+
* Base class with all of the `MatTabNav` functionality.
|
|
38574
|
+
* \@docs-private
|
|
38575
|
+
* @abstract
|
|
38244
38576
|
*/
|
|
38245
|
-
var
|
|
38246
|
-
__extends(
|
|
38247
|
-
function
|
|
38577
|
+
var _MatTabNavBase = /** @class */ (function (_super) {
|
|
38578
|
+
__extends(_MatTabNavBase, _super);
|
|
38579
|
+
function _MatTabNavBase(elementRef, dir, ngZone, changeDetectorRef, viewportRuler,
|
|
38248
38580
|
/**
|
|
38249
38581
|
* @deprecated @breaking-change 9.0.0 `platform` parameter to become required.
|
|
38250
38582
|
*/
|
|
@@ -38257,7 +38589,7 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38257
38589
|
_this.color = 'primary';
|
|
38258
38590
|
return _this;
|
|
38259
38591
|
}
|
|
38260
|
-
Object.defineProperty(
|
|
38592
|
+
Object.defineProperty(_MatTabNavBase.prototype, "backgroundColor", {
|
|
38261
38593
|
/** Background color of the tab nav. */
|
|
38262
38594
|
get: /**
|
|
38263
38595
|
* Background color of the tab nav.
|
|
@@ -38280,7 +38612,7 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38280
38612
|
enumerable: true,
|
|
38281
38613
|
configurable: true
|
|
38282
38614
|
});
|
|
38283
|
-
Object.defineProperty(
|
|
38615
|
+
Object.defineProperty(_MatTabNavBase.prototype, "disableRipple", {
|
|
38284
38616
|
/** Whether the ripple effect is disabled or not. */
|
|
38285
38617
|
get: /**
|
|
38286
38618
|
* Whether the ripple effect is disabled or not.
|
|
@@ -38299,7 +38631,7 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38299
38631
|
* @protected
|
|
38300
38632
|
* @return {?}
|
|
38301
38633
|
*/
|
|
38302
|
-
|
|
38634
|
+
_MatTabNavBase.prototype._itemSelected = /**
|
|
38303
38635
|
* @protected
|
|
38304
38636
|
* @return {?}
|
|
38305
38637
|
*/
|
|
@@ -38309,11 +38641,19 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38309
38641
|
/**
|
|
38310
38642
|
* @return {?}
|
|
38311
38643
|
*/
|
|
38312
|
-
|
|
38644
|
+
_MatTabNavBase.prototype.ngAfterContentInit = /**
|
|
38313
38645
|
* @return {?}
|
|
38314
38646
|
*/
|
|
38315
38647
|
function () {
|
|
38316
|
-
this
|
|
38648
|
+
var _this = this;
|
|
38649
|
+
// We need this to run before the `changes` subscription in parent to ensure that the
|
|
38650
|
+
// selectedIndex is up-to-date by the time the super class starts looking for it.
|
|
38651
|
+
this._items.changes.pipe(operators.startWith(null), operators.takeUntil(this._destroyed)).subscribe((/**
|
|
38652
|
+
* @return {?}
|
|
38653
|
+
*/
|
|
38654
|
+
function () {
|
|
38655
|
+
_this.updateActiveLink();
|
|
38656
|
+
}));
|
|
38317
38657
|
_super.prototype.ngAfterContentInit.call(this);
|
|
38318
38658
|
};
|
|
38319
38659
|
/**
|
|
@@ -38326,7 +38666,7 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38326
38666
|
* @param {?=} _element
|
|
38327
38667
|
* @return {?}
|
|
38328
38668
|
*/
|
|
38329
|
-
|
|
38669
|
+
_MatTabNavBase.prototype.updateActiveLink = /**
|
|
38330
38670
|
* Notifies the component that the active link has been changed.
|
|
38331
38671
|
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
38332
38672
|
* @param {?=} _element
|
|
@@ -38349,6 +38689,42 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38349
38689
|
this.selectedIndex = -1;
|
|
38350
38690
|
this._inkBar.hide();
|
|
38351
38691
|
};
|
|
38692
|
+
_MatTabNavBase.decorators = [
|
|
38693
|
+
{ type: core.Directive, args: [{
|
|
38694
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
38695
|
+
selector: 'do-not-use-abstract-mat-tab-nav-base'
|
|
38696
|
+
},] },
|
|
38697
|
+
];
|
|
38698
|
+
/** @nocollapse */
|
|
38699
|
+
_MatTabNavBase.ctorParameters = function () { return [
|
|
38700
|
+
{ type: core.ElementRef },
|
|
38701
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
38702
|
+
{ type: core.NgZone },
|
|
38703
|
+
{ type: core.ChangeDetectorRef },
|
|
38704
|
+
{ type: scrolling.ViewportRuler },
|
|
38705
|
+
{ type: platform.Platform, decorators: [{ type: core.Optional }] },
|
|
38706
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38707
|
+
]; };
|
|
38708
|
+
_MatTabNavBase.propDecorators = {
|
|
38709
|
+
backgroundColor: [{ type: core.Input }],
|
|
38710
|
+
disableRipple: [{ type: core.Input }],
|
|
38711
|
+
color: [{ type: core.Input }]
|
|
38712
|
+
};
|
|
38713
|
+
return _MatTabNavBase;
|
|
38714
|
+
}(MatPaginatedTabHeader));
|
|
38715
|
+
/**
|
|
38716
|
+
* Navigation component matching the styles of the tab group header.
|
|
38717
|
+
* Provides anchored navigation with animated ink bar.
|
|
38718
|
+
*/
|
|
38719
|
+
var MatTabNav = /** @class */ (function (_super) {
|
|
38720
|
+
__extends(MatTabNav, _super);
|
|
38721
|
+
function MatTabNav(elementRef, dir, ngZone, changeDetectorRef, viewportRuler,
|
|
38722
|
+
/**
|
|
38723
|
+
* @deprecated @breaking-change 9.0.0 `platform` parameter to become required.
|
|
38724
|
+
*/
|
|
38725
|
+
platform$$1, animationMode) {
|
|
38726
|
+
return _super.call(this, elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform$$1, animationMode) || this;
|
|
38727
|
+
}
|
|
38352
38728
|
MatTabNav.decorators = [
|
|
38353
38729
|
{ type: core.Component, args: [{selector: '[mat-tab-nav-bar]',
|
|
38354
38730
|
exportAs: 'matTabNavBar, matTabNav',
|
|
@@ -38386,29 +38762,26 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
38386
38762
|
_tabListContainer: [{ type: core.ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
38387
38763
|
_tabList: [{ type: core.ViewChild, args: ['tabList', { static: true },] }],
|
|
38388
38764
|
_nextPaginator: [{ type: core.ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
38389
|
-
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }]
|
|
38390
|
-
backgroundColor: [{ type: core.Input }],
|
|
38391
|
-
disableRipple: [{ type: core.Input }],
|
|
38392
|
-
color: [{ type: core.Input }]
|
|
38765
|
+
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }]
|
|
38393
38766
|
};
|
|
38394
38767
|
return MatTabNav;
|
|
38395
|
-
}(
|
|
38768
|
+
}(_MatTabNavBase));
|
|
38396
38769
|
// Boilerplate for applying mixins to MatTabLink.
|
|
38397
38770
|
var
|
|
38398
38771
|
// Boilerplate for applying mixins to MatTabLink.
|
|
38399
|
-
|
|
38400
|
-
function
|
|
38772
|
+
MatTabLinkMixinBase = /** @class */ (function () {
|
|
38773
|
+
function MatTabLinkMixinBase() {
|
|
38401
38774
|
}
|
|
38402
|
-
return
|
|
38775
|
+
return MatTabLinkMixinBase;
|
|
38403
38776
|
}());
|
|
38404
38777
|
/** @type {?} */
|
|
38405
|
-
var _MatTabLinkMixinBase = mixinTabIndex(mixinDisableRipple(mixinDisabled(
|
|
38778
|
+
var _MatTabLinkMixinBase = mixinTabIndex(mixinDisableRipple(mixinDisabled(MatTabLinkMixinBase)));
|
|
38406
38779
|
/**
|
|
38407
|
-
*
|
|
38780
|
+
* Base class with all of the `MatTabLink` functionality.
|
|
38408
38781
|
*/
|
|
38409
|
-
var
|
|
38410
|
-
__extends(
|
|
38411
|
-
function
|
|
38782
|
+
var _MatTabLinkBase = /** @class */ (function (_super) {
|
|
38783
|
+
__extends(_MatTabLinkBase, _super);
|
|
38784
|
+
function _MatTabLinkBase(_tabNavBar, elementRef, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {
|
|
38412
38785
|
var _this = _super.call(this) || this;
|
|
38413
38786
|
_this._tabNavBar = _tabNavBar;
|
|
38414
38787
|
_this.elementRef = elementRef;
|
|
@@ -38417,8 +38790,6 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38417
38790
|
* Whether the tab link is active or not.
|
|
38418
38791
|
*/
|
|
38419
38792
|
_this._isActive = false;
|
|
38420
|
-
_this._tabLinkRipple = new RippleRenderer(_this, ngZone, elementRef, platform$$1);
|
|
38421
|
-
_this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);
|
|
38422
38793
|
_this.rippleConfig = globalRippleOptions || {};
|
|
38423
38794
|
_this.tabIndex = parseInt(tabIndex) || 0;
|
|
38424
38795
|
if (animationMode === 'NoopAnimations') {
|
|
@@ -38427,7 +38798,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38427
38798
|
_focusMonitor.monitor(elementRef);
|
|
38428
38799
|
return _this;
|
|
38429
38800
|
}
|
|
38430
|
-
Object.defineProperty(
|
|
38801
|
+
Object.defineProperty(_MatTabLinkBase.prototype, "active", {
|
|
38431
38802
|
/** Whether the link is active. */
|
|
38432
38803
|
get: /**
|
|
38433
38804
|
* Whether the link is active.
|
|
@@ -38447,7 +38818,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38447
38818
|
enumerable: true,
|
|
38448
38819
|
configurable: true
|
|
38449
38820
|
});
|
|
38450
|
-
Object.defineProperty(
|
|
38821
|
+
Object.defineProperty(_MatTabLinkBase.prototype, "rippleDisabled", {
|
|
38451
38822
|
/**
|
|
38452
38823
|
* Whether ripples are disabled on interaction.
|
|
38453
38824
|
* @docs-private
|
|
@@ -38467,12 +38838,52 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38467
38838
|
/**
|
|
38468
38839
|
* @return {?}
|
|
38469
38840
|
*/
|
|
38470
|
-
|
|
38841
|
+
_MatTabLinkBase.prototype.focus = /**
|
|
38471
38842
|
* @return {?}
|
|
38472
38843
|
*/
|
|
38473
38844
|
function () {
|
|
38474
38845
|
this.elementRef.nativeElement.focus();
|
|
38475
38846
|
};
|
|
38847
|
+
/**
|
|
38848
|
+
* @return {?}
|
|
38849
|
+
*/
|
|
38850
|
+
_MatTabLinkBase.prototype.ngOnDestroy = /**
|
|
38851
|
+
* @return {?}
|
|
38852
|
+
*/
|
|
38853
|
+
function () {
|
|
38854
|
+
this._focusMonitor.stopMonitoring(this.elementRef);
|
|
38855
|
+
};
|
|
38856
|
+
_MatTabLinkBase.decorators = [
|
|
38857
|
+
{ type: core.Directive, args: [{
|
|
38858
|
+
// TODO(crisbeto): this selector can be removed when we update to Angular 9.0.
|
|
38859
|
+
selector: 'do-not-use-abstract-mat-tab-link-base'
|
|
38860
|
+
},] },
|
|
38861
|
+
];
|
|
38862
|
+
/** @nocollapse */
|
|
38863
|
+
_MatTabLinkBase.ctorParameters = function () { return [
|
|
38864
|
+
{ type: _MatTabNavBase },
|
|
38865
|
+
{ type: core.ElementRef },
|
|
38866
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [MAT_RIPPLE_GLOBAL_OPTIONS,] }] },
|
|
38867
|
+
{ type: String, decorators: [{ type: core.Attribute, args: ['tabindex',] }] },
|
|
38868
|
+
{ type: a11y.FocusMonitor },
|
|
38869
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38870
|
+
]; };
|
|
38871
|
+
_MatTabLinkBase.propDecorators = {
|
|
38872
|
+
active: [{ type: core.Input }]
|
|
38873
|
+
};
|
|
38874
|
+
return _MatTabLinkBase;
|
|
38875
|
+
}(_MatTabLinkMixinBase));
|
|
38876
|
+
/**
|
|
38877
|
+
* Link inside of a `mat-tab-nav-bar`.
|
|
38878
|
+
*/
|
|
38879
|
+
var MatTabLink = /** @class */ (function (_super) {
|
|
38880
|
+
__extends(MatTabLink, _super);
|
|
38881
|
+
function MatTabLink(tabNavBar, elementRef, ngZone, platform$$1, globalRippleOptions, tabIndex, focusMonitor, animationMode) {
|
|
38882
|
+
var _this = _super.call(this, tabNavBar, elementRef, globalRippleOptions, tabIndex, focusMonitor, animationMode) || this;
|
|
38883
|
+
_this._tabLinkRipple = new RippleRenderer(_this, ngZone, elementRef, platform$$1);
|
|
38884
|
+
_this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);
|
|
38885
|
+
return _this;
|
|
38886
|
+
}
|
|
38476
38887
|
/**
|
|
38477
38888
|
* @return {?}
|
|
38478
38889
|
*/
|
|
@@ -38480,8 +38891,8 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38480
38891
|
* @return {?}
|
|
38481
38892
|
*/
|
|
38482
38893
|
function () {
|
|
38894
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
38483
38895
|
this._tabLinkRipple._removeTriggerEvents();
|
|
38484
|
-
this._focusMonitor.stopMonitoring(this.elementRef);
|
|
38485
38896
|
};
|
|
38486
38897
|
MatTabLink.decorators = [
|
|
38487
38898
|
{ type: core.Directive, args: [{
|
|
@@ -38509,11 +38920,8 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
38509
38920
|
{ type: a11y.FocusMonitor },
|
|
38510
38921
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
38511
38922
|
]; };
|
|
38512
|
-
MatTabLink.propDecorators = {
|
|
38513
|
-
active: [{ type: core.Input }]
|
|
38514
|
-
};
|
|
38515
38923
|
return MatTabLink;
|
|
38516
|
-
}(
|
|
38924
|
+
}(_MatTabLinkBase));
|
|
38517
38925
|
|
|
38518
38926
|
/**
|
|
38519
38927
|
* @fileoverview added by tsickle
|
|
@@ -38554,6 +38962,14 @@ var MatTabsModule = /** @class */ (function () {
|
|
|
38554
38962
|
MatTabBodyPortal,
|
|
38555
38963
|
MatTabHeader,
|
|
38556
38964
|
MatTabContent,
|
|
38965
|
+
(/** @type {?} */ (
|
|
38966
|
+
// TODO(crisbeto): these can be removed once they're turned into selector-less directives.
|
|
38967
|
+
MatPaginatedTabHeader)),
|
|
38968
|
+
(/** @type {?} */ (_MatTabGroupBase)),
|
|
38969
|
+
(/** @type {?} */ (_MatTabNavBase)),
|
|
38970
|
+
(/** @type {?} */ (_MatTabBodyBase)),
|
|
38971
|
+
(/** @type {?} */ (_MatTabHeaderBase)),
|
|
38972
|
+
(/** @type {?} */ (_MatTabLinkBase)),
|
|
38557
38973
|
],
|
|
38558
38974
|
},] },
|
|
38559
38975
|
];
|
|
@@ -39614,7 +40030,7 @@ exports.MatPrefix = MatPrefix;
|
|
|
39614
40030
|
exports.MatSuffix = MatSuffix;
|
|
39615
40031
|
exports.MatLabel = MatLabel;
|
|
39616
40032
|
exports.matFormFieldAnimations = matFormFieldAnimations;
|
|
39617
|
-
exports.ɵ
|
|
40033
|
+
exports.ɵa11 = MAT_GRID_LIST;
|
|
39618
40034
|
exports.MatGridListModule = MatGridListModule;
|
|
39619
40035
|
exports.MatGridList = MatGridList;
|
|
39620
40036
|
exports.MatGridTile = MatGridTile;
|
|
@@ -39649,9 +40065,9 @@ exports.MAT_SELECTION_LIST_VALUE_ACCESSOR = MAT_SELECTION_LIST_VALUE_ACCESSOR;
|
|
|
39649
40065
|
exports.MatSelectionListChange = MatSelectionListChange;
|
|
39650
40066
|
exports.MatListOption = MatListOption;
|
|
39651
40067
|
exports.MatSelectionList = MatSelectionList;
|
|
39652
|
-
exports.ɵ
|
|
39653
|
-
exports.ɵ
|
|
39654
|
-
exports.ɵ
|
|
40068
|
+
exports.ɵa22 = MAT_MENU_DEFAULT_OPTIONS_FACTORY;
|
|
40069
|
+
exports.ɵb22 = MAT_MENU_SCROLL_STRATEGY_FACTORY;
|
|
40070
|
+
exports.ɵc22 = MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER;
|
|
39655
40071
|
exports.MatMenu = MatMenu;
|
|
39656
40072
|
exports.MAT_MENU_DEFAULT_OPTIONS = MAT_MENU_DEFAULT_OPTIONS;
|
|
39657
40073
|
exports._MatMenu = _MatMenu;
|
|
@@ -39775,22 +40191,27 @@ exports.MatFooterRow = MatFooterRow;
|
|
|
39775
40191
|
exports.MatRow = MatRow;
|
|
39776
40192
|
exports.MatTableDataSource = MatTableDataSource;
|
|
39777
40193
|
exports.MatTextColumn = MatTextColumn;
|
|
39778
|
-
exports.ɵ
|
|
39779
|
-
exports.ɵ
|
|
40194
|
+
exports.ɵa24 = _MAT_INK_BAR_POSITIONER_FACTORY;
|
|
40195
|
+
exports.ɵb24 = MatPaginatedTabHeader;
|
|
40196
|
+
exports.MatTabsModule = MatTabsModule;
|
|
39780
40197
|
exports.MatInkBar = MatInkBar;
|
|
39781
40198
|
exports._MAT_INK_BAR_POSITIONER = _MAT_INK_BAR_POSITIONER;
|
|
39782
40199
|
exports.MatTabBody = MatTabBody;
|
|
40200
|
+
exports._MatTabBodyBase = _MatTabBodyBase;
|
|
39783
40201
|
exports.MatTabBodyPortal = MatTabBodyPortal;
|
|
39784
40202
|
exports.MatTabHeader = MatTabHeader;
|
|
40203
|
+
exports._MatTabHeaderBase = _MatTabHeaderBase;
|
|
39785
40204
|
exports.MatTabLabelWrapper = MatTabLabelWrapper;
|
|
39786
40205
|
exports.MatTab = MatTab;
|
|
39787
40206
|
exports.MatTabLabel = MatTabLabel;
|
|
39788
40207
|
exports.MatTabNav = MatTabNav;
|
|
39789
40208
|
exports.MatTabLink = MatTabLink;
|
|
40209
|
+
exports._MatTabNavBase = _MatTabNavBase;
|
|
40210
|
+
exports._MatTabLinkBase = _MatTabLinkBase;
|
|
39790
40211
|
exports.MatTabContent = MatTabContent;
|
|
39791
|
-
exports.MatTabsModule = MatTabsModule;
|
|
39792
40212
|
exports.MatTabChangeEvent = MatTabChangeEvent;
|
|
39793
40213
|
exports.MAT_TABS_CONFIG = MAT_TABS_CONFIG;
|
|
40214
|
+
exports._MatTabGroupBase = _MatTabGroupBase;
|
|
39794
40215
|
exports.MatTabGroup = MatTabGroup;
|
|
39795
40216
|
exports.matTabsAnimations = matTabsAnimations;
|
|
39796
40217
|
exports.MatToolbarModule = MatToolbarModule;
|