@ptsecurity/mosaic 12.1.0 → 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 +113 -66
- package/_visual.scss +11 -9
- 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/core/pop-up/pop-up-trigger.d.ts +9 -12
- package/datepicker/README.md +0 -0
- package/datepicker/package.json +5 -5
- package/design-tokens/package.json +5 -5
- package/design-tokens/style-dictionary/build.js +6 -0
- package/design-tokens/style-dictionary/configs/index.js +2 -1
- package/design-tokens/tokens/components/navbar.json5 +12 -9
- package/design-tokens/tokens.d.ts +11 -9
- package/divider/README.md +0 -0
- package/divider/package.json +5 -5
- package/dropdown/dropdown-item.component.d.ts +1 -0
- 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 -10
- 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/esm2020/form-field/cleaner.mjs +23 -0
- 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/esm2020/input/input-number-validators.mjs +92 -0
- 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/esm2020/modal/modal.module.mjs +72 -0
- package/esm2020/modal/modal.service.mjs +124 -0
- 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/esm2020/popover/popover.module.mjs +24 -0
- 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} +2 -1
- 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/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
- package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
- package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
- 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/esm2020/tree/tree.module.mjs +53 -0
- 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/esm2020/tree-select/tree-select.component.mjs +889 -0
- 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} +186 -241
- 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 -11
- 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.js → ptsecurity-mosaic-progress-bar.mjs} +10 -18
- 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} +45 -53
- 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} +41 -27
- 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} +41 -70
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
- package/{fesm2015/ptsecurity-mosaic-modal.js → fesm2020/ptsecurity-mosaic-modal.mjs} +63 -59
- 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} +57 -53
- 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} +29 -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} +16 -15
- 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} +61 -108
- 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/cleaner.d.ts +2 -0
- package/form-field/package.json +5 -5
- package/icon/README.md +0 -0
- package/icon/package.json +5 -5
- package/input/input-number-validators.d.ts +2 -2
- 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/modal.component.d.ts +2 -0
- package/modal/modal.module.d.ts +1 -1
- 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/popover/popover-confirm.component.d.ts +33 -0
- package/popover/popover.component.d.ts +14 -4
- package/popover/popover.module.d.ts +6 -3
- package/popover/public-api.d.ts +1 -0
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-visual/default-visual.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/select/select.component.d.ts +2 -7
- package/sidebar/package.json +5 -5
- package/sidepanel/package.json +5 -5
- package/sidepanel/sidepanel-directives.d.ts +2 -0
- package/sidepanel/sidepanel.module.d.ts +2 -1
- package/splitter/package.json +5 -5
- package/splitter/splitter.component.d.ts +46 -5
- 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/tooltip/tooltip.component.d.ts +12 -3
- package/tree/package.json +5 -5
- package/tree/padding.directive.d.ts +1 -1
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-selection.component.d.ts +2 -2
- package/tree/tree.module.d.ts +1 -1
- package/tree-select/README.md +0 -0
- package/tree-select/package.json +5 -5
- package/tree-select/tree-select.component.d.ts +2 -7
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1162
- package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -757
- package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-button.umd.js +0 -535
- package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-card.umd.js +0 -481
- package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -764
- package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-core.umd.js +0 -2887
- package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3357
- package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1872
- package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-divider.umd.js +0 -108
- package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1519
- package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -789
- package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-icon.umd.js +0 -452
- package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-input.umd.js +0 -996
- package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-link.umd.js +0 -517
- package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-list.umd.js +0 -1250
- package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1304
- package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -932
- package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-popover.umd.js +0 -655
- package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -442
- package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -450
- package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-radio.umd.js +0 -903
- package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-select.umd.js +0 -1608
- package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -256
- package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -950
- package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -438
- package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-table.umd.js +0 -83
- package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2015
- package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1913
- package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -666
- package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -822
- package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -559
- package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -728
- package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1370
- package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
- package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2309
- 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 -287
- 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 -273
- 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 -142
- package/esm2015/dropdown/dropdown-trigger.directive.js +0 -478
- package/esm2015/dropdown/dropdown.component.js +0 -302
- package/esm2015/form-field/cleaner.js +0 -19
- package/esm2015/form-field/form-field.js +0 -224
- package/esm2015/icon/icon.component.js +0 -51
- package/esm2015/input/input-number-validators.js +0 -78
- package/esm2015/link/link.component.js +0 -108
- package/esm2015/list/list-selection.component.js +0 -708
- package/esm2015/list/list.component.js +0 -58
- package/esm2015/modal/modal.component.js +0 -506
- package/esm2015/modal/modal.module.js +0 -70
- package/esm2015/modal/modal.service.js +0 -117
- 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.component.js +0 -219
- package/esm2015/popover/popover.module.js +0 -21
- 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 -113
- package/esm2015/sidepanel/sidepanel-directives.js +0 -155
- package/esm2015/sidepanel/sidepanel.module.js +0 -70
- package/esm2015/sidepanel/sidepanel.service.js +0 -163
- package/esm2015/splitter/splitter.component.js +0 -331
- 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 -382
- package/esm2015/timepicker/timepicker.directive.js +0 -652
- package/esm2015/toggle/toggle.component.js +0 -169
- package/esm2015/tooltip/tooltip.component.js +0 -260
- package/esm2015/tree/padding.directive.js +0 -114
- 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/esm2015/tree/tree.module.js +0 -56
- package/esm2015/tree-select/tree-select.component.js +0 -900
- 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 -393
- 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 -257
- package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
- 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 -373
- 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 -323
- 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,842 @@
|
|
1
|
+
import * as i1 from '@angular/cdk/overlay';
|
2
|
+
import { OverlayRef, OverlayModule } from '@angular/cdk/overlay';
|
3
|
+
import * as i5 from '@angular/common';
|
4
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
5
|
+
import * as i0 from '@angular/core';
|
6
|
+
import { Injectable, Optional, SkipSelf, Directive, Pipe, EventEmitter, TemplateRef, Type, Injector, ViewContainerRef, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Input, Output, ViewChild, ViewChildren, NgModule } from '@angular/core';
|
7
|
+
import { ESCAPE, ENTER } from '@ptsecurity/cdk/keycodes';
|
8
|
+
import { ThemePalette } from '@ptsecurity/mosaic/core';
|
9
|
+
import { Subject } from 'rxjs';
|
10
|
+
import * as i3 from '@ptsecurity/mosaic/button';
|
11
|
+
import { McButtonModule } from '@ptsecurity/mosaic/button';
|
12
|
+
import * as i4 from '@ptsecurity/mosaic/icon';
|
13
|
+
import { McIconModule } from '@ptsecurity/mosaic/icon';
|
14
|
+
import * as i6 from '@angular/cdk/a11y';
|
15
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
16
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
17
|
+
import { filter } from 'rxjs/operators';
|
18
|
+
|
19
|
+
/**
|
20
|
+
* API class that public to users to handle the modal instance.
|
21
|
+
* McModalRef is aim to avoid accessing to the modal instance directly by users.
|
22
|
+
*/
|
23
|
+
// tslint:disable-next-line:naming-convention
|
24
|
+
class McModalRef {
|
25
|
+
}
|
26
|
+
|
27
|
+
class ModalUtil {
|
28
|
+
constructor(document) {
|
29
|
+
this.document = document;
|
30
|
+
this.lastPosition = { x: -1, y: -1 };
|
31
|
+
this.listenDocumentClick();
|
32
|
+
}
|
33
|
+
getLastClickPosition() {
|
34
|
+
return this.lastPosition;
|
35
|
+
}
|
36
|
+
listenDocumentClick() {
|
37
|
+
this.document.addEventListener('click', (event) => {
|
38
|
+
this.lastPosition = { x: event.clientX, y: event.clientY };
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}
|
42
|
+
const modalUtilObject = new ModalUtil(document);
|
43
|
+
|
44
|
+
var ModalSize;
|
45
|
+
(function (ModalSize) {
|
46
|
+
ModalSize["Small"] = "small";
|
47
|
+
ModalSize["Normal"] = "normal";
|
48
|
+
ModalSize["Large"] = "large";
|
49
|
+
})(ModalSize || (ModalSize = {}));
|
50
|
+
|
51
|
+
class McModalControlService {
|
52
|
+
constructor(parentService) {
|
53
|
+
this.parentService = parentService;
|
54
|
+
// @ts-ignore
|
55
|
+
this.rootOpenModals = this.parentService ? null : [];
|
56
|
+
// @ts-ignore
|
57
|
+
this.rootAfterAllClose = this.parentService ? null : new Subject();
|
58
|
+
// @ts-ignore
|
59
|
+
this.rootRegisteredMetaMap = this.parentService ? null : new Map();
|
60
|
+
}
|
61
|
+
// Track singleton afterAllClose through over the injection tree
|
62
|
+
get afterAllClose() {
|
63
|
+
return this.parentService ? this.parentService.afterAllClose : this.rootAfterAllClose;
|
64
|
+
}
|
65
|
+
// Track singleton openModals array through over the injection tree
|
66
|
+
get openModals() {
|
67
|
+
return this.parentService ? this.parentService.openModals : this.rootOpenModals;
|
68
|
+
}
|
69
|
+
// Registered modal for later usage
|
70
|
+
get registeredMetaMap() {
|
71
|
+
return this.parentService ? this.parentService.registeredMetaMap : this.rootRegisteredMetaMap;
|
72
|
+
}
|
73
|
+
// Register a modal to listen its open/close
|
74
|
+
registerModal(modalRef) {
|
75
|
+
if (!this.hasRegistered(modalRef)) {
|
76
|
+
const afterOpenSubscription = modalRef.afterOpen.subscribe(() => this.openModals.push(modalRef));
|
77
|
+
const afterCloseSubscription = modalRef.afterClose.subscribe(() => this.removeOpenModal(modalRef));
|
78
|
+
this.registeredMetaMap.set(modalRef, { modalRef, afterOpenSubscription, afterCloseSubscription });
|
79
|
+
}
|
80
|
+
}
|
81
|
+
hasRegistered(modalRef) {
|
82
|
+
return this.registeredMetaMap.has(modalRef);
|
83
|
+
}
|
84
|
+
// Close all registered opened modals
|
85
|
+
closeAll() {
|
86
|
+
let i = this.openModals.length;
|
87
|
+
while (i--) {
|
88
|
+
this.openModals[i].close();
|
89
|
+
}
|
90
|
+
}
|
91
|
+
removeOpenModal(modalRef) {
|
92
|
+
const index = this.openModals.indexOf(modalRef);
|
93
|
+
if (index > -1) {
|
94
|
+
this.openModals.splice(index, 1);
|
95
|
+
if (!this.openModals.length) {
|
96
|
+
this.afterAllClose.next();
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
/** @nocollapse */ /** @nocollapse */ McModalControlService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalControlService, deps: [{ token: McModalControlService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
102
|
+
/** @nocollapse */ /** @nocollapse */ McModalControlService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalControlService });
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalControlService, decorators: [{
|
104
|
+
type: Injectable
|
105
|
+
}], ctorParameters: function () {
|
106
|
+
return [{ type: McModalControlService, decorators: [{
|
107
|
+
type: Optional
|
108
|
+
}, {
|
109
|
+
type: SkipSelf
|
110
|
+
}] }];
|
111
|
+
} });
|
112
|
+
|
113
|
+
class McModalTitle {
|
114
|
+
}
|
115
|
+
/** @nocollapse */ /** @nocollapse */ McModalTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
116
|
+
/** @nocollapse */ /** @nocollapse */ McModalTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McModalTitle, selector: "[mc-modal-title], mc-modal-title, [mcModalTitle]", host: { classAttribute: "mc-modal-header mc-modal-title" }, ngImport: i0 });
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalTitle, decorators: [{
|
118
|
+
type: Directive,
|
119
|
+
args: [{
|
120
|
+
selector: `[mc-modal-title], mc-modal-title, [mcModalTitle]`,
|
121
|
+
host: {
|
122
|
+
class: 'mc-modal-header mc-modal-title'
|
123
|
+
}
|
124
|
+
}]
|
125
|
+
}] });
|
126
|
+
class McModalBody {
|
127
|
+
}
|
128
|
+
/** @nocollapse */ /** @nocollapse */ McModalBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
129
|
+
/** @nocollapse */ /** @nocollapse */ McModalBody.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McModalBody, selector: "[mc-modal-body], mc-modal-body, [mcModalBody]", host: { classAttribute: "mc-modal-body" }, ngImport: i0 });
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalBody, decorators: [{
|
131
|
+
type: Directive,
|
132
|
+
args: [{
|
133
|
+
selector: `[mc-modal-body], mc-modal-body, [mcModalBody]`,
|
134
|
+
host: {
|
135
|
+
class: 'mc-modal-body'
|
136
|
+
}
|
137
|
+
}]
|
138
|
+
}] });
|
139
|
+
class McModalFooter {
|
140
|
+
}
|
141
|
+
/** @nocollapse */ /** @nocollapse */ McModalFooter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
142
|
+
/** @nocollapse */ /** @nocollapse */ McModalFooter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McModalFooter, selector: "[mc-modal-footer], mc-modal-footer, [mcModalFooter]", host: { classAttribute: "mc-modal-footer" }, ngImport: i0 });
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalFooter, decorators: [{
|
144
|
+
type: Directive,
|
145
|
+
args: [{
|
146
|
+
selector: `[mc-modal-footer], mc-modal-footer, [mcModalFooter]`,
|
147
|
+
host: {
|
148
|
+
class: 'mc-modal-footer'
|
149
|
+
}
|
150
|
+
}]
|
151
|
+
}] });
|
152
|
+
class McModalMainAction {
|
153
|
+
}
|
154
|
+
/** @nocollapse */ /** @nocollapse */ McModalMainAction.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
155
|
+
/** @nocollapse */ /** @nocollapse */ McModalMainAction.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McModalMainAction, selector: "[mc-modal-main-action]", ngImport: i0 });
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalMainAction, decorators: [{
|
157
|
+
type: Directive,
|
158
|
+
args: [{
|
159
|
+
selector: `[mc-modal-main-action]`
|
160
|
+
}]
|
161
|
+
}] });
|
162
|
+
|
163
|
+
class CssUnitPipe {
|
164
|
+
transform(value, defaultUnit = 'px') {
|
165
|
+
const formatted = +value;
|
166
|
+
return isNaN(formatted) ? `${value}` : `${formatted}${defaultUnit}`;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
/** @nocollapse */ /** @nocollapse */ CssUnitPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
170
|
+
/** @nocollapse */ /** @nocollapse */ CssUnitPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CssUnitPipe, name: "toCssUnit" });
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CssUnitPipe, decorators: [{
|
172
|
+
type: Pipe,
|
173
|
+
args: [{
|
174
|
+
name: 'toCssUnit'
|
175
|
+
}]
|
176
|
+
}] });
|
177
|
+
|
178
|
+
// Duration when perform animations (ms)
|
179
|
+
const MODAL_ANIMATE_DURATION = 200;
|
180
|
+
class McModalComponent extends McModalRef {
|
181
|
+
constructor(overlay, renderer, cfr, elementRef, viewContainer, modalControl, changeDetector, document) {
|
182
|
+
super();
|
183
|
+
this.overlay = overlay;
|
184
|
+
this.renderer = renderer;
|
185
|
+
this.cfr = cfr;
|
186
|
+
this.elementRef = elementRef;
|
187
|
+
this.viewContainer = viewContainer;
|
188
|
+
this.modalControl = modalControl;
|
189
|
+
this.changeDetector = changeDetector;
|
190
|
+
this.document = document;
|
191
|
+
this.themePalette = ThemePalette;
|
192
|
+
this.mcModalType = 'default';
|
193
|
+
this._mcVisible = false;
|
194
|
+
this.mcVisibleChange = new EventEmitter();
|
195
|
+
this.mcZIndex = 1000;
|
196
|
+
this.mcSize = ModalSize.Normal;
|
197
|
+
this.mcCloseByESC = true;
|
198
|
+
this._mcClosable = true;
|
199
|
+
this._mcMask = true;
|
200
|
+
this._mcMaskClosable = false;
|
201
|
+
// Trigger when modal open(visible) after animations
|
202
|
+
this.mcAfterOpen = new EventEmitter();
|
203
|
+
// Trigger when modal leave-animation over
|
204
|
+
this.mcAfterClose = new EventEmitter();
|
205
|
+
this.mcOkType = 'primary';
|
206
|
+
this._mcOkLoading = false;
|
207
|
+
this.mcOnOk = new EventEmitter();
|
208
|
+
this._mcCancelLoading = false;
|
209
|
+
this.mcOnCancel = new EventEmitter();
|
210
|
+
this.isTopOverflow = false;
|
211
|
+
this.isBottomOverflow = false;
|
212
|
+
// The origin point that animation based on
|
213
|
+
this.transformOrigin = '0px 0px 0px';
|
214
|
+
this.mcGetContainer = () => this.overlay.create();
|
215
|
+
}
|
216
|
+
get mcVisible() { return this._mcVisible; }
|
217
|
+
set mcVisible(value) { this._mcVisible = value; }
|
218
|
+
get mcClosable() { return this._mcClosable; }
|
219
|
+
set mcClosable(value) { this._mcClosable = value; }
|
220
|
+
get mcMask() { return this._mcMask; }
|
221
|
+
set mcMask(value) { this._mcMask = value; }
|
222
|
+
get mcMaskClosable() { return this._mcMaskClosable; }
|
223
|
+
set mcMaskClosable(value) { this._mcMaskClosable = value; }
|
224
|
+
get mcOkLoading() { return this._mcOkLoading; }
|
225
|
+
set mcOkLoading(value) { this._mcOkLoading = value; }
|
226
|
+
get mcCancelLoading() { return this._mcCancelLoading; }
|
227
|
+
set mcCancelLoading(value) { this._mcCancelLoading = value; }
|
228
|
+
// Observable alias for mcAfterOpen
|
229
|
+
get afterOpen() {
|
230
|
+
return this.mcAfterOpen.asObservable();
|
231
|
+
}
|
232
|
+
// Observable alias for mcAfterClose
|
233
|
+
get afterClose() {
|
234
|
+
return this.mcAfterClose.asObservable();
|
235
|
+
}
|
236
|
+
get okText() {
|
237
|
+
return this.mcOkText;
|
238
|
+
}
|
239
|
+
get cancelText() {
|
240
|
+
return this.mcCancelText;
|
241
|
+
}
|
242
|
+
// Indicate whether this dialog should hidden
|
243
|
+
get hidden() {
|
244
|
+
return !this.mcVisible && !this.animationState;
|
245
|
+
}
|
246
|
+
ngOnInit() {
|
247
|
+
// Create component along without View
|
248
|
+
if (this.isComponent(this.mcContent)) {
|
249
|
+
this.createDynamicComponent(this.mcContent);
|
250
|
+
}
|
251
|
+
// Setup default button options
|
252
|
+
if (this.isModalButtons(this.mcFooter)) {
|
253
|
+
this.mcFooter = this.formatModalButtons(this.mcFooter);
|
254
|
+
}
|
255
|
+
if (this.isComponent(this.mcComponent)) {
|
256
|
+
this.createDynamicComponent(this.mcComponent);
|
257
|
+
}
|
258
|
+
// Place the modal dom to elsewhere
|
259
|
+
this.container = typeof this.mcGetContainer === 'function' ? this.mcGetContainer() : this.mcGetContainer;
|
260
|
+
if (this.container instanceof HTMLElement) {
|
261
|
+
this.container.appendChild(this.elementRef.nativeElement);
|
262
|
+
}
|
263
|
+
else if (this.container instanceof OverlayRef) {
|
264
|
+
// NOTE: only attach the dom to overlay, the view container is not changed actually
|
265
|
+
this.container.overlayElement.appendChild(this.elementRef.nativeElement);
|
266
|
+
}
|
267
|
+
// Register modal when afterOpen/afterClose is stable
|
268
|
+
this.modalControl.registerModal(this);
|
269
|
+
}
|
270
|
+
// [NOTE] NOT available when using by service!
|
271
|
+
// Because ngOnChanges never be called when using by service,
|
272
|
+
// here we can't support "mcContent"(Component) etc. as inputs that initialized dynamically.
|
273
|
+
// BUT: User also can change "mcContent" dynamically to trigger UI changes
|
274
|
+
// (provided you don't use Component that needs initializations)
|
275
|
+
ngOnChanges(changes) {
|
276
|
+
if (changes.mcVisible) {
|
277
|
+
// Do not trigger animation while initializing
|
278
|
+
this.handleVisibleStateChange(this.mcVisible, !changes.mcVisible.firstChange);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
ngAfterViewInit() {
|
282
|
+
var _a;
|
283
|
+
// If using Component, it is the time to attach View while bodyContainer is ready
|
284
|
+
if (this.contentComponentRef) {
|
285
|
+
this.bodyContainer.insert(this.contentComponentRef.hostView);
|
286
|
+
}
|
287
|
+
(_a = this.getElement().getElementsByTagName('button')[0]) === null || _a === void 0 ? void 0 : _a.focus();
|
288
|
+
for (const autoFocusedButton of this.autoFocusedButtons.toArray()) {
|
289
|
+
if (autoFocusedButton.nativeElement.autofocus) {
|
290
|
+
autoFocusedButton.nativeElement.focus();
|
291
|
+
break;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
this.checkOverflow();
|
295
|
+
}
|
296
|
+
ngOnDestroy() {
|
297
|
+
if (this.container instanceof OverlayRef) {
|
298
|
+
this.container.dispose();
|
299
|
+
}
|
300
|
+
}
|
301
|
+
checkOverflow() {
|
302
|
+
var _a;
|
303
|
+
const nativeElement = (_a = this.modalBody) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
304
|
+
if (!nativeElement) {
|
305
|
+
return;
|
306
|
+
}
|
307
|
+
const scrollTop = nativeElement.scrollTop;
|
308
|
+
const offsetHeight = nativeElement.offsetHeight;
|
309
|
+
const scrollHeight = nativeElement.scrollHeight;
|
310
|
+
this.isTopOverflow = scrollTop > 0;
|
311
|
+
this.isBottomOverflow = scrollTop + offsetHeight < scrollHeight;
|
312
|
+
}
|
313
|
+
open() {
|
314
|
+
this.changeVisibleFromInside(true);
|
315
|
+
}
|
316
|
+
close(result) {
|
317
|
+
this.changeVisibleFromInside(false, result);
|
318
|
+
}
|
319
|
+
// Destroy equals Close
|
320
|
+
destroy(result) {
|
321
|
+
this.close(result);
|
322
|
+
}
|
323
|
+
markForCheck() {
|
324
|
+
this.changeDetector.markForCheck();
|
325
|
+
}
|
326
|
+
triggerOk() {
|
327
|
+
this.onClickOkCancel('ok');
|
328
|
+
}
|
329
|
+
triggerCancel() {
|
330
|
+
this.onClickOkCancel('cancel');
|
331
|
+
}
|
332
|
+
getInstance() {
|
333
|
+
return this;
|
334
|
+
}
|
335
|
+
getContentComponentRef() {
|
336
|
+
return this.contentComponentRef;
|
337
|
+
}
|
338
|
+
getContentComponent() {
|
339
|
+
return this.contentComponentRef && this.contentComponentRef.instance;
|
340
|
+
}
|
341
|
+
getElement() {
|
342
|
+
return this.elementRef && this.elementRef.nativeElement;
|
343
|
+
}
|
344
|
+
getMcFooter() {
|
345
|
+
return this.getElement().getElementsByClassName('mc-modal-footer').item(0);
|
346
|
+
}
|
347
|
+
onClickMask($event) {
|
348
|
+
if (this.mcMask &&
|
349
|
+
this.mcMaskClosable &&
|
350
|
+
$event.target.classList.contains('mc-modal-wrap') &&
|
351
|
+
this.mcVisible) {
|
352
|
+
this.onClickOkCancel('cancel');
|
353
|
+
}
|
354
|
+
}
|
355
|
+
// tslint:disable-next-line: no-reserved-keywords
|
356
|
+
isModalType(type) {
|
357
|
+
return this.mcModalType === type;
|
358
|
+
}
|
359
|
+
onKeyDown(event) {
|
360
|
+
var _a;
|
361
|
+
// tslint:disable-next-line:deprecation .key isn't supported in Edge
|
362
|
+
if (event.keyCode === ESCAPE && this.container && (this.container instanceof OverlayRef)) {
|
363
|
+
this.close();
|
364
|
+
event.preventDefault();
|
365
|
+
}
|
366
|
+
// tslint:disable-next-line:deprecation .key isn't supported in Edge
|
367
|
+
if (event.ctrlKey && event.keyCode === ENTER) {
|
368
|
+
if (this.mcModalType === 'confirm') {
|
369
|
+
this.triggerOk();
|
370
|
+
}
|
371
|
+
(_a = this.getElement().querySelector('[mc-modal-main-action]')) === null || _a === void 0 ? void 0 : _a.click();
|
372
|
+
event.preventDefault();
|
373
|
+
}
|
374
|
+
}
|
375
|
+
// AoT
|
376
|
+
onClickCloseBtn() {
|
377
|
+
if (this.mcVisible) {
|
378
|
+
this.onClickOkCancel('cancel');
|
379
|
+
}
|
380
|
+
}
|
381
|
+
// AoT
|
382
|
+
// tslint:disable-next-line: no-reserved-keywords
|
383
|
+
onClickOkCancel(type) {
|
384
|
+
const trigger = { ok: this.mcOnOk, cancel: this.mcOnCancel }[type];
|
385
|
+
const loadingKey = { ok: 'mcOkLoading', cancel: 'mcCancelLoading' }[type];
|
386
|
+
if (trigger instanceof EventEmitter) {
|
387
|
+
trigger.emit(this.getContentComponent());
|
388
|
+
}
|
389
|
+
else if (typeof trigger === 'function') {
|
390
|
+
const result = trigger(this.getContentComponent());
|
391
|
+
// Users can return "false" to prevent closing by default
|
392
|
+
const caseClose = (doClose) => (doClose !== false) && this.close(doClose);
|
393
|
+
if (isPromise(result)) {
|
394
|
+
this[loadingKey] = true;
|
395
|
+
const handleThen = (doClose) => {
|
396
|
+
this[loadingKey] = false;
|
397
|
+
caseClose(doClose);
|
398
|
+
};
|
399
|
+
result.then(handleThen).catch(handleThen);
|
400
|
+
}
|
401
|
+
else {
|
402
|
+
caseClose(result);
|
403
|
+
}
|
404
|
+
}
|
405
|
+
}
|
406
|
+
// AoT
|
407
|
+
isNonEmptyString(value) {
|
408
|
+
return typeof value === 'string' && value !== '';
|
409
|
+
}
|
410
|
+
// AoT
|
411
|
+
isTemplateRef(value) {
|
412
|
+
return value instanceof TemplateRef;
|
413
|
+
}
|
414
|
+
// AoT
|
415
|
+
isComponent(value) {
|
416
|
+
return value instanceof Type;
|
417
|
+
}
|
418
|
+
// AoT
|
419
|
+
isModalButtons(value) {
|
420
|
+
return Array.isArray(value) && value.length > 0;
|
421
|
+
}
|
422
|
+
// Lookup a button's property, if the prop is a function, call & then return the result, otherwise, return itself.
|
423
|
+
// AoT
|
424
|
+
getButtonCallableProp(options, prop) {
|
425
|
+
const value = options[prop];
|
426
|
+
const args = [];
|
427
|
+
if (this.contentComponentRef) {
|
428
|
+
args.push(this.contentComponentRef.instance);
|
429
|
+
}
|
430
|
+
return typeof value === 'function' ? value.apply(options, args) : value;
|
431
|
+
}
|
432
|
+
// On mcFooter's modal button click
|
433
|
+
// AoT
|
434
|
+
onButtonClick(button) {
|
435
|
+
// Call onClick directly
|
436
|
+
// tslint:disable-next-line:no-inferred-empty-object-type rule seems to be broken
|
437
|
+
const result = this.getButtonCallableProp(button, 'onClick');
|
438
|
+
if (isPromise(result)) {
|
439
|
+
button.loading = true;
|
440
|
+
result.then(() => button.loading = false).catch(() => button.loading = false);
|
441
|
+
}
|
442
|
+
}
|
443
|
+
// Do rest things when visible state changed
|
444
|
+
handleVisibleStateChange(visible, animation = true, closeResult) {
|
445
|
+
// Hide scrollbar at the first time when shown up
|
446
|
+
if (visible) {
|
447
|
+
this.changeBodyOverflow(1);
|
448
|
+
}
|
449
|
+
return Promise
|
450
|
+
.resolve(animation && this.animateTo(visible))
|
451
|
+
// Emit open/close event after animations over
|
452
|
+
.then(() => {
|
453
|
+
if (visible) {
|
454
|
+
this.mcAfterOpen.emit();
|
455
|
+
}
|
456
|
+
else {
|
457
|
+
this.mcAfterClose.emit(closeResult);
|
458
|
+
// Show/hide scrollbar when animation is over
|
459
|
+
this.changeBodyOverflow();
|
460
|
+
}
|
461
|
+
});
|
462
|
+
}
|
463
|
+
// Change mcVisible from inside
|
464
|
+
changeVisibleFromInside(visible, closeResult) {
|
465
|
+
if (this.mcVisible !== visible) {
|
466
|
+
// Change mcVisible value immediately
|
467
|
+
this.mcVisible = visible;
|
468
|
+
this.mcVisibleChange.emit(visible);
|
469
|
+
return this.handleVisibleStateChange(visible, true, closeResult);
|
470
|
+
}
|
471
|
+
return Promise.resolve();
|
472
|
+
}
|
473
|
+
changeAnimationState(state) {
|
474
|
+
this.animationState = state;
|
475
|
+
if (state) {
|
476
|
+
this.maskAnimationClassMap = {
|
477
|
+
[`fade-${state}`]: true,
|
478
|
+
[`fade-${state}-active`]: true
|
479
|
+
};
|
480
|
+
this.modalAnimationClassMap = {
|
481
|
+
[`zoom-${state}`]: true,
|
482
|
+
[`zoom-${state}-active`]: true
|
483
|
+
};
|
484
|
+
}
|
485
|
+
else {
|
486
|
+
// @ts-ignore
|
487
|
+
this.maskAnimationClassMap = this.modalAnimationClassMap = null;
|
488
|
+
}
|
489
|
+
if (this.contentComponentRef) {
|
490
|
+
this.contentComponentRef.changeDetectorRef.markForCheck();
|
491
|
+
}
|
492
|
+
else {
|
493
|
+
this.changeDetector.markForCheck();
|
494
|
+
}
|
495
|
+
}
|
496
|
+
animateTo(isVisible) {
|
497
|
+
// Figure out the lastest click position when shows up
|
498
|
+
if (isVisible) {
|
499
|
+
// [NOTE] Using timeout due to the document.click event is fired later than visible change,
|
500
|
+
// so if not postponed to next event-loop, we can't get the lastest click position
|
501
|
+
window.setTimeout(() => this.updateTransformOrigin());
|
502
|
+
}
|
503
|
+
this.changeAnimationState(isVisible ? 'enter' : 'leave');
|
504
|
+
// Return when animation is over
|
505
|
+
return new Promise((resolve) => {
|
506
|
+
return window.setTimeout(() => {
|
507
|
+
this.changeAnimationState(null);
|
508
|
+
resolve(null);
|
509
|
+
}, MODAL_ANIMATE_DURATION);
|
510
|
+
});
|
511
|
+
}
|
512
|
+
formatModalButtons(buttons) {
|
513
|
+
return buttons.map((button) => {
|
514
|
+
return Object.assign({
|
515
|
+
type: 'default',
|
516
|
+
size: 'default',
|
517
|
+
autoLoading: true,
|
518
|
+
show: true,
|
519
|
+
loading: false,
|
520
|
+
disabled: false
|
521
|
+
}, button);
|
522
|
+
});
|
523
|
+
}
|
524
|
+
/**
|
525
|
+
* Create a component dynamically but not attach to any View
|
526
|
+
* (this action will be executed when bodyContainer is ready)
|
527
|
+
* @param component Component class
|
528
|
+
*/
|
529
|
+
createDynamicComponent(component) {
|
530
|
+
const factory = this.cfr.resolveComponentFactory(component);
|
531
|
+
const childInjector = Injector.create({
|
532
|
+
providers: [{ provide: McModalRef, useValue: this }],
|
533
|
+
parent: this.viewContainer.injector
|
534
|
+
});
|
535
|
+
this.contentComponentRef = factory.create(childInjector);
|
536
|
+
if (this.mcComponentParams) {
|
537
|
+
Object.assign(this.contentComponentRef.instance, this.mcComponentParams);
|
538
|
+
}
|
539
|
+
// Do the first change detection immediately
|
540
|
+
// (or we do detection at ngAfterViewInit, multi-changes error will be thrown)
|
541
|
+
this.contentComponentRef.changeDetectorRef.detectChanges();
|
542
|
+
}
|
543
|
+
// Update transform-origin to the last click position on document
|
544
|
+
updateTransformOrigin() {
|
545
|
+
const modalElement = this.modalContainer.nativeElement;
|
546
|
+
const lastPosition = modalUtilObject.getLastClickPosition();
|
547
|
+
if (lastPosition) {
|
548
|
+
this.transformOrigin = `${lastPosition.x - modalElement.offsetLeft}px ${lastPosition.y - modalElement.offsetTop}px 0px`;
|
549
|
+
}
|
550
|
+
}
|
551
|
+
/**
|
552
|
+
* Take care of the body's overflow to decide the existense of scrollbar
|
553
|
+
* @param plusNum The number that the openModals.length will increase soon
|
554
|
+
*/
|
555
|
+
changeBodyOverflow(plusNum = 0) {
|
556
|
+
const openModals = this.modalControl.openModals;
|
557
|
+
if (openModals.length + plusNum > 0) {
|
558
|
+
this.renderer.setStyle(this.document.body, 'overflow', 'hidden');
|
559
|
+
}
|
560
|
+
else {
|
561
|
+
this.renderer.removeStyle(this.document.body, 'overflow');
|
562
|
+
}
|
563
|
+
}
|
564
|
+
}
|
565
|
+
/** @nocollapse */ /** @nocollapse */ McModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: McModalControlService }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
566
|
+
/** @nocollapse */ /** @nocollapse */ McModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McModalComponent, selector: "mc-modal", inputs: { mcModalType: "mcModalType", mcComponent: "mcComponent", mcContent: "mcContent", mcComponentParams: "mcComponentParams", mcFooter: "mcFooter", mcVisible: "mcVisible", mcZIndex: "mcZIndex", mcWidth: "mcWidth", mcSize: "mcSize", mcWrapClassName: "mcWrapClassName", mcClassName: "mcClassName", mcStyle: "mcStyle", mcTitle: "mcTitle", mcCloseByESC: "mcCloseByESC", mcClosable: "mcClosable", mcMask: "mcMask", mcMaskClosable: "mcMaskClosable", mcMaskStyle: "mcMaskStyle", mcBodyStyle: "mcBodyStyle", mcOkText: "mcOkText", mcOkType: "mcOkType", mcOkLoading: "mcOkLoading", mcOnOk: "mcOnOk", mcCancelText: "mcCancelText", mcCancelLoading: "mcCancelLoading", mcOnCancel: "mcOnCancel", mcGetContainer: "mcGetContainer" }, outputs: { mcVisibleChange: "mcVisibleChange", mcAfterOpen: "mcAfterOpen", mcAfterClose: "mcAfterClose", mcOnOk: "mcOnOk", mcOnCancel: "mcOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"mc-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.mc-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\"\n ></div>\n <div (mousedown)=\"onClickMask($event)\"\n class=\"mc-modal-wrap {{ mcWrapClassName }}\"\n [style.zIndex]=\"mcZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"mc-modal {{ mcClassName }} mc-modal_{{ mcSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"mcStyle\"\n [style.width]=\"mcWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"mc-modal-content\" cdkTrapFocus>\n <button *ngIf=\"mcClosable\"\n mc-button\n (click)=\"onClickCloseBtn()\"\n class=\"mc-modal-close mc-button_transparent\">\n <i mc-icon=\"mc-close-L_16\" class=\"mc-icon mc-icon_light\" [color]=\"themePalette.Second\"></i>\n </button>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer></ng-container>\n</ng-template>\n\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"mcTitle\" class=\"mc-modal-header\" [class.mc-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"mc-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcTitle)\" [ngTemplateOutlet]=\"$any(mcTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcTitle)\">\n <div [innerHTML]=\"mcTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"mc-modal-body\" #modalBody [ngStyle]=\"mcBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\" [ngTemplateOutlet]=\"$any(mcContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"mcFooter || mcOkText || mcCancelText\" class=\"mc-modal-footer\" [class.mc-modal-body_bottom-overflow]=\"isBottomOverflow\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcFooter)\" [ngTemplateOutlet]=\"$any(mcFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcFooter)\">\n <div [innerHTML]=\"mcFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(mcFooter)\">\n <ng-container *ngFor=\"let button of $any(mcFooter)\">\n <button\n mc-button\n #autoFocusedButton\n [attr.autofocus]=\"button.autoFocus\"\n [attr.mc-modal-main-action]=\"button.mcModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.mc-progress]=\"getButtonCallableProp(button, 'loading')\"\n (click)=\"onButtonClick(button)\"\n [color]=\"button.type\">\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n #autoFocusedButton\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n mc-button\n [color]=\"themePalette.Primary\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"mcCancelText\" mc-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"mc-modal-body\" [ngStyle]=\"mcBodyStyle\">\n <div class=\"mc-confirm-body-wrapper\">\n <div class=\"mc-confirm-body\">\n <div class=\"mc-confirm-content\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\"\n [ngTemplateOutlet]=\"$any(mcContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div> <!-- /.mc-confirm-body-wrapper -->\n </div>\n <div class=\"mc-confirm-btns\" *ngIf=\"mcOkText || mcCancelText\">\n <button\n mc-button\n #autoFocusedButton\n [color]=\"mcOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button mc-button [color]=\"themePalette.Second\" *ngIf=\"mcCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".mc-confirm .mc-modal-header,.mc-confirm .mc-modal-close{display:none}.mc-confirm .mc-modal-body{padding:24px;padding:var(--mc-modal-confirm-size-padding, 24px)}.mc-confirm-body-wrapper{zoom:1}.mc-confirm-body-wrapper:before,.mc-confirm-body-wrapper:after{content:\"\";display:table}.mc-confirm-body-wrapper:after{clear:both}.mc-confirm-body .mc-confirm-title{display:block;overflow:auto}.mc-confirm .mc-confirm-btns{border-radius:0 0 4px 4px;border-radius:var(--mc-modal-footer-size-border-radius, 0 0 4px 4px);text-align:right}.mc-confirm .mc-confirm-btns button+button{margin:16px}.mc-modal{box-sizing:border-box;position:relative;top:48px;top:var(--mc-modal-size-top, 48px);width:auto;margin:0 auto;list-style:none}.mc-modal.zoom-enter,.mc-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.mc-modal.mc-modal_small{width:400px;width:var(--mc-modal-size-small, 400px)}.mc-modal.mc-modal_normal{width:640px;width:var(--mc-modal-size-normal, 640px)}.mc-modal.mc-modal_large{width:960px;width:var(--mc-modal-size-large, 960px)}.mc-modal .mc-modal-close{position:absolute;z-index:10;top:0;right:0;width:56px;width:var(--mc-modal-size-close-width, 56px);height:56px;height:var(--mc-modal-size-close-width, 56px)}.mc-modal-wrap{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.mc-modal-title{margin:0}.mc-modal-content{position:relative;border-radius:4px;border-radius:var(--mc-modal-size-border-radius, 4px);background-clip:padding-box;background-color:#fff}.mc-modal-header{display:block;border-radius:4px 4px 0 0;border-radius:var(--mc-modal-header-size-border-radius, 4px 4px 0 0);padding:14px 16px;padding:var(--mc-modal-header-size-padding, 14px 16px)}.mc-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);max-height:var(--mc-modal-body-size-max-height, calc(100vh - 260px));padding:16px 24px 24px;padding:var(--mc-modal-body-size-padding, 16px 24px 24px);word-wrap:break-word}.mc-modal-footer{display:block;border-radius:0 0 4px 4px;border-radius:var(--mc-modal-footer-size-border-radius, 0 0 4px 4px);padding:16px;padding:var(--mc-modal-footer-size-padding, 16px 16px);text-align:right}.mc-modal-footer button+button{margin-left:16px;margin-bottom:0}.mc-modal-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;height:100%}.mc-modal-mask.mc-modal-mask-hidden{display:none}.mc-modal-open{overflow:hidden}\n"], components: [{ type: i3.McButton, selector: "[mc-button]", inputs: ["color", "tabIndex", "disabled"] }, { type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i3.McButtonCssStyler, selector: "[mc-button]" }, { type: i4.McIconCSSStyler, selector: "[mc-icon]" }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: McModalMainAction, selector: "[mc-modal-main-action]" }], pipes: { "toCssUnit": CssUnitPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalComponent, decorators: [{
|
568
|
+
type: Component,
|
569
|
+
args: [{ selector: 'mc-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
570
|
+
'(keydown)': 'onKeyDown($event)'
|
571
|
+
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content></ng-content>\n</ng-template>\n\n<div>\n <div *ngIf=\"mcMask\"\n class=\"mc-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.mc-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"mcMaskStyle\"\n [style.zIndex]=\"mcZIndex\"\n ></div>\n <div (mousedown)=\"onClickMask($event)\"\n class=\"mc-modal-wrap {{ mcWrapClassName }}\"\n [style.zIndex]=\"mcZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"mc-modal {{ mcClassName }} mc-modal_{{ mcSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"mcStyle\"\n [style.width]=\"mcWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"mc-modal-content\" cdkTrapFocus>\n <button *ngIf=\"mcClosable\"\n mc-button\n (click)=\"onClickCloseBtn()\"\n class=\"mc-modal-close mc-button_transparent\">\n <i mc-icon=\"mc-close-L_16\" class=\"mc-icon mc-icon_light\" [color]=\"themePalette.Second\"></i>\n </button>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer></ng-container>\n</ng-template>\n\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"mcTitle\" class=\"mc-modal-header\" [class.mc-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"mc-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcTitle)\" [ngTemplateOutlet]=\"$any(mcTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcTitle)\">\n <div [innerHTML]=\"mcTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"mc-modal-body\" #modalBody [ngStyle]=\"mcBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\" [ngTemplateOutlet]=\"$any(mcContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"mcFooter || mcOkText || mcCancelText\" class=\"mc-modal-footer\" [class.mc-modal-body_bottom-overflow]=\"isBottomOverflow\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcFooter)\" [ngTemplateOutlet]=\"$any(mcFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcFooter)\">\n <div [innerHTML]=\"mcFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(mcFooter)\">\n <ng-container *ngFor=\"let button of $any(mcFooter)\">\n <button\n mc-button\n #autoFocusedButton\n [attr.autofocus]=\"button.autoFocus\"\n [attr.mc-modal-main-action]=\"button.mcModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.mc-progress]=\"getButtonCallableProp(button, 'loading')\"\n (click)=\"onButtonClick(button)\"\n [color]=\"button.type\">\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n #autoFocusedButton\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n mc-button\n [color]=\"themePalette.Primary\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"mcCancelText\" mc-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"mc-modal-body\" [ngStyle]=\"mcBodyStyle\">\n <div class=\"mc-confirm-body-wrapper\">\n <div class=\"mc-confirm-body\">\n <div class=\"mc-confirm-content\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(mcContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(mcContent)\"\n [ngTemplateOutlet]=\"$any(mcContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(mcContent)\">\n <div [innerHTML]=\"mcContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div> <!-- /.mc-confirm-body-wrapper -->\n </div>\n <div class=\"mc-confirm-btns\" *ngIf=\"mcOkText || mcCancelText\">\n <button\n mc-button\n #autoFocusedButton\n [color]=\"mcOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"mcOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button mc-button [color]=\"themePalette.Second\" *ngIf=\"mcCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".mc-confirm .mc-modal-header,.mc-confirm .mc-modal-close{display:none}.mc-confirm .mc-modal-body{padding:24px;padding:var(--mc-modal-confirm-size-padding, 24px)}.mc-confirm-body-wrapper{zoom:1}.mc-confirm-body-wrapper:before,.mc-confirm-body-wrapper:after{content:\"\";display:table}.mc-confirm-body-wrapper:after{clear:both}.mc-confirm-body .mc-confirm-title{display:block;overflow:auto}.mc-confirm .mc-confirm-btns{border-radius:0 0 4px 4px;border-radius:var(--mc-modal-footer-size-border-radius, 0 0 4px 4px);text-align:right}.mc-confirm .mc-confirm-btns button+button{margin:16px}.mc-modal{box-sizing:border-box;position:relative;top:48px;top:var(--mc-modal-size-top, 48px);width:auto;margin:0 auto;list-style:none}.mc-modal.zoom-enter,.mc-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.mc-modal.mc-modal_small{width:400px;width:var(--mc-modal-size-small, 400px)}.mc-modal.mc-modal_normal{width:640px;width:var(--mc-modal-size-normal, 640px)}.mc-modal.mc-modal_large{width:960px;width:var(--mc-modal-size-large, 960px)}.mc-modal .mc-modal-close{position:absolute;z-index:10;top:0;right:0;width:56px;width:var(--mc-modal-size-close-width, 56px);height:56px;height:var(--mc-modal-size-close-width, 56px)}.mc-modal-wrap{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.mc-modal-title{margin:0}.mc-modal-content{position:relative;border-radius:4px;border-radius:var(--mc-modal-size-border-radius, 4px);background-clip:padding-box;background-color:#fff}.mc-modal-header{display:block;border-radius:4px 4px 0 0;border-radius:var(--mc-modal-header-size-border-radius, 4px 4px 0 0);padding:14px 16px;padding:var(--mc-modal-header-size-padding, 14px 16px)}.mc-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);max-height:var(--mc-modal-body-size-max-height, calc(100vh - 260px));padding:16px 24px 24px;padding:var(--mc-modal-body-size-padding, 16px 24px 24px);word-wrap:break-word}.mc-modal-footer{display:block;border-radius:0 0 4px 4px;border-radius:var(--mc-modal-footer-size-border-radius, 0 0 4px 4px);padding:16px;padding:var(--mc-modal-footer-size-padding, 16px 16px);text-align:right}.mc-modal-footer button+button{margin-left:16px;margin-bottom:0}.mc-modal-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;height:100%}.mc-modal-mask.mc-modal-mask-hidden{display:none}.mc-modal-open{overflow:hidden}\n"] }]
|
572
|
+
}], ctorParameters: function () {
|
573
|
+
return [{ type: i1.Overlay }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: McModalControlService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
574
|
+
type: Inject,
|
575
|
+
args: [DOCUMENT]
|
576
|
+
}] }];
|
577
|
+
}, propDecorators: { mcModalType: [{
|
578
|
+
type: Input
|
579
|
+
}], mcComponent: [{
|
580
|
+
type: Input
|
581
|
+
}], mcContent: [{
|
582
|
+
type: Input
|
583
|
+
}], mcComponentParams: [{
|
584
|
+
type: Input
|
585
|
+
}], mcFooter: [{
|
586
|
+
type: Input
|
587
|
+
}], mcVisible: [{
|
588
|
+
type: Input
|
589
|
+
}], mcVisibleChange: [{
|
590
|
+
type: Output
|
591
|
+
}], mcZIndex: [{
|
592
|
+
type: Input
|
593
|
+
}], mcWidth: [{
|
594
|
+
type: Input
|
595
|
+
}], mcSize: [{
|
596
|
+
type: Input
|
597
|
+
}], mcWrapClassName: [{
|
598
|
+
type: Input
|
599
|
+
}], mcClassName: [{
|
600
|
+
type: Input
|
601
|
+
}], mcStyle: [{
|
602
|
+
type: Input
|
603
|
+
}], mcTitle: [{
|
604
|
+
type: Input
|
605
|
+
}], mcCloseByESC: [{
|
606
|
+
type: Input
|
607
|
+
}], mcClosable: [{
|
608
|
+
type: Input
|
609
|
+
}], mcMask: [{
|
610
|
+
type: Input
|
611
|
+
}], mcMaskClosable: [{
|
612
|
+
type: Input
|
613
|
+
}], mcMaskStyle: [{
|
614
|
+
type: Input
|
615
|
+
}], mcBodyStyle: [{
|
616
|
+
type: Input
|
617
|
+
}], mcAfterOpen: [{
|
618
|
+
type: Output
|
619
|
+
}], mcAfterClose: [{
|
620
|
+
type: Output
|
621
|
+
}], mcOkText: [{
|
622
|
+
type: Input
|
623
|
+
}], mcOkType: [{
|
624
|
+
type: Input
|
625
|
+
}], mcOkLoading: [{
|
626
|
+
type: Input
|
627
|
+
}], mcOnOk: [{
|
628
|
+
type: Input
|
629
|
+
}, {
|
630
|
+
type: Output
|
631
|
+
}], mcCancelText: [{
|
632
|
+
type: Input
|
633
|
+
}], mcCancelLoading: [{
|
634
|
+
type: Input
|
635
|
+
}], mcOnCancel: [{
|
636
|
+
type: Input
|
637
|
+
}, {
|
638
|
+
type: Output
|
639
|
+
}], modalContainer: [{
|
640
|
+
type: ViewChild,
|
641
|
+
args: ['modalContainer', { static: true }]
|
642
|
+
}], bodyContainer: [{
|
643
|
+
type: ViewChild,
|
644
|
+
args: ['bodyContainer', { read: ViewContainerRef, static: false }]
|
645
|
+
}], autoFocusedButtons: [{
|
646
|
+
type: ViewChildren,
|
647
|
+
args: ['autoFocusedButton', { read: ElementRef }]
|
648
|
+
}], modalBody: [{
|
649
|
+
type: ViewChild,
|
650
|
+
args: ['modalBody']
|
651
|
+
}], mcGetContainer: [{
|
652
|
+
type: Input
|
653
|
+
}] } });
|
654
|
+
////////////
|
655
|
+
function isPromise(obj) {
|
656
|
+
// tslint:disable-next-line: no-unbound-method
|
657
|
+
return !!obj &&
|
658
|
+
(typeof obj === 'object' || typeof obj === 'function') &&
|
659
|
+
typeof obj.then === 'function' &&
|
660
|
+
typeof obj.catch === 'function';
|
661
|
+
}
|
662
|
+
|
663
|
+
// A builder used for managing service creating modals
|
664
|
+
class ModalBuilderForService {
|
665
|
+
constructor(overlay, options = {}) {
|
666
|
+
this.overlay = overlay;
|
667
|
+
this.createModal();
|
668
|
+
if (!('mcGetContainer' in options)) {
|
669
|
+
options.mcGetContainer = undefined;
|
670
|
+
}
|
671
|
+
this.changeProps(options);
|
672
|
+
this.modalRef.instance.open();
|
673
|
+
this.modalRef.instance.mcAfterClose.subscribe(() => this.destroyModal());
|
674
|
+
this.overlayRef.keydownEvents()
|
675
|
+
// @ts-ignore
|
676
|
+
.pipe(filter((event) => {
|
677
|
+
// tslint:disable-next-line:deprecation replacement .key isn't supported in Edge
|
678
|
+
return event.keyCode === ESCAPE && options.mcCloseByESC;
|
679
|
+
}))
|
680
|
+
.subscribe(() => this.modalRef.instance.close());
|
681
|
+
}
|
682
|
+
getInstance() {
|
683
|
+
return this.modalRef && this.modalRef.instance;
|
684
|
+
}
|
685
|
+
destroyModal() {
|
686
|
+
if (this.modalRef) {
|
687
|
+
this.overlayRef.dispose();
|
688
|
+
this.modalRef = null;
|
689
|
+
}
|
690
|
+
}
|
691
|
+
changeProps(options) {
|
692
|
+
if (this.modalRef) {
|
693
|
+
// here not limit user's inputs at runtime
|
694
|
+
Object.assign(this.modalRef.instance, options);
|
695
|
+
}
|
696
|
+
}
|
697
|
+
// Create component to ApplicationRef
|
698
|
+
createModal() {
|
699
|
+
this.overlayRef = this.overlay.create();
|
700
|
+
this.modalRef = this.overlayRef.attach(new ComponentPortal(McModalComponent));
|
701
|
+
}
|
702
|
+
}
|
703
|
+
class McModalService {
|
704
|
+
constructor(overlay, modalControl) {
|
705
|
+
this.overlay = overlay;
|
706
|
+
this.modalControl = modalControl;
|
707
|
+
}
|
708
|
+
// Track of the current close modals (we assume invisible is close this time)
|
709
|
+
get openModals() {
|
710
|
+
return this.modalControl.openModals;
|
711
|
+
}
|
712
|
+
get afterAllClose() {
|
713
|
+
return this.modalControl.afterAllClose.asObservable();
|
714
|
+
}
|
715
|
+
// Closes all of the currently-open dialogs
|
716
|
+
closeAll() {
|
717
|
+
this.modalControl.closeAll();
|
718
|
+
}
|
719
|
+
create(options = {}) {
|
720
|
+
if (typeof options.mcOnCancel !== 'function') {
|
721
|
+
// Leave a empty function to close this modal by default
|
722
|
+
// tslint:disable-next-line
|
723
|
+
options.mcOnCancel = () => { };
|
724
|
+
}
|
725
|
+
if (!('mcCloseByESC' in options)) {
|
726
|
+
options.mcCloseByESC = true;
|
727
|
+
}
|
728
|
+
// Remove the Cancel button if the user not specify a Cancel button
|
729
|
+
if (!('mcCancelText' in options)) {
|
730
|
+
options.mcCancelText = undefined;
|
731
|
+
}
|
732
|
+
// Remove the Ok button if the user not specify a Ok button
|
733
|
+
if (!('mcOkText' in options)) {
|
734
|
+
options.mcOkText = undefined;
|
735
|
+
}
|
736
|
+
// Remove the footer if the user not specify a footer
|
737
|
+
if (!('mcFooter' in options)) {
|
738
|
+
options.mcFooter = undefined;
|
739
|
+
}
|
740
|
+
return new ModalBuilderForService(this.overlay, options).getInstance();
|
741
|
+
}
|
742
|
+
confirm(options = {}, confirmType = 'confirm') {
|
743
|
+
if ('mcFooter' in options) {
|
744
|
+
console.warn(`The Confirm-Modal doesn't support "mcFooter", this property will be ignored.`);
|
745
|
+
}
|
746
|
+
// NOTE: only support function currently by calling confirm()
|
747
|
+
if (typeof options.mcOnOk !== 'function') {
|
748
|
+
// Leave a empty function to close this modal by default
|
749
|
+
// tslint:disable-next-line
|
750
|
+
options.mcOnOk = () => { };
|
751
|
+
}
|
752
|
+
options.mcModalType = 'confirm';
|
753
|
+
options.mcClassName = `mc-confirm mc-confirm-${confirmType} ${options.mcClassName || ''}`;
|
754
|
+
return this.create(options);
|
755
|
+
}
|
756
|
+
open(options = {}) {
|
757
|
+
options.mcModalType = 'custom';
|
758
|
+
return this.create(options);
|
759
|
+
}
|
760
|
+
success(options = {}) {
|
761
|
+
return this.simpleConfirm(options, 'success');
|
762
|
+
}
|
763
|
+
// tslint:disable-next-line: no-reserved-keywords
|
764
|
+
delete(options = {}) {
|
765
|
+
return this.simpleConfirm(options, 'warn');
|
766
|
+
}
|
767
|
+
simpleConfirm(options = {}, confirmType) {
|
768
|
+
return this.confirm(options, confirmType);
|
769
|
+
}
|
770
|
+
}
|
771
|
+
/** @nocollapse */ /** @nocollapse */ McModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalService, deps: [{ token: i1.Overlay }, { token: McModalControlService }], target: i0.ɵɵFactoryTarget.Injectable });
|
772
|
+
/** @nocollapse */ /** @nocollapse */ McModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalService });
|
773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalService, decorators: [{
|
774
|
+
type: Injectable
|
775
|
+
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: McModalControlService }]; } });
|
776
|
+
|
777
|
+
class McModalModule {
|
778
|
+
}
|
779
|
+
/** @nocollapse */ /** @nocollapse */ McModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
780
|
+
/** @nocollapse */ /** @nocollapse */ McModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalModule, declarations: [McModalComponent,
|
781
|
+
McModalTitle,
|
782
|
+
McModalBody,
|
783
|
+
McModalFooter,
|
784
|
+
CssUnitPipe,
|
785
|
+
McModalMainAction], imports: [CommonModule,
|
786
|
+
OverlayModule,
|
787
|
+
A11yModule,
|
788
|
+
McButtonModule,
|
789
|
+
McIconModule], exports: [McModalComponent,
|
790
|
+
McModalTitle,
|
791
|
+
McModalBody,
|
792
|
+
McModalFooter,
|
793
|
+
McModalMainAction] });
|
794
|
+
/** @nocollapse */ /** @nocollapse */ McModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalModule, providers: [
|
795
|
+
McModalControlService,
|
796
|
+
McModalService
|
797
|
+
], imports: [[
|
798
|
+
CommonModule,
|
799
|
+
OverlayModule,
|
800
|
+
A11yModule,
|
801
|
+
McButtonModule,
|
802
|
+
McIconModule
|
803
|
+
]] });
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McModalModule, decorators: [{
|
805
|
+
type: NgModule,
|
806
|
+
args: [{
|
807
|
+
imports: [
|
808
|
+
CommonModule,
|
809
|
+
OverlayModule,
|
810
|
+
A11yModule,
|
811
|
+
McButtonModule,
|
812
|
+
McIconModule
|
813
|
+
],
|
814
|
+
exports: [
|
815
|
+
McModalComponent,
|
816
|
+
McModalTitle,
|
817
|
+
McModalBody,
|
818
|
+
McModalFooter,
|
819
|
+
McModalMainAction
|
820
|
+
],
|
821
|
+
declarations: [
|
822
|
+
McModalComponent,
|
823
|
+
McModalTitle,
|
824
|
+
McModalBody,
|
825
|
+
McModalFooter,
|
826
|
+
CssUnitPipe,
|
827
|
+
McModalMainAction
|
828
|
+
],
|
829
|
+
providers: [
|
830
|
+
McModalControlService,
|
831
|
+
McModalService
|
832
|
+
],
|
833
|
+
entryComponents: [McModalComponent]
|
834
|
+
}]
|
835
|
+
}] });
|
836
|
+
|
837
|
+
/**
|
838
|
+
* Generated bundle index. Do not edit.
|
839
|
+
*/
|
840
|
+
|
841
|
+
export { McModalBody, McModalComponent, McModalFooter, McModalMainAction, McModalModule, McModalRef, McModalService, McModalTitle, ModalSize };
|
842
|
+
//# sourceMappingURL=ptsecurity-mosaic-modal.mjs.map
|