@koobiq/components 17.0.0-rc.8 → 17.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/README.md +1 -2
- package/alert/_alert-theme.scss +0 -1
- package/alert/alert.component.d.ts +3 -1
- package/alert/alert.component.scss +14 -14
- package/alert/public-api.d.ts +1 -1
- package/autocomplete/_autocomplete-theme.scss +0 -1
- package/autocomplete/autocomplete.scss +3 -6
- package/autocomplete/public-api.d.ts +2 -2
- package/badge/_badge-theme.scss +1 -2
- package/badge/badge.component.scss +0 -1
- package/badge/public-api.d.ts +1 -1
- package/button/_button-base.scss +0 -1
- package/button/_button-theme.scss +5 -3
- package/button/button.component.d.ts +2 -2
- package/button/button.scss +0 -1
- package/button/public-api.d.ts +1 -1
- package/button-toggle/_button-toggle-theme.scss +2 -3
- package/button-toggle/button-toggle.scss +2 -9
- package/button-toggle/public-api.d.ts +1 -1
- package/card/_card-theme.scss +0 -1
- package/card/card.component.d.ts +1 -1
- package/card/card.component.scss +1 -2
- package/card/public-api.d.ts +1 -1
- package/checkbox/_checkbox-theme.scss +10 -11
- package/checkbox/checkbox.scss +13 -19
- package/code-block/README.md +17 -14
- package/code-block/_code-block-theme.scss +23 -16
- package/code-block/actionbar.component.scss +4 -7
- package/code-block/code-block.component.d.ts +2 -2
- package/code-block/code-block.scss +8 -14
- package/code-block/public-api.d.ts +1 -1
- package/core/animation/index.d.ts +1 -1
- package/core/common-behaviors/index.d.ts +3 -3
- package/core/datetime/index.d.ts +1 -1
- package/core/formatters/index.d.ts +1 -1
- package/core/forms/_forms-theme.scss +0 -1
- package/core/forms/_forms.scss +0 -1
- package/core/forms/index.d.ts +1 -1
- package/core/locales/index.d.ts +1 -1
- package/core/option/_optgroup-theme.scss +0 -1
- package/core/option/_option-action-theme.scss +0 -1
- package/core/option/_option-theme.scss +0 -1
- package/core/option/action.scss +4 -2
- package/core/option/index.d.ts +2 -2
- package/core/option/optgroup.scss +2 -3
- package/core/option/option.scss +0 -1
- package/core/pop-up/_pop-up.scss +0 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -3
- package/core/public-api.d.ts +3 -3
- package/core/select/constants.d.ts +1 -1
- package/core/select/index.d.ts +3 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +1 -2
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +0 -1
- package/core/services/theme.service.d.ts +3 -2
- package/core/styles/_core.scss +0 -1
- package/core/styles/_koobiq-theme.scss +5 -3
- package/core/styles/common/_animation.scss +11 -10
- package/core/styles/common/_button.scss +0 -2
- package/core/styles/common/_clearfix.scss +1 -1
- package/core/styles/common/_groups.scss +0 -4
- package/core/styles/common/_list.scss +23 -61
- package/core/styles/common/_overlay.scss +4 -3
- package/core/styles/common/_popup.scss +0 -1
- package/core/styles/common/_rtl.scss +4 -4
- package/core/styles/common/_select.scss +37 -26
- package/core/styles/common/_tokens.scss +0 -2
- package/core/styles/functions/_number.scss +14 -19
- package/core/styles/functions/_string.scss +18 -19
- package/core/styles/functions/_timing.scss +24 -24
- package/core/styles/theming/_components-theming.scss +1120 -1208
- package/core/styles/theming/_scrollbar-theme.scss +8 -5
- package/core/styles/theming/_theming.scss +22 -20
- package/core/styles/typography/_typography-utils.scss +9 -3
- package/core/styles/typography/_typography.scss +114 -94
- package/core/styles/visual/_body.scss +0 -2
- package/core/styles/visual/_layout.scss +30 -22
- package/core/utils/data-size/index.d.ts +1 -1
- package/core/utils/public-api.d.ts +1 -1
- package/datepicker/_datepicker-theme.scss +21 -8
- package/datepicker/calendar-body.scss +0 -3
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/calendar.scss +1 -2
- package/datepicker/datepicker-content.scss +1 -3
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/datepicker/datepicker-input.scss +0 -1
- package/datepicker/datepicker-toggle.scss +0 -1
- package/datepicker/datepicker.component.d.ts +2 -2
- package/datepicker/public-api.d.ts +4 -4
- package/divider/_divider-theme.scss +0 -1
- package/divider/divider.scss +0 -1
- package/dl/_dl-theme.scss +0 -2
- package/dl/dl.scss +0 -1
- package/dl/public-api.d.ts +1 -1
- package/dropdown/_dropdown-theme.scss +4 -2
- package/dropdown/dropdown-content.directive.d.ts +1 -1
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +9 -7
- package/dropdown/dropdown.component.d.ts +1 -1
- package/dropdown/dropdown.scss +0 -1
- package/dropdown/public-api.d.ts +5 -5
- package/ellipsis-center/ellipsis-center.directive.d.ts +1 -1
- package/empty-state/README.md +0 -0
- package/empty-state/_empty-state-theme.scss +56 -0
- package/empty-state/empty-state.component.d.ts +31 -0
- package/empty-state/empty-state.module.d.ts +10 -0
- package/empty-state/empty-state.scss +81 -0
- package/empty-state/index.d.ts +1 -0
- package/empty-state/public-api.d.ts +2 -0
- package/esm2022/alert/alert.component.mjs +7 -3
- package/esm2022/alert/alert.module.mjs +1 -1
- package/esm2022/alert/public-api.mjs +2 -2
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +1 -1
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +25 -42
- package/esm2022/autocomplete/autocomplete.component.mjs +14 -9
- package/esm2022/autocomplete/autocomplete.module.mjs +3 -3
- package/esm2022/autocomplete/public-api.mjs +3 -3
- package/esm2022/badge/badge.component.mjs +8 -6
- package/esm2022/badge/badge.module.mjs +1 -1
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/button/button.component.mjs +12 -9
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button-toggle/button-toggle.component.mjs +26 -20
- package/esm2022/button-toggle/button-toggle.module.mjs +1 -1
- package/esm2022/button-toggle/public-api.mjs +2 -2
- package/esm2022/card/card.component.mjs +4 -5
- package/esm2022/card/card.module.mjs +1 -1
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/checkbox/checkbox-module.mjs +1 -1
- package/esm2022/checkbox/checkbox-required-validator.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +6 -8
- package/esm2022/checkbox/public-api.mjs +1 -1
- package/esm2022/code-block/actionbar.component.mjs +4 -6
- package/esm2022/code-block/code-block.component.mjs +17 -19
- package/esm2022/code-block/code-block.module.mjs +9 -5
- package/esm2022/code-block/public-api.mjs +2 -2
- package/esm2022/core/animation/fade-animations.mjs +1 -1
- package/esm2022/core/animation/index.mjs +2 -2
- package/esm2022/core/animation/select-animations.mjs +2 -2
- package/esm2022/core/common-behaviors/color.mjs +4 -2
- package/esm2022/core/common-behaviors/common-module.mjs +2 -5
- package/esm2022/core/common-behaviors/constructor.mjs +1 -1
- package/esm2022/core/common-behaviors/disabled.mjs +2 -2
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/common-behaviors/index.mjs +4 -4
- package/esm2022/core/common-behaviors/tabindex.mjs +1 -1
- package/esm2022/core/datetime/date-adapter.mjs +1 -2
- package/esm2022/core/datetime/date-formats.mjs +1 -1
- package/esm2022/core/datetime/index.mjs +2 -2
- package/esm2022/core/error/error-options.mjs +1 -1
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.pipe.mjs +1 -1
- package/esm2022/core/formatters/index.mjs +2 -2
- package/esm2022/core/formatters/number/formatter.mjs +19 -24
- package/esm2022/core/forms/forms-module.mjs +1 -1
- package/esm2022/core/forms/forms.directive.mjs +1 -1
- package/esm2022/core/forms/index.mjs +2 -2
- package/esm2022/core/highlight/highlight.pipe.mjs +1 -1
- package/esm2022/core/highlight/index.mjs +1 -1
- package/esm2022/core/label/label-options.mjs +1 -1
- package/esm2022/core/line/line.mjs +2 -2
- package/esm2022/core/locales/en-US.mjs +1 -1
- package/esm2022/core/locales/es-LA.mjs +1 -1
- package/esm2022/core/locales/fa-IR.mjs +1 -1
- package/esm2022/core/locales/formatters.mjs +1 -3
- package/esm2022/core/locales/index.mjs +2 -2
- package/esm2022/core/locales/locale-service.mjs +8 -5
- package/esm2022/core/locales/locale-service.module.mjs +1 -1
- package/esm2022/core/locales/pt-BR.mjs +1 -1
- package/esm2022/core/locales/ru-RU.mjs +3 -3
- package/esm2022/core/locales/zh-CN.mjs +1 -1
- package/esm2022/core/option/action.mjs +22 -14
- package/esm2022/core/option/index.mjs +3 -3
- package/esm2022/core/option/optgroup.mjs +4 -5
- package/esm2022/core/option/option-module.mjs +1 -1
- package/esm2022/core/option/option.mjs +13 -10
- package/esm2022/core/overlay/overlay-position-map.mjs +1 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +14 -24
- package/esm2022/core/pop-up/pop-up.mjs +1 -2
- package/esm2022/core/public-api.mjs +4 -4
- package/esm2022/core/select/common.mjs +2 -5
- package/esm2022/core/select/constants.mjs +1 -2
- package/esm2022/core/select/index.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +1 -1
- package/esm2022/core/services/measure-scrollbar.service.mjs +1 -2
- package/esm2022/core/services/theme.service.mjs +5 -4
- package/esm2022/core/title/title-text-ref.mjs +1 -1
- package/esm2022/core/utils/data-size/config.mjs +1 -1
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +2 -3
- package/esm2022/core/utils/data-size/index.mjs +2 -2
- package/esm2022/core/utils/data-size/size.mjs +3 -6
- package/esm2022/core/utils/public-api.mjs +2 -2
- package/esm2022/core/utils/utils.mjs +4 -2
- package/esm2022/core/validation/validation.mjs +4 -2
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -5
- package/esm2022/datepicker/calendar-header.component.mjs +8 -8
- package/esm2022/datepicker/calendar.component.mjs +6 -6
- package/esm2022/datepicker/datepicker-animations.mjs +1 -1
- package/esm2022/datepicker/datepicker-errors.mjs +1 -1
- package/esm2022/datepicker/datepicker-input.directive.mjs +47 -49
- package/esm2022/datepicker/datepicker-intl.mjs +1 -1
- package/esm2022/datepicker/datepicker-module.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.component.mjs +11 -10
- package/esm2022/datepicker/datepicker.component.mjs +15 -18
- package/esm2022/datepicker/month-view.component.mjs +14 -14
- package/esm2022/datepicker/public-api.mjs +5 -5
- package/esm2022/divider/divider.component.mjs +1 -1
- package/esm2022/divider/divider.module.mjs +1 -1
- package/esm2022/dl/dl.component.mjs +7 -7
- package/esm2022/dl/dl.module.mjs +2 -2
- package/esm2022/dl/public-api.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +2 -2
- package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2022/dropdown/dropdown-item.component.mjs +5 -8
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +24 -33
- package/esm2022/dropdown/dropdown.component.mjs +10 -19
- package/esm2022/dropdown/dropdown.module.mjs +1 -1
- package/esm2022/dropdown/dropdown.types.mjs +1 -2
- package/esm2022/dropdown/public-api.mjs +6 -6
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +6 -5
- package/esm2022/empty-state/empty-state.component.mjs +104 -0
- package/esm2022/empty-state/empty-state.module.mjs +50 -0
- package/esm2022/empty-state/index.mjs +2 -0
- package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
- package/esm2022/empty-state/public-api.mjs +3 -0
- package/esm2022/file-upload/file-drop.mjs +3 -2
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/file-upload.module.mjs +2 -2
- package/esm2022/file-upload/index.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +16 -14
- package/esm2022/file-upload/public-api.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +14 -12
- package/esm2022/form-field/cleaner.mjs +13 -3
- package/esm2022/form-field/form-field-control.mjs +1 -2
- package/esm2022/form-field/form-field-errors.mjs +1 -1
- package/esm2022/form-field/form-field.mjs +8 -15
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/hint.mjs +6 -6
- package/esm2022/form-field/password-hint.mjs +15 -15
- package/esm2022/form-field/password-toggle.mjs +4 -7
- package/esm2022/form-field/prefix.mjs +1 -1
- package/esm2022/form-field/public-api.mjs +4 -4
- package/esm2022/form-field/stepper.mjs +33 -29
- package/esm2022/form-field/suffix.mjs +1 -1
- package/esm2022/form-field/validate.directive.mjs +6 -7
- package/esm2022/icon/icon-button.component.mjs +4 -4
- package/esm2022/icon/icon-item.component.mjs +3 -3
- package/esm2022/icon/icon.component.mjs +5 -6
- package/esm2022/icon/icon.module.mjs +1 -1
- package/esm2022/icon/public-api.mjs +3 -3
- package/esm2022/input/input-number-validators.mjs +1 -1
- package/esm2022/input/input-number.mjs +29 -41
- package/esm2022/input/input-password.mjs +13 -8
- package/esm2022/input/input-value-accessor.mjs +1 -1
- package/esm2022/input/input.mjs +13 -10
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/public-api.mjs +3 -3
- package/esm2022/link/link.component.mjs +2 -2
- package/esm2022/link/link.module.mjs +1 -1
- package/esm2022/link/public-api.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +36 -41
- package/esm2022/list/list.component.mjs +5 -6
- package/esm2022/list/list.module.mjs +2 -2
- package/esm2022/list/public-api.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.module.mjs +1 -1
- package/esm2022/loader-overlay/public-api.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +20 -6
- package/esm2022/markdown/markdown.module.mjs +1 -1
- package/esm2022/markdown/markdown.service.mjs +1 -1
- package/esm2022/modal/css-unit.pipe.mjs +1 -1
- package/esm2022/modal/modal-control.service.mjs +6 -2
- package/esm2022/modal/modal-ref.class.mjs +1 -2
- package/esm2022/modal/modal-util.mjs +1 -1
- package/esm2022/modal/modal.component.mjs +60 -33
- package/esm2022/modal/modal.directive.mjs +27 -11
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +3 -6
- package/esm2022/modal/modal.type.mjs +1 -1
- package/esm2022/modal/public-api.mjs +3 -3
- package/esm2022/navbar/index.mjs +1 -1
- package/esm2022/navbar/navbar-item.component.mjs +41 -33
- package/esm2022/navbar/navbar.component.mjs +19 -29
- package/esm2022/navbar/navbar.module.mjs +2 -2
- package/esm2022/navbar/public-api.mjs +3 -3
- package/esm2022/navbar/vertical-navbar.component.mjs +21 -23
- package/esm2022/popover/popover-animations.mjs +1 -1
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +5 -5
- package/esm2022/popover/popover.module.mjs +1 -1
- package/esm2022/popover/public-api.mjs +3 -3
- package/esm2022/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.module.mjs +2 -2
- package/esm2022/progress-bar/public-api.mjs +2 -2
- package/esm2022/progress-spinner/progress-spinner.component.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.module.mjs +1 -1
- package/esm2022/progress-spinner/public-api.mjs +2 -2
- package/esm2022/radio/public-api.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +9 -14
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/risk-level/public-api.mjs +2 -2
- package/esm2022/risk-level/risk-level.component.mjs +3 -3
- package/esm2022/risk-level/risk-level.module.mjs +1 -1
- package/esm2022/scrollbar/public-api.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +19 -21
- package/esm2022/scrollbar/scrollbar.directive.mjs +4 -5
- package/esm2022/scrollbar/scrollbar.module.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.types.mjs +3 -2
- package/esm2022/select/public-api.mjs +3 -3
- package/esm2022/select/select-option.directive.mjs +8 -5
- package/esm2022/select/select.component.mjs +45 -71
- package/esm2022/select/select.module.mjs +1 -1
- package/esm2022/sidebar/public-api.mjs +2 -2
- package/esm2022/sidebar/sidebar-animations.mjs +1 -1
- package/esm2022/sidebar/sidebar.component.mjs +5 -7
- package/esm2022/sidebar/sidebar.module.mjs +1 -1
- package/esm2022/sidepanel/public-api.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-animations.mjs +7 -4
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-directives.mjs +33 -20
- package/esm2022/sidepanel/sidepanel-ref.mjs +10 -5
- package/esm2022/sidepanel/sidepanel.module.mjs +1 -1
- package/esm2022/sidepanel/sidepanel.service.mjs +11 -15
- package/esm2022/splitter/public-api.mjs +2 -2
- package/esm2022/splitter/splitter.component.mjs +13 -24
- package/esm2022/splitter/splitter.module.mjs +1 -1
- package/esm2022/table/public-api.mjs +2 -2
- package/esm2022/table/table.component.mjs +3 -3
- package/esm2022/table/table.module.mjs +1 -1
- package/esm2022/tabs/paginated-tab-header.mjs +9 -14
- package/esm2022/tabs/public-api.mjs +6 -6
- package/esm2022/tabs/tab-body.component.mjs +10 -11
- package/esm2022/tabs/tab-content.directive.mjs +1 -1
- package/esm2022/tabs/tab-group.component.mjs +11 -13
- package/esm2022/tabs/tab-header.component.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +1 -1
- package/esm2022/tabs/tab-label.directive.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/index.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +46 -49
- package/esm2022/tabs/tab.component.mjs +7 -10
- package/esm2022/tabs/tabs-animations.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +2 -2
- package/esm2022/tags/public-api.mjs +5 -5
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +12 -16
- package/esm2022/tags/tag-list.component.mjs +15 -27
- package/esm2022/tags/tag-text-control.mjs +1 -1
- package/esm2022/tags/tag.component.mjs +5 -8
- package/esm2022/tags/tag.module.mjs +9 -7
- package/esm2022/textarea/index.mjs +1 -1
- package/esm2022/textarea/textarea.component.mjs +4 -7
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/timepicker/public-api.mjs +2 -2
- package/esm2022/timepicker/timepicker.constants.mjs +6 -2
- package/esm2022/timepicker/timepicker.directive.mjs +62 -31
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timezone/cities-by-filter.pipe.mjs +1 -1
- package/esm2022/timezone/timezone-option.component.mjs +12 -11
- package/esm2022/timezone/timezone-option.directive.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/timezone/timezone.models.mjs +1 -2
- package/esm2022/timezone/timezone.module.mjs +1 -1
- package/esm2022/timezone/timezone.utils.mjs +5 -9
- package/esm2022/timezone/utc-offset.pipe.mjs +1 -1
- package/esm2022/title/public-api.mjs +2 -2
- package/esm2022/title/title.directive.mjs +9 -5
- package/esm2022/title/title.module.mjs +1 -1
- package/esm2022/toast/public-api.mjs +4 -4
- package/esm2022/toast/toast-animations.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +5 -6
- package/esm2022/toast/toast.component.mjs +6 -6
- package/esm2022/toast/toast.module.mjs +1 -1
- package/esm2022/toast/toast.service.mjs +18 -30
- package/esm2022/toast/toast.type.mjs +1 -1
- package/esm2022/toggle/public-api.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +17 -11
- package/esm2022/toggle/toggle.module.mjs +1 -1
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/tooltip.animations.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +7 -7
- package/esm2022/tooltip/tooltip.module.mjs +2 -2
- package/esm2022/tree/control/base-tree-control.mjs +1 -2
- package/esm2022/tree/control/flat-tree-control.filters.mjs +4 -7
- package/esm2022/tree/control/flat-tree-control.mjs +4 -7
- package/esm2022/tree/control/nested-tree-control.mjs +1 -2
- package/esm2022/tree/control/tree-control.mjs +1 -1
- package/esm2022/tree/data-source/flat-data-source.mjs +3 -8
- package/esm2022/tree/data-source/nested-data-source.mjs +2 -4
- package/esm2022/tree/node.mjs +1 -1
- package/esm2022/tree/outlet.mjs +1 -1
- package/esm2022/tree/padding.directive.mjs +4 -5
- package/esm2022/tree/public-api.mjs +11 -11
- package/esm2022/tree/toggle.mjs +8 -5
- package/esm2022/tree/tree-base.mjs +3 -7
- package/esm2022/tree/tree-errors.mjs +1 -1
- package/esm2022/tree/tree-option.component.mjs +9 -13
- package/esm2022/tree/tree-selection.component.mjs +20 -36
- package/esm2022/tree/tree.mjs +7 -3
- package/esm2022/tree/tree.module.mjs +2 -3
- package/esm2022/tree-select/public-api.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +59 -72
- package/esm2022/tree-select/tree-select.module.mjs +1 -1
- package/fesm2022/koobiq-components-alert.mjs +10 -6
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +60 -72
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +10 -8
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +30 -24
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +14 -11
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-card.mjs +4 -5
- package/fesm2022/koobiq-components-card.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +3 -5
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +34 -34
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +325 -336
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +105 -111
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +9 -9
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +125 -147
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +3 -2
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +157 -0
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +46 -41
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +75 -73
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +9 -10
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +56 -60
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +1 -1
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +43 -49
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +6 -6
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +18 -4
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +96 -54
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +82 -86
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +12 -12
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +5 -5
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +5 -5
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +11 -16
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +4 -4
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +22 -24
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +55 -78
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +5 -7
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +110 -93
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +15 -26
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +5 -5
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +85 -98
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +39 -56
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +2 -5
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +69 -34
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +16 -21
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +11 -7
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +74 -87
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +17 -11
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +10 -10
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +67 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +509 -541
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +28 -18
- package/file-upload/file-upload.scss +0 -1
- package/file-upload/multiple-file-upload.component.d.ts +2 -2
- package/file-upload/multiple-file-upload.component.scss +17 -27
- package/file-upload/public-api.d.ts +1 -1
- package/file-upload/single-file-upload.component.d.ts +2 -2
- package/file-upload/single-file-upload.component.scss +1 -7
- package/form-field/_form-field-theme.scss +24 -12
- package/form-field/_hint-theme.scss +0 -2
- package/form-field/cleaner.scss +0 -1
- package/form-field/form-field.scss +12 -14
- package/form-field/hint.scss +0 -1
- package/form-field/password-toggle.scss +0 -1
- package/form-field/public-api.d.ts +3 -3
- package/form-field/stepper.scss +0 -1
- package/icon/_icon-button-theme.scss +18 -7
- package/icon/_icon-theme.scss +0 -1
- package/icon/icon-button.scss +2 -5
- package/icon/icon-item.scss +2 -5
- package/icon/icon.scss +0 -1
- package/icon/public-api.d.ts +2 -2
- package/input/_input-theme.scss +0 -1
- package/input/input.scss +9 -9
- package/input/public-api.d.ts +2 -2
- package/link/_link-theme.scss +12 -18
- package/link/link.component.d.ts +1 -1
- package/link/public-api.d.ts +1 -1
- package/list/_list-theme.scss +0 -1
- package/list/list-selection.component.d.ts +3 -3
- package/list/list.scss +1 -3
- package/list/public-api.d.ts +2 -2
- package/loader-overlay/_loader-overlay-theme.scss +6 -4
- package/loader-overlay/loader-overlay.scss +0 -1
- package/loader-overlay/public-api.d.ts +1 -1
- package/markdown/_markdown-theme.scss +11 -8
- package/markdown/markdown.scss +3 -3
- package/modal/README.md +4 -3
- package/modal/_modal-animation.scss +0 -1
- package/modal/_modal-confirm.scss +0 -1
- package/modal/_modal-theme.scss +8 -9
- package/modal/modal.directive.d.ts +3 -3
- package/modal/modal.scss +9 -15
- package/modal/modal.type.d.ts +2 -2
- package/modal/public-api.d.ts +2 -2
- package/navbar/README.md +21 -20
- package/navbar/_navbar-item_horizontal.scss +31 -24
- package/navbar/_navbar-item_vertical.scss +0 -3
- package/navbar/_navbar-theme.scss +3 -6
- package/navbar/navbar-brand.scss +0 -1
- package/navbar/navbar-divider.scss +0 -1
- package/navbar/navbar-item.component.d.ts +1 -1
- package/navbar/navbar-item.scss +9 -2
- package/navbar/navbar.scss +0 -1
- package/navbar/public-api.d.ts +2 -2
- package/navbar/vertical-navbar.scss +0 -1
- package/package.json +12 -6
- package/popover/README.md +17 -14
- package/popover/_popover-theme.scss +0 -1
- package/popover/popover.component.d.ts +1 -1
- package/popover/popover.scss +5 -13
- package/popover/public-api.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +0 -1
- package/progress-bar/progress-bar.scss +0 -1
- package/progress-bar/public-api.d.ts +1 -1
- package/progress-spinner/_progress-spinner-theme.scss +0 -1
- package/progress-spinner/progress-spinner.scss +0 -1
- package/progress-spinner/public-api.d.ts +1 -1
- package/radio/_radio-theme.scss +13 -5
- package/radio/public-api.d.ts +1 -1
- package/radio/radio.scss +20 -6
- package/risk-level/_risk-level-theme.scss +0 -1
- package/risk-level/public-api.d.ts +1 -1
- package/risk-level/risk-level.component.scss +1 -4
- package/schematics/ng-add/index.js +4 -4
- package/scrollbar/_scrollbar-component-theme.scss +2 -3
- package/scrollbar/public-api.d.ts +1 -1
- package/scrollbar/scrollbar.component.scss +56 -44
- package/scrollbar/scrollbar.directive.d.ts +1 -1
- package/scrollbar/scrollbar.types.d.ts +1 -1
- package/select/_select-theme.scss +0 -1
- package/select/public-api.d.ts +2 -2
- package/select/select.component.d.ts +4 -1
- package/select/select.scss +0 -1
- package/sidebar/public-api.d.ts +1 -1
- package/sidepanel/_sidepanel-theme.scss +0 -1
- package/sidepanel/public-api.d.ts +3 -3
- package/sidepanel/sidepanel.scss +6 -12
- package/splitter/_splitter-theme.scss +0 -1
- package/splitter/public-api.d.ts +1 -1
- package/splitter/splitter.component.d.ts +2 -2
- package/splitter/splitter.scss +0 -1
- package/table/_table-theme.scss +7 -7
- package/table/public-api.d.ts +1 -1
- package/table/table.scss +2 -2
- package/tabs/_tabs-common.scss +10 -8
- package/tabs/_tabs-theme.scss +0 -1
- package/tabs/paginated-tab-header.d.ts +1 -1
- package/tabs/public-api.d.ts +5 -5
- package/tabs/tab-body.component.d.ts +3 -3
- package/tabs/tab-group.component.d.ts +1 -1
- package/tabs/tab-group.scss +0 -1
- package/tabs/tab-header.scss +0 -6
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +17 -17
- package/tabs/tab-nav-bar/tab-nav-bar.scss +0 -1
- package/tags/_tag-theme.scss +0 -2
- package/tags/public-api.d.ts +4 -4
- package/tags/tag-input.d.ts +1 -1
- package/tags/tag-list.scss +9 -7
- package/tags/tag.component.d.ts +2 -2
- package/tags/tag.scss +1 -4
- package/textarea/_textarea-theme.scss +0 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea/textarea.scss +1 -4
- package/timepicker/public-api.d.ts +1 -1
- package/timepicker/timepicker.constants.d.ts +2 -0
- package/timepicker/timepicker.directive.d.ts +10 -3
- package/timepicker/timepicker.scss +0 -1
- package/timezone/_timezone-option-theme.scss +0 -1
- package/timezone/timezone-option.component.scss +0 -1
- package/timezone/timezone-option.directive.d.ts +1 -1
- package/timezone/timezone-select.component.scss +0 -1
- package/timezone/timezone.utils.d.ts +1 -1
- package/title/public-api.d.ts +1 -1
- package/title/title.directive.d.ts +2 -2
- package/toast/_toast-theme.scss +0 -2
- package/toast/public-api.d.ts +3 -3
- package/toast/toast-container.component.scss +0 -1
- package/toast/toast.component.scss +4 -2
- package/toast/toast.service.d.ts +2 -2
- package/toast/toast.type.d.ts +1 -1
- package/toggle/_toggle-theme.scss +10 -9
- package/toggle/public-api.d.ts +1 -1
- package/toggle/toggle.component.d.ts +2 -2
- package/toggle/toggle.scss +0 -1
- package/tooltip/_tooltip-theme.scss +0 -1
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -2
- package/tooltip/tooltip.scss +1 -5
- package/tree/_tree-theme.scss +2 -3
- package/tree/public-api.d.ts +10 -10
- package/tree/toggle.scss +0 -1
- package/tree/tree-base.d.ts +1 -1
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-option.scss +12 -8
- package/tree/tree-selection.component.d.ts +3 -2
- package/tree-select/_tree-select-theme.scss +0 -1
- package/tree-select/public-api.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +9 -4
- package/tree-select/tree-select.scss +0 -1
|
@@ -18,6 +18,13 @@ import * as i7 from '@koobiq/components/title';
|
|
|
18
18
|
import { KbqTitleModule } from '@koobiq/components/title';
|
|
19
19
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* API class that public to users to handle the modal instance.
|
|
23
|
+
* KbqModalRef is aim to avoid accessing to the modal instance directly by users.
|
|
24
|
+
*/
|
|
25
|
+
class KbqModalRef {
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
class KbqModalControlService {
|
|
22
29
|
// Track singleton afterAllClose through over the injection tree
|
|
23
30
|
get afterAllClose() {
|
|
@@ -33,10 +40,13 @@ class KbqModalControlService {
|
|
|
33
40
|
}
|
|
34
41
|
constructor(parentService) {
|
|
35
42
|
this.parentService = parentService;
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
44
|
// @ts-ignore
|
|
37
45
|
this.rootOpenModals = this.parentService ? null : [];
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
38
47
|
// @ts-ignore
|
|
39
48
|
this.rootAfterAllClose = this.parentService ? null : new Subject();
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
50
|
// @ts-ignore
|
|
41
51
|
this.rootRegisteredMetaMap = this.parentService ? null : new Map();
|
|
42
52
|
}
|
|
@@ -71,7 +81,8 @@ class KbqModalControlService {
|
|
|
71
81
|
handleMultipleMasks(modalRef) {
|
|
72
82
|
const modals = Array.from(this.registeredMetaMap.values()).map((v) => v.modalRef);
|
|
73
83
|
if (modals.filter((modal) => modal.kbqVisible).length > 1) {
|
|
74
|
-
const otherModals = modals
|
|
84
|
+
const otherModals = modals
|
|
85
|
+
.splice(0, modals.length - 1)
|
|
75
86
|
.filter((modal) => modal.kbqVisible && modal.kbqMask);
|
|
76
87
|
// hide other masks
|
|
77
88
|
setTimeout(() => {
|
|
@@ -100,14 +111,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
100
111
|
type: SkipSelf
|
|
101
112
|
}] }] });
|
|
102
113
|
|
|
103
|
-
/**
|
|
104
|
-
* API class that public to users to handle the modal instance.
|
|
105
|
-
* KbqModalRef is aim to avoid accessing to the modal instance directly by users.
|
|
106
|
-
*/
|
|
107
|
-
// tslint:disable-next-line:naming-convention
|
|
108
|
-
class KbqModalRef {
|
|
109
|
-
}
|
|
110
|
-
|
|
111
114
|
class ModalUtil {
|
|
112
115
|
constructor(document) {
|
|
113
116
|
this.document = document;
|
|
@@ -150,18 +153,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
150
153
|
// Duration when perform animations (ms)
|
|
151
154
|
const MODAL_ANIMATE_DURATION = 200;
|
|
152
155
|
class KbqModalComponent extends KbqModalRef {
|
|
153
|
-
get kbqVisible() {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
set
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
get
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
set
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
get kbqVisible() {
|
|
157
|
+
return this._kbqVisible;
|
|
158
|
+
}
|
|
159
|
+
set kbqVisible(value) {
|
|
160
|
+
this._kbqVisible = value;
|
|
161
|
+
}
|
|
162
|
+
get kbqClosable() {
|
|
163
|
+
return this._kbqClosable;
|
|
164
|
+
}
|
|
165
|
+
set kbqClosable(value) {
|
|
166
|
+
this._kbqClosable = value;
|
|
167
|
+
}
|
|
168
|
+
get kbqMask() {
|
|
169
|
+
return this._kbqMask;
|
|
170
|
+
}
|
|
171
|
+
set kbqMask(value) {
|
|
172
|
+
this._kbqMask = value;
|
|
173
|
+
}
|
|
174
|
+
get kbqMaskClosable() {
|
|
175
|
+
return this._kbqMaskClosable;
|
|
176
|
+
}
|
|
177
|
+
set kbqMaskClosable(value) {
|
|
178
|
+
this._kbqMaskClosable = value;
|
|
179
|
+
}
|
|
180
|
+
get kbqOkLoading() {
|
|
181
|
+
return this._kbqOkLoading;
|
|
182
|
+
}
|
|
183
|
+
set kbqOkLoading(value) {
|
|
184
|
+
this._kbqOkLoading = value;
|
|
185
|
+
}
|
|
186
|
+
get kbqCancelLoading() {
|
|
187
|
+
return this._kbqCancelLoading;
|
|
188
|
+
}
|
|
189
|
+
set kbqCancelLoading(value) {
|
|
190
|
+
this._kbqCancelLoading = value;
|
|
191
|
+
}
|
|
165
192
|
// Observable alias for kbqAfterOpen
|
|
166
193
|
get afterOpen() {
|
|
167
194
|
return this.kbqAfterOpen.asObservable();
|
|
@@ -274,19 +301,19 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
274
301
|
const offsetHeight = nativeElement.offsetHeight;
|
|
275
302
|
const scrollHeight = nativeElement.scrollHeight;
|
|
276
303
|
this.isTopOverflow = scrollTop > 0;
|
|
277
|
-
this.isBottomOverflow = scrollTop + offsetHeight < scrollHeight;
|
|
304
|
+
this.isBottomOverflow = (scrollTop + offsetHeight) < scrollHeight;
|
|
278
305
|
}
|
|
279
306
|
open() {
|
|
280
307
|
this.focusedElementBeforeOpen = this.document.activeElement;
|
|
281
308
|
this.previouslyFocusedElementOrigin = this.focusMonitor['_lastFocusOrigin'];
|
|
282
|
-
this.focusMonitor
|
|
309
|
+
this.focusMonitor
|
|
310
|
+
.monitor(this.modalContainer, true)
|
|
283
311
|
.pipe(take(1))
|
|
284
312
|
.subscribe(() => this.focusMonitor.stopMonitoring(this.modalContainer));
|
|
285
313
|
this.changeVisibleFromInside(true);
|
|
286
314
|
}
|
|
287
315
|
close(result) {
|
|
288
|
-
this.changeVisibleFromInside(false, result)
|
|
289
|
-
.then(() => {
|
|
316
|
+
this.changeVisibleFromInside(false, result).then(() => {
|
|
290
317
|
if (this.kbqRestoreFocus && this.focusedElementBeforeOpen) {
|
|
291
318
|
this.focusMonitor.focusVia(this.focusedElementBeforeOpen, this.previouslyFocusedElementOrigin);
|
|
292
319
|
this.focusedElementBeforeOpen = null;
|
|
@@ -329,17 +356,14 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
329
356
|
this.onClickOkCancel('cancel');
|
|
330
357
|
}
|
|
331
358
|
}
|
|
332
|
-
// tslint:disable-next-line: no-reserved-keywords
|
|
333
359
|
isModalType(type) {
|
|
334
360
|
return this.kbqModalType === type;
|
|
335
361
|
}
|
|
336
362
|
onKeyDown(event) {
|
|
337
|
-
|
|
338
|
-
if (event.keyCode === ESCAPE && this.container && (this.container instanceof OverlayRef)) {
|
|
363
|
+
if (event.keyCode === ESCAPE && this.container && this.container instanceof OverlayRef) {
|
|
339
364
|
this.close();
|
|
340
365
|
event.preventDefault();
|
|
341
366
|
}
|
|
342
|
-
// tslint:disable-next-line:deprecation .key isn't supported in Edge
|
|
343
367
|
if (event.ctrlKey && event.keyCode === ENTER) {
|
|
344
368
|
if (this.kbqModalType === 'confirm') {
|
|
345
369
|
this.triggerOk();
|
|
@@ -355,10 +379,10 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
355
379
|
}
|
|
356
380
|
}
|
|
357
381
|
// AoT
|
|
358
|
-
// tslint:disable-next-line: no-reserved-keywords
|
|
359
382
|
onClickOkCancel(type) {
|
|
360
383
|
this.handleCloseResult(type, (doClose) => doClose !== false);
|
|
361
384
|
}
|
|
385
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
362
386
|
handleCloseResult(triggerType, canClose) {
|
|
363
387
|
const trigger = { ok: this.kbqOnOk, cancel: this.kbqOnCancel }[triggerType];
|
|
364
388
|
const loadingKey = { ok: 'kbqOkLoading', cancel: 'kbqCancelLoading' }[triggerType];
|
|
@@ -368,6 +392,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
368
392
|
else if (typeof trigger === 'function') {
|
|
369
393
|
const result = trigger(this.getContentComponent());
|
|
370
394
|
// Users can return "false" to prevent closing by default
|
|
395
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
371
396
|
const caseClose = (doClose) => canClose(doClose) && this.close(doClose);
|
|
372
397
|
if (isPromise(result)) {
|
|
373
398
|
this[loadingKey] = true;
|
|
@@ -383,23 +408,28 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
383
408
|
}
|
|
384
409
|
}
|
|
385
410
|
// AoT
|
|
411
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
386
412
|
isNonEmptyString(value) {
|
|
387
413
|
return typeof value === 'string' && value !== '';
|
|
388
414
|
}
|
|
389
415
|
// AoT
|
|
416
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
390
417
|
isTemplateRef(value) {
|
|
391
418
|
return value instanceof TemplateRef;
|
|
392
419
|
}
|
|
393
420
|
// AoT
|
|
421
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
394
422
|
isComponent(value) {
|
|
395
423
|
return value instanceof Type;
|
|
396
424
|
}
|
|
397
425
|
// AoT
|
|
426
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
398
427
|
isModalButtons(value) {
|
|
399
428
|
return Array.isArray(value) && value.length > 0;
|
|
400
429
|
}
|
|
401
430
|
// Lookup a button's property, if the prop is a function, call & then return the result, otherwise, return itself.
|
|
402
431
|
// AoT
|
|
432
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
403
433
|
getButtonCallableProp(options, prop) {
|
|
404
434
|
const value = options[prop];
|
|
405
435
|
const args = [];
|
|
@@ -412,11 +442,11 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
412
442
|
// AoT
|
|
413
443
|
onButtonClick(button) {
|
|
414
444
|
// Call onClick directly
|
|
415
|
-
// tslint:disable-next-line:no-inferred-empty-object-type rule seems to be broken
|
|
416
445
|
const result = this.getButtonCallableProp(button, 'onClick');
|
|
417
446
|
if (isPromise(result)) {
|
|
418
447
|
button.loading = true;
|
|
419
|
-
|
|
448
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
449
|
+
result.then(() => (button.loading = false)).catch(() => (button.loading = false));
|
|
420
450
|
}
|
|
421
451
|
}
|
|
422
452
|
// Do rest things when visible state changed
|
|
@@ -425,8 +455,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
425
455
|
if (visible) {
|
|
426
456
|
this.changeBodyOverflow(1);
|
|
427
457
|
}
|
|
428
|
-
return Promise
|
|
429
|
-
.resolve(animation && this.animateTo(visible))
|
|
458
|
+
return (Promise.resolve(animation && this.animateTo(visible))
|
|
430
459
|
// Emit open/close event after animations over
|
|
431
460
|
.then(() => {
|
|
432
461
|
if (visible) {
|
|
@@ -437,7 +466,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
437
466
|
// Show/hide scrollbar when animation is over
|
|
438
467
|
this.changeBodyOverflow();
|
|
439
468
|
}
|
|
440
|
-
});
|
|
469
|
+
}));
|
|
441
470
|
}
|
|
442
471
|
// Change kbqVisible from inside
|
|
443
472
|
changeVisibleFromInside(visible, closeResult) {
|
|
@@ -462,6 +491,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
462
491
|
};
|
|
463
492
|
}
|
|
464
493
|
else {
|
|
494
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
465
495
|
// @ts-ignore
|
|
466
496
|
this.maskAnimationClassMap = this.modalAnimationClassMap = null;
|
|
467
497
|
}
|
|
@@ -516,6 +546,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
516
546
|
});
|
|
517
547
|
this.contentComponentRef = factory.create(childInjector);
|
|
518
548
|
if (this.kbqComponentParams) {
|
|
549
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
519
550
|
// @ts-ignore
|
|
520
551
|
Object.assign(this.contentComponentRef.instance, this.kbqComponentParams);
|
|
521
552
|
}
|
|
@@ -545,13 +576,13 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
545
576
|
}
|
|
546
577
|
}
|
|
547
578
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
548
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalComponent, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, 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=\"kbqMask\"\n class=\"kbq-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"kbqMaskStyle\">\n </div>\n\n <div (mousedown)=\"onClickMask($event)\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\">\n\n <div #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngStyle]=\"kbqStyle\"\n [style.width]=\"kbqWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\">\n\n <div class=\"kbq-modal-content\" cdkTrapFocus>\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=\"kbqTitle\" class=\"kbq-modal-header\" kbq-title [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(kbqTitle)\" [ngTemplateOutlet]=\"$any(kbqTitle)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqTitle)\">\n <div [innerHTML]=\"kbqTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n\n <button *ngIf=\"kbqClosable\"\n kbq-button\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n class=\"kbq-modal-close kbq-button_transparent\">\n <i kbq-icon=\"mc-close-L_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n </div>\n <div class=\"kbq-modal-body kbq-scrollbar\" #modalBody [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(kbqContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(kbqContent)\" [ngTemplateOutlet]=\"$any(kbqContent)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"kbqFooter || kbqOkText || kbqCancelText\"\n class=\"kbq-modal-footer\"\n [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(kbqFooter)\" [ngTemplateOutlet]=\"$any(kbqFooter)\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqFooter)\">\n <div [innerHTML]=\"kbqFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(kbqFooter)\">\n <ng-container *ngFor=\"let button of $any(kbqFooter)\">\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [class.kbq-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 [attr.autofocus]=\"true\"\n *ngIf=\"kbqOkText\"\n kbq-button\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n <button *ngIf=\"kbqCancelText\" kbq-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=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(kbqContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(kbqContent)\"\n [ngTemplateOutlet]=\"$any(kbqContent)\">\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"kbq-confirm-footer\" *ngIf=\"kbqOkText || kbqCancelText\">\n <button\n kbq-button\n [color]=\"kbqOkType\"\n [attr.autofocus]=\"true\"\n *ngIf=\"kbqOkText\"\n (click)=\"onClickOkCancel('ok')\">\n\n {{ okText }}\n </button>\n\n <button kbq-button *ngIf=\"kbqCancelText\" (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius, 8px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width, 960px)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-right, 48px) var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-left, 24px)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top, 0)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header, 24px) var(--kbq-modal-size-content-padding-horizontal, 24px) var(--kbq-modal-size-content-padding-bottom, 8px) var(--kbq-modal-size-content-padding-horizontal, 24px);word-wrap:break-word}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical, 20px) var(--kbq-modal-size-footer-padding-horizontal, 24px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i5.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i5.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i7.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
579
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalComponent, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, 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 />\n</ng-template>\n\n<div>\n <div\n *ngIf=\"kbqMask\"\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div\n cdkTrapFocus\n class=\"kbq-modal-content\"\n >\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"\n />\n <ng-container\n *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"\n />\n <ng-container\n *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"\n />\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div\n *ngIf=\"kbqTitle\"\n kbq-title\n class=\"kbq-modal-header\"\n [class.kbq-modal-body_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqTitle)\"\n [ngTemplateOutlet]=\"$any(kbqTitle)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqTitle)\">\n <div [innerHTML]=\"kbqTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n\n <button\n *ngIf=\"kbqClosable\"\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i\n kbq-icon=\"mc-close-L_16\"\n [color]=\"componentColors.Contrast\"\n ></i>\n </button>\n </div>\n <div\n #modalBody\n class=\"kbq-modal-body kbq-scrollbar\"\n [ngStyle]=\"kbqBodyStyle\"\n (scroll)=\"checkOverflow()\"\n >\n <ng-container #bodyContainer>\n <ng-container\n *ngIf=\"!isComponent(kbqContent)\"\n [ngSwitch]=\"true\"\n >\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqContent)\"\n [ngTemplateOutlet]=\"$any(kbqContent)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container\n *ngSwitchDefault\n [ngTemplateOutlet]=\"tplOriginContent\"\n />\n </ng-container>\n </ng-container>\n </div>\n <div\n *ngIf=\"kbqFooter || kbqOkText || kbqCancelText\"\n class=\"kbq-modal-footer\"\n [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\"\n >\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqFooter)\"\n [ngTemplateOutlet]=\"$any(kbqFooter)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqFooter)\">\n <div [innerHTML]=\"kbqFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(kbqFooter)\">\n <ng-container *ngFor=\"let button of $any(kbqFooter)\">\n <button\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n *ngIf=\"kbqOkText\"\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n <button\n *ngIf=\"kbqCancelText\"\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\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\n class=\"kbq-modal-body\"\n [ngStyle]=\"kbqBodyStyle\"\n >\n <ng-container #bodyContainer>\n <ng-container\n *ngIf=\"!isComponent(kbqContent)\"\n [ngSwitch]=\"true\"\n >\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqContent)\"\n [ngTemplateOutlet]=\"$any(kbqContent)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container\n *ngSwitchDefault\n [ngTemplateOutlet]=\"tplOriginContent\"\n />\n </ng-container>\n </ng-container>\n </div>\n <div\n *ngIf=\"kbqOkText || kbqCancelText\"\n class=\"kbq-confirm-footer\"\n >\n <button\n *ngIf=\"kbqOkText\"\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"kbqOkType\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n\n <button\n *ngIf=\"kbqCancelText\"\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius, 8px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width, 960px)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-right, 48px) var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-left, 24px)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top, 0)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header, 24px) var(--kbq-modal-size-content-padding-horizontal, 24px) var(--kbq-modal-size-content-padding-bottom, 8px) var(--kbq-modal-size-content-padding-horizontal, 24px);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical, 20px) var(--kbq-modal-size-footer-padding-horizontal, 24px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i5.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i5.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i7.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
549
580
|
}
|
|
550
581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalComponent, decorators: [{
|
|
551
582
|
type: Component,
|
|
552
583
|
args: [{ selector: 'kbq-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
553
584
|
'(keydown)': 'onKeyDown($event)'
|
|
554
|
-
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content
|
|
585
|
+
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n <div\n *ngIf=\"kbqMask\"\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div\n cdkTrapFocus\n class=\"kbq-modal-content\"\n >\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isModalType('default')\"\n [ngTemplateOutlet]=\"tplContentDefault\"\n />\n <ng-container\n *ngSwitchCase=\"isModalType('confirm')\"\n [ngTemplateOutlet]=\"tplContentConfirm\"\n />\n <ng-container\n *ngSwitchCase=\"isModalType('custom')\"\n [ngTemplateOutlet]=\"tplContentCustom\"\n />\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div\n *ngIf=\"kbqTitle\"\n kbq-title\n class=\"kbq-modal-header\"\n [class.kbq-modal-body_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqTitle)\"\n [ngTemplateOutlet]=\"$any(kbqTitle)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqTitle)\">\n <div [innerHTML]=\"kbqTitle\"></div>\n </ng-container>\n </ng-container>\n </div>\n\n <button\n *ngIf=\"kbqClosable\"\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i\n kbq-icon=\"mc-close-L_16\"\n [color]=\"componentColors.Contrast\"\n ></i>\n </button>\n </div>\n <div\n #modalBody\n class=\"kbq-modal-body kbq-scrollbar\"\n [ngStyle]=\"kbqBodyStyle\"\n (scroll)=\"checkOverflow()\"\n >\n <ng-container #bodyContainer>\n <ng-container\n *ngIf=\"!isComponent(kbqContent)\"\n [ngSwitch]=\"true\"\n >\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqContent)\"\n [ngTemplateOutlet]=\"$any(kbqContent)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container\n *ngSwitchDefault\n [ngTemplateOutlet]=\"tplOriginContent\"\n />\n </ng-container>\n </ng-container>\n </div>\n <div\n *ngIf=\"kbqFooter || kbqOkText || kbqCancelText\"\n class=\"kbq-modal-footer\"\n [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\"\n >\n <ng-container [ngSwitch]=\"true\">\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqFooter)\"\n [ngTemplateOutlet]=\"$any(kbqFooter)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqFooter)\">\n <div [innerHTML]=\"kbqFooter\"></div>\n </ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(kbqFooter)\">\n <ng-container *ngFor=\"let button of $any(kbqFooter)\">\n <button\n *ngIf=\"getButtonCallableProp(button, 'show')\"\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button\n *ngIf=\"kbqOkText\"\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n <button\n *ngIf=\"kbqCancelText\"\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\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\n class=\"kbq-modal-body\"\n [ngStyle]=\"kbqBodyStyle\"\n >\n <ng-container #bodyContainer>\n <ng-container\n *ngIf=\"!isComponent(kbqContent)\"\n [ngSwitch]=\"true\"\n >\n <ng-container\n *ngSwitchCase=\"isTemplateRef(kbqContent)\"\n [ngTemplateOutlet]=\"$any(kbqContent)\"\n />\n <ng-container *ngSwitchCase=\"isNonEmptyString(kbqContent)\">\n <div [innerHTML]=\"kbqContent\"></div>\n </ng-container>\n <ng-container\n *ngSwitchDefault\n [ngTemplateOutlet]=\"tplOriginContent\"\n />\n </ng-container>\n </ng-container>\n </div>\n <div\n *ngIf=\"kbqOkText || kbqCancelText\"\n class=\"kbq-confirm-footer\"\n >\n <button\n *ngIf=\"kbqOkText\"\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"kbqOkType\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n\n <button\n *ngIf=\"kbqCancelText\"\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius, 8px);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width, 400px)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width, 640px)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width, 960px)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius, 8px);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-right, 48px) var(--kbq-modal-size-header-padding-vertical, 16px) var(--kbq-modal-size-header-padding-left, 24px)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top, 0)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header, 24px) var(--kbq-modal-size-content-padding-horizontal, 24px) var(--kbq-modal-size-content-padding-bottom, 8px) var(--kbq-modal-size-content-padding-horizontal, 24px);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical, 20px) var(--kbq-modal-size-footer-padding-horizontal, 24px);gap:var(--kbq-modal-size-footer-content-gap-horizontal, 16px)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}\n"] }]
|
|
555
586
|
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: KbqModalControlService }, { type: i0.ChangeDetectorRef }, { type: i3.FocusMonitor }, { type: undefined, decorators: [{
|
|
556
587
|
type: Inject,
|
|
557
588
|
args: [DOCUMENT]
|
|
@@ -634,34 +665,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
634
665
|
}] } });
|
|
635
666
|
////////////
|
|
636
667
|
function isPromise(obj) {
|
|
637
|
-
|
|
638
|
-
return !!obj &&
|
|
668
|
+
return (!!obj &&
|
|
639
669
|
(typeof obj === 'object' || typeof obj === 'function') &&
|
|
640
670
|
typeof obj.then === 'function' &&
|
|
641
|
-
typeof obj.catch === 'function';
|
|
671
|
+
typeof obj.catch === 'function');
|
|
642
672
|
}
|
|
643
673
|
|
|
644
674
|
class KbqModalTitle {
|
|
645
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalTitle, deps: [], target: i0.ɵɵFactoryTarget.
|
|
646
|
-
/** @nocollapse */ static { this.ɵ
|
|
675
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
676
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalTitle, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
|
|
677
|
+
<div
|
|
678
|
+
class="kbq-modal-title"
|
|
679
|
+
kbq-title
|
|
680
|
+
>
|
|
681
|
+
<ng-content />
|
|
682
|
+
</div>
|
|
683
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i7.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }] }); }
|
|
647
684
|
}
|
|
648
685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalTitle, decorators: [{
|
|
649
|
-
type:
|
|
686
|
+
type: Component,
|
|
650
687
|
args: [{
|
|
651
|
-
selector: `[kbq-modal-title], kbq-modal-title, [
|
|
688
|
+
selector: `[kbq-modal-title], kbq-modal-title, [kbqModalTitle]`,
|
|
689
|
+
template: `
|
|
690
|
+
<div
|
|
691
|
+
class="kbq-modal-title"
|
|
692
|
+
kbq-title
|
|
693
|
+
>
|
|
694
|
+
<ng-content />
|
|
695
|
+
</div>
|
|
696
|
+
`,
|
|
652
697
|
host: {
|
|
653
|
-
class: 'kbq-modal-header
|
|
698
|
+
class: 'kbq-modal-header'
|
|
654
699
|
}
|
|
655
700
|
}]
|
|
656
701
|
}] });
|
|
657
702
|
class KbqModalBody {
|
|
658
703
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
659
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalBody, selector: "[kbq-modal-body], kbq-modal-body, [
|
|
704
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalBody, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body" }, ngImport: i0 }); }
|
|
660
705
|
}
|
|
661
706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalBody, decorators: [{
|
|
662
707
|
type: Directive,
|
|
663
708
|
args: [{
|
|
664
|
-
selector: `[kbq-modal-body], kbq-modal-body, [
|
|
709
|
+
selector: `[kbq-modal-body], kbq-modal-body, [kbqModalBody]`,
|
|
665
710
|
host: {
|
|
666
711
|
class: 'kbq-modal-body'
|
|
667
712
|
}
|
|
@@ -669,12 +714,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
669
714
|
}] });
|
|
670
715
|
class KbqModalFooter {
|
|
671
716
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
672
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalFooter, selector: "[kbq-modal-footer], kbq-modal-footer, [
|
|
717
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqModalFooter, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
|
|
673
718
|
}
|
|
674
719
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqModalFooter, decorators: [{
|
|
675
720
|
type: Directive,
|
|
676
721
|
args: [{
|
|
677
|
-
selector: `[kbq-modal-footer], kbq-modal-footer, [
|
|
722
|
+
selector: `[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]`,
|
|
678
723
|
host: {
|
|
679
724
|
class: 'kbq-modal-footer'
|
|
680
725
|
}
|
|
@@ -702,9 +747,9 @@ class ModalBuilderForService {
|
|
|
702
747
|
this.changeProps(options);
|
|
703
748
|
this.modalRef.instance.open();
|
|
704
749
|
this.modalRef.instance.kbqAfterClose.subscribe(() => this.destroyModal());
|
|
705
|
-
this.overlayRef
|
|
750
|
+
this.overlayRef
|
|
751
|
+
.keydownEvents()
|
|
706
752
|
.pipe(filter((event) => {
|
|
707
|
-
// tslint:disable-next-line:deprecation replacement .key isn't supported in Edge
|
|
708
753
|
return !!(event.keyCode === ESCAPE && options.kbqCloseByESC);
|
|
709
754
|
}))
|
|
710
755
|
.subscribe(() => this.getInstance()?.handleCloseResult('cancel', () => true));
|
|
@@ -750,7 +795,6 @@ class KbqModalService {
|
|
|
750
795
|
create(options = {}) {
|
|
751
796
|
if (typeof options.kbqOnCancel !== 'function') {
|
|
752
797
|
// Leave a empty function to close this modal by default
|
|
753
|
-
// tslint:disable-next-line
|
|
754
798
|
options.kbqOnCancel = () => { };
|
|
755
799
|
}
|
|
756
800
|
if (!('kbqCloseByESC' in options)) {
|
|
@@ -777,7 +821,6 @@ class KbqModalService {
|
|
|
777
821
|
// NOTE: only support function currently by calling confirm()
|
|
778
822
|
if (typeof options.kbqOnOk !== 'function') {
|
|
779
823
|
// Leave a empty function to close this modal by default
|
|
780
|
-
// tslint:disable-next-line
|
|
781
824
|
options.kbqOnOk = () => { };
|
|
782
825
|
}
|
|
783
826
|
options.kbqModalType = 'confirm';
|
|
@@ -791,7 +834,6 @@ class KbqModalService {
|
|
|
791
834
|
success(options = {}) {
|
|
792
835
|
return this.simpleConfirm(options, 'success');
|
|
793
836
|
}
|
|
794
|
-
// tslint:disable-next-line: no-reserved-keywords
|
|
795
837
|
delete(options = {}) {
|
|
796
838
|
return this.simpleConfirm(options, 'warn');
|
|
797
839
|
}
|