@koobiq/components 20.4.2 → 21.0.0
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/accordion/accordion-trigger.scss +3 -10
- package/accordion/accordion.scss +4 -6
- package/actions-panel/actions-panel-container.scss +45 -1
- package/alert/alert.component.scss +3 -2
- package/app-switcher/_app-switcher-theme.scss +0 -4
- package/app-switcher/app-switcher-dropdown-app.scss +3 -2
- package/app-switcher/app-switcher-dropdown-site.scss +2 -1
- package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
- package/app-switcher/app-switcher-tokens.scss +15 -0
- package/app-switcher/app-switcher.scss +14 -4
- package/autocomplete/autocomplete.scss +7 -6
- package/badge/badge.component.scss +5 -8
- package/breadcrumbs/breadcrumbs.scss +25 -10
- package/button/_button-base.scss +30 -7
- package/button/_button-theme.scss +16 -0
- package/button/button-group.scss +7 -0
- package/button/button-tokens.scss +0 -2
- package/button/button.scss +34 -2
- package/button-toggle/_button-toggle-theme.scss +7 -2
- package/button-toggle/button-toggle.scss +65 -15
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/checkbox.scss +3 -6
- package/clamped-text/clamped-text.scss +6 -2
- package/code-block/code-block-tokens.scss +0 -224
- package/code-block/code-block.scss +20 -9
- package/content-panel/content-panel-aside.scss +3 -2
- package/content-panel/content-panel-container.scss +37 -0
- package/content-panel/content-panel.scss +4 -3
- package/core/highlight/_highlight-theme.scss +3 -1
- package/core/option/action-container.scss +2 -2
- package/core/option/action.scss +2 -1
- package/core/option/option.scss +2 -1
- package/core/pop-up/_pop-up.scss +0 -37
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
- package/core/styles/_core.scss +3 -0
- package/core/styles/_koobiq-theme.scss +5 -6
- package/core/styles/common/_animation.scss +44 -16
- package/core/styles/common/_groups-mixins.scss +21 -19
- package/core/styles/common/_groups.scss +4 -32
- package/core/styles/common/_index.scss +0 -2
- package/core/styles/common/_link.scss +117 -0
- package/core/styles/common/_list.scss +0 -26
- package/core/styles/common/_overlay.scss +8 -10
- package/core/styles/common/_rtl.scss +0 -14
- package/core/styles/common/_select.scss +33 -15
- package/core/styles/common/_squircle.scss +63 -0
- package/core/styles/common/_tokens.scss +0 -11
- package/core/styles/common/_vendor-prefixes.scss +0 -20
- package/core/styles/functions/_timing.scss +0 -22
- package/core/styles/theming/_scrollbar-theme.scss +6 -1
- package/core/styles/theming/_theming.scss +13 -65
- package/core/styles/typography/_index.scss +0 -1
- package/core/styles/typography/_typography.scss +0 -143
- package/core/styles/visual/_body.scss +1 -6
- package/core/styles/visual/_layout.scss +0 -12
- package/datepicker/calendar-body.scss +3 -1
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/datepicker-content.scss +33 -1
- package/datepicker/datepicker-toggle.scss +0 -38
- package/dl/dl-tokens.scss +10 -0
- package/dl/dl.scss +113 -13
- package/dropdown/_dropdown-theme.scss +4 -16
- package/dropdown/dropdown-item.scss +4 -10
- package/dropdown/dropdown.scss +2 -1
- package/empty-state/_empty-state-theme.scss +10 -4
- package/empty-state/empty-state-tokens.scss +4 -4
- package/empty-state/empty-state.scss +4 -0
- package/fesm2022/koobiq-components-accordion.mjs +347 -229
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +39 -39
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +46 -48
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +332 -116
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +172 -132
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +755 -601
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +260 -143
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +4342 -1595
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +73 -36
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +447 -89
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +703 -599
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +116 -60
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +550 -290
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +2810 -2538
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +79 -24
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +389 -525
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +366 -136
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +601 -459
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
- package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-link.mjs +328 -125
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +583 -433
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +55 -78
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +853 -475
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +895 -556
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +680 -310
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +684 -285
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +450 -231
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +127 -21
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +883 -693
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +207 -88
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +815 -41
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +109 -88
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
- package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +890 -501
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +63 -49
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +1062 -603
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +886 -733
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +213 -185
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +299 -147
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +233 -245
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +344 -142
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +229 -145
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +463 -143
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +177 -130
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +657 -214
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +61 -32
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +719 -488
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1506 -558
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +290 -135
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/dropzone.scss +31 -3
- package/file-upload/file-upload-tokens.scss +2 -22
- package/file-upload/file-upload.scss +6 -0
- package/file-upload/multiple-file-upload.component.scss +14 -12
- package/file-upload/single-file-upload.component.scss +3 -2
- package/filter-bar/filters.scss +7 -0
- package/filter-bar/pipes/base-pipe.scss +3 -3
- package/filter-bar/pipes/pipe-date.scss +8 -1
- package/flag/flag-tokens.scss +22 -0
- package/flag/flag.scss +34 -21
- package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
- package/form-field/_form-field-theme.scss +4 -9
- package/form-field/cleaner.scss +3 -1
- package/form-field/fieldset.scss +3 -4
- package/form-field/form-field.scss +26 -21
- package/form-field/password-toggle.scss +3 -1
- package/icon/_icon-button-theme.scss +7 -0
- package/icon/_icon-theme.scss +10 -7
- package/icon/icon-button.scss +0 -2
- package/icon/icon-tokens.scss +12 -9
- package/inline-edit/inline-edit.scss +40 -54
- package/input/input.scss +4 -0
- package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
- package/link/deprecated/link-tokens.scss +27 -0
- package/link/link-tokens.scss +6 -25
- package/link/link.scss +137 -0
- package/list/list.scss +3 -2
- package/loader-overlay/_loader-overlay-theme.scss +19 -10
- package/loader-overlay/loader-overlay-tokens.scss +0 -2
- package/loader-overlay/loader-overlay.scss +7 -1
- package/markdown/_markdown-theme.scss +16 -0
- package/markdown/markdown-tokens.scss +5 -0
- package/markdown/markdown.scss +2 -1
- package/modal/_modal-animation.scss +23 -14
- package/modal/modal-tokens.scss +2 -1
- package/modal/modal.scss +35 -31
- package/navbar/_navbar-item_horizontal.scss +8 -6
- package/navbar/_navbar-item_vertical.scss +18 -6
- package/navbar/_navbar-theme.scss +9 -1
- package/navbar/navbar-brand.scss +8 -6
- package/navbar/navbar-divider.scss +1 -1
- package/navbar/navbar-item.scss +8 -9
- package/navbar/navbar-toggle.scss +3 -3
- package/navbar/navbar-tokens.scss +14 -0
- package/navbar/navbar.scss +1 -2
- package/navbar/vertical-navbar.scss +2 -2
- package/notification-center/_notification-center-theme.scss +11 -6
- package/notification-center/notification-center-tokens.scss +33 -0
- package/notification-center/notification-center.scss +58 -20
- package/notification-center/notification-item.scss +15 -6
- package/package.json +112 -81
- package/popover/popover-tokens.scss +0 -2
- package/popover/popover.scss +41 -19
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -3
- package/progress-bar/progress-bar-tokens.scss +3 -0
- package/progress-bar/progress-bar.scss +36 -8
- package/progress-spinner/progress-spinner.scss +4 -3
- package/radio/_radio-theme.scss +21 -4
- package/radio/radio-tokens.scss +7 -3
- package/radio/radio.scss +55 -8
- package/schematics/collection.json +399 -7
- package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
- package/schematics/migrations/accordion-state-saving-default/data.js +75 -0
- package/schematics/migrations/accordion-state-saving-default/index.js +60 -0
- package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
- package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
- package/schematics/migrations/actions-panel-overlay-container/data.js +47 -0
- package/schematics/migrations/actions-panel-overlay-container/index.js +54 -0
- package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
- package/schematics/migrations/alert-signals/README.md +13 -7
- package/schematics/migrations/alert-signals/data.js +3 -0
- package/schematics/migrations/alert-signals/index.js +70 -203
- package/schematics/migrations/angular-animations-removal/README.md +46 -0
- package/schematics/migrations/angular-animations-removal/data.js +150 -0
- package/schematics/migrations/angular-animations-removal/index.js +20 -0
- package/schematics/migrations/angular-animations-removal/schema.json +15 -0
- package/schematics/migrations/app-switcher-signals/README.md +88 -0
- package/schematics/migrations/app-switcher-signals/data.js +136 -0
- package/schematics/migrations/app-switcher-signals/index.js +365 -0
- package/schematics/migrations/app-switcher-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +1 -1
- package/schematics/migrations/autocomplete-signals/README.md +92 -0
- package/schematics/migrations/autocomplete-signals/data.js +149 -0
- package/schematics/migrations/autocomplete-signals/index.js +706 -0
- package/schematics/migrations/autocomplete-signals/schema.json +20 -0
- package/schematics/migrations/badge-signals/README.md +77 -0
- package/schematics/migrations/badge-signals/data.js +109 -0
- package/schematics/migrations/badge-signals/index.js +693 -0
- package/schematics/migrations/badge-signals/schema.json +20 -0
- package/schematics/migrations/button-state-and-styles/README.md +129 -0
- package/schematics/migrations/button-state-and-styles/data.js +136 -0
- package/schematics/migrations/button-state-and-styles/index.js +220 -0
- package/schematics/migrations/button-state-and-styles/schema.json +20 -0
- package/schematics/migrations/button-supported-colors/README.md +73 -0
- package/schematics/migrations/button-supported-colors/data.js +106 -0
- package/schematics/migrations/button-supported-colors/index.js +260 -0
- package/schematics/migrations/button-supported-colors/schema.json +20 -0
- package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
- package/schematics/migrations/button-toggle-signals-and-aria/data.js +200 -0
- package/schematics/migrations/button-toggle-signals-and-aria/index.js +496 -0
- package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/button-truncation/README.md +110 -0
- package/schematics/migrations/button-truncation/data.js +88 -0
- package/schematics/migrations/button-truncation/index.js +269 -0
- package/schematics/migrations/button-truncation/schema.json +20 -0
- package/schematics/migrations/checkbox-signals/README.md +76 -0
- package/schematics/migrations/checkbox-signals/data.js +114 -0
- package/schematics/migrations/checkbox-signals/index.js +634 -0
- package/schematics/migrations/checkbox-signals/schema.json +20 -0
- package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
- package/schematics/migrations/clamped-text-disclosure/data.js +101 -0
- package/schematics/migrations/clamped-text-disclosure/index.js +59 -0
- package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
- package/schematics/migrations/code-block-signals/README.md +84 -0
- package/schematics/migrations/code-block-signals/data.js +121 -0
- package/schematics/migrations/code-block-signals/index.js +700 -0
- package/schematics/migrations/code-block-signals/schema.json +20 -0
- package/schematics/migrations/color-signals/README.md +46 -0
- package/schematics/migrations/color-signals/data.js +131 -0
- package/schematics/migrations/color-signals/index.js +19 -0
- package/schematics/migrations/color-signals/schema.json +20 -0
- package/schematics/migrations/core-mixins-removal/README.md +20 -0
- package/schematics/migrations/core-mixins-removal/data.js +27 -0
- package/schematics/migrations/core-mixins-removal/index.js +17 -0
- package/schematics/migrations/core-mixins-removal/schema.json +15 -0
- package/schematics/migrations/css-selectors/README.md +2 -2
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/datepicker-signals/README.md +24 -0
- package/schematics/migrations/datepicker-signals/data.js +49 -0
- package/schematics/migrations/datepicker-signals/index.js +17 -0
- package/schematics/migrations/datepicker-signals/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +2 -2
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/design-tokens-v4/README.md +75 -0
- package/schematics/migrations/design-tokens-v4/index.js +59 -0
- package/schematics/migrations/design-tokens-v4/schema.json +15 -0
- package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
- package/schematics/migrations/divider-signals-and-aria/data.js +62 -0
- package/schematics/migrations/divider-signals-and-aria/index.js +211 -0
- package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
- package/schematics/migrations/dl-attribute-coercion/data.js +85 -0
- package/schematics/migrations/dl-attribute-coercion/index.js +161 -0
- package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
- package/schematics/migrations/dl-standalone-names/README.md +49 -0
- package/schematics/migrations/dl-standalone-names/data.js +44 -0
- package/schematics/migrations/dl-standalone-names/index.js +321 -0
- package/schematics/migrations/dl-standalone-names/schema.json +20 -0
- package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
- package/schematics/migrations/dropdown-demote-overlay/data.js +84 -0
- package/schematics/migrations/dropdown-demote-overlay/index.js +288 -0
- package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
- package/schematics/migrations/dropdown-signals/README.md +83 -0
- package/schematics/migrations/dropdown-signals/data.js +152 -0
- package/schematics/migrations/dropdown-signals/index.js +19 -0
- package/schematics/migrations/dropdown-signals/schema.json +20 -0
- package/schematics/migrations/empty-state-error-color/README.md +84 -0
- package/schematics/migrations/empty-state-error-color/data.js +85 -0
- package/schematics/migrations/empty-state-error-color/index.js +71 -0
- package/schematics/migrations/empty-state-error-color/schema.json +15 -0
- package/schematics/migrations/empty-state-size-attr/README.md +2 -2
- package/schematics/migrations/empty-state-size-attr/index.js +1 -1
- package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
- package/schematics/migrations/file-upload-cva-and-primitives/data.js +97 -0
- package/schematics/migrations/file-upload-cva-and-primitives/index.js +60 -0
- package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
- package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
- package/schematics/migrations/file-upload-deprecated-outputs/data.js +20 -0
- package/schematics/migrations/file-upload-deprecated-outputs/index.js +70 -0
- package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
- package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
- package/schematics/migrations/filter-bar-rename-action/data.js +151 -0
- package/schematics/migrations/filter-bar-rename-action/index.js +177 -0
- package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
- package/schematics/migrations/filter-bar-signals/README.md +27 -16
- package/schematics/migrations/filter-bar-signals/data.js +1 -2
- package/schematics/migrations/filter-bar-signals/index.js +100 -195
- package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
- package/schematics/migrations/filter-bar-state-saving-default/data.js +87 -0
- package/schematics/migrations/filter-bar-state-saving-default/index.js +61 -0
- package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
- package/schematics/migrations/flag-inner-html/README.md +67 -0
- package/schematics/migrations/flag-inner-html/data.js +58 -0
- package/schematics/migrations/flag-inner-html/index.js +61 -0
- package/schematics/migrations/flag-inner-html/schema.json +15 -0
- package/schematics/migrations/form-field-signals/README.md +125 -0
- package/schematics/migrations/form-field-signals/data.js +288 -0
- package/schematics/migrations/form-field-signals/index.js +382 -0
- package/schematics/migrations/form-field-signals/schema.json +20 -0
- package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
- package/schematics/migrations/icon-semantics-and-api/data.js +97 -0
- package/schematics/migrations/icon-semantics-and-api/index.js +64 -0
- package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
- package/schematics/migrations/icons-replacement/README.md +5 -5
- package/schematics/migrations/icons-replacement/index.js +1 -1
- package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
- package/schematics/migrations/inline-edit-a11y-and-types/data.js +117 -0
- package/schematics/migrations/inline-edit-a11y-and-types/index.js +97 -0
- package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
- package/schematics/migrations/input-number-surface/README.md +140 -0
- package/schematics/migrations/input-number-surface/data.js +135 -0
- package/schematics/migrations/input-number-surface/index.js +292 -0
- package/schematics/migrations/input-number-surface/schema.json +20 -0
- package/schematics/migrations/input-signals/README.md +20 -0
- package/schematics/migrations/input-signals/data.js +30 -0
- package/schematics/migrations/input-signals/index.js +17 -0
- package/schematics/migrations/input-signals/schema.json +15 -0
- package/schematics/migrations/link-deprecated-path/README.md +144 -0
- package/schematics/migrations/link-deprecated-path/index.js +19 -0
- package/schematics/migrations/link-deprecated-path/schema.json +20 -0
- package/schematics/migrations/link-signals/README.md +71 -0
- package/schematics/migrations/link-signals/data.js +116 -0
- package/schematics/migrations/link-signals/index.js +415 -0
- package/schematics/migrations/link-signals/schema.json +20 -0
- package/schematics/migrations/list-signals/README.md +22 -0
- package/schematics/migrations/list-signals/data.js +35 -0
- package/schematics/migrations/list-signals/index.js +17 -0
- package/schematics/migrations/list-signals/schema.json +15 -0
- package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
- package/schematics/migrations/list-tree-multiple-input/data.js +74 -0
- package/schematics/migrations/list-tree-multiple-input/index.js +221 -0
- package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
- package/schematics/migrations/loader-overlay-signals/README.md +62 -0
- package/schematics/migrations/loader-overlay-signals/data.js +101 -0
- package/schematics/migrations/loader-overlay-signals/index.js +697 -0
- package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
- package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
- package/schematics/migrations/loader-overlay-size-attr/index.js +1 -1
- package/schematics/migrations/locale-configuration-providers/README.md +163 -0
- package/schematics/migrations/locale-configuration-providers/data.js +257 -0
- package/schematics/migrations/locale-configuration-providers/index.js +294 -0
- package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
- package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
- package/schematics/migrations/mandatory-peer-dependencies/index.js +42 -0
- package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
- package/schematics/migrations/markdown-signals/README.md +58 -0
- package/schematics/migrations/markdown-signals/data.js +79 -0
- package/schematics/migrations/markdown-signals/index.js +639 -0
- package/schematics/migrations/markdown-signals/schema.json +20 -0
- package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
- package/schematics/migrations/modal-dialog-semantics/data.js +110 -0
- package/schematics/migrations/modal-dialog-semantics/index.js +58 -0
- package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
- package/schematics/migrations/modal-signals/README.md +88 -0
- package/schematics/migrations/modal-signals/data.js +132 -0
- package/schematics/migrations/modal-signals/index.js +19 -0
- package/schematics/migrations/modal-signals/schema.json +20 -0
- package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
- package/schematics/migrations/navbar-signals-and-aria/data.js +198 -0
- package/schematics/migrations/navbar-signals-and-aria/index.js +568 -0
- package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/new-icons-pack/README.md +10 -10
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/notification-center-signals/README.md +67 -0
- package/schematics/migrations/notification-center-signals/data.js +66 -0
- package/schematics/migrations/notification-center-signals/index.js +61 -0
- package/schematics/migrations/notification-center-signals/schema.json +15 -0
- package/schematics/migrations/option-signals/README.md +37 -0
- package/schematics/migrations/option-signals/data.js +86 -0
- package/schematics/migrations/option-signals/index.js +19 -0
- package/schematics/migrations/option-signals/schema.json +20 -0
- package/schematics/migrations/popover-leave-delay/README.md +51 -0
- package/schematics/migrations/popover-leave-delay/data.js +61 -0
- package/schematics/migrations/popover-leave-delay/index.js +54 -0
- package/schematics/migrations/popover-leave-delay/schema.json +15 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/data.js +76 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/index.js +58 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
- package/schematics/migrations/progress-spinner-signals/README.md +72 -0
- package/schematics/migrations/progress-spinner-signals/data.js +83 -0
- package/schematics/migrations/progress-spinner-signals/index.js +694 -0
- package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
- package/schematics/migrations/query-list-signals/README.md +32 -0
- package/schematics/migrations/query-list-signals/data.js +70 -0
- package/schematics/migrations/query-list-signals/index.js +17 -0
- package/schematics/migrations/query-list-signals/schema.json +15 -0
- package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
- package/schematics/migrations/radio-signals-and-aria/data.js +163 -0
- package/schematics/migrations/radio-signals-and-aria/index.js +39 -0
- package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
- package/schematics/migrations/read-state-dwell-handlers/data.js +45 -0
- package/schematics/migrations/read-state-dwell-handlers/index.js +215 -0
- package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
- package/schematics/migrations/scrollbar-deprecated-path/index.js +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
- package/schematics/migrations/select-signal-inputs/README.md +61 -0
- package/schematics/migrations/select-signal-inputs/data.js +99 -0
- package/schematics/migrations/select-signal-inputs/index.js +57 -0
- package/schematics/migrations/select-signal-inputs/schema.json +15 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/data.js +111 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/index.js +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
- package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
- package/schematics/migrations/signal-inputs-subclasses/data.js +69 -0
- package/schematics/migrations/signal-inputs-subclasses/index.js +17 -0
- package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
- package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
- package/schematics/migrations/split-button-optional-disabled/data.js +53 -0
- package/schematics/migrations/split-button-optional-disabled/index.js +57 -0
- package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
- package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
- package/schematics/migrations/splitter-deprecated-path/index.js +20 -0
- package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
- package/schematics/migrations/state-saving-default/README.md +67 -0
- package/schematics/migrations/state-saving-default/data.js +88 -0
- package/schematics/migrations/state-saving-default/index.js +62 -0
- package/schematics/migrations/state-saving-default/schema.json +15 -0
- package/schematics/migrations/table-cell-content/README.md +55 -0
- package/schematics/migrations/table-cell-content/data.js +66 -0
- package/schematics/migrations/table-cell-content/index.js +66 -0
- package/schematics/migrations/table-cell-content/schema.json +15 -0
- package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
- package/schematics/migrations/tabs-signals-and-aria/data.js +139 -0
- package/schematics/migrations/tabs-signals-and-aria/index.js +65 -0
- package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/tag-list-cleaner/README.md +58 -0
- package/schematics/migrations/tag-list-cleaner/data.js +42 -0
- package/schematics/migrations/tag-list-cleaner/index.js +196 -0
- package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
- package/schematics/migrations/tag-slots/README.md +41 -0
- package/schematics/migrations/tag-slots/index.js +190 -0
- package/schematics/migrations/tag-slots/schema.json +20 -0
- package/schematics/migrations/tags-signals/README.md +85 -0
- package/schematics/migrations/tags-signals/data.js +103 -0
- package/schematics/migrations/tags-signals/index.js +673 -0
- package/schematics/migrations/tags-signals/schema.json +20 -0
- package/schematics/migrations/textarea-signals/README.md +72 -0
- package/schematics/migrations/textarea-signals/data.js +121 -0
- package/schematics/migrations/textarea-signals/index.js +379 -0
- package/schematics/migrations/textarea-signals/schema.json +20 -0
- package/schematics/migrations/time-range-title-for/README.md +164 -0
- package/schematics/migrations/time-range-title-for/data.js +139 -0
- package/schematics/migrations/time-range-title-for/index.js +163 -0
- package/schematics/migrations/time-range-title-for/schema.json +20 -0
- package/schematics/migrations/timepicker-signals/README.md +78 -0
- package/schematics/migrations/timepicker-signals/data.js +82 -0
- package/schematics/migrations/timepicker-signals/index.js +709 -0
- package/schematics/migrations/timepicker-signals/schema.json +20 -0
- package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
- package/schematics/migrations/timezone-grouping-utils/data.js +101 -0
- package/schematics/migrations/timezone-grouping-utils/index.js +64 -0
- package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
- package/schematics/migrations/title-encapsulation/README.md +49 -0
- package/schematics/migrations/title-encapsulation/data.js +69 -0
- package/schematics/migrations/title-encapsulation/index.js +57 -0
- package/schematics/migrations/title-encapsulation/schema.json +15 -0
- package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
- package/schematics/migrations/toast-stack-and-defaults/data.js +79 -0
- package/schematics/migrations/toast-stack-and-defaults/index.js +53 -0
- package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/data.js +89 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/index.js +60 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
- package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
- package/schematics/migrations/top-bar-container-selectors/data.js +56 -0
- package/schematics/migrations/top-bar-container-selectors/index.js +84 -0
- package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
- package/schematics/migrations/tree-select-signals/README.md +61 -0
- package/schematics/migrations/tree-select-signals/data.js +106 -0
- package/schematics/migrations/tree-select-signals/index.js +58 -0
- package/schematics/migrations/tree-select-signals/schema.json +15 -0
- package/schematics/migrations/tree-signals/README.md +82 -0
- package/schematics/migrations/tree-signals/data.js +123 -0
- package/schematics/migrations/tree-signals/index.js +54 -0
- package/schematics/migrations/tree-signals/schema.json +15 -0
- package/schematics/migrations/tree-state-saving-default/README.md +66 -0
- package/schematics/migrations/tree-state-saving-default/data.js +78 -0
- package/schematics/migrations/tree-state-saving-default/index.js +60 -0
- package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
- package/schematics/migrations/username-pipe-injection/README.md +59 -0
- package/schematics/migrations/username-pipe-injection/data.js +78 -0
- package/schematics/migrations/username-pipe-injection/index.js +58 -0
- package/schematics/migrations/username-pipe-injection/schema.json +15 -0
- package/schematics/migrations/v20-upgrade/README.md +36 -16
- package/schematics/migrations/v20-upgrade/data.js +124 -77
- package/schematics/migrations/v20-upgrade/index.js +6 -213
- package/schematics/migrations/v21-upgrade/README.md +271 -0
- package/schematics/migrations/v21-upgrade/data.js +1371 -0
- package/schematics/migrations/v21-upgrade/index.js +94 -0
- package/schematics/migrations/v21-upgrade/schema.json +20 -0
- package/schematics/migrations/zoneless-change-detection/README.md +30 -0
- package/schematics/migrations/zoneless-change-detection/data.js +29 -0
- package/schematics/migrations/zoneless-change-detection/index.js +20 -0
- package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
- package/schematics/migrations.json +392 -2
- package/schematics/ng-add/index.js +515 -14
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/utils/deprecated-path-migration.js +61 -0
- package/schematics/utils/package-config.js +9 -105
- package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
- package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
- package/scrollbar/native-scrollbar.scss +68 -0
- package/scrollbar/scrollbar-tokens.scss +13 -22
- package/scrollbar/scrollbar-track.scss +94 -0
- package/scrollbar/scrollbar-viewport.scss +33 -0
- package/scrollbar/scrollbar.scss +24 -0
- package/search-expandable/search-expandable-tokens.scss +4 -0
- package/search-expandable/search-expandable.scss +4 -2
- package/select/_select-theme.scss +3 -16
- package/select/select.scss +0 -6
- package/sidebar/sidebar.scss +20 -0
- package/sidepanel/_sidepanel-theme.scss +1 -1
- package/sidepanel/sidepanel-tokens.scss +7 -1
- package/sidepanel/sidepanel.scss +41 -5
- package/skeleton/skeleton-presets.scss +350 -0
- package/skeleton/skeleton-tokens.scss +127 -0
- package/skeleton/skeleton.scss +53 -45
- package/split-button/_split-button-theme.scss +4 -4
- package/split-button/split-button.scss +2 -6
- package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
- package/splitter/deprecated/splitter.scss +51 -0
- package/splitter/splitter-tokens.scss +19 -0
- package/splitter/splitter.scss +148 -28
- package/table/_table-theme.scss +13 -12
- package/table/table-tokens.scss +8 -0
- package/table/table.scss +47 -22
- package/tabs/_tabs-common.scss +14 -14
- package/tabs/_tabs-theme.scss +4 -5
- package/tabs/tab-body.scss +49 -1
- package/tabs/tab-header.scss +2 -1
- package/tags/tag-list.scss +4 -0
- package/tags/tag.scss +19 -1
- package/time-range/time-range.scss +9 -0
- package/timezone/timezone-option.component.scss +4 -7
- package/timezone/timezone-select.component.scss +3 -0
- package/toast/_toast-theme.scss +1 -4
- package/toast/toast-container.component.scss +19 -13
- package/toast/toast-tokens.scss +12 -6
- package/toast/toast.component.scss +42 -19
- package/toggle/_toggle-theme.scss +4 -10
- package/toggle/toggle.scss +67 -26
- package/tooltip/_tooltip-theme.scss +7 -1
- package/tooltip/tooltip-tokens.scss +1 -2
- package/tooltip/tooltip.scss +55 -9
- package/top-bar/top-bar-tokens.scss +13 -2
- package/top-bar/top-bar.scss +24 -19
- package/tree/_tree-theme.scss +0 -1
- package/tree/toggle.scss +5 -9
- package/tree/tree-option.scss +2 -4
- package/tree/tree-tokens.scss +2 -1
- package/tree/tree.scss +3 -5
- package/tree-select/_tree-select-theme.scss +4 -15
- package/tree-select/tree-select-tokens.scss +16 -0
- package/tree-select/tree-select.scss +0 -6
- package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
- package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
- package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
- package/types/koobiq-components-app-switcher.d.ts +406 -0
- package/types/koobiq-components-autocomplete.d.ts +443 -0
- package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
- package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
- package/types/koobiq-components-button-toggle.d.ts +340 -0
- package/types/koobiq-components-button.d.ts +296 -0
- package/types/koobiq-components-checkbox.d.ts +172 -0
- package/types/koobiq-components-clamped-text.d.ts +184 -0
- package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +114 -79
- package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
- package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
- package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
- package/types/koobiq-components-divider.d.ts +43 -0
- package/types/koobiq-components-dl.d.ts +235 -0
- package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
- package/types/koobiq-components-ellipsis-center.d.ts +85 -0
- package/types/koobiq-components-empty-state.d.ts +106 -0
- package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
- package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
- package/types/koobiq-components-flag.d.ts +68 -0
- package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
- package/types/koobiq-components-icon.d.ts +333 -0
- package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
- package/types/koobiq-components-input.d.ts +477 -0
- package/types/koobiq-components-link-deprecated.d.ts +101 -0
- package/types/koobiq-components-link.d.ts +176 -0
- package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
- package/types/koobiq-components-loader-overlay.d.ts +101 -0
- package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
- package/types/koobiq-components-modal.d.ts +666 -0
- package/types/koobiq-components-navbar.d.ts +569 -0
- package/types/koobiq-components-notification-center.d.ts +500 -0
- package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
- package/types/koobiq-components-popover.d.ts +468 -0
- package/types/koobiq-components-progress-bar.d.ts +67 -0
- package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
- package/types/koobiq-components-radio.d.ts +294 -0
- package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
- package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
- package/types/koobiq-components-scrollbar.d.ts +154 -0
- package/types/koobiq-components-search-expandable.d.ts +164 -0
- package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
- package/types/koobiq-components-sidebar.d.ts +152 -0
- package/types/koobiq-components-sidepanel.d.ts +436 -0
- package/types/koobiq-components-skeleton.d.ts +234 -0
- package/types/koobiq-components-split-button.d.ts +65 -0
- package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
- package/types/koobiq-components-splitter.d.ts +406 -0
- package/types/koobiq-components-table.d.ts +44 -0
- package/types/koobiq-components-tabs.d.ts +888 -0
- package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
- package/types/koobiq-components-textarea.d.ts +178 -0
- package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
- package/types/koobiq-components-timepicker.d.ts +223 -0
- package/types/koobiq-components-timezone.d.ts +266 -0
- package/types/koobiq-components-title.d.ts +184 -0
- package/types/koobiq-components-toast.d.ts +289 -0
- package/types/koobiq-components-toggle.d.ts +121 -0
- package/types/koobiq-components-tooltip.d.ts +610 -0
- package/types/koobiq-components-top-bar.d.ts +61 -0
- package/types/koobiq-components-tree-select.d.ts +667 -0
- package/types/koobiq-components-tree.d.ts +1290 -0
- package/types/koobiq-components-username.d.ts +340 -0
- package/username/_username-theme.scss +35 -0
- package/username/username.scss +10 -34
- package/app-switcher/index.d.ts +0 -276
- package/autocomplete/index.d.ts +0 -286
- package/button/index.d.ts +0 -153
- package/button-toggle/index.d.ts +0 -162
- package/checkbox/index.d.ts +0 -163
- package/clamped-text/index.d.ts +0 -146
- package/core/styles/_tokens.scss +0 -7
- package/core/styles/common/_clearfix.scss +0 -13
- package/core/styles/common/_popup.scss +0 -6
- package/core/styles/functions/_index.scss +0 -3
- package/core/styles/functions/_number.scss +0 -60
- package/core/styles/functions/_string.scss +0 -18
- package/core/styles/theming/scrollbar-tokens.scss +0 -25
- package/core/styles/typography/_typography-utils.scss +0 -84
- package/divider/index.d.ts +0 -20
- package/dl/index.d.ts +0 -45
- package/ellipsis-center/index.d.ts +0 -71
- package/empty-state/index.d.ts +0 -45
- package/flag/index.d.ts +0 -44
- package/icon/index.d.ts +0 -200
- package/input/index.d.ts +0 -354
- package/link/index.d.ts +0 -56
- package/loader-overlay/index.d.ts +0 -57
- package/modal/index.d.ts +0 -339
- package/navbar/index.d.ts +0 -372
- package/notification-center/index.d.ts +0 -323
- package/popover/index.d.ts +0 -182
- package/prebuilt-themes/dark-theme.css +0 -1
- package/prebuilt-themes/light-theme.css +0 -1
- package/progress-bar/index.d.ts +0 -31
- package/radio/index.d.ts +0 -203
- package/search-expandable/index.d.ts +0 -101
- package/sidebar/index.d.ts +0 -94
- package/sidepanel/index.d.ts +0 -272
- package/skeleton/index.d.ts +0 -26
- package/split-button/index.d.ts +0 -46
- package/table/index.d.ts +0 -25
- package/tabs/index.d.ts +0 -677
- package/textarea/index.d.ts +0 -138
- package/timepicker/index.d.ts +0 -197
- package/timezone/index.d.ts +0 -125
- package/title/index.d.ts +0 -139
- package/toast/index.d.ts +0 -178
- package/toggle/index.d.ts +0 -104
- package/tooltip/index.d.ts +0 -335
- package/top-bar/index.d.ts +0 -33
- package/tree/index.d.ts +0 -802
- package/tree-select/index.d.ts +0 -475
- package/username/index.d.ts +0 -194
- /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
- /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, inject, signal, computed, ElementRef, input,
|
|
2
|
+
import { InjectionToken, Injectable, inject, signal, computed, ElementRef, input, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, Injector, booleanAttribute, DestroyRef, output, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
|
-
import { FormGroup, FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
|
|
7
|
-
import * as
|
|
6
|
+
import { FormGroup, FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl, FormGroupDirective, NgForm, Validators } from '@angular/forms';
|
|
7
|
+
import * as i4$1 from '@koobiq/components/button';
|
|
8
8
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import * as i1$2 from '@koobiq/components/core';
|
|
10
|
+
import { DateAdapter, DateFormatter, ruRULocaleData, kbqLocaleConfigurationOverrideProvider, PopUpSizes, PopUpPlacements, KbqLocaleOverridesDirective, KbqErrorStateTracker, ErrorStateMatcher } from '@koobiq/components/core';
|
|
11
|
+
import * as i3$1 from '@koobiq/components/popover';
|
|
11
12
|
import { KbqPopoverTrigger, KbqPopoverModule } from '@koobiq/components/popover';
|
|
13
|
+
import { fromEvent } from 'rxjs';
|
|
14
|
+
import { map, distinctUntilChanged, take } from 'rxjs/operators';
|
|
12
15
|
import * as i2 from '@koobiq/components/datepicker';
|
|
13
16
|
import { KbqDatepickerModule } from '@koobiq/components/datepicker';
|
|
14
17
|
import * as i3 from '@koobiq/components/form-field';
|
|
15
|
-
import { KbqError, KbqFieldset, KbqFieldsetItem, KbqHint, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
16
|
-
import * as
|
|
18
|
+
import { KbqError, KbqFieldset, KbqFieldsetItem, KbqHint, KBQ_FORM_FIELD, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
19
|
+
import * as i1$1 from '@koobiq/components/icon';
|
|
17
20
|
import { KbqIcon, KbqIconModule } from '@koobiq/components/icon';
|
|
18
21
|
import * as i5 from '@koobiq/components/radio';
|
|
19
22
|
import { KbqRadioModule } from '@koobiq/components/radio';
|
|
20
23
|
import * as i4 from '@koobiq/components/timepicker';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import { KbqLinkModule } from '@koobiq/components/link';
|
|
25
|
-
import { Subject } from 'rxjs';
|
|
24
|
+
import { TimeFormats, KbqTimepickerModule } from '@koobiq/components/timepicker';
|
|
25
|
+
import { KbqLink, KbqLinkSuffix } from '@koobiq/components/link';
|
|
26
|
+
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
26
27
|
|
|
27
28
|
/** Preset of selectable time ranges, provided by DI. */
|
|
28
29
|
const KBQ_DEFAULT_TIME_RANGE_TYPES = new InjectionToken('KBQ_DEFAULT_TIME_RANGE_TYPES');
|
|
@@ -40,7 +41,7 @@ const defaultTimeRangeTypes = [
|
|
|
40
41
|
'allTime',
|
|
41
42
|
'range'
|
|
42
43
|
];
|
|
43
|
-
/** @
|
|
44
|
+
/** @internal */
|
|
44
45
|
function createMissingDateImplError(componentName, provider) {
|
|
45
46
|
return Error(`${componentName}: No provider found for ${provider}. You must import one of the existing ` +
|
|
46
47
|
`modules at your application root or provide a custom implementation or use exists ones.`);
|
|
@@ -52,6 +53,8 @@ function createMissingDateImplError(componentName, provider) {
|
|
|
52
53
|
* @param timeRangeService - Service used to manipulate date-time values.
|
|
53
54
|
*/
|
|
54
55
|
const rangeValidator = (timeRangeService) => {
|
|
56
|
+
// TODO: a consumer cannot call this: `KbqTimeRangeService` is not exported from the entry point. Export the
|
|
57
|
+
// service or take a `DateAdapter`, then add a docs example (#DS-2196).
|
|
55
58
|
return (control) => {
|
|
56
59
|
const form = control.value;
|
|
57
60
|
if (!form.fromTime || !form.fromDate || !form.toTime || !form.toDate) {
|
|
@@ -85,10 +88,10 @@ class KbqTimeRangeEditorBridge {
|
|
|
85
88
|
*/
|
|
86
89
|
this.revealErrors = () => true;
|
|
87
90
|
}
|
|
88
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
91
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeEditorBridge, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
92
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeEditorBridge }); }
|
|
90
93
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeEditorBridge, decorators: [{
|
|
92
95
|
type: Injectable
|
|
93
96
|
}] });
|
|
94
97
|
|
|
@@ -104,15 +107,15 @@ class KbqTimeRangeService {
|
|
|
104
107
|
this.boundsSource = signal({
|
|
105
108
|
min: signal(null),
|
|
106
109
|
max: signal(null)
|
|
107
|
-
}, ...(ngDevMode ? [{ debugName: "boundsSource" }] : []));
|
|
110
|
+
}, ...(ngDevMode ? [{ debugName: "boundsSource" }] : /* istanbul ignore next */ []));
|
|
108
111
|
/**
|
|
109
112
|
* Bounds of the owning component, so that every default and every check reads one pair. Both are
|
|
110
113
|
* exact instants rather than whole days: a `maxDate` that should admit its own day has to carry the
|
|
111
114
|
* end of that day.
|
|
112
115
|
*/
|
|
113
|
-
this.minDate = computed(() => this.boundsSource().min() ?? null, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
114
|
-
/**
|
|
115
|
-
this.maxDate = computed(() => this.boundsSource().max() ?? null, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
116
|
+
this.minDate = computed(() => this.boundsSource().min() ?? null, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
117
|
+
/** Upper bound of the owning component, read the way `minDate` reads the lower one. */
|
|
118
|
+
this.maxDate = computed(() => this.boundsSource().max() ?? null, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
116
119
|
this.timeRangeConfig = {
|
|
117
120
|
lastMinute: { units: { minutes: -1 }, translationType: 'minutes' },
|
|
118
121
|
last5Minutes: { units: { minutes: -5 }, translationType: 'minutes' },
|
|
@@ -266,10 +269,10 @@ class KbqTimeRangeService {
|
|
|
266
269
|
omitMilliseconds(date) {
|
|
267
270
|
return this.dateAdapter.createDateTime(this.dateAdapter.getYear(date), this.dateAdapter.getMonth(date), this.dateAdapter.getDate(date), this.dateAdapter.getHours(date), this.dateAdapter.getMinutes(date), this.dateAdapter.getSeconds(date), 0);
|
|
268
271
|
}
|
|
269
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
270
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
272
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
273
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeService }); }
|
|
271
274
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeService, decorators: [{
|
|
273
276
|
type: Injectable
|
|
274
277
|
}], ctorParameters: () => [] });
|
|
275
278
|
|
|
@@ -285,6 +288,7 @@ class RangeErrorStateMatcher {
|
|
|
285
288
|
return !!control?.invalid && !!control.touched;
|
|
286
289
|
}
|
|
287
290
|
}
|
|
291
|
+
let nextUniqueId = 0;
|
|
288
292
|
/** @docs-private */
|
|
289
293
|
class KbqTimeRangeEditor {
|
|
290
294
|
constructor() {
|
|
@@ -293,19 +297,19 @@ class KbqTimeRangeEditor {
|
|
|
293
297
|
this.elementRef = inject(ElementRef);
|
|
294
298
|
this.document = inject(DOCUMENT);
|
|
295
299
|
/** The maximum selectable date. */
|
|
296
|
-
this.maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
300
|
+
this.maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
297
301
|
/** The minimum selectable date. */
|
|
298
|
-
this.minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
302
|
+
this.minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
299
303
|
/** Preset of selectable ranges */
|
|
300
|
-
this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes, ...(ngDevMode ? [{ debugName: "availableTimeRangeTypes" }] : []));
|
|
304
|
+
this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes, ...(ngDevMode ? [{ debugName: "availableTimeRangeTypes" }] : /* istanbul ignore next */ []));
|
|
301
305
|
/** Provided value of selected range */
|
|
302
|
-
this.rangeValue = input(this.timeRangeService.getDefaultRangeValue(), ...(ngDevMode ? [{ debugName: "rangeValue" }] : []));
|
|
303
|
-
this.showRangeAsDefault = input.required(...(ngDevMode ? [{ debugName: "showRangeAsDefault" }] : []));
|
|
304
|
-
this.localeConfiguration = input.required(...(ngDevMode ? [{ debugName: "localeConfiguration" }] : []));
|
|
306
|
+
this.rangeValue = input(this.timeRangeService.getDefaultRangeValue(), ...(ngDevMode ? [{ debugName: "rangeValue" }] : /* istanbul ignore next */ []));
|
|
307
|
+
this.showRangeAsDefault = input.required(...(ngDevMode ? [{ debugName: "showRangeAsDefault" }] : /* istanbul ignore next */ []));
|
|
308
|
+
this.localeConfiguration = input.required(...(ngDevMode ? [{ debugName: "localeConfiguration" }] : /* istanbul ignore next */ []));
|
|
305
309
|
/** Customizable option output */
|
|
306
|
-
this.optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : []));
|
|
310
|
+
this.optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
307
311
|
/** @docs-private */
|
|
308
|
-
this.isRangeVisible = computed(() => this.showRangeAsDefault() || this.availableTimeRangeTypes().includes('range'), ...(ngDevMode ? [{ debugName: "isRangeVisible" }] : []));
|
|
312
|
+
this.isRangeVisible = computed(() => this.showRangeAsDefault() || this.availableTimeRangeTypes().includes('range'), ...(ngDevMode ? [{ debugName: "isRangeVisible" }] : /* istanbul ignore next */ []));
|
|
309
313
|
/** @docs-private */
|
|
310
314
|
this.timeRangeTypesWithoutRange = computed(() => {
|
|
311
315
|
const localeConfig = this.localeConfiguration();
|
|
@@ -317,11 +321,12 @@ class KbqTimeRangeEditor {
|
|
|
317
321
|
units: this.timeRangeService.getTimeRangeTypeUnits(type),
|
|
318
322
|
formattedValue: this.getFormattedOption(type, localeConfig)
|
|
319
323
|
}));
|
|
320
|
-
}, ...(ngDevMode ? [{ debugName: "timeRangeTypesWithoutRange" }] : []));
|
|
324
|
+
}, ...(ngDevMode ? [{ debugName: "timeRangeTypesWithoutRange" }] : /* istanbul ignore next */ []));
|
|
321
325
|
/**
|
|
322
326
|
* Caption under the "range" option, spelling out the bounds the border has to stay within. Read from
|
|
323
327
|
* the service rather than from this component's own inputs, so that it can never disagree with what
|
|
324
328
|
* the border validators go on to enforce.
|
|
329
|
+
*
|
|
325
330
|
* @docs-private
|
|
326
331
|
*/
|
|
327
332
|
this.boundsHint = computed(() => {
|
|
@@ -334,15 +339,23 @@ class KbqTimeRangeEditor {
|
|
|
334
339
|
return [minDate, maxDate].some((bound) => bound && this.carriesTime(bound))
|
|
335
340
|
? dateFormatter.rangeShortDateTime(minDate, maxDate ?? undefined)
|
|
336
341
|
: dateFormatter.rangeShortDate(minDate, maxDate ?? undefined);
|
|
337
|
-
}, ...(ngDevMode ? [{ debugName: "boundsHint" }] : []));
|
|
338
|
-
/** @docs-private */
|
|
339
|
-
this.timepickerList = viewChildren(KbqTimepicker, ...(ngDevMode ? [{ debugName: "timepickerList" }] : []));
|
|
342
|
+
}, ...(ngDevMode ? [{ debugName: "boundsHint" }] : /* istanbul ignore next */ []));
|
|
340
343
|
/** @docs-private */
|
|
341
344
|
this.timepickerFormat = TimeFormats.HHmmss;
|
|
342
345
|
/** @docs-private */
|
|
343
346
|
this.rangeStateMatcher = new RangeErrorStateMatcher();
|
|
344
347
|
/** Raised by the first "apply", after which a border left wholly empty counts as an error too. */
|
|
345
348
|
this.applyAttempted = false;
|
|
349
|
+
/**
|
|
350
|
+
* Ids of the `from`/`to` prefixes, so both fields of a pair take the prefix as part of their
|
|
351
|
+
* accessible name. `aria-label` on the prefix itself is inert - a bare `<span>` has no role that
|
|
352
|
+
* supports naming.
|
|
353
|
+
*
|
|
354
|
+
* @docs-private
|
|
355
|
+
*/
|
|
356
|
+
this.fromLabelId = `kbq-time-range-editor-from-${nextUniqueId}`;
|
|
357
|
+
/** @docs-private */
|
|
358
|
+
this.toLabelId = `kbq-time-range-editor-to-${nextUniqueId++}`;
|
|
346
359
|
/** @docs-private */
|
|
347
360
|
this.onChange = (_value) => { };
|
|
348
361
|
/** @docs-private */
|
|
@@ -368,17 +381,7 @@ class KbqTimeRangeEditor {
|
|
|
368
381
|
this.editorBridge.revealErrors = () => this.revealErrors();
|
|
369
382
|
this.form.valueChanges
|
|
370
383
|
.pipe(map((formValue) => formValue.type), distinctUntilChanged(), takeUntilDestroyed())
|
|
371
|
-
.subscribe((type) =>
|
|
372
|
-
const isDisabled = type !== 'range';
|
|
373
|
-
this.rangeControls.forEach((control) => {
|
|
374
|
-
if (isDisabled) {
|
|
375
|
-
control.disable({ emitEvent: false });
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
control.enable({ emitEvent: false });
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
});
|
|
384
|
+
.subscribe((type) => this.syncRangeControlsDisabledState(type));
|
|
382
385
|
this.form.valueChanges.pipe(takeUntilDestroyed()).subscribe((formValue) => {
|
|
383
386
|
// Each half is checked against its sibling, so editing one has to re-run the other. Silent,
|
|
384
387
|
// or this would re-enter through `valueChanges`.
|
|
@@ -405,6 +408,12 @@ class KbqTimeRangeEditor {
|
|
|
405
408
|
}
|
|
406
409
|
/** Implemented as part of ControlValueAccessor */
|
|
407
410
|
writeValue(value) {
|
|
411
|
+
// Untracked, as `setDisabledState()`: a form control set from a consumer's `effect()` writes here on the
|
|
412
|
+
// spot, and the inputs and bounds read on the way, by the validators too, would make the effect run again.
|
|
413
|
+
untracked(() => this.applyValue(value));
|
|
414
|
+
}
|
|
415
|
+
/** Body of `writeValue()`. */
|
|
416
|
+
applyValue(value) {
|
|
408
417
|
if (!value)
|
|
409
418
|
return;
|
|
410
419
|
const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, this.availableTimeRangeTypes(), this.form.value);
|
|
@@ -430,10 +439,23 @@ class KbqTimeRangeEditor {
|
|
|
430
439
|
registerOnTouched(fn) {
|
|
431
440
|
this.onTouch = fn;
|
|
432
441
|
}
|
|
442
|
+
/**
|
|
443
|
+
* The editor counts as left only once focus is out of it entirely. Moving between its own fields -
|
|
444
|
+
* the two halves of a border, or from a border to the radio that drives it - is still editing, and
|
|
445
|
+
* a `focusout` fires for each of those moves.
|
|
446
|
+
*
|
|
447
|
+
* @docs-private
|
|
448
|
+
*/
|
|
449
|
+
onEditorFocusOut({ currentTarget, relatedTarget }) {
|
|
450
|
+
if (this.staysWithin(currentTarget, relatedTarget))
|
|
451
|
+
return;
|
|
452
|
+
this.onTouch();
|
|
453
|
+
}
|
|
433
454
|
/**
|
|
434
455
|
* Leaving one border reports what is wrong with it. Angular marks a control touched on its own blur,
|
|
435
456
|
* which is a finer grain than the spec asks for - so moving between a border's own date and time
|
|
436
457
|
* takes the touch back off, and the pair is judged only once focus is out of both.
|
|
458
|
+
*
|
|
437
459
|
* @docs-private
|
|
438
460
|
*/
|
|
439
461
|
onBorderFocusOut(border, { currentTarget, relatedTarget }) {
|
|
@@ -442,6 +464,7 @@ class KbqTimeRangeEditor {
|
|
|
442
464
|
/**
|
|
443
465
|
* Typing puts a border back to its neutral state, the way `validation-on-blur` does for a single
|
|
444
466
|
* field. What is wrong with it is said again when focus leaves it.
|
|
467
|
+
*
|
|
445
468
|
* @docs-private
|
|
446
469
|
*/
|
|
447
470
|
onBorderInput(border) {
|
|
@@ -452,21 +475,20 @@ class KbqTimeRangeEditor {
|
|
|
452
475
|
* ends, and only when both of them are at fault: a single end out of bounds is already pointed at by
|
|
453
476
|
* the fields painted around it. Silent until the ends have been left, keeping step with that
|
|
454
477
|
* painting.
|
|
478
|
+
*
|
|
455
479
|
* @docs-private
|
|
456
480
|
*/
|
|
457
481
|
outOfBoundsMessage() {
|
|
458
482
|
const bothOutOfBounds = borders.every((border) => this.borderHalves(border).some((control) => control.touched && !!control.errors?.kbqTimeRangeOutOfBounds));
|
|
459
483
|
if (!bothOutOfBounds)
|
|
460
484
|
return '';
|
|
461
|
-
|
|
462
|
-
ruRULocaleData.timeRange.editor.outOfBoundsError ??
|
|
463
|
-
'';
|
|
464
|
-
return template.replace('{{ value }}', this.boundsHint());
|
|
485
|
+
return this.localeConfiguration().editor.outOfBoundsError.replace('{{ value }}', this.boundsHint());
|
|
465
486
|
}
|
|
466
487
|
/**
|
|
467
488
|
* Once focus leaves the manual range fields, a reversed range is silently swapped back into order -
|
|
468
489
|
* except on the way to "apply", where the swap is left to the emitted value so that the popover does
|
|
469
490
|
* not visibly reorder itself in the same gesture that closes it.
|
|
491
|
+
*
|
|
470
492
|
* @docs-private
|
|
471
493
|
*/
|
|
472
494
|
onRangeFocusOut({ currentTarget, relatedTarget }) {
|
|
@@ -613,6 +635,31 @@ class KbqTimeRangeEditor {
|
|
|
613
635
|
return this.borderErrors(border)[half];
|
|
614
636
|
};
|
|
615
637
|
}
|
|
638
|
+
/** Implemented as part of ControlValueAccessor */
|
|
639
|
+
setDisabledState(isDisabled) {
|
|
640
|
+
untracked(() => {
|
|
641
|
+
if (isDisabled) {
|
|
642
|
+
this.form.disable({ emitEvent: false });
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
this.form.enable({ emitEvent: false });
|
|
646
|
+
// `enable()` reaches every control, including the from/to pair a preset type keeps disabled.
|
|
647
|
+
this.syncRangeControlsDisabledState(this.form.controls.type.value);
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
/** The from/to pair is only editable while the `range` type is selected. */
|
|
652
|
+
syncRangeControlsDisabledState(type) {
|
|
653
|
+
const isDisabled = type !== 'range';
|
|
654
|
+
this.rangeControls.forEach((control) => {
|
|
655
|
+
if (isDisabled) {
|
|
656
|
+
control.disable({ emitEvent: false });
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
control.enable({ emitEvent: false });
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
}
|
|
616
663
|
mapTimeRange({ type }) {
|
|
617
664
|
if (!type)
|
|
618
665
|
return;
|
|
@@ -644,8 +691,8 @@ class KbqTimeRangeEditor {
|
|
|
644
691
|
});
|
|
645
692
|
return result;
|
|
646
693
|
}
|
|
647
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
648
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
694
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
695
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTimeRangeEditor, isStandalone: true, selector: "kbq-time-range-editor", inputs: { maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, availableTimeRangeTypes: { classPropertyName: "availableTimeRangeTypes", publicName: "availableTimeRangeTypes", isSignal: true, isRequired: false, transformFunction: null }, rangeValue: { classPropertyName: "rangeValue", publicName: "rangeValue", isSignal: true, isRequired: false, transformFunction: null }, showRangeAsDefault: { classPropertyName: "showRangeAsDefault", publicName: "showRangeAsDefault", isSignal: true, isRequired: true, transformFunction: null }, localeConfiguration: { classPropertyName: "localeConfiguration", publicName: "localeConfiguration", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "onEditorFocusOut($event)" }, classAttribute: "kbq-time-range__editor" }, providers: [
|
|
649
696
|
{
|
|
650
697
|
multi: true,
|
|
651
698
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -656,9 +703,9 @@ class KbqTimeRangeEditor {
|
|
|
656
703
|
provide: NG_VALIDATORS,
|
|
657
704
|
useExisting: KbqTimeRangeEditor
|
|
658
705
|
}
|
|
659
|
-
], viewQueries: [{ propertyName: "timepickerList", predicate: KbqTimepicker, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\" (focusout)=\"onRangeFocusOut($event)\">\n @let bounds = boundsHint();\n\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">\n {{ localeConfig.editor.rangeLabel }}\n @if (bounds) {\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-radio-button>\n }\n\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('from')\"\n (focusout)=\"onBorderFocusOut('from', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"fromTime\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.fromTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"fromDate\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('to')\"\n (focusout)=\"onBorderFocusOut('to', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"toTime\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.toTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"toDate\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n\n <!-- The range is judged as a whole, so what is wrong with it is said once, below the\n last of its two ends - in place of the caption, which spells the same bounds out. -->\n @if (outOfBoundsMessage(); as message) {\n <kbq-error>{{ message }}</kbq-error>\n } @else if (!types.length && bounds) {\n <!-- With no presets there is no option to hang the bounds off, so they go in the\n fieldset's own hint area rather than loose in the block. -->\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: KbqError, selector: "kbq-error", exportAs: ["kbqError"] }, { kind: "component", type: KbqFieldset, selector: "kbq-fieldset" }, { kind: "directive", type: KbqFieldsetItem, selector: "[kbqFieldsetItem]" }, { kind: "component", type: KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i2.KbqDatepicker, selector: "kbq-datepicker", inputs: ["hasBackdrop", "startAt", "disabled", "opened", "minDate", "maxDate", "panelClass", "dateClass", "backdropClass"], outputs: ["yearSelected", "monthSelected", "opened", "closed"], exportAs: ["kbqDatepicker"] }, { kind: "directive", type: i2.KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: ["errorStateMatcher", "placeholder", "required", "kbqDatepicker", "kbqCalendar", "kbqDatepickerFilter", "value", "min", "max", "disabled", "id", "kbqValidationTooltip"], outputs: ["incorrectInput", "dateChange", "dateInput"], exportAs: ["kbqDatepickerInput"] }, { kind: "component", type: i2.KbqDatepickerToggleIconComponent, selector: "kbq-datepicker-toggle-icon", inputs: ["disabled", "for"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i4.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "ngmodule", type: KbqRadioModule }, { kind: "directive", type: i5.KbqRadioGroup, selector: "kbq-radio-group", inputs: ["big", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["kbqRadioGroup"] }, { kind: "component", type: i5.KbqRadioButton, selector: "kbq-radio-button", inputs: ["checked", "value", "disabled", "tabIndex", "required", "labelPosition", "name", "isFocused", "id"], outputs: ["change"], exportAs: ["kbqRadioButton"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
706
|
+
], ngImport: i0, template: "<form [formGroup]=\"form\">\n @let localeConfig = localeConfiguration();\n @let types = timeRangeTypesWithoutRange();\n @let bounds = boundsHint();\n\n <!-- The radiogroup holds only radios: the from/to block is its sibling rather than its child, so the\n text fields and the calendar button are not announced as part of the group. -->\n <div class=\"kbq-time-range-editor__container\">\n @if (types.length) {\n <kbq-radio-group [formControl]=\"form.controls.type\">\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"\n optionTemplate() || defaultOptionTemplate;\n context: { $implicit: type }\n \"\n />\n </kbq-radio-button>\n }\n </div>\n\n @if (isRangeVisible()) {\n <kbq-radio-button class=\"kbq-time-range-editor__range-option\" [value]=\"'range'\">\n {{ localeConfig.editor.rangeLabel }}\n @if (bounds) {\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-radio-button>\n }\n </kbq-radio-group>\n }\n\n @if (isRangeVisible()) {\n <div\n class=\"kbq-time-range-editor__range\"\n role=\"group\"\n [attr.aria-label]=\"localeConfig.editor.rangeLabel\"\n (focusout)=\"onRangeFocusOut($event)\"\n >\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('from')\"\n (focusout)=\"onBorderFocusOut('from', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [id]=\"fromLabelId\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"fromTime\"\n [attr.aria-labelledby]=\"fromLabelId\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.fromTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"fromDate\"\n [attr.aria-labelledby]=\"fromLabelId\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('to')\"\n (focusout)=\"onBorderFocusOut('to', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [id]=\"toLabelId\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"toTime\"\n [attr.aria-labelledby]=\"toLabelId\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.toTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"toDate\"\n [attr.aria-labelledby]=\"toLabelId\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n\n <!-- The range is judged as a whole, so what is wrong with it is said once, below the\n last of its two ends - in place of the caption, which spells the same bounds out. -->\n @if (outOfBoundsMessage(); as message) {\n <kbq-error>{{ message }}</kbq-error>\n } @else if (!types.length && bounds) {\n <!-- With no presets there is no option to hang the bounds off, so they go in the\n fieldset's own hint area rather than loose in the block. -->\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-fieldset>\n </div>\n </div>\n }\n </div>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: KbqError, selector: "kbq-error", exportAs: ["kbqError"] }, { kind: "component", type: KbqFieldset, selector: "kbq-fieldset", exportAs: ["kbqFieldset"] }, { kind: "directive", type: KbqFieldsetItem, selector: "[kbqFieldsetItem]", exportAs: ["kbqFieldsetItem"] }, { kind: "component", type: KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i2.KbqDatepicker, selector: "kbq-datepicker", inputs: ["hasBackdrop", "startAt", "disabled", "opened", "minDate", "maxDate", "panelClass", "dateClass", "backdropClass"], outputs: ["yearSelected", "monthSelected", "opened", "closed"], exportAs: ["kbqDatepicker"] }, { kind: "directive", type: i2.KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: ["errorStateMatcher", "placeholder", "required", "kbqDatepicker", "kbqCalendar", "kbqDatepickerFilter", "value", "min", "max", "disabled", "id", "kbqValidationTooltip"], outputs: ["incorrectInput", "dateChange", "dateInput"], exportAs: ["kbqDatepickerInput"] }, { kind: "component", type: i2.KbqDatepickerToggleIconComponent, selector: "kbq-datepicker-toggle-icon", inputs: ["disabled", "for"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqSuffix, selector: "[kbqSuffix]", exportAs: ["kbqSuffix"] }, { kind: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i4.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "ngmodule", type: KbqRadioModule }, { kind: "component", type: i5.KbqRadioGroup, selector: "kbq-radio-group", inputs: ["errorStateMatcher", "big", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["kbqRadioGroup"] }, { kind: "component", type: i5.KbqRadioButton, selector: "kbq-radio-button", inputs: ["id", "value", "checked", "disabled", "tabIndex", "required", "labelPosition", "name"], outputs: ["change"], exportAs: ["kbqRadioButton"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
660
707
|
}
|
|
661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeEditor, decorators: [{
|
|
662
709
|
type: Component,
|
|
663
710
|
args: [{ selector: 'kbq-time-range-editor', imports: [
|
|
664
711
|
NgTemplateOutlet,
|
|
@@ -683,9 +730,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
683
730
|
useExisting: KbqTimeRangeEditor
|
|
684
731
|
}
|
|
685
732
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
686
|
-
class: 'kbq-time-range__editor'
|
|
687
|
-
|
|
688
|
-
|
|
733
|
+
class: 'kbq-time-range__editor',
|
|
734
|
+
// The editor is a composite control: no single field's blur means the user is done with it,
|
|
735
|
+
// so touched is driven by focus leaving the editor as a whole.
|
|
736
|
+
'(focusout)': 'onEditorFocusOut($event)'
|
|
737
|
+
}, template: "<form [formGroup]=\"form\">\n @let localeConfig = localeConfiguration();\n @let types = timeRangeTypesWithoutRange();\n @let bounds = boundsHint();\n\n <!-- The radiogroup holds only radios: the from/to block is its sibling rather than its child, so the\n text fields and the calendar button are not announced as part of the group. -->\n <div class=\"kbq-time-range-editor__container\">\n @if (types.length) {\n <kbq-radio-group [formControl]=\"form.controls.type\">\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"\n optionTemplate() || defaultOptionTemplate;\n context: { $implicit: type }\n \"\n />\n </kbq-radio-button>\n }\n </div>\n\n @if (isRangeVisible()) {\n <kbq-radio-button class=\"kbq-time-range-editor__range-option\" [value]=\"'range'\">\n {{ localeConfig.editor.rangeLabel }}\n @if (bounds) {\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-radio-button>\n }\n </kbq-radio-group>\n }\n\n @if (isRangeVisible()) {\n <div\n class=\"kbq-time-range-editor__range\"\n role=\"group\"\n [attr.aria-label]=\"localeConfig.editor.rangeLabel\"\n (focusout)=\"onRangeFocusOut($event)\"\n >\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('from')\"\n (focusout)=\"onBorderFocusOut('from', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [id]=\"fromLabelId\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"fromTime\"\n [attr.aria-labelledby]=\"fromLabelId\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.fromTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"fromDate\"\n [attr.aria-labelledby]=\"fromLabelId\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div\n class=\"kbq-time-range-editor__date-time\"\n (input)=\"onBorderInput('to')\"\n (focusout)=\"onBorderFocusOut('to', $event)\"\n >\n <span class=\"kbq-time-range-editor__date-time-prefix\" [id]=\"toLabelId\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input\n kbqTimepicker\n data-time-range-field=\"toTime\"\n [attr.aria-labelledby]=\"toLabelId\"\n [format]=\"timepickerFormat\"\n [formControl]=\"form.controls.toTime\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n data-time-range-field=\"toDate\"\n [attr.aria-labelledby]=\"toLabelId\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n\n <!-- The range is judged as a whole, so what is wrong with it is said once, below the\n last of its two ends - in place of the caption, which spells the same bounds out. -->\n @if (outOfBoundsMessage(); as message) {\n <kbq-error>{{ message }}</kbq-error>\n } @else if (!types.length && bounds) {\n <!-- With no presets there is no option to hang the bounds off, so they go in the\n fieldset's own hint area rather than loose in the block. -->\n <kbq-hint>{{ bounds }}</kbq-hint>\n }\n </kbq-fieldset>\n </div>\n </div>\n }\n </div>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n" }]
|
|
738
|
+
}], ctorParameters: () => [], propDecorators: { maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], availableTimeRangeTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTimeRangeTypes", required: false }] }], rangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeValue", required: false }] }], showRangeAsDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRangeAsDefault", required: true }] }], localeConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeConfiguration", required: true }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }] } });
|
|
689
739
|
|
|
690
740
|
/** @docs-private */
|
|
691
741
|
class KbqTimeRangeTitle {
|
|
@@ -693,9 +743,11 @@ class KbqTimeRangeTitle {
|
|
|
693
743
|
this.timeRangeService = inject(KbqTimeRangeService);
|
|
694
744
|
this.popover = inject(KbqPopoverTrigger, { host: true });
|
|
695
745
|
this.injector = inject(Injector);
|
|
696
|
-
this.timeRange = input.required(...(ngDevMode ? [{ debugName: "timeRange" }] : []));
|
|
697
|
-
this.localeConfiguration = input.required(...(ngDevMode ? [{ debugName: "localeConfiguration" }] : []));
|
|
698
|
-
this.titleTemplate = input(...(ngDevMode ? [undefined, { debugName: "titleTemplate" }] : []));
|
|
746
|
+
this.timeRange = input.required(...(ngDevMode ? [{ debugName: "timeRange" }] : /* istanbul ignore next */ []));
|
|
747
|
+
this.localeConfiguration = input.required(...(ngDevMode ? [{ debugName: "localeConfiguration" }] : /* istanbul ignore next */ []));
|
|
748
|
+
this.titleTemplate = input(...(ngDevMode ? [undefined, { debugName: "titleTemplate" }] : /* istanbul ignore next */ []));
|
|
749
|
+
/** Drops the built-in trigger out of the tab order. A custom `titleTemplate` owns its own state. */
|
|
750
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
699
751
|
this.context = computed(() => {
|
|
700
752
|
const timeRange = this.timeRange();
|
|
701
753
|
if (!timeRange)
|
|
@@ -704,7 +756,7 @@ class KbqTimeRangeTitle {
|
|
|
704
756
|
...timeRange,
|
|
705
757
|
...this.timeRangeService.getTimeRangeTypeUnits(timeRange.type)
|
|
706
758
|
};
|
|
707
|
-
}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
759
|
+
}, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
708
760
|
this.titleContext = computed(() => {
|
|
709
761
|
const context = this.context();
|
|
710
762
|
const formattedDate = this.formattedDate();
|
|
@@ -716,7 +768,7 @@ class KbqTimeRangeTitle {
|
|
|
716
768
|
$implicit: customizableTitleContext,
|
|
717
769
|
...customizableTitleContext
|
|
718
770
|
};
|
|
719
|
-
}, ...(ngDevMode ? [{ debugName: "titleContext" }] : []));
|
|
771
|
+
}, ...(ngDevMode ? [{ debugName: "titleContext" }] : /* istanbul ignore next */ []));
|
|
720
772
|
this.formattedDate = computed(() => {
|
|
721
773
|
const context = this.context();
|
|
722
774
|
const localeConfiguration = this.localeConfiguration();
|
|
@@ -727,9 +779,7 @@ class KbqTimeRangeTitle {
|
|
|
727
779
|
if (timeRangeUnit === 'other') {
|
|
728
780
|
switch (context.type) {
|
|
729
781
|
case 'range': {
|
|
730
|
-
return (
|
|
731
|
-
' ' +
|
|
732
|
-
this.timeRangeService.dateFormatter.rangeLongDate(this.timeRangeService.dateAdapter.deserialize(context.startDateTime ?? ''), this.timeRangeService.dateAdapter.deserialize(context.endDateTime ?? '')));
|
|
782
|
+
return this.timeRangeService.dateFormatter.rangeLongDate(this.timeRangeService.dateAdapter.deserialize(context.startDateTime ?? ''), this.timeRangeService.dateAdapter.deserialize(context.endDateTime ?? ''));
|
|
733
783
|
}
|
|
734
784
|
case 'allTime': {
|
|
735
785
|
return localeConfiguration.editor.allTime;
|
|
@@ -747,99 +797,106 @@ class KbqTimeRangeTitle {
|
|
|
747
797
|
}
|
|
748
798
|
if (!context.startDateTime)
|
|
749
799
|
return '';
|
|
750
|
-
return (localeConfiguration.title
|
|
751
|
-
|
|
752
|
-
this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(context.startDateTime), this.timeRangeService.dateAdapter.today(), [timeRangeUnit], false, localeConfiguration.durationTemplate.title));
|
|
753
|
-
}, ...(ngDevMode ? [{ debugName: "formattedDate" }] : []));
|
|
800
|
+
return this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(context.startDateTime), this.timeRangeService.dateAdapter.today(), [timeRangeUnit], false, localeConfiguration.durationTemplate.title);
|
|
801
|
+
}, ...(ngDevMode ? [{ debugName: "formattedDate" }] : /* istanbul ignore next */ []));
|
|
754
802
|
}
|
|
755
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
756
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
803
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
804
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTimeRangeTitle, isStandalone: true, selector: "kbq-time-range-title", inputs: { timeRange: { classPropertyName: "timeRange", publicName: "timeRange", isSignal: true, isRequired: true, transformFunction: null }, localeConfiguration: { classPropertyName: "localeConfiguration", publicName: "localeConfiguration", isSignal: true, isRequired: true, transformFunction: null }, titleTemplate: { classPropertyName: "titleTemplate", publicName: "titleTemplate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
757
805
|
@if (titleTemplate()) {
|
|
758
806
|
<ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
|
|
759
807
|
} @else {
|
|
760
|
-
<a
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
<i kbq-icon="kbq-calendar-o_16"></i>
|
|
808
|
+
<a kbqLink pseudo size="normal" [disabled]="disabled()">
|
|
809
|
+
{{ formattedDate() }}
|
|
810
|
+
<i kbq-icon="kbq-calendar-o_16" kbqLinkSuffix></i>
|
|
764
811
|
</a>
|
|
765
812
|
}
|
|
766
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "
|
|
813
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: KbqLink, selector: "[kbqLink]", inputs: ["disabled", "tabIndex", "pseudo", "external", "underline", "size", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqLinkSuffix, selector: "[kbqLinkSuffix]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
767
814
|
}
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitle, decorators: [{
|
|
769
816
|
type: Component,
|
|
770
817
|
args: [{
|
|
771
818
|
selector: 'kbq-time-range-title',
|
|
772
819
|
imports: [
|
|
773
820
|
NgTemplateOutlet,
|
|
774
|
-
|
|
821
|
+
KbqLink,
|
|
822
|
+
KbqLinkSuffix,
|
|
775
823
|
KbqIconModule
|
|
776
824
|
],
|
|
777
825
|
template: `
|
|
778
826
|
@if (titleTemplate()) {
|
|
779
827
|
<ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
|
|
780
828
|
} @else {
|
|
781
|
-
<a
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
<i kbq-icon="kbq-calendar-o_16"></i>
|
|
829
|
+
<a kbqLink pseudo size="normal" [disabled]="disabled()">
|
|
830
|
+
{{ formattedDate() }}
|
|
831
|
+
<i kbq-icon="kbq-calendar-o_16" kbqLinkSuffix></i>
|
|
785
832
|
</a>
|
|
786
833
|
}
|
|
787
834
|
`,
|
|
788
835
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
789
836
|
}]
|
|
790
|
-
}], propDecorators: { timeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeRange", required: true }] }], localeConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeConfiguration", required: true }] }], titleTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTemplate", required: false }] }] } });
|
|
837
|
+
}], propDecorators: { timeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeRange", required: true }] }], localeConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeConfiguration", required: true }] }], titleTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTemplate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
791
838
|
|
|
792
839
|
/** Localization configuration provider. */
|
|
793
|
-
const KBQ_TIME_RANGE_LOCALE_CONFIGURATION = new InjectionToken('
|
|
794
|
-
/**
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
840
|
+
const KBQ_TIME_RANGE_LOCALE_CONFIGURATION = new InjectionToken('KbqTimeRangeLocaleConfiguration', { factory: () => ruRULocaleData.timeRange });
|
|
841
|
+
/**
|
|
842
|
+
* Utility provider for `KBQ_TIME_RANGE_LOCALE_CONFIGURATION`. Only the strings you pass are overridden;
|
|
843
|
+
* the rest keep following the active locale.
|
|
844
|
+
*/
|
|
845
|
+
const kbqTimeRangeLocaleConfigurationProvider = (configuration) => kbqLocaleConfigurationOverrideProvider('timeRange', configuration);
|
|
799
846
|
class KbqTimeRange {
|
|
800
847
|
constructor() {
|
|
801
848
|
this.timeRangeService = inject(KbqTimeRangeService);
|
|
802
|
-
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
803
849
|
this.editorBridge = inject(KbqTimeRangeEditorBridge);
|
|
804
850
|
this.document = inject(DOCUMENT);
|
|
851
|
+
this.destroyRef = inject(DestroyRef);
|
|
805
852
|
/** @docs-private */
|
|
806
853
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
807
|
-
/** The
|
|
808
|
-
this.minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : []));
|
|
809
|
-
/** The
|
|
810
|
-
this.maxDate = input(...(ngDevMode ? [undefined, { debugName: "maxDate" }] : []));
|
|
811
|
-
/**
|
|
812
|
-
this.defaultRangeValue = input(...(ngDevMode ? [undefined, { debugName: "defaultRangeValue" }] : []));
|
|
813
|
-
/**
|
|
814
|
-
this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes, ...(ngDevMode ? [{ debugName: "availableTimeRangeTypes" }] : []));
|
|
815
|
-
/**
|
|
816
|
-
this.titleTemplate = input(...(ngDevMode ? [undefined, { debugName: "titleTemplate" }] : []));
|
|
817
|
-
/**
|
|
818
|
-
this.optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : []));
|
|
819
|
-
/** Whether
|
|
820
|
-
this.arrow = input(true, ...(ngDevMode ?
|
|
854
|
+
/** The earliest date the calendars offer and the validation accepts. */
|
|
855
|
+
this.minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
856
|
+
/** The latest date the calendars offer and the validation accepts. */
|
|
857
|
+
this.maxDate = input(...(ngDevMode ? [undefined, { debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
858
|
+
/** Seeds the from/to pair of the manual range. */
|
|
859
|
+
this.defaultRangeValue = input(...(ngDevMode ? [undefined, { debugName: "defaultRangeValue" }] : /* istanbul ignore next */ []));
|
|
860
|
+
/** The options the editor offers, in order. The first one is selected by default. */
|
|
861
|
+
this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes, ...(ngDevMode ? [{ debugName: "availableTimeRangeTypes" }] : /* istanbul ignore next */ []));
|
|
862
|
+
/** Replaces the built-in trigger. */
|
|
863
|
+
this.titleTemplate = input(...(ngDevMode ? [undefined, { debugName: "titleTemplate" }] : /* istanbul ignore next */ []));
|
|
864
|
+
/** Replaces the built-in rendering of an option in the editor. */
|
|
865
|
+
this.optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
866
|
+
/** Whether the popover is drawn with an arrow. */
|
|
867
|
+
this.arrow = input(true, { ...(ngDevMode ? { debugName: "arrow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
821
868
|
/**
|
|
822
|
-
*
|
|
823
|
-
* @see availableTimeRangeTypes
|
|
869
|
+
* Keeps the manual range visible even when `range` is not in {@link availableTimeRangeTypes}.
|
|
824
870
|
*/
|
|
825
|
-
this.showRangeAsDefault = input(true, ...(ngDevMode ? [{ debugName: "showRangeAsDefault" }] : []));
|
|
826
|
-
/**
|
|
827
|
-
this.nonNullable = input(true, ...(ngDevMode ?
|
|
828
|
-
/**
|
|
871
|
+
this.showRangeAsDefault = input(true, ...(ngDevMode ? [{ debugName: "showRangeAsDefault" }] : /* istanbul ignore next */ []));
|
|
872
|
+
/** Falls back to a default value instead of holding `null`. */
|
|
873
|
+
this.nonNullable = input(true, { ...(ngDevMode ? { debugName: "nonNullable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
874
|
+
/** Emits the corrected value when the provided one could not be used as is. */
|
|
829
875
|
this.valueCorrected = output();
|
|
830
876
|
/**
|
|
831
877
|
* Used to calculate time range.
|
|
832
|
-
*
|
|
878
|
+
*
|
|
879
|
+
* @docs-private
|
|
880
|
+
*/
|
|
833
881
|
this.normalizedDefaultRangeValue = computed(() => ({
|
|
834
882
|
...this.timeRangeService.getDefaultRangeValue(),
|
|
835
883
|
...this.defaultRangeValue()
|
|
836
|
-
}), ...(ngDevMode ? [{ debugName: "normalizedDefaultRangeValue" }] : []));
|
|
884
|
+
}), ...(ngDevMode ? [{ debugName: "normalizedDefaultRangeValue" }] : /* istanbul ignore next */ []));
|
|
885
|
+
this.disabledState = signal(false, ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
886
|
+
/**
|
|
887
|
+
* The applied time range, or `null` when the component is nullable and holds no value.
|
|
888
|
+
*
|
|
889
|
+
* This is what the trigger renders, so it lags the editor until Apply.
|
|
890
|
+
*/
|
|
891
|
+
this.value = computed(() => this.titleValue(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
892
|
+
/** Whether the control is disabled through the forms layer. */
|
|
893
|
+
this.disabled = this.disabledState.asReadonly();
|
|
837
894
|
/** @docs-private */
|
|
838
895
|
this.popoverSize = PopUpSizes.Medium;
|
|
839
896
|
/** @docs-private */
|
|
840
897
|
this.popupPlacement = PopUpPlacements.BottomLeft;
|
|
841
898
|
/** @docs-private */
|
|
842
|
-
this.localeConfiguration =
|
|
899
|
+
this.localeConfiguration = inject(KbqLocaleOverridesDirective, { self: true }).read('timeRange', KBQ_TIME_RANGE_LOCALE_CONFIGURATION);
|
|
843
900
|
/** @docs-private */
|
|
844
901
|
this.onChange = (_value) => { };
|
|
845
902
|
/** @docs-private */
|
|
@@ -863,11 +920,8 @@ class KbqTimeRange {
|
|
|
863
920
|
}
|
|
864
921
|
this.timeRangeService.bindBounds(this.minDate, this.maxDate);
|
|
865
922
|
const defaultValue = this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), this.availableTimeRangeTypes());
|
|
866
|
-
this.titleValue = signal(this.nonNullable() ? defaultValue : null, ...(ngDevMode ? [{ debugName: "titleValue" }] : []));
|
|
923
|
+
this.titleValue = signal(this.nonNullable() ? defaultValue : null, ...(ngDevMode ? [{ debugName: "titleValue" }] : /* istanbul ignore next */ []));
|
|
867
924
|
this.rangeEditorControl = new FormControl(defaultValue, { nonNullable: true });
|
|
868
|
-
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
869
|
-
this.localeConfiguration.set(this.localeService?.getParams('timeRange') ?? ruRULocaleData.timeRange);
|
|
870
|
-
});
|
|
871
925
|
toObservable(this.availableTimeRangeTypes)
|
|
872
926
|
.pipe(takeUntilDestroyed())
|
|
873
927
|
.subscribe(this.handleAvailableTypesChange);
|
|
@@ -878,11 +932,17 @@ class KbqTimeRange {
|
|
|
878
932
|
}
|
|
879
933
|
/** Implemented as part of ControlValueAccessor */
|
|
880
934
|
writeValue(value) {
|
|
935
|
+
// Untracked, as `setDisabledState()`: a form control set from a consumer's `effect()` writes here on the
|
|
936
|
+
// spot, and the inputs read on the way — and the editor's bounds, through its validators — would make the
|
|
937
|
+
// effect run again.
|
|
938
|
+
untracked(() => this.applyValue(value));
|
|
939
|
+
}
|
|
940
|
+
/** Body of `writeValue()`. */
|
|
941
|
+
applyValue(value) {
|
|
881
942
|
const nonNullable = this.nonNullable();
|
|
882
943
|
const availableTimeRangeTypes = this.availableTimeRangeTypes();
|
|
883
944
|
const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, availableTimeRangeTypes, this.normalizedDefaultRangeValue());
|
|
884
|
-
if (
|
|
885
|
-
(nonNullable && value === null)) {
|
|
945
|
+
if (this.wasCorrected(value, corrected)) {
|
|
886
946
|
this.valueCorrected.emit(corrected);
|
|
887
947
|
}
|
|
888
948
|
this.titleValue.set(nonNullable || value !== null ? corrected : null);
|
|
@@ -891,17 +951,33 @@ class KbqTimeRange {
|
|
|
891
951
|
/**
|
|
892
952
|
* Lets the editor tell an "apply" gesture from a plain focus loss before the click even lands - the
|
|
893
953
|
* `focusout` it reacts to is dispatched between this `mousedown` and the `click` below.
|
|
954
|
+
*
|
|
894
955
|
* @docs-private
|
|
895
956
|
*/
|
|
896
957
|
onFooterPointerDown() {
|
|
897
958
|
this.editorBridge.applyGestureInProgress = true;
|
|
898
|
-
this.document
|
|
899
|
-
|
|
900
|
-
|
|
959
|
+
fromEvent(this.document, 'mouseup')
|
|
960
|
+
.pipe(take(1), takeUntilDestroyed(this.destroyRef))
|
|
961
|
+
.subscribe(() => (this.editorBridge.applyGestureInProgress = false));
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Whether the correction pass produced a different range than the one written.
|
|
965
|
+
*
|
|
966
|
+
* Comparing the outcome rather than the shape of the input keeps presets that legitimately carry
|
|
967
|
+
* no `startDateTime` - `allTime` resolves to `{}` unless a consumer supplies a range - from
|
|
968
|
+
* reporting a correction that never happened, and looping any host that writes the payload back.
|
|
969
|
+
*/
|
|
970
|
+
wasCorrected(value, corrected) {
|
|
971
|
+
if (value === null)
|
|
972
|
+
return this.nonNullable();
|
|
973
|
+
return (value.type !== corrected.type ||
|
|
974
|
+
value.startDateTime !== corrected.startDateTime ||
|
|
975
|
+
value.endDateTime !== corrected.endDateTime);
|
|
901
976
|
}
|
|
902
977
|
/**
|
|
903
978
|
* Applying is always offered; an invalid editor keeps the popover open and sends the user to the
|
|
904
979
|
* first field at fault instead.
|
|
980
|
+
*
|
|
905
981
|
* @docs-private
|
|
906
982
|
*/
|
|
907
983
|
onApply(popover) {
|
|
@@ -920,10 +996,17 @@ class KbqTimeRange {
|
|
|
920
996
|
onVisibleChange(isVisible) {
|
|
921
997
|
if (isVisible)
|
|
922
998
|
return;
|
|
999
|
+
// A pointer held on the footer when the popover went away - a release outside the window, say -
|
|
1000
|
+
// would otherwise leave the gesture marked as in flight, and the next focusout out of the range
|
|
1001
|
+
// would be read as an apply and skip the swap.
|
|
1002
|
+
this.editorBridge.applyGestureInProgress = false;
|
|
923
1003
|
// Closing throws the edits away, applied or not. With nothing on the trigger yet there is no value
|
|
924
1004
|
// to go back to, so the editor returns to its default - otherwise an abandoned edit, which may well
|
|
925
1005
|
// be one the editor refused to apply, would be waiting the next time it opens.
|
|
926
1006
|
this.rangeEditorControl.setValue(this.titleValue() ?? this.defaultEditorValue(this.availableTimeRangeTypes()));
|
|
1007
|
+
// Closing the popover is the point the user is done with the control, whether they applied
|
|
1008
|
+
// or cancelled - every ErrorStateMatcher in the library keys error display off `touched`.
|
|
1009
|
+
this.onTouch();
|
|
927
1010
|
}
|
|
928
1011
|
/** Implemented as part of ControlValueAccessor */
|
|
929
1012
|
registerOnChange(fn) {
|
|
@@ -937,8 +1020,20 @@ class KbqTimeRange {
|
|
|
937
1020
|
defaultEditorValue(types) {
|
|
938
1021
|
return this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), types.length ? types : ['range']);
|
|
939
1022
|
}
|
|
940
|
-
/**
|
|
941
|
-
|
|
1023
|
+
/** Implemented as part of ControlValueAccessor */
|
|
1024
|
+
setDisabledState(isDisabled) {
|
|
1025
|
+
this.disabledState.set(isDisabled);
|
|
1026
|
+
untracked(() => {
|
|
1027
|
+
if (isDisabled) {
|
|
1028
|
+
this.rangeEditorControl.disable({ emitEvent: false });
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
this.rangeEditorControl.enable({ emitEvent: false });
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRange, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1036
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: KbqTimeRange, isStandalone: true, selector: "kbq-time-range", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, defaultRangeValue: { classPropertyName: "defaultRangeValue", publicName: "defaultRangeValue", isSignal: true, isRequired: false, transformFunction: null }, availableTimeRangeTypes: { classPropertyName: "availableTimeRangeTypes", publicName: "availableTimeRangeTypes", isSignal: true, isRequired: false, transformFunction: null }, titleTemplate: { classPropertyName: "titleTemplate", publicName: "titleTemplate", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null }, showRangeAsDefault: { classPropertyName: "showRangeAsDefault", publicName: "showRangeAsDefault", isSignal: true, isRequired: false, transformFunction: null }, nonNullable: { classPropertyName: "nonNullable", publicName: "nonNullable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueCorrected: "valueCorrected" }, host: { properties: { "class.kbq-disabled": "disabled()" }, classAttribute: "kbq-time-range" }, providers: [KbqTimeRangeService, KbqTimeRangeEditorBridge], hostDirectives: [{ directive: i1$2.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0, template: `
|
|
942
1037
|
@let localeConfig = localeConfiguration();
|
|
943
1038
|
<kbq-time-range-title
|
|
944
1039
|
#popover="kbqPopover"
|
|
@@ -950,8 +1045,10 @@ class KbqTimeRange {
|
|
|
950
1045
|
[kbqPopoverFooter]="timeRangePopoverFooter"
|
|
951
1046
|
[kbqPopoverPlacement]="popupPlacement"
|
|
952
1047
|
[kbqPopoverArrow]="arrow()"
|
|
1048
|
+
[kbqPopoverDisabled]="disabled()"
|
|
953
1049
|
[titleTemplate]="titleTemplate()"
|
|
954
1050
|
[timeRange]="titleValue()"
|
|
1051
|
+
[disabled]="disabled()"
|
|
955
1052
|
[localeConfiguration]="localeConfig"
|
|
956
1053
|
(kbqPopoverVisibleChange)="onVisibleChange($event)"
|
|
957
1054
|
/>
|
|
@@ -970,7 +1067,8 @@ class KbqTimeRange {
|
|
|
970
1067
|
</ng-template>
|
|
971
1068
|
|
|
972
1069
|
<ng-template #timeRangePopoverFooter>
|
|
973
|
-
|
|
1070
|
+
<!-- The grouping is purely visual: an unnamed role=group only added a boundary. -->
|
|
1071
|
+
<div class="kbq-time-range__buttons" (mousedown)="onFooterPointerDown()">
|
|
974
1072
|
<button kbq-button [color]="'contrast'" (click)="onApply(popover)">
|
|
975
1073
|
{{ localeConfig.editor.apply }}
|
|
976
1074
|
</button>
|
|
@@ -978,9 +1076,9 @@ class KbqTimeRange {
|
|
|
978
1076
|
<button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
|
|
979
1077
|
</div>
|
|
980
1078
|
</ng-template>
|
|
981
|
-
`, isInline: true, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{display:flex;align-items:center;align-self:flex-start;min-height:var(--kbq-size-3xl);flex:none;width:57px}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-fieldset{flex:1;min-width:0}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type:
|
|
1079
|
+
`, isInline: true, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{display:flex;flex-direction:column;gap:var(--kbq-size-s);width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{display:flex;align-items:center;align-self:flex-start;min-height:var(--kbq-size-3xl);flex:none;width:57px}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-fieldset{flex:1;min-width:0}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i3$1.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["kbqPopoverHideIfNotInViewPort", "kbqTrigger", "kbqLeaveDelay", "kbqEnterDelay", "kbqPopoverPreventClose", "kbqPopoverStickToWindow", "kbqPopoverContainer", "kbqPopoverHasBackdrop", "kbqPopoverBackdropClass", "kbqPopoverDefaultPaddings", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverContext", "kbqPopoverAriaLabel", "kbqPopoverHasCloseButton", "kbqPopoverCloseOnScroll", "kbqPopoverArrow", "kbqPopoverOffset", "kbqPopoverAutoFocus", "kbqPopoverOrigin", "kbqPopoverDisabled", "kbqPopoverPlacementPriority", "kbqPopoverPlacement", "kbqPopoverVisible"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: KbqTimeRangeEditor, selector: "kbq-time-range-editor", inputs: ["maxDate", "minDate", "availableTimeRangeTypes", "rangeValue", "showRangeAsDefault", "localeConfiguration", "optionTemplate"] }, { kind: "component", type: KbqTimeRangeTitle, selector: "kbq-time-range-title", inputs: ["timeRange", "localeConfiguration", "titleTemplate", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
982
1080
|
}
|
|
983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRange, decorators: [{
|
|
984
1082
|
type: Component,
|
|
985
1083
|
args: [{ selector: 'kbq-time-range', imports: [
|
|
986
1084
|
ReactiveFormsModule,
|
|
@@ -1000,8 +1098,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1000
1098
|
[kbqPopoverFooter]="timeRangePopoverFooter"
|
|
1001
1099
|
[kbqPopoverPlacement]="popupPlacement"
|
|
1002
1100
|
[kbqPopoverArrow]="arrow()"
|
|
1101
|
+
[kbqPopoverDisabled]="disabled()"
|
|
1003
1102
|
[titleTemplate]="titleTemplate()"
|
|
1004
1103
|
[timeRange]="titleValue()"
|
|
1104
|
+
[disabled]="disabled()"
|
|
1005
1105
|
[localeConfiguration]="localeConfig"
|
|
1006
1106
|
(kbqPopoverVisibleChange)="onVisibleChange($event)"
|
|
1007
1107
|
/>
|
|
@@ -1020,7 +1120,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1020
1120
|
</ng-template>
|
|
1021
1121
|
|
|
1022
1122
|
<ng-template #timeRangePopoverFooter>
|
|
1023
|
-
|
|
1123
|
+
<!-- The grouping is purely visual: an unnamed role=group only added a boundary. -->
|
|
1124
|
+
<div class="kbq-time-range__buttons" (mousedown)="onFooterPointerDown()">
|
|
1024
1125
|
<button kbq-button [color]="'contrast'" (click)="onApply(popover)">
|
|
1025
1126
|
{{ localeConfig.editor.apply }}
|
|
1026
1127
|
</button>
|
|
@@ -1029,16 +1130,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1029
1130
|
</div>
|
|
1030
1131
|
</ng-template>
|
|
1031
1132
|
`, providers: [KbqTimeRangeService, KbqTimeRangeEditorBridge], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1032
|
-
class: 'kbq-time-range'
|
|
1033
|
-
|
|
1133
|
+
class: 'kbq-time-range',
|
|
1134
|
+
'[class.kbq-disabled]': 'disabled()'
|
|
1135
|
+
}, hostDirectives: [
|
|
1136
|
+
{ directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
|
|
1137
|
+
], styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{display:flex;flex-direction:column;gap:var(--kbq-size-s);width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{display:flex;align-items:center;align-self:flex-start;min-height:var(--kbq-size-3xl);flex:none;width:57px}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-fieldset{flex:1;min-width:0}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"] }]
|
|
1034
1138
|
}], ctorParameters: () => [], propDecorators: { minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], defaultRangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultRangeValue", required: false }] }], availableTimeRangeTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTimeRangeTypes", required: false }] }], titleTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTemplate", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], showRangeAsDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRangeAsDefault", required: false }] }], nonNullable: [{ type: i0.Input, args: [{ isSignal: true, alias: "nonNullable", required: false }] }], valueCorrected: [{ type: i0.Output, args: ["valueCorrected"] }] } });
|
|
1035
1139
|
|
|
1036
1140
|
/** Directive for easy using styles of time-range placeholder publicly. */
|
|
1037
1141
|
class KbqTimeRangeTitlePlaceholder {
|
|
1038
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1039
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1142
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1143
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTimeRangeTitlePlaceholder, isStandalone: true, selector: "[kbqTimeRangeTitlePlaceholder]", host: { classAttribute: "kbq-time-range-title__placeholder" }, ngImport: i0 }); }
|
|
1040
1144
|
}
|
|
1041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, decorators: [{
|
|
1042
1146
|
type: Directive,
|
|
1043
1147
|
args: [{
|
|
1044
1148
|
selector: '[kbqTimeRangeTitlePlaceholder]',
|
|
@@ -1051,28 +1155,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1051
1155
|
class KbqTimeRangeTitleAsControl {
|
|
1052
1156
|
constructor() {
|
|
1053
1157
|
this.timeRange = inject(KbqTimeRange);
|
|
1158
|
+
this.parentFormField = inject(KBQ_FORM_FIELD, { host: true, optional: true });
|
|
1159
|
+
this.elementRef = inject(ElementRef);
|
|
1160
|
+
this.requiredValue = signal(false, ...(ngDevMode ? [{ debugName: "requiredValue" }] : /* istanbul ignore next */ []));
|
|
1161
|
+
/** @docs-private */
|
|
1162
|
+
this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
|
|
1054
1163
|
/** @docs-private */
|
|
1055
1164
|
this.controlType = 'select';
|
|
1056
1165
|
/** @docs-private */
|
|
1057
|
-
this.
|
|
1166
|
+
this.isNativeLabelSupported = false;
|
|
1167
|
+
/**
|
|
1168
|
+
* Id of the `kbq-form-field` caption naming this control, when it has one.
|
|
1169
|
+
*
|
|
1170
|
+
* A `<label for>` does not associate with a custom element, so the relationship is expressed the
|
|
1171
|
+
* other way around — from the control to the label.
|
|
1172
|
+
*
|
|
1173
|
+
* @docs-private
|
|
1174
|
+
*/
|
|
1175
|
+
this.ariaLabelledby = computed(() => this.parentFormField?.labelId() ?? null, ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
|
|
1058
1176
|
/** @docs-private */
|
|
1059
1177
|
this.ngControl = this.timeRange.ngControl;
|
|
1178
|
+
this.errorStateTracker = new KbqErrorStateTracker(inject(ErrorStateMatcher), this.ngControl, inject(FormGroupDirective, { optional: true }), inject(NgForm, { optional: true }));
|
|
1179
|
+
/** @docs-private */
|
|
1180
|
+
this.value = this.timeRange.value;
|
|
1181
|
+
/** @docs-private */
|
|
1182
|
+
this.id = signal(inject(_IdGenerator).getId('kbq-time-range-title-as-control-')).asReadonly();
|
|
1183
|
+
/** @docs-private */
|
|
1184
|
+
this.placeholder = signal(undefined).asReadonly();
|
|
1185
|
+
/** @docs-private */
|
|
1186
|
+
this.focused = this.focusedValue.asReadonly();
|
|
1187
|
+
/** @docs-private */
|
|
1188
|
+
this.empty = computed(() => this.timeRange.value() === null, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
|
|
1189
|
+
/** @docs-private */
|
|
1190
|
+
this.required = this.requiredValue.asReadonly();
|
|
1191
|
+
/** @docs-private */
|
|
1192
|
+
this.disabled = this.timeRange.disabled;
|
|
1193
|
+
/** @docs-private */
|
|
1194
|
+
this.errorState = this.errorStateTracker.errorState;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* The validators and the touched state of the bound control notify nothing a signal could follow.
|
|
1198
|
+
*
|
|
1199
|
+
* @docs-private
|
|
1200
|
+
*/
|
|
1201
|
+
ngDoCheck() {
|
|
1202
|
+
this.errorStateTracker.updateErrorState();
|
|
1203
|
+
this.requiredValue.set(!!this.ngControl?.control?.hasValidator(Validators.required));
|
|
1060
1204
|
}
|
|
1061
1205
|
/** @docs-private */
|
|
1062
|
-
onContainerClick(_event) {
|
|
1206
|
+
onContainerClick(_event) {
|
|
1207
|
+
this.focus();
|
|
1208
|
+
}
|
|
1063
1209
|
/** @docs-private */
|
|
1064
|
-
focus(
|
|
1065
|
-
|
|
1066
|
-
|
|
1210
|
+
focus(options) {
|
|
1211
|
+
this.elementRef.nativeElement.focus(options);
|
|
1212
|
+
}
|
|
1213
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitleAsControl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1214
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: KbqTimeRangeTitleAsControl, isStandalone: true, selector: "kbq-time-range-title-as-control", host: { listeners: { "focus": "focusedValue.set(true)", "blur": "focusedValue.set(false)" }, properties: { "attr.tabindex": "disabled() ? null : 0", "attr.id": "id()", "attr.aria-labelledby": "ariaLabelledby()" }, classAttribute: "kbq-time-range-title-as-form-field" }, providers: [
|
|
1067
1215
|
{
|
|
1068
1216
|
provide: KbqFormFieldControl,
|
|
1069
1217
|
useExisting: KbqTimeRangeTitleAsControl
|
|
1070
1218
|
}
|
|
1071
1219
|
], ngImport: i0, template: `
|
|
1072
1220
|
<ng-content />
|
|
1073
|
-
`, isInline: true, styles: [":host{display:flex;align-items:center}:host:focus-visible{outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1221
|
+
`, isInline: true, styles: [":host{display:flex;align-items:center}:host(:focus-visible){outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1074
1222
|
}
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeTitleAsControl, decorators: [{
|
|
1076
1224
|
type: Component,
|
|
1077
1225
|
args: [{ selector: 'kbq-time-range-title-as-control', template: `
|
|
1078
1226
|
<ng-content />
|
|
@@ -1082,9 +1230,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1082
1230
|
useExisting: KbqTimeRangeTitleAsControl
|
|
1083
1231
|
}
|
|
1084
1232
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1085
|
-
'[attr.tabindex]': '0',
|
|
1086
|
-
|
|
1087
|
-
|
|
1233
|
+
'[attr.tabindex]': 'disabled() ? null : 0',
|
|
1234
|
+
'[attr.id]': 'id()',
|
|
1235
|
+
'[attr.aria-labelledby]': 'ariaLabelledby()',
|
|
1236
|
+
class: 'kbq-time-range-title-as-form-field',
|
|
1237
|
+
'(focus)': 'focusedValue.set(true)',
|
|
1238
|
+
'(blur)': 'focusedValue.set(false)'
|
|
1239
|
+
}, styles: [":host{display:flex;align-items:center}:host(:focus-visible){outline:none}\n"] }]
|
|
1088
1240
|
}] });
|
|
1089
1241
|
|
|
1090
1242
|
const COMPONENTS = [
|
|
@@ -1095,8 +1247,8 @@ const COMPONENTS = [
|
|
|
1095
1247
|
KbqTimeRangeTitleAsControl
|
|
1096
1248
|
];
|
|
1097
1249
|
class KbqTimeRangeModule {
|
|
1098
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1099
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1250
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1251
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
|
|
1100
1252
|
KbqTimeRangeTitle,
|
|
1101
1253
|
KbqTimeRangeEditor,
|
|
1102
1254
|
KbqTimeRangeTitlePlaceholder,
|
|
@@ -1105,11 +1257,11 @@ class KbqTimeRangeModule {
|
|
|
1105
1257
|
KbqTimeRangeEditor,
|
|
1106
1258
|
KbqTimeRangeTitlePlaceholder,
|
|
1107
1259
|
KbqTimeRangeTitleAsControl] }); }
|
|
1108
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1260
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
|
|
1109
1261
|
KbqTimeRangeTitle,
|
|
1110
1262
|
KbqTimeRangeEditor] }); }
|
|
1111
1263
|
}
|
|
1112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTimeRangeModule, decorators: [{
|
|
1113
1265
|
type: NgModule,
|
|
1114
1266
|
args: [{
|
|
1115
1267
|
imports: COMPONENTS,
|