@koobiq/components 17.0.0-rc.9 → 17.0.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/README.md +1 -2
- package/alert/_alert-theme.scss +0 -1
- package/alert/alert.component.d.ts +3 -1
- package/alert/alert.component.scss +14 -14
- package/alert/public-api.d.ts +1 -1
- package/autocomplete/_autocomplete-theme.scss +0 -1
- package/autocomplete/autocomplete.scss +3 -6
- package/autocomplete/public-api.d.ts +2 -2
- package/badge/_badge-theme.scss +1 -2
- package/badge/badge.component.scss +0 -1
- package/badge/public-api.d.ts +1 -1
- package/button/_button-base.scss +0 -1
- package/button/_button-theme.scss +5 -3
- package/button/button.component.d.ts +2 -2
- package/button/button.scss +0 -1
- package/button/public-api.d.ts +1 -1
- package/button-toggle/_button-toggle-theme.scss +2 -3
- package/button-toggle/button-toggle.scss +2 -9
- package/button-toggle/public-api.d.ts +1 -1
- package/card/_card-theme.scss +0 -1
- package/card/card.component.d.ts +1 -1
- package/card/card.component.scss +1 -2
- package/card/public-api.d.ts +1 -1
- package/checkbox/_checkbox-theme.scss +10 -11
- package/checkbox/checkbox.scss +13 -19
- package/code-block/README.md +17 -14
- package/code-block/_code-block-theme.scss +23 -16
- package/code-block/actionbar.component.d.ts +2 -1
- package/code-block/actionbar.component.scss +5 -13
- package/code-block/code-block.component.d.ts +4 -3
- package/code-block/code-block.scss +8 -14
- package/code-block/public-api.d.ts +1 -1
- package/core/animation/index.d.ts +1 -1
- package/core/common-behaviors/index.d.ts +3 -3
- package/core/datetime/index.d.ts +1 -1
- package/core/formatters/index.d.ts +1 -1
- package/core/forms/_forms-theme.scss +0 -1
- package/core/forms/_forms.scss +0 -1
- package/core/forms/index.d.ts +1 -1
- package/core/locales/index.d.ts +1 -1
- package/core/option/_optgroup-theme.scss +0 -1
- package/core/option/_option-action-theme.scss +0 -1
- package/core/option/_option-theme.scss +0 -1
- package/core/option/action.scss +4 -2
- package/core/option/index.d.ts +2 -2
- package/core/option/optgroup.scss +2 -3
- package/core/option/option.scss +0 -1
- package/core/pop-up/_pop-up.scss +0 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -3
- package/core/public-api.d.ts +3 -3
- package/core/select/constants.d.ts +1 -1
- package/core/select/index.d.ts +3 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +0 -2
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +0 -1
- package/core/services/theme.service.d.ts +3 -2
- package/core/styles/_core.scss +0 -1
- package/core/styles/_koobiq-theme.scss +5 -3
- package/core/styles/common/_animation.scss +11 -10
- package/core/styles/common/_button.scss +0 -2
- package/core/styles/common/_clearfix.scss +1 -1
- package/core/styles/common/_groups.scss +0 -4
- package/core/styles/common/_list.scss +23 -61
- package/core/styles/common/_overlay.scss +4 -3
- package/core/styles/common/_popup.scss +0 -1
- package/core/styles/common/_rtl.scss +4 -4
- package/core/styles/common/_select.scss +37 -26
- package/core/styles/common/_tokens.scss +0 -2
- package/core/styles/functions/_number.scss +14 -19
- package/core/styles/functions/_string.scss +18 -19
- package/core/styles/functions/_timing.scss +24 -24
- package/core/styles/theming/_components-theming.scss +1120 -1208
- package/core/styles/theming/_scrollbar-theme.scss +8 -5
- package/core/styles/theming/_theming.scss +22 -20
- package/core/styles/typography/_typography-utils.scss +9 -3
- package/core/styles/typography/_typography.scss +114 -94
- package/core/styles/visual/_body.scss +0 -2
- package/core/styles/visual/_layout.scss +30 -22
- package/core/utils/data-size/index.d.ts +1 -1
- package/core/utils/public-api.d.ts +1 -1
- package/datepicker/_datepicker-theme.scss +21 -8
- package/datepicker/calendar-body.scss +0 -3
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/calendar.scss +1 -2
- package/datepicker/datepicker-content.scss +1 -3
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/datepicker/datepicker-input.scss +0 -1
- package/datepicker/datepicker-toggle.scss +0 -1
- package/datepicker/datepicker.component.d.ts +2 -2
- package/datepicker/public-api.d.ts +4 -4
- package/divider/_divider-theme.scss +0 -1
- package/divider/divider.scss +0 -1
- package/dl/_dl-theme.scss +0 -2
- package/dl/dl.scss +0 -1
- package/dl/public-api.d.ts +1 -1
- package/dropdown/_dropdown-theme.scss +4 -2
- package/dropdown/dropdown-content.directive.d.ts +1 -1
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +9 -7
- package/dropdown/dropdown.component.d.ts +1 -1
- package/dropdown/dropdown.scss +0 -1
- package/dropdown/public-api.d.ts +5 -5
- package/ellipsis-center/ellipsis-center.directive.d.ts +1 -1
- package/empty-state/README.md +0 -0
- package/empty-state/_empty-state-theme.scss +56 -0
- package/empty-state/empty-state.component.d.ts +31 -0
- package/empty-state/empty-state.module.d.ts +10 -0
- package/empty-state/empty-state.scss +81 -0
- package/empty-state/index.d.ts +1 -0
- package/empty-state/public-api.d.ts +2 -0
- package/esm2022/alert/alert.component.mjs +7 -3
- package/esm2022/alert/alert.module.mjs +1 -1
- package/esm2022/alert/public-api.mjs +2 -2
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +1 -1
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +25 -42
- package/esm2022/autocomplete/autocomplete.component.mjs +14 -9
- package/esm2022/autocomplete/autocomplete.module.mjs +3 -3
- package/esm2022/autocomplete/public-api.mjs +3 -3
- package/esm2022/badge/badge.component.mjs +8 -6
- package/esm2022/badge/badge.module.mjs +1 -1
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/button/button.component.mjs +12 -9
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button-toggle/button-toggle.component.mjs +26 -20
- package/esm2022/button-toggle/button-toggle.module.mjs +1 -1
- package/esm2022/button-toggle/public-api.mjs +2 -2
- package/esm2022/card/card.component.mjs +4 -5
- package/esm2022/card/card.module.mjs +1 -1
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/checkbox/checkbox-module.mjs +1 -1
- package/esm2022/checkbox/checkbox-required-validator.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +6 -8
- package/esm2022/checkbox/public-api.mjs +1 -1
- package/esm2022/code-block/actionbar.component.mjs +6 -6
- package/esm2022/code-block/code-block.component.mjs +20 -19
- package/esm2022/code-block/code-block.module.mjs +9 -5
- package/esm2022/code-block/public-api.mjs +2 -2
- package/esm2022/core/animation/fade-animations.mjs +1 -1
- package/esm2022/core/animation/index.mjs +2 -2
- package/esm2022/core/animation/select-animations.mjs +2 -2
- package/esm2022/core/common-behaviors/color.mjs +4 -2
- package/esm2022/core/common-behaviors/common-module.mjs +2 -5
- package/esm2022/core/common-behaviors/constructor.mjs +1 -1
- package/esm2022/core/common-behaviors/disabled.mjs +2 -2
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/common-behaviors/index.mjs +4 -4
- package/esm2022/core/common-behaviors/tabindex.mjs +1 -1
- package/esm2022/core/datetime/date-adapter.mjs +1 -2
- package/esm2022/core/datetime/date-formats.mjs +1 -1
- package/esm2022/core/datetime/index.mjs +2 -2
- package/esm2022/core/error/error-options.mjs +1 -1
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.pipe.mjs +1 -1
- package/esm2022/core/formatters/index.mjs +2 -2
- package/esm2022/core/formatters/number/formatter.mjs +19 -24
- package/esm2022/core/forms/forms-module.mjs +1 -1
- package/esm2022/core/forms/forms.directive.mjs +1 -1
- package/esm2022/core/forms/index.mjs +2 -2
- package/esm2022/core/highlight/highlight.pipe.mjs +1 -1
- package/esm2022/core/highlight/index.mjs +1 -1
- package/esm2022/core/label/label-options.mjs +1 -1
- package/esm2022/core/line/line.mjs +2 -2
- package/esm2022/core/locales/en-US.mjs +1 -1
- package/esm2022/core/locales/es-LA.mjs +1 -1
- package/esm2022/core/locales/fa-IR.mjs +1 -1
- package/esm2022/core/locales/formatters.mjs +1 -3
- package/esm2022/core/locales/index.mjs +2 -2
- package/esm2022/core/locales/locale-service.mjs +8 -5
- package/esm2022/core/locales/locale-service.module.mjs +1 -1
- package/esm2022/core/locales/pt-BR.mjs +1 -1
- package/esm2022/core/locales/ru-RU.mjs +3 -3
- package/esm2022/core/locales/zh-CN.mjs +1 -1
- package/esm2022/core/option/action.mjs +22 -14
- package/esm2022/core/option/index.mjs +3 -3
- package/esm2022/core/option/optgroup.mjs +4 -5
- package/esm2022/core/option/option-module.mjs +1 -1
- package/esm2022/core/option/option.mjs +13 -10
- package/esm2022/core/overlay/overlay-position-map.mjs +1 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +14 -24
- package/esm2022/core/pop-up/pop-up.mjs +1 -2
- package/esm2022/core/public-api.mjs +4 -4
- package/esm2022/core/select/common.mjs +2 -5
- package/esm2022/core/select/constants.mjs +1 -2
- package/esm2022/core/select/index.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +1 -1
- package/esm2022/core/services/measure-scrollbar.service.mjs +1 -2
- package/esm2022/core/services/theme.service.mjs +5 -4
- package/esm2022/core/title/title-text-ref.mjs +1 -1
- package/esm2022/core/utils/data-size/config.mjs +1 -1
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +2 -3
- package/esm2022/core/utils/data-size/index.mjs +2 -2
- package/esm2022/core/utils/data-size/size.mjs +3 -6
- package/esm2022/core/utils/public-api.mjs +2 -2
- package/esm2022/core/utils/utils.mjs +4 -2
- package/esm2022/core/validation/validation.mjs +4 -2
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -5
- package/esm2022/datepicker/calendar-header.component.mjs +8 -8
- package/esm2022/datepicker/calendar.component.mjs +6 -6
- package/esm2022/datepicker/datepicker-animations.mjs +1 -1
- package/esm2022/datepicker/datepicker-errors.mjs +1 -1
- package/esm2022/datepicker/datepicker-input.directive.mjs +47 -49
- package/esm2022/datepicker/datepicker-intl.mjs +1 -1
- package/esm2022/datepicker/datepicker-module.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.component.mjs +11 -10
- package/esm2022/datepicker/datepicker.component.mjs +15 -18
- package/esm2022/datepicker/month-view.component.mjs +14 -14
- package/esm2022/datepicker/public-api.mjs +5 -5
- package/esm2022/divider/divider.component.mjs +1 -1
- package/esm2022/divider/divider.module.mjs +1 -1
- package/esm2022/dl/dl.component.mjs +7 -7
- package/esm2022/dl/dl.module.mjs +2 -2
- package/esm2022/dl/public-api.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +2 -2
- package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2022/dropdown/dropdown-item.component.mjs +5 -8
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +24 -33
- package/esm2022/dropdown/dropdown.component.mjs +10 -19
- package/esm2022/dropdown/dropdown.module.mjs +1 -1
- package/esm2022/dropdown/dropdown.types.mjs +1 -2
- package/esm2022/dropdown/public-api.mjs +6 -6
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +6 -5
- package/esm2022/empty-state/empty-state.component.mjs +104 -0
- package/esm2022/empty-state/empty-state.module.mjs +50 -0
- package/esm2022/empty-state/index.mjs +2 -0
- package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
- package/esm2022/empty-state/public-api.mjs +3 -0
- package/esm2022/file-upload/file-drop.mjs +3 -2
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/file-upload.module.mjs +2 -2
- package/esm2022/file-upload/index.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +16 -14
- package/esm2022/file-upload/public-api.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +14 -12
- package/esm2022/form-field/cleaner.mjs +13 -3
- package/esm2022/form-field/form-field-control.mjs +1 -2
- package/esm2022/form-field/form-field-errors.mjs +1 -1
- package/esm2022/form-field/form-field.mjs +8 -15
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/hint.mjs +6 -6
- package/esm2022/form-field/password-hint.mjs +15 -15
- package/esm2022/form-field/password-toggle.mjs +4 -7
- package/esm2022/form-field/prefix.mjs +1 -1
- package/esm2022/form-field/public-api.mjs +4 -4
- package/esm2022/form-field/stepper.mjs +33 -29
- package/esm2022/form-field/suffix.mjs +1 -1
- package/esm2022/form-field/validate.directive.mjs +6 -7
- package/esm2022/icon/icon-button.component.mjs +4 -4
- package/esm2022/icon/icon-item.component.mjs +3 -3
- package/esm2022/icon/icon.component.mjs +5 -6
- package/esm2022/icon/icon.module.mjs +1 -1
- package/esm2022/icon/public-api.mjs +3 -3
- package/esm2022/input/input-number-validators.mjs +1 -1
- package/esm2022/input/input-number.mjs +29 -41
- package/esm2022/input/input-password.mjs +13 -8
- package/esm2022/input/input-value-accessor.mjs +1 -1
- package/esm2022/input/input.mjs +13 -10
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/public-api.mjs +3 -3
- package/esm2022/link/link.component.mjs +2 -2
- package/esm2022/link/link.module.mjs +1 -1
- package/esm2022/link/public-api.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +36 -41
- package/esm2022/list/list.component.mjs +5 -6
- package/esm2022/list/list.module.mjs +2 -2
- package/esm2022/list/public-api.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.module.mjs +1 -1
- package/esm2022/loader-overlay/public-api.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +20 -6
- package/esm2022/markdown/markdown.module.mjs +1 -1
- package/esm2022/markdown/markdown.service.mjs +1 -1
- package/esm2022/modal/css-unit.pipe.mjs +1 -1
- package/esm2022/modal/modal-control.service.mjs +6 -2
- package/esm2022/modal/modal-ref.class.mjs +1 -2
- package/esm2022/modal/modal-util.mjs +1 -1
- package/esm2022/modal/modal.component.mjs +60 -33
- package/esm2022/modal/modal.directive.mjs +27 -11
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +3 -6
- package/esm2022/modal/modal.type.mjs +1 -1
- package/esm2022/modal/public-api.mjs +3 -3
- package/esm2022/navbar/index.mjs +1 -1
- package/esm2022/navbar/navbar-item.component.mjs +41 -33
- package/esm2022/navbar/navbar.component.mjs +19 -29
- package/esm2022/navbar/navbar.module.mjs +2 -2
- package/esm2022/navbar/public-api.mjs +3 -3
- package/esm2022/navbar/vertical-navbar.component.mjs +21 -23
- package/esm2022/popover/popover-animations.mjs +1 -1
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +5 -5
- package/esm2022/popover/popover.module.mjs +1 -1
- package/esm2022/popover/public-api.mjs +3 -3
- package/esm2022/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.module.mjs +2 -2
- package/esm2022/progress-bar/public-api.mjs +2 -2
- package/esm2022/progress-spinner/progress-spinner.component.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.module.mjs +1 -1
- package/esm2022/progress-spinner/public-api.mjs +2 -2
- package/esm2022/radio/public-api.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +9 -14
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/risk-level/public-api.mjs +2 -2
- package/esm2022/risk-level/risk-level.component.mjs +3 -3
- package/esm2022/risk-level/risk-level.module.mjs +1 -1
- package/esm2022/scrollbar/public-api.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +19 -21
- package/esm2022/scrollbar/scrollbar.directive.mjs +4 -5
- package/esm2022/scrollbar/scrollbar.module.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.types.mjs +3 -2
- package/esm2022/select/public-api.mjs +3 -3
- package/esm2022/select/select-option.directive.mjs +8 -5
- package/esm2022/select/select.component.mjs +45 -71
- package/esm2022/select/select.module.mjs +1 -1
- package/esm2022/sidebar/public-api.mjs +2 -2
- package/esm2022/sidebar/sidebar-animations.mjs +1 -1
- package/esm2022/sidebar/sidebar.component.mjs +5 -7
- package/esm2022/sidebar/sidebar.module.mjs +1 -1
- package/esm2022/sidepanel/public-api.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-animations.mjs +7 -4
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-directives.mjs +33 -20
- package/esm2022/sidepanel/sidepanel-ref.mjs +10 -5
- package/esm2022/sidepanel/sidepanel.module.mjs +1 -1
- package/esm2022/sidepanel/sidepanel.service.mjs +11 -15
- package/esm2022/splitter/public-api.mjs +2 -2
- package/esm2022/splitter/splitter.component.mjs +13 -24
- package/esm2022/splitter/splitter.module.mjs +1 -1
- package/esm2022/table/public-api.mjs +2 -2
- package/esm2022/table/table.component.mjs +3 -3
- package/esm2022/table/table.module.mjs +1 -1
- package/esm2022/tabs/paginated-tab-header.mjs +9 -14
- package/esm2022/tabs/public-api.mjs +6 -6
- package/esm2022/tabs/tab-body.component.mjs +10 -11
- package/esm2022/tabs/tab-content.directive.mjs +1 -1
- package/esm2022/tabs/tab-group.component.mjs +11 -13
- package/esm2022/tabs/tab-header.component.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +1 -1
- package/esm2022/tabs/tab-label.directive.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/index.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +46 -49
- package/esm2022/tabs/tab.component.mjs +7 -10
- package/esm2022/tabs/tabs-animations.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +2 -2
- package/esm2022/tags/public-api.mjs +5 -5
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +12 -16
- package/esm2022/tags/tag-list.component.mjs +15 -27
- package/esm2022/tags/tag-text-control.mjs +1 -1
- package/esm2022/tags/tag.component.mjs +5 -8
- package/esm2022/tags/tag.module.mjs +9 -7
- package/esm2022/textarea/index.mjs +1 -1
- package/esm2022/textarea/textarea.component.mjs +4 -7
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/timepicker/public-api.mjs +2 -2
- package/esm2022/timepicker/timepicker.constants.mjs +6 -2
- package/esm2022/timepicker/timepicker.directive.mjs +62 -31
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timezone/cities-by-filter.pipe.mjs +1 -1
- package/esm2022/timezone/timezone-option.component.mjs +12 -11
- package/esm2022/timezone/timezone-option.directive.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/timezone/timezone.models.mjs +1 -2
- package/esm2022/timezone/timezone.module.mjs +1 -1
- package/esm2022/timezone/timezone.utils.mjs +5 -9
- package/esm2022/timezone/utc-offset.pipe.mjs +1 -1
- package/esm2022/title/public-api.mjs +2 -2
- package/esm2022/title/title.directive.mjs +9 -5
- package/esm2022/title/title.module.mjs +1 -1
- package/esm2022/toast/public-api.mjs +4 -4
- package/esm2022/toast/toast-animations.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +5 -6
- package/esm2022/toast/toast.component.mjs +6 -6
- package/esm2022/toast/toast.module.mjs +1 -1
- package/esm2022/toast/toast.service.mjs +18 -30
- package/esm2022/toast/toast.type.mjs +1 -1
- package/esm2022/toggle/public-api.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +17 -11
- package/esm2022/toggle/toggle.module.mjs +1 -1
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/tooltip.animations.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +7 -7
- package/esm2022/tooltip/tooltip.module.mjs +2 -2
- package/esm2022/tree/control/base-tree-control.mjs +1 -2
- package/esm2022/tree/control/flat-tree-control.filters.mjs +4 -7
- package/esm2022/tree/control/flat-tree-control.mjs +4 -7
- package/esm2022/tree/control/nested-tree-control.mjs +1 -2
- package/esm2022/tree/control/tree-control.mjs +1 -1
- package/esm2022/tree/data-source/flat-data-source.mjs +3 -8
- package/esm2022/tree/data-source/nested-data-source.mjs +2 -4
- package/esm2022/tree/node.mjs +1 -1
- package/esm2022/tree/outlet.mjs +1 -1
- package/esm2022/tree/padding.directive.mjs +4 -5
- package/esm2022/tree/public-api.mjs +11 -11
- package/esm2022/tree/toggle.mjs +8 -5
- package/esm2022/tree/tree-base.mjs +3 -7
- package/esm2022/tree/tree-errors.mjs +1 -1
- package/esm2022/tree/tree-option.component.mjs +9 -13
- package/esm2022/tree/tree-selection.component.mjs +20 -36
- package/esm2022/tree/tree.mjs +7 -3
- package/esm2022/tree/tree.module.mjs +2 -3
- package/esm2022/tree-select/public-api.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +59 -72
- package/esm2022/tree-select/tree-select.module.mjs +1 -1
- package/fesm2022/koobiq-components-alert.mjs +10 -6
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +60 -72
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +10 -8
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +30 -24
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +14 -11
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-card.mjs +4 -5
- package/fesm2022/koobiq-components-card.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +3 -5
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +39 -34
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +325 -336
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +105 -111
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +9 -9
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +125 -147
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +3 -2
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +157 -0
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +46 -41
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +75 -73
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +9 -10
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +56 -60
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +1 -1
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +43 -49
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +6 -6
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +18 -4
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +96 -54
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +82 -86
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +12 -12
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +5 -5
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +5 -5
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +11 -16
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +4 -4
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +22 -24
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +55 -78
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +5 -7
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +110 -93
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +15 -26
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +5 -5
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +85 -98
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +39 -56
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +2 -5
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +69 -34
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +16 -21
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +11 -7
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +74 -87
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +17 -11
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +10 -10
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +67 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +509 -541
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +28 -18
- package/file-upload/file-upload.scss +0 -1
- package/file-upload/multiple-file-upload.component.d.ts +2 -2
- package/file-upload/multiple-file-upload.component.scss +17 -27
- package/file-upload/public-api.d.ts +1 -1
- package/file-upload/single-file-upload.component.d.ts +2 -2
- package/file-upload/single-file-upload.component.scss +1 -7
- package/form-field/_form-field-theme.scss +24 -12
- package/form-field/_hint-theme.scss +0 -2
- package/form-field/cleaner.scss +0 -1
- package/form-field/form-field.scss +12 -14
- package/form-field/hint.scss +0 -1
- package/form-field/password-toggle.scss +0 -1
- package/form-field/public-api.d.ts +3 -3
- package/form-field/stepper.scss +0 -1
- package/icon/_icon-button-theme.scss +18 -7
- package/icon/_icon-theme.scss +0 -1
- package/icon/icon-button.scss +2 -5
- package/icon/icon-item.scss +2 -5
- package/icon/icon.scss +0 -1
- package/icon/public-api.d.ts +2 -2
- package/input/_input-theme.scss +0 -1
- package/input/input.scss +9 -9
- package/input/public-api.d.ts +2 -2
- package/link/_link-theme.scss +12 -18
- package/link/link.component.d.ts +1 -1
- package/link/public-api.d.ts +1 -1
- package/list/_list-theme.scss +0 -1
- package/list/list-selection.component.d.ts +3 -3
- package/list/list.scss +1 -3
- package/list/public-api.d.ts +2 -2
- package/loader-overlay/_loader-overlay-theme.scss +6 -4
- package/loader-overlay/loader-overlay.scss +0 -1
- package/loader-overlay/public-api.d.ts +1 -1
- package/markdown/_markdown-theme.scss +11 -8
- package/markdown/markdown.scss +3 -3
- package/modal/README.md +4 -3
- package/modal/_modal-animation.scss +0 -1
- package/modal/_modal-confirm.scss +0 -1
- package/modal/_modal-theme.scss +8 -9
- package/modal/modal.directive.d.ts +3 -3
- package/modal/modal.scss +9 -15
- package/modal/modal.type.d.ts +2 -2
- package/modal/public-api.d.ts +2 -2
- package/navbar/README.md +21 -20
- package/navbar/_navbar-item_horizontal.scss +31 -24
- package/navbar/_navbar-item_vertical.scss +0 -3
- package/navbar/_navbar-theme.scss +3 -6
- package/navbar/navbar-brand.scss +0 -1
- package/navbar/navbar-divider.scss +0 -1
- package/navbar/navbar-item.component.d.ts +1 -1
- package/navbar/navbar-item.scss +9 -2
- package/navbar/navbar.scss +0 -1
- package/navbar/public-api.d.ts +2 -2
- package/navbar/vertical-navbar.scss +0 -1
- package/package.json +12 -6
- package/popover/README.md +17 -14
- package/popover/_popover-theme.scss +0 -1
- package/popover/popover.component.d.ts +1 -1
- package/popover/popover.scss +5 -13
- package/popover/public-api.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +0 -1
- package/progress-bar/progress-bar.scss +0 -1
- package/progress-bar/public-api.d.ts +1 -1
- package/progress-spinner/_progress-spinner-theme.scss +0 -1
- package/progress-spinner/progress-spinner.scss +0 -1
- package/progress-spinner/public-api.d.ts +1 -1
- package/radio/_radio-theme.scss +13 -5
- package/radio/public-api.d.ts +1 -1
- package/radio/radio.scss +20 -6
- package/risk-level/_risk-level-theme.scss +0 -1
- package/risk-level/public-api.d.ts +1 -1
- package/risk-level/risk-level.component.scss +1 -4
- package/schematics/ng-add/index.js +4 -4
- package/scrollbar/_scrollbar-component-theme.scss +2 -3
- package/scrollbar/public-api.d.ts +1 -1
- package/scrollbar/scrollbar.component.scss +56 -44
- package/scrollbar/scrollbar.directive.d.ts +1 -1
- package/scrollbar/scrollbar.types.d.ts +1 -1
- package/select/_select-theme.scss +0 -1
- package/select/public-api.d.ts +2 -2
- package/select/select.component.d.ts +4 -1
- package/select/select.scss +0 -1
- package/sidebar/public-api.d.ts +1 -1
- package/sidepanel/_sidepanel-theme.scss +0 -1
- package/sidepanel/public-api.d.ts +3 -3
- package/sidepanel/sidepanel.scss +6 -12
- package/splitter/_splitter-theme.scss +0 -1
- package/splitter/public-api.d.ts +1 -1
- package/splitter/splitter.component.d.ts +2 -2
- package/splitter/splitter.scss +0 -1
- package/table/_table-theme.scss +7 -7
- package/table/public-api.d.ts +1 -1
- package/table/table.scss +2 -2
- package/tabs/_tabs-common.scss +10 -8
- package/tabs/_tabs-theme.scss +0 -1
- package/tabs/paginated-tab-header.d.ts +1 -1
- package/tabs/public-api.d.ts +5 -5
- package/tabs/tab-body.component.d.ts +3 -3
- package/tabs/tab-group.component.d.ts +1 -1
- package/tabs/tab-group.scss +0 -1
- package/tabs/tab-header.scss +0 -6
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +17 -17
- package/tabs/tab-nav-bar/tab-nav-bar.scss +0 -1
- package/tags/_tag-theme.scss +0 -2
- package/tags/public-api.d.ts +4 -4
- package/tags/tag-input.d.ts +1 -1
- package/tags/tag-list.scss +9 -7
- package/tags/tag.component.d.ts +2 -2
- package/tags/tag.scss +1 -4
- package/textarea/_textarea-theme.scss +0 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea/textarea.scss +1 -4
- package/timepicker/public-api.d.ts +1 -1
- package/timepicker/timepicker.constants.d.ts +2 -0
- package/timepicker/timepicker.directive.d.ts +10 -3
- package/timepicker/timepicker.scss +0 -1
- package/timezone/_timezone-option-theme.scss +0 -1
- package/timezone/timezone-option.component.scss +0 -1
- package/timezone/timezone-option.directive.d.ts +1 -1
- package/timezone/timezone-select.component.scss +0 -1
- package/timezone/timezone.utils.d.ts +1 -1
- package/title/public-api.d.ts +1 -1
- package/title/title.directive.d.ts +2 -2
- package/toast/_toast-theme.scss +0 -2
- package/toast/public-api.d.ts +3 -3
- package/toast/toast-container.component.scss +0 -1
- package/toast/toast.component.scss +4 -2
- package/toast/toast.service.d.ts +2 -2
- package/toast/toast.type.d.ts +1 -1
- package/toggle/_toggle-theme.scss +10 -9
- package/toggle/public-api.d.ts +1 -1
- package/toggle/toggle.component.d.ts +2 -2
- package/toggle/toggle.scss +0 -1
- package/tooltip/_tooltip-theme.scss +0 -1
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -2
- package/tooltip/tooltip.scss +1 -5
- package/tree/_tree-theme.scss +2 -3
- package/tree/public-api.d.ts +10 -10
- package/tree/toggle.scss +0 -1
- package/tree/tree-base.d.ts +1 -1
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-option.scss +12 -8
- package/tree/tree-selection.component.d.ts +3 -2
- package/tree-select/_tree-select-theme.scss +0 -1
- package/tree-select/public-api.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +9 -4
- package/tree-select/tree-select.scss +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Optional, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@koobiq/components/icon';
|
|
4
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
5
|
+
import { PlatformModule } from '@angular/cdk/platform';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
|
|
8
|
+
class KbqEmptyStateIcon {
|
|
9
|
+
constructor(icon) {
|
|
10
|
+
this.icon = icon;
|
|
11
|
+
}
|
|
12
|
+
setErrorColor() {
|
|
13
|
+
if (!this.icon) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
this.icon.color = 'error';
|
|
17
|
+
}
|
|
18
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateIcon, deps: [{ token: i1.KbqIconItem, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqEmptyStateIcon, selector: "[kbq-empty-state-icon]", host: { classAttribute: "kbq-empty-state-icon" }, ngImport: i0 }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateIcon, decorators: [{
|
|
22
|
+
type: Directive,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: '[kbq-empty-state-icon]',
|
|
25
|
+
host: {
|
|
26
|
+
class: 'kbq-empty-state-icon'
|
|
27
|
+
}
|
|
28
|
+
}]
|
|
29
|
+
}], ctorParameters: () => [{ type: i1.KbqIconItem, decorators: [{
|
|
30
|
+
type: Optional
|
|
31
|
+
}] }] });
|
|
32
|
+
class KbqEmptyStateText {
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateText, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqEmptyStateText, selector: "[kbq-empty-state-text]", host: { classAttribute: "kbq-empty-state-text" }, ngImport: i0 }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateText, decorators: [{
|
|
37
|
+
type: Directive,
|
|
38
|
+
args: [{
|
|
39
|
+
selector: '[kbq-empty-state-text]',
|
|
40
|
+
host: {
|
|
41
|
+
class: 'kbq-empty-state-text'
|
|
42
|
+
}
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
class KbqEmptyStateTitle {
|
|
46
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
47
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqEmptyStateTitle, selector: "[kbq-empty-state-title]", host: { classAttribute: "kbq-empty-state-title" }, ngImport: i0 }); }
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateTitle, decorators: [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: '[kbq-empty-state-title]',
|
|
53
|
+
host: {
|
|
54
|
+
class: 'kbq-empty-state-title'
|
|
55
|
+
}
|
|
56
|
+
}]
|
|
57
|
+
}] });
|
|
58
|
+
class KbqEmptyStateActions {
|
|
59
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateActions, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
60
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqEmptyStateActions, selector: "[kbq-empty-state-actions]", host: { classAttribute: "kbq-empty-state-actions" }, ngImport: i0 }); }
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateActions, decorators: [{
|
|
63
|
+
type: Directive,
|
|
64
|
+
args: [{
|
|
65
|
+
selector: '[kbq-empty-state-actions]',
|
|
66
|
+
host: {
|
|
67
|
+
class: 'kbq-empty-state-actions'
|
|
68
|
+
}
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
71
|
+
class KbqEmptyState {
|
|
72
|
+
constructor() {
|
|
73
|
+
this.errorColor = false;
|
|
74
|
+
this.big = false;
|
|
75
|
+
this.alignTop = false;
|
|
76
|
+
}
|
|
77
|
+
ngAfterContentInit() {
|
|
78
|
+
if (this.errorColor && this.icon) {
|
|
79
|
+
this.icon.setErrorColor();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyState, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
83
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqEmptyState, selector: "kbq-empty-state", inputs: { errorColor: "errorColor", big: "big", alignTop: "alignTop" }, host: { properties: { "class.kbq-empty-state_big": "big", "class.kbq-empty-state_normal": "!big", "class.kbq-empty-state_align-center": "!alignTop", "class.kbq-empty-state_align-top": "alignTop", "class.kbq-empty-state_normal-color": "!errorColor", "class.kbq-empty-state_error-color": "errorColor", "class.kbq-empty-state_has-icon": "!!icon" }, classAttribute: "kbq-empty-state" }, queries: [{ propertyName: "icon", first: true, predicate: KbqEmptyStateIcon, descendants: true }], ngImport: i0, template: "<ng-content select=\"[kbq-empty-state-icon]\" />\n\n<ng-content select=\"[kbq-empty-state-title]\" />\n\n<ng-content select=\"[kbq-empty-state-text]\" />\n\n<ng-content select=\"[kbq-empty-state-actions]\" />\n", styles: [".kbq-empty-state{display:flex;flex-direction:column;align-items:center;flex:1}.kbq-empty-state.kbq-empty-state_normal{padding:var(--kbq-empty-state-size-normal-padding-top, 32px) var(--kbq-empty-state-size-normal-padding-horizontal, 32px) var(--kbq-empty-state-size-normal-padding-bottom, 32px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-icon{margin-bottom:var(--kbq-empty-state-size-normal-image-margin-bottom, 20px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-text{max-width:var(--kbq-empty-state-size-normal-max-width, 320px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-title{max-width:var(--kbq-empty-state-size-normal-max-width, 320px);margin-bottom:var(--kbq-empty-state-size-normal-title-margin-bottom, 4px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-actions{max-width:var(--kbq-empty-state-size-normal-max-width, 320px);margin-top:var(--kbq-empty-state-size-normal-actions-margin-top, 8px)}.kbq-empty-state.kbq-empty-state_normal.kbq-empty-state_align-center.kbq-empty-state_has-icon{margin-bottom:var(--kbq-empty-state-size-normal-image-addon-height, 24px)}.kbq-empty-state.kbq-empty-state_big{padding:var(--kbq-empty-state-size-big-padding-top, 48px) var(--kbq-empty-state-size-big-padding-horizontal, 56px) var(--kbq-empty-state-size-big-padding-bottom, 48px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-icon{margin-bottom:var(--kbq-empty-state-size-big-image-margin-bottom, 32px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-text{max-width:var(--kbq-empty-state-size-big-max-width, 480px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-title{max-width:var(--kbq-empty-state-size-big-max-width, 480px);margin-bottom:var(--kbq-empty-state-size-big-title-margin-bottom, 16px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-actions{max-width:var(--kbq-empty-state-size-big-max-width, 480px);margin-top:var(--kbq-empty-state-size-big-actions-margin-top, 20px)}.kbq-empty-state.kbq-empty-state_big.kbq-empty-state_align-center.kbq-empty-state_has-icon{margin-bottom:var(--kbq-empty-state-size-big-image-addon-height, 56px)}.kbq-empty-state.kbq-empty-state_align-center{justify-content:center}.kbq-empty-state.kbq-empty-state_align-top{justify-content:flex-start}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyState, decorators: [{
|
|
86
|
+
type: Component,
|
|
87
|
+
args: [{ selector: 'kbq-empty-state', host: {
|
|
88
|
+
class: 'kbq-empty-state',
|
|
89
|
+
'[class.kbq-empty-state_big]': 'big',
|
|
90
|
+
'[class.kbq-empty-state_normal]': '!big',
|
|
91
|
+
'[class.kbq-empty-state_align-center]': '!alignTop',
|
|
92
|
+
'[class.kbq-empty-state_align-top]': 'alignTop',
|
|
93
|
+
'[class.kbq-empty-state_normal-color]': '!errorColor',
|
|
94
|
+
'[class.kbq-empty-state_error-color]': 'errorColor',
|
|
95
|
+
'[class.kbq-empty-state_has-icon]': '!!icon'
|
|
96
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"[kbq-empty-state-icon]\" />\n\n<ng-content select=\"[kbq-empty-state-title]\" />\n\n<ng-content select=\"[kbq-empty-state-text]\" />\n\n<ng-content select=\"[kbq-empty-state-actions]\" />\n", styles: [".kbq-empty-state{display:flex;flex-direction:column;align-items:center;flex:1}.kbq-empty-state.kbq-empty-state_normal{padding:var(--kbq-empty-state-size-normal-padding-top, 32px) var(--kbq-empty-state-size-normal-padding-horizontal, 32px) var(--kbq-empty-state-size-normal-padding-bottom, 32px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-icon{margin-bottom:var(--kbq-empty-state-size-normal-image-margin-bottom, 20px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-text{max-width:var(--kbq-empty-state-size-normal-max-width, 320px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-title{max-width:var(--kbq-empty-state-size-normal-max-width, 320px);margin-bottom:var(--kbq-empty-state-size-normal-title-margin-bottom, 4px)}.kbq-empty-state.kbq-empty-state_normal .kbq-empty-state-actions{max-width:var(--kbq-empty-state-size-normal-max-width, 320px);margin-top:var(--kbq-empty-state-size-normal-actions-margin-top, 8px)}.kbq-empty-state.kbq-empty-state_normal.kbq-empty-state_align-center.kbq-empty-state_has-icon{margin-bottom:var(--kbq-empty-state-size-normal-image-addon-height, 24px)}.kbq-empty-state.kbq-empty-state_big{padding:var(--kbq-empty-state-size-big-padding-top, 48px) var(--kbq-empty-state-size-big-padding-horizontal, 56px) var(--kbq-empty-state-size-big-padding-bottom, 48px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-icon{margin-bottom:var(--kbq-empty-state-size-big-image-margin-bottom, 32px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-text{max-width:var(--kbq-empty-state-size-big-max-width, 480px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-title{max-width:var(--kbq-empty-state-size-big-max-width, 480px);margin-bottom:var(--kbq-empty-state-size-big-title-margin-bottom, 16px)}.kbq-empty-state.kbq-empty-state_big .kbq-empty-state-actions{max-width:var(--kbq-empty-state-size-big-max-width, 480px);margin-top:var(--kbq-empty-state-size-big-actions-margin-top, 20px)}.kbq-empty-state.kbq-empty-state_big.kbq-empty-state_align-center.kbq-empty-state_has-icon{margin-bottom:var(--kbq-empty-state-size-big-image-addon-height, 56px)}.kbq-empty-state.kbq-empty-state_align-center{justify-content:center}.kbq-empty-state.kbq-empty-state_align-top{justify-content:flex-start}\n"] }]
|
|
97
|
+
}], propDecorators: { errorColor: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], big: [{
|
|
100
|
+
type: Input
|
|
101
|
+
}], alignTop: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], icon: [{
|
|
104
|
+
type: ContentChild,
|
|
105
|
+
args: [KbqEmptyStateIcon]
|
|
106
|
+
}] } });
|
|
107
|
+
|
|
108
|
+
class KbqEmptyStateModule {
|
|
109
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
110
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateModule, declarations: [KbqEmptyState,
|
|
111
|
+
KbqEmptyStateIcon,
|
|
112
|
+
KbqEmptyStateText,
|
|
113
|
+
KbqEmptyStateTitle,
|
|
114
|
+
KbqEmptyStateTitle,
|
|
115
|
+
KbqEmptyStateActions], imports: [CommonModule,
|
|
116
|
+
A11yModule,
|
|
117
|
+
PlatformModule], exports: [KbqEmptyState,
|
|
118
|
+
KbqEmptyStateIcon,
|
|
119
|
+
KbqEmptyStateText,
|
|
120
|
+
KbqEmptyStateTitle,
|
|
121
|
+
KbqEmptyStateActions] }); }
|
|
122
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateModule, imports: [CommonModule,
|
|
123
|
+
A11yModule,
|
|
124
|
+
PlatformModule] }); }
|
|
125
|
+
}
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqEmptyStateModule, decorators: [{
|
|
127
|
+
type: NgModule,
|
|
128
|
+
args: [{
|
|
129
|
+
imports: [
|
|
130
|
+
CommonModule,
|
|
131
|
+
A11yModule,
|
|
132
|
+
PlatformModule
|
|
133
|
+
],
|
|
134
|
+
declarations: [
|
|
135
|
+
KbqEmptyState,
|
|
136
|
+
KbqEmptyStateIcon,
|
|
137
|
+
KbqEmptyStateText,
|
|
138
|
+
KbqEmptyStateTitle,
|
|
139
|
+
KbqEmptyStateTitle,
|
|
140
|
+
KbqEmptyStateActions
|
|
141
|
+
],
|
|
142
|
+
exports: [
|
|
143
|
+
KbqEmptyState,
|
|
144
|
+
KbqEmptyStateIcon,
|
|
145
|
+
KbqEmptyStateText,
|
|
146
|
+
KbqEmptyStateTitle,
|
|
147
|
+
KbqEmptyStateActions
|
|
148
|
+
]
|
|
149
|
+
}]
|
|
150
|
+
}] });
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Generated bundle index. Do not edit.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
export { KbqEmptyState, KbqEmptyStateActions, KbqEmptyStateIcon, KbqEmptyStateModule, KbqEmptyStateText, KbqEmptyStateTitle };
|
|
157
|
+
//# sourceMappingURL=koobiq-components-empty-state.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"koobiq-components-empty-state.mjs","sources":["../../../packages/components/empty-state/empty-state.component.ts","../../../packages/components/empty-state/empty-state.component.html","../../../packages/components/empty-state/empty-state.module.ts","../../../packages/components/empty-state/koobiq-components-empty-state.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n Input,\n Optional,\n ViewEncapsulation\n} from '@angular/core';\nimport { KbqIconItem } from '@koobiq/components/icon';\n\n@Directive({\n selector: '[kbq-empty-state-icon]',\n host: {\n class: 'kbq-empty-state-icon'\n }\n})\nexport class KbqEmptyStateIcon {\n constructor(@Optional() private icon: KbqIconItem) {}\n\n setErrorColor() {\n if (!this.icon) {\n return;\n }\n\n this.icon.color = 'error';\n }\n}\n\n@Directive({\n selector: '[kbq-empty-state-text]',\n host: {\n class: 'kbq-empty-state-text'\n }\n})\nexport class KbqEmptyStateText {}\n\n@Directive({\n selector: '[kbq-empty-state-title]',\n host: {\n class: 'kbq-empty-state-title'\n }\n})\nexport class KbqEmptyStateTitle {}\n\n@Directive({\n selector: '[kbq-empty-state-actions]',\n host: {\n class: 'kbq-empty-state-actions'\n }\n})\nexport class KbqEmptyStateActions {}\n\n@Component({\n selector: 'kbq-empty-state',\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.scss'],\n host: {\n class: 'kbq-empty-state',\n '[class.kbq-empty-state_big]': 'big',\n '[class.kbq-empty-state_normal]': '!big',\n '[class.kbq-empty-state_align-center]': '!alignTop',\n '[class.kbq-empty-state_align-top]': 'alignTop',\n '[class.kbq-empty-state_normal-color]': '!errorColor',\n '[class.kbq-empty-state_error-color]': 'errorColor',\n '[class.kbq-empty-state_has-icon]': '!!icon'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class KbqEmptyState implements AfterContentInit {\n @Input() errorColor: boolean = false;\n @Input() big: boolean = false;\n @Input() alignTop: boolean = false;\n\n @ContentChild(KbqEmptyStateIcon) icon: KbqEmptyStateIcon | null;\n\n ngAfterContentInit(): void {\n if (this.errorColor && this.icon) {\n this.icon.setErrorColor();\n }\n }\n}\n","<ng-content select=\"[kbq-empty-state-icon]\" />\n\n<ng-content select=\"[kbq-empty-state-title]\" />\n\n<ng-content select=\"[kbq-empty-state-text]\" />\n\n<ng-content select=\"[kbq-empty-state-actions]\" />\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport {\n KbqEmptyState,\n KbqEmptyStateActions,\n KbqEmptyStateIcon,\n KbqEmptyStateText,\n KbqEmptyStateTitle\n} from './empty-state.component';\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule\n ],\n declarations: [\n KbqEmptyState,\n KbqEmptyStateIcon,\n KbqEmptyStateText,\n KbqEmptyStateTitle,\n KbqEmptyStateTitle,\n KbqEmptyStateActions\n ],\n exports: [\n KbqEmptyState,\n KbqEmptyStateIcon,\n KbqEmptyStateText,\n KbqEmptyStateTitle,\n KbqEmptyStateActions\n ]\n})\nexport class KbqEmptyStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAgC,IAAiB,EAAA;QAAjB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAa;KAAI;IAErD,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACZ,OAAO;SACV;AAED,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;KAC7B;iIATQ,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAjB,iBAAiB,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,sBAAsB;AAChC,qBAAA;AACJ,iBAAA,CAAA;;0BAEgB,QAAQ;;MAiBZ,iBAAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAjB,iBAAiB,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,sBAAsB;AAChC,qBAAA;AACJ,iBAAA,CAAA;;MASY,kBAAkB,CAAA;iIAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAlB,kBAAkB,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,uBAAuB;AACjC,qBAAA;AACJ,iBAAA,CAAA;;MASY,oBAAoB,CAAA;iIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAApB,oBAAoB,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,yBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,yBAAyB;AACnC,qBAAA;AACJ,iBAAA,CAAA;;MAoBY,aAAa,CAAA;AAjB1B,IAAA,WAAA,GAAA;QAkBa,IAAU,CAAA,UAAA,GAAY,KAAK,CAAC;QAC5B,IAAG,CAAA,GAAA,GAAY,KAAK,CAAC;QACrB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAStC,KAAA;IALG,kBAAkB,GAAA;QACd,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,EAAE;AAC9B,YAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACJ;iIAXQ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;qHAAb,aAAa,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,KAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,2BAAA,EAAA,KAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,oCAAA,EAAA,WAAA,EAAA,iCAAA,EAAA,UAAA,EAAA,oCAAA,EAAA,aAAA,EAAA,mCAAA,EAAA,YAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAKR,iBAAiB,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5EnC,oNAOA,EAAA,MAAA,EAAA,CAAA,mtEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FDgEa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAjBzB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAGrB,IAAA,EAAA;AACF,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,6BAA6B,EAAE,KAAK;AACpC,wBAAA,gCAAgC,EAAE,MAAM;AACxC,wBAAA,sCAAsC,EAAE,WAAW;AACnD,wBAAA,mCAAmC,EAAE,UAAU;AAC/C,wBAAA,sCAAsC,EAAE,aAAa;AACrD,wBAAA,qCAAqC,EAAE,YAAY;AACnD,wBAAA,kCAAkC,EAAE,QAAQ;AAC/C,qBAAA,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,oNAAA,EAAA,MAAA,EAAA,CAAA,mtEAAA,CAAA,EAAA,CAAA;8BAG5B,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,GAAG,EAAA,CAAA;sBAAX,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBAE2B,IAAI,EAAA,CAAA;sBAApC,YAAY;uBAAC,iBAAiB,CAAA;;;MEzCtB,mBAAmB,CAAA;iIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBAfxB,aAAa;YACb,iBAAiB;YACjB,iBAAiB;YACjB,kBAAkB;YAClB,kBAAkB;AAClB,YAAA,oBAAoB,aAVpB,YAAY;YACZ,UAAU;AACV,YAAA,cAAc,aAWd,aAAa;YACb,iBAAiB;YACjB,iBAAiB;YACjB,kBAAkB;YAClB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YApBxB,YAAY;YACZ,UAAU;YACV,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAkBT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAtB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;AACjB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,aAAa;wBACb,iBAAiB;wBACjB,iBAAiB;wBACjB,kBAAkB;wBAClB,kBAAkB;wBAClB,oBAAoB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,aAAa;wBACb,iBAAiB;wBACjB,iBAAiB;wBACjB,kBAAkB;wBAClB,oBAAoB;AACvB,qBAAA;AACJ,iBAAA,CAAA;;;AClCD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EventEmitter, Directive, Output, InjectionToken, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Self, Input, ContentChild, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
@@ -13,33 +13,16 @@ import * as i6 from '@koobiq/components/form-field';
|
|
|
13
13
|
import { KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
14
14
|
import * as i4 from '@koobiq/components/icon';
|
|
15
15
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
16
|
+
import * as i8 from '@koobiq/components/link';
|
|
17
|
+
import { KbqLinkModule } from '@koobiq/components/link';
|
|
16
18
|
import * as i5 from '@koobiq/components/list';
|
|
17
19
|
import { KbqListModule } from '@koobiq/components/list';
|
|
18
20
|
import * as i3 from '@koobiq/components/progress-spinner';
|
|
19
21
|
import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
|
|
20
22
|
import { KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
21
|
-
import * as i8 from '@koobiq/components/link';
|
|
22
|
-
import { KbqLinkModule } from '@koobiq/components/link';
|
|
23
23
|
import { Subscription, BehaviorSubject } from 'rxjs';
|
|
24
24
|
import { distinctUntilChanged } from 'rxjs/operators';
|
|
25
25
|
|
|
26
|
-
/* Object for labels customization inside file upload component */
|
|
27
|
-
const KBQ_FILE_UPLOAD_CONFIGURATION = new InjectionToken('KbqFileUploadConfiguration');
|
|
28
|
-
const isCorrectExtension = (file, accept) => {
|
|
29
|
-
if (!accept?.length) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
const { name, type } = file;
|
|
33
|
-
const fileExt = name.split('.').pop() || '';
|
|
34
|
-
for (const acceptedExtensionOrMimeType of accept) {
|
|
35
|
-
const typeAsRegExp = new RegExp(acceptedExtensionOrMimeType);
|
|
36
|
-
if (typeAsRegExp.test(fileExt) || typeAsRegExp.test(type)) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
26
|
const isFolderCanBeDragged = () => 'webkitGetAsEntry' in DataTransferItem.prototype;
|
|
44
27
|
const entryIsDirectory = (entry) => !!entry && entry.isDirectory;
|
|
45
28
|
const entryIsFile = (entry) => !!entry && entry.isFile;
|
|
@@ -66,6 +49,7 @@ class KbqFileDropDirective {
|
|
|
66
49
|
this.dragover = false;
|
|
67
50
|
if (event.dataTransfer && event.dataTransfer.items.length > 0) {
|
|
68
51
|
// event.dataTransfer.items requires dom.iterable lib
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
69
53
|
// @ts-ignore
|
|
70
54
|
const fileEntries = [...event.dataTransfer.items]
|
|
71
55
|
.filter((item) => item.kind === 'file')
|
|
@@ -118,6 +102,23 @@ const unwrapDirectory = async (item) => {
|
|
|
118
102
|
return Promise.all(result);
|
|
119
103
|
};
|
|
120
104
|
|
|
105
|
+
/* Object for labels customization inside file upload component */
|
|
106
|
+
const KBQ_FILE_UPLOAD_CONFIGURATION = new InjectionToken('KbqFileUploadConfiguration');
|
|
107
|
+
const isCorrectExtension = (file, accept) => {
|
|
108
|
+
if (!accept?.length) {
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
const { name, type } = file;
|
|
112
|
+
const fileExt = name.split('.').pop() || '';
|
|
113
|
+
for (const acceptedExtensionOrMimeType of accept) {
|
|
114
|
+
const typeAsRegExp = new RegExp(acceptedExtensionOrMimeType);
|
|
115
|
+
if (typeAsRegExp.test(fileExt) || typeAsRegExp.test(type)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
};
|
|
121
|
+
|
|
121
122
|
let nextMultipleFileUploadUniqueId = 0;
|
|
122
123
|
const KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = ruRULocaleData.fileUpload.multiple;
|
|
123
124
|
class KbqMultipleFileUploadComponent {
|
|
@@ -154,10 +155,8 @@ class KbqMultipleFileUploadComponent {
|
|
|
154
155
|
this.hasFocus = false;
|
|
155
156
|
this.statusChangeSubscription = Subscription.EMPTY;
|
|
156
157
|
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
|
|
157
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
158
158
|
this.cvaOnChange = (_) => { };
|
|
159
159
|
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
|
|
160
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
161
160
|
this.onTouched = () => { };
|
|
162
161
|
this.updateLocaleParams = () => {
|
|
163
162
|
this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;
|
|
@@ -169,8 +168,7 @@ class KbqMultipleFileUploadComponent {
|
|
|
169
168
|
this.getCaptionText();
|
|
170
169
|
this.cdr.markForCheck();
|
|
171
170
|
};
|
|
172
|
-
this.localeService?.changes
|
|
173
|
-
.subscribe(this.updateLocaleParams);
|
|
171
|
+
this.localeService?.changes.subscribe(this.updateLocaleParams);
|
|
174
172
|
if (!localeService) {
|
|
175
173
|
this.initDefaultParams();
|
|
176
174
|
}
|
|
@@ -202,10 +200,14 @@ class KbqMultipleFileUploadComponent {
|
|
|
202
200
|
}
|
|
203
201
|
/** Implemented as part of ControlValueAccessor.
|
|
204
202
|
* @docs-private */
|
|
205
|
-
registerOnChange(fn) {
|
|
203
|
+
registerOnChange(fn) {
|
|
204
|
+
this.cvaOnChange = fn;
|
|
205
|
+
}
|
|
206
206
|
/** Implemented as part of ControlValueAccessor.
|
|
207
207
|
* @docs-private */
|
|
208
|
-
registerOnTouched(fn) {
|
|
208
|
+
registerOnTouched(fn) {
|
|
209
|
+
this.onTouched = fn;
|
|
210
|
+
}
|
|
209
211
|
/**
|
|
210
212
|
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
211
213
|
* @param isDisabled Whether the control should be disabled.
|
|
@@ -264,10 +266,12 @@ class KbqMultipleFileUploadComponent {
|
|
|
264
266
|
if (!this.customValidation?.length) {
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
|
-
const errorsPerFile = this.customValidation
|
|
269
|
+
const errorsPerFile = this.customValidation
|
|
270
|
+
.reduce((errors, validatorFn) => {
|
|
268
271
|
errors.push(validatorFn(file));
|
|
269
272
|
return errors;
|
|
270
|
-
}, [])
|
|
273
|
+
}, [])
|
|
274
|
+
.filter(Boolean);
|
|
271
275
|
this.errors = [
|
|
272
276
|
...this.errors,
|
|
273
277
|
...errorsPerFile
|
|
@@ -286,17 +290,16 @@ class KbqMultipleFileUploadComponent {
|
|
|
286
290
|
getCaptionText() {
|
|
287
291
|
this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');
|
|
288
292
|
this.separatedCaptionTextWhenSelected = this.config.captionTextWhenSelected.split('{{ browseLink }}');
|
|
289
|
-
this.separatedCaptionTextForCompactSize = this.config.captionTextForCompactSize
|
|
290
|
-
.split('{{ browseLink }}');
|
|
293
|
+
this.separatedCaptionTextForCompactSize = this.config.captionTextForCompactSize.split('{{ browseLink }}');
|
|
291
294
|
}
|
|
292
295
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqMultipleFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqMultipleFileUploadComponent, selector: "kbq-multiple-file-upload,kbq-file-upload[multiple]", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", size: "size", inputId: "inputId", customValidation: "customValidation", files: "files" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "kbq-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["kbqFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i5.KbqListSelection, selector: "kbq-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i5.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i8.KbqLink, selector: "[kbq-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.KbqDataSizePipe, name: "kbqDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
296
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqMultipleFileUploadComponent, selector: "kbq-multiple-file-upload,kbq-file-upload[multiple]", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", size: "size", inputId: "inputId", customValidation: "customValidation", files: "files" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "kbq-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["kbqFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div\n kbqFileDrop\n class=\"kbq-file-upload\"\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default'; else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <!-- prettier-ignore -->\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\" /></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\" />\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint\n *ngFor=\"let error of errors\"\n class=\"kbq-file-upload__hint kbq-error\"\n >\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div\n *ngFor=\"let column of columnDefs\"\n [class]=\"'kbq-file-upload__' + column.cssClass\"\n >\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection\n [autoSelect]=\"false\"\n [disabled]=\"disabled\"\n >\n <kbq-list-option\n *ngFor=\"let file of files; let index = index\"\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.backspace)=\"deleteFile(index)\"\n (keydown.delete)=\"deleteFile(index)\"\n >\n <div\n class=\"kbq-file-upload__row\"\n [class.error]=\"file.hasError\"\n >\n <div class=\"kbq-file-upload__file\">\n <ng-container\n *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\"\n >\n <ng-container\n *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\"\n />\n\n <kbq-progress-spinner\n *ngIf=\"asyncData.loading\"\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n />\n </ng-container>\n\n <span\n class=\"file-item__text\"\n [kbqEllipsisCenter]=\"file.file.name\"\n [minVisibleLength]=\"10\"\n ></span>\n </div>\n <div class=\"kbq-file-upload__size\">{{ file.file.size | kbqDataSize }}</div>\n <div class=\"kbq-file-upload__action\">\n <i\n kbq-icon-button=\"mc-close-circle_16\"\n (click)=\"deleteFile(index, $event)\"\n ></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}\n <label\n kbq-link\n pseudo\n [disabled]=\"disabled\"\n [for]=\"inputId\"\n [tabIndex]=\"-1\"\n >\n {{ config.browseLink }}\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </label>\n {{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}\n <label\n kbq-link\n pseudo\n [disabled]=\"disabled\"\n [for]=\"inputId\"\n [tabIndex]=\"-1\"\n >\n {{ config.browseLink }}\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </label>\n {{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input\n #input\n multiple\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n (change)=\"onFileSelectedViaClick($event)\"\n />\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i5.KbqListSelection, selector: "kbq-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i5.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i8.KbqLink, selector: "[kbq-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.KbqDataSizePipe, name: "kbqDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
294
297
|
}
|
|
295
298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqMultipleFileUploadComponent, decorators: [{
|
|
296
299
|
type: Component,
|
|
297
300
|
args: [{ selector: 'kbq-multiple-file-upload,kbq-file-upload[multiple]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
298
301
|
class: 'kbq-multiple-file-upload'
|
|
299
|
-
}, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
|
|
302
|
+
}, template: "<div\n kbqFileDrop\n class=\"kbq-file-upload\"\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default'; else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <!-- prettier-ignore -->\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\" /></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\" />\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint\n *ngFor=\"let error of errors\"\n class=\"kbq-file-upload__hint kbq-error\"\n >\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div\n *ngFor=\"let column of columnDefs\"\n [class]=\"'kbq-file-upload__' + column.cssClass\"\n >\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection\n [autoSelect]=\"false\"\n [disabled]=\"disabled\"\n >\n <kbq-list-option\n *ngFor=\"let file of files; let index = index\"\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.backspace)=\"deleteFile(index)\"\n (keydown.delete)=\"deleteFile(index)\"\n >\n <div\n class=\"kbq-file-upload__row\"\n [class.error]=\"file.hasError\"\n >\n <div class=\"kbq-file-upload__file\">\n <ng-container\n *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\"\n >\n <ng-container\n *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\"\n />\n\n <kbq-progress-spinner\n *ngIf=\"asyncData.loading\"\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n />\n </ng-container>\n\n <span\n class=\"file-item__text\"\n [kbqEllipsisCenter]=\"file.file.name\"\n [minVisibleLength]=\"10\"\n ></span>\n </div>\n <div class=\"kbq-file-upload__size\">{{ file.file.size | kbqDataSize }}</div>\n <div class=\"kbq-file-upload__action\">\n <i\n kbq-icon-button=\"mc-close-circle_16\"\n (click)=\"deleteFile(index, $event)\"\n ></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}\n <label\n kbq-link\n pseudo\n [disabled]=\"disabled\"\n [for]=\"inputId\"\n [tabIndex]=\"-1\"\n >\n {{ config.browseLink }}\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </label>\n {{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}\n <label\n kbq-link\n pseudo\n [disabled]=\"disabled\"\n [for]=\"inputId\"\n [tabIndex]=\"-1\"\n >\n {{ config.browseLink }}\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </label>\n {{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input\n #input\n multiple\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n (change)=\"onFileSelectedViaClick($event)\"\n />\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
|
|
300
303
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
301
304
|
type: Optional
|
|
302
305
|
}, {
|
|
@@ -369,18 +372,15 @@ class KbqSingleFileUploadComponent {
|
|
|
369
372
|
this.fileQueueChange = new EventEmitter();
|
|
370
373
|
this.statusChangeSubscription = Subscription.EMPTY;
|
|
371
374
|
/** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
|
|
372
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
373
375
|
this.cvaOnChange = (_) => { };
|
|
374
376
|
/** onTouch function registered via registerOnTouch (ControlValueAccessor). */
|
|
375
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
376
377
|
this.onTouched = () => { };
|
|
377
378
|
this.updateLocaleParams = () => {
|
|
378
379
|
this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;
|
|
379
380
|
this.getCaptionText();
|
|
380
381
|
this.cdr.markForCheck();
|
|
381
382
|
};
|
|
382
|
-
this.localeService?.changes
|
|
383
|
-
.subscribe(this.updateLocaleParams);
|
|
383
|
+
this.localeService?.changes.subscribe(this.updateLocaleParams);
|
|
384
384
|
if (!localeService) {
|
|
385
385
|
this.initDefaultParams();
|
|
386
386
|
}
|
|
@@ -392,7 +392,8 @@ class KbqSingleFileUploadComponent {
|
|
|
392
392
|
}
|
|
393
393
|
ngAfterViewInit() {
|
|
394
394
|
// FormControl specific errors update
|
|
395
|
-
this.statusChangeSubscription = this.ngControl?.statusChanges
|
|
395
|
+
this.statusChangeSubscription = this.ngControl?.statusChanges
|
|
396
|
+
?.pipe(distinctUntilChanged())
|
|
396
397
|
.subscribe((status) => {
|
|
397
398
|
if (this._file) {
|
|
398
399
|
this._file.hasError = status === 'INVALID';
|
|
@@ -416,10 +417,14 @@ class KbqSingleFileUploadComponent {
|
|
|
416
417
|
}
|
|
417
418
|
/** Implemented as part of ControlValueAccessor.
|
|
418
419
|
* @docs-private */
|
|
419
|
-
registerOnChange(fn) {
|
|
420
|
+
registerOnChange(fn) {
|
|
421
|
+
this.cvaOnChange = fn;
|
|
422
|
+
}
|
|
420
423
|
/** Implemented as part of ControlValueAccessor.
|
|
421
424
|
* @docs-private */
|
|
422
|
-
registerOnTouched(fn) {
|
|
425
|
+
registerOnTouched(fn) {
|
|
426
|
+
this.onTouched = fn;
|
|
427
|
+
}
|
|
423
428
|
/**
|
|
424
429
|
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
425
430
|
* @param isDisabled Whether the control should be disabled.
|
|
@@ -491,13 +496,13 @@ class KbqSingleFileUploadComponent {
|
|
|
491
496
|
this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');
|
|
492
497
|
}
|
|
493
498
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSingleFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
494
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqSingleFileUploadComponent, selector: "kbq-single-file-upload,kbq-file-upload:not([multiple])", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", inputId: "inputId", customValidation: "customValidation", file: "file" }, outputs: { fileQueueChange: "fileQueueChange" }, host: { classAttribute: "kbq-single-file-upload" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div
|
|
499
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqSingleFileUploadComponent, selector: "kbq-single-file-upload,kbq-file-upload:not([multiple])", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", inputId: "inputId", customValidation: "customValidation", file: "file" }, outputs: { fileQueueChange: "fileQueueChange" }, host: { classAttribute: "kbq-single-file-upload" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div\n kbqFileDrop\n class=\"kbq-file-upload\"\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <div\n *ngIf=\"!file; else fileOutput\"\n class=\"dropzone\"\n >\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <!-- prettier-ignore -->\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\" />\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint\n *ngFor=\"let error of errors\"\n class=\"kbq-file-upload__hint kbq-error\"\n >\n {{ error }}\n </kbq-hint>\n</ng-container>\n\n<ng-template #fileOutput>\n <div\n *ngIf=\"file\"\n class=\"file-item\"\n >\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\" />\n </ng-container>\n\n <kbq-progress-spinner\n *ngIf=\"asyncData.loading\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n />\n </ng-container>\n\n <div\n class=\"file-item__text\"\n [kbqEllipsisCenter]=\"file.file.name\"\n [minVisibleLength]=\"10\"\n ></div>\n </div>\n <i\n kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (click)=\"deleteItem($event)\"\n (keydown.backspace)=\"deleteItem()\"\n (keydown.delete)=\"deleteItem()\"\n ></i>\n </div>\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i8.KbqLink, selector: "[kbq-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
495
500
|
}
|
|
496
501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSingleFileUploadComponent, decorators: [{
|
|
497
502
|
type: Component,
|
|
498
503
|
args: [{ selector: 'kbq-single-file-upload,kbq-file-upload:not([multiple])', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
499
504
|
class: 'kbq-single-file-upload'
|
|
500
|
-
}, template: "<div
|
|
505
|
+
}, template: "<div\n kbqFileDrop\n class=\"kbq-file-upload\"\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <div\n *ngIf=\"!file; else fileOutput\"\n class=\"dropzone\"\n >\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <!-- prettier-ignore -->\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\" />\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint\n *ngFor=\"let error of errors\"\n class=\"kbq-file-upload__hint kbq-error\"\n >\n {{ error }}\n </kbq-hint>\n</ng-container>\n\n<ng-template #fileOutput>\n <div\n *ngIf=\"file\"\n class=\"file-item\"\n >\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\" />\n </ng-container>\n\n <kbq-progress-spinner\n *ngIf=\"asyncData.loading\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n />\n </ng-container>\n\n <div\n class=\"file-item__text\"\n [kbqEllipsisCenter]=\"file.file.name\"\n [minVisibleLength]=\"10\"\n ></div>\n </div>\n <i\n kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (click)=\"deleteItem($event)\"\n (keydown.backspace)=\"deleteItem()\"\n (keydown.delete)=\"deleteItem()\"\n ></i>\n </div>\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
|
|
501
506
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
502
507
|
type: Optional
|
|
503
508
|
}, {
|