@koobiq/components 20.0.0 → 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/actions-panel/index.d.ts +1 -0
- package/alert/_alert-theme.scss +0 -4
- package/alert/alert-tokens.scss +4 -4
- package/app-switcher/app-switcher-dropdown-app.scss +2 -0
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/breadcrumbs/index.d.ts +2 -1
- package/button/button-group.scss +42 -2
- package/button-toggle/button-toggle.scss +23 -0
- package/button-toggle/index.d.ts +3 -1
- package/checkbox/checkbox.scss +5 -4
- package/clamped-text/index.d.ts +1 -0
- package/core/index.d.ts +402 -13
- package/core/styles/common/_animation.scss +4 -0
- package/core/styles/theming/_components-theming.scss +1 -1
- package/core/styles/theming/_scrollbar-theme.scss +4 -0
- package/datepicker/_datepicker-theme.scss +1 -1
- package/datepicker/datepicker-toggle.scss +3 -3
- package/dl/index.d.ts +1 -0
- package/dropdown/dropdown.scss +2 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +14 -5
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +6 -6
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +6 -4
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +9 -6
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +4 -4
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +4 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +4 -0
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +449 -112
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +5 -5
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +3 -2
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +8 -13
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +33 -22
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +974 -758
- 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 +2 -2
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +27 -6
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +39 -20
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +2 -2
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +9 -5
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +10 -9
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +178 -19
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +12 -4
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +2 -2
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +2 -2
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +3 -7
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +38 -16
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +4 -0
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +3 -3
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +2 -2
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +2 -2
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +6 -2
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +8 -6
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +19 -7
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +7 -0
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -14
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +4 -4
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +6 -0
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +132 -14
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +50 -2
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +44 -11
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +67 -41
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +16 -3
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/file-upload-tokens.scss +1 -0
- package/file-upload/index.d.ts +10 -7
- 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 +707 -338
- 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/icon/icon-item-tokens.scss +1 -1
- package/inline-edit/index.d.ts +5 -0
- package/inline-edit/inline-edit.scss +7 -7
- package/link/link-tokens.scss +2 -2
- package/list/index.d.ts +11 -2
- package/loader-overlay/loader-overlay-tokens.scss +1 -1
- package/modal/_modal-animation.scss +6 -6
- package/modal/_modal-theme.scss +5 -0
- package/modal/index.d.ts +3 -1
- package/modal/modal.scss +15 -0
- package/navbar/index.d.ts +1 -0
- package/navbar/navbar-item.scss +9 -0
- package/notification-center/_notification-center-theme.scss +2 -1
- package/notification-center/index.d.ts +88 -3
- package/notification-center/notification-center.scss +42 -4
- package/notification-center/notification-item.scss +3 -2
- package/overflow-items/index.d.ts +1 -0
- package/package.json +7 -3
- 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/progress-bar.scss +4 -0
- package/progress-spinner/progress-spinner.scss +5 -1
- package/radio/index.d.ts +1 -5
- package/radio/radio.scss +18 -4
- package/schematics/collection.json +5 -0
- 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.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/select/index.d.ts +10 -2
- package/sidebar/index.d.ts +1 -0
- package/skeleton/skeleton.scss +4 -0
- package/split-button/_split-button-theme.scss +2 -2
- package/splitter/_splitter-theme.scss +2 -2
- package/splitter/index.d.ts +1 -0
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +3 -2
- package/tabs/index.d.ts +2 -0
- package/tabs/tab-header.scss +1 -0
- package/tabs/tabs-tokens.scss +1 -1
- package/textarea/index.d.ts +0 -1
- package/time-range/time-range.scss +0 -8
- package/timepicker/timepicker.scss +2 -2
- package/timezone/index.d.ts +1 -0
- package/title/index.d.ts +92 -2
- package/tooltip/index.d.ts +51 -3
- package/tree/_tree-theme.scss +2 -7
- package/tree/index.d.ts +19 -4
- package/tree/toggle.scss +5 -0
- package/tree/tree-option.scss +0 -4
- package/tree-select/_tree-select-theme.scss +1 -1
- package/tree-select/index.d.ts +9 -2
- package/username/index.d.ts +20 -2
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ChangeDetectorRef, DestroyRef, afterNextRender, TemplateRef, Directive,
|
|
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
3
|
import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
|
|
4
|
-
import * as
|
|
5
|
-
import { isMac, KbqComponentColors,
|
|
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,
|
|
10
|
+
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
11
11
|
import * as i1 from '@koobiq/components/button';
|
|
12
12
|
import { KbqButton, KbqButtonStyles, KbqButtonModule } from '@koobiq/components/button';
|
|
13
13
|
import * as i8 from '@koobiq/components/datepicker';
|
|
14
14
|
import { KbqDatepickerModule } from '@koobiq/components/datepicker';
|
|
15
15
|
import * as i2 from '@koobiq/components/icon';
|
|
16
16
|
import { KbqIconModule, KbqIcon } from '@koobiq/components/icon';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i4 from '@koobiq/components/input';
|
|
18
18
|
import { KbqInputModule } from '@koobiq/components/input';
|
|
19
19
|
import * as i7 from '@koobiq/components/list';
|
|
20
20
|
import { KbqListSelection, KbqListModule } from '@koobiq/components/list';
|
|
21
|
-
import * as i5 from '@koobiq/components/popover';
|
|
21
|
+
import * as i5$1 from '@koobiq/components/popover';
|
|
22
22
|
import { KbqPopoverModule, KbqPopoverTrigger } from '@koobiq/components/popover';
|
|
23
23
|
import * as i9 from '@koobiq/components/timepicker';
|
|
24
24
|
import { KbqTimepickerModule } from '@koobiq/components/timepicker';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i2$1 from '@koobiq/components/title';
|
|
26
26
|
import { KbqTitleModule } from '@koobiq/components/title';
|
|
27
|
-
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';
|
|
28
30
|
import * as i1$2 from '@koobiq/components/tooltip';
|
|
29
31
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
30
|
-
import * as
|
|
31
|
-
import { NgTemplateOutlet, AsyncPipe, NgIf } from '@angular/common';
|
|
32
|
+
import * as i5 from '@koobiq/components/form-field';
|
|
32
33
|
import * as i6 from '@koobiq/components/badge';
|
|
33
34
|
import { KbqBadgeModule } from '@koobiq/components/badge';
|
|
34
|
-
import * as i3
|
|
35
|
+
import * as i3 from '@koobiq/components/select';
|
|
35
36
|
import { KbqSelect, KbqSelectModule } from '@koobiq/components/select';
|
|
36
|
-
import * as
|
|
37
|
-
import {
|
|
38
|
-
import * as
|
|
37
|
+
import * as i7$1 from '@koobiq/components/tree';
|
|
38
|
+
import { KbqTreeFlattener, FlatTreeControl, KbqTreeFlatDataSource, kbqTreeSelectAllValue, KbqTreeSelection, KbqTreeModule } from '@koobiq/components/tree';
|
|
39
|
+
import * as i8$1 from '@koobiq/components/tree-select';
|
|
39
40
|
import { KbqTreeSelect, KbqTreeSelectModule } from '@koobiq/components/tree-select';
|
|
40
|
-
import * as i5$
|
|
41
|
+
import * as i5$2 from '@koobiq/components/textarea';
|
|
41
42
|
import { KbqTextareaModule } from '@koobiq/components/textarea';
|
|
42
|
-
import
|
|
43
|
-
import * as i10 from '@koobiq/components/alert';
|
|
44
|
-
import { KbqAlertModule } from '@koobiq/components/alert';
|
|
45
|
-
import * as i3$2 from '@koobiq/components/dropdown';
|
|
43
|
+
import * as i3$1 from '@koobiq/components/dropdown';
|
|
46
44
|
import { KbqDropdownTrigger, KbqDropdownModule } from '@koobiq/components/dropdown';
|
|
45
|
+
import * as i6$1 from '@koobiq/components/alert';
|
|
46
|
+
import { KbqAlertModule } from '@koobiq/components/alert';
|
|
47
47
|
|
|
48
48
|
/** Injection Token for providing configuration of filter-bar */
|
|
49
49
|
const KBQ_PIPE_DATA = new InjectionToken('KBQ_PIPE_DATA');
|
|
@@ -63,7 +63,7 @@ class KbqBasePipe {
|
|
|
63
63
|
/** localized data
|
|
64
64
|
* @docs-private */
|
|
65
65
|
get localeData() {
|
|
66
|
-
return this.filterBar?.configuration;
|
|
66
|
+
return this.filterBar?.configuration ?? KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
67
67
|
}
|
|
68
68
|
constructor() {
|
|
69
69
|
/** changes of state */
|
|
@@ -72,11 +72,25 @@ class KbqBasePipe {
|
|
|
72
72
|
this.data = inject(KBQ_PIPE_DATA);
|
|
73
73
|
/** KbqFilterBar instance
|
|
74
74
|
* @docs-private */
|
|
75
|
-
this.filterBar = inject(
|
|
75
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
76
76
|
/** @docs-private */
|
|
77
77
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
78
78
|
/** @docs-private */
|
|
79
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;
|
|
80
94
|
/**
|
|
81
95
|
* Whether the current platform is a Mac.
|
|
82
96
|
*
|
|
@@ -92,10 +106,20 @@ class KbqBasePipe {
|
|
|
92
106
|
}
|
|
93
107
|
};
|
|
94
108
|
this.$implicit = this;
|
|
95
|
-
this.stateChanges.subscribe(() => {
|
|
109
|
+
this.stateChanges.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
96
110
|
this.changeDetectorRef.markForCheck();
|
|
97
111
|
});
|
|
98
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
|
+
});
|
|
99
123
|
afterNextRender(() => {
|
|
100
124
|
this.isMac = isMac();
|
|
101
125
|
});
|
|
@@ -130,7 +154,33 @@ class KbqBasePipe {
|
|
|
130
154
|
this.data.value = null;
|
|
131
155
|
this.stateChanges.next();
|
|
132
156
|
this.filterBar?.onClearPipe.emit(this.data);
|
|
133
|
-
this.filterBar?.onChangePipe.
|
|
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
|
+
}
|
|
134
184
|
}
|
|
135
185
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqBasePipe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
136
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 }); }
|
|
@@ -155,7 +205,7 @@ class KbqPipeMinWidth {
|
|
|
155
205
|
}
|
|
156
206
|
constructor() {
|
|
157
207
|
/** KbqFilterBar instance */
|
|
158
|
-
this.filterBar = inject(
|
|
208
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
159
209
|
/** @docs-private */
|
|
160
210
|
this.elementRef = inject(ElementRef);
|
|
161
211
|
/** @docs-private */
|
|
@@ -166,9 +216,17 @@ class KbqPipeMinWidth {
|
|
|
166
216
|
this.minWidth = this.textLength < this.maxSymbolsForFitContent ? 'fit-content' : 'unset';
|
|
167
217
|
this.changeDetectorRef.markForCheck();
|
|
168
218
|
};
|
|
169
|
-
|
|
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())));
|
|
170
223
|
afterNextRender({ read: this.update });
|
|
171
224
|
}
|
|
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
|
+
}
|
|
172
230
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMinWidth, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
173
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 }); }
|
|
174
232
|
}
|
|
@@ -184,17 +242,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
184
242
|
|
|
185
243
|
class KbqPipeState {
|
|
186
244
|
constructor() {
|
|
187
|
-
/** @docs-private */
|
|
188
|
-
this.destroyRef = inject(DestroyRef);
|
|
189
245
|
/** @docs-private */
|
|
190
246
|
this.button = inject(KbqButton);
|
|
191
247
|
/** @docs-private */
|
|
192
248
|
this.pipe = inject(KbqBasePipe);
|
|
193
249
|
/** KbqFilterBar instance
|
|
194
250
|
* @docs-private */
|
|
195
|
-
this.filterBar = inject(
|
|
196
|
-
|
|
197
|
-
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) => {
|
|
198
255
|
this.button.kbqStyle = KbqButtonStyles.Outline;
|
|
199
256
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
200
257
|
if (!this.pipe.isEmpty) {
|
|
@@ -202,32 +259,20 @@ class KbqPipeState {
|
|
|
202
259
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
203
260
|
}
|
|
204
261
|
};
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
get state() {
|
|
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);
|
|
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()));
|
|
218
266
|
}
|
|
219
267
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeState, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
220
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
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
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,14 +284,18 @@ 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
291
|
this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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
300
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
252
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: `
|
|
@@ -254,12 +303,13 @@ class KbqPipeButton {
|
|
|
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
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
|
}
|
|
@@ -275,114 +325,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", 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
339
|
}], ctorParameters: () => [], propDecorators: { readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }] } });
|
|
289
340
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
get parent() {
|
|
299
|
-
return this.parentContainer?.nativeElement || this.parentContainer;
|
|
300
|
-
}
|
|
301
|
-
get child() {
|
|
302
|
-
return this.childContainer.first.nativeElement || this.childContainer;
|
|
303
|
-
}
|
|
304
|
-
constructor() {
|
|
305
|
-
super();
|
|
306
|
-
this.componentInstance = inject(KBQ_TITLE_TEXT_REF, { optional: true, host: true });
|
|
307
|
-
this.viewValue = input(undefined, ...(ngDevMode ? [{ debugName: "viewValue", alias: 'kbqPipeTitle' }] : [{ alias: 'kbqPipeTitle' }]));
|
|
308
|
-
this.resizeStream = new Subject();
|
|
309
|
-
this.debounceInterval = 100;
|
|
310
|
-
this.resizeSubscription = Subscription.EMPTY;
|
|
311
|
-
this.mutationSubscription = Subscription.EMPTY;
|
|
312
|
-
this.focusMonitorSubscription = Subscription.EMPTY;
|
|
313
|
-
afterNextRender(() => {
|
|
314
|
-
this.listenToMutationObserver();
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
ngAfterViewInit() {
|
|
318
|
-
this.parentContainer = this.parentContainer || this.componentInstance?.parentTextElement || this.elementRef;
|
|
319
|
-
this.childContainer = this.childContainer || this.componentInstance?.textElement || this.elementRef;
|
|
320
|
-
this.content = this.viewValue();
|
|
321
|
-
this.resizeSubscription = this.resizeStream
|
|
322
|
-
.pipe(debounceTime(this.debounceInterval))
|
|
323
|
-
.subscribe(() => (this.disabled = !this.isOverflown));
|
|
324
|
-
this.focusMonitorSubscription = this.focusMonitor
|
|
325
|
-
.monitor(this.elementRef)
|
|
326
|
-
.subscribe((origin) => (origin === 'keyboard' ? this.handleElementEnter() : this.hideTooltip()));
|
|
327
|
-
}
|
|
328
|
-
ngOnDestroy() {
|
|
329
|
-
super.ngOnDestroy();
|
|
330
|
-
this.resizeSubscription.unsubscribe();
|
|
331
|
-
this.mutationSubscription.unsubscribe();
|
|
332
|
-
this.focusMonitorSubscription.unsubscribe();
|
|
333
|
-
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
334
|
-
}
|
|
335
|
-
handleElementEnter() {
|
|
336
|
-
this.disabled = !this.isOverflown;
|
|
337
|
-
}
|
|
338
|
-
hideTooltip() {
|
|
339
|
-
this.disabled = true;
|
|
340
|
-
}
|
|
341
|
-
listenToMutationObserver() {
|
|
342
|
-
this.mutationSubscription = this.createMutationObserver()
|
|
343
|
-
.pipe(throttleTime(this.debounceInterval))
|
|
344
|
-
.subscribe(() => {
|
|
345
|
-
this.disabled = !this.isOverflown;
|
|
346
|
-
this.content = this.viewValue();
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
createMutationObserver() {
|
|
350
|
-
return new Observable((observer) => {
|
|
351
|
-
const mutationObserver = new MutationObserver((mutations) => observer.next(mutations));
|
|
352
|
-
mutationObserver.observe(this.parent, {
|
|
353
|
-
characterData: true,
|
|
354
|
-
attributes: false,
|
|
355
|
-
childList: true,
|
|
356
|
-
subtree: true
|
|
357
|
-
});
|
|
358
|
-
return () => mutationObserver.disconnect();
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
362
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.25", type: KbqPipeTitleDirective, isStandalone: true, selector: "[kbqPipeTitle]", inputs: { viewValue: { classPropertyName: "viewValue", publicName: "kbqPipeTitle", isSignal: true, isRequired: false, transformFunction: null } }, 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 }); }
|
|
363
|
-
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTitleDirective, decorators: [{
|
|
365
|
-
type: Directive,
|
|
366
|
-
args: [{
|
|
367
|
-
selector: '[kbqPipeTitle]',
|
|
368
|
-
host: {
|
|
369
|
-
'(mouseenter)': 'handleElementEnter()',
|
|
370
|
-
'(mouseleave)': 'hideTooltip()',
|
|
371
|
-
'(window:resize)': 'resizeStream.next($event)'
|
|
372
|
-
},
|
|
373
|
-
exportAs: 'kbqPipeTitle'
|
|
374
|
-
}]
|
|
375
|
-
}], ctorParameters: () => [], propDecorators: { viewValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqPipeTitle", required: false }] }], childContainer: [{
|
|
376
|
-
type: ContentChildren,
|
|
377
|
-
args: ['kbqTitleText', { descendants: true }]
|
|
378
|
-
}], parentContainer: [{
|
|
379
|
-
type: ContentChild,
|
|
380
|
-
args: ['kbqTitleContainer']
|
|
381
|
-
}] } });
|
|
382
|
-
|
|
383
|
-
class KbqPipeDateComponent extends KbqBasePipe {
|
|
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 {
|
|
384
348
|
constructor() {
|
|
385
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.
|
|
386
352
|
this.adapter = inject(DateAdapter);
|
|
387
353
|
this.formatter = inject(DateFormatter);
|
|
388
354
|
/** @docs-private */
|
|
@@ -400,14 +366,16 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
400
366
|
/** @docs-private */
|
|
401
367
|
this.popover = viewChild.required('popover');
|
|
402
368
|
/** @docs-private */
|
|
403
|
-
|
|
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 }]));
|
|
404
372
|
/** @docs-private */
|
|
405
373
|
this.returnButton = viewChild.required('returnButton', { read: KbqButton });
|
|
406
374
|
}
|
|
407
375
|
/** formatted value for period */
|
|
408
376
|
get formattedValue() {
|
|
409
377
|
if (this.start && this.end) {
|
|
410
|
-
return this.
|
|
378
|
+
return this.formatRange(this.start, this.end);
|
|
411
379
|
}
|
|
412
380
|
return this.data.value?.name ?? '';
|
|
413
381
|
}
|
|
@@ -426,7 +394,7 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
426
394
|
if (this.data.value?.start) {
|
|
427
395
|
return this.adapter.today().plus(this.data.value?.start);
|
|
428
396
|
}
|
|
429
|
-
return this.
|
|
397
|
+
return this.getDefaultStart();
|
|
430
398
|
}
|
|
431
399
|
/** parsed end */
|
|
432
400
|
get end() {
|
|
@@ -437,7 +405,7 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
437
405
|
if (this.data.value?.start) {
|
|
438
406
|
return this.adapter.today();
|
|
439
407
|
}
|
|
440
|
-
return this.
|
|
408
|
+
return this.getDefaultEnd();
|
|
441
409
|
}
|
|
442
410
|
/** Whether the current pipe is empty. */
|
|
443
411
|
get isEmpty() {
|
|
@@ -450,8 +418,19 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
450
418
|
ngAfterViewInit() {
|
|
451
419
|
super.ngAfterViewInit();
|
|
452
420
|
this.popover()
|
|
453
|
-
.visibleChange.pipe(
|
|
454
|
-
.subscribe(() =>
|
|
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
|
+
});
|
|
455
434
|
}
|
|
456
435
|
/** keydown handler
|
|
457
436
|
* @docs-private */
|
|
@@ -469,14 +448,16 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
469
448
|
end: this.formGroup.controls.end.value.toISO()
|
|
470
449
|
};
|
|
471
450
|
this.stateChanges.next();
|
|
472
|
-
this.filterBar?.onChangePipe.
|
|
451
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
473
452
|
this.popover().hide();
|
|
453
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
474
454
|
}
|
|
475
455
|
onSelect(item) {
|
|
476
456
|
this.data.value = item;
|
|
477
457
|
this.stateChanges.next();
|
|
478
|
-
this.filterBar?.onChangePipe.
|
|
458
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
479
459
|
this.popover().hide();
|
|
460
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
480
461
|
}
|
|
481
462
|
showPeriod() {
|
|
482
463
|
this.isListMode = false;
|
|
@@ -484,13 +465,17 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
484
465
|
this.showEndCalendar = false;
|
|
485
466
|
this.initFormGroup();
|
|
486
467
|
setTimeout(() => {
|
|
468
|
+
if (this.destroyed)
|
|
469
|
+
return;
|
|
487
470
|
this.popover().updatePosition(true);
|
|
488
|
-
|
|
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();
|
|
489
474
|
});
|
|
490
475
|
}
|
|
491
476
|
showList() {
|
|
492
477
|
this.isListMode = true;
|
|
493
|
-
setTimeout(() => this.listSelection()
|
|
478
|
+
setTimeout(() => this.listSelection()?.focus());
|
|
494
479
|
this.popover().updatePosition(true);
|
|
495
480
|
}
|
|
496
481
|
/** opens popover */
|
|
@@ -522,13 +507,30 @@ class KbqPipeDateComponent extends KbqBasePipe {
|
|
|
522
507
|
end: new FormControl(this.end || this.defaultEnd)
|
|
523
508
|
});
|
|
524
509
|
}
|
|
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
|
+
}
|
|
525
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 }); }
|
|
526
528
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeDateComponent, isStandalone: true, selector: "kbq-pipe-date", providers: [
|
|
527
529
|
{
|
|
528
530
|
provide: KbqBasePipe,
|
|
529
531
|
useExisting: this
|
|
530
532
|
}
|
|
531
|
-
], 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, 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: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i3.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i4.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { 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 }); }
|
|
532
534
|
}
|
|
533
535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDateComponent, decorators: [{
|
|
534
536
|
type: Component,
|
|
@@ -546,166 +548,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
546
548
|
KbqFormattersModule,
|
|
547
549
|
KbqPipeButton,
|
|
548
550
|
KbqTitleModule,
|
|
549
|
-
KbqPipeTitleDirective,
|
|
550
551
|
FormsModule
|
|
551
552
|
], providers: [
|
|
552
553
|
{
|
|
553
554
|
provide: KbqBasePipe,
|
|
554
555
|
useExisting: this
|
|
555
556
|
}
|
|
556
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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"] }]
|
|
557
|
-
}]
|
|
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
|
+
}] });
|
|
558
559
|
|
|
559
|
-
class KbqPipeDatetimeComponent extends
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
this.adapter = inject(DateAdapter);
|
|
563
|
-
this.formatter = inject(DateFormatter);
|
|
564
|
-
/** @docs-private */
|
|
565
|
-
this.placements = PopUpPlacements;
|
|
566
|
-
/** @docs-private */
|
|
567
|
-
this.styles = KbqButtonStyles;
|
|
568
|
-
/** @docs-private */
|
|
569
|
-
this.colors = KbqComponentColors;
|
|
570
|
-
/** Whether the current state is list of periods. When false will displayed control for set custom period */
|
|
571
|
-
this.isListMode = true;
|
|
572
|
-
/** @docs-private */
|
|
573
|
-
this.showStartCalendar = false;
|
|
574
|
-
/** @docs-private */
|
|
575
|
-
this.showEndCalendar = false;
|
|
576
|
-
/** @docs-private */
|
|
577
|
-
this.popover = viewChild.required('popover');
|
|
578
|
-
/** @docs-private */
|
|
579
|
-
this.listSelection = viewChild.required('listSelection', { read: KbqListSelection });
|
|
580
|
-
/** @docs-private */
|
|
581
|
-
this.returnButton = viewChild.required('returnButton', { read: KbqButton });
|
|
582
|
-
}
|
|
583
|
-
/** formatted value for period */
|
|
584
|
-
get formattedValue() {
|
|
585
|
-
if (this.start && this.end) {
|
|
586
|
-
return this.formatter.rangeShortDateTime(this.start, this.end);
|
|
587
|
-
}
|
|
588
|
-
return this.data.value?.name ?? '';
|
|
589
|
-
}
|
|
590
|
-
/** Whether the current pipe is disabled. */
|
|
591
|
-
get disabled() {
|
|
592
|
-
return (!this.adapter.isDateInstance(this.formGroup.controls.start.value) ||
|
|
593
|
-
!this.adapter.isDateInstance(this.formGroup.controls.end.value) ||
|
|
594
|
-
this.formGroup.controls.start.invalid);
|
|
595
|
-
}
|
|
596
|
-
/** parsed start */
|
|
597
|
-
get start() {
|
|
598
|
-
return this.adapter.parse(this.data.value?.start, '');
|
|
560
|
+
class KbqPipeDatetimeComponent extends KbqPipeDateBaseComponent {
|
|
561
|
+
formatRange(start, end) {
|
|
562
|
+
return this.formatter.rangeShortDateTime(start, end);
|
|
599
563
|
}
|
|
600
|
-
|
|
601
|
-
get defaultStart() {
|
|
602
|
-
if (this.data.value?.start) {
|
|
603
|
-
return this.adapter.today().plus(this.data.value?.start);
|
|
604
|
-
}
|
|
564
|
+
getDefaultStart() {
|
|
605
565
|
return this.adapter.today().startOf('day');
|
|
606
566
|
}
|
|
607
|
-
|
|
608
|
-
get end() {
|
|
609
|
-
return this.adapter.parse(this.data.value?.end, '');
|
|
610
|
-
}
|
|
611
|
-
/** default object for end */
|
|
612
|
-
get defaultEnd() {
|
|
613
|
-
if (this.data.value?.start) {
|
|
614
|
-
return this.adapter.today();
|
|
615
|
-
}
|
|
567
|
+
getDefaultEnd() {
|
|
616
568
|
return this.adapter.today().endOf('day');
|
|
617
569
|
}
|
|
618
|
-
/** Whether the current pipe is empty. */
|
|
619
|
-
get isEmpty() {
|
|
620
|
-
if (this.data.value === null)
|
|
621
|
-
return true;
|
|
622
|
-
if (this.data.value?.name)
|
|
623
|
-
return false;
|
|
624
|
-
return !this.adapter.isDateInstance(this.start) || !this.adapter.isDateInstance(this.end);
|
|
625
|
-
}
|
|
626
|
-
ngAfterViewInit() {
|
|
627
|
-
super.ngAfterViewInit();
|
|
628
|
-
this.popover()
|
|
629
|
-
.visibleChange.pipe(filter((visible) => !visible), takeUntilDestroyed(this.destroyRef))
|
|
630
|
-
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
631
|
-
}
|
|
632
|
-
/** keydown handler
|
|
633
|
-
* @docs-private */
|
|
634
|
-
onKeydown($event) {
|
|
635
|
-
if (($event.ctrlKey || $event.metaKey) && $event.keyCode === ENTER) {
|
|
636
|
-
this.onApplyPeriod();
|
|
637
|
-
}
|
|
638
|
-
if ($event.keyCode === ENTER) {
|
|
639
|
-
$event.preventDefault();
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
/** @docs-private */
|
|
643
|
-
onApplyPeriod() {
|
|
644
|
-
this.data.value = {
|
|
645
|
-
start: this.formGroup.controls.start.value.toISO(),
|
|
646
|
-
end: this.formGroup.controls.end.value.toISO()
|
|
647
|
-
};
|
|
648
|
-
this.stateChanges.next();
|
|
649
|
-
this.filterBar?.onChangePipe.next(this.data);
|
|
650
|
-
this.popover().hide();
|
|
651
|
-
}
|
|
652
|
-
onSelect(item) {
|
|
653
|
-
this.data.value = item;
|
|
654
|
-
this.stateChanges.next();
|
|
655
|
-
this.filterBar?.onChangePipe.next(this.data);
|
|
656
|
-
this.popover().hide();
|
|
657
|
-
}
|
|
658
|
-
showPeriod() {
|
|
659
|
-
this.isListMode = false;
|
|
660
|
-
this.showStartCalendar = false;
|
|
661
|
-
this.showEndCalendar = false;
|
|
662
|
-
this.initFormGroup();
|
|
663
|
-
setTimeout(() => {
|
|
664
|
-
this.popover().updatePosition(true);
|
|
665
|
-
this.returnButton().focus();
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
showList() {
|
|
669
|
-
this.isListMode = true;
|
|
670
|
-
setTimeout(() => this.listSelection().focus());
|
|
671
|
-
this.popover().updatePosition(true);
|
|
672
|
-
}
|
|
673
|
-
/** opens popover */
|
|
674
|
-
open() {
|
|
675
|
-
this.popover().show();
|
|
676
|
-
}
|
|
677
|
-
onSelectStartDate(value) {
|
|
678
|
-
this.formGroup.controls.start.setValue(value);
|
|
679
|
-
}
|
|
680
|
-
onSelectEndDate(value) {
|
|
681
|
-
this.formGroup.controls.end.setValue(value);
|
|
682
|
-
}
|
|
683
|
-
onFocusStartInput() {
|
|
684
|
-
this.showStartCalendar = true;
|
|
685
|
-
this.showEndCalendar = false;
|
|
686
|
-
this.popover().updatePosition(true);
|
|
687
|
-
}
|
|
688
|
-
onFocusEndInput() {
|
|
689
|
-
this.showEndCalendar = true;
|
|
690
|
-
this.showStartCalendar = false;
|
|
691
|
-
}
|
|
692
|
-
hideCalendars() {
|
|
693
|
-
this.showStartCalendar = false;
|
|
694
|
-
this.showEndCalendar = false;
|
|
695
|
-
}
|
|
696
|
-
initFormGroup() {
|
|
697
|
-
this.formGroup = new FormGroup({
|
|
698
|
-
start: new FormControl(this.start || this.defaultStart),
|
|
699
|
-
end: new FormControl(this.end || this.defaultEnd)
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
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 }); }
|
|
703
571
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeDatetimeComponent, isStandalone: true, selector: "kbq-pipe-datetime", providers: [
|
|
704
572
|
{
|
|
705
573
|
provide: KbqBasePipe,
|
|
706
574
|
useExisting: this
|
|
707
575
|
}
|
|
708
|
-
], 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, 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: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i3.MaxValidator, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: ["max"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "component", type: i4.KbqHint, selector: "kbq-hint", inputs: ["id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { 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 }); }
|
|
709
577
|
}
|
|
710
578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeDatetimeComponent, decorators: [{
|
|
711
579
|
type: Component,
|
|
@@ -723,51 +591,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
723
591
|
KbqFormattersModule,
|
|
724
592
|
KbqPipeButton,
|
|
725
593
|
KbqTitleModule,
|
|
726
|
-
KbqPipeTitleDirective,
|
|
727
594
|
FormsModule
|
|
728
595
|
], providers: [
|
|
729
596
|
{
|
|
730
597
|
provide: KbqBasePipe,
|
|
731
598
|
useExisting: this
|
|
732
599
|
}
|
|
733
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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"] }]
|
|
734
|
-
}]
|
|
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
|
+
}
|
|
735
647
|
|
|
736
648
|
class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
737
649
|
constructor() {
|
|
738
650
|
super(...arguments);
|
|
739
651
|
/** control for search options */
|
|
740
|
-
this.searchControl = new
|
|
652
|
+
this.searchControl = new FormControl(null);
|
|
741
653
|
/** @docs-private */
|
|
742
654
|
this.select = viewChild.required(KbqSelect);
|
|
743
655
|
/** @docs-private */
|
|
744
656
|
this.options = viewChildren(KbqOption, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
745
657
|
this.selectionAllInProgress = false;
|
|
746
|
-
|
|
747
|
-
|
|
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;
|
|
748
665
|
/** handler for select all options in select */
|
|
749
666
|
this.selectAllHandler = (event) => {
|
|
750
667
|
event.preventDefault();
|
|
751
668
|
this.toggleSelectionAll();
|
|
752
669
|
};
|
|
753
670
|
this.getFilteredOptions = () => {
|
|
754
|
-
|
|
755
|
-
|
|
671
|
+
const search = this.searchControl.value;
|
|
672
|
+
return search
|
|
673
|
+
? this.values.filter((item) => item.name.toLowerCase().includes(search.toLowerCase()))
|
|
756
674
|
: this.values;
|
|
757
675
|
};
|
|
758
676
|
}
|
|
759
677
|
/** selected value */
|
|
760
678
|
get selected() {
|
|
761
|
-
|
|
762
|
-
return this.internalSelected;
|
|
763
|
-
}
|
|
764
|
-
return this.data.value;
|
|
679
|
+
return this.multiSelect.selected;
|
|
765
680
|
}
|
|
766
681
|
/** Whether the current pipe is empty. */
|
|
767
682
|
get isEmpty() {
|
|
768
|
-
return (super.isEmpty
|
|
769
|
-
(Array.isArray(this.data.value) && !this.data.value.length) ||
|
|
770
|
-
(this.selectedAllEqualsSelectedNothing && this.allOptionsSelected));
|
|
683
|
+
return this.multiSelect.isEmpty(super.isEmpty);
|
|
771
684
|
}
|
|
772
685
|
/** state for checkbox 'select all'. */
|
|
773
686
|
get checkboxState() {
|
|
@@ -796,14 +709,14 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
796
709
|
return select.triggerValues.length === this.values?.length;
|
|
797
710
|
}
|
|
798
711
|
get selectedAllEqualsSelectedNothing() {
|
|
799
|
-
return this.
|
|
712
|
+
return this.multiSelect.selectedAllEqualsSelectedNothing;
|
|
800
713
|
}
|
|
801
714
|
get visibleOptions() {
|
|
802
715
|
return this.options()?.filter((option) => option.selectable());
|
|
803
716
|
}
|
|
804
717
|
/** @docs-private */
|
|
805
718
|
ngOnInit() {
|
|
806
|
-
this.updateInternalSelected();
|
|
719
|
+
this.multiSelect.updateInternalSelected();
|
|
807
720
|
this.filteredOptions = merge(this.filterBar.internalTemplatesChanges, this.searchControl.valueChanges).pipe(map(this.getFilteredOptions), takeUntilDestroyed(this.destroyRef));
|
|
808
721
|
}
|
|
809
722
|
ngAfterViewInit() {
|
|
@@ -822,13 +735,13 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
822
735
|
else {
|
|
823
736
|
this.data.value = item;
|
|
824
737
|
}
|
|
825
|
-
this.emitChangePipeEvent();
|
|
738
|
+
this.multiSelect.emitChangePipeEvent();
|
|
826
739
|
this.stateChanges.next();
|
|
827
740
|
}
|
|
828
741
|
/** @docs-private */
|
|
829
742
|
onClear() {
|
|
830
743
|
this.data.value = [];
|
|
831
|
-
this.updateInternalSelected();
|
|
744
|
+
this.multiSelect.updateInternalSelected();
|
|
832
745
|
this.filterBar?.onClearPipe.emit(this.data);
|
|
833
746
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
834
747
|
this.stateChanges.next();
|
|
@@ -856,40 +769,28 @@ class KbqPipeMultiSelectComponent extends KbqBasePipe {
|
|
|
856
769
|
this.data.value = [...this.select().value];
|
|
857
770
|
}
|
|
858
771
|
if (emitEvent) {
|
|
859
|
-
this.emitChangePipeEvent();
|
|
772
|
+
this.multiSelect.emitChangePipeEvent();
|
|
860
773
|
}
|
|
861
774
|
this.stateChanges.next();
|
|
862
775
|
}
|
|
863
776
|
/** @docs-private */
|
|
864
777
|
onClose() {
|
|
865
778
|
if (this.allOptionsSelected) {
|
|
866
|
-
this.updateInternalSelected();
|
|
779
|
+
this.multiSelect.updateInternalSelected();
|
|
867
780
|
}
|
|
781
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
868
782
|
}
|
|
869
783
|
/** opens select */
|
|
870
784
|
open() {
|
|
871
785
|
this.select().open();
|
|
872
786
|
}
|
|
873
|
-
updateInternalSelected() {
|
|
874
|
-
if (this.selectedAllEqualsSelectedNothing) {
|
|
875
|
-
this.internalSelected = this.data.value?.slice() || [];
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
emitChangePipeEvent() {
|
|
879
|
-
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
880
|
-
this.filterBar?.onChangePipe.emit({ ...this.data, value: [] });
|
|
881
|
-
}
|
|
882
|
-
else {
|
|
883
|
-
this.filterBar?.onChangePipe.emit(this.data);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
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 }); }
|
|
887
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: [
|
|
888
789
|
{
|
|
889
790
|
provide: KbqBasePipe,
|
|
890
791
|
useExisting: this
|
|
891
792
|
}
|
|
892
|
-
], 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 [kbqPipeTitle]=\"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 [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: i8$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i8$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i8$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i8$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.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: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { 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: i3.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: i8$1.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], 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 }); }
|
|
893
794
|
}
|
|
894
795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiSelectComponent, decorators: [{
|
|
895
796
|
type: Component,
|
|
@@ -902,7 +803,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
902
803
|
KbqBadgeModule,
|
|
903
804
|
KbqPipeButton,
|
|
904
805
|
KbqTitleModule,
|
|
905
|
-
KbqPipeTitleDirective,
|
|
906
806
|
NgTemplateOutlet,
|
|
907
807
|
KbqIconModule,
|
|
908
808
|
KbqInputModule,
|
|
@@ -914,25 +814,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
914
814
|
provide: KbqBasePipe,
|
|
915
815
|
useExisting: this
|
|
916
816
|
}
|
|
917
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-select\n #select=\"kbqSelect\"\n multiple\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [
|
|
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"] }]
|
|
918
818
|
}], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqSelect), { isSignal: true }] }], options: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqOption), { isSignal: true }] }] } });
|
|
919
819
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
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;
|
|
893
|
+
}
|
|
894
|
+
/** Whether the current pipe is empty. */
|
|
895
|
+
get isEmpty() {
|
|
896
|
+
return this.multiSelect.isEmpty(super.isEmpty);
|
|
897
|
+
}
|
|
898
|
+
get selectAllCheckboxState() {
|
|
899
|
+
const select = this.select();
|
|
936
900
|
if (!select)
|
|
937
901
|
return 'unchecked';
|
|
938
902
|
if (this.allOptionsSelected) {
|
|
@@ -953,7 +917,7 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
953
917
|
return this.select()?.triggerValues?.length === dataNodesForSelect;
|
|
954
918
|
}
|
|
955
919
|
get selectedAllEqualsSelectedNothing() {
|
|
956
|
-
return this.
|
|
920
|
+
return this.multiSelect.selectedAllEqualsSelectedNothing;
|
|
957
921
|
}
|
|
958
922
|
/** true if all visible options selected */
|
|
959
923
|
get allVisibleOptionsSelected() {
|
|
@@ -963,18 +927,21 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
963
927
|
}
|
|
964
928
|
constructor() {
|
|
965
929
|
super();
|
|
966
|
-
/** control for search options */
|
|
967
|
-
this.searchControl = new UntypedFormControl();
|
|
968
|
-
/** @docs-private */
|
|
969
|
-
this.select = viewChild.required(KbqTreeSelect);
|
|
970
930
|
/** @docs-private */
|
|
971
931
|
this.tree = viewChild.required(KbqTreeSelection);
|
|
972
|
-
|
|
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
|
+
*/
|
|
973
942
|
this.updateTemplates = (templates) => {
|
|
974
|
-
const template = templates?.find((
|
|
943
|
+
const template = templates?.find((item) => getId(item) === getId(this.data));
|
|
975
944
|
if (template?.values) {
|
|
976
|
-
this.values = template.values;
|
|
977
|
-
this.valueTemplate = template.valueTemplate;
|
|
978
945
|
const values = [...template.values];
|
|
979
946
|
if (this.data.selectAll) {
|
|
980
947
|
values.unshift({
|
|
@@ -991,47 +958,13 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
991
958
|
event.preventDefault();
|
|
992
959
|
this.toggleSelectAllNode();
|
|
993
960
|
};
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
flatNode.name = node.name;
|
|
997
|
-
flatNode.value = node.value;
|
|
998
|
-
flatNode.parent = parent;
|
|
999
|
-
flatNode.level = level;
|
|
1000
|
-
flatNode.expandable = !!node.children;
|
|
1001
|
-
return flatNode;
|
|
1002
|
-
};
|
|
1003
|
-
this.getLevel = (node) => {
|
|
1004
|
-
return node.level;
|
|
1005
|
-
};
|
|
1006
|
-
this.isExpandable = (node) => {
|
|
1007
|
-
return node.expandable;
|
|
1008
|
-
};
|
|
1009
|
-
this.getChildren = (node) => {
|
|
1010
|
-
return node.children;
|
|
1011
|
-
};
|
|
1012
|
-
this.getValue = (node) => {
|
|
1013
|
-
return node.value;
|
|
1014
|
-
};
|
|
1015
|
-
this.getViewValue = (node) => {
|
|
1016
|
-
return `${node.name}`;
|
|
1017
|
-
};
|
|
1018
|
-
this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
1019
|
-
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable, this.getValue, this.getViewValue);
|
|
1020
|
-
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`.
|
|
1021
963
|
this.filterBar?.internalTemplatesChanges.pipe(takeUntilDestroyed()).subscribe(this.updateTemplates);
|
|
1022
964
|
}
|
|
1023
965
|
ngOnInit() {
|
|
1024
|
-
|
|
1025
|
-
this.
|
|
1026
|
-
}
|
|
1027
|
-
ngAfterViewInit() {
|
|
1028
|
-
super.ngAfterViewInit();
|
|
1029
|
-
this.select()
|
|
1030
|
-
.closedStream.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1031
|
-
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
1032
|
-
}
|
|
1033
|
-
isNodeHasChild(_, nodeData) {
|
|
1034
|
-
return nodeData.expandable;
|
|
966
|
+
super.ngOnInit();
|
|
967
|
+
this.multiSelect.updateInternalSelected();
|
|
1035
968
|
}
|
|
1036
969
|
isNodeSelectAll(_, nodeData) {
|
|
1037
970
|
return nodeData.value === kbqTreeSelectAllValue;
|
|
@@ -1045,13 +978,15 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1045
978
|
}
|
|
1046
979
|
this.toggleParents(option.data.parent);
|
|
1047
980
|
setTimeout(() => {
|
|
981
|
+
if (this.destroyed)
|
|
982
|
+
return;
|
|
1048
983
|
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1049
984
|
this.data.value = [];
|
|
1050
985
|
}
|
|
1051
986
|
else {
|
|
1052
987
|
this.data.value = this.select().selectedValues;
|
|
1053
988
|
}
|
|
1054
|
-
this.emitChangePipeEvent();
|
|
989
|
+
this.multiSelect.emitChangePipeEvent();
|
|
1055
990
|
this.stateChanges.next();
|
|
1056
991
|
});
|
|
1057
992
|
}
|
|
@@ -1081,6 +1016,8 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1081
1016
|
}
|
|
1082
1017
|
}
|
|
1083
1018
|
setTimeout(() => {
|
|
1019
|
+
if (this.destroyed)
|
|
1020
|
+
return;
|
|
1084
1021
|
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1085
1022
|
this.data.value = [];
|
|
1086
1023
|
}
|
|
@@ -1088,41 +1025,21 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1088
1025
|
this.data.value = [...this.select().selectedValues];
|
|
1089
1026
|
}
|
|
1090
1027
|
if (emitEvent) {
|
|
1091
|
-
this.emitChangePipeEvent();
|
|
1028
|
+
this.multiSelect.emitChangePipeEvent();
|
|
1092
1029
|
}
|
|
1093
1030
|
this.stateChanges.next();
|
|
1094
1031
|
});
|
|
1095
1032
|
}
|
|
1096
|
-
/** opens select */
|
|
1097
|
-
open() {
|
|
1098
|
-
setTimeout(() => this.select().open());
|
|
1099
|
-
}
|
|
1100
1033
|
onClear() {
|
|
1101
1034
|
super.onClear();
|
|
1102
|
-
this.updateInternalSelected();
|
|
1103
|
-
}
|
|
1104
|
-
/** @docs-private */
|
|
1105
|
-
onOpen() {
|
|
1106
|
-
this.treeControl.expandAll();
|
|
1035
|
+
this.multiSelect.updateInternalSelected();
|
|
1107
1036
|
}
|
|
1108
1037
|
/** @docs-private */
|
|
1109
1038
|
onClose() {
|
|
1110
1039
|
if (this.allOptionsSelected) {
|
|
1111
|
-
this.updateInternalSelected();
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
updateInternalSelected() {
|
|
1115
|
-
if (this.selectedAllEqualsSelectedNothing) {
|
|
1116
|
-
this.internalSelected = this.data.value?.slice() || [];
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
emitChangePipeEvent() {
|
|
1120
|
-
if (this.selectedAllEqualsSelectedNothing && this.allOptionsSelected) {
|
|
1121
|
-
this.filterBar?.onChangePipe.emit({ ...this.data, value: [] });
|
|
1122
|
-
}
|
|
1123
|
-
else {
|
|
1124
|
-
this.filterBar?.onChangePipe.emit(this.data);
|
|
1040
|
+
this.multiSelect.updateInternalSelected();
|
|
1125
1041
|
}
|
|
1042
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1126
1043
|
}
|
|
1127
1044
|
toggleParents(parent) {
|
|
1128
1045
|
if (!parent) {
|
|
@@ -1130,7 +1047,8 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1130
1047
|
}
|
|
1131
1048
|
const descendants = this.treeControl.getDescendants(parent);
|
|
1132
1049
|
const isParentSelected = this.select().selectionModel.selected.includes(parent);
|
|
1133
|
-
if (!isParentSelected &&
|
|
1050
|
+
if (!isParentSelected &&
|
|
1051
|
+
descendants.every((d) => this.select().selectionModel.selected.includes(d))) {
|
|
1134
1052
|
this.select().selectionModel.select(parent);
|
|
1135
1053
|
this.toggleParents(parent.parent);
|
|
1136
1054
|
}
|
|
@@ -1145,7 +1063,7 @@ class KbqPipeMultiTreeSelectComponent extends KbqBasePipe {
|
|
|
1145
1063
|
provide: KbqBasePipe,
|
|
1146
1064
|
useExisting: this
|
|
1147
1065
|
}
|
|
1148
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqTreeSelect, descendants: true, isSignal: true }, { 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 [kbqPipeTitle]=\"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 <!-- eslint-disable-next-line @angular-eslint/template/prefer-control-flow -->\n <kbq-form-field *ngIf=\"data.search\" 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 [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 [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\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: 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: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i3.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.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: i6$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i6$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i6$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "disabled", "tabIndex"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i6$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i6$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i7$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: i8$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i8$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i8$1.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.KbqBadge, selector: "kbq-badge", inputs: ["compact", "outline", "badgeColor"] }, { kind: "directive", type: i6.KbqBadgeCssStyler, selector: "kbq-badge" }, { kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: i8$1.KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }, { kind: "pipe", type: i8$1.KbqHighlightPipe, name: "mcHighlight" }], 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 }); }
|
|
1149
1067
|
}
|
|
1150
1068
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeMultiTreeSelectComponent, decorators: [{
|
|
1151
1069
|
type: Component,
|
|
@@ -1155,7 +1073,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1155
1073
|
KbqPipeState,
|
|
1156
1074
|
KbqPipeButton,
|
|
1157
1075
|
KbqTitleModule,
|
|
1158
|
-
KbqPipeTitleDirective,
|
|
1159
1076
|
KbqPipeMinWidth,
|
|
1160
1077
|
KbqIconModule,
|
|
1161
1078
|
KbqInputModule,
|
|
@@ -1163,7 +1080,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1163
1080
|
KbqHighlightModule,
|
|
1164
1081
|
KbqTreeModule,
|
|
1165
1082
|
KbqTreeSelectModule,
|
|
1166
|
-
NgIf,
|
|
1167
1083
|
FormsModule,
|
|
1168
1084
|
KbqBadgeModule,
|
|
1169
1085
|
KbqPseudoCheckboxModule
|
|
@@ -1172,8 +1088,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1172
1088
|
provide: KbqBasePipe,
|
|
1173
1089
|
useExisting: this
|
|
1174
1090
|
}
|
|
1175
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [
|
|
1176
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
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 }] }] } });
|
|
1177
1093
|
|
|
1178
1094
|
class KbqPipeReadonlyComponent extends KbqBasePipe {
|
|
1179
1095
|
open() { }
|
|
@@ -1184,7 +1100,7 @@ class KbqPipeReadonlyComponent extends KbqBasePipe {
|
|
|
1184
1100
|
useExisting: this
|
|
1185
1101
|
}
|
|
1186
1102
|
], usesInheritance: true, ngImport: i0, template: `
|
|
1187
|
-
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [
|
|
1103
|
+
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [kbq-title]="pipeTooltip">
|
|
1188
1104
|
<span #kbqTitleText class="kbq-pipe__name" kbqPipeMinWidth>{{ data.name }}</span>
|
|
1189
1105
|
<span #kbqTitleText class="kbq-pipe__value" kbqPipeMinWidth [class.kbq-pipe__value_empty]="!data.value">
|
|
1190
1106
|
{{ data.value }}
|
|
@@ -1199,7 +1115,7 @@ class KbqPipeReadonlyComponent extends KbqBasePipe {
|
|
|
1199
1115
|
<div class="kbq-pipe-tooltip__name kbq-text-compact">{{ data.name }}</div>
|
|
1200
1116
|
<div class="kbq-pipe-tooltip__value kbq-text-compact">{{ data.value }}</div>
|
|
1201
1117
|
</ng-template>
|
|
1202
|
-
`, 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 }); }
|
|
1203
1119
|
}
|
|
1204
1120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeReadonlyComponent, decorators: [{
|
|
1205
1121
|
type: Component,
|
|
@@ -1207,11 +1123,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1207
1123
|
KbqButtonModule,
|
|
1208
1124
|
KbqTitleModule,
|
|
1209
1125
|
KbqPipeState,
|
|
1210
|
-
KbqPipeTitleDirective,
|
|
1211
1126
|
KbqPipeMinWidth,
|
|
1212
1127
|
KbqPipeButton
|
|
1213
1128
|
], template: `
|
|
1214
|
-
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [
|
|
1129
|
+
<button kbq-button [disabled]="data.disabled" [kbqPipeState]="data" [kbq-title]="pipeTooltip">
|
|
1215
1130
|
<span #kbqTitleText class="kbq-pipe__name" kbqPipeMinWidth>{{ data.name }}</span>
|
|
1216
1131
|
<span #kbqTitleText class="kbq-pipe__value" kbqPipeMinWidth [class.kbq-pipe__value_empty]="!data.value">
|
|
1217
1132
|
{{ data.value }}
|
|
@@ -1231,18 +1146,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1231
1146
|
provide: KbqBasePipe,
|
|
1232
1147
|
useExisting: this
|
|
1233
1148
|
}
|
|
1234
|
-
], 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}.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"] }]
|
|
1235
1150
|
}] });
|
|
1236
1151
|
|
|
1237
1152
|
class KbqPipeSelectComponent extends KbqBasePipe {
|
|
1238
1153
|
constructor() {
|
|
1239
1154
|
super(...arguments);
|
|
1240
1155
|
/** control for search options */
|
|
1241
|
-
this.searchControl = new
|
|
1156
|
+
this.searchControl = new FormControl(null);
|
|
1242
1157
|
/** @docs-private */
|
|
1243
1158
|
this.select = viewChild.required(KbqSelect);
|
|
1244
1159
|
/** Comparator of selected options */
|
|
1245
|
-
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
|
+
};
|
|
1246
1167
|
}
|
|
1247
1168
|
/** selected value */
|
|
1248
1169
|
get selected() {
|
|
@@ -1254,7 +1175,10 @@ class KbqPipeSelectComponent extends KbqBasePipe {
|
|
|
1254
1175
|
}
|
|
1255
1176
|
/** @docs-private */
|
|
1256
1177
|
ngOnInit() {
|
|
1257
|
-
|
|
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));
|
|
1258
1182
|
}
|
|
1259
1183
|
ngAfterViewInit() {
|
|
1260
1184
|
super.ngAfterViewInit();
|
|
@@ -1266,23 +1190,19 @@ class KbqPipeSelectComponent extends KbqBasePipe {
|
|
|
1266
1190
|
this.data.value = item;
|
|
1267
1191
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
1268
1192
|
this.stateChanges.next();
|
|
1193
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1269
1194
|
}
|
|
1270
1195
|
/** opens select */
|
|
1271
1196
|
open() {
|
|
1272
1197
|
this.select().open();
|
|
1273
1198
|
}
|
|
1274
|
-
getFilteredOptions(value) {
|
|
1275
|
-
return value
|
|
1276
|
-
? this.values.filter((item) => item.name.toLowerCase().includes(value.toLowerCase()))
|
|
1277
|
-
: this.values;
|
|
1278
|
-
}
|
|
1279
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 }); }
|
|
1280
1200
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqPipeSelectComponent, isStandalone: true, selector: "kbq-pipe-select", providers: [
|
|
1281
1201
|
{
|
|
1282
1202
|
provide: KbqBasePipe,
|
|
1283
1203
|
useExisting: this
|
|
1284
1204
|
}
|
|
1285
|
-
], 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 [kbqPipeTitle]=\"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 [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: i8$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i8$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i8$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i8$1.KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.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: KbqPipeTitleDirective, selector: "[kbqPipeTitle]", inputs: ["kbqPipeTitle"], exportAs: ["kbqPipeTitle"] }, { 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: i3.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 }); }
|
|
1286
1206
|
}
|
|
1287
1207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeSelectComponent, decorators: [{
|
|
1288
1208
|
type: Component,
|
|
@@ -1293,7 +1213,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1293
1213
|
KbqPipeState,
|
|
1294
1214
|
KbqPipeButton,
|
|
1295
1215
|
KbqTitleModule,
|
|
1296
|
-
KbqPipeTitleDirective,
|
|
1297
1216
|
KbqPipeMinWidth,
|
|
1298
1217
|
NgTemplateOutlet,
|
|
1299
1218
|
KbqIcon,
|
|
@@ -1305,7 +1224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1305
1224
|
provide: KbqBasePipe,
|
|
1306
1225
|
useExisting: this
|
|
1307
1226
|
}
|
|
1308
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-select\n #select\n [compareWith]=\"compareByValue\"\n [disabled]=\"data.disabled\"\n [
|
|
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"] }]
|
|
1309
1228
|
}], propDecorators: { select: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqSelect), { isSignal: true }] }] } });
|
|
1310
1229
|
|
|
1311
1230
|
class KbqPipeTextComponent extends KbqBasePipe {
|
|
@@ -1340,7 +1259,8 @@ class KbqPipeTextComponent extends KbqBasePipe {
|
|
|
1340
1259
|
this.stateChanges.next();
|
|
1341
1260
|
this.control.markAsPristine();
|
|
1342
1261
|
this.popover().hide();
|
|
1343
|
-
this.filterBar?.onChangePipe.
|
|
1262
|
+
this.filterBar?.onChangePipe.emit(this.data);
|
|
1263
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1344
1264
|
}
|
|
1345
1265
|
/** @docs-private */
|
|
1346
1266
|
onKeydown($event) {
|
|
@@ -1363,7 +1283,7 @@ class KbqPipeTextComponent extends KbqBasePipe {
|
|
|
1363
1283
|
provide: KbqBasePipe,
|
|
1364
1284
|
useExisting: this
|
|
1365
1285
|
}
|
|
1366
|
-
], 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 [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 [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}.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: 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: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.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$1.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: 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 }); }
|
|
1367
1287
|
}
|
|
1368
1288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTextComponent, decorators: [{
|
|
1369
1289
|
type: Component,
|
|
@@ -1378,17 +1298,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1378
1298
|
ReactiveFormsModule,
|
|
1379
1299
|
KbqTitleModule,
|
|
1380
1300
|
KbqPipeState,
|
|
1381
|
-
KbqPipeTitleDirective,
|
|
1382
1301
|
KbqPipeMinWidth
|
|
1383
1302
|
], providers: [
|
|
1384
1303
|
{
|
|
1385
1304
|
provide: KbqBasePipe,
|
|
1386
1305
|
useExisting: this
|
|
1387
1306
|
}
|
|
1388
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<button\n kbq-button\n kbqPopover\n [disabled]=\"data.disabled\"\n [kbqPipeState]=\"data\"\n [
|
|
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"] }]
|
|
1389
1308
|
}], propDecorators: { popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqPopoverTrigger), { isSignal: true }] }] } });
|
|
1390
1309
|
|
|
1391
|
-
class KbqPipeTreeSelectComponent extends
|
|
1310
|
+
class KbqPipeTreeSelectComponent extends KbqTreeSelectPipeBase {
|
|
1392
1311
|
/** selected value */
|
|
1393
1312
|
get selected() {
|
|
1394
1313
|
return this.data.value;
|
|
@@ -1399,81 +1318,35 @@ class KbqPipeTreeSelectComponent extends KbqBasePipe {
|
|
|
1399
1318
|
}
|
|
1400
1319
|
constructor() {
|
|
1401
1320
|
super();
|
|
1402
|
-
/**
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
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
|
+
*/
|
|
1407
1326
|
this.updateTemplates = (templates) => {
|
|
1408
|
-
const template = templates?.find((
|
|
1327
|
+
const template = templates?.find((item) => getId(item) === getId(this.data));
|
|
1409
1328
|
if (template?.values) {
|
|
1410
|
-
this.values = template.values;
|
|
1411
|
-
this.valueTemplate = template.valueTemplate;
|
|
1412
1329
|
this.dataSource.data = template.values;
|
|
1413
1330
|
}
|
|
1414
1331
|
};
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
flatNode.name = node.name;
|
|
1418
|
-
flatNode.value = node.value;
|
|
1419
|
-
flatNode.parent = parent;
|
|
1420
|
-
flatNode.level = level;
|
|
1421
|
-
flatNode.expandable = !!node.children;
|
|
1422
|
-
return flatNode;
|
|
1423
|
-
};
|
|
1424
|
-
this.getLevel = (node) => {
|
|
1425
|
-
return node.level;
|
|
1426
|
-
};
|
|
1427
|
-
this.isExpandable = (node) => {
|
|
1428
|
-
return node.expandable;
|
|
1429
|
-
};
|
|
1430
|
-
this.getChildren = (node) => {
|
|
1431
|
-
return node.children;
|
|
1432
|
-
};
|
|
1433
|
-
this.getValue = (node) => {
|
|
1434
|
-
return node.value;
|
|
1435
|
-
};
|
|
1436
|
-
this.getViewValue = (node) => {
|
|
1437
|
-
return `${node.name}`;
|
|
1438
|
-
};
|
|
1439
|
-
this.treeFlattener = new KbqTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
|
|
1440
|
-
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable, this.getValue, this.getViewValue);
|
|
1441
|
-
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`.
|
|
1442
1334
|
this.filterBar?.internalTemplatesChanges.pipe(takeUntilDestroyed()).subscribe(this.updateTemplates);
|
|
1443
1335
|
}
|
|
1444
|
-
ngOnInit() {
|
|
1445
|
-
this.searchControl.valueChanges.subscribe((value) => this.treeControl.filterNodes(value));
|
|
1446
|
-
}
|
|
1447
|
-
ngAfterViewInit() {
|
|
1448
|
-
super.ngAfterViewInit();
|
|
1449
|
-
this.select()
|
|
1450
|
-
.closedStream.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1451
|
-
.subscribe(() => this.filterBar?.onClosePipe.emit(this.data));
|
|
1452
|
-
}
|
|
1453
|
-
hasChild(_, nodeData) {
|
|
1454
|
-
return nodeData.expandable;
|
|
1455
|
-
}
|
|
1456
1336
|
onSelect(item) {
|
|
1457
1337
|
this.data.value = item.value;
|
|
1458
1338
|
this.filterBar?.onChangePipe.emit(this.data);
|
|
1459
1339
|
this.select().close();
|
|
1460
|
-
setTimeout(() => this.
|
|
1340
|
+
setTimeout(() => this.restoreTriggerFocus());
|
|
1461
1341
|
this.stateChanges.next();
|
|
1462
1342
|
}
|
|
1463
|
-
/** opens select */
|
|
1464
|
-
open() {
|
|
1465
|
-
setTimeout(() => this.select().open());
|
|
1466
|
-
}
|
|
1467
|
-
onOpen() {
|
|
1468
|
-
this.treeControl.expandAll();
|
|
1469
|
-
}
|
|
1470
1343
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1471
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: [
|
|
1472
1345
|
{
|
|
1473
1346
|
provide: KbqBasePipe,
|
|
1474
1347
|
useExisting: this
|
|
1475
1348
|
}
|
|
1476
|
-
], viewQueries: [{ propertyName: "select", first: true, predicate: KbqTreeSelect, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [kbqPipeTitle]=\"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 <!-- eslint-disable-next-line @angular-eslint/template/prefer-control-flow -->\n <kbq-form-field *ngIf=\"data.search\" 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 [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 [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}.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: 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: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqInputModule }, { kind: "directive", type: i3.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i4.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: i6$1.KbqTreeNodeDef, selector: "[kbqTreeNodeDef]", inputs: ["kbqTreeNodeDefWhen", "kbqTreeNode"] }, { kind: "directive", type: i6$1.KbqTreeNodePadding, selector: "[kbqTreeNodePadding]", inputs: ["kbqTreeNodePaddingIndent"], exportAs: ["kbqTreeNodePadding"] }, { kind: "component", type: i6$1.KbqTreeSelection, selector: "kbq-tree-selection", inputs: ["treeControl", "autoSelect", "noUnselectLast", "disabled", "tabIndex"], outputs: ["navigationChange", "selectionChange", "onSelectAll", "onCopy"], exportAs: ["kbqTreeSelection"] }, { kind: "component", type: i6$1.KbqTreeOption, selector: "kbq-tree-option", inputs: ["checkboxThirdState", "disabled", "selectable", "showCheckbox"], outputs: ["onSelectionChange"], exportAs: ["kbqTreeOption"] }, { kind: "component", type: i6$1.KbqTreeNodeToggleComponent, selector: "kbq-tree-node-toggle", exportAs: ["kbqTreeNodeToggle"] }, { kind: "ngmodule", type: KbqTreeSelectModule }, { kind: "component", type: i7$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: i8$1.KbqSelectSearch, selector: "[kbqSelectSearch]", exportAs: ["kbqSelectSearch"] }, { kind: "directive", type: i8$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "directive", type: i8$1.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: "pipe", type: i8$1.KbqHighlightPipe, name: "mcHighlight" }], 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 }); }
|
|
1477
1350
|
}
|
|
1478
1351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeTreeSelectComponent, decorators: [{
|
|
1479
1352
|
type: Component,
|
|
@@ -1483,7 +1356,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1483
1356
|
KbqPipeState,
|
|
1484
1357
|
KbqPipeButton,
|
|
1485
1358
|
KbqTitleModule,
|
|
1486
|
-
KbqPipeTitleDirective,
|
|
1487
1359
|
KbqPipeMinWidth,
|
|
1488
1360
|
KbqIconModule,
|
|
1489
1361
|
KbqInputModule,
|
|
@@ -1491,20 +1363,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1491
1363
|
KbqHighlightModule,
|
|
1492
1364
|
KbqTreeModule,
|
|
1493
1365
|
KbqTreeSelectModule,
|
|
1494
|
-
NgIf,
|
|
1495
1366
|
FormsModule
|
|
1496
1367
|
], providers: [
|
|
1497
1368
|
{
|
|
1498
1369
|
provide: KbqBasePipe,
|
|
1499
1370
|
useExisting: this
|
|
1500
1371
|
}
|
|
1501
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<kbq-tree-select\n #select\n [autoSelect]=\"false\"\n [disabled]=\"data.disabled\"\n [
|
|
1502
|
-
}], ctorParameters: () => []
|
|
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: () => [] });
|
|
1503
1374
|
|
|
1504
|
-
/**
|
|
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
|
+
*/
|
|
1505
1381
|
const KBQ_FILTER_BAR_DEFAULT_CONFIGURATION = ruRULocaleData.filterBar;
|
|
1506
1382
|
/** Injection Token for providing configuration of filter-bar */
|
|
1507
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');
|
|
1508
1389
|
/** Injection Token for providing pipes in filter-bar */
|
|
1509
1390
|
const KBQ_FILTER_BAR_PIPES = new InjectionToken('kbq-filter-bar-pipes');
|
|
1510
1391
|
/** Utility provider for `KBQ_FILTER_BAR_PIPES`. */
|
|
@@ -1554,10 +1435,11 @@ class KbqTreeSelectFlatNode {
|
|
|
1554
1435
|
function kbqBuildTree(value, level) {
|
|
1555
1436
|
const data = [];
|
|
1556
1437
|
for (const [k, v] of Object.entries(value)) {
|
|
1438
|
+
const isBranch = typeof v === 'object' && v !== null && !v['value'];
|
|
1557
1439
|
data.push({
|
|
1558
1440
|
name: k.toString(),
|
|
1559
1441
|
value: v,
|
|
1560
|
-
children:
|
|
1442
|
+
children: isBranch ? kbqBuildTree(v, level + 1) : null
|
|
1561
1443
|
});
|
|
1562
1444
|
}
|
|
1563
1445
|
return data;
|
|
@@ -1565,8 +1447,8 @@ function kbqBuildTree(value, level) {
|
|
|
1565
1447
|
|
|
1566
1448
|
class KbqFilterReset {
|
|
1567
1449
|
constructor() {
|
|
1568
|
-
/** KbqFilterBar
|
|
1569
|
-
this.filterBar = inject(
|
|
1450
|
+
/** KbqFilterBar host seam */
|
|
1451
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
1570
1452
|
/** Event that is generated whenever the user reset a filter. */
|
|
1571
1453
|
this.onResetFilter = output();
|
|
1572
1454
|
}
|
|
@@ -1576,8 +1458,7 @@ class KbqFilterReset {
|
|
|
1576
1458
|
return this.filterBar.configuration.reset.buttonName;
|
|
1577
1459
|
}
|
|
1578
1460
|
resetFilter() {
|
|
1579
|
-
this.onResetFilter.emit(this.filterBar.filter);
|
|
1580
|
-
this.filterBar.changes.next();
|
|
1461
|
+
this.onResetFilter.emit(this.filterBar.filter());
|
|
1581
1462
|
this.filterBar.onResetFilter.next(true);
|
|
1582
1463
|
}
|
|
1583
1464
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterReset, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1607,14 +1488,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1607
1488
|
class KbqFilterBarButton {
|
|
1608
1489
|
constructor() {
|
|
1609
1490
|
this.button = inject(KbqButton);
|
|
1610
|
-
/** KbqFilterBar
|
|
1611
|
-
this.filterBar = inject(
|
|
1491
|
+
/** KbqFilterBar host seam */
|
|
1492
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
1612
1493
|
/** KbqFilters instance */
|
|
1613
1494
|
this.filters = inject(KbqFilters);
|
|
1614
|
-
|
|
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();
|
|
1615
1499
|
this.button.kbqStyle = KbqButtonStyles.Outline;
|
|
1616
1500
|
this.button.color = KbqComponentColors.ContrastFade;
|
|
1617
|
-
if (
|
|
1501
|
+
if (filter?.changed || filter?.saved) {
|
|
1618
1502
|
this.button.kbqStyle = 'changed-filter';
|
|
1619
1503
|
this.button.color = KbqComponentColors.Empty;
|
|
1620
1504
|
}
|
|
@@ -1638,37 +1522,278 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1638
1522
|
}]
|
|
1639
1523
|
}], ctorParameters: () => [] });
|
|
1640
1524
|
|
|
1641
|
-
|
|
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
|
+
}
|
|
1642
1574
|
/** header of popover. Depends on the mode */
|
|
1643
1575
|
get popoverHeader() {
|
|
1644
1576
|
return this.saveNewFilter ? this.localeData.saveAsNew : this.localeData.saveChanges;
|
|
1645
1577
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
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();
|
|
1649
1584
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1585
|
+
openSaveAsNewFilterPopover() {
|
|
1586
|
+
this.saveNewFilter = true;
|
|
1587
|
+
this.preparePopover();
|
|
1653
1588
|
}
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1589
|
+
openChangeFilterNamePopover() {
|
|
1590
|
+
this.saveNewFilter = false;
|
|
1591
|
+
this.preparePopover();
|
|
1657
1592
|
}
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
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();
|
|
1661
1618
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
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;
|
|
1666
1625
|
}
|
|
1667
|
-
/**
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
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();
|
|
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();
|
|
1671
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 {
|
|
1672
1797
|
constructor() {
|
|
1673
1798
|
/** @docs-private */
|
|
1674
1799
|
this.elementRef = inject(ElementRef);
|
|
@@ -1698,21 +1823,26 @@ class KbqFilters {
|
|
|
1698
1823
|
this.dropdown = viewChild.required(KbqDropdownTrigger);
|
|
1699
1824
|
/** @docs-private */
|
|
1700
1825
|
this.filterActionsDropdown = viewChild('filterActionsButton', ...(ngDevMode ? [{ debugName: "filterActionsDropdown" }] : []));
|
|
1826
|
+
/** @docs-private */
|
|
1827
|
+
this.savePopover = viewChild.required(KbqFilterSavePopover);
|
|
1701
1828
|
this.search = viewChild.required('search');
|
|
1702
|
-
this.newFilterName = viewChild.required('newFilterName');
|
|
1703
|
-
this.saveFilterButton = viewChild.required('saveFilterButton');
|
|
1704
1829
|
/** control for search filter */
|
|
1705
|
-
this.searchControl = new
|
|
1830
|
+
this.searchControl = new FormControl(null);
|
|
1706
1831
|
/** @docs-private */
|
|
1707
1832
|
this.popoverSize = PopUpSizes.Medium;
|
|
1708
1833
|
/** @docs-private */
|
|
1709
1834
|
this.popoverOffset = 4;
|
|
1710
|
-
this.
|
|
1711
|
-
this.isSaving = false;
|
|
1712
|
-
this.filters = input(undefined, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1835
|
+
this.filters = input.required(...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1713
1836
|
/** Event that is generated whenever the user selects a filter. */
|
|
1714
1837
|
this.onSelectFilter = output();
|
|
1715
|
-
/**
|
|
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
|
+
*/
|
|
1716
1846
|
this.onSave = output();
|
|
1717
1847
|
/** Event that is generated whenever the user change a filter. */
|
|
1718
1848
|
this.onChangeFilter = output();
|
|
@@ -1721,14 +1851,32 @@ class KbqFilters {
|
|
|
1721
1851
|
/** Event that is generated whenever the user reset a filter changes. */
|
|
1722
1852
|
this.onResetFilterChanges = output();
|
|
1723
1853
|
this._focusOrigin = null;
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
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;
|
|
1732
1880
|
}
|
|
1733
1881
|
ngOnInit() {
|
|
1734
1882
|
this.filteredOptions = merge(of(this.filters()), this.searchControl.valueChanges.pipe(map((value) => this.getFilteredOptions(value))));
|
|
@@ -1742,81 +1890,48 @@ class KbqFilters {
|
|
|
1742
1890
|
return this.focusedElementBeforeOpen === button;
|
|
1743
1891
|
}
|
|
1744
1892
|
selectFilter(filter) {
|
|
1745
|
-
|
|
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 })) });
|
|
1746
1899
|
this.onSelectFilter.emit(filter);
|
|
1747
1900
|
}
|
|
1748
1901
|
saveChanges() {
|
|
1749
|
-
|
|
1902
|
+
const current = this.filterBar.filter();
|
|
1903
|
+
if (!current)
|
|
1750
1904
|
return;
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
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);
|
|
1754
1909
|
this.onSave.emit({
|
|
1755
|
-
filter:
|
|
1910
|
+
filter: updated,
|
|
1756
1911
|
filterBar: this.filterBar,
|
|
1757
1912
|
status: KbqSaveFilterStatuses.OnlyChanges
|
|
1758
1913
|
});
|
|
1759
1914
|
}
|
|
1760
|
-
saveAsNew(event) {
|
|
1761
|
-
if (this.filterName.invalid)
|
|
1762
|
-
return;
|
|
1763
|
-
const name = this.filterName.value || '';
|
|
1764
|
-
// @todo default filter
|
|
1765
|
-
const filter = structuredClone(this.filter) || { pipes: [] };
|
|
1766
|
-
filter.name = name;
|
|
1767
|
-
filter.saved = true;
|
|
1768
|
-
filter.changed = false;
|
|
1769
|
-
this.isSaving = true;
|
|
1770
|
-
this.popover().preventClose = true;
|
|
1771
|
-
this.filterName.disable();
|
|
1772
|
-
if (this.saveNewFilter) {
|
|
1773
|
-
this.onSave.emit({ filter, filterBar: this.filterBar, status: KbqSaveFilterStatuses.NewFilter });
|
|
1774
|
-
}
|
|
1775
|
-
else {
|
|
1776
|
-
this.onSave.emit({ filter, filterBar: this.filterBar, status: KbqSaveFilterStatuses.NewName });
|
|
1777
|
-
}
|
|
1778
|
-
event?.preventDefault();
|
|
1779
|
-
}
|
|
1780
|
-
showError(error) {
|
|
1781
|
-
if (error?.nameAlreadyExists) {
|
|
1782
|
-
this.filterName.setErrors({ filterNameAlreadyExist: true });
|
|
1783
|
-
}
|
|
1784
|
-
this.showFilterSavingError = true;
|
|
1785
|
-
this.filterSavingErrorText = error?.text ?? this.filterBar.configuration.filters.errorHint;
|
|
1786
|
-
}
|
|
1787
1915
|
restoreFocus() {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
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);
|
|
1791
1922
|
}
|
|
1792
|
-
|
|
1793
|
-
preparePopover() {
|
|
1794
|
-
this.filterName = new FormControl(this.filter?.name || '', Validators.required);
|
|
1795
|
-
this.filterName.valueChanges.pipe(distinctUntilChanged()).subscribe(() => (this.showFilterSavingError = false));
|
|
1796
|
-
this.popover().show();
|
|
1797
|
-
merge(...this.popover().defaultClosingActions())
|
|
1798
|
-
.pipe(filter(() => !this.isSaving), takeUntilDestroyed(this.popover().instanceDestroyRef))
|
|
1799
|
-
.subscribe(() => this.closePopover(false));
|
|
1800
|
-
this.popover()
|
|
1801
|
-
.visibleChange.pipe(filter((state) => !state), takeUntilDestroyed(this.popover().instanceDestroyRef))
|
|
1802
|
-
.subscribe(this.closePopover);
|
|
1803
|
-
setTimeout(() => {
|
|
1804
|
-
this.newFilterName().nativeElement.focus();
|
|
1805
|
-
this.filterName.setErrors(null);
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
openSaveAsNewFilterPopover() {
|
|
1809
|
-
this.saveNewFilter = true;
|
|
1810
|
-
this.preparePopover();
|
|
1811
|
-
}
|
|
1812
|
-
openChangeFilterNamePopover() {
|
|
1813
|
-
this.saveNewFilter = false;
|
|
1814
|
-
this.preparePopover();
|
|
1923
|
+
this.focusedElementBeforeOpen = null;
|
|
1815
1924
|
}
|
|
1816
1925
|
/** @docs-private */
|
|
1817
1926
|
saveFocusedElement(button) {
|
|
1818
1927
|
this.focusedElementBeforeOpen = button || null;
|
|
1819
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
|
+
}
|
|
1820
1935
|
/** @docs-private */
|
|
1821
1936
|
stopEventPropagation(event) {
|
|
1822
1937
|
event.stopPropagation();
|
|
@@ -1846,30 +1961,85 @@ class KbqFilters {
|
|
|
1846
1961
|
/** Hide the popup and restore focus.
|
|
1847
1962
|
* Use this method in the onSave or onChangeFilter events after the data has been successfully saved. */
|
|
1848
1963
|
filterSavedSuccessfully() {
|
|
1849
|
-
|
|
1850
|
-
this.isSaving = false;
|
|
1851
|
-
popover.preventClose = false;
|
|
1852
|
-
popover.hide();
|
|
1964
|
+
this.savePopover().savedSuccessfully();
|
|
1853
1965
|
setTimeout(() => this.restoreFocus(), 0);
|
|
1854
1966
|
this.changeDetectorRef.markForCheck();
|
|
1855
1967
|
}
|
|
1856
1968
|
/** Shows an error. Use this method in the onSave or onChangeFilter events if saving data failed. */
|
|
1857
1969
|
filterSavedUnsuccessfully(error) {
|
|
1858
|
-
|
|
1859
|
-
|
|
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();
|
|
1860
1974
|
this.showError(error);
|
|
1861
|
-
this.filterName.enable();
|
|
1862
|
-
setTimeout(() => this.saveFilterButton().focus());
|
|
1863
1975
|
this.changeDetectorRef.markForCheck();
|
|
1864
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
|
+
}
|
|
1865
2036
|
getFilteredOptions(value) {
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
? this.filters().filter((filter) => filter.name.toLowerCase().includes(searchFilter.toLowerCase()))
|
|
2037
|
+
return value
|
|
2038
|
+
? this.filters().filter((filter) => filter.name.toLowerCase().includes(value.toLowerCase()))
|
|
1869
2039
|
: this.filters();
|
|
1870
2040
|
}
|
|
1871
2041
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilters, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1872
|
-
/** @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: false, 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: "search", first: true, predicate: ["search"], descendants: true, isSignal: true }, { propertyName: "newFilterName", first: true, predicate: ["newFilterName"], descendants: true, isSignal: true }, { propertyName: "saveFilterButton", first: true, predicate: ["saveFilterButton"], descendants: true, isSignal: 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 [class]=\"{ '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 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 [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 [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)=\"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", "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: KbqInputModule }, { kind: "directive", type: i3.KbqInput, selector: "input[kbqInput],input[kbqNumberInput]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "type", "value"], exportAs: ["kbqInput"] }, { kind: "component", type: i4.KbqCleaner, selector: "kbq-cleaner", exportAs: ["kbqCleaner"] }, { kind: "component", type: i4.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i4.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "component", type: i4.KbqError, selector: "kbq-error", exportAs: ["kbqError"] }, { kind: "directive", type: i4.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.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: i8$1.KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", exportAs: ["kbqForm"] }, { kind: "directive", type: i8$1.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"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
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 }); }
|
|
1873
2043
|
}
|
|
1874
2044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilters, decorators: [{
|
|
1875
2045
|
type: Component,
|
|
@@ -1887,61 +2057,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1887
2057
|
KbqPopoverModule,
|
|
1888
2058
|
FormsModule,
|
|
1889
2059
|
KbqFormsModule,
|
|
1890
|
-
|
|
2060
|
+
KbqFilterSavePopover
|
|
1891
2061
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1892
2062
|
class: 'kbq-filters'
|
|
1893
|
-
}, exportAs: 'kbqFilters', 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 [class]=\"{ '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 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 [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 [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)=\"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"] }]
|
|
1894
|
-
}],
|
|
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"] }] } });
|
|
1895
2065
|
|
|
1896
2066
|
class KbqFilterBar {
|
|
1897
|
-
/** Filter that is currently selected */
|
|
1898
|
-
// TODO: Skipped for migration because:
|
|
1899
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1900
|
-
get filter() {
|
|
1901
|
-
return this._filter;
|
|
1902
|
-
}
|
|
1903
|
-
set filter(value) {
|
|
1904
|
-
if (this._filter === value)
|
|
1905
|
-
return;
|
|
1906
|
-
this._filter = value;
|
|
1907
|
-
this.changes.next();
|
|
1908
|
-
}
|
|
1909
|
-
/** An array of templates that are used when adding a pipe. Also contains lists of options to select (values). */
|
|
1910
|
-
// TODO: Skipped for migration because:
|
|
1911
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1912
|
-
get pipeTemplates() {
|
|
1913
|
-
return this._templates;
|
|
1914
|
-
}
|
|
1915
|
-
set pipeTemplates(value) {
|
|
1916
|
-
this._templates = value;
|
|
1917
|
-
this.internalTemplatesChanges.next(this._templates);
|
|
1918
|
-
}
|
|
1919
|
-
/** Whether the current filter is saved and changed */
|
|
1920
|
-
get isSavedAndChanged() {
|
|
1921
|
-
return this.isSaved && this.isChanged;
|
|
1922
|
-
}
|
|
1923
|
-
/** Whether the current filter is saved */
|
|
1924
|
-
get isSaved() {
|
|
1925
|
-
return !!this.filter?.saved;
|
|
1926
|
-
}
|
|
1927
|
-
/** Whether the current filter is changed */
|
|
1928
|
-
get isChanged() {
|
|
1929
|
-
return !!this.filter?.changed;
|
|
1930
|
-
}
|
|
1931
|
-
/** Whether the current filter is readonly */
|
|
1932
|
-
get isReadOnly() {
|
|
1933
|
-
return !!this.filter?.readonly;
|
|
1934
|
-
}
|
|
1935
|
-
/** Whether the current filter is disabled */
|
|
1936
|
-
get isDisabled() {
|
|
1937
|
-
return !!this.filter?.disabled;
|
|
1938
|
-
}
|
|
1939
2067
|
constructor() {
|
|
1940
2068
|
/** @docs-private */
|
|
1941
2069
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1942
2070
|
/** @docs-private */
|
|
1943
2071
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
1944
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;
|
|
1945
2075
|
/** @docs-private */
|
|
1946
2076
|
this.filters = contentChild(KbqFilters, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
1947
2077
|
/** @docs-private */
|
|
@@ -1951,26 +2081,41 @@ class KbqFilterBar {
|
|
|
1951
2081
|
* Default is true
|
|
1952
2082
|
* */
|
|
1953
2083
|
this.selectedAllEqualsSelectedNothing = input(true, ...(ngDevMode ? [{ debugName: "selectedAllEqualsSelectedNothing", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
1954
|
-
this._templates = [];
|
|
1955
2084
|
/**
|
|
1956
|
-
*
|
|
1957
|
-
*
|
|
1958
|
-
*
|
|
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.
|
|
1959
2088
|
*/
|
|
1960
|
-
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" }] : []));
|
|
1961
2092
|
/** Event that emits whenever the value of the pipe changes. */
|
|
1962
|
-
this.onChangePipe =
|
|
2093
|
+
this.onChangePipe = output();
|
|
1963
2094
|
/** Event that emits whenever the pipe deleted. */
|
|
1964
2095
|
this.onRemovePipe = output();
|
|
1965
2096
|
/** Event that emits whenever the pipe cleared. */
|
|
1966
2097
|
this.onClearPipe = output();
|
|
1967
2098
|
/** Event that emits whenever the select or multiselect pipe closed. */
|
|
1968
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" }] : []));
|
|
1969
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);
|
|
1970
2117
|
/** Event that emits whenever the filter is reset. */
|
|
1971
2118
|
this.onResetFilter = new BehaviorSubject(false);
|
|
1972
|
-
/** all changes */
|
|
1973
|
-
this.changes = new BehaviorSubject(undefined);
|
|
1974
2119
|
/** internal filter changes */
|
|
1975
2120
|
this.internalFilterChanges = new BehaviorSubject(null);
|
|
1976
2121
|
/** internal changes in templates */
|
|
@@ -1982,52 +2127,76 @@ class KbqFilterBar {
|
|
|
1982
2127
|
this.configuration = this.externalConfiguration || this.localeService?.getParams('filterBar');
|
|
1983
2128
|
this.changeDetectorRef.markForCheck();
|
|
1984
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()));
|
|
1985
2133
|
this.internalFilterChanges.pipe(takeUntilDestroyed()).subscribe((filter) => {
|
|
1986
|
-
|
|
1987
|
-
this.
|
|
2134
|
+
// `model.set(...)` auto-emits `filterChange` for the two-way binding.
|
|
2135
|
+
this.filter.set(filter);
|
|
1988
2136
|
});
|
|
1989
2137
|
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
|
|
1990
2138
|
if (!this.localeService) {
|
|
1991
2139
|
this.initDefaultParams();
|
|
1992
2140
|
}
|
|
1993
|
-
|
|
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)
|
|
1994
2146
|
.pipe(takeUntilDestroyed())
|
|
1995
2147
|
.subscribe(() => {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
this.
|
|
2148
|
+
const current = this.filter();
|
|
2149
|
+
if (current) {
|
|
2150
|
+
this.filter.set({ ...current, changed: true });
|
|
1999
2151
|
}
|
|
2000
2152
|
});
|
|
2001
|
-
merge(outputToObservable(this.filterChange), this.onChangePipe, outputToObservable(this.onRemovePipe), this.internalFilterChanges)
|
|
2002
|
-
.pipe(takeUntilDestroyed())
|
|
2003
|
-
.subscribe(() => {
|
|
2004
|
-
this.changes.next();
|
|
2005
|
-
this.changeDetectorRef.markForCheck();
|
|
2006
|
-
});
|
|
2007
2153
|
}
|
|
2008
2154
|
/** Remove pipe from current filter and emit event */
|
|
2009
2155
|
removePipe(pipe) {
|
|
2010
|
-
this.filter
|
|
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) });
|
|
2011
2164
|
this.onRemovePipe.emit(pipe);
|
|
2012
|
-
this.changes.next();
|
|
2013
2165
|
}
|
|
2014
|
-
/**
|
|
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
|
+
*/
|
|
2015
2173
|
saveFilterState(filter) {
|
|
2016
|
-
this.savedFilter = structuredClone(filter ?? this.filter);
|
|
2174
|
+
this.savedFilter = structuredClone(filter ?? this.filter());
|
|
2017
2175
|
}
|
|
2018
|
-
/**
|
|
2176
|
+
/**
|
|
2177
|
+
* Restore previously saved filter state.
|
|
2178
|
+
*
|
|
2179
|
+
* @see `saveFilterState` — pipe `value` payloads must be structured-cloneable.
|
|
2180
|
+
*/
|
|
2019
2181
|
restoreFilterState(filter) {
|
|
2020
|
-
|
|
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));
|
|
2021
2187
|
}
|
|
2022
2188
|
/** Set the filter state "changed" to false */
|
|
2023
2189
|
resetFilterChangedState() {
|
|
2024
|
-
this.filter
|
|
2190
|
+
const current = this.filter();
|
|
2191
|
+
if (!current)
|
|
2192
|
+
return;
|
|
2193
|
+
this.filter.set({ ...current, changed: false });
|
|
2025
2194
|
}
|
|
2026
2195
|
initDefaultParams() {
|
|
2027
2196
|
this.configuration = KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
2028
2197
|
}
|
|
2029
2198
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2030
|
-
/** @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:
|
|
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: `
|
|
2031
2200
|
<div class="kbq-filter-bar__left">
|
|
2032
2201
|
<ng-content select="kbq-filters" />
|
|
2033
2202
|
|
|
@@ -2043,7 +2212,7 @@ class KbqFilterBar {
|
|
|
2043
2212
|
|
|
2044
2213
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
2045
2214
|
</div>
|
|
2046
|
-
`, 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 }); }
|
|
2047
2216
|
}
|
|
2048
2217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBar, decorators: [{
|
|
2049
2218
|
type: Component,
|
|
@@ -2063,49 +2232,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2063
2232
|
|
|
2064
2233
|
<ng-content select="kbq-filter-refresher, [kbq-filter-refresher]" />
|
|
2065
2234
|
</div>
|
|
2066
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2235
|
+
`, providers: [{ provide: KBQ_FILTER_BAR_HOST, useExisting: forwardRef((() => KbqFilterBar)) }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2067
2236
|
class: 'kbq-filter-bar'
|
|
2068
|
-
}, 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-
|
|
2069
|
-
}], 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: [{
|
|
2070
|
-
type: Input
|
|
2071
|
-
}], pipeTemplates: [{
|
|
2072
|
-
type: Input
|
|
2073
|
-
}], filterChange: [{ type: i0.Output, args: ["filterChange"] }], onChangePipe: [{
|
|
2074
|
-
type: Output
|
|
2075
|
-
}], onRemovePipe: [{ type: i0.Output, args: ["onRemovePipe"] }], onClearPipe: [{ type: i0.Output, args: ["onClearPipe"] }], onClosePipe: [{ type: i0.Output, args: ["onClosePipe"] }] } });
|
|
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"] }] } });
|
|
2076
2239
|
|
|
2077
|
-
class
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2240
|
+
class KbqFilterRefresher {
|
|
2241
|
+
constructor() {
|
|
2242
|
+
/** KbqFilterBar host seam */
|
|
2243
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST, { optional: true });
|
|
2244
|
+
}
|
|
2245
|
+
/** localized data
|
|
2246
|
+
* @docs-private */
|
|
2247
|
+
get localeData() {
|
|
2248
|
+
return this.filterBar?.configuration ?? KBQ_FILTER_BAR_DEFAULT_CONFIGURATION;
|
|
2249
|
+
}
|
|
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
|
+
<button
|
|
2253
|
+
kbq-button
|
|
2254
|
+
[color]="'contrast'"
|
|
2255
|
+
[kbqStyle]="'transparent'"
|
|
2256
|
+
[attr.aria-label]="localeData.refresher.refresh"
|
|
2257
|
+
>
|
|
2258
|
+
<i kbq-icon="kbq-arrow-rotate-right_16" aria-hidden="true"></i>
|
|
2082
2259
|
</button>
|
|
2083
|
-
<button
|
|
2084
|
-
|
|
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>
|
|
2085
2267
|
</button>
|
|
2086
|
-
`, 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: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
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 }); }
|
|
2087
2269
|
}
|
|
2088
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type:
|
|
2270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterRefresher, decorators: [{
|
|
2089
2271
|
type: Component,
|
|
2090
2272
|
args: [{ selector: 'kbq-filter-refresher, [kbq-filter-refresher]', imports: [
|
|
2091
2273
|
KbqButtonModule,
|
|
2092
2274
|
KbqIconModule
|
|
2093
2275
|
], template: `
|
|
2094
|
-
<button
|
|
2095
|
-
|
|
2276
|
+
<button
|
|
2277
|
+
kbq-button
|
|
2278
|
+
[color]="'contrast'"
|
|
2279
|
+
[kbqStyle]="'transparent'"
|
|
2280
|
+
[attr.aria-label]="localeData.refresher.refresh"
|
|
2281
|
+
>
|
|
2282
|
+
<i kbq-icon="kbq-arrow-rotate-right_16" aria-hidden="true"></i>
|
|
2096
2283
|
</button>
|
|
2097
|
-
<button
|
|
2098
|
-
|
|
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>
|
|
2099
2291
|
</button>
|
|
2100
2292
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2101
2293
|
class: 'kbq-filter-refresher'
|
|
2102
|
-
}, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:64px}\n"] }]
|
|
2294
|
+
}, styles: [".kbq-filter-refresher{display:flex;align-items:center;min-width:var(--kbq-filter-bar-refresher-min-width, 64px)}\n"] }]
|
|
2103
2295
|
}] });
|
|
2104
2296
|
|
|
2105
2297
|
class KbqPipeAdd {
|
|
2106
2298
|
constructor() {
|
|
2107
2299
|
/** KbqFilterBar instance */
|
|
2108
|
-
this.filterBar = inject(
|
|
2300
|
+
this.filterBar = inject(KBQ_FILTER_BAR_HOST);
|
|
2109
2301
|
/** @docs-private */
|
|
2110
2302
|
this.select = viewChild.required(KbqSelect);
|
|
2111
2303
|
/** Event that is generated after add pipe. */
|
|
@@ -2119,13 +2311,16 @@ class KbqPipeAdd {
|
|
|
2119
2311
|
changed: false,
|
|
2120
2312
|
saved: false
|
|
2121
2313
|
}, ...(ngDevMode ? [{ debugName: "filterTemplate" }] : []));
|
|
2122
|
-
/**
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
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" }] : []));
|
|
2129
2324
|
}
|
|
2130
2325
|
addPipeFromTemplate(option) {
|
|
2131
2326
|
if (option.selected) {
|
|
@@ -2133,13 +2328,25 @@ class KbqPipeAdd {
|
|
|
2133
2328
|
}
|
|
2134
2329
|
else {
|
|
2135
2330
|
option.select();
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
this.filterBar.filter.
|
|
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
|
+
});
|
|
2141
2343
|
this.onAddPipe.emit(option.value);
|
|
2142
|
-
this.filterBar.
|
|
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));
|
|
2143
2350
|
}
|
|
2144
2351
|
this.select().close();
|
|
2145
2352
|
}
|
|
@@ -2153,31 +2360,37 @@ class KbqPipeAdd {
|
|
|
2153
2360
|
}
|
|
2154
2361
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeAdd, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2155
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: `
|
|
2156
|
-
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes" [compareWith]="compareWith">
|
|
2363
|
+
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes()" [compareWith]="compareWith">
|
|
2157
2364
|
<button
|
|
2158
2365
|
kbqTooltip="{{ filterBar.configuration.add.tooltip }}"
|
|
2159
2366
|
kbq-button
|
|
2160
2367
|
kbq-select-matcher
|
|
2368
|
+
[attr.aria-label]="filterBar.configuration.add.tooltip"
|
|
2161
2369
|
[color]="'contrast-fade'"
|
|
2162
2370
|
[kbqStyle]="'outline'"
|
|
2163
2371
|
[class]="{ 'kbq-active': select.panelOpen }"
|
|
2164
2372
|
>
|
|
2165
|
-
<i kbq-icon="kbq-plus_16"></i>
|
|
2373
|
+
<i kbq-icon="kbq-plus_16" aria-hidden="true"></i>
|
|
2166
2374
|
</button>
|
|
2167
2375
|
|
|
2168
|
-
@for (template of filterBar.pipeTemplates; track template) {
|
|
2376
|
+
@for (template of filterBar.pipeTemplates(); track template) {
|
|
2169
2377
|
<kbq-option
|
|
2170
2378
|
#option
|
|
2171
2379
|
[userSelect]="true"
|
|
2172
2380
|
[value]="template"
|
|
2173
2381
|
[showCheckbox]="false"
|
|
2174
2382
|
(click)="addPipeFromTemplate(option)"
|
|
2383
|
+
(keydown.enter)="addPipeFromTemplate(option)"
|
|
2384
|
+
(keydown.space)="addPipeFromTemplate(option)"
|
|
2175
2385
|
>
|
|
2176
2386
|
{{ template.name }}
|
|
2177
2387
|
</kbq-option>
|
|
2178
2388
|
}
|
|
2179
2389
|
</kbq-select>
|
|
2180
|
-
|
|
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 }); }
|
|
2181
2394
|
}
|
|
2182
2395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqPipeAdd, decorators: [{
|
|
2183
2396
|
type: Component,
|
|
@@ -2189,34 +2402,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2189
2402
|
KbqOptionModule,
|
|
2190
2403
|
KbqSelectModule
|
|
2191
2404
|
], template: `
|
|
2192
|
-
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes" [compareWith]="compareWith">
|
|
2405
|
+
<kbq-select #select [tabIndex]="-1" [multiple]="true" [value]="addedPipes()" [compareWith]="compareWith">
|
|
2193
2406
|
<button
|
|
2194
2407
|
kbqTooltip="{{ filterBar.configuration.add.tooltip }}"
|
|
2195
2408
|
kbq-button
|
|
2196
2409
|
kbq-select-matcher
|
|
2410
|
+
[attr.aria-label]="filterBar.configuration.add.tooltip"
|
|
2197
2411
|
[color]="'contrast-fade'"
|
|
2198
2412
|
[kbqStyle]="'outline'"
|
|
2199
2413
|
[class]="{ 'kbq-active': select.panelOpen }"
|
|
2200
2414
|
>
|
|
2201
|
-
<i kbq-icon="kbq-plus_16"></i>
|
|
2415
|
+
<i kbq-icon="kbq-plus_16" aria-hidden="true"></i>
|
|
2202
2416
|
</button>
|
|
2203
2417
|
|
|
2204
|
-
@for (template of filterBar.pipeTemplates; track template) {
|
|
2418
|
+
@for (template of filterBar.pipeTemplates(); track template) {
|
|
2205
2419
|
<kbq-option
|
|
2206
2420
|
#option
|
|
2207
2421
|
[userSelect]="true"
|
|
2208
2422
|
[value]="template"
|
|
2209
2423
|
[showCheckbox]="false"
|
|
2210
2424
|
(click)="addPipeFromTemplate(option)"
|
|
2425
|
+
(keydown.enter)="addPipeFromTemplate(option)"
|
|
2426
|
+
(keydown.space)="addPipeFromTemplate(option)"
|
|
2211
2427
|
>
|
|
2212
2428
|
{{ template.name }}
|
|
2213
2429
|
</kbq-option>
|
|
2214
2430
|
}
|
|
2215
2431
|
</kbq-select>
|
|
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>
|
|
2216
2435
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2217
2436
|
class: 'kbq-pipe-add'
|
|
2218
2437
|
}, styles: [".kbq-pipe-add .kbq-select .kbq-select__trigger{height:unset}\n"] }]
|
|
2219
|
-
}],
|
|
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 }] }] } });
|
|
2220
2439
|
|
|
2221
2440
|
class KbqPipeDirective {
|
|
2222
2441
|
constructor() {
|
|
@@ -2251,39 +2470,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2251
2470
|
const COMPONENTS = [
|
|
2252
2471
|
KbqFilterBar,
|
|
2253
2472
|
KbqFilters,
|
|
2254
|
-
|
|
2473
|
+
KbqFilterRefresher,
|
|
2255
2474
|
KbqFilterBarButton,
|
|
2256
2475
|
KbqFilterReset,
|
|
2257
2476
|
KbqPipeAdd,
|
|
2258
2477
|
KbqPipeDirective,
|
|
2259
2478
|
KbqPipeButton,
|
|
2260
|
-
KbqPipeTitleDirective,
|
|
2261
2479
|
KbqPipeState
|
|
2262
2480
|
];
|
|
2263
2481
|
class KbqFilterBarModule {
|
|
2264
2482
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2265
2483
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, imports: [KbqFilterBar,
|
|
2266
2484
|
KbqFilters,
|
|
2267
|
-
|
|
2485
|
+
KbqFilterRefresher,
|
|
2268
2486
|
KbqFilterBarButton,
|
|
2269
2487
|
KbqFilterReset,
|
|
2270
2488
|
KbqPipeAdd,
|
|
2271
2489
|
KbqPipeDirective,
|
|
2272
2490
|
KbqPipeButton,
|
|
2273
|
-
KbqPipeTitleDirective,
|
|
2274
2491
|
KbqPipeState], exports: [KbqFilterBar,
|
|
2275
2492
|
KbqFilters,
|
|
2276
|
-
|
|
2493
|
+
KbqFilterRefresher,
|
|
2277
2494
|
KbqFilterBarButton,
|
|
2278
2495
|
KbqFilterReset,
|
|
2279
2496
|
KbqPipeAdd,
|
|
2280
2497
|
KbqPipeDirective,
|
|
2281
2498
|
KbqPipeButton,
|
|
2282
|
-
KbqPipeTitleDirective,
|
|
2283
2499
|
KbqPipeState] }); }
|
|
2284
2500
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqFilterBarModule, providers: [kbqFilterBarPipesProvider()], imports: [KbqFilterBar,
|
|
2285
2501
|
KbqFilters,
|
|
2286
|
-
|
|
2502
|
+
KbqFilterRefresher,
|
|
2287
2503
|
KbqFilterReset,
|
|
2288
2504
|
KbqPipeAdd,
|
|
2289
2505
|
KbqPipeButton] }); }
|
|
@@ -2301,5 +2517,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2301
2517
|
* Generated bundle index. Do not edit.
|
|
2302
2518
|
*/
|
|
2303
2519
|
|
|
2304
|
-
export { KBQ_FILTER_BAR_CONFIGURATION, KBQ_FILTER_BAR_DEFAULT_CONFIGURATION, KBQ_FILTER_BAR_PIPES, KBQ_PIPE_DATA, KbqBasePipe, KbqFilterBar, KbqFilterBarButton, KbqFilterBarModule, KbqFilterBarRefresher, KbqFilterReset, KbqFilters, KbqPipeAdd, KbqPipeButton, KbqPipeDateComponent, KbqPipeDatetimeComponent, KbqPipeDirective, KbqPipeMinWidth, KbqPipeMultiSelectComponent, KbqPipeReadonlyComponent, KbqPipeSelectComponent, KbqPipeState, KbqPipeTextComponent,
|
|
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 };
|
|
2305
2521
|
//# sourceMappingURL=koobiq-components-filter-bar.mjs.map
|