@ptsecurity/mosaic 12.2.2 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +78 -48
- package/_visual.scss +11 -8
- package/autocomplete/README.md +0 -0
- package/autocomplete/package.json +5 -5
- package/button/README.md +0 -0
- package/button/button.component.d.ts +17 -14
- package/button/button.module.d.ts +1 -1
- package/button/package.json +5 -5
- package/button-toggle/README.md +0 -0
- package/button-toggle/package.json +5 -5
- package/card/README.md +0 -0
- package/card/package.json +5 -5
- package/checkbox/README.md +1 -0
- package/checkbox/package.json +5 -5
- package/core/formatters/date/formatter.d.ts +4 -4
- package/core/formatters/date/templates/en-US.d.ts +8 -8
- package/core/formatters/date/templates/ru-RU.d.ts +8 -8
- package/core/package.json +5 -5
- package/datepicker/README.md +0 -0
- package/datepicker/package.json +5 -5
- package/design-tokens/package.json +5 -5
- package/design-tokens/tokens/components/navbar.json5 +12 -9
- package/design-tokens/tokens.d.ts +11 -8
- package/divider/README.md +0 -0
- package/divider/package.json +5 -5
- package/dropdown/package.json +5 -5
- package/{esm2015/autocomplete/autocomplete-origin.directive.js → esm2020/autocomplete/autocomplete-origin.directive.mjs} +4 -4
- package/{esm2015/autocomplete/autocomplete-trigger.directive.js → esm2020/autocomplete/autocomplete-trigger.directive.mjs} +4 -4
- package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
- package/{esm2015/autocomplete/autocomplete.module.js → esm2020/autocomplete/autocomplete.module.mjs} +5 -5
- package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
- package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
- package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
- package/esm2020/button/button.component.mjs +129 -0
- package/esm2020/button/button.module.mjs +38 -0
- package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
- package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
- package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
- package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
- package/{esm2015/button-toggle/button-toggle.module.js → esm2020/button-toggle/button-toggle.module.mjs} +5 -5
- package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
- package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
- package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
- package/esm2020/card/card.component.mjs +80 -0
- package/{esm2015/card/card.module.js → esm2020/card/card.module.mjs} +5 -5
- package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
- package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
- package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
- package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
- package/{esm2015/checkbox/checkbox-module.js → esm2020/checkbox/checkbox-module.mjs} +5 -5
- package/{esm2015/checkbox/checkbox-required-validator.js → esm2020/checkbox/checkbox-required-validator.mjs} +4 -4
- package/esm2020/checkbox/checkbox.mjs +315 -0
- package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
- package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
- package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
- package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
- package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
- package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
- package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
- package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
- package/{esm2015/core/common-behaviors/common-module.js → esm2020/core/common-behaviors/common-module.mjs} +5 -5
- package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
- package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
- package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
- package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
- package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
- package/{esm2015/core/error/error-options.js → esm2020/core/error/error-options.mjs} +7 -7
- package/esm2020/core/formatters/date/formatter.mjs +314 -0
- package/esm2020/core/formatters/date/templates/en-US.mjs +280 -0
- package/esm2020/core/formatters/date/templates/ru-RU.mjs +280 -0
- package/{esm2015/core/formatters/index.js → esm2020/core/formatters/index.mjs} +5 -5
- package/esm2020/core/formatters/number/formatter.mjs +105 -0
- package/{esm2015/core/forms/forms-module.js → esm2020/core/forms/forms-module.mjs} +5 -5
- package/{esm2015/core/forms/forms.directive.js → esm2020/core/forms/forms.directive.mjs} +7 -7
- package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
- package/{esm2015/core/highlight/highlight.pipe.js → esm2020/core/highlight/highlight.pipe.mjs} +4 -4
- package/{esm2015/core/highlight/index.js → esm2020/core/highlight/index.mjs} +5 -5
- package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
- package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
- package/{esm2015/core/line/line.js → esm2020/core/line/line.mjs} +8 -8
- package/esm2020/core/option/action.mjs +121 -0
- package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
- package/esm2020/core/option/optgroup.mjs +31 -0
- package/{esm2015/core/option/option-module.js → esm2020/core/option/option-module.mjs} +5 -5
- package/esm2020/core/option/option.mjs +254 -0
- package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
- package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
- package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
- package/esm2020/core/pop-up/pop-up-trigger.mjs +246 -0
- package/esm2020/core/pop-up/pop-up.mjs +91 -0
- package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
- package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
- package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
- package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
- package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
- package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
- package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
- package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
- package/{esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js → esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs} +5 -5
- package/{esm2015/core/services/measure-scrollbar.service.js → esm2020/core/services/measure-scrollbar.service.mjs} +4 -4
- package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
- package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
- package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
- package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
- package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
- package/esm2020/datepicker/calendar-body.component.mjs +106 -0
- package/esm2020/datepicker/calendar.component.mjs +362 -0
- package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
- package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
- package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
- package/{esm2015/datepicker/datepicker-intl.js → esm2020/datepicker/datepicker-intl.mjs} +4 -4
- package/{esm2015/datepicker/datepicker-module.js → esm2020/datepicker/datepicker-module.mjs} +5 -5
- package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
- package/esm2020/datepicker/datepicker.component.mjs +408 -0
- package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
- package/{esm2015/datepicker/month-view.component.js → esm2020/datepicker/month-view.component.mjs} +5 -11
- package/{esm2015/datepicker/multi-year-view.component.js → esm2020/datepicker/multi-year-view.component.mjs} +5 -11
- package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
- package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
- package/{esm2015/datepicker/year-view.component.js → esm2020/datepicker/year-view.component.mjs} +5 -11
- package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
- package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
- package/{esm2015/design-tokens/public-api.js → esm2020/design-tokens/public-api.mjs} +0 -0
- package/{esm2015/design-tokens/tokens.js → esm2020/design-tokens/tokens.mjs} +12 -9
- package/{esm2015/divider/divider.component.js → esm2020/divider/divider.component.mjs} +6 -13
- package/{esm2015/divider/divider.module.js → esm2020/divider/divider.module.mjs} +5 -5
- package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
- package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
- package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
- package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
- package/{esm2015/dropdown/dropdown-content.directive.js → esm2020/dropdown/dropdown-content.directive.mjs} +6 -8
- package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
- package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
- package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
- package/esm2020/dropdown/dropdown.component.mjs +292 -0
- package/{esm2015/dropdown/dropdown.module.js → esm2020/dropdown/dropdown.module.mjs} +5 -5
- package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
- package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
- package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
- package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
- package/{esm2015/form-field/cleaner.js → esm2020/form-field/cleaner.mjs} +4 -4
- package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
- package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
- package/esm2020/form-field/form-field.mjs +205 -0
- package/{esm2015/form-field/form-field.module.js → esm2020/form-field/form-field.module.mjs} +5 -5
- package/{esm2015/form-field/hint.js → esm2020/form-field/hint.mjs} +4 -4
- package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
- package/{esm2015/form-field/prefix.js → esm2020/form-field/prefix.mjs} +4 -4
- package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
- package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
- package/{esm2015/form-field/stepper.js → esm2020/form-field/stepper.mjs} +4 -4
- package/{esm2015/form-field/suffix.js → esm2020/form-field/suffix.mjs} +4 -4
- package/esm2020/icon/icon.component.mjs +44 -0
- package/{esm2015/icon/icon.module.js → esm2020/icon/icon.module.mjs} +5 -5
- package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
- package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
- package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
- package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
- package/{esm2015/input/input-number-validators.js → esm2020/input/input-number-validators.mjs} +7 -7
- package/{esm2015/input/input-number.js → esm2020/input/input-number.mjs} +4 -4
- package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
- package/{esm2015/input/input.js → esm2020/input/input.mjs} +7 -7
- package/{esm2015/input/input.module.js → esm2020/input/input.module.mjs} +5 -5
- package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
- package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
- package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
- package/esm2020/link/link.component.mjs +107 -0
- package/{esm2015/link/link.module.js → esm2020/link/link.module.mjs} +5 -5
- package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
- package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
- package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
- package/esm2020/list/list-selection.component.mjs +693 -0
- package/esm2020/list/list.component.mjs +44 -0
- package/{esm2015/list/list.module.js → esm2020/list/list.module.mjs} +5 -5
- package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
- package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
- package/{esm2015/modal/css-unit.pipe.js → esm2020/modal/css-unit.pipe.mjs} +4 -4
- package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
- package/{esm2015/modal/modal-control.service.js → esm2020/modal/modal-control.service.mjs} +4 -4
- package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
- package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
- package/esm2020/modal/modal.component.mjs +501 -0
- package/{esm2015/modal/modal.directive.js → esm2020/modal/modal.directive.mjs} +13 -13
- package/{esm2015/modal/modal.module.js → esm2020/modal/modal.module.mjs} +5 -5
- package/{esm2015/modal/modal.service.js → esm2020/modal/modal.service.mjs} +4 -4
- package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
- package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
- package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
- package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
- package/esm2020/navbar/navbar-item.component.mjs +577 -0
- package/esm2020/navbar/navbar.component.mjs +237 -0
- package/esm2020/navbar/navbar.module.mjs +92 -0
- package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
- package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
- package/{esm2015/navbar/vertical-navbar.animation.js → esm2020/navbar/vertical-navbar.animation.mjs} +2 -2
- package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
- package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
- package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
- package/esm2020/popover/popover-confirm.component.mjs +108 -0
- package/esm2020/popover/popover.component.mjs +253 -0
- package/{esm2015/popover/popover.module.js → esm2020/popover/popover.module.mjs} +5 -5
- package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
- package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
- package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
- package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
- package/{esm2015/progress-bar/progress-bar.module.js → esm2020/progress-bar/progress-bar.module.mjs} +5 -5
- package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
- package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
- package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
- package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
- package/{esm2015/progress-spinner/progress-spinner.module.js → esm2020/progress-spinner/progress-spinner.module.mjs} +5 -5
- package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
- package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
- package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
- package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
- package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
- package/esm2020/radio/radio.component.mjs +458 -0
- package/{esm2015/radio/radio.module.js → esm2020/radio/radio.module.mjs} +5 -5
- package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
- package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
- package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
- package/esm2020/select/select.component.mjs +1110 -0
- package/{esm2015/select/select.module.js → esm2020/select/select.module.mjs} +5 -5
- package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
- package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
- package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
- package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
- package/esm2020/sidebar/sidebar.component.mjs +146 -0
- package/{esm2015/sidebar/sidebar.module.js → esm2020/sidebar/sidebar.module.mjs} +5 -5
- package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
- package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
- package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
- package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
- package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
- package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
- package/{esm2015/sidepanel/sidepanel-directives.js → esm2020/sidepanel/sidepanel-directives.mjs} +16 -16
- package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
- package/{esm2015/sidepanel/sidepanel.module.js → esm2020/sidepanel/sidepanel.module.mjs} +5 -5
- package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
- package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
- package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
- package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
- package/esm2020/splitter/splitter.component.mjs +480 -0
- package/esm2020/splitter/splitter.module.mjs +40 -0
- package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
- package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
- package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
- package/{esm2015/table/table.component.js → esm2020/table/table.component.mjs} +4 -4
- package/{esm2015/table/table.module.js → esm2020/table/table.module.mjs} +5 -5
- package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
- package/esm2020/tabs/paginated-tab-header.mjs +479 -0
- package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
- package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
- package/esm2020/tabs/tab-body.component.mjs +178 -0
- package/{esm2015/tabs/tab-content.directive.js → esm2020/tabs/tab-content.directive.mjs} +4 -4
- package/esm2020/tabs/tab-group.component.mjs +350 -0
- package/esm2020/tabs/tab-header.component.mjs +67 -0
- package/{esm2015/tabs/tab-label-wrapper.directive.js → esm2020/tabs/tab-label-wrapper.directive.mjs} +4 -4
- package/{esm2015/tabs/tab-label.directive.js → esm2020/tabs/tab-label.directive.mjs} +4 -4
- package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
- package/{esm2015/tabs/tab.component.js → esm2020/tabs/tab.component.mjs} +4 -4
- package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
- package/{esm2015/tabs/tabs.module.js → esm2020/tabs/tabs.module.mjs} +5 -5
- package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
- package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
- package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
- package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
- package/{esm2015/tags/tag-input.js → esm2020/tags/tag-input.mjs} +4 -4
- package/esm2020/tags/tag-list.component.mjs +722 -0
- package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
- package/esm2020/tags/tag.component.mjs +374 -0
- package/{esm2015/tags/tag.module.js → esm2020/tags/tag.module.mjs} +5 -5
- package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
- package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
- package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
- package/{esm2015/textarea/textarea.component.js → esm2020/textarea/textarea.component.mjs} +4 -4
- package/{esm2015/textarea/textarea.module.js → esm2020/textarea/textarea.module.mjs} +5 -5
- package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
- package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
- package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
- package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
- package/esm2020/timepicker/timepicker.directive.mjs +653 -0
- package/{esm2015/timepicker/timepicker.module.js → esm2020/timepicker/timepicker.module.mjs} +5 -5
- package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
- package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
- package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
- package/esm2020/toggle/toggle.component.mjs +158 -0
- package/{esm2015/toggle/toggle.module.js → esm2020/toggle/toggle.module.mjs} +5 -5
- package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
- package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
- package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
- package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
- package/esm2020/tooltip/tooltip.component.mjs +291 -0
- package/{esm2015/tooltip/tooltip.module.js → esm2020/tooltip/tooltip.module.mjs} +5 -5
- package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
- package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
- package/{esm2015/tree/data-source/flat-data-source.js → esm2020/tree/data-source/flat-data-source.mjs} +0 -0
- package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
- package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
- package/{esm2015/tree/node.js → esm2020/tree/node.mjs} +4 -4
- package/{esm2015/tree/outlet.js → esm2020/tree/outlet.mjs} +4 -4
- package/esm2020/tree/padding.directive.mjs +110 -0
- package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
- package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
- package/esm2020/tree/toggle.mjs +80 -0
- package/{esm2015/tree/tree-base.js → esm2020/tree/tree-base.mjs} +7 -7
- package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
- package/esm2020/tree/tree-option.component.mjs +226 -0
- package/esm2020/tree/tree-selection.component.mjs +530 -0
- package/esm2020/tree/tree.mjs +15 -0
- package/{esm2015/tree/tree.module.js → esm2020/tree/tree.module.mjs} +5 -5
- package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
- package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
- package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
- package/{esm2015/tree-select/tree-select.component.js → esm2020/tree-select/tree-select.component.mjs} +12 -23
- package/{esm2015/tree-select/tree-select.module.js → esm2020/tree-select/tree-select.module.mjs} +5 -5
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
- package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-card.js → ptsecurity-mosaic-card.mjs} +10 -18
- package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-core.js → ptsecurity-mosaic-core.mjs} +158 -181
- package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-design-tokens.js → ptsecurity-mosaic-design-tokens.mjs} +13 -10
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
- package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
- package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
- package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-link.js → ptsecurity-mosaic-link.mjs} +8 -8
- package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-list.mjs +796 -0
- package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-modal.mjs +842 -0
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +1025 -0
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
- package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +76 -0
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
- package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-sidebar.js → ptsecurity-mosaic-sidebar.mjs} +16 -25
- package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-splitter.mjs +524 -0
- package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-table.js → ptsecurity-mosaic-table.mjs} +8 -8
- package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tags.mjs +1372 -0
- package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
- package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic-toggle.js → ptsecurity-mosaic-toggle.mjs} +12 -23
- package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs +362 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +932 -0
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tree.mjs +1707 -0
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
- package/fesm2015/{ptsecurity-mosaic.js → ptsecurity-mosaic.mjs} +1 -1
- package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-autocomplete.js → fesm2020/ptsecurity-mosaic-autocomplete.mjs} +17 -26
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-button-toggle.js → fesm2020/ptsecurity-mosaic-button-toggle.mjs} +15 -23
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
- package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
- package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-checkbox.js → fesm2020/ptsecurity-mosaic-checkbox.mjs} +13 -23
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-core.mjs +2688 -0
- package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-datepicker.js → fesm2020/ptsecurity-mosaic-datepicker.mjs} +77 -121
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +939 -0
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
- package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-dropdown.js → fesm2020/ptsecurity-mosaic-dropdown.mjs} +29 -52
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
- package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-input.js → fesm2020/ptsecurity-mosaic-input.mjs} +20 -20
- package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
- package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-list.js → fesm2020/ptsecurity-mosaic-list.mjs} +30 -67
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-modal.js → fesm2020/ptsecurity-mosaic-modal.mjs} +45 -52
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +1009 -0
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
- package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-radio.js → fesm2020/ptsecurity-mosaic-radio.mjs} +13 -22
- package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-select.js → fesm2020/ptsecurity-mosaic-select.mjs} +23 -35
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-sidepanel.js → fesm2020/ptsecurity-mosaic-sidepanel.mjs} +32 -37
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-splitter.mjs +524 -0
- package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
- package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-tabs.js → fesm2020/ptsecurity-mosaic-tabs.mjs} +65 -102
- package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-tags.js → fesm2020/ptsecurity-mosaic-tags.mjs} +28 -47
- package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-textarea.js → fesm2020/ptsecurity-mosaic-textarea.mjs} +8 -8
- package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-timepicker.js → fesm2020/ptsecurity-mosaic-timepicker.mjs} +12 -12
- package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
- package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs +354 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-tree-select.js → fesm2020/ptsecurity-mosaic-tree-select.mjs} +16 -27
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-tree.js → fesm2020/ptsecurity-mosaic-tree.mjs} +59 -100
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic.mjs +4 -0
- package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
- package/form-field/README.md +0 -0
- package/form-field/package.json +5 -5
- package/icon/README.md +0 -0
- package/icon/package.json +5 -5
- package/input/package.json +5 -5
- package/link/README.md +0 -0
- package/link/package.json +5 -5
- package/list/README.md +0 -0
- package/list/package.json +5 -5
- package/modal/README.md +34 -0
- package/modal/package.json +5 -5
- package/navbar/README.md +41 -0
- package/navbar/navbar-item.component.d.ts +122 -34
- package/navbar/navbar.component.d.ts +37 -9
- package/navbar/navbar.module.d.ts +2 -1
- package/navbar/package.json +5 -5
- package/navbar/vertical-navbar.component.d.ts +15 -26
- package/package.json +299 -14
- package/popover/README.md +32 -0
- package/popover/package.json +5 -5
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/progress-bar/README.md +0 -0
- package/progress-bar/package.json +5 -5
- package/progress-spinner/README.md +0 -0
- package/progress-spinner/package.json +5 -5
- package/radio/package.json +5 -5
- package/schematics/README.md +35 -0
- package/schematics/ng-update/data/index.d.ts +1 -0
- package/schematics/ng-update/data/index.js +10 -9
- package/schematics/ng-update/data/index.js.map +1 -1
- package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
- package/schematics/ng-update/data/symbol-removal.js +5 -0
- package/schematics/ng-update/data/symbol-removal.js.map +1 -0
- package/schematics/ng-update/index.js +3 -3
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
- package/schematics/ng-update/upgrade-data.js +2 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/tsconfig.lib.json +2 -2
- package/select/README.md +0 -0
- package/select/package.json +5 -5
- package/sidebar/package.json +5 -5
- package/sidepanel/package.json +5 -5
- package/splitter/package.json +5 -5
- package/splitter/splitter.component.d.ts +41 -3
- package/splitter/splitter.module.d.ts +1 -1
- package/table/README.md +0 -0
- package/table/package.json +5 -5
- package/tabs/README.md +0 -0
- package/tabs/package.json +5 -5
- package/tags/README.md +0 -0
- package/tags/package.json +5 -5
- package/textarea/README.md +0 -0
- package/textarea/package.json +5 -5
- package/timepicker/README.md +0 -0
- package/timepicker/package.json +5 -5
- package/toggle/package.json +5 -5
- package/tooltip/package.json +5 -5
- package/tree/package.json +5 -5
- package/tree-select/README.md +0 -0
- package/tree-select/package.json +5 -5
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1160
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -755
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button.umd.js +0 -533
- package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-card.umd.js +0 -479
- package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -762
- package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-core.umd.js +0 -2843
- package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3355
- package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1871
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-divider.umd.js +0 -106
- package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1532
- package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -788
- package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-icon.umd.js +0 -450
- package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-input.umd.js +0 -1008
- package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-link.umd.js +0 -515
- package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-list.umd.js +0 -1256
- package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1312
- package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -930
- package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-popover.umd.js +0 -836
- package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -440
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -448
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-radio.umd.js +0 -901
- package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-select.umd.js +0 -1606
- package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -254
- package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -954
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -448
- package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-table.umd.js +0 -81
- package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2013
- package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1912
- package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -664
- package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -821
- package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -557
- package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -777
- package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1368
- package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2301
- package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic.umd.js +0 -11
- package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
- package/esm2015/autocomplete/autocomplete.component.js +0 -163
- package/esm2015/button/button.component.js +0 -129
- package/esm2015/button/button.module.js +0 -42
- package/esm2015/button-toggle/button-toggle.component.js +0 -370
- package/esm2015/card/card.component.js +0 -88
- package/esm2015/checkbox/checkbox.js +0 -325
- package/esm2015/core/formatters/date/formatter.js +0 -288
- package/esm2015/core/formatters/date/templates/en-US.js +0 -280
- package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
- package/esm2015/core/formatters/number/formatter.js +0 -99
- package/esm2015/core/option/action.js +0 -131
- package/esm2015/core/option/optgroup.js +0 -40
- package/esm2015/core/option/option.js +0 -262
- package/esm2015/core/pop-up/pop-up-trigger.js +0 -241
- package/esm2015/core/pop-up/pop-up.js +0 -87
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
- package/esm2015/datepicker/calendar-body.component.js +0 -114
- package/esm2015/datepicker/calendar.component.js +0 -377
- package/esm2015/datepicker/datepicker-input.directive.js +0 -885
- package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
- package/esm2015/datepicker/datepicker.component.js +0 -418
- package/esm2015/dropdown/dropdown-item.component.js +0 -149
- package/esm2015/dropdown/dropdown-trigger.directive.js +0 -486
- package/esm2015/dropdown/dropdown.component.js +0 -302
- package/esm2015/form-field/form-field.js +0 -224
- package/esm2015/icon/icon.component.js +0 -51
- package/esm2015/link/link.component.js +0 -108
- package/esm2015/list/list-selection.component.js +0 -716
- package/esm2015/list/list.component.js +0 -58
- package/esm2015/modal/modal.component.js +0 -508
- package/esm2015/navbar/navbar-item.component.js +0 -209
- package/esm2015/navbar/navbar.component.js +0 -118
- package/esm2015/navbar/navbar.module.js +0 -76
- package/esm2015/navbar/vertical-navbar.component.js +0 -140
- package/esm2015/popover/popover-confirm.component.js +0 -116
- package/esm2015/popover/popover.component.js +0 -262
- package/esm2015/progress-bar/progress-bar.component.js +0 -50
- package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
- package/esm2015/radio/radio.component.js +0 -467
- package/esm2015/select/select.component.js +0 -1122
- package/esm2015/sidebar/sidebar.component.js +0 -155
- package/esm2015/sidepanel/sidepanel-container.component.js +0 -114
- package/esm2015/sidepanel/sidepanel.service.js +0 -164
- package/esm2015/splitter/splitter.component.js +0 -342
- package/esm2015/splitter/splitter.module.js +0 -38
- package/esm2015/tabs/paginated-tab-header.js +0 -482
- package/esm2015/tabs/tab-body.component.js +0 -186
- package/esm2015/tabs/tab-group.component.js +0 -359
- package/esm2015/tabs/tab-header.component.js +0 -76
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
- package/esm2015/tags/tag-list.component.js +0 -732
- package/esm2015/tags/tag.component.js +0 -383
- package/esm2015/timepicker/timepicker.directive.js +0 -653
- package/esm2015/toggle/toggle.component.js +0 -169
- package/esm2015/tooltip/tooltip.component.js +0 -299
- package/esm2015/tree/padding.directive.js +0 -111
- package/esm2015/tree/toggle.js +0 -89
- package/esm2015/tree/tree-option.component.js +0 -238
- package/esm2015/tree/tree-selection.component.js +0 -541
- package/esm2015/tree/tree.js +0 -23
- package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-button.js +0 -174
- package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
- package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-form-field.js +0 -396
- package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
- package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
- package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-popover.js +0 -406
- package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-progress-bar.js +0 -84
- package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
- package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-splitter.js +0 -384
- package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -362
- package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
- package/fesm2015/ptsecurity-mosaic.js.map +0 -1
@@ -0,0 +1,1511 @@
|
|
1
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
2
|
+
import { FocusKeyManager, A11yModule } from '@angular/cdk/a11y';
|
3
|
+
import * as i7 from '@angular/cdk/portal';
|
4
|
+
import { CdkPortalOutlet, CdkPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
5
|
+
import * as i3$1 from '@angular/common';
|
6
|
+
import { CommonModule } from '@angular/common';
|
7
|
+
import * as i0 from '@angular/core';
|
8
|
+
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Input, Output, ViewChild, forwardRef, Directive, Inject, InjectionToken, TemplateRef, ContentChild, ContentChildren, Attribute, NgModule } from '@angular/core';
|
9
|
+
import { mixinDisabled, PopUpPlacements, mixinTabIndex, McCommonModule } from '@ptsecurity/mosaic/core';
|
10
|
+
import * as i4 from '@ptsecurity/mosaic/icon';
|
11
|
+
import { McIconModule } from '@ptsecurity/mosaic/icon';
|
12
|
+
import * as i6 from '@ptsecurity/mosaic/tooltip';
|
13
|
+
import { McToolTipModule } from '@ptsecurity/mosaic/tooltip';
|
14
|
+
import { Subscription, Subject, fromEvent, of, merge, timer } from 'rxjs';
|
15
|
+
import { startWith, takeUntil, debounceTime, delay } from 'rxjs/operators';
|
16
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
17
|
+
import * as i3 from '@angular/cdk/bidi';
|
18
|
+
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
19
|
+
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
20
|
+
import { hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
|
21
|
+
import * as i2 from '@angular/cdk/platform';
|
22
|
+
import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
23
|
+
import { HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW } from '@ptsecurity/cdk/keycodes';
|
24
|
+
import * as i1 from '@angular/cdk/scrolling';
|
25
|
+
|
26
|
+
const mcTabsAnimations = {
|
27
|
+
/** Animation translates a tab along the X axis. */
|
28
|
+
translateTab: trigger('translateTab', [
|
29
|
+
// Note: transitions to `none` instead of 0, because some browsers might blur the content.
|
30
|
+
state('center, void, left-origin-center, right-origin-center', style({ transform: 'none' })),
|
31
|
+
// If the tab is either on the left or right, we additionally add a `min-height` of 1px
|
32
|
+
// in order to ensure that the element has a height before its state changes. This is
|
33
|
+
// necessary because Chrome does seem to skip the transition in RTL mode if the element does
|
34
|
+
// not have a static height and is not rendered. See related issue: #9465
|
35
|
+
state('left', style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
|
36
|
+
state('right', style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
|
37
|
+
transition('* => left, * => right, left => center, right => center', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
|
38
|
+
transition('void => left-origin-center', [
|
39
|
+
style({ transform: 'translate3d(-100%, 0, 0)' }),
|
40
|
+
animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
41
|
+
]),
|
42
|
+
transition('void => right-origin-center', [
|
43
|
+
style({ transform: 'translate3d(100%, 0, 0)' }),
|
44
|
+
animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
45
|
+
])
|
46
|
+
])
|
47
|
+
};
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Wrapper for the contents of a tab.
|
51
|
+
* @docs-private
|
52
|
+
*/
|
53
|
+
class McTabBody {
|
54
|
+
constructor(elementRef, dir, changeDetectorRef) {
|
55
|
+
this.elementRef = elementRef;
|
56
|
+
this.dir = dir;
|
57
|
+
/** Event emitted when the tab begins to animate towards the center as the active tab. */
|
58
|
+
this.onCentering = new EventEmitter();
|
59
|
+
/** Event emitted before the centering of the tab begins. */
|
60
|
+
this.beforeCentering = new EventEmitter();
|
61
|
+
/** Event emitted before the centering of the tab begins. */
|
62
|
+
this.afterLeavingCenter = new EventEmitter();
|
63
|
+
/** Event emitted when the tab completes its animation towards the center. */
|
64
|
+
this.onCentered = new EventEmitter(true);
|
65
|
+
// Note that the default value will always be overwritten by `McTabBody`, but we need one
|
66
|
+
// anyway to prevent the animations module from throwing an error if the body is used on its own.
|
67
|
+
/** Duration for the tab's animation. */
|
68
|
+
this.animationDuration = '0ms';
|
69
|
+
/** Subscription to the directionality change observable. */
|
70
|
+
this.dirChangeSubscription = Subscription.EMPTY;
|
71
|
+
if (this.dir && changeDetectorRef) {
|
72
|
+
this.dirChangeSubscription = this.dir.change
|
73
|
+
.subscribe((direction) => {
|
74
|
+
this.computePositionAnimationState(direction);
|
75
|
+
changeDetectorRef.markForCheck();
|
76
|
+
});
|
77
|
+
}
|
78
|
+
}
|
79
|
+
/** The shifted index position of the tab body, where zero represents the active center tab. */
|
80
|
+
set position(position) {
|
81
|
+
this.positionIndex = position;
|
82
|
+
this.computePositionAnimationState();
|
83
|
+
}
|
84
|
+
/**
|
85
|
+
* After initialized, check if the content is centered and has an origin. If so, set the
|
86
|
+
* special position states that transition the tab from the left or right before centering.
|
87
|
+
*/
|
88
|
+
ngOnInit() {
|
89
|
+
if (this.bodyPosition === 'center' && this.origin != null) {
|
90
|
+
this.bodyPosition = this.computePositionFromOrigin();
|
91
|
+
}
|
92
|
+
}
|
93
|
+
ngOnDestroy() {
|
94
|
+
this.dirChangeSubscription.unsubscribe();
|
95
|
+
}
|
96
|
+
onTranslateTabStarted(e) {
|
97
|
+
const isCentering = this.isCenterPosition(e.toState);
|
98
|
+
this.beforeCentering.emit(isCentering);
|
99
|
+
if (isCentering) {
|
100
|
+
this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
onTranslateTabComplete(e) {
|
104
|
+
// If the transition to the center is complete, emit an event.
|
105
|
+
if (this.isCenterPosition(e.toState) && this.isCenterPosition(this.bodyPosition)) {
|
106
|
+
this.onCentered.emit();
|
107
|
+
}
|
108
|
+
if (this.isCenterPosition(e.fromState) && !this.isCenterPosition(this.bodyPosition)) {
|
109
|
+
this.afterLeavingCenter.emit();
|
110
|
+
}
|
111
|
+
}
|
112
|
+
/** The text direction of the containing app. */
|
113
|
+
getLayoutDirection() {
|
114
|
+
return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
|
115
|
+
}
|
116
|
+
/** Whether the provided position state is considered center, regardless of origin. */
|
117
|
+
isCenterPosition(position) {
|
118
|
+
return position === 'center' || position === 'left-origin-center' || position === 'right-origin-center';
|
119
|
+
}
|
120
|
+
/** Computes the position state that will be used for the tab-body animation trigger. */
|
121
|
+
computePositionAnimationState(dir = this.getLayoutDirection()) {
|
122
|
+
if (this.positionIndex < 0) {
|
123
|
+
this.bodyPosition = dir === 'ltr' ? 'left' : 'right';
|
124
|
+
}
|
125
|
+
else if (this.positionIndex > 0) {
|
126
|
+
this.bodyPosition = dir === 'ltr' ? 'right' : 'left';
|
127
|
+
}
|
128
|
+
else {
|
129
|
+
this.bodyPosition = 'center';
|
130
|
+
}
|
131
|
+
}
|
132
|
+
/**
|
133
|
+
* Computes the position state based on the specified origin position. This is used if the
|
134
|
+
* tab is becoming visible immediately after creation.
|
135
|
+
*/
|
136
|
+
computePositionFromOrigin() {
|
137
|
+
const dir = this.getLayoutDirection();
|
138
|
+
if ((dir === 'ltr' && this.origin <= 0) || (dir === 'rtl' && this.origin > 0)) {
|
139
|
+
return 'left-origin-center';
|
140
|
+
}
|
141
|
+
return 'right-origin-center';
|
142
|
+
}
|
143
|
+
}
|
144
|
+
/** @nocollapse */ /** @nocollapse */ McTabBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabBody, deps: [{ token: i0.ElementRef }, { token: i3.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
145
|
+
/** @nocollapse */ /** @nocollapse */ McTabBody.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTabBody, selector: "mc-tab-body", inputs: { position: "position", content: "content", origin: "origin", animationDuration: "animationDuration" }, outputs: { onCentering: "onCentering", beforeCentering: "beforeCentering", afterLeavingCenter: "afterLeavingCenter", onCentered: "onCentered" }, host: { classAttribute: "mc-tab-body" }, viewQueries: [{ propertyName: "portalHost", first: true, predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: "<div class=\"mc-tab-body__content\"\n #content\n [@translateTab]=\"{\n value: bodyPosition,\n params: {animationDuration: animationDuration}\n }\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\n <ng-template mcTabBodyHost></ng-template>\n</div>\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"], directives: [{ type: i0.forwardRef(function () { return McTabBodyPortal; }), selector: "[mcTabBodyHost]" }], animations: [mcTabsAnimations.translateTab], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabBody, decorators: [{
|
147
|
+
type: Component,
|
148
|
+
args: [{ selector: 'mc-tab-body', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [mcTabsAnimations.translateTab], host: {
|
149
|
+
class: 'mc-tab-body'
|
150
|
+
}, template: "<div class=\"mc-tab-body__content\"\n #content\n [@translateTab]=\"{\n value: bodyPosition,\n params: {animationDuration: animationDuration}\n }\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\">\n <ng-template mcTabBodyHost></ng-template>\n</div>\n", styles: [".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}\n"] }]
|
151
|
+
}], ctorParameters: function () {
|
152
|
+
return [{ type: i0.ElementRef }, { type: i3.Directionality, decorators: [{
|
153
|
+
type: Optional
|
154
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
155
|
+
}, propDecorators: { position: [{
|
156
|
+
type: Input
|
157
|
+
}], onCentering: [{
|
158
|
+
type: Output
|
159
|
+
}], beforeCentering: [{
|
160
|
+
type: Output
|
161
|
+
}], afterLeavingCenter: [{
|
162
|
+
type: Output
|
163
|
+
}], onCentered: [{
|
164
|
+
type: Output
|
165
|
+
}], portalHost: [{
|
166
|
+
type: ViewChild,
|
167
|
+
args: [CdkPortalOutlet, { static: false }]
|
168
|
+
}], content: [{
|
169
|
+
type: Input,
|
170
|
+
args: ['content']
|
171
|
+
}], origin: [{
|
172
|
+
type: Input
|
173
|
+
}], animationDuration: [{
|
174
|
+
type: Input
|
175
|
+
}] } });
|
176
|
+
/**
|
177
|
+
* The portal host directive for the contents of the tab.
|
178
|
+
* @docs-private
|
179
|
+
*/
|
180
|
+
class McTabBodyPortal extends CdkPortalOutlet {
|
181
|
+
constructor(componentFactoryResolver, viewContainerRef, host) {
|
182
|
+
super(componentFactoryResolver, viewContainerRef);
|
183
|
+
this.host = host;
|
184
|
+
/** Subscription to events for when the tab body begins centering. */
|
185
|
+
this.centeringSub = Subscription.EMPTY;
|
186
|
+
/** Subscription to events for when the tab body finishes leaving from center position. */
|
187
|
+
this.leavingSub = Subscription.EMPTY;
|
188
|
+
}
|
189
|
+
/** Set initial visibility or set up subscription for changing visibility. */
|
190
|
+
ngOnInit() {
|
191
|
+
super.ngOnInit();
|
192
|
+
this.centeringSub = this.host.beforeCentering
|
193
|
+
.pipe(startWith(this.host.isCenterPosition(this.host.bodyPosition)))
|
194
|
+
.subscribe((isCentering) => {
|
195
|
+
if (isCentering && !this.hasAttached()) {
|
196
|
+
this.attach(this.host.content);
|
197
|
+
}
|
198
|
+
});
|
199
|
+
this.leavingSub = this.host.afterLeavingCenter
|
200
|
+
.subscribe(() => { this.detach(); });
|
201
|
+
}
|
202
|
+
/** Clean up centering subscription. */
|
203
|
+
ngOnDestroy() {
|
204
|
+
super.ngOnDestroy();
|
205
|
+
this.centeringSub.unsubscribe();
|
206
|
+
this.leavingSub.unsubscribe();
|
207
|
+
}
|
208
|
+
}
|
209
|
+
/** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabBodyPortal, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: forwardRef(() => McTabBody) }], target: i0.ɵɵFactoryTarget.Directive });
|
210
|
+
/** @nocollapse */ /** @nocollapse */ McTabBodyPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTabBodyPortal, selector: "[mcTabBodyHost]", usesInheritance: true, ngImport: i0 });
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabBodyPortal, decorators: [{
|
212
|
+
type: Directive,
|
213
|
+
args: [{
|
214
|
+
selector: '[mcTabBodyHost]'
|
215
|
+
}]
|
216
|
+
}], ctorParameters: function () {
|
217
|
+
return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: McTabBody, decorators: [{
|
218
|
+
type: Inject,
|
219
|
+
args: [forwardRef(() => McTabBody)]
|
220
|
+
}] }];
|
221
|
+
} });
|
222
|
+
|
223
|
+
/** Decorates the `ng-template` tags and reads out the template from it. */
|
224
|
+
class McTabContent {
|
225
|
+
constructor(template) {
|
226
|
+
this.template = template;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
/** @nocollapse */ /** @nocollapse */ McTabContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
230
|
+
/** @nocollapse */ /** @nocollapse */ McTabContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTabContent, selector: "[mcTabContent]", ngImport: i0 });
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabContent, decorators: [{
|
232
|
+
type: Directive,
|
233
|
+
args: [{ selector: '[mcTabContent]' }]
|
234
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
235
|
+
|
236
|
+
const MC_TAB_LABEL = new InjectionToken('McTabLabel');
|
237
|
+
/** Used to flag tab labels for use with the portal directive */
|
238
|
+
class McTabLabel extends CdkPortal {
|
239
|
+
}
|
240
|
+
/** @nocollapse */ /** @nocollapse */ McTabLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
241
|
+
/** @nocollapse */ /** @nocollapse */ McTabLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTabLabel, selector: "[mc-tab-label], [mcTabLabel]", providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }], usesInheritance: true, ngImport: i0 });
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLabel, decorators: [{
|
243
|
+
type: Directive,
|
244
|
+
args: [{
|
245
|
+
selector: '[mc-tab-label], [mcTabLabel]',
|
246
|
+
providers: [{ provide: MC_TAB_LABEL, useExisting: McTabLabel }]
|
247
|
+
}]
|
248
|
+
}] });
|
249
|
+
|
250
|
+
class McTabBase {
|
251
|
+
}
|
252
|
+
// tslint:disable-next-line:naming-convention
|
253
|
+
const McTabMixinBase = mixinDisabled(McTabBase);
|
254
|
+
class McTab extends McTabMixinBase {
|
255
|
+
constructor(viewContainerRef) {
|
256
|
+
super();
|
257
|
+
this.viewContainerRef = viewContainerRef;
|
258
|
+
this._tooltipTitle = '';
|
259
|
+
this.tooltipPlacement = PopUpPlacements.Right;
|
260
|
+
/** Plain text label for the tab, used when there is no template label. */
|
261
|
+
this.textLabel = '';
|
262
|
+
this.empty = false;
|
263
|
+
/** Emits whenever the internal state of the tab changes. */
|
264
|
+
this.stateChanges = new Subject();
|
265
|
+
/**
|
266
|
+
* The relatively indexed position where 0 represents the center, negative is left, and positive
|
267
|
+
* represents the right.
|
268
|
+
*/
|
269
|
+
this.position = null;
|
270
|
+
/**
|
271
|
+
* The initial relatively index origin of the tab if it was created and selected after there
|
272
|
+
* was already a selected tab. Provides context of what position the tab should originate from.
|
273
|
+
*/
|
274
|
+
this.origin = null;
|
275
|
+
/**
|
276
|
+
* Whether the tab is currently active.
|
277
|
+
*/
|
278
|
+
this.isActive = false;
|
279
|
+
this._overflowTooltipTitle = '';
|
280
|
+
/** Portal that will be the hosted content of the tab */
|
281
|
+
this.contentPortal = null;
|
282
|
+
}
|
283
|
+
/** @docs-private */
|
284
|
+
get content() {
|
285
|
+
return this.contentPortal;
|
286
|
+
}
|
287
|
+
get templateLabel() {
|
288
|
+
return this._templateLabel;
|
289
|
+
}
|
290
|
+
set templateLabel(value) {
|
291
|
+
this.setTemplateLabelInput(value);
|
292
|
+
}
|
293
|
+
get tooltipTitle() {
|
294
|
+
return this.overflowTooltipTitle + this._tooltipTitle;
|
295
|
+
}
|
296
|
+
set tooltipTitle(value) {
|
297
|
+
this._tooltipTitle = value;
|
298
|
+
}
|
299
|
+
get isOverflown() {
|
300
|
+
return !!this._overflowTooltipTitle;
|
301
|
+
}
|
302
|
+
get overflowTooltipTitle() {
|
303
|
+
if (this.isOverflown) {
|
304
|
+
return `${this._overflowTooltipTitle}\n`;
|
305
|
+
}
|
306
|
+
return '';
|
307
|
+
}
|
308
|
+
set overflowTooltipTitle(value) {
|
309
|
+
this._overflowTooltipTitle = value;
|
310
|
+
}
|
311
|
+
ngOnChanges(changes) {
|
312
|
+
if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
|
313
|
+
this.stateChanges.next();
|
314
|
+
}
|
315
|
+
}
|
316
|
+
ngOnDestroy() {
|
317
|
+
this.stateChanges.complete();
|
318
|
+
}
|
319
|
+
ngOnInit() {
|
320
|
+
this.contentPortal = new TemplatePortal(this.explicitContent || this.implicitContent, this.viewContainerRef);
|
321
|
+
}
|
322
|
+
/**
|
323
|
+
* This has been extracted to a util because of TS 4 and VE.
|
324
|
+
* View Engine doesn't support property rename inheritance.
|
325
|
+
* TS 4.0 doesn't allow properties to override accessors or vice-versa.
|
326
|
+
* @docs-private
|
327
|
+
*/
|
328
|
+
setTemplateLabelInput(value) {
|
329
|
+
// Only update the templateLabel via query if there is actually
|
330
|
+
// a McTabLabel found. This works around an issue where a user may have
|
331
|
+
// manually set `templateLabel` during creation mode, which would then get clobbered
|
332
|
+
// by `undefined` when this query resolves.
|
333
|
+
if (value) {
|
334
|
+
this._templateLabel = value;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|
338
|
+
/** @nocollapse */ /** @nocollapse */ McTab.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTab, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
339
|
+
/** @nocollapse */ /** @nocollapse */ McTab.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTab, selector: "mc-tab", inputs: { disabled: "disabled", tooltipTitle: "tooltipTitle", tooltipPlacement: "tooltipPlacement", textLabel: ["label", "textLabel"], empty: "empty", tabId: "tabId" }, queries: [{ propertyName: "templateLabel", first: true, predicate: MC_TAB_LABEL, descendants: true }, { propertyName: "explicitContent", first: true, predicate: McTabContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["mcTab"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content></ng-content></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTab, decorators: [{
|
341
|
+
type: Component,
|
342
|
+
args: [{
|
343
|
+
selector: 'mc-tab',
|
344
|
+
exportAs: 'mcTab',
|
345
|
+
// Create a template for the content of the <mc-tab> so that we can grab a reference to this
|
346
|
+
// TemplateRef and use it in a Portal to render the tab content in the appropriate place in the
|
347
|
+
// tab-group.
|
348
|
+
template: '<ng-template><ng-content></ng-content></ng-template>',
|
349
|
+
inputs: ['disabled'],
|
350
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
351
|
+
encapsulation: ViewEncapsulation.None
|
352
|
+
}]
|
353
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateLabel: [{
|
354
|
+
type: ContentChild,
|
355
|
+
args: [MC_TAB_LABEL]
|
356
|
+
}], explicitContent: [{
|
357
|
+
type: ContentChild,
|
358
|
+
args: [McTabContent, { read: TemplateRef, static: true }]
|
359
|
+
}], implicitContent: [{
|
360
|
+
type: ViewChild,
|
361
|
+
args: [TemplateRef, { static: true }]
|
362
|
+
}], tooltipTitle: [{
|
363
|
+
type: Input
|
364
|
+
}], tooltipPlacement: [{
|
365
|
+
type: Input
|
366
|
+
}], textLabel: [{
|
367
|
+
type: Input,
|
368
|
+
args: ['label']
|
369
|
+
}], empty: [{
|
370
|
+
type: Input
|
371
|
+
}], tabId: [{
|
372
|
+
type: Input,
|
373
|
+
args: ['tabId']
|
374
|
+
}] } });
|
375
|
+
|
376
|
+
/* tslint:disable:naming-convention */
|
377
|
+
/** Config used to bind passive event listeners */
|
378
|
+
const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
379
|
+
/**
|
380
|
+
* The distance in pixels that will be overshot when scrolling a tab label into view. This helps
|
381
|
+
* provide a small affordance to the label next to it.
|
382
|
+
*/
|
383
|
+
const EXAGGERATED_OVERSCROLL = 60;
|
384
|
+
/**
|
385
|
+
* Amount of milliseconds to wait before starting to scroll the header automatically.
|
386
|
+
* Set a little conservatively in order to handle fake events dispatched on touch devices.
|
387
|
+
*/
|
388
|
+
const HEADER_SCROLL_DELAY = 650;
|
389
|
+
/**
|
390
|
+
* Interval in milliseconds at which to scroll the header
|
391
|
+
* while the user is holding their pointer.
|
392
|
+
*/
|
393
|
+
const HEADER_SCROLL_INTERVAL = 100;
|
394
|
+
const VIEWPORT_THROTTLE_TIME = 150;
|
395
|
+
const SCROLL_DISTANCE = 0.8;
|
396
|
+
/**
|
397
|
+
* Base class for a tab header that supported pagination.
|
398
|
+
* @docs-private
|
399
|
+
*/
|
400
|
+
class McPaginatedTabHeader {
|
401
|
+
constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
|
402
|
+
this.elementRef = elementRef;
|
403
|
+
this.changeDetectorRef = changeDetectorRef;
|
404
|
+
this.viewportRuler = viewportRuler;
|
405
|
+
this.ngZone = ngZone;
|
406
|
+
this.platform = platform;
|
407
|
+
this.dir = dir;
|
408
|
+
this.animationMode = animationMode;
|
409
|
+
this._selectedIndex = 0;
|
410
|
+
/** The distance in pixels that the tab labels should be translated to the left. */
|
411
|
+
this._scrollDistance = 0;
|
412
|
+
/** Event emitted when the option is selected. */
|
413
|
+
this.selectFocusedIndex = new EventEmitter();
|
414
|
+
/** Event emitted when a label is focused. */
|
415
|
+
this.indexFocused = new EventEmitter();
|
416
|
+
/** Whether the controls for pagination should be displayed */
|
417
|
+
this.showPaginationControls = false;
|
418
|
+
/** Whether the tab list can be scrolled more towards the end of the tab label list. */
|
419
|
+
this.disableScrollAfter = true;
|
420
|
+
/** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
|
421
|
+
this.disableScrollBefore = true;
|
422
|
+
/**
|
423
|
+
* Whether pagination should be disabled. This can be used to avoid unnecessary
|
424
|
+
* layout recalculations if it's known that pagination won't be required.
|
425
|
+
*/
|
426
|
+
this.disablePagination = false;
|
427
|
+
/** Emits when the component is destroyed. */
|
428
|
+
this.destroyed = new Subject();
|
429
|
+
this.vertical = false;
|
430
|
+
/** Stream that will stop the automated scrolling. */
|
431
|
+
this.stopScrolling = new Subject();
|
432
|
+
/** Whether the header should scroll to the selected index after the view has been checked. */
|
433
|
+
this.selectedIndexChanged = false;
|
434
|
+
// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
|
435
|
+
ngZone.runOutsideAngular(() => {
|
436
|
+
fromEvent(elementRef.nativeElement, 'mouseleave')
|
437
|
+
.pipe(takeUntil(this.destroyed))
|
438
|
+
.subscribe(() => this.stopInterval());
|
439
|
+
});
|
440
|
+
}
|
441
|
+
/** The index of the active tab. */
|
442
|
+
get selectedIndex() {
|
443
|
+
return this._selectedIndex;
|
444
|
+
}
|
445
|
+
set selectedIndex(value) {
|
446
|
+
var _a;
|
447
|
+
const coercedValue = coerceNumberProperty(value);
|
448
|
+
this.selectedIndexChanged = this._selectedIndex !== coercedValue;
|
449
|
+
this._selectedIndex = coercedValue;
|
450
|
+
(_a = this.keyManager) === null || _a === void 0 ? void 0 : _a.updateActiveItem(coercedValue);
|
451
|
+
}
|
452
|
+
/** Tracks which element has focus; used for keyboard navigation */
|
453
|
+
get focusIndex() {
|
454
|
+
return this.keyManager ? this.keyManager.activeItemIndex : 0;
|
455
|
+
}
|
456
|
+
/** When the focus index is set, we must manually send focus to the correct label */
|
457
|
+
set focusIndex(value) {
|
458
|
+
if (!this.isValidIndex(value) || this.focusIndex === value || !this.keyManager) {
|
459
|
+
return;
|
460
|
+
}
|
461
|
+
this.keyManager.setActiveItem(value);
|
462
|
+
}
|
463
|
+
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
|
464
|
+
get scrollDistance() {
|
465
|
+
return this._scrollDistance;
|
466
|
+
}
|
467
|
+
set scrollDistance(v) {
|
468
|
+
this._scrollDistance = Math.max(0, Math.min(this.getMaxScrollDistance(), v));
|
469
|
+
// Mark that the scroll distance has changed so that after the view is checked, the CSS
|
470
|
+
// transformation can move the header.
|
471
|
+
this.scrollDistanceChanged = true;
|
472
|
+
this.checkScrollingControls();
|
473
|
+
}
|
474
|
+
/** Called when the user has selected an item via the keyboard. */
|
475
|
+
ngAfterViewInit() {
|
476
|
+
// We need to handle these events manually, because we want to bind passive event listeners.
|
477
|
+
fromEvent(this.previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
478
|
+
.pipe(takeUntil(this.destroyed))
|
479
|
+
.subscribe(() => this.handlePaginatorPress('before'));
|
480
|
+
fromEvent(this.nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)
|
481
|
+
.pipe(takeUntil(this.destroyed))
|
482
|
+
.subscribe(() => this.handlePaginatorPress('after'));
|
483
|
+
}
|
484
|
+
ngAfterContentInit() {
|
485
|
+
const dirChange = this.dir ? this.dir.change : of('ltr');
|
486
|
+
const resize = this.viewportRuler.change(VIEWPORT_THROTTLE_TIME);
|
487
|
+
const realign = () => {
|
488
|
+
this.updatePagination();
|
489
|
+
};
|
490
|
+
this.keyManager = new FocusKeyManager(this.items)
|
491
|
+
.withHorizontalOrientation(this.getLayoutDirection());
|
492
|
+
this.keyManager.updateActiveItem(this._selectedIndex);
|
493
|
+
// Defer the first call in order to allow for slower browsers to lay out the elements.
|
494
|
+
// This helps in cases where the user lands directly on a page with paginated tabs.
|
495
|
+
typeof requestAnimationFrame !== undefined ? requestAnimationFrame(realign) : realign();
|
496
|
+
// On dir change or window resize, realign the ink bar and update the orientation of
|
497
|
+
// the key manager if the direction has changed.
|
498
|
+
merge(dirChange, resize, this.items.changes)
|
499
|
+
.pipe(takeUntil(this.destroyed))
|
500
|
+
.subscribe(() => {
|
501
|
+
// We need to defer this to give the browser some time to recalculate
|
502
|
+
// the element dimensions. The call has to be wrapped in `NgZone.run`,
|
503
|
+
// because the viewport change handler runs outside of Angular.
|
504
|
+
this.ngZone.run(() => Promise.resolve().then(realign));
|
505
|
+
this.keyManager.withHorizontalOrientation(this.getLayoutDirection());
|
506
|
+
});
|
507
|
+
// If there is a change in the focus key manager we need to emit the `indexFocused`
|
508
|
+
// event in order to provide a public event that notifies about focus changes. Also we realign
|
509
|
+
// the tabs container by scrolling the new focused tab into the visible section.
|
510
|
+
this.keyManager.change
|
511
|
+
.pipe(takeUntil(this.destroyed))
|
512
|
+
.subscribe((newFocusIndex) => {
|
513
|
+
this.indexFocused.emit(newFocusIndex);
|
514
|
+
this.setTabFocus(newFocusIndex);
|
515
|
+
});
|
516
|
+
}
|
517
|
+
ngAfterContentChecked() {
|
518
|
+
// If the number of tab labels have changed, check if scrolling should be enabled
|
519
|
+
if (this.tabLabelCount !== this.items.length) {
|
520
|
+
this.updatePagination();
|
521
|
+
this.tabLabelCount = this.items.length;
|
522
|
+
this.changeDetectorRef.markForCheck();
|
523
|
+
}
|
524
|
+
// If the selected index has changed, scroll to the label and check if the scrolling controls
|
525
|
+
// should be disabled.
|
526
|
+
if (this.selectedIndexChanged) {
|
527
|
+
this.scrollToLabel(this._selectedIndex);
|
528
|
+
this.checkScrollingControls();
|
529
|
+
this.selectedIndexChanged = false;
|
530
|
+
this.changeDetectorRef.markForCheck();
|
531
|
+
}
|
532
|
+
// If the scroll distance has been changed (tab selected, focused, scroll controls activated),
|
533
|
+
// then translate the header to reflect this.
|
534
|
+
if (this.scrollDistanceChanged) {
|
535
|
+
this.updateTabScrollPosition();
|
536
|
+
this.scrollDistanceChanged = false;
|
537
|
+
this.changeDetectorRef.markForCheck();
|
538
|
+
}
|
539
|
+
}
|
540
|
+
ngOnDestroy() {
|
541
|
+
this.destroyed.next();
|
542
|
+
this.destroyed.complete();
|
543
|
+
this.stopScrolling.complete();
|
544
|
+
}
|
545
|
+
handleKeydown(event) {
|
546
|
+
// We don't handle any key bindings with a modifier key.
|
547
|
+
if (hasModifierKey(event)) {
|
548
|
+
return;
|
549
|
+
}
|
550
|
+
// tslint:disable-next-line: deprecation
|
551
|
+
const key = event.keyCode;
|
552
|
+
if (key === HOME) {
|
553
|
+
this.keyManager.setFirstItemActive();
|
554
|
+
}
|
555
|
+
else if (key === END) {
|
556
|
+
this.keyManager.setLastItemActive();
|
557
|
+
}
|
558
|
+
else if (key === UP_ARROW && this.vertical) {
|
559
|
+
this.keyManager.setPreviousItemActive();
|
560
|
+
}
|
561
|
+
else if (key === DOWN_ARROW && this.vertical) {
|
562
|
+
this.keyManager.setNextItemActive();
|
563
|
+
}
|
564
|
+
else if (key === RIGHT_ARROW && !this.vertical) {
|
565
|
+
this.keyManager.setNextItemActive();
|
566
|
+
}
|
567
|
+
else if (key === LEFT_ARROW && !this.vertical) {
|
568
|
+
this.keyManager.setPreviousItemActive();
|
569
|
+
}
|
570
|
+
else if ([ENTER, SPACE].includes(key)) {
|
571
|
+
this.selectFocusedIndex.emit(this.focusIndex);
|
572
|
+
}
|
573
|
+
if ([HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, SPACE, ENTER].includes(key)) {
|
574
|
+
event.preventDefault();
|
575
|
+
}
|
576
|
+
}
|
577
|
+
/**
|
578
|
+
* Callback for when the MutationObserver detects that the content has changed.
|
579
|
+
*/
|
580
|
+
onContentChanges() {
|
581
|
+
const textContent = this.elementRef.nativeElement.textContent;
|
582
|
+
// We need to diff the text content of the header, because the MutationObserver callback
|
583
|
+
// will fire even if the text content didn't change which is inefficient and is prone
|
584
|
+
// to infinite loops if a poorly constructed expression is passed in (see #14249).
|
585
|
+
if (textContent !== this.currentTextContent) {
|
586
|
+
this.currentTextContent = textContent || '';
|
587
|
+
// The content observer runs outside the `NgZone` by default, which
|
588
|
+
// means that we need to bring the callback back in ourselves.
|
589
|
+
this.ngZone.run(() => {
|
590
|
+
this.updatePagination();
|
591
|
+
this.changeDetectorRef.markForCheck();
|
592
|
+
});
|
593
|
+
}
|
594
|
+
}
|
595
|
+
/**
|
596
|
+
* Updates the view whether pagination should be enabled or not.
|
597
|
+
*
|
598
|
+
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
599
|
+
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
600
|
+
* page.
|
601
|
+
*/
|
602
|
+
updatePagination() {
|
603
|
+
this.checkPaginationEnabled();
|
604
|
+
this.checkScrollingControls();
|
605
|
+
this.updateTabScrollPosition();
|
606
|
+
}
|
607
|
+
/**
|
608
|
+
* Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
|
609
|
+
* providing a valid index and return true.
|
610
|
+
*/
|
611
|
+
isValidIndex(index) {
|
612
|
+
if (!this.items) {
|
613
|
+
return true;
|
614
|
+
}
|
615
|
+
const tab = this.items ? this.items.toArray()[index] : null;
|
616
|
+
return !!tab && !tab.disabled;
|
617
|
+
}
|
618
|
+
/**
|
619
|
+
* Sets focus on the HTML element for the label wrapper and scrolls it into the view if
|
620
|
+
* scrolling is enabled.
|
621
|
+
*/
|
622
|
+
setTabFocus(tabIndex) {
|
623
|
+
var _a;
|
624
|
+
if (this.showPaginationControls) {
|
625
|
+
this.scrollToLabel(tabIndex);
|
626
|
+
}
|
627
|
+
if ((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) {
|
628
|
+
this.items.toArray()[tabIndex].focus();
|
629
|
+
// Do not let the browser manage scrolling to focus the element, this will be handled
|
630
|
+
// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
|
631
|
+
// should be the full width minus the offset width.
|
632
|
+
const containerEl = this.tabListContainer.nativeElement;
|
633
|
+
const dir = this.getLayoutDirection();
|
634
|
+
if (dir === 'ltr') {
|
635
|
+
containerEl.scrollLeft = 0;
|
636
|
+
}
|
637
|
+
else {
|
638
|
+
containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
|
639
|
+
}
|
640
|
+
}
|
641
|
+
}
|
642
|
+
/** The layout direction of the containing app. */
|
643
|
+
getLayoutDirection() {
|
644
|
+
var _a;
|
645
|
+
return ((_a = this.dir) === null || _a === void 0 ? void 0 : _a.value) === 'rtl' ? 'rtl' : 'ltr';
|
646
|
+
}
|
647
|
+
/** Performs the CSS transformation on the tab list that will cause the list to scroll. */
|
648
|
+
updateTabScrollPosition() {
|
649
|
+
if (this.disablePagination) {
|
650
|
+
return;
|
651
|
+
}
|
652
|
+
const scrollDistance = this.scrollDistance;
|
653
|
+
const translateX = this.getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
|
654
|
+
// Don't use `translate3d` here because we don't want to create a new layer. A new layer
|
655
|
+
// seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
|
656
|
+
// and ripples will exceed the boundaries of the visible tab bar.
|
657
|
+
// See: https://github.com/angular/components/issues/10276
|
658
|
+
// We round the `transform` here, because transforms with sub-pixel precision cause some
|
659
|
+
// browsers to blur the content of the element.
|
660
|
+
this.tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
|
661
|
+
// Setting the `transform` on IE will change the scroll offset of the parent, causing the
|
662
|
+
// position to be thrown off in some cases. We have to reset it ourselves to ensure that
|
663
|
+
// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
|
664
|
+
// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
|
665
|
+
if (this.platform.TRIDENT || this.platform.EDGE) {
|
666
|
+
this.tabListContainer.nativeElement.scrollLeft = 0;
|
667
|
+
}
|
668
|
+
}
|
669
|
+
/**
|
670
|
+
* Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
|
671
|
+
* the end of the list, respectively). The distance to scroll is computed to be a third of the
|
672
|
+
* length of the tab list view window.
|
673
|
+
*
|
674
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
675
|
+
* should be called sparingly.
|
676
|
+
*/
|
677
|
+
scrollHeader(direction) {
|
678
|
+
const viewLength = this.tabListContainer.nativeElement.offsetWidth;
|
679
|
+
// Move the scroll distance one-third the length of the tab list's viewport.
|
680
|
+
const scrollAmount = (direction === 'before' ? -1 : 1) * viewLength * SCROLL_DISTANCE;
|
681
|
+
return this.scrollTo(this.scrollDistance + scrollAmount);
|
682
|
+
}
|
683
|
+
/** Handles click events on the pagination arrows. */
|
684
|
+
handlePaginatorClick(direction) {
|
685
|
+
this.stopInterval();
|
686
|
+
this.scrollHeader(direction);
|
687
|
+
}
|
688
|
+
/**
|
689
|
+
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
690
|
+
*
|
691
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
692
|
+
* should be called sparingly.
|
693
|
+
*/
|
694
|
+
scrollToLabel(labelIndex) {
|
695
|
+
if (this.disablePagination) {
|
696
|
+
return;
|
697
|
+
}
|
698
|
+
const selectedLabel = this.items ? this.items.toArray()[labelIndex] : null;
|
699
|
+
if (!selectedLabel) {
|
700
|
+
return;
|
701
|
+
}
|
702
|
+
// The view length is the visible width of the tab labels.
|
703
|
+
const viewLength = this.tabListContainer.nativeElement.offsetWidth;
|
704
|
+
const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;
|
705
|
+
let labelBeforePos;
|
706
|
+
let labelAfterPos;
|
707
|
+
if (this.getLayoutDirection() === 'ltr') {
|
708
|
+
labelBeforePos = offsetLeft;
|
709
|
+
labelAfterPos = labelBeforePos + offsetWidth;
|
710
|
+
}
|
711
|
+
else {
|
712
|
+
labelAfterPos = this.tabList.nativeElement.offsetWidth - offsetLeft;
|
713
|
+
labelBeforePos = labelAfterPos - offsetWidth;
|
714
|
+
}
|
715
|
+
const beforeVisiblePos = this.scrollDistance;
|
716
|
+
const afterVisiblePos = this.scrollDistance + viewLength;
|
717
|
+
if (labelBeforePos < beforeVisiblePos) {
|
718
|
+
// Scroll header to move label to the before direction
|
719
|
+
this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
|
720
|
+
}
|
721
|
+
else if (labelAfterPos > afterVisiblePos) {
|
722
|
+
// Scroll header to move label to the after direction
|
723
|
+
this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
|
724
|
+
}
|
725
|
+
}
|
726
|
+
/**
|
727
|
+
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
728
|
+
* tab list is wider than the size of the header container, then the pagination controls should
|
729
|
+
* be shown.
|
730
|
+
*
|
731
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
732
|
+
* should be called sparingly.
|
733
|
+
*/
|
734
|
+
checkPaginationEnabled() {
|
735
|
+
if (this.disablePagination || this.vertical) {
|
736
|
+
this.showPaginationControls = false;
|
737
|
+
}
|
738
|
+
else {
|
739
|
+
const isEnabled = this.tabList.nativeElement.scrollWidth > this.elementRef.nativeElement.offsetWidth;
|
740
|
+
if (!isEnabled) {
|
741
|
+
this.scrollDistance = 0;
|
742
|
+
}
|
743
|
+
if (isEnabled !== this.showPaginationControls) {
|
744
|
+
this.changeDetectorRef.markForCheck();
|
745
|
+
}
|
746
|
+
this.showPaginationControls = isEnabled;
|
747
|
+
}
|
748
|
+
}
|
749
|
+
/**
|
750
|
+
* Evaluate whether the before and after controls should be enabled or disabled.
|
751
|
+
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
752
|
+
* before button. If the header is at the end of the list (scroll distance is equal to the
|
753
|
+
* maximum distance we can scroll), then disable the after button.
|
754
|
+
*
|
755
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
756
|
+
* should be called sparingly.
|
757
|
+
*/
|
758
|
+
checkScrollingControls() {
|
759
|
+
if (this.disablePagination) {
|
760
|
+
this.disableScrollAfter = this.disableScrollBefore = true;
|
761
|
+
}
|
762
|
+
else {
|
763
|
+
// Check if the pagination arrows should be activated.
|
764
|
+
this.disableScrollBefore = this.scrollDistance === 0;
|
765
|
+
this.disableScrollAfter = this.scrollDistance === this.getMaxScrollDistance();
|
766
|
+
this.changeDetectorRef.markForCheck();
|
767
|
+
}
|
768
|
+
}
|
769
|
+
/**
|
770
|
+
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
771
|
+
* is equal to the difference in width between the tab list container and tab header container.
|
772
|
+
*
|
773
|
+
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
774
|
+
* should be called sparingly.
|
775
|
+
*/
|
776
|
+
getMaxScrollDistance() {
|
777
|
+
const lengthOfTabList = this.tabList.nativeElement.scrollWidth;
|
778
|
+
const viewLength = this.tabListContainer.nativeElement.offsetWidth;
|
779
|
+
return (lengthOfTabList - viewLength) || 0;
|
780
|
+
}
|
781
|
+
/** Stops the currently-running paginator interval. */
|
782
|
+
stopInterval() {
|
783
|
+
this.stopScrolling.next();
|
784
|
+
}
|
785
|
+
/**
|
786
|
+
* Handles the user pressing down on one of the paginators.
|
787
|
+
* Starts scrolling the header after a certain amount of time.
|
788
|
+
* @param direction In which direction the paginator should be scrolled.
|
789
|
+
*/
|
790
|
+
handlePaginatorPress(direction, mouseEvent) {
|
791
|
+
// Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to
|
792
|
+
// null check the `button`, but we do it so we don't break tests that use fake events.
|
793
|
+
if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
|
794
|
+
return;
|
795
|
+
}
|
796
|
+
// Avoid overlapping timers.
|
797
|
+
this.stopInterval();
|
798
|
+
// Start a timer after the delay and keep firing based on the interval.
|
799
|
+
timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
|
800
|
+
// Keep the timer going until something tells it to stop or the component is destroyed.
|
801
|
+
.pipe(takeUntil(merge(this.stopScrolling, this.destroyed)))
|
802
|
+
.subscribe(() => {
|
803
|
+
const { maxScrollDistance, distance } = this.scrollHeader(direction);
|
804
|
+
// Stop the timer if we've reached the start or the end.
|
805
|
+
if (distance === 0 || distance >= maxScrollDistance) {
|
806
|
+
this.stopInterval();
|
807
|
+
}
|
808
|
+
});
|
809
|
+
}
|
810
|
+
/**
|
811
|
+
* Scrolls the header to a given position.
|
812
|
+
* @param position Position to which to scroll.
|
813
|
+
* @returns Information on the current scroll distance and the maximum.
|
814
|
+
*/
|
815
|
+
scrollTo(position) {
|
816
|
+
if (this.disablePagination) {
|
817
|
+
return { maxScrollDistance: 0, distance: 0 };
|
818
|
+
}
|
819
|
+
const maxScrollDistance = this.getMaxScrollDistance();
|
820
|
+
this.scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
|
821
|
+
// Mark that the scroll distance has changed so that after the view is checked, the CSS
|
822
|
+
// transformation can move the header.
|
823
|
+
this.scrollDistanceChanged = true;
|
824
|
+
this.checkScrollingControls();
|
825
|
+
return { maxScrollDistance, distance: this.scrollDistance };
|
826
|
+
}
|
827
|
+
}
|
828
|
+
/** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPaginatedTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
829
|
+
/** @nocollapse */ /** @nocollapse */ McPaginatedTabHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McPaginatedTabHeader, inputs: { disablePagination: "disablePagination" }, ngImport: i0 });
|
830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPaginatedTabHeader, decorators: [{
|
831
|
+
type: Directive
|
832
|
+
}], ctorParameters: function () {
|
833
|
+
return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
|
834
|
+
type: Optional
|
835
|
+
}] }, { type: undefined, decorators: [{
|
836
|
+
type: Optional
|
837
|
+
}, {
|
838
|
+
type: Inject,
|
839
|
+
args: [ANIMATION_MODULE_TYPE]
|
840
|
+
}] }];
|
841
|
+
}, propDecorators: { disablePagination: [{
|
842
|
+
type: Input
|
843
|
+
}] } });
|
844
|
+
|
845
|
+
// Boilerplate for applying mixins to McTabLabelWrapper.
|
846
|
+
/** @docs-private */
|
847
|
+
class McTabLabelWrapperBase {
|
848
|
+
}
|
849
|
+
// tslint:disable-next-line:naming-convention
|
850
|
+
const McTabLabelWrapperMixinBase = mixinDisabled(McTabLabelWrapperBase);
|
851
|
+
/**
|
852
|
+
* Used in the `mc-tab-group` view to display tab labels.
|
853
|
+
* @docs-private
|
854
|
+
*/
|
855
|
+
class McTabLabelWrapper extends McTabLabelWrapperMixinBase {
|
856
|
+
constructor(elementRef, renderer) {
|
857
|
+
super();
|
858
|
+
this.elementRef = elementRef;
|
859
|
+
this.renderer = renderer;
|
860
|
+
}
|
861
|
+
ngAfterViewInit() {
|
862
|
+
this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
|
863
|
+
}
|
864
|
+
/** Sets focus on the wrapper element */
|
865
|
+
focus() {
|
866
|
+
this.elementRef.nativeElement.focus();
|
867
|
+
}
|
868
|
+
getOffsetLeft() {
|
869
|
+
return this.elementRef.nativeElement.offsetLeft;
|
870
|
+
}
|
871
|
+
getOffsetWidth() {
|
872
|
+
return this.elementRef.nativeElement.offsetWidth;
|
873
|
+
}
|
874
|
+
checkOverflow() {
|
875
|
+
this.tab.overflowTooltipTitle = this.isOverflown() ? this.getInnerText() : '';
|
876
|
+
}
|
877
|
+
isOverflown() {
|
878
|
+
return this.labelContent.nativeElement.scrollWidth > this.labelContent.nativeElement.clientWidth;
|
879
|
+
}
|
880
|
+
getInnerText() {
|
881
|
+
return this.labelContent.nativeElement.innerText;
|
882
|
+
}
|
883
|
+
addClassModifierForIcons(icons) {
|
884
|
+
const twoIcons = 2;
|
885
|
+
const [firstIconElement, secondIconElement] = icons;
|
886
|
+
if (icons.length === 1) {
|
887
|
+
const COMMENT_NODE = 8;
|
888
|
+
if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
|
889
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_left');
|
890
|
+
}
|
891
|
+
if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
|
892
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_right');
|
893
|
+
}
|
894
|
+
}
|
895
|
+
else if (icons.length === twoIcons) {
|
896
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_left');
|
897
|
+
this.renderer.addClass(secondIconElement, 'mc-icon_right');
|
898
|
+
}
|
899
|
+
}
|
900
|
+
}
|
901
|
+
/** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLabelWrapper, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
902
|
+
/** @nocollapse */ /** @nocollapse */ McTabLabelWrapper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: { disabled: "disabled", tab: "tab" }, host: { properties: { "attr.disabled": "disabled || null" } }, queries: [{ propertyName: "labelContent", first: true, predicate: ["labelContent"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLabelWrapper, decorators: [{
|
904
|
+
type: Directive,
|
905
|
+
args: [{
|
906
|
+
selector: '[mcTabLabelWrapper]',
|
907
|
+
inputs: ['disabled'],
|
908
|
+
host: {
|
909
|
+
'[attr.disabled]': 'disabled || null'
|
910
|
+
}
|
911
|
+
}]
|
912
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { labelContent: [{
|
913
|
+
type: ContentChild,
|
914
|
+
args: ['labelContent']
|
915
|
+
}], tab: [{
|
916
|
+
type: Input
|
917
|
+
}] } });
|
918
|
+
|
919
|
+
/**
|
920
|
+
* The header of the tab group which displays a list of all the tabs in the tab group.
|
921
|
+
* When the tabs list's width exceeds the width of the header container,
|
922
|
+
* then arrows will be displayed to allow the user to scroll
|
923
|
+
* left and right across the header.
|
924
|
+
* @docs-private
|
925
|
+
*/
|
926
|
+
class McTabHeader extends McPaginatedTabHeader {
|
927
|
+
constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode) {
|
928
|
+
super(elementRef, changeDetectorRef, viewportRuler, ngZone, platform, dir, animationMode);
|
929
|
+
this.elementRef = elementRef;
|
930
|
+
this.changeDetectorRef = changeDetectorRef;
|
931
|
+
/** The index of the active tab. */
|
932
|
+
this.vertical = false;
|
933
|
+
}
|
934
|
+
itemSelected(event) {
|
935
|
+
event.preventDefault();
|
936
|
+
}
|
937
|
+
}
|
938
|
+
/** @nocollapse */ /** @nocollapse */ McTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i2.Platform }, { token: i3.Directionality, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
939
|
+
/** @nocollapse */ /** @nocollapse */ McTabHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTabHeader, selector: "mc-tab-header", inputs: { selectedIndex: "selectedIndex", vertical: "vertical" }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, host: { properties: { "class.mc-tab-header_vertical": "vertical", "class.mc-tab-header__pagination-controls_enabled": "showPaginationControls", "class.mc-tab-header_rtl": "getLayoutDirection() == 'rtl'" }, classAttribute: "mc-tab-header" }, queries: [{ propertyName: "items", predicate: McTabLabelWrapper }], viewQueries: [{ propertyName: "tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\n #previousPaginator\n [class.mc-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-left-M_16\"></i>\n</div>\n\n<div class=\"mc-tab-header__content\"\n #tabListContainer\n (keydown)=\"handleKeydown($event)\">\n\n <div class=\"mc-tab-list\"\n #tabList\n (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"mc-tab-list__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\n #nextPaginator\n [class.mc-disabled]=\"disableScrollAfter\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (click)=\"handlePaginatorClick('after')\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-right-M_16\"></i>\n</div>\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:-1px;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:2px;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:1px;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:1px;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:16px;padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label .mc-tab-overlay{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.mc-active[disabled] .mc-tab-overlay{bottom:-1px}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:1px;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:1px;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:15px;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:15px;padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:-2px;right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:-2px;left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_old .mc-tab-overlay{top:-1px;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px)}.mc-tab-label_horizontal{border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:4px;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:5px;width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:2px;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"], components: [{ type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i4.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabHeader, decorators: [{
|
941
|
+
type: Component,
|
942
|
+
args: [{ selector: 'mc-tab-header', inputs: ['selectedIndex'], outputs: ['selectFocusedIndex', 'indexFocused'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
943
|
+
class: 'mc-tab-header',
|
944
|
+
'[class.mc-tab-header_vertical]': 'vertical',
|
945
|
+
'[class.mc-tab-header__pagination-controls_enabled]': 'showPaginationControls',
|
946
|
+
'[class.mc-tab-header_rtl]': 'getLayoutDirection() == \'rtl\''
|
947
|
+
}, template: "<div class=\"mc-tab-header__pagination mc-tab-header__pagination_before\"\n #previousPaginator\n [class.mc-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-left-M_16\"></i>\n</div>\n\n<div class=\"mc-tab-header__content\"\n #tabListContainer\n (keydown)=\"handleKeydown($event)\">\n\n <div class=\"mc-tab-list\"\n #tabList\n (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"mc-tab-list__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mc-tab-header__pagination mc-tab-header__pagination_after\"\n #nextPaginator\n [class.mc-disabled]=\"disableScrollAfter\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (click)=\"handlePaginatorClick('after')\"\n (touchend)=\"stopInterval()\">\n\n <i mc-icon=\"mc-angle-right-M_16\"></i>\n</div>\n", styles: [".mc-tab-label.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:-1px;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_horizontal.cdk-keyboard-focused:after,.mc-tab-label_old.cdk-keyboard-focused:after{border-width:2px;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px);border-bottom-color:transparent}.mc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-header_vertical .mc-tab-list__content{flex-direction:column}.mc-tab-header__pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none;padding-left:12px;padding-right:12px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_before{border-right-style:solid;border-right-width:1px;border-right-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination.mc-tab-header__pagination_after{border-left-style:solid;border-left-width:1px;border-left-width:var(--mc-tabs-size-border-width, 1px)}.mc-tab-header__pagination-controls_enabled .mc-tab-header__pagination{display:flex}.mc-tab-header__content{display:flex;flex-grow:1;z-index:1;overflow:hidden}.mc-tab-list{position:relative;width:100%;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:16px;padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none;-webkit-user-select:none;user-select:none}.mc-tab-label .mc-tab-overlay{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-label.mc-active{cursor:default}.mc-tab-label.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-label.mc-active[disabled] .mc-tab-overlay{bottom:-1px}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-label:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-label[disabled]{pointer-events:none}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-label.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-label_old{border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid;border-width:1px;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px);border-left:none;border-left-color:transparent;border-right:none;border-right-color:transparent}.mc-tab-label_old.mc-active{border-width:1px;border-width:var(--mc-tabs-size-border-width, 1px);border-style:solid;padding-right:15px;padding-right:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px));padding-left:15px;padding-left:calc(var(--mc-tabs-size-padding-horizontal, 16px) - var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.mc-active.cdk-keyboard-focused:after{right:-2px;right:calc(-2 * var(--mc-tabs-size-border-width, 1px));left:-2px;left:calc(-2 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-label_old.cdk-keyboard-focused:after{top:-1px}.mc-tab-label_old .mc-tab-overlay{top:-1px;border-top-left-radius:3px;border-top-left-radius:var(--mc-tabs-size-border-radius, 3px);border-top-right-radius:3px;border-top-right-radius:var(--mc-tabs-size-border-radius, 3px)}.mc-tab-label_horizontal{border-bottom-width:1px;border-bottom-width:var(--mc-tabs-size-border-width, 1px);border-bottom-style:solid}.mc-tab-label_horizontal.mc-active:before{bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:0;right:0;height:4px;height:var(--mc-tabs-size-highlight-height, 4px)}.mc-tab-label_vertical{justify-content:flex-start}.mc-tab-label_vertical.mc-active:before{top:0;bottom:0;left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px));width:5px;width:var(--mc-tabs-size-highlight-height, 5px)}.mc-tab-label_vertical.cdk-keyboard-focused:after{right:0;left:0;border-width:2px;border-width:calc(var(--mc-tabs-size-border-width, 1px) * 2);border-style:solid}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-label_old{flex-basis:0;flex-grow:1}\n"] }]
|
948
|
+
}], ctorParameters: function () {
|
949
|
+
return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i2.Platform }, { type: i3.Directionality, decorators: [{
|
950
|
+
type: Optional
|
951
|
+
}] }, { type: undefined, decorators: [{
|
952
|
+
type: Optional
|
953
|
+
}, {
|
954
|
+
type: Inject,
|
955
|
+
args: [ANIMATION_MODULE_TYPE]
|
956
|
+
}] }];
|
957
|
+
}, propDecorators: { vertical: [{
|
958
|
+
type: Input
|
959
|
+
}], items: [{
|
960
|
+
type: ContentChildren,
|
961
|
+
args: [McTabLabelWrapper, { descendants: false }]
|
962
|
+
}], tabListContainer: [{
|
963
|
+
type: ViewChild,
|
964
|
+
args: ['tabListContainer', { static: true }]
|
965
|
+
}], tabList: [{
|
966
|
+
type: ViewChild,
|
967
|
+
args: ['tabList', { static: true }]
|
968
|
+
}], nextPaginator: [{
|
969
|
+
type: ViewChild,
|
970
|
+
args: ['nextPaginator']
|
971
|
+
}], previousPaginator: [{
|
972
|
+
type: ViewChild,
|
973
|
+
args: ['previousPaginator']
|
974
|
+
}] } });
|
975
|
+
|
976
|
+
class McOldTabsCssStyler {
|
977
|
+
}
|
978
|
+
/** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOldTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
979
|
+
/** @nocollapse */ /** @nocollapse */ McOldTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McOldTabsCssStyler, selector: "mc-tab-group[mc-old-tabs]", host: { classAttribute: "mc-tab-group_old" }, ngImport: i0 });
|
980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOldTabsCssStyler, decorators: [{
|
981
|
+
type: Directive,
|
982
|
+
args: [{
|
983
|
+
selector: 'mc-tab-group[mc-old-tabs]',
|
984
|
+
host: { class: 'mc-tab-group_old' }
|
985
|
+
}]
|
986
|
+
}] });
|
987
|
+
class McAlignTabsCenterCssStyler {
|
988
|
+
}
|
989
|
+
/** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McAlignTabsCenterCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
990
|
+
/** @nocollapse */ /** @nocollapse */ McAlignTabsCenterCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McAlignTabsCenterCssStyler, selector: "mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]", host: { classAttribute: "mc-tab-group_align-labels-center" }, ngImport: i0 });
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McAlignTabsCenterCssStyler, decorators: [{
|
992
|
+
type: Directive,
|
993
|
+
args: [{
|
994
|
+
selector: 'mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]',
|
995
|
+
host: { class: 'mc-tab-group_align-labels-center' }
|
996
|
+
}]
|
997
|
+
}] });
|
998
|
+
class McAlignTabsEndCssStyler {
|
999
|
+
}
|
1000
|
+
/** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McAlignTabsEndCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1001
|
+
/** @nocollapse */ /** @nocollapse */ McAlignTabsEndCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McAlignTabsEndCssStyler, selector: "mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]", host: { classAttribute: "mc-tab-group_align-labels-end" }, ngImport: i0 });
|
1002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McAlignTabsEndCssStyler, decorators: [{
|
1003
|
+
type: Directive,
|
1004
|
+
args: [{
|
1005
|
+
selector: 'mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]',
|
1006
|
+
host: { class: 'mc-tab-group_align-labels-end' }
|
1007
|
+
}]
|
1008
|
+
}] });
|
1009
|
+
class McStretchTabsCssStyler {
|
1010
|
+
}
|
1011
|
+
/** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McStretchTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1012
|
+
/** @nocollapse */ /** @nocollapse */ McStretchTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McStretchTabsCssStyler, selector: "mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]", host: { classAttribute: "mc-tab-group_stretch-labels" }, ngImport: i0 });
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McStretchTabsCssStyler, decorators: [{
|
1014
|
+
type: Directive,
|
1015
|
+
args: [{
|
1016
|
+
selector: 'mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]',
|
1017
|
+
host: { class: 'mc-tab-group_stretch-labels' }
|
1018
|
+
}]
|
1019
|
+
}] });
|
1020
|
+
class McVerticalTabsCssStyler {
|
1021
|
+
}
|
1022
|
+
/** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McVerticalTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1023
|
+
/** @nocollapse */ /** @nocollapse */ McVerticalTabsCssStyler.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McVerticalTabsCssStyler, selector: "mc-tab-group[vertical], [mc-tab-nav-bar][vertical]", host: { classAttribute: "mc-tab-group_vertical" }, ngImport: i0 });
|
1024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McVerticalTabsCssStyler, decorators: [{
|
1025
|
+
type: Directive,
|
1026
|
+
args: [{
|
1027
|
+
selector: 'mc-tab-group[vertical], [mc-tab-nav-bar][vertical]',
|
1028
|
+
host: { class: 'mc-tab-group_vertical' }
|
1029
|
+
}]
|
1030
|
+
}] });
|
1031
|
+
/** Used to generate unique ID's for each tab component */
|
1032
|
+
let nextId = 0;
|
1033
|
+
/** A simple change event emitted on focus or selection changes. */
|
1034
|
+
class McTabChangeEvent {
|
1035
|
+
}
|
1036
|
+
/** Injection token that can be used to provide the default options the tabs module. */
|
1037
|
+
const MC_TABS_CONFIG = new InjectionToken('MC_TABS_CONFIG');
|
1038
|
+
// Boilerplate for applying mixins to McTabGroup.
|
1039
|
+
/** @docs-private */
|
1040
|
+
class McTabGroupBase {
|
1041
|
+
// tslint:disable-next-line:naming-convention
|
1042
|
+
constructor(_elementRef) {
|
1043
|
+
this._elementRef = _elementRef;
|
1044
|
+
}
|
1045
|
+
}
|
1046
|
+
// tslint:disable-next-line:naming-convention
|
1047
|
+
const McTabGroupMixinBase = mixinDisabled(McTabGroupBase);
|
1048
|
+
/**
|
1049
|
+
* Tab-group component. Supports basic tab pairs (label + content) and includes
|
1050
|
+
* keyboard navigation.
|
1051
|
+
*/
|
1052
|
+
class McTabGroup extends McTabGroupMixinBase {
|
1053
|
+
constructor(elementRef, changeDetectorRef, lightTabs, vertical, defaultConfig) {
|
1054
|
+
super(elementRef);
|
1055
|
+
this.changeDetectorRef = changeDetectorRef;
|
1056
|
+
this.resizeStream = new Subject();
|
1057
|
+
this._dynamicHeight = false;
|
1058
|
+
this._selectedIndex = null;
|
1059
|
+
/** Position of the tab header. */
|
1060
|
+
this.headerPosition = 'above';
|
1061
|
+
/** Output to enable support for two-way binding on `[(selectedIndex)]` */
|
1062
|
+
this.selectedIndexChange = new EventEmitter();
|
1063
|
+
/** Event emitted when focus has changed within a tab group. */
|
1064
|
+
this.focusChange = new EventEmitter();
|
1065
|
+
/** Event emitted when the body animation has completed */
|
1066
|
+
this.animationDone = new EventEmitter();
|
1067
|
+
/** Event emitted when the tab selection has changed. */
|
1068
|
+
this.selectedTabChange = new EventEmitter(true);
|
1069
|
+
/** The tab index that should be selected after the content has been checked. */
|
1070
|
+
this.indexToSelect = 0;
|
1071
|
+
/** Snapshot of the height of the tab body wrapper before another tab is activated. */
|
1072
|
+
this.tabBodyWrapperHeight = 0;
|
1073
|
+
/** Subscription to tabs being added/removed. */
|
1074
|
+
this.tabsSubscription = Subscription.EMPTY;
|
1075
|
+
/** Subscription to changes in the tab labels. */
|
1076
|
+
this.tabLabelSubscription = Subscription.EMPTY;
|
1077
|
+
this.resizeSubscription = Subscription.EMPTY;
|
1078
|
+
this.resizeDebounceInterval = 100;
|
1079
|
+
this.checkOverflow = () => {
|
1080
|
+
this.tabHeader.items
|
1081
|
+
.forEach((headerTab) => headerTab.checkOverflow());
|
1082
|
+
};
|
1083
|
+
this.oldTab = coerceBooleanProperty(lightTabs);
|
1084
|
+
this.vertical = coerceBooleanProperty(vertical);
|
1085
|
+
this.groupId = nextId++;
|
1086
|
+
this.animationDuration = (defaultConfig === null || defaultConfig === void 0 ? void 0 : defaultConfig.animationDuration) || '0ms';
|
1087
|
+
this.subscribeToResize();
|
1088
|
+
}
|
1089
|
+
/** Whether the tab group should grow to the size of the active tab. */
|
1090
|
+
get dynamicHeight() {
|
1091
|
+
return this._dynamicHeight;
|
1092
|
+
}
|
1093
|
+
set dynamicHeight(value) {
|
1094
|
+
this._dynamicHeight = coerceBooleanProperty(value);
|
1095
|
+
}
|
1096
|
+
/** The index of the active tab. */
|
1097
|
+
get selectedIndex() {
|
1098
|
+
return this._selectedIndex;
|
1099
|
+
}
|
1100
|
+
set selectedIndex(value) {
|
1101
|
+
this.indexToSelect = coerceNumberProperty(value, null);
|
1102
|
+
}
|
1103
|
+
/**
|
1104
|
+
* After the content is checked, this component knows what tabs have been defined
|
1105
|
+
* and what the selected index should be. This is where we can know exactly what position
|
1106
|
+
* each tab should be in according to the new selected index, and additionally we know how
|
1107
|
+
* a new selected tab should transition in (from the left or right).
|
1108
|
+
*/
|
1109
|
+
ngAfterContentChecked() {
|
1110
|
+
// Don't clamp the `indexToSelect` immediately in the setter because it can happen that
|
1111
|
+
// the amount of tabs changes before the actual change detection runs.
|
1112
|
+
const indexToSelect = this.indexToSelect = this.clampTabIndex(this.indexToSelect);
|
1113
|
+
// If there is a change in selected index, emit a change event. Should not trigger if
|
1114
|
+
// the selected index has not yet been initialized.
|
1115
|
+
if (this._selectedIndex !== indexToSelect) {
|
1116
|
+
const isFirstRun = this._selectedIndex == null;
|
1117
|
+
if (!isFirstRun) {
|
1118
|
+
this.selectedTabChange.emit(this.createChangeEvent(indexToSelect));
|
1119
|
+
}
|
1120
|
+
// Changing these values after change detection has run
|
1121
|
+
// since the checked content may contain references to them.
|
1122
|
+
Promise.resolve().then(() => {
|
1123
|
+
this.tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);
|
1124
|
+
if (!isFirstRun) {
|
1125
|
+
this.selectedIndexChange.emit(indexToSelect);
|
1126
|
+
}
|
1127
|
+
});
|
1128
|
+
}
|
1129
|
+
// Setup the position for each tab and optionally setup an origin on the next selected tab.
|
1130
|
+
this.tabs.forEach((tab, index) => {
|
1131
|
+
tab.position = index - indexToSelect;
|
1132
|
+
// If there is already a selected tab, then set up an origin for the next selected tab
|
1133
|
+
// if it doesn't have one already.
|
1134
|
+
if (this._selectedIndex != null && tab.position === 0 && !tab.origin) {
|
1135
|
+
tab.origin = indexToSelect - this._selectedIndex;
|
1136
|
+
}
|
1137
|
+
});
|
1138
|
+
if (this._selectedIndex !== indexToSelect) {
|
1139
|
+
this._selectedIndex = indexToSelect;
|
1140
|
+
this.changeDetectorRef.markForCheck();
|
1141
|
+
}
|
1142
|
+
}
|
1143
|
+
ngAfterContentInit() {
|
1144
|
+
this.subscribeToTabLabels();
|
1145
|
+
// Subscribe to changes in the amount of tabs, in order to be
|
1146
|
+
// able to re-render the content as new tabs are added or removed.
|
1147
|
+
this.tabsSubscription = this.tabs.changes
|
1148
|
+
.subscribe(() => {
|
1149
|
+
const indexToSelect = this.clampTabIndex(this.indexToSelect);
|
1150
|
+
// Maintain the previously-selected tab if a new tab is added or removed and there is no
|
1151
|
+
// explicit change that selects a different tab.
|
1152
|
+
if (indexToSelect === this._selectedIndex) {
|
1153
|
+
const tabs = this.tabs.toArray();
|
1154
|
+
for (let i = 0; i < tabs.length; i++) {
|
1155
|
+
if (tabs[i].isActive) {
|
1156
|
+
// Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
|
1157
|
+
// event, otherwise the consumer may end up in an infinite loop in some edge cases like
|
1158
|
+
// adding a tab within the `selectedIndexChange` event.
|
1159
|
+
this.indexToSelect = this._selectedIndex = i;
|
1160
|
+
break;
|
1161
|
+
}
|
1162
|
+
}
|
1163
|
+
}
|
1164
|
+
this.subscribeToTabLabels();
|
1165
|
+
this.changeDetectorRef.markForCheck();
|
1166
|
+
});
|
1167
|
+
}
|
1168
|
+
ngAfterViewInit() {
|
1169
|
+
this.checkOverflow();
|
1170
|
+
}
|
1171
|
+
ngOnDestroy() {
|
1172
|
+
this.tabsSubscription.unsubscribe();
|
1173
|
+
this.tabLabelSubscription.unsubscribe();
|
1174
|
+
this.resizeSubscription.unsubscribe();
|
1175
|
+
}
|
1176
|
+
focusChanged(index) {
|
1177
|
+
this.focusChange.emit(this.createChangeEvent(index));
|
1178
|
+
}
|
1179
|
+
/** Returns a unique id for each tab label element */
|
1180
|
+
getTabLabelId(i) {
|
1181
|
+
return `mc-tab-label-${this.groupId}-${i}`;
|
1182
|
+
}
|
1183
|
+
/** Returns a unique id for each tab content element */
|
1184
|
+
getTabContentId(i) {
|
1185
|
+
return `mc-tab-content-${this.groupId}-${i}`;
|
1186
|
+
}
|
1187
|
+
/**
|
1188
|
+
* Sets the height of the body wrapper to the height of the activating tab if dynamic
|
1189
|
+
* height property is true.
|
1190
|
+
*/
|
1191
|
+
setTabBodyWrapperHeight(tabHeight) {
|
1192
|
+
if (!this._dynamicHeight || !this.tabBodyWrapperHeight) {
|
1193
|
+
return;
|
1194
|
+
}
|
1195
|
+
const wrapper = this.tabBodyWrapper.nativeElement;
|
1196
|
+
wrapper.style.height = `${this.tabBodyWrapperHeight}px`;
|
1197
|
+
// This conditional forces the browser to paint the height so that
|
1198
|
+
// the animation to the new height can have an origin.
|
1199
|
+
if (this.tabBodyWrapper.nativeElement.offsetHeight) {
|
1200
|
+
wrapper.style.height = `${tabHeight}px`;
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
/** Removes the height of the tab body wrapper. */
|
1204
|
+
removeTabBodyWrapperHeight() {
|
1205
|
+
this.tabBodyWrapperHeight = this.tabBodyWrapper.nativeElement.clientHeight;
|
1206
|
+
this.tabBodyWrapper.nativeElement.style.height = '';
|
1207
|
+
this.animationDone.emit();
|
1208
|
+
}
|
1209
|
+
/** Handle click events, setting new selected index if appropriate. */
|
1210
|
+
handleClick(tab, tabHeader, index) {
|
1211
|
+
if (tab.disabled) {
|
1212
|
+
return;
|
1213
|
+
}
|
1214
|
+
this.selectedIndex = tabHeader.focusIndex = index;
|
1215
|
+
}
|
1216
|
+
/** Retrieves the tabindex for the tab. */
|
1217
|
+
getTabIndex(tab, index) {
|
1218
|
+
if (tab.disabled) {
|
1219
|
+
return null;
|
1220
|
+
}
|
1221
|
+
return this.selectedIndex === index ? 0 : -1;
|
1222
|
+
}
|
1223
|
+
createChangeEvent(index) {
|
1224
|
+
const event = new McTabChangeEvent();
|
1225
|
+
event.index = index;
|
1226
|
+
if (this.tabs && this.tabs.length) {
|
1227
|
+
event.tab = this.tabs.toArray()[index];
|
1228
|
+
}
|
1229
|
+
return event;
|
1230
|
+
}
|
1231
|
+
/**
|
1232
|
+
* Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
|
1233
|
+
* on the McTab component, whereas the data binding is inside the McTabGroup. In order for the
|
1234
|
+
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
1235
|
+
* manually.
|
1236
|
+
*/
|
1237
|
+
subscribeToTabLabels() {
|
1238
|
+
if (this.tabLabelSubscription) {
|
1239
|
+
this.tabLabelSubscription.unsubscribe();
|
1240
|
+
}
|
1241
|
+
this.tabLabelSubscription = merge(...this.tabs.map((tab) => tab.stateChanges))
|
1242
|
+
.subscribe(() => this.changeDetectorRef.markForCheck());
|
1243
|
+
}
|
1244
|
+
subscribeToResize() {
|
1245
|
+
if (!this.vertical) {
|
1246
|
+
return;
|
1247
|
+
}
|
1248
|
+
if (this.resizeSubscription) {
|
1249
|
+
this.resizeSubscription.unsubscribe();
|
1250
|
+
}
|
1251
|
+
this.resizeSubscription = this.resizeStream
|
1252
|
+
.pipe(debounceTime(this.resizeDebounceInterval))
|
1253
|
+
.subscribe(this.checkOverflow);
|
1254
|
+
}
|
1255
|
+
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
1256
|
+
clampTabIndex(index) {
|
1257
|
+
// Note the `|| 0`, which ensures that values like NaN can't get through
|
1258
|
+
// and which would otherwise throw the component into an infinite loop
|
1259
|
+
// (since Mch.max(NaN, 0) === NaN).
|
1260
|
+
return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));
|
1261
|
+
}
|
1262
|
+
}
|
1263
|
+
/** @nocollapse */ /** @nocollapse */ McTabGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabGroup, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: 'mc-old-tabs', attribute: true }, { token: 'vertical', attribute: true }, { token: MC_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1264
|
+
/** @nocollapse */ /** @nocollapse */ McTabGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTabGroup, selector: "mc-tab-group", inputs: { disabled: "disabled", dynamicHeight: "dynamicHeight", selectedIndex: "selectedIndex", headerPosition: "headerPosition", animationDuration: "animationDuration" }, outputs: { selectedIndexChange: "selectedIndexChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { listeners: { "window:resize": "resizeStream.next()" }, properties: { "class.mc-tab-group_dynamic-height": "dynamicHeight", "class.mc-tab-group_inverted-header": "headerPosition === \"below\"" }, classAttribute: "mc-tab-group" }, queries: [{ propertyName: "tabs", predicate: McTab }], viewQueries: [{ propertyName: "tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true }, { propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true }], exportAs: ["mcTabGroup"], usesInheritance: true, ngImport: i0, template: "<mc-tab-header\n #tabHeader\n [vertical]=\"vertical\"\n [selectedIndex]=\"selectedIndex\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n <div class=\"mc-tab-label\"\n mcTabLabelWrapper\n cdkMonitorElementFocus\n [attr.tabindex]=\"getTabIndex(tab, i)\"\n [class.mc-tab-label_old]=\"oldTab\"\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\n [class.mc-tab-label_empty]=\"tab.empty\"\n [class.mc-active]=\"selectedIndex == i\"\n *ngFor=\"let tab of tabs; let i = index\"\n [tab]=\"tab\"\n [id]=\"getTabLabelId(i)\"\n [disabled]=\"tab.disabled\"\n (click)=\"handleClick(tab, tabHeader, i)\"\n\n [mcTooltip]=\"tab.tooltipTitle\"\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\n [mcTrigger]=\"'hover, focus'\"\n [mcPlacement]=\"tab.tooltipPlacement\">\n\n <div #labelContent class=\"mc-tab-label__content\"\n [class.mc-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n <ng-template [ngIf]=\"tab.templateLabel\">\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n </ng-template>\n\n <!-- If there is not a label template, fall back to the text label. -->\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\n </div>\n\n <div class=\"mc-tab-overlay\"></div>\n </div>\n</mc-tab-header>\n\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\n <mc-tab-body\n *ngFor=\"let tab of tabs; let i = index\"\n [id]=\"getTabContentId(i)\"\n [class.mc-tab-body__active]=\"selectedIndex == i\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [origin]=\"tab.origin!\"\n [animationDuration]=\"animationDuration\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\n </mc-tab-body>\n</div>\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:center;white-space:nowrap}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"], components: [{ type: McTabHeader, selector: "mc-tab-header", inputs: ["selectedIndex", "vertical"], outputs: ["selectFocusedIndex", "indexFocused"] }, { type: McTabBody, selector: "mc-tab-body", inputs: ["position", "content", "origin", "animationDuration"], outputs: ["onCentering", "beforeCentering", "afterLeavingCenter", "onCentered"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: McTabLabelWrapper, selector: "[mcTabLabelWrapper]", inputs: ["disabled", "tab"] }, { type: i1$1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"] }, { type: i6.McTooltipTrigger, selector: "[mcTooltip]", inputs: ["mcVisible", "mcPlacement", "mcPlacementPriority", "mcTooltip", "mcTooltipDisabled", "mcEnterDelay", "mcLeaveDelay", "mcTrigger", "mcTooltipClass"], outputs: ["mcPlacementChange", "mcVisibleChange"], exportAs: ["mcTooltip"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabGroup, decorators: [{
|
1266
|
+
type: Component,
|
1267
|
+
args: [{ selector: 'mc-tab-group', exportAs: 'mcTabGroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
|
1268
|
+
class: 'mc-tab-group',
|
1269
|
+
'[class.mc-tab-group_dynamic-height]': 'dynamicHeight',
|
1270
|
+
'[class.mc-tab-group_inverted-header]': 'headerPosition === "below"',
|
1271
|
+
'(window:resize)': 'resizeStream.next()'
|
1272
|
+
}, template: "<mc-tab-header\n #tabHeader\n [vertical]=\"vertical\"\n [selectedIndex]=\"selectedIndex\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n <div class=\"mc-tab-label\"\n mcTabLabelWrapper\n cdkMonitorElementFocus\n [attr.tabindex]=\"getTabIndex(tab, i)\"\n [class.mc-tab-label_old]=\"oldTab\"\n [class.mc-tab-label_horizontal]=\"!vertical && !oldTab\"\n [class.mc-tab-label_vertical]=\"vertical && !oldTab\"\n [class.mc-tab-label_empty]=\"tab.empty\"\n [class.mc-active]=\"selectedIndex == i\"\n *ngFor=\"let tab of tabs; let i = index\"\n [tab]=\"tab\"\n [id]=\"getTabLabelId(i)\"\n [disabled]=\"tab.disabled\"\n (click)=\"handleClick(tab, tabHeader, i)\"\n\n [mcTooltip]=\"tab.tooltipTitle\"\n [mcTooltipDisabled]=\"!tab.empty && !tab.isOverflown\"\n [mcTrigger]=\"'hover, focus'\"\n [mcPlacement]=\"tab.tooltipPlacement\">\n\n <div #labelContent class=\"mc-tab-label__content\"\n [class.mc-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n <ng-template [ngIf]=\"tab.templateLabel\">\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n </ng-template>\n\n <!-- If there is not a label template, fall back to the text label. -->\n <ng-template [ngIf]=\"!tab.templateLabel\">{{ tab.textLabel }}</ng-template>\n </div>\n\n <div class=\"mc-tab-overlay\"></div>\n </div>\n</mc-tab-header>\n\n<div class=\"mc-tab-body__wrapper\" #tabBodyWrapper>\n <mc-tab-body\n *ngFor=\"let tab of tabs; let i = index\"\n [id]=\"getTabContentId(i)\"\n [class.mc-tab-body__active]=\"selectedIndex == i\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [origin]=\"tab.origin!\"\n [animationDuration]=\"animationDuration\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\">\n </mc-tab-body>\n</div>\n", styles: [".mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:center;white-space:nowrap}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-group_vertical{flex-direction:row}.mc-tab-group_vertical .mc-tab-header__content{overflow-y:auto;padding-top:8px;padding-bottom:1px;border-right-width:1px;border-right-width:var(--mc-tabs-size-border-width, 1px);border-right-style:solid}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}\n"] }]
|
1273
|
+
}], ctorParameters: function () {
|
1274
|
+
return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
1275
|
+
type: Attribute,
|
1276
|
+
args: ['mc-old-tabs']
|
1277
|
+
}] }, { type: undefined, decorators: [{
|
1278
|
+
type: Attribute,
|
1279
|
+
args: ['vertical']
|
1280
|
+
}] }, { type: undefined, decorators: [{
|
1281
|
+
type: Inject,
|
1282
|
+
args: [MC_TABS_CONFIG]
|
1283
|
+
}, {
|
1284
|
+
type: Optional
|
1285
|
+
}] }];
|
1286
|
+
}, propDecorators: { tabs: [{
|
1287
|
+
type: ContentChildren,
|
1288
|
+
args: [McTab]
|
1289
|
+
}], tabBodyWrapper: [{
|
1290
|
+
type: ViewChild,
|
1291
|
+
args: ['tabBodyWrapper', { static: false }]
|
1292
|
+
}], tabHeader: [{
|
1293
|
+
type: ViewChild,
|
1294
|
+
args: ['tabHeader', { static: false }]
|
1295
|
+
}], dynamicHeight: [{
|
1296
|
+
type: Input
|
1297
|
+
}], selectedIndex: [{
|
1298
|
+
type: Input
|
1299
|
+
}], headerPosition: [{
|
1300
|
+
type: Input
|
1301
|
+
}], animationDuration: [{
|
1302
|
+
type: Input
|
1303
|
+
}], selectedIndexChange: [{
|
1304
|
+
type: Output
|
1305
|
+
}], focusChange: [{
|
1306
|
+
type: Output
|
1307
|
+
}], animationDone: [{
|
1308
|
+
type: Output
|
1309
|
+
}], selectedTabChange: [{
|
1310
|
+
type: Output
|
1311
|
+
}] } });
|
1312
|
+
|
1313
|
+
// Boilerplate for applying mixins to McTabLink.
|
1314
|
+
class McTabLinkBase {
|
1315
|
+
}
|
1316
|
+
// tslint:disable-next-line:naming-convention
|
1317
|
+
const McTabLinkMixinBase = mixinTabIndex(mixinDisabled(McTabLinkBase));
|
1318
|
+
/**
|
1319
|
+
* Link inside of a `mc-tab-nav-bar`.
|
1320
|
+
*/
|
1321
|
+
class McTabLink extends McTabLinkMixinBase {
|
1322
|
+
constructor(elementRef, focusMonitor, renderer) {
|
1323
|
+
super();
|
1324
|
+
this.elementRef = elementRef;
|
1325
|
+
this.focusMonitor = focusMonitor;
|
1326
|
+
this.renderer = renderer;
|
1327
|
+
this.vertical = false;
|
1328
|
+
/** Whether the tab link is active or not. */
|
1329
|
+
this.isActive = false;
|
1330
|
+
this.focusMonitor.monitor(this.elementRef.nativeElement);
|
1331
|
+
}
|
1332
|
+
/** Whether the link is active. */
|
1333
|
+
get active() {
|
1334
|
+
return this.isActive;
|
1335
|
+
}
|
1336
|
+
set active(value) {
|
1337
|
+
if (value !== this.isActive) {
|
1338
|
+
this.isActive = value;
|
1339
|
+
}
|
1340
|
+
}
|
1341
|
+
ngAfterViewInit() {
|
1342
|
+
this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.mc-icon')));
|
1343
|
+
}
|
1344
|
+
ngOnDestroy() {
|
1345
|
+
this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
|
1346
|
+
}
|
1347
|
+
addClassModifierForIcons(icons) {
|
1348
|
+
const twoIcons = 2;
|
1349
|
+
const [firstIconElement, secondIconElement] = icons;
|
1350
|
+
if (icons.length === 1) {
|
1351
|
+
const COMMENT_NODE = 8;
|
1352
|
+
if (firstIconElement.nextSibling && firstIconElement.nextSibling.nodeType !== COMMENT_NODE) {
|
1353
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_left');
|
1354
|
+
}
|
1355
|
+
if (firstIconElement.previousSibling && firstIconElement.previousSibling.nodeType !== COMMENT_NODE) {
|
1356
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_right');
|
1357
|
+
}
|
1358
|
+
}
|
1359
|
+
else if (icons.length === twoIcons) {
|
1360
|
+
this.renderer.addClass(firstIconElement, 'mc-icon_left');
|
1361
|
+
this.renderer.addClass(secondIconElement, 'mc-icon_right');
|
1362
|
+
}
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
/** @nocollapse */ /** @nocollapse */ McTabLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLink, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
1366
|
+
/** @nocollapse */ /** @nocollapse */ McTabLink.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTabLink, selector: "a[mc-tab-link], a[mcTabLink]", inputs: { disabled: "disabled", tabIndex: "tabIndex", active: "active" }, host: { properties: { "class.mc-active": "active", "class.mc-tab-label_vertical": "vertical", "class.mc-tab-label_horizontal": "!vertical", "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "mc-tab-link" }, exportAs: ["mcTabLink"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content><div class="mc-tab-overlay"></div>', isInline: true });
|
1367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabLink, decorators: [{
|
1368
|
+
type: Component,
|
1369
|
+
args: [{
|
1370
|
+
selector: 'a[mc-tab-link], a[mcTabLink]',
|
1371
|
+
exportAs: 'mcTabLink',
|
1372
|
+
template: '<ng-content></ng-content><div class="mc-tab-overlay"></div>',
|
1373
|
+
inputs: ['disabled', 'tabIndex'],
|
1374
|
+
host: {
|
1375
|
+
class: 'mc-tab-link',
|
1376
|
+
'[class.mc-active]': 'active',
|
1377
|
+
'[class.mc-tab-label_vertical]': 'vertical',
|
1378
|
+
'[class.mc-tab-label_horizontal]': '!vertical',
|
1379
|
+
'[attr.tabindex]': 'tabIndex',
|
1380
|
+
'[attr.disabled]': 'disabled || null'
|
1381
|
+
}
|
1382
|
+
}]
|
1383
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { active: [{
|
1384
|
+
type: Input
|
1385
|
+
}] } });
|
1386
|
+
/**
|
1387
|
+
* Navigation component matching the styles of the tab group header.
|
1388
|
+
*/
|
1389
|
+
class McTabNav {
|
1390
|
+
constructor(vertical) {
|
1391
|
+
this.vertical = false;
|
1392
|
+
this.vertical = coerceBooleanProperty(vertical);
|
1393
|
+
}
|
1394
|
+
ngAfterContentInit() {
|
1395
|
+
this.links.changes
|
1396
|
+
.pipe(delay(0))
|
1397
|
+
.subscribe((links) => links.forEach((link) => link.vertical = this.vertical));
|
1398
|
+
this.links.notifyOnChanges();
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
/** @nocollapse */ /** @nocollapse */ McTabNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabNav, deps: [{ token: 'vertical', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
|
1402
|
+
/** @nocollapse */ /** @nocollapse */ McTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTabNav, selector: "[mc-tab-nav-bar]", host: { classAttribute: "mc-tab-nav-bar" }, queries: [{ propertyName: "links", predicate: McTabLink }], exportAs: ["mcTabNavBar", "mcTabNav"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:-1px;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:16px;padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link .mc-tab-overlay{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.mc-active[disabled] .mc-tab-overlay{bottom:-1px}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabNav, decorators: [{
|
1404
|
+
type: Component,
|
1405
|
+
args: [{ selector: '[mc-tab-nav-bar]', exportAs: 'mcTabNavBar, mcTabNav', template: '<ng-content></ng-content>', host: {
|
1406
|
+
class: 'mc-tab-nav-bar'
|
1407
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mc-tab-link.cdk-keyboard-focused:after{display:block;content:\"\";position:absolute;top:0;right:-1px;right:calc(-1 * var(--mc-tabs-size-border-width, 1px));bottom:-1px;bottom:calc(-1 * var(--mc-tabs-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-tabs-size-border-width, 1px))}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;height:var(--mc-tabs-size-height, 40px);text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-right:var(--mc-tabs-size-padding-horizontal, 16px);padding-left:16px;padding-left:var(--mc-tabs-size-padding-horizontal, 16px);outline:none}.mc-tab-link .mc-tab-overlay{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-link.mc-active{cursor:default}.mc-tab-link.mc-active:before{display:block;content:\"\";position:absolute}.mc-tab-link.mc-active[disabled] .mc-tab-overlay{bottom:-1px}.mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-link:first-child.cdk-keyboard-focused:after{left:0}.mc-tab-link:last-child.cdk-keyboard-focused:after{right:0}.mc-tab-link[disabled]{pointer-events:none}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link .mc-tab-label__content>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link.mc-tab-label_vertical .mc-tab-label__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tab-link .mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link>.mc-icon.mc-icon_left{margin-right:8px;margin-right:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-link>.mc-icon.mc-icon_right{margin-left:8px;margin-left:var(--mc-tabs-size-label-icon-margin, 8px)}.mc-tab-nav-bar{display:flex;flex-grow:1;position:relative;padding:1px 1px 0}.mc-tab-nav-bar .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-nav-bar .mc-tab-group_align-labels-end{justify-content:flex-end}.mc-tab-nav-bar.mc-tab-group_vertical{flex-direction:column;flex-grow:0}\n"] }]
|
1408
|
+
}], ctorParameters: function () {
|
1409
|
+
return [{ type: undefined, decorators: [{
|
1410
|
+
type: Attribute,
|
1411
|
+
args: ['vertical']
|
1412
|
+
}] }];
|
1413
|
+
}, propDecorators: { links: [{
|
1414
|
+
type: ContentChildren,
|
1415
|
+
args: [McTabLink]
|
1416
|
+
}] } });
|
1417
|
+
|
1418
|
+
class McTabsModule {
|
1419
|
+
}
|
1420
|
+
/** @nocollapse */ /** @nocollapse */ McTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1421
|
+
/** @nocollapse */ /** @nocollapse */ McTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabsModule, declarations: [McTabGroup,
|
1422
|
+
McTabLabel,
|
1423
|
+
McTab,
|
1424
|
+
McTabLabelWrapper,
|
1425
|
+
McTabNav,
|
1426
|
+
McTabLink,
|
1427
|
+
McTabBody,
|
1428
|
+
McTabBodyPortal,
|
1429
|
+
McTabHeader,
|
1430
|
+
McTabContent,
|
1431
|
+
McOldTabsCssStyler,
|
1432
|
+
McAlignTabsCenterCssStyler,
|
1433
|
+
McAlignTabsEndCssStyler,
|
1434
|
+
McStretchTabsCssStyler,
|
1435
|
+
McVerticalTabsCssStyler], imports: [CommonModule,
|
1436
|
+
PortalModule,
|
1437
|
+
A11yModule,
|
1438
|
+
McCommonModule,
|
1439
|
+
McIconModule,
|
1440
|
+
McToolTipModule], exports: [McCommonModule,
|
1441
|
+
McTabGroup,
|
1442
|
+
McTabLabel,
|
1443
|
+
McTab,
|
1444
|
+
McTabNav,
|
1445
|
+
McTabLink,
|
1446
|
+
McTabContent,
|
1447
|
+
McOldTabsCssStyler,
|
1448
|
+
McAlignTabsCenterCssStyler,
|
1449
|
+
McAlignTabsEndCssStyler,
|
1450
|
+
McStretchTabsCssStyler,
|
1451
|
+
McVerticalTabsCssStyler] });
|
1452
|
+
/** @nocollapse */ /** @nocollapse */ McTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabsModule, imports: [[
|
1453
|
+
CommonModule,
|
1454
|
+
PortalModule,
|
1455
|
+
A11yModule,
|
1456
|
+
McCommonModule,
|
1457
|
+
McIconModule,
|
1458
|
+
McToolTipModule
|
1459
|
+
], McCommonModule] });
|
1460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTabsModule, decorators: [{
|
1461
|
+
type: NgModule,
|
1462
|
+
args: [{
|
1463
|
+
imports: [
|
1464
|
+
CommonModule,
|
1465
|
+
PortalModule,
|
1466
|
+
A11yModule,
|
1467
|
+
McCommonModule,
|
1468
|
+
McIconModule,
|
1469
|
+
McToolTipModule
|
1470
|
+
],
|
1471
|
+
// Don't export all components because some are only to be used internally.
|
1472
|
+
exports: [
|
1473
|
+
McCommonModule,
|
1474
|
+
McTabGroup,
|
1475
|
+
McTabLabel,
|
1476
|
+
McTab,
|
1477
|
+
McTabNav,
|
1478
|
+
McTabLink,
|
1479
|
+
McTabContent,
|
1480
|
+
McOldTabsCssStyler,
|
1481
|
+
McAlignTabsCenterCssStyler,
|
1482
|
+
McAlignTabsEndCssStyler,
|
1483
|
+
McStretchTabsCssStyler,
|
1484
|
+
McVerticalTabsCssStyler
|
1485
|
+
],
|
1486
|
+
declarations: [
|
1487
|
+
McTabGroup,
|
1488
|
+
McTabLabel,
|
1489
|
+
McTab,
|
1490
|
+
McTabLabelWrapper,
|
1491
|
+
McTabNav,
|
1492
|
+
McTabLink,
|
1493
|
+
McTabBody,
|
1494
|
+
McTabBodyPortal,
|
1495
|
+
McTabHeader,
|
1496
|
+
McTabContent,
|
1497
|
+
McOldTabsCssStyler,
|
1498
|
+
McAlignTabsCenterCssStyler,
|
1499
|
+
McAlignTabsEndCssStyler,
|
1500
|
+
McStretchTabsCssStyler,
|
1501
|
+
McVerticalTabsCssStyler
|
1502
|
+
]
|
1503
|
+
}]
|
1504
|
+
}] });
|
1505
|
+
|
1506
|
+
/**
|
1507
|
+
* Generated bundle index. Do not edit.
|
1508
|
+
*/
|
1509
|
+
|
1510
|
+
export { MC_TABS_CONFIG, McAlignTabsCenterCssStyler, McAlignTabsEndCssStyler, McOldTabsCssStyler, McStretchTabsCssStyler, McTab, McTabBody, McTabBodyPortal, McTabChangeEvent, McTabContent, McTabGroup, McTabGroupBase, McTabGroupMixinBase, McTabHeader, McTabLabel, McTabLabelWrapper, McTabLink, McTabNav, McTabsModule, McVerticalTabsCssStyler, mcTabsAnimations };
|
1511
|
+
//# sourceMappingURL=ptsecurity-mosaic-tabs.mjs.map
|