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