@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,748 @@
|
|
|
1
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, EventEmitter, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, Optional, Host, NgModule } from '@angular/core';
|
|
4
|
+
import { ActiveDescendantKeyManager } from '@koobiq/cdk/a11y';
|
|
5
|
+
import { KBQ_OPTION_PARENT_COMPONENT, KbqOption, KbqOptgroup, KbqOptionSelectionChange, countGroupLabelsBeforeOption, getOptionScrollPosition, KbqOptionModule, KbqCommonModule } from '@koobiq/components/core';
|
|
6
|
+
import * as i1 from '@angular/common';
|
|
7
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
8
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
9
|
+
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
10
|
+
import * as i2 from '@angular/cdk/bidi';
|
|
11
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
12
|
+
import * as i4 from '@angular/cdk/scrolling';
|
|
13
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
14
|
+
import { ESCAPE, ENTER, TAB, DOWN_ARROW, UP_ARROW } from '@koobiq/cdk/keycodes';
|
|
15
|
+
import * as i3 from '@koobiq/components/form-field';
|
|
16
|
+
import { defer, merge, Subscription, Subject, of, fromEvent } from 'rxjs';
|
|
17
|
+
import { take, switchMap, filter, map, tap, delay } from 'rxjs/operators';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Autocomplete IDs need to be unique across components, so this counter exists outside of
|
|
21
|
+
* the component definition.
|
|
22
|
+
*/
|
|
23
|
+
let uniqueAutocompleteIdCounter = 0;
|
|
24
|
+
class KbqAutocompleteSelectedEvent {
|
|
25
|
+
constructor(source, option) {
|
|
26
|
+
this.source = source;
|
|
27
|
+
this.option = option;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Injection token to be used to override the default options for `kbq-autocomplete`. */
|
|
31
|
+
const KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken('kbq-autocomplete-default-options', {
|
|
32
|
+
providedIn: 'root',
|
|
33
|
+
factory: KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY
|
|
34
|
+
});
|
|
35
|
+
function KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
|
|
36
|
+
return { autoActiveFirstOption: true };
|
|
37
|
+
}
|
|
38
|
+
class KbqAutocomplete {
|
|
39
|
+
/**
|
|
40
|
+
* Takes classes set on the host kbq-autocomplete element and applies them to the panel
|
|
41
|
+
* inside the overlay container to allow for easy styling.
|
|
42
|
+
*/
|
|
43
|
+
get classList() {
|
|
44
|
+
return this._classList;
|
|
45
|
+
}
|
|
46
|
+
set classList(value) {
|
|
47
|
+
if (value && value.length) {
|
|
48
|
+
value.split(' ')
|
|
49
|
+
.forEach((className) => this._classList[className.trim()] = true);
|
|
50
|
+
this.elementRef.nativeElement.className = '';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Whether the first option should be highlighted when the autocomplete panel is opened.
|
|
55
|
+
* Can be configured globally through the `KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
|
|
56
|
+
*/
|
|
57
|
+
get autoActiveFirstOption() {
|
|
58
|
+
return this._autoActiveFirstOption;
|
|
59
|
+
}
|
|
60
|
+
set autoActiveFirstOption(value) {
|
|
61
|
+
this._autoActiveFirstOption = coerceBooleanProperty(value);
|
|
62
|
+
}
|
|
63
|
+
get isOpen() {
|
|
64
|
+
return this._isOpen && this.showPanel;
|
|
65
|
+
}
|
|
66
|
+
set isOpen(value) {
|
|
67
|
+
this._isOpen = value;
|
|
68
|
+
}
|
|
69
|
+
get openOnFocus() {
|
|
70
|
+
return this._openOnFocus;
|
|
71
|
+
}
|
|
72
|
+
set openOnFocus(value) {
|
|
73
|
+
this._openOnFocus = value;
|
|
74
|
+
}
|
|
75
|
+
constructor(changeDetectorRef, elementRef, defaults) {
|
|
76
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
77
|
+
this.elementRef = elementRef;
|
|
78
|
+
/** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
|
|
79
|
+
this.id = `kbq-autocomplete-${uniqueAutocompleteIdCounter++}`;
|
|
80
|
+
/** Whether the autocomplete panel should be visible, depending on option length. */
|
|
81
|
+
this.showPanel = false;
|
|
82
|
+
/** Function that maps an option's control value to its display value in the trigger. */
|
|
83
|
+
this.displayWith = null;
|
|
84
|
+
/** Event that is emitted whenever an option from the list is selected. */
|
|
85
|
+
this.optionSelected = new EventEmitter();
|
|
86
|
+
/** Event that is emitted when the autocomplete panel is opened. */
|
|
87
|
+
this.opened = new EventEmitter();
|
|
88
|
+
/** Event that is emitted when the autocomplete panel is closed. */
|
|
89
|
+
this.closed = new EventEmitter();
|
|
90
|
+
this._classList = {};
|
|
91
|
+
this._isOpen = false;
|
|
92
|
+
this._openOnFocus = true;
|
|
93
|
+
this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;
|
|
94
|
+
}
|
|
95
|
+
ngAfterContentInit() {
|
|
96
|
+
this.keyManager = new ActiveDescendantKeyManager(this.options);
|
|
97
|
+
this.setVisibility();
|
|
98
|
+
}
|
|
99
|
+
setScrollTop(scrollTop) {
|
|
100
|
+
if (this.panel) {
|
|
101
|
+
this.panel.nativeElement.scrollTop = scrollTop;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
getScrollTop() {
|
|
105
|
+
return this.panel ? this.panel.nativeElement.scrollTop : 0;
|
|
106
|
+
}
|
|
107
|
+
setVisibility() {
|
|
108
|
+
this.showPanel = !!this.options.length;
|
|
109
|
+
this._classList['kbq-autocomplete_visible'] = this.showPanel;
|
|
110
|
+
this._classList['kbq-autocomplete_hidden'] = !this.showPanel;
|
|
111
|
+
this.changeDetectorRef.markForCheck();
|
|
112
|
+
}
|
|
113
|
+
emitSelectEvent(option) {
|
|
114
|
+
const event = new KbqAutocompleteSelectedEvent(this, option);
|
|
115
|
+
this.optionSelected.emit(event);
|
|
116
|
+
}
|
|
117
|
+
onKeydown(event) {
|
|
118
|
+
this.keyManager.onKeydown(event);
|
|
119
|
+
}
|
|
120
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocomplete, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
121
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqAutocomplete, selector: "kbq-autocomplete", inputs: { displayWith: "displayWith", panelWidth: "panelWidth", classList: ["class", "classList"], autoActiveFirstOption: "autoActiveFirstOption", openOnFocus: "openOnFocus" }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed" }, host: { classAttribute: "kbq-autocomplete" }, providers: [{
|
|
122
|
+
provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqAutocomplete
|
|
123
|
+
}], queries: [{ propertyName: "options", predicate: KbqOption, descendants: true }, { propertyName: "optionGroups", predicate: KbqOptgroup }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["mcAutocomplete"], ngImport: i0, template: "<ng-template>\n <div class=\"kbq-autocomplete-panel kbq-scrollbar\" role=\"listbox\" [id]=\"id\" [ngClass]=\"classList\" #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-autocomplete-trigger{text-overflow:ellipsis}.kbq-autocomplete-panel{visibility:hidden;position:relative;overflow:hidden auto;-webkit-overflow-scrolling:touch;margin-top:-1px;min-width:100%;width:100%;max-width:none;max-height:var(--kbq-autocomplete-size-panel-max-height, 256px);border-width:1px;border-style:solid;border-bottom-left-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px);border-bottom-right-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px);padding:var(--kbq-autocomplete-size-panel-padding, 4px 0)}.kbq-autocomplete-panel.kbq-autocomplete_visible{visibility:visible}.kbq-autocomplete-panel.kbq-autocomplete_hidden{visibility:hidden}.kbq-autocomplete-panel-above .kbq-autocomplete-panel{border-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px) var(--kbq-autocomplete-size-panel-border-radius, 8px) 0 0}.kbq-autocomplete-panel .kbq-divider-horizontal{margin-top:-1px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
124
|
+
}
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocomplete, decorators: [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{ selector: 'kbq-autocomplete', exportAs: 'mcAutocomplete', host: {
|
|
128
|
+
class: 'kbq-autocomplete'
|
|
129
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
|
|
130
|
+
provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqAutocomplete
|
|
131
|
+
}], template: "<ng-template>\n <div class=\"kbq-autocomplete-panel kbq-scrollbar\" role=\"listbox\" [id]=\"id\" [ngClass]=\"classList\" #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-autocomplete-trigger{text-overflow:ellipsis}.kbq-autocomplete-panel{visibility:hidden;position:relative;overflow:hidden auto;-webkit-overflow-scrolling:touch;margin-top:-1px;min-width:100%;width:100%;max-width:none;max-height:var(--kbq-autocomplete-size-panel-max-height, 256px);border-width:1px;border-style:solid;border-bottom-left-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px);border-bottom-right-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px);padding:var(--kbq-autocomplete-size-panel-padding, 4px 0)}.kbq-autocomplete-panel.kbq-autocomplete_visible{visibility:visible}.kbq-autocomplete-panel.kbq-autocomplete_hidden{visibility:hidden}.kbq-autocomplete-panel-above .kbq-autocomplete-panel{border-radius:var(--kbq-autocomplete-size-panel-border-radius, 8px) var(--kbq-autocomplete-size-panel-border-radius, 8px) 0 0}.kbq-autocomplete-panel .kbq-divider-horizontal{margin-top:-1px}\n"] }]
|
|
132
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
133
|
+
type: Inject,
|
|
134
|
+
args: [KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS]
|
|
135
|
+
}] }]; }, propDecorators: { template: [{
|
|
136
|
+
type: ViewChild,
|
|
137
|
+
args: [TemplateRef, { static: true }]
|
|
138
|
+
}], panel: [{
|
|
139
|
+
type: ViewChild,
|
|
140
|
+
args: ['panel', { static: false }]
|
|
141
|
+
}], options: [{
|
|
142
|
+
type: ContentChildren,
|
|
143
|
+
args: [KbqOption, { descendants: true }]
|
|
144
|
+
}], optionGroups: [{
|
|
145
|
+
type: ContentChildren,
|
|
146
|
+
args: [KbqOptgroup]
|
|
147
|
+
}], displayWith: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}], panelWidth: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], optionSelected: [{
|
|
152
|
+
type: Output
|
|
153
|
+
}], opened: [{
|
|
154
|
+
type: Output
|
|
155
|
+
}], closed: [{
|
|
156
|
+
type: Output
|
|
157
|
+
}], classList: [{
|
|
158
|
+
type: Input,
|
|
159
|
+
args: ['class']
|
|
160
|
+
}], autoActiveFirstOption: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], openOnFocus: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}] } });
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Directive applied to an element to make it usable
|
|
168
|
+
* as a connection point for an autocomplete panel.
|
|
169
|
+
*/
|
|
170
|
+
class KbqAutocompleteOrigin {
|
|
171
|
+
constructor(elementRef) {
|
|
172
|
+
this.elementRef = elementRef;
|
|
173
|
+
}
|
|
174
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
175
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqAutocompleteOrigin, selector: "[mcAutocompleteOrigin]", exportAs: ["mcAutocompleteOrigin"], ngImport: i0 }); }
|
|
176
|
+
}
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteOrigin, decorators: [{
|
|
178
|
+
type: Directive,
|
|
179
|
+
args: [{
|
|
180
|
+
selector: '[mcAutocompleteOrigin]',
|
|
181
|
+
exportAs: 'mcAutocompleteOrigin'
|
|
182
|
+
}]
|
|
183
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The following style constants are necessary to save here in order
|
|
187
|
+
* to properly calculate the scrollTop of the panel. Because we are not
|
|
188
|
+
* actually focusing the active item, scroll must be handled manually.
|
|
189
|
+
*/
|
|
190
|
+
/** The height of each autocomplete option. */
|
|
191
|
+
const AUTOCOMPLETE_OPTION_HEIGHT = 32;
|
|
192
|
+
/** The total height of the autocomplete panel. */
|
|
193
|
+
const AUTOCOMPLETE_PANEL_HEIGHT = 256;
|
|
194
|
+
const AUTOCOMPLETE_BORDER_WIDTH = 2;
|
|
195
|
+
/** Injection token that determines the scroll handling while the autocomplete panel is open. */
|
|
196
|
+
const KBQ_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken('kbq-autocomplete-scroll-strategy');
|
|
197
|
+
function KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
198
|
+
return () => overlay.scrollStrategies.reposition();
|
|
199
|
+
}
|
|
200
|
+
const KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
201
|
+
provide: KBQ_AUTOCOMPLETE_SCROLL_STRATEGY,
|
|
202
|
+
deps: [Overlay],
|
|
203
|
+
useFactory: KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Provider that allows the autocomplete to register as a ControlValueAccessor.
|
|
207
|
+
* @docs-private
|
|
208
|
+
*/
|
|
209
|
+
const MAT_AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
210
|
+
provide: NG_VALUE_ACCESSOR,
|
|
211
|
+
useExisting: forwardRef(() => KbqAutocompleteTrigger),
|
|
212
|
+
multi: true
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.
|
|
216
|
+
* @docs-private
|
|
217
|
+
*/
|
|
218
|
+
function getKbqAutocompleteMissingPanelError() {
|
|
219
|
+
return Error('Attempting to open an undefined instance of `kbq-autocomplete`. ' +
|
|
220
|
+
'Make sure that the id passed to the `mcAutocomplete` is correct and that ' +
|
|
221
|
+
'you\'re attempting to open it after the ngAfterContentInit hook.');
|
|
222
|
+
}
|
|
223
|
+
class KbqAutocompleteTrigger {
|
|
224
|
+
/** The currently active option, coerced to MatOption type. */
|
|
225
|
+
get activeOption() {
|
|
226
|
+
return this.autocomplete?.keyManager?.activeItem;
|
|
227
|
+
}
|
|
228
|
+
get panelOpen() {
|
|
229
|
+
return this.overlayAttached && this.autocomplete.showPanel;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Whether the autocomplete is disabled. When disabled, the element will
|
|
233
|
+
* act as a regular input and the user won't be able to open the panel.
|
|
234
|
+
*/
|
|
235
|
+
get autocompleteDisabled() {
|
|
236
|
+
return this._autocompleteDisabled;
|
|
237
|
+
}
|
|
238
|
+
set autocompleteDisabled(value) {
|
|
239
|
+
this._autocompleteDisabled = coerceBooleanProperty(value);
|
|
240
|
+
}
|
|
241
|
+
constructor(elementRef, viewContainerRef, changeDetectorRef, overlay, zone, scrollStrategy, dir, formField, document,
|
|
242
|
+
// @breaking-change 8.0.0 Make `_viewportRuler` required.
|
|
243
|
+
viewportRuler) {
|
|
244
|
+
this.elementRef = elementRef;
|
|
245
|
+
this.viewContainerRef = viewContainerRef;
|
|
246
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
247
|
+
this.overlay = overlay;
|
|
248
|
+
this.zone = zone;
|
|
249
|
+
this.dir = dir;
|
|
250
|
+
this.formField = formField;
|
|
251
|
+
this.document = document;
|
|
252
|
+
this.viewportRuler = viewportRuler;
|
|
253
|
+
// @ts-ignore
|
|
254
|
+
this.optionSelections = defer(() => {
|
|
255
|
+
if (this.autocomplete && this.autocomplete.options) {
|
|
256
|
+
return merge(...this.autocomplete.options.map((option) => option.onSelectionChange));
|
|
257
|
+
}
|
|
258
|
+
// If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.
|
|
259
|
+
// Return a stream that we'll replace with the real one once everything is in place.
|
|
260
|
+
return this.zone.onStable
|
|
261
|
+
.asObservable()
|
|
262
|
+
.pipe(take(1), switchMap(() => this.optionSelections));
|
|
263
|
+
});
|
|
264
|
+
/**
|
|
265
|
+
* `autocomplete` attribute to be set on the input element.
|
|
266
|
+
* @docs-private
|
|
267
|
+
*/
|
|
268
|
+
this.autocompleteAttribute = 'off';
|
|
269
|
+
this._autocompleteDisabled = false;
|
|
270
|
+
this.overlayAttached = false;
|
|
271
|
+
this.componentDestroyed = false;
|
|
272
|
+
/** Subscription to viewport size changes. */
|
|
273
|
+
this.viewportSubscription = Subscription.EMPTY;
|
|
274
|
+
/**
|
|
275
|
+
* Whether the autocomplete can open the next time it is focused. Used to prevent a focused,
|
|
276
|
+
* closed autocomplete from being reopened if the user switches to another browser tab and then
|
|
277
|
+
* comes back.
|
|
278
|
+
*/
|
|
279
|
+
this.canOpenOnNextFocus = true;
|
|
280
|
+
/** Stream of keyboard events that can close the panel. */
|
|
281
|
+
this.closeKeyEventStream = new Subject();
|
|
282
|
+
/** `View -> model callback called when value changes` */
|
|
283
|
+
// tslint:disable-next-line no-empty
|
|
284
|
+
this.onChange = () => { };
|
|
285
|
+
/** `View -> model callback called when autocomplete has been touched` */
|
|
286
|
+
// tslint:disable-next-line no-empty
|
|
287
|
+
this.onTouched = () => { };
|
|
288
|
+
/**
|
|
289
|
+
* Event handler for when the window is blurred. Needs to be an
|
|
290
|
+
* arrow function in order to preserve the context.
|
|
291
|
+
*/
|
|
292
|
+
this.windowBlurHandler = () => {
|
|
293
|
+
// If the user blurred the window while the autocomplete is focused, it means that it'll be
|
|
294
|
+
// refocused when they come back. In this case we want to skip the first focus event, if the
|
|
295
|
+
// pane was closed, in order to avoid reopening it unintentionally.
|
|
296
|
+
this.canOpenOnNextFocus = this.document.activeElement !== this.elementRef.nativeElement || this.panelOpen;
|
|
297
|
+
};
|
|
298
|
+
// tslint:disable-next-line no-typeof-undefined
|
|
299
|
+
if (typeof window !== 'undefined') {
|
|
300
|
+
zone.runOutsideAngular(() => {
|
|
301
|
+
window.addEventListener('blur', this.windowBlurHandler);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
this.scrollStrategy = scrollStrategy;
|
|
305
|
+
}
|
|
306
|
+
ngOnDestroy() {
|
|
307
|
+
// tslint:disable-next-line no-typeof-undefined
|
|
308
|
+
if (typeof window !== 'undefined') {
|
|
309
|
+
window.removeEventListener('blur', this.windowBlurHandler);
|
|
310
|
+
}
|
|
311
|
+
this.viewportSubscription.unsubscribe();
|
|
312
|
+
this.componentDestroyed = true;
|
|
313
|
+
this.destroyPanel();
|
|
314
|
+
this.closeKeyEventStream.complete();
|
|
315
|
+
}
|
|
316
|
+
/** Opens the autocomplete suggestion panel. */
|
|
317
|
+
openPanel() {
|
|
318
|
+
this.attachOverlay();
|
|
319
|
+
}
|
|
320
|
+
closePanel() {
|
|
321
|
+
if (!this.overlayAttached) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
if (this.panelOpen) {
|
|
325
|
+
this.autocomplete.closed.emit();
|
|
326
|
+
}
|
|
327
|
+
this.autocomplete.isOpen = this.overlayAttached = false;
|
|
328
|
+
if (this.overlayRef && this.overlayRef.hasAttached()) {
|
|
329
|
+
this.overlayRef.detach();
|
|
330
|
+
this.closingActionsSubscription.unsubscribe();
|
|
331
|
+
}
|
|
332
|
+
// Note that in some cases this can end up being called after the component is destroyed.
|
|
333
|
+
// Add a check to ensure that we don't try to run change detection on a destroyed view.
|
|
334
|
+
if (!this.componentDestroyed) {
|
|
335
|
+
// We need to trigger change detection manually, because
|
|
336
|
+
// `fromEvent` doesn't seem to do it at the proper time.
|
|
337
|
+
// This ensures that the label is reset when the
|
|
338
|
+
// user clicks outside.
|
|
339
|
+
this.changeDetectorRef.detectChanges();
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Updates the position of the autocomplete suggestion panel to ensure that it fits all options
|
|
344
|
+
* within the viewport.
|
|
345
|
+
*/
|
|
346
|
+
updatePosition() {
|
|
347
|
+
if (this.overlayAttached) {
|
|
348
|
+
this.overlayRef.updatePosition();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* A stream of actions that should close the autocomplete panel, including
|
|
353
|
+
* when an option is selected, on blur, and when TAB is pressed.
|
|
354
|
+
*/
|
|
355
|
+
get panelClosingActions() {
|
|
356
|
+
return merge(this.optionSelections, this.autocomplete.keyManager.tabOut.pipe(filter(() => this.overlayAttached)), this.closeKeyEventStream, this.getOutsideClickStream(), this.overlayRef ?
|
|
357
|
+
this.overlayRef.detachments().pipe(filter(() => this.overlayAttached)) :
|
|
358
|
+
of()).pipe(
|
|
359
|
+
// Normalize the output so we return a consistent type.
|
|
360
|
+
map((event) => event instanceof KbqOptionSelectionChange ? event : null));
|
|
361
|
+
}
|
|
362
|
+
// Implemented as part of ControlValueAccessor.
|
|
363
|
+
writeValue(value) {
|
|
364
|
+
Promise.resolve(null)
|
|
365
|
+
.then(() => this.setTriggerValue(value));
|
|
366
|
+
}
|
|
367
|
+
// Implemented as part of ControlValueAccessor.
|
|
368
|
+
registerOnChange(fn) {
|
|
369
|
+
this.onChange = fn;
|
|
370
|
+
}
|
|
371
|
+
// Implemented as part of ControlValueAccessor.
|
|
372
|
+
registerOnTouched(fn) {
|
|
373
|
+
this.onTouched = fn;
|
|
374
|
+
}
|
|
375
|
+
// Implemented as part of ControlValueAccessor.
|
|
376
|
+
setDisabledState(isDisabled) {
|
|
377
|
+
this.elementRef.nativeElement.disabled = isDisabled;
|
|
378
|
+
}
|
|
379
|
+
handleKeydown(event) {
|
|
380
|
+
// tslint:disable-next-line deprecation
|
|
381
|
+
const keyCode = event.keyCode;
|
|
382
|
+
// Prevent the default action on all escape key presses. This is here primarily to bring IE
|
|
383
|
+
// in line with other browsers. By default, pressing escape on IE will cause it to revert
|
|
384
|
+
// the input value to the one that it had on focus, however it won't dispatch any events
|
|
385
|
+
// which means that the model value will be out of sync with the view.
|
|
386
|
+
if (keyCode === ESCAPE) {
|
|
387
|
+
event.preventDefault();
|
|
388
|
+
}
|
|
389
|
+
if (this.activeOption && keyCode === ENTER && this.panelOpen) {
|
|
390
|
+
this.activeOption.selectViaInteraction();
|
|
391
|
+
this.resetActiveItem();
|
|
392
|
+
event.preventDefault();
|
|
393
|
+
}
|
|
394
|
+
else if (this.autocomplete) {
|
|
395
|
+
const prevActiveItem = this.autocomplete.keyManager.activeItem;
|
|
396
|
+
if (this.panelOpen || keyCode === TAB) {
|
|
397
|
+
this.autocomplete.onKeydown(event);
|
|
398
|
+
}
|
|
399
|
+
else if (keyCode === DOWN_ARROW && this.canOpen()) {
|
|
400
|
+
this.openPanel();
|
|
401
|
+
}
|
|
402
|
+
const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;
|
|
403
|
+
if (isArrowKey || this.autocomplete.keyManager.activeItem !== prevActiveItem) {
|
|
404
|
+
this.scrollToOption();
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
handleInput(event) {
|
|
409
|
+
const target = event.target;
|
|
410
|
+
let value = target.value;
|
|
411
|
+
// Based on `NumberValueAccessor` from forms.
|
|
412
|
+
if (target.type === 'number') {
|
|
413
|
+
value = value === '' ? null : parseFloat(value);
|
|
414
|
+
}
|
|
415
|
+
// If the input has a placeholder, IE will fire the `input` event on page load,
|
|
416
|
+
// focus and blur, in addition to when the user actually changed the value. To
|
|
417
|
+
// filter out all of the extra events, we save the value on focus and between
|
|
418
|
+
// `input` events, and we check whether it changed.
|
|
419
|
+
// See: https://connect.microsoft.com/IE/feedback/details/885747/
|
|
420
|
+
if (this.previousValue !== value) {
|
|
421
|
+
this.previousValue = value;
|
|
422
|
+
this.onChange(value);
|
|
423
|
+
if (this.canOpen() && this.document.activeElement === event.target) {
|
|
424
|
+
this.openPanel();
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
handleFocus() {
|
|
429
|
+
if (!this.canOpenOnNextFocus) {
|
|
430
|
+
this.canOpenOnNextFocus = true;
|
|
431
|
+
}
|
|
432
|
+
else if (this.canOpen() && this.autocomplete.openOnFocus) {
|
|
433
|
+
this.previousValue = this.elementRef.nativeElement.value;
|
|
434
|
+
this.attachOverlay();
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
handleClick($event) {
|
|
438
|
+
if (this.canOpen() && this.document.activeElement === $event.target) {
|
|
439
|
+
this.openPanel();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
/** Stream of clicks outside of the autocomplete panel. */
|
|
443
|
+
getOutsideClickStream() {
|
|
444
|
+
return merge(
|
|
445
|
+
// tslint:disable-next-line: no-unnecessary-type-assertion
|
|
446
|
+
fromEvent(this.document, 'click'),
|
|
447
|
+
// tslint:disable-next-line: no-unnecessary-type-assertion
|
|
448
|
+
fromEvent(this.document, 'touchend'))
|
|
449
|
+
.pipe(filter((event) => {
|
|
450
|
+
const clickTarget = event.target;
|
|
451
|
+
const formField = this.formField ? this.formField.elementRef.nativeElement : null;
|
|
452
|
+
const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;
|
|
453
|
+
return this.overlayAttached &&
|
|
454
|
+
clickTarget !== this.elementRef.nativeElement &&
|
|
455
|
+
(!formField || !formField.contains(clickTarget)) &&
|
|
456
|
+
(!customOrigin || !customOrigin.contains(clickTarget)) &&
|
|
457
|
+
(!!this.overlayRef && !this.overlayRef.overlayElement.contains(clickTarget));
|
|
458
|
+
}));
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Given that we are not actually focusing active options, we must manually adjust scroll
|
|
462
|
+
* to reveal options below the fold. First, we find the offset of the option from the top
|
|
463
|
+
* of the panel. If that offset is below the fold, the new scrollTop will be the offset -
|
|
464
|
+
* the panel height + the option height, so the active option will be just visible at the
|
|
465
|
+
* bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop
|
|
466
|
+
* will become the offset. If that offset is visible within the panel already, the scrollTop is
|
|
467
|
+
* not adjusted.
|
|
468
|
+
*/
|
|
469
|
+
scrollToOption() {
|
|
470
|
+
const index = this.autocomplete.keyManager.activeItemIndex || 0;
|
|
471
|
+
const labelCount = countGroupLabelsBeforeOption(index, this.autocomplete.options, this.autocomplete.optionGroups);
|
|
472
|
+
const newScrollPosition = getOptionScrollPosition(index + labelCount, AUTOCOMPLETE_OPTION_HEIGHT, this.autocomplete.getScrollTop(), AUTOCOMPLETE_PANEL_HEIGHT);
|
|
473
|
+
this.autocomplete.setScrollTop(newScrollPosition);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* This method listens to a stream of panel closing actions and resets the
|
|
477
|
+
* stream every time the option list changes.
|
|
478
|
+
*/
|
|
479
|
+
subscribeToClosingActions() {
|
|
480
|
+
const firstStable = this.zone.onStable.asObservable()
|
|
481
|
+
.pipe(take(1));
|
|
482
|
+
const optionChanges = this.autocomplete.options.changes
|
|
483
|
+
.pipe(tap(() => this.positionStrategy.reapplyLastPosition()),
|
|
484
|
+
// Defer emitting to the stream until the next tick, because changing
|
|
485
|
+
// bindings in here will cause "changed after checked" errors.
|
|
486
|
+
delay(0));
|
|
487
|
+
// When the zone is stable initially, and when the option list changes...
|
|
488
|
+
return merge(firstStable, optionChanges)
|
|
489
|
+
.pipe(
|
|
490
|
+
// create a new stream of panelClosingActions, replacing any previous streams
|
|
491
|
+
// that were created, and flatten it so our stream only emits closing events...
|
|
492
|
+
switchMap(() => {
|
|
493
|
+
const wasOpen = this.panelOpen;
|
|
494
|
+
this.resetActiveItem();
|
|
495
|
+
this.autocomplete.setVisibility();
|
|
496
|
+
if (this.panelOpen) {
|
|
497
|
+
this.overlayRef.updatePosition();
|
|
498
|
+
// If the `panelOpen` state changed, we need to make sure to emit the `opened`
|
|
499
|
+
// event, because we may not have emitted it when the panel was attached. This
|
|
500
|
+
// can happen if the users opens the panel and there are no options, but the
|
|
501
|
+
// options come in slightly later or as a result of the value changing.
|
|
502
|
+
if (wasOpen !== this.panelOpen) {
|
|
503
|
+
this.autocomplete.opened.emit();
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return this.panelClosingActions;
|
|
507
|
+
}),
|
|
508
|
+
// when the first closing event occurs...
|
|
509
|
+
take(1))
|
|
510
|
+
// set the value, close the panel, and complete.
|
|
511
|
+
.subscribe((event) => this.setValueAndClose(event));
|
|
512
|
+
}
|
|
513
|
+
/** Destroys the autocomplete suggestion panel. */
|
|
514
|
+
destroyPanel() {
|
|
515
|
+
if (this.overlayRef) {
|
|
516
|
+
this.closePanel();
|
|
517
|
+
this.overlayRef.dispose();
|
|
518
|
+
this.overlayRef = null;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
setTriggerValue(value) {
|
|
522
|
+
const toDisplay = this.autocomplete && this.autocomplete.displayWith ?
|
|
523
|
+
this.autocomplete.displayWith(value) :
|
|
524
|
+
value;
|
|
525
|
+
// Simply falling back to an empty string if the display value is falsy does not work properly.
|
|
526
|
+
// The display value can also be the number zero and shouldn't fall back to an empty string.
|
|
527
|
+
const inputValue = toDisplay != null ? toDisplay : '';
|
|
528
|
+
// If it's used within a `MatFormField`, we should set it through the property so it can go
|
|
529
|
+
// through change detection.
|
|
530
|
+
if (this.formField) {
|
|
531
|
+
this.formField.control.value = inputValue;
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
this.elementRef.nativeElement.value = inputValue;
|
|
535
|
+
}
|
|
536
|
+
this.previousValue = inputValue;
|
|
537
|
+
}
|
|
538
|
+
/** This method closes the panel, and if a value is specified, also sets the associated
|
|
539
|
+
* control to that value. It will also mark the control as dirty if this interaction
|
|
540
|
+
* stemmed from the user.
|
|
541
|
+
*/
|
|
542
|
+
setValueAndClose(event) {
|
|
543
|
+
if (event?.source) {
|
|
544
|
+
this.clearPreviousSelectedOption(event.source);
|
|
545
|
+
this.setTriggerValue(event.source.value);
|
|
546
|
+
this.onChange(event.source.value);
|
|
547
|
+
this.elementRef.nativeElement.focus();
|
|
548
|
+
this.autocomplete.emitSelectEvent(event.source);
|
|
549
|
+
}
|
|
550
|
+
this.closePanel();
|
|
551
|
+
}
|
|
552
|
+
/** Clear any previous selected option and emit a selection change event for this option */
|
|
553
|
+
clearPreviousSelectedOption(skip) {
|
|
554
|
+
this.autocomplete.options.forEach((option) => {
|
|
555
|
+
if (option !== skip && option.selected) {
|
|
556
|
+
option.deselect();
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
attachOverlay() {
|
|
561
|
+
if (!this.autocomplete) {
|
|
562
|
+
throw getKbqAutocompleteMissingPanelError();
|
|
563
|
+
}
|
|
564
|
+
let overlayRef = this.overlayRef;
|
|
565
|
+
if (!overlayRef) {
|
|
566
|
+
this.portal = new TemplatePortal(this.autocomplete.template, this.viewContainerRef);
|
|
567
|
+
overlayRef = this.overlay.create(this.getOverlayConfig());
|
|
568
|
+
this.overlayRef = overlayRef;
|
|
569
|
+
// Use the `keydownEvents` in order to take advantage of
|
|
570
|
+
// the overlay event targeting provided by the CDK overlay.
|
|
571
|
+
overlayRef.keydownEvents().subscribe((event) => {
|
|
572
|
+
// Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
|
|
573
|
+
// See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
|
|
574
|
+
// tslint:disable-next-line deprecation
|
|
575
|
+
if (event.keyCode === ESCAPE || (event.keyCode === UP_ARROW && event.altKey)) {
|
|
576
|
+
this.resetActiveItem();
|
|
577
|
+
this.closeKeyEventStream.next();
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
if (this.viewportRuler) {
|
|
581
|
+
this.viewportSubscription = this.viewportRuler.change().subscribe(() => {
|
|
582
|
+
if (this.panelOpen && overlayRef) {
|
|
583
|
+
overlayRef.updateSize({ width: this.getPanelWidth() });
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
else {
|
|
589
|
+
const position = overlayRef.getConfig().positionStrategy;
|
|
590
|
+
// Update the trigger, panel width and direction, in case anything has changed.
|
|
591
|
+
position.setOrigin(this.getConnectedElement());
|
|
592
|
+
overlayRef.updateSize({ width: this.getPanelWidth() });
|
|
593
|
+
}
|
|
594
|
+
if (overlayRef && !overlayRef.hasAttached()) {
|
|
595
|
+
overlayRef.attach(this.portal);
|
|
596
|
+
this.closingActionsSubscription = this.subscribeToClosingActions();
|
|
597
|
+
}
|
|
598
|
+
const wasOpen = this.panelOpen;
|
|
599
|
+
this.autocomplete.setVisibility();
|
|
600
|
+
this.autocomplete.isOpen = this.overlayAttached = true;
|
|
601
|
+
// We need to do an extra `panelOpen` check in here, because the
|
|
602
|
+
// autocomplete won't be shown if there are no options.
|
|
603
|
+
if (this.panelOpen && wasOpen !== this.panelOpen) {
|
|
604
|
+
this.autocomplete.opened.emit();
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
getOverlayConfig() {
|
|
608
|
+
return new OverlayConfig({
|
|
609
|
+
positionStrategy: this.getOverlayPosition(),
|
|
610
|
+
scrollStrategy: this.scrollStrategy(),
|
|
611
|
+
width: this.getPanelWidth(),
|
|
612
|
+
direction: this.dir
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
getOverlayPosition() {
|
|
616
|
+
this.positionStrategy = this.overlay.position()
|
|
617
|
+
.flexibleConnectedTo(this.getConnectedElement())
|
|
618
|
+
.withFlexibleDimensions(false)
|
|
619
|
+
.withPush(false)
|
|
620
|
+
.withPositions([
|
|
621
|
+
{
|
|
622
|
+
originX: 'start',
|
|
623
|
+
originY: 'bottom',
|
|
624
|
+
overlayX: 'start',
|
|
625
|
+
overlayY: 'top'
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
originX: 'start',
|
|
629
|
+
originY: 'top',
|
|
630
|
+
overlayX: 'start',
|
|
631
|
+
overlayY: 'bottom',
|
|
632
|
+
// The overlay edge connected to the trigger should have squared corners, while
|
|
633
|
+
// the opposite end has rounded corners. We apply a CSS class to swap the
|
|
634
|
+
// border-radius based on the overlay position.
|
|
635
|
+
panelClass: 'kbq-autocomplete-panel-above'
|
|
636
|
+
}
|
|
637
|
+
]);
|
|
638
|
+
return this.positionStrategy;
|
|
639
|
+
}
|
|
640
|
+
getConnectedElement() {
|
|
641
|
+
if (this.connectedTo) {
|
|
642
|
+
return this.connectedTo.elementRef;
|
|
643
|
+
}
|
|
644
|
+
return this.formField ? this.formField.getConnectedOverlayOrigin() : this.elementRef;
|
|
645
|
+
}
|
|
646
|
+
getPanelWidth() {
|
|
647
|
+
return this.autocomplete.panelWidth || this.getHostWidth() - AUTOCOMPLETE_BORDER_WIDTH;
|
|
648
|
+
}
|
|
649
|
+
getHostWidth() {
|
|
650
|
+
return this.getConnectedElement().nativeElement.getBoundingClientRect().width;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Resets the active item to -1 so arrow events will activate the
|
|
654
|
+
* correct options, or to 0 if the consumer opted into it.
|
|
655
|
+
*/
|
|
656
|
+
resetActiveItem() {
|
|
657
|
+
if (this.autocomplete.autoActiveFirstOption) {
|
|
658
|
+
this.autocomplete.keyManager.setFirstItemActive();
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
this.autocomplete.keyManager.setActiveItem(-1);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
canOpen() {
|
|
665
|
+
const element = this.elementRef.nativeElement;
|
|
666
|
+
return !element.readOnly && !element.disabled && !this._autocompleteDisabled;
|
|
667
|
+
}
|
|
668
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteTrigger, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.Overlay }, { token: i0.NgZone }, { token: KBQ_AUTOCOMPLETE_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: i3.KbqFormField, host: true, optional: true }, { token: DOCUMENT, optional: true }, { token: i4.ViewportRuler }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
669
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqAutocompleteTrigger, selector: "input[mcAutocomplete], textarea[mcAutocomplete]", inputs: { autocomplete: ["mcAutocomplete", "autocomplete"], connectedTo: ["mcAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["mcAutocompleteDisabled", "autocompleteDisabled"] }, host: { listeners: { "focusin": "handleFocus()", "blur": "onTouched()", "input": "handleInput($event)", "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, properties: { "attr.autocomplete": "autocompleteAttribute" }, classAttribute: "kbq-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["mcAutocompleteTrigger"], ngImport: i0 }); }
|
|
670
|
+
}
|
|
671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteTrigger, decorators: [{
|
|
672
|
+
type: Directive,
|
|
673
|
+
args: [{
|
|
674
|
+
selector: `input[mcAutocomplete], textarea[mcAutocomplete]`,
|
|
675
|
+
host: {
|
|
676
|
+
class: 'kbq-autocomplete-trigger',
|
|
677
|
+
'[attr.autocomplete]': 'autocompleteAttribute',
|
|
678
|
+
// Note: we use `focusin`, as opposed to `focus`, in order to open the panel
|
|
679
|
+
// a little earlier. This avoids issues where IE delays the focusing of the input.
|
|
680
|
+
'(focusin)': 'handleFocus()',
|
|
681
|
+
'(blur)': 'onTouched()',
|
|
682
|
+
'(input)': 'handleInput($event)',
|
|
683
|
+
'(keydown)': 'handleKeydown($event)',
|
|
684
|
+
'(click)': 'handleClick($event)'
|
|
685
|
+
},
|
|
686
|
+
exportAs: 'mcAutocompleteTrigger',
|
|
687
|
+
providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]
|
|
688
|
+
}]
|
|
689
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.Overlay }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
690
|
+
type: Inject,
|
|
691
|
+
args: [KBQ_AUTOCOMPLETE_SCROLL_STRATEGY]
|
|
692
|
+
}] }, { type: i2.Directionality, decorators: [{
|
|
693
|
+
type: Optional
|
|
694
|
+
}] }, { type: i3.KbqFormField, decorators: [{
|
|
695
|
+
type: Optional
|
|
696
|
+
}, {
|
|
697
|
+
type: Host
|
|
698
|
+
}] }, { type: undefined, decorators: [{
|
|
699
|
+
type: Optional
|
|
700
|
+
}, {
|
|
701
|
+
type: Inject,
|
|
702
|
+
args: [DOCUMENT]
|
|
703
|
+
}] }, { type: i4.ViewportRuler }]; }, propDecorators: { autocomplete: [{
|
|
704
|
+
type: Input,
|
|
705
|
+
args: ['mcAutocomplete']
|
|
706
|
+
}], connectedTo: [{
|
|
707
|
+
type: Input,
|
|
708
|
+
args: ['mcAutocompleteConnectedTo']
|
|
709
|
+
}], autocompleteAttribute: [{
|
|
710
|
+
type: Input,
|
|
711
|
+
args: ['autocomplete']
|
|
712
|
+
}], autocompleteDisabled: [{
|
|
713
|
+
type: Input,
|
|
714
|
+
args: ['mcAutocompleteDisabled']
|
|
715
|
+
}] } });
|
|
716
|
+
|
|
717
|
+
class KbqAutocompleteModule {
|
|
718
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
719
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteModule, declarations: [KbqAutocomplete, KbqAutocompleteTrigger, KbqAutocompleteOrigin], imports: [KbqOptionModule, OverlayModule, KbqCommonModule, CommonModule], exports: [KbqAutocomplete,
|
|
720
|
+
KbqOptionModule,
|
|
721
|
+
KbqAutocompleteTrigger,
|
|
722
|
+
KbqAutocompleteOrigin,
|
|
723
|
+
KbqCommonModule] }); }
|
|
724
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteModule, providers: [KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [KbqOptionModule, OverlayModule, KbqCommonModule, CommonModule, KbqOptionModule,
|
|
725
|
+
KbqCommonModule] }); }
|
|
726
|
+
}
|
|
727
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqAutocompleteModule, decorators: [{
|
|
728
|
+
type: NgModule,
|
|
729
|
+
args: [{
|
|
730
|
+
imports: [KbqOptionModule, OverlayModule, KbqCommonModule, CommonModule],
|
|
731
|
+
exports: [
|
|
732
|
+
KbqAutocomplete,
|
|
733
|
+
KbqOptionModule,
|
|
734
|
+
KbqAutocompleteTrigger,
|
|
735
|
+
KbqAutocompleteOrigin,
|
|
736
|
+
KbqCommonModule
|
|
737
|
+
],
|
|
738
|
+
declarations: [KbqAutocomplete, KbqAutocompleteTrigger, KbqAutocompleteOrigin],
|
|
739
|
+
providers: [KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
740
|
+
}]
|
|
741
|
+
}] });
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Generated bundle index. Do not edit.
|
|
745
|
+
*/
|
|
746
|
+
|
|
747
|
+
export { AUTOCOMPLETE_BORDER_WIDTH, AUTOCOMPLETE_OPTION_HEIGHT, AUTOCOMPLETE_PANEL_HEIGHT, KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS, KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, KBQ_AUTOCOMPLETE_SCROLL_STRATEGY, KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, KBQ_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqAutocomplete, KbqAutocompleteModule, KbqAutocompleteOrigin, KbqAutocompleteSelectedEvent, KbqAutocompleteTrigger, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, getKbqAutocompleteMissingPanelError };
|
|
748
|
+
//# sourceMappingURL=koobiq-components-autocomplete.mjs.map
|