@koobiq/components 16.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -0
- package/_index.scss +3 -0
- package/alert/README.md +0 -0
- package/alert/_alert-theme.scss +61 -0
- package/alert/alert.component.d.ts +22 -0
- package/alert/alert.component.scss +81 -0
- package/alert/alert.module.d.ts +10 -0
- package/alert/index.d.ts +1 -0
- package/alert/public-api.d.ts +2 -0
- package/autocomplete/README.md +0 -0
- package/autocomplete/_autocomplete-theme.scss +21 -0
- package/autocomplete/autocomplete-origin.directive.d.ts +12 -0
- package/autocomplete/autocomplete-trigger.directive.d.ts +167 -0
- package/autocomplete/autocomplete.component.d.ts +73 -0
- package/autocomplete/autocomplete.module.d.ts +12 -0
- package/autocomplete/autocomplete.scss +63 -0
- package/autocomplete/index.d.ts +1 -0
- package/autocomplete/public-api.d.ts +4 -0
- package/button/README.md +0 -0
- package/button/_button-base.scss +69 -0
- package/button/_button-theme.scss +180 -0
- package/button/button.component.d.ts +58 -0
- package/button/button.module.d.ts +11 -0
- package/button/button.scss +59 -0
- package/button/index.d.ts +1 -0
- package/button/public-api.d.ts +2 -0
- package/button-toggle/README.md +0 -0
- package/button-toggle/_button-toggle-theme.scss +92 -0
- package/button-toggle/button-toggle.component.d.ts +145 -0
- package/button-toggle/button-toggle.module.d.ts +10 -0
- package/button-toggle/button-toggle.scss +163 -0
- package/button-toggle/index.d.ts +1 -0
- package/button-toggle/public-api.d.ts +2 -0
- package/card/README.md +0 -0
- package/card/_card-theme.scss +61 -0
- package/card/card.component.d.ts +28 -0
- package/card/card.component.scss +40 -0
- package/card/card.module.d.ts +10 -0
- package/card/index.d.ts +1 -0
- package/card/public-api.d.ts +2 -0
- package/checkbox/README.md +1 -0
- package/checkbox/_checkbox-theme.scss +120 -0
- package/checkbox/checkbox-config.d.ts +13 -0
- package/checkbox/checkbox-module.d.ts +9 -0
- package/checkbox/checkbox-required-validator.d.ts +13 -0
- package/checkbox/checkbox.d.ts +133 -0
- package/checkbox/checkbox.scss +177 -0
- package/checkbox/index.d.ts +1 -0
- package/checkbox/public-api.d.ts +4 -0
- package/code-block/README.md +32 -0
- package/code-block/_code-block-theme.scss +326 -0
- package/code-block/actionbar.component.d.ts +22 -0
- package/code-block/actionbar.component.scss +27 -0
- package/code-block/code-block.component.d.ts +74 -0
- package/code-block/code-block.module.d.ts +14 -0
- package/code-block/code-block.scss +128 -0
- package/code-block/code-block.types.d.ts +16 -0
- package/code-block/index.d.ts +1 -0
- package/code-block/public-api.d.ts +3 -0
- package/core/_index.scss +1 -0
- package/core/animation/animation.d.ts +6 -0
- package/core/animation/fade-animations.d.ts +2 -0
- package/core/animation/index.d.ts +3 -0
- package/core/animation/select-animations.d.ts +12 -0
- package/core/common-behaviors/color.d.ts +33 -0
- package/core/common-behaviors/common-module.d.ts +25 -0
- package/core/common-behaviors/constructor.d.ts +9 -0
- package/core/common-behaviors/disabled.d.ts +8 -0
- package/core/common-behaviors/error-state.d.ts +28 -0
- package/core/common-behaviors/index.d.ts +5 -0
- package/core/common-behaviors/tabindex.d.ts +8 -0
- package/core/datetime/date-adapter.d.ts +12 -0
- package/core/datetime/date-formats.d.ts +4 -0
- package/core/datetime/index.d.ts +2 -0
- package/core/error/error-options.d.ts +14 -0
- package/core/form-field/form-field-ref.d.ts +11 -0
- package/core/form-field/index.d.ts +1 -0
- package/core/formatters/date/formatter.d.ts +9 -0
- package/core/formatters/date/formatter.pipe.d.ts +109 -0
- package/core/formatters/index.d.ts +11 -0
- package/core/formatters/number/formatter.d.ts +37 -0
- package/core/forms/_forms-theme.scss +34 -0
- package/core/forms/_forms.scss +114 -0
- package/core/forms/forms-module.d.ts +7 -0
- package/core/forms/forms.directive.d.ts +22 -0
- package/core/forms/index.d.ts +2 -0
- package/core/highlight/_highlight-theme.scss +8 -0
- package/core/highlight/highlight.pipe.d.ts +8 -0
- package/core/highlight/index.d.ts +9 -0
- package/core/index.d.ts +1 -0
- package/core/label/label-options.d.ts +13 -0
- package/core/line/line.d.ts +28 -0
- package/core/locales/en-US.d.ts +11 -0
- package/core/locales/es-LA.d.ts +7 -0
- package/core/locales/fa-IR.d.ts +7 -0
- package/core/locales/index.d.ts +4 -0
- package/core/locales/locale-service.d.ts +63 -0
- package/core/locales/locale-service.module.d.ts +6 -0
- package/core/locales/pt-BR.d.ts +7 -0
- package/core/locales/ru-RU.d.ts +11 -0
- package/core/locales/zh-CN.d.ts +7 -0
- package/core/option/_optgroup-theme.scss +25 -0
- package/core/option/_option-action-theme.scss +41 -0
- package/core/option/_option-theme.scss +44 -0
- package/core/option/action.d.ts +44 -0
- package/core/option/action.scss +28 -0
- package/core/option/index.d.ts +4 -0
- package/core/option/optgroup.d.ts +16 -0
- package/core/option/optgroup.scss +16 -0
- package/core/option/option-module.d.ts +11 -0
- package/core/option/option.d.ts +116 -0
- package/core/option/option.scss +62 -0
- package/core/overlay/overlay-position-map.d.ts +34 -0
- package/core/pop-up/_pop-up.scss +129 -0
- package/core/pop-up/constants.d.ts +30 -0
- package/core/pop-up/index.d.ts +3 -0
- package/core/pop-up/pop-up-trigger.d.ts +71 -0
- package/core/pop-up/pop-up.d.ts +36 -0
- package/core/public-api.d.ts +21 -0
- package/core/select/constants.d.ts +23 -0
- package/core/select/errors.d.ts +19 -0
- package/core/select/events.d.ts +1 -0
- package/core/select/index.d.ts +3 -0
- package/core/selection/constants.d.ts +4 -0
- package/core/selection/index.d.ts +3 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +48 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +32 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +8 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +77 -0
- package/core/services/measure-scrollbar.service.d.ts +11 -0
- package/core/styles/_core.scss +11 -0
- package/core/styles/_koobiq-theme.scss +153 -0
- package/core/styles/_tokens.kbq.import.scss +4 -0
- package/core/styles/_tokens.scss +6 -0
- package/core/styles/_variables.scss +9 -0
- package/core/styles/common/_animation.scss +35 -0
- package/core/styles/common/_button.scss +10 -0
- package/core/styles/common/_clearfix.scss +13 -0
- package/core/styles/common/_groups.scss +119 -0
- package/core/styles/common/_index.scss +13 -0
- package/core/styles/common/_input.scss +28 -0
- package/core/styles/common/_layout.scss +8 -0
- package/core/styles/common/_list.scss +46 -0
- package/core/styles/common/_overlay.scss +173 -0
- package/core/styles/common/_popup.scss +11 -0
- package/core/styles/common/_rtl.scss +33 -0
- package/core/styles/common/_size.scss +8 -0
- package/core/styles/common/_vendor-prefixes.scss +24 -0
- package/core/styles/common/_visually-hidden.scss +36 -0
- package/core/styles/functions/_index.scss +3 -0
- package/core/styles/functions/_number.scss +65 -0
- package/core/styles/functions/_string.scss +19 -0
- package/core/styles/functions/_timing.scss +30 -0
- package/core/styles/theming/_badges-theme.scss +118 -0
- package/core/styles/theming/_badges.scss +57 -0
- package/core/styles/theming/_components-theming.scss +1218 -0
- package/core/styles/theming/_index.scss +2 -0
- package/core/styles/theming/_scrollbars-theme.scss +77 -0
- package/core/styles/theming/_theming.scss +144 -0
- package/core/styles/theming/prebuilt/light-theme.scss +20 -0
- package/core/styles/typography/_index.scss +2 -0
- package/core/styles/typography/_typography-utils.scss +78 -0
- package/core/styles/typography/_typography.scss +191 -0
- package/core/styles/visual/_body.scss +35 -0
- package/core/styles/visual/_index.scss +3 -0
- package/core/styles/visual/_layout-media.scss +7 -0
- package/core/styles/visual/_layout.scss +527 -0
- package/core/title/index.d.ts +1 -0
- package/core/title/title-text-ref.d.ts +6 -0
- package/core/utils/data-size/config.d.ts +20 -0
- package/core/utils/data-size/data-size.pipe.d.ts +13 -0
- package/core/utils/data-size/index.d.ts +3 -0
- package/core/utils/data-size/size.d.ts +16 -0
- package/core/utils/index.d.ts +1 -0
- package/core/utils/public-api.d.ts +2 -0
- package/core/utils/utils.d.ts +2 -0
- package/core/validation/index.d.ts +1 -0
- package/core/validation/validation.d.ts +7 -0
- package/core/version.d.ts +2 -0
- package/datepicker/README.md +0 -0
- package/datepicker/_datepicker-theme.scss +101 -0
- package/datepicker/calendar-body.component.d.ts +55 -0
- package/datepicker/calendar-body.scss +61 -0
- package/datepicker/calendar-header.component.d.ts +45 -0
- package/datepicker/calendar-header.scss +75 -0
- package/datepicker/calendar.component.d.ts +81 -0
- package/datepicker/calendar.scss +68 -0
- package/datepicker/datepicker-animations.d.ts +9 -0
- package/datepicker/datepicker-content.scss +33 -0
- package/datepicker/datepicker-errors.d.ts +2 -0
- package/datepicker/datepicker-input.directive.d.ts +180 -0
- package/datepicker/datepicker-input.scss +15 -0
- package/datepicker/datepicker-intl.d.ts +32 -0
- package/datepicker/datepicker-module.d.ts +20 -0
- package/datepicker/datepicker-toggle.component.d.ts +35 -0
- package/datepicker/datepicker-toggle.scss +41 -0
- package/datepicker/datepicker.component.d.ts +148 -0
- package/datepicker/index.d.ts +1 -0
- package/datepicker/month-view.component.d.ts +74 -0
- package/datepicker/public-api.d.ts +10 -0
- package/divider/README.md +0 -0
- package/divider/_divider-theme.scss +10 -0
- package/divider/divider.component.d.ts +14 -0
- package/divider/divider.module.d.ts +8 -0
- package/divider/divider.scss +47 -0
- package/divider/index.d.ts +1 -0
- package/divider/public-api.d.ts +2 -0
- package/dl/README.md +0 -0
- package/dl/_dl-theme.scss +86 -0
- package/dl/dl.component.d.ts +27 -0
- package/dl/dl.module.d.ts +10 -0
- package/dl/dl.scss +99 -0
- package/dl/index.d.ts +1 -0
- package/dl/public-api.d.ts +2 -0
- package/dropdown/_dropdown-theme.scss +85 -0
- package/dropdown/dropdown-animations.d.ts +11 -0
- package/dropdown/dropdown-content.directive.d.ts +32 -0
- package/dropdown/dropdown-errors.d.ts +17 -0
- package/dropdown/dropdown-item.component.d.ts +52 -0
- package/dropdown/dropdown-item.scss +82 -0
- package/dropdown/dropdown-trigger.directive.d.ts +136 -0
- package/dropdown/dropdown.component.d.ts +121 -0
- package/dropdown/dropdown.module.d.ts +13 -0
- package/dropdown/dropdown.scss +79 -0
- package/dropdown/dropdown.types.d.ts +53 -0
- package/dropdown/index.d.ts +1 -0
- package/dropdown/public-api.d.ts +8 -0
- package/ellipsis-center/ellipsis-center.directive.d.ts +27 -0
- package/ellipsis-center/index.d.ts +1 -0
- package/ellipsis-center/public-api.d.ts +1 -0
- package/esm2022/alert/alert.component.mjs +67 -0
- package/esm2022/alert/alert.module.mjs +44 -0
- package/esm2022/alert/index.mjs +2 -0
- package/esm2022/alert/koobiq-components-alert.mjs +5 -0
- package/esm2022/alert/public-api.mjs +3 -0
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +21 -0
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +552 -0
- package/esm2022/autocomplete/autocomplete.component.mjs +153 -0
- package/esm2022/autocomplete/autocomplete.module.mjs +34 -0
- package/esm2022/autocomplete/index.mjs +2 -0
- package/esm2022/autocomplete/koobiq-components-autocomplete.mjs +5 -0
- package/esm2022/autocomplete/public-api.mjs +5 -0
- package/esm2022/button/button.component.mjs +164 -0
- package/esm2022/button/button.module.mjs +40 -0
- package/esm2022/button/index.mjs +2 -0
- package/esm2022/button/koobiq-components-button.mjs +5 -0
- package/esm2022/button/public-api.mjs +3 -0
- package/esm2022/button-toggle/button-toggle.component.mjs +381 -0
- package/esm2022/button-toggle/button-toggle.module.mjs +20 -0
- package/esm2022/button-toggle/index.mjs +2 -0
- package/esm2022/button-toggle/koobiq-components-button-toggle.mjs +5 -0
- package/esm2022/button-toggle/public-api.mjs +3 -0
- package/esm2022/card/card.component.mjs +80 -0
- package/esm2022/card/card.module.mjs +28 -0
- package/esm2022/card/index.mjs +2 -0
- package/esm2022/card/koobiq-components-card.mjs +5 -0
- package/esm2022/card/public-api.mjs +3 -0
- package/esm2022/checkbox/checkbox-config.mjs +6 -0
- package/esm2022/checkbox/checkbox-module.mjs +19 -0
- package/esm2022/checkbox/checkbox-required-validator.mjs +27 -0
- package/esm2022/checkbox/checkbox.mjs +304 -0
- package/esm2022/checkbox/index.mjs +2 -0
- package/esm2022/checkbox/koobiq-components-checkbox.mjs +5 -0
- package/esm2022/checkbox/public-api.mjs +5 -0
- package/esm2022/code-block/actionbar.component.mjs +67 -0
- package/esm2022/code-block/code-block.component.mjs +157 -0
- package/esm2022/code-block/code-block.module.mjs +60 -0
- package/esm2022/code-block/code-block.types.mjs +2 -0
- package/esm2022/code-block/index.mjs +2 -0
- package/esm2022/code-block/koobiq-components-code-block.mjs +5 -0
- package/esm2022/code-block/public-api.mjs +4 -0
- package/esm2022/core/animation/animation.mjs +8 -0
- package/esm2022/core/animation/fade-animations.mjs +9 -0
- package/esm2022/core/animation/index.mjs +4 -0
- package/esm2022/core/animation/select-animations.mjs +45 -0
- package/esm2022/core/common-behaviors/color.mjs +45 -0
- package/esm2022/core/common-behaviors/common-module.mjs +83 -0
- package/esm2022/core/common-behaviors/constructor.mjs +2 -0
- package/esm2022/core/common-behaviors/disabled.mjs +17 -0
- package/esm2022/core/common-behaviors/error-state.mjs +21 -0
- package/esm2022/core/common-behaviors/index.mjs +6 -0
- package/esm2022/core/common-behaviors/tabindex.mjs +18 -0
- package/esm2022/core/datetime/date-adapter.mjs +15 -0
- package/esm2022/core/datetime/date-formats.mjs +3 -0
- package/esm2022/core/datetime/index.mjs +3 -0
- package/esm2022/core/error/error-options.mjs +26 -0
- package/esm2022/core/form-field/form-field-ref.mjs +8 -0
- package/esm2022/core/form-field/index.mjs +2 -0
- package/esm2022/core/formatters/date/formatter.mjs +21 -0
- package/esm2022/core/formatters/date/formatter.pipe.mjs +220 -0
- package/esm2022/core/formatters/index.mjs +78 -0
- package/esm2022/core/formatters/number/formatter.mjs +129 -0
- package/esm2022/core/forms/forms-module.mjs +24 -0
- package/esm2022/core/forms/forms.directive.mjs +66 -0
- package/esm2022/core/forms/index.mjs +3 -0
- package/esm2022/core/highlight/highlight.pipe.mjs +23 -0
- package/esm2022/core/highlight/index.mjs +19 -0
- package/esm2022/core/index.mjs +2 -0
- package/esm2022/core/koobiq-components-core.mjs +5 -0
- package/esm2022/core/label/label-options.mjs +4 -0
- package/esm2022/core/line/line.mjs +70 -0
- package/esm2022/core/locales/en-US.mjs +10 -0
- package/esm2022/core/locales/es-LA.mjs +6 -0
- package/esm2022/core/locales/fa-IR.mjs +6 -0
- package/esm2022/core/locales/index.mjs +5 -0
- package/esm2022/core/locales/locale-service.mjs +70 -0
- package/esm2022/core/locales/locale-service.module.mjs +19 -0
- package/esm2022/core/locales/pt-BR.mjs +6 -0
- package/esm2022/core/locales/ru-RU.mjs +10 -0
- package/esm2022/core/locales/zh-CN.mjs +6 -0
- package/esm2022/core/option/action.mjs +122 -0
- package/esm2022/core/option/index.mjs +5 -0
- package/esm2022/core/option/optgroup.mjs +31 -0
- package/esm2022/core/option/option-module.mjs +21 -0
- package/esm2022/core/option/option.mjs +262 -0
- package/esm2022/core/overlay/overlay-position-map.mjs +244 -0
- package/esm2022/core/pop-up/constants.mjs +36 -0
- package/esm2022/core/pop-up/index.mjs +4 -0
- package/esm2022/core/pop-up/pop-up-trigger.mjs +247 -0
- package/esm2022/core/pop-up/pop-up.mjs +94 -0
- package/esm2022/core/public-api.mjs +22 -0
- package/esm2022/core/select/constants.mjs +27 -0
- package/esm2022/core/select/errors.mjs +26 -0
- package/esm2022/core/select/events.mjs +2 -0
- package/esm2022/core/select/index.mjs +4 -0
- package/esm2022/core/selection/constants.mjs +6 -0
- package/esm2022/core/selection/index.mjs +4 -0
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +52 -0
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +18 -0
- package/esm2022/core/services/measure-scrollbar.service.mjs +48 -0
- package/esm2022/core/title/index.mjs +2 -0
- package/esm2022/core/title/title-text-ref.mjs +3 -0
- package/esm2022/core/utils/data-size/config.mjs +22 -0
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +32 -0
- package/esm2022/core/utils/data-size/index.mjs +4 -0
- package/esm2022/core/utils/data-size/size.mjs +50 -0
- package/esm2022/core/utils/index.mjs +2 -0
- package/esm2022/core/utils/public-api.mjs +3 -0
- package/esm2022/core/utils/utils.mjs +5 -0
- package/esm2022/core/validation/index.mjs +2 -0
- package/esm2022/core/validation/validation.mjs +5 -0
- package/esm2022/core/version.mjs +3 -0
- package/esm2022/datepicker/calendar-body.component.mjs +87 -0
- package/esm2022/datepicker/calendar-header.component.mjs +134 -0
- package/esm2022/datepicker/calendar.component.mjs +175 -0
- package/esm2022/datepicker/datepicker-animations.mjs +32 -0
- package/esm2022/datepicker/datepicker-errors.mjs +6 -0
- package/esm2022/datepicker/datepicker-input.directive.mjs +954 -0
- package/esm2022/datepicker/datepicker-intl.mjs +40 -0
- package/esm2022/datepicker/datepicker-module.mjs +97 -0
- package/esm2022/datepicker/datepicker-toggle.component.mjs +86 -0
- package/esm2022/datepicker/datepicker.component.mjs +393 -0
- package/esm2022/datepicker/index.mjs +2 -0
- package/esm2022/datepicker/koobiq-components-datepicker.mjs +5 -0
- package/esm2022/datepicker/month-view.component.mjs +158 -0
- package/esm2022/datepicker/public-api.mjs +11 -0
- package/esm2022/divider/divider.component.mjs +49 -0
- package/esm2022/divider/divider.module.mjs +18 -0
- package/esm2022/divider/index.mjs +2 -0
- package/esm2022/divider/koobiq-components-divider.mjs +5 -0
- package/esm2022/divider/public-api.mjs +3 -0
- package/esm2022/dl/dl.component.mjs +82 -0
- package/esm2022/dl/dl.module.mjs +40 -0
- package/esm2022/dl/index.mjs +2 -0
- package/esm2022/dl/koobiq-components-dl.mjs +5 -0
- package/esm2022/dl/public-api.mjs +3 -0
- package/esm2022/dropdown/dropdown-animations.mjs +41 -0
- package/esm2022/dropdown/dropdown-content.directive.mjs +64 -0
- package/esm2022/dropdown/dropdown-errors.mjs +29 -0
- package/esm2022/dropdown/dropdown-item.component.mjs +146 -0
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +489 -0
- package/esm2022/dropdown/dropdown.component.mjs +292 -0
- package/esm2022/dropdown/dropdown.module.mjs +48 -0
- package/esm2022/dropdown/dropdown.types.mjs +24 -0
- package/esm2022/dropdown/index.mjs +2 -0
- package/esm2022/dropdown/koobiq-components-dropdown.mjs +5 -0
- package/esm2022/dropdown/public-api.mjs +9 -0
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +106 -0
- package/esm2022/ellipsis-center/index.mjs +2 -0
- package/esm2022/ellipsis-center/koobiq-components-ellipsis-center.mjs +5 -0
- package/esm2022/ellipsis-center/public-api.mjs +2 -0
- package/esm2022/file-upload/file-drop.mjs +43 -0
- package/esm2022/file-upload/file-upload.mjs +4 -0
- package/esm2022/file-upload/file-upload.module.mjs +66 -0
- package/esm2022/file-upload/index.mjs +2 -0
- package/esm2022/file-upload/koobiq-components-file-upload.mjs +5 -0
- package/esm2022/file-upload/multiple-file-upload.component.mjs +161 -0
- package/esm2022/file-upload/public-api.mjs +6 -0
- package/esm2022/file-upload/single-file-upload.component.mjs +130 -0
- package/esm2022/form-field/cleaner.mjs +14 -0
- package/esm2022/form-field/form-field-control.mjs +5 -0
- package/esm2022/form-field/form-field-errors.mjs +7 -0
- package/esm2022/form-field/form-field.mjs +276 -0
- package/esm2022/form-field/form-field.module.mjs +71 -0
- package/esm2022/form-field/hint.mjs +34 -0
- package/esm2022/form-field/index.mjs +2 -0
- package/esm2022/form-field/koobiq-components-form-field.mjs +5 -0
- package/esm2022/form-field/password-hint.mjs +144 -0
- package/esm2022/form-field/password-toggle.mjs +64 -0
- package/esm2022/form-field/prefix.mjs +13 -0
- package/esm2022/form-field/public-api.mjs +13 -0
- package/esm2022/form-field/stepper.mjs +71 -0
- package/esm2022/form-field/suffix.mjs +13 -0
- package/esm2022/form-field/validate.directive.mjs +158 -0
- package/esm2022/icon/icon.component.mjs +145 -0
- package/esm2022/icon/icon.module.mjs +40 -0
- package/esm2022/icon/index.mjs +2 -0
- package/esm2022/icon/koobiq-components-icon.mjs +5 -0
- package/esm2022/icon/public-api.mjs +3 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/input/index.mjs +2 -0
- package/esm2022/input/input-errors.mjs +4 -0
- package/esm2022/input/input-number-validators.mjs +88 -0
- package/esm2022/input/input-number.mjs +168 -0
- package/esm2022/input/input-password.mjs +233 -0
- package/esm2022/input/input-value-accessor.mjs +3 -0
- package/esm2022/input/input.mjs +297 -0
- package/esm2022/input/input.module.mjs +63 -0
- package/esm2022/input/koobiq-components-input.mjs +5 -0
- package/esm2022/input/public-api.mjs +7 -0
- package/esm2022/koobiq-components.mjs +5 -0
- package/esm2022/link/index.mjs +2 -0
- package/esm2022/link/koobiq-components-link.mjs +5 -0
- package/esm2022/link/link.component.mjs +132 -0
- package/esm2022/link/link.module.mjs +24 -0
- package/esm2022/link/public-api.mjs +3 -0
- package/esm2022/list/index.mjs +2 -0
- package/esm2022/list/koobiq-components-list.mjs +5 -0
- package/esm2022/list/list-selection.component.mjs +705 -0
- package/esm2022/list/list.component.mjs +44 -0
- package/esm2022/list/list.module.mjs +53 -0
- package/esm2022/list/public-api.mjs +4 -0
- package/esm2022/loader-overlay/index.mjs +2 -0
- package/esm2022/loader-overlay/koobiq-components-loader-overlay.mjs +5 -0
- package/esm2022/loader-overlay/loader-overlay.component.mjs +103 -0
- package/esm2022/loader-overlay/loader-overlay.module.mjs +48 -0
- package/esm2022/loader-overlay/public-api.mjs +3 -0
- package/esm2022/markdown/index.mjs +2 -0
- package/esm2022/markdown/koobiq-components-markdown.mjs +5 -0
- package/esm2022/markdown/markdown.component.mjs +53 -0
- package/esm2022/markdown/markdown.module.mjs +23 -0
- package/esm2022/markdown/markdown.service.mjs +25 -0
- package/esm2022/markdown/markdown.values.mjs +29 -0
- package/esm2022/markdown/public-api.mjs +5 -0
- package/esm2022/modal/css-unit.pipe.mjs +17 -0
- package/esm2022/modal/index.mjs +2 -0
- package/esm2022/modal/koobiq-components-modal.mjs +5 -0
- package/esm2022/modal/modal-control.service.mjs +85 -0
- package/esm2022/modal/modal-ref.class.mjs +8 -0
- package/esm2022/modal/modal-util.mjs +17 -0
- package/esm2022/modal/modal.component.mjs +509 -0
- package/esm2022/modal/modal.directive.mjs +52 -0
- package/esm2022/modal/modal.module.mjs +69 -0
- package/esm2022/modal/modal.service.mjs +124 -0
- package/esm2022/modal/modal.type.mjs +9 -0
- package/esm2022/modal/public-api.mjs +7 -0
- package/esm2022/navbar/index.mjs +2 -0
- package/esm2022/navbar/koobiq-components-navbar.mjs +5 -0
- package/esm2022/navbar/navbar-item.component.mjs +605 -0
- package/esm2022/navbar/navbar.component.mjs +239 -0
- package/esm2022/navbar/navbar.module.mjs +90 -0
- package/esm2022/navbar/public-api.mjs +5 -0
- package/esm2022/navbar/vertical-navbar.animation.mjs +10 -0
- package/esm2022/navbar/vertical-navbar.component.mjs +114 -0
- package/esm2022/popover/index.mjs +2 -0
- package/esm2022/popover/koobiq-components-popover.mjs +5 -0
- package/esm2022/popover/popover-animations.mjs +16 -0
- package/esm2022/popover/popover-confirm.component.mjs +108 -0
- package/esm2022/popover/popover.component.mjs +266 -0
- package/esm2022/popover/popover.module.mjs +29 -0
- package/esm2022/popover/public-api.mjs +5 -0
- package/esm2022/progress-bar/index.mjs +2 -0
- package/esm2022/progress-bar/koobiq-components-progress-bar.mjs +5 -0
- package/esm2022/progress-bar/progress-bar.component.mjs +70 -0
- package/esm2022/progress-bar/progress-bar.module.mjs +36 -0
- package/esm2022/progress-bar/public-api.mjs +3 -0
- package/esm2022/progress-spinner/index.mjs +2 -0
- package/esm2022/progress-spinner/koobiq-components-progress-spinner.mjs +5 -0
- package/esm2022/progress-spinner/progress-spinner.component.mjs +85 -0
- package/esm2022/progress-spinner/progress-spinner.module.mjs +36 -0
- package/esm2022/progress-spinner/public-api.mjs +3 -0
- package/esm2022/public-api.mjs +2 -0
- package/esm2022/radio/index.mjs +2 -0
- package/esm2022/radio/koobiq-components-radio.mjs +5 -0
- package/esm2022/radio/public-api.mjs +3 -0
- package/esm2022/radio/radio.component.mjs +460 -0
- package/esm2022/radio/radio.module.mjs +20 -0
- package/esm2022/select/index.mjs +2 -0
- package/esm2022/select/koobiq-components-select.mjs +5 -0
- package/esm2022/select/public-api.mjs +4 -0
- package/esm2022/select/select-option.directive.mjs +65 -0
- package/esm2022/select/select.component.mjs +1146 -0
- package/esm2022/select/select.module.mjs +79 -0
- package/esm2022/sidebar/index.mjs +2 -0
- package/esm2022/sidebar/koobiq-components-sidebar.mjs +5 -0
- package/esm2022/sidebar/public-api.mjs +3 -0
- package/esm2022/sidebar/sidebar-animations.mjs +23 -0
- package/esm2022/sidebar/sidebar.component.mjs +146 -0
- package/esm2022/sidebar/sidebar.module.mjs +30 -0
- package/esm2022/sidepanel/index.mjs +2 -0
- package/esm2022/sidepanel/koobiq-components-sidepanel.mjs +5 -0
- package/esm2022/sidepanel/public-api.mjs +7 -0
- package/esm2022/sidepanel/sidepanel-animations.mjs +26 -0
- package/esm2022/sidepanel/sidepanel-config.mjs +33 -0
- package/esm2022/sidepanel/sidepanel-container.component.mjs +110 -0
- package/esm2022/sidepanel/sidepanel-directives.mjs +167 -0
- package/esm2022/sidepanel/sidepanel-ref.mjs +53 -0
- package/esm2022/sidepanel/sidepanel.module.mjs +75 -0
- package/esm2022/sidepanel/sidepanel.service.mjs +171 -0
- package/esm2022/splitter/index.mjs +2 -0
- package/esm2022/splitter/koobiq-components-splitter.mjs +5 -0
- package/esm2022/splitter/public-api.mjs +3 -0
- package/esm2022/splitter/splitter.component.mjs +482 -0
- package/esm2022/splitter/splitter.module.mjs +38 -0
- package/esm2022/table/index.mjs +2 -0
- package/esm2022/table/koobiq-components-table.mjs +5 -0
- package/esm2022/table/public-api.mjs +3 -0
- package/esm2022/table/table.component.mjs +13 -0
- package/esm2022/table/table.module.mjs +28 -0
- package/esm2022/tabs/index.mjs +2 -0
- package/esm2022/tabs/koobiq-components-tabs.mjs +5 -0
- package/esm2022/tabs/paginated-tab-header.mjs +479 -0
- package/esm2022/tabs/public-api.mjs +11 -0
- package/esm2022/tabs/tab-body.component.mjs +179 -0
- package/esm2022/tabs/tab-content.directive.mjs +15 -0
- package/esm2022/tabs/tab-group.component.mjs +349 -0
- package/esm2022/tabs/tab-header.component.mjs +67 -0
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +78 -0
- package/esm2022/tabs/tab-label.directive.mjs +17 -0
- package/esm2022/tabs/tab-nav-bar/index.mjs +2 -0
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +111 -0
- package/esm2022/tabs/tab.component.mjs +134 -0
- package/esm2022/tabs/tabs-animations.mjs +24 -0
- package/esm2022/tabs/tabs.module.mjs +106 -0
- package/esm2022/tags/index.mjs +2 -0
- package/esm2022/tags/koobiq-components-tags.mjs +5 -0
- package/esm2022/tags/public-api.mjs +6 -0
- package/esm2022/tags/tag-default-options.mjs +4 -0
- package/esm2022/tags/tag-input.mjs +248 -0
- package/esm2022/tags/tag-list.component.mjs +714 -0
- package/esm2022/tags/tag-text-control.mjs +2 -0
- package/esm2022/tags/tag.component.mjs +381 -0
- package/esm2022/tags/tag.module.mjs +56 -0
- package/esm2022/textarea/index.mjs +2 -0
- package/esm2022/textarea/koobiq-components-textarea.mjs +5 -0
- package/esm2022/textarea/public-api.mjs +3 -0
- package/esm2022/textarea/textarea.component.mjs +254 -0
- package/esm2022/textarea/textarea.module.mjs +21 -0
- package/esm2022/timepicker/index.mjs +2 -0
- package/esm2022/timepicker/koobiq-components-timepicker.mjs +5 -0
- package/esm2022/timepicker/public-api.mjs +4 -0
- package/esm2022/timepicker/timepicker.constants.mjs +25 -0
- package/esm2022/timepicker/timepicker.directive.mjs +647 -0
- package/esm2022/timepicker/timepicker.module.mjs +32 -0
- package/esm2022/timezone/cities-by-filter.pipe.mjs +17 -0
- package/esm2022/timezone/index.mjs +2 -0
- package/esm2022/timezone/koobiq-components-timezone.mjs +5 -0
- package/esm2022/timezone/public-api.mjs +7 -0
- package/esm2022/timezone/timezone-option.component.mjs +48 -0
- package/esm2022/timezone/timezone-option.directive.mjs +60 -0
- package/esm2022/timezone/timezone-select.component.mjs +40 -0
- package/esm2022/timezone/timezone.models.mjs +3 -0
- package/esm2022/timezone/timezone.module.mjs +75 -0
- package/esm2022/timezone/timezone.utils.mjs +79 -0
- package/esm2022/timezone/utc-offset.pipe.mjs +17 -0
- package/esm2022/title/index.mjs +2 -0
- package/esm2022/title/koobiq-components-title.mjs +5 -0
- package/esm2022/title/public-api.mjs +3 -0
- package/esm2022/title/title.directive.mjs +107 -0
- package/esm2022/title/title.module.mjs +18 -0
- package/esm2022/toast/index.mjs +2 -0
- package/esm2022/toast/koobiq-components-toast.mjs +5 -0
- package/esm2022/toast/public-api.mjs +6 -0
- package/esm2022/toast/toast-animations.mjs +9 -0
- package/esm2022/toast/toast-container.component.mjs +44 -0
- package/esm2022/toast/toast.component.mjs +92 -0
- package/esm2022/toast/toast.module.mjs +42 -0
- package/esm2022/toast/toast.service.mjs +188 -0
- package/esm2022/toast/toast.type.mjs +15 -0
- package/esm2022/toggle/index.mjs +2 -0
- package/esm2022/toggle/koobiq-components-toggle.mjs +5 -0
- package/esm2022/toggle/public-api.mjs +3 -0
- package/esm2022/toggle/toggle.component.mjs +160 -0
- package/esm2022/toggle/toggle.module.mjs +20 -0
- package/esm2022/tooltip/index.mjs +2 -0
- package/esm2022/tooltip/koobiq-components-tooltip.mjs +5 -0
- package/esm2022/tooltip/public-api.mjs +3 -0
- package/esm2022/tooltip/tooltip.animations.mjs +19 -0
- package/esm2022/tooltip/tooltip.component.mjs +308 -0
- package/esm2022/tooltip/tooltip.module.mjs +42 -0
- package/esm2022/tree/control/base-tree-control.mjs +60 -0
- package/esm2022/tree/control/flat-tree-control.mjs +130 -0
- package/esm2022/tree/control/nested-tree-control.mjs +41 -0
- package/esm2022/tree/control/tree-control.mjs +2 -0
- package/esm2022/tree/data-source/flat-data-source.mjs +162 -0
- package/esm2022/tree/data-source/nested-data-source.mjs +30 -0
- package/esm2022/tree/index.mjs +2 -0
- package/esm2022/tree/koobiq-components-tree.mjs +5 -0
- package/esm2022/tree/node.mjs +31 -0
- package/esm2022/tree/outlet.mjs +15 -0
- package/esm2022/tree/padding.directive.mjs +113 -0
- package/esm2022/tree/public-api.mjs +16 -0
- package/esm2022/tree/toggle.mjs +81 -0
- package/esm2022/tree/tree-base.mjs +243 -0
- package/esm2022/tree/tree-errors.mjs +36 -0
- package/esm2022/tree/tree-option.component.mjs +299 -0
- package/esm2022/tree/tree-selection.component.mjs +557 -0
- package/esm2022/tree/tree.mjs +15 -0
- package/esm2022/tree/tree.module.mjs +57 -0
- package/esm2022/tree-select/index.mjs +2 -0
- package/esm2022/tree-select/koobiq-components-tree-select.mjs +5 -0
- package/esm2022/tree-select/public-api.mjs +3 -0
- package/esm2022/tree-select/tree-select.component.mjs +936 -0
- package/esm2022/tree-select/tree-select.module.mjs +45 -0
- package/fesm2022/koobiq-components-alert.mjs +115 -0
- package/fesm2022/koobiq-components-alert.mjs.map +1 -0
- package/fesm2022/koobiq-components-autocomplete.mjs +748 -0
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -0
- package/fesm2022/koobiq-components-button-toggle.mjs +403 -0
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -0
- package/fesm2022/koobiq-components-button.mjs +207 -0
- package/fesm2022/koobiq-components-button.mjs.map +1 -0
- package/fesm2022/koobiq-components-card.mjs +111 -0
- package/fesm2022/koobiq-components-card.mjs.map +1 -0
- package/fesm2022/koobiq-components-checkbox.mjs +353 -0
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -0
- package/fesm2022/koobiq-components-code-block.mjs +278 -0
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -0
- package/fesm2022/koobiq-components-core.mjs +2338 -0
- package/fesm2022/koobiq-components-core.mjs.map +1 -0
- package/fesm2022/koobiq-components-datepicker.mjs +2101 -0
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -0
- package/fesm2022/koobiq-components-divider.mjs +71 -0
- package/fesm2022/koobiq-components-divider.mjs.map +1 -0
- package/fesm2022/koobiq-components-dl.mjs +126 -0
- package/fesm2022/koobiq-components-dl.mjs.map +1 -0
- package/fesm2022/koobiq-components-dropdown.mjs +1102 -0
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -0
- package/fesm2022/koobiq-components-ellipsis-center.mjs +111 -0
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +388 -0
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -0
- package/fesm2022/koobiq-components-form-field.mjs +825 -0
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -0
- package/fesm2022/koobiq-components-icon.mjs +188 -0
- package/fesm2022/koobiq-components-icon.mjs.map +1 -0
- package/fesm2022/koobiq-components-input.mjs +831 -0
- package/fesm2022/koobiq-components-input.mjs.map +1 -0
- package/fesm2022/koobiq-components-link.mjs +159 -0
- package/fesm2022/koobiq-components-link.mjs.map +1 -0
- package/fesm2022/koobiq-components-list.mjs +800 -0
- package/fesm2022/koobiq-components-list.mjs.map +1 -0
- package/fesm2022/koobiq-components-loader-overlay.mjs +155 -0
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -0
- package/fesm2022/koobiq-components-markdown.mjs +127 -0
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -0
- package/fesm2022/koobiq-components-modal.mjs +868 -0
- package/fesm2022/koobiq-components-modal.mjs.map +1 -0
- package/fesm2022/koobiq-components-navbar.mjs +1037 -0
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -0
- package/fesm2022/koobiq-components-popover.mjs +407 -0
- package/fesm2022/koobiq-components-popover.mjs.map +1 -0
- package/fesm2022/koobiq-components-progress-bar.mjs +110 -0
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -0
- package/fesm2022/koobiq-components-progress-spinner.mjs +125 -0
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -0
- package/fesm2022/koobiq-components-radio.mjs +481 -0
- package/fesm2022/koobiq-components-radio.mjs.map +1 -0
- package/fesm2022/koobiq-components-select.mjs +1278 -0
- package/fesm2022/koobiq-components-select.mjs.map +1 -0
- package/fesm2022/koobiq-components-sidebar.mjs +202 -0
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -0
- package/fesm2022/koobiq-components-sidepanel.mjs +613 -0
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +524 -0
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -0
- package/fesm2022/koobiq-components-table.mjs +45 -0
- package/fesm2022/koobiq-components-table.mjs.map +1 -0
- package/fesm2022/koobiq-components-tabs.mjs +1499 -0
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -0
- package/fesm2022/koobiq-components-tags.mjs +1383 -0
- package/fesm2022/koobiq-components-tags.mjs.map +1 -0
- package/fesm2022/koobiq-components-textarea.mjs +277 -0
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -0
- package/fesm2022/koobiq-components-timepicker.mjs +706 -0
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -0
- package/fesm2022/koobiq-components-timezone.mjs +314 -0
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -0
- package/fesm2022/koobiq-components-title.mjs +125 -0
- package/fesm2022/koobiq-components-title.mjs.map +1 -0
- package/fesm2022/koobiq-components-toast.mjs +375 -0
- package/fesm2022/koobiq-components-toast.mjs.map +1 -0
- package/fesm2022/koobiq-components-toggle.mjs +182 -0
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -0
- package/fesm2022/koobiq-components-tooltip.mjs +370 -0
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -0
- package/fesm2022/koobiq-components-tree-select.mjs +978 -0
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -0
- package/fesm2022/koobiq-components-tree.mjs +1802 -0
- package/fesm2022/koobiq-components-tree.mjs.map +1 -0
- package/fesm2022/koobiq-components.mjs +4 -0
- package/fesm2022/koobiq-components.mjs.map +1 -0
- package/file-upload/README.md +0 -0
- package/file-upload/_file-upload-theme.scss +174 -0
- package/file-upload/file-drop.d.ts +11 -0
- package/file-upload/file-upload.d.ts +22 -0
- package/file-upload/file-upload.module.d.ts +18 -0
- package/file-upload/file-upload.scss +46 -0
- package/file-upload/index.d.ts +1 -0
- package/file-upload/multiple-file-upload.component.d.ts +51 -0
- package/file-upload/multiple-file-upload.component.scss +148 -0
- package/file-upload/public-api.d.ts +5 -0
- package/file-upload/single-file-upload.component.d.ts +34 -0
- package/file-upload/single-file-upload.component.scss +60 -0
- package/form-field/README.md +0 -0
- package/form-field/_form-field-theme.scss +112 -0
- package/form-field/_hint-theme.scss +67 -0
- package/form-field/cleaner.d.ts +5 -0
- package/form-field/cleaner.scss +22 -0
- package/form-field/form-field-control.d.ts +37 -0
- package/form-field/form-field-errors.d.ts +2 -0
- package/form-field/form-field.d.ts +84 -0
- package/form-field/form-field.module.d.ts +17 -0
- package/form-field/form-field.scss +143 -0
- package/form-field/hint.d.ts +17 -0
- package/form-field/hint.scss +15 -0
- package/form-field/index.d.ts +1 -0
- package/form-field/password-hint.d.ts +40 -0
- package/form-field/password-hint.scss +11 -0
- package/form-field/password-toggle.d.ts +18 -0
- package/form-field/password-toggle.scss +29 -0
- package/form-field/prefix.d.ts +5 -0
- package/form-field/public-api.d.ts +12 -0
- package/form-field/stepper.d.ts +11 -0
- package/form-field/stepper.scss +33 -0
- package/form-field/suffix.d.ts +5 -0
- package/form-field/validate.directive.d.ts +33 -0
- package/icon/README.md +0 -0
- package/icon/_icon-theme.scss +267 -0
- package/icon/icon.component.d.ts +47 -0
- package/icon/icon.module.d.ts +10 -0
- package/icon/icon.scss +73 -0
- package/icon/index.d.ts +1 -0
- package/icon/public-api.d.ts +2 -0
- package/index.d.ts +1 -0
- package/input/_input-theme.scss +13 -0
- package/input/index.d.ts +1 -0
- package/input/input-errors.d.ts +1 -0
- package/input/input-number-validators.d.ts +35 -0
- package/input/input-number.d.ts +33 -0
- package/input/input-password.d.ts +92 -0
- package/input/input-value-accessor.d.ts +4 -0
- package/input/input.d.ts +117 -0
- package/input/input.module.d.ts +15 -0
- package/input/input.scss +48 -0
- package/input/public-api.d.ts +6 -0
- package/link/README.md +0 -0
- package/link/_link-theme.scss +178 -0
- package/link/index.d.ts +1 -0
- package/link/link.component.d.ts +47 -0
- package/link/link.module.d.ts +9 -0
- package/link/public-api.d.ts +2 -0
- package/list/README.md +0 -0
- package/list/_list-base.scss +54 -0
- package/list/_list-theme.scss +47 -0
- package/list/index.d.ts +1 -0
- package/list/list-selection.component.d.ts +172 -0
- package/list/list.component.d.ts +18 -0
- package/list/list.module.d.ts +11 -0
- package/list/list.scss +52 -0
- package/list/public-api.d.ts +3 -0
- package/loader-overlay/README.md +0 -0
- package/loader-overlay/_loader-overlay-theme.scss +34 -0
- package/loader-overlay/index.d.ts +1 -0
- package/loader-overlay/loader-overlay.component.d.ts +34 -0
- package/loader-overlay/loader-overlay.module.d.ts +11 -0
- package/loader-overlay/loader-overlay.scss +64 -0
- package/loader-overlay/public-api.d.ts +2 -0
- package/markdown/README.md +0 -0
- package/markdown/_markdown-theme.scss +142 -0
- package/markdown/index.d.ts +1 -0
- package/markdown/markdown.component.d.ts +19 -0
- package/markdown/markdown.module.d.ts +11 -0
- package/markdown/markdown.scss +249 -0
- package/markdown/markdown.service.d.ts +7 -0
- package/markdown/markdown.values.d.ts +3 -0
- package/markdown/public-api.d.ts +4 -0
- package/modal/README.md +34 -0
- package/modal/_modal-animation.scss +114 -0
- package/modal/_modal-confirm.scss +53 -0
- package/modal/_modal-theme.scss +90 -0
- package/modal/css-unit.pipe.d.ts +7 -0
- package/modal/index.d.ts +1 -0
- package/modal/modal-control.service.d.ts +20 -0
- package/modal/modal-ref.class.d.ts +36 -0
- package/modal/modal-util.d.ts +12 -0
- package/modal/modal.component.d.ts +128 -0
- package/modal/modal.directive.d.ts +17 -0
- package/modal/modal.module.d.ts +14 -0
- package/modal/modal.scss +143 -0
- package/modal/modal.service.d.ts +33 -0
- package/modal/modal.type.d.ts +61 -0
- package/modal/public-api.d.ts +6 -0
- package/navbar/README.md +41 -0
- package/navbar/_navbar-theme.scss +123 -0
- package/navbar/index.d.ts +1 -0
- package/navbar/navbar-brand.scss +70 -0
- package/navbar/navbar-divider.scss +18 -0
- package/navbar/navbar-item.component.d.ts +167 -0
- package/navbar/navbar-item.scss +159 -0
- package/navbar/navbar.component.d.ts +58 -0
- package/navbar/navbar.module.d.ts +14 -0
- package/navbar/navbar.scss +20 -0
- package/navbar/public-api.d.ts +4 -0
- package/navbar/vertical-navbar.animation.d.ts +2 -0
- package/navbar/vertical-navbar.component.d.ts +23 -0
- package/navbar/vertical-navbar.scss +46 -0
- package/package.json +323 -0
- package/popover/README.md +32 -0
- package/popover/_popover-theme.scss +111 -0
- package/popover/index.d.ts +1 -0
- package/popover/popover-animations.d.ts +4 -0
- package/popover/popover-confirm.component.d.ts +33 -0
- package/popover/popover.component.d.ts +75 -0
- package/popover/popover.module.d.ts +12 -0
- package/popover/popover.scss +114 -0
- package/popover/public-api.d.ts +4 -0
- package/prebuilt-themes/dark-theme.css +1 -0
- package/prebuilt-themes/light-theme.css +1 -0
- package/progress-bar/README.md +0 -0
- package/progress-bar/_progress-bar-theme.scss +41 -0
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/progress-bar.component.d.ts +28 -0
- package/progress-bar/progress-bar.module.d.ts +9 -0
- package/progress-bar/progress-bar.scss +68 -0
- package/progress-bar/public-api.d.ts +2 -0
- package/progress-spinner/README.md +0 -0
- package/progress-spinner/_progress-spinner-theme.scss +35 -0
- package/progress-spinner/index.d.ts +1 -0
- package/progress-spinner/progress-spinner.component.d.ts +34 -0
- package/progress-spinner/progress-spinner.module.d.ts +9 -0
- package/progress-spinner/progress-spinner.scss +72 -0
- package/progress-spinner/public-api.d.ts +2 -0
- package/public-api.d.ts +1 -0
- package/radio/_radio-theme.scss +95 -0
- package/radio/index.d.ts +1 -0
- package/radio/public-api.d.ts +2 -0
- package/radio/radio.component.d.ts +204 -0
- package/radio/radio.module.d.ts +10 -0
- package/radio/radio.scss +143 -0
- package/select/README.md +0 -0
- package/select/_select-theme.scss +55 -0
- package/select/index.d.ts +1 -0
- package/select/public-api.d.ts +3 -0
- package/select/select-option.directive.d.ts +20 -0
- package/select/select.component.d.ts +330 -0
- package/select/select.module.d.ts +15 -0
- package/select/select.scss +222 -0
- package/sidebar/index.d.ts +1 -0
- package/sidebar/public-api.d.ts +2 -0
- package/sidebar/sidebar-animations.d.ts +8 -0
- package/sidebar/sidebar.component.d.ts +53 -0
- package/sidebar/sidebar.module.d.ts +8 -0
- package/sidebar/sidebar.scss +12 -0
- package/sidepanel/_sidepanel-theme.scss +67 -0
- package/sidepanel/index.d.ts +1 -0
- package/sidepanel/public-api.d.ts +6 -0
- package/sidepanel/sidepanel-animations.d.ts +14 -0
- package/sidepanel/sidepanel-config.d.ts +31 -0
- package/sidepanel/sidepanel-container.component.d.ts +46 -0
- package/sidepanel/sidepanel-directives.d.ts +50 -0
- package/sidepanel/sidepanel-ref.d.ts +24 -0
- package/sidepanel/sidepanel.module.d.ts +16 -0
- package/sidepanel/sidepanel.scss +203 -0
- package/sidepanel/sidepanel.service.d.ts +57 -0
- package/splitter/_splitter-theme.scss +31 -0
- package/splitter/index.d.ts +1 -0
- package/splitter/public-api.d.ts +2 -0
- package/splitter/splitter.component.d.ts +130 -0
- package/splitter/splitter.module.d.ts +9 -0
- package/splitter/splitter.scss +48 -0
- package/table/README.md +0 -0
- package/table/_table-theme.scss +65 -0
- package/table/index.d.ts +1 -0
- package/table/public-api.d.ts +2 -0
- package/table/table.component.d.ts +5 -0
- package/table/table.module.d.ts +10 -0
- package/table/table.scss +76 -0
- package/tabs/README.md +0 -0
- package/tabs/_tabs-common.scss +197 -0
- package/tabs/_tabs-theme.scss +240 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/paginated-tab-header.d.ts +179 -0
- package/tabs/public-api.d.ts +10 -0
- package/tabs/tab-body.component.d.ts +95 -0
- package/tabs/tab-body.scss +8 -0
- package/tabs/tab-content.directive.d.ts +9 -0
- package/tabs/tab-group.component.d.ts +134 -0
- package/tabs/tab-group.scss +63 -0
- package/tabs/tab-header.component.d.ts +35 -0
- package/tabs/tab-header.scss +106 -0
- package/tabs/tab-label-wrapper.directive.d.ts +31 -0
- package/tabs/tab-label.directive.d.ts +9 -0
- package/tabs/tab-nav-bar/index.d.ts +1 -0
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +40 -0
- package/tabs/tab-nav-bar/tab-nav-bar.scss +54 -0
- package/tabs/tab.component.d.ts +68 -0
- package/tabs/tabs-animations.d.ts +4 -0
- package/tabs/tabs.module.d.ts +21 -0
- package/tags/README.md +0 -0
- package/tags/_tag-theme.scss +100 -0
- package/tags/index.d.ts +1 -0
- package/tags/public-api.d.ts +5 -0
- package/tags/tag-default-options.d.ts +8 -0
- package/tags/tag-input.d.ts +87 -0
- package/tags/tag-list.component.d.ts +246 -0
- package/tags/tag-list.scss +66 -0
- package/tags/tag-text-control.d.ts +10 -0
- package/tags/tag.component.d.ts +140 -0
- package/tags/tag.module.d.ts +11 -0
- package/tags/tag.scss +67 -0
- package/textarea/README.md +0 -0
- package/textarea/_textarea-theme.scss +13 -0
- package/textarea/index.d.ts +1 -0
- package/textarea/public-api.d.ts +2 -0
- package/textarea/textarea.component.d.ts +114 -0
- package/textarea/textarea.module.d.ts +11 -0
- package/textarea/textarea.scss +45 -0
- package/timepicker/README.md +0 -0
- package/timepicker/index.d.ts +1 -0
- package/timepicker/public-api.d.ts +3 -0
- package/timepicker/timepicker.constants.d.ts +20 -0
- package/timepicker/timepicker.directive.d.ts +141 -0
- package/timepicker/timepicker.module.d.ts +11 -0
- package/timepicker/timepicker.scss +18 -0
- package/timezone/README.md +0 -0
- package/timezone/_timezone-option-theme.scss +34 -0
- package/timezone/cities-by-filter.pipe.d.ts +7 -0
- package/timezone/index.d.ts +1 -0
- package/timezone/public-api.d.ts +6 -0
- package/timezone/timezone-option.component.d.ts +15 -0
- package/timezone/timezone-option.component.scss +35 -0
- package/timezone/timezone-option.directive.d.ts +20 -0
- package/timezone/timezone-select.component.d.ts +14 -0
- package/timezone/timezone.models.d.ts +16 -0
- package/timezone/timezone.module.d.ts +19 -0
- package/timezone/timezone.utils.d.ts +18 -0
- package/timezone/utc-offset.pipe.d.ts +7 -0
- package/title/index.d.ts +1 -0
- package/title/public-api.d.ts +2 -0
- package/title/title.directive.d.ts +31 -0
- package/title/title.module.d.ts +8 -0
- package/toast/_toast-theme.scss +61 -0
- package/toast/index.d.ts +1 -0
- package/toast/public-api.d.ts +5 -0
- package/toast/toast-animations.d.ts +4 -0
- package/toast/toast-container.component.d.ts +15 -0
- package/toast/toast-container.component.scss +23 -0
- package/toast/toast.component.d.ts +35 -0
- package/toast/toast.component.scss +76 -0
- package/toast/toast.module.d.ts +13 -0
- package/toast/toast.service.d.ts +51 -0
- package/toast/toast.type.d.ts +27 -0
- package/toggle/_toggle-theme.scss +98 -0
- package/toggle/index.d.ts +1 -0
- package/toggle/public-api.d.ts +2 -0
- package/toggle/toggle.component.d.ts +57 -0
- package/toggle/toggle.module.d.ts +10 -0
- package/toggle/toggle.scss +99 -0
- package/tooltip/_tooltip-theme.scss +49 -0
- package/tooltip/index.d.ts +1 -0
- package/tooltip/public-api.d.ts +2 -0
- package/tooltip/tooltip.animations.d.ts +8 -0
- package/tooltip/tooltip.component.d.ts +94 -0
- package/tooltip/tooltip.module.d.ts +9 -0
- package/tooltip/tooltip.scss +54 -0
- package/tree/_tree-theme.scss +69 -0
- package/tree/control/base-tree-control.d.ts +40 -0
- package/tree/control/flat-tree-control.d.ts +53 -0
- package/tree/control/nested-tree-control.d.ts +19 -0
- package/tree/control/tree-control.d.ts +44 -0
- package/tree/data-source/flat-data-source.d.ts +80 -0
- package/tree/data-source/nested-data-source.d.ts +15 -0
- package/tree/index.d.ts +1 -0
- package/tree/node.d.ts +34 -0
- package/tree/outlet.d.ts +9 -0
- package/tree/padding.directive.d.ts +47 -0
- package/tree/public-api.d.ts +15 -0
- package/tree/toggle.d.ts +30 -0
- package/tree/toggle.scss +35 -0
- package/tree/tree-base.d.ts +97 -0
- package/tree/tree-errors.d.ts +25 -0
- package/tree/tree-option.component.d.ts +80 -0
- package/tree/tree-option.scss +67 -0
- package/tree/tree-selection.component.d.ts +134 -0
- package/tree/tree-selection.scss +3 -0
- package/tree/tree.d.ts +6 -0
- package/tree/tree.module.d.ts +16 -0
- package/tree/tree.scss +3 -0
- package/tree-select/README.md +0 -0
- package/tree-select/_tree-select-theme.scss +41 -0
- package/tree-select/index.d.ts +1 -0
- package/tree-select/public-api.d.ts +2 -0
- package/tree-select/tree-select.component.d.ts +283 -0
- package/tree-select/tree-select.module.d.ts +14 -0
- package/tree-select/tree-select.scss +225 -0
|
@@ -0,0 +1,978 @@
|
|
|
1
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
2
|
+
import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
|
3
|
+
import * as i6 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, Self, ViewChild, ViewChildren, ContentChild, Input, Output, NgModule } from '@angular/core';
|
|
7
|
+
import * as i2 from '@koobiq/components/core';
|
|
8
|
+
import { mixinTabIndex, mixinDisabled, mixinErrorState, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, MultipleMode, getKbqSelectNonArrayValueError, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, KBQ_SELECT_SCROLL_STRATEGY, mcSelectAnimations, KbqPseudoCheckboxModule, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER } from '@koobiq/components/core';
|
|
9
|
+
import * as i7 from '@koobiq/components/icon';
|
|
10
|
+
import { KbqIconModule } from '@koobiq/components/icon';
|
|
11
|
+
import { KbqSelectSearch, KbqSelectModule } from '@koobiq/components/select';
|
|
12
|
+
import * as i8 from '@koobiq/components/tags';
|
|
13
|
+
import { KbqTag, KbqTagsModule } from '@koobiq/components/tags';
|
|
14
|
+
import { KbqTree, KbqTreeSelection, KbqTreeModule } from '@koobiq/components/tree';
|
|
15
|
+
import * as i3 from '@angular/cdk/bidi';
|
|
16
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
17
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
18
|
+
import * as i4 from '@angular/forms';
|
|
19
|
+
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, ESCAPE, TAB, HOME, END, PAGE_UP, PAGE_DOWN, A, hasModifierKey } from '@koobiq/cdk/keycodes';
|
|
20
|
+
import * as i5 from '@koobiq/components/form-field';
|
|
21
|
+
import { KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
22
|
+
import { Subject, defer, merge, Subscription } from 'rxjs';
|
|
23
|
+
import { filter, map, startWith, switchMap, take, distinctUntilChanged, takeUntil, delay } from 'rxjs/operators';
|
|
24
|
+
|
|
25
|
+
/* tslint:disable:no-empty */
|
|
26
|
+
let nextUniqueId = 0;
|
|
27
|
+
/** Change event object that is emitted when the select value has changed. */
|
|
28
|
+
class KbqTreeSelectChange {
|
|
29
|
+
constructor(source, value, isUserInput = false) {
|
|
30
|
+
this.source = source;
|
|
31
|
+
this.value = value;
|
|
32
|
+
this.isUserInput = isUserInput;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
class KbqTreeSelectTrigger {
|
|
36
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
37
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqTreeSelectTrigger, selector: "kbq-tree-select-trigger", ngImport: i0 }); }
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectTrigger, decorators: [{
|
|
40
|
+
type: Directive,
|
|
41
|
+
args: [{ selector: 'kbq-tree-select-trigger' }]
|
|
42
|
+
}] });
|
|
43
|
+
class KbqTreeSelectFooter {
|
|
44
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
45
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqTreeSelectFooter, selector: "kbq-tree-select-footer, [kbq-tree-select-footer], [kbq-tree-selection-footer]", host: { classAttribute: "kbq-tree-select__footer" }, ngImport: i0 }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectFooter, decorators: [{
|
|
48
|
+
type: Directive,
|
|
49
|
+
args: [{
|
|
50
|
+
selector: 'kbq-tree-select-footer, [kbq-tree-select-footer], [kbq-tree-selection-footer]',
|
|
51
|
+
host: { class: 'kbq-tree-select__footer' }
|
|
52
|
+
}]
|
|
53
|
+
}] });
|
|
54
|
+
/** @docs-private */
|
|
55
|
+
class KbqTreeSelectBase {
|
|
56
|
+
constructor(elementRef, defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl) {
|
|
57
|
+
this.elementRef = elementRef;
|
|
58
|
+
this.defaultErrorStateMatcher = defaultErrorStateMatcher;
|
|
59
|
+
this.parentForm = parentForm;
|
|
60
|
+
this.parentFormGroup = parentFormGroup;
|
|
61
|
+
this.ngControl = ngControl;
|
|
62
|
+
/**
|
|
63
|
+
* Emits whenever the component state changes and should cause the parent
|
|
64
|
+
* form-field to update. Implemented as part of `KbqFormFieldControl`.
|
|
65
|
+
* @docs-private
|
|
66
|
+
*/
|
|
67
|
+
this.stateChanges = new Subject();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** @docs-private */
|
|
71
|
+
const KbqTreeSelectMixinBase = mixinTabIndex(mixinDisabled(mixinErrorState(KbqTreeSelectBase)));
|
|
72
|
+
class KbqTreeSelect extends KbqTreeSelectMixinBase {
|
|
73
|
+
get placeholder() {
|
|
74
|
+
return this._placeholder;
|
|
75
|
+
}
|
|
76
|
+
set placeholder(value) {
|
|
77
|
+
this._placeholder = value;
|
|
78
|
+
this.stateChanges.next();
|
|
79
|
+
}
|
|
80
|
+
get required() {
|
|
81
|
+
return this._required;
|
|
82
|
+
}
|
|
83
|
+
set required(value) {
|
|
84
|
+
this._required = coerceBooleanProperty(value);
|
|
85
|
+
this.stateChanges.next();
|
|
86
|
+
}
|
|
87
|
+
get multiple() {
|
|
88
|
+
return this._multiple;
|
|
89
|
+
}
|
|
90
|
+
set multiple(value) {
|
|
91
|
+
if (this.selectionModel) {
|
|
92
|
+
throw getKbqSelectDynamicMultipleError();
|
|
93
|
+
}
|
|
94
|
+
this._multiple = coerceBooleanProperty(value);
|
|
95
|
+
}
|
|
96
|
+
get autoSelect() {
|
|
97
|
+
if (this.multiple) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
return this._autoSelect;
|
|
101
|
+
}
|
|
102
|
+
set autoSelect(value) {
|
|
103
|
+
this._autoSelect = coerceBooleanProperty(value);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Function to compare the option values with the selected values. The first argument
|
|
107
|
+
* is a value from an option. The second is a value from the selection. A boolean
|
|
108
|
+
* should be returned.
|
|
109
|
+
*/
|
|
110
|
+
get compareWith() {
|
|
111
|
+
return this._compareWith;
|
|
112
|
+
}
|
|
113
|
+
set compareWith(fn) {
|
|
114
|
+
/* tslint:disable-next-line:strict-type-predicates */
|
|
115
|
+
if (typeof fn !== 'function') {
|
|
116
|
+
throw getKbqSelectNonFunctionValueError();
|
|
117
|
+
}
|
|
118
|
+
this._compareWith = fn;
|
|
119
|
+
if (this.selectionModel) {
|
|
120
|
+
// A different comparator means the selection could change.
|
|
121
|
+
this.initializeSelection();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
get value() {
|
|
125
|
+
return this.tree.getSelectedValues();
|
|
126
|
+
}
|
|
127
|
+
get id() {
|
|
128
|
+
return this._id;
|
|
129
|
+
}
|
|
130
|
+
set id(value) {
|
|
131
|
+
this._id = value || this.uid;
|
|
132
|
+
this.stateChanges.next();
|
|
133
|
+
}
|
|
134
|
+
get hasBackdrop() {
|
|
135
|
+
return this._hasBackdrop;
|
|
136
|
+
}
|
|
137
|
+
set hasBackdrop(value) {
|
|
138
|
+
this._hasBackdrop = coerceBooleanProperty(value);
|
|
139
|
+
}
|
|
140
|
+
get disabled() {
|
|
141
|
+
return this._disabled;
|
|
142
|
+
}
|
|
143
|
+
set disabled(value) {
|
|
144
|
+
this._disabled = coerceBooleanProperty(value);
|
|
145
|
+
if (this.parentFormField) {
|
|
146
|
+
this._disabled ? this.parentFormField.stopFocusMonitor() : this.parentFormField.runFocusMonitor();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** Whether the select is focused. */
|
|
150
|
+
get focused() {
|
|
151
|
+
return this._focused || this._panelOpen;
|
|
152
|
+
}
|
|
153
|
+
set focused(value) {
|
|
154
|
+
this._focused = value;
|
|
155
|
+
}
|
|
156
|
+
get panelOpen() {
|
|
157
|
+
return this._panelOpen;
|
|
158
|
+
}
|
|
159
|
+
get canShowCleaner() {
|
|
160
|
+
return !this.disabled && this.cleaner && this.selectionModel.hasValue();
|
|
161
|
+
}
|
|
162
|
+
constructor(elementRef, changeDetectorRef, viewportRuler, ngZone, renderer, defaultErrorStateMatcher, scrollStrategyFactory, dir, parentForm, parentFormGroup, parentFormField, ngControl) {
|
|
163
|
+
super(elementRef, defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
|
164
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
165
|
+
this.viewportRuler = viewportRuler;
|
|
166
|
+
this.ngZone = ngZone;
|
|
167
|
+
this.renderer = renderer;
|
|
168
|
+
this.scrollStrategyFactory = scrollStrategyFactory;
|
|
169
|
+
this.dir = dir;
|
|
170
|
+
this.parentFormField = parentFormField;
|
|
171
|
+
/** A name for this control that can be used by `kbq-form-field`. */
|
|
172
|
+
this.controlType = 'select';
|
|
173
|
+
this.hiddenItems = 0;
|
|
174
|
+
/** The cached font-size of the trigger element. */
|
|
175
|
+
this.triggerFontSize = 0;
|
|
176
|
+
/** The value of the select panel's transform-origin property. */
|
|
177
|
+
this.transformOrigin = 'top';
|
|
178
|
+
/** Emits when the panel element is finished transforming in. */
|
|
179
|
+
this.panelDoneAnimatingStream = new Subject();
|
|
180
|
+
/** Strategy that will be used to handle scrolling while the select panel is open. */
|
|
181
|
+
this.scrollStrategy = this.scrollStrategyFactory();
|
|
182
|
+
/**
|
|
183
|
+
* The y-offset of the overlay panel in relation to the trigger's top start corner.
|
|
184
|
+
* This must be adjusted to align the selected option text over the trigger text.
|
|
185
|
+
* when the panel opens. Will change based on the y-position of the selected option.
|
|
186
|
+
*/
|
|
187
|
+
this.offsetY = 0;
|
|
188
|
+
/**
|
|
189
|
+
* This position config ensures that the top "start" corner of the overlay
|
|
190
|
+
* is aligned with with the top "start" of the origin by default (overlapping
|
|
191
|
+
* the trigger completely). If the panel cannot fit below the trigger, it
|
|
192
|
+
* will fall back to a position above the trigger.
|
|
193
|
+
*/
|
|
194
|
+
this.positions = [
|
|
195
|
+
{
|
|
196
|
+
originX: 'start',
|
|
197
|
+
originY: 'bottom',
|
|
198
|
+
overlayX: 'start',
|
|
199
|
+
overlayY: 'top'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
originX: 'start',
|
|
203
|
+
originY: 'top',
|
|
204
|
+
overlayX: 'start',
|
|
205
|
+
overlayY: 'bottom'
|
|
206
|
+
}
|
|
207
|
+
];
|
|
208
|
+
this.hiddenItemsText = 'еще';
|
|
209
|
+
/** Event emitted when the select panel has been toggled. */
|
|
210
|
+
this.openedChange = new EventEmitter();
|
|
211
|
+
/** Event emitted when the select has been opened. */
|
|
212
|
+
this.openedStream = this.openedChange.pipe(filter((o) => o), map(() => { }));
|
|
213
|
+
/** Event emitted when the select has been closed. */
|
|
214
|
+
this.closedStream = this.openedChange.pipe(filter((o) => !o), map(() => { }));
|
|
215
|
+
/** Event emitted when the selected value has been changed by the user. */
|
|
216
|
+
this.selectionChange = new EventEmitter();
|
|
217
|
+
/**
|
|
218
|
+
* Event that emits whenever the raw value of the select changes. This is here primarily
|
|
219
|
+
* to facilitate the two-way binding for the `value` input.
|
|
220
|
+
* @docs-private
|
|
221
|
+
*/
|
|
222
|
+
this.valueChange = new EventEmitter();
|
|
223
|
+
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
|
224
|
+
/** Combined stream of all of the child options' change events. */
|
|
225
|
+
this.optionSelectionChanges = defer(() => {
|
|
226
|
+
if (this.options) {
|
|
227
|
+
return this.options.changes.pipe(startWith(this.options), switchMap(() => merge(...this.options.map((option) => option.onSelectionChange))));
|
|
228
|
+
}
|
|
229
|
+
return this.ngZone.onStable
|
|
230
|
+
.asObservable()
|
|
231
|
+
.pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
|
232
|
+
});
|
|
233
|
+
this._required = false;
|
|
234
|
+
this._multiple = false;
|
|
235
|
+
this._autoSelect = true;
|
|
236
|
+
this._value = null;
|
|
237
|
+
this._hasBackdrop = false;
|
|
238
|
+
this._disabled = false;
|
|
239
|
+
this._focused = false;
|
|
240
|
+
this.triggerValues = [];
|
|
241
|
+
this.closeSubscription = Subscription.EMPTY;
|
|
242
|
+
this._panelOpen = false;
|
|
243
|
+
/** The scroll position of the overlay panel, calculated to center the selected option. */
|
|
244
|
+
this.scrollTop = 0;
|
|
245
|
+
/** Unique id for this input. */
|
|
246
|
+
this.uid = `kbq-select-${nextUniqueId++}`;
|
|
247
|
+
/** Emits whenever the component is destroyed. */
|
|
248
|
+
this.destroy = new Subject();
|
|
249
|
+
/** `View -> model callback called when value changes` */
|
|
250
|
+
this.onChange = () => { };
|
|
251
|
+
/** `View -> model callback called when select has been touched` */
|
|
252
|
+
this.onTouched = () => { };
|
|
253
|
+
/** Comparison function to specify which option is displayed. Defaults to object equality. */
|
|
254
|
+
this._compareWith = (o1, o2) => o1 === o2;
|
|
255
|
+
if (this.ngControl) {
|
|
256
|
+
// Note: we provide the value accessor through here, instead of
|
|
257
|
+
// the `providers` to avoid running into a circular import.
|
|
258
|
+
this.ngControl.valueAccessor = this;
|
|
259
|
+
}
|
|
260
|
+
// Force setter to be called in case id was not specified.
|
|
261
|
+
this.id = this.id;
|
|
262
|
+
}
|
|
263
|
+
ngOnInit() {
|
|
264
|
+
this.stateChanges.next();
|
|
265
|
+
// We need `distinctUntilChanged` here, because some browsers will
|
|
266
|
+
// fire the animation end event twice for the same animation. See:
|
|
267
|
+
// https://github.com/angular/angular/issues/24084
|
|
268
|
+
this.panelDoneAnimatingStream
|
|
269
|
+
.pipe(distinctUntilChanged(), takeUntil(this.destroy))
|
|
270
|
+
.subscribe(() => {
|
|
271
|
+
if (this.panelOpen) {
|
|
272
|
+
this.scrollTop = 0;
|
|
273
|
+
if (this.search) {
|
|
274
|
+
this.search.focus();
|
|
275
|
+
}
|
|
276
|
+
this.openedChange.emit(true);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this.openedChange.emit(false);
|
|
280
|
+
this.overlayDir.offsetX = 0;
|
|
281
|
+
this.changeDetectorRef.markForCheck();
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
ngAfterContentInit() {
|
|
286
|
+
if (!this.tree) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
this.tree.resetFocusedItemOnBlur = false;
|
|
290
|
+
this.tree.optionShouldHoldFocusOnBlur = true;
|
|
291
|
+
this.selectionModel = this.tree.selectionModel = new SelectionModel(this.multiple);
|
|
292
|
+
this.selectionModel.changed
|
|
293
|
+
.subscribe(() => {
|
|
294
|
+
this.onChange(this.selectedValues);
|
|
295
|
+
if (this.multiple) {
|
|
296
|
+
this.refreshTriggerValues();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
this.tree.ngAfterContentInit();
|
|
300
|
+
this.initKeyManager();
|
|
301
|
+
this.options = this.tree.renderedOptions;
|
|
302
|
+
this.tree.autoSelect = this.autoSelect;
|
|
303
|
+
if (this.tree.multipleMode === null) {
|
|
304
|
+
this.tree.multipleMode = this.multiple ? MultipleMode.CHECKBOX : null;
|
|
305
|
+
}
|
|
306
|
+
if (this.multiple) {
|
|
307
|
+
this.tree.noUnselectLast = false;
|
|
308
|
+
}
|
|
309
|
+
if (this.tempValues) {
|
|
310
|
+
this.setSelectionByValue(this.tempValues);
|
|
311
|
+
this.tempValues = null;
|
|
312
|
+
}
|
|
313
|
+
this.optionSelectionChanges
|
|
314
|
+
.pipe(takeUntil(this.destroy))
|
|
315
|
+
.subscribe((event) => {
|
|
316
|
+
if (!this.multiple && this.panelOpen && event.isUserInput) {
|
|
317
|
+
this.close();
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
this.tree.selectionChange
|
|
321
|
+
.pipe(takeUntil(this.destroy))
|
|
322
|
+
.subscribe((event) => {
|
|
323
|
+
this.onChange(this.selectedValues);
|
|
324
|
+
this.selectionChange.emit(new KbqTreeSelectChange(this, event.option));
|
|
325
|
+
if (this.search) {
|
|
326
|
+
this.search.focus();
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
if (!this.multiple) {
|
|
330
|
+
this.selectionModel.changed
|
|
331
|
+
.pipe(takeUntil(this.destroy), filter(({ added }) => !!added.length))
|
|
332
|
+
.subscribe(({ added }) => {
|
|
333
|
+
this.tree.keyManager.setFocusOrigin('program');
|
|
334
|
+
this.tree.keyManager.setActiveItem(this.options.find(({ data }) => data === added[0]));
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
this.subscribeOnSearchChanges();
|
|
338
|
+
}
|
|
339
|
+
ngAfterViewInit() {
|
|
340
|
+
if (!this.tree) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
this.tags.changes
|
|
344
|
+
.pipe(startWith(null))
|
|
345
|
+
.subscribe(() => {
|
|
346
|
+
this.calculateHiddenItems();
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
ngDoCheck() {
|
|
350
|
+
if (this.ngControl) {
|
|
351
|
+
this.updateErrorState();
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
ngOnChanges(changes) {
|
|
355
|
+
// Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let
|
|
356
|
+
// the parent form field know to run change detection when the disabled state changes.
|
|
357
|
+
if (changes.disabled) {
|
|
358
|
+
this.stateChanges.next();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
ngOnDestroy() {
|
|
362
|
+
this.destroy.next();
|
|
363
|
+
this.destroy.complete();
|
|
364
|
+
this.stateChanges.complete();
|
|
365
|
+
this.closeSubscription.unsubscribe();
|
|
366
|
+
}
|
|
367
|
+
hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) {
|
|
368
|
+
return `${hiddenItemsText} ${hiddenItems}`;
|
|
369
|
+
}
|
|
370
|
+
clearValue($event) {
|
|
371
|
+
$event.stopPropagation();
|
|
372
|
+
this.selectionModel.clear();
|
|
373
|
+
this.tree.keyManager.setActiveItem(-1);
|
|
374
|
+
this.setSelectionByValue([]);
|
|
375
|
+
this.onChange(this.selectedValues);
|
|
376
|
+
}
|
|
377
|
+
toggle() {
|
|
378
|
+
if (this.panelOpen) {
|
|
379
|
+
this.close();
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
this.open();
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
open() {
|
|
386
|
+
if (this.disabled || !this.options || !this.options.length || this._panelOpen) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
this.triggerRect = this.trigger.nativeElement.getBoundingClientRect();
|
|
390
|
+
// Note: The computed font-size will be a string pixel value (e.g. "16px").
|
|
391
|
+
// `parseInt` ignores the trailing 'px' and converts this to a number.
|
|
392
|
+
this.triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement)['font-size']);
|
|
393
|
+
this._panelOpen = true;
|
|
394
|
+
setTimeout(() => this.highlightCorrectOption());
|
|
395
|
+
this.changeDetectorRef.markForCheck();
|
|
396
|
+
// Set the font size on the panel element once it exists.
|
|
397
|
+
this.ngZone.onStable.asObservable()
|
|
398
|
+
.pipe(take(1))
|
|
399
|
+
.subscribe(() => {
|
|
400
|
+
if (this.triggerFontSize && this.overlayDir.overlayRef && this.overlayDir.overlayRef.overlayElement) {
|
|
401
|
+
this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this.triggerFontSize}px`;
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/** Closes the overlay panel and focuses the host element. */
|
|
406
|
+
close() {
|
|
407
|
+
if (!this._panelOpen) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this._panelOpen = false;
|
|
411
|
+
this.changeDetectorRef.markForCheck();
|
|
412
|
+
this.onTouched();
|
|
413
|
+
if (this.search) {
|
|
414
|
+
this.search.reset();
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Sets the select's value. Part of the ControlValueAccessor interface
|
|
419
|
+
* required to integrate with Angular's core forms API.
|
|
420
|
+
*
|
|
421
|
+
* @param value New value to be written to the model.
|
|
422
|
+
*/
|
|
423
|
+
writeValue(value) {
|
|
424
|
+
if (this.tree) {
|
|
425
|
+
this.setSelectionByValue(value);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
this.tempValues = value;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Saves a callback function to be invoked when the select's value
|
|
433
|
+
* changes from user input. Part of the ControlValueAccessor interface
|
|
434
|
+
* required to integrate with Angular's core forms API.
|
|
435
|
+
*
|
|
436
|
+
* @param fn Callback to be triggered when the value changes.
|
|
437
|
+
*/
|
|
438
|
+
registerOnChange(fn) {
|
|
439
|
+
this.onChange = fn;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Saves a callback function to be invoked when the select is blurred
|
|
443
|
+
* by the user. Part of the ControlValueAccessor interface required
|
|
444
|
+
* to integrate with Angular's core forms API.
|
|
445
|
+
*
|
|
446
|
+
* @param fn Callback to be triggered when the component has been touched.
|
|
447
|
+
*/
|
|
448
|
+
registerOnTouched(fn) {
|
|
449
|
+
this.onTouched = fn;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Disables the select. Part of the ControlValueAccessor interface required
|
|
453
|
+
* to integrate with Angular's core forms API.
|
|
454
|
+
*
|
|
455
|
+
* @param isDisabled Sets whether the component is disabled.
|
|
456
|
+
*/
|
|
457
|
+
setDisabledState(isDisabled) {
|
|
458
|
+
this.disabled = isDisabled;
|
|
459
|
+
this.changeDetectorRef.markForCheck();
|
|
460
|
+
this.stateChanges.next();
|
|
461
|
+
}
|
|
462
|
+
get selected() {
|
|
463
|
+
return this.multiple ? this.selectionModel.selected : this.selectionModel.selected[0];
|
|
464
|
+
}
|
|
465
|
+
get selectedValues() {
|
|
466
|
+
const selectedValues = this.selectionModel.selected.map((value) => this.tree.treeControl.getValue(value));
|
|
467
|
+
return this.multiple ? selectedValues : selectedValues[0];
|
|
468
|
+
}
|
|
469
|
+
get triggerValue() {
|
|
470
|
+
if (this.empty) {
|
|
471
|
+
return '';
|
|
472
|
+
}
|
|
473
|
+
return this.tree.treeControl.getViewValue(this.selected);
|
|
474
|
+
}
|
|
475
|
+
get empty() {
|
|
476
|
+
return !this.selectionModel || this.selectionModel.isEmpty();
|
|
477
|
+
}
|
|
478
|
+
isRtl() {
|
|
479
|
+
return this.dir ? this.dir.value === 'rtl' : false;
|
|
480
|
+
}
|
|
481
|
+
handleKeydown(event) {
|
|
482
|
+
if (!this.disabled) {
|
|
483
|
+
if (this.panelOpen) {
|
|
484
|
+
this.handleOpenKeydown(event);
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
this.handleClosedKeydown(event);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
onFocus() {
|
|
492
|
+
if (!this.disabled) {
|
|
493
|
+
this._focused = true;
|
|
494
|
+
this.stateChanges.next();
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Calls the touched callback only if the panel is closed. Otherwise, the trigger will
|
|
499
|
+
* "blur" to the panel when it opens, causing a false positive.
|
|
500
|
+
*/
|
|
501
|
+
onBlur() {
|
|
502
|
+
this._focused = false;
|
|
503
|
+
if (!this.disabled && !this.panelOpen) {
|
|
504
|
+
this.onTouched();
|
|
505
|
+
this.changeDetectorRef.markForCheck();
|
|
506
|
+
this.stateChanges.next();
|
|
507
|
+
if (this.ngControl?.control) {
|
|
508
|
+
const control = this.ngControl.control;
|
|
509
|
+
control.updateValueAndValidity({ emitEvent: false });
|
|
510
|
+
control.statusChanges.emit(control.status);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
/** Callback that is invoked when the overlay panel has been attached. */
|
|
515
|
+
onAttached() {
|
|
516
|
+
this.overlayDir.positionChange
|
|
517
|
+
.pipe(take(1))
|
|
518
|
+
.subscribe(() => {
|
|
519
|
+
this.changeDetectorRef.detectChanges();
|
|
520
|
+
this.calculateOverlayOffsetX();
|
|
521
|
+
this.panel.nativeElement.scrollTop = this.scrollTop;
|
|
522
|
+
this.tree.updateScrollSize();
|
|
523
|
+
});
|
|
524
|
+
this.closeSubscription = this.closingActions()
|
|
525
|
+
.subscribe(() => this.close());
|
|
526
|
+
}
|
|
527
|
+
/** Returns the theme to be used on the panel. */
|
|
528
|
+
getPanelTheme() {
|
|
529
|
+
return this.parentFormField ? `kbq-${this.parentFormField.color}` : '';
|
|
530
|
+
}
|
|
531
|
+
focus() {
|
|
532
|
+
this.elementRef.nativeElement.focus();
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Implemented as part of KbqFormFieldControl.
|
|
536
|
+
* @docs-private
|
|
537
|
+
*/
|
|
538
|
+
onContainerClick() {
|
|
539
|
+
this.focus();
|
|
540
|
+
}
|
|
541
|
+
/** Invoked when an option is clicked. */
|
|
542
|
+
onRemoveSelectedOption(selectedOption, $event) {
|
|
543
|
+
$event.stopPropagation();
|
|
544
|
+
this.selectionModel
|
|
545
|
+
.deselect(this.selected.find((value) => this.tree.treeControl.getValue(value) === selectedOption.value));
|
|
546
|
+
this.onChange(this.selectedValues);
|
|
547
|
+
}
|
|
548
|
+
calculateHiddenItems() {
|
|
549
|
+
if (this.customTrigger || this.empty || !this.multiple) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
const totalItemsWidth = this.getTotalItemsWidthInMatcher();
|
|
553
|
+
const [totalVisibleItemsWidth, visibleItems] = this.getTotalVisibleItems();
|
|
554
|
+
this.hiddenItems = this.selectionModel.selected.length - visibleItems;
|
|
555
|
+
this.changeDetectorRef.detectChanges();
|
|
556
|
+
if (this.hiddenItems) {
|
|
557
|
+
const itemsCounter = this.trigger.nativeElement.querySelector('.kbq-tree-select__match-hidden-text');
|
|
558
|
+
const matcherList = this.trigger.nativeElement.querySelector('.kbq-tree-select__match-list');
|
|
559
|
+
const itemsCounterShowed = itemsCounter.offsetTop < itemsCounter.offsetHeight;
|
|
560
|
+
const itemsCounterWidth = Math.floor(itemsCounter.getBoundingClientRect().width);
|
|
561
|
+
const matcherListWidth = Math.floor(matcherList.getBoundingClientRect().width);
|
|
562
|
+
const matcherWidth = matcherListWidth + (itemsCounterShowed ? itemsCounterWidth : 0);
|
|
563
|
+
if (itemsCounterShowed && (totalItemsWidth < matcherWidth)) {
|
|
564
|
+
this.hiddenItems = 0;
|
|
565
|
+
this.changeDetectorRef.detectChanges();
|
|
566
|
+
}
|
|
567
|
+
if (totalVisibleItemsWidth === matcherListWidth ||
|
|
568
|
+
(totalVisibleItemsWidth + itemsCounterWidth) < matcherListWidth) {
|
|
569
|
+
this.changeDetectorRef.markForCheck();
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
this.changeDetectorRef.markForCheck();
|
|
574
|
+
}
|
|
575
|
+
closingActions() {
|
|
576
|
+
const backdrop = this.overlayDir.overlayRef.backdropClick();
|
|
577
|
+
const outsidePointerEvents = this.overlayDir.overlayRef.outsidePointerEvents()
|
|
578
|
+
.pipe(filter((event) => !this.elementRef.nativeElement.contains(event.target)));
|
|
579
|
+
const detachments = this.overlayDir.overlayRef.detachments();
|
|
580
|
+
return merge(backdrop, outsidePointerEvents, detachments);
|
|
581
|
+
}
|
|
582
|
+
getTotalItemsWidthInMatcher() {
|
|
583
|
+
const triggerClone = this.buildTriggerClone();
|
|
584
|
+
triggerClone.querySelector('.kbq-tree-select__match-hidden-text')?.remove();
|
|
585
|
+
this.renderer.appendChild(this.trigger.nativeElement, triggerClone);
|
|
586
|
+
let totalItemsWidth = 0;
|
|
587
|
+
triggerClone.querySelectorAll('kbq-tag')
|
|
588
|
+
.forEach((item) => totalItemsWidth += this.getItemWidth(item));
|
|
589
|
+
triggerClone.remove();
|
|
590
|
+
return totalItemsWidth;
|
|
591
|
+
}
|
|
592
|
+
getTotalVisibleItems() {
|
|
593
|
+
const triggerClone = this.buildTriggerClone();
|
|
594
|
+
this.renderer.setStyle(triggerClone.querySelector('.kbq-tree-select__match-hidden-text'), 'display', 'block');
|
|
595
|
+
this.renderer.appendChild(this.trigger.nativeElement, triggerClone);
|
|
596
|
+
let visibleItemsCount = 0;
|
|
597
|
+
let totalVisibleItemsWidth = 0;
|
|
598
|
+
triggerClone.querySelectorAll('kbq-tag')
|
|
599
|
+
.forEach((item) => {
|
|
600
|
+
if (item.offsetTop < item.offsetHeight) {
|
|
601
|
+
totalVisibleItemsWidth += this.getItemWidth(item);
|
|
602
|
+
visibleItemsCount++;
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
triggerClone.remove();
|
|
606
|
+
return [totalVisibleItemsWidth, visibleItemsCount];
|
|
607
|
+
}
|
|
608
|
+
buildTriggerClone() {
|
|
609
|
+
const triggerClone = this.trigger.nativeElement.cloneNode(true);
|
|
610
|
+
this.renderer.setStyle(triggerClone, 'position', 'absolute');
|
|
611
|
+
this.renderer.setStyle(triggerClone, 'visibility', 'hidden');
|
|
612
|
+
this.renderer.setStyle(triggerClone, 'top', '-100%');
|
|
613
|
+
this.renderer.setStyle(triggerClone, 'left', '0');
|
|
614
|
+
return triggerClone;
|
|
615
|
+
}
|
|
616
|
+
getItemWidth(element) {
|
|
617
|
+
const computedStyle = window.getComputedStyle(element);
|
|
618
|
+
const width = parseInt(computedStyle.width);
|
|
619
|
+
const marginLeft = parseInt(computedStyle.marginLeft);
|
|
620
|
+
const marginRight = parseInt(computedStyle.marginRight);
|
|
621
|
+
return width + marginLeft + marginRight;
|
|
622
|
+
}
|
|
623
|
+
handleClosedKeydown(event) {
|
|
624
|
+
// tslint:disable-next-line: deprecation
|
|
625
|
+
const keyCode = event.keyCode;
|
|
626
|
+
const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW ||
|
|
627
|
+
keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW;
|
|
628
|
+
const isOpenKey = keyCode === ENTER || keyCode === SPACE;
|
|
629
|
+
// Open the select on ALT + arrow key to match the native <select>
|
|
630
|
+
if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {
|
|
631
|
+
// prevents the page from scrolling down when pressing space
|
|
632
|
+
event.preventDefault();
|
|
633
|
+
this.open();
|
|
634
|
+
}
|
|
635
|
+
else if (!this.multiple && this.tree.keyManager && this.tree.keyManager.onKeydown) {
|
|
636
|
+
this.tree.keyManager.onKeydown(event);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
handleOpenKeydown(event) {
|
|
640
|
+
/* tslint:disable-next-line */
|
|
641
|
+
const keyCode = event.keyCode;
|
|
642
|
+
const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;
|
|
643
|
+
if (isArrowKey && event.altKey || keyCode === ESCAPE || keyCode === TAB) {
|
|
644
|
+
// Close the select on ALT + arrow key to match the native <select>
|
|
645
|
+
event.preventDefault();
|
|
646
|
+
this.close();
|
|
647
|
+
this.focus();
|
|
648
|
+
}
|
|
649
|
+
else if (keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW) {
|
|
650
|
+
return this.originalOnKeyDown.call(this.tree, event);
|
|
651
|
+
}
|
|
652
|
+
else if (keyCode === HOME) {
|
|
653
|
+
event.preventDefault();
|
|
654
|
+
this.tree.keyManager.setFirstItemActive();
|
|
655
|
+
}
|
|
656
|
+
else if (keyCode === END) {
|
|
657
|
+
event.preventDefault();
|
|
658
|
+
this.tree.keyManager.setLastItemActive();
|
|
659
|
+
}
|
|
660
|
+
else if (keyCode === PAGE_UP) {
|
|
661
|
+
event.preventDefault();
|
|
662
|
+
this.tree.keyManager.setPreviousPageItemActive();
|
|
663
|
+
}
|
|
664
|
+
else if (keyCode === PAGE_DOWN) {
|
|
665
|
+
event.preventDefault();
|
|
666
|
+
this.tree.keyManager.setNextPageItemActive();
|
|
667
|
+
}
|
|
668
|
+
else if ((keyCode === ENTER || keyCode === SPACE) && this.tree.keyManager.activeItem) {
|
|
669
|
+
event.preventDefault();
|
|
670
|
+
if (!this.autoSelect) {
|
|
671
|
+
this.originalOnKeyDown.call(this.tree, event);
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
this.close();
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
else if (this.multiple && keyCode === A && event.ctrlKey) {
|
|
678
|
+
event.preventDefault();
|
|
679
|
+
const hasDeselectedOptions = this.options.some((option) => !option.selected);
|
|
680
|
+
this.options.forEach((option) => {
|
|
681
|
+
if (hasDeselectedOptions && !option.disabled) {
|
|
682
|
+
option.select();
|
|
683
|
+
}
|
|
684
|
+
else {
|
|
685
|
+
option.deselect();
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
const previouslyFocusedIndex = this.tree.keyManager.activeItemIndex;
|
|
691
|
+
this.tree.keyManager.setFocusOrigin('keyboard');
|
|
692
|
+
this.tree.keyManager.onKeydown(event);
|
|
693
|
+
if (this.multiple && isArrowKey && event.shiftKey && this.tree.keyManager.activeItem &&
|
|
694
|
+
this.tree.keyManager.activeItemIndex !== previouslyFocusedIndex) {
|
|
695
|
+
this.tree.keyManager.activeItem.selectViaInteraction(event);
|
|
696
|
+
}
|
|
697
|
+
if (this.autoSelect && this.tree.keyManager.activeItem) {
|
|
698
|
+
this.tree.setSelectedOptionsByKey(this.tree.keyManager.activeItem, hasModifierKey(event, 'shiftKey'), hasModifierKey(event, 'ctrlKey'));
|
|
699
|
+
}
|
|
700
|
+
if (this.search) {
|
|
701
|
+
this.search.focus();
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
refreshTriggerValues() {
|
|
706
|
+
this.triggerValues = this.selectionModel.selected
|
|
707
|
+
.map((node) => ({
|
|
708
|
+
value: this.tree.treeControl.getValue(node),
|
|
709
|
+
viewValue: this.tree.treeControl.getViewValue(node),
|
|
710
|
+
disabled: this.tree.treeControl.isDisabled(node)
|
|
711
|
+
}));
|
|
712
|
+
this.changeDetectorRef.detectChanges();
|
|
713
|
+
}
|
|
714
|
+
initializeSelection() {
|
|
715
|
+
// Defer setting the value in order to avoid the "Expression
|
|
716
|
+
// has changed after it was checked" errors from Angular.
|
|
717
|
+
Promise.resolve().then(() => {
|
|
718
|
+
this.setSelectionByValue(this.ngControl ? this.ngControl.value : this._value);
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Sets the selected option based on a value. If no option can be
|
|
723
|
+
* found with the designated value, the select trigger is cleared.
|
|
724
|
+
*/
|
|
725
|
+
setSelectionByValue(value) {
|
|
726
|
+
if (this.multiple && value) {
|
|
727
|
+
if (!Array.isArray(value)) {
|
|
728
|
+
throw getKbqSelectNonArrayValueError();
|
|
729
|
+
}
|
|
730
|
+
this.tree.setOptionsFromValues(value);
|
|
731
|
+
this.sortValues();
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
this.tree.setOptionsFromValues([value]);
|
|
735
|
+
}
|
|
736
|
+
this.changeDetectorRef.detectChanges();
|
|
737
|
+
}
|
|
738
|
+
initKeyManager() {
|
|
739
|
+
this.originalOnKeyDown = this.tree.onKeyDown;
|
|
740
|
+
this.tree.onKeyDown = () => { };
|
|
741
|
+
this.tree.keyManager.change
|
|
742
|
+
.pipe(takeUntil(this.destroy))
|
|
743
|
+
.subscribe(() => {
|
|
744
|
+
if (this._panelOpen && this.panel) {
|
|
745
|
+
this.scrollActiveOptionIntoView();
|
|
746
|
+
}
|
|
747
|
+
else if (!this._panelOpen && !this.multiple && this.tree.keyManager.activeItem) {
|
|
748
|
+
this.tree.keyManager.activeItem.selectViaInteraction();
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
/** Sorts the selected values in the selected based on their order in the panel. */
|
|
753
|
+
sortValues() {
|
|
754
|
+
if (this.multiple) {
|
|
755
|
+
const options = this.options.toArray();
|
|
756
|
+
this.selectionModel.sort((a, b) => {
|
|
757
|
+
return this.sortComparator ?
|
|
758
|
+
this.sortComparator(a, b, options) :
|
|
759
|
+
options.indexOf(a) - options.indexOf(b);
|
|
760
|
+
});
|
|
761
|
+
this.stateChanges.next();
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Highlights the selected item. If no option is selected, it will highlight
|
|
766
|
+
* the first item instead.
|
|
767
|
+
*/
|
|
768
|
+
highlightCorrectOption() {
|
|
769
|
+
if (this.empty || !this.tree.keyManager) {
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
const firstSelectedValue = this.multiple ? this.selectedValues[0] : this.selectedValues;
|
|
773
|
+
const selectedOption = this.options.find((option) => option.value === firstSelectedValue);
|
|
774
|
+
if (selectedOption) {
|
|
775
|
+
this.tree.keyManager.setFocusOrigin('keyboard');
|
|
776
|
+
this.tree.keyManager.setActiveItem(selectedOption);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
/** Scrolls the active option into view. */
|
|
780
|
+
scrollActiveOptionIntoView() {
|
|
781
|
+
this.tree.keyManager.activeItem?.focus();
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
|
|
785
|
+
* This must be adjusted to align the selected option text over the trigger text when
|
|
786
|
+
* the panel opens. Will change based on LTR or RTL text direction. Note that the offset
|
|
787
|
+
* can't be calculated until the panel has been attached, because we need to know the
|
|
788
|
+
* content width in order to constrain the panel within the viewport.
|
|
789
|
+
*/
|
|
790
|
+
calculateOverlayOffsetX() {
|
|
791
|
+
const overlayRect = this.overlayDir.overlayRef.overlayElement.getBoundingClientRect();
|
|
792
|
+
const viewportSize = this.viewportRuler.getViewportSize();
|
|
793
|
+
const isRtl = this.isRtl();
|
|
794
|
+
/* tslint:disable-next-line:no-magic-numbers */
|
|
795
|
+
const paddingWidth = SELECT_PANEL_PADDING_X * 2;
|
|
796
|
+
let offsetX = SELECT_PANEL_PADDING_X;
|
|
797
|
+
// Invert the offset in LTR.
|
|
798
|
+
if (!isRtl) {
|
|
799
|
+
offsetX *= -1;
|
|
800
|
+
}
|
|
801
|
+
// Determine how much the select overflows on each side.
|
|
802
|
+
const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
|
|
803
|
+
const rightOverflow = overlayRect.right + offsetX - viewportSize.width
|
|
804
|
+
+ (isRtl ? 0 : paddingWidth);
|
|
805
|
+
// If the element overflows on either side, reduce the offset to allow it to fit.
|
|
806
|
+
if (leftOverflow > 0) {
|
|
807
|
+
offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;
|
|
808
|
+
}
|
|
809
|
+
else if (rightOverflow > 0) {
|
|
810
|
+
offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;
|
|
811
|
+
}
|
|
812
|
+
// Set the offset directly in order to avoid having to go through change detection and
|
|
813
|
+
// potentially triggering "changed after it was checked" errors. Round the value to avoid
|
|
814
|
+
// blurry content in some browsers.
|
|
815
|
+
this.overlayDir.offsetX = Math.round(offsetX);
|
|
816
|
+
this.overlayDir.overlayRef.updatePosition();
|
|
817
|
+
}
|
|
818
|
+
subscribeOnSearchChanges() {
|
|
819
|
+
if (!this.search?.input.ngControl.valueChanges) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
this.search.input.ngControl.valueChanges
|
|
823
|
+
.pipe(delay(0))
|
|
824
|
+
.subscribe((value) => {
|
|
825
|
+
this.isEmptySearchResult = !!value && this.tree.isEmpty;
|
|
826
|
+
this.changeDetectorRef.markForCheck();
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelect, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i2.ErrorStateMatcher }, { token: KBQ_SELECT_SCROLL_STRATEGY }, { token: i3.Directionality, optional: true }, { token: i4.NgForm, optional: true }, { token: i4.FormGroupDirective, optional: true }, { token: i5.KbqFormField, optional: true }, { token: i4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
830
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqTreeSelect, selector: "kbq-tree-select", inputs: { disabled: "disabled", tabIndex: "tabIndex", hiddenItemsText: "hiddenItemsText", panelClass: "panelClass", backdropClass: "backdropClass", errorStateMatcher: "errorStateMatcher", sortComparator: "sortComparator", placeholder: "placeholder", required: "required", multiple: "multiple", autoSelect: "autoSelect", compareWith: "compareWith", id: "id", hasBackdrop: "hasBackdrop", hiddenItemsTextFormatter: "hiddenItemsTextFormatter" }, outputs: { openedChange: "openedChange", openedStream: "opened", closedStream: "closed", selectionChange: "selectionChange", valueChange: "valueChange" }, host: { listeners: { "click": "toggle()", "keydown": "handleKeydown($event)", "focus": "onFocus()", "blur": "onBlur()", "window:resize": "calculateHiddenItems()" }, properties: { "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState", "attr.id": "id", "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null" }, classAttribute: "kbq-tree-select" }, providers: [
|
|
831
|
+
{ provide: KbqFormFieldControl, useExisting: KbqTreeSelect },
|
|
832
|
+
{ provide: KbqTree, useExisting: KbqTreeSelect }
|
|
833
|
+
], queries: [{ propertyName: "cleaner", first: true, predicate: ["mcSelectCleaner"], descendants: true, static: true }, { propertyName: "customTrigger", first: true, predicate: KbqTreeSelectTrigger, descendants: true }, { propertyName: "tree", first: true, predicate: KbqTreeSelection, descendants: true }, { propertyName: "search", first: true, predicate: KbqSelectSearch, descendants: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["mcTreeSelect"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdk-overlay-origin\n class=\"kbq-tree-select__trigger\"\n [class.kbq-tree-select__trigger_multiple]=\"multiple\"\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div class=\"kbq-tree-select__matcher\" [ngSwitch]=\"empty\">\n <span class=\"kbq-tree-select__placeholder\" *ngSwitchCase=\"true\">{{ placeholder || '\\u00A0' }}</span>\n <span *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\">\n <div *ngSwitchDefault [ngSwitch]=\"multiple\" class=\"kbq-tree-select__match-container\">\n <span *ngSwitchCase=\"false\" class=\"kbq-tree-select__matcher-text\">{{ triggerValue }}</span>\n <div *ngSwitchCase=\"true\" class=\"kbq-tree-select__multiple-matcher\">\n <div class=\"kbq-tree-select__match-list\">\n <kbq-tag *ngFor=\"let triggerValue of triggerValues\"\n [selectable]=\"false\"\n [disabled]=\"triggerValue.disabled || disabled\"\n [class.kbq-error]=\"errorState\">\n\n {{ triggerValue.viewValue }}\n <i kbq-icon=\"mc-close-S_16\" mcTagRemove\n *ngIf=\"!triggerValue.disabled && !disabled\"\n (click)=\"onRemoveSelectedOption(triggerValue, $event)\">\n </i>\n </kbq-tag>\n </div>\n <div class=\"kbq-tree-select__match-hidden-text\" [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\">\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n </div>\n <ng-content select=\"kbq-tree-select-trigger\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n </div>\n\n <div class=\"kbq-select__cleaner\" *ngIf=\"canShowCleaner\" (click)=\"clearValue($event)\">\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-tree-select__arrow-wrapper\">\n <i class=\"kbq-tree-select__arrow\" kbq-icon=\"mc-angle-down-S_16\"></i>\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n\n <div #panel\n class=\"kbq-tree-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.transformOrigin]=\"transformOrigin\"\n [style.font-size.px]=\"triggerFontSize\"\n (keydown)=\"handleKeydown($event)\">\n\n <div *ngIf=\"search\" class=\"kbq-select__search-container\">\n <ng-content select=\"[mcSelectSearch]\"></ng-content>\n </div>\n\n <div *ngIf=\"isEmptySearchResult\" class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n\n <div #optionsContainer\n class=\"kbq-tree-select__content kbq-scrollbar\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\">\n <ng-content select=\"kbq-tree-selection\"></ng-content>\n </div>\n\n <ng-content select=\"kbq-tree-select-footer,[kbq-tree-select-footer],[kbq-tree-selection-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;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, 2px))}.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, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.kbq-tree-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-tree-select.kbq-disabled .kbq-tree-select__trigger{-webkit-user-select:none;user-select:none;cursor:default}.kbq-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:var(--kbq-form-field-size-height, 32px);cursor:pointer;padding-left:calc(var(--kbq-select-size-left-padding, ) - var(--kbq-form-field-size-border-width, 1px));padding-right:calc(var(--kbq-select-size-right-padding, ) - var(--kbq-form-field-size-border-width, 1px))}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple{padding-left:calc(var(--kbq-select-size-left-padding-multiple, ) - var(--kbq-form-field-size-border-width, 1px))}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple .kbq-tree-select__placeholder{margin-left:8px}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple .kbq-tag.kbq-disabled .kbq-tag__text{margin-right:7px}.kbq-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tree-select__matcher>span{width:100%}.kbq-tree-select__multiple-matcher{display:flex;width:100%}.kbq-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-tree-select__match-list .kbq-tag{margin-right:4px}.kbq-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-tree-select__match-container .kbq-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.kbq-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.kbq-tree-select__arrow-wrapper{display:flex;align-self:center}.kbq-form-field-appearance-fill .kbq-tree-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-tree-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-tree-select__arrow-wrapper{transform:translateY(-25%)}.kbq-tree-select__panel{min-width:100%;max-width:var(--kbq-select-panel-size-max-width, );border-width:var(--kbq-select-panel-size-border-width, );border-style:solid;border-bottom-left-radius:var(--kbq-select-panel-size-border-radius, 8px);border-bottom-right-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-tree-select__panel .kbq-optgroup-label,.kbq-tree-select__panel .kbq-tree-select-option{font-size:inherit;line-height:var(--kbq-option-size-height, 32px);height:var(--kbq-option-size-height, 32px)}.kbq-tree-select__panel .kbq-tree-select__footer{display:flex;align-items:center;box-sizing:border-box;padding:4px 12px;border-top-width:1px;border-top-style:solid;min-height:var(--kbq-list-size-footer-min-height, )}.kbq-tree-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);overflow:auto}.kbq-tree-select__content .kbq-tree-selection{height:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}.kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px)}.kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: i7.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i8.KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: ["color", "selected", "value", "selectable", "removable", "tabindex", "disabled"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["mcTag"] }, { kind: "directive", type: i8.KbqTagRemove, selector: "[mcTagRemove]" }], animations: [
|
|
834
|
+
mcSelectAnimations.transformPanel,
|
|
835
|
+
mcSelectAnimations.fadeInContent
|
|
836
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
837
|
+
}
|
|
838
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelect, decorators: [{
|
|
839
|
+
type: Component,
|
|
840
|
+
args: [{ selector: 'kbq-tree-select', exportAs: 'mcTreeSelect', inputs: ['disabled', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
841
|
+
class: 'kbq-tree-select',
|
|
842
|
+
'[class.kbq-disabled]': 'disabled',
|
|
843
|
+
'[class.kbq-invalid]': 'errorState',
|
|
844
|
+
'[attr.id]': 'id',
|
|
845
|
+
'[attr.tabindex]': 'tabIndex',
|
|
846
|
+
'[attr.disabled]': 'disabled || null',
|
|
847
|
+
'(click)': 'toggle()',
|
|
848
|
+
'(keydown)': 'handleKeydown($event)',
|
|
849
|
+
'(focus)': 'onFocus()',
|
|
850
|
+
'(blur)': 'onBlur()',
|
|
851
|
+
'(window:resize)': 'calculateHiddenItems()'
|
|
852
|
+
}, animations: [
|
|
853
|
+
mcSelectAnimations.transformPanel,
|
|
854
|
+
mcSelectAnimations.fadeInContent
|
|
855
|
+
], providers: [
|
|
856
|
+
{ provide: KbqFormFieldControl, useExisting: KbqTreeSelect },
|
|
857
|
+
{ provide: KbqTree, useExisting: KbqTreeSelect }
|
|
858
|
+
], template: "<div cdk-overlay-origin\n class=\"kbq-tree-select__trigger\"\n [class.kbq-tree-select__trigger_multiple]=\"multiple\"\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div class=\"kbq-tree-select__matcher\" [ngSwitch]=\"empty\">\n <span class=\"kbq-tree-select__placeholder\" *ngSwitchCase=\"true\">{{ placeholder || '\\u00A0' }}</span>\n <span *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\">\n <div *ngSwitchDefault [ngSwitch]=\"multiple\" class=\"kbq-tree-select__match-container\">\n <span *ngSwitchCase=\"false\" class=\"kbq-tree-select__matcher-text\">{{ triggerValue }}</span>\n <div *ngSwitchCase=\"true\" class=\"kbq-tree-select__multiple-matcher\">\n <div class=\"kbq-tree-select__match-list\">\n <kbq-tag *ngFor=\"let triggerValue of triggerValues\"\n [selectable]=\"false\"\n [disabled]=\"triggerValue.disabled || disabled\"\n [class.kbq-error]=\"errorState\">\n\n {{ triggerValue.viewValue }}\n <i kbq-icon=\"mc-close-S_16\" mcTagRemove\n *ngIf=\"!triggerValue.disabled && !disabled\"\n (click)=\"onRemoveSelectedOption(triggerValue, $event)\">\n </i>\n </kbq-tag>\n </div>\n <div class=\"kbq-tree-select__match-hidden-text\" [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\">\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n </div>\n <ng-content select=\"kbq-tree-select-trigger\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n </div>\n\n <div class=\"kbq-select__cleaner\" *ngIf=\"canShowCleaner\" (click)=\"clearValue($event)\">\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-tree-select__arrow-wrapper\">\n <i class=\"kbq-tree-select__arrow\" kbq-icon=\"mc-angle-down-S_16\"></i>\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n\n <div #panel\n class=\"kbq-tree-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.transformOrigin]=\"transformOrigin\"\n [style.font-size.px]=\"triggerFontSize\"\n (keydown)=\"handleKeydown($event)\">\n\n <div *ngIf=\"search\" class=\"kbq-select__search-container\">\n <ng-content select=\"[mcSelectSearch]\"></ng-content>\n </div>\n\n <div *ngIf=\"isEmptySearchResult\" class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n\n <div #optionsContainer\n class=\"kbq-tree-select__content kbq-scrollbar\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\">\n <ng-content select=\"kbq-tree-selection\"></ng-content>\n </div>\n\n <ng-content select=\"kbq-tree-select-footer,[kbq-tree-select-footer],[kbq-tree-selection-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;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, 2px))}.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, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.kbq-tree-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-tree-select.kbq-disabled .kbq-tree-select__trigger{-webkit-user-select:none;user-select:none;cursor:default}.kbq-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:var(--kbq-form-field-size-height, 32px);cursor:pointer;padding-left:calc(var(--kbq-select-size-left-padding, ) - var(--kbq-form-field-size-border-width, 1px));padding-right:calc(var(--kbq-select-size-right-padding, ) - var(--kbq-form-field-size-border-width, 1px))}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple{padding-left:calc(var(--kbq-select-size-left-padding-multiple, ) - var(--kbq-form-field-size-border-width, 1px))}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple .kbq-tree-select__placeholder{margin-left:8px}.kbq-tree-select__trigger.kbq-tree-select__trigger_multiple .kbq-tag.kbq-disabled .kbq-tag__text{margin-right:7px}.kbq-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tree-select__matcher>span{width:100%}.kbq-tree-select__multiple-matcher{display:flex;width:100%}.kbq-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-tree-select__match-list .kbq-tag{margin-right:4px}.kbq-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-tree-select__match-container .kbq-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.kbq-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.kbq-tree-select__arrow-wrapper{display:flex;align-self:center}.kbq-form-field-appearance-fill .kbq-tree-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-tree-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-tree-select__arrow-wrapper{transform:translateY(-25%)}.kbq-tree-select__panel{min-width:100%;max-width:var(--kbq-select-panel-size-max-width, );border-width:var(--kbq-select-panel-size-border-width, );border-style:solid;border-bottom-left-radius:var(--kbq-select-panel-size-border-radius, 8px);border-bottom-right-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-tree-select__panel .kbq-optgroup-label,.kbq-tree-select__panel .kbq-tree-select-option{font-size:inherit;line-height:var(--kbq-option-size-height, 32px);height:var(--kbq-option-size-height, 32px)}.kbq-tree-select__panel .kbq-tree-select__footer{display:flex;align-items:center;box-sizing:border-box;padding:4px 12px;border-top-width:1px;border-top-style:solid;min-height:var(--kbq-list-size-footer-min-height, )}.kbq-tree-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);overflow:auto}.kbq-tree-select__content .kbq-tree-selection{height:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}.kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px)}.kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}\n"] }]
|
|
859
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i2.ErrorStateMatcher }, { type: undefined, decorators: [{
|
|
860
|
+
type: Inject,
|
|
861
|
+
args: [KBQ_SELECT_SCROLL_STRATEGY]
|
|
862
|
+
}] }, { type: i3.Directionality, decorators: [{
|
|
863
|
+
type: Optional
|
|
864
|
+
}] }, { type: i4.NgForm, decorators: [{
|
|
865
|
+
type: Optional
|
|
866
|
+
}] }, { type: i4.FormGroupDirective, decorators: [{
|
|
867
|
+
type: Optional
|
|
868
|
+
}] }, { type: i5.KbqFormField, decorators: [{
|
|
869
|
+
type: Optional
|
|
870
|
+
}] }, { type: i4.NgControl, decorators: [{
|
|
871
|
+
type: Optional
|
|
872
|
+
}, {
|
|
873
|
+
type: Self
|
|
874
|
+
}] }]; }, propDecorators: { trigger: [{
|
|
875
|
+
type: ViewChild,
|
|
876
|
+
args: ['trigger', { static: false }]
|
|
877
|
+
}], panel: [{
|
|
878
|
+
type: ViewChild,
|
|
879
|
+
args: ['panel', { static: false }]
|
|
880
|
+
}], overlayDir: [{
|
|
881
|
+
type: ViewChild,
|
|
882
|
+
args: [CdkConnectedOverlay, { static: false }]
|
|
883
|
+
}], tags: [{
|
|
884
|
+
type: ViewChildren,
|
|
885
|
+
args: [KbqTag]
|
|
886
|
+
}], cleaner: [{
|
|
887
|
+
type: ContentChild,
|
|
888
|
+
args: ['mcSelectCleaner', { static: true }]
|
|
889
|
+
}], customTrigger: [{
|
|
890
|
+
type: ContentChild,
|
|
891
|
+
args: [KbqTreeSelectTrigger, { static: false }]
|
|
892
|
+
}], tree: [{
|
|
893
|
+
type: ContentChild,
|
|
894
|
+
args: [KbqTreeSelection, { static: false }]
|
|
895
|
+
}], search: [{
|
|
896
|
+
type: ContentChild,
|
|
897
|
+
args: [KbqSelectSearch, { static: false }]
|
|
898
|
+
}], hiddenItemsText: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], openedChange: [{
|
|
901
|
+
type: Output
|
|
902
|
+
}], openedStream: [{
|
|
903
|
+
type: Output,
|
|
904
|
+
args: ['opened']
|
|
905
|
+
}], closedStream: [{
|
|
906
|
+
type: Output,
|
|
907
|
+
args: ['closed']
|
|
908
|
+
}], selectionChange: [{
|
|
909
|
+
type: Output
|
|
910
|
+
}], valueChange: [{
|
|
911
|
+
type: Output
|
|
912
|
+
}], panelClass: [{
|
|
913
|
+
type: Input
|
|
914
|
+
}], backdropClass: [{
|
|
915
|
+
type: Input
|
|
916
|
+
}], errorStateMatcher: [{
|
|
917
|
+
type: Input
|
|
918
|
+
}], sortComparator: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}], placeholder: [{
|
|
921
|
+
type: Input
|
|
922
|
+
}], required: [{
|
|
923
|
+
type: Input
|
|
924
|
+
}], multiple: [{
|
|
925
|
+
type: Input
|
|
926
|
+
}], autoSelect: [{
|
|
927
|
+
type: Input
|
|
928
|
+
}], compareWith: [{
|
|
929
|
+
type: Input
|
|
930
|
+
}], id: [{
|
|
931
|
+
type: Input
|
|
932
|
+
}], hasBackdrop: [{
|
|
933
|
+
type: Input
|
|
934
|
+
}], hiddenItemsTextFormatter: [{
|
|
935
|
+
type: Input
|
|
936
|
+
}] } });
|
|
937
|
+
|
|
938
|
+
class KbqTreeSelectModule {
|
|
939
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
940
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectModule, declarations: [KbqTreeSelect, KbqTreeSelectTrigger, KbqTreeSelectFooter], imports: [CommonModule,
|
|
941
|
+
OverlayModule,
|
|
942
|
+
KbqTreeModule,
|
|
943
|
+
KbqIconModule,
|
|
944
|
+
KbqTagsModule,
|
|
945
|
+
KbqPseudoCheckboxModule,
|
|
946
|
+
KbqSelectModule], exports: [KbqTreeSelect, KbqTreeSelectTrigger, KbqTreeSelectFooter, CommonModule] }); }
|
|
947
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectModule, providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER], imports: [CommonModule,
|
|
948
|
+
OverlayModule,
|
|
949
|
+
KbqTreeModule,
|
|
950
|
+
KbqIconModule,
|
|
951
|
+
KbqTagsModule,
|
|
952
|
+
KbqPseudoCheckboxModule,
|
|
953
|
+
KbqSelectModule, CommonModule] }); }
|
|
954
|
+
}
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTreeSelectModule, decorators: [{
|
|
956
|
+
type: NgModule,
|
|
957
|
+
args: [{
|
|
958
|
+
imports: [
|
|
959
|
+
CommonModule,
|
|
960
|
+
OverlayModule,
|
|
961
|
+
KbqTreeModule,
|
|
962
|
+
KbqIconModule,
|
|
963
|
+
KbqTagsModule,
|
|
964
|
+
KbqPseudoCheckboxModule,
|
|
965
|
+
KbqSelectModule
|
|
966
|
+
],
|
|
967
|
+
exports: [KbqTreeSelect, KbqTreeSelectTrigger, KbqTreeSelectFooter, CommonModule],
|
|
968
|
+
declarations: [KbqTreeSelect, KbqTreeSelectTrigger, KbqTreeSelectFooter],
|
|
969
|
+
providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER]
|
|
970
|
+
}]
|
|
971
|
+
}] });
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Generated bundle index. Do not edit.
|
|
975
|
+
*/
|
|
976
|
+
|
|
977
|
+
export { KbqTreeSelect, KbqTreeSelectChange, KbqTreeSelectFooter, KbqTreeSelectModule, KbqTreeSelectTrigger };
|
|
978
|
+
//# sourceMappingURL=koobiq-components-tree-select.mjs.map
|