@koobiq/components 16.0.0-beta.1 → 16.0.0-beta.10
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 +1 -1
- package/README.md +2 -2
- package/autocomplete/_autocomplete-theme.scss +3 -10
- package/autocomplete/autocomplete-origin.directive.d.ts +1 -1
- package/autocomplete/autocomplete-trigger.directive.d.ts +6 -16
- package/autocomplete/autocomplete.component.d.ts +1 -1
- package/autocomplete/autocomplete.scss +0 -8
- package/badge/README.md +0 -0
- package/{core/styles/theming/_badges-theme.scss → badge/_badge-theme.scss} +14 -13
- package/badge/badge.component.d.ts +44 -0
- package/badge/badge.component.scss +83 -0
- package/badge/badge.module.d.ts +10 -0
- package/badge/index.d.ts +1 -0
- package/badge/public-api.d.ts +2 -0
- package/button/_button-base.scss +1 -1
- package/button/_button-theme.scss +35 -27
- package/button/button.scss +5 -2
- package/button-toggle/_button-toggle-theme.scss +26 -45
- package/button-toggle/button-toggle.component.d.ts +2 -2
- package/button-toggle/button-toggle.scss +40 -87
- package/card/_card-theme.scss +1 -1
- package/checkbox/README.md +1 -1
- package/checkbox/_checkbox-theme.scss +10 -2
- package/checkbox/checkbox.d.ts +2 -2
- package/code-block/README.md +14 -14
- package/code-block/_code-block-theme.scss +8 -0
- package/code-block/code-block.component.d.ts +1 -1
- package/core/animation/index.d.ts +1 -1
- package/core/animation/select-animations.d.ts +1 -1
- package/core/common-behaviors/color.d.ts +1 -1
- package/core/common-behaviors/common-module.d.ts +1 -1
- package/core/formatters/index.d.ts +1 -1
- package/core/formatters/number/formatter.d.ts +56 -1
- package/core/forms/_forms-theme.scss +4 -4
- package/core/forms/_forms.scss +1 -3
- package/core/forms/forms.directive.d.ts +2 -2
- package/core/locales/en-US.d.ts +19 -1
- package/core/locales/es-LA.d.ts +27 -0
- package/core/locales/fa-IR.d.ts +28 -0
- package/core/locales/locale-service.d.ts +148 -3
- package/core/locales/pt-BR.d.ts +27 -0
- package/core/locales/ru-RU.d.ts +20 -1
- package/core/locales/zh-CN.d.ts +26 -0
- package/core/option/_optgroup-theme.scss +1 -1
- package/core/option/_option-action-theme.scss +1 -1
- package/core/option/_option-theme.scss +37 -14
- package/core/option/action.d.ts +1 -1
- package/core/option/action.scss +4 -5
- package/core/option/optgroup.d.ts +1 -1
- package/core/option/option.d.ts +37 -8
- package/core/option/option.scss +5 -50
- package/core/overlay/overlay-position-map.d.ts +7 -1
- package/core/pop-up/constants.d.ts +2 -1
- package/core/public-api.d.ts +1 -0
- package/core/select/constants.d.ts +2 -2
- package/core/services/theme.service.d.ts +23 -0
- package/core/styles/_koobiq-theme.scss +12 -1
- package/core/styles/_tokens.kbq.import.scss +4 -4
- package/core/styles/_tokens.scss +4 -4
- package/core/styles/_variables.scss +1 -0
- package/core/styles/common/_animation.scss +10 -6
- package/core/styles/common/_list.scss +123 -0
- package/core/styles/common/_overlay.scss +1 -1
- package/core/styles/common/_select.scss +232 -0
- package/core/styles/theming/_components-theming.scss +685 -92
- package/core/styles/theming/_theming.scss +201 -30
- package/core/styles/typography/_typography.scss +175 -5
- package/datepicker/_datepicker-theme.scss +43 -57
- package/datepicker/calendar-body.component.d.ts +1 -1
- package/datepicker/calendar-body.scss +11 -26
- package/datepicker/calendar-header.component.d.ts +9 -3
- package/datepicker/calendar-header.scss +7 -31
- package/datepicker/calendar.component.d.ts +4 -5
- package/datepicker/calendar.scss +20 -25
- package/datepicker/datepicker-animations.d.ts +2 -2
- package/datepicker/datepicker-content.scss +17 -10
- package/datepicker/datepicker-input.directive.d.ts +4 -4
- package/datepicker/datepicker-input.scss +1 -1
- package/datepicker/datepicker-toggle.component.d.ts +3 -3
- package/datepicker/datepicker.component.d.ts +2 -2
- package/datepicker/month-view.component.d.ts +5 -6
- package/dl/_dl-theme.scss +2 -56
- package/dl/dl.component.d.ts +1 -2
- package/dl/dl.scss +10 -47
- package/dropdown/_dropdown-theme.scss +29 -37
- package/dropdown/dropdown-animations.d.ts +1 -1
- package/dropdown/dropdown-content.directive.d.ts +1 -1
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +18 -40
- package/dropdown/dropdown-trigger.directive.d.ts +2 -2
- package/dropdown/dropdown.component.d.ts +1 -1
- package/dropdown/dropdown.scss +16 -39
- package/dropdown/dropdown.types.d.ts +1 -1
- package/esm2022/alert/alert.component.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +34 -31
- package/esm2022/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/badge/badge.component.mjs +122 -0
- package/esm2022/badge/badge.module.mjs +40 -0
- package/esm2022/badge/index.mjs +2 -0
- package/esm2022/badge/koobiq-components-badge.mjs +5 -0
- package/esm2022/badge/public-api.mjs +3 -0
- package/esm2022/button/button.component.mjs +4 -3
- package/esm2022/button-toggle/button-toggle.component.mjs +15 -15
- package/esm2022/checkbox/checkbox.mjs +4 -4
- package/esm2022/code-block/actionbar.component.mjs +3 -3
- package/esm2022/code-block/code-block.component.mjs +4 -4
- package/esm2022/core/animation/index.mjs +2 -2
- package/esm2022/core/animation/select-animations.mjs +4 -4
- package/esm2022/core/common-behaviors/color.mjs +1 -1
- package/esm2022/core/common-behaviors/common-module.mjs +2 -2
- package/esm2022/core/formatters/index.mjs +10 -2
- package/esm2022/core/formatters/number/formatter.mjs +224 -3
- package/esm2022/core/forms/forms.directive.mjs +5 -5
- package/esm2022/core/locales/en-US.mjs +22 -4
- package/esm2022/core/locales/es-LA.mjs +31 -2
- package/esm2022/core/locales/fa-IR.mjs +30 -2
- package/esm2022/core/locales/locale-service.mjs +4 -4
- package/esm2022/core/locales/pt-BR.mjs +29 -2
- package/esm2022/core/locales/ru-RU.mjs +23 -2
- package/esm2022/core/locales/zh-CN.mjs +28 -2
- package/esm2022/core/option/action.mjs +8 -7
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +47 -10
- package/esm2022/core/overlay/overlay-position-map.mjs +8 -1
- package/esm2022/core/pop-up/constants.mjs +2 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +12 -3
- package/esm2022/core/public-api.mjs +2 -1
- package/esm2022/core/select/constants.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/services/theme.service.mjs +60 -0
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +7 -5
- package/esm2022/datepicker/calendar-header.component.mjs +9 -8
- package/esm2022/datepicker/calendar.component.mjs +8 -17
- package/esm2022/datepicker/datepicker-animations.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.directive.mjs +29 -20
- package/esm2022/datepicker/datepicker-toggle.component.mjs +6 -6
- package/esm2022/datepicker/datepicker.component.mjs +12 -12
- package/esm2022/datepicker/month-view.component.mjs +9 -18
- package/esm2022/dl/dl.component.mjs +3 -7
- package/esm2022/dropdown/dropdown-animations.mjs +4 -4
- package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2022/dropdown/dropdown-errors.mjs +6 -6
- package/esm2022/dropdown/dropdown-item.component.mjs +7 -6
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +10 -9
- package/esm2022/dropdown/dropdown.component.mjs +9 -9
- package/esm2022/dropdown/dropdown.types.mjs +1 -1
- package/esm2022/file-upload/file-drop.mjs +43 -6
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +13 -9
- package/esm2022/file-upload/single-file-upload.component.mjs +16 -13
- package/esm2022/form-field/cleaner.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +12 -15
- package/esm2022/form-field/hint.mjs +16 -6
- package/esm2022/form-field/password-hint.mjs +25 -16
- package/esm2022/form-field/password-toggle.mjs +29 -12
- package/esm2022/form-field/prefix.mjs +3 -3
- package/esm2022/form-field/suffix.mjs +3 -3
- package/esm2022/form-field/validate.directive.mjs +15 -9
- package/esm2022/icon/icon-button.component.mjs +68 -0
- package/esm2022/icon/icon-item.component.mjs +27 -0
- package/esm2022/icon/icon.component.mjs +5 -90
- package/esm2022/icon/icon.module.mjs +4 -2
- package/esm2022/icon/public-api.mjs +3 -1
- package/esm2022/input/input-errors.mjs +2 -2
- package/esm2022/input/input-number.mjs +260 -44
- package/esm2022/input/input-password.mjs +5 -5
- package/esm2022/input/input.mjs +7 -7
- package/esm2022/link/link.component.mjs +14 -13
- package/esm2022/list/list-selection.component.mjs +23 -10
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/list/list.module.mjs +8 -4
- package/esm2022/loader-overlay/loader-overlay.component.mjs +20 -19
- package/esm2022/modal/modal-control.service.mjs +5 -5
- package/esm2022/modal/modal-ref.class.mjs +1 -1
- package/esm2022/modal/modal.component.mjs +129 -134
- package/esm2022/modal/modal.module.mjs +13 -7
- package/esm2022/modal/modal.service.mjs +23 -23
- package/esm2022/modal/modal.type.mjs +1 -3
- package/esm2022/navbar/navbar-item.component.mjs +19 -18
- package/esm2022/navbar/navbar.component.mjs +18 -9
- package/esm2022/navbar/vertical-navbar.animation.mjs +2 -2
- package/esm2022/navbar/vertical-navbar.component.mjs +9 -6
- package/esm2022/popover/popover-animations.mjs +2 -2
- package/esm2022/popover/popover-confirm.component.mjs +9 -11
- package/esm2022/popover/popover.component.mjs +24 -24
- package/esm2022/progress-spinner/progress-spinner.component.mjs +1 -1
- package/esm2022/radio/radio.component.mjs +11 -8
- package/esm2022/risk-level/index.mjs +2 -0
- package/esm2022/risk-level/koobiq-components-risk-level.mjs +5 -0
- package/esm2022/risk-level/public-api.mjs +3 -0
- package/esm2022/risk-level/risk-level.component.mjs +40 -0
- package/esm2022/risk-level/risk-level.module.mjs +28 -0
- package/esm2022/select/select-option.directive.mjs +15 -3
- package/esm2022/select/select.component.mjs +47 -29
- package/esm2022/sidebar/sidebar-animations.mjs +2 -2
- package/esm2022/sidebar/sidebar.component.mjs +9 -9
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-directives.mjs +8 -10
- package/esm2022/sidepanel/sidepanel.module.mjs +10 -4
- package/esm2022/splitter/splitter.component.mjs +3 -3
- package/esm2022/table/table.component.mjs +3 -3
- package/esm2022/tabs/paginated-tab-header.mjs +11 -2
- package/esm2022/tabs/tab-body.component.mjs +7 -7
- package/esm2022/tabs/tab-content.directive.mjs +3 -3
- package/esm2022/tabs/tab-group.component.mjs +16 -21
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -3
- package/esm2022/tabs/tab-label.directive.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +21 -10
- package/esm2022/tabs/tab.component.mjs +14 -5
- package/esm2022/tabs/tabs-animations.mjs +2 -2
- package/esm2022/tabs/tabs.module.mjs +2 -6
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +17 -15
- package/esm2022/tags/tag-list.component.mjs +15 -10
- package/esm2022/tags/tag.component.mjs +16 -16
- package/esm2022/textarea/textarea.component.mjs +4 -4
- package/esm2022/timepicker/timepicker.directive.mjs +10 -10
- package/esm2022/timezone/timezone-option.component.mjs +4 -4
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/title/title.directive.mjs +6 -6
- package/esm2022/toast/toast-animations.mjs +2 -1
- package/esm2022/toast/toast-container.component.mjs +22 -8
- package/esm2022/toast/toast.component.mjs +30 -13
- package/esm2022/toast/toast.module.mjs +23 -8
- package/esm2022/toast/toast.service.mjs +2 -1
- package/esm2022/toast/toast.type.mjs +6 -1
- package/esm2022/toggle/toggle.component.mjs +4 -4
- package/esm2022/tooltip/tooltip.animations.mjs +2 -2
- package/esm2022/tooltip/tooltip.component.mjs +29 -28
- package/esm2022/tree/control/base-tree-control.mjs +1 -1
- package/esm2022/tree/control/flat-tree-control.mjs +4 -4
- package/esm2022/tree/control/tree-control.mjs +1 -1
- package/esm2022/tree/node.mjs +5 -5
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.directive.mjs +9 -9
- package/esm2022/tree/toggle.mjs +11 -12
- package/esm2022/tree/tree-base.mjs +3 -3
- package/esm2022/tree/tree-option.component.mjs +12 -10
- package/esm2022/tree/tree-selection.component.mjs +8 -6
- package/esm2022/tree/tree.mjs +3 -3
- package/esm2022/tree/tree.module.mjs +13 -4
- package/esm2022/tree-select/tree-select.component.mjs +28 -23
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +40 -37
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +166 -0
- package/fesm2022/koobiq-components-badge.mjs.map +1 -0
- package/fesm2022/koobiq-components-button-toggle.mjs +14 -14
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +3 -2
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +3 -3
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +5 -5
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +535 -46
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +73 -79
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +2 -6
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +33 -31
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +65 -21
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +96 -59
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +10 -8
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +269 -55
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +13 -12
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +31 -14
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +19 -18
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +164 -167
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +42 -33
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +32 -33
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +10 -7
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +72 -0
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -0
- package/fesm2022/koobiq-components-select.mjs +60 -30
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +8 -8
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +19 -14
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +2 -2
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +2 -2
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +74 -53
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +45 -38
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +3 -3
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +9 -9
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +7 -7
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +5 -5
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +71 -22
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +3 -3
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +29 -28
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +27 -22
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +67 -54
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +54 -40
- package/file-upload/file-drop.d.ts +3 -2
- package/file-upload/file-upload.d.ts +4 -1
- package/file-upload/file-upload.scss +2 -9
- package/file-upload/multiple-file-upload.component.d.ts +6 -5
- package/file-upload/multiple-file-upload.component.scss +170 -59
- package/file-upload/single-file-upload.component.d.ts +6 -5
- package/file-upload/single-file-upload.component.scss +42 -22
- package/form-field/_form-field-theme.scss +3 -6
- package/form-field/_hint-theme.scss +6 -2
- package/form-field/cleaner.d.ts +1 -1
- package/form-field/form-field.d.ts +3 -4
- package/form-field/form-field.scss +2 -2
- package/form-field/hint.d.ts +4 -1
- package/form-field/hint.scss +9 -1
- package/form-field/password-hint.d.ts +7 -3
- package/form-field/password-hint.scss +6 -0
- package/form-field/password-toggle.d.ts +13 -7
- package/form-field/prefix.d.ts +1 -1
- package/form-field/suffix.d.ts +1 -1
- package/form-field/validate.directive.d.ts +1 -1
- package/icon/_icon-button-theme.scss +129 -0
- package/icon/_icon-item-theme.scss +41 -0
- package/icon/_icon-theme.scss +1 -232
- package/icon/icon-button.component.d.ts +22 -0
- package/icon/icon-button.scss +33 -0
- package/icon/icon-item.component.d.ts +10 -0
- package/icon/icon-item.scss +18 -0
- package/icon/icon.component.d.ts +1 -25
- package/icon/icon.module.d.ts +6 -4
- package/icon/icon.scss +0 -41
- package/icon/public-api.d.ts +2 -0
- package/input/_input-theme.scss +2 -1
- package/input/input-number.d.ts +61 -10
- package/input/input-password.d.ts +1 -1
- package/input/input.d.ts +2 -2
- package/input/input.scss +3 -1
- package/link/_link-theme.scss +101 -92
- package/link/link.component.d.ts +4 -4
- package/list/_list-theme.scss +36 -17
- package/list/list-selection.component.d.ts +6 -2
- package/list/list.module.d.ts +1 -1
- package/list/list.scss +6 -19
- package/loader-overlay/_loader-overlay-theme.scss +43 -11
- package/loader-overlay/loader-overlay.component.d.ts +6 -5
- package/loader-overlay/loader-overlay.scss +56 -22
- package/markdown/_markdown-theme.scss +2 -2
- package/modal/README.md +5 -5
- package/modal/_modal-confirm.scss +5 -37
- package/modal/_modal-theme.scss +14 -52
- package/modal/modal-ref.class.d.ts +2 -2
- package/modal/modal.component.d.ts +53 -52
- package/modal/modal.module.d.ts +2 -1
- package/modal/modal.scss +50 -31
- package/modal/modal.type.d.ts +35 -36
- package/navbar/_navbar-theme.scss +2 -2
- package/navbar/navbar-item.component.d.ts +4 -3
- package/navbar/navbar.component.d.ts +5 -2
- package/navbar/vertical-navbar.component.d.ts +4 -2
- package/package.json +48 -38
- package/popover/README.md +14 -14
- package/popover/_popover-theme.scss +15 -78
- package/popover/popover-animations.d.ts +1 -1
- package/popover/popover-confirm.component.d.ts +1 -3
- package/popover/popover.component.d.ts +3 -3
- package/popover/popover.scss +60 -50
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-spinner/progress-spinner.component.d.ts +2 -2
- package/radio/_radio-theme.scss +17 -4
- package/radio/radio.component.d.ts +2 -2
- package/radio/radio.scss +13 -0
- package/risk-level/README.md +0 -0
- package/risk-level/_risk-level-theme.scss +88 -0
- package/risk-level/index.d.ts +1 -0
- package/risk-level/public-api.d.ts +2 -0
- package/risk-level/risk-level.component.d.ts +18 -0
- package/risk-level/risk-level.component.scss +26 -0
- package/risk-level/risk-level.module.d.ts +10 -0
- package/select/_select-theme.scss +12 -4
- package/select/select-option.directive.d.ts +2 -0
- package/select/select.component.d.ts +15 -12
- package/select/select.scss +6 -190
- package/sidebar/sidebar-animations.d.ts +1 -1
- package/sidebar/sidebar.component.d.ts +3 -3
- package/sidepanel/_sidepanel-theme.scss +11 -41
- package/sidepanel/sidepanel-directives.d.ts +0 -2
- package/sidepanel/sidepanel.scss +33 -35
- package/splitter/_splitter-theme.scss +1 -0
- package/splitter/splitter.component.d.ts +1 -1
- package/table/_table-theme.scss +1 -1
- package/table/table.component.d.ts +1 -1
- package/tabs/_tabs-common.scss +28 -147
- package/tabs/_tabs-theme.scss +81 -175
- package/tabs/paginated-tab-header.d.ts +1 -0
- package/tabs/tab-body.component.d.ts +1 -1
- package/tabs/tab-content.directive.d.ts +1 -1
- package/tabs/tab-group.component.d.ts +5 -8
- package/tabs/tab-group.scss +10 -10
- package/tabs/tab-header.scss +2 -24
- package/tabs/tab-label-wrapper.directive.d.ts +1 -1
- package/tabs/tab-label.directive.d.ts +1 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +4 -2
- package/tabs/tab-nav-bar/tab-nav-bar.scss +9 -16
- package/tabs/tab.component.d.ts +1 -1
- package/tabs/tabs-animations.d.ts +1 -1
- package/tabs/tabs.module.d.ts +1 -1
- package/tags/_tag-theme.scss +1 -25
- package/tags/tag-default-options.d.ts +4 -0
- package/tags/tag-input.d.ts +2 -2
- package/tags/tag-list.component.d.ts +3 -2
- package/tags/tag-list.scss +26 -16
- package/tags/tag.component.d.ts +6 -6
- package/textarea/textarea.component.d.ts +1 -1
- package/timepicker/timepicker.directive.d.ts +2 -2
- package/timezone/timezone-option.component.d.ts +1 -1
- package/timezone/timezone-select.component.d.ts +1 -1
- package/title/title.directive.d.ts +1 -1
- package/toast/_toast-theme.scss +21 -33
- package/toast/toast-animations.d.ts +1 -0
- package/toast/toast-container.component.d.ts +7 -3
- package/toast/toast-container.component.scss +2 -1
- package/toast/toast.component.d.ts +6 -1
- package/toast/toast.component.scss +41 -34
- package/toast/toast.module.d.ts +1 -1
- package/toast/toast.service.d.ts +2 -0
- package/toast/toast.type.d.ts +8 -5
- package/toggle/_toggle-theme.scss +9 -1
- package/toggle/toggle.component.d.ts +1 -1
- package/toggle/toggle.scss +5 -2
- package/tooltip/tooltip.animations.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +5 -5
- package/tree/_tree-theme.scss +46 -34
- package/tree/control/base-tree-control.d.ts +1 -1
- package/tree/control/tree-control.d.ts +1 -1
- package/tree/node.d.ts +1 -1
- package/tree/outlet.d.ts +1 -1
- package/tree/padding.directive.d.ts +1 -1
- package/tree/toggle.d.ts +3 -3
- package/tree/tree-base.d.ts +1 -1
- package/tree/tree-option.component.d.ts +1 -2
- package/tree/tree-option.scss +40 -27
- package/tree/tree-selection.component.d.ts +1 -1
- package/tree/tree.d.ts +1 -1
- package/tree/tree.module.d.ts +2 -1
- package/tree-select/_tree-select-theme.scss +13 -3
- package/tree-select/tree-select.component.d.ts +6 -4
- package/tree-select/tree-select.scss +5 -194
- package/core/styles/theming/_badges.scss +0 -57
- package/core/styles/theming/prebuilt/light-theme.scss +0 -20
- package/list/_list-base.scss +0 -54
|
@@ -7,7 +7,7 @@ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coerci
|
|
|
7
7
|
import * as i1 from '@mosaic-design/date-adapter';
|
|
8
8
|
import { DateAdapter as DateAdapter$1 } from '@mosaic-design/date-adapter';
|
|
9
9
|
import { DateFormatter as DateFormatter$1 } from '@mosaic-design/date-formatter';
|
|
10
|
-
import { BehaviorSubject, Subject } from 'rxjs';
|
|
10
|
+
import { BehaviorSubject, Subject, pairwise } from 'rxjs';
|
|
11
11
|
import * as i2 from '@angular/common';
|
|
12
12
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
13
13
|
import { ENTER, SPACE, TAB, ESCAPE } from '@koobiq/cdk/keycodes';
|
|
@@ -38,7 +38,7 @@ var AnimationCurves;
|
|
|
38
38
|
* const containing the metadata for one animation.
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const kbqSelectAnimations = {
|
|
42
42
|
/**
|
|
43
43
|
* This animation transforms the select's overlay panel on and off the page.
|
|
44
44
|
*
|
|
@@ -74,8 +74,8 @@ const mcSelectAnimations = {
|
|
|
74
74
|
])
|
|
75
75
|
])
|
|
76
76
|
};
|
|
77
|
-
const transformPanel =
|
|
78
|
-
const fadeInContent =
|
|
77
|
+
const transformPanel = kbqSelectAnimations.transformPanel;
|
|
78
|
+
const fadeInContent = kbqSelectAnimations.fadeInContent;
|
|
79
79
|
|
|
80
80
|
// Injection token that configures whether the koobiq sanity checks are enabled.
|
|
81
81
|
const KBQ_SANITY_CHECKS = new InjectionToken('kbq-sanity-checks', {
|
|
@@ -86,7 +86,7 @@ function mcSanityChecksFactory() {
|
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
* Module that captures anything that should be loaded and/or run for *all*
|
|
89
|
+
* Module that captures anything that should be loaded and/or run for *all* Koobiq
|
|
90
90
|
* components. This includes Bidi, etc.
|
|
91
91
|
*
|
|
92
92
|
* This module should be imported to each top-level component module (e.g., KbqTabsModule).
|
|
@@ -525,59 +525,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
525
525
|
}], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
|
|
526
526
|
|
|
527
527
|
const enUSLocaleData = {
|
|
528
|
-
en: {
|
|
528
|
+
'en-US': {
|
|
529
529
|
select: { hiddenItemsText: 'one more' },
|
|
530
530
|
datepicker: {
|
|
531
|
-
placeholder: 'dd
|
|
532
|
-
dateInput: 'dd
|
|
531
|
+
placeholder: 'yyyy-mm-dd',
|
|
532
|
+
dateInput: 'yyyy-MM-dd'
|
|
533
|
+
},
|
|
534
|
+
formatters: {
|
|
535
|
+
number: {
|
|
536
|
+
rounding: {
|
|
537
|
+
separator: '',
|
|
538
|
+
groupSeparator: '.',
|
|
539
|
+
thousand: 'K',
|
|
540
|
+
million: 'M',
|
|
541
|
+
billion: 'B',
|
|
542
|
+
trillion: 'T'
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
input: {
|
|
547
|
+
number: {
|
|
548
|
+
groupSeparator: [','],
|
|
549
|
+
fractionSeparator: '.'
|
|
550
|
+
}
|
|
533
551
|
}
|
|
534
552
|
}
|
|
535
553
|
};
|
|
536
554
|
|
|
537
555
|
const esLALocaleData = {
|
|
538
556
|
'es-LA': {
|
|
539
|
-
select: { hiddenItemsText: 'más' }
|
|
557
|
+
select: { hiddenItemsText: 'más' },
|
|
558
|
+
datepicker: {
|
|
559
|
+
placeholder: 'dd/mm/aaaa'
|
|
560
|
+
},
|
|
561
|
+
timepicker: {
|
|
562
|
+
placeholder: {
|
|
563
|
+
full: 'hh:mm:ss',
|
|
564
|
+
short: 'hh:mm'
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
formatters: {
|
|
568
|
+
number: {
|
|
569
|
+
rounding: {
|
|
570
|
+
separator: '',
|
|
571
|
+
groupSeparator: ',',
|
|
572
|
+
thousand: 'K',
|
|
573
|
+
million: 'M',
|
|
574
|
+
billion: 'MRD',
|
|
575
|
+
trillion: 'B'
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
input: {
|
|
580
|
+
number: {
|
|
581
|
+
// nbsp is generated automatically and used by default in spec
|
|
582
|
+
// tslint:disable-next-line:no-irregular-whitespace
|
|
583
|
+
groupSeparator: [' ', ' '],
|
|
584
|
+
fractionSeparator: ','
|
|
585
|
+
}
|
|
586
|
+
}
|
|
540
587
|
}
|
|
541
588
|
};
|
|
542
589
|
|
|
543
590
|
const faIRLocaleData = {
|
|
544
591
|
'fa-IR': {
|
|
545
|
-
select: { hiddenItemsText: 'أكثر' }
|
|
592
|
+
select: { hiddenItemsText: 'أكثر' },
|
|
593
|
+
datepicker: {
|
|
594
|
+
placeholder: 'روز/ ماه/سال'
|
|
595
|
+
},
|
|
596
|
+
timepicker: {
|
|
597
|
+
placeholder: {
|
|
598
|
+
full: 'ثانیه:دقیقه:ساعت',
|
|
599
|
+
short: 'دقیقه:ساعت'
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
formatters: {
|
|
603
|
+
number: {
|
|
604
|
+
rounding: {
|
|
605
|
+
separator: ' ',
|
|
606
|
+
groupSeparator: '٫',
|
|
607
|
+
thousand: 'هزار',
|
|
608
|
+
million: 'میلیون',
|
|
609
|
+
billion: 'م',
|
|
610
|
+
trillion: 'تریلیون',
|
|
611
|
+
rtl: true
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
input: {
|
|
616
|
+
number: {
|
|
617
|
+
groupSeparator: ['\u066C'],
|
|
618
|
+
fractionSeparator: '\u066B'
|
|
619
|
+
}
|
|
620
|
+
}
|
|
546
621
|
}
|
|
547
622
|
};
|
|
548
623
|
|
|
549
624
|
const ptBRLocaleData = {
|
|
550
625
|
'pt-BR': {
|
|
551
|
-
select: { hiddenItemsText: 'mais' }
|
|
626
|
+
select: { hiddenItemsText: 'mais' },
|
|
627
|
+
datepicker: {
|
|
628
|
+
placeholder: 'dd/mm/yyyy'
|
|
629
|
+
},
|
|
630
|
+
timepicker: {
|
|
631
|
+
placeholder: {
|
|
632
|
+
full: 'hh:mm:ss',
|
|
633
|
+
short: 'hh:mm'
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
formatters: {
|
|
637
|
+
number: {
|
|
638
|
+
rounding: {
|
|
639
|
+
separator: ' ',
|
|
640
|
+
groupSeparator: ',',
|
|
641
|
+
thousand: 'mil',
|
|
642
|
+
million: 'mi',
|
|
643
|
+
billion: 'bi',
|
|
644
|
+
trillion: 'tri'
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
input: {
|
|
649
|
+
number: {
|
|
650
|
+
groupSeparator: ['.'],
|
|
651
|
+
fractionSeparator: ','
|
|
652
|
+
}
|
|
653
|
+
}
|
|
552
654
|
}
|
|
553
655
|
};
|
|
554
656
|
|
|
555
657
|
const ruRULocaleData = {
|
|
556
|
-
ru: {
|
|
658
|
+
'ru-RU': {
|
|
557
659
|
select: { hiddenItemsText: 'еще' },
|
|
558
660
|
datepicker: {
|
|
559
661
|
placeholder: 'дд.мм.гггг',
|
|
560
662
|
dateInput: 'dd.MM.yyyy'
|
|
663
|
+
},
|
|
664
|
+
formatters: {
|
|
665
|
+
number: {
|
|
666
|
+
rounding: {
|
|
667
|
+
separator: ' ',
|
|
668
|
+
groupSeparator: ',',
|
|
669
|
+
thousand: 'К',
|
|
670
|
+
million: 'М',
|
|
671
|
+
billion: 'М',
|
|
672
|
+
trillion: 'Т'
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
input: {
|
|
677
|
+
number: {
|
|
678
|
+
// nbsp is generated automatically and used by default in spec
|
|
679
|
+
// tslint:disable-next-line:no-irregular-whitespace
|
|
680
|
+
groupSeparator: [' ', ' '],
|
|
681
|
+
fractionSeparator: ',',
|
|
682
|
+
startFormattingFrom: 4
|
|
683
|
+
}
|
|
561
684
|
}
|
|
562
685
|
}
|
|
563
686
|
};
|
|
564
687
|
|
|
565
688
|
const znCNLocaleData = {
|
|
566
689
|
'zh-CN': {
|
|
567
|
-
select: { hiddenItemsText: '更多的' }
|
|
690
|
+
select: { hiddenItemsText: '更多的' },
|
|
691
|
+
datepicker: {
|
|
692
|
+
placeholder: '年/月/日'
|
|
693
|
+
},
|
|
694
|
+
timepicker: {
|
|
695
|
+
placeholder: {
|
|
696
|
+
full: '时:分:秒',
|
|
697
|
+
short: '时:分'
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
formatters: {
|
|
701
|
+
number: {
|
|
702
|
+
rounding: {
|
|
703
|
+
separator: ' ',
|
|
704
|
+
groupSeparator: '.',
|
|
705
|
+
tenThousand: '万',
|
|
706
|
+
oneHundredMillions: '亿',
|
|
707
|
+
trillion: '兆'
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
input: {
|
|
712
|
+
number: {
|
|
713
|
+
groupSeparator: [','],
|
|
714
|
+
fractionSeparator: '.'
|
|
715
|
+
}
|
|
716
|
+
}
|
|
568
717
|
}
|
|
569
718
|
};
|
|
570
719
|
|
|
571
720
|
const KBQ_LOCALE_ID$1 = new InjectionToken('KbqLocaleId');
|
|
572
|
-
const KBQ_DEFAULT_LOCALE_ID = 'ru';
|
|
721
|
+
const KBQ_DEFAULT_LOCALE_ID = 'ru-RU';
|
|
573
722
|
function KBQ_DEFAULT_LOCALE_DATA_FACTORY() {
|
|
574
723
|
return {
|
|
575
724
|
items: [
|
|
576
|
-
{ id: 'en', name: 'English' },
|
|
725
|
+
{ id: 'en-US', name: 'English' },
|
|
577
726
|
{ id: 'zh-CN', name: '简体中文' },
|
|
578
727
|
{ id: 'es-LA', name: 'Español' },
|
|
579
728
|
{ id: 'pt-BR', name: 'Português' },
|
|
580
|
-
{ id: 'ru', name: 'Русский' },
|
|
729
|
+
{ id: 'ru-RU', name: 'Русский' },
|
|
581
730
|
{ id: 'fa-IR', name: 'فارسی' }
|
|
582
731
|
],
|
|
583
732
|
...ruRULocaleData,
|
|
@@ -672,8 +821,29 @@ const minIntGroupPosition = 1;
|
|
|
672
821
|
const minFractionGroupPosition = 3;
|
|
673
822
|
const maxFractionGroupPosition = 5;
|
|
674
823
|
const useGroupingPosition = 7;
|
|
824
|
+
// tslint:disable:no-magic-numbers
|
|
825
|
+
const ROUNDING_UNITS = {
|
|
826
|
+
thousand: 1e3,
|
|
827
|
+
tenThousand: 10 * 1e3,
|
|
828
|
+
million: 1e6,
|
|
829
|
+
oneHundredMillions: 100 * 1e6,
|
|
830
|
+
billion: 1e9,
|
|
831
|
+
trillion: 1e12
|
|
832
|
+
};
|
|
833
|
+
const intervalsConfig = {
|
|
834
|
+
supportedLanguages: ['ru-RU', 'en-US', 'es-LA', 'pt-BR', 'fa-IR'],
|
|
835
|
+
intervals: [
|
|
836
|
+
{ startRange: 1, endRange: ROUNDING_UNITS.thousand },
|
|
837
|
+
{ startRange: ROUNDING_UNITS.thousand, endRange: ROUNDING_UNITS.tenThousand, precision: 1 },
|
|
838
|
+
{ startRange: ROUNDING_UNITS.tenThousand, endRange: ROUNDING_UNITS.million },
|
|
839
|
+
{ startRange: ROUNDING_UNITS.million, endRange: ROUNDING_UNITS.million * 10, precision: 1 },
|
|
840
|
+
{ startRange: ROUNDING_UNITS.million * 10, endRange: ROUNDING_UNITS.billion }
|
|
841
|
+
]
|
|
842
|
+
};
|
|
843
|
+
// tslint:enable:no-magic-numbers
|
|
675
844
|
class ParsedDigitsInfo {
|
|
676
845
|
}
|
|
846
|
+
const defaultValueForGroupingInRULocale = 10000;
|
|
677
847
|
function parseDigitsInfo(digitsInfo) {
|
|
678
848
|
const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
|
|
679
849
|
if (parts === null) {
|
|
@@ -737,16 +907,28 @@ class KbqDecimalPipe {
|
|
|
737
907
|
...this.options,
|
|
738
908
|
...parsedDigitsInfo
|
|
739
909
|
};
|
|
910
|
+
if (this.isSpecialFormatForRULocale(currentLocale, value, parsedDigitsInfo?.useGrouping)) {
|
|
911
|
+
options.useGrouping = false;
|
|
912
|
+
}
|
|
740
913
|
try {
|
|
741
914
|
const num = strToNumber(value);
|
|
915
|
+
/* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
|
|
916
|
+
* But by default in es-LA locale is used `comma`.
|
|
917
|
+
* To reduce data manipulation, 'ru-RU' locale is used. */
|
|
918
|
+
if (currentLocale === 'es-LA') {
|
|
919
|
+
return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
|
|
920
|
+
}
|
|
742
921
|
return Intl.NumberFormat.call(this, currentLocale, options).format(num);
|
|
743
922
|
}
|
|
744
923
|
catch (error) {
|
|
745
924
|
throw Error(`InvalidPipeArgument: KbqDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
|
|
746
925
|
}
|
|
747
926
|
}
|
|
927
|
+
isSpecialFormatForRULocale(locale, value, grouping) {
|
|
928
|
+
return ['ru', 'ru-RU'].includes(locale) && grouping === undefined && value < defaultValueForGroupingInRULocale;
|
|
929
|
+
}
|
|
748
930
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: KBQ_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
749
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, name: "
|
|
931
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, name: "kbqNumber", pure: false }); }
|
|
750
932
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, providedIn: 'root' }); }
|
|
751
933
|
}
|
|
752
934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, decorators: [{
|
|
@@ -754,7 +936,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
754
936
|
args: [{ providedIn: 'root' }]
|
|
755
937
|
}, {
|
|
756
938
|
type: Pipe,
|
|
757
|
-
args: [{ name: '
|
|
939
|
+
args: [{ name: 'kbqNumber', pure: false }]
|
|
940
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
941
|
+
type: Optional
|
|
942
|
+
}, {
|
|
943
|
+
type: Inject,
|
|
944
|
+
args: [KBQ_LOCALE_ID]
|
|
945
|
+
}] }, { type: KbqLocaleService, decorators: [{
|
|
946
|
+
type: Optional
|
|
947
|
+
}, {
|
|
948
|
+
type: Inject,
|
|
949
|
+
args: [KBQ_LOCALE_SERVICE]
|
|
950
|
+
}] }, { type: ParsedDigitsInfo, decorators: [{
|
|
951
|
+
type: Optional
|
|
952
|
+
}, {
|
|
953
|
+
type: Inject,
|
|
954
|
+
args: [KBQ_NUMBER_FORMATTER_OPTIONS]
|
|
955
|
+
}] }]; } });
|
|
956
|
+
class KbqTableNumberPipe {
|
|
957
|
+
constructor(id, localeService, options) {
|
|
958
|
+
this.id = id;
|
|
959
|
+
this.localeService = localeService;
|
|
960
|
+
this.options = options;
|
|
961
|
+
this.options = this.options || KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS;
|
|
962
|
+
this.localeService?.changes
|
|
963
|
+
.subscribe((newId) => this.id = newId);
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* @param value The number to be formatted.
|
|
967
|
+
* @param digitsInfo Decimal representation options, specified by a string
|
|
968
|
+
* in the following format:<br>
|
|
969
|
+
* <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
|
|
970
|
+
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
|
|
971
|
+
* Default is `1`.
|
|
972
|
+
* - `minFractionDigits`: The minimum number of digits after the decimal point.
|
|
973
|
+
* Default is `0`.
|
|
974
|
+
* - `maxFractionDigits`: The maximum number of digits after the decimal point.
|
|
975
|
+
* Default is `3`.
|
|
976
|
+
* @param locale A locale code for the locale format rules to use.
|
|
977
|
+
* When not supplied, uses the value of `KBQ_LOCALE_ID`, which is `ru` by default.
|
|
978
|
+
*/
|
|
979
|
+
transform(value, digitsInfo, locale) {
|
|
980
|
+
if (isEmpty(value)) {
|
|
981
|
+
return null;
|
|
982
|
+
}
|
|
983
|
+
const currentLocale = locale || this.id || KBQ_DEFAULT_LOCALE_ID;
|
|
984
|
+
let parsedDigitsInfo;
|
|
985
|
+
if (digitsInfo) {
|
|
986
|
+
parsedDigitsInfo = parseDigitsInfo(digitsInfo);
|
|
987
|
+
}
|
|
988
|
+
const options = {
|
|
989
|
+
...this.options,
|
|
990
|
+
...parsedDigitsInfo
|
|
991
|
+
};
|
|
992
|
+
try {
|
|
993
|
+
const num = strToNumber(value);
|
|
994
|
+
/* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
|
|
995
|
+
* But by default in es-LA locale is used `comma`.
|
|
996
|
+
* To reduce data manipulation, 'ru-RU' locale is used. */
|
|
997
|
+
if (currentLocale === 'es-LA') {
|
|
998
|
+
return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
|
|
999
|
+
}
|
|
1000
|
+
return Intl.NumberFormat.call(this, currentLocale, options).format(num);
|
|
1001
|
+
}
|
|
1002
|
+
catch (error) {
|
|
1003
|
+
throw Error(`InvalidPipeArgument: KbqTableNumberPipe for pipe '${JSON.stringify(error.message)}'`);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: KBQ_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1007
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, name: "kbqTableNumber", pure: false }); }
|
|
1008
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, providedIn: 'root' }); }
|
|
1009
|
+
}
|
|
1010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, decorators: [{
|
|
1011
|
+
type: Injectable,
|
|
1012
|
+
args: [{ providedIn: 'root' }]
|
|
1013
|
+
}, {
|
|
1014
|
+
type: Pipe,
|
|
1015
|
+
args: [{ name: 'kbqTableNumber', pure: false }]
|
|
758
1016
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
759
1017
|
type: Optional
|
|
760
1018
|
}, {
|
|
@@ -771,10 +1029,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
771
1029
|
type: Inject,
|
|
772
1030
|
args: [KBQ_NUMBER_FORMATTER_OPTIONS]
|
|
773
1031
|
}] }]; } });
|
|
1032
|
+
function isWithin(startRange, endRange, valueToCheck) {
|
|
1033
|
+
return startRange <= valueToCheck && valueToCheck < endRange;
|
|
1034
|
+
}
|
|
1035
|
+
class KbqRoundDecimalPipe {
|
|
1036
|
+
constructor(id, localeService) {
|
|
1037
|
+
this.id = id;
|
|
1038
|
+
this.localeService = localeService;
|
|
1039
|
+
this.localeService?.changes
|
|
1040
|
+
.subscribe((newId) => this.id = newId);
|
|
1041
|
+
}
|
|
1042
|
+
transform(value, locale) {
|
|
1043
|
+
if (isEmpty(value)) {
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
const currentLocale = locale || this.id || KBQ_DEFAULT_LOCALE_ID;
|
|
1047
|
+
this.roundingOptions = this.localeService.locales[currentLocale].formatters.number.rounding;
|
|
1048
|
+
try {
|
|
1049
|
+
const num = strToNumber(value);
|
|
1050
|
+
const unit = this.calculateUnit(num);
|
|
1051
|
+
if (!unit) {
|
|
1052
|
+
return Intl.NumberFormat.call(this, currentLocale, { useGrouping: false }).format(num);
|
|
1053
|
+
}
|
|
1054
|
+
let parts = {};
|
|
1055
|
+
if (intervalsConfig.supportedLanguages.includes(currentLocale)) {
|
|
1056
|
+
intervalsConfig.intervals
|
|
1057
|
+
.find(({ startRange, endRange, precision }) => {
|
|
1058
|
+
const within = isWithin(startRange, endRange, num);
|
|
1059
|
+
if (within) {
|
|
1060
|
+
if (precision) {
|
|
1061
|
+
parts = unit === 'thousand' ?
|
|
1062
|
+
this.calculatePartsForThousands(num) :
|
|
1063
|
+
{
|
|
1064
|
+
num: Math.trunc(num / ROUNDING_UNITS[unit]),
|
|
1065
|
+
fraction: this.calculateDecimal(num, ROUNDING_UNITS[unit])
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
parts = { num: Math.round(num / ROUNDING_UNITS[unit]) };
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return within;
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
parts = parts.num ? parts : {
|
|
1076
|
+
num: Math.trunc(num / ROUNDING_UNITS[unit]),
|
|
1077
|
+
fraction: this.calculateDecimal(num, ROUNDING_UNITS[unit])
|
|
1078
|
+
};
|
|
1079
|
+
Object.keys(parts).forEach((key) => {
|
|
1080
|
+
parts[key] = Intl.NumberFormat.call(this, currentLocale, { useGrouping: false }).format(parts[key]);
|
|
1081
|
+
});
|
|
1082
|
+
const calculatedValue = parts.fraction
|
|
1083
|
+
? `${parts.num}${this.roundingOptions.groupSeparator}${parts.fraction}`
|
|
1084
|
+
: `${parts.num}`;
|
|
1085
|
+
return `${calculatedValue}${this.roundingOptions.separator}${this.roundingOptions[unit]}`;
|
|
1086
|
+
}
|
|
1087
|
+
catch (error) {
|
|
1088
|
+
throw Error(`InvalidPipeArgument: KbqRoundDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
calculateDecimal(num, divider) {
|
|
1092
|
+
/* tslint:disable-next-line:no-magic-numbers */
|
|
1093
|
+
return Math.round(num / divider % 1 * 10);
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* 2 * 1000 is a number in the interval of [1500...2500)
|
|
1097
|
+
*
|
|
1098
|
+
* 2,0 * 1000 is a number in the interval of [1950...2050)
|
|
1099
|
+
*/
|
|
1100
|
+
calculatePartsForThousands(num) {
|
|
1101
|
+
const dividedValue = num / ROUNDING_UNITS.thousand;
|
|
1102
|
+
const div = Math.round(dividedValue) * ROUNDING_UNITS.thousand;
|
|
1103
|
+
const fifty = 50;
|
|
1104
|
+
return isWithin(div - fifty, div + fifty, num)
|
|
1105
|
+
? { num: Math.round(dividedValue), fraction: 0 }
|
|
1106
|
+
: { num: Math.round(dividedValue) };
|
|
1107
|
+
}
|
|
1108
|
+
calculateUnit(num) {
|
|
1109
|
+
let currentUnit;
|
|
1110
|
+
const localizedOptions = Object.keys(this.roundingOptions);
|
|
1111
|
+
Object.keys(ROUNDING_UNITS).every((key) => {
|
|
1112
|
+
if (!localizedOptions.includes(key)) {
|
|
1113
|
+
return true;
|
|
1114
|
+
}
|
|
1115
|
+
if (num / ROUNDING_UNITS[key] >= 1) {
|
|
1116
|
+
currentUnit = key;
|
|
1117
|
+
return true;
|
|
1118
|
+
}
|
|
1119
|
+
return false;
|
|
1120
|
+
});
|
|
1121
|
+
return currentUnit;
|
|
1122
|
+
}
|
|
1123
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1124
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, name: "kbqRoundNumber", pure: false }); }
|
|
1125
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, providedIn: 'root' }); }
|
|
1126
|
+
}
|
|
1127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, decorators: [{
|
|
1128
|
+
type: Injectable,
|
|
1129
|
+
args: [{ providedIn: 'root' }]
|
|
1130
|
+
}, {
|
|
1131
|
+
type: Pipe,
|
|
1132
|
+
args: [{ name: 'kbqRoundNumber', pure: false }]
|
|
1133
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1134
|
+
type: Optional
|
|
1135
|
+
}, {
|
|
1136
|
+
type: Inject,
|
|
1137
|
+
args: [KBQ_LOCALE_ID]
|
|
1138
|
+
}] }, { type: KbqLocaleService, decorators: [{
|
|
1139
|
+
type: Optional
|
|
1140
|
+
}, {
|
|
1141
|
+
type: Inject,
|
|
1142
|
+
args: [KBQ_LOCALE_SERVICE]
|
|
1143
|
+
}] }]; } });
|
|
774
1144
|
|
|
775
1145
|
class KbqFormattersModule {
|
|
776
1146
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
777
1147
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqFormattersModule, declarations: [KbqDecimalPipe,
|
|
1148
|
+
KbqRoundDecimalPipe,
|
|
1149
|
+
KbqTableNumberPipe,
|
|
778
1150
|
AbsoluteDateFormatterPipe,
|
|
779
1151
|
AbsoluteDateTimeFormatterPipe,
|
|
780
1152
|
AbsoluteDateShortFormatterPipe,
|
|
@@ -788,6 +1160,8 @@ class KbqFormattersModule {
|
|
|
788
1160
|
RangeDateTimeFormatterPipe,
|
|
789
1161
|
RangeShortDateTimeFormatterPipe,
|
|
790
1162
|
RangeMiddleDateTimeFormatterPipe], exports: [KbqDecimalPipe,
|
|
1163
|
+
KbqRoundDecimalPipe,
|
|
1164
|
+
KbqTableNumberPipe,
|
|
791
1165
|
AbsoluteDateFormatterPipe,
|
|
792
1166
|
AbsoluteDateTimeFormatterPipe,
|
|
793
1167
|
AbsoluteDateShortFormatterPipe,
|
|
@@ -808,6 +1182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
808
1182
|
args: [{
|
|
809
1183
|
declarations: [
|
|
810
1184
|
KbqDecimalPipe,
|
|
1185
|
+
KbqRoundDecimalPipe,
|
|
1186
|
+
KbqTableNumberPipe,
|
|
811
1187
|
AbsoluteDateFormatterPipe,
|
|
812
1188
|
AbsoluteDateTimeFormatterPipe,
|
|
813
1189
|
AbsoluteDateShortFormatterPipe,
|
|
@@ -824,6 +1200,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
824
1200
|
],
|
|
825
1201
|
exports: [
|
|
826
1202
|
KbqDecimalPipe,
|
|
1203
|
+
KbqRoundDecimalPipe,
|
|
1204
|
+
KbqTableNumberPipe,
|
|
827
1205
|
AbsoluteDateFormatterPipe,
|
|
828
1206
|
AbsoluteDateTimeFormatterPipe,
|
|
829
1207
|
AbsoluteDateShortFormatterPipe,
|
|
@@ -868,13 +1246,13 @@ class KbqFormElement {
|
|
|
868
1246
|
}
|
|
869
1247
|
}
|
|
870
1248
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
871
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", host: { properties: { "class.kbq-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["
|
|
1249
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", host: { properties: { "class.kbq-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["kbqFormElement"], ngImport: i0 }); }
|
|
872
1250
|
}
|
|
873
1251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormElement, decorators: [{
|
|
874
1252
|
type: Directive,
|
|
875
1253
|
args: [{
|
|
876
1254
|
selector: '.kbq-form__row, .kbq-form__fieldset, .kbq-form__legend',
|
|
877
|
-
exportAs: '
|
|
1255
|
+
exportAs: 'kbqFormElement',
|
|
878
1256
|
host: {
|
|
879
1257
|
'[class.kbq-form-row_margin]': 'margin'
|
|
880
1258
|
}
|
|
@@ -897,13 +1275,13 @@ class KbqForm {
|
|
|
897
1275
|
});
|
|
898
1276
|
}
|
|
899
1277
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
900
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", host: { classAttribute: "kbq-form" }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["
|
|
1278
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", host: { classAttribute: "kbq-form" }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["kbqForm"], ngImport: i0 }); }
|
|
901
1279
|
}
|
|
902
1280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqForm, decorators: [{
|
|
903
1281
|
type: Directive,
|
|
904
1282
|
args: [{
|
|
905
1283
|
selector: '.kbq-form-vertical, .kbq-form-horizontal',
|
|
906
|
-
exportAs: '
|
|
1284
|
+
exportAs: 'kbqForm',
|
|
907
1285
|
host: {
|
|
908
1286
|
class: 'kbq-form'
|
|
909
1287
|
}
|
|
@@ -1058,11 +1436,11 @@ class KbqOptgroup extends KbqOptgroupMixinBase {
|
|
|
1058
1436
|
this.labelId = `kbq-optgroup-label-${uniqueOptgroupIdCounter++}`;
|
|
1059
1437
|
}
|
|
1060
1438
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1061
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptgroup, selector: "kbq-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["
|
|
1439
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptgroup, selector: "kbq-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["kbqOptgroup"], usesInheritance: true, ngImport: i0, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\"></ng-content>\n", styles: [".kbq-optgroup-label{padding-left:var(--kbq-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1062
1440
|
}
|
|
1063
1441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptgroup, decorators: [{
|
|
1064
1442
|
type: Component,
|
|
1065
|
-
args: [{ selector: 'kbq-optgroup', exportAs: '
|
|
1443
|
+
args: [{ selector: 'kbq-optgroup', exportAs: 'kbqOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
|
|
1066
1444
|
class: 'kbq-optgroup',
|
|
1067
1445
|
'[class.kbq-disabled]': 'disabled'
|
|
1068
1446
|
}, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\"></ng-content>\n", styles: [".kbq-optgroup-label{padding-left:var(--kbq-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
|
|
@@ -1100,7 +1478,7 @@ class KbqPseudoCheckbox extends KbqPseudoCheckboxMixinBase {
|
|
|
1100
1478
|
this.disabled = false;
|
|
1101
1479
|
}
|
|
1102
1480
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqPseudoCheckbox, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1103
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: { color: "color", big: "big", state: "state", disabled: "disabled" }, host: { properties: { "class.kbq-checkbox_big": "big", "class.kbq-indeterminate": "state === \"indeterminate\"", "class.kbq-checked": "state === \"checked\"", "class.kbq-disabled": "disabled" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark mc
|
|
1481
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: { color: "color", big: "big", state: "state", disabled: "disabled" }, host: { properties: { "class.kbq-checkbox_big": "big", "class.kbq-indeterminate": "state === \"indeterminate\"", "class.kbq-checked": "state === \"checked\"", "class.kbq-disabled": "disabled" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1104
1482
|
}
|
|
1105
1483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqPseudoCheckbox, decorators: [{
|
|
1106
1484
|
type: Component,
|
|
@@ -1110,7 +1488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
1110
1488
|
'[class.kbq-indeterminate]': 'state === "indeterminate"',
|
|
1111
1489
|
'[class.kbq-checked]': 'state === "checked"',
|
|
1112
1490
|
'[class.kbq-disabled]': 'disabled'
|
|
1113
|
-
}, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"kbq-checkbox-checkmark mc
|
|
1491
|
+
}, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"kbq-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"] }]
|
|
1114
1492
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { big: [{
|
|
1115
1493
|
type: Input
|
|
1116
1494
|
}], state: [{
|
|
@@ -1135,10 +1513,49 @@ class KbqOptionSelectionChange {
|
|
|
1135
1513
|
* Injection token used to provide the parent component to options.
|
|
1136
1514
|
*/
|
|
1137
1515
|
const KBQ_OPTION_PARENT_COMPONENT = new InjectionToken('KBQ_OPTION_PARENT_COMPONENT');
|
|
1516
|
+
class KbqOptionBase {
|
|
1517
|
+
/** Emits the selection change event. */
|
|
1518
|
+
emitSelectionChangeEvent(isUserInput = false) {
|
|
1519
|
+
this.onSelectionChange.emit(new KbqOptionSelectionChange(this, isUserInput));
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
class KbqVirtualOption extends KbqOptionBase {
|
|
1523
|
+
get disabled() {
|
|
1524
|
+
return this._disabled;
|
|
1525
|
+
}
|
|
1526
|
+
set disabled(value) {
|
|
1527
|
+
this._disabled = coerceBooleanProperty(value);
|
|
1528
|
+
}
|
|
1529
|
+
get selected() {
|
|
1530
|
+
return this._selected;
|
|
1531
|
+
}
|
|
1532
|
+
get viewValue() {
|
|
1533
|
+
return this.value;
|
|
1534
|
+
}
|
|
1535
|
+
constructor(value, _disabled = false) {
|
|
1536
|
+
super();
|
|
1537
|
+
this.value = value;
|
|
1538
|
+
this._disabled = _disabled;
|
|
1539
|
+
this._selected = false;
|
|
1540
|
+
this.onSelectionChange = new EventEmitter();
|
|
1541
|
+
}
|
|
1542
|
+
select() {
|
|
1543
|
+
if (!this._selected) {
|
|
1544
|
+
this._selected = true;
|
|
1545
|
+
this.emitSelectionChangeEvent();
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
deselect() {
|
|
1549
|
+
if (this._selected) {
|
|
1550
|
+
this._selected = false;
|
|
1551
|
+
this.emitSelectionChangeEvent();
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1138
1555
|
/**
|
|
1139
1556
|
* Single option inside of a `<kbq-select>` element.
|
|
1140
1557
|
*/
|
|
1141
|
-
class KbqOption {
|
|
1558
|
+
class KbqOption extends KbqOptionBase {
|
|
1142
1559
|
get showCheckbox() {
|
|
1143
1560
|
return this._showCheckbox === undefined ? this.multiple : this._showCheckbox;
|
|
1144
1561
|
}
|
|
@@ -1179,6 +1596,7 @@ class KbqOption {
|
|
|
1179
1596
|
return this._active;
|
|
1180
1597
|
}
|
|
1181
1598
|
constructor(element, changeDetectorRef, parent, group) {
|
|
1599
|
+
super();
|
|
1182
1600
|
this.element = element;
|
|
1183
1601
|
this.changeDetectorRef = changeDetectorRef;
|
|
1184
1602
|
this.parent = parent;
|
|
@@ -1269,6 +1687,7 @@ class KbqOption {
|
|
|
1269
1687
|
this.selectViaInteraction();
|
|
1270
1688
|
// Prevent the page from scrolling down and form submits.
|
|
1271
1689
|
event.preventDefault();
|
|
1690
|
+
event.stopPropagation();
|
|
1272
1691
|
}
|
|
1273
1692
|
}
|
|
1274
1693
|
/**
|
|
@@ -1288,18 +1707,14 @@ class KbqOption {
|
|
|
1288
1707
|
getHostElement() {
|
|
1289
1708
|
return this.element.nativeElement;
|
|
1290
1709
|
}
|
|
1291
|
-
/** Emits the selection change event. */
|
|
1292
|
-
emitSelectionChangeEvent(isUserInput = false) {
|
|
1293
|
-
this.onSelectionChange.emit(new KbqOptionSelectionChange(this, isUserInput));
|
|
1294
|
-
}
|
|
1295
1710
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: KBQ_OPTION_PARENT_COMPONENT, optional: true }, { token: KbqOptgroup, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1296
1711
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOption, selector: "kbq-option", inputs: { value: "value", showCheckbox: "showCheckbox", disabled: "disabled" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "selectViaInteraction()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.kbq-selected": "selected", "class.kbq-option-multiple": "multiple", "class.kbq-active": "active", "class.kbq-disabled": "disabled", "id": "id" }, classAttribute: "kbq-option" }, providers: [{
|
|
1297
1712
|
provide: KBQ_TITLE_TEXT_REF, useExisting: KbqOption
|
|
1298
|
-
}], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["
|
|
1713
|
+
}], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqOption"], usesInheritance: true, ngImport: i0, template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content></ng-content>\n</span>\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,.04) 10px,rgba(255,255,255,.04) 10px,rgba(255,255,255,.04) 20px,rgba(0,0,0,.04) 20px,rgba(0,0,0,.04) 30px,rgba(255,255,255,.04) 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 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-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-list-size-container-content-gap-horizontal, 8px);border-width:var(--kbq-list-size-container-focus-outline-width, 2px);border-style:solid;border-color:transparent;padding:calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-right, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-left, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-list-size-container-content-gap-vertical, 2px)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["color", "big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1299
1714
|
}
|
|
1300
1715
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOption, decorators: [{
|
|
1301
1716
|
type: Component,
|
|
1302
|
-
args: [{ selector: 'kbq-option', exportAs: '
|
|
1717
|
+
args: [{ selector: 'kbq-option', exportAs: 'kbqOption', host: {
|
|
1303
1718
|
'[attr.tabindex]': 'getTabIndex()',
|
|
1304
1719
|
class: 'kbq-option',
|
|
1305
1720
|
'[class.kbq-selected]': 'selected',
|
|
@@ -1311,7 +1726,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
1311
1726
|
'(keydown)': 'handleKeydown($event)'
|
|
1312
1727
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
|
|
1313
1728
|
provide: KBQ_TITLE_TEXT_REF, useExisting: KbqOption
|
|
1314
|
-
}], template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #
|
|
1729
|
+
}], template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content></ng-content>\n</span>\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,.04) 10px,rgba(255,255,255,.04) 10px,rgba(255,255,255,.04) 20px,rgba(0,0,0,.04) 20px,rgba(0,0,0,.04) 30px,rgba(255,255,255,.04) 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 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-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-list-size-container-content-gap-horizontal, 8px);border-width:var(--kbq-list-size-container-focus-outline-width, 2px);border-style:solid;border-color:transparent;padding:calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-right, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-left, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-list-size-container-content-gap-vertical, 2px)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text:empty{display:none}\n"] }]
|
|
1315
1730
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
1316
1731
|
type: Optional
|
|
1317
1732
|
}, {
|
|
@@ -1321,7 +1736,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
1321
1736
|
type: Optional
|
|
1322
1737
|
}] }]; }, propDecorators: { textElement: [{
|
|
1323
1738
|
type: ViewChild,
|
|
1324
|
-
args: ['
|
|
1739
|
+
args: ['kbqTitleText', { static: false }]
|
|
1325
1740
|
}], value: [{
|
|
1326
1741
|
type: Input
|
|
1327
1742
|
}], showCheckbox: [{
|
|
@@ -1452,30 +1867,31 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
|
|
|
1452
1867
|
setTimeout(() => this.option.tooltipTrigger.disabled = false);
|
|
1453
1868
|
}
|
|
1454
1869
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptionActionComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: KBQ_OPTION_ACTION_PARENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1455
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptionActionComponent, selector: "kbq-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.kbq-expanded": "false", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "kbq-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["
|
|
1870
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptionActionComponent, selector: "kbq-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.kbq-expanded": "false", "class.kbq-disabled": "disabled", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "kbq-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["kbqOptionAction"], usesInheritance: true, ngImport: i0, template: `
|
|
1456
1871
|
<ng-container [ngSwitch]="!!customIcon">
|
|
1457
|
-
<i class="mc kbq-icon
|
|
1872
|
+
<i class="mc kbq-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
|
|
1458
1873
|
<ng-content select="[kbq-icon]" *ngSwitchCase="true"></ng-content>
|
|
1459
1874
|
</ng-container>
|
|
1460
|
-
`, isInline: true, styles: [".kbq-option-action{box-sizing:
|
|
1875
|
+
`, isInline: true, styles: [".kbq-option-action{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:24px;height:24px;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action.kbq-disabled{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1461
1876
|
}
|
|
1462
1877
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptionActionComponent, decorators: [{
|
|
1463
1878
|
type: Component,
|
|
1464
|
-
args: [{ selector: 'kbq-option-action', exportAs: '
|
|
1879
|
+
args: [{ selector: 'kbq-option-action', exportAs: 'kbqOptionAction', template: `
|
|
1465
1880
|
<ng-container [ngSwitch]="!!customIcon">
|
|
1466
|
-
<i class="mc kbq-icon
|
|
1881
|
+
<i class="mc kbq-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
|
|
1467
1882
|
<ng-content select="[kbq-icon]" *ngSwitchCase="true"></ng-content>
|
|
1468
1883
|
</ng-container>
|
|
1469
1884
|
`, host: {
|
|
1470
1885
|
class: 'kbq-option-action',
|
|
1471
1886
|
'[class.kbq-expanded]': 'false',
|
|
1887
|
+
'[class.kbq-disabled]': 'disabled',
|
|
1472
1888
|
'[attr.disabled]': 'disabled || null',
|
|
1473
1889
|
'[attr.tabIndex]': '-1',
|
|
1474
1890
|
'(focus)': 'onFocus($event)',
|
|
1475
1891
|
'(blur)': 'onBlur()',
|
|
1476
1892
|
'(click)': 'onClick($event)',
|
|
1477
1893
|
'(keydown)': 'onKeyDown($event)'
|
|
1478
|
-
}, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-option-action{box-sizing:
|
|
1894
|
+
}, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-option-action{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:24px;height:24px;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action.kbq-disabled{cursor:default}\n"] }]
|
|
1479
1895
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: undefined, decorators: [{
|
|
1480
1896
|
type: Inject,
|
|
1481
1897
|
args: [KBQ_OPTION_ACTION_PARENT]
|
|
@@ -1621,6 +2037,7 @@ const EXTENDED_OVERLAY_POSITIONS = objectValues([
|
|
|
1621
2037
|
const TOP_POSITION_PRIORITY = objectValues([
|
|
1622
2038
|
POSITION_MAP.top,
|
|
1623
2039
|
POSITION_MAP.bottom,
|
|
2040
|
+
POSITION_MAP.right,
|
|
1624
2041
|
POSITION_MAP.rightBottom,
|
|
1625
2042
|
POSITION_MAP.leftBottom,
|
|
1626
2043
|
POSITION_MAP.bottomLeft,
|
|
@@ -1746,6 +2163,11 @@ const POSITION_TO_CSS_MAP = {
|
|
|
1746
2163
|
bottomLeft: 'bottom-left',
|
|
1747
2164
|
bottomRight: 'bottom-right'
|
|
1748
2165
|
};
|
|
2166
|
+
const KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER = (token, factory) => ({
|
|
2167
|
+
provide: token,
|
|
2168
|
+
deps: [Overlay],
|
|
2169
|
+
useFactory: factory
|
|
2170
|
+
});
|
|
1749
2171
|
function arrayMap(array, iteratee) {
|
|
1750
2172
|
let index = -1;
|
|
1751
2173
|
const length = array === null ? 0 : array.length;
|
|
@@ -1788,6 +2210,7 @@ var PopUpTriggers;
|
|
|
1788
2210
|
PopUpTriggers["Click"] = "click";
|
|
1789
2211
|
PopUpTriggers["Focus"] = "focus";
|
|
1790
2212
|
PopUpTriggers["Hover"] = "hover";
|
|
2213
|
+
PopUpTriggers["Keydown"] = "keydown";
|
|
1791
2214
|
})(PopUpTriggers || (PopUpTriggers = {}));
|
|
1792
2215
|
var PopUpSizes;
|
|
1793
2216
|
(function (PopUpSizes) {
|
|
@@ -2066,6 +2489,15 @@ class KbqPopUpTrigger {
|
|
|
2066
2489
|
.set('blur', () => this.hide())
|
|
2067
2490
|
.forEach(this.addEventListener);
|
|
2068
2491
|
}
|
|
2492
|
+
if (this.trigger.includes(PopUpTriggers.Keydown)) {
|
|
2493
|
+
this.listeners
|
|
2494
|
+
.set('keydown', (event) => {
|
|
2495
|
+
if (event instanceof KeyboardEvent && [ENTER, SPACE].includes(event.keyCode)) {
|
|
2496
|
+
this.show();
|
|
2497
|
+
}
|
|
2498
|
+
})
|
|
2499
|
+
.forEach(this.addEventListener);
|
|
2500
|
+
}
|
|
2069
2501
|
}
|
|
2070
2502
|
/** Updates the position of the current popover. */
|
|
2071
2503
|
updatePosition(reapplyPosition = false) {
|
|
@@ -2109,7 +2541,7 @@ class KbqPopUpTrigger {
|
|
|
2109
2541
|
.pipe(takeUntil(this.destroyed))
|
|
2110
2542
|
.pipe(delay(0))
|
|
2111
2543
|
.subscribe((event) => {
|
|
2112
|
-
if (event?.type === 'click' && event.
|
|
2544
|
+
if (event?.type === 'click' && event.kbqPopoverPreventHide) {
|
|
2113
2545
|
return;
|
|
2114
2546
|
}
|
|
2115
2547
|
this.hide();
|
|
@@ -2165,14 +2597,14 @@ const SELECT_PANEL_VIEWPORT_PADDING = 8;
|
|
|
2165
2597
|
/** Injection token that determines the scroll handling while a select is open. */
|
|
2166
2598
|
const KBQ_SELECT_SCROLL_STRATEGY = new InjectionToken('kbq-select-scroll-strategy');
|
|
2167
2599
|
/** @docs-private */
|
|
2168
|
-
function
|
|
2600
|
+
function kbqSelectScrollStrategyProviderFactory(overlay) {
|
|
2169
2601
|
return () => overlay.scrollStrategies.reposition();
|
|
2170
2602
|
}
|
|
2171
2603
|
/** @docs-private */
|
|
2172
2604
|
const KBQ_SELECT_SCROLL_STRATEGY_PROVIDER = {
|
|
2173
2605
|
provide: KBQ_SELECT_SCROLL_STRATEGY,
|
|
2174
2606
|
deps: [Overlay],
|
|
2175
|
-
useFactory:
|
|
2607
|
+
useFactory: kbqSelectScrollStrategyProviderFactory
|
|
2176
2608
|
};
|
|
2177
2609
|
|
|
2178
2610
|
class KbqMeasureScrollbarService {
|
|
@@ -2220,6 +2652,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2220
2652
|
args: [DOCUMENT]
|
|
2221
2653
|
}] }]; } });
|
|
2222
2654
|
|
|
2655
|
+
const KbqDefaultThemes = [
|
|
2656
|
+
{
|
|
2657
|
+
name: 'light',
|
|
2658
|
+
className: 'kbq-theme-light',
|
|
2659
|
+
selected: true
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
name: 'dark',
|
|
2663
|
+
className: 'kbq-theme-dark',
|
|
2664
|
+
selected: false
|
|
2665
|
+
}
|
|
2666
|
+
];
|
|
2667
|
+
class ThemeService {
|
|
2668
|
+
constructor(rendererFactory) {
|
|
2669
|
+
this.rendererFactory = rendererFactory;
|
|
2670
|
+
this.current = new BehaviorSubject(null);
|
|
2671
|
+
this.themes = KbqDefaultThemes;
|
|
2672
|
+
this.update = ([prev, current]) => {
|
|
2673
|
+
if (prev) {
|
|
2674
|
+
prev.selected = false;
|
|
2675
|
+
this.renderer.removeClass(document.body, prev.className);
|
|
2676
|
+
}
|
|
2677
|
+
if (current) {
|
|
2678
|
+
this.renderer.addClass(document.body, current.className);
|
|
2679
|
+
current.selected = true;
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
2683
|
+
this.subscription = this.current
|
|
2684
|
+
.pipe(pairwise())
|
|
2685
|
+
.subscribe(this.update);
|
|
2686
|
+
}
|
|
2687
|
+
setThemes(items) {
|
|
2688
|
+
this.themes = items;
|
|
2689
|
+
}
|
|
2690
|
+
setTheme(value) {
|
|
2691
|
+
if (typeof value === 'number') {
|
|
2692
|
+
this.current.next(this.themes[value]);
|
|
2693
|
+
}
|
|
2694
|
+
else if (typeof value === 'object' && this.themes.includes(value)) {
|
|
2695
|
+
this.current.next(value);
|
|
2696
|
+
}
|
|
2697
|
+
else {
|
|
2698
|
+
throw Error(`value has unsupported type: ${typeof value}`);
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
getTheme() {
|
|
2702
|
+
return this.current.value;
|
|
2703
|
+
}
|
|
2704
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2705
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
2706
|
+
}
|
|
2707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, decorators: [{
|
|
2708
|
+
type: Injectable,
|
|
2709
|
+
args: [{ providedIn: 'root' }]
|
|
2710
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
|
|
2711
|
+
|
|
2223
2712
|
function isBoolean(val) { return typeof val === 'boolean'; }
|
|
2224
2713
|
function toBoolean(value) {
|
|
2225
2714
|
return value != null && `${value}` !== 'false';
|
|
@@ -2328,11 +2817,11 @@ const validationTooltipShowDelay = 10;
|
|
|
2328
2817
|
const validationTooltipHideDelay = 3000;
|
|
2329
2818
|
const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', { factory: () => ({ useValidation: true }) });
|
|
2330
2819
|
|
|
2331
|
-
const VERSION = new Version('16.0.0-beta.
|
|
2820
|
+
const VERSION = new Version('16.0.0-beta.8+sha-d1a32007');
|
|
2332
2821
|
|
|
2333
2822
|
/**
|
|
2334
2823
|
* Generated bundle index. Do not edit.
|
|
2335
2824
|
*/
|
|
2336
2825
|
|
|
2337
|
-
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizeModule, KbqDataSizePipe, KbqDecimalPipe, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean,
|
|
2826
|
+
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizeModule, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, KbqRoundDecimalPipe, KbqTableNumberPipe, KbqVirtualOption, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, ThemeService, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, isWithin, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, sizeUnitsConfig, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
|
|
2338
2827
|
//# sourceMappingURL=koobiq-components-core.mjs.map
|