@angular/material 8.0.0 → 8.1.1
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 +29 -28
- package/bottom-sheet/typings/bottom-sheet-config.d.ts +4 -1
- package/bottom-sheet/typings/bottom-sheet-ref.d.ts +2 -0
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +4 -0
- 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-bottom-sheet.umd.js +23 -8
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +1 -1
- 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 +16 -7
- 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 +2 -2
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +1 -1
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +12 -7
- 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 +31 -6
- 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 +94 -22
- 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 +41 -6
- 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-expansion.umd.js +70 -4
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +1 -1
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +1 -1
- 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-list.umd.js +39 -21
- 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 +123 -73
- 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-progress-spinner.umd.js +66 -22
- 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 +22 -3
- 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-sidenav.umd.js +4 -1
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +354 -315
- 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 +2 -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 +883 -478
- 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-toggle/typings/button-toggle.d.ts +1 -1
- package/card/typings/card.d.ts +2 -0
- package/card/typings/index.metadata.json +1 -1
- package/checkbox/typings/checkbox.d.ts +1 -1
- package/checkbox/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 -0
- package/core/typings/index.metadata.json +1 -1
- package/datepicker/typings/calendar.d.ts +1 -1
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/multi-year-view.d.ts +7 -0
- package/datepicker/typings/public-api.d.ts +1 -1
- package/dialog/typings/dialog-ref.d.ts +2 -0
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +4 -0
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/bottom-sheet.js +24 -9
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +1 -1
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +18 -3
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +2 -2
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +10 -3
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +22 -2
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +93 -21
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +42 -7
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/expansion.js +57 -4
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +1 -1
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +1 -1
- package/esm2015/list.js +40 -22
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +6 -6
- package/esm2015/menu.js +74 -52
- package/esm2015/menu.js.map +1 -1
- package/esm2015/progress-spinner.js +64 -20
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +23 -5
- package/esm2015/radio.js.map +1 -1
- package/esm2015/sidenav.js +5 -2
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/tabs.js +281 -222
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/tooltip.js +3 -2
- package/esm2015/tooltip.js.map +1 -1
- package/esm5/autocomplete.es5.js +4 -0
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +24 -9
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +1 -1
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +14 -4
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +2 -2
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +9 -3
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +28 -2
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +92 -20
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +42 -7
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/expansion.es5.js +70 -4
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +1 -1
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +1 -1
- package/esm5/list.es5.js +40 -22
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +6 -6
- package/esm5/menu.es5.js +122 -72
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +64 -20
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +22 -5
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +5 -2
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/tabs.es5.js +342 -303
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +3 -2
- package/esm5/tooltip.es5.js.map +1 -1
- package/expansion/typings/accordion-base.d.ts +4 -0
- package/expansion/typings/accordion.d.ts +3 -1
- package/expansion/typings/expansion-panel-header.d.ts +6 -0
- package/expansion/typings/expansion-panel.d.ts +5 -2
- package/expansion/typings/index.metadata.json +1 -1
- 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/list/typings/index.metadata.json +1 -1
- package/list/typings/selection-list.d.ts +5 -5
- package/menu/typings/index.d.ts +2 -2
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-item.d.ts +1 -1
- package/menu/typings/menu-panel.d.ts +8 -0
- package/menu/typings/menu.d.ts +21 -14
- package/package.json +4 -4
- 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 +14 -6
- package/progress-spinner/typings/public-api.d.ts +1 -1
- package/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +8 -2
- package/schematics/ng-add/fonts/material-fonts.js +1 -1
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +5 -7
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/address-form/index.js +7 -7
- package/schematics/ng-generate/address-form/index.js.map +1 -1
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +5 -7
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/dashboard/index.js +7 -7
- package/schematics/ng-generate/dashboard/index.js.map +1 -1
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +5 -7
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +3 -2
- package/schematics/ng-generate/nav/index.js +7 -7
- package/schematics/ng-generate/nav/index.js.map +1 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__-datasource.ts → __name@dasherize__-datasource.ts.template} +2 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +3 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +6 -4
- package/schematics/ng-generate/table/index.js +5 -5
- package/schematics/ng-generate/table/index.js.map +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__ → __name@dasherize__.component.__style__.template} +0 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.html → __name@dasherize__.component.html.template} +0 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.spec.ts → __name@dasherize__.component.spec.ts.template} +3 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/{__name@dasherize__.component.ts → __name@dasherize__.component.ts.template} +0 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/{example-data.ts → example-data.ts.template} +1 -1
- package/schematics/ng-generate/tree/index.js +5 -5
- package/schematics/ng-generate/tree/index.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -12
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +7 -29
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/css-selectors.js +19 -68
- package/schematics/ng-update/data/css-selectors.js.map +1 -1
- package/schematics/ng-update/data/element-selectors.js +3 -10
- package/schematics/ng-update/data/element-selectors.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +17 -55
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +28 -100
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/index.d.ts +0 -2
- package/schematics/ng-update/index.js +27 -34
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.js +47 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.js +42 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.js.map +1 -0
- package/{typings/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts → schematics/ng-update/upgrade-rules/misc-checks/misc-imports-rule.d.ts} +7 -8
- package/schematics/ng-update/upgrade-rules/misc-checks/{checkImportsMiscRule.js → misc-imports-rule.js} +19 -16
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-imports-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.js +46 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.d.ts +16 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.js +59 -0
- package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/{rippleSpeedFactorAssignmentRule.d.ts → ripple-speed-factor-rule.d.ts} +11 -9
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/{rippleSpeedFactorAssignmentRule.js → ripple-speed-factor-rule.js} +57 -31
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor-rule.js.map +1 -0
- package/schematics/ng-update/upgrade-rules/package-imports-v8/secondary-entry-points-rule.d.ts +18 -0
- package/schematics/ng-update/upgrade-rules/package-imports-v8/{updateAngularMaterialImportsRule.js → secondary-entry-points-rule.js} +40 -52
- package/schematics/ng-update/upgrade-rules/package-imports-v8/secondary-entry-points-rule.js.map +1 -0
- package/sidenav/typings/index.metadata.json +1 -1
- package/tabs/typings/index.d.ts +2 -1
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/ink-bar.d.ts +2 -1
- package/tabs/typings/paginated-tab-header.d.ts +187 -0
- package/tabs/typings/public-api.d.ts +2 -1
- package/tabs/typings/tab-group.d.ts +2 -1
- package/tabs/typings/tab-header.d.ts +10 -159
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +27 -30
- package/tooltip/typings/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-config.d.ts +4 -1
- package/typings/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- package/typings/bottom-sheet/index.metadata.json +1 -1
- package/typings/button-toggle/button-toggle.d.ts +1 -1
- package/typings/card/card.d.ts +2 -0
- package/typings/card/index.metadata.json +1 -1
- package/typings/checkbox/checkbox.d.ts +1 -1
- package/typings/checkbox/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 -0
- package/typings/core/index.metadata.json +1 -1
- package/typings/datepicker/calendar.d.ts +1 -1
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/multi-year-view.d.ts +7 -0
- package/typings/datepicker/public-api.d.ts +1 -1
- package/typings/dialog/dialog-ref.d.ts +2 -0
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-config.d.ts +4 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/button-toggle.d.ts +1 -1
- package/typings/esm5/card/card.d.ts +2 -0
- package/typings/esm5/card/index.metadata.json +1 -1
- package/typings/esm5/checkbox/checkbox.d.ts +1 -1
- package/typings/esm5/checkbox/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 -0
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/datepicker/calendar.d.ts +1 -1
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/multi-year-view.d.ts +7 -0
- package/typings/esm5/datepicker/public-api.d.ts +1 -1
- package/typings/esm5/dialog/dialog-ref.d.ts +2 -0
- package/typings/esm5/dialog/index.metadata.json +1 -1
- package/typings/esm5/expansion/accordion-base.d.ts +4 -0
- package/typings/esm5/expansion/accordion.d.ts +3 -1
- package/typings/esm5/expansion/expansion-panel-header.d.ts +6 -0
- package/typings/esm5/expansion/expansion-panel.d.ts +5 -2
- package/typings/esm5/expansion/index.metadata.json +1 -1
- 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/list/index.metadata.json +1 -1
- package/typings/esm5/list/selection-list.d.ts +5 -5
- package/typings/esm5/menu/index.d.ts +2 -2
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-item.d.ts +1 -1
- package/typings/esm5/menu/menu-panel.d.ts +8 -0
- package/typings/esm5/menu/menu.d.ts +21 -14
- package/typings/esm5/progress-spinner/index.metadata.json +1 -1
- package/typings/esm5/progress-spinner/progress-spinner.d.ts +14 -6
- package/typings/esm5/progress-spinner/public-api.d.ts +1 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +8 -2
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/tabs/index.d.ts +2 -1
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/ink-bar.d.ts +2 -1
- package/typings/esm5/tabs/paginated-tab-header.d.ts +187 -0
- package/typings/esm5/tabs/public-api.d.ts +2 -1
- package/typings/esm5/tabs/tab-group.d.ts +2 -1
- package/typings/esm5/tabs/tab-header.d.ts +10 -159
- package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +27 -30
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/expansion/accordion-base.d.ts +4 -0
- package/typings/expansion/accordion.d.ts +3 -1
- package/typings/expansion/expansion-panel-header.d.ts +6 -0
- package/typings/expansion/expansion-panel.d.ts +5 -2
- package/typings/expansion/index.metadata.json +1 -1
- 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/list/index.metadata.json +1 -1
- package/typings/list/selection-list.d.ts +5 -5
- package/typings/menu/index.d.ts +2 -2
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-item.d.ts +1 -1
- package/typings/menu/menu-panel.d.ts +8 -0
- package/typings/menu/menu.d.ts +21 -14
- package/typings/progress-spinner/index.metadata.json +1 -1
- package/typings/progress-spinner/progress-spinner.d.ts +14 -6
- package/typings/progress-spinner/public-api.d.ts +1 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +8 -2
- package/typings/schematics/ng-update/index.d.ts +0 -2
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.d.ts +18 -0
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.d.ts +18 -0
- package/{schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.d.ts → typings/schematics/ng-update/upgrade-rules/misc-checks/misc-imports-rule.d.ts} +7 -8
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.d.ts +18 -0
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.d.ts +16 -0
- package/typings/schematics/ng-update/upgrade-rules/misc-ripples-v7/{rippleSpeedFactorAssignmentRule.d.ts → ripple-speed-factor-rule.d.ts} +11 -9
- package/typings/schematics/ng-update/upgrade-rules/package-imports-v8/secondary-entry-points-rule.d.ts +18 -0
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/tabs/index.d.ts +2 -1
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/ink-bar.d.ts +2 -1
- package/typings/tabs/paginated-tab-header.d.ts +187 -0
- package/typings/tabs/public-api.d.ts +2 -1
- package/typings/tabs/tab-group.d.ts +2 -1
- package/typings/tabs/tab-header.d.ts +10 -159
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +27 -30
- package/typings/tooltip/index.metadata.json +1 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.d.ts +0 -19
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.js +0 -43
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.d.ts +0 -19
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.js +0 -35
- package/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkImportsMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.d.ts +0 -19
- package/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.js +0 -40
- package/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -66
- package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorAssignmentRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.js +0 -66
- package/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.js.map +0 -1
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.d.ts +0 -22
- package/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.js.map +0 -1
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkClassInheritanceMiscRule.d.ts +0 -19
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkClassNamesMiscRule.d.ts +0 -19
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkPropertyNamesMiscRule.d.ts +0 -19
- package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -22
- package/typings/schematics/ng-update/upgrade-rules/misc-ripples-v7/rippleSpeedFactorTemplateRule.d.ts +0 -22
- package/typings/schematics/ng-update/upgrade-rules/package-imports-v8/updateAngularMaterialImportsRule.d.ts +0 -22
package/esm5/tabs.es5.js
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { Directive, ElementRef, Inject, InjectionToken, NgZone, TemplateRef, ChangeDetectionStrategy, Component, ContentChild, Input, ViewChild, ViewContainerRef, ViewEncapsulation, ChangeDetectorRef, Output, EventEmitter,
|
|
8
|
+
import { Directive, ElementRef, Inject, InjectionToken, NgZone, Optional, TemplateRef, ChangeDetectionStrategy, Component, ContentChild, Input, ViewChild, ViewContainerRef, ViewEncapsulation, ChangeDetectorRef, Output, EventEmitter, ComponentFactoryResolver, forwardRef, ContentChildren, Attribute, NgModule } from '@angular/core';
|
|
9
|
+
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
9
10
|
import { __extends } from 'tslib';
|
|
10
11
|
import { CdkPortal, TemplatePortal, CdkPortalOutlet, PortalHostDirective, PortalModule } from '@angular/cdk/portal';
|
|
11
|
-
import { mixinDisabled,
|
|
12
|
+
import { mixinDisabled, mixinColor, mixinDisableRipple, MAT_RIPPLE_GLOBAL_OPTIONS, mixinTabIndex, RippleRenderer, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
12
13
|
import { Subject, Subscription, merge, of, timer, fromEvent } from 'rxjs';
|
|
13
14
|
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
14
15
|
import { Directionality } from '@angular/cdk/bidi';
|
|
15
16
|
import { startWith, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
16
17
|
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
17
|
-
import { END, ENTER, HOME, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
18
18
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
19
19
|
import { FocusKeyManager, FocusMonitor, A11yModule } from '@angular/cdk/a11y';
|
|
20
|
+
import { END, ENTER, HOME, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
20
21
|
import { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
21
22
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
22
23
|
import { CommonModule } from '@angular/common';
|
|
@@ -55,10 +56,11 @@ function _MAT_INK_BAR_POSITIONER_FACTORY() {
|
|
|
55
56
|
* \@docs-private
|
|
56
57
|
*/
|
|
57
58
|
var MatInkBar = /** @class */ (function () {
|
|
58
|
-
function MatInkBar(_elementRef, _ngZone, _inkBarPositioner) {
|
|
59
|
+
function MatInkBar(_elementRef, _ngZone, _inkBarPositioner, _animationMode) {
|
|
59
60
|
this._elementRef = _elementRef;
|
|
60
61
|
this._ngZone = _ngZone;
|
|
61
62
|
this._inkBarPositioner = _inkBarPositioner;
|
|
63
|
+
this._animationMode = _animationMode;
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
64
66
|
* Calculates the styles from the provided element in order to align the ink-bar to that element.
|
|
@@ -148,6 +150,7 @@ var MatInkBar = /** @class */ (function () {
|
|
|
148
150
|
selector: 'mat-ink-bar',
|
|
149
151
|
host: {
|
|
150
152
|
'class': 'mat-ink-bar',
|
|
153
|
+
'[class._mat-animation-noopable]': "_animationMode === 'NoopAnimations'",
|
|
151
154
|
},
|
|
152
155
|
},] },
|
|
153
156
|
];
|
|
@@ -155,7 +158,8 @@ var MatInkBar = /** @class */ (function () {
|
|
|
155
158
|
MatInkBar.ctorParameters = function () { return [
|
|
156
159
|
{ type: ElementRef },
|
|
157
160
|
{ type: NgZone },
|
|
158
|
-
{ type: undefined, decorators: [{ type: Inject, args: [_MAT_INK_BAR_POSITIONER,] }] }
|
|
161
|
+
{ type: undefined, decorators: [{ type: Inject, args: [_MAT_INK_BAR_POSITIONER,] }] },
|
|
162
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
159
163
|
]; };
|
|
160
164
|
return MatInkBar;
|
|
161
165
|
}());
|
|
@@ -783,76 +787,57 @@ var HEADER_SCROLL_DELAY = 650;
|
|
|
783
787
|
* @type {?}
|
|
784
788
|
*/
|
|
785
789
|
var HEADER_SCROLL_INTERVAL = 100;
|
|
786
|
-
// Boilerplate for applying mixins to MatTabHeader.
|
|
787
790
|
/**
|
|
788
|
-
*
|
|
791
|
+
* Base class for a tab header that supported pagination.
|
|
792
|
+
* @abstract
|
|
789
793
|
*/
|
|
790
|
-
var
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
/** @type {?} */
|
|
801
|
-
var _MatTabHeaderMixinBase = mixinDisableRipple(MatTabHeaderBase);
|
|
802
|
-
/**
|
|
803
|
-
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
804
|
-
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
805
|
-
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
806
|
-
* left and right across the header.
|
|
807
|
-
* \@docs-private
|
|
808
|
-
*/
|
|
809
|
-
var MatTabHeader = /** @class */ (function (_super) {
|
|
810
|
-
__extends(MatTabHeader, _super);
|
|
811
|
-
function MatTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform) {
|
|
812
|
-
var _this = _super.call(this) || this;
|
|
813
|
-
_this._elementRef = _elementRef;
|
|
814
|
-
_this._changeDetectorRef = _changeDetectorRef;
|
|
815
|
-
_this._viewportRuler = _viewportRuler;
|
|
816
|
-
_this._dir = _dir;
|
|
817
|
-
_this._ngZone = _ngZone;
|
|
818
|
-
_this._platform = _platform;
|
|
794
|
+
var MatPaginatedTabHeader = /** @class */ (function () {
|
|
795
|
+
function MatPaginatedTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {
|
|
796
|
+
var _this = this;
|
|
797
|
+
this._elementRef = _elementRef;
|
|
798
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
799
|
+
this._viewportRuler = _viewportRuler;
|
|
800
|
+
this._dir = _dir;
|
|
801
|
+
this._ngZone = _ngZone;
|
|
802
|
+
this._platform = _platform;
|
|
803
|
+
this._animationMode = _animationMode;
|
|
819
804
|
/**
|
|
820
805
|
* The distance in pixels that the tab labels should be translated to the left.
|
|
821
806
|
*/
|
|
822
|
-
|
|
807
|
+
this._scrollDistance = 0;
|
|
823
808
|
/**
|
|
824
809
|
* Whether the header should scroll to the selected index after the view has been checked.
|
|
825
810
|
*/
|
|
826
|
-
|
|
811
|
+
this._selectedIndexChanged = false;
|
|
827
812
|
/**
|
|
828
813
|
* Emits when the component is destroyed.
|
|
829
814
|
*/
|
|
830
|
-
|
|
815
|
+
this._destroyed = new Subject();
|
|
831
816
|
/**
|
|
832
817
|
* Whether the controls for pagination should be displayed
|
|
833
818
|
*/
|
|
834
|
-
|
|
819
|
+
this._showPaginationControls = false;
|
|
835
820
|
/**
|
|
836
821
|
* Whether the tab list can be scrolled more towards the end of the tab label list.
|
|
837
822
|
*/
|
|
838
|
-
|
|
823
|
+
this._disableScrollAfter = true;
|
|
839
824
|
/**
|
|
840
825
|
* Whether the tab list can be scrolled more towards the beginning of the tab label list.
|
|
841
826
|
*/
|
|
842
|
-
|
|
827
|
+
this._disableScrollBefore = true;
|
|
843
828
|
/**
|
|
844
829
|
* Stream that will stop the automated scrolling.
|
|
845
830
|
*/
|
|
846
|
-
|
|
847
|
-
|
|
831
|
+
this._stopScrolling = new Subject();
|
|
832
|
+
this._selectedIndex = 0;
|
|
848
833
|
/**
|
|
849
834
|
* Event emitted when the option is selected.
|
|
850
835
|
*/
|
|
851
|
-
|
|
836
|
+
this.selectFocusedIndex = new EventEmitter();
|
|
852
837
|
/**
|
|
853
838
|
* Event emitted when a label is focused.
|
|
854
839
|
*/
|
|
855
|
-
|
|
840
|
+
this.indexFocused = new EventEmitter();
|
|
856
841
|
// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
|
|
857
842
|
_ngZone.runOutsideAngular((/**
|
|
858
843
|
* @return {?}
|
|
@@ -867,9 +852,8 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
867
852
|
_this._stopInterval();
|
|
868
853
|
}));
|
|
869
854
|
}));
|
|
870
|
-
return _this;
|
|
871
855
|
}
|
|
872
|
-
Object.defineProperty(
|
|
856
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "selectedIndex", {
|
|
873
857
|
/** The index of the active tab. */
|
|
874
858
|
get: /**
|
|
875
859
|
* The index of the active tab.
|
|
@@ -882,10 +866,12 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
882
866
|
*/
|
|
883
867
|
function (value) {
|
|
884
868
|
value = coerceNumberProperty(value);
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
this._keyManager
|
|
869
|
+
if (this._selectedIndex != value) {
|
|
870
|
+
this._selectedIndexChanged = true;
|
|
871
|
+
this._selectedIndex = value;
|
|
872
|
+
if (this._keyManager) {
|
|
873
|
+
this._keyManager.updateActiveItemIndex(value);
|
|
874
|
+
}
|
|
889
875
|
}
|
|
890
876
|
},
|
|
891
877
|
enumerable: true,
|
|
@@ -894,76 +880,33 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
894
880
|
/**
|
|
895
881
|
* @return {?}
|
|
896
882
|
*/
|
|
897
|
-
|
|
883
|
+
MatPaginatedTabHeader.prototype.ngAfterViewInit = /**
|
|
898
884
|
* @return {?}
|
|
899
885
|
*/
|
|
900
886
|
function () {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
this.
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
this._updateTabScrollPosition();
|
|
920
|
-
this._scrollDistanceChanged = false;
|
|
921
|
-
this._changeDetectorRef.markForCheck();
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
|
-
/** Handles keyboard events on the header. */
|
|
925
|
-
/**
|
|
926
|
-
* Handles keyboard events on the header.
|
|
927
|
-
* @param {?} event
|
|
928
|
-
* @return {?}
|
|
929
|
-
*/
|
|
930
|
-
MatTabHeader.prototype._handleKeydown = /**
|
|
931
|
-
* Handles keyboard events on the header.
|
|
932
|
-
* @param {?} event
|
|
933
|
-
* @return {?}
|
|
934
|
-
*/
|
|
935
|
-
function (event) {
|
|
936
|
-
// We don't handle any key bindings with a modifier key.
|
|
937
|
-
if (hasModifierKey(event)) {
|
|
938
|
-
return;
|
|
939
|
-
}
|
|
940
|
-
switch (event.keyCode) {
|
|
941
|
-
case HOME:
|
|
942
|
-
this._keyManager.setFirstItemActive();
|
|
943
|
-
event.preventDefault();
|
|
944
|
-
break;
|
|
945
|
-
case END:
|
|
946
|
-
this._keyManager.setLastItemActive();
|
|
947
|
-
event.preventDefault();
|
|
948
|
-
break;
|
|
949
|
-
case ENTER:
|
|
950
|
-
case SPACE:
|
|
951
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
952
|
-
event.preventDefault();
|
|
953
|
-
break;
|
|
954
|
-
default:
|
|
955
|
-
this._keyManager.onKeydown(event);
|
|
956
|
-
}
|
|
887
|
+
var _this = this;
|
|
888
|
+
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
889
|
+
fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
|
890
|
+
.pipe(takeUntil(this._destroyed))
|
|
891
|
+
.subscribe((/**
|
|
892
|
+
* @return {?}
|
|
893
|
+
*/
|
|
894
|
+
function () {
|
|
895
|
+
_this._handlePaginatorPress('before');
|
|
896
|
+
}));
|
|
897
|
+
fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
|
898
|
+
.pipe(takeUntil(this._destroyed))
|
|
899
|
+
.subscribe((/**
|
|
900
|
+
* @return {?}
|
|
901
|
+
*/
|
|
902
|
+
function () {
|
|
903
|
+
_this._handlePaginatorPress('after');
|
|
904
|
+
}));
|
|
957
905
|
};
|
|
958
906
|
/**
|
|
959
|
-
* Aligns the ink bar to the selected tab on load.
|
|
960
|
-
*/
|
|
961
|
-
/**
|
|
962
|
-
* Aligns the ink bar to the selected tab on load.
|
|
963
907
|
* @return {?}
|
|
964
908
|
*/
|
|
965
|
-
|
|
966
|
-
* Aligns the ink bar to the selected tab on load.
|
|
909
|
+
MatPaginatedTabHeader.prototype.ngAfterContentInit = /**
|
|
967
910
|
* @return {?}
|
|
968
911
|
*/
|
|
969
912
|
function () {
|
|
@@ -980,7 +923,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
980
923
|
_this.updatePagination();
|
|
981
924
|
_this._alignInkBarToSelectedTab();
|
|
982
925
|
});
|
|
983
|
-
this._keyManager = new FocusKeyManager(this.
|
|
926
|
+
this._keyManager = new FocusKeyManager(this._items)
|
|
984
927
|
.withHorizontalOrientation(this._getLayoutDirection())
|
|
985
928
|
.withWrap();
|
|
986
929
|
this._keyManager.updateActiveItem(0);
|
|
@@ -989,7 +932,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
989
932
|
typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame(realign) : realign();
|
|
990
933
|
// On dir change or window resize, realign the ink bar and update the orientation of
|
|
991
934
|
// the key manager if the direction has changed.
|
|
992
|
-
merge(dirChange, resize).pipe(takeUntil(this._destroyed)).subscribe((/**
|
|
935
|
+
merge(dirChange, resize, this._items.changes).pipe(takeUntil(this._destroyed)).subscribe((/**
|
|
993
936
|
* @return {?}
|
|
994
937
|
*/
|
|
995
938
|
function () {
|
|
@@ -1011,33 +954,37 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1011
954
|
/**
|
|
1012
955
|
* @return {?}
|
|
1013
956
|
*/
|
|
1014
|
-
|
|
957
|
+
MatPaginatedTabHeader.prototype.ngAfterContentChecked = /**
|
|
1015
958
|
* @return {?}
|
|
1016
959
|
*/
|
|
1017
960
|
function () {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
.
|
|
1022
|
-
.
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
.
|
|
1030
|
-
.
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
961
|
+
// If the number of tab labels have changed, check if scrolling should be enabled
|
|
962
|
+
if (this._tabLabelCount != this._items.length) {
|
|
963
|
+
this.updatePagination();
|
|
964
|
+
this._tabLabelCount = this._items.length;
|
|
965
|
+
this._changeDetectorRef.markForCheck();
|
|
966
|
+
}
|
|
967
|
+
// If the selected index has changed, scroll to the label and check if the scrolling controls
|
|
968
|
+
// should be disabled.
|
|
969
|
+
if (this._selectedIndexChanged) {
|
|
970
|
+
this._scrollToLabel(this._selectedIndex);
|
|
971
|
+
this._checkScrollingControls();
|
|
972
|
+
this._alignInkBarToSelectedTab();
|
|
973
|
+
this._selectedIndexChanged = false;
|
|
974
|
+
this._changeDetectorRef.markForCheck();
|
|
975
|
+
}
|
|
976
|
+
// If the scroll distance has been changed (tab selected, focused, scroll controls activated),
|
|
977
|
+
// then translate the header to reflect this.
|
|
978
|
+
if (this._scrollDistanceChanged) {
|
|
979
|
+
this._updateTabScrollPosition();
|
|
980
|
+
this._scrollDistanceChanged = false;
|
|
981
|
+
this._changeDetectorRef.markForCheck();
|
|
982
|
+
}
|
|
1036
983
|
};
|
|
1037
984
|
/**
|
|
1038
985
|
* @return {?}
|
|
1039
986
|
*/
|
|
1040
|
-
|
|
987
|
+
MatPaginatedTabHeader.prototype.ngOnDestroy = /**
|
|
1041
988
|
* @return {?}
|
|
1042
989
|
*/
|
|
1043
990
|
function () {
|
|
@@ -1045,6 +992,40 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1045
992
|
this._destroyed.complete();
|
|
1046
993
|
this._stopScrolling.complete();
|
|
1047
994
|
};
|
|
995
|
+
/** Handles keyboard events on the header. */
|
|
996
|
+
/**
|
|
997
|
+
* Handles keyboard events on the header.
|
|
998
|
+
* @param {?} event
|
|
999
|
+
* @return {?}
|
|
1000
|
+
*/
|
|
1001
|
+
MatPaginatedTabHeader.prototype._handleKeydown = /**
|
|
1002
|
+
* Handles keyboard events on the header.
|
|
1003
|
+
* @param {?} event
|
|
1004
|
+
* @return {?}
|
|
1005
|
+
*/
|
|
1006
|
+
function (event) {
|
|
1007
|
+
// We don't handle any key bindings with a modifier key.
|
|
1008
|
+
if (hasModifierKey(event)) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
switch (event.keyCode) {
|
|
1012
|
+
case HOME:
|
|
1013
|
+
this._keyManager.setFirstItemActive();
|
|
1014
|
+
event.preventDefault();
|
|
1015
|
+
break;
|
|
1016
|
+
case END:
|
|
1017
|
+
this._keyManager.setLastItemActive();
|
|
1018
|
+
event.preventDefault();
|
|
1019
|
+
break;
|
|
1020
|
+
case ENTER:
|
|
1021
|
+
case SPACE:
|
|
1022
|
+
this.selectFocusedIndex.emit(this.focusIndex);
|
|
1023
|
+
this._itemSelected(event);
|
|
1024
|
+
break;
|
|
1025
|
+
default:
|
|
1026
|
+
this._keyManager.onKeydown(event);
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1048
1029
|
/**
|
|
1049
1030
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1050
1031
|
*/
|
|
@@ -1052,7 +1033,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1052
1033
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1053
1034
|
* @return {?}
|
|
1054
1035
|
*/
|
|
1055
|
-
|
|
1036
|
+
MatPaginatedTabHeader.prototype._onContentChanges = /**
|
|
1056
1037
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1057
1038
|
* @return {?}
|
|
1058
1039
|
*/
|
|
@@ -1064,7 +1045,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1064
1045
|
// will fire even if the text content didn't change which is inefficient and is prone
|
|
1065
1046
|
// to infinite loops if a poorly constructed expression is passed in (see #14249).
|
|
1066
1047
|
if (textContent !== this._currentTextContent) {
|
|
1067
|
-
this._currentTextContent = textContent;
|
|
1048
|
+
this._currentTextContent = textContent || '';
|
|
1068
1049
|
// The content observer runs outside the `NgZone` by default, which
|
|
1069
1050
|
// means that we need to bring the callback back in ourselves.
|
|
1070
1051
|
this._ngZone.run((/**
|
|
@@ -1080,22 +1061,22 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1080
1061
|
/**
|
|
1081
1062
|
* Updates the view whether pagination should be enabled or not.
|
|
1082
1063
|
*
|
|
1083
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1064
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1084
1065
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1085
1066
|
* page.
|
|
1086
1067
|
*/
|
|
1087
1068
|
/**
|
|
1088
1069
|
* Updates the view whether pagination should be enabled or not.
|
|
1089
1070
|
*
|
|
1090
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1071
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1091
1072
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1092
1073
|
* page.
|
|
1093
1074
|
* @return {?}
|
|
1094
1075
|
*/
|
|
1095
|
-
|
|
1076
|
+
MatPaginatedTabHeader.prototype.updatePagination = /**
|
|
1096
1077
|
* Updates the view whether pagination should be enabled or not.
|
|
1097
1078
|
*
|
|
1098
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1079
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1099
1080
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1100
1081
|
* page.
|
|
1101
1082
|
* @return {?}
|
|
@@ -1105,7 +1086,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1105
1086
|
this._checkScrollingControls();
|
|
1106
1087
|
this._updateTabScrollPosition();
|
|
1107
1088
|
};
|
|
1108
|
-
Object.defineProperty(
|
|
1089
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "focusIndex", {
|
|
1109
1090
|
/** Tracks which element has focus; used for keyboard navigation */
|
|
1110
1091
|
get: /**
|
|
1111
1092
|
* Tracks which element has focus; used for keyboard navigation
|
|
@@ -1139,18 +1120,18 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1139
1120
|
* @param {?} index
|
|
1140
1121
|
* @return {?}
|
|
1141
1122
|
*/
|
|
1142
|
-
|
|
1123
|
+
MatPaginatedTabHeader.prototype._isValidIndex = /**
|
|
1143
1124
|
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
1144
1125
|
* providing a valid index and return true.
|
|
1145
1126
|
* @param {?} index
|
|
1146
1127
|
* @return {?}
|
|
1147
1128
|
*/
|
|
1148
1129
|
function (index) {
|
|
1149
|
-
if (!this.
|
|
1130
|
+
if (!this._items) {
|
|
1150
1131
|
return true;
|
|
1151
1132
|
}
|
|
1152
1133
|
/** @type {?} */
|
|
1153
|
-
var tab = this.
|
|
1134
|
+
var tab = this._items ? this._items.toArray()[index] : null;
|
|
1154
1135
|
return !!tab && !tab.disabled;
|
|
1155
1136
|
};
|
|
1156
1137
|
/**
|
|
@@ -1163,7 +1144,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1163
1144
|
* @param {?} tabIndex
|
|
1164
1145
|
* @return {?}
|
|
1165
1146
|
*/
|
|
1166
|
-
|
|
1147
|
+
MatPaginatedTabHeader.prototype._setTabFocus = /**
|
|
1167
1148
|
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
1168
1149
|
* scrolling is enabled.
|
|
1169
1150
|
* @param {?} tabIndex
|
|
@@ -1173,8 +1154,8 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1173
1154
|
if (this._showPaginationControls) {
|
|
1174
1155
|
this._scrollToLabel(tabIndex);
|
|
1175
1156
|
}
|
|
1176
|
-
if (this.
|
|
1177
|
-
this.
|
|
1157
|
+
if (this._items && this._items.length) {
|
|
1158
|
+
this._items.toArray()[tabIndex].focus();
|
|
1178
1159
|
// Do not let the browser manage scrolling to focus the element, this will be handled
|
|
1179
1160
|
// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
|
|
1180
1161
|
// should be the full width minus the offset width.
|
|
@@ -1195,7 +1176,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1195
1176
|
* The layout direction of the containing app.
|
|
1196
1177
|
* @return {?}
|
|
1197
1178
|
*/
|
|
1198
|
-
|
|
1179
|
+
MatPaginatedTabHeader.prototype._getLayoutDirection = /**
|
|
1199
1180
|
* The layout direction of the containing app.
|
|
1200
1181
|
* @return {?}
|
|
1201
1182
|
*/
|
|
@@ -1207,7 +1188,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1207
1188
|
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
1208
1189
|
* @return {?}
|
|
1209
1190
|
*/
|
|
1210
|
-
|
|
1191
|
+
MatPaginatedTabHeader.prototype._updateTabScrollPosition = /**
|
|
1211
1192
|
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
1212
1193
|
* @return {?}
|
|
1213
1194
|
*/
|
|
@@ -1229,11 +1210,12 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1229
1210
|
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
|
1230
1211
|
// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
|
|
1231
1212
|
// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
|
|
1232
|
-
|
|
1213
|
+
// @breaking-change 9.0.0 Remove null check for `platform` after it can no longer be undefined.
|
|
1214
|
+
if (platform && (platform.TRIDENT || platform.EDGE)) {
|
|
1233
1215
|
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
1234
1216
|
}
|
|
1235
1217
|
};
|
|
1236
|
-
Object.defineProperty(
|
|
1218
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "scrollDistance", {
|
|
1237
1219
|
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
|
|
1238
1220
|
get: /**
|
|
1239
1221
|
* Sets the distance in pixels that the tab header should be transformed in the X-axis.
|
|
@@ -1268,7 +1250,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1268
1250
|
* @param {?} direction
|
|
1269
1251
|
* @return {?}
|
|
1270
1252
|
*/
|
|
1271
|
-
|
|
1253
|
+
MatPaginatedTabHeader.prototype._scrollHeader = /**
|
|
1272
1254
|
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
1273
1255
|
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
1274
1256
|
* length of the tab list view window.
|
|
@@ -1292,7 +1274,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1292
1274
|
* @param {?} direction
|
|
1293
1275
|
* @return {?}
|
|
1294
1276
|
*/
|
|
1295
|
-
|
|
1277
|
+
MatPaginatedTabHeader.prototype._handlePaginatorClick = /**
|
|
1296
1278
|
* Handles click events on the pagination arrows.
|
|
1297
1279
|
* @param {?} direction
|
|
1298
1280
|
* @return {?}
|
|
@@ -1315,7 +1297,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1315
1297
|
* @param {?} labelIndex
|
|
1316
1298
|
* @return {?}
|
|
1317
1299
|
*/
|
|
1318
|
-
|
|
1300
|
+
MatPaginatedTabHeader.prototype._scrollToLabel = /**
|
|
1319
1301
|
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
1320
1302
|
*
|
|
1321
1303
|
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
@@ -1325,24 +1307,25 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1325
1307
|
*/
|
|
1326
1308
|
function (labelIndex) {
|
|
1327
1309
|
/** @type {?} */
|
|
1328
|
-
var selectedLabel = this.
|
|
1310
|
+
var selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
|
|
1329
1311
|
if (!selectedLabel) {
|
|
1330
1312
|
return;
|
|
1331
1313
|
}
|
|
1332
1314
|
// The view length is the visible width of the tab labels.
|
|
1333
1315
|
/** @type {?} */
|
|
1334
1316
|
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
1317
|
+
var _a = selectedLabel.elementRef.nativeElement, offsetLeft = _a.offsetLeft, offsetWidth = _a.offsetWidth;
|
|
1335
1318
|
/** @type {?} */
|
|
1336
1319
|
var labelBeforePos;
|
|
1337
1320
|
/** @type {?} */
|
|
1338
1321
|
var labelAfterPos;
|
|
1339
1322
|
if (this._getLayoutDirection() == 'ltr') {
|
|
1340
|
-
labelBeforePos =
|
|
1341
|
-
labelAfterPos = labelBeforePos +
|
|
1323
|
+
labelBeforePos = offsetLeft;
|
|
1324
|
+
labelAfterPos = labelBeforePos + offsetWidth;
|
|
1342
1325
|
}
|
|
1343
1326
|
else {
|
|
1344
|
-
labelAfterPos = this._tabList.nativeElement.offsetWidth -
|
|
1345
|
-
labelBeforePos = labelAfterPos -
|
|
1327
|
+
labelAfterPos = this._tabList.nativeElement.offsetWidth - offsetLeft;
|
|
1328
|
+
labelBeforePos = labelAfterPos - offsetWidth;
|
|
1346
1329
|
}
|
|
1347
1330
|
/** @type {?} */
|
|
1348
1331
|
var beforeVisiblePos = this.scrollDistance;
|
|
@@ -1374,7 +1357,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1374
1357
|
* should be called sparingly.
|
|
1375
1358
|
* @return {?}
|
|
1376
1359
|
*/
|
|
1377
|
-
|
|
1360
|
+
MatPaginatedTabHeader.prototype._checkPaginationEnabled = /**
|
|
1378
1361
|
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
1379
1362
|
* tab list is wider than the size of the header container, then the pagination controls should
|
|
1380
1363
|
* be shown.
|
|
@@ -1413,7 +1396,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1413
1396
|
* should be called sparingly.
|
|
1414
1397
|
* @return {?}
|
|
1415
1398
|
*/
|
|
1416
|
-
|
|
1399
|
+
MatPaginatedTabHeader.prototype._checkScrollingControls = /**
|
|
1417
1400
|
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
1418
1401
|
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
1419
1402
|
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
@@ -1444,7 +1427,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1444
1427
|
* should be called sparingly.
|
|
1445
1428
|
* @return {?}
|
|
1446
1429
|
*/
|
|
1447
|
-
|
|
1430
|
+
MatPaginatedTabHeader.prototype._getMaxScrollDistance = /**
|
|
1448
1431
|
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
1449
1432
|
* is equal to the difference in width between the tab list container and tab header container.
|
|
1450
1433
|
*
|
|
@@ -1464,23 +1447,29 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1464
1447
|
* Tells the ink-bar to align itself to the current label wrapper
|
|
1465
1448
|
* @return {?}
|
|
1466
1449
|
*/
|
|
1467
|
-
|
|
1450
|
+
MatPaginatedTabHeader.prototype._alignInkBarToSelectedTab = /**
|
|
1468
1451
|
* Tells the ink-bar to align itself to the current label wrapper
|
|
1469
1452
|
* @return {?}
|
|
1470
1453
|
*/
|
|
1471
1454
|
function () {
|
|
1472
1455
|
/** @type {?} */
|
|
1473
|
-
var
|
|
1474
|
-
this.
|
|
1475
|
-
|
|
1476
|
-
|
|
1456
|
+
var selectedItem = this._items && this._items.length ?
|
|
1457
|
+
this._items.toArray()[this.selectedIndex] : null;
|
|
1458
|
+
/** @type {?} */
|
|
1459
|
+
var selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
1460
|
+
if (selectedLabelWrapper) {
|
|
1461
|
+
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
1462
|
+
}
|
|
1463
|
+
else {
|
|
1464
|
+
this._inkBar.hide();
|
|
1465
|
+
}
|
|
1477
1466
|
};
|
|
1478
1467
|
/** Stops the currently-running paginator interval. */
|
|
1479
1468
|
/**
|
|
1480
1469
|
* Stops the currently-running paginator interval.
|
|
1481
1470
|
* @return {?}
|
|
1482
1471
|
*/
|
|
1483
|
-
|
|
1472
|
+
MatPaginatedTabHeader.prototype._stopInterval = /**
|
|
1484
1473
|
* Stops the currently-running paginator interval.
|
|
1485
1474
|
* @return {?}
|
|
1486
1475
|
*/
|
|
@@ -1498,7 +1487,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1498
1487
|
* @param {?} direction In which direction the paginator should be scrolled.
|
|
1499
1488
|
* @return {?}
|
|
1500
1489
|
*/
|
|
1501
|
-
|
|
1490
|
+
MatPaginatedTabHeader.prototype._handlePaginatorPress = /**
|
|
1502
1491
|
* Handles the user pressing down on one of the paginators.
|
|
1503
1492
|
* Starts scrolling the header after a certain amount of time.
|
|
1504
1493
|
* @param {?} direction In which direction the paginator should be scrolled.
|
|
@@ -1534,7 +1523,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1534
1523
|
* @param {?} position Position to which to scroll.
|
|
1535
1524
|
* @return {?} Information on the current scroll distance and the maximum.
|
|
1536
1525
|
*/
|
|
1537
|
-
|
|
1526
|
+
MatPaginatedTabHeader.prototype._scrollTo = /**
|
|
1538
1527
|
* Scrolls the header to a given position.
|
|
1539
1528
|
* @private
|
|
1540
1529
|
* @param {?} position Position to which to scroll.
|
|
@@ -1550,11 +1539,73 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1550
1539
|
this._checkScrollingControls();
|
|
1551
1540
|
return { maxScrollDistance: maxScrollDistance, distance: this._scrollDistance };
|
|
1552
1541
|
};
|
|
1542
|
+
/** @nocollapse */
|
|
1543
|
+
MatPaginatedTabHeader.ctorParameters = function () { return [
|
|
1544
|
+
{ type: ElementRef },
|
|
1545
|
+
{ type: ChangeDetectorRef },
|
|
1546
|
+
{ type: ViewportRuler },
|
|
1547
|
+
{ type: Directionality, decorators: [{ type: Optional }] },
|
|
1548
|
+
{ type: NgZone },
|
|
1549
|
+
{ type: Platform },
|
|
1550
|
+
{ type: String }
|
|
1551
|
+
]; };
|
|
1552
|
+
return MatPaginatedTabHeader;
|
|
1553
|
+
}());
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* @fileoverview added by tsickle
|
|
1557
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1558
|
+
*/
|
|
1559
|
+
/**
|
|
1560
|
+
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
1561
|
+
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
1562
|
+
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
1563
|
+
* left and right across the header.
|
|
1564
|
+
* \@docs-private
|
|
1565
|
+
*/
|
|
1566
|
+
var MatTabHeader = /** @class */ (function (_super) {
|
|
1567
|
+
__extends(MatTabHeader, _super);
|
|
1568
|
+
function MatTabHeader(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform,
|
|
1569
|
+
// @breaking-change 9.0.0 `_animationMode` parameter to be made required.
|
|
1570
|
+
animationMode) {
|
|
1571
|
+
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) || this;
|
|
1572
|
+
_this._disableRipple = false;
|
|
1573
|
+
return _this;
|
|
1574
|
+
}
|
|
1575
|
+
Object.defineProperty(MatTabHeader.prototype, "disableRipple", {
|
|
1576
|
+
/** Whether the ripple effect is disabled or not. */
|
|
1577
|
+
get: /**
|
|
1578
|
+
* Whether the ripple effect is disabled or not.
|
|
1579
|
+
* @return {?}
|
|
1580
|
+
*/
|
|
1581
|
+
function () { return this._disableRipple; },
|
|
1582
|
+
set: /**
|
|
1583
|
+
* @param {?} value
|
|
1584
|
+
* @return {?}
|
|
1585
|
+
*/
|
|
1586
|
+
function (value) { this._disableRipple = coerceBooleanProperty(value); },
|
|
1587
|
+
enumerable: true,
|
|
1588
|
+
configurable: true
|
|
1589
|
+
});
|
|
1590
|
+
/**
|
|
1591
|
+
* @protected
|
|
1592
|
+
* @param {?} event
|
|
1593
|
+
* @return {?}
|
|
1594
|
+
*/
|
|
1595
|
+
MatTabHeader.prototype._itemSelected = /**
|
|
1596
|
+
* @protected
|
|
1597
|
+
* @param {?} event
|
|
1598
|
+
* @return {?}
|
|
1599
|
+
*/
|
|
1600
|
+
function (event) {
|
|
1601
|
+
event.preventDefault();
|
|
1602
|
+
};
|
|
1553
1603
|
MatTabHeader.decorators = [
|
|
1554
1604
|
{ type: Component, args: [{selector: 'mat-tab-header',
|
|
1555
|
-
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 class=\"mat-tab-list\"
|
|
1556
|
-
styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-
|
|
1557
|
-
inputs: ['
|
|
1605
|
+
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>",
|
|
1606
|
+
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}}"],
|
|
1607
|
+
inputs: ['selectedIndex'],
|
|
1608
|
+
outputs: ['selectFocusedIndex', 'indexFocused'],
|
|
1558
1609
|
encapsulation: ViewEncapsulation.None,
|
|
1559
1610
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1560
1611
|
host: {
|
|
@@ -1571,21 +1622,20 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1571
1622
|
{ type: ViewportRuler },
|
|
1572
1623
|
{ type: Directionality, decorators: [{ type: Optional }] },
|
|
1573
1624
|
{ type: NgZone },
|
|
1574
|
-
{ type: Platform }
|
|
1625
|
+
{ type: Platform },
|
|
1626
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
1575
1627
|
]; };
|
|
1576
1628
|
MatTabHeader.propDecorators = {
|
|
1577
|
-
|
|
1629
|
+
_items: [{ type: ContentChildren, args: [MatTabLabelWrapper,] }],
|
|
1578
1630
|
_inkBar: [{ type: ViewChild, args: [MatInkBar, { static: true },] }],
|
|
1579
1631
|
_tabListContainer: [{ type: ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
1580
1632
|
_tabList: [{ type: ViewChild, args: ['tabList', { static: true },] }],
|
|
1581
1633
|
_nextPaginator: [{ type: ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
1582
1634
|
_previousPaginator: [{ type: ViewChild, args: ['previousPaginator', { static: false },] }],
|
|
1583
|
-
|
|
1584
|
-
selectFocusedIndex: [{ type: Output }],
|
|
1585
|
-
indexFocused: [{ type: Output }]
|
|
1635
|
+
disableRipple: [{ type: Input }]
|
|
1586
1636
|
};
|
|
1587
1637
|
return MatTabHeader;
|
|
1588
|
-
}(
|
|
1638
|
+
}(MatPaginatedTabHeader));
|
|
1589
1639
|
|
|
1590
1640
|
/**
|
|
1591
1641
|
* @fileoverview added by tsickle
|
|
@@ -1636,9 +1686,10 @@ var _MatTabGroupMixinBase = mixinColor(mixinDisableRipple(MatTabGroupBase), 'pri
|
|
|
1636
1686
|
*/
|
|
1637
1687
|
var MatTabGroup = /** @class */ (function (_super) {
|
|
1638
1688
|
__extends(MatTabGroup, _super);
|
|
1639
|
-
function MatTabGroup(elementRef, _changeDetectorRef, defaultConfig) {
|
|
1689
|
+
function MatTabGroup(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {
|
|
1640
1690
|
var _this = _super.call(this, elementRef) || this;
|
|
1641
1691
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
1692
|
+
_this._animationMode = _animationMode;
|
|
1642
1693
|
/**
|
|
1643
1694
|
* The tab index that should be selected after the content has been checked.
|
|
1644
1695
|
*/
|
|
@@ -2084,8 +2135,8 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2084
2135
|
MatTabGroup.decorators = [
|
|
2085
2136
|
{ type: Component, args: [{selector: 'mat-tab-group',
|
|
2086
2137
|
exportAs: 'matTabGroup',
|
|
2087
|
-
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\" #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>",
|
|
2088
|
-
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-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}"],
|
|
2138
|
+
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>",
|
|
2139
|
+
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}"],
|
|
2089
2140
|
encapsulation: ViewEncapsulation.None,
|
|
2090
2141
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2091
2142
|
inputs: ['color', 'disableRipple'],
|
|
@@ -2100,7 +2151,8 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2100
2151
|
MatTabGroup.ctorParameters = function () { return [
|
|
2101
2152
|
{ type: ElementRef },
|
|
2102
2153
|
{ type: ChangeDetectorRef },
|
|
2103
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TABS_CONFIG,] }, { type: Optional }] }
|
|
2154
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TABS_CONFIG,] }, { type: Optional }] },
|
|
2155
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
2104
2156
|
]; };
|
|
2105
2157
|
MatTabGroup.propDecorators = {
|
|
2106
2158
|
_tabs: [{ type: ContentChildren, args: [MatTab,] }],
|
|
@@ -2123,39 +2175,23 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2123
2175
|
* @fileoverview added by tsickle
|
|
2124
2176
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2125
2177
|
*/
|
|
2126
|
-
// Boilerplate for applying mixins to MatTabNav.
|
|
2127
|
-
/**
|
|
2128
|
-
* \@docs-private
|
|
2129
|
-
*/
|
|
2130
|
-
var
|
|
2131
|
-
// Boilerplate for applying mixins to MatTabNav.
|
|
2132
|
-
/**
|
|
2133
|
-
* \@docs-private
|
|
2134
|
-
*/
|
|
2135
|
-
MatTabNavBase = /** @class */ (function () {
|
|
2136
|
-
function MatTabNavBase(_elementRef) {
|
|
2137
|
-
this._elementRef = _elementRef;
|
|
2138
|
-
}
|
|
2139
|
-
return MatTabNavBase;
|
|
2140
|
-
}());
|
|
2141
|
-
/** @type {?} */
|
|
2142
|
-
var _MatTabNavMixinBase = mixinDisableRipple(mixinColor(MatTabNavBase, 'primary'));
|
|
2143
2178
|
/**
|
|
2144
2179
|
* Navigation component matching the styles of the tab group header.
|
|
2145
2180
|
* Provides anchored navigation with animated ink bar.
|
|
2146
2181
|
*/
|
|
2147
2182
|
var MatTabNav = /** @class */ (function (_super) {
|
|
2148
2183
|
__extends(MatTabNav, _super);
|
|
2149
|
-
function MatTabNav(elementRef,
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
_this
|
|
2184
|
+
function MatTabNav(elementRef, dir, ngZone, changeDetectorRef, viewportRuler,
|
|
2185
|
+
/**
|
|
2186
|
+
* @deprecated @breaking-change 9.0.0 `platform` parameter to become required.
|
|
2187
|
+
*/
|
|
2188
|
+
platform, animationMode) {
|
|
2189
|
+
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) || this;
|
|
2190
|
+
_this._disableRipple = false;
|
|
2155
2191
|
/**
|
|
2156
|
-
*
|
|
2192
|
+
* Theme color of the nav bar.
|
|
2157
2193
|
*/
|
|
2158
|
-
_this.
|
|
2194
|
+
_this.color = 'primary';
|
|
2159
2195
|
return _this;
|
|
2160
2196
|
}
|
|
2161
2197
|
Object.defineProperty(MatTabNav.prototype, "backgroundColor", {
|
|
@@ -2171,117 +2207,99 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
2171
2207
|
*/
|
|
2172
2208
|
function (value) {
|
|
2173
2209
|
/** @type {?} */
|
|
2174
|
-
var
|
|
2175
|
-
|
|
2210
|
+
var classList = this._elementRef.nativeElement.classList;
|
|
2211
|
+
classList.remove("mat-background-" + this.backgroundColor);
|
|
2176
2212
|
if (value) {
|
|
2177
|
-
|
|
2213
|
+
classList.add("mat-background-" + value);
|
|
2178
2214
|
}
|
|
2179
2215
|
this._backgroundColor = value;
|
|
2180
2216
|
},
|
|
2181
2217
|
enumerable: true,
|
|
2182
2218
|
configurable: true
|
|
2183
2219
|
});
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
/**
|
|
2189
|
-
* Notifies the component that the active link has been changed.
|
|
2190
|
-
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2191
|
-
* @param {?} element
|
|
2192
|
-
* @return {?}
|
|
2193
|
-
*/
|
|
2194
|
-
MatTabNav.prototype.updateActiveLink = /**
|
|
2195
|
-
* Notifies the component that the active link has been changed.
|
|
2196
|
-
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2197
|
-
* @param {?} element
|
|
2198
|
-
* @return {?}
|
|
2199
|
-
*/
|
|
2200
|
-
function (element) {
|
|
2201
|
-
// Note: keeping the `element` for backwards-compat, but isn't being used for anything.
|
|
2202
|
-
// @breaking-change 8.0.0
|
|
2203
|
-
this._activeLinkChanged = !!element;
|
|
2204
|
-
this._changeDetectorRef.markForCheck();
|
|
2205
|
-
};
|
|
2206
|
-
/**
|
|
2207
|
-
* @return {?}
|
|
2208
|
-
*/
|
|
2209
|
-
MatTabNav.prototype.ngAfterContentInit = /**
|
|
2210
|
-
* @return {?}
|
|
2211
|
-
*/
|
|
2212
|
-
function () {
|
|
2213
|
-
var _this = this;
|
|
2214
|
-
this._ngZone.runOutsideAngular((/**
|
|
2220
|
+
Object.defineProperty(MatTabNav.prototype, "disableRipple", {
|
|
2221
|
+
/** Whether the ripple effect is disabled or not. */
|
|
2222
|
+
get: /**
|
|
2223
|
+
* Whether the ripple effect is disabled or not.
|
|
2215
2224
|
* @return {?}
|
|
2216
2225
|
*/
|
|
2217
|
-
function () {
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
}));
|
|
2227
|
-
};
|
|
2228
|
-
/** Checks if the active link has been changed and, if so, will update the ink bar. */
|
|
2226
|
+
function () { return this._disableRipple; },
|
|
2227
|
+
set: /**
|
|
2228
|
+
* @param {?} value
|
|
2229
|
+
* @return {?}
|
|
2230
|
+
*/
|
|
2231
|
+
function (value) { this._disableRipple = coerceBooleanProperty(value); },
|
|
2232
|
+
enumerable: true,
|
|
2233
|
+
configurable: true
|
|
2234
|
+
});
|
|
2229
2235
|
/**
|
|
2230
|
-
*
|
|
2236
|
+
* @protected
|
|
2231
2237
|
* @return {?}
|
|
2232
2238
|
*/
|
|
2233
|
-
MatTabNav.prototype.
|
|
2234
|
-
*
|
|
2239
|
+
MatTabNav.prototype._itemSelected = /**
|
|
2240
|
+
* @protected
|
|
2235
2241
|
* @return {?}
|
|
2236
2242
|
*/
|
|
2237
2243
|
function () {
|
|
2238
|
-
|
|
2239
|
-
/** @type {?} */
|
|
2240
|
-
var activeTab = this._tabLinks.find((/**
|
|
2241
|
-
* @param {?} tab
|
|
2242
|
-
* @return {?}
|
|
2243
|
-
*/
|
|
2244
|
-
function (tab) { return tab.active; }));
|
|
2245
|
-
this._activeLinkElement = activeTab ? activeTab._elementRef : null;
|
|
2246
|
-
this._alignInkBar();
|
|
2247
|
-
this._activeLinkChanged = false;
|
|
2248
|
-
}
|
|
2244
|
+
// noop
|
|
2249
2245
|
};
|
|
2250
2246
|
/**
|
|
2251
2247
|
* @return {?}
|
|
2252
2248
|
*/
|
|
2253
|
-
MatTabNav.prototype.
|
|
2249
|
+
MatTabNav.prototype.ngAfterContentInit = /**
|
|
2254
2250
|
* @return {?}
|
|
2255
2251
|
*/
|
|
2256
2252
|
function () {
|
|
2257
|
-
this.
|
|
2258
|
-
|
|
2253
|
+
this.updateActiveLink();
|
|
2254
|
+
_super.prototype.ngAfterContentInit.call(this);
|
|
2259
2255
|
};
|
|
2260
|
-
/** Aligns the ink bar to the active link. */
|
|
2261
2256
|
/**
|
|
2262
|
-
*
|
|
2257
|
+
* Notifies the component that the active link has been changed.
|
|
2258
|
+
* @breaking-change 8.0.0 `element` parameter to be removed.
|
|
2259
|
+
*/
|
|
2260
|
+
/**
|
|
2261
|
+
* Notifies the component that the active link has been changed.
|
|
2262
|
+
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2263
|
+
* @param {?=} _element
|
|
2263
2264
|
* @return {?}
|
|
2264
2265
|
*/
|
|
2265
|
-
MatTabNav.prototype.
|
|
2266
|
-
*
|
|
2266
|
+
MatTabNav.prototype.updateActiveLink = /**
|
|
2267
|
+
* Notifies the component that the active link has been changed.
|
|
2268
|
+
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2269
|
+
* @param {?=} _element
|
|
2267
2270
|
* @return {?}
|
|
2268
2271
|
*/
|
|
2269
|
-
function () {
|
|
2270
|
-
if (this.
|
|
2271
|
-
|
|
2272
|
-
this._inkBar.alignToElement(this._activeLinkElement.nativeElement);
|
|
2272
|
+
function (_element) {
|
|
2273
|
+
if (!this._items) {
|
|
2274
|
+
return;
|
|
2273
2275
|
}
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
+
/** @type {?} */
|
|
2277
|
+
var items = this._items.toArray();
|
|
2278
|
+
for (var i = 0; i < items.length; i++) {
|
|
2279
|
+
if (items[i].active) {
|
|
2280
|
+
this.selectedIndex = i;
|
|
2281
|
+
this._changeDetectorRef.markForCheck();
|
|
2282
|
+
return;
|
|
2283
|
+
}
|
|
2276
2284
|
}
|
|
2285
|
+
// The ink bar should hide itself if no items are active.
|
|
2286
|
+
this.selectedIndex = -1;
|
|
2287
|
+
this._inkBar.hide();
|
|
2277
2288
|
};
|
|
2278
2289
|
MatTabNav.decorators = [
|
|
2279
2290
|
{ type: Component, args: [{selector: '[mat-tab-nav-bar]',
|
|
2280
2291
|
exportAs: 'matTabNavBar, matTabNav',
|
|
2281
|
-
inputs: ['color'
|
|
2282
|
-
template: "<div class=\"mat-tab-
|
|
2283
|
-
styles: [".mat-tab-
|
|
2284
|
-
host: {
|
|
2292
|
+
inputs: ['color'],
|
|
2293
|
+
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-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\"><div class=\"mat-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\"><div class=\"mat-tab-links\"><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>",
|
|
2294
|
+
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-tab-links{display:flex}[mat-align-tabs=center] .mat-tab-links{justify-content:center}[mat-align-tabs=end] .mat-tab-links{justify-content:flex-end}.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-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{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;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:0}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-link:focus{outline:dotted 2px}}.mat-tab-link.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-link.mat-tab-disabled{opacity:.5}}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-link{opacity:1}}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media (max-width:599px){.mat-tab-link{min-width:72px}}"],
|
|
2295
|
+
host: {
|
|
2296
|
+
'class': 'mat-tab-nav-bar mat-tab-header',
|
|
2297
|
+
'[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
2298
|
+
'[class.mat-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
|
2299
|
+
'[class.mat-primary]': 'color !== "warn" && color !== "accent"',
|
|
2300
|
+
'[class.mat-accent]': 'color === "accent"',
|
|
2301
|
+
'[class.mat-warn]': 'color === "warn"',
|
|
2302
|
+
},
|
|
2285
2303
|
encapsulation: ViewEncapsulation.None,
|
|
2286
2304
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2287
2305
|
},] },
|
|
@@ -2292,18 +2310,26 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
2292
2310
|
{ type: Directionality, decorators: [{ type: Optional }] },
|
|
2293
2311
|
{ type: NgZone },
|
|
2294
2312
|
{ type: ChangeDetectorRef },
|
|
2295
|
-
{ type: ViewportRuler }
|
|
2313
|
+
{ type: ViewportRuler },
|
|
2314
|
+
{ type: Platform, decorators: [{ type: Optional }] },
|
|
2315
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
2296
2316
|
]; };
|
|
2297
2317
|
MatTabNav.propDecorators = {
|
|
2298
|
-
|
|
2299
|
-
_tabLinks: [{ type: ContentChildren, args: [forwardRef((/**
|
|
2318
|
+
_items: [{ type: ContentChildren, args: [forwardRef((/**
|
|
2300
2319
|
* @return {?}
|
|
2301
2320
|
*/
|
|
2302
2321
|
function () { return MatTabLink; })), { descendants: true },] }],
|
|
2303
|
-
|
|
2322
|
+
_inkBar: [{ type: ViewChild, args: [MatInkBar, { static: true },] }],
|
|
2323
|
+
_tabListContainer: [{ type: ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
2324
|
+
_tabList: [{ type: ViewChild, args: ['tabList', { static: true },] }],
|
|
2325
|
+
_nextPaginator: [{ type: ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
2326
|
+
_previousPaginator: [{ type: ViewChild, args: ['previousPaginator', { static: false },] }],
|
|
2327
|
+
backgroundColor: [{ type: Input }],
|
|
2328
|
+
disableRipple: [{ type: Input }],
|
|
2329
|
+
color: [{ type: Input }]
|
|
2304
2330
|
};
|
|
2305
2331
|
return MatTabNav;
|
|
2306
|
-
}(
|
|
2332
|
+
}(MatPaginatedTabHeader));
|
|
2307
2333
|
// Boilerplate for applying mixins to MatTabLink.
|
|
2308
2334
|
var
|
|
2309
2335
|
// Boilerplate for applying mixins to MatTabLink.
|
|
@@ -2319,20 +2345,23 @@ var _MatTabLinkMixinBase = mixinTabIndex(mixinDisableRipple(mixinDisabled(MatTab
|
|
|
2319
2345
|
*/
|
|
2320
2346
|
var MatTabLink = /** @class */ (function (_super) {
|
|
2321
2347
|
__extends(MatTabLink, _super);
|
|
2322
|
-
function MatTabLink(_tabNavBar,
|
|
2348
|
+
function MatTabLink(_tabNavBar, elementRef, ngZone, platform, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {
|
|
2323
2349
|
var _this = _super.call(this) || this;
|
|
2324
2350
|
_this._tabNavBar = _tabNavBar;
|
|
2325
|
-
_this.
|
|
2351
|
+
_this.elementRef = elementRef;
|
|
2326
2352
|
_this._focusMonitor = _focusMonitor;
|
|
2327
2353
|
/**
|
|
2328
2354
|
* Whether the tab link is active or not.
|
|
2329
2355
|
*/
|
|
2330
2356
|
_this._isActive = false;
|
|
2331
|
-
_this._tabLinkRipple = new RippleRenderer(_this, ngZone,
|
|
2332
|
-
_this._tabLinkRipple.setupTriggerEvents(
|
|
2357
|
+
_this._tabLinkRipple = new RippleRenderer(_this, ngZone, elementRef, platform);
|
|
2358
|
+
_this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);
|
|
2333
2359
|
_this.rippleConfig = globalRippleOptions || {};
|
|
2334
2360
|
_this.tabIndex = parseInt(tabIndex) || 0;
|
|
2335
|
-
|
|
2361
|
+
if (animationMode === 'NoopAnimations') {
|
|
2362
|
+
_this.rippleConfig.animation = { enterDuration: 0, exitDuration: 0 };
|
|
2363
|
+
}
|
|
2364
|
+
_focusMonitor.monitor(elementRef);
|
|
2336
2365
|
return _this;
|
|
2337
2366
|
}
|
|
2338
2367
|
Object.defineProperty(MatTabLink.prototype, "active", {
|
|
@@ -2349,7 +2378,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2349
2378
|
function (value) {
|
|
2350
2379
|
if (value !== this._isActive) {
|
|
2351
2380
|
this._isActive = value;
|
|
2352
|
-
this._tabNavBar.updateActiveLink(this.
|
|
2381
|
+
this._tabNavBar.updateActiveLink(this.elementRef);
|
|
2353
2382
|
}
|
|
2354
2383
|
},
|
|
2355
2384
|
enumerable: true,
|
|
@@ -2372,6 +2401,15 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2372
2401
|
enumerable: true,
|
|
2373
2402
|
configurable: true
|
|
2374
2403
|
});
|
|
2404
|
+
/**
|
|
2405
|
+
* @return {?}
|
|
2406
|
+
*/
|
|
2407
|
+
MatTabLink.prototype.focus = /**
|
|
2408
|
+
* @return {?}
|
|
2409
|
+
*/
|
|
2410
|
+
function () {
|
|
2411
|
+
this.elementRef.nativeElement.focus();
|
|
2412
|
+
};
|
|
2375
2413
|
/**
|
|
2376
2414
|
* @return {?}
|
|
2377
2415
|
*/
|
|
@@ -2380,7 +2418,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2380
2418
|
*/
|
|
2381
2419
|
function () {
|
|
2382
2420
|
this._tabLinkRipple._removeTriggerEvents();
|
|
2383
|
-
this._focusMonitor.stopMonitoring(this.
|
|
2421
|
+
this._focusMonitor.stopMonitoring(this.elementRef);
|
|
2384
2422
|
};
|
|
2385
2423
|
MatTabLink.decorators = [
|
|
2386
2424
|
{ type: Directive, args: [{
|
|
@@ -2390,7 +2428,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2390
2428
|
host: {
|
|
2391
2429
|
'class': 'mat-tab-link',
|
|
2392
2430
|
'[attr.aria-current]': 'active',
|
|
2393
|
-
'[attr.aria-disabled]': 'disabled
|
|
2431
|
+
'[attr.aria-disabled]': 'disabled',
|
|
2394
2432
|
'[attr.tabIndex]': 'tabIndex',
|
|
2395
2433
|
'[class.mat-tab-disabled]': 'disabled',
|
|
2396
2434
|
'[class.mat-tab-label-active]': 'active',
|
|
@@ -2405,7 +2443,8 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2405
2443
|
{ type: Platform },
|
|
2406
2444
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_RIPPLE_GLOBAL_OPTIONS,] }] },
|
|
2407
2445
|
{ type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
|
|
2408
|
-
{ type: FocusMonitor }
|
|
2446
|
+
{ type: FocusMonitor },
|
|
2447
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
2409
2448
|
]; };
|
|
2410
2449
|
MatTabLink.propDecorators = {
|
|
2411
2450
|
active: [{ type: Input }]
|
|
@@ -2473,5 +2512,5 @@ var MatTabsModule = /** @class */ (function () {
|
|
|
2473
2512
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2474
2513
|
*/
|
|
2475
2514
|
|
|
2476
|
-
export { MatInkBar, _MAT_INK_BAR_POSITIONER, MatTabBody, MatTabBodyPortal, MatTabHeader, MatTabLabelWrapper, MatTab, MatTabLabel, MatTabNav, MatTabLink, MatTabContent, MatTabsModule, MatTabChangeEvent, MAT_TABS_CONFIG, MatTabGroup, matTabsAnimations, _MAT_INK_BAR_POSITIONER_FACTORY as ɵ
|
|
2515
|
+
export { MatInkBar, _MAT_INK_BAR_POSITIONER, MatTabBody, MatTabBodyPortal, MatTabHeader, MatTabLabelWrapper, MatTab, MatTabLabel, MatTabNav, MatTabLink, MatTabContent, MatTabsModule, MatTabChangeEvent, MAT_TABS_CONFIG, MatTabGroup, matTabsAnimations, _MAT_INK_BAR_POSITIONER_FACTORY as ɵa24, MatPaginatedTabHeader as ɵb24 };
|
|
2477
2516
|
//# sourceMappingURL=tabs.es5.js.map
|