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