@koobiq/components 19.8.3 → 20.1.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.component.scss +0 -18
- package/accordion/accordion.component.scss +9 -2
- package/accordion/index.d.ts +238 -1
- package/actions-panel/index.d.ts +304 -5
- package/alert/_alert-theme.scss +0 -4
- package/alert/alert-tokens.scss +4 -4
- package/alert/index.d.ts +54 -1
- package/app-switcher/app-switcher-dropdown-app.scss +2 -0
- package/app-switcher/index.d.ts +239 -1
- package/autocomplete/index.d.ts +265 -1
- package/badge/index.d.ts +57 -1
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/breadcrumbs/index.d.ts +244 -1
- package/button/button-group.scss +42 -2
- package/button/index.d.ts +153 -1
- package/button-toggle/button-toggle.scss +23 -0
- package/button-toggle/index.d.ts +157 -1
- package/checkbox/checkbox.scss +5 -4
- package/checkbox/index.d.ts +159 -1
- package/clamped-text/index.d.ts +145 -4
- package/code-block/_code-block-theme.scss +0 -6
- package/code-block/code-block-tokens.scss +0 -2
- package/code-block/index.d.ts +383 -1
- package/content-panel/content-panel.scss +0 -8
- package/content-panel/index.d.ts +158 -2
- package/core/highlight/_highlight-theme.scss +9 -0
- package/core/index.d.ts +4794 -1
- package/core/styles/_koobiq-theme.scss +1 -0
- package/core/styles/common/_animation.scss +4 -0
- package/core/styles/common/_overlay.scss +3 -4
- package/core/styles/theming/_components-theming.scss +1 -63
- package/core/styles/theming/_scrollbar-theme.scss +4 -0
- package/datepicker/_datepicker-theme.scss +1 -1
- package/datepicker/datepicker-toggle.scss +3 -3
- package/datepicker/index.d.ts +699 -1
- package/divider/index.d.ts +20 -1
- package/dl/index.d.ts +38 -1
- package/dropdown/dropdown.scss +2 -2
- package/dropdown/index.d.ts +473 -1
- package/dynamic-translation/index.d.ts +81 -2
- package/ellipsis-center/index.d.ts +38 -1
- package/empty-state/index.d.ts +45 -1
- package/fesm2022/koobiq-components-accordion.mjs +104 -115
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +16 -16
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +35 -49
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +82 -87
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +294 -304
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +35 -42
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +79 -101
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +92 -88
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +56 -51
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +50 -52
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +46 -49
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +115 -136
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +90 -107
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +2048 -703
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +285 -349
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +14 -25
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +30 -31
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +159 -160
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +23 -23
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +16 -21
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +35 -39
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +160 -248
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +1160 -1184
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +66 -0
- package/fesm2022/koobiq-components-flag.mjs.map +1 -0
- package/fesm2022/koobiq-components-form-field.mjs +211 -430
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +42 -43
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +85 -61
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +116 -155
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +38 -53
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +138 -128
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +38 -45
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +31 -35
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +174 -164
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +164 -169
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +80 -59
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +40 -36
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +94 -85
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +24 -30
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +25 -32
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +95 -85
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +17 -17
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +69 -60
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +44 -35
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +279 -244
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +63 -55
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +88 -128
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +13 -13
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +29 -22
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +114 -96
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +23 -23
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +260 -275
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +179 -267
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +42 -68
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +65 -66
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +46 -38
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +58 -58
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +150 -39
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +54 -69
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +51 -63
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +141 -121
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +22 -25
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +264 -231
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +273 -239
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +62 -49
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/file-upload-tokens.scss +1 -0
- package/file-upload/index.d.ts +577 -1
- package/filter-bar/_filter-bar-theme.scss +86 -0
- package/filter-bar/filter-bar-tokens.scss +6 -0
- package/filter-bar/filter-bar.scss +10 -4
- package/filter-bar/filter-refresher.scss +1 -1
- package/filter-bar/filters.scss +23 -19
- package/filter-bar/index.d.ts +1165 -1
- package/filter-bar/pipes/base-pipe.scss +14 -35
- package/filter-bar/pipes/pipe-date.scss +20 -14
- package/filter-bar/pipes/pipe-multi-tree-select.scss +5 -3
- package/filter-bar/pipes/pipe-multiselect.scss +5 -3
- package/filter-bar/pipes/pipe-readonly.scss +4 -13
- package/filter-bar/pipes/pipe-select.scss +3 -1
- package/filter-bar/pipes/pipe-tree-select.scss +3 -1
- package/flag/flag.scss +53 -0
- package/flag/index.d.ts +44 -0
- package/form-field/index.d.ts +569 -1
- package/icon/index.d.ts +162 -1
- package/index.d.ts +2 -1
- package/inline-edit/index.d.ts +176 -2
- package/inline-edit/inline-edit.scss +7 -7
- package/input/index.d.ts +339 -1
- package/link/index.d.ts +56 -1
- package/link/link-tokens.scss +2 -2
- package/list/index.d.ts +229 -1
- package/loader-overlay/index.d.ts +57 -1
- package/loader-overlay/loader-overlay-tokens.scss +1 -1
- package/markdown/index.d.ts +68 -1
- package/modal/_modal-animation.scss +6 -6
- package/modal/_modal-theme.scss +3 -6
- package/modal/index.d.ts +313 -1
- package/modal/modal.scss +15 -0
- package/navbar/index.d.ts +305 -1
- package/navbar/navbar.scss +1 -2
- package/notification-center/index.d.ts +322 -1
- package/notification-center/notification-center.scss +14 -9
- package/notification-center/notification-item.scss +2 -1
- package/overflow-items/index.d.ts +162 -2
- package/package.json +13 -17
- package/popover/index.d.ts +182 -1
- package/popover/popover.scss +8 -12
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/index.d.ts +31 -1
- package/progress-bar/progress-bar.scss +4 -0
- package/progress-spinner/index.d.ts +37 -1
- package/progress-spinner/progress-spinner.scss +5 -1
- package/radio/index.d.ts +203 -1
- package/radio/radio.scss +18 -4
- package/resizer/index.d.ts +85 -2
- package/schematics/collection.json +10 -0
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/filter-bar-signals/README.md +66 -0
- package/schematics/migrations/filter-bar-signals/data.js +72 -0
- package/schematics/migrations/filter-bar-signals/index.js +316 -0
- package/schematics/migrations/filter-bar-signals/schema.json +20 -0
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/v20-upgrade/README.md +72 -0
- package/schematics/migrations/v20-upgrade/data.js +274 -0
- package/schematics/migrations/v20-upgrade/index.js +222 -0
- package/schematics/migrations/v20-upgrade/schema.json +20 -0
- package/schematics/migrations.json +15 -0
- package/schematics/ng-add/index.js +3 -4
- package/scrollbar/index.d.ts +136 -1
- package/search-expandable/index.d.ts +98 -1
- package/select/index.d.ts +701 -1
- package/sidebar/index.d.ts +93 -1
- package/sidepanel/index.d.ts +263 -1
- package/sidepanel/sidepanel.scss +0 -8
- package/skeleton/index.d.ts +26 -2
- package/skeleton/skeleton.scss +4 -0
- package/split-button/_split-button-theme.scss +2 -2
- package/split-button/index.d.ts +46 -1
- package/splitter/_splitter-theme.scss +2 -2
- package/splitter/index.d.ts +142 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +24 -1
- package/tabs/index.d.ts +647 -1
- package/tabs/tab-header.scss +1 -0
- package/tabs/tabs-tokens.scss +1 -1
- package/tags/index.d.ts +706 -1
- package/textarea/index.d.ts +133 -1
- package/time-range/index.d.ts +310 -7
- package/time-range/time-range.scss +0 -8
- package/timepicker/index.d.ts +193 -1
- package/timepicker/timepicker.scss +2 -2
- package/timezone/index.d.ts +123 -1
- package/title/index.d.ts +131 -1
- package/toast/index.d.ts +164 -1
- package/toggle/index.d.ts +84 -1
- package/tooltip/index.d.ts +211 -1
- package/top-bar/index.d.ts +33 -1
- package/top-bar/top-bar.scss +1 -2
- package/tree/_tree-theme.scss +2 -7
- package/tree/index.d.ts +733 -1
- package/tree/toggle.scss +5 -0
- package/tree/tree-option.scss +20 -11
- package/tree-select/_tree-select-theme.scss +1 -1
- package/tree-select/index.d.ts +384 -1
- package/username/index.d.ts +194 -5
- package/accordion/accordion-content.d.ts +0 -6
- package/accordion/accordion-content.directive.d.ts +0 -27
- package/accordion/accordion-header.d.ts +0 -6
- package/accordion/accordion-header.directive.d.ts +0 -7
- package/accordion/accordion-item.d.ts +0 -77
- package/accordion/accordion-trigger.component.d.ts +0 -24
- package/accordion/accordion-trigger.directive.d.ts +0 -21
- package/accordion/accordion.component.d.ts +0 -79
- package/accordion/accordion.module.d.ts +0 -12
- package/accordion/public-api.d.ts +0 -9
- package/actions-panel/actions-panel-config.d.ts +0 -82
- package/actions-panel/actions-panel-container.d.ts +0 -90
- package/actions-panel/actions-panel-ref.d.ts +0 -44
- package/actions-panel/actions-panel.d.ts +0 -85
- package/actions-panel/module.d.ts +0 -7
- package/alert/alert.component.d.ts +0 -43
- package/alert/alert.module.d.ts +0 -9
- package/alert/public-api.d.ts +0 -2
- package/app-switcher/app-switcher-animations.d.ts +0 -5
- package/app-switcher/app-switcher-dropdown-app.d.ts +0 -11
- package/app-switcher/app-switcher-dropdown-site.d.ts +0 -9
- package/app-switcher/app-switcher.d.ts +0 -198
- package/app-switcher/app-switcher.module.d.ts +0 -10
- package/app-switcher/kbq-app-switcher-list-item.d.ts +0 -16
- package/app-switcher/public-api.d.ts +0 -6
- package/autocomplete/autocomplete-origin.directive.d.ts +0 -12
- package/autocomplete/autocomplete-trigger.directive.d.ts +0 -169
- package/autocomplete/autocomplete.component.d.ts +0 -88
- package/autocomplete/autocomplete.module.d.ts +0 -12
- package/autocomplete/public-api.d.ts +0 -4
- package/badge/badge.component.d.ts +0 -46
- package/badge/badge.module.d.ts +0 -9
- package/badge/public-api.d.ts +0 -2
- package/breadcrumbs/breadcrumbs.d.ts +0 -121
- package/breadcrumbs/breadcrumbs.module.d.ts +0 -7
- package/breadcrumbs/breadcrumbs.types.d.ts +0 -22
- package/breadcrumbs/public-api.d.ts +0 -5
- package/breadcrumbs/roving-focus-group.directive.d.ts +0 -50
- package/breadcrumbs/roving-focus-item.directive.d.ts +0 -50
- package/breadcrumbs/utils.d.ts +0 -19
- package/button/button-group.d.ts +0 -45
- package/button/button-slots.d.ts +0 -11
- package/button/button.component.d.ts +0 -74
- package/button/button.dropdown-trigger.directive.d.ts +0 -14
- package/button/button.module.d.ts +0 -13
- package/button/public-api.d.ts +0 -5
- package/button-toggle/button-toggle.component.d.ts +0 -146
- package/button-toggle/button-toggle.module.d.ts +0 -9
- package/button-toggle/public-api.d.ts +0 -2
- package/checkbox/checkbox-config.d.ts +0 -13
- package/checkbox/checkbox-module.d.ts +0 -9
- package/checkbox/checkbox-required-validator.d.ts +0 -13
- package/checkbox/checkbox.d.ts +0 -128
- package/checkbox/public-api.d.ts +0 -4
- package/clamped-text/clamped-list.d.ts +0 -41
- package/clamped-text/clamped-text.d.ts +0 -65
- package/clamped-text/constants.d.ts +0 -34
- package/clamped-text/module.d.ts +0 -8
- package/code-block/code-block-highlight.d.ts +0 -98
- package/code-block/code-block.d.ts +0 -259
- package/code-block/code-block.module.d.ts +0 -7
- package/code-block/public-api.d.ts +0 -4
- package/code-block/types.d.ts +0 -36
- package/content-panel/content-panel.d.ts +0 -149
- package/content-panel/module.d.ts +0 -7
- package/core/animation/animation.d.ts +0 -37
- package/core/animation/fade-animations.d.ts +0 -2
- package/core/animation/index.d.ts +0 -3
- package/core/animation/select-animations.d.ts +0 -12
- package/core/common-behaviors/checkbox.d.ts +0 -5
- package/core/common-behaviors/clipboard.d.ts +0 -12
- package/core/common-behaviors/color.d.ts +0 -50
- package/core/common-behaviors/common-module.d.ts +0 -38
- package/core/common-behaviors/constructor.d.ts +0 -9
- package/core/common-behaviors/disabled.d.ts +0 -8
- package/core/common-behaviors/error-state.d.ts +0 -46
- package/core/common-behaviors/flex.d.ts +0 -4
- package/core/common-behaviors/hover.d.ts +0 -15
- package/core/common-behaviors/index.d.ts +0 -14
- package/core/common-behaviors/orientation.d.ts +0 -4
- package/core/common-behaviors/read-state.d.ts +0 -12
- package/core/common-behaviors/size.d.ts +0 -4
- package/core/common-behaviors/tabindex.d.ts +0 -8
- package/core/datetime/date-adapter.d.ts +0 -12
- package/core/datetime/date-formats.d.ts +0 -4
- package/core/datetime/index.d.ts +0 -2
- package/core/error/error-state-matcher.d.ts +0 -39
- package/core/form-field/field-sizing-content.d.ts +0 -21
- package/core/form-field/form-field-ref.d.ts +0 -28
- package/core/form-field/index.d.ts +0 -2
- package/core/formatters/date/formatter.d.ts +0 -11
- package/core/formatters/date/formatter.pipe.d.ts +0 -139
- package/core/formatters/filesize/config.d.ts +0 -66
- package/core/formatters/filesize/formatter.d.ts +0 -17
- package/core/formatters/filesize/index.d.ts +0 -3
- package/core/formatters/filesize/size.d.ts +0 -52
- package/core/formatters/index.d.ts +0 -13
- package/core/formatters/number/formatter.d.ts +0 -101
- package/core/forms/forms-module.d.ts +0 -7
- package/core/forms/forms.directive.d.ts +0 -22
- package/core/forms/index.d.ts +0 -3
- package/core/forms/validators.d.ts +0 -120
- package/core/highlight/highlight.pipe.d.ts +0 -10
- package/core/highlight/index.d.ts +0 -9
- package/core/line/line.d.ts +0 -23
- package/core/locales/en-US.d.ts +0 -176
- package/core/locales/es-LA.d.ts +0 -175
- package/core/locales/formatters.d.ts +0 -190
- package/core/locales/index.d.ts +0 -9
- package/core/locales/locale-service.d.ts +0 -1117
- package/core/locales/locale-service.module.d.ts +0 -6
- package/core/locales/pt-BR.d.ts +0 -175
- package/core/locales/ru-RU.d.ts +0 -176
- package/core/locales/tk-TM.d.ts +0 -176
- package/core/locales/types.d.ts +0 -77
- package/core/navbar/index.d.ts +0 -1
- package/core/navbar/rectangle-item.d.ts +0 -14
- package/core/option/action-container.d.ts +0 -5
- package/core/option/action.d.ts +0 -38
- package/core/option/index.d.ts +0 -5
- package/core/option/optgroup.d.ts +0 -16
- package/core/option/option-module.d.ts +0 -10
- package/core/option/option.d.ts +0 -170
- package/core/overlay/overlay-position-map.d.ts +0 -40
- package/core/pop-up/constants.d.ts +0 -56
- package/core/pop-up/focus-trap-strategy.d.ts +0 -5
- package/core/pop-up/index.d.ts +0 -5
- package/core/pop-up/pop-up-styles.d.ts +0 -2
- package/core/pop-up/pop-up-trigger.d.ts +0 -104
- package/core/pop-up/pop-up.d.ts +0 -57
- package/core/public-api.d.ts +0 -23
- package/core/select/common.d.ts +0 -59
- package/core/select/constants.d.ts +0 -22
- package/core/select/errors.d.ts +0 -19
- package/core/select/events.d.ts +0 -1
- package/core/select/index.d.ts +0 -4
- package/core/selection/constants.d.ts +0 -4
- package/core/selection/index.d.ts +0 -3
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +0 -23
- package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +0 -8
- package/core/services/measure-scrollbar.service.d.ts +0 -11
- package/core/services/theme.service.d.ts +0 -41
- package/core/title/index.d.ts +0 -1
- package/core/title/title-text-ref.d.ts +0 -6
- package/core/tokens/index.d.ts +0 -1
- package/core/tokens/window.d.ts +0 -5
- package/core/utils/dom.d.ts +0 -4
- package/core/utils/index.d.ts +0 -2
- package/core/utils/public-api.d.ts +0 -1
- package/core/utils/utils.d.ts +0 -25
- package/core/validation/index.d.ts +0 -1
- package/core/validation/validation.d.ts +0 -29
- package/core/version.d.ts +0 -2
- package/datepicker/calendar-body.component.d.ts +0 -55
- package/datepicker/calendar-header.component.d.ts +0 -51
- package/datepicker/calendar.component.d.ts +0 -89
- package/datepicker/datepicker-animations.d.ts +0 -9
- package/datepicker/datepicker-errors.d.ts +0 -2
- package/datepicker/datepicker-input.directive.d.ts +0 -221
- package/datepicker/datepicker-intl.d.ts +0 -32
- package/datepicker/datepicker-module.d.ts +0 -21
- package/datepicker/datepicker-toggle.component.d.ts +0 -57
- package/datepicker/datepicker.component.d.ts +0 -148
- package/datepicker/month-view.component.d.ts +0 -73
- package/datepicker/public-api.d.ts +0 -10
- package/divider/divider.component.d.ts +0 -18
- package/divider/divider.module.d.ts +0 -8
- package/divider/public-api.d.ts +0 -2
- package/dl/dl.component.d.ts +0 -26
- package/dl/dl.module.d.ts +0 -9
- package/dl/public-api.d.ts +0 -2
- package/dropdown/dropdown-animations.d.ts +0 -11
- package/dropdown/dropdown-content.directive.d.ts +0 -32
- package/dropdown/dropdown-errors.d.ts +0 -17
- package/dropdown/dropdown-item.component.d.ts +0 -52
- package/dropdown/dropdown-trigger.directive.d.ts +0 -167
- package/dropdown/dropdown.component.d.ts +0 -134
- package/dropdown/dropdown.module.d.ts +0 -13
- package/dropdown/dropdown.types.d.ts +0 -67
- package/dropdown/public-api.d.ts +0 -8
- package/dynamic-translation/dynamic-translation.d.ts +0 -72
- package/dynamic-translation/module.d.ts +0 -7
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -36
- package/ellipsis-center/public-api.d.ts +0 -1
- package/empty-state/empty-state.component.d.ts +0 -36
- package/empty-state/empty-state.module.d.ts +0 -9
- package/empty-state/public-api.d.ts +0 -2
- package/fesm2022/koobiq-components-navbar-ic.mjs +0 -863
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +0 -1
- package/fesm2022/koobiq-components-risk-level.mjs +0 -75
- package/fesm2022/koobiq-components-risk-level.mjs.map +0 -1
- package/file-upload/dropzone.d.ts +0 -147
- package/file-upload/file-upload.d.ts +0 -102
- package/file-upload/file-upload.module.d.ts +0 -20
- package/file-upload/multiple-file-upload.component.d.ts +0 -138
- package/file-upload/primitives/file-drop.d.ts +0 -35
- package/file-upload/primitives/file-picker.d.ts +0 -82
- package/file-upload/primitives/index.d.ts +0 -2
- package/file-upload/public-api.d.ts +0 -7
- package/file-upload/single-file-upload.component.d.ts +0 -118
- package/filter-bar/filter-bar-button.d.ts +0 -14
- package/filter-bar/filter-bar.d.ts +0 -81
- package/filter-bar/filter-bar.module.d.ts +0 -17
- package/filter-bar/filter-bar.types.d.ts +0 -143
- package/filter-bar/filter-refresher.d.ts +0 -5
- package/filter-bar/filter-reset.d.ts +0 -15
- package/filter-bar/filter-search.d.ts +0 -54
- package/filter-bar/filter-search.scss +0 -12
- package/filter-bar/filters.d.ts +0 -122
- package/filter-bar/pipe-add.d.ts +0 -28
- package/filter-bar/pipe.directive.d.ts +0 -13
- package/filter-bar/pipes/base-pipe.d.ts +0 -74
- package/filter-bar/pipes/pipe-button.d.ts +0 -21
- package/filter-bar/pipes/pipe-date.d.ts +0 -65
- package/filter-bar/pipes/pipe-datetime.d.ts +0 -66
- package/filter-bar/pipes/pipe-multi-select.d.ts +0 -56
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +0 -67
- package/filter-bar/pipes/pipe-readonly.d.ts +0 -7
- package/filter-bar/pipes/pipe-select.d.ts +0 -30
- package/filter-bar/pipes/pipe-state.d.ts +0 -21
- package/filter-bar/pipes/pipe-text.d.ts +0 -26
- package/filter-bar/pipes/pipe-title.d.ts +0 -27
- package/filter-bar/pipes/pipe-tree-select.d.ts +0 -42
- package/filter-bar/public-api.d.ts +0 -21
- package/form-field/cleaner.d.ts +0 -11
- package/form-field/error.d.ts +0 -8
- package/form-field/fieldset.d.ts +0 -27
- package/form-field/form-field-control.d.ts +0 -40
- package/form-field/form-field.d.ts +0 -298
- package/form-field/form-field.module.d.ts +0 -19
- package/form-field/hint.d.ts +0 -15
- package/form-field/label.d.ts +0 -6
- package/form-field/password-hint.d.ts +0 -53
- package/form-field/password-toggle.d.ts +0 -56
- package/form-field/prefix.d.ts +0 -6
- package/form-field/public-api.d.ts +0 -15
- package/form-field/reactive-password-hint.d.ts +0 -20
- package/form-field/stepper.d.ts +0 -59
- package/form-field/suffix.d.ts +0 -6
- package/form-field/validate.directive.d.ts +0 -53
- package/icon/icon-button.component.d.ts +0 -28
- package/icon/icon-item.component.d.ts +0 -11
- package/icon/icon-registry-providers.d.ts +0 -34
- package/icon/icon-registry.d.ts +0 -50
- package/icon/icon.component.d.ts +0 -33
- package/icon/icon.module.d.ts +0 -9
- package/icon/public-api.d.ts +0 -6
- package/inline-edit/inline-edit.d.ts +0 -161
- package/inline-edit/module.d.ts +0 -7
- package/input/input-errors.d.ts +0 -1
- package/input/input-number-validators.d.ts +0 -35
- package/input/input-number.d.ts +0 -96
- package/input/input-password.d.ts +0 -99
- package/input/input-value-accessor.d.ts +0 -4
- package/input/input.d.ts +0 -109
- package/input/input.module.d.ts +0 -14
- package/input/public-api.d.ts +0 -6
- package/link/link.component.d.ts +0 -53
- package/link/link.module.d.ts +0 -8
- package/link/public-api.d.ts +0 -2
- package/list/list-selection.component.d.ts +0 -196
- package/list/list.component.d.ts +0 -18
- package/list/list.module.d.ts +0 -11
- package/list/public-api.d.ts +0 -3
- package/loader-overlay/loader-overlay.component.d.ts +0 -47
- package/loader-overlay/loader-overlay.module.d.ts +0 -10
- package/loader-overlay/public-api.d.ts +0 -2
- package/markdown/markdown.component.d.ts +0 -31
- package/markdown/markdown.module.d.ts +0 -7
- package/markdown/markdown.service.d.ts +0 -19
- package/markdown/markdown.values.d.ts +0 -10
- package/markdown/public-api.d.ts +0 -4
- package/modal/css-unit.pipe.d.ts +0 -7
- package/modal/modal-control.service.d.ts +0 -20
- package/modal/modal-ref.class.d.ts +0 -37
- package/modal/modal-util.d.ts +0 -15
- package/modal/modal.component.d.ts +0 -141
- package/modal/modal.directive.d.ts +0 -20
- package/modal/modal.module.d.ts +0 -15
- package/modal/modal.service.d.ts +0 -42
- package/modal/modal.type.d.ts +0 -72
- package/modal/public-api.d.ts +0 -6
- package/navbar/navbar-brand.component.d.ts +0 -41
- package/navbar/navbar-item.component.d.ts +0 -131
- package/navbar/navbar-toggle.component.d.ts +0 -23
- package/navbar/navbar.component.d.ts +0 -68
- package/navbar/navbar.module.d.ts +0 -15
- package/navbar/public-api.d.ts +0 -6
- package/navbar/vertical-navbar.component.d.ts +0 -47
- package/navbar-ic/_navbar-ic-theme.scss +0 -81
- package/navbar-ic/index.d.ts +0 -1
- package/navbar-ic/navbar-ic-divider.scss +0 -7
- package/navbar-ic/navbar-ic-header.d.ts +0 -22
- package/navbar-ic/navbar-ic-header.scss +0 -49
- package/navbar-ic/navbar-ic-item.d.ts +0 -144
- package/navbar-ic/navbar-ic-item.scss +0 -92
- package/navbar-ic/navbar-ic-tokens.scss +0 -22
- package/navbar-ic/navbar-ic.animation.d.ts +0 -3
- package/navbar-ic/navbar-ic.d.ts +0 -118
- package/navbar-ic/navbar-ic.module.d.ts +0 -14
- package/navbar-ic/navbar-ic.scss +0 -32
- package/navbar-ic/public-api.d.ts +0 -4
- package/notification-center/notification-center-animations.d.ts +0 -5
- package/notification-center/notification-center.d.ts +0 -184
- package/notification-center/notification-center.module.d.ts +0 -7
- package/notification-center/notification-center.service.d.ts +0 -115
- package/notification-center/notification-item.d.ts +0 -27
- package/notification-center/public-api.d.ts +0 -4
- package/overflow-items/module.d.ts +0 -7
- package/overflow-items/overflow-items.d.ts +0 -152
- package/popover/popover-animations.d.ts +0 -4
- package/popover/popover-confirm.component.d.ts +0 -28
- package/popover/popover.component.d.ts +0 -139
- package/popover/popover.module.d.ts +0 -14
- package/popover/public-api.d.ts +0 -4
- package/progress-bar/progress-bar.component.d.ts +0 -20
- package/progress-bar/progress-bar.module.d.ts +0 -8
- package/progress-bar/public-api.d.ts +0 -2
- package/progress-spinner/progress-spinner.component.d.ts +0 -26
- package/progress-spinner/progress-spinner.module.d.ts +0 -9
- package/progress-spinner/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -1
- package/radio/public-api.d.ts +0 -2
- package/radio/radio.component.d.ts +0 -200
- package/radio/radio.module.d.ts +0 -8
- package/resizer/module.d.ts +0 -7
- package/resizer/resizer.d.ts +0 -75
- package/risk-level/_risk-level-theme.scss +0 -74
- package/risk-level/index.d.ts +0 -1
- package/risk-level/public-api.d.ts +0 -2
- package/risk-level/risk-level-tokens.scss +0 -33
- package/risk-level/risk-level.component.d.ts +0 -21
- package/risk-level/risk-level.component.scss +0 -22
- package/risk-level/risk-level.module.d.ts +0 -12
- package/scrollbar/public-api.d.ts +0 -4
- package/scrollbar/scrollbar.component.d.ts +0 -37
- package/scrollbar/scrollbar.directive.d.ts +0 -29
- package/scrollbar/scrollbar.module.d.ts +0 -8
- package/scrollbar/scrollbar.types.d.ts +0 -33
- package/search-expandable/public-api.d.ts +0 -2
- package/search-expandable/search-expandable.d.ts +0 -89
- package/search-expandable/search-expandable.module.d.ts +0 -7
- package/select/public-api.d.ts +0 -4
- package/select/select-common.d.ts +0 -30
- package/select/select-option.directive.d.ts +0 -21
- package/select/select.component.d.ts +0 -627
- package/select/select.module.d.ts +0 -17
- package/sidebar/public-api.d.ts +0 -2
- package/sidebar/sidebar-animations.d.ts +0 -8
- package/sidebar/sidebar.component.d.ts +0 -80
- package/sidebar/sidebar.module.d.ts +0 -8
- package/sidepanel/public-api.d.ts +0 -6
- package/sidepanel/sidepanel-animations.d.ts +0 -20
- package/sidepanel/sidepanel-config.d.ts +0 -43
- package/sidepanel/sidepanel-container.component.d.ts +0 -67
- package/sidepanel/sidepanel-directives.d.ts +0 -61
- package/sidepanel/sidepanel-ref.d.ts +0 -36
- package/sidepanel/sidepanel.module.d.ts +0 -14
- package/sidepanel/sidepanel.service.d.ts +0 -58
- package/skeleton/module.d.ts +0 -7
- package/skeleton/skeleton.d.ts +0 -17
- package/split-button/public-api.d.ts +0 -2
- package/split-button/split-button.d.ts +0 -37
- package/split-button/split-button.module.d.ts +0 -7
- package/splitter/public-api.d.ts +0 -2
- package/splitter/splitter.component.d.ts +0 -136
- package/splitter/splitter.module.d.ts +0 -8
- package/table/public-api.d.ts +0 -2
- package/table/table.component.d.ts +0 -12
- package/table/table.module.d.ts +0 -9
- package/tabs/paginated-tab-header.d.ts +0 -182
- package/tabs/public-api.d.ts +0 -10
- package/tabs/tab-body.component.d.ts +0 -95
- package/tabs/tab-content.directive.d.ts +0 -9
- package/tabs/tab-group.component.d.ts +0 -137
- package/tabs/tab-header.component.d.ts +0 -34
- package/tabs/tab-label-wrapper.directive.d.ts +0 -29
- package/tabs/tab-label.directive.d.ts +0 -11
- package/tabs/tab-nav-bar.d.ts +0 -91
- package/tabs/tab.component.d.ts +0 -70
- package/tabs/tabs-animations.d.ts +0 -4
- package/tabs/tabs.module.d.ts +0 -20
- package/tags/public-api.d.ts +0 -5
- package/tags/tag-default-options.d.ts +0 -13
- package/tags/tag-input.d.ts +0 -110
- package/tags/tag-list.component.d.ts +0 -373
- package/tags/tag-text-control.d.ts +0 -10
- package/tags/tag.component.d.ts +0 -272
- package/tags/tag.module.d.ts +0 -10
- package/textarea/public-api.d.ts +0 -2
- package/textarea/textarea.component.d.ts +0 -123
- package/textarea/textarea.module.d.ts +0 -10
- package/time-range/constants.d.ts +0 -19
- package/time-range/module.d.ts +0 -10
- package/time-range/time-range-editor.d.ts +0 -65
- package/time-range/time-range-title-as-form-field.d.ts +0 -41
- package/time-range/time-range-title.d.ts +0 -18
- package/time-range/time-range.d.ts +0 -78
- package/time-range/time-range.service.d.ts +0 -25
- package/time-range/types.d.ts +0 -69
- package/timepicker/public-api.d.ts +0 -3
- package/timepicker/timepicker.constants.d.ts +0 -22
- package/timepicker/timepicker.directive.d.ts +0 -159
- package/timepicker/timepicker.module.d.ts +0 -11
- package/timezone/cities-by-filter.pipe.d.ts +0 -7
- package/timezone/public-api.d.ts +0 -6
- package/timezone/timezone-option.component.d.ts +0 -15
- package/timezone/timezone-option.directive.d.ts +0 -22
- package/timezone/timezone-select.component.d.ts +0 -16
- package/timezone/timezone.models.d.ts +0 -16
- package/timezone/timezone.module.d.ts +0 -20
- package/timezone/timezone.utils.d.ts +0 -22
- package/timezone/utc-offset.pipe.d.ts +0 -9
- package/title/public-api.d.ts +0 -2
- package/title/title.directive.d.ts +0 -33
- package/title/title.module.d.ts +0 -8
- package/toast/public-api.d.ts +0 -5
- package/toast/toast-animations.d.ts +0 -5
- package/toast/toast-container.component.d.ts +0 -19
- package/toast/toast.component.d.ts +0 -41
- package/toast/toast.module.d.ts +0 -8
- package/toast/toast.service.d.ts +0 -61
- package/toast/toast.type.d.ts +0 -44
- package/toggle/public-api.d.ts +0 -2
- package/toggle/toggle.component.d.ts +0 -77
- package/toggle/toggle.module.d.ts +0 -8
- package/tooltip/public-api.d.ts +0 -2
- package/tooltip/tooltip.animations.d.ts +0 -8
- package/tooltip/tooltip.component.d.ts +0 -156
- package/tooltip/tooltip.module.d.ts +0 -7
- package/top-bar/module.d.ts +0 -7
- package/top-bar/public-api.d.ts +0 -2
- package/top-bar/top-bar.d.ts +0 -25
- package/tree/control/base-tree-control.d.ts +0 -40
- package/tree/control/flat-tree-control.d.ts +0 -55
- package/tree/control/flat-tree-control.filters.d.ts +0 -27
- package/tree/control/nested-tree-control.d.ts +0 -19
- package/tree/control/tree-control.d.ts +0 -44
- package/tree/data-source/flat-data-source.d.ts +0 -80
- package/tree/data-source/nested-data-source.d.ts +0 -15
- package/tree/node.d.ts +0 -34
- package/tree/outlet.d.ts +0 -9
- package/tree/padding.directive.d.ts +0 -45
- package/tree/public-api.d.ts +0 -16
- package/tree/toggle.d.ts +0 -28
- package/tree/tree-base.d.ts +0 -96
- package/tree/tree-errors.d.ts +0 -25
- package/tree/tree-option.component.d.ts +0 -89
- package/tree/tree-selection.component.d.ts +0 -156
- package/tree/tree.d.ts +0 -6
- package/tree/tree.module.d.ts +0 -16
- package/tree-select/public-api.d.ts +0 -2
- package/tree-select/tree-select.component.d.ts +0 -360
- package/tree-select/tree-select.module.d.ts +0 -15
- package/username/constants.d.ts +0 -15
- package/username/module.d.ts +0 -8
- package/username/types.d.ts +0 -62
- package/username/username.d.ts +0 -68
- package/username/username.pipe.d.ts +0 -23
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ChangeDetectorRef, DestroyRef, afterNextRender, TemplateRef, Directive,
|
|
3
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import * as
|
|
5
|
-
import { isMac, KbqComponentColors,
|
|
2
|
+
import { InjectionToken, inject, ChangeDetectorRef, DestroyRef, ElementRef, afterNextRender, TemplateRef, Directive, effect, input, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, viewChildren, output, contentChild, model, computed, forwardRef, signal, Injector, ViewContainerRef, NgModule } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
|
|
4
|
+
import * as i9$1 from '@koobiq/components/core';
|
|
5
|
+
import { isMac, KbqComponentColors, DateAdapter, DateFormatter, PopUpPlacements, ENTER, KbqFormattersModule, KbqOption, KbqPseudoCheckboxModule, KbqHighlightModule, ruRULocaleData, KbqFormsModule, PopUpSizes, KBQ_LOCALE_SERVICE, KbqOptionModule } from '@koobiq/components/core';
|
|
6
6
|
import * as i4$1 from '@koobiq/components/divider';
|
|
7
7
|
import { KbqDividerModule } from '@koobiq/components/divider';
|
|
8
|
-
import { Subject, merge,
|
|
8
|
+
import { Subject, merge, of, BehaviorSubject } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@angular/forms';
|
|
10
|
-
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule,
|
|
11
|
-
import { ENTER } from '@koobiq/cdk/keycodes';
|
|
10
|
+
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
12
11
|
import * as i1 from '@koobiq/components/button';
|
|
13
12
|
import { KbqButton, KbqButtonStyles, KbqButtonModule } from '@koobiq/components/button';
|
|
14
13
|
import * as i8 from '@koobiq/components/datepicker';
|
|
15
14
|
import { KbqDatepickerModule } from '@koobiq/components/datepicker';
|
|
16
|
-
import * as i2 from '@koobiq/components/
|
|
17
|
-
import { KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
18
|
-
import * as i3 from '@koobiq/components/icon';
|
|
15
|
+
import * as i2 from '@koobiq/components/icon';
|
|
19
16
|
import { KbqIconModule, KbqIcon } from '@koobiq/components/icon';
|
|
20
17
|
import * as i4 from '@koobiq/components/input';
|
|
21
|
-
import { KbqInputModule
|
|
18
|
+
import { KbqInputModule } from '@koobiq/components/input';
|
|
22
19
|
import * as i7 from '@koobiq/components/list';
|
|
23
20
|
import { KbqListSelection, KbqListModule } from '@koobiq/components/list';
|
|
24
|
-
import * as i5 from '@koobiq/components/popover';
|
|
21
|
+
import * as i5$1 from '@koobiq/components/popover';
|
|
25
22
|
import { KbqPopoverModule, KbqPopoverTrigger } from '@koobiq/components/popover';
|
|
26
23
|
import * as i9 from '@koobiq/components/timepicker';
|
|
27
24
|
import { KbqTimepickerModule } from '@koobiq/components/timepicker';
|
|
28
|
-
import * as
|
|
25
|
+
import * as i2$1 from '@koobiq/components/title';
|
|
29
26
|
import { KbqTitleModule } from '@koobiq/components/title';
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
27
|
+
import { FocusMonitor, InputModalityDetector } from '@angular/cdk/a11y';
|
|
28
|
+
import { DOCUMENT, NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
29
|
+
import { filter, map, distinctUntilChanged } from 'rxjs/operators';
|
|
30
|
+
import * as i1$2 from '@koobiq/components/tooltip';
|
|
32
31
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
33
|
-
import
|
|
34
|
-
import * as i6
|
|
32
|
+
import * as i5 from '@koobiq/components/form-field';
|
|
33
|
+
import * as i6 from '@koobiq/components/badge';
|
|
35
34
|
import { KbqBadgeModule } from '@koobiq/components/badge';
|
|
36
|
-
import * as i3
|
|
37
|
-
import {
|
|
35
|
+
import * as i3 from '@koobiq/components/select';
|
|
36
|
+
import { KbqSelect, KbqSelectModule } from '@koobiq/components/select';
|
|
38
37
|
import * as i7$1 from '@koobiq/components/tree';
|
|
39
|
-
import {
|
|
38
|
+
import { KbqTreeFlattener, FlatTreeControl, KbqTreeFlatDataSource, kbqTreeSelectAllValue, KbqTreeSelection, KbqTreeModule } from '@koobiq/components/tree';
|
|
40
39
|
import * as i8$1 from '@koobiq/components/tree-select';
|
|
41
|
-
import {
|
|
42
|
-
import * as i5$
|
|
40
|
+
import { KbqTreeSelect, KbqTreeSelectModule } from '@koobiq/components/tree-select';
|
|
41
|
+
import * as i5$2 from '@koobiq/components/textarea';
|
|
43
42
|
import { KbqTextareaModule } from '@koobiq/components/textarea';
|
|
44
|
-
import
|
|
45
|
-
import
|
|
43
|
+
import * as i3$1 from '@koobiq/components/dropdown';
|
|
44
|
+
import { KbqDropdownTrigger, KbqDropdownModule } from '@koobiq/components/dropdown';
|
|
45
|
+
import * as i6$1 from '@koobiq/components/alert';
|
|
46
46
|
import { KbqAlertModule } from '@koobiq/components/alert';
|
|
47
|
-
import * as i3$2 from '@koobiq/components/dropdown';
|
|
48
|
-
import { KbqDropdownModule, KbqDropdownTrigger } from '@koobiq/components/dropdown';
|
|
49
47
|
|
|
50
48
|
/** Injection Token for providing configuration of filter-bar */
|
|
51
49
|
const KBQ_PIPE_DATA = new InjectionToken('KBQ_PIPE_DATA');
|
|
@@ -65,7 +63,7 @@ class KbqBasePipe {
|
|
|
65
63
|
/** localized data
|
|
66
64
|
* @docs-private */
|
|
67
65
|
get localeData() {
|
|
68
|
-
return this.filterBar?.configuration;
|
|
66
|
+
return this.filterBar?.configuration ?? KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
69
67
|
}
|
|
70
68
|
constructor() {
|
|
71
69
|
/** changes of state */
|
|
@@ -74,11 +72,25 @@ class KbqBasePipe {
|
|
|
74
72
|
this.data = inject(KBQ_PIPE_DATA);
|
|
75
73
|
/** KbqFilterBar instance
|
|
76
74
|
* @docs-private */
|
|
77
|
-
this.filterBar = inject(
|
|
75
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
78
76
|
/** @docs-private */
|
|
79
77
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
80
78
|
/** @docs-private */
|
|
81
79
|
this.destroyRef = inject(DestroyRef);
|
|
80
|
+
/** @docs-private */
|
|
81
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
82
|
+
/** @docs-private */
|
|
83
|
+
this.elementRef = inject(ElementRef);
|
|
84
|
+
this.inputModalityDetector = inject(InputModalityDetector);
|
|
85
|
+
this.document = inject(DOCUMENT);
|
|
86
|
+
/** Last known focus origin within the pipe. Used to preserve the keyboard focus ring on restore. */
|
|
87
|
+
this.focusOrigin = null;
|
|
88
|
+
/**
|
|
89
|
+
* Whether this pipe has been destroyed. Guards deferred (`setTimeout`) work that could otherwise
|
|
90
|
+
* read view queries or mutate `data` after the pipe was removed or the filter switched.
|
|
91
|
+
* @docs-private
|
|
92
|
+
*/
|
|
93
|
+
this.destroyed = false;
|
|
82
94
|
/**
|
|
83
95
|
* Whether the current platform is a Mac.
|
|
84
96
|
*
|
|
@@ -94,10 +106,20 @@ class KbqBasePipe {
|
|
|
94
106
|
}
|
|
95
107
|
};
|
|
96
108
|
this.$implicit = this;
|
|
97
|
-
this.stateChanges.subscribe(() => {
|
|
109
|
+
this.stateChanges.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
98
110
|
this.changeDetectorRef.markForCheck();
|
|
99
111
|
});
|
|
100
112
|
this.filterBar?.internalTemplatesChanges.pipe(takeUntilDestroyed()).subscribe(this.updateTemplates);
|
|
113
|
+
// Track the focus origin so the trigger's keyboard focus ring can be restored after
|
|
114
|
+
// a value is chosen. `checkChildren` captures focus on the inner trigger button.
|
|
115
|
+
this.focusMonitor
|
|
116
|
+
.monitor(this.elementRef, true)
|
|
117
|
+
.pipe(filter((origin) => !!origin), takeUntilDestroyed())
|
|
118
|
+
.subscribe((origin) => (this.focusOrigin = origin));
|
|
119
|
+
this.destroyRef.onDestroy(() => {
|
|
120
|
+
this.destroyed = true;
|
|
121
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
122
|
+
});
|
|
101
123
|
afterNextRender(() => {
|
|
102
124
|
this.isMac = isMac();
|
|
103
125
|
});
|
|
@@ -131,13 +153,39 @@ class KbqBasePipe {
|
|
|
131
153
|
onClear() {
|
|
132
154
|
this.data.value = null;
|
|
133
155
|
this.stateChanges.next();
|
|
134
|
-
this.filterBar?.onClearPipe.
|
|
135
|
-
this.filterBar?.onChangePipe.
|
|
156
|
+
this.filterBar?.onClearPipe.emit(this.data);
|
|
157
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Restores focus to the pipe's trigger button after a value is chosen or the panel closes.
|
|
161
|
+
* Focuses via {@link FocusMonitor} with the captured origin so a keyboard-driven interaction
|
|
162
|
+
* keeps its focus ring, while a mouse-driven one does not.
|
|
163
|
+
*
|
|
164
|
+
* @docs-private
|
|
165
|
+
*/
|
|
166
|
+
restoreTriggerFocus() {
|
|
167
|
+
const active = this.document.activeElement;
|
|
168
|
+
// The panel may have been closed by moving focus to another interactive element
|
|
169
|
+
// (e.g. an outside click) — stealing focus back would break the user's intent.
|
|
170
|
+
// Focus inside the pipe or inside a not-yet-detached overlay is fine to take over.
|
|
171
|
+
if (active &&
|
|
172
|
+
active !== this.document.body &&
|
|
173
|
+
!this.elementRef.nativeElement.contains(active) &&
|
|
174
|
+
!active.closest('.cdk-overlay-container')) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const trigger = this.elementRef.nativeElement.querySelector('button:not(.kbq-pipe__remove-button)');
|
|
178
|
+
// A pipe opened right after being added from pipe-add never received focus itself,
|
|
179
|
+
// so `focusOrigin` is unknown there — fall back to the detected input modality.
|
|
180
|
+
const origin = this.focusOrigin ?? this.inputModalityDetector.mostRecentModality ?? 'program';
|
|
181
|
+
if (trigger) {
|
|
182
|
+
this.focusMonitor.focusVia(trigger, origin);
|
|
183
|
+
}
|
|
136
184
|
}
|
|
137
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
138
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
185
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqBasePipe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
186
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqBasePipe, isStandalone: true, host: { properties: { "class": "\"kbq-pipe__\" + data.type", "class.kbq-pipe_empty": "isEmpty", "class.kbq-pipe_cleanable": "data.cleanable", "class.kbq-pipe_removable": "data.removable", "class.kbq-pipe_disabled": "data.disabled" }, classAttribute: "kbq-pipe" }, ngImport: i0 }); }
|
|
139
187
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqBasePipe, decorators: [{
|
|
141
189
|
type: Directive,
|
|
142
190
|
args: [{
|
|
143
191
|
host: {
|
|
@@ -157,7 +205,7 @@ class KbqPipeMinWidth {
|
|
|
157
205
|
}
|
|
158
206
|
constructor() {
|
|
159
207
|
/** KbqFilterBar instance */
|
|
160
|
-
this.filterBar = inject(
|
|
208
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
161
209
|
/** @docs-private */
|
|
162
210
|
this.elementRef = inject(ElementRef);
|
|
163
211
|
/** @docs-private */
|
|
@@ -168,13 +216,21 @@ class KbqPipeMinWidth {
|
|
|
168
216
|
this.minWidth = this.textLength < this.maxSymbolsForFitContent ? 'fit-content' : 'unset';
|
|
169
217
|
this.changeDetectorRef.markForCheck();
|
|
170
218
|
};
|
|
171
|
-
|
|
219
|
+
// Recompute the min-width whenever the filter changes. The pipe's text content updates during CD,
|
|
220
|
+
// so defer the read to the next macrotask (mirrors the old `changes.pipe(delay(0))`). Passing the
|
|
221
|
+
// `filterBar.filter` read into the scheduler subscribes the effect, replacing the `changes` bus.
|
|
222
|
+
effect((onCleanup) => onCleanup(this.scheduleMinWidthUpdate(this.filterBar?.filter())));
|
|
172
223
|
afterNextRender({ read: this.update });
|
|
173
224
|
}
|
|
174
|
-
/**
|
|
175
|
-
|
|
225
|
+
/** Schedules a deferred min-width recompute and returns the effect-cleanup that cancels it. */
|
|
226
|
+
scheduleMinWidthUpdate(_filter) {
|
|
227
|
+
const timerId = setTimeout(this.update);
|
|
228
|
+
return () => clearTimeout(timerId);
|
|
229
|
+
}
|
|
230
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMinWidth, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
231
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqPipeMinWidth, isStandalone: true, selector: "[kbqPipeMinWidth]", host: { properties: { "style.min-width": "minWidth" } }, ngImport: i0 }); }
|
|
176
232
|
}
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMinWidth, decorators: [{
|
|
178
234
|
type: Directive,
|
|
179
235
|
args: [{
|
|
180
236
|
selector: '[kbqPipeMinWidth]',
|
|
@@ -186,17 +242,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
186
242
|
|
|
187
243
|
class KbqPipeState {
|
|
188
244
|
constructor() {
|
|
189
|
-
/** @docs-private */
|
|
190
|
-
this.destroyRef = inject(DestroyRef);
|
|
191
245
|
/** @docs-private */
|
|
192
246
|
this.button = inject(KbqButton);
|
|
193
247
|
/** @docs-private */
|
|
194
248
|
this.pipe = inject(KbqBasePipe);
|
|
195
249
|
/** KbqFilterBar instance
|
|
196
250
|
* @docs-private */
|
|
197
|
-
this.filterBar = inject(
|
|
198
|
-
|
|
199
|
-
this.
|
|
251
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
252
|
+
/** Pipe state used to calculate/update the button style. */
|
|
253
|
+
this.state = input(null, ...(ngDevMode ? [{ debugName: "state", alias: 'kbqPipeState' }] : [{ alias: 'kbqPipeState' }]));
|
|
254
|
+
this.updateState = (_filter, _state) => {
|
|
200
255
|
this.button.kbqStyle = KbqButtonStyles.Outline;
|
|
201
256
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
202
257
|
if (!this.pipe.isEmpty) {
|
|
@@ -204,30 +259,20 @@ class KbqPipeState {
|
|
|
204
259
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
205
260
|
}
|
|
206
261
|
};
|
|
262
|
+
// Re-derive the button style whenever the filter OR the pipe state changes (a pipe's emptiness may
|
|
263
|
+
// change with either). Passing both reads into `updateState` subscribes this effect to both signals;
|
|
264
|
+
// the style itself derives from `pipe.isEmpty`.
|
|
265
|
+
effect(() => this.updateState(this.filterBar.filter(), this.state()));
|
|
207
266
|
}
|
|
208
|
-
/**
|
|
209
|
-
|
|
210
|
-
return this._state;
|
|
211
|
-
}
|
|
212
|
-
set state(pipe) {
|
|
213
|
-
this._state = pipe;
|
|
214
|
-
this.updateState();
|
|
215
|
-
}
|
|
216
|
-
ngOnInit() {
|
|
217
|
-
this.filterBar.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.updateState);
|
|
218
|
-
}
|
|
219
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
220
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: KbqPipeState, isStandalone: true, selector: "[kbqPipeState]", inputs: { state: ["kbqPipeState", "state"] }, ngImport: i0 }); }
|
|
267
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
268
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.25", type: KbqPipeState, isStandalone: true, selector: "[kbqPipeState]", inputs: { state: { classPropertyName: "state", publicName: "kbqPipeState", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
221
269
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeState, decorators: [{
|
|
223
271
|
type: Directive,
|
|
224
272
|
args: [{
|
|
225
273
|
selector: '[kbqPipeState]'
|
|
226
274
|
}]
|
|
227
|
-
}], propDecorators: { state: [{
|
|
228
|
-
type: Input,
|
|
229
|
-
args: [{ alias: 'kbqPipeState' }]
|
|
230
|
-
}] } });
|
|
275
|
+
}], ctorParameters: () => [], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqPipeState", required: false }] }] } });
|
|
231
276
|
|
|
232
277
|
class KbqPipeButton {
|
|
233
278
|
/** localized data
|
|
@@ -239,31 +284,36 @@ class KbqPipeButton {
|
|
|
239
284
|
/** KbqPipe instance */
|
|
240
285
|
this.pipe = inject(KbqBasePipe);
|
|
241
286
|
/** KbqFilterBar instance */
|
|
242
|
-
this.filterBar = inject(
|
|
287
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
243
288
|
/** @docs-private */
|
|
244
289
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
245
290
|
/** enables/disables read-only state */
|
|
246
|
-
this.readonly = false;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
291
|
+
this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
292
|
+
this.pipe.stateChanges.pipe(takeUntilDestroyed()).subscribe(() => this.changeDetectorRef.markForCheck());
|
|
293
|
+
// Reading the filter signal subscribes this effect; the pipe template renders plain `data`
|
|
294
|
+
// (not signals), so mark it for check whenever the filter changes — replaces the retired `changes` bus.
|
|
295
|
+
effect(() => {
|
|
296
|
+
this.filterBar.filter();
|
|
297
|
+
this.changeDetectorRef.markForCheck();
|
|
298
|
+
});
|
|
250
299
|
}
|
|
251
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
252
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
300
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
301
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: KbqPipeButton, isStandalone: true, selector: "kbq-pipe-button", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "kbq-pipe-button" }, ngImport: i0, template: `
|
|
253
302
|
<button
|
|
254
303
|
kbqTooltip="{{ pipe.data.cleanable ? localeData.clearButtonTooltip : localeData.removeButtonTooltip }}"
|
|
255
304
|
class="kbq-pipe__remove-button"
|
|
256
305
|
kbq-button
|
|
306
|
+
[attr.aria-label]="pipe.data.cleanable ? localeData.clearButtonTooltip : localeData.removeButtonTooltip"
|
|
257
307
|
[disabled]="pipe.data.disabled"
|
|
258
308
|
[kbqPipeState]="pipe.data"
|
|
259
309
|
[kbqTooltipDisabled]="pipe.data.disabled"
|
|
260
310
|
(click)="pipe.data.cleanable ? pipe.onClear() : pipe.onRemove()"
|
|
261
311
|
>
|
|
262
|
-
<i kbq-icon="kbq-xmark-s_16" [color]="pipe.data.disabled ? 'empty' : 'contrast'"></i>
|
|
312
|
+
<i kbq-icon="kbq-xmark-s_16" aria-hidden="true" [color]="pipe.data.disabled ? 'empty' : 'contrast'"></i>
|
|
263
313
|
</button>
|
|
264
|
-
`, isInline: true, styles: [".kbq-pipe-button{display:flex;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type:
|
|
314
|
+
`, isInline: true, styles: [".kbq-pipe-button{display:flex;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset", "kbqTooltipModifier", "kbqTooltipHeader"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
265
315
|
}
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeButton, decorators: [{
|
|
267
317
|
type: Component,
|
|
268
318
|
args: [{ selector: 'kbq-pipe-button', imports: [
|
|
269
319
|
KbqIconModule,
|
|
@@ -275,119 +325,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
275
325
|
kbqTooltip="{{ pipe.data.cleanable ? localeData.clearButtonTooltip : localeData.removeButtonTooltip }}"
|
|
276
326
|
class="kbq-pipe__remove-button"
|
|
277
327
|
kbq-button
|
|
328
|
+
[attr.aria-label]="pipe.data.cleanable ? localeData.clearButtonTooltip : localeData.removeButtonTooltip"
|
|
278
329
|
[disabled]="pipe.data.disabled"
|
|
279
330
|
[kbqPipeState]="pipe.data"
|
|
280
331
|
[kbqTooltipDisabled]="pipe.data.disabled"
|
|
281
332
|
(click)="pipe.data.cleanable ? pipe.onClear() : pipe.onRemove()"
|
|
282
333
|
>
|
|
283
|
-
<i kbq-icon="kbq-xmark-s_16" [color]="pipe.data.disabled ? 'empty' : 'contrast'"></i>
|
|
334
|
+
<i kbq-icon="kbq-xmark-s_16" aria-hidden="true" [color]="pipe.data.disabled ? 'empty' : 'contrast'"></i>
|
|
284
335
|
</button>
|
|
285
|
-
`,
|
|
336
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
286
337
|
class: 'kbq-pipe-button'
|
|
287
338
|
}, styles: [".kbq-pipe-button{display:flex;position:relative}\n"] }]
|
|
288
|
-
}], ctorParameters: () => [], propDecorators: { readonly: [{
|
|
289
|
-
type: Input,
|
|
290
|
-
args: [{ transform: booleanAttribute }]
|
|
291
|
-
}] } });
|
|
292
|
-
|
|
293
|
-
// todo DS-3672
|
|
294
|
-
class KbqPipeTitleDirective extends KbqTooltipTrigger {
|
|
295
|
-
get isOverflown() {
|
|
296
|
-
return this.childContainer.some(({ nativeElement }) => {
|
|
297
|
-
return (this.parent?.offsetWidth < nativeElement.scrollWidth ||
|
|
298
|
-
this.parent?.offsetHeight < nativeElement.scrollHeight);
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
get parent() {
|
|
302
|
-
return this.parentContainer?.nativeElement || this.parentContainer;
|
|
303
|
-
}
|
|
304
|
-
get child() {
|
|
305
|
-
return this.childContainer.first.nativeElement || this.childContainer;
|
|
306
|
-
}
|
|
307
|
-
constructor() {
|
|
308
|
-
super();
|
|
309
|
-
this.componentInstance = inject(KBQ_TITLE_TEXT_REF, { optional: true, host: true });
|
|
310
|
-
this.resizeStream = new Subject();
|
|
311
|
-
this.debounceInterval = 100;
|
|
312
|
-
this.resizeSubscription = Subscription.EMPTY;
|
|
313
|
-
this.mutationSubscription = Subscription.EMPTY;
|
|
314
|
-
this.focusMonitorSubscription = Subscription.EMPTY;
|
|
315
|
-
afterNextRender(() => {
|
|
316
|
-
this.listenToMutationObserver();
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
ngAfterViewInit() {
|
|
320
|
-
this.parentContainer = this.parentContainer || this.componentInstance?.parentTextElement || this.elementRef;
|
|
321
|
-
this.childContainer = this.childContainer || this.componentInstance?.textElement || this.elementRef;
|
|
322
|
-
this.content = this.viewValue;
|
|
323
|
-
this.resizeSubscription = this.resizeStream
|
|
324
|
-
.pipe(debounceTime(this.debounceInterval))
|
|
325
|
-
.subscribe(() => (this.disabled = !this.isOverflown));
|
|
326
|
-
this.focusMonitorSubscription = this.focusMonitor
|
|
327
|
-
.monitor(this.elementRef)
|
|
328
|
-
.subscribe((origin) => (origin === 'keyboard' ? this.handleElementEnter() : this.hideTooltip()));
|
|
329
|
-
}
|
|
330
|
-
ngOnDestroy() {
|
|
331
|
-
super.ngOnDestroy();
|
|
332
|
-
this.resizeSubscription.unsubscribe();
|
|
333
|
-
this.mutationSubscription.unsubscribe();
|
|
334
|
-
this.focusMonitorSubscription.unsubscribe();
|
|
335
|
-
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
336
|
-
}
|
|
337
|
-
handleElementEnter() {
|
|
338
|
-
this.disabled = !this.isOverflown;
|
|
339
|
-
}
|
|
340
|
-
hideTooltip() {
|
|
341
|
-
this.disabled = true;
|
|
342
|
-
}
|
|
343
|
-
listenToMutationObserver() {
|
|
344
|
-
this.mutationSubscription = this.createMutationObserver()
|
|
345
|
-
.pipe(throttleTime(this.debounceInterval))
|
|
346
|
-
.subscribe(() => {
|
|
347
|
-
this.disabled = !this.isOverflown;
|
|
348
|
-
this.content = this.viewValue;
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
createMutationObserver() {
|
|
352
|
-
return new Observable((observer) => {
|
|
353
|
-
const mutationObserver = new MutationObserver((mutations) => observer.next(mutations));
|
|
354
|
-
mutationObserver.observe(this.parent, {
|
|
355
|
-
characterData: true,
|
|
356
|
-
attributes: false,
|
|
357
|
-
childList: true,
|
|
358
|
-
subtree: true
|
|
359
|
-
});
|
|
360
|
-
return () => mutationObserver.disconnect();
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
364
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: KbqPipeTitleDirective, isStandalone: true, selector: "[kbqPipeTitle]", inputs: { viewValue: ["kbqPipeTitle", "viewValue"] }, host: { listeners: { "mouseenter": "handleElementEnter()", "mouseleave": "hideTooltip()", "window:resize": "resizeStream.next($event)" } }, queries: [{ propertyName: "parentContainer", first: true, predicate: ["kbqTitleContainer"], descendants: true }, { propertyName: "childContainer", predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqPipeTitle"], usesInheritance: true, ngImport: i0 }); }
|
|
365
|
-
}
|
|
366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeTitleDirective, decorators: [{
|
|
367
|
-
type: Directive,
|
|
368
|
-
args: [{
|
|
369
|
-
selector: '[kbqPipeTitle]',
|
|
370
|
-
exportAs: 'kbqPipeTitle',
|
|
371
|
-
host: {
|
|
372
|
-
'(mouseenter)': 'handleElementEnter()',
|
|
373
|
-
'(mouseleave)': 'hideTooltip()',
|
|
374
|
-
'(window:resize)': 'resizeStream.next($event)'
|
|
375
|
-
}
|
|
376
|
-
}]
|
|
377
|
-
}], ctorParameters: () => [], propDecorators: { viewValue: [{
|
|
378
|
-
type: Input,
|
|
379
|
-
args: [{ alias: 'kbqPipeTitle' }]
|
|
380
|
-
}], childContainer: [{
|
|
381
|
-
type: ContentChildren,
|
|
382
|
-
args: ['kbqTitleText', { descendants: true }]
|
|
383
|
-
}], parentContainer: [{
|
|
384
|
-
type: ContentChild,
|
|
385
|
-
args: ['kbqTitleContainer']
|
|
386
|
-
}] } });
|
|
339
|
+
}], ctorParameters: () => [], propDecorators: { readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }] } });
|
|
387
340
|
|
|
388
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Shared implementation for the `date` and `datetime` pipes. The two pipes differ only in how a range
|
|
343
|
+
* is formatted and in their default start/end values, exposed here as the {@link formatRange},
|
|
344
|
+
* {@link getDefaultStart} and {@link getDefaultEnd} hooks. Everything else — the period list / custom
|
|
345
|
+
* period flow, calendar handling and form group — is common.
|
|
346
|
+
*/
|
|
347
|
+
class KbqPipeDateBaseComponent extends KbqBasePipe {
|
|
389
348
|
constructor() {
|
|
390
349
|
super(...arguments);
|
|
350
|
+
// The concrete date type `D` is unconstrained, so the adapter/formatter are used loosely here,
|
|
351
|
+
// matching the behaviour the `date`/`datetime` pipes had before this base class was extracted.
|
|
391
352
|
this.adapter = inject(DateAdapter);
|
|
392
353
|
this.formatter = inject(DateFormatter);
|
|
393
354
|
/** @docs-private */
|
|
@@ -403,14 +364,18 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
403
364
|
/** @docs-private */
|
|
404
365
|
this.showEndCalendar = false;
|
|
405
366
|
/** @docs-private */
|
|
406
|
-
this.
|
|
367
|
+
this.popover = viewChild.required('popover');
|
|
368
|
+
/** @docs-private */
|
|
369
|
+
// Optional: the list only exists while the popover is open in list mode, and it is read
|
|
370
|
+
// in deferred callbacks that may fire after the popover has already closed.
|
|
371
|
+
this.listSelection = viewChild('listSelection', ...(ngDevMode ? [{ debugName: "listSelection", read: KbqListSelection }] : [{ read: KbqListSelection }]));
|
|
407
372
|
/** @docs-private */
|
|
408
373
|
this.returnButton = viewChild.required('returnButton', { read: KbqButton });
|
|
409
374
|
}
|
|
410
375
|
/** formatted value for period */
|
|
411
376
|
get formattedValue() {
|
|
412
377
|
if (this.start && this.end) {
|
|
413
|
-
return this.
|
|
378
|
+
return this.formatRange(this.start, this.end);
|
|
414
379
|
}
|
|
415
380
|
return this.data.value?.name ?? '';
|
|
416
381
|
}
|
|
@@ -429,7 +394,7 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
429
394
|
if (this.data.value?.start) {
|
|
430
395
|
return this.adapter.today().plus(this.data.value?.start);
|
|
431
396
|
}
|
|
432
|
-
return this.
|
|
397
|
+
return this.getDefaultStart();
|
|
433
398
|
}
|
|
434
399
|
/** parsed end */
|
|
435
400
|
get end() {
|
|
@@ -440,7 +405,7 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
440
405
|
if (this.data.value?.start) {
|
|
441
406
|
return this.adapter.today();
|
|
442
407
|
}
|
|
443
|
-
return this.
|
|
408
|
+
return this.getDefaultEnd();
|
|
444
409
|
}
|
|
445
410
|
/** Whether the current pipe is empty. */
|
|
446
411
|
get isEmpty() {
|
|
@@ -452,9 +417,20 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
452
417
|
}
|
|
453
418
|
ngAfterViewInit() {
|
|
454
419
|
super.ngAfterViewInit();
|
|
455
|
-
this.popover
|
|
456
|
-
.pipe(
|
|
457
|
-
.subscribe(() =>
|
|
420
|
+
this.popover()
|
|
421
|
+
.visibleChange.pipe(takeUntilDestroyed(this.destroyRef))
|
|
422
|
+
.subscribe((visible) => {
|
|
423
|
+
if (visible) {
|
|
424
|
+
// Move keyboard focus onto the period list so Enter selects a preset
|
|
425
|
+
// instead of the focus trap landing on the "custom period" row.
|
|
426
|
+
if (this.isListMode) {
|
|
427
|
+
setTimeout(() => this.listSelection()?.focus());
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
this.filterBar?.onClosePipe.emit(this.data);
|
|
432
|
+
}
|
|
433
|
+
});
|
|
458
434
|
}
|
|
459
435
|
/** keydown handler
|
|
460
436
|
* @docs-private */
|
|
@@ -472,14 +448,16 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
472
448
|
end: this.formGroup.controls.end.value.toISO()
|
|
473
449
|
};
|
|
474
450
|
this.stateChanges.next();
|
|
475
|
-
this.filterBar?.onChangePipe.
|
|
476
|
-
this.popover.hide();
|
|
451
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
452
|
+
this.popover().hide();
|
|
453
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
477
454
|
}
|
|
478
455
|
onSelect(item) {
|
|
479
456
|
this.data.value = item;
|
|
480
457
|
this.stateChanges.next();
|
|
481
|
-
this.filterBar?.onChangePipe.
|
|
482
|
-
this.popover.hide();
|
|
458
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
459
|
+
this.popover().hide();
|
|
460
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
483
461
|
}
|
|
484
462
|
showPeriod() {
|
|
485
463
|
this.isListMode = false;
|
|
@@ -487,18 +465,22 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
487
465
|
this.showEndCalendar = false;
|
|
488
466
|
this.initFormGroup();
|
|
489
467
|
setTimeout(() => {
|
|
490
|
-
this.
|
|
491
|
-
|
|
468
|
+
if (this.destroyed)
|
|
469
|
+
return;
|
|
470
|
+
this.popover().updatePosition(true);
|
|
471
|
+
// Focus via FocusMonitor (keyboard origin) so the focus ring is preserved; a native
|
|
472
|
+
// `.focus()` bypasses FocusMonitor and drops the `.cdk-keyboard-focused` ring.
|
|
473
|
+
this.returnButton().focusViaKeyboard();
|
|
492
474
|
});
|
|
493
475
|
}
|
|
494
476
|
showList() {
|
|
495
477
|
this.isListMode = true;
|
|
496
|
-
setTimeout(() => this.listSelection()
|
|
497
|
-
this.popover.updatePosition(true);
|
|
478
|
+
setTimeout(() => this.listSelection()?.focus());
|
|
479
|
+
this.popover().updatePosition(true);
|
|
498
480
|
}
|
|
499
481
|
/** opens popover */
|
|
500
482
|
open() {
|
|
501
|
-
this.popover.show();
|
|
483
|
+
this.popover().show();
|
|
502
484
|
}
|
|
503
485
|
onSelectStartDate(value) {
|
|
504
486
|
this.formGroup.controls.start.setValue(value);
|
|
@@ -509,7 +491,7 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
509
491
|
onFocusStartInput() {
|
|
510
492
|
this.showStartCalendar = true;
|
|
511
493
|
this.showEndCalendar = false;
|
|
512
|
-
this.popover.updatePosition(true);
|
|
494
|
+
this.popover().updatePosition(true);
|
|
513
495
|
}
|
|
514
496
|
onFocusEndInput() {
|
|
515
497
|
this.showEndCalendar = true;
|
|
@@ -525,20 +507,35 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
525
507
|
end: new FormControl(this.end || this.defaultEnd)
|
|
526
508
|
});
|
|
527
509
|
}
|
|
528
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
529
|
-
/** @nocollapse */ static { this.ɵ
|
|
530
|
-
|
|
510
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDateBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
511
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.25", type: KbqPipeDateBaseComponent, isStandalone: true, viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "listSelection", first: true, predicate: ["listSelection"], descendants: true, read: KbqListSelection, isSignal: true }, { propertyName: "returnButton", first: true, predicate: ["returnButton"], descendants: true, read: KbqButton, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
512
|
+
}
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDateBaseComponent, decorators: [{
|
|
514
|
+
type: Directive
|
|
515
|
+
}], propDecorators: { popover: [{ type: i0.ViewChild, args: ['popover', { isSignal: true }] }], listSelection: [{ type: i0.ViewChild, args: ['listSelection', { ...{ read: KbqListSelection }, isSignal: true }] }], returnButton: [{ type: i0.ViewChild, args: ['returnButton', { ...{ read: KbqButton }, isSignal: true }] }] } });
|
|
516
|
+
|
|
517
|
+
class KbqPipeDateComponent extends KbqPipeDateBaseComponent {
|
|
518
|
+
formatRange(start, end) {
|
|
519
|
+
return this.formatter.rangeShortDate(start, end);
|
|
520
|
+
}
|
|
521
|
+
getDefaultStart() {
|
|
522
|
+
return this.adapter.today();
|
|
523
|
+
}
|
|
524
|
+
getDefaultEnd() {
|
|
525
|
+
return this.adapter.today().plus({ days: 1 });
|
|
526
|
+
}
|
|
527
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
528
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeDateComponent, isStandalone: true, selector: "kbq-pipe-date", providers: [
|
|
531
529
|
{
|
|
532
530
|
provide: KbqBasePipe,
|
|
533
531
|
useExisting: this
|
|
534
532
|
}
|
|
535
|
-
], viewQueries: [{ propertyName: "listSelection", first: true, predicate: ["listSelection"], descendants: true, read: KbqListSelection, isSignal: true }, { propertyName: "returnButton", first: true, predicate: ["returnButton"], descendants: true, read: KbqButton, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-left:var(--kbq-size-xxs);margin-right:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-left:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:320px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-left:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-right:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:136px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-top-right-radius:unset;border-bottom-right-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-left:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-left:var(--kbq-size-m);padding-right:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i2.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqListModule }, { kind: "component", type: i7.KbqListSelection, selector: "kbq-list-selection", inputs: ["autoSelect", "noUnselectLast", "horizontal", "tabIndex", "disabled", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i7.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i8.KbqCalendar, selector: "kbq-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["kbqCalendar"] }, { kind: "directive", type: i8.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: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqFormattersModule }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
533
|
+
], usesInheritance: true, ngImport: i0, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover{--kbq-filter-bar-date-period-width: 320px;--kbq-filter-bar-date-field-width: 136px}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-inline:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-inline-start:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:var(--kbq-filter-bar-date-period-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-inline-start:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-inline-end:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:var(--kbq-filter-bar-date-field-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-start-end-radius:unset;border-end-end-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-inline-start:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-start-start-radius:unset;border-end-start-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-inline:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-datepicker-grid-cell-states-disabled-text);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i5.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5$1.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqListModule }, { kind: "component", type: i7.KbqListSelection, selector: "kbq-list-selection", inputs: ["autoSelect", "noUnselectLast", "selectAllToggle", "horizontal", "tabIndex", "disabled", "compareWith", "selectAllHandler"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i7.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i8.KbqCalendar, selector: "kbq-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["kbqCalendar"] }, { kind: "directive", type: i8.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: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqFormattersModule }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
536
534
|
}
|
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDateComponent, decorators: [{
|
|
538
536
|
type: Component,
|
|
539
537
|
args: [{ selector: 'kbq-pipe-date', imports: [
|
|
540
538
|
ReactiveFormsModule,
|
|
541
|
-
KbqFormFieldModule,
|
|
542
539
|
KbqIconModule,
|
|
543
540
|
KbqInputModule,
|
|
544
541
|
KbqDividerModule,
|
|
@@ -551,175 +548,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
551
548
|
KbqFormattersModule,
|
|
552
549
|
KbqPipeButton,
|
|
553
550
|
KbqTitleModule,
|
|
554
|
-
KbqPipeTitleDirective,
|
|
555
551
|
FormsModule
|
|
556
|
-
],
|
|
557
|
-
kbqDisableLegacyValidationDirectiveProvider(),
|
|
552
|
+
], providers: [
|
|
558
553
|
{
|
|
559
554
|
provide: KbqBasePipe,
|
|
560
555
|
useExisting: this
|
|
561
556
|
}
|
|
562
|
-
], template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-left:var(--kbq-size-xxs);margin-right:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-left:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:320px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-left:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-right:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:136px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-top-right-radius:unset;border-bottom-right-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-left:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-left:var(--kbq-size-m);padding-right:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"] }]
|
|
563
|
-
}]
|
|
564
|
-
type: ViewChild,
|
|
565
|
-
args: ['popover']
|
|
566
|
-
}] } });
|
|
557
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <kbq-form-field class=\"kbq-date-period__date kbq-form__control\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover{--kbq-filter-bar-date-period-width: 320px;--kbq-filter-bar-date-field-width: 136px}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-inline:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-inline-start:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:var(--kbq-filter-bar-date-period-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-inline-start:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-inline-end:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:var(--kbq-filter-bar-date-field-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-start-end-radius:unset;border-end-end-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-inline-start:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-start-start-radius:unset;border-end-start-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-inline:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-datepicker-grid-cell-states-disabled-text);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"] }]
|
|
558
|
+
}] });
|
|
567
559
|
|
|
568
|
-
class KbqPipeDatetimeComponent extends
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
this.adapter = inject(DateAdapter);
|
|
572
|
-
this.formatter = inject(DateFormatter);
|
|
573
|
-
/** @docs-private */
|
|
574
|
-
this.placements = PopUpPlacements;
|
|
575
|
-
/** @docs-private */
|
|
576
|
-
this.styles = KbqButtonStyles;
|
|
577
|
-
/** @docs-private */
|
|
578
|
-
this.colors = KbqComponentColors;
|
|
579
|
-
/** Whether the current state is list of periods. When false will displayed control for set custom period */
|
|
580
|
-
this.isListMode = true;
|
|
581
|
-
/** @docs-private */
|
|
582
|
-
this.showStartCalendar = false;
|
|
583
|
-
/** @docs-private */
|
|
584
|
-
this.showEndCalendar = false;
|
|
585
|
-
/** @docs-private */
|
|
586
|
-
this.listSelection = viewChild.required('listSelection', { read: KbqListSelection });
|
|
587
|
-
/** @docs-private */
|
|
588
|
-
this.returnButton = viewChild.required('returnButton', { read: KbqButton });
|
|
589
|
-
}
|
|
590
|
-
/** formatted value for period */
|
|
591
|
-
get formattedValue() {
|
|
592
|
-
if (this.start && this.end) {
|
|
593
|
-
return this.formatter.rangeShortDateTime(this.start, this.end);
|
|
594
|
-
}
|
|
595
|
-
return this.data.value?.name ?? '';
|
|
596
|
-
}
|
|
597
|
-
/** Whether the current pipe is disabled. */
|
|
598
|
-
get disabled() {
|
|
599
|
-
return (!this.adapter.isDateInstance(this.formGroup.controls.start.value) ||
|
|
600
|
-
!this.adapter.isDateInstance(this.formGroup.controls.end.value) ||
|
|
601
|
-
this.formGroup.controls.start.invalid);
|
|
560
|
+
class KbqPipeDatetimeComponent extends KbqPipeDateBaseComponent {
|
|
561
|
+
formatRange(start, end) {
|
|
562
|
+
return this.formatter.rangeShortDateTime(start, end);
|
|
602
563
|
}
|
|
603
|
-
|
|
604
|
-
get start() {
|
|
605
|
-
return this.adapter.parse(this.data.value?.start, '');
|
|
606
|
-
}
|
|
607
|
-
/** default object for start */
|
|
608
|
-
get defaultStart() {
|
|
609
|
-
if (this.data.value?.start) {
|
|
610
|
-
return this.adapter.today().plus(this.data.value?.start);
|
|
611
|
-
}
|
|
564
|
+
getDefaultStart() {
|
|
612
565
|
return this.adapter.today().startOf('day');
|
|
613
566
|
}
|
|
614
|
-
|
|
615
|
-
get end() {
|
|
616
|
-
return this.adapter.parse(this.data.value?.end, '');
|
|
617
|
-
}
|
|
618
|
-
/** default object for end */
|
|
619
|
-
get defaultEnd() {
|
|
620
|
-
if (this.data.value?.start) {
|
|
621
|
-
return this.adapter.today();
|
|
622
|
-
}
|
|
567
|
+
getDefaultEnd() {
|
|
623
568
|
return this.adapter.today().endOf('day');
|
|
624
569
|
}
|
|
625
|
-
/**
|
|
626
|
-
|
|
627
|
-
if (this.data.value === null)
|
|
628
|
-
return true;
|
|
629
|
-
if (this.data.value?.name)
|
|
630
|
-
return false;
|
|
631
|
-
return !this.adapter.isDateInstance(this.start) || !this.adapter.isDateInstance(this.end);
|
|
632
|
-
}
|
|
633
|
-
ngAfterViewInit() {
|
|
634
|
-
super.ngAfterViewInit();
|
|
635
|
-
this.popover.visibleChange
|
|
636
|
-
.pipe(filter((visible) => !visible), takeUntilDestroyed(this.destroyRef))
|
|
637
|
-
.subscribe(() => this.filterBar?.onClosePipe.next(this.data));
|
|
638
|
-
}
|
|
639
|
-
/** keydown handler
|
|
640
|
-
* @docs-private */
|
|
641
|
-
onKeydown($event) {
|
|
642
|
-
if (($event.ctrlKey || $event.metaKey) && $event.keyCode === ENTER) {
|
|
643
|
-
this.onApplyPeriod();
|
|
644
|
-
}
|
|
645
|
-
if ($event.keyCode === ENTER) {
|
|
646
|
-
$event.preventDefault();
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
/** @docs-private */
|
|
650
|
-
onApplyPeriod() {
|
|
651
|
-
this.data.value = {
|
|
652
|
-
start: this.formGroup.controls.start.value.toISO(),
|
|
653
|
-
end: this.formGroup.controls.end.value.toISO()
|
|
654
|
-
};
|
|
655
|
-
this.stateChanges.next();
|
|
656
|
-
this.filterBar?.onChangePipe.next(this.data);
|
|
657
|
-
this.popover.hide();
|
|
658
|
-
}
|
|
659
|
-
onSelect(item) {
|
|
660
|
-
this.data.value = item;
|
|
661
|
-
this.stateChanges.next();
|
|
662
|
-
this.filterBar?.onChangePipe.next(this.data);
|
|
663
|
-
this.popover.hide();
|
|
664
|
-
}
|
|
665
|
-
showPeriod() {
|
|
666
|
-
this.isListMode = false;
|
|
667
|
-
this.showStartCalendar = false;
|
|
668
|
-
this.showEndCalendar = false;
|
|
669
|
-
this.initFormGroup();
|
|
670
|
-
setTimeout(() => {
|
|
671
|
-
this.popover.updatePosition(true);
|
|
672
|
-
this.returnButton().focus();
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
showList() {
|
|
676
|
-
this.isListMode = true;
|
|
677
|
-
setTimeout(() => this.listSelection().focus());
|
|
678
|
-
this.popover.updatePosition(true);
|
|
679
|
-
}
|
|
680
|
-
/** opens popover */
|
|
681
|
-
open() {
|
|
682
|
-
this.popover.show();
|
|
683
|
-
}
|
|
684
|
-
onSelectStartDate(value) {
|
|
685
|
-
this.formGroup.controls.start.setValue(value);
|
|
686
|
-
}
|
|
687
|
-
onSelectEndDate(value) {
|
|
688
|
-
this.formGroup.controls.end.setValue(value);
|
|
689
|
-
}
|
|
690
|
-
onFocusStartInput() {
|
|
691
|
-
this.showStartCalendar = true;
|
|
692
|
-
this.showEndCalendar = false;
|
|
693
|
-
this.popover.updatePosition(true);
|
|
694
|
-
}
|
|
695
|
-
onFocusEndInput() {
|
|
696
|
-
this.showEndCalendar = true;
|
|
697
|
-
this.showStartCalendar = false;
|
|
698
|
-
}
|
|
699
|
-
hideCalendars() {
|
|
700
|
-
this.showStartCalendar = false;
|
|
701
|
-
this.showEndCalendar = false;
|
|
702
|
-
}
|
|
703
|
-
initFormGroup() {
|
|
704
|
-
this.formGroup = new FormGroup({
|
|
705
|
-
start: new FormControl(this.start || this.defaultStart),
|
|
706
|
-
end: new FormControl(this.end || this.defaultEnd)
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeDatetimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
710
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqPipeDatetimeComponent, isStandalone: true, selector: "kbq-pipe-datetime", providers: [
|
|
711
|
-
kbqDisableLegacyValidationDirectiveProvider(),
|
|
570
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDatetimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
571
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeDatetimeComponent, isStandalone: true, selector: "kbq-pipe-datetime", providers: [
|
|
712
572
|
{
|
|
713
573
|
provide: KbqBasePipe,
|
|
714
574
|
useExisting: this
|
|
715
575
|
}
|
|
716
|
-
], viewQueries: [{ propertyName: "listSelection", first: true, predicate: ["listSelection"], descendants: true, read: KbqListSelection, isSignal: true }, { propertyName: "returnButton", first: true, predicate: ["returnButton"], descendants: true, read: KbqButton, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"start\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"end\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-left:var(--kbq-size-xxs);margin-right:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-left:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:320px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-left:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-right:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:136px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-top-right-radius:unset;border-bottom-right-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-left:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-left:var(--kbq-size-m);padding-right:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i2.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqListModule }, { kind: "component", type: i7.KbqListSelection, selector: "kbq-list-selection", inputs: ["autoSelect", "noUnselectLast", "horizontal", "tabIndex", "disabled", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i7.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i8.KbqCalendar, selector: "kbq-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["kbqCalendar"] }, { kind: "directive", type: i8.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: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i9.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqFormattersModule }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
576
|
+
], usesInheritance: true, ngImport: i0, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"start\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"end\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover{--kbq-filter-bar-date-period-width: 320px;--kbq-filter-bar-date-field-width: 136px}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-inline:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-inline-start:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:var(--kbq-filter-bar-date-period-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-inline-start:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-inline-end:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:var(--kbq-filter-bar-date-field-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-start-end-radius:unset;border-end-end-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-inline-start:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-start-start-radius:unset;border-end-start-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-inline:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-datepicker-grid-cell-states-disabled-text);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i5.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5$1.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqListModule }, { kind: "component", type: i7.KbqListSelection, selector: "kbq-list-selection", inputs: ["autoSelect", "noUnselectLast", "selectAllToggle", "horizontal", "tabIndex", "disabled", "compareWith", "selectAllHandler"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i7.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i8.KbqCalendar, selector: "kbq-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["kbqCalendar"] }, { kind: "directive", type: i8.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: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i9.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqFormattersModule }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
717
577
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDatetimeComponent, decorators: [{
|
|
719
579
|
type: Component,
|
|
720
580
|
args: [{ selector: 'kbq-pipe-datetime', imports: [
|
|
721
581
|
ReactiveFormsModule,
|
|
722
|
-
KbqFormFieldModule,
|
|
723
582
|
KbqIconModule,
|
|
724
583
|
KbqInputModule,
|
|
725
584
|
KbqDividerModule,
|
|
@@ -732,60 +591,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
732
591
|
KbqFormattersModule,
|
|
733
592
|
KbqPipeButton,
|
|
734
593
|
KbqTitleModule,
|
|
735
|
-
KbqPipeTitleDirective,
|
|
736
594
|
FormsModule
|
|
737
|
-
],
|
|
738
|
-
kbqDisableLegacyValidationDirectiveProvider(),
|
|
595
|
+
], providers: [
|
|
739
596
|
{
|
|
740
597
|
provide: KbqBasePipe,
|
|
741
598
|
useExisting: this
|
|
742
599
|
}
|
|
743
|
-
], template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"start\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"end\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-left:var(--kbq-size-xxs);margin-right:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-left:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:320px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-left:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-right:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:136px}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-top-right-radius:unset;border-bottom-right-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-left:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-top-left-radius:unset;border-bottom-left-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-left:var(--kbq-size-m);padding-right:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"] }]
|
|
744
|
-
}]
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
600
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<button\n #popover=\"kbqPopover\"\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe-date__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n (kbqPopoverVisibleChange)=\"isListMode = true\"\n>\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!formattedValue\">\n {{ formattedValue }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n @if (isListMode) {\n <div class=\"kbq-date-list\">\n <kbq-list-selection #listSelection [autoSelect]=\"false\" [ngModel]=\"data.value?.name\">\n <kbq-list-option (click)=\"showPeriod()\" (keydown.enter)=\"showPeriod()\">\n {{ localeData.datePipe?.customPeriod }}\n <!-- prevents [kbq-icon] from matching icon slot in kbq-list-option, keeping chevron after label text -->\n <ng-container>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast-fade\"></i>\n </ng-container>\n </kbq-list-option>\n\n @for (item of values; track item) {\n <kbq-list-option [value]=\"item.name\" (click)=\"onSelect(item)\" (keydown.enter)=\"onSelect(item)\">\n {{ item.name }}\n </kbq-list-option>\n }\n </kbq-list-selection>\n </div>\n } @else {\n <div class=\"kbq-date-period kbq-datepicker__content\" (keydown)=\"onKeydown($event)\">\n <div class=\"kbq-date-period__header\">\n <button\n #returnButton\n kbq-button\n [color]=\"colors.Theme\"\n [kbqStyle]=\"styles.Transparent\"\n (click)=\"showList()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n {{ localeData.datePipe.backToPeriodSelection }}\n </button>\n </div>\n\n <form class=\"kbq-date-period__content kbq-form-horizontal\" [formGroup]=\"formGroup\">\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodFrom }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showStartCalendar\">\n <input\n formControlName=\"start\"\n [kbqCalendar]=\"startDateCalendar\"\n [max]=\"formGroup.controls.end.value\"\n (focusin)=\"onFocusStartInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"start\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n <kbq-calendar\n #startDateCalendar\n [class.kbq-calendar_hidden]=\"!showStartCalendar\"\n (selectedChange)=\"onSelectStartDate($event)\"\n />\n\n <label class=\"kbq-form__label\">{{ localeData.datePipe.customPeriodTo }}</label>\n\n <div class=\"kbq-form__row_with-time kbq-form__control\">\n <kbq-form-field class=\"kbq-date-period__date\" [class.kbq-focused]=\"showEndCalendar\">\n <input\n formControlName=\"end\"\n [kbqCalendar]=\"endDateCalendar\"\n (focusin)=\"onFocusEndInput()\"\n (keydown.tab)=\"hideCalendars()\"\n />\n <i kbq-icon=\"kbq-calendar-o_16\" kbqSuffix></i>\n </kbq-form-field>\n\n <kbq-form-field class=\"kbq-date-period__time\">\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix></i>\n <input formControlName=\"end\" kbqTimepicker (focusin)=\"hideCalendars()\" />\n </kbq-form-field>\n </div>\n\n @if (formGroup.controls.start.invalid) {\n <kbq-hint class=\"kbq-date-period__hint\" [color]=\"'error'\">\n {{ localeData.datePipe.customPeriodErrorHint }}\n </kbq-hint>\n }\n\n <kbq-calendar\n #endDateCalendar\n [class.kbq-calendar_hidden]=\"!showEndCalendar\"\n (selectedChange)=\"onSelectEndDate($event)\"\n />\n </form>\n\n <div class=\"kbq-date-period__footer\">\n <button\n kbq-button\n [color]=\"'theme'\"\n [disabled]=\"disabled\"\n [kbqStyle]=\"'transparent'\"\n (click)=\"onApplyPeriod()\"\n >\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ formattedValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}.kbq-pipe-date__popover{--kbq-filter-bar-date-period-width: 320px;--kbq-filter-bar-date-field-width: 136px}.kbq-pipe-date__popover .kbq-popover__container{max-height:unset}.kbq-pipe-date__popover .kbq-popover__content{padding:0}.kbq-pipe-date__popover .kbq-date-list{margin:var(--kbq-size-xxs) 0}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option{margin-inline:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-list-text{display:flex;flex-direction:row}.kbq-pipe-date__popover .kbq-date-list .kbq-list-option .kbq-icon{margin-inline-start:var(--kbq-size-s);align-self:center;color:var(--kbq-icon-fade-contrast-color)}.kbq-pipe-date__popover .kbq-date-period{width:var(--kbq-filter-bar-date-period-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header{padding:var(--kbq-size-xs) var(--kbq-size-xxs) var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__header .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-divider{margin:var(--kbq-size-xxs) var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content{display:grid;grid-auto-columns:minmax(min-content,1fr);grid-template-columns:min-content minmax(min-content,1fr);padding:0;gap:var(--kbq-size-s)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__label{padding-inline-start:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__control{padding-inline-end:var(--kbq-size-l)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__date,.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-date-period__time{width:auto}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time{display:flex}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date{width:var(--kbq-filter-bar-date-field-width)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__date .kbq-form-field__container{border-start-end-radius:unset;border-end-end-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker{flex:1;margin-inline-start:-1px;width:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-form__row_with-time .kbq-date-period__time.kbq-form-field-type-timepicker .kbq-form-field__container{border-start-start-radius:unset;border-end-start-radius:unset}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar{position:relative;grid-column:2 span;padding:var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-m);background-color:var(--kbq-background-bg-tertiary)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-calendar.kbq-calendar_hidden{display:none}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__content .kbq-hint{grid-column:2 span;padding-inline:var(--kbq-size-m)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer{padding:var(--kbq-size-xxs)}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button{width:100%;justify-content:flex-start}.kbq-pipe-date__popover .kbq-date-period .kbq-date-period__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-datepicker-grid-cell-states-disabled-text);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n"] }]
|
|
601
|
+
}] });
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Shared "select all = select nothing" state for the multi-select pipes (`kbq-pipe-multi-select`,
|
|
605
|
+
* `kbq-pipe-multi-tree-select`). Extracted as a plain composition helper — not a base class — because the
|
|
606
|
+
* two pipes have different bases (`KbqBasePipe` vs `KbqTreeSelectPipeBase`) and cannot share a single
|
|
607
|
+
* `@Directive()` base (the diamond), while a mixin would risk breaking AOT view-query inheritance.
|
|
608
|
+
*/
|
|
609
|
+
class KbqMultiSelectPipeState {
|
|
610
|
+
constructor(host) {
|
|
611
|
+
this.host = host;
|
|
612
|
+
/** Snapshot of the committed selection, preserved across the "all selected → []" collapse. */
|
|
613
|
+
this.internalSelected = null;
|
|
614
|
+
}
|
|
615
|
+
/** Whether selecting every option is treated as selecting nothing. */
|
|
616
|
+
get selectedAllEqualsSelectedNothing() {
|
|
617
|
+
return (this.host.data.selectedAllEqualsSelectedNothing ??
|
|
618
|
+
this.host.filterBar?.selectedAllEqualsSelectedNothing() ??
|
|
619
|
+
true);
|
|
620
|
+
}
|
|
621
|
+
/** Value to display: the preserved snapshot under "all = nothing", otherwise the raw value. */
|
|
622
|
+
get selected() {
|
|
623
|
+
return this.selectedAllEqualsSelectedNothing ? this.internalSelected : this.host.data.value;
|
|
624
|
+
}
|
|
625
|
+
/** Refreshes the snapshot from the current value (only under "all = nothing"). */
|
|
626
|
+
updateInternalSelected() {
|
|
627
|
+
if (this.selectedAllEqualsSelectedNothing) {
|
|
628
|
+
this.internalSelected = this.host.data.value?.slice() || [];
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
/** Emits the change, collapsing the value to `[]` when everything is selected under "all = nothing". */
|
|
632
|
+
emitChangePipeEvent() {
|
|
633
|
+
if (this.selectedAllEqualsSelectedNothing && this.host.allOptionsSelected()) {
|
|
634
|
+
this.host.filterBar?.onChangePipe.emit({ ...this.host.data, value: [] });
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
this.host.filterBar?.onChangePipe.emit(this.host.data);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
/** Whether the pipe reads as empty, given the base pipe's own emptiness. */
|
|
641
|
+
isEmpty(baseIsEmpty) {
|
|
642
|
+
return (baseIsEmpty ||
|
|
643
|
+
(Array.isArray(this.host.data.value) && !this.host.data.value.length) ||
|
|
644
|
+
(this.selectedAllEqualsSelectedNothing && this.host.allOptionsSelected()));
|
|
645
|
+
}
|
|
646
|
+
}
|
|
748
647
|
|
|
749
648
|
class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
750
649
|
constructor() {
|
|
751
650
|
super(...arguments);
|
|
752
651
|
/** control for search options */
|
|
753
|
-
this.searchControl = new
|
|
652
|
+
this.searchControl = new FormControl(null);
|
|
653
|
+
/** @docs-private */
|
|
654
|
+
this.select = viewChild.required(KbqSelect);
|
|
655
|
+
/** @docs-private */
|
|
656
|
+
this.options = viewChildren(KbqOption, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
754
657
|
this.selectionAllInProgress = false;
|
|
755
|
-
|
|
756
|
-
|
|
658
|
+
this.multiSelect = new KbqMultiSelectPipeState({
|
|
659
|
+
data: this.data,
|
|
660
|
+
filterBar: this.filterBar,
|
|
661
|
+
allOptionsSelected: () => this.allOptionsSelected
|
|
662
|
+
});
|
|
663
|
+
/** Comparator of selected options. Two null/absent values never match (aligned with the select pipe). */
|
|
664
|
+
this.compareByValue = (o1, o2) => !!o1 && !!o2 && o1.id === o2.id;
|
|
757
665
|
/** handler for select all options in select */
|
|
758
666
|
this.selectAllHandler = (event) => {
|
|
759
667
|
event.preventDefault();
|
|
760
668
|
this.toggleSelectionAll();
|
|
761
669
|
};
|
|
762
670
|
this.getFilteredOptions = () => {
|
|
763
|
-
|
|
764
|
-
|
|
671
|
+
const search = this.searchControl.value;
|
|
672
|
+
return search
|
|
673
|
+
? this.values.filter((item) => item.name.toLowerCase().includes(search.toLowerCase()))
|
|
765
674
|
: this.values;
|
|
766
675
|
};
|
|
767
676
|
}
|
|
768
677
|
/** selected value */
|
|
769
678
|
get selected() {
|
|
770
|
-
|
|
771
|
-
return this.internalSelected;
|
|
772
|
-
}
|
|
773
|
-
return this.data.value;
|
|
679
|
+
return this.multiSelect.selected;
|
|
774
680
|
}
|
|
775
681
|
/** Whether the current pipe is empty. */
|
|
776
682
|
get isEmpty() {
|
|
777
|
-
return (super.isEmpty
|
|
778
|
-
(Array.isArray(this.data.value) && !this.data.value.length) ||
|
|
779
|
-
(this.selectedAllEqualsSelectedNothing && this.allOptionsSelected));
|
|
683
|
+
return this.multiSelect.isEmpty(super.isEmpty);
|
|
780
684
|
}
|
|
781
685
|
/** state for checkbox 'select all'. */
|
|
782
686
|
get checkboxState() {
|
|
783
|
-
if (!this.options)
|
|
687
|
+
if (!this.options())
|
|
688
|
+
return 'unchecked';
|
|
689
|
+
const select = this.select();
|
|
690
|
+
if (!select?.selectionModel)
|
|
784
691
|
return 'unchecked';
|
|
785
|
-
if (
|
|
692
|
+
if (select.selectionModel.selected.length === this.values.length) {
|
|
786
693
|
return 'checked';
|
|
787
694
|
}
|
|
788
|
-
else if (!
|
|
695
|
+
else if (!select.selectionModel.selected.length) {
|
|
789
696
|
return 'unchecked';
|
|
790
697
|
}
|
|
791
698
|
return 'indeterminate';
|
|
@@ -796,24 +703,27 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
796
703
|
}
|
|
797
704
|
/** true if all options selected */
|
|
798
705
|
get allOptionsSelected() {
|
|
799
|
-
|
|
706
|
+
const select = this.select();
|
|
707
|
+
if (!select?.selectionModel)
|
|
708
|
+
return false;
|
|
709
|
+
return select.triggerValues.length === this.values?.length;
|
|
800
710
|
}
|
|
801
711
|
get selectedAllEqualsSelectedNothing() {
|
|
802
|
-
return this.
|
|
712
|
+
return this.multiSelect.selectedAllEqualsSelectedNothing;
|
|
803
713
|
}
|
|
804
714
|
get visibleOptions() {
|
|
805
|
-
return this.options?.filter((option) => option.selectable);
|
|
715
|
+
return this.options()?.filter((option) => option.selectable());
|
|
806
716
|
}
|
|
807
717
|
/** @docs-private */
|
|
808
718
|
ngOnInit() {
|
|
809
|
-
this.updateInternalSelected();
|
|
719
|
+
this.multiSelect.updateInternalSelected();
|
|
810
720
|
this.filteredOptions = merge(this.filterBar.internalTemplatesChanges, this.searchControl.valueChanges).pipe(map(this.getFilteredOptions), takeUntilDestroyed(this.destroyRef));
|
|
811
721
|
}
|
|
812
722
|
ngAfterViewInit() {
|
|
813
723
|
super.ngAfterViewInit();
|
|
814
|
-
this.select
|
|
815
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
816
|
-
.subscribe(() => this.filterBar?.onClosePipe.
|
|
724
|
+
this.select()
|
|
725
|
+
.closedStream.pipe(takeUntilDestroyed(this.destroyRef))
|
|
726
|
+
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
817
727
|
}
|
|
818
728
|
/** @docs-private */
|
|
819
729
|
onSelect(item) {
|
|
@@ -825,20 +735,20 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
825
735
|
else {
|
|
826
736
|
this.data.value = item;
|
|
827
737
|
}
|
|
828
|
-
this.emitChangePipeEvent();
|
|
738
|
+
this.multiSelect.emitChangePipeEvent();
|
|
829
739
|
this.stateChanges.next();
|
|
830
740
|
}
|
|
831
741
|
/** @docs-private */
|
|
832
742
|
onClear() {
|
|
833
743
|
this.data.value = [];
|
|
834
|
-
this.updateInternalSelected();
|
|
744
|
+
this.multiSelect.updateInternalSelected();
|
|
835
745
|
this.filterBar?.onClearPipe.emit(this.data);
|
|
836
746
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
837
747
|
this.stateChanges.next();
|
|
838
748
|
}
|
|
839
749
|
/** @docs-private */
|
|
840
750
|
toggleSelectionAllByEnterKey() {
|
|
841
|
-
if (this.data.selectAll && this.select.keyManager.activeItemIndex === 0) {
|
|
751
|
+
if (this.data.selectAll && this.select().keyManager.activeItemIndex === 0) {
|
|
842
752
|
this.toggleSelectionAll();
|
|
843
753
|
}
|
|
844
754
|
}
|
|
@@ -856,131 +766,182 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
856
766
|
this.data.value = [];
|
|
857
767
|
}
|
|
858
768
|
else {
|
|
859
|
-
this.data.value = [...this.select.value];
|
|
769
|
+
this.data.value = [...this.select().value];
|
|
860
770
|
}
|
|
861
771
|
if (emitEvent) {
|
|
862
|
-
this.emitChangePipeEvent();
|
|
772
|
+
this.multiSelect.emitChangePipeEvent();
|
|
863
773
|
}
|
|
864
774
|
this.stateChanges.next();
|
|
865
775
|
}
|
|
866
776
|
/** @docs-private */
|
|
867
777
|
onClose() {
|
|
868
778
|
if (this.allOptionsSelected) {
|
|
869
|
-
this.updateInternalSelected();
|
|
779
|
+
this.multiSelect.updateInternalSelected();
|
|
870
780
|
}
|
|
781
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
871
782
|
}
|
|
872
783
|
/** opens select */
|
|
873
784
|
open() {
|
|
874
|
-
this.select.open();
|
|
785
|
+
this.select().open();
|
|
875
786
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
this.internalSelected = this.data.value?.slice() || [];
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
emitChangePipeEvent() {
|
|
882
|
-
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
883
|
-
this.filterBar?.onChangePipe.emit({ ...this.data, value: [] });
|
|
884
|
-
}
|
|
885
|
-
else {
|
|
886
|
-
this.filterBar?.onChangePipe.emit(this.data);
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
890
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqPipeMultiSelectComponent, isStandalone: true, selector: "kbq-pipe-multi-select", providers: [
|
|
787
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
788
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeMultiSelectComponent, isStandalone: true, selector: "kbq-pipe-multi-select", providers: [
|
|
891
789
|
{
|
|
892
790
|
provide: KbqBasePipe,
|
|
893
791
|
useExisting: this
|
|
894
792
|
}
|
|
895
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqSelect, descendants: true }, { propertyName: "options", predicate: KbqOption, descendants: true }], usesInheritance: true, ngImport: i0, template: "<kbq-select\n #select=\"kbqSelect\"\n multiple\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-multiselect__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (closed)=\"onClose()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n @if (select.triggerValues.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.triggerValue }}\n </span>\n } @else if (\n select.triggerValues.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ select.triggerValues.length }}\n </kbq-badge>\n }\n </button>\n @if (data.search) {\n <kbq-form-field kbqFormFieldWithoutBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"toggleSelectionAllByEnterKey()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @if (data.selectAll && !select.isEmptySearchResult) {\n <kbq-option\n [class.kbq-selected]=\"allVisibleOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectionAll()\"\n (keydown.enter)=\"toggleSelectionAll()\"\n >\n <kbq-pseudo-checkbox [state]=\"checkboxState\" />\n {{ localeData.pipe.selectAll }}\n </kbq-option>\n }\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multiselect .kbq-pipe__value{margin-left:var(--kbq-size-xxs)}.kbq-pipe__multiselect .kbq-badge{align-self:center;margin-left:var(--kbq-size-xs)}.kbq-pipe-multiselect__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3$1.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3$1.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i6.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i6.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i6.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i6.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqFormFieldWithoutBorders, selector: "kbq-form-field[kbqFormFieldWithoutBorders]", exportAs: ["kbqFormFieldWithoutBorders"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i6$1.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i6$1.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: i6.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
793
|
+
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqSelect, descendants: true, isSignal: true }, { propertyName: "options", predicate: KbqOption, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<kbq-select\n #select=\"kbqSelect\"\n multiple\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-multiselect__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (closed)=\"onClose()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n @if (select.triggerValues.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.triggerValue }}\n </span>\n } @else if (\n select.triggerValues.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ select.triggerValues.length }}\n </kbq-badge>\n }\n </button>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"toggleSelectionAllByEnterKey()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @if (data.selectAll && !select.isEmptySearchResult) {\n <kbq-option\n [class.kbq-selected]=\"allVisibleOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectionAll()\"\n (keydown.enter)=\"toggleSelectionAll()\"\n >\n <kbq-pseudo-checkbox [state]=\"checkboxState\" />\n {{ localeData.pipe.selectAll }}\n </kbq-option>\n }\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multiselect .kbq-pipe__value{margin-inline-start:var(--kbq-size-xxs)}.kbq-pipe__multiselect .kbq-badge{align-self:center;margin-inline-start:var(--kbq-size-xs)}.kbq-pipe-multiselect__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllToggle", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "onSelectAll", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i9$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i9$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i9$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i9$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i5.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i6.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i6.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: i9$1.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
896
794
|
}
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiSelectComponent, decorators: [{
|
|
898
796
|
type: Component,
|
|
899
797
|
args: [{ selector: 'kbq-pipe-multi-select', imports: [
|
|
900
798
|
FormsModule,
|
|
901
799
|
KbqButtonModule,
|
|
902
800
|
KbqDividerModule,
|
|
903
801
|
KbqSelectModule,
|
|
904
|
-
NgClass,
|
|
905
802
|
KbqPipeState,
|
|
906
803
|
KbqBadgeModule,
|
|
907
804
|
KbqPipeButton,
|
|
908
805
|
KbqTitleModule,
|
|
909
|
-
KbqPipeTitleDirective,
|
|
910
806
|
NgTemplateOutlet,
|
|
911
|
-
KbqFormFieldModule,
|
|
912
807
|
KbqIconModule,
|
|
913
808
|
KbqInputModule,
|
|
914
809
|
ReactiveFormsModule,
|
|
915
810
|
AsyncPipe,
|
|
916
811
|
KbqPseudoCheckboxModule
|
|
917
|
-
],
|
|
812
|
+
], providers: [
|
|
918
813
|
{
|
|
919
814
|
provide: KbqBasePipe,
|
|
920
815
|
useExisting: this
|
|
921
816
|
}
|
|
922
|
-
], template: "<kbq-select\n #select=\"kbqSelect\"\n multiple\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [
|
|
923
|
-
}], propDecorators: { select: [{
|
|
924
|
-
type: ViewChild,
|
|
925
|
-
args: [KbqSelect]
|
|
926
|
-
}], options: [{
|
|
927
|
-
type: ViewChildren,
|
|
928
|
-
args: [KbqOption]
|
|
929
|
-
}] } });
|
|
817
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-select\n #select=\"kbqSelect\"\n multiple\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-multiselect__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (closed)=\"onClose()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText class=\"kbq-pipe__name\">{{ data.name }}</span>\n @if (select.triggerValues.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.triggerValue }}\n </span>\n } @else if (\n select.triggerValues.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ select.triggerValues.length }}\n </kbq-badge>\n }\n </button>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"toggleSelectionAllByEnterKey()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @if (data.selectAll && !select.isEmptySearchResult) {\n <kbq-option\n [class.kbq-selected]=\"allVisibleOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectionAll()\"\n (keydown.enter)=\"toggleSelectionAll()\"\n >\n <kbq-pseudo-checkbox [state]=\"checkboxState\" />\n {{ localeData.pipe.selectAll }}\n </kbq-option>\n }\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multiselect .kbq-pipe__value{margin-inline-start:var(--kbq-size-xxs)}.kbq-pipe__multiselect .kbq-badge{align-self:center;margin-inline-start:var(--kbq-size-xs)}.kbq-pipe-multiselect__panel .kbq-select__content{max-height:404px}\n"] }]
|
|
818
|
+
}], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqSelect), { isSignal: true }] }], options: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqOption), { isSignal: true }] }] } });
|
|
930
819
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
820
|
+
/**
|
|
821
|
+
* Shared scaffolding for the tree-based select pipes (`kbq-pipe-tree-select`,
|
|
822
|
+
* `kbq-pipe-multi-tree-select`): the flat-tree control / flattener / data source, the node accessors,
|
|
823
|
+
* search-driven filtering and open handling. Subclasses provide the value-specific pieces (`selected`,
|
|
824
|
+
* `isEmpty`, `onSelect`, `updateTemplates`).
|
|
825
|
+
*
|
|
826
|
+
* The `internalTemplatesChanges` subscription is intentionally left in each subclass constructor: it must
|
|
827
|
+
* be set up after the subclass's `updateTemplates` field initializer runs, so the initial `BehaviorSubject`
|
|
828
|
+
* replay dispatches to the subclass override (which writes `dataSource.data`) rather than the base one.
|
|
829
|
+
*/
|
|
830
|
+
class KbqTreeSelectPipeBase extends KbqBasePipe {
|
|
831
|
+
constructor() {
|
|
832
|
+
super();
|
|
833
|
+
/** control for search options */
|
|
834
|
+
this.searchControl = new FormControl(null);
|
|
835
|
+
/** @docs-private */
|
|
836
|
+
this.select = viewChild.required(KbqTreeSelect);
|
|
837
|
+
this.transformer = (node, level, parent) => {
|
|
838
|
+
const flatNode = new KbqTreeSelectFlatNode();
|
|
839
|
+
flatNode.name = node.name;
|
|
840
|
+
flatNode.value = node.value;
|
|
841
|
+
flatNode.parent = parent ?? undefined;
|
|
842
|
+
flatNode.level = level;
|
|
843
|
+
flatNode.expandable = !!node.children;
|
|
844
|
+
return flatNode;
|
|
845
|
+
};
|
|
846
|
+
this.getLevel = (node) => node.level;
|
|
847
|
+
this.isExpandable = (node) => node.expandable;
|
|
848
|
+
this.getChildren = (node) => node.children;
|
|
849
|
+
this.getValue = (node) => node.value;
|
|
850
|
+
this.getViewValue = (node) => node.name;
|
|
851
|
+
this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
852
|
+
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable, this.getValue, this.getViewValue);
|
|
853
|
+
this.dataSource = new KbqTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
854
|
+
}
|
|
855
|
+
ngOnInit() {
|
|
856
|
+
this.searchControl.valueChanges
|
|
857
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
858
|
+
.subscribe((value) => this.treeControl.filterNodes(value));
|
|
859
|
+
}
|
|
860
|
+
ngAfterViewInit() {
|
|
861
|
+
super.ngAfterViewInit();
|
|
862
|
+
this.select()
|
|
863
|
+
.closedStream.pipe(takeUntilDestroyed(this.destroyRef))
|
|
864
|
+
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
865
|
+
}
|
|
866
|
+
/** tree-node predicate: whether the node has children */
|
|
867
|
+
hasChild(_, nodeData) {
|
|
868
|
+
return nodeData.expandable;
|
|
869
|
+
}
|
|
870
|
+
/** opens the tree-select panel */
|
|
871
|
+
open() {
|
|
872
|
+
setTimeout(() => {
|
|
873
|
+
if (this.destroyed)
|
|
874
|
+
return;
|
|
875
|
+
this.select().open();
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
/** @docs-private */
|
|
879
|
+
onOpen() {
|
|
880
|
+
this.treeControl.expandAll();
|
|
881
|
+
}
|
|
882
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTreeSelectPipeBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
883
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.25", type: KbqTreeSelectPipeBase, isStandalone: true, viewQueries: [{ propertyName: "select", first: true, predicate: KbqTreeSelect, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
884
|
+
}
|
|
885
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTreeSelectPipeBase, decorators: [{
|
|
886
|
+
type: Directive
|
|
887
|
+
}], ctorParameters: () => [], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqTreeSelect), { isSignal: true }] }] } });
|
|
888
|
+
|
|
889
|
+
class KbqPipeMultiTreeSelectComponent extends KbqTreeSelectPipeBase {
|
|
890
|
+
/** selected value */
|
|
891
|
+
get selected() {
|
|
892
|
+
return this.multiSelect.selected;
|
|
938
893
|
}
|
|
939
894
|
/** Whether the current pipe is empty. */
|
|
940
895
|
get isEmpty() {
|
|
941
|
-
return (super.isEmpty
|
|
942
|
-
(Array.isArray(this.data.value) && !this.data.value.length) ||
|
|
943
|
-
(this.selectedAllEqualsSelectedNothing && this.allOptionsSelected));
|
|
896
|
+
return this.multiSelect.isEmpty(super.isEmpty);
|
|
944
897
|
}
|
|
945
898
|
get selectAllCheckboxState() {
|
|
946
|
-
|
|
899
|
+
const select = this.select();
|
|
900
|
+
if (!select)
|
|
947
901
|
return 'unchecked';
|
|
948
902
|
if (this.allOptionsSelected) {
|
|
949
903
|
return 'checked';
|
|
950
904
|
}
|
|
951
|
-
else if (
|
|
905
|
+
else if (select.selected?.length > 0) {
|
|
952
906
|
return 'indeterminate';
|
|
953
907
|
}
|
|
954
908
|
return 'unchecked';
|
|
955
909
|
}
|
|
956
910
|
get numberOfSelectedLeaves() {
|
|
957
|
-
return this.select.selected.filter(({ value }) => value !== kbqTreeSelectAllValue).length;
|
|
911
|
+
return this.select().selected.filter(({ value }) => value !== kbqTreeSelectAllValue).length;
|
|
958
912
|
}
|
|
959
913
|
/** true if all options selected */
|
|
960
914
|
get allOptionsSelected() {
|
|
961
915
|
const dataNodesLength = this.treeControl?.dataNodes?.length;
|
|
962
916
|
const dataNodesForSelect = this.data.selectAll ? dataNodesLength - 1 : dataNodesLength;
|
|
963
|
-
return this.select?.triggerValues?.length === dataNodesForSelect;
|
|
917
|
+
return this.select()?.triggerValues?.length === dataNodesForSelect;
|
|
964
918
|
}
|
|
965
919
|
get selectedAllEqualsSelectedNothing() {
|
|
966
|
-
return this.
|
|
920
|
+
return this.multiSelect.selectedAllEqualsSelectedNothing;
|
|
967
921
|
}
|
|
968
922
|
/** true if all visible options selected */
|
|
969
923
|
get allVisibleOptionsSelected() {
|
|
970
|
-
return this.tree
|
|
971
|
-
.filter((option) => option.value !== kbqTreeSelectAllValue)
|
|
924
|
+
return this.tree()
|
|
925
|
+
.renderedOptions.filter((option) => option.value !== kbqTreeSelectAllValue)
|
|
972
926
|
.every((option) => option.selected);
|
|
973
927
|
}
|
|
974
928
|
constructor() {
|
|
975
929
|
super();
|
|
976
|
-
/**
|
|
977
|
-
this.
|
|
978
|
-
|
|
930
|
+
/** @docs-private */
|
|
931
|
+
this.tree = viewChild.required(KbqTreeSelection);
|
|
932
|
+
this.multiSelect = new KbqMultiSelectPipeState({
|
|
933
|
+
data: this.data,
|
|
934
|
+
filterBar: this.filterBar,
|
|
935
|
+
allOptionsSelected: () => this.allOptionsSelected
|
|
936
|
+
});
|
|
937
|
+
/**
|
|
938
|
+
* Populates the tree data source from the pipe template. The shared `values`/`valueTemplate`
|
|
939
|
+
* assignment is already performed by the base subscription, so this override only does the
|
|
940
|
+
* tree-specific work and avoids a redundant double assignment.
|
|
941
|
+
*/
|
|
979
942
|
this.updateTemplates = (templates) => {
|
|
980
|
-
const template = templates?.find((
|
|
943
|
+
const template = templates?.find((item) => getId(item) === getId(this.data));
|
|
981
944
|
if (template?.values) {
|
|
982
|
-
this.values = template.values;
|
|
983
|
-
this.valueTemplate = template.valueTemplate;
|
|
984
945
|
const values = [...template.values];
|
|
985
946
|
if (this.data.selectAll) {
|
|
986
947
|
values.unshift({
|
|
@@ -997,47 +958,13 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
997
958
|
event.preventDefault();
|
|
998
959
|
this.toggleSelectAllNode();
|
|
999
960
|
};
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
flatNode.name = node.name;
|
|
1003
|
-
flatNode.value = node.value;
|
|
1004
|
-
flatNode.parent = parent;
|
|
1005
|
-
flatNode.level = level;
|
|
1006
|
-
flatNode.expandable = !!node.children;
|
|
1007
|
-
return flatNode;
|
|
1008
|
-
};
|
|
1009
|
-
this.getLevel = (node) => {
|
|
1010
|
-
return node.level;
|
|
1011
|
-
};
|
|
1012
|
-
this.isExpandable = (node) => {
|
|
1013
|
-
return node.expandable;
|
|
1014
|
-
};
|
|
1015
|
-
this.getChildren = (node) => {
|
|
1016
|
-
return node.children;
|
|
1017
|
-
};
|
|
1018
|
-
this.getValue = (node) => {
|
|
1019
|
-
return node.value;
|
|
1020
|
-
};
|
|
1021
|
-
this.getViewValue = (node) => {
|
|
1022
|
-
return `${node.name}`;
|
|
1023
|
-
};
|
|
1024
|
-
this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
1025
|
-
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable, this.getValue, this.getViewValue);
|
|
1026
|
-
this.dataSource = new KbqTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
961
|
+
// See the field-init note in `KbqTreeSelectPipeBase`: subscribing here (after this class's
|
|
962
|
+
// `updateTemplates` initializer) ensures the initial replay writes `dataSource.data`.
|
|
1027
963
|
this.filterBar?.internalTemplatesChanges.pipe(takeUntilDestroyed()).subscribe(this.updateTemplates);
|
|
1028
964
|
}
|
|
1029
965
|
ngOnInit() {
|
|
1030
|
-
|
|
1031
|
-
this.
|
|
1032
|
-
}
|
|
1033
|
-
ngAfterViewInit() {
|
|
1034
|
-
super.ngAfterViewInit();
|
|
1035
|
-
this.select.closedStream
|
|
1036
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1037
|
-
.subscribe(() => this.filterBar?.onClosePipe.next(this.data));
|
|
1038
|
-
}
|
|
1039
|
-
isNodeHasChild(_, nodeData) {
|
|
1040
|
-
return nodeData.expandable;
|
|
966
|
+
super.ngOnInit();
|
|
967
|
+
this.multiSelect.updateInternalSelected();
|
|
1041
968
|
}
|
|
1042
969
|
isNodeSelectAll(_, nodeData) {
|
|
1043
970
|
return nodeData.value === kbqTreeSelectAllValue;
|
|
@@ -1045,29 +972,32 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1045
972
|
onSelect({ value: option }) {
|
|
1046
973
|
if (!option)
|
|
1047
974
|
return;
|
|
1048
|
-
|
|
1049
|
-
|
|
975
|
+
const tree = this.tree();
|
|
976
|
+
if (tree.treeControl.isExpandable(option.data)) {
|
|
977
|
+
tree.setStateChildren(option, !option.selected);
|
|
1050
978
|
}
|
|
1051
979
|
this.toggleParents(option.data.parent);
|
|
1052
980
|
setTimeout(() => {
|
|
981
|
+
if (this.destroyed)
|
|
982
|
+
return;
|
|
1053
983
|
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1054
984
|
this.data.value = [];
|
|
1055
985
|
}
|
|
1056
986
|
else {
|
|
1057
|
-
this.data.value = this.select.selectedValues;
|
|
987
|
+
this.data.value = this.select().selectedValues;
|
|
1058
988
|
}
|
|
1059
|
-
this.emitChangePipeEvent();
|
|
989
|
+
this.multiSelect.emitChangePipeEvent();
|
|
1060
990
|
this.stateChanges.next();
|
|
1061
991
|
});
|
|
1062
992
|
}
|
|
1063
993
|
searchKeydownHandler() {
|
|
1064
|
-
if (this.data.selectAll && this.tree.keyManager.activeItemIndex === 0) {
|
|
994
|
+
if (this.data.selectAll && this.tree().keyManager.activeItemIndex === 0) {
|
|
1065
995
|
this.toggleSelectAllNode();
|
|
1066
996
|
}
|
|
1067
997
|
}
|
|
1068
998
|
toggleSelectAllNode(emitEvent = true) {
|
|
1069
|
-
if (this.select.search?.ngControl.value) {
|
|
1070
|
-
const renderedOptions = this.tree.renderedOptions.filter(({ value }) => value !== kbqTreeSelectAllValue);
|
|
999
|
+
if (this.select().search()?.ngControl.value) {
|
|
1000
|
+
const renderedOptions = this.tree().renderedOptions.filter(({ value }) => value !== kbqTreeSelectAllValue);
|
|
1071
1001
|
if (this.allVisibleOptionsSelected) {
|
|
1072
1002
|
renderedOptions.forEach((option) => option.setSelected(false));
|
|
1073
1003
|
}
|
|
@@ -1077,127 +1007,100 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1077
1007
|
}
|
|
1078
1008
|
else {
|
|
1079
1009
|
if (this.allOptionsSelected) {
|
|
1080
|
-
this.tree.selectionModel.clear();
|
|
1010
|
+
this.tree().selectionModel.clear();
|
|
1081
1011
|
}
|
|
1082
1012
|
else {
|
|
1083
1013
|
const [, ...dataNodesForSelect] = this.treeControl.dataNodes;
|
|
1084
1014
|
// @todo DS-3827
|
|
1085
|
-
this.tree.selectionModel.select(...dataNodesForSelect);
|
|
1015
|
+
this.tree().selectionModel.select(...dataNodesForSelect);
|
|
1086
1016
|
}
|
|
1087
1017
|
}
|
|
1088
1018
|
setTimeout(() => {
|
|
1019
|
+
if (this.destroyed)
|
|
1020
|
+
return;
|
|
1089
1021
|
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1090
1022
|
this.data.value = [];
|
|
1091
1023
|
}
|
|
1092
1024
|
else {
|
|
1093
|
-
this.data.value = [...this.select.selectedValues];
|
|
1025
|
+
this.data.value = [...this.select().selectedValues];
|
|
1094
1026
|
}
|
|
1095
1027
|
if (emitEvent) {
|
|
1096
|
-
this.emitChangePipeEvent();
|
|
1028
|
+
this.multiSelect.emitChangePipeEvent();
|
|
1097
1029
|
}
|
|
1098
1030
|
this.stateChanges.next();
|
|
1099
1031
|
});
|
|
1100
1032
|
}
|
|
1101
|
-
/** opens select */
|
|
1102
|
-
open() {
|
|
1103
|
-
setTimeout(() => this.select.open());
|
|
1104
|
-
}
|
|
1105
1033
|
onClear() {
|
|
1106
1034
|
super.onClear();
|
|
1107
|
-
this.updateInternalSelected();
|
|
1108
|
-
}
|
|
1109
|
-
/** @docs-private */
|
|
1110
|
-
onOpen() {
|
|
1111
|
-
this.treeControl.expandAll();
|
|
1035
|
+
this.multiSelect.updateInternalSelected();
|
|
1112
1036
|
}
|
|
1113
1037
|
/** @docs-private */
|
|
1114
1038
|
onClose() {
|
|
1115
1039
|
if (this.allOptionsSelected) {
|
|
1116
|
-
this.updateInternalSelected();
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
updateInternalSelected() {
|
|
1120
|
-
if (this.selectedAllEqualsSelectedNothing) {
|
|
1121
|
-
this.internalSelected = this.data.value?.slice() || [];
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
emitChangePipeEvent() {
|
|
1125
|
-
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1126
|
-
this.filterBar?.onChangePipe.emit({ ...this.data, value: [] });
|
|
1127
|
-
}
|
|
1128
|
-
else {
|
|
1129
|
-
this.filterBar?.onChangePipe.emit(this.data);
|
|
1040
|
+
this.multiSelect.updateInternalSelected();
|
|
1130
1041
|
}
|
|
1042
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1131
1043
|
}
|
|
1132
1044
|
toggleParents(parent) {
|
|
1133
1045
|
if (!parent) {
|
|
1134
1046
|
return;
|
|
1135
1047
|
}
|
|
1136
1048
|
const descendants = this.treeControl.getDescendants(parent);
|
|
1137
|
-
const isParentSelected = this.select.selectionModel.selected.includes(parent);
|
|
1138
|
-
if (!isParentSelected &&
|
|
1139
|
-
this.select.selectionModel.
|
|
1049
|
+
const isParentSelected = this.select().selectionModel.selected.includes(parent);
|
|
1050
|
+
if (!isParentSelected &&
|
|
1051
|
+
descendants.every((d) => this.select().selectionModel.selected.includes(d))) {
|
|
1052
|
+
this.select().selectionModel.select(parent);
|
|
1140
1053
|
this.toggleParents(parent.parent);
|
|
1141
1054
|
}
|
|
1142
1055
|
else if (isParentSelected) {
|
|
1143
|
-
this.select.selectionModel.deselect(parent);
|
|
1056
|
+
this.select().selectionModel.deselect(parent);
|
|
1144
1057
|
this.toggleParents(parent.parent);
|
|
1145
1058
|
}
|
|
1146
1059
|
}
|
|
1147
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1148
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1060
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiTreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1061
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeMultiTreeSelectComponent, isStandalone: true, selector: "kbq-pipe-multi-tree-select", providers: [
|
|
1149
1062
|
{
|
|
1150
1063
|
provide: KbqBasePipe,
|
|
1151
1064
|
useExisting: this
|
|
1152
1065
|
}
|
|
1153
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqTreeSelect, descendants: true }, { propertyName: "tree", first: true, predicate: KbqTreeSelection, descendants: true }], usesInheritance: true, ngImport: i0, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [multiple]=\"true\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-multi-tree-select__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n (closed)=\"onClose()\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event)\"\n>\n <!-- eslint-disable-next-line @angular-eslint/template/prefer-control-flow -->\n <kbq-form-field *ngIf=\"data.search\" kbqFormFieldWithoutBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"searchKeydownHandler()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n\n @if (select.selected?.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.selected[0].name }}\n </span>\n } @else if (\n select.selected?.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ numberOfSelectedLeaves }}\n </kbq-badge>\n }\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option\n *kbqTreeNodeDef=\"let node; when: isNodeSelectAll\"\n kbqTreeNodePadding\n [class.kbq-selected]=\"allOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectAllNode()\"\n >\n <kbq-pseudo-checkbox [state]=\"selectAllCheckboxState\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding [checkboxThirdState]=\"true\">\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option\n *kbqTreeNodeDef=\"let node; when: isNodeHasChild\"\n kbqTreeNodePadding\n [checkboxThirdState]=\"true\"\n >\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multi-tree-select .kbq-pipe__value{margin-left:var(--kbq-size-xxs)}.kbq-pipe__multi-tree-select .kbq-badge{align-self:center;margin-left:var(--kbq-size-xs)}.kbq-pipe__multi-tree-select .kbq-tree-select .kbq-select__trigger{height:unset}.kbq-pipe-multi-tree-select__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqFormFieldWithoutBorders, selector: "kbq-form-field[kbqFormFieldWithoutBorders]", exportAs: ["kbqFormFieldWithoutBorders"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqHighlightModule }, { kind: "pipe", type: i6.KbqHighlightPipe, name: "mcHighlight" }, { kind: "ngmodule", type: KbqTreeModule }, { kind: "directive", type: i7$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i7$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i7$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "disabled", "tabIndex"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i7$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i7$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i8$1.KbqTreeSelect, selector: "kbq-tree-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "placeholder", "required", "multiple", "autoSelect", "id", "hasBackdrop", "tabIndex", "disabled", "selectAllHandler", "panelMinWidth", "panelWidth", "searchMinOptionsThreshold", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["kbqTreeSelect"] }, { kind: "directive", type: i6.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i6.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i6.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i6$1.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i6$1.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: i6.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1066
|
+
], viewQueries: [{ propertyName: "tree", first: true, predicate: KbqTreeSelection, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [multiple]=\"true\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-multi-tree-select__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n (closed)=\"onClose()\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event)\"\n>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"searchKeydownHandler()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n\n @if (select.selected?.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.selected[0].name }}\n </span>\n } @else if (\n select.selected?.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ numberOfSelectedLeaves }}\n </kbq-badge>\n }\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option\n *kbqTreeNodeDef=\"let node; when: isNodeSelectAll\"\n kbqTreeNodePadding\n [class.kbq-selected]=\"allOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectAllNode()\"\n >\n <kbq-pseudo-checkbox [state]=\"selectAllCheckboxState\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding [checkboxThirdState]=\"true\">\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node; when: hasChild\" kbqTreeNodePadding [checkboxThirdState]=\"true\">\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multi-tree-select .kbq-pipe__value{margin-inline-start:var(--kbq-size-xxs)}.kbq-pipe__multi-tree-select .kbq-badge{align-self:center;margin-inline-start:var(--kbq-size-xs)}.kbq-pipe__multi-tree-select .kbq-tree-select .kbq-select__trigger{height:unset}.kbq-pipe-multi-tree-select__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i5.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqHighlightModule }, { kind: "ngmodule", type: KbqTreeModule }, { kind: "directive", type: i7$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i7$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i7$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "selectAllToggle", "disabled", "tabIndex", "selectAllHandler"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i7$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i7$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i8$1.KbqTreeSelect, selector: "kbq-tree-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "placeholder", "required", "multiple", "autoSelect", "selectAllToggle", "id", "hasBackdrop", "tabIndex", "disabled", "selectAllHandler", "panelMinWidth", "panelWidth", "searchMinOptionsThreshold", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "onSelectAll", "valueChange"], exportAs: ["kbqTreeSelect"] }, { kind: "directive", type: i9$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i9$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i9$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "component", type: i6.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i6.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: i9$1.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }, { kind: "pipe", type: i9$1.KbqHighlightPipe, name: "mcHighlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1154
1067
|
}
|
|
1155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiTreeSelectComponent, decorators: [{
|
|
1156
1069
|
type: Component,
|
|
1157
1070
|
args: [{ selector: 'kbq-pipe-multi-tree-select', imports: [
|
|
1158
1071
|
KbqButtonModule,
|
|
1159
1072
|
KbqDividerModule,
|
|
1160
|
-
NgClass,
|
|
1161
1073
|
KbqPipeState,
|
|
1162
1074
|
KbqPipeButton,
|
|
1163
1075
|
KbqTitleModule,
|
|
1164
|
-
KbqPipeTitleDirective,
|
|
1165
1076
|
KbqPipeMinWidth,
|
|
1166
|
-
KbqFormFieldModule,
|
|
1167
1077
|
KbqIconModule,
|
|
1168
1078
|
KbqInputModule,
|
|
1169
1079
|
ReactiveFormsModule,
|
|
1170
1080
|
KbqHighlightModule,
|
|
1171
1081
|
KbqTreeModule,
|
|
1172
1082
|
KbqTreeSelectModule,
|
|
1173
|
-
NgIf,
|
|
1174
1083
|
FormsModule,
|
|
1175
1084
|
KbqBadgeModule,
|
|
1176
1085
|
KbqPseudoCheckboxModule
|
|
1177
|
-
],
|
|
1086
|
+
], providers: [
|
|
1178
1087
|
{
|
|
1179
1088
|
provide: KbqBasePipe,
|
|
1180
1089
|
useExisting: this
|
|
1181
1090
|
}
|
|
1182
|
-
], template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [
|
|
1183
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
1184
|
-
type: ViewChild,
|
|
1185
|
-
args: [KbqTreeSelect]
|
|
1186
|
-
}], tree: [{
|
|
1187
|
-
type: ViewChild,
|
|
1188
|
-
args: [KbqTreeSelection]
|
|
1189
|
-
}] } });
|
|
1091
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [multiple]=\"true\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-multi-tree-select__panel'\"\n [selectAllHandler]=\"selectAllHandler\"\n [tabIndex]=\"-1\"\n (closed)=\"onClose()\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event)\"\n>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n (keydown.enter)=\"searchKeydownHandler()\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n\n @if (select.selected?.length === 1) {\n <span #kbqTitleText class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!select.triggerValue\">\n {{ select.selected[0].name }}\n </span>\n } @else if (\n select.selected?.length > 1 &&\n (!selectedAllEqualsSelectedNothing || (selectedAllEqualsSelectedNothing && !allOptionsSelected))\n ) {\n <kbq-badge [badgeColor]=\"'contrast'\" [compact]=\"true\">\n {{ numberOfSelectedLeaves }}\n </kbq-badge>\n }\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option\n *kbqTreeNodeDef=\"let node; when: isNodeSelectAll\"\n kbqTreeNodePadding\n [class.kbq-selected]=\"allOptionsSelected\"\n [selectable]=\"false\"\n (click)=\"toggleSelectAllNode()\"\n >\n <kbq-pseudo-checkbox [state]=\"selectAllCheckboxState\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding [checkboxThirdState]=\"true\">\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node; when: hasChild\" kbqTreeNodePadding [checkboxThirdState]=\"true\">\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe__multi-tree-select .kbq-pipe__value{margin-inline-start:var(--kbq-size-xxs)}.kbq-pipe__multi-tree-select .kbq-badge{align-self:center;margin-inline-start:var(--kbq-size-xs)}.kbq-pipe__multi-tree-select .kbq-tree-select .kbq-select__trigger{height:unset}.kbq-pipe-multi-tree-select__panel .kbq-select__content{max-height:404px}\n"] }]
|
|
1092
|
+
}], ctorParameters: () => [], propDecorators: { tree: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqTreeSelection), { isSignal: true }] }] } });
|
|
1190
1093
|
|
|
1191
1094
|
class KbqPipeReadonlyComponent extends KbqBasePipe {
|
|
1192
1095
|
open() { }
|
|
1193
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1194
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1096
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeReadonlyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1097
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeReadonlyComponent, isStandalone: true, selector: "kbq-pipe-readonly", providers: [
|
|
1195
1098
|
{
|
|
1196
1099
|
provide: KbqBasePipe,
|
|
1197
1100
|
useExisting: this
|
|
1198
1101
|
}
|
|
1199
1102
|
], usesInheritance: true, ngImport: i0, template: `
|
|
1200
|
-
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [
|
|
1103
|
+
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [kbq-title]="pipeTooltip">
|
|
1201
1104
|
<span #kbqTitleText class="kbq-pipe__name" kbqPipeMinWidth>{{ data.name }}</span>
|
|
1202
1105
|
<span #kbqTitleText class="kbq-pipe__value" kbqPipeMinWidth [class.kbq-pipe__value_empty]="!data.value">
|
|
1203
1106
|
{{ data.value }}
|
|
@@ -1212,19 +1115,18 @@ class KbqPipeReadonlyComponent extends KbqBasePipe {
|
|
|
1212
1115
|
<div class="kbq-pipe-tooltip__name kbq-text-compact">{{ data.name }}</div>
|
|
1213
1116
|
<div class="kbq-pipe-tooltip__value kbq-text-compact">{{ data.value }}</div>
|
|
1214
1117
|
</ng-template>
|
|
1215
|
-
`, isInline: true, styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name
|
|
1118
|
+
`, isInline: true, styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe.kbq-pipe__readonly .kbq-button{cursor:default}.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button-icon.kbq-button_filled:not(:hover),.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button.kbq-button_filled,.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button.kbq-button_filled:hover{background:var(--kbq-states-background-disabled)}.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-pipe__name,.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1216
1119
|
}
|
|
1217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeReadonlyComponent, decorators: [{
|
|
1218
1121
|
type: Component,
|
|
1219
1122
|
args: [{ selector: 'kbq-pipe-readonly', imports: [
|
|
1220
1123
|
KbqButtonModule,
|
|
1221
1124
|
KbqTitleModule,
|
|
1222
1125
|
KbqPipeState,
|
|
1223
|
-
KbqPipeTitleDirective,
|
|
1224
1126
|
KbqPipeMinWidth,
|
|
1225
1127
|
KbqPipeButton
|
|
1226
1128
|
], template: `
|
|
1227
|
-
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [
|
|
1129
|
+
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [kbq-title]="pipeTooltip">
|
|
1228
1130
|
<span #kbqTitleText class="kbq-pipe__name" kbqPipeMinWidth>{{ data.name }}</span>
|
|
1229
1131
|
<span #kbqTitleText class="kbq-pipe__value" kbqPipeMinWidth [class.kbq-pipe__value_empty]="!data.value">
|
|
1230
1132
|
{{ data.value }}
|
|
@@ -1239,21 +1141,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1239
1141
|
<div class="kbq-pipe-tooltip__name kbq-text-compact">{{ data.name }}</div>
|
|
1240
1142
|
<div class="kbq-pipe-tooltip__value kbq-text-compact">{{ data.value }}</div>
|
|
1241
1143
|
</ng-template>
|
|
1242
|
-
`,
|
|
1144
|
+
`, providers: [
|
|
1243
1145
|
{
|
|
1244
1146
|
provide: KbqBasePipe,
|
|
1245
1147
|
useExisting: this
|
|
1246
1148
|
}
|
|
1247
|
-
], styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name
|
|
1149
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe.kbq-pipe__readonly .kbq-button{cursor:default}.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button-icon.kbq-button_filled:not(:hover),.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button.kbq-button_filled,.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-button.kbq-button_filled:hover{background:var(--kbq-states-background-disabled)}.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-pipe__name,.kbq-pipe.kbq-pipe__readonly:not(.kbq-pipe_cleanable) .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}\n"] }]
|
|
1248
1150
|
}] });
|
|
1249
1151
|
|
|
1250
1152
|
class KbqPipeSelectComponent extends KbqBasePipe {
|
|
1251
1153
|
constructor() {
|
|
1252
1154
|
super(...arguments);
|
|
1253
1155
|
/** control for search options */
|
|
1254
|
-
this.searchControl = new
|
|
1156
|
+
this.searchControl = new FormControl(null);
|
|
1157
|
+
/** @docs-private */
|
|
1158
|
+
this.select = viewChild.required(KbqSelect);
|
|
1255
1159
|
/** Comparator of selected options */
|
|
1256
|
-
this.compareByValue = (o1, o2) => o1 && o2 && o1.id === o2.id;
|
|
1160
|
+
this.compareByValue = (o1, o2) => !!o1 && !!o2 && o1.id === o2.id;
|
|
1161
|
+
this.getFilteredOptions = () => {
|
|
1162
|
+
const search = this.searchControl.value;
|
|
1163
|
+
return search
|
|
1164
|
+
? this.values.filter((item) => item.name.toLowerCase().includes(search.toLowerCase()))
|
|
1165
|
+
: this.values;
|
|
1166
|
+
};
|
|
1257
1167
|
}
|
|
1258
1168
|
/** selected value */
|
|
1259
1169
|
get selected() {
|
|
@@ -1265,69 +1175,64 @@ class KbqPipeSelectComponent extends KbqBasePipe {
|
|
|
1265
1175
|
}
|
|
1266
1176
|
/** @docs-private */
|
|
1267
1177
|
ngOnInit() {
|
|
1268
|
-
|
|
1178
|
+
// Merge the live template stream (re-emits when `pipeTemplates` changes after init) with the
|
|
1179
|
+
// search input, so options render on first open even when templates are supplied late
|
|
1180
|
+
// (e.g. a parent assigning `pipeTemplates` in ngAfterViewInit for a viewChild valueTemplate).
|
|
1181
|
+
this.filteredOptions = merge(this.filterBar.internalTemplatesChanges, this.searchControl.valueChanges).pipe(map(this.getFilteredOptions), takeUntilDestroyed(this.destroyRef));
|
|
1269
1182
|
}
|
|
1270
1183
|
ngAfterViewInit() {
|
|
1271
1184
|
super.ngAfterViewInit();
|
|
1272
|
-
this.select
|
|
1273
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1274
|
-
.subscribe(() => this.filterBar?.onClosePipe.
|
|
1185
|
+
this.select()
|
|
1186
|
+
.closedStream.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1187
|
+
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
1275
1188
|
}
|
|
1276
1189
|
onSelect(item) {
|
|
1277
1190
|
this.data.value = item;
|
|
1278
1191
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
1279
1192
|
this.stateChanges.next();
|
|
1193
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1280
1194
|
}
|
|
1281
1195
|
/** opens select */
|
|
1282
1196
|
open() {
|
|
1283
|
-
this.select.open();
|
|
1284
|
-
}
|
|
1285
|
-
getFilteredOptions(value) {
|
|
1286
|
-
return value
|
|
1287
|
-
? this.values.filter((item) => item.name.toLowerCase().includes(value.toLowerCase()))
|
|
1288
|
-
: this.values;
|
|
1197
|
+
this.select().open();
|
|
1289
1198
|
}
|
|
1290
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1291
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1199
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1200
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeSelectComponent, isStandalone: true, selector: "kbq-pipe-select", providers: [
|
|
1292
1201
|
{
|
|
1293
1202
|
provide: KbqBasePipe,
|
|
1294
1203
|
useExisting: this
|
|
1295
1204
|
}
|
|
1296
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqSelect, descendants: true }], usesInheritance: true, ngImport: i0, template: "<kbq-select\n #select\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-select__panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n @if (data.search) {\n <kbq-form-field kbqFormFieldWithoutBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n kbqInput\n type=\"text\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-select__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3$1.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3$1.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i6.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i6.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i6.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i6.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqFormFieldWithoutBorders, selector: "kbq-form-field[kbqFormFieldWithoutBorders]", exportAs: ["kbqFormFieldWithoutBorders"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1205
|
+
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqSelect, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<kbq-select\n #select\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-select__panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-select__panel .kbq-select__content{max-height:404px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllToggle", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "onSelectAll", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i9$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i9$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i9$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i9$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i5.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1297
1206
|
}
|
|
1298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeSelectComponent, decorators: [{
|
|
1299
1208
|
type: Component,
|
|
1300
1209
|
args: [{ selector: 'kbq-pipe-select', imports: [
|
|
1301
1210
|
KbqButtonModule,
|
|
1302
1211
|
KbqDividerModule,
|
|
1303
1212
|
KbqSelectModule,
|
|
1304
|
-
NgClass,
|
|
1305
1213
|
KbqPipeState,
|
|
1306
1214
|
KbqPipeButton,
|
|
1307
1215
|
KbqTitleModule,
|
|
1308
|
-
KbqPipeTitleDirective,
|
|
1309
1216
|
KbqPipeMinWidth,
|
|
1310
1217
|
NgTemplateOutlet,
|
|
1311
|
-
KbqFormFieldModule,
|
|
1312
1218
|
KbqIcon,
|
|
1313
1219
|
KbqInputModule,
|
|
1314
1220
|
ReactiveFormsModule,
|
|
1315
1221
|
AsyncPipe
|
|
1316
|
-
],
|
|
1222
|
+
], providers: [
|
|
1317
1223
|
{
|
|
1318
1224
|
provide: KbqBasePipe,
|
|
1319
1225
|
useExisting: this
|
|
1320
1226
|
}
|
|
1321
|
-
], template: "<kbq-select\n #select\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [
|
|
1322
|
-
}], propDecorators: { select: [{
|
|
1323
|
-
type: ViewChild,
|
|
1324
|
-
args: [KbqSelect]
|
|
1325
|
-
}] } });
|
|
1227
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-select\n #select\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [panelClass]=\"'kbq-pipe-select__panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selected\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n @for (item of filteredOptions | async; track item) {\n <kbq-option [value]=\"item\">\n @if (isTemplateRef(valueTemplate)) {\n <ng-container\n [ngTemplateOutlet]=\"$any(valueTemplate)\"\n [ngTemplateOutletContext]=\"{ $implicit, option: item }\"\n />\n } @else {\n {{ item.name }}\n }\n </kbq-option>\n }\n</kbq-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-select__panel .kbq-select__content{max-height:404px}\n"] }]
|
|
1228
|
+
}], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqSelect), { isSignal: true }] }] } });
|
|
1326
1229
|
|
|
1327
1230
|
class KbqPipeTextComponent extends KbqBasePipe {
|
|
1328
1231
|
constructor() {
|
|
1329
1232
|
super(...arguments);
|
|
1330
1233
|
this.placements = PopUpPlacements;
|
|
1234
|
+
/** @docs-private */
|
|
1235
|
+
this.popover = viewChild.required(KbqPopoverTrigger);
|
|
1331
1236
|
/** textarea control */
|
|
1332
1237
|
this.control = new FormControl('');
|
|
1333
1238
|
}
|
|
@@ -1340,10 +1245,12 @@ class KbqPipeTextComponent extends KbqBasePipe {
|
|
|
1340
1245
|
}
|
|
1341
1246
|
ngAfterViewInit() {
|
|
1342
1247
|
super.ngAfterViewInit();
|
|
1343
|
-
this.popover
|
|
1248
|
+
this.popover()
|
|
1249
|
+
.visibleChange.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1250
|
+
.subscribe((visible) => {
|
|
1344
1251
|
this.stateChanges.next();
|
|
1345
1252
|
if (!visible) {
|
|
1346
|
-
this.filterBar?.onClosePipe.
|
|
1253
|
+
this.filterBar?.onClosePipe.emit(this.data);
|
|
1347
1254
|
}
|
|
1348
1255
|
});
|
|
1349
1256
|
}
|
|
@@ -1351,8 +1258,9 @@ class KbqPipeTextComponent extends KbqBasePipe {
|
|
|
1351
1258
|
this.data.value = this.control.value;
|
|
1352
1259
|
this.stateChanges.next();
|
|
1353
1260
|
this.control.markAsPristine();
|
|
1354
|
-
this.popover.hide();
|
|
1355
|
-
this.filterBar?.onChangePipe.
|
|
1261
|
+
this.popover().hide();
|
|
1262
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
1263
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1356
1264
|
}
|
|
1357
1265
|
/** @docs-private */
|
|
1358
1266
|
onKeydown($event) {
|
|
@@ -1367,45 +1275,39 @@ class KbqPipeTextComponent extends KbqBasePipe {
|
|
|
1367
1275
|
}
|
|
1368
1276
|
/** opens popover */
|
|
1369
1277
|
open() {
|
|
1370
|
-
this.popover.show();
|
|
1278
|
+
this.popover().show();
|
|
1371
1279
|
}
|
|
1372
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1373
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1280
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1281
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeTextComponent, isStandalone: true, selector: "kbq-pipe-text", providers: [
|
|
1374
1282
|
{
|
|
1375
1283
|
provide: KbqBasePipe,
|
|
1376
1284
|
useExisting: this
|
|
1377
1285
|
}
|
|
1378
|
-
], viewQueries: [{ propertyName: "popover", first: true, predicate: KbqPopoverTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<button\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverFooter]=\"footer\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [ngClass]=\"{ 'kbq-active': popover?.isOpen }\"\n>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!data.value\">\n {{ data.value }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n <kbq-form-field (keydown)=\"onKeydown($event)\">\n <textarea kbqTextarea rows=\"1\" [formControl]=\"control\" [freeRowsHeight]=\"0\" [maxRows]=\"5\"></textarea>\n </kbq-form-field>\n</ng-template>\n\n<ng-template #footer>\n <button kbq-button [color]=\"'theme'\" [disabled]=\"disabled\" [kbqStyle]=\"'transparent'\" (click)=\"onApply()\">\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ data.value }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: KbqTextareaModule }, { kind: "directive", type: i5$1.KbqTextarea, selector: "textarea[kbqTextarea]", inputs: ["canGrow", "maxRows", "errorStateMatcher", "disabled", "id", "placeholder", "freeRowsHeight", "required", "value"], exportAs: ["kbqTextarea"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1286
|
+
], viewQueries: [{ propertyName: "popover", first: true, predicate: KbqPopoverTrigger, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverFooter]=\"footer\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [class]=\"{ 'kbq-active': popover()?.isOpen }\"\n>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!data.value\">\n {{ data.value }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n <kbq-form-field (keydown)=\"onKeydown($event)\">\n <textarea kbqTextarea rows=\"1\" [formControl]=\"control\" [freeRowsHeight]=\"0\" [maxRows]=\"5\"></textarea>\n </kbq-form-field>\n</ng-template>\n\n<ng-template #footer>\n <button kbq-button [color]=\"'theme'\" [disabled]=\"disabled\" [kbqStyle]=\"'transparent'\" (click)=\"onApply()\">\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ data.value }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5$1.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: KbqTextareaModule }, { kind: "directive", type: i5$2.KbqTextarea, selector: "textarea[kbqTextarea]", inputs: ["canGrow", "maxRows", "errorStateMatcher", "disabled", "id", "placeholder", "freeRowsHeight", "required", "value"], exportAs: ["kbqTextarea"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1379
1287
|
}
|
|
1380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTextComponent, decorators: [{
|
|
1381
1289
|
type: Component,
|
|
1382
1290
|
args: [{ selector: 'kbq-pipe-text', imports: [
|
|
1383
1291
|
KbqButtonModule,
|
|
1384
|
-
KbqFormFieldModule,
|
|
1385
1292
|
KbqPopoverModule,
|
|
1386
1293
|
KbqInputModule,
|
|
1387
1294
|
KbqDividerModule,
|
|
1388
1295
|
FormsModule,
|
|
1389
1296
|
KbqTextareaModule,
|
|
1390
|
-
NgClass,
|
|
1391
1297
|
KbqPipeButton,
|
|
1392
1298
|
ReactiveFormsModule,
|
|
1393
1299
|
KbqTitleModule,
|
|
1394
1300
|
KbqPipeState,
|
|
1395
|
-
KbqPipeTitleDirective,
|
|
1396
1301
|
KbqPipeMinWidth
|
|
1397
|
-
],
|
|
1302
|
+
], providers: [
|
|
1398
1303
|
{
|
|
1399
1304
|
provide: KbqBasePipe,
|
|
1400
1305
|
useExisting: this
|
|
1401
1306
|
}
|
|
1402
|
-
], template: "<button\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [
|
|
1403
|
-
}], propDecorators: { popover: [{
|
|
1404
|
-
type: ViewChild,
|
|
1405
|
-
args: [KbqPopoverTrigger]
|
|
1406
|
-
}] } });
|
|
1307
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<button\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [kbq-title]=\"pipeTooltip\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverSize]=\"'custom'\"\n [kbqPopoverClass]=\"'kbq-pipe__popover'\"\n [kbqPopoverContent]=\"content\"\n [kbqPopoverFooter]=\"footer\"\n [kbqPopoverOffset]=\"4\"\n [defaultPaddings]=\"false\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [class]=\"{ 'kbq-active': popover()?.isOpen }\"\n>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__value\" [class.kbq-pipe__value_empty]=\"!data.value\">\n {{ data.value }}\n </span>\n</button>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #content>\n <kbq-form-field (keydown)=\"onKeydown($event)\">\n <textarea kbqTextarea rows=\"1\" [formControl]=\"control\" [freeRowsHeight]=\"0\" [maxRows]=\"5\"></textarea>\n </kbq-form-field>\n</ng-template>\n\n<ng-template #footer>\n <button kbq-button [color]=\"'theme'\" [disabled]=\"disabled\" [kbqStyle]=\"'transparent'\" (click)=\"onApply()\">\n <span>{{ localeData.pipe.applyButton }}</span>\n \n <span class=\"kbq-button_hot-key\">{{ isMac ? '\u2318\u2009' : 'Ctrl + ' }}Enter</span>\n </button>\n</ng-template>\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ data.value }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n"] }]
|
|
1308
|
+
}], propDecorators: { popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqPopoverTrigger), { isSignal: true }] }] } });
|
|
1407
1309
|
|
|
1408
|
-
class KbqPipeTreeSelectComponent extends
|
|
1310
|
+
class KbqPipeTreeSelectComponent extends KbqTreeSelectPipeBase {
|
|
1409
1311
|
/** selected value */
|
|
1410
1312
|
get selected() {
|
|
1411
1313
|
return this.data.value;
|
|
@@ -1416,115 +1318,74 @@ class KbqPipeTreeSelectComponent extends KbqBasePipe {
|
|
|
1416
1318
|
}
|
|
1417
1319
|
constructor() {
|
|
1418
1320
|
super();
|
|
1419
|
-
/**
|
|
1420
|
-
|
|
1421
|
-
|
|
1321
|
+
/**
|
|
1322
|
+
* Populates the tree data source from the pipe template. The shared `values`/`valueTemplate`
|
|
1323
|
+
* assignment is already performed by the base subscription, so this override only does the
|
|
1324
|
+
* tree-specific work and avoids a redundant double assignment.
|
|
1325
|
+
*/
|
|
1422
1326
|
this.updateTemplates = (templates) => {
|
|
1423
|
-
const template = templates?.find((
|
|
1327
|
+
const template = templates?.find((item) => getId(item) === getId(this.data));
|
|
1424
1328
|
if (template?.values) {
|
|
1425
|
-
this.values = template.values;
|
|
1426
|
-
this.valueTemplate = template.valueTemplate;
|
|
1427
1329
|
this.dataSource.data = template.values;
|
|
1428
1330
|
}
|
|
1429
1331
|
};
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
flatNode.name = node.name;
|
|
1433
|
-
flatNode.value = node.value;
|
|
1434
|
-
flatNode.parent = parent;
|
|
1435
|
-
flatNode.level = level;
|
|
1436
|
-
flatNode.expandable = !!node.children;
|
|
1437
|
-
return flatNode;
|
|
1438
|
-
};
|
|
1439
|
-
this.getLevel = (node) => {
|
|
1440
|
-
return node.level;
|
|
1441
|
-
};
|
|
1442
|
-
this.isExpandable = (node) => {
|
|
1443
|
-
return node.expandable;
|
|
1444
|
-
};
|
|
1445
|
-
this.getChildren = (node) => {
|
|
1446
|
-
return node.children;
|
|
1447
|
-
};
|
|
1448
|
-
this.getValue = (node) => {
|
|
1449
|
-
return node.value;
|
|
1450
|
-
};
|
|
1451
|
-
this.getViewValue = (node) => {
|
|
1452
|
-
return `${node.name}`;
|
|
1453
|
-
};
|
|
1454
|
-
this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
1455
|
-
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable, this.getValue, this.getViewValue);
|
|
1456
|
-
this.dataSource = new KbqTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
1332
|
+
// See the field-init note in `KbqTreeSelectPipeBase`: subscribing here (after this class's
|
|
1333
|
+
// `updateTemplates` initializer) ensures the initial replay writes `dataSource.data`.
|
|
1457
1334
|
this.filterBar?.internalTemplatesChanges.pipe(takeUntilDestroyed()).subscribe(this.updateTemplates);
|
|
1458
1335
|
}
|
|
1459
|
-
ngOnInit() {
|
|
1460
|
-
this.searchControl.valueChanges.subscribe((value) => this.treeControl.filterNodes(value));
|
|
1461
|
-
}
|
|
1462
|
-
ngAfterViewInit() {
|
|
1463
|
-
super.ngAfterViewInit();
|
|
1464
|
-
this.select.closedStream
|
|
1465
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1466
|
-
.subscribe(() => this.filterBar?.onClosePipe.next(this.data));
|
|
1467
|
-
}
|
|
1468
|
-
hasChild(_, nodeData) {
|
|
1469
|
-
return nodeData.expandable;
|
|
1470
|
-
}
|
|
1471
1336
|
onSelect(item) {
|
|
1472
1337
|
this.data.value = item.value;
|
|
1473
1338
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
1474
|
-
this.select.close();
|
|
1475
|
-
setTimeout(() => this.
|
|
1339
|
+
this.select().close();
|
|
1340
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1476
1341
|
this.stateChanges.next();
|
|
1477
1342
|
}
|
|
1478
|
-
/**
|
|
1479
|
-
|
|
1480
|
-
setTimeout(() => this.select.open());
|
|
1481
|
-
}
|
|
1482
|
-
onOpen() {
|
|
1483
|
-
this.treeControl.expandAll();
|
|
1484
|
-
}
|
|
1485
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqPipeTreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1486
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqPipeTreeSelectComponent, isStandalone: true, selector: "kbq-pipe-tree-select", providers: [
|
|
1343
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1344
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeTreeSelectComponent, isStandalone: true, selector: "kbq-pipe-tree-select", providers: [
|
|
1487
1345
|
{
|
|
1488
1346
|
provide: KbqBasePipe,
|
|
1489
1347
|
useExisting: this
|
|
1490
1348
|
}
|
|
1491
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqTreeSelect, descendants: true }], usesInheritance: true, ngImport: i0, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbqPipeTitle]=\"pipeTooltip\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-tree-select__panel'\"\n [tabIndex]=\"-1\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n <!-- eslint-disable-next-line @angular-eslint/template/prefer-control-flow -->\n <kbq-form-field *ngIf=\"data.search\" kbqFormFieldWithoutBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [ngClass]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding>\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node; when: hasChild\" kbqTreeNodePadding [selectable]=\"false\">\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:320px}.kbq-pipe .kbq-pipe__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-left:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-left:-1px;margin-right:0;height:var(--kbq-size-l);align-self:center;color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l);background:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-bottom-right-radius:unset;border-top-right-radius:unset;border-right:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-bottom-left-radius:unset;border-top-left-radius:unset;border-left:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;left:0;top:0;bottom:0;width:1px;background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-tree-select__panel .kbq-tree-select__content{max-height:404px}.kbq-pipe__tree-select .kbq-select__trigger{height:unset}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqFormFieldWithoutBorders, selector: "kbq-form-field[kbqFormFieldWithoutBorders]", exportAs: ["kbqFormFieldWithoutBorders"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqHighlightModule }, { kind: "pipe", type: i6.KbqHighlightPipe, name: "mcHighlight" }, { kind: "ngmodule", type: KbqTreeModule }, { kind: "directive", type: i7$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i7$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i7$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "disabled", "tabIndex"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i7$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i7$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i8$1.KbqTreeSelect, selector: "kbq-tree-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "placeholder", "required", "multiple", "autoSelect", "id", "hasBackdrop", "tabIndex", "disabled", "selectAllHandler", "panelMinWidth", "panelWidth", "searchMinOptionsThreshold", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["kbqTreeSelect"] }, { kind: "directive", type: i6.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i6.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i6.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1349
|
+
], usesInheritance: true, ngImport: i0, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-tree-select__panel'\"\n [tabIndex]=\"-1\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding>\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node; when: hasChild\" kbqTreeNodePadding [selectable]=\"false\">\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-tree-select__panel .kbq-tree-select__content{max-height:404px}.kbq-pipe__tree-select .kbq-select__trigger{height:unset}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "directive", type: KbqPipeState, selector: "[kbqPipeState]", inputs: ["kbqPipeState"] }, { kind: "component", type: KbqPipeButton, selector: "kbq-pipe-button", inputs: ["readonly"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "directive", type: KbqPipeMinWidth, selector: "[kbqPipeMinWidth]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i5.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqHighlightModule }, { kind: "ngmodule", type: KbqTreeModule }, { kind: "directive", type: i7$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i7$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i7$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "selectAllToggle", "disabled", "tabIndex", "selectAllHandler"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i7$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i7$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i8$1.KbqTreeSelect, selector: "kbq-tree-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "placeholder", "required", "multiple", "autoSelect", "selectAllToggle", "id", "hasBackdrop", "tabIndex", "disabled", "selectAllHandler", "panelMinWidth", "panelWidth", "searchMinOptionsThreshold", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "onSelectAll", "valueChange"], exportAs: ["kbqTreeSelect"] }, { kind: "directive", type: i9$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i9$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i9$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i9$1.KbqHighlightPipe, name: "mcHighlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1492
1350
|
}
|
|
1493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTreeSelectComponent, decorators: [{
|
|
1494
1352
|
type: Component,
|
|
1495
1353
|
args: [{ selector: 'kbq-pipe-tree-select', imports: [
|
|
1496
1354
|
KbqButtonModule,
|
|
1497
1355
|
KbqDividerModule,
|
|
1498
|
-
NgClass,
|
|
1499
1356
|
KbqPipeState,
|
|
1500
1357
|
KbqPipeButton,
|
|
1501
1358
|
KbqTitleModule,
|
|
1502
|
-
KbqPipeTitleDirective,
|
|
1503
1359
|
KbqPipeMinWidth,
|
|
1504
|
-
KbqFormFieldModule,
|
|
1505
1360
|
KbqIconModule,
|
|
1506
1361
|
KbqInputModule,
|
|
1507
1362
|
ReactiveFormsModule,
|
|
1508
1363
|
KbqHighlightModule,
|
|
1509
1364
|
KbqTreeModule,
|
|
1510
1365
|
KbqTreeSelectModule,
|
|
1511
|
-
NgIf,
|
|
1512
1366
|
FormsModule
|
|
1513
|
-
],
|
|
1367
|
+
], providers: [
|
|
1514
1368
|
{
|
|
1515
1369
|
provide: KbqBasePipe,
|
|
1516
1370
|
useExisting: this
|
|
1517
1371
|
}
|
|
1518
|
-
], template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [
|
|
1519
|
-
}], ctorParameters: () => []
|
|
1520
|
-
type: ViewChild,
|
|
1521
|
-
args: [KbqTreeSelect]
|
|
1522
|
-
}] } });
|
|
1372
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbq-title]=\"pipeTooltip\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n [ngModel]=\"selected\"\n [panelClass]=\"'kbq-pipe-tree-select__panel'\"\n [tabIndex]=\"-1\"\n (opened)=\"onOpen()\"\n (selectionChange)=\"onSelect($event.value)\"\n>\n @if (data.search) {\n <kbq-form-field noBorders kbqSelectSearch>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n <input\n placeholder=\"{{ localeData.search.placeholder }}\"\n autocomplete=\"off\"\n kbqInput\n type=\"text\"\n [attr.aria-label]=\"localeData.search.placeholder\"\n [formControl]=\"searchControl\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n }\n\n <div kbq-select-search-empty-result>{{ localeData.pipe.emptySearchResult }}</div>\n\n <kbq-cleaner #kbqSelectCleaner />\n\n <button\n kbq-button\n kbq-select-matcher\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [class]=\"{ 'kbq-active': select.panelOpen }\"\n >\n <span #kbqTitleText kbqPipeMinWidth class=\"kbq-pipe__name\">{{ data.name }}</span>\n <span\n #kbqTitleText\n kbqPipeMinWidth\n class=\"kbq-pipe__value\"\n [class.kbq-pipe__value_empty]=\"!select.triggerValue\"\n >\n {{ select.triggerValue }}\n </span>\n </button>\n\n <kbq-tree-selection [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <kbq-tree-option *kbqTreeNodeDef=\"let node\" kbqTreeNodePadding>\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n\n <kbq-tree-option *kbqTreeNodeDef=\"let node; when: hasChild\" kbqTreeNodePadding [selectable]=\"false\">\n <kbq-tree-node-toggle [node]=\"node\" />\n <span [innerHTML]=\"treeControl.getViewValue(node) | mcHighlight: treeControl.filterValue.value\"></span>\n </kbq-tree-option>\n </kbq-tree-selection>\n</kbq-tree-select>\n\n@if (showRemoveButton) {\n <kbq-pipe-button />\n}\n\n<ng-template #pipeTooltip>\n <div class=\"kbq-pipe-tooltip__name kbq-text-compact\">{{ data.name }}</div>\n <div class=\"kbq-pipe-tooltip__value kbq-text-compact\">{{ select.triggerValue }}</div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-pipe{display:flex;flex-direction:row;max-height:32px}.kbq-pipe .kbq-select .kbq-select__trigger{height:unset}.kbq-pipe .kbq-button-wrapper{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-pipe .kbq-pipe__name,.kbq-pipe .kbq-pipe__value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.kbq-pipe .kbq-pipe__value:not(.kbq-pipe__value_empty){margin-inline-start:4px}.kbq-pipe .kbq-pipe__separator{z-index:1;margin-inline-start:-1px;margin-inline-end:0;height:var(--kbq-size-l);align-self:center}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:var(--kbq-size-s);width:1px;height:var(--kbq-size-l)}.kbq-pipe .kbq-button.cdk-keyboard-focused{z-index:1}.kbq-pipe.kbq-pipe_removable .kbq-button,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button{border-end-end-radius:unset;border-start-end-radius:unset;border-inline-end:none}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-end:0;top:0;bottom:0;width:1px}.kbq-pipe.kbq-pipe_removable .kbq-button-icon,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon{border-end-start-radius:unset;border-start-start-radius:unset;border-inline-start:none}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{content:\"\";position:absolute;inset-inline-start:0;top:0;bottom:0;width:1px}.kbq-pipe .kbq-pipe__name{color:var(--kbq-foreground-contrast-secondary)}.kbq-pipe .kbq-pipe__separator{color:var(--kbq-line-contrast-less)}.kbq-pipe .kbq-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-tree-select:not(:hover,.kbq-active)+.kbq-pipe-button:not(:hover,.kbq-active):after,.kbq-pipe .kbq-button:not(:hover,.kbq-active,[disabled])+.kbq-pipe-button:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}.kbq-pipe.kbq-pipe_disabled .kbq-pipe__name,.kbq-pipe.kbq-pipe_disabled .kbq-pipe__value{color:var(--kbq-states-foreground-disabled)}.kbq-pipe.kbq-pipe_removable .kbq-button.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe.kbq-pipe_removable .kbq-button-icon.cdk-keyboard-focused:after,.kbq-pipe.kbq-pipe_cleanable:not(.kbq-pipe_empty) .kbq-button-icon.cdk-keyboard-focused:after{background:var(--kbq-states-line-focus-theme)}.kbq-pipe-tooltip__name{color:var(--kbq-foreground-white-secondary)}.kbq-pipe-tooltip__value{color:var(--kbq-foreground-white)}\n", ".kbq-pipe-tree-select__panel .kbq-tree-select__content{max-height:404px}.kbq-pipe__tree-select .kbq-select__trigger{height:unset}\n"] }]
|
|
1373
|
+
}], ctorParameters: () => [] });
|
|
1523
1374
|
|
|
1524
|
-
/**
|
|
1375
|
+
/**
|
|
1376
|
+
* Default localized strings for the filter-bar, used when no `KBQ_LOCALE_SERVICE` (nor an explicit
|
|
1377
|
+
* `KBQ_FILTER_BAR_CONFIGURATION`) is provided. These are the Russian (`ru-RU`) strings, matching the
|
|
1378
|
+
* library-wide default-locale convention (every `KBQ_*_DEFAULT_CONFIGURATION` resolves to `ruRULocaleData`).
|
|
1379
|
+
* Provide `KBQ_LOCALE_SERVICE` at the application root to localize the filter-bar for other locales.
|
|
1380
|
+
*/
|
|
1525
1381
|
const KBQ_FILTER_BAR_DEFAULT_CONFIGURATION = ruRULocaleData.filterBar;
|
|
1526
1382
|
/** Injection Token for providing configuration of filter-bar */
|
|
1527
1383
|
const KBQ_FILTER_BAR_CONFIGURATION = new InjectionToken('KbqFilterBarConfiguration');
|
|
1384
|
+
/**
|
|
1385
|
+
* Injection token exposing the {@link KbqFilterBarHost} seam. `KbqFilterBar` provides itself via
|
|
1386
|
+
* `useExisting`, so pipes `inject(KBQ_FILTER_BAR_HOST)` instead of depending on the concrete bar.
|
|
1387
|
+
*/
|
|
1388
|
+
const KBQ_FILTER_BAR_HOST = new InjectionToken('KBQ_FILTER_BAR_HOST');
|
|
1528
1389
|
/** Injection Token for providing pipes in filter-bar */
|
|
1529
1390
|
const KBQ_FILTER_BAR_PIPES = new InjectionToken('kbq-filter-bar-pipes');
|
|
1530
1391
|
/** Utility provider for `KBQ_FILTER_BAR_PIPES`. */
|
|
@@ -1574,10 +1435,11 @@ class KbqTreeSelectFlatNode {
|
|
|
1574
1435
|
function kbqBuildTree(value, level) {
|
|
1575
1436
|
const data = [];
|
|
1576
1437
|
for (const [k, v] of Object.entries(value)) {
|
|
1438
|
+
const isBranch = typeof v === 'object' && v !== null && !v['value'];
|
|
1577
1439
|
data.push({
|
|
1578
1440
|
name: k.toString(),
|
|
1579
1441
|
value: v,
|
|
1580
|
-
children:
|
|
1442
|
+
children: isBranch ? kbqBuildTree(v, level + 1) : null
|
|
1581
1443
|
});
|
|
1582
1444
|
}
|
|
1583
1445
|
return data;
|
|
@@ -1585,10 +1447,10 @@ function kbqBuildTree(value, level) {
|
|
|
1585
1447
|
|
|
1586
1448
|
class KbqFilterReset {
|
|
1587
1449
|
constructor() {
|
|
1588
|
-
/** KbqFilterBar
|
|
1589
|
-
this.filterBar = inject(
|
|
1450
|
+
/** KbqFilterBar host seam */
|
|
1451
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
1590
1452
|
/** Event that is generated whenever the user reset a filter. */
|
|
1591
|
-
this.onResetFilter =
|
|
1453
|
+
this.onResetFilter = output();
|
|
1592
1454
|
}
|
|
1593
1455
|
/** localized data
|
|
1594
1456
|
* @docs-private */
|
|
@@ -1596,18 +1458,17 @@ class KbqFilterReset {
|
|
|
1596
1458
|
return this.filterBar.configuration.reset.buttonName;
|
|
1597
1459
|
}
|
|
1598
1460
|
resetFilter() {
|
|
1599
|
-
this.onResetFilter.emit(this.filterBar.filter);
|
|
1600
|
-
this.filterBar.changes.next();
|
|
1461
|
+
this.onResetFilter.emit(this.filterBar.filter());
|
|
1601
1462
|
this.filterBar.onResetFilter.next(true);
|
|
1602
1463
|
}
|
|
1603
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1604
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1464
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterReset, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1465
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: KbqFilterReset, isStandalone: true, selector: "kbq-filter-reset", outputs: { onResetFilter: "onResetFilter" }, host: { classAttribute: "kbq-filter-reset" }, ngImport: i0, template: `
|
|
1605
1466
|
<button kbq-button [color]="'theme'" [kbqStyle]="'transparent'" (click)="resetFilter()">
|
|
1606
1467
|
<ng-content>{{ localeData }}</ng-content>
|
|
1607
1468
|
</button>
|
|
1608
1469
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1609
1470
|
}
|
|
1610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterReset, decorators: [{
|
|
1611
1472
|
type: Component,
|
|
1612
1473
|
args: [{
|
|
1613
1474
|
selector: 'kbq-filter-reset',
|
|
@@ -1622,21 +1483,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1622
1483
|
class: 'kbq-filter-reset'
|
|
1623
1484
|
}
|
|
1624
1485
|
}]
|
|
1625
|
-
}], propDecorators: { onResetFilter: [{
|
|
1626
|
-
type: Output
|
|
1627
|
-
}] } });
|
|
1486
|
+
}], propDecorators: { onResetFilter: [{ type: i0.Output, args: ["onResetFilter"] }] } });
|
|
1628
1487
|
|
|
1629
1488
|
class KbqFilterBarButton {
|
|
1630
1489
|
constructor() {
|
|
1631
1490
|
this.button = inject(KbqButton);
|
|
1632
|
-
/** KbqFilterBar
|
|
1633
|
-
this.filterBar = inject(
|
|
1491
|
+
/** KbqFilterBar host seam */
|
|
1492
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
1634
1493
|
/** KbqFilters instance */
|
|
1635
1494
|
this.filters = inject(KbqFilters);
|
|
1636
|
-
|
|
1495
|
+
// Reflect the current filter's saved/changed state in the button style. Reading `filterBar.filter`
|
|
1496
|
+
// (a signal-backed accessor) subscribes this effect, replacing the retired `changes` bus.
|
|
1497
|
+
effect(() => {
|
|
1498
|
+
const filter = this.filterBar.filter();
|
|
1637
1499
|
this.button.kbqStyle = KbqButtonStyles.Outline;
|
|
1638
1500
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
1639
|
-
if (
|
|
1501
|
+
if (filter?.changed || filter?.saved) {
|
|
1640
1502
|
this.button.kbqStyle = 'changed-filter';
|
|
1641
1503
|
this.button.color = KbqComponentColors.Empty;
|
|
1642
1504
|
}
|
|
@@ -1646,10 +1508,10 @@ class KbqFilterBarButton {
|
|
|
1646
1508
|
saveFocusedElement() {
|
|
1647
1509
|
this.filters.saveFocusedElement(this.button);
|
|
1648
1510
|
}
|
|
1649
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1650
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1511
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1512
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqFilterBarButton, isStandalone: true, selector: "[kbqFilterBarButton]", host: { listeners: { "click": "saveFocusedElement()", "keydown": "saveFocusedElement()" } }, ngImport: i0 }); }
|
|
1651
1513
|
}
|
|
1652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarButton, decorators: [{
|
|
1653
1515
|
type: Directive,
|
|
1654
1516
|
args: [{
|
|
1655
1517
|
selector: '[kbqFilterBarButton]',
|
|
@@ -1660,37 +1522,278 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1660
1522
|
}]
|
|
1661
1523
|
}], ctorParameters: () => [] });
|
|
1662
1524
|
|
|
1663
|
-
|
|
1525
|
+
/**
|
|
1526
|
+
* The "save / rename filter" popover, extracted from `KbqFilters` (SRP). Owns the save form state, the
|
|
1527
|
+
* name control, validation/error display and the save/rename flow. It declares the popover's header,
|
|
1528
|
+
* content and footer templates and pushes them imperatively onto the trigger it is given (via the
|
|
1529
|
+
* `popoverTrigger` input), so there is no cross-component template binding on the parent (which would
|
|
1530
|
+
* otherwise risk `ExpressionChangedAfterItHasBeenCheckedError`). `KbqFilters` keeps the trigger (on its
|
|
1531
|
+
* main button), focus management and the public `filterSavedSuccessfully`/`filterSavedUnsuccessfully` API,
|
|
1532
|
+
* delegating to this component.
|
|
1533
|
+
*
|
|
1534
|
+
* @docs-private
|
|
1535
|
+
*/
|
|
1536
|
+
class KbqFilterSavePopover {
|
|
1537
|
+
constructor() {
|
|
1538
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1539
|
+
/** Popover trigger owned by the parent (`KbqFilters` main button). */
|
|
1540
|
+
this.popoverTrigger = input.required(...(ngDevMode ? [{ debugName: "popoverTrigger" }] : []));
|
|
1541
|
+
/** Filter bar, used for the save payload, the current filter and localized strings. */
|
|
1542
|
+
this.filterBar = input.required(...(ngDevMode ? [{ debugName: "filterBar" }] : []));
|
|
1543
|
+
/** Emits when the user saves/renames a filter. */
|
|
1544
|
+
this.save = output();
|
|
1545
|
+
/** Emits when the popover closes; the boolean requests focus restoration by the parent. */
|
|
1546
|
+
this.closed = output();
|
|
1547
|
+
/** @docs-private */
|
|
1548
|
+
this.headerTemplate = viewChild.required('header');
|
|
1549
|
+
/** @docs-private */
|
|
1550
|
+
this.contentTemplate = viewChild.required('content');
|
|
1551
|
+
/** @docs-private */
|
|
1552
|
+
this.footerTemplate = viewChild.required('footer');
|
|
1553
|
+
this.newFilterName = viewChild.required('newFilterName');
|
|
1554
|
+
this.saveFilterButton = viewChild.required('saveFilterButton');
|
|
1555
|
+
/** new filter name for saving */
|
|
1556
|
+
this.filterName = new FormControl(null);
|
|
1557
|
+
/** true if saving a new filter, false if saving changes in filter */
|
|
1558
|
+
this.saveNewFilter = false;
|
|
1559
|
+
this.showFilterSavingError = false;
|
|
1560
|
+
this.filterSavingErrorText = '';
|
|
1561
|
+
this.isSaving = false;
|
|
1562
|
+
this.close = (restoreFocus = true) => {
|
|
1563
|
+
this.popoverTrigger().hide();
|
|
1564
|
+
this.closed.emit(restoreFocus);
|
|
1565
|
+
setTimeout(() => this.changeDetectorRef.detectChanges());
|
|
1566
|
+
this.showFilterSavingError = false;
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
/** localized data
|
|
1570
|
+
* @docs-private */
|
|
1571
|
+
get localeData() {
|
|
1572
|
+
return this.filterBar().configuration.filters;
|
|
1573
|
+
}
|
|
1664
1574
|
/** header of popover. Depends on the mode */
|
|
1665
1575
|
get popoverHeader() {
|
|
1666
1576
|
return this.saveNewFilter ? this.localeData.saveAsNew : this.localeData.saveChanges;
|
|
1667
1577
|
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1578
|
+
ngAfterViewInit() {
|
|
1579
|
+
// Push the templates onto the parent's trigger imperatively (no parent-side binding).
|
|
1580
|
+
const trigger = this.popoverTrigger();
|
|
1581
|
+
trigger.header = this.headerTemplate();
|
|
1582
|
+
trigger.content = this.contentTemplate();
|
|
1583
|
+
trigger.footer = this.footerTemplate();
|
|
1671
1584
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1585
|
+
openSaveAsNewFilterPopover() {
|
|
1586
|
+
this.saveNewFilter = true;
|
|
1587
|
+
this.preparePopover();
|
|
1675
1588
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1589
|
+
openChangeFilterNamePopover() {
|
|
1590
|
+
this.saveNewFilter = false;
|
|
1591
|
+
this.preparePopover();
|
|
1679
1592
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1593
|
+
saveAsNew(event) {
|
|
1594
|
+
if (this.filterName.invalid)
|
|
1595
|
+
return;
|
|
1596
|
+
const name = this.filterName.value || '';
|
|
1597
|
+
// @todo default filter
|
|
1598
|
+
// Shallow structural copy (new filter + new pipes array + per-pipe shallow copy), mirroring
|
|
1599
|
+
// `KbqFilters.selectFilter`. Avoids `structuredClone` so non-cloneable custom pipe `value`
|
|
1600
|
+
// payloads survive a save; every pipe writes `value` by reassignment, never in place.
|
|
1601
|
+
const current = this.filterBar().filter();
|
|
1602
|
+
const filter = current
|
|
1603
|
+
? { ...current, pipes: current.pipes.map((pipe) => ({ ...pipe })) }
|
|
1604
|
+
: { pipes: [] };
|
|
1605
|
+
filter.name = name;
|
|
1606
|
+
filter.saved = true;
|
|
1607
|
+
filter.changed = false;
|
|
1608
|
+
this.isSaving = true;
|
|
1609
|
+
this.popoverTrigger().preventClose = true;
|
|
1610
|
+
this.filterName.disable();
|
|
1611
|
+
if (this.saveNewFilter) {
|
|
1612
|
+
this.save.emit({ filter, filterBar: this.filterBar(), status: KbqSaveFilterStatuses.NewFilter });
|
|
1613
|
+
}
|
|
1614
|
+
else {
|
|
1615
|
+
this.save.emit({ filter, filterBar: this.filterBar(), status: KbqSaveFilterStatuses.NewName });
|
|
1616
|
+
}
|
|
1617
|
+
event?.preventDefault();
|
|
1683
1618
|
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1619
|
+
showError(error) {
|
|
1620
|
+
if (error?.nameAlreadyExists) {
|
|
1621
|
+
this.filterName.setErrors({ filterNameAlreadyExist: true });
|
|
1622
|
+
}
|
|
1623
|
+
this.showFilterSavingError = true;
|
|
1624
|
+
this.filterSavingErrorText = error?.text ?? this.filterBar().configuration.filters.errorHint;
|
|
1688
1625
|
}
|
|
1689
|
-
/**
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1626
|
+
/** Hide the popover on a successful save. Focus restoration is handled by the parent. */
|
|
1627
|
+
savedSuccessfully() {
|
|
1628
|
+
this.isSaving = false;
|
|
1629
|
+
this.popoverTrigger().preventClose = false;
|
|
1630
|
+
this.popoverTrigger().hide();
|
|
1631
|
+
this.changeDetectorRef.markForCheck();
|
|
1693
1632
|
}
|
|
1633
|
+
/** Release the saving state after a failed save (the error itself is shown by the host via `showError`). */
|
|
1634
|
+
savedUnsuccessfully() {
|
|
1635
|
+
this.isSaving = false;
|
|
1636
|
+
this.popoverTrigger().preventClose = false;
|
|
1637
|
+
this.filterName.enable();
|
|
1638
|
+
// Focus via FocusMonitor (keyboard origin) so the focus ring is preserved on the retry path.
|
|
1639
|
+
setTimeout(() => this.saveFilterButton().focusViaKeyboard());
|
|
1640
|
+
this.changeDetectorRef.markForCheck();
|
|
1641
|
+
}
|
|
1642
|
+
preparePopover() {
|
|
1643
|
+
this.filterName = new FormControl(this.filterBar().filter()?.name || '', Validators.required);
|
|
1644
|
+
const trigger = this.popoverTrigger();
|
|
1645
|
+
trigger.show();
|
|
1646
|
+
// Tie to the popover instance (recreated each open) so this per-open control's subscription
|
|
1647
|
+
// doesn't accumulate across open/close cycles.
|
|
1648
|
+
this.filterName.valueChanges
|
|
1649
|
+
.pipe(distinctUntilChanged(), takeUntilDestroyed(trigger.instanceDestroyRef))
|
|
1650
|
+
.subscribe(() => (this.showFilterSavingError = false));
|
|
1651
|
+
merge(...trigger.defaultClosingActions())
|
|
1652
|
+
.pipe(filter(() => !this.isSaving), takeUntilDestroyed(trigger.instanceDestroyRef))
|
|
1653
|
+
.subscribe(() => this.close(false));
|
|
1654
|
+
trigger.visibleChange
|
|
1655
|
+
.pipe(filter((state) => !state), takeUntilDestroyed(trigger.instanceDestroyRef))
|
|
1656
|
+
.subscribe(this.close);
|
|
1657
|
+
setTimeout(() => {
|
|
1658
|
+
this.newFilterName().nativeElement.focus();
|
|
1659
|
+
this.filterName.setErrors(null);
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterSavePopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1663
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqFilterSavePopover, isStandalone: true, selector: "kbq-filter-save-popover", inputs: { popoverTrigger: { classPropertyName: "popoverTrigger", publicName: "popoverTrigger", isSignal: true, isRequired: true, transformFunction: null }, filterBar: { classPropertyName: "filterBar", publicName: "filterBar", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { save: "save", closed: "closed" }, viewQueries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "newFilterName", first: true, predicate: ["newFilterName"], descendants: true, isSignal: true }, { propertyName: "saveFilterButton", first: true, predicate: ["saveFilterButton"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1664
|
+
<ng-template #header>{{ popoverHeader }}</ng-template>
|
|
1665
|
+
|
|
1666
|
+
<ng-template #content>
|
|
1667
|
+
@if (showFilterSavingError) {
|
|
1668
|
+
<kbq-alert
|
|
1669
|
+
class="layout-margin-bottom-m"
|
|
1670
|
+
role="alert"
|
|
1671
|
+
[alertColor]="'error'"
|
|
1672
|
+
[alertStyle]="'colored'"
|
|
1673
|
+
[compact]="true"
|
|
1674
|
+
>
|
|
1675
|
+
{{ filterSavingErrorText }}
|
|
1676
|
+
</kbq-alert>
|
|
1677
|
+
}
|
|
1678
|
+
<div class="kbq-form-vertical">
|
|
1679
|
+
<div class="kbq-form__row">
|
|
1680
|
+
<label class="kbq-form__label">{{ localeData.name }}</label>
|
|
1681
|
+
|
|
1682
|
+
<kbq-form-field class="kbq-form__control">
|
|
1683
|
+
<input
|
|
1684
|
+
#newFilterName
|
|
1685
|
+
kbqInput
|
|
1686
|
+
type="text"
|
|
1687
|
+
[attr.aria-label]="localeData.name"
|
|
1688
|
+
[formControl]="filterName"
|
|
1689
|
+
(keydown.enter)="saveAsNew($event)"
|
|
1690
|
+
/>
|
|
1691
|
+
|
|
1692
|
+
@if (filterName.hasError('filterNameAlreadyExist')) {
|
|
1693
|
+
<kbq-error>{{ localeData.error }}</kbq-error>
|
|
1694
|
+
}
|
|
1695
|
+
</kbq-form-field>
|
|
1696
|
+
</div>
|
|
1697
|
+
</div>
|
|
1698
|
+
</ng-template>
|
|
1699
|
+
|
|
1700
|
+
<ng-template #footer>
|
|
1701
|
+
<button
|
|
1702
|
+
#saveFilterButton
|
|
1703
|
+
kbq-button
|
|
1704
|
+
class="layout-margin-right-l"
|
|
1705
|
+
[class.kbq-progress]="isSaving"
|
|
1706
|
+
[disabled]="isSaving"
|
|
1707
|
+
[color]="'contrast'"
|
|
1708
|
+
[kbqStyle]="'filled'"
|
|
1709
|
+
(click)="saveAsNew()"
|
|
1710
|
+
>
|
|
1711
|
+
{{ localeData.saveButton }}
|
|
1712
|
+
</button>
|
|
1713
|
+
<button
|
|
1714
|
+
kbq-button
|
|
1715
|
+
[color]="'contrast-fade'"
|
|
1716
|
+
[kbqStyle]="'filled'"
|
|
1717
|
+
[disabled]="isSaving"
|
|
1718
|
+
(click)="close(true)"
|
|
1719
|
+
>
|
|
1720
|
+
{{ localeData.cancelButton }}
|
|
1721
|
+
</button>
|
|
1722
|
+
</ng-template>
|
|
1723
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqFormsModule }, { kind: "directive", type: i9$1.KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", exportAs: ["kbqForm"] }, { kind: "directive", type: i9$1.KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", exportAs: ["kbqFormElement"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "component", type: i5.KbqError, selector: "kbq-error", exportAs: ["kbqError"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqAlertModule }, { kind: "component", type: i6$1.KbqAlert, selector: "kbq-alert", inputs: ["compact", "alertStyle", "alertColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1724
|
+
}
|
|
1725
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterSavePopover, decorators: [{
|
|
1726
|
+
type: Component,
|
|
1727
|
+
args: [{
|
|
1728
|
+
selector: 'kbq-filter-save-popover',
|
|
1729
|
+
imports: [ReactiveFormsModule, KbqButtonModule, KbqFormsModule, KbqInputModule, KbqAlertModule],
|
|
1730
|
+
template: `
|
|
1731
|
+
<ng-template #header>{{ popoverHeader }}</ng-template>
|
|
1732
|
+
|
|
1733
|
+
<ng-template #content>
|
|
1734
|
+
@if (showFilterSavingError) {
|
|
1735
|
+
<kbq-alert
|
|
1736
|
+
class="layout-margin-bottom-m"
|
|
1737
|
+
role="alert"
|
|
1738
|
+
[alertColor]="'error'"
|
|
1739
|
+
[alertStyle]="'colored'"
|
|
1740
|
+
[compact]="true"
|
|
1741
|
+
>
|
|
1742
|
+
{{ filterSavingErrorText }}
|
|
1743
|
+
</kbq-alert>
|
|
1744
|
+
}
|
|
1745
|
+
<div class="kbq-form-vertical">
|
|
1746
|
+
<div class="kbq-form__row">
|
|
1747
|
+
<label class="kbq-form__label">{{ localeData.name }}</label>
|
|
1748
|
+
|
|
1749
|
+
<kbq-form-field class="kbq-form__control">
|
|
1750
|
+
<input
|
|
1751
|
+
#newFilterName
|
|
1752
|
+
kbqInput
|
|
1753
|
+
type="text"
|
|
1754
|
+
[attr.aria-label]="localeData.name"
|
|
1755
|
+
[formControl]="filterName"
|
|
1756
|
+
(keydown.enter)="saveAsNew($event)"
|
|
1757
|
+
/>
|
|
1758
|
+
|
|
1759
|
+
@if (filterName.hasError('filterNameAlreadyExist')) {
|
|
1760
|
+
<kbq-error>{{ localeData.error }}</kbq-error>
|
|
1761
|
+
}
|
|
1762
|
+
</kbq-form-field>
|
|
1763
|
+
</div>
|
|
1764
|
+
</div>
|
|
1765
|
+
</ng-template>
|
|
1766
|
+
|
|
1767
|
+
<ng-template #footer>
|
|
1768
|
+
<button
|
|
1769
|
+
#saveFilterButton
|
|
1770
|
+
kbq-button
|
|
1771
|
+
class="layout-margin-right-l"
|
|
1772
|
+
[class.kbq-progress]="isSaving"
|
|
1773
|
+
[disabled]="isSaving"
|
|
1774
|
+
[color]="'contrast'"
|
|
1775
|
+
[kbqStyle]="'filled'"
|
|
1776
|
+
(click)="saveAsNew()"
|
|
1777
|
+
>
|
|
1778
|
+
{{ localeData.saveButton }}
|
|
1779
|
+
</button>
|
|
1780
|
+
<button
|
|
1781
|
+
kbq-button
|
|
1782
|
+
[color]="'contrast-fade'"
|
|
1783
|
+
[kbqStyle]="'filled'"
|
|
1784
|
+
[disabled]="isSaving"
|
|
1785
|
+
(click)="close(true)"
|
|
1786
|
+
>
|
|
1787
|
+
{{ localeData.cancelButton }}
|
|
1788
|
+
</button>
|
|
1789
|
+
</ng-template>
|
|
1790
|
+
`,
|
|
1791
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1792
|
+
encapsulation: ViewEncapsulation.None
|
|
1793
|
+
}]
|
|
1794
|
+
}], propDecorators: { popoverTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverTrigger", required: true }] }], filterBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBar", required: true }] }], save: [{ type: i0.Output, args: ["save"] }], closed: [{ type: i0.Output, args: ["closed"] }], headerTemplate: [{ type: i0.ViewChild, args: ['header', { isSignal: true }] }], contentTemplate: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], footerTemplate: [{ type: i0.ViewChild, args: ['footer', { isSignal: true }] }], newFilterName: [{ type: i0.ViewChild, args: ['newFilterName', { isSignal: true }] }], saveFilterButton: [{ type: i0.ViewChild, args: ['saveFilterButton', { isSignal: true }] }] } });
|
|
1795
|
+
|
|
1796
|
+
class KbqFilters {
|
|
1694
1797
|
constructor() {
|
|
1695
1798
|
/** @docs-private */
|
|
1696
1799
|
this.elementRef = inject(ElementRef);
|
|
@@ -1708,39 +1811,75 @@ class KbqFilters {
|
|
|
1708
1811
|
this.filterBar = inject(KbqFilterBar);
|
|
1709
1812
|
/** @docs-private */
|
|
1710
1813
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1814
|
+
/** @docs-private */
|
|
1815
|
+
this.mainButton = viewChild.required('mainButton');
|
|
1816
|
+
/** @docs-private */
|
|
1817
|
+
this.saveNewFilterButton = viewChild.required('saveNewFilterButton');
|
|
1818
|
+
/** @docs-private */
|
|
1819
|
+
this.filterActionsButton = viewChild.required('filterActionsButton');
|
|
1820
|
+
/** @docs-private */
|
|
1821
|
+
this.popover = viewChild.required(KbqPopoverTrigger);
|
|
1822
|
+
/** @docs-private */
|
|
1823
|
+
this.dropdown = viewChild.required(KbqDropdownTrigger);
|
|
1824
|
+
/** @docs-private */
|
|
1825
|
+
this.filterActionsDropdown = viewChild('filterActionsButton', ...(ngDevMode ? [{ debugName: "filterActionsDropdown" }] : []));
|
|
1826
|
+
/** @docs-private */
|
|
1827
|
+
this.savePopover = viewChild.required(KbqFilterSavePopover);
|
|
1828
|
+
this.search = viewChild.required('search');
|
|
1711
1829
|
/** control for search filter */
|
|
1712
|
-
this.searchControl = new
|
|
1830
|
+
this.searchControl = new FormControl(null);
|
|
1713
1831
|
/** @docs-private */
|
|
1714
1832
|
this.popoverSize = PopUpSizes.Medium;
|
|
1715
1833
|
/** @docs-private */
|
|
1716
1834
|
this.popoverOffset = 4;
|
|
1717
|
-
this.
|
|
1718
|
-
this.isSaving = false;
|
|
1835
|
+
this.filters = input.required(...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1719
1836
|
/** Event that is generated whenever the user selects a filter. */
|
|
1720
|
-
this.onSelectFilter =
|
|
1721
|
-
/**
|
|
1722
|
-
|
|
1837
|
+
this.onSelectFilter = output();
|
|
1838
|
+
/**
|
|
1839
|
+
* Event that is generated whenever the user save a filter.
|
|
1840
|
+
*
|
|
1841
|
+
* The emitted `filter` shares its pipe objects with the live filter by design (so the rendered pipes keep
|
|
1842
|
+
* their identity across a save instead of being destroyed and recreated). Consumers that persist
|
|
1843
|
+
* `event.filter` as an immutable record should snapshot it first (e.g. via `KbqFilterBar.saveFilterState`
|
|
1844
|
+
* or a structural copy) — otherwise later in-place pipe edits will mutate the stored reference.
|
|
1845
|
+
*/
|
|
1846
|
+
this.onSave = output();
|
|
1723
1847
|
/** Event that is generated whenever the user change a filter. */
|
|
1724
|
-
this.onChangeFilter =
|
|
1725
|
-
/** Event that is generated whenever the user saves a filter as new.
|
|
1726
|
-
* @deprecated use onSave with status = newFilter. */
|
|
1727
|
-
this.onSaveAsNew = new EventEmitter();
|
|
1848
|
+
this.onChangeFilter = output();
|
|
1728
1849
|
/** Event that is generated whenever the user remove a filter. */
|
|
1729
|
-
this.onRemoveFilter =
|
|
1850
|
+
this.onRemoveFilter = output();
|
|
1730
1851
|
/** Event that is generated whenever the user reset a filter changes. */
|
|
1731
|
-
this.onResetFilterChanges =
|
|
1852
|
+
this.onResetFilterChanges = output();
|
|
1732
1853
|
this._focusOrigin = null;
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
this.
|
|
1854
|
+
}
|
|
1855
|
+
/** Component state. true if opened dropdown or popup */
|
|
1856
|
+
get opened() {
|
|
1857
|
+
return !!(this.popover()?.isOpen || this.dropdown()?.opened);
|
|
1858
|
+
}
|
|
1859
|
+
/** Component state. true if opened dropdown or popup of filterActions */
|
|
1860
|
+
get filterActionsOpened() {
|
|
1861
|
+
return !!(this.popover()?.isOpen || this.filterActionsDropdown()?.opened);
|
|
1862
|
+
}
|
|
1863
|
+
/** Selected filter. Kept as a plain getter facade over the bar's `filter` model. */
|
|
1864
|
+
get filter() {
|
|
1865
|
+
return this.filterBar.filter();
|
|
1866
|
+
}
|
|
1867
|
+
/** Component state. True if 'filters' input contains no elements. */
|
|
1868
|
+
get isEmpty() {
|
|
1869
|
+
return this.filters().length === 0;
|
|
1870
|
+
}
|
|
1871
|
+
/** localized data
|
|
1872
|
+
* @docs-private */
|
|
1873
|
+
get localeData() {
|
|
1874
|
+
return this.filterBar.configuration.filters;
|
|
1875
|
+
}
|
|
1876
|
+
/** Current focus origin state.
|
|
1877
|
+
* @docs-private */
|
|
1878
|
+
get focusOrigin() {
|
|
1879
|
+
return this._focusOrigin;
|
|
1741
1880
|
}
|
|
1742
1881
|
ngOnInit() {
|
|
1743
|
-
this.filteredOptions = merge(of(this.filters), this.searchControl.valueChanges.pipe(map((value) => this.getFilteredOptions(value))));
|
|
1882
|
+
this.filteredOptions = merge(of(this.filters()), this.searchControl.valueChanges.pipe(map((value) => this.getFilteredOptions(value))));
|
|
1744
1883
|
this.focusMonitor
|
|
1745
1884
|
.monitor(this.elementRef, true)
|
|
1746
1885
|
.pipe(filter((origin) => !!origin), takeUntilDestroyed(this.destroyRef))
|
|
@@ -1751,82 +1890,48 @@ class KbqFilters {
|
|
|
1751
1890
|
return this.focusedElementBeforeOpen === button;
|
|
1752
1891
|
}
|
|
1753
1892
|
selectFilter(filter) {
|
|
1754
|
-
|
|
1755
|
-
|
|
1893
|
+
// Isolate the active filter from the saved source with a shallow structural copy (new filter object
|
|
1894
|
+
// + new pipes array + per-pipe shallow copy) instead of a deep `structuredClone`. Every pipe writes
|
|
1895
|
+
// its `value` by reassignment (never in-place mutation), so this fully isolates subsequent edits
|
|
1896
|
+
// while preserving any non-cloneable payload inside `value`. `structuredClone` (P2-20) is reserved
|
|
1897
|
+
// for the explicit save/restore boundary (`KbqFilterBar.saveFilterState`/`restoreFilterState`).
|
|
1898
|
+
this.filterBar.internalFilterChanges.next({ ...filter, pipes: filter.pipes.map((pipe) => ({ ...pipe })) });
|
|
1899
|
+
this.onSelectFilter.emit(filter);
|
|
1756
1900
|
}
|
|
1757
1901
|
saveChanges() {
|
|
1758
|
-
|
|
1902
|
+
const current = this.filterBar.filter();
|
|
1903
|
+
if (!current)
|
|
1759
1904
|
return;
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1905
|
+
// Immutable update (new reference) so the `filter` signal reacts; `internalFilterChanges` sets the
|
|
1906
|
+
// signal and emits `filterChange`.
|
|
1907
|
+
const updated = { ...current, saved: true, changed: false };
|
|
1908
|
+
this.filterBar.internalFilterChanges.next(updated);
|
|
1763
1909
|
this.onSave.emit({
|
|
1764
|
-
filter:
|
|
1910
|
+
filter: updated,
|
|
1765
1911
|
filterBar: this.filterBar,
|
|
1766
1912
|
status: KbqSaveFilterStatuses.OnlyChanges
|
|
1767
1913
|
});
|
|
1768
1914
|
}
|
|
1769
|
-
saveAsNew(event) {
|
|
1770
|
-
if (this.filterName.invalid)
|
|
1771
|
-
return;
|
|
1772
|
-
const name = this.filterName.value || '';
|
|
1773
|
-
// @todo default filter
|
|
1774
|
-
const filter = structuredClone(this.filter) || { pipes: [] };
|
|
1775
|
-
filter.name = name;
|
|
1776
|
-
filter.saved = true;
|
|
1777
|
-
filter.changed = false;
|
|
1778
|
-
this.isSaving = true;
|
|
1779
|
-
this.popover.preventClose = true;
|
|
1780
|
-
this.filterName.disable();
|
|
1781
|
-
if (this.saveNewFilter) {
|
|
1782
|
-
this.onSaveAsNew.emit({ filter, filterBar: this.filterBar });
|
|
1783
|
-
this.onSave.emit({ filter, filterBar: this.filterBar, status: KbqSaveFilterStatuses.NewFilter });
|
|
1784
|
-
}
|
|
1785
|
-
else {
|
|
1786
|
-
this.onSave.emit({ filter, filterBar: this.filterBar, status: KbqSaveFilterStatuses.NewName });
|
|
1787
|
-
}
|
|
1788
|
-
event?.preventDefault();
|
|
1789
|
-
}
|
|
1790
|
-
showError(error) {
|
|
1791
|
-
if (error?.nameAlreadyExists) {
|
|
1792
|
-
this.filterName.setErrors({ filterNameAlreadyExist: true });
|
|
1793
|
-
}
|
|
1794
|
-
this.showFilterSavingError = true;
|
|
1795
|
-
this.filterSavingErrorText = error?.text ?? this.filterBar.configuration.filters.errorHint;
|
|
1796
|
-
}
|
|
1797
1915
|
restoreFocus() {
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1916
|
+
// The popover can be opened from the dropdown item or programmatically, paths that never
|
|
1917
|
+
// capture a trigger via `saveFocusedElement`. Fall back to the main button so focus returns
|
|
1918
|
+
// to the filters control instead of being dropped on `<body>` (WCAG 2.4.3).
|
|
1919
|
+
const target = this.focusedElementBeforeOpen ?? this.mainButton();
|
|
1920
|
+
if (target && !target.disabled) {
|
|
1921
|
+
this.focusMonitor.focusVia(target.elementRef, this.focusOrigin);
|
|
1801
1922
|
}
|
|
1802
|
-
|
|
1803
|
-
preparePopover() {
|
|
1804
|
-
this.filterName = new FormControl(this.filter?.name || '', Validators.required);
|
|
1805
|
-
this.filterName.valueChanges.pipe(distinctUntilChanged()).subscribe(() => (this.showFilterSavingError = false));
|
|
1806
|
-
this.popover.show();
|
|
1807
|
-
merge(...this.popover.defaultClosingActions())
|
|
1808
|
-
.pipe(filter(() => !this.isSaving), takeUntilDestroyed(this.popover.instanceDestroyRef))
|
|
1809
|
-
.subscribe(() => this.closePopover(false));
|
|
1810
|
-
this.popover.visibleChange
|
|
1811
|
-
.pipe(filter((state) => !state), takeUntilDestroyed(this.popover.instanceDestroyRef))
|
|
1812
|
-
.subscribe(this.closePopover);
|
|
1813
|
-
setTimeout(() => {
|
|
1814
|
-
this.newFilterName.nativeElement.focus();
|
|
1815
|
-
this.filterName.setErrors(null);
|
|
1816
|
-
});
|
|
1817
|
-
}
|
|
1818
|
-
openSaveAsNewFilterPopover() {
|
|
1819
|
-
this.saveNewFilter = true;
|
|
1820
|
-
this.preparePopover();
|
|
1821
|
-
}
|
|
1822
|
-
openChangeFilterNamePopover() {
|
|
1823
|
-
this.saveNewFilter = false;
|
|
1824
|
-
this.preparePopover();
|
|
1923
|
+
this.focusedElementBeforeOpen = null;
|
|
1825
1924
|
}
|
|
1826
1925
|
/** @docs-private */
|
|
1827
1926
|
saveFocusedElement(button) {
|
|
1828
1927
|
this.focusedElementBeforeOpen = button || null;
|
|
1829
1928
|
}
|
|
1929
|
+
/** Restore focus when the save popover reports it closed. @docs-private */
|
|
1930
|
+
onSavePopoverClosed(restoreFocus) {
|
|
1931
|
+
if (restoreFocus)
|
|
1932
|
+
this.restoreFocus();
|
|
1933
|
+
this.changeDetectorRef.markForCheck();
|
|
1934
|
+
}
|
|
1830
1935
|
/** @docs-private */
|
|
1831
1936
|
stopEventPropagation(event) {
|
|
1832
1937
|
event.stopPropagation();
|
|
@@ -1843,44 +1948,100 @@ class KbqFilters {
|
|
|
1843
1948
|
/** @docs-private */
|
|
1844
1949
|
onDropdownOpen() {
|
|
1845
1950
|
this.searchControl.setValue(null);
|
|
1846
|
-
setTimeout(() => this.search.nativeElement.focus());
|
|
1951
|
+
setTimeout(() => this.search().nativeElement.focus());
|
|
1847
1952
|
}
|
|
1848
1953
|
resetFilterChanges() {
|
|
1849
1954
|
this.filterBar.resetFilterChangedState();
|
|
1850
1955
|
this.onResetFilterChanges.emit(this.filter);
|
|
1851
1956
|
}
|
|
1852
1957
|
removeFilter() {
|
|
1853
|
-
this.onRemoveFilter.
|
|
1854
|
-
setTimeout(() => this.focusMonitor.focusVia(this.mainButton.elementRef, this.focusOrigin), 0);
|
|
1958
|
+
this.onRemoveFilter.emit(this.filter);
|
|
1959
|
+
setTimeout(() => this.focusMonitor.focusVia(this.mainButton().elementRef, this.focusOrigin), 0);
|
|
1855
1960
|
}
|
|
1856
1961
|
/** Hide the popup and restore focus.
|
|
1857
|
-
* Use this method in the onSave
|
|
1962
|
+
* Use this method in the onSave or onChangeFilter events after the data has been successfully saved. */
|
|
1858
1963
|
filterSavedSuccessfully() {
|
|
1859
|
-
this.
|
|
1860
|
-
this.popover.preventClose = false;
|
|
1861
|
-
this.popover.hide();
|
|
1964
|
+
this.savePopover().savedSuccessfully();
|
|
1862
1965
|
setTimeout(() => this.restoreFocus(), 0);
|
|
1863
1966
|
this.changeDetectorRef.markForCheck();
|
|
1864
1967
|
}
|
|
1865
|
-
/** Shows an error. Use this method in the onSave
|
|
1968
|
+
/** Shows an error. Use this method in the onSave or onChangeFilter events if saving data failed. */
|
|
1866
1969
|
filterSavedUnsuccessfully(error) {
|
|
1867
|
-
|
|
1868
|
-
|
|
1970
|
+
// Re-enable the name control FIRST: `enable()` re-runs the control's validators and would wipe a
|
|
1971
|
+
// custom `filterNameAlreadyExist` error set beforehand, so apply the error AFTER re-enabling —
|
|
1972
|
+
// otherwise the inline "name already exists" message never renders.
|
|
1973
|
+
this.savePopover().savedUnsuccessfully();
|
|
1869
1974
|
this.showError(error);
|
|
1870
|
-
this.filterName.enable();
|
|
1871
|
-
setTimeout(() => this.saveFilterButton.focus());
|
|
1872
1975
|
this.changeDetectorRef.markForCheck();
|
|
1873
1976
|
}
|
|
1977
|
+
// Delegating facade to the extracted `KbqFilterSavePopover`: the save-popover state, templates and
|
|
1978
|
+
// logic live in that child; these members keep `KbqFilters`' public surface for callers and the template.
|
|
1979
|
+
/** @docs-private */
|
|
1980
|
+
get filterName() {
|
|
1981
|
+
return this.savePopover().filterName;
|
|
1982
|
+
}
|
|
1983
|
+
/** @docs-private */
|
|
1984
|
+
get saveNewFilter() {
|
|
1985
|
+
return this.savePopover().saveNewFilter;
|
|
1986
|
+
}
|
|
1987
|
+
/** @docs-private */
|
|
1988
|
+
set saveNewFilter(value) {
|
|
1989
|
+
this.savePopover().saveNewFilter = value;
|
|
1990
|
+
}
|
|
1991
|
+
/** @docs-private */
|
|
1992
|
+
get isSaving() {
|
|
1993
|
+
return this.savePopover().isSaving;
|
|
1994
|
+
}
|
|
1995
|
+
/** @docs-private */
|
|
1996
|
+
set isSaving(value) {
|
|
1997
|
+
this.savePopover().isSaving = value;
|
|
1998
|
+
}
|
|
1999
|
+
/** @docs-private */
|
|
2000
|
+
get showFilterSavingError() {
|
|
2001
|
+
return this.savePopover().showFilterSavingError;
|
|
2002
|
+
}
|
|
2003
|
+
/** @docs-private */
|
|
2004
|
+
set showFilterSavingError(value) {
|
|
2005
|
+
this.savePopover().showFilterSavingError = value;
|
|
2006
|
+
}
|
|
2007
|
+
/** @docs-private */
|
|
2008
|
+
get filterSavingErrorText() {
|
|
2009
|
+
return this.savePopover().filterSavingErrorText;
|
|
2010
|
+
}
|
|
2011
|
+
/** header of popover. Depends on the mode
|
|
2012
|
+
* @docs-private */
|
|
2013
|
+
get popoverHeader() {
|
|
2014
|
+
return this.savePopover().popoverHeader;
|
|
2015
|
+
}
|
|
2016
|
+
/** @docs-private */
|
|
2017
|
+
openSaveAsNewFilterPopover() {
|
|
2018
|
+
this.savePopover().openSaveAsNewFilterPopover();
|
|
2019
|
+
}
|
|
2020
|
+
/** @docs-private */
|
|
2021
|
+
openChangeFilterNamePopover() {
|
|
2022
|
+
this.savePopover().openChangeFilterNamePopover();
|
|
2023
|
+
}
|
|
2024
|
+
/** @docs-private */
|
|
2025
|
+
saveAsNew(event) {
|
|
2026
|
+
this.savePopover().saveAsNew(event);
|
|
2027
|
+
}
|
|
2028
|
+
/** @docs-private */
|
|
2029
|
+
showError(error) {
|
|
2030
|
+
this.savePopover().showError(error);
|
|
2031
|
+
}
|
|
2032
|
+
/** @docs-private */
|
|
2033
|
+
closePopover(restoreFocus = true) {
|
|
2034
|
+
this.savePopover().close(restoreFocus);
|
|
2035
|
+
}
|
|
1874
2036
|
getFilteredOptions(value) {
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
: this.filters;
|
|
2037
|
+
return value
|
|
2038
|
+
? this.filters().filter((filter) => filter.name.toLowerCase().includes(value.toLowerCase()))
|
|
2039
|
+
: this.filters();
|
|
1879
2040
|
}
|
|
1880
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1881
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqFilters, isStandalone: true, selector: "kbq-filters", inputs: { filters: "filters" }, outputs: { onSelectFilter: "onSelectFilter", onSave: "onSave", onChangeFilter: "onChangeFilter", onSaveAsNew: "onSaveAsNew", onRemoveFilter: "onRemoveFilter", onResetFilterChanges: "onResetFilterChanges" }, host: { classAttribute: "kbq-filters" }, viewQueries: [{ propertyName: "mainButton", first: true, predicate: ["mainButton"], descendants: true }, { propertyName: "saveNewFilterButton", first: true, predicate: ["saveNewFilterButton"], descendants: true }, { propertyName: "filterActionsButton", first: true, predicate: ["filterActionsButton"], descendants: true }, { propertyName: "popover", first: true, predicate: KbqPopoverTrigger, descendants: true }, { propertyName: "dropdown", first: true, predicate: KbqDropdownTrigger, descendants: true }, { propertyName: "filterActionsDropdown", first: true, predicate: ["filterActionsButton"], descendants: true }, { propertyName: "search", first: true, predicate: ["search"], descendants: true }, { propertyName: "newFilterName", first: true, predicate: ["newFilterName"], descendants: true }, { propertyName: "saveFilterButton", first: true, predicate: ["saveFilterButton"], descendants: true }], exportAs: ["kbqFilters"], ngImport: i0, template: "<button\n #mainButton\n kbq-button\n kbq-title\n kbqFilterBarButton\n kbqPopover\n [kbqDropdownTriggerFor]=\"savedFilters\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverOffset]=\"popoverOffset\"\n [kbqPopoverClass]=\"'kbq-filters__save-as-new-filter-popover'\"\n [kbqPopoverContent]=\"saveAsNewPopoverContent\"\n [kbqPopoverFooter]=\"saveAsNewPopoverFooter\"\n [kbqPopoverHeader]=\"saveAsNewPopoverHeader\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n [kbqPopoverSize]=\"popoverSize\"\n [kbqTrigger]=\"'manual'\"\n [disabled]=\"isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(mainButton) && opened\"\n (dropdownClosed)=\"searchControl.setValue('')\"\n (dropdownOpened)=\"onDropdownOpen()\"\n>\n <span #kbqTitleText class=\"kbq-filters__filter-name\">\n @if (filter?.name) {\n {{ filter!.name }}\n } @else {\n <ng-content>\n <i kbq-icon=\"kbq-list_16\"></i>\n {{ localeData.defaultName }}\n </ng-content>\n }\n </span>\n</button>\n\n@if (filterBar.isChanged && !filterBar.isSaved) {\n <button\n #saveNewFilterButton\n kbqTooltip=\"{{ localeData.saveNewFilterTooltip }}\"\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [class.kbq-active]=\"focusedElementBeforeIs(saveNewFilterButton) && opened\"\n [color]=\"colors.Empty\"\n [disabled]=\"isSaving\"\n (click)=\"openSaveAsNewFilterPopover()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n </button>\n}\n\n@if (filterBar.isSaved) {\n <button\n #filterActionsButton\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [color]=\"colors.Empty\"\n [kbqDropdownTriggerFor]=\"filterActions\"\n [disabled]=\"isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(filterActionsButton) && filterActionsOpened\"\n [ngClass]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged }\"\n >\n <i kbq-icon=\"kbq-ellipsis-vertical_16\"></i>\n </button>\n\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-filter-bar__arrow\" [color]=\"'theme'\"></i>\n} @else {\n <kbq-divider class=\"kbq-filter-bar__separator\" [vertical]=\"true\" />\n}\n\n<kbq-dropdown #savedFilters=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n <div [style.display]=\"isEmpty ? 'none' : 'initial'\">\n <kbq-form-field kbqFormFieldWithoutBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n\n <input\n #search\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [formControl]=\"searchControl\"\n (click)=\"stopEventPropagation($event)\"\n (keydown)=\"searchKeydownHandler($event)\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <kbq-divider />\n\n @for (filter of filteredOptions | async; track filter) {\n <button\n kbq-dropdown-item\n kbq-title\n [class.kbq-selected]=\"filterBar.filter?.name === filter.name\"\n (click)=\"selectFilter(filter)\"\n >\n {{ filter.name }}\n </button>\n } @empty {\n <button kbq-dropdown-item [disabled]=\"true\">\n {{ localeData.searchEmptyResult }}\n </button>\n }\n\n <kbq-divider />\n </div>\n\n <button kbq-dropdown-item (click)=\"openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNewFilter }}\n </button>\n</kbq-dropdown>\n\n<kbq-dropdown #filterActions=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n @if (filterBar.isSavedAndChanged && !filterBar.isReadOnly) {\n <button\n kbq-dropdown-item\n [ngClass]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged }\"\n (click)=\"saveChanges()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n {{ localeData.saveChanges }}\n @if (filterBar.isSavedAndChanged) {\n <i kbq-icon=\"kbq-circle-xs_16\" class=\"kbq-icon-button kbq-warning layout-margin-left-xs\"></i>\n }\n </button>\n }\n <button kbq-dropdown-item (click)=\"openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNew }}\n </button>\n\n @if (!filterBar.isReadOnly) {\n <button kbq-dropdown-item (click)=\"openChangeFilterNamePopover()\">\n <i kbq-icon=\"kbq-pencil_16\"></i>\n {{ localeData.change }}\n </button>\n }\n\n @if (filterBar.isSavedAndChanged || !filterBar.isReadOnly) {\n <kbq-divider />\n }\n\n @if (filterBar.isSavedAndChanged) {\n <button kbq-dropdown-item (click)=\"resetFilterChanges()\">\n <i kbq-icon=\"kbq-circle-xmark_16\"></i>\n {{ localeData.resetChanges }}\n </button>\n }\n @if (!filterBar.isReadOnly) {\n <button kbq-dropdown-item (click)=\"removeFilter()\">\n <i kbq-icon=\"kbq-trash_16\"></i>\n {{ localeData.remove }}\n </button>\n }\n</kbq-dropdown>\n\n<ng-template #saveAsNewPopoverHeader>{{ popoverHeader }}</ng-template>\n\n<ng-template #saveAsNewPopoverContent>\n @if (showFilterSavingError) {\n <kbq-alert class=\"layout-margin-bottom-m\" [alertColor]=\"'error'\" [alertStyle]=\"'colored'\" [compact]=\"true\">\n {{ filterSavingErrorText }}\n </kbq-alert>\n }\n <div class=\"kbq-form-vertical\">\n <div class=\"kbq-form__row\">\n <label class=\"kbq-form__label\">{{ localeData.name }}</label>\n\n <kbq-form-field class=\"kbq-form__control\">\n <input\n #newFilterName\n kbqInput\n type=\"text\"\n [formControl]=\"filterName\"\n (keydown.enter)=\"saveAsNew($event)\"\n />\n\n @if (filterName.hasError('filterNameAlreadyExist')) {\n <kbq-error>{{ localeData.error }}</kbq-error>\n }\n </kbq-form-field>\n </div>\n </div>\n</ng-template>\n\n<ng-template #saveAsNewPopoverFooter>\n <button\n #saveFilterButton\n kbq-button\n class=\"layout-margin-right-l\"\n [class.kbq-progress]=\"isSaving\"\n [disabled]=\"isSaving\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'filled'\"\n (click)=\"saveAsNew()\"\n >\n {{ localeData.saveButton }}\n </button>\n <button\n kbq-button\n [color]=\"'contrast-fade'\"\n [kbqStyle]=\"'filled'\"\n [disabled]=\"isSaving\"\n (click)=\"closePopover(true)\"\n >\n {{ localeData.cancelButton }}\n </button>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-filters{display:flex}.kbq-filters>.kbq-button{max-width:320px}.kbq-filters>.kbq-button .kbq-button-wrapper{width:100%}.kbq-filters>.kbq-button .kbq-icon{margin-right:var(--kbq-size-xxs)}.kbq-filters .kbq-filters__filter-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-filters .kbq-filters__filter-name .kbq-icon{margin-bottom:var(--kbq-size-3xs)}.kbq-filters .kbq-filter-bar__separator{align-self:center;height:var(--kbq-size-m)!important;margin-left:calc(var(--kbq-size-s) + var(--kbq-size-xs))!important;margin-right:var(--kbq-size-xs)!important}.kbq-filters .kbq-filter-bar__arrow{align-self:center;margin-left:var(--kbq-size-s)}.kbq-filters .kbq-button.kbq-button_changed-filter{border-bottom-right-radius:unset;border-top-right-radius:unset}.kbq-filters .kbq-button-icon{margin-left:-1px;border-bottom-left-radius:unset;border-top-left-radius:unset}.kbq-filters .kbq-button_changed-saved-filter:before{content:\"\";position:absolute;right:-4px;top:-4px;width:var(--kbq-size-s);height:var(--kbq-size-s);border:2px solid var(--kbq-background-bg);border-radius:var(--kbq-size-xs);background:var(--kbq-icon-warning)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:10px;width:1px;height:var(--kbq-size-m);background:var(--kbq-line-contrast-less)}.kbq-filters__save-as-new-filter-popover .kbq-popover__container{width:400px}.kbq-filters__save-as-new-filter-popover .kbq-popover__content{padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-filters__dropdown .kbq-dropdown-item{padding-right:var(--kbq-size-s)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i1.KbqButtonDropdownTrigger, selector: "[kbq-button][kbqDropdownTriggerFor]" }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i3$2.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "component", type: i3$2.KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: ["disabled"], exportAs: ["kbqDropdownItem"] }, { kind: "directive", type: i3$2.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "demoteOverlay", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i4$1.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "inset", "paddings"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i5$2.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "component", type: i2.KbqError, selector: "kbq-error", exportAs: ["kbqError"] }, { kind: "directive", type: i2.KbqFormFieldWithoutBorders, selector: "kbq-form-field[kbqFormFieldWithoutBorders]", exportAs: ["kbqFormFieldWithoutBorders"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: KbqFilterBarButton, selector: "[kbqFilterBarButton]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: KbqFormsModule }, { kind: "directive", type: i6.KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", exportAs: ["kbqForm"] }, { kind: "directive", type: i6.KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", exportAs: ["kbqFormElement"] }, { kind: "ngmodule", type: KbqAlertModule }, { kind: "component", type: i10.KbqAlert, selector: "kbq-alert", inputs: ["compact", "alertStyle", "alertColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2041
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilters, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2042
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqFilters, isStandalone: true, selector: "kbq-filters", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onSelectFilter: "onSelectFilter", onSave: "onSave", onChangeFilter: "onChangeFilter", onRemoveFilter: "onRemoveFilter", onResetFilterChanges: "onResetFilterChanges" }, host: { classAttribute: "kbq-filters" }, viewQueries: [{ propertyName: "mainButton", first: true, predicate: ["mainButton"], descendants: true, isSignal: true }, { propertyName: "saveNewFilterButton", first: true, predicate: ["saveNewFilterButton"], descendants: true, isSignal: true }, { propertyName: "filterActionsButton", first: true, predicate: ["filterActionsButton"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: KbqPopoverTrigger, descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: KbqDropdownTrigger, descendants: true, isSignal: true }, { propertyName: "filterActionsDropdown", first: true, predicate: ["filterActionsButton"], descendants: true, isSignal: true }, { propertyName: "savePopover", first: true, predicate: KbqFilterSavePopover, descendants: true, isSignal: true }, { propertyName: "search", first: true, predicate: ["search"], descendants: true, isSignal: true }], exportAs: ["kbqFilters"], ngImport: i0, template: "<button\n #mainButton\n #popoverRef=\"kbqPopover\"\n kbq-button\n kbq-title\n kbqFilterBarButton\n kbqPopover\n [kbqDropdownTriggerFor]=\"savedFilters\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverOffset]=\"popoverOffset\"\n [kbqPopoverClass]=\"'kbq-filters__save-as-new-filter-popover'\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n [kbqPopoverSize]=\"popoverSize\"\n [kbqTrigger]=\"'manual'\"\n [disabled]=\"savePopover.isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(mainButton) && opened\"\n (dropdownClosed)=\"searchControl.setValue('')\"\n (dropdownOpened)=\"onDropdownOpen()\"\n>\n <span #kbqTitleText class=\"kbq-filters__filter-name\">\n @if (filter?.name) {\n {{ filter!.name }}\n } @else {\n <ng-content>\n <i kbq-icon=\"kbq-list_16\"></i>\n {{ localeData.defaultName }}\n </ng-content>\n }\n </span>\n</button>\n\n@if (filterBar.isChanged() && !filterBar.isSaved()) {\n <button\n #saveNewFilterButton\n kbqTooltip=\"{{ localeData.saveNewFilterTooltip }}\"\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [attr.aria-label]=\"localeData.saveNewFilterTooltip\"\n [class.kbq-active]=\"focusedElementBeforeIs(saveNewFilterButton) && opened\"\n [color]=\"colors.Empty\"\n [disabled]=\"savePopover.isSaving\"\n (click)=\"savePopover.openSaveAsNewFilterPopover()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\" aria-hidden=\"true\"></i>\n </button>\n}\n\n@if (filterBar.isSaved()) {\n <button\n #filterActionsButton\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [attr.aria-label]=\"localeData.actionsTooltip\"\n [color]=\"colors.Empty\"\n [kbqDropdownTriggerFor]=\"filterActions\"\n [disabled]=\"savePopover.isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(filterActionsButton) && filterActionsOpened\"\n [class]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged() }\"\n >\n <i kbq-icon=\"kbq-ellipsis-vertical_16\" aria-hidden=\"true\"></i>\n </button>\n\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-filter-bar__arrow\" [color]=\"'theme'\"></i>\n} @else {\n <kbq-divider class=\"kbq-filter-bar__separator\" [vertical]=\"true\" />\n}\n\n<kbq-dropdown #savedFilters=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n <div [style.display]=\"isEmpty ? 'none' : 'initial'\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n\n <input\n #search\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [attr.aria-label]=\"localeData.searchPlaceholder\"\n [formControl]=\"searchControl\"\n (click)=\"stopEventPropagation($event)\"\n (keydown)=\"searchKeydownHandler($event)\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <kbq-divider />\n\n @for (filter of filteredOptions | async; track filter) {\n <button\n kbq-dropdown-item\n kbq-title\n [class.kbq-selected]=\"filterBar.filter()?.name === filter.name\"\n (click)=\"selectFilter(filter)\"\n >\n {{ filter.name }}\n </button>\n } @empty {\n <button kbq-dropdown-item [disabled]=\"true\">\n {{ localeData.searchEmptyResult }}\n </button>\n }\n\n <kbq-divider />\n </div>\n\n <button kbq-dropdown-item (click)=\"savePopover.openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNewFilter }}\n </button>\n</kbq-dropdown>\n\n<kbq-dropdown #filterActions=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n @if (filterBar.isSavedAndChanged() && !filterBar.isReadOnly()) {\n <button\n kbq-dropdown-item\n [class]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged() }\"\n (click)=\"saveChanges()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n {{ localeData.saveChanges }}\n @if (filterBar.isSavedAndChanged()) {\n <i kbq-icon=\"kbq-circle-xs_16\" class=\"kbq-icon-button kbq-warning layout-margin-left-xs\"></i>\n }\n </button>\n }\n <button kbq-dropdown-item (click)=\"savePopover.openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNew }}\n </button>\n\n @if (!filterBar.isReadOnly()) {\n <button kbq-dropdown-item (click)=\"savePopover.openChangeFilterNamePopover()\">\n <i kbq-icon=\"kbq-pencil_16\"></i>\n {{ localeData.change }}\n </button>\n }\n\n @if (filterBar.isSavedAndChanged() || !filterBar.isReadOnly()) {\n <kbq-divider />\n }\n\n @if (filterBar.isSavedAndChanged()) {\n <button kbq-dropdown-item (click)=\"resetFilterChanges()\">\n <i kbq-icon=\"kbq-circle-xmark_16\"></i>\n {{ localeData.resetChanges }}\n </button>\n }\n @if (!filterBar.isReadOnly()) {\n <button kbq-dropdown-item (click)=\"removeFilter()\">\n <i kbq-icon=\"kbq-trash_16\"></i>\n {{ localeData.remove }}\n </button>\n }\n</kbq-dropdown>\n\n<kbq-filter-save-popover\n #savePopover\n [popoverTrigger]=\"popoverRef\"\n [filterBar]=\"filterBar\"\n (save)=\"onSave.emit($event)\"\n (closed)=\"onSavePopoverClosed($event)\"\n/>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-filters{display:flex}.kbq-filters>.kbq-button{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-filters>.kbq-button .kbq-button-wrapper{width:100%}.kbq-filters>.kbq-button .kbq-icon{margin-inline-end:var(--kbq-size-xxs)}.kbq-filters .kbq-filters__filter-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-filters .kbq-filters__filter-name .kbq-icon{margin-bottom:var(--kbq-size-3xs)}.kbq-filters .kbq-filter-bar__separator{align-self:center;height:var(--kbq-size-m)!important;margin-inline-start:calc(var(--kbq-size-s) + var(--kbq-size-xs))!important;margin-inline-end:var(--kbq-size-xs)!important}.kbq-filters .kbq-filter-bar__arrow{align-self:center;margin-inline-start:var(--kbq-size-s)}.kbq-filters .kbq-button.kbq-button_changed-filter{border-end-end-radius:unset;border-start-end-radius:unset}.kbq-filters .kbq-button-icon{margin-inline-start:-1px;border-end-start-radius:unset;border-start-start-radius:unset}.kbq-filters .kbq-button_changed-saved-filter:before{content:\"\";position:absolute;inset-inline-end:-4px;top:-4px;width:var(--kbq-size-s);height:var(--kbq-size-s);border-width:2px;border-style:solid;border-radius:var(--kbq-size-xs)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:10px;width:1px;height:var(--kbq-size-m)}.kbq-filters__save-as-new-filter-popover{--kbq-filter-bar-save-popover-width: 400px}.kbq-filters__save-as-new-filter-popover .kbq-popover__container{width:var(--kbq-filter-bar-save-popover-width)}.kbq-filters__save-as-new-filter-popover .kbq-popover__content{padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-filters__dropdown .kbq-dropdown-item{padding-inline-end:var(--kbq-size-s)}.kbq-filters .kbq-button_changed-saved-filter:before{border-color:var(--kbq-background-bg);background:var(--kbq-icon-warning)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i1.KbqButtonDropdownTrigger, selector: "[kbq-button][kbqDropdownTriggerFor]" }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i3$1.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "component", type: i3$1.KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: ["disabled"], exportAs: ["kbqDropdownItem"] }, { kind: "directive", type: i3$1.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "demoteOverlay", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i4$1.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "paddings"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i2$1.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i5.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i5.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i5.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i5.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "directive", type: KbqFilterBarButton, selector: "[kbqFilterBarButton]" }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset", "kbqTooltipModifier", "kbqTooltipHeader"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i5$1.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: KbqFormsModule }, { kind: "component", type: KbqFilterSavePopover, selector: "kbq-filter-save-popover", inputs: ["popoverTrigger", "filterBar"], outputs: ["save", "closed"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1882
2043
|
}
|
|
1883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilters, decorators: [{
|
|
1884
2045
|
type: Component,
|
|
1885
2046
|
args: [{ selector: 'kbq-filters', imports: [
|
|
1886
2047
|
ReactiveFormsModule,
|
|
@@ -1889,132 +2050,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1889
2050
|
KbqDividerModule,
|
|
1890
2051
|
KbqIcon,
|
|
1891
2052
|
KbqTitleModule,
|
|
1892
|
-
KbqFormFieldModule,
|
|
1893
2053
|
KbqInputModule,
|
|
1894
|
-
NgClass,
|
|
1895
2054
|
KbqFilterBarButton,
|
|
1896
2055
|
AsyncPipe,
|
|
1897
2056
|
KbqTooltipTrigger,
|
|
1898
2057
|
KbqPopoverModule,
|
|
1899
2058
|
FormsModule,
|
|
1900
2059
|
KbqFormsModule,
|
|
1901
|
-
|
|
1902
|
-
],
|
|
2060
|
+
KbqFilterSavePopover
|
|
2061
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1903
2062
|
class: 'kbq-filters'
|
|
1904
|
-
}, template: "<button\n #mainButton\n kbq-button\n kbq-title\n kbqFilterBarButton\n kbqPopover\n [kbqDropdownTriggerFor]=\"savedFilters\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverOffset]=\"popoverOffset\"\n [kbqPopoverClass]=\"'kbq-filters__save-as-new-filter-popover'\"\n [kbqPopoverContent]=\"saveAsNewPopoverContent\"\n [kbqPopoverFooter]=\"saveAsNewPopoverFooter\"\n [kbqPopoverHeader]=\"saveAsNewPopoverHeader\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n [kbqPopoverSize]=\"popoverSize\"\n [kbqTrigger]=\"'manual'\"\n [disabled]=\"isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(mainButton) && opened\"\n (dropdownClosed)=\"searchControl.setValue('')\"\n (dropdownOpened)=\"onDropdownOpen()\"\n>\n <span #kbqTitleText class=\"kbq-filters__filter-name\">\n @if (filter?.name) {\n {{ filter!.name }}\n } @else {\n <ng-content>\n <i kbq-icon=\"kbq-list_16\"></i>\n {{ localeData.defaultName }}\n </ng-content>\n }\n </span>\n</button>\n\n@if (filterBar.isChanged && !filterBar.isSaved) {\n <button\n #saveNewFilterButton\n kbqTooltip=\"{{ localeData.saveNewFilterTooltip }}\"\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [class.kbq-active]=\"focusedElementBeforeIs(saveNewFilterButton) && opened\"\n [color]=\"colors.Empty\"\n [disabled]=\"isSaving\"\n (click)=\"openSaveAsNewFilterPopover()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n </button>\n}\n\n@if (filterBar.isSaved) {\n <button\n #filterActionsButton\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [color]=\"colors.Empty\"\n [kbqDropdownTriggerFor]=\"filterActions\"\n [disabled]=\"isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(filterActionsButton) && filterActionsOpened\"\n [ngClass]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged }\"\n >\n <i kbq-icon=\"kbq-ellipsis-vertical_16\"></i>\n </button>\n\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-filter-bar__arrow\" [color]=\"'theme'\"></i>\n} @else {\n <kbq-divider class=\"kbq-filter-bar__separator\" [vertical]=\"true\" />\n}\n\n<kbq-dropdown #savedFilters=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n <div [style.display]=\"isEmpty ? 'none' : 'initial'\">\n <kbq-form-field kbqFormFieldWithoutBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n\n <input\n #search\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [formControl]=\"searchControl\"\n (click)=\"stopEventPropagation($event)\"\n (keydown)=\"searchKeydownHandler($event)\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <kbq-divider />\n\n @for (filter of filteredOptions | async; track filter) {\n <button\n kbq-dropdown-item\n kbq-title\n [class.kbq-selected]=\"filterBar.filter?.name === filter.name\"\n (click)=\"selectFilter(filter)\"\n >\n {{ filter.name }}\n </button>\n } @empty {\n <button kbq-dropdown-item [disabled]=\"true\">\n {{ localeData.searchEmptyResult }}\n </button>\n }\n\n <kbq-divider />\n </div>\n\n <button kbq-dropdown-item (click)=\"openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNewFilter }}\n </button>\n</kbq-dropdown>\n\n<kbq-dropdown #filterActions=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n @if (filterBar.isSavedAndChanged && !filterBar.isReadOnly) {\n <button\n kbq-dropdown-item\n [ngClass]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged }\"\n (click)=\"saveChanges()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n {{ localeData.saveChanges }}\n @if (filterBar.isSavedAndChanged) {\n <i kbq-icon=\"kbq-circle-xs_16\" class=\"kbq-icon-button kbq-warning layout-margin-left-xs\"></i>\n }\n </button>\n }\n <button kbq-dropdown-item (click)=\"openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNew }}\n </button>\n\n @if (!filterBar.isReadOnly) {\n <button kbq-dropdown-item (click)=\"openChangeFilterNamePopover()\">\n <i kbq-icon=\"kbq-pencil_16\"></i>\n {{ localeData.change }}\n </button>\n }\n\n @if (filterBar.isSavedAndChanged || !filterBar.isReadOnly) {\n <kbq-divider />\n }\n\n @if (filterBar.isSavedAndChanged) {\n <button kbq-dropdown-item (click)=\"resetFilterChanges()\">\n <i kbq-icon=\"kbq-circle-xmark_16\"></i>\n {{ localeData.resetChanges }}\n </button>\n }\n @if (!filterBar.isReadOnly) {\n <button kbq-dropdown-item (click)=\"removeFilter()\">\n <i kbq-icon=\"kbq-trash_16\"></i>\n {{ localeData.remove }}\n </button>\n }\n</kbq-dropdown>\n\n<ng-template #saveAsNewPopoverHeader>{{ popoverHeader }}</ng-template>\n\n<ng-template #saveAsNewPopoverContent>\n @if (showFilterSavingError) {\n <kbq-alert class=\"layout-margin-bottom-m\" [alertColor]=\"'error'\" [alertStyle]=\"'colored'\" [compact]=\"true\">\n {{ filterSavingErrorText }}\n </kbq-alert>\n }\n <div class=\"kbq-form-vertical\">\n <div class=\"kbq-form__row\">\n <label class=\"kbq-form__label\">{{ localeData.name }}</label>\n\n <kbq-form-field class=\"kbq-form__control\">\n <input\n #newFilterName\n kbqInput\n type=\"text\"\n [formControl]=\"filterName\"\n (keydown.enter)=\"saveAsNew($event)\"\n />\n\n @if (filterName.hasError('filterNameAlreadyExist')) {\n <kbq-error>{{ localeData.error }}</kbq-error>\n }\n </kbq-form-field>\n </div>\n </div>\n</ng-template>\n\n<ng-template #saveAsNewPopoverFooter>\n <button\n #saveFilterButton\n kbq-button\n class=\"layout-margin-right-l\"\n [class.kbq-progress]=\"isSaving\"\n [disabled]=\"isSaving\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'filled'\"\n (click)=\"saveAsNew()\"\n >\n {{ localeData.saveButton }}\n </button>\n <button\n kbq-button\n [color]=\"'contrast-fade'\"\n [kbqStyle]=\"'filled'\"\n [disabled]=\"isSaving\"\n (click)=\"closePopover(true)\"\n >\n {{ localeData.cancelButton }}\n </button>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-filters{display:flex}.kbq-filters>.kbq-button{max-width:320px}.kbq-filters>.kbq-button .kbq-button-wrapper{width:100%}.kbq-filters>.kbq-button .kbq-icon{margin-right:var(--kbq-size-xxs)}.kbq-filters .kbq-filters__filter-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-filters .kbq-filters__filter-name .kbq-icon{margin-bottom:var(--kbq-size-3xs)}.kbq-filters .kbq-filter-bar__separator{align-self:center;height:var(--kbq-size-m)!important;margin-left:calc(var(--kbq-size-s) + var(--kbq-size-xs))!important;margin-right:var(--kbq-size-xs)!important}.kbq-filters .kbq-filter-bar__arrow{align-self:center;margin-left:var(--kbq-size-s)}.kbq-filters .kbq-button.kbq-button_changed-filter{border-bottom-right-radius:unset;border-top-right-radius:unset}.kbq-filters .kbq-button-icon{margin-left:-1px;border-bottom-left-radius:unset;border-top-left-radius:unset}.kbq-filters .kbq-button_changed-saved-filter:before{content:\"\";position:absolute;right:-4px;top:-4px;width:var(--kbq-size-s);height:var(--kbq-size-s);border:2px solid var(--kbq-background-bg);border-radius:var(--kbq-size-xs);background:var(--kbq-icon-warning)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{content:\"\";position:absolute;left:0;top:10px;width:1px;height:var(--kbq-size-m);background:var(--kbq-line-contrast-less)}.kbq-filters__save-as-new-filter-popover .kbq-popover__container{width:400px}.kbq-filters__save-as-new-filter-popover .kbq-popover__content{padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-filters__dropdown .kbq-dropdown-item{padding-right:var(--kbq-size-s)}\n"] }]
|
|
1905
|
-
}],
|
|
1906
|
-
type: ViewChild,
|
|
1907
|
-
args: ['mainButton']
|
|
1908
|
-
}], saveNewFilterButton: [{
|
|
1909
|
-
type: ViewChild,
|
|
1910
|
-
args: ['saveNewFilterButton']
|
|
1911
|
-
}], filterActionsButton: [{
|
|
1912
|
-
type: ViewChild,
|
|
1913
|
-
args: ['filterActionsButton']
|
|
1914
|
-
}], popover: [{
|
|
1915
|
-
type: ViewChild,
|
|
1916
|
-
args: [KbqPopoverTrigger]
|
|
1917
|
-
}], dropdown: [{
|
|
1918
|
-
type: ViewChild,
|
|
1919
|
-
args: [KbqDropdownTrigger]
|
|
1920
|
-
}], filterActionsDropdown: [{
|
|
1921
|
-
type: ViewChild,
|
|
1922
|
-
args: ['filterActionsButton']
|
|
1923
|
-
}], search: [{
|
|
1924
|
-
type: ViewChild,
|
|
1925
|
-
args: ['search']
|
|
1926
|
-
}], newFilterName: [{
|
|
1927
|
-
type: ViewChild,
|
|
1928
|
-
args: ['newFilterName']
|
|
1929
|
-
}], saveFilterButton: [{
|
|
1930
|
-
type: ViewChild,
|
|
1931
|
-
args: ['saveFilterButton']
|
|
1932
|
-
}], filters: [{
|
|
1933
|
-
type: Input
|
|
1934
|
-
}], onSelectFilter: [{
|
|
1935
|
-
type: Output
|
|
1936
|
-
}], onSave: [{
|
|
1937
|
-
type: Output
|
|
1938
|
-
}], onChangeFilter: [{
|
|
1939
|
-
type: Output
|
|
1940
|
-
}], onSaveAsNew: [{
|
|
1941
|
-
type: Output
|
|
1942
|
-
}], onRemoveFilter: [{
|
|
1943
|
-
type: Output
|
|
1944
|
-
}], onResetFilterChanges: [{
|
|
1945
|
-
type: Output
|
|
1946
|
-
}] } });
|
|
2063
|
+
}, exportAs: 'kbqFilters', template: "<button\n #mainButton\n #popoverRef=\"kbqPopover\"\n kbq-button\n kbq-title\n kbqFilterBarButton\n kbqPopover\n [kbqDropdownTriggerFor]=\"savedFilters\"\n [kbqPopoverArrow]=\"false\"\n [kbqPopoverOffset]=\"popoverOffset\"\n [kbqPopoverClass]=\"'kbq-filters__save-as-new-filter-popover'\"\n [kbqPopoverPlacement]=\"placements.BottomLeft\"\n [kbqPopoverPlacementPriority]=\"[placements.BottomLeft, placements.TopLeft]\"\n [kbqPopoverSize]=\"popoverSize\"\n [kbqTrigger]=\"'manual'\"\n [disabled]=\"savePopover.isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(mainButton) && opened\"\n (dropdownClosed)=\"searchControl.setValue('')\"\n (dropdownOpened)=\"onDropdownOpen()\"\n>\n <span #kbqTitleText class=\"kbq-filters__filter-name\">\n @if (filter?.name) {\n {{ filter!.name }}\n } @else {\n <ng-content>\n <i kbq-icon=\"kbq-list_16\"></i>\n {{ localeData.defaultName }}\n </ng-content>\n }\n </span>\n</button>\n\n@if (filterBar.isChanged() && !filterBar.isSaved()) {\n <button\n #saveNewFilterButton\n kbqTooltip=\"{{ localeData.saveNewFilterTooltip }}\"\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [attr.aria-label]=\"localeData.saveNewFilterTooltip\"\n [class.kbq-active]=\"focusedElementBeforeIs(saveNewFilterButton) && opened\"\n [color]=\"colors.Empty\"\n [disabled]=\"savePopover.isSaving\"\n (click)=\"savePopover.openSaveAsNewFilterPopover()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\" aria-hidden=\"true\"></i>\n </button>\n}\n\n@if (filterBar.isSaved()) {\n <button\n #filterActionsButton\n kbq-button\n kbqFilterBarButton\n class=\"kbq-button_action\"\n [attr.aria-label]=\"localeData.actionsTooltip\"\n [color]=\"colors.Empty\"\n [kbqDropdownTriggerFor]=\"filterActions\"\n [disabled]=\"savePopover.isSaving\"\n [class.kbq-active]=\"focusedElementBeforeIs(filterActionsButton) && filterActionsOpened\"\n [class]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged() }\"\n >\n <i kbq-icon=\"kbq-ellipsis-vertical_16\" aria-hidden=\"true\"></i>\n </button>\n\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-filter-bar__arrow\" [color]=\"'theme'\"></i>\n} @else {\n <kbq-divider class=\"kbq-filter-bar__separator\" [vertical]=\"true\" />\n}\n\n<kbq-dropdown #savedFilters=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n <div [style.display]=\"isEmpty ? 'none' : 'initial'\">\n <kbq-form-field noBorders>\n <i kbq-icon=\"kbq-magnifying-glass_16\" kbqPrefix></i>\n\n <input\n #search\n placeholder=\"{{ localeData.searchPlaceholder }}\"\n autocomplete=\"off\"\n kbqInput\n [attr.aria-label]=\"localeData.searchPlaceholder\"\n [formControl]=\"searchControl\"\n (click)=\"stopEventPropagation($event)\"\n (keydown)=\"searchKeydownHandler($event)\"\n />\n <kbq-cleaner />\n </kbq-form-field>\n\n <kbq-divider />\n\n @for (filter of filteredOptions | async; track filter) {\n <button\n kbq-dropdown-item\n kbq-title\n [class.kbq-selected]=\"filterBar.filter()?.name === filter.name\"\n (click)=\"selectFilter(filter)\"\n >\n {{ filter.name }}\n </button>\n } @empty {\n <button kbq-dropdown-item [disabled]=\"true\">\n {{ localeData.searchEmptyResult }}\n </button>\n }\n\n <kbq-divider />\n </div>\n\n <button kbq-dropdown-item (click)=\"savePopover.openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNewFilter }}\n </button>\n</kbq-dropdown>\n\n<kbq-dropdown #filterActions=\"kbqDropdown\" [class]=\"'kbq-filters__dropdown'\">\n @if (filterBar.isSavedAndChanged() && !filterBar.isReadOnly()) {\n <button\n kbq-dropdown-item\n [class]=\"{ 'kbq-button_changed-saved-filter': filterBar.isSavedAndChanged() }\"\n (click)=\"saveChanges()\"\n >\n <i kbq-icon=\"kbq-floppy-disk_16\"></i>\n {{ localeData.saveChanges }}\n @if (filterBar.isSavedAndChanged()) {\n <i kbq-icon=\"kbq-circle-xs_16\" class=\"kbq-icon-button kbq-warning layout-margin-left-xs\"></i>\n }\n </button>\n }\n <button kbq-dropdown-item (click)=\"savePopover.openSaveAsNewFilterPopover()\">\n <i kbq-icon=\"kbq-plus_16\"></i>\n {{ localeData.saveAsNew }}\n </button>\n\n @if (!filterBar.isReadOnly()) {\n <button kbq-dropdown-item (click)=\"savePopover.openChangeFilterNamePopover()\">\n <i kbq-icon=\"kbq-pencil_16\"></i>\n {{ localeData.change }}\n </button>\n }\n\n @if (filterBar.isSavedAndChanged() || !filterBar.isReadOnly()) {\n <kbq-divider />\n }\n\n @if (filterBar.isSavedAndChanged()) {\n <button kbq-dropdown-item (click)=\"resetFilterChanges()\">\n <i kbq-icon=\"kbq-circle-xmark_16\"></i>\n {{ localeData.resetChanges }}\n </button>\n }\n @if (!filterBar.isReadOnly()) {\n <button kbq-dropdown-item (click)=\"removeFilter()\">\n <i kbq-icon=\"kbq-trash_16\"></i>\n {{ localeData.remove }}\n </button>\n }\n</kbq-dropdown>\n\n<kbq-filter-save-popover\n #savePopover\n [popoverTrigger]=\"popoverRef\"\n [filterBar]=\"filterBar\"\n (save)=\"onSave.emit($event)\"\n (closed)=\"onSavePopoverClosed($event)\"\n/>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-filters{display:flex}.kbq-filters>.kbq-button{max-width:var(--kbq-filter-bar-pipe-max-width, 320px)}.kbq-filters>.kbq-button .kbq-button-wrapper{width:100%}.kbq-filters>.kbq-button .kbq-icon{margin-inline-end:var(--kbq-size-xxs)}.kbq-filters .kbq-filters__filter-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-filters .kbq-filters__filter-name .kbq-icon{margin-bottom:var(--kbq-size-3xs)}.kbq-filters .kbq-filter-bar__separator{align-self:center;height:var(--kbq-size-m)!important;margin-inline-start:calc(var(--kbq-size-s) + var(--kbq-size-xs))!important;margin-inline-end:var(--kbq-size-xs)!important}.kbq-filters .kbq-filter-bar__arrow{align-self:center;margin-inline-start:var(--kbq-size-s)}.kbq-filters .kbq-button.kbq-button_changed-filter{border-end-end-radius:unset;border-start-end-radius:unset}.kbq-filters .kbq-button-icon{margin-inline-start:-1px;border-end-start-radius:unset;border-start-start-radius:unset}.kbq-filters .kbq-button_changed-saved-filter:before{content:\"\";position:absolute;inset-inline-end:-4px;top:-4px;width:var(--kbq-size-s);height:var(--kbq-size-s);border-width:2px;border-style:solid;border-radius:var(--kbq-size-xs)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{content:\"\";position:absolute;inset-inline-start:0;top:10px;width:1px;height:var(--kbq-size-m)}.kbq-filters__save-as-new-filter-popover{--kbq-filter-bar-save-popover-width: 400px}.kbq-filters__save-as-new-filter-popover .kbq-popover__container{width:var(--kbq-filter-bar-save-popover-width)}.kbq-filters__save-as-new-filter-popover .kbq-popover__content{padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-filters__dropdown .kbq-dropdown-item{padding-inline-end:var(--kbq-size-s)}.kbq-filters .kbq-button_changed-saved-filter:before{border-color:var(--kbq-background-bg);background:var(--kbq-icon-warning)}.kbq-filters .kbq-button:not(:hover,.kbq-active)+.kbq-button_action:not(:hover,.kbq-active):after{background:var(--kbq-line-contrast-less)}\n"] }]
|
|
2064
|
+
}], propDecorators: { mainButton: [{ type: i0.ViewChild, args: ['mainButton', { isSignal: true }] }], saveNewFilterButton: [{ type: i0.ViewChild, args: ['saveNewFilterButton', { isSignal: true }] }], filterActionsButton: [{ type: i0.ViewChild, args: ['filterActionsButton', { isSignal: true }] }], popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqPopoverTrigger), { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqDropdownTrigger), { isSignal: true }] }], filterActionsDropdown: [{ type: i0.ViewChild, args: ['filterActionsButton', { isSignal: true }] }], savePopover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqFilterSavePopover), { isSignal: true }] }], search: [{ type: i0.ViewChild, args: ['search', { isSignal: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: true }] }], onSelectFilter: [{ type: i0.Output, args: ["onSelectFilter"] }], onSave: [{ type: i0.Output, args: ["onSave"] }], onChangeFilter: [{ type: i0.Output, args: ["onChangeFilter"] }], onRemoveFilter: [{ type: i0.Output, args: ["onRemoveFilter"] }], onResetFilterChanges: [{ type: i0.Output, args: ["onResetFilterChanges"] }] } });
|
|
1947
2065
|
|
|
1948
2066
|
class KbqFilterBar {
|
|
1949
|
-
/** Filter that is currently selected */
|
|
1950
|
-
get filter() {
|
|
1951
|
-
return this._filter;
|
|
1952
|
-
}
|
|
1953
|
-
set filter(value) {
|
|
1954
|
-
if (this._filter === value)
|
|
1955
|
-
return;
|
|
1956
|
-
this._filter = value;
|
|
1957
|
-
this.changes.next();
|
|
1958
|
-
}
|
|
1959
|
-
/** An array of templates that are used when adding a pipe. Also contains lists of options to select (values). */
|
|
1960
|
-
get pipeTemplates() {
|
|
1961
|
-
return this._templates;
|
|
1962
|
-
}
|
|
1963
|
-
set pipeTemplates(value) {
|
|
1964
|
-
this._templates = value;
|
|
1965
|
-
this.internalTemplatesChanges.next(this._templates);
|
|
1966
|
-
}
|
|
1967
|
-
/** Whether the current filter is saved and changed */
|
|
1968
|
-
get isSavedAndChanged() {
|
|
1969
|
-
return this.isSaved && this.isChanged;
|
|
1970
|
-
}
|
|
1971
|
-
/** Whether the current filter is saved */
|
|
1972
|
-
get isSaved() {
|
|
1973
|
-
return !!this.filter?.saved;
|
|
1974
|
-
}
|
|
1975
|
-
/** Whether the current filter is changed */
|
|
1976
|
-
get isChanged() {
|
|
1977
|
-
return !!this.filter?.changed;
|
|
1978
|
-
}
|
|
1979
|
-
/** Whether the current filter is readonly */
|
|
1980
|
-
get isReadOnly() {
|
|
1981
|
-
return !!this.filter?.readonly;
|
|
1982
|
-
}
|
|
1983
|
-
/** Whether the current filter is disabled */
|
|
1984
|
-
get isDisabled() {
|
|
1985
|
-
return !!this.filter?.disabled;
|
|
1986
|
-
}
|
|
1987
2067
|
constructor() {
|
|
1988
2068
|
/** @docs-private */
|
|
1989
2069
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1990
2070
|
/** @docs-private */
|
|
1991
2071
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
1992
2072
|
this.externalConfiguration = inject(KBQ_FILTER_BAR_CONFIGURATION, { optional: true });
|
|
2073
|
+
/** Localized strings and configuration for the filter-bar and its pipes. */
|
|
2074
|
+
this.configuration = KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
2075
|
+
/** @docs-private */
|
|
2076
|
+
this.filters = contentChild(KbqFilters, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
2077
|
+
/** @docs-private */
|
|
2078
|
+
this.filterReset = contentChild(KbqFilterReset, ...(ngDevMode ? [{ debugName: "filterReset" }] : []));
|
|
1993
2079
|
/**
|
|
1994
2080
|
* This is special logic that unselect all items when all selected because "all selected = nothing selected".
|
|
1995
2081
|
* Default is true
|
|
1996
2082
|
* */
|
|
1997
|
-
this.selectedAllEqualsSelectedNothing = true;
|
|
1998
|
-
this._templates = [];
|
|
2083
|
+
this.selectedAllEqualsSelectedNothing = input(true, ...(ngDevMode ? [{ debugName: "selectedAllEqualsSelectedNothing", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1999
2084
|
/**
|
|
2000
|
-
*
|
|
2001
|
-
*
|
|
2002
|
-
*
|
|
2085
|
+
* Filter that is currently selected. A two-way-bindable `model()`: derived state (`isSaved`/`isChanged`/…)
|
|
2086
|
+
* is exposed via `computed()` off it and change detection is driven by signal reactivity. `model()`
|
|
2087
|
+
* auto-provides the `filterChange` output for `[(filter)]` two-way binding.
|
|
2003
2088
|
*/
|
|
2004
|
-
this.
|
|
2089
|
+
this.filter = model(null, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
2090
|
+
/** An array of templates that are used when adding a pipe. Also contains lists of options to select (values). */
|
|
2091
|
+
this.pipeTemplates = input([], ...(ngDevMode ? [{ debugName: "pipeTemplates" }] : []));
|
|
2005
2092
|
/** Event that emits whenever the value of the pipe changes. */
|
|
2006
|
-
this.onChangePipe =
|
|
2093
|
+
this.onChangePipe = output();
|
|
2007
2094
|
/** Event that emits whenever the pipe deleted. */
|
|
2008
|
-
this.onRemovePipe =
|
|
2095
|
+
this.onRemovePipe = output();
|
|
2009
2096
|
/** Event that emits whenever the pipe cleared. */
|
|
2010
|
-
this.onClearPipe =
|
|
2097
|
+
this.onClearPipe = output();
|
|
2011
2098
|
/** Event that emits whenever the select or multiselect pipe closed. */
|
|
2012
|
-
this.onClosePipe =
|
|
2099
|
+
this.onClosePipe = output();
|
|
2100
|
+
/** Whether the current filter is saved */
|
|
2101
|
+
this.isSaved = computed(() => !!this.filter()?.saved, ...(ngDevMode ? [{ debugName: "isSaved" }] : []));
|
|
2102
|
+
/** Whether the current filter is changed */
|
|
2103
|
+
this.isChanged = computed(() => !!this.filter()?.changed, ...(ngDevMode ? [{ debugName: "isChanged" }] : []));
|
|
2104
|
+
/** Whether the current filter is saved and changed */
|
|
2105
|
+
this.isSavedAndChanged = computed(() => this.isSaved() && this.isChanged(), ...(ngDevMode ? [{ debugName: "isSavedAndChanged" }] : []));
|
|
2106
|
+
/** Whether the current filter is readonly */
|
|
2107
|
+
this.isReadOnly = computed(() => !!this.filter()?.readonly, ...(ngDevMode ? [{ debugName: "isReadOnly" }] : []));
|
|
2108
|
+
/** Whether the current filter is disabled */
|
|
2109
|
+
this.isDisabled = computed(() => !!this.filter()?.disabled, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
2013
2110
|
this.savedFilter = null;
|
|
2111
|
+
/**
|
|
2112
|
+
* All changes.
|
|
2113
|
+
* @deprecated noop. Reactivity is driven by the `filter` signal now; this never emits and will be
|
|
2114
|
+
* removed in the next major.
|
|
2115
|
+
*/
|
|
2116
|
+
this.changes = new BehaviorSubject(undefined);
|
|
2014
2117
|
/** Event that emits whenever the filter is reset. */
|
|
2015
2118
|
this.onResetFilter = new BehaviorSubject(false);
|
|
2016
|
-
/** all changes */
|
|
2017
|
-
this.changes = new BehaviorSubject(undefined);
|
|
2018
2119
|
/** internal filter changes */
|
|
2019
2120
|
this.internalFilterChanges = new BehaviorSubject(null);
|
|
2020
2121
|
/** internal changes in templates */
|
|
@@ -2026,52 +2127,76 @@ class KbqFilterBar {
|
|
|
2026
2127
|
this.configuration = this.externalConfiguration || this.localeService?.getParams('filterBar');
|
|
2027
2128
|
this.changeDetectorRef.markForCheck();
|
|
2028
2129
|
};
|
|
2130
|
+
// Push template changes into the internal stream — replaces the retired `pipeTemplates` accessor
|
|
2131
|
+
// setter side effect now that `pipeTemplates` is a signal `input()`.
|
|
2132
|
+
effect(() => this.internalTemplatesChanges.next(this.pipeTemplates()));
|
|
2029
2133
|
this.internalFilterChanges.pipe(takeUntilDestroyed()).subscribe((filter) => {
|
|
2030
|
-
|
|
2031
|
-
this.
|
|
2134
|
+
// `model.set(...)` auto-emits `filterChange` for the two-way binding.
|
|
2135
|
+
this.filter.set(filter);
|
|
2032
2136
|
});
|
|
2033
2137
|
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
|
|
2034
2138
|
if (!this.localeService) {
|
|
2035
2139
|
this.initDefaultParams();
|
|
2036
2140
|
}
|
|
2037
|
-
|
|
2141
|
+
// A pipe value change marks the current filter as "changed". Produce a new filter reference (not an
|
|
2142
|
+
// in-place mutation) so the `filter` model — and every `computed()`/`effect()` reading it — reacts.
|
|
2143
|
+
// `removePipe` owns its own `changed` flag in a single `set` (one `filterChange` emission), so only
|
|
2144
|
+
// `onChangePipe` feeds this subscriber. `model.set(...)` auto-emits `filterChange` for the binding.
|
|
2145
|
+
outputToObservable(this.onChangePipe)
|
|
2038
2146
|
.pipe(takeUntilDestroyed())
|
|
2039
2147
|
.subscribe(() => {
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
this.
|
|
2148
|
+
const current = this.filter();
|
|
2149
|
+
if (current) {
|
|
2150
|
+
this.filter.set({ ...current, changed: true });
|
|
2043
2151
|
}
|
|
2044
2152
|
});
|
|
2045
|
-
merge(this.filterChange, this.onChangePipe, this.onRemovePipe, this.internalFilterChanges)
|
|
2046
|
-
.pipe(takeUntilDestroyed())
|
|
2047
|
-
.subscribe(() => {
|
|
2048
|
-
this.changes.next();
|
|
2049
|
-
this.changeDetectorRef.markForCheck();
|
|
2050
|
-
});
|
|
2051
2153
|
}
|
|
2052
2154
|
/** Remove pipe from current filter and emit event */
|
|
2053
2155
|
removePipe(pipe) {
|
|
2054
|
-
this.filter
|
|
2055
|
-
|
|
2056
|
-
|
|
2156
|
+
const current = this.filter();
|
|
2157
|
+
if (!current?.pipes.includes(pipe))
|
|
2158
|
+
return;
|
|
2159
|
+
// Replace the filter (and its `pipes` array) with new references instead of mutating in place, so the
|
|
2160
|
+
// `filter` signal reacts; unknown pipes are left untouched. Fold in `changed: true` here — the removal
|
|
2161
|
+
// IS the change — so it happens in a single `set` (one `filterChange` emission) rather than relying on
|
|
2162
|
+
// `onRemovePipe` to trigger a second update.
|
|
2163
|
+
this.filter.set({ ...current, changed: true, pipes: current.pipes.filter((item) => item !== pipe) });
|
|
2164
|
+
this.onRemovePipe.emit(pipe);
|
|
2057
2165
|
}
|
|
2058
|
-
/**
|
|
2166
|
+
/**
|
|
2167
|
+
* Save current state of filter.
|
|
2168
|
+
*
|
|
2169
|
+
* Deep-clones the filter via `structuredClone`, so any pipe `value` payload handed to save/restore must be
|
|
2170
|
+
* structured-cloneable (plain data — no functions, DOM nodes, class instances or `TemplateRef`s), otherwise
|
|
2171
|
+
* `structuredClone` throws `DataCloneError`. All built-in pipes produce cloneable values.
|
|
2172
|
+
*/
|
|
2059
2173
|
saveFilterState(filter) {
|
|
2060
|
-
this.savedFilter = structuredClone(filter ?? this.filter);
|
|
2174
|
+
this.savedFilter = structuredClone(filter ?? this.filter());
|
|
2061
2175
|
}
|
|
2062
|
-
/**
|
|
2176
|
+
/**
|
|
2177
|
+
* Restore previously saved filter state.
|
|
2178
|
+
*
|
|
2179
|
+
* @see `saveFilterState` — pipe `value` payloads must be structured-cloneable.
|
|
2180
|
+
*/
|
|
2063
2181
|
restoreFilterState(filter) {
|
|
2064
|
-
|
|
2182
|
+
const state = filter ?? this.savedFilter;
|
|
2183
|
+
// Nothing to restore — bail out instead of wiping the current filter with `structuredClone(null)`.
|
|
2184
|
+
if (!state)
|
|
2185
|
+
return;
|
|
2186
|
+
this.filter.set(structuredClone(state));
|
|
2065
2187
|
}
|
|
2066
2188
|
/** Set the filter state "changed" to false */
|
|
2067
2189
|
resetFilterChangedState() {
|
|
2068
|
-
this.filter
|
|
2190
|
+
const current = this.filter();
|
|
2191
|
+
if (!current)
|
|
2192
|
+
return;
|
|
2193
|
+
this.filter.set({ ...current, changed: false });
|
|
2069
2194
|
}
|
|
2070
2195
|
initDefaultParams() {
|
|
2071
2196
|
this.configuration = KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
2072
2197
|
}
|
|
2073
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2074
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2198
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2199
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqFilterBar, isStandalone: true, selector: "kbq-filter-bar, [kbq-filter-bar]", inputs: { selectedAllEqualsSelectedNothing: { classPropertyName: "selectedAllEqualsSelectedNothing", publicName: "selectedAllEqualsSelectedNothing", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, pipeTemplates: { classPropertyName: "pipeTemplates", publicName: "pipeTemplates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange", onChangePipe: "onChangePipe", onRemovePipe: "onRemovePipe", onClearPipe: "onClearPipe", onClosePipe: "onClosePipe" }, host: { classAttribute: "kbq-filter-bar" }, providers: [{ provide: KBQ_FILTER_BAR_HOST, useExisting: forwardRef((() => KbqFilterBar)) }], queries: [{ propertyName: "filters", first: true, predicate: KbqFilters, descendants: true, isSignal: true }, { propertyName: "filterReset", first: true, predicate: KbqFilterReset, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2075
2200
|
<div class="kbq-filter-bar__left">
|
|
2076
2201
|
<ng-content select="kbq-filters" />
|
|
2077
2202
|
|
|
@@ -2083,13 +2208,13 @@ class KbqFilterBar {
|
|
|
2083
2208
|
</div>
|
|
2084
2209
|
|
|
2085
2210
|
<div class="kbq-filter-bar__right">
|
|
2086
|
-
<ng-content select="kbq-
|
|
2211
|
+
<ng-content select="kbq-search-expandable" />
|
|
2087
2212
|
|
|
2088
2213
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
2089
2214
|
</div>
|
|
2090
|
-
`, isInline: true, styles: [".kbq-filter-bar{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-filter-bar .kbq-filter-bar__left{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--kbq-size-s)}.kbq-filter-bar .kbq-filter-bar__left .kbq-button>.kbq-icon{margin-
|
|
2215
|
+
`, isInline: true, styles: [".kbq-filter-bar{--kbq-filter-bar-pipe-max-width: 320px;--kbq-filter-bar-refresher-min-width: 64px}\n", ".kbq-filter-bar{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-filter-bar .kbq-filter-bar__left{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--kbq-size-s)}.kbq-filter-bar .kbq-filter-bar__left .kbq-button>.kbq-icon{margin-inline-end:var(--kbq-size-xxs)}.kbq-filter-bar .kbq-filter-bar__left>.kbq-icon{align-self:center}.kbq-filter-bar .kbq-filter-bar__right{display:flex;flex-direction:row;margin-inline-start:var(--kbq-size-3xl)}.kbq-pipe__popover{--kbq-filter-bar-popover-width: 320px}.kbq-pipe__popover .kbq-popover__container{min-width:var(--kbq-filter-bar-popover-width);max-width:var(--kbq-filter-bar-popover-width)}.kbq-pipe__popover .kbq-popover__content{padding:var(--kbq-size-m) var(--kbq-size-m) 1px!important}.kbq-pipe__popover .kbq-popover__footer{padding:var(--kbq-size-xxs)}.kbq-pipe__popover .kbq-popover__footer .kbq-button:not(.kbq-disabled){display:flex;flex-direction:row;width:100%;justify-content:flex-start}.kbq-pipe__popover .kbq-popover__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-button,.kbq-button-icon{-webkit-font-smoothing:antialiased}.kbq-button.kbq-button_changed-filter,.kbq-button-icon.kbq-button_changed-filter{color:var(--kbq-foreground-theme);background:var(--kbq-states-background-theme-less-active)}.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty,.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_right,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_right{color:var(--kbq-icon-theme)}.kbq-button.kbq-button_changed-filter:hover:not(.kbq-disabled),.kbq-button.kbq-button_changed-filter.kbq-hover:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter:hover:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter.kbq-hover:not(.kbq-disabled){background:var(--kbq-states-background-theme-less-hover)}.kbq-button.kbq-button_changed-filter:active:not(.kbq-disabled),.kbq-button.kbq-button_changed-filter.kbq-active:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter:active:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter.kbq-active:not(.kbq-disabled){background:var(--kbq-states-background-theme-fade-active)}.kbq-button.kbq-button_changed-filter.cdk-keyboard-focused,.kbq-button-icon.kbq-button_changed-filter.cdk-keyboard-focused{outline:1px solid var(--kbq-states-line-focus-theme);border-color:var(--kbq-states-line-focus-theme)}.kbq-button.kbq-button_changed-filter.kbq-disabled,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-states-background-disabled)}.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty,.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_right,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_right{color:var(--kbq-states-icon-disabled)}.kbq-hint.kbq-date-period__hint .kbq-hint__text{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: KbqDividerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2091
2216
|
}
|
|
2092
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBar, decorators: [{
|
|
2093
2218
|
type: Component,
|
|
2094
2219
|
args: [{ selector: 'kbq-filter-bar, [kbq-filter-bar]', imports: [KbqDividerModule], template: `
|
|
2095
2220
|
<div class="kbq-filter-bar__left">
|
|
@@ -2103,255 +2228,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2103
2228
|
</div>
|
|
2104
2229
|
|
|
2105
2230
|
<div class="kbq-filter-bar__right">
|
|
2106
|
-
<ng-content select="kbq-
|
|
2231
|
+
<ng-content select="kbq-search-expandable" />
|
|
2107
2232
|
|
|
2108
2233
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
2109
2234
|
</div>
|
|
2110
|
-
`,
|
|
2235
|
+
`, providers: [{ provide: KBQ_FILTER_BAR_HOST, useExisting: forwardRef((() => KbqFilterBar)) }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2111
2236
|
class: 'kbq-filter-bar'
|
|
2112
|
-
}, styles: [".kbq-filter-bar{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-filter-bar .kbq-filter-bar__left{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--kbq-size-s)}.kbq-filter-bar .kbq-filter-bar__left .kbq-button>.kbq-icon{margin-
|
|
2113
|
-
}], ctorParameters: () => [], propDecorators: { filters: [{
|
|
2114
|
-
type: ContentChild,
|
|
2115
|
-
args: [KbqFilters]
|
|
2116
|
-
}], filterReset: [{
|
|
2117
|
-
type: ContentChild,
|
|
2118
|
-
args: [KbqFilterReset]
|
|
2119
|
-
}], selectedAllEqualsSelectedNothing: [{
|
|
2120
|
-
type: Input,
|
|
2121
|
-
args: [{ transform: booleanAttribute }]
|
|
2122
|
-
}], filter: [{
|
|
2123
|
-
type: Input
|
|
2124
|
-
}], pipeTemplates: [{
|
|
2125
|
-
type: Input
|
|
2126
|
-
}], filterChange: [{
|
|
2127
|
-
type: Output
|
|
2128
|
-
}], onChangePipe: [{
|
|
2129
|
-
type: Output
|
|
2130
|
-
}], onRemovePipe: [{
|
|
2131
|
-
type: Output
|
|
2132
|
-
}], onClearPipe: [{
|
|
2133
|
-
type: Output
|
|
2134
|
-
}], onClosePipe: [{
|
|
2135
|
-
type: Output
|
|
2136
|
-
}] } });
|
|
2137
|
-
|
|
2138
|
-
class KbqFilterBarRefresher {
|
|
2139
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqFilterBarRefresher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2140
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: KbqFilterBarRefresher, isStandalone: true, selector: "kbq-filter-refresher, [kbq-filter-refresher]", host: { classAttribute: "kbq-filter-refresher" }, ngImport: i0, template: `
|
|
2141
|
-
<button kbq-button [color]="'contrast'" [kbqStyle]="'transparent'">
|
|
2142
|
-
<i kbq-icon="kbq-arrow-rotate-right_16"></i>
|
|
2143
|
-
</button>
|
|
2144
|
-
<button kbq-button [color]="'contrast'" [kbqStyle]="'transparent'">
|
|
2145
|
-
<i kbq-icon="kbq-chevron-down_16"></i>
|
|
2146
|
-
</button>
|
|
2147
|
-
`, isInline: true, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:64px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2148
|
-
}
|
|
2149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqFilterBarRefresher, decorators: [{
|
|
2150
|
-
type: Component,
|
|
2151
|
-
args: [{ selector: 'kbq-filter-refresher, [kbq-filter-refresher]', imports: [
|
|
2152
|
-
KbqButtonModule,
|
|
2153
|
-
KbqIconModule
|
|
2154
|
-
], template: `
|
|
2155
|
-
<button kbq-button [color]="'contrast'" [kbqStyle]="'transparent'">
|
|
2156
|
-
<i kbq-icon="kbq-arrow-rotate-right_16"></i>
|
|
2157
|
-
</button>
|
|
2158
|
-
<button kbq-button [color]="'contrast'" [kbqStyle]="'transparent'">
|
|
2159
|
-
<i kbq-icon="kbq-chevron-down_16"></i>
|
|
2160
|
-
</button>
|
|
2161
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2162
|
-
class: 'kbq-filter-refresher'
|
|
2163
|
-
}, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:64px}\n"] }]
|
|
2164
|
-
}] });
|
|
2237
|
+
}, styles: [".kbq-filter-bar{--kbq-filter-bar-pipe-max-width: 320px;--kbq-filter-bar-refresher-min-width: 64px}\n", ".kbq-filter-bar{display:flex;flex-direction:row;justify-content:space-between;width:100%}.kbq-filter-bar .kbq-filter-bar__left{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--kbq-size-s)}.kbq-filter-bar .kbq-filter-bar__left .kbq-button>.kbq-icon{margin-inline-end:var(--kbq-size-xxs)}.kbq-filter-bar .kbq-filter-bar__left>.kbq-icon{align-self:center}.kbq-filter-bar .kbq-filter-bar__right{display:flex;flex-direction:row;margin-inline-start:var(--kbq-size-3xl)}.kbq-pipe__popover{--kbq-filter-bar-popover-width: 320px}.kbq-pipe__popover .kbq-popover__container{min-width:var(--kbq-filter-bar-popover-width);max-width:var(--kbq-filter-bar-popover-width)}.kbq-pipe__popover .kbq-popover__content{padding:var(--kbq-size-m) var(--kbq-size-m) 1px!important}.kbq-pipe__popover .kbq-popover__footer{padding:var(--kbq-size-xxs)}.kbq-pipe__popover .kbq-popover__footer .kbq-button:not(.kbq-disabled){display:flex;flex-direction:row;width:100%;justify-content:flex-start}.kbq-pipe__popover .kbq-popover__footer .kbq-button:not(.kbq-disabled) .kbq-button_hot-key{color:var(--kbq-foreground-contrast-secondary)}.kbq-button,.kbq-button-icon{-webkit-font-smoothing:antialiased}.kbq-button.kbq-button_changed-filter,.kbq-button-icon.kbq-button_changed-filter{color:var(--kbq-foreground-theme);background:var(--kbq-states-background-theme-less-active)}.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty,.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_right,.kbq-button-icon.kbq-button_changed-filter .kbq-icon.kbq-empty.kbq-icon_right{color:var(--kbq-icon-theme)}.kbq-button.kbq-button_changed-filter:hover:not(.kbq-disabled),.kbq-button.kbq-button_changed-filter.kbq-hover:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter:hover:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter.kbq-hover:not(.kbq-disabled){background:var(--kbq-states-background-theme-less-hover)}.kbq-button.kbq-button_changed-filter:active:not(.kbq-disabled),.kbq-button.kbq-button_changed-filter.kbq-active:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter:active:not(.kbq-disabled),.kbq-button-icon.kbq-button_changed-filter.kbq-active:not(.kbq-disabled){background:var(--kbq-states-background-theme-fade-active)}.kbq-button.kbq-button_changed-filter.cdk-keyboard-focused,.kbq-button-icon.kbq-button_changed-filter.cdk-keyboard-focused{outline:1px solid var(--kbq-states-line-focus-theme);border-color:var(--kbq-states-line-focus-theme)}.kbq-button.kbq-button_changed-filter.kbq-disabled,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-states-background-disabled)}.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty,.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_left,.kbq-button.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_right,.kbq-button-icon.kbq-button_changed-filter.kbq-disabled .kbq-icon.kbq-empty.kbq-icon_right{color:var(--kbq-states-icon-disabled)}.kbq-hint.kbq-date-period__hint .kbq-hint__text{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
|
|
2238
|
+
}], ctorParameters: () => [], propDecorators: { filters: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqFilters), { isSignal: true }] }], filterReset: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqFilterReset), { isSignal: true }] }], selectedAllEqualsSelectedNothing: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedAllEqualsSelectedNothing", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }, { type: i0.Output, args: ["filterChange"] }], pipeTemplates: [{ type: i0.Input, args: [{ isSignal: true, alias: "pipeTemplates", required: false }] }], onChangePipe: [{ type: i0.Output, args: ["onChangePipe"] }], onRemovePipe: [{ type: i0.Output, args: ["onRemovePipe"] }], onClearPipe: [{ type: i0.Output, args: ["onClearPipe"] }], onClosePipe: [{ type: i0.Output, args: ["onClosePipe"] }] } });
|
|
2165
2239
|
|
|
2166
|
-
|
|
2167
|
-
/** @deprecated Will be removed in next major release. Use `kbq-search-expandable` instead. */
|
|
2168
|
-
class KbqFilterBarSearch {
|
|
2240
|
+
class KbqFilterRefresher {
|
|
2169
2241
|
constructor() {
|
|
2170
|
-
/** KbqFilterBar
|
|
2171
|
-
this.filterBar = inject(
|
|
2172
|
-
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
2173
|
-
this.destroyRef = inject(DestroyRef);
|
|
2174
|
-
/** control for search */
|
|
2175
|
-
this.searchControl = new UntypedFormControl();
|
|
2176
|
-
/** Whether the search active */
|
|
2177
|
-
this.isSearchActive = false;
|
|
2178
|
-
/**
|
|
2179
|
-
/** Timeout in milliseconds for emit event. The default value is taken from defaultOnSearchTimeout
|
|
2180
|
-
* @default 0
|
|
2181
|
-
*/
|
|
2182
|
-
this.onSearchTimeout = input(defaultOnSearchTimeout, { transform: numberAttribute });
|
|
2183
|
-
/** Emit event by enter or not. Default is false */
|
|
2184
|
-
this.emitValueByEnter = input(false, { transform: booleanAttribute });
|
|
2185
|
-
/** Value of the field after initialization */
|
|
2186
|
-
this.initialValue = input();
|
|
2187
|
-
/** Custom tooltip text. When set, overrides localeData.tooltip */
|
|
2188
|
-
this.customTooltip = input('', { alias: 'tooltip' });
|
|
2189
|
-
/** Custom placeholder text. When set, overrides localeData.placeholder */
|
|
2190
|
-
this.customPlaceholder = input('', { alias: 'placeholder' });
|
|
2191
|
-
/** event that is generated whenever a user performs a search. */
|
|
2192
|
-
this.onSearch = new EventEmitter();
|
|
2193
|
-
/** @docs-private */
|
|
2194
|
-
this.onReset = () => {
|
|
2195
|
-
this.changeDetectorRef.markForCheck();
|
|
2196
|
-
};
|
|
2242
|
+
/** KbqFilterBar host seam */
|
|
2243
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
2197
2244
|
}
|
|
2198
2245
|
/** localized data
|
|
2199
2246
|
* @docs-private */
|
|
2200
2247
|
get localeData() {
|
|
2201
|
-
return this.filterBar
|
|
2202
|
-
}
|
|
2203
|
-
/** @docs-private */
|
|
2204
|
-
get resolvedTooltip() {
|
|
2205
|
-
return this.customTooltip() || this.localeData.tooltip;
|
|
2206
|
-
}
|
|
2207
|
-
/** @docs-private */
|
|
2208
|
-
get resolvedPlaceholder() {
|
|
2209
|
-
return this.customPlaceholder() || this.localeData.placeholder;
|
|
2210
|
-
}
|
|
2211
|
-
ngAfterViewInit() {
|
|
2212
|
-
this.filterBar.filterReset?.onResetFilter.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.onReset);
|
|
2213
|
-
if (this.initialValue()) {
|
|
2214
|
-
this.searchControl.setValue(this.initialValue(), { emitEvent: false });
|
|
2215
|
-
}
|
|
2216
|
-
this.searchControl.valueChanges
|
|
2217
|
-
.pipe(distinctUntilChanged$1(), filter(() => !this.emitValueByEnter()), debounceTime$1(this.onSearchTimeout()), takeUntilDestroyed(this.destroyRef))
|
|
2218
|
-
.subscribe(this.onSearch);
|
|
2219
|
-
}
|
|
2220
|
-
openSearch() {
|
|
2221
|
-
this.isSearchActive = true;
|
|
2222
|
-
setTimeout(() => this.input.focus());
|
|
2223
|
-
}
|
|
2224
|
-
/** @docs-private */
|
|
2225
|
-
onBlur() {
|
|
2226
|
-
if (this.searchControl.value)
|
|
2227
|
-
return;
|
|
2228
|
-
this.onEscape();
|
|
2229
|
-
}
|
|
2230
|
-
/** @docs-private */
|
|
2231
|
-
onEscape() {
|
|
2232
|
-
this.isSearchActive = false;
|
|
2233
|
-
this.button.focusViaKeyboard();
|
|
2234
|
-
this.tooltip.hide();
|
|
2235
|
-
}
|
|
2236
|
-
/** @docs-private */
|
|
2237
|
-
onEnter() {
|
|
2238
|
-
if (this.emitValueByEnter()) {
|
|
2239
|
-
this.onSearch.emit(this.searchControl.value);
|
|
2240
|
-
}
|
|
2241
|
-
}
|
|
2242
|
-
/** @docs-private */
|
|
2243
|
-
onClear() {
|
|
2244
|
-
this.isSearchActive = false;
|
|
2245
|
-
setTimeout(() => {
|
|
2246
|
-
this.button.focus();
|
|
2247
|
-
this.tooltip.hide();
|
|
2248
|
-
});
|
|
2248
|
+
return this.filterBar?.configuration ?? KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
2249
2249
|
}
|
|
2250
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2251
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2250
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterRefresher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2251
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: KbqFilterRefresher, isStandalone: true, selector: "kbq-filter-refresher, [kbq-filter-refresher]", host: { classAttribute: "kbq-filter-refresher" }, ngImport: i0, template: `
|
|
2252
2252
|
<button
|
|
2253
2253
|
kbq-button
|
|
2254
|
-
[kbqTooltip]="resolvedTooltip"
|
|
2255
|
-
[class.kbq-filter_hidden]="isSearchActive"
|
|
2256
2254
|
[color]="'contrast'"
|
|
2257
2255
|
[kbqStyle]="'transparent'"
|
|
2258
|
-
|
|
2256
|
+
[attr.aria-label]="localeData.refresher.refresh"
|
|
2259
2257
|
>
|
|
2260
|
-
<i kbq-icon="kbq-
|
|
2258
|
+
<i kbq-icon="kbq-arrow-rotate-right_16" aria-hidden="true"></i>
|
|
2261
2259
|
</button>
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
(blur)="onBlur()"
|
|
2272
|
-
(keydown.escape)="onEscape()"
|
|
2273
|
-
(keydown.enter)="onEnter()"
|
|
2274
|
-
/>
|
|
2275
|
-
|
|
2276
|
-
<kbq-cleaner (click)="onClear()" />
|
|
2277
|
-
</kbq-form-field>
|
|
2278
|
-
`, isInline: true, styles: [".kbq-filter-search{display:flex;align-items:start}.kbq-filter-search .kbq-form-field{width:260px}.kbq-filter-search .kbq-filter_hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: KbqDividerModule }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i2$1.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "component", type: i2.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i2.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i2.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i2.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "directive", type: i2.KbqTrim, selector: "[kbqInput], [kbqTextarea]", exportAs: ["KbqTrim"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i4.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2260
|
+
<button
|
|
2261
|
+
kbq-button
|
|
2262
|
+
[color]="'contrast'"
|
|
2263
|
+
[kbqStyle]="'transparent'"
|
|
2264
|
+
[attr.aria-label]="localeData.refresher.settings"
|
|
2265
|
+
>
|
|
2266
|
+
<i kbq-icon="kbq-chevron-down_16" aria-hidden="true"></i>
|
|
2267
|
+
</button>
|
|
2268
|
+
`, isInline: true, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:var(--kbq-filter-bar-refresher-min-width, 64px)}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2279
2269
|
}
|
|
2280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterRefresher, decorators: [{
|
|
2281
2271
|
type: Component,
|
|
2282
|
-
args: [{ selector: 'kbq-filter-
|
|
2283
|
-
KbqDividerModule,
|
|
2272
|
+
args: [{ selector: 'kbq-filter-refresher, [kbq-filter-refresher]', imports: [
|
|
2284
2273
|
KbqButtonModule,
|
|
2285
|
-
|
|
2286
|
-
KbqIconModule,
|
|
2287
|
-
KbqFormFieldModule,
|
|
2288
|
-
KbqInputModule,
|
|
2289
|
-
ReactiveFormsModule
|
|
2274
|
+
KbqIconModule
|
|
2290
2275
|
], template: `
|
|
2291
2276
|
<button
|
|
2292
2277
|
kbq-button
|
|
2293
|
-
[kbqTooltip]="resolvedTooltip"
|
|
2294
|
-
[class.kbq-filter_hidden]="isSearchActive"
|
|
2295
2278
|
[color]="'contrast'"
|
|
2296
2279
|
[kbqStyle]="'transparent'"
|
|
2297
|
-
|
|
2280
|
+
[attr.aria-label]="localeData.refresher.refresh"
|
|
2298
2281
|
>
|
|
2299
|
-
<i kbq-icon="kbq-
|
|
2282
|
+
<i kbq-icon="kbq-arrow-rotate-right_16" aria-hidden="true"></i>
|
|
2300
2283
|
</button>
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
/>
|
|
2314
|
-
|
|
2315
|
-
<kbq-cleaner (click)="onClear()" />
|
|
2316
|
-
</kbq-form-field>
|
|
2317
|
-
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2318
|
-
class: 'kbq-filter-search'
|
|
2319
|
-
}, styles: [".kbq-filter-search{display:flex;align-items:start}.kbq-filter-search .kbq-form-field{width:260px}.kbq-filter-search .kbq-filter_hidden{display:none}\n"] }]
|
|
2320
|
-
}], propDecorators: { input: [{
|
|
2321
|
-
type: ViewChild,
|
|
2322
|
-
args: [KbqInput]
|
|
2323
|
-
}], button: [{
|
|
2324
|
-
type: ViewChild,
|
|
2325
|
-
args: [KbqButton]
|
|
2326
|
-
}], tooltip: [{
|
|
2327
|
-
type: ViewChild,
|
|
2328
|
-
args: [KbqTooltipTrigger]
|
|
2329
|
-
}], onSearch: [{
|
|
2330
|
-
type: Output
|
|
2331
|
-
}] } });
|
|
2284
|
+
<button
|
|
2285
|
+
kbq-button
|
|
2286
|
+
[color]="'contrast'"
|
|
2287
|
+
[kbqStyle]="'transparent'"
|
|
2288
|
+
[attr.aria-label]="localeData.refresher.settings"
|
|
2289
|
+
>
|
|
2290
|
+
<i kbq-icon="kbq-chevron-down_16" aria-hidden="true"></i>
|
|
2291
|
+
</button>
|
|
2292
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2293
|
+
class: 'kbq-filter-refresher'
|
|
2294
|
+
}, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:var(--kbq-filter-bar-refresher-min-width, 64px)}\n"] }]
|
|
2295
|
+
}] });
|
|
2332
2296
|
|
|
2333
2297
|
class KbqPipeAdd {
|
|
2334
2298
|
constructor() {
|
|
2335
2299
|
/** KbqFilterBar instance */
|
|
2336
|
-
this.filterBar = inject(
|
|
2300
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
2301
|
+
/** @docs-private */
|
|
2302
|
+
this.select = viewChild.required(KbqSelect);
|
|
2337
2303
|
/** Event that is generated after add pipe. */
|
|
2338
|
-
this.onAddPipe =
|
|
2304
|
+
this.onAddPipe = output();
|
|
2339
2305
|
/** template of filter */
|
|
2340
|
-
this.filterTemplate = {
|
|
2306
|
+
this.filterTemplate = input({
|
|
2341
2307
|
name: '',
|
|
2342
2308
|
pipes: [],
|
|
2343
2309
|
readonly: false,
|
|
2344
2310
|
disabled: false,
|
|
2345
2311
|
changed: false,
|
|
2346
2312
|
saved: false
|
|
2347
|
-
};
|
|
2348
|
-
/**
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2313
|
+
}, ...(ngDevMode ? [{ debugName: "filterTemplate" }] : []));
|
|
2314
|
+
/**
|
|
2315
|
+
* Ids of the pipes already added to the current filter. Used to open an already-added pipe.
|
|
2316
|
+
* Derived from the `filter` signal so it stays in sync without the retired `changes` bus.
|
|
2317
|
+
*/
|
|
2318
|
+
this.addedPipes = computed(() => this.filterBar.filter()?.pipes.map((pipe) => getId(pipe)) ?? [], ...(ngDevMode ? [{ debugName: "addedPipes" }] : []));
|
|
2319
|
+
/**
|
|
2320
|
+
* Visually-hidden live-region text announcing a newly-added pipe to assistive tech (WCAG 4.1.3).
|
|
2321
|
+
* @docs-private
|
|
2322
|
+
*/
|
|
2323
|
+
this.announcement = signal('', ...(ngDevMode ? [{ debugName: "announcement" }] : []));
|
|
2355
2324
|
}
|
|
2356
2325
|
addPipeFromTemplate(option) {
|
|
2357
2326
|
if (option.selected) {
|
|
@@ -2359,15 +2328,27 @@ class KbqPipeAdd {
|
|
|
2359
2328
|
}
|
|
2360
2329
|
else {
|
|
2361
2330
|
option.select();
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
this.filterBar.filter.
|
|
2367
|
-
|
|
2368
|
-
|
|
2331
|
+
const current = this.filterBar.filter() ?? structuredClone(this.filterTemplate());
|
|
2332
|
+
// Build a new filter reference (immutable add) so the `filter` model reacts; keep `pipes` on a
|
|
2333
|
+
// new-reference-on-change model instead of an in-place push. `model.set(...)` auto-emits
|
|
2334
|
+
// `filterChange` for the two-way binding.
|
|
2335
|
+
this.filterBar.filter.set({
|
|
2336
|
+
...current,
|
|
2337
|
+
changed: true,
|
|
2338
|
+
pipes: [
|
|
2339
|
+
...current.pipes,
|
|
2340
|
+
Object.assign({}, option.value, { values: undefined, valueTemplate: undefined, openOnAdd: true })
|
|
2341
|
+
]
|
|
2342
|
+
});
|
|
2343
|
+
this.onAddPipe.emit(option.value);
|
|
2344
|
+
const message = this.filterBar.configuration.add.addedAnnouncement.replace('{{ name }}', option.value.name);
|
|
2345
|
+
// Empty then re-fill on the next tick so an identical consecutive message still changes the
|
|
2346
|
+
// live-region text node and is re-announced (a same-string `set` would be an `Object.is` no-op
|
|
2347
|
+
// that assistive tech never picks up).
|
|
2348
|
+
this.announcement.set('');
|
|
2349
|
+
setTimeout(() => this.announcement.set(message));
|
|
2369
2350
|
}
|
|
2370
|
-
this.select.close();
|
|
2351
|
+
this.select().close();
|
|
2371
2352
|
}
|
|
2372
2353
|
/**
|
|
2373
2354
|
* Function to compare the option values with the selected values. The first argument
|
|
@@ -2377,35 +2358,41 @@ class KbqPipeAdd {
|
|
|
2377
2358
|
compareWith(o1, o2) {
|
|
2378
2359
|
return getId(o1) === o2;
|
|
2379
2360
|
}
|
|
2380
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2381
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2382
|
-
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes" [compareWith]="compareWith">
|
|
2361
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeAdd, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2362
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeAdd, isStandalone: true, selector: "kbq-pipe-add", inputs: { filterTemplate: { classPropertyName: "filterTemplate", publicName: "filterTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAddPipe: "onAddPipe" }, host: { classAttribute: "kbq-pipe-add" }, viewQueries: [{ propertyName: "select", first: true, predicate: KbqSelect, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2363
|
+
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes()" [compareWith]="compareWith">
|
|
2383
2364
|
<button
|
|
2384
2365
|
kbqTooltip="{{ filterBar.configuration.add.tooltip }}"
|
|
2385
2366
|
kbq-button
|
|
2386
2367
|
kbq-select-matcher
|
|
2368
|
+
[attr.aria-label]="filterBar.configuration.add.tooltip"
|
|
2387
2369
|
[color]="'contrast-fade'"
|
|
2388
2370
|
[kbqStyle]="'outline'"
|
|
2389
|
-
[
|
|
2371
|
+
[class]="{ 'kbq-active': select.panelOpen }"
|
|
2390
2372
|
>
|
|
2391
|
-
<i kbq-icon="kbq-plus_16"></i>
|
|
2373
|
+
<i kbq-icon="kbq-plus_16" aria-hidden="true"></i>
|
|
2392
2374
|
</button>
|
|
2393
2375
|
|
|
2394
|
-
@for (template of filterBar.pipeTemplates; track template) {
|
|
2376
|
+
@for (template of filterBar.pipeTemplates(); track template) {
|
|
2395
2377
|
<kbq-option
|
|
2396
2378
|
#option
|
|
2397
2379
|
[userSelect]="true"
|
|
2398
2380
|
[value]="template"
|
|
2399
2381
|
[showCheckbox]="false"
|
|
2400
2382
|
(click)="addPipeFromTemplate(option)"
|
|
2383
|
+
(keydown.enter)="addPipeFromTemplate(option)"
|
|
2384
|
+
(keydown.space)="addPipeFromTemplate(option)"
|
|
2401
2385
|
>
|
|
2402
2386
|
{{ template.name }}
|
|
2403
2387
|
</kbq-option>
|
|
2404
2388
|
}
|
|
2405
2389
|
</kbq-select>
|
|
2406
|
-
|
|
2390
|
+
|
|
2391
|
+
<!-- Announces a newly-added pipe to assistive tech (WCAG 4.1.3). -->
|
|
2392
|
+
<div class="cdk-visually-hidden" aria-live="polite" aria-atomic="true">{{ announcement() }}</div>
|
|
2393
|
+
`, isInline: true, styles: [".kbq-pipe-add .kbq-select .kbq-select__trigger{height:unset}\n"], dependencies: [{ kind: "ngmodule", type: KbqDropdownModule }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i1$2.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset", "kbqTooltipModifier", "kbqTooltipHeader"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqOptionModule }, { kind: "component", type: i9$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllToggle", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "onSelectAll", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "directive", type: i9$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2407
2394
|
}
|
|
2408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeAdd, decorators: [{
|
|
2409
2396
|
type: Component,
|
|
2410
2397
|
args: [{ selector: 'kbq-pipe-add', imports: [
|
|
2411
2398
|
KbqDropdownModule,
|
|
@@ -2413,57 +2400,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2413
2400
|
KbqButtonModule,
|
|
2414
2401
|
KbqIcon,
|
|
2415
2402
|
KbqOptionModule,
|
|
2416
|
-
KbqSelectModule
|
|
2417
|
-
NgClass
|
|
2403
|
+
KbqSelectModule
|
|
2418
2404
|
], template: `
|
|
2419
|
-
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes" [compareWith]="compareWith">
|
|
2405
|
+
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes()" [compareWith]="compareWith">
|
|
2420
2406
|
<button
|
|
2421
2407
|
kbqTooltip="{{ filterBar.configuration.add.tooltip }}"
|
|
2422
2408
|
kbq-button
|
|
2423
2409
|
kbq-select-matcher
|
|
2410
|
+
[attr.aria-label]="filterBar.configuration.add.tooltip"
|
|
2424
2411
|
[color]="'contrast-fade'"
|
|
2425
2412
|
[kbqStyle]="'outline'"
|
|
2426
|
-
[
|
|
2413
|
+
[class]="{ 'kbq-active': select.panelOpen }"
|
|
2427
2414
|
>
|
|
2428
|
-
<i kbq-icon="kbq-plus_16"></i>
|
|
2415
|
+
<i kbq-icon="kbq-plus_16" aria-hidden="true"></i>
|
|
2429
2416
|
</button>
|
|
2430
2417
|
|
|
2431
|
-
@for (template of filterBar.pipeTemplates; track template) {
|
|
2418
|
+
@for (template of filterBar.pipeTemplates(); track template) {
|
|
2432
2419
|
<kbq-option
|
|
2433
2420
|
#option
|
|
2434
2421
|
[userSelect]="true"
|
|
2435
2422
|
[value]="template"
|
|
2436
2423
|
[showCheckbox]="false"
|
|
2437
2424
|
(click)="addPipeFromTemplate(option)"
|
|
2425
|
+
(keydown.enter)="addPipeFromTemplate(option)"
|
|
2426
|
+
(keydown.space)="addPipeFromTemplate(option)"
|
|
2438
2427
|
>
|
|
2439
2428
|
{{ template.name }}
|
|
2440
2429
|
</kbq-option>
|
|
2441
2430
|
}
|
|
2442
2431
|
</kbq-select>
|
|
2443
|
-
|
|
2432
|
+
|
|
2433
|
+
<!-- Announces a newly-added pipe to assistive tech (WCAG 4.1.3). -->
|
|
2434
|
+
<div class="cdk-visually-hidden" aria-live="polite" aria-atomic="true">{{ announcement() }}</div>
|
|
2435
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2444
2436
|
class: 'kbq-pipe-add'
|
|
2445
2437
|
}, styles: [".kbq-pipe-add .kbq-select .kbq-select__trigger{height:unset}\n"] }]
|
|
2446
|
-
}],
|
|
2447
|
-
type: ViewChild,
|
|
2448
|
-
args: [KbqSelect]
|
|
2449
|
-
}], onAddPipe: [{
|
|
2450
|
-
type: Output
|
|
2451
|
-
}], filterTemplate: [{
|
|
2452
|
-
type: Input
|
|
2453
|
-
}] } });
|
|
2438
|
+
}], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqSelect), { isSignal: true }] }], onAddPipe: [{ type: i0.Output, args: ["onAddPipe"] }], filterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterTemplate", required: false }] }] } });
|
|
2454
2439
|
|
|
2455
2440
|
class KbqPipeDirective {
|
|
2456
2441
|
constructor() {
|
|
2457
2442
|
this.injector = inject(Injector);
|
|
2458
2443
|
this.pipes = inject(KBQ_FILTER_BAR_PIPES);
|
|
2459
2444
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
2445
|
+
this.pipe = input(undefined, ...(ngDevMode ? [{ debugName: "pipe", alias: 'kbqPipe' }] : [{ alias: 'kbqPipe' }]));
|
|
2460
2446
|
}
|
|
2461
2447
|
ngAfterContentInit() {
|
|
2462
|
-
const component = this.pipes.get(this.pipe.type);
|
|
2448
|
+
const component = this.pipes.get(this.pipe().type);
|
|
2463
2449
|
if (!component) {
|
|
2464
|
-
throw new Error(`Can't find component for this type: ${this.pipe.type}`);
|
|
2450
|
+
throw new Error(`Can't find component for this type: ${this.pipe().type}`);
|
|
2465
2451
|
}
|
|
2466
|
-
this.viewContainerRef.createComponent(component, { injector: this.getInjector(this.pipe) });
|
|
2452
|
+
this.viewContainerRef.createComponent(component, { injector: this.getInjector(this.pipe()) });
|
|
2467
2453
|
}
|
|
2468
2454
|
getInjector(pipe) {
|
|
2469
2455
|
return Injector.create({
|
|
@@ -2471,69 +2457,59 @@ class KbqPipeDirective {
|
|
|
2471
2457
|
parent: this.injector
|
|
2472
2458
|
});
|
|
2473
2459
|
}
|
|
2474
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2475
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2460
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2461
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.25", type: KbqPipeDirective, isStandalone: true, selector: "[kbqPipe]", inputs: { pipe: { classPropertyName: "pipe", publicName: "kbqPipe", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2476
2462
|
}
|
|
2477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDirective, decorators: [{
|
|
2478
2464
|
type: Directive,
|
|
2479
2465
|
args: [{
|
|
2480
2466
|
selector: '[kbqPipe]'
|
|
2481
2467
|
}]
|
|
2482
|
-
}], propDecorators: { pipe: [{
|
|
2483
|
-
type: Input,
|
|
2484
|
-
args: [{ alias: 'kbqPipe' }]
|
|
2485
|
-
}] } });
|
|
2468
|
+
}], propDecorators: { pipe: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqPipe", required: false }] }] } });
|
|
2486
2469
|
|
|
2487
2470
|
const COMPONENTS = [
|
|
2488
2471
|
KbqFilterBar,
|
|
2489
2472
|
KbqFilters,
|
|
2490
|
-
|
|
2473
|
+
KbqFilterRefresher,
|
|
2491
2474
|
KbqFilterBarButton,
|
|
2492
2475
|
KbqFilterReset,
|
|
2493
2476
|
KbqPipeAdd,
|
|
2494
2477
|
KbqPipeDirective,
|
|
2495
2478
|
KbqPipeButton,
|
|
2496
|
-
KbqFilterBarSearch,
|
|
2497
|
-
KbqPipeTitleDirective,
|
|
2498
2479
|
KbqPipeState
|
|
2499
2480
|
];
|
|
2500
2481
|
class KbqFilterBarModule {
|
|
2501
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2502
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2482
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2483
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, imports: [KbqFilterBar,
|
|
2503
2484
|
KbqFilters,
|
|
2504
|
-
|
|
2485
|
+
KbqFilterRefresher,
|
|
2505
2486
|
KbqFilterBarButton,
|
|
2506
2487
|
KbqFilterReset,
|
|
2507
2488
|
KbqPipeAdd,
|
|
2508
2489
|
KbqPipeDirective,
|
|
2509
2490
|
KbqPipeButton,
|
|
2510
|
-
KbqFilterBarSearch,
|
|
2511
|
-
KbqPipeTitleDirective,
|
|
2512
2491
|
KbqPipeState], exports: [KbqFilterBar,
|
|
2513
2492
|
KbqFilters,
|
|
2514
|
-
|
|
2493
|
+
KbqFilterRefresher,
|
|
2515
2494
|
KbqFilterBarButton,
|
|
2516
2495
|
KbqFilterReset,
|
|
2517
2496
|
KbqPipeAdd,
|
|
2518
2497
|
KbqPipeDirective,
|
|
2519
2498
|
KbqPipeButton,
|
|
2520
|
-
KbqFilterBarSearch,
|
|
2521
|
-
KbqPipeTitleDirective,
|
|
2522
2499
|
KbqPipeState] }); }
|
|
2523
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2500
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, providers: [kbqFilterBarPipesProvider()], imports: [KbqFilterBar,
|
|
2524
2501
|
KbqFilters,
|
|
2525
|
-
|
|
2502
|
+
KbqFilterRefresher,
|
|
2526
2503
|
KbqFilterReset,
|
|
2527
2504
|
KbqPipeAdd,
|
|
2528
|
-
KbqPipeButton
|
|
2529
|
-
KbqFilterBarSearch] }); }
|
|
2505
|
+
KbqPipeButton] }); }
|
|
2530
2506
|
}
|
|
2531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, decorators: [{
|
|
2532
2508
|
type: NgModule,
|
|
2533
2509
|
args: [{
|
|
2534
2510
|
imports: COMPONENTS,
|
|
2535
|
-
|
|
2536
|
-
|
|
2511
|
+
providers: [kbqFilterBarPipesProvider()],
|
|
2512
|
+
exports: COMPONENTS
|
|
2537
2513
|
}]
|
|
2538
2514
|
}] });
|
|
2539
2515
|
|
|
@@ -2541,5 +2517,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2541
2517
|
* Generated bundle index. Do not edit.
|
|
2542
2518
|
*/
|
|
2543
2519
|
|
|
2544
|
-
export { KBQ_FILTER_BAR_CONFIGURATION, KBQ_FILTER_BAR_DEFAULT_CONFIGURATION, KBQ_FILTER_BAR_PIPES, KBQ_PIPE_DATA, KbqBasePipe, KbqFilterBar, KbqFilterBarButton, KbqFilterBarModule, KbqFilterBarRefresher,
|
|
2520
|
+
export { KBQ_FILTER_BAR_CONFIGURATION, KBQ_FILTER_BAR_DEFAULT_CONFIGURATION, KBQ_FILTER_BAR_HOST, KBQ_FILTER_BAR_PIPES, KBQ_PIPE_DATA, KbqBasePipe, KbqFilterBar, KbqFilterBarButton, KbqFilterBarModule, KbqFilterRefresher as KbqFilterBarRefresher, KbqFilterRefresher, KbqFilterReset, KbqFilterSavePopover, KbqFilters, KbqPipeAdd, KbqPipeButton, KbqPipeDateBaseComponent, KbqPipeDateComponent, KbqPipeDatetimeComponent, KbqPipeDirective, KbqPipeMinWidth, KbqPipeMultiSelectComponent, KbqPipeMultiTreeSelectComponent, KbqPipeReadonlyComponent, KbqPipeSelectComponent, KbqPipeState, KbqPipeTextComponent, KbqPipeTreeSelectComponent, KbqPipeTypes, KbqSaveFilterStatuses, KbqTreeSelectFlatNode, KbqTreeSelectPipeBase, defaultFilterBarPipes, getId, kbqBuildTree, kbqFilterBarPipesProvider };
|
|
2545
2521
|
//# sourceMappingURL=koobiq-components-filter-bar.mjs.map
|