@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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
(function (global, factory) {
|
|
9
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/portal'), require('@angular/material/core'), require('rxjs'), require('@angular/animations'), require('@angular/cdk/bidi'), require('rxjs/operators'), require('@angular/cdk/coercion'), require('@angular/cdk/
|
|
10
|
-
typeof define === 'function' && define.amd ? define('@angular/material/tabs', ['exports', '@angular/core', '@angular/cdk/portal', '@angular/material/core', 'rxjs', '@angular/animations', '@angular/cdk/bidi', 'rxjs/operators', '@angular/cdk/coercion', '@angular/cdk/
|
|
11
|
-
(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.tabs = {}),global.ng.core,global.ng.cdk.portal,global.ng.material.core,global.rxjs,global.ng.animations,global.ng.cdk.bidi,global.rxjs.operators,global.ng.cdk.coercion,global.ng.cdk.
|
|
12
|
-
}(this, (function (exports,core,portal,core$1,rxjs,animations,bidi,operators,coercion,
|
|
9
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/material/core'), require('rxjs'), require('@angular/animations'), require('@angular/cdk/bidi'), require('rxjs/operators'), require('@angular/cdk/coercion'), require('@angular/cdk/scrolling'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('@angular/cdk/platform'), require('@angular/cdk/observers'), require('@angular/common')) :
|
|
10
|
+
typeof define === 'function' && define.amd ? define('@angular/material/tabs', ['exports', '@angular/core', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/material/core', 'rxjs', '@angular/animations', '@angular/cdk/bidi', 'rxjs/operators', '@angular/cdk/coercion', '@angular/cdk/scrolling', '@angular/cdk/a11y', '@angular/cdk/keycodes', '@angular/cdk/platform', '@angular/cdk/observers', '@angular/common'], factory) :
|
|
11
|
+
(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.tabs = {}),global.ng.core,global.ng.platformBrowser.animations,global.ng.cdk.portal,global.ng.material.core,global.rxjs,global.ng.animations,global.ng.cdk.bidi,global.rxjs.operators,global.ng.cdk.coercion,global.ng.cdk.scrolling,global.ng.cdk.a11y,global.ng.cdk.keycodes,global.ng.cdk.platform,global.ng.cdk.observers,global.ng.common));
|
|
12
|
+
}(this, (function (exports,core,animations,portal,core$1,rxjs,animations$1,bidi,operators,coercion,scrolling,a11y,keycodes,platform,observers,common) { 'use strict';
|
|
13
13
|
|
|
14
14
|
/*! *****************************************************************************
|
|
15
15
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -74,10 +74,11 @@ function _MAT_INK_BAR_POSITIONER_FACTORY() {
|
|
|
74
74
|
* \@docs-private
|
|
75
75
|
*/
|
|
76
76
|
var MatInkBar = /** @class */ (function () {
|
|
77
|
-
function MatInkBar(_elementRef, _ngZone, _inkBarPositioner) {
|
|
77
|
+
function MatInkBar(_elementRef, _ngZone, _inkBarPositioner, _animationMode) {
|
|
78
78
|
this._elementRef = _elementRef;
|
|
79
79
|
this._ngZone = _ngZone;
|
|
80
80
|
this._inkBarPositioner = _inkBarPositioner;
|
|
81
|
+
this._animationMode = _animationMode;
|
|
81
82
|
}
|
|
82
83
|
/**
|
|
83
84
|
* Calculates the styles from the provided element in order to align the ink-bar to that element.
|
|
@@ -167,6 +168,7 @@ var MatInkBar = /** @class */ (function () {
|
|
|
167
168
|
selector: 'mat-ink-bar',
|
|
168
169
|
host: {
|
|
169
170
|
'class': 'mat-ink-bar',
|
|
171
|
+
'[class._mat-animation-noopable]': "_animationMode === 'NoopAnimations'",
|
|
170
172
|
},
|
|
171
173
|
},] },
|
|
172
174
|
];
|
|
@@ -174,7 +176,8 @@ var MatInkBar = /** @class */ (function () {
|
|
|
174
176
|
MatInkBar.ctorParameters = function () { return [
|
|
175
177
|
{ type: core.ElementRef },
|
|
176
178
|
{ type: core.NgZone },
|
|
177
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [_MAT_INK_BAR_POSITIONER,] }] }
|
|
179
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [_MAT_INK_BAR_POSITIONER,] }] },
|
|
180
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
178
181
|
]; };
|
|
179
182
|
return MatInkBar;
|
|
180
183
|
}());
|
|
@@ -353,23 +356,23 @@ var matTabsAnimations = {
|
|
|
353
356
|
/**
|
|
354
357
|
* Animation translates a tab along the X axis.
|
|
355
358
|
*/
|
|
356
|
-
translateTab: animations.trigger('translateTab', [
|
|
359
|
+
translateTab: animations$1.trigger('translateTab', [
|
|
357
360
|
// Note: transitions to `none` instead of 0, because some browsers might blur the content.
|
|
358
|
-
animations.state('center, void, left-origin-center, right-origin-center', animations.style({ transform: 'none' })),
|
|
361
|
+
animations$1.state('center, void, left-origin-center, right-origin-center', animations$1.style({ transform: 'none' })),
|
|
359
362
|
// If the tab is either on the left or right, we additionally add a `min-height` of 1px
|
|
360
363
|
// in order to ensure that the element has a height before its state changes. This is
|
|
361
364
|
// necessary because Chrome does seem to skip the transition in RTL mode if the element does
|
|
362
365
|
// not have a static height and is not rendered. See related issue: #9465
|
|
363
|
-
animations.state('left', animations.style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
|
|
364
|
-
animations.state('right', animations.style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
|
|
365
|
-
animations.transition('* => left, * => right, left => center, right => center', animations.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
|
|
366
|
-
animations.transition('void => left-origin-center', [
|
|
367
|
-
animations.style({ transform: 'translate3d(-100%, 0, 0)' }),
|
|
368
|
-
animations.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
366
|
+
animations$1.state('left', animations$1.style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
|
|
367
|
+
animations$1.state('right', animations$1.style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
|
|
368
|
+
animations$1.transition('* => left, * => right, left => center, right => center', animations$1.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
|
|
369
|
+
animations$1.transition('void => left-origin-center', [
|
|
370
|
+
animations$1.style({ transform: 'translate3d(-100%, 0, 0)' }),
|
|
371
|
+
animations$1.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
369
372
|
]),
|
|
370
|
-
animations.transition('void => right-origin-center', [
|
|
371
|
-
animations.style({ transform: 'translate3d(100%, 0, 0)' }),
|
|
372
|
-
animations.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
373
|
+
animations$1.transition('void => right-origin-center', [
|
|
374
|
+
animations$1.style({ transform: 'translate3d(100%, 0, 0)' }),
|
|
375
|
+
animations$1.animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
373
376
|
])
|
|
374
377
|
])
|
|
375
378
|
};
|
|
@@ -802,76 +805,57 @@ var HEADER_SCROLL_DELAY = 650;
|
|
|
802
805
|
* @type {?}
|
|
803
806
|
*/
|
|
804
807
|
var HEADER_SCROLL_INTERVAL = 100;
|
|
805
|
-
// Boilerplate for applying mixins to MatTabHeader.
|
|
806
808
|
/**
|
|
807
|
-
*
|
|
808
|
-
|
|
809
|
-
var
|
|
810
|
-
// Boilerplate for applying mixins to MatTabHeader.
|
|
811
|
-
/**
|
|
812
|
-
* \@docs-private
|
|
809
|
+
* Base class for a tab header that supported pagination.
|
|
810
|
+
* @abstract
|
|
813
811
|
*/
|
|
814
|
-
|
|
815
|
-
function
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
825
|
-
* left and right across the header.
|
|
826
|
-
* \@docs-private
|
|
827
|
-
*/
|
|
828
|
-
var MatTabHeader = /** @class */ (function (_super) {
|
|
829
|
-
__extends(MatTabHeader, _super);
|
|
830
|
-
function MatTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform) {
|
|
831
|
-
var _this = _super.call(this) || this;
|
|
832
|
-
_this._elementRef = _elementRef;
|
|
833
|
-
_this._changeDetectorRef = _changeDetectorRef;
|
|
834
|
-
_this._viewportRuler = _viewportRuler;
|
|
835
|
-
_this._dir = _dir;
|
|
836
|
-
_this._ngZone = _ngZone;
|
|
837
|
-
_this._platform = _platform;
|
|
812
|
+
var MatPaginatedTabHeader = /** @class */ (function () {
|
|
813
|
+
function MatPaginatedTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {
|
|
814
|
+
var _this = this;
|
|
815
|
+
this._elementRef = _elementRef;
|
|
816
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
817
|
+
this._viewportRuler = _viewportRuler;
|
|
818
|
+
this._dir = _dir;
|
|
819
|
+
this._ngZone = _ngZone;
|
|
820
|
+
this._platform = _platform;
|
|
821
|
+
this._animationMode = _animationMode;
|
|
838
822
|
/**
|
|
839
823
|
* The distance in pixels that the tab labels should be translated to the left.
|
|
840
824
|
*/
|
|
841
|
-
|
|
825
|
+
this._scrollDistance = 0;
|
|
842
826
|
/**
|
|
843
827
|
* Whether the header should scroll to the selected index after the view has been checked.
|
|
844
828
|
*/
|
|
845
|
-
|
|
829
|
+
this._selectedIndexChanged = false;
|
|
846
830
|
/**
|
|
847
831
|
* Emits when the component is destroyed.
|
|
848
832
|
*/
|
|
849
|
-
|
|
833
|
+
this._destroyed = new rxjs.Subject();
|
|
850
834
|
/**
|
|
851
835
|
* Whether the controls for pagination should be displayed
|
|
852
836
|
*/
|
|
853
|
-
|
|
837
|
+
this._showPaginationControls = false;
|
|
854
838
|
/**
|
|
855
839
|
* Whether the tab list can be scrolled more towards the end of the tab label list.
|
|
856
840
|
*/
|
|
857
|
-
|
|
841
|
+
this._disableScrollAfter = true;
|
|
858
842
|
/**
|
|
859
843
|
* Whether the tab list can be scrolled more towards the beginning of the tab label list.
|
|
860
844
|
*/
|
|
861
|
-
|
|
845
|
+
this._disableScrollBefore = true;
|
|
862
846
|
/**
|
|
863
847
|
* Stream that will stop the automated scrolling.
|
|
864
848
|
*/
|
|
865
|
-
|
|
866
|
-
|
|
849
|
+
this._stopScrolling = new rxjs.Subject();
|
|
850
|
+
this._selectedIndex = 0;
|
|
867
851
|
/**
|
|
868
852
|
* Event emitted when the option is selected.
|
|
869
853
|
*/
|
|
870
|
-
|
|
854
|
+
this.selectFocusedIndex = new core.EventEmitter();
|
|
871
855
|
/**
|
|
872
856
|
* Event emitted when a label is focused.
|
|
873
857
|
*/
|
|
874
|
-
|
|
858
|
+
this.indexFocused = new core.EventEmitter();
|
|
875
859
|
// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
|
|
876
860
|
_ngZone.runOutsideAngular((/**
|
|
877
861
|
* @return {?}
|
|
@@ -886,9 +870,8 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
886
870
|
_this._stopInterval();
|
|
887
871
|
}));
|
|
888
872
|
}));
|
|
889
|
-
return _this;
|
|
890
873
|
}
|
|
891
|
-
Object.defineProperty(
|
|
874
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "selectedIndex", {
|
|
892
875
|
/** The index of the active tab. */
|
|
893
876
|
get: /**
|
|
894
877
|
* The index of the active tab.
|
|
@@ -901,10 +884,12 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
901
884
|
*/
|
|
902
885
|
function (value) {
|
|
903
886
|
value = coercion.coerceNumberProperty(value);
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
this._keyManager
|
|
887
|
+
if (this._selectedIndex != value) {
|
|
888
|
+
this._selectedIndexChanged = true;
|
|
889
|
+
this._selectedIndex = value;
|
|
890
|
+
if (this._keyManager) {
|
|
891
|
+
this._keyManager.updateActiveItemIndex(value);
|
|
892
|
+
}
|
|
908
893
|
}
|
|
909
894
|
},
|
|
910
895
|
enumerable: true,
|
|
@@ -913,76 +898,33 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
913
898
|
/**
|
|
914
899
|
* @return {?}
|
|
915
900
|
*/
|
|
916
|
-
|
|
901
|
+
MatPaginatedTabHeader.prototype.ngAfterViewInit = /**
|
|
917
902
|
* @return {?}
|
|
918
903
|
*/
|
|
919
904
|
function () {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
this.
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
this._updateTabScrollPosition();
|
|
939
|
-
this._scrollDistanceChanged = false;
|
|
940
|
-
this._changeDetectorRef.markForCheck();
|
|
941
|
-
}
|
|
942
|
-
};
|
|
943
|
-
/** Handles keyboard events on the header. */
|
|
944
|
-
/**
|
|
945
|
-
* Handles keyboard events on the header.
|
|
946
|
-
* @param {?} event
|
|
947
|
-
* @return {?}
|
|
948
|
-
*/
|
|
949
|
-
MatTabHeader.prototype._handleKeydown = /**
|
|
950
|
-
* Handles keyboard events on the header.
|
|
951
|
-
* @param {?} event
|
|
952
|
-
* @return {?}
|
|
953
|
-
*/
|
|
954
|
-
function (event) {
|
|
955
|
-
// We don't handle any key bindings with a modifier key.
|
|
956
|
-
if (keycodes.hasModifierKey(event)) {
|
|
957
|
-
return;
|
|
958
|
-
}
|
|
959
|
-
switch (event.keyCode) {
|
|
960
|
-
case keycodes.HOME:
|
|
961
|
-
this._keyManager.setFirstItemActive();
|
|
962
|
-
event.preventDefault();
|
|
963
|
-
break;
|
|
964
|
-
case keycodes.END:
|
|
965
|
-
this._keyManager.setLastItemActive();
|
|
966
|
-
event.preventDefault();
|
|
967
|
-
break;
|
|
968
|
-
case keycodes.ENTER:
|
|
969
|
-
case keycodes.SPACE:
|
|
970
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
971
|
-
event.preventDefault();
|
|
972
|
-
break;
|
|
973
|
-
default:
|
|
974
|
-
this._keyManager.onKeydown(event);
|
|
975
|
-
}
|
|
905
|
+
var _this = this;
|
|
906
|
+
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
907
|
+
rxjs.fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
|
908
|
+
.pipe(operators.takeUntil(this._destroyed))
|
|
909
|
+
.subscribe((/**
|
|
910
|
+
* @return {?}
|
|
911
|
+
*/
|
|
912
|
+
function () {
|
|
913
|
+
_this._handlePaginatorPress('before');
|
|
914
|
+
}));
|
|
915
|
+
rxjs.fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
|
916
|
+
.pipe(operators.takeUntil(this._destroyed))
|
|
917
|
+
.subscribe((/**
|
|
918
|
+
* @return {?}
|
|
919
|
+
*/
|
|
920
|
+
function () {
|
|
921
|
+
_this._handlePaginatorPress('after');
|
|
922
|
+
}));
|
|
976
923
|
};
|
|
977
924
|
/**
|
|
978
|
-
* Aligns the ink bar to the selected tab on load.
|
|
979
|
-
*/
|
|
980
|
-
/**
|
|
981
|
-
* Aligns the ink bar to the selected tab on load.
|
|
982
925
|
* @return {?}
|
|
983
926
|
*/
|
|
984
|
-
|
|
985
|
-
* Aligns the ink bar to the selected tab on load.
|
|
927
|
+
MatPaginatedTabHeader.prototype.ngAfterContentInit = /**
|
|
986
928
|
* @return {?}
|
|
987
929
|
*/
|
|
988
930
|
function () {
|
|
@@ -999,7 +941,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
999
941
|
_this.updatePagination();
|
|
1000
942
|
_this._alignInkBarToSelectedTab();
|
|
1001
943
|
});
|
|
1002
|
-
this._keyManager = new a11y.FocusKeyManager(this.
|
|
944
|
+
this._keyManager = new a11y.FocusKeyManager(this._items)
|
|
1003
945
|
.withHorizontalOrientation(this._getLayoutDirection())
|
|
1004
946
|
.withWrap();
|
|
1005
947
|
this._keyManager.updateActiveItem(0);
|
|
@@ -1008,7 +950,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1008
950
|
typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame(realign) : realign();
|
|
1009
951
|
// On dir change or window resize, realign the ink bar and update the orientation of
|
|
1010
952
|
// the key manager if the direction has changed.
|
|
1011
|
-
rxjs.merge(dirChange, resize).pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
953
|
+
rxjs.merge(dirChange, resize, this._items.changes).pipe(operators.takeUntil(this._destroyed)).subscribe((/**
|
|
1012
954
|
* @return {?}
|
|
1013
955
|
*/
|
|
1014
956
|
function () {
|
|
@@ -1030,33 +972,37 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1030
972
|
/**
|
|
1031
973
|
* @return {?}
|
|
1032
974
|
*/
|
|
1033
|
-
|
|
975
|
+
MatPaginatedTabHeader.prototype.ngAfterContentChecked = /**
|
|
1034
976
|
* @return {?}
|
|
1035
977
|
*/
|
|
1036
978
|
function () {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
.
|
|
1041
|
-
.
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
.
|
|
1049
|
-
.
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
979
|
+
// If the number of tab labels have changed, check if scrolling should be enabled
|
|
980
|
+
if (this._tabLabelCount != this._items.length) {
|
|
981
|
+
this.updatePagination();
|
|
982
|
+
this._tabLabelCount = this._items.length;
|
|
983
|
+
this._changeDetectorRef.markForCheck();
|
|
984
|
+
}
|
|
985
|
+
// If the selected index has changed, scroll to the label and check if the scrolling controls
|
|
986
|
+
// should be disabled.
|
|
987
|
+
if (this._selectedIndexChanged) {
|
|
988
|
+
this._scrollToLabel(this._selectedIndex);
|
|
989
|
+
this._checkScrollingControls();
|
|
990
|
+
this._alignInkBarToSelectedTab();
|
|
991
|
+
this._selectedIndexChanged = false;
|
|
992
|
+
this._changeDetectorRef.markForCheck();
|
|
993
|
+
}
|
|
994
|
+
// If the scroll distance has been changed (tab selected, focused, scroll controls activated),
|
|
995
|
+
// then translate the header to reflect this.
|
|
996
|
+
if (this._scrollDistanceChanged) {
|
|
997
|
+
this._updateTabScrollPosition();
|
|
998
|
+
this._scrollDistanceChanged = false;
|
|
999
|
+
this._changeDetectorRef.markForCheck();
|
|
1000
|
+
}
|
|
1055
1001
|
};
|
|
1056
1002
|
/**
|
|
1057
1003
|
* @return {?}
|
|
1058
1004
|
*/
|
|
1059
|
-
|
|
1005
|
+
MatPaginatedTabHeader.prototype.ngOnDestroy = /**
|
|
1060
1006
|
* @return {?}
|
|
1061
1007
|
*/
|
|
1062
1008
|
function () {
|
|
@@ -1064,6 +1010,40 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1064
1010
|
this._destroyed.complete();
|
|
1065
1011
|
this._stopScrolling.complete();
|
|
1066
1012
|
};
|
|
1013
|
+
/** Handles keyboard events on the header. */
|
|
1014
|
+
/**
|
|
1015
|
+
* Handles keyboard events on the header.
|
|
1016
|
+
* @param {?} event
|
|
1017
|
+
* @return {?}
|
|
1018
|
+
*/
|
|
1019
|
+
MatPaginatedTabHeader.prototype._handleKeydown = /**
|
|
1020
|
+
* Handles keyboard events on the header.
|
|
1021
|
+
* @param {?} event
|
|
1022
|
+
* @return {?}
|
|
1023
|
+
*/
|
|
1024
|
+
function (event) {
|
|
1025
|
+
// We don't handle any key bindings with a modifier key.
|
|
1026
|
+
if (keycodes.hasModifierKey(event)) {
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
switch (event.keyCode) {
|
|
1030
|
+
case keycodes.HOME:
|
|
1031
|
+
this._keyManager.setFirstItemActive();
|
|
1032
|
+
event.preventDefault();
|
|
1033
|
+
break;
|
|
1034
|
+
case keycodes.END:
|
|
1035
|
+
this._keyManager.setLastItemActive();
|
|
1036
|
+
event.preventDefault();
|
|
1037
|
+
break;
|
|
1038
|
+
case keycodes.ENTER:
|
|
1039
|
+
case keycodes.SPACE:
|
|
1040
|
+
this.selectFocusedIndex.emit(this.focusIndex);
|
|
1041
|
+
this._itemSelected(event);
|
|
1042
|
+
break;
|
|
1043
|
+
default:
|
|
1044
|
+
this._keyManager.onKeydown(event);
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1067
1047
|
/**
|
|
1068
1048
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1069
1049
|
*/
|
|
@@ -1071,7 +1051,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1071
1051
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1072
1052
|
* @return {?}
|
|
1073
1053
|
*/
|
|
1074
|
-
|
|
1054
|
+
MatPaginatedTabHeader.prototype._onContentChanges = /**
|
|
1075
1055
|
* Callback for when the MutationObserver detects that the content has changed.
|
|
1076
1056
|
* @return {?}
|
|
1077
1057
|
*/
|
|
@@ -1083,7 +1063,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1083
1063
|
// will fire even if the text content didn't change which is inefficient and is prone
|
|
1084
1064
|
// to infinite loops if a poorly constructed expression is passed in (see #14249).
|
|
1085
1065
|
if (textContent !== this._currentTextContent) {
|
|
1086
|
-
this._currentTextContent = textContent;
|
|
1066
|
+
this._currentTextContent = textContent || '';
|
|
1087
1067
|
// The content observer runs outside the `NgZone` by default, which
|
|
1088
1068
|
// means that we need to bring the callback back in ourselves.
|
|
1089
1069
|
this._ngZone.run((/**
|
|
@@ -1099,22 +1079,22 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1099
1079
|
/**
|
|
1100
1080
|
* Updates the view whether pagination should be enabled or not.
|
|
1101
1081
|
*
|
|
1102
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1082
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1103
1083
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1104
1084
|
* page.
|
|
1105
1085
|
*/
|
|
1106
1086
|
/**
|
|
1107
1087
|
* Updates the view whether pagination should be enabled or not.
|
|
1108
1088
|
*
|
|
1109
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1089
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1110
1090
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1111
1091
|
* page.
|
|
1112
1092
|
* @return {?}
|
|
1113
1093
|
*/
|
|
1114
|
-
|
|
1094
|
+
MatPaginatedTabHeader.prototype.updatePagination = /**
|
|
1115
1095
|
* Updates the view whether pagination should be enabled or not.
|
|
1116
1096
|
*
|
|
1117
|
-
* WARNING: Calling this method can be very costly in terms of performance.
|
|
1097
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1118
1098
|
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1119
1099
|
* page.
|
|
1120
1100
|
* @return {?}
|
|
@@ -1124,7 +1104,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1124
1104
|
this._checkScrollingControls();
|
|
1125
1105
|
this._updateTabScrollPosition();
|
|
1126
1106
|
};
|
|
1127
|
-
Object.defineProperty(
|
|
1107
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "focusIndex", {
|
|
1128
1108
|
/** Tracks which element has focus; used for keyboard navigation */
|
|
1129
1109
|
get: /**
|
|
1130
1110
|
* Tracks which element has focus; used for keyboard navigation
|
|
@@ -1158,18 +1138,18 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1158
1138
|
* @param {?} index
|
|
1159
1139
|
* @return {?}
|
|
1160
1140
|
*/
|
|
1161
|
-
|
|
1141
|
+
MatPaginatedTabHeader.prototype._isValidIndex = /**
|
|
1162
1142
|
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
|
1163
1143
|
* providing a valid index and return true.
|
|
1164
1144
|
* @param {?} index
|
|
1165
1145
|
* @return {?}
|
|
1166
1146
|
*/
|
|
1167
1147
|
function (index) {
|
|
1168
|
-
if (!this.
|
|
1148
|
+
if (!this._items) {
|
|
1169
1149
|
return true;
|
|
1170
1150
|
}
|
|
1171
1151
|
/** @type {?} */
|
|
1172
|
-
var tab = this.
|
|
1152
|
+
var tab = this._items ? this._items.toArray()[index] : null;
|
|
1173
1153
|
return !!tab && !tab.disabled;
|
|
1174
1154
|
};
|
|
1175
1155
|
/**
|
|
@@ -1182,7 +1162,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1182
1162
|
* @param {?} tabIndex
|
|
1183
1163
|
* @return {?}
|
|
1184
1164
|
*/
|
|
1185
|
-
|
|
1165
|
+
MatPaginatedTabHeader.prototype._setTabFocus = /**
|
|
1186
1166
|
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
|
1187
1167
|
* scrolling is enabled.
|
|
1188
1168
|
* @param {?} tabIndex
|
|
@@ -1192,8 +1172,8 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1192
1172
|
if (this._showPaginationControls) {
|
|
1193
1173
|
this._scrollToLabel(tabIndex);
|
|
1194
1174
|
}
|
|
1195
|
-
if (this.
|
|
1196
|
-
this.
|
|
1175
|
+
if (this._items && this._items.length) {
|
|
1176
|
+
this._items.toArray()[tabIndex].focus();
|
|
1197
1177
|
// Do not let the browser manage scrolling to focus the element, this will be handled
|
|
1198
1178
|
// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
|
|
1199
1179
|
// should be the full width minus the offset width.
|
|
@@ -1214,7 +1194,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1214
1194
|
* The layout direction of the containing app.
|
|
1215
1195
|
* @return {?}
|
|
1216
1196
|
*/
|
|
1217
|
-
|
|
1197
|
+
MatPaginatedTabHeader.prototype._getLayoutDirection = /**
|
|
1218
1198
|
* The layout direction of the containing app.
|
|
1219
1199
|
* @return {?}
|
|
1220
1200
|
*/
|
|
@@ -1226,7 +1206,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1226
1206
|
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
1227
1207
|
* @return {?}
|
|
1228
1208
|
*/
|
|
1229
|
-
|
|
1209
|
+
MatPaginatedTabHeader.prototype._updateTabScrollPosition = /**
|
|
1230
1210
|
* Performs the CSS transformation on the tab list that will cause the list to scroll.
|
|
1231
1211
|
* @return {?}
|
|
1232
1212
|
*/
|
|
@@ -1248,11 +1228,12 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1248
1228
|
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
|
1249
1229
|
// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
|
|
1250
1230
|
// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
|
|
1251
|
-
|
|
1231
|
+
// @breaking-change 9.0.0 Remove null check for `platform` after it can no longer be undefined.
|
|
1232
|
+
if (platform$$1 && (platform$$1.TRIDENT || platform$$1.EDGE)) {
|
|
1252
1233
|
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
1253
1234
|
}
|
|
1254
1235
|
};
|
|
1255
|
-
Object.defineProperty(
|
|
1236
|
+
Object.defineProperty(MatPaginatedTabHeader.prototype, "scrollDistance", {
|
|
1256
1237
|
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
|
|
1257
1238
|
get: /**
|
|
1258
1239
|
* Sets the distance in pixels that the tab header should be transformed in the X-axis.
|
|
@@ -1287,7 +1268,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1287
1268
|
* @param {?} direction
|
|
1288
1269
|
* @return {?}
|
|
1289
1270
|
*/
|
|
1290
|
-
|
|
1271
|
+
MatPaginatedTabHeader.prototype._scrollHeader = /**
|
|
1291
1272
|
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
|
1292
1273
|
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
|
1293
1274
|
* length of the tab list view window.
|
|
@@ -1311,7 +1292,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1311
1292
|
* @param {?} direction
|
|
1312
1293
|
* @return {?}
|
|
1313
1294
|
*/
|
|
1314
|
-
|
|
1295
|
+
MatPaginatedTabHeader.prototype._handlePaginatorClick = /**
|
|
1315
1296
|
* Handles click events on the pagination arrows.
|
|
1316
1297
|
* @param {?} direction
|
|
1317
1298
|
* @return {?}
|
|
@@ -1334,7 +1315,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1334
1315
|
* @param {?} labelIndex
|
|
1335
1316
|
* @return {?}
|
|
1336
1317
|
*/
|
|
1337
|
-
|
|
1318
|
+
MatPaginatedTabHeader.prototype._scrollToLabel = /**
|
|
1338
1319
|
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
1339
1320
|
*
|
|
1340
1321
|
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
@@ -1344,24 +1325,25 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1344
1325
|
*/
|
|
1345
1326
|
function (labelIndex) {
|
|
1346
1327
|
/** @type {?} */
|
|
1347
|
-
var selectedLabel = this.
|
|
1328
|
+
var selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
|
|
1348
1329
|
if (!selectedLabel) {
|
|
1349
1330
|
return;
|
|
1350
1331
|
}
|
|
1351
1332
|
// The view length is the visible width of the tab labels.
|
|
1352
1333
|
/** @type {?} */
|
|
1353
1334
|
var viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
1335
|
+
var _a = selectedLabel.elementRef.nativeElement, offsetLeft = _a.offsetLeft, offsetWidth = _a.offsetWidth;
|
|
1354
1336
|
/** @type {?} */
|
|
1355
1337
|
var labelBeforePos;
|
|
1356
1338
|
/** @type {?} */
|
|
1357
1339
|
var labelAfterPos;
|
|
1358
1340
|
if (this._getLayoutDirection() == 'ltr') {
|
|
1359
|
-
labelBeforePos =
|
|
1360
|
-
labelAfterPos = labelBeforePos +
|
|
1341
|
+
labelBeforePos = offsetLeft;
|
|
1342
|
+
labelAfterPos = labelBeforePos + offsetWidth;
|
|
1361
1343
|
}
|
|
1362
1344
|
else {
|
|
1363
|
-
labelAfterPos = this._tabList.nativeElement.offsetWidth -
|
|
1364
|
-
labelBeforePos = labelAfterPos -
|
|
1345
|
+
labelAfterPos = this._tabList.nativeElement.offsetWidth - offsetLeft;
|
|
1346
|
+
labelBeforePos = labelAfterPos - offsetWidth;
|
|
1365
1347
|
}
|
|
1366
1348
|
/** @type {?} */
|
|
1367
1349
|
var beforeVisiblePos = this.scrollDistance;
|
|
@@ -1393,7 +1375,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1393
1375
|
* should be called sparingly.
|
|
1394
1376
|
* @return {?}
|
|
1395
1377
|
*/
|
|
1396
|
-
|
|
1378
|
+
MatPaginatedTabHeader.prototype._checkPaginationEnabled = /**
|
|
1397
1379
|
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
1398
1380
|
* tab list is wider than the size of the header container, then the pagination controls should
|
|
1399
1381
|
* be shown.
|
|
@@ -1432,7 +1414,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1432
1414
|
* should be called sparingly.
|
|
1433
1415
|
* @return {?}
|
|
1434
1416
|
*/
|
|
1435
|
-
|
|
1417
|
+
MatPaginatedTabHeader.prototype._checkScrollingControls = /**
|
|
1436
1418
|
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
1437
1419
|
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
1438
1420
|
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
@@ -1463,7 +1445,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1463
1445
|
* should be called sparingly.
|
|
1464
1446
|
* @return {?}
|
|
1465
1447
|
*/
|
|
1466
|
-
|
|
1448
|
+
MatPaginatedTabHeader.prototype._getMaxScrollDistance = /**
|
|
1467
1449
|
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
1468
1450
|
* is equal to the difference in width between the tab list container and tab header container.
|
|
1469
1451
|
*
|
|
@@ -1483,23 +1465,29 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1483
1465
|
* Tells the ink-bar to align itself to the current label wrapper
|
|
1484
1466
|
* @return {?}
|
|
1485
1467
|
*/
|
|
1486
|
-
|
|
1468
|
+
MatPaginatedTabHeader.prototype._alignInkBarToSelectedTab = /**
|
|
1487
1469
|
* Tells the ink-bar to align itself to the current label wrapper
|
|
1488
1470
|
* @return {?}
|
|
1489
1471
|
*/
|
|
1490
1472
|
function () {
|
|
1491
1473
|
/** @type {?} */
|
|
1492
|
-
var
|
|
1493
|
-
this.
|
|
1494
|
-
|
|
1495
|
-
|
|
1474
|
+
var selectedItem = this._items && this._items.length ?
|
|
1475
|
+
this._items.toArray()[this.selectedIndex] : null;
|
|
1476
|
+
/** @type {?} */
|
|
1477
|
+
var selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
1478
|
+
if (selectedLabelWrapper) {
|
|
1479
|
+
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
this._inkBar.hide();
|
|
1483
|
+
}
|
|
1496
1484
|
};
|
|
1497
1485
|
/** Stops the currently-running paginator interval. */
|
|
1498
1486
|
/**
|
|
1499
1487
|
* Stops the currently-running paginator interval.
|
|
1500
1488
|
* @return {?}
|
|
1501
1489
|
*/
|
|
1502
|
-
|
|
1490
|
+
MatPaginatedTabHeader.prototype._stopInterval = /**
|
|
1503
1491
|
* Stops the currently-running paginator interval.
|
|
1504
1492
|
* @return {?}
|
|
1505
1493
|
*/
|
|
@@ -1517,7 +1505,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1517
1505
|
* @param {?} direction In which direction the paginator should be scrolled.
|
|
1518
1506
|
* @return {?}
|
|
1519
1507
|
*/
|
|
1520
|
-
|
|
1508
|
+
MatPaginatedTabHeader.prototype._handlePaginatorPress = /**
|
|
1521
1509
|
* Handles the user pressing down on one of the paginators.
|
|
1522
1510
|
* Starts scrolling the header after a certain amount of time.
|
|
1523
1511
|
* @param {?} direction In which direction the paginator should be scrolled.
|
|
@@ -1553,7 +1541,7 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1553
1541
|
* @param {?} position Position to which to scroll.
|
|
1554
1542
|
* @return {?} Information on the current scroll distance and the maximum.
|
|
1555
1543
|
*/
|
|
1556
|
-
|
|
1544
|
+
MatPaginatedTabHeader.prototype._scrollTo = /**
|
|
1557
1545
|
* Scrolls the header to a given position.
|
|
1558
1546
|
* @private
|
|
1559
1547
|
* @param {?} position Position to which to scroll.
|
|
@@ -1569,11 +1557,73 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1569
1557
|
this._checkScrollingControls();
|
|
1570
1558
|
return { maxScrollDistance: maxScrollDistance, distance: this._scrollDistance };
|
|
1571
1559
|
};
|
|
1560
|
+
/** @nocollapse */
|
|
1561
|
+
MatPaginatedTabHeader.ctorParameters = function () { return [
|
|
1562
|
+
{ type: core.ElementRef },
|
|
1563
|
+
{ type: core.ChangeDetectorRef },
|
|
1564
|
+
{ type: scrolling.ViewportRuler },
|
|
1565
|
+
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
1566
|
+
{ type: core.NgZone },
|
|
1567
|
+
{ type: platform.Platform },
|
|
1568
|
+
{ type: String }
|
|
1569
|
+
]; };
|
|
1570
|
+
return MatPaginatedTabHeader;
|
|
1571
|
+
}());
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* @fileoverview added by tsickle
|
|
1575
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1576
|
+
*/
|
|
1577
|
+
/**
|
|
1578
|
+
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
1579
|
+
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
1580
|
+
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
1581
|
+
* left and right across the header.
|
|
1582
|
+
* \@docs-private
|
|
1583
|
+
*/
|
|
1584
|
+
var MatTabHeader = /** @class */ (function (_super) {
|
|
1585
|
+
__extends(MatTabHeader, _super);
|
|
1586
|
+
function MatTabHeader(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1,
|
|
1587
|
+
// @breaking-change 9.0.0 `_animationMode` parameter to be made required.
|
|
1588
|
+
animationMode) {
|
|
1589
|
+
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1, animationMode) || this;
|
|
1590
|
+
_this._disableRipple = false;
|
|
1591
|
+
return _this;
|
|
1592
|
+
}
|
|
1593
|
+
Object.defineProperty(MatTabHeader.prototype, "disableRipple", {
|
|
1594
|
+
/** Whether the ripple effect is disabled or not. */
|
|
1595
|
+
get: /**
|
|
1596
|
+
* Whether the ripple effect is disabled or not.
|
|
1597
|
+
* @return {?}
|
|
1598
|
+
*/
|
|
1599
|
+
function () { return this._disableRipple; },
|
|
1600
|
+
set: /**
|
|
1601
|
+
* @param {?} value
|
|
1602
|
+
* @return {?}
|
|
1603
|
+
*/
|
|
1604
|
+
function (value) { this._disableRipple = coercion.coerceBooleanProperty(value); },
|
|
1605
|
+
enumerable: true,
|
|
1606
|
+
configurable: true
|
|
1607
|
+
});
|
|
1608
|
+
/**
|
|
1609
|
+
* @protected
|
|
1610
|
+
* @param {?} event
|
|
1611
|
+
* @return {?}
|
|
1612
|
+
*/
|
|
1613
|
+
MatTabHeader.prototype._itemSelected = /**
|
|
1614
|
+
* @protected
|
|
1615
|
+
* @param {?} event
|
|
1616
|
+
* @return {?}
|
|
1617
|
+
*/
|
|
1618
|
+
function (event) {
|
|
1619
|
+
event.preventDefault();
|
|
1620
|
+
};
|
|
1572
1621
|
MatTabHeader.decorators = [
|
|
1573
1622
|
{ type: core.Component, args: [{selector: 'mat-tab-header',
|
|
1574
|
-
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\"
|
|
1575
|
-
styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-
|
|
1576
|
-
inputs: ['
|
|
1623
|
+
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>",
|
|
1624
|
+
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}}"],
|
|
1625
|
+
inputs: ['selectedIndex'],
|
|
1626
|
+
outputs: ['selectFocusedIndex', 'indexFocused'],
|
|
1577
1627
|
encapsulation: core.ViewEncapsulation.None,
|
|
1578
1628
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1579
1629
|
host: {
|
|
@@ -1590,21 +1640,20 @@ var MatTabHeader = /** @class */ (function (_super) {
|
|
|
1590
1640
|
{ type: scrolling.ViewportRuler },
|
|
1591
1641
|
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
1592
1642
|
{ type: core.NgZone },
|
|
1593
|
-
{ type: platform.Platform }
|
|
1643
|
+
{ type: platform.Platform },
|
|
1644
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
1594
1645
|
]; };
|
|
1595
1646
|
MatTabHeader.propDecorators = {
|
|
1596
|
-
|
|
1647
|
+
_items: [{ type: core.ContentChildren, args: [MatTabLabelWrapper,] }],
|
|
1597
1648
|
_inkBar: [{ type: core.ViewChild, args: [MatInkBar, { static: true },] }],
|
|
1598
1649
|
_tabListContainer: [{ type: core.ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
1599
1650
|
_tabList: [{ type: core.ViewChild, args: ['tabList', { static: true },] }],
|
|
1600
1651
|
_nextPaginator: [{ type: core.ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
1601
1652
|
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }],
|
|
1602
|
-
|
|
1603
|
-
selectFocusedIndex: [{ type: core.Output }],
|
|
1604
|
-
indexFocused: [{ type: core.Output }]
|
|
1653
|
+
disableRipple: [{ type: core.Input }]
|
|
1605
1654
|
};
|
|
1606
1655
|
return MatTabHeader;
|
|
1607
|
-
}(
|
|
1656
|
+
}(MatPaginatedTabHeader));
|
|
1608
1657
|
|
|
1609
1658
|
/**
|
|
1610
1659
|
* @fileoverview added by tsickle
|
|
@@ -1655,9 +1704,10 @@ var _MatTabGroupMixinBase = core$1.mixinColor(core$1.mixinDisableRipple(MatTabGr
|
|
|
1655
1704
|
*/
|
|
1656
1705
|
var MatTabGroup = /** @class */ (function (_super) {
|
|
1657
1706
|
__extends(MatTabGroup, _super);
|
|
1658
|
-
function MatTabGroup(elementRef, _changeDetectorRef, defaultConfig) {
|
|
1707
|
+
function MatTabGroup(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {
|
|
1659
1708
|
var _this = _super.call(this, elementRef) || this;
|
|
1660
1709
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
1710
|
+
_this._animationMode = _animationMode;
|
|
1661
1711
|
/**
|
|
1662
1712
|
* The tab index that should be selected after the content has been checked.
|
|
1663
1713
|
*/
|
|
@@ -2103,8 +2153,8 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2103
2153
|
MatTabGroup.decorators = [
|
|
2104
2154
|
{ type: core.Component, args: [{selector: 'mat-tab-group',
|
|
2105
2155
|
exportAs: 'matTabGroup',
|
|
2106
|
-
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>",
|
|
2107
|
-
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}"],
|
|
2156
|
+
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>",
|
|
2157
|
+
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}"],
|
|
2108
2158
|
encapsulation: core.ViewEncapsulation.None,
|
|
2109
2159
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2110
2160
|
inputs: ['color', 'disableRipple'],
|
|
@@ -2119,7 +2169,8 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2119
2169
|
MatTabGroup.ctorParameters = function () { return [
|
|
2120
2170
|
{ type: core.ElementRef },
|
|
2121
2171
|
{ type: core.ChangeDetectorRef },
|
|
2122
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_TABS_CONFIG,] }, { type: core.Optional }] }
|
|
2172
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_TABS_CONFIG,] }, { type: core.Optional }] },
|
|
2173
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
2123
2174
|
]; };
|
|
2124
2175
|
MatTabGroup.propDecorators = {
|
|
2125
2176
|
_tabs: [{ type: core.ContentChildren, args: [MatTab,] }],
|
|
@@ -2142,39 +2193,23 @@ var MatTabGroup = /** @class */ (function (_super) {
|
|
|
2142
2193
|
* @fileoverview added by tsickle
|
|
2143
2194
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2144
2195
|
*/
|
|
2145
|
-
// Boilerplate for applying mixins to MatTabNav.
|
|
2146
|
-
/**
|
|
2147
|
-
* \@docs-private
|
|
2148
|
-
*/
|
|
2149
|
-
var
|
|
2150
|
-
// Boilerplate for applying mixins to MatTabNav.
|
|
2151
|
-
/**
|
|
2152
|
-
* \@docs-private
|
|
2153
|
-
*/
|
|
2154
|
-
MatTabNavBase = /** @class */ (function () {
|
|
2155
|
-
function MatTabNavBase(_elementRef) {
|
|
2156
|
-
this._elementRef = _elementRef;
|
|
2157
|
-
}
|
|
2158
|
-
return MatTabNavBase;
|
|
2159
|
-
}());
|
|
2160
|
-
/** @type {?} */
|
|
2161
|
-
var _MatTabNavMixinBase = core$1.mixinDisableRipple(core$1.mixinColor(MatTabNavBase, 'primary'));
|
|
2162
2196
|
/**
|
|
2163
2197
|
* Navigation component matching the styles of the tab group header.
|
|
2164
2198
|
* Provides anchored navigation with animated ink bar.
|
|
2165
2199
|
*/
|
|
2166
2200
|
var MatTabNav = /** @class */ (function (_super) {
|
|
2167
2201
|
__extends(MatTabNav, _super);
|
|
2168
|
-
function MatTabNav(elementRef,
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
_this
|
|
2202
|
+
function MatTabNav(elementRef, dir, ngZone, changeDetectorRef, viewportRuler,
|
|
2203
|
+
/**
|
|
2204
|
+
* @deprecated @breaking-change 9.0.0 `platform` parameter to become required.
|
|
2205
|
+
*/
|
|
2206
|
+
platform$$1, animationMode) {
|
|
2207
|
+
var _this = _super.call(this, elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform$$1, animationMode) || this;
|
|
2208
|
+
_this._disableRipple = false;
|
|
2174
2209
|
/**
|
|
2175
|
-
*
|
|
2210
|
+
* Theme color of the nav bar.
|
|
2176
2211
|
*/
|
|
2177
|
-
_this.
|
|
2212
|
+
_this.color = 'primary';
|
|
2178
2213
|
return _this;
|
|
2179
2214
|
}
|
|
2180
2215
|
Object.defineProperty(MatTabNav.prototype, "backgroundColor", {
|
|
@@ -2190,117 +2225,99 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
2190
2225
|
*/
|
|
2191
2226
|
function (value) {
|
|
2192
2227
|
/** @type {?} */
|
|
2193
|
-
var
|
|
2194
|
-
|
|
2228
|
+
var classList = this._elementRef.nativeElement.classList;
|
|
2229
|
+
classList.remove("mat-background-" + this.backgroundColor);
|
|
2195
2230
|
if (value) {
|
|
2196
|
-
|
|
2231
|
+
classList.add("mat-background-" + value);
|
|
2197
2232
|
}
|
|
2198
2233
|
this._backgroundColor = value;
|
|
2199
2234
|
},
|
|
2200
2235
|
enumerable: true,
|
|
2201
2236
|
configurable: true
|
|
2202
2237
|
});
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
/**
|
|
2208
|
-
* Notifies the component that the active link has been changed.
|
|
2209
|
-
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2210
|
-
* @param {?} element
|
|
2211
|
-
* @return {?}
|
|
2212
|
-
*/
|
|
2213
|
-
MatTabNav.prototype.updateActiveLink = /**
|
|
2214
|
-
* Notifies the component that the active link has been changed.
|
|
2215
|
-
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2216
|
-
* @param {?} element
|
|
2217
|
-
* @return {?}
|
|
2218
|
-
*/
|
|
2219
|
-
function (element) {
|
|
2220
|
-
// Note: keeping the `element` for backwards-compat, but isn't being used for anything.
|
|
2221
|
-
// @breaking-change 8.0.0
|
|
2222
|
-
this._activeLinkChanged = !!element;
|
|
2223
|
-
this._changeDetectorRef.markForCheck();
|
|
2224
|
-
};
|
|
2225
|
-
/**
|
|
2226
|
-
* @return {?}
|
|
2227
|
-
*/
|
|
2228
|
-
MatTabNav.prototype.ngAfterContentInit = /**
|
|
2229
|
-
* @return {?}
|
|
2230
|
-
*/
|
|
2231
|
-
function () {
|
|
2232
|
-
var _this = this;
|
|
2233
|
-
this._ngZone.runOutsideAngular((/**
|
|
2238
|
+
Object.defineProperty(MatTabNav.prototype, "disableRipple", {
|
|
2239
|
+
/** Whether the ripple effect is disabled or not. */
|
|
2240
|
+
get: /**
|
|
2241
|
+
* Whether the ripple effect is disabled or not.
|
|
2234
2242
|
* @return {?}
|
|
2235
2243
|
*/
|
|
2236
|
-
function () {
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
}));
|
|
2246
|
-
};
|
|
2247
|
-
/** Checks if the active link has been changed and, if so, will update the ink bar. */
|
|
2244
|
+
function () { return this._disableRipple; },
|
|
2245
|
+
set: /**
|
|
2246
|
+
* @param {?} value
|
|
2247
|
+
* @return {?}
|
|
2248
|
+
*/
|
|
2249
|
+
function (value) { this._disableRipple = coercion.coerceBooleanProperty(value); },
|
|
2250
|
+
enumerable: true,
|
|
2251
|
+
configurable: true
|
|
2252
|
+
});
|
|
2248
2253
|
/**
|
|
2249
|
-
*
|
|
2254
|
+
* @protected
|
|
2250
2255
|
* @return {?}
|
|
2251
2256
|
*/
|
|
2252
|
-
MatTabNav.prototype.
|
|
2253
|
-
*
|
|
2257
|
+
MatTabNav.prototype._itemSelected = /**
|
|
2258
|
+
* @protected
|
|
2254
2259
|
* @return {?}
|
|
2255
2260
|
*/
|
|
2256
2261
|
function () {
|
|
2257
|
-
|
|
2258
|
-
/** @type {?} */
|
|
2259
|
-
var activeTab = this._tabLinks.find((/**
|
|
2260
|
-
* @param {?} tab
|
|
2261
|
-
* @return {?}
|
|
2262
|
-
*/
|
|
2263
|
-
function (tab) { return tab.active; }));
|
|
2264
|
-
this._activeLinkElement = activeTab ? activeTab._elementRef : null;
|
|
2265
|
-
this._alignInkBar();
|
|
2266
|
-
this._activeLinkChanged = false;
|
|
2267
|
-
}
|
|
2262
|
+
// noop
|
|
2268
2263
|
};
|
|
2269
2264
|
/**
|
|
2270
2265
|
* @return {?}
|
|
2271
2266
|
*/
|
|
2272
|
-
MatTabNav.prototype.
|
|
2267
|
+
MatTabNav.prototype.ngAfterContentInit = /**
|
|
2273
2268
|
* @return {?}
|
|
2274
2269
|
*/
|
|
2275
2270
|
function () {
|
|
2276
|
-
this.
|
|
2277
|
-
|
|
2271
|
+
this.updateActiveLink();
|
|
2272
|
+
_super.prototype.ngAfterContentInit.call(this);
|
|
2278
2273
|
};
|
|
2279
|
-
/** Aligns the ink bar to the active link. */
|
|
2280
2274
|
/**
|
|
2281
|
-
*
|
|
2275
|
+
* Notifies the component that the active link has been changed.
|
|
2276
|
+
* @breaking-change 8.0.0 `element` parameter to be removed.
|
|
2277
|
+
*/
|
|
2278
|
+
/**
|
|
2279
|
+
* Notifies the component that the active link has been changed.
|
|
2280
|
+
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2281
|
+
* @param {?=} _element
|
|
2282
2282
|
* @return {?}
|
|
2283
2283
|
*/
|
|
2284
|
-
MatTabNav.prototype.
|
|
2285
|
-
*
|
|
2284
|
+
MatTabNav.prototype.updateActiveLink = /**
|
|
2285
|
+
* Notifies the component that the active link has been changed.
|
|
2286
|
+
* \@breaking-change 8.0.0 `element` parameter to be removed.
|
|
2287
|
+
* @param {?=} _element
|
|
2286
2288
|
* @return {?}
|
|
2287
2289
|
*/
|
|
2288
|
-
function () {
|
|
2289
|
-
if (this.
|
|
2290
|
-
|
|
2291
|
-
this._inkBar.alignToElement(this._activeLinkElement.nativeElement);
|
|
2290
|
+
function (_element) {
|
|
2291
|
+
if (!this._items) {
|
|
2292
|
+
return;
|
|
2292
2293
|
}
|
|
2293
|
-
|
|
2294
|
-
|
|
2294
|
+
/** @type {?} */
|
|
2295
|
+
var items = this._items.toArray();
|
|
2296
|
+
for (var i = 0; i < items.length; i++) {
|
|
2297
|
+
if (items[i].active) {
|
|
2298
|
+
this.selectedIndex = i;
|
|
2299
|
+
this._changeDetectorRef.markForCheck();
|
|
2300
|
+
return;
|
|
2301
|
+
}
|
|
2295
2302
|
}
|
|
2303
|
+
// The ink bar should hide itself if no items are active.
|
|
2304
|
+
this.selectedIndex = -1;
|
|
2305
|
+
this._inkBar.hide();
|
|
2296
2306
|
};
|
|
2297
2307
|
MatTabNav.decorators = [
|
|
2298
2308
|
{ type: core.Component, args: [{selector: '[mat-tab-nav-bar]',
|
|
2299
2309
|
exportAs: 'matTabNavBar, matTabNav',
|
|
2300
|
-
inputs: ['color'
|
|
2301
|
-
template: "<div class=\"mat-tab-
|
|
2302
|
-
styles: [".mat-tab-
|
|
2303
|
-
host: {
|
|
2310
|
+
inputs: ['color'],
|
|
2311
|
+
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>",
|
|
2312
|
+
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}}"],
|
|
2313
|
+
host: {
|
|
2314
|
+
'class': 'mat-tab-nav-bar mat-tab-header',
|
|
2315
|
+
'[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
2316
|
+
'[class.mat-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
|
2317
|
+
'[class.mat-primary]': 'color !== "warn" && color !== "accent"',
|
|
2318
|
+
'[class.mat-accent]': 'color === "accent"',
|
|
2319
|
+
'[class.mat-warn]': 'color === "warn"',
|
|
2320
|
+
},
|
|
2304
2321
|
encapsulation: core.ViewEncapsulation.None,
|
|
2305
2322
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2306
2323
|
},] },
|
|
@@ -2311,18 +2328,26 @@ var MatTabNav = /** @class */ (function (_super) {
|
|
|
2311
2328
|
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
2312
2329
|
{ type: core.NgZone },
|
|
2313
2330
|
{ type: core.ChangeDetectorRef },
|
|
2314
|
-
{ type: scrolling.ViewportRuler }
|
|
2331
|
+
{ type: scrolling.ViewportRuler },
|
|
2332
|
+
{ type: platform.Platform, decorators: [{ type: core.Optional }] },
|
|
2333
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
2315
2334
|
]; };
|
|
2316
2335
|
MatTabNav.propDecorators = {
|
|
2317
|
-
|
|
2318
|
-
_tabLinks: [{ type: core.ContentChildren, args: [core.forwardRef((/**
|
|
2336
|
+
_items: [{ type: core.ContentChildren, args: [core.forwardRef((/**
|
|
2319
2337
|
* @return {?}
|
|
2320
2338
|
*/
|
|
2321
2339
|
function () { return MatTabLink; })), { descendants: true },] }],
|
|
2322
|
-
|
|
2340
|
+
_inkBar: [{ type: core.ViewChild, args: [MatInkBar, { static: true },] }],
|
|
2341
|
+
_tabListContainer: [{ type: core.ViewChild, args: ['tabListContainer', { static: true },] }],
|
|
2342
|
+
_tabList: [{ type: core.ViewChild, args: ['tabList', { static: true },] }],
|
|
2343
|
+
_nextPaginator: [{ type: core.ViewChild, args: ['nextPaginator', { static: false },] }],
|
|
2344
|
+
_previousPaginator: [{ type: core.ViewChild, args: ['previousPaginator', { static: false },] }],
|
|
2345
|
+
backgroundColor: [{ type: core.Input }],
|
|
2346
|
+
disableRipple: [{ type: core.Input }],
|
|
2347
|
+
color: [{ type: core.Input }]
|
|
2323
2348
|
};
|
|
2324
2349
|
return MatTabNav;
|
|
2325
|
-
}(
|
|
2350
|
+
}(MatPaginatedTabHeader));
|
|
2326
2351
|
// Boilerplate for applying mixins to MatTabLink.
|
|
2327
2352
|
var
|
|
2328
2353
|
// Boilerplate for applying mixins to MatTabLink.
|
|
@@ -2338,20 +2363,23 @@ var _MatTabLinkMixinBase = core$1.mixinTabIndex(core$1.mixinDisableRipple(core$1
|
|
|
2338
2363
|
*/
|
|
2339
2364
|
var MatTabLink = /** @class */ (function (_super) {
|
|
2340
2365
|
__extends(MatTabLink, _super);
|
|
2341
|
-
function MatTabLink(_tabNavBar,
|
|
2366
|
+
function MatTabLink(_tabNavBar, elementRef, ngZone, platform$$1, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {
|
|
2342
2367
|
var _this = _super.call(this) || this;
|
|
2343
2368
|
_this._tabNavBar = _tabNavBar;
|
|
2344
|
-
_this.
|
|
2369
|
+
_this.elementRef = elementRef;
|
|
2345
2370
|
_this._focusMonitor = _focusMonitor;
|
|
2346
2371
|
/**
|
|
2347
2372
|
* Whether the tab link is active or not.
|
|
2348
2373
|
*/
|
|
2349
2374
|
_this._isActive = false;
|
|
2350
|
-
_this._tabLinkRipple = new core$1.RippleRenderer(_this, ngZone,
|
|
2351
|
-
_this._tabLinkRipple.setupTriggerEvents(
|
|
2375
|
+
_this._tabLinkRipple = new core$1.RippleRenderer(_this, ngZone, elementRef, platform$$1);
|
|
2376
|
+
_this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);
|
|
2352
2377
|
_this.rippleConfig = globalRippleOptions || {};
|
|
2353
2378
|
_this.tabIndex = parseInt(tabIndex) || 0;
|
|
2354
|
-
|
|
2379
|
+
if (animationMode === 'NoopAnimations') {
|
|
2380
|
+
_this.rippleConfig.animation = { enterDuration: 0, exitDuration: 0 };
|
|
2381
|
+
}
|
|
2382
|
+
_focusMonitor.monitor(elementRef);
|
|
2355
2383
|
return _this;
|
|
2356
2384
|
}
|
|
2357
2385
|
Object.defineProperty(MatTabLink.prototype, "active", {
|
|
@@ -2368,7 +2396,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2368
2396
|
function (value) {
|
|
2369
2397
|
if (value !== this._isActive) {
|
|
2370
2398
|
this._isActive = value;
|
|
2371
|
-
this._tabNavBar.updateActiveLink(this.
|
|
2399
|
+
this._tabNavBar.updateActiveLink(this.elementRef);
|
|
2372
2400
|
}
|
|
2373
2401
|
},
|
|
2374
2402
|
enumerable: true,
|
|
@@ -2391,6 +2419,15 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2391
2419
|
enumerable: true,
|
|
2392
2420
|
configurable: true
|
|
2393
2421
|
});
|
|
2422
|
+
/**
|
|
2423
|
+
* @return {?}
|
|
2424
|
+
*/
|
|
2425
|
+
MatTabLink.prototype.focus = /**
|
|
2426
|
+
* @return {?}
|
|
2427
|
+
*/
|
|
2428
|
+
function () {
|
|
2429
|
+
this.elementRef.nativeElement.focus();
|
|
2430
|
+
};
|
|
2394
2431
|
/**
|
|
2395
2432
|
* @return {?}
|
|
2396
2433
|
*/
|
|
@@ -2399,7 +2436,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2399
2436
|
*/
|
|
2400
2437
|
function () {
|
|
2401
2438
|
this._tabLinkRipple._removeTriggerEvents();
|
|
2402
|
-
this._focusMonitor.stopMonitoring(this.
|
|
2439
|
+
this._focusMonitor.stopMonitoring(this.elementRef);
|
|
2403
2440
|
};
|
|
2404
2441
|
MatTabLink.decorators = [
|
|
2405
2442
|
{ type: core.Directive, args: [{
|
|
@@ -2409,7 +2446,7 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2409
2446
|
host: {
|
|
2410
2447
|
'class': 'mat-tab-link',
|
|
2411
2448
|
'[attr.aria-current]': 'active',
|
|
2412
|
-
'[attr.aria-disabled]': 'disabled
|
|
2449
|
+
'[attr.aria-disabled]': 'disabled',
|
|
2413
2450
|
'[attr.tabIndex]': 'tabIndex',
|
|
2414
2451
|
'[class.mat-tab-disabled]': 'disabled',
|
|
2415
2452
|
'[class.mat-tab-label-active]': 'active',
|
|
@@ -2424,7 +2461,8 @@ var MatTabLink = /** @class */ (function (_super) {
|
|
|
2424
2461
|
{ type: platform.Platform },
|
|
2425
2462
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [core$1.MAT_RIPPLE_GLOBAL_OPTIONS,] }] },
|
|
2426
2463
|
{ type: String, decorators: [{ type: core.Attribute, args: ['tabindex',] }] },
|
|
2427
|
-
{ type: a11y.FocusMonitor }
|
|
2464
|
+
{ type: a11y.FocusMonitor },
|
|
2465
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
|
|
2428
2466
|
]; };
|
|
2429
2467
|
MatTabLink.propDecorators = {
|
|
2430
2468
|
active: [{ type: core.Input }]
|
|
@@ -2493,7 +2531,8 @@ exports.MatTabChangeEvent = MatTabChangeEvent;
|
|
|
2493
2531
|
exports.MAT_TABS_CONFIG = MAT_TABS_CONFIG;
|
|
2494
2532
|
exports.MatTabGroup = MatTabGroup;
|
|
2495
2533
|
exports.matTabsAnimations = matTabsAnimations;
|
|
2496
|
-
exports.ɵ
|
|
2534
|
+
exports.ɵa24 = _MAT_INK_BAR_POSITIONER_FACTORY;
|
|
2535
|
+
exports.ɵb24 = MatPaginatedTabHeader;
|
|
2497
2536
|
|
|
2498
2537
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2499
2538
|
|