@agorapulse/ui-components 21.1.16 → 22.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-components-22.0.1.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +26 -16
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-add-comment.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-add-comment.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +11 -7
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs +17 -10
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar.mjs +33 -18
- package/fesm2022/agorapulse-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-badge.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-badge.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-button.mjs +17 -10
- package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-checkbox.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-close-button.mjs +9 -6
- package/fesm2022/agorapulse-ui-components-close-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-confirm-modal.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-confirm-modal.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-counter.mjs +11 -7
- package/fesm2022/agorapulse-ui-components-counter.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +106 -53
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-directives.mjs +28 -26
- package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-dot-stepper.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-dot-stepper.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs +7 -5
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs +28 -17
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +174 -99
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-field.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-message.mjs +7 -5
- package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-icon-button.mjs +5 -4
- package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-infobox.mjs +5 -4
- package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-group.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-search.mjs +16 -10
- package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs +7 -5
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs +6 -5
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs +33 -17
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +6 -5
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-modal.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-modal.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +241 -146
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-notification.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-notification.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-paginator.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-password-input.mjs +7 -5
- package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +8 -6
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-popmenu.mjs +19 -16
- package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +47 -25
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-radio.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-radio.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-range-slider.mjs +8 -6
- package/fesm2022/agorapulse-ui-components-range-slider.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs +15 -9
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +129 -85
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +60 -33
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-slide-toggle.mjs +8 -6
- package/fesm2022/agorapulse-ui-components-slide-toggle.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +10 -8
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-social-button.mjs +7 -5
- package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-split-button.mjs +21 -12
- package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-status-card.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-status-card.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-status.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-status.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-stepper.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tabs.mjs +36 -21
- package/fesm2022/agorapulse-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tag.mjs +9 -6
- package/fesm2022/agorapulse-ui-components-tag.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-text-measurement.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-text-measurement.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-textarea.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-textarea.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-toggle.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tooltip.mjs +56 -34
- package/fesm2022/agorapulse-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components.mjs +4 -4
- package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
- package/package.json +11 -11
- package/types/agorapulse-ui-components-datepicker.d.ts +5 -1
- package/types/agorapulse-ui-components-filter-dropdown.d.ts +1 -1
- package/types/agorapulse-ui-components-password-input.d.ts +1 -0
- package/types/agorapulse-ui-components-phone-number-input.d.ts +1 -0
- package/types/agorapulse-ui-components-popmenu.d.ts +3 -3
- package/types/agorapulse-ui-components-range-slider.d.ts +1 -0
- package/types/agorapulse-ui-components-select.d.ts +5 -3
- package/types/agorapulse-ui-components-slide-toggle.d.ts +1 -0
- package/agorapulse-ui-components-21.1.16.tgz +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import { ActionDropdownComponent } from '@agorapulse/ui-components/action-dropdown';
|
|
1
2
|
import { ButtonComponent } from '@agorapulse/ui-components/button';
|
|
2
3
|
import { createDropdownOverlay, DropdownTriggerDirective } from '@agorapulse/ui-components/dropdown-base';
|
|
4
|
+
import { provideUiComponentsSymbols } from '@agorapulse/ui-components/providers';
|
|
5
|
+
import { SymbolComponent, apInfo, apFeatureLock, apReset, apChevronDown as apChevronDown$1, apPlus, apRefresh, withSymbols, apFilter, apFilterFill } from '@agorapulse/ui-symbol';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { signal, computed, Injectable, inject, input, output, ChangeDetectionStrategy, Component, effect, untracked, viewChild } from '@angular/core';
|
|
3
8
|
import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
|
|
4
9
|
import { DatepickerMode, InputDatepickerComponent } from '@agorapulse/ui-components/datepicker';
|
|
5
|
-
import { provideUiComponentsSymbols } from '@agorapulse/ui-components/providers';
|
|
6
10
|
import { RadioComponent } from '@agorapulse/ui-components/radio';
|
|
7
11
|
import { ToggleComponent } from '@agorapulse/ui-components/toggle';
|
|
8
12
|
import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
|
|
9
|
-
import { SymbolComponent, apInfo, apFeatureLock, apReset, apChevronDown as apChevronDown$1, apPlus, apRefresh, withSymbols, apFilter, apFilterFill } from '@agorapulse/ui-symbol';
|
|
10
13
|
import { apChevronDown } from '@agorapulse/ui-symbol/icons';
|
|
11
|
-
import * as i0 from '@angular/core';
|
|
12
|
-
import { signal, computed, Injectable, inject, input, output, Component, ChangeDetectionStrategy, effect, untracked, viewChild } from '@angular/core';
|
|
13
14
|
import * as i1 from '@angular/forms';
|
|
14
15
|
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import { FormFieldComponent } from '@agorapulse/ui-components/form-field';
|
|
15
17
|
import { SelectMultipleDirective, SelectSingleDirective, SelectLabelSingleComponent, SelectLabelMultipleComponent, DropdownItemMultipleTwoLinesComponent, DropdownItemMultipleOneLineComponent, DropdownItemSingleOneLineComponent, DropdownItemSingleTwoLinesComponent } from '@agorapulse/ui-components/select';
|
|
16
18
|
import { NgSelectComponent, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective } from '@ng-select/ng-select';
|
|
17
19
|
import { isEqual } from 'es-toolkit';
|
|
18
|
-
import { FormFieldComponent } from '@agorapulse/ui-components/form-field';
|
|
19
|
-
import { ActionDropdownComponent } from '@agorapulse/ui-components/action-dropdown';
|
|
20
20
|
import { CounterComponent } from '@agorapulse/ui-components/counter';
|
|
21
21
|
|
|
22
22
|
/** Whether a filter value represents an active selection. */
|
|
@@ -74,12 +74,14 @@ function buildEmptyValue(group) {
|
|
|
74
74
|
* (falling back to `value`), and moved locally by `commit()` on Apply/Save/Update.
|
|
75
75
|
*/
|
|
76
76
|
class FilterState {
|
|
77
|
-
_groups = signal([],
|
|
77
|
+
_groups = signal([], /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "_groups" }] : /* istanbul ignore next */ []));
|
|
78
79
|
// Deep-equal so that re-seeding with equivalent values keeps the same reference (fewer recomputes downstream).
|
|
79
80
|
_draft = signal({}, { ...(ngDevMode ? { debugName: "_draft" } : /* istanbul ignore next */ {}), equal: isEqual });
|
|
80
81
|
_baseline = signal({}, { ...(ngDevMode ? { debugName: "_baseline" } : /* istanbul ignore next */ {}), equal: isEqual });
|
|
81
82
|
// Live expand/collapse state, keyed by group key. Owned here, never written back to the `groups` config.
|
|
82
|
-
_expanded = signal({},
|
|
83
|
+
_expanded = signal({}, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "_expanded" }] : /* istanbul ignore next */ []));
|
|
83
85
|
groups = this._groups.asReadonly();
|
|
84
86
|
draft = this._draft.asReadonly();
|
|
85
87
|
expanded = this._expanded.asReadonly();
|
|
@@ -92,13 +94,18 @@ class FilterState {
|
|
|
92
94
|
count += 1;
|
|
93
95
|
}
|
|
94
96
|
return count;
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
}, /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "activeFilterCount" }] : /* istanbul ignore next */ []));
|
|
99
|
+
isFilterCountActive = computed(() => this.activeFilterCount() > 0, /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "isFilterCountActive" }] : /* istanbul ignore next */ []));
|
|
101
|
+
hasChanges = computed(() => !isEqual(this._draft(), this._baseline()), /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "hasChanges" }] : /* istanbul ignore next */ []));
|
|
98
103
|
/** Save / Update / Reset / Apply are gated on dirty state. */
|
|
99
|
-
buttonsDisabled = computed(() => !this.hasChanges(),
|
|
104
|
+
buttonsDisabled = computed(() => !this.hasChanges(), /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "buttonsDisabled" }] : /* istanbul ignore next */ []));
|
|
100
106
|
/** Clear is gated on "is there anything to clear", not on dirty state. */
|
|
101
|
-
clearDisabled = computed(() => this.activeFilterCount() === 0,
|
|
107
|
+
clearDisabled = computed(() => this.activeFilterCount() === 0, /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "clearDisabled" }] : /* istanbul ignore next */ []));
|
|
102
109
|
// --- Seeding (pure signal writes; nothing here emits) ---
|
|
103
110
|
/** Refresh the structural schema and reconcile the value keyspace (add empty / drop removed). */
|
|
104
111
|
setSchema(groups) {
|
|
@@ -205,17 +212,18 @@ class FilterState {
|
|
|
205
212
|
}
|
|
206
213
|
return next;
|
|
207
214
|
}
|
|
208
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
209
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
216
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterState });
|
|
210
217
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterState, decorators: [{
|
|
212
219
|
type: Injectable
|
|
213
220
|
}] });
|
|
214
221
|
|
|
215
222
|
const MULTIPLE_DISPLAY_TYPES = new Set(['tag', 'label']);
|
|
216
223
|
class FilterLeafSelectComponent {
|
|
217
224
|
filterState = inject(FilterState);
|
|
218
|
-
item = input.required(
|
|
225
|
+
item = input.required(/* @ts-ignore */
|
|
226
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
219
227
|
/** Reports a user edit up (forwarded by the leaf to the dropdown). */
|
|
220
228
|
valueChange = output();
|
|
221
229
|
/** Event emitted when a select item feature locked is clicked */
|
|
@@ -223,12 +231,14 @@ class FilterLeafSelectComponent {
|
|
|
223
231
|
multipleDisplayType = computed(() => {
|
|
224
232
|
const dt = this.item().displayType;
|
|
225
233
|
return MULTIPLE_DISPLAY_TYPES.has(dt) ? dt : 'label';
|
|
226
|
-
},
|
|
234
|
+
}, /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "multipleDisplayType" }] : /* istanbul ignore next */ []));
|
|
227
236
|
/** Group-level default chip color for the multiple-select tags and the "+N" overflow chip. */
|
|
228
237
|
multipleTagColor = computed(() => {
|
|
229
238
|
const group = this.item();
|
|
230
239
|
return group.selectionType === 'multiple' ? (group.tagColor ?? 'grey') : 'grey';
|
|
231
|
-
},
|
|
240
|
+
}, /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "multipleTagColor" }] : /* istanbul ignore next */ []));
|
|
232
242
|
onSingleSelectChange(selected) {
|
|
233
243
|
this.valueChange.emit({ key: this.item().key, value: { filterType: 'select', selectionType: 'single', selected } });
|
|
234
244
|
}
|
|
@@ -238,17 +248,19 @@ class FilterLeafSelectComponent {
|
|
|
238
248
|
singleSelectValue = computed(() => {
|
|
239
249
|
const value = this.filterState.getValue(this.item().key);
|
|
240
250
|
return value?.filterType === 'select' && value.selectionType === 'single' ? value.selected : undefined;
|
|
241
|
-
},
|
|
251
|
+
}, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "singleSelectValue" }] : /* istanbul ignore next */ []));
|
|
242
253
|
multipleSelectValue = computed(() => {
|
|
243
254
|
const value = this.filterState.getValue(this.item().key);
|
|
244
255
|
return value?.filterType === 'select' && value?.selectionType === 'multiple' ? value.selected : [];
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FilterLeafSelectComponent, isStandalone: true, selector: "ap-filter-leaf-select", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { valueChange: "valueChange", lockedFeatureClicked: "lockedFeatureClicked" }, ngImport: i0, template: "@let selectItem = item();\n<div class=\"ap-filter-leaf__option\">\n <ap-form-field>\n @if (selectItem.label) {\n <label for=\"select-{{ selectItem.key }}\">\n {{ selectItem.label }}\n </label>\n }\n @if (selectItem.selectionType === 'single') {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectSingle\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"!!selectItem.featureLocked\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"singleSelectValue()\"\n (ngModelChange)=\"onSingleSelectChange($event)\"\n >\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ap-select-label-single\n [displayType]=\"selectItem.displayType\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [label]=\"item.label\" />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-single-two-lines\n [caption]=\"item$.caption\"\n [selected]=\"item$.selected\"\n [text]=\"item$.label\"\n [avatarUrl]=\"item$.avatarUrl\"\n [network]=\"item$.network\"\n [symbolId]=\"item$.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-single-one-line\n [selected]=\"item$.selected\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n\n </ng-template>\n\n </ng-select>\n } @else {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectMultiple\n bindLabel=\"label\"\n bindValue=\"value\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"multipleSelectValue()\"\n (ngModelChange)=\"onMultipleSelectChange($event)\">\n <ng-template\n let-items=\"items\"\n let-clear=\"clear\"\n ng-multi-label-tmp>\n <ap-select-label-multiple\n bindValue=\"value\"\n bindLabel=\"label\"\n bindAvatarUrl=\"avatarUrl\"\n bindNetwork=\"network\"\n bindSymbolId=\"symbolId\"\n bindTagColor=\"tagColor\"\n [tagColor]=\"multipleTagColor()\"\n [displayType]=\"multipleDisplayType()\"\n [selectedItems]=\"items\"\n (removeItem)=\"clear($event)\"\n />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-multiple-two-lines\n [selected]=\"item$.selected\"\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [caption]=\"item.caption\"\n [text]=\"item.label\"\n [htmlId]=\"item$.htmlId\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-multiple-one-line\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [selected]=\"item$.selected\"\n [htmlId]=\"item$.htmlId\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n </ng-template>\n </ng-select>\n }\n </ap-form-field>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "clearKeepsDisabledOptions", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "popover", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }, { kind: "directive", type: SelectMultipleDirective, selector: "ng-select[apSelectMultiple]", inputs: ["maxItemsTooltip", "pinnedItemsEnabled"] }, { kind: "directive", type: SelectSingleDirective, selector: "ng-select[apSelectSingle]" }, { kind: "component", type: SelectLabelSingleComponent, selector: "ap-select-label-single", inputs: ["displayType", "label", "avatarUrl", "network", "showAvatarInitials", "roundedAvatar"] }, { kind: "component", type: SelectLabelMultipleComponent, selector: "ap-select-label-multiple", inputs: ["displayType", "tagColor", "selectedItems", "bindLabel", "bindValue", "bindAvatarUrl", "bindSymbolId", "roundedAvatar", "bindNetwork", "bindTagColor"], outputs: ["removeItem"] }, { kind: "directive", type: NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "component", type: DropdownItemMultipleTwoLinesComponent, selector: "ap-dropdown-item-multiple-two-lines", inputs: ["text", "caption", "selected", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemMultipleOneLineComponent, selector: "ap-dropdown-item-multiple-one-line", inputs: ["text", "selected", "indeterminate", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "selectionChange", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleOneLineComponent, selector: "ap-dropdown-item-single-one-line", inputs: ["text", "selected", "disabled", "avatarUrl", "showAvatarInitials", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked"], outputs: ["lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleTwoLinesComponent, selector: "ap-dropdown-item-single-two-lines", inputs: ["text", "caption", "selected", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked"], outputs: ["lockedFeatureClicked"] }, { kind: "directive", type: NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { kind: "component", type: FormFieldComponent, selector: "ap-form-field" }] });
|
|
256
|
+
}, /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "multipleSelectValue" }] : /* istanbul ignore next */ []));
|
|
258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterLeafSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
259
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterLeafSelectComponent, isStandalone: true, selector: "ap-filter-leaf-select", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { valueChange: "valueChange", lockedFeatureClicked: "lockedFeatureClicked" }, ngImport: i0, template: "@let selectItem = item();\n<div class=\"ap-filter-leaf__option\">\n <ap-form-field>\n @if (selectItem.label) {\n <label for=\"select-{{ selectItem.key }}\">\n {{ selectItem.label }}\n </label>\n }\n @if (selectItem.selectionType === 'single') {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectSingle\n bindLabel=\"label\"\n bindValue=\"value\"\n [clearable]=\"true\"\n [disabled]=\"!!selectItem.featureLocked\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"singleSelectValue()\"\n (ngModelChange)=\"onSingleSelectChange($event)\"\n >\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ap-select-label-single\n [displayType]=\"selectItem.displayType\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [label]=\"item.label\" />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-single-two-lines\n [caption]=\"item$.caption\"\n [selected]=\"item$.selected\"\n [text]=\"item$.label\"\n [avatarUrl]=\"item$.avatarUrl\"\n [network]=\"item$.network\"\n [symbolId]=\"item$.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-single-one-line\n [selected]=\"item$.selected\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n\n </ng-template>\n\n </ng-select>\n } @else {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectMultiple\n bindLabel=\"label\"\n bindValue=\"value\"\n [clearable]=\"true\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"multipleSelectValue()\"\n (ngModelChange)=\"onMultipleSelectChange($event)\">\n <ng-template\n let-items=\"items\"\n let-clear=\"clear\"\n ng-multi-label-tmp>\n <ap-select-label-multiple\n bindValue=\"value\"\n bindLabel=\"label\"\n bindAvatarUrl=\"avatarUrl\"\n bindNetwork=\"network\"\n bindSymbolId=\"symbolId\"\n bindTagColor=\"tagColor\"\n [tagColor]=\"multipleTagColor()\"\n [displayType]=\"multipleDisplayType()\"\n [selectedItems]=\"items\"\n (removeItem)=\"clear($event)\"\n />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-multiple-two-lines\n [selected]=\"item$.selected\"\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [caption]=\"item.caption\"\n [text]=\"item.label\"\n [htmlId]=\"item$.htmlId\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-multiple-one-line\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [selected]=\"item$.selected\"\n [htmlId]=\"item$.htmlId\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n </ng-template>\n </ng-select>\n }\n </ap-form-field>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "clearKeepsDisabledOptions", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "popover", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }, { kind: "directive", type: SelectMultipleDirective, selector: "ng-select[apSelectMultiple]", inputs: ["maxItemsTooltip", "pinnedItemsEnabled"] }, { kind: "directive", type: SelectSingleDirective, selector: "ng-select[apSelectSingle]" }, { kind: "component", type: SelectLabelSingleComponent, selector: "ap-select-label-single", inputs: ["displayType", "label", "avatarUrl", "network", "showAvatarInitials", "roundedAvatar"] }, { kind: "component", type: SelectLabelMultipleComponent, selector: "ap-select-label-multiple", inputs: ["displayType", "tagColor", "selectedItems", "bindLabel", "bindValue", "bindAvatarUrl", "bindSymbolId", "roundedAvatar", "bindNetwork", "bindTagColor"], outputs: ["removeItem"] }, { kind: "directive", type: NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "component", type: DropdownItemMultipleTwoLinesComponent, selector: "ap-dropdown-item-multiple-two-lines", inputs: ["text", "caption", "selected", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemMultipleOneLineComponent, selector: "ap-dropdown-item-multiple-one-line", inputs: ["text", "selected", "indeterminate", "htmlId", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "onlyEnabled", "onlyText", "isFeatureLocked", "roundedAvatar", "network", "symbolColor", "symbolTooltipText"], outputs: ["selectOnly", "selectionChange", "lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleOneLineComponent, selector: "ap-dropdown-item-single-one-line", inputs: ["text", "selected", "disabled", "avatarUrl", "showAvatarInitials", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked"], outputs: ["lockedFeatureClicked"] }, { kind: "component", type: DropdownItemSingleTwoLinesComponent, selector: "ap-dropdown-item-single-two-lines", inputs: ["text", "caption", "selected", "disabled", "avatarUrl", "symbolId", "disabledTooltip", "badgeText", "dividerEnabled", "network", "roundedAvatar", "isFeatureLocked"], outputs: ["lockedFeatureClicked"] }, { kind: "directive", type: NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { kind: "component", type: FormFieldComponent, selector: "ap-form-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
248
260
|
}
|
|
249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterLeafSelectComponent, decorators: [{
|
|
250
262
|
type: Component,
|
|
251
|
-
args: [{ selector: 'ap-filter-leaf-select', imports: [
|
|
263
|
+
args: [{ selector: 'ap-filter-leaf-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
252
264
|
FormsModule,
|
|
253
265
|
NgSelectComponent,
|
|
254
266
|
SelectMultipleDirective,
|
|
@@ -263,17 +275,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
263
275
|
NgLabelTemplateDirective,
|
|
264
276
|
NgMultiLabelTemplateDirective,
|
|
265
277
|
FormFieldComponent,
|
|
266
|
-
], template: "@let selectItem = item();\n<div class=\"ap-filter-leaf__option\">\n <ap-form-field>\n @if (selectItem.label) {\n <label for=\"select-{{ selectItem.key }}\">\n {{ selectItem.label }}\n </label>\n }\n @if (selectItem.selectionType === 'single') {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectSingle\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"!!selectItem.featureLocked\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"singleSelectValue()\"\n (ngModelChange)=\"onSingleSelectChange($event)\"\n >\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ap-select-label-single\n [displayType]=\"selectItem.displayType\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [label]=\"item.label\" />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-single-two-lines\n [caption]=\"item$.caption\"\n [selected]=\"item$.selected\"\n [text]=\"item$.label\"\n [avatarUrl]=\"item$.avatarUrl\"\n [network]=\"item$.network\"\n [symbolId]=\"item$.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-single-one-line\n [selected]=\"item$.selected\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n\n </ng-template>\n\n </ng-select>\n } @else {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectMultiple\n bindLabel=\"label\"\n bindValue=\"value\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"multipleSelectValue()\"\n (ngModelChange)=\"onMultipleSelectChange($event)\">\n <ng-template\n let-items=\"items\"\n let-clear=\"clear\"\n ng-multi-label-tmp>\n <ap-select-label-multiple\n bindValue=\"value\"\n bindLabel=\"label\"\n bindAvatarUrl=\"avatarUrl\"\n bindNetwork=\"network\"\n bindSymbolId=\"symbolId\"\n bindTagColor=\"tagColor\"\n [tagColor]=\"multipleTagColor()\"\n [displayType]=\"multipleDisplayType()\"\n [selectedItems]=\"items\"\n (removeItem)=\"clear($event)\"\n />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-multiple-two-lines\n [selected]=\"item$.selected\"\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [caption]=\"item.caption\"\n [text]=\"item.label\"\n [htmlId]=\"item$.htmlId\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-multiple-one-line\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [selected]=\"item$.selected\"\n [htmlId]=\"item$.htmlId\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n </ng-template>\n </ng-select>\n }\n </ap-form-field>\n</div>\n" }]
|
|
278
|
+
], template: "@let selectItem = item();\n<div class=\"ap-filter-leaf__option\">\n <ap-form-field>\n @if (selectItem.label) {\n <label for=\"select-{{ selectItem.key }}\">\n {{ selectItem.label }}\n </label>\n }\n @if (selectItem.selectionType === 'single') {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectSingle\n bindLabel=\"label\"\n bindValue=\"value\"\n [clearable]=\"true\"\n [disabled]=\"!!selectItem.featureLocked\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"singleSelectValue()\"\n (ngModelChange)=\"onSingleSelectChange($event)\"\n >\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ap-select-label-single\n [displayType]=\"selectItem.displayType\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [label]=\"item.label\" />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-single-two-lines\n [caption]=\"item$.caption\"\n [selected]=\"item$.selected\"\n [text]=\"item$.label\"\n [avatarUrl]=\"item$.avatarUrl\"\n [network]=\"item$.network\"\n [symbolId]=\"item$.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-single-one-line\n [selected]=\"item$.selected\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n\n </ng-template>\n\n </ng-select>\n } @else {\n <ng-select\n id=\"select-{{ selectItem.key }}\"\n apSelectMultiple\n bindLabel=\"label\"\n bindValue=\"value\"\n [clearable]=\"true\"\n [items]=\"selectItem.items\"\n [placeholder]=\"selectItem.placeholder ?? 'Select an option'\"\n [inlineLabel]=\"selectItem.inlineLabel\"\n [ngModel]=\"multipleSelectValue()\"\n (ngModelChange)=\"onMultipleSelectChange($event)\">\n <ng-template\n let-items=\"items\"\n let-clear=\"clear\"\n ng-multi-label-tmp>\n <ap-select-label-multiple\n bindValue=\"value\"\n bindLabel=\"label\"\n bindAvatarUrl=\"avatarUrl\"\n bindNetwork=\"network\"\n bindSymbolId=\"symbolId\"\n bindTagColor=\"tagColor\"\n [tagColor]=\"multipleTagColor()\"\n [displayType]=\"multipleDisplayType()\"\n [selectedItems]=\"items\"\n (removeItem)=\"clear($event)\"\n />\n </ng-template>\n\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n @if (item.caption) {\n <ap-dropdown-item-multiple-two-lines\n [selected]=\"item$.selected\"\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [caption]=\"item.caption\"\n [text]=\"item.label\"\n [htmlId]=\"item$.htmlId\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n } @else {\n <ap-dropdown-item-multiple-one-line\n [onlyText]=\"selectItem.onlyText ?? 'Only'\"\n [selected]=\"item$.selected\"\n [htmlId]=\"item$.htmlId\"\n [text]=\"item.label\"\n [avatarUrl]=\"item.avatarUrl\"\n [network]=\"item.network\"\n [symbolId]=\"item.symbolId\"\n [isFeatureLocked]=\"item.featureLocked\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit(item)\"\n />\n }\n </ng-template>\n </ng-select>\n }\n </ap-form-field>\n</div>\n" }]
|
|
267
279
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], lockedFeatureClicked: [{ type: i0.Output, args: ["lockedFeatureClicked"] }] } });
|
|
268
280
|
|
|
269
281
|
class FilterLeafComponent {
|
|
270
282
|
DatepickerMode = DatepickerMode;
|
|
271
283
|
filterState = inject(FilterState);
|
|
272
284
|
/** item propagated from FilterDropdownComponent */
|
|
273
|
-
item = input.required(
|
|
285
|
+
item = input.required(/* @ts-ignore */
|
|
286
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
274
287
|
/** whether the leaf is closable */
|
|
275
|
-
closable = input(true,
|
|
276
|
-
|
|
288
|
+
closable = input(true, /* @ts-ignore */
|
|
289
|
+
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
290
|
+
isLastLeaf = input(false, /* @ts-ignore */
|
|
291
|
+
...(ngDevMode ? [{ debugName: "isLastLeaf" }] : /* istanbul ignore next */ []));
|
|
277
292
|
/** Reports a user edit up to the dropdown, which owns the apply/emit decision. */
|
|
278
293
|
valueChange = output();
|
|
279
294
|
/** Event emitted when a select item feature locked is clicked */
|
|
@@ -281,35 +296,43 @@ class FilterLeafComponent {
|
|
|
281
296
|
/** Event emitted when a group with locked feature is clicked */
|
|
282
297
|
filterDropdownGroupLockedClicked = output();
|
|
283
298
|
/** Live expand/collapse state for this leaf, owned by FilterState (not read from the `item` config). */
|
|
284
|
-
expanded = computed(() => this.filterState.isExpanded(this.item().key),
|
|
299
|
+
expanded = computed(() => this.filterState.isExpanded(this.item().key), /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
285
301
|
displayLabelInLeaf = computed(() => {
|
|
286
302
|
const item = this.item();
|
|
287
303
|
return item.filterType === 'checkbox' || item.filterType === 'radio' || item.filterType === 'toggle';
|
|
288
|
-
},
|
|
304
|
+
}, /* @ts-ignore */
|
|
305
|
+
...(ngDevMode ? [{ debugName: "displayLabelInLeaf" }] : /* istanbul ignore next */ []));
|
|
289
306
|
checkboxItem = computed(() => {
|
|
290
307
|
const item = this.item();
|
|
291
308
|
return item.filterType === 'checkbox' ? item : undefined;
|
|
292
|
-
},
|
|
309
|
+
}, /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "checkboxItem" }] : /* istanbul ignore next */ []));
|
|
293
311
|
radioItem = computed(() => {
|
|
294
312
|
const item = this.item();
|
|
295
313
|
return item.filterType === 'radio' ? item : undefined;
|
|
296
|
-
},
|
|
314
|
+
}, /* @ts-ignore */
|
|
315
|
+
...(ngDevMode ? [{ debugName: "radioItem" }] : /* istanbul ignore next */ []));
|
|
297
316
|
toggleItem = computed(() => {
|
|
298
317
|
const item = this.item();
|
|
299
318
|
return item.filterType === 'toggle' ? item : undefined;
|
|
300
|
-
},
|
|
319
|
+
}, /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "toggleItem" }] : /* istanbul ignore next */ []));
|
|
301
321
|
selectItem = computed(() => {
|
|
302
322
|
const item = this.item();
|
|
303
323
|
return item.filterType === 'select' ? item : undefined;
|
|
304
|
-
},
|
|
324
|
+
}, /* @ts-ignore */
|
|
325
|
+
...(ngDevMode ? [{ debugName: "selectItem" }] : /* istanbul ignore next */ []));
|
|
305
326
|
dateRangeItem = computed(() => {
|
|
306
327
|
const item = this.item();
|
|
307
328
|
return item.filterType === 'date-range' ? item : undefined;
|
|
308
|
-
},
|
|
329
|
+
}, /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "dateRangeItem" }] : /* istanbul ignore next */ []));
|
|
309
331
|
radioValue = computed(() => {
|
|
310
332
|
const value = this.filterState.getValue(this.item().key);
|
|
311
333
|
return value?.filterType === 'radio' ? value.selected : null;
|
|
312
|
-
},
|
|
334
|
+
}, /* @ts-ignore */
|
|
335
|
+
...(ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []));
|
|
313
336
|
checkboxValue = computed(() => {
|
|
314
337
|
const checkboxItem = this.checkboxItem();
|
|
315
338
|
const checkboxValueByKey = {};
|
|
@@ -319,15 +342,18 @@ class FilterLeafComponent {
|
|
|
319
342
|
value.selected.forEach(item => (checkboxValueByKey[item] = true));
|
|
320
343
|
}
|
|
321
344
|
return checkboxValueByKey;
|
|
322
|
-
},
|
|
345
|
+
}, /* @ts-ignore */
|
|
346
|
+
...(ngDevMode ? [{ debugName: "checkboxValue" }] : /* istanbul ignore next */ []));
|
|
323
347
|
toggleValue = computed(() => {
|
|
324
348
|
const value = this.filterState.getValue(this.item().key);
|
|
325
349
|
return value?.filterType === 'toggle' ? value.checked : false;
|
|
326
|
-
},
|
|
350
|
+
}, /* @ts-ignore */
|
|
351
|
+
...(ngDevMode ? [{ debugName: "toggleValue" }] : /* istanbul ignore next */ []));
|
|
327
352
|
dateRangeValue = computed(() => {
|
|
328
353
|
const value = this.filterState.getValue(this.item().key);
|
|
329
354
|
return value?.filterType === 'date-range' ? value.selectedPeriod : { startDate: undefined, endDate: undefined };
|
|
330
|
-
},
|
|
355
|
+
}, /* @ts-ignore */
|
|
356
|
+
...(ngDevMode ? [{ debugName: "dateRangeValue" }] : /* istanbul ignore next */ []));
|
|
331
357
|
onHeaderClick() {
|
|
332
358
|
if (this.closable() || !this.item().featureLocked) {
|
|
333
359
|
this.filterState.collapseHeader(this.item().key);
|
|
@@ -353,13 +379,16 @@ class FilterLeafComponent {
|
|
|
353
379
|
onToggleChange(checked) {
|
|
354
380
|
this.valueChange.emit({ key: this.item().key, value: { filterType: 'toggle', checked } });
|
|
355
381
|
}
|
|
356
|
-
onDateRangeChange(
|
|
382
|
+
onDateRangeChange(period) {
|
|
383
|
+
// A cleared/partial range must register as unfilled: `hasSelection` treats any object as filled,
|
|
384
|
+
// so collapse an incomplete period to `undefined`.
|
|
385
|
+
const selectedPeriod = period.startDate && period.endDate ? period : undefined;
|
|
357
386
|
this.valueChange.emit({ key: this.item().key, value: { filterType: 'date-range', selectedPeriod } });
|
|
358
387
|
}
|
|
359
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
360
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FilterLeafComponent, isStandalone: true, selector: "ap-filter-leaf", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, isLastLeaf: { classPropertyName: "isLastLeaf", publicName: "isLastLeaf", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", lockedFeatureClicked: "lockedFeatureClicked", filterDropdownGroupLockedClicked: "filterDropdownGroupLockedClicked" }, providers: [provideUiComponentsSymbols(apChevronDown, apInfo, apFeatureLock)], ngImport: i0, template: "<div [class.with-border-bottom]=\"!isLastLeaf()\" class=\"ap-filter-leaf\">\n\n <div\n (click)=\"onHeaderClick()\"\n (keyup.enter)=\"onHeaderClick()\"\n [class.ap-filter-leaf__closable]=\"closable() || item().featureLocked\"\n [class.ap-filter-leaf__expanded]=\"(!closable() || expanded()) && (!item().featureLocked || !closable())\"\n class=\"ap-filter-leaf__header\" tabindex=\"0\">\n <div class=\"ap-filter-leaf__title\">\n <span>{{ item().title }}</span>\n @if (item().tooltipText) {\n <ap-symbol color=\"light-grey\" symbolId=\"info\" size=\"sm\" [apTooltip]=\"item().tooltipText\" />\n }\n </div>\n @if (item().featureLocked) {\n <div class=\"ap-filter-leaf__actions\">\n <ap-symbol color=\"purple\" symbolId=\"feature-lock\" size=\"sm\"\n [apTooltip]=\"item().featureLockTooltipText\" />\n </div>\n } @else if (closable()) {\n <div class=\"ap-filter-leaf__actions\" [class.ap-filter-leaf__chevron--rotated]=\"!expanded()\">\n <ap-symbol symbolId=\"chevron-up\" size=\"sm\" />\n </div>\n }\n </div>\n\n @if ((!closable() || expanded()) && (!item().featureLocked || !closable())) {\n <div class=\"ap-filter-leaf__content\">\n @if (item().label && displayLabelInLeaf()) {\n <span class=\"ap-filter-leaf__label\">{{ item().label }}</span>\n }\n @switch (item().filterType) {\n @case ('checkbox') {\n @if (checkboxItem(); as vCheckboxItem) {\n @for (option of vCheckboxItem.items; track option.name) {\n <div class=\"ap-filter-leaf__option\">\n <ap-checkbox\n [name]=\"'checkbox-' + item().key + '-' + option.name\"\n [checked]=\"checkboxValue()[option.name]\"\n [disabled]=\"!!option.disabled || item().featureLocked\"\n (change)=\"onCheckboxChange(option.name, $event)\"\n >\n <span>{{ option.label }}</span>\n </ap-checkbox>\n </div>\n }\n }\n }\n @case ('radio') {\n @if (radioItem(); as vRadioItem) {\n @for (option of vRadioItem.items; track option.radioId) {\n <div class=\"ap-filter-leaf__option\">\n <ap-radio\n [radioId]=\"option.radioId\"\n [value]=\"option.value\"\n [disabled]=\"!!option.disabled || !!item().featureLocked\"\n [name]=\"item().key\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"onRadioClick($event)\"\n >\n <span>{{ option.label }}</span>\n </ap-radio>\n </div>\n }\n }\n }\n @case ('toggle') {\n @if (toggleItem(); as vToggleItem) {\n <div class=\"ap-filter-leaf__option\">\n <ap-toggle\n [name]=\"'toggle-' + vToggleItem.item.name\"\n [checked]=\"toggleValue()\"\n [disabled]=\"vToggleItem.item.disabled || item().featureLocked\"\n (change)=\"onToggleChange($event)\"\n />\n <span class=\"toggle\"\n [class.disabled]=\"vToggleItem.item.disabled || item().featureLocked\">{{ vToggleItem.item.label }}</span>\n </div>\n }\n }\n @case ('select') {\n @if (selectItem(); as vSelectItem) {\n <ap-filter-leaf-select [item]=\"vSelectItem\"\n (valueChange)=\"valueChange.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n }\n @case ('date-range') {\n @if (dateRangeItem(); as vDateRangeItem) {\n <ap-input-datepicker\n [disabled]=\"!!item().featureLocked\"\n [label]=\"vDateRangeItem.label\"\n [mode]=\"DatepickerMode.Range\"\n [placeholder]=\"vDateRangeItem.placeholder ?? 'Select date range'\"\n [minDate]=\"vDateRangeItem.minDate\"\n [maxDate]=\"vDateRangeItem.maxDate\"\n [dateFormat]=\"vDateRangeItem.dateFormat ?? 'MMMM DD, YYYY'\"\n [selectedPeriod]=\"dateRangeValue()\"\n (periodChanged)=\"onDateRangeChange($event)\"\n />\n }\n }\n }\n </div>\n }\n\n</div>\n", styles: [".ap-filter-leaf{display:flex;flex-direction:column}.ap-filter-leaf.with-border-bottom{border-bottom:1px solid var(--ref-color-grey-10)}.ap-filter-leaf__header{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-sm)}.ap-filter-leaf__header.ap-filter-leaf__expanded{padding-bottom:var(--ref-spacing-xs)}.ap-filter-leaf__closable{cursor:pointer}.ap-filter-leaf__title{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1 0 0;color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__label{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__chevron--rotated{transform:rotate(180deg)}.ap-filter-leaf__content{display:flex;flex-direction:column;gap:var(--ref-spacing-xs);padding:0 var(--ref-spacing-sm) var(--ref-spacing-sm)}.ap-filter-leaf__option{display:flex;gap:var(--ref-spacing-xxs);align-items:center;justify-content:flex-start}.ap-filter-leaf__option .toggle{font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100)}.ap-filter-leaf__option span.disabled{color:var(--ref-color-grey-60)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: RadioComponent, selector: "ap-radio", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "labelPosition", "radioId", "formControlName", "value", "required", "name"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ToggleComponent, selector: "ap-toggle", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "labelPosition", "disabled", "checked", "required", "confirm", "confirmMessage", "confirmOk", "confirmCancel", "confirmTitle", "name"], outputs: ["change"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FilterLeafSelectComponent, selector: "ap-filter-leaf-select", inputs: ["item"], outputs: ["valueChange", "lockedFeatureClicked"] }, { kind: "component", type: InputDatepickerComponent, selector: "ap-input-datepicker", inputs: ["mode", "label", "placeholder", "firstDayOfWeek", "locale", "dateFormat", "disabled", "minDate", "maxDate", "selectedDate", "selectedDates", "selectedPeriod", "i18n", "showRanges", "showCustomRangeLabel", "rangesConfig", "showBackdrop", "defaultPosition"], outputs: ["periodChanged", "dateSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterLeafComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
389
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterLeafComponent, isStandalone: true, selector: "ap-filter-leaf", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, isLastLeaf: { classPropertyName: "isLastLeaf", publicName: "isLastLeaf", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", lockedFeatureClicked: "lockedFeatureClicked", filterDropdownGroupLockedClicked: "filterDropdownGroupLockedClicked" }, providers: [provideUiComponentsSymbols(apChevronDown, apInfo, apFeatureLock)], ngImport: i0, template: "<div [class.with-border-bottom]=\"!isLastLeaf()\" class=\"ap-filter-leaf\">\n\n <div\n (click)=\"onHeaderClick()\"\n (keyup.enter)=\"onHeaderClick()\"\n [class.ap-filter-leaf__closable]=\"closable() || item().featureLocked\"\n [class.ap-filter-leaf__expanded]=\"(!closable() || expanded()) && (!item().featureLocked || !closable())\"\n class=\"ap-filter-leaf__header\" tabindex=\"0\">\n <div class=\"ap-filter-leaf__title\">\n <span>{{ item().title }}</span>\n @if (item().tooltipText) {\n <ap-symbol color=\"light-grey\" symbolId=\"info\" size=\"sm\" [apTooltip]=\"item().tooltipText\" />\n }\n </div>\n @if (item().featureLocked) {\n <div class=\"ap-filter-leaf__actions\">\n <ap-symbol color=\"purple\" symbolId=\"feature-lock\" size=\"sm\"\n [apTooltip]=\"item().featureLockTooltipText\" />\n </div>\n } @else if (closable()) {\n <div class=\"ap-filter-leaf__actions\" [class.ap-filter-leaf__chevron--rotated]=\"!expanded()\">\n <ap-symbol symbolId=\"chevron-up\" size=\"sm\" />\n </div>\n }\n </div>\n\n @if ((!closable() || expanded()) && (!item().featureLocked || !closable())) {\n <div class=\"ap-filter-leaf__content\">\n @if (item().label && displayLabelInLeaf()) {\n <span class=\"ap-filter-leaf__label\">{{ item().label }}</span>\n }\n @switch (item().filterType) {\n @case ('checkbox') {\n @if (checkboxItem(); as vCheckboxItem) {\n @for (option of vCheckboxItem.items; track option.name) {\n <div class=\"ap-filter-leaf__option\">\n <ap-checkbox\n [name]=\"'checkbox-' + item().key + '-' + option.name\"\n [checked]=\"checkboxValue()[option.name]\"\n [disabled]=\"!!option.disabled || item().featureLocked\"\n (change)=\"onCheckboxChange(option.name, $event)\"\n >\n <span>{{ option.label }}</span>\n </ap-checkbox>\n </div>\n }\n }\n }\n @case ('radio') {\n @if (radioItem(); as vRadioItem) {\n @for (option of vRadioItem.items; track option.radioId) {\n <div class=\"ap-filter-leaf__option\">\n <ap-radio\n [radioId]=\"option.radioId\"\n [value]=\"option.value\"\n [disabled]=\"!!option.disabled || !!item().featureLocked\"\n [name]=\"item().key\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"onRadioClick($event)\"\n >\n <span>{{ option.label }}</span>\n </ap-radio>\n </div>\n }\n }\n }\n @case ('toggle') {\n @if (toggleItem(); as vToggleItem) {\n <div class=\"ap-filter-leaf__option\">\n <ap-toggle\n [name]=\"'toggle-' + vToggleItem.item.name\"\n [checked]=\"toggleValue()\"\n [disabled]=\"vToggleItem.item.disabled || item().featureLocked\"\n (change)=\"onToggleChange($event)\"\n />\n <span class=\"toggle\"\n [class.disabled]=\"vToggleItem.item.disabled || item().featureLocked\">{{ vToggleItem.item.label }}</span>\n </div>\n }\n }\n @case ('select') {\n @if (selectItem(); as vSelectItem) {\n <ap-filter-leaf-select [item]=\"vSelectItem\"\n (valueChange)=\"valueChange.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n }\n @case ('date-range') {\n @if (dateRangeItem(); as vDateRangeItem) {\n <ap-input-datepicker\n [disabled]=\"!!item().featureLocked\"\n [label]=\"vDateRangeItem.label\"\n [mode]=\"DatepickerMode.Range\"\n [placeholder]=\"vDateRangeItem.placeholder ?? 'Select date range'\"\n [minDate]=\"vDateRangeItem.minDate\"\n [maxDate]=\"vDateRangeItem.maxDate\"\n [dateFormat]=\"vDateRangeItem.dateFormat ?? 'MMMM DD, YYYY'\"\n [clearable]=\"true\"\n [selectedPeriod]=\"dateRangeValue()\"\n (periodChanged)=\"onDateRangeChange($event)\"\n />\n }\n }\n }\n </div>\n }\n\n</div>\n", styles: [".ap-filter-leaf{display:flex;flex-direction:column}.ap-filter-leaf.with-border-bottom{border-bottom:1px solid var(--ref-color-grey-10)}.ap-filter-leaf__header{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-sm)}.ap-filter-leaf__header.ap-filter-leaf__expanded{padding-bottom:var(--ref-spacing-xs)}.ap-filter-leaf__closable{cursor:pointer}.ap-filter-leaf__title{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1 0 0;color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__label{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__chevron--rotated{transform:rotate(180deg)}.ap-filter-leaf__content{display:flex;flex-direction:column;gap:var(--ref-spacing-xs);padding:0 var(--ref-spacing-sm) var(--ref-spacing-sm)}.ap-filter-leaf__option{display:flex;gap:var(--ref-spacing-xxs);align-items:center;justify-content:flex-start}.ap-filter-leaf__option .toggle{font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100)}.ap-filter-leaf__option span.disabled{color:var(--ref-color-grey-60)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: RadioComponent, selector: "ap-radio", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "labelPosition", "radioId", "formControlName", "value", "required", "name"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ToggleComponent, selector: "ap-toggle", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "labelPosition", "disabled", "checked", "required", "confirm", "confirmMessage", "confirmOk", "confirmCancel", "confirmTitle", "name"], outputs: ["change"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FilterLeafSelectComponent, selector: "ap-filter-leaf-select", inputs: ["item"], outputs: ["valueChange", "lockedFeatureClicked"] }, { kind: "component", type: InputDatepickerComponent, selector: "ap-input-datepicker", inputs: ["mode", "label", "placeholder", "firstDayOfWeek", "locale", "dateFormat", "disabled", "minDate", "maxDate", "selectedDate", "selectedDates", "selectedPeriod", "i18n", "showRanges", "showCustomRangeLabel", "rangesConfig", "showBackdrop", "defaultPosition", "clearable"], outputs: ["periodChanged", "dateSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
361
390
|
}
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterLeafComponent, decorators: [{
|
|
363
392
|
type: Component,
|
|
364
393
|
args: [{ selector: 'ap-filter-leaf', imports: [
|
|
365
394
|
TooltipDirective,
|
|
@@ -372,7 +401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
372
401
|
InputDatepickerComponent,
|
|
373
402
|
SymbolComponent,
|
|
374
403
|
SymbolComponent,
|
|
375
|
-
], providers: [provideUiComponentsSymbols(apChevronDown, apInfo, apFeatureLock)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class.with-border-bottom]=\"!isLastLeaf()\" class=\"ap-filter-leaf\">\n\n <div\n (click)=\"onHeaderClick()\"\n (keyup.enter)=\"onHeaderClick()\"\n [class.ap-filter-leaf__closable]=\"closable() || item().featureLocked\"\n [class.ap-filter-leaf__expanded]=\"(!closable() || expanded()) && (!item().featureLocked || !closable())\"\n class=\"ap-filter-leaf__header\" tabindex=\"0\">\n <div class=\"ap-filter-leaf__title\">\n <span>{{ item().title }}</span>\n @if (item().tooltipText) {\n <ap-symbol color=\"light-grey\" symbolId=\"info\" size=\"sm\" [apTooltip]=\"item().tooltipText\" />\n }\n </div>\n @if (item().featureLocked) {\n <div class=\"ap-filter-leaf__actions\">\n <ap-symbol color=\"purple\" symbolId=\"feature-lock\" size=\"sm\"\n [apTooltip]=\"item().featureLockTooltipText\" />\n </div>\n } @else if (closable()) {\n <div class=\"ap-filter-leaf__actions\" [class.ap-filter-leaf__chevron--rotated]=\"!expanded()\">\n <ap-symbol symbolId=\"chevron-up\" size=\"sm\" />\n </div>\n }\n </div>\n\n @if ((!closable() || expanded()) && (!item().featureLocked || !closable())) {\n <div class=\"ap-filter-leaf__content\">\n @if (item().label && displayLabelInLeaf()) {\n <span class=\"ap-filter-leaf__label\">{{ item().label }}</span>\n }\n @switch (item().filterType) {\n @case ('checkbox') {\n @if (checkboxItem(); as vCheckboxItem) {\n @for (option of vCheckboxItem.items; track option.name) {\n <div class=\"ap-filter-leaf__option\">\n <ap-checkbox\n [name]=\"'checkbox-' + item().key + '-' + option.name\"\n [checked]=\"checkboxValue()[option.name]\"\n [disabled]=\"!!option.disabled || item().featureLocked\"\n (change)=\"onCheckboxChange(option.name, $event)\"\n >\n <span>{{ option.label }}</span>\n </ap-checkbox>\n </div>\n }\n }\n }\n @case ('radio') {\n @if (radioItem(); as vRadioItem) {\n @for (option of vRadioItem.items; track option.radioId) {\n <div class=\"ap-filter-leaf__option\">\n <ap-radio\n [radioId]=\"option.radioId\"\n [value]=\"option.value\"\n [disabled]=\"!!option.disabled || !!item().featureLocked\"\n [name]=\"item().key\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"onRadioClick($event)\"\n >\n <span>{{ option.label }}</span>\n </ap-radio>\n </div>\n }\n }\n }\n @case ('toggle') {\n @if (toggleItem(); as vToggleItem) {\n <div class=\"ap-filter-leaf__option\">\n <ap-toggle\n [name]=\"'toggle-' + vToggleItem.item.name\"\n [checked]=\"toggleValue()\"\n [disabled]=\"vToggleItem.item.disabled || item().featureLocked\"\n (change)=\"onToggleChange($event)\"\n />\n <span class=\"toggle\"\n [class.disabled]=\"vToggleItem.item.disabled || item().featureLocked\">{{ vToggleItem.item.label }}</span>\n </div>\n }\n }\n @case ('select') {\n @if (selectItem(); as vSelectItem) {\n <ap-filter-leaf-select [item]=\"vSelectItem\"\n (valueChange)=\"valueChange.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n }\n @case ('date-range') {\n @if (dateRangeItem(); as vDateRangeItem) {\n <ap-input-datepicker\n [disabled]=\"!!item().featureLocked\"\n [label]=\"vDateRangeItem.label\"\n [mode]=\"DatepickerMode.Range\"\n [placeholder]=\"vDateRangeItem.placeholder ?? 'Select date range'\"\n [minDate]=\"vDateRangeItem.minDate\"\n [maxDate]=\"vDateRangeItem.maxDate\"\n [dateFormat]=\"vDateRangeItem.dateFormat ?? 'MMMM DD, YYYY'\"\n [selectedPeriod]=\"dateRangeValue()\"\n (periodChanged)=\"onDateRangeChange($event)\"\n />\n }\n }\n }\n </div>\n }\n\n</div>\n", styles: [".ap-filter-leaf{display:flex;flex-direction:column}.ap-filter-leaf.with-border-bottom{border-bottom:1px solid var(--ref-color-grey-10)}.ap-filter-leaf__header{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-sm)}.ap-filter-leaf__header.ap-filter-leaf__expanded{padding-bottom:var(--ref-spacing-xs)}.ap-filter-leaf__closable{cursor:pointer}.ap-filter-leaf__title{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1 0 0;color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__label{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__chevron--rotated{transform:rotate(180deg)}.ap-filter-leaf__content{display:flex;flex-direction:column;gap:var(--ref-spacing-xs);padding:0 var(--ref-spacing-sm) var(--ref-spacing-sm)}.ap-filter-leaf__option{display:flex;gap:var(--ref-spacing-xxs);align-items:center;justify-content:flex-start}.ap-filter-leaf__option .toggle{font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100)}.ap-filter-leaf__option span.disabled{color:var(--ref-color-grey-60)}\n"] }]
|
|
404
|
+
], providers: [provideUiComponentsSymbols(apChevronDown, apInfo, apFeatureLock)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class.with-border-bottom]=\"!isLastLeaf()\" class=\"ap-filter-leaf\">\n\n <div\n (click)=\"onHeaderClick()\"\n (keyup.enter)=\"onHeaderClick()\"\n [class.ap-filter-leaf__closable]=\"closable() || item().featureLocked\"\n [class.ap-filter-leaf__expanded]=\"(!closable() || expanded()) && (!item().featureLocked || !closable())\"\n class=\"ap-filter-leaf__header\" tabindex=\"0\">\n <div class=\"ap-filter-leaf__title\">\n <span>{{ item().title }}</span>\n @if (item().tooltipText) {\n <ap-symbol color=\"light-grey\" symbolId=\"info\" size=\"sm\" [apTooltip]=\"item().tooltipText\" />\n }\n </div>\n @if (item().featureLocked) {\n <div class=\"ap-filter-leaf__actions\">\n <ap-symbol color=\"purple\" symbolId=\"feature-lock\" size=\"sm\"\n [apTooltip]=\"item().featureLockTooltipText\" />\n </div>\n } @else if (closable()) {\n <div class=\"ap-filter-leaf__actions\" [class.ap-filter-leaf__chevron--rotated]=\"!expanded()\">\n <ap-symbol symbolId=\"chevron-up\" size=\"sm\" />\n </div>\n }\n </div>\n\n @if ((!closable() || expanded()) && (!item().featureLocked || !closable())) {\n <div class=\"ap-filter-leaf__content\">\n @if (item().label && displayLabelInLeaf()) {\n <span class=\"ap-filter-leaf__label\">{{ item().label }}</span>\n }\n @switch (item().filterType) {\n @case ('checkbox') {\n @if (checkboxItem(); as vCheckboxItem) {\n @for (option of vCheckboxItem.items; track option.name) {\n <div class=\"ap-filter-leaf__option\">\n <ap-checkbox\n [name]=\"'checkbox-' + item().key + '-' + option.name\"\n [checked]=\"checkboxValue()[option.name]\"\n [disabled]=\"!!option.disabled || item().featureLocked\"\n (change)=\"onCheckboxChange(option.name, $event)\"\n >\n <span>{{ option.label }}</span>\n </ap-checkbox>\n </div>\n }\n }\n }\n @case ('radio') {\n @if (radioItem(); as vRadioItem) {\n @for (option of vRadioItem.items; track option.radioId) {\n <div class=\"ap-filter-leaf__option\">\n <ap-radio\n [radioId]=\"option.radioId\"\n [value]=\"option.value\"\n [disabled]=\"!!option.disabled || !!item().featureLocked\"\n [name]=\"item().key\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"onRadioClick($event)\"\n >\n <span>{{ option.label }}</span>\n </ap-radio>\n </div>\n }\n }\n }\n @case ('toggle') {\n @if (toggleItem(); as vToggleItem) {\n <div class=\"ap-filter-leaf__option\">\n <ap-toggle\n [name]=\"'toggle-' + vToggleItem.item.name\"\n [checked]=\"toggleValue()\"\n [disabled]=\"vToggleItem.item.disabled || item().featureLocked\"\n (change)=\"onToggleChange($event)\"\n />\n <span class=\"toggle\"\n [class.disabled]=\"vToggleItem.item.disabled || item().featureLocked\">{{ vToggleItem.item.label }}</span>\n </div>\n }\n }\n @case ('select') {\n @if (selectItem(); as vSelectItem) {\n <ap-filter-leaf-select [item]=\"vSelectItem\"\n (valueChange)=\"valueChange.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n }\n @case ('date-range') {\n @if (dateRangeItem(); as vDateRangeItem) {\n <ap-input-datepicker\n [disabled]=\"!!item().featureLocked\"\n [label]=\"vDateRangeItem.label\"\n [mode]=\"DatepickerMode.Range\"\n [placeholder]=\"vDateRangeItem.placeholder ?? 'Select date range'\"\n [minDate]=\"vDateRangeItem.minDate\"\n [maxDate]=\"vDateRangeItem.maxDate\"\n [dateFormat]=\"vDateRangeItem.dateFormat ?? 'MMMM DD, YYYY'\"\n [clearable]=\"true\"\n [selectedPeriod]=\"dateRangeValue()\"\n (periodChanged)=\"onDateRangeChange($event)\"\n />\n }\n }\n }\n </div>\n }\n\n</div>\n", styles: [".ap-filter-leaf{display:flex;flex-direction:column}.ap-filter-leaf.with-border-bottom{border-bottom:1px solid var(--ref-color-grey-10)}.ap-filter-leaf__header{display:flex;align-items:center;justify-content:space-between;padding:var(--ref-spacing-sm)}.ap-filter-leaf__header.ap-filter-leaf__expanded{padding-bottom:var(--ref-spacing-xs)}.ap-filter-leaf__closable{cursor:pointer}.ap-filter-leaf__title{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1 0 0;color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__label{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.ap-filter-leaf__chevron--rotated{transform:rotate(180deg)}.ap-filter-leaf__content{display:flex;flex-direction:column;gap:var(--ref-spacing-xs);padding:0 var(--ref-spacing-sm) var(--ref-spacing-sm)}.ap-filter-leaf__option{display:flex;gap:var(--ref-spacing-xxs);align-items:center;justify-content:flex-start}.ap-filter-leaf__option .toggle{font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100)}.ap-filter-leaf__option span.disabled{color:var(--ref-color-grey-60)}\n"] }]
|
|
376
405
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], isLastLeaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLastLeaf", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], lockedFeatureClicked: [{ type: i0.Output, args: ["lockedFeatureClicked"] }], filterDropdownGroupLockedClicked: [{ type: i0.Output, args: ["filterDropdownGroupLockedClicked"] }] } });
|
|
377
406
|
|
|
378
407
|
class FilterDropdownComponent {
|
|
@@ -393,50 +422,71 @@ class FilterDropdownComponent {
|
|
|
393
422
|
this.filterState.seedDraft(value);
|
|
394
423
|
this.filterState.seedBaseline(savedValue ?? value);
|
|
395
424
|
});
|
|
396
|
-
},
|
|
397
|
-
|
|
425
|
+
}, /* @ts-ignore */
|
|
426
|
+
...(ngDevMode ? [{ debugName: "syncFromInputs" }] : /* istanbul ignore next */ []));
|
|
427
|
+
filterGroupTemplate = viewChild('filterGroupTemplate', /* @ts-ignore */
|
|
428
|
+
...(ngDevMode ? [{ debugName: "filterGroupTemplate" }] : /* istanbul ignore next */ []));
|
|
398
429
|
/**
|
|
399
430
|
* The filter groups to display: STRUCTURE only (keys, titles, options, locks, display type, and the
|
|
400
431
|
* optional initial `expanded` seed). Not a value binding — selection lives in `value`, never here.
|
|
401
432
|
*/
|
|
402
|
-
groups = input([],
|
|
433
|
+
groups = input([], /* @ts-ignore */
|
|
434
|
+
...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
|
|
403
435
|
/** The current / applied selection. Seeds the editable draft; re-seeding is silent (never emits). */
|
|
404
|
-
value = input({},
|
|
436
|
+
value = input({}, /* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
405
438
|
/**
|
|
406
439
|
* The consumer's saved value (e.g. the active preset's filter) that the dirty state and Reset compare
|
|
407
440
|
* against. Falls back to `value` when omitted. Kept distinct from `value` so an auto-applied edit stays
|
|
408
441
|
* dirty vs the preset.
|
|
409
442
|
*/
|
|
410
|
-
savedValue = input(undefined,
|
|
443
|
+
savedValue = input(undefined, /* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [{ debugName: "savedValue" }] : /* istanbul ignore next */ []));
|
|
411
445
|
/** Whether the filter needs the apply button to be clicked for applyFilters to emit */
|
|
412
|
-
needApplyButton = input(true,
|
|
446
|
+
needApplyButton = input(true, /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "needApplyButton" }] : /* istanbul ignore next */ []));
|
|
413
448
|
/** Whether the filter group can be closed (collapsed) by the user. If false, the group will always be expanded and the user won't see a toggle button. */
|
|
414
|
-
closable = input(true,
|
|
449
|
+
closable = input(true, /* @ts-ignore */
|
|
450
|
+
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
415
451
|
/**
|
|
416
452
|
* Policy deciding which groups start expanded each time the dropdown opens. `'collapse-empty'` expands
|
|
417
453
|
* groups that currently have a selection; a predicate is evaluated per group against its draft value.
|
|
418
454
|
* Omitted → the expand/collapse state persists across opens.
|
|
419
455
|
*/
|
|
420
|
-
expandOnOpen = input(
|
|
456
|
+
expandOnOpen = input(/* @ts-ignore */
|
|
457
|
+
...(ngDevMode ? [undefined, { debugName: "expandOnOpen" }] : /* istanbul ignore next */ []));
|
|
421
458
|
/** whether the feature to save presets is locked for the org */
|
|
422
|
-
presetsFeatureLocked = input(false,
|
|
459
|
+
presetsFeatureLocked = input(false, /* @ts-ignore */
|
|
460
|
+
...(ngDevMode ? [{ debugName: "presetsFeatureLocked" }] : /* istanbul ignore next */ []));
|
|
423
461
|
/** whether the mode is in preset mode */
|
|
424
|
-
savePresetsMode = input(false,
|
|
462
|
+
savePresetsMode = input(false, /* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "savePresetsMode" }] : /* istanbul ignore next */ []));
|
|
425
464
|
/** whether the user is currently editing presets. Only necessary if savePresetsMode is at true */
|
|
426
|
-
editingPresetsMode = input(false,
|
|
465
|
+
editingPresetsMode = input(false, /* @ts-ignore */
|
|
466
|
+
...(ngDevMode ? [{ debugName: "editingPresetsMode" }] : /* istanbul ignore next */ []));
|
|
427
467
|
/** Whether to show a backdrop that closes the dropdown when clicked */
|
|
428
|
-
showBackdrop = input(true,
|
|
468
|
+
showBackdrop = input(true, /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
|
|
429
470
|
/** Default position for the dropdown relative to the trigger element */
|
|
430
|
-
defaultPosition = input('right',
|
|
471
|
+
defaultPosition = input('right', /* @ts-ignore */
|
|
472
|
+
...(ngDevMode ? [{ debugName: "defaultPosition" }] : /* istanbul ignore next */ []));
|
|
431
473
|
/** Extra class(es) set on the body-appended overlay pane, so a consumer can scope global styles to this dropdown. */
|
|
432
|
-
panelClass = input('',
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
474
|
+
panelClass = input('', /* @ts-ignore */
|
|
475
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
476
|
+
saveNewPresetsText = input('Save new presets', /* @ts-ignore */
|
|
477
|
+
...(ngDevMode ? [{ debugName: "saveNewPresetsText" }] : /* istanbul ignore next */ []));
|
|
478
|
+
saveAsNewPresetText = input('Save as new preset', /* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [{ debugName: "saveAsNewPresetText" }] : /* istanbul ignore next */ []));
|
|
480
|
+
savePresetText = input('Save preset', /* @ts-ignore */
|
|
481
|
+
...(ngDevMode ? [{ debugName: "savePresetText" }] : /* istanbul ignore next */ []));
|
|
482
|
+
updateExistingPresetText = input('Update existing preset', /* @ts-ignore */
|
|
483
|
+
...(ngDevMode ? [{ debugName: "updateExistingPresetText" }] : /* istanbul ignore next */ []));
|
|
484
|
+
resetFilterText = input('Reset filters', /* @ts-ignore */
|
|
485
|
+
...(ngDevMode ? [{ debugName: "resetFilterText" }] : /* istanbul ignore next */ []));
|
|
486
|
+
applyFiltersText = input('Apply filters', /* @ts-ignore */
|
|
487
|
+
...(ngDevMode ? [{ debugName: "applyFiltersText" }] : /* istanbul ignore next */ []));
|
|
488
|
+
clearFilterText = input('Clear filters', /* @ts-ignore */
|
|
489
|
+
...(ngDevMode ? [{ debugName: "clearFilterText" }] : /* istanbul ignore next */ []));
|
|
440
490
|
/** Emits when the dropdown menu is opened */
|
|
441
491
|
opened = output();
|
|
442
492
|
/** Emits when the dropdown menu is closed */
|
|
@@ -475,7 +525,8 @@ class FilterDropdownComponent {
|
|
|
475
525
|
dataTrack: 'update-existing-preset',
|
|
476
526
|
},
|
|
477
527
|
];
|
|
478
|
-
},
|
|
528
|
+
}, /* @ts-ignore */
|
|
529
|
+
...(ngDevMode ? [{ debugName: "savePresetsDropdownItems" }] : /* istanbul ignore next */ []));
|
|
479
530
|
/** Opens the dropdown menu at the specified trigger element */
|
|
480
531
|
open(triggerElement) {
|
|
481
532
|
const template = this.filterGroupTemplate();
|
|
@@ -558,55 +609,79 @@ class FilterDropdownComponent {
|
|
|
558
609
|
break;
|
|
559
610
|
}
|
|
560
611
|
}
|
|
561
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
562
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
612
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
613
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterDropdownComponent, isStandalone: true, selector: "ap-filter-dropdown", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, savedValue: { classPropertyName: "savedValue", publicName: "savedValue", isSignal: true, isRequired: false, transformFunction: null }, needApplyButton: { classPropertyName: "needApplyButton", publicName: "needApplyButton", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, expandOnOpen: { classPropertyName: "expandOnOpen", publicName: "expandOnOpen", isSignal: true, isRequired: false, transformFunction: null }, presetsFeatureLocked: { classPropertyName: "presetsFeatureLocked", publicName: "presetsFeatureLocked", isSignal: true, isRequired: false, transformFunction: null }, savePresetsMode: { classPropertyName: "savePresetsMode", publicName: "savePresetsMode", isSignal: true, isRequired: false, transformFunction: null }, editingPresetsMode: { classPropertyName: "editingPresetsMode", publicName: "editingPresetsMode", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, saveNewPresetsText: { classPropertyName: "saveNewPresetsText", publicName: "saveNewPresetsText", isSignal: true, isRequired: false, transformFunction: null }, saveAsNewPresetText: { classPropertyName: "saveAsNewPresetText", publicName: "saveAsNewPresetText", isSignal: true, isRequired: false, transformFunction: null }, savePresetText: { classPropertyName: "savePresetText", publicName: "savePresetText", isSignal: true, isRequired: false, transformFunction: null }, updateExistingPresetText: { classPropertyName: "updateExistingPresetText", publicName: "updateExistingPresetText", isSignal: true, isRequired: false, transformFunction: null }, resetFilterText: { classPropertyName: "resetFilterText", publicName: "resetFilterText", isSignal: true, isRequired: false, transformFunction: null }, applyFiltersText: { classPropertyName: "applyFiltersText", publicName: "applyFiltersText", isSignal: true, isRequired: false, transformFunction: null }, clearFilterText: { classPropertyName: "clearFilterText", publicName: "clearFilterText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", presetsLockedClicked: "presetsLockedClicked", saveNewPresets: "saveNewPresets", updatePresets: "updatePresets", applyFilters: "applyFilters", clearFilters: "clearFilters", resetFilters: "resetFilters", lockedFeatureClicked: "lockedFeatureClicked", filterDropdownGroupLockedClicked: "filterDropdownGroupLockedClicked" }, providers: [FilterState, provideUiComponentsSymbols(apReset, apChevronDown$1, apPlus, apRefresh, apFeatureLock)], viewQueries: [{ propertyName: "filterGroupTemplate", first: true, predicate: ["filterGroupTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #filterGroupTemplate>\n <div\n class=\"ap-filter-dropdown\"\n role=\"menu\"\n tabindex=\"-1\"\n aria-label=\"Filter dropdown\">\n\n <div class=\"ap-filter-dropdown__content\">\n @for (item of filterState.groups(); let last = $last; track item.key) {\n <ap-filter-leaf\n [item]=\"item\"\n [closable]=\"closable()\"\n [isLastLeaf]=\"last\"\n (valueChange)=\"onLeafEdit($event)\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n </div>\n\n <div class=\"ap-filter-dropdown__footer\">\n @if (savePresetsMode()) {\n <div class=\"ap-filter-dropdown__footer--presets\">\n @if (!editingPresetsMode() || presetsFeatureLocked()) {\n <ap-button\n name=\"filter-dropdown-save-preset\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled() && !presetsFeatureLocked()\"\n [locked]=\"presetsFeatureLocked()\"\n (click)=\"onSavePresets()\">\n {{ saveNewPresetsText() }}\n </ap-button>\n } @else {\n <ap-button\n name=\"filter-dropdown-edit-presets\"\n symbolId=\"chevron-down\"\n symbolPosition=\"right\"\n [apDropdownTrigger]=\"updatePresetsDropdown\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n >\n {{ savePresetText() }}\n </ap-button>\n }\n\n <ap-button\n name=\"filter-dropdown-reset-filters\"\n [symbolId]=\"'reset'\"\n [symbolPosition]=\"'left'\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onResetFilters()\">\n {{ resetFilterText() }}\n </ap-button>\n </div>\n } @else {\n <div class=\"ap-filter-dropdown__footer--apply\">\n <ap-button\n name=\"filter-dropdown-clear-filters\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.clearDisabled()\"\n (click)=\"onClearFilters()\">\n {{ clearFilterText() }}\n </ap-button>\n\n @if (needApplyButton()) {\n <ap-button\n name=\"filter-dropdown-apply-filters\"\n [config]=\"{ color: 'blue', style: 'primary' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onApplyFilters()\">\n {{ applyFiltersText() }}\n </ap-button>\n }\n </div>\n }\n </div>\n </div>\n\n</ng-template>\n\n<ap-action-dropdown\n #updatePresetsDropdown\n [items]=\"savePresetsDropdownItems()\"\n (itemClick)=\"onActionDropdownItemClick($event)\"\n/>\n", styles: [":host{display:none}.ap-filter-dropdown{display:flex;flex-direction:column;width:420px;background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);outline:none;max-height:min(90vh,750px)}.ap-filter-dropdown__footer{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm)}.ap-filter-dropdown__content{overflow-x:hidden;overflow-y:auto}.ap-filter-dropdown__footer{border-top:1px solid var(--comp-action-dropdown-divider-color)}.ap-filter-dropdown__footer--presets{display:flex;justify-content:space-between}.ap-filter-dropdown__footer--apply{display:flex;justify-content:flex-end;gap:var(--ref-spacing-sm)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ap-button", inputs: ["ariaLabel", "disabled", "name", "form", "config", "loading", "locked", "menuTrigger", "symbolPosition", "symbolId"], outputs: ["menuOpened", "menuClosed", "click", "focus", "blur"] }, { kind: "component", type: FilterLeafComponent, selector: "ap-filter-leaf", inputs: ["item", "closable", "isLastLeaf"], outputs: ["valueChange", "lockedFeatureClicked", "filterDropdownGroupLockedClicked"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "component", type: ActionDropdownComponent, selector: "ap-action-dropdown", inputs: ["items", "largeModeEnabled", "customWidth", "showBackdrop", "disabled", "defaultPosition"], outputs: ["opened", "closed", "itemClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
563
614
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterDropdownComponent, decorators: [{
|
|
565
616
|
type: Component,
|
|
566
|
-
args: [{ selector: 'ap-filter-dropdown', imports: [ButtonComponent, FilterLeafComponent, DropdownTriggerDirective, ActionDropdownComponent], providers: [FilterState, provideUiComponentsSymbols(apReset, apChevronDown$1, apPlus, apRefresh, apFeatureLock)], template: "<ng-template #filterGroupTemplate>\n <div\n class=\"ap-filter-dropdown\"\n role=\"menu\"\n tabindex=\"-1\"\n aria-label=\"Filter dropdown\">\n\n <div class=\"ap-filter-dropdown__content\">\n @for (item of filterState.groups(); let last = $last; track item.key) {\n <ap-filter-leaf\n [item]=\"item\"\n [closable]=\"closable()\"\n [isLastLeaf]=\"last\"\n (valueChange)=\"onLeafEdit($event)\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n </div>\n\n <div class=\"ap-filter-dropdown__footer\">\n @if (savePresetsMode()) {\n <div class=\"ap-filter-dropdown__footer--presets\">\n @if (!editingPresetsMode() || presetsFeatureLocked()) {\n <ap-button\n name=\"filter-dropdown-save-preset\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled() && !presetsFeatureLocked()\"\n [locked]=\"presetsFeatureLocked()\"\n (click)=\"onSavePresets()\">\n {{ saveNewPresetsText() }}\n </ap-button>\n } @else {\n <ap-button\n name=\"filter-dropdown-edit-presets\"\n symbolId=\"chevron-down\"\n symbolPosition=\"right\"\n [apDropdownTrigger]=\"updatePresetsDropdown\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n >\n {{ savePresetText() }}\n </ap-button>\n }\n\n <ap-button\n name=\"filter-dropdown-reset-filters\"\n [symbolId]=\"'reset'\"\n [symbolPosition]=\"'left'\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onResetFilters()\">\n {{ resetFilterText() }}\n </ap-button>\n </div>\n } @else {\n <div class=\"ap-filter-dropdown__footer--apply\">\n <ap-button\n name=\"filter-dropdown-clear-filters\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.clearDisabled()\"\n (click)=\"onClearFilters()\">\n {{ clearFilterText() }}\n </ap-button>\n\n @if (needApplyButton()) {\n <ap-button\n name=\"filter-dropdown-apply-filters\"\n [config]=\"{ color: 'blue', style: 'primary' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onApplyFilters()\">\n {{ applyFiltersText() }}\n </ap-button>\n }\n </div>\n }\n </div>\n </div>\n\n</ng-template>\n\n<ap-action-dropdown\n #updatePresetsDropdown\n [items]=\"savePresetsDropdownItems()\"\n (itemClick)=\"onActionDropdownItemClick($event)\"\n/>\n", styles: [":host{display:none}.ap-filter-dropdown{display:flex;flex-direction:column;width:420px;background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);outline:none;max-height:min(90vh,750px)}.ap-filter-dropdown__footer{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm)}.ap-filter-dropdown__content{overflow-x:hidden;overflow-y:auto}.ap-filter-dropdown__footer{border-top:1px solid var(--comp-action-dropdown-divider-color)}.ap-filter-dropdown__footer--presets{display:flex;justify-content:space-between}.ap-filter-dropdown__footer--apply{display:flex;justify-content:flex-end;gap:var(--ref-spacing-sm)}\n"] }]
|
|
617
|
+
args: [{ selector: 'ap-filter-dropdown', imports: [ButtonComponent, FilterLeafComponent, DropdownTriggerDirective, ActionDropdownComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [FilterState, provideUiComponentsSymbols(apReset, apChevronDown$1, apPlus, apRefresh, apFeatureLock)], template: "<ng-template #filterGroupTemplate>\n <div\n class=\"ap-filter-dropdown\"\n role=\"menu\"\n tabindex=\"-1\"\n aria-label=\"Filter dropdown\">\n\n <div class=\"ap-filter-dropdown__content\">\n @for (item of filterState.groups(); let last = $last; track item.key) {\n <ap-filter-leaf\n [item]=\"item\"\n [closable]=\"closable()\"\n [isLastLeaf]=\"last\"\n (valueChange)=\"onLeafEdit($event)\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\" />\n }\n </div>\n\n <div class=\"ap-filter-dropdown__footer\">\n @if (savePresetsMode()) {\n <div class=\"ap-filter-dropdown__footer--presets\">\n @if (!editingPresetsMode() || presetsFeatureLocked()) {\n <ap-button\n name=\"filter-dropdown-save-preset\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled() && !presetsFeatureLocked()\"\n [locked]=\"presetsFeatureLocked()\"\n (click)=\"onSavePresets()\">\n {{ saveNewPresetsText() }}\n </ap-button>\n } @else {\n <ap-button\n name=\"filter-dropdown-edit-presets\"\n symbolId=\"chevron-down\"\n symbolPosition=\"right\"\n [apDropdownTrigger]=\"updatePresetsDropdown\"\n [config]=\"{ color: 'blue', style: 'stroked-transparent' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n >\n {{ savePresetText() }}\n </ap-button>\n }\n\n <ap-button\n name=\"filter-dropdown-reset-filters\"\n [symbolId]=\"'reset'\"\n [symbolPosition]=\"'left'\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onResetFilters()\">\n {{ resetFilterText() }}\n </ap-button>\n </div>\n } @else {\n <div class=\"ap-filter-dropdown__footer--apply\">\n <ap-button\n name=\"filter-dropdown-clear-filters\"\n [config]=\"{ color: 'blue', style: 'ghost' }\"\n [disabled]=\"filterState.clearDisabled()\"\n (click)=\"onClearFilters()\">\n {{ clearFilterText() }}\n </ap-button>\n\n @if (needApplyButton()) {\n <ap-button\n name=\"filter-dropdown-apply-filters\"\n [config]=\"{ color: 'blue', style: 'primary' }\"\n [disabled]=\"filterState.buttonsDisabled()\"\n (click)=\"onApplyFilters()\">\n {{ applyFiltersText() }}\n </ap-button>\n }\n </div>\n }\n </div>\n </div>\n\n</ng-template>\n\n<ap-action-dropdown\n #updatePresetsDropdown\n [items]=\"savePresetsDropdownItems()\"\n (itemClick)=\"onActionDropdownItemClick($event)\"\n/>\n", styles: [":host{display:none}.ap-filter-dropdown{display:flex;flex-direction:column;width:420px;background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);outline:none;max-height:min(90vh,750px)}.ap-filter-dropdown__footer{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm)}.ap-filter-dropdown__content{overflow-x:hidden;overflow-y:auto}.ap-filter-dropdown__footer{border-top:1px solid var(--comp-action-dropdown-divider-color)}.ap-filter-dropdown__footer--presets{display:flex;justify-content:space-between}.ap-filter-dropdown__footer--apply{display:flex;justify-content:flex-end;gap:var(--ref-spacing-sm)}\n"] }]
|
|
567
618
|
}], propDecorators: { filterGroupTemplate: [{ type: i0.ViewChild, args: ['filterGroupTemplate', { isSignal: true }] }], groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], savedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "savedValue", required: false }] }], needApplyButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "needApplyButton", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], expandOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOnOpen", required: false }] }], presetsFeatureLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "presetsFeatureLocked", required: false }] }], savePresetsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "savePresetsMode", required: false }] }], editingPresetsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editingPresetsMode", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], saveNewPresetsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveNewPresetsText", required: false }] }], saveAsNewPresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveAsNewPresetText", required: false }] }], savePresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "savePresetText", required: false }] }], updateExistingPresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateExistingPresetText", required: false }] }], resetFilterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterText", required: false }] }], applyFiltersText: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyFiltersText", required: false }] }], clearFilterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearFilterText", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], presetsLockedClicked: [{ type: i0.Output, args: ["presetsLockedClicked"] }], saveNewPresets: [{ type: i0.Output, args: ["saveNewPresets"] }], updatePresets: [{ type: i0.Output, args: ["updatePresets"] }], applyFilters: [{ type: i0.Output, args: ["applyFilters"] }], clearFilters: [{ type: i0.Output, args: ["clearFilters"] }], resetFilters: [{ type: i0.Output, args: ["resetFilters"] }], lockedFeatureClicked: [{ type: i0.Output, args: ["lockedFeatureClicked"] }], filterDropdownGroupLockedClicked: [{ type: i0.Output, args: ["filterDropdownGroupLockedClicked"] }] } });
|
|
568
619
|
|
|
569
620
|
class FilterDropdownButtonComponent {
|
|
570
621
|
// FilterState is provided by the inner FilterDropdownComponent, so read the counter through it.
|
|
571
|
-
filterDropdown = viewChild(FilterDropdownComponent,
|
|
572
|
-
|
|
573
|
-
|
|
622
|
+
filterDropdown = viewChild(FilterDropdownComponent, /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "filterDropdown" }] : /* istanbul ignore next */ []));
|
|
624
|
+
isFilterCountActive = computed(() => this.filterDropdown()?.filterState.isFilterCountActive() ?? false, /* @ts-ignore */
|
|
625
|
+
...(ngDevMode ? [{ debugName: "isFilterCountActive" }] : /* istanbul ignore next */ []));
|
|
626
|
+
activeFilterCount = computed(() => this.filterDropdown()?.filterState.activeFilterCount() ?? 0, /* @ts-ignore */
|
|
627
|
+
...(ngDevMode ? [{ debugName: "activeFilterCount" }] : /* istanbul ignore next */ []));
|
|
574
628
|
/** text of the button, input specific to the button */
|
|
575
|
-
buttonFilterText = input('Filters',
|
|
629
|
+
buttonFilterText = input('Filters', /* @ts-ignore */
|
|
630
|
+
...(ngDevMode ? [{ debugName: "buttonFilterText" }] : /* istanbul ignore next */ []));
|
|
576
631
|
/** input specific to the filter-dropdown */
|
|
577
632
|
/** The filter groups to display: STRUCTURE only (keys, titles, options, locks, display type, expand seed). */
|
|
578
|
-
groups = input([],
|
|
633
|
+
groups = input([], /* @ts-ignore */
|
|
634
|
+
...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
|
|
579
635
|
/** The current / applied selection. Seeds the editable draft; re-seeding is silent (never emits). */
|
|
580
|
-
value = input({},
|
|
636
|
+
value = input({}, /* @ts-ignore */
|
|
637
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
581
638
|
/** The consumer's saved value (e.g. the active preset's filter) that dirty state / Reset compare against. Falls back to `value`. */
|
|
582
|
-
savedValue = input(undefined,
|
|
639
|
+
savedValue = input(undefined, /* @ts-ignore */
|
|
640
|
+
...(ngDevMode ? [{ debugName: "savedValue" }] : /* istanbul ignore next */ []));
|
|
583
641
|
/** Whether the filter needs the apply button to be clicked for applyFilters to emit */
|
|
584
|
-
needApplyButton = input(true,
|
|
642
|
+
needApplyButton = input(true, /* @ts-ignore */
|
|
643
|
+
...(ngDevMode ? [{ debugName: "needApplyButton" }] : /* istanbul ignore next */ []));
|
|
585
644
|
/** Whether the filter group can be closed (collapsed) by the user. If false, the group will always be expanded and the user won't see a toggle button. */
|
|
586
|
-
closable = input(true,
|
|
645
|
+
closable = input(true, /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
587
647
|
/** Policy deciding which groups start expanded on each open ('collapse-empty' | predicate). Omitted → persist. */
|
|
588
|
-
expandOnOpen = input(
|
|
648
|
+
expandOnOpen = input(/* @ts-ignore */
|
|
649
|
+
...(ngDevMode ? [undefined, { debugName: "expandOnOpen" }] : /* istanbul ignore next */ []));
|
|
589
650
|
/** whether the feature to save presets is locked for the org */
|
|
590
|
-
presetsFeatureLocked = input(false,
|
|
651
|
+
presetsFeatureLocked = input(false, /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "presetsFeatureLocked" }] : /* istanbul ignore next */ []));
|
|
591
653
|
/** whether the mode is in preset mode */
|
|
592
|
-
savePresetsMode = input(false,
|
|
654
|
+
savePresetsMode = input(false, /* @ts-ignore */
|
|
655
|
+
...(ngDevMode ? [{ debugName: "savePresetsMode" }] : /* istanbul ignore next */ []));
|
|
593
656
|
/** whether the user is currently editing presets. Only necessary if savePresetsMode is at true */
|
|
594
|
-
editingPresetsMode = input(false,
|
|
657
|
+
editingPresetsMode = input(false, /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "editingPresetsMode" }] : /* istanbul ignore next */ []));
|
|
595
659
|
/** Whether to show a backdrop that closes the dropdown when clicked */
|
|
596
|
-
showBackdrop = input(true,
|
|
660
|
+
showBackdrop = input(true, /* @ts-ignore */
|
|
661
|
+
...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
|
|
597
662
|
/** Whether the dropdown is disabled and cannot be opened */
|
|
598
|
-
disabled = input(false,
|
|
663
|
+
disabled = input(false, /* @ts-ignore */
|
|
664
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
599
665
|
/** Default position for the dropdown relative to the trigger element */
|
|
600
|
-
defaultPosition = input('right',
|
|
666
|
+
defaultPosition = input('right', /* @ts-ignore */
|
|
667
|
+
...(ngDevMode ? [{ debugName: "defaultPosition" }] : /* istanbul ignore next */ []));
|
|
601
668
|
/** Extra class(es) set on the body-appended overlay pane, so a consumer can scope global styles to this dropdown. */
|
|
602
|
-
panelClass = input('',
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
669
|
+
panelClass = input('', /* @ts-ignore */
|
|
670
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
671
|
+
saveNewPresetsText = input('Save new presets', /* @ts-ignore */
|
|
672
|
+
...(ngDevMode ? [{ debugName: "saveNewPresetsText" }] : /* istanbul ignore next */ []));
|
|
673
|
+
saveAsNewPresetText = input('Save as new preset', /* @ts-ignore */
|
|
674
|
+
...(ngDevMode ? [{ debugName: "saveAsNewPresetText" }] : /* istanbul ignore next */ []));
|
|
675
|
+
savePresetText = input('Save preset', /* @ts-ignore */
|
|
676
|
+
...(ngDevMode ? [{ debugName: "savePresetText" }] : /* istanbul ignore next */ []));
|
|
677
|
+
updateExistingPresetText = input('Update existing preset', /* @ts-ignore */
|
|
678
|
+
...(ngDevMode ? [{ debugName: "updateExistingPresetText" }] : /* istanbul ignore next */ []));
|
|
679
|
+
resetFilterText = input('Reset filters', /* @ts-ignore */
|
|
680
|
+
...(ngDevMode ? [{ debugName: "resetFilterText" }] : /* istanbul ignore next */ []));
|
|
681
|
+
applyFiltersText = input('Apply filters', /* @ts-ignore */
|
|
682
|
+
...(ngDevMode ? [{ debugName: "applyFiltersText" }] : /* istanbul ignore next */ []));
|
|
683
|
+
clearFilterText = input('Clear filters', /* @ts-ignore */
|
|
684
|
+
...(ngDevMode ? [{ debugName: "clearFilterText" }] : /* istanbul ignore next */ []));
|
|
610
685
|
/** Emits when the dropdown menu is opened */
|
|
611
686
|
opened = output();
|
|
612
687
|
/** Emits when the dropdown menu is closed */
|
|
@@ -627,12 +702,12 @@ class FilterDropdownButtonComponent {
|
|
|
627
702
|
lockedFeatureClicked = output();
|
|
628
703
|
/** Event emitted when a group with locked feature is clicked */
|
|
629
704
|
filterDropdownGroupLockedClicked = output();
|
|
630
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
631
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterDropdownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
706
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterDropdownButtonComponent, isStandalone: true, selector: "ap-filter-dropdown-button", inputs: { buttonFilterText: { classPropertyName: "buttonFilterText", publicName: "buttonFilterText", isSignal: true, isRequired: false, transformFunction: null }, groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, savedValue: { classPropertyName: "savedValue", publicName: "savedValue", isSignal: true, isRequired: false, transformFunction: null }, needApplyButton: { classPropertyName: "needApplyButton", publicName: "needApplyButton", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, expandOnOpen: { classPropertyName: "expandOnOpen", publicName: "expandOnOpen", isSignal: true, isRequired: false, transformFunction: null }, presetsFeatureLocked: { classPropertyName: "presetsFeatureLocked", publicName: "presetsFeatureLocked", isSignal: true, isRequired: false, transformFunction: null }, savePresetsMode: { classPropertyName: "savePresetsMode", publicName: "savePresetsMode", isSignal: true, isRequired: false, transformFunction: null }, editingPresetsMode: { classPropertyName: "editingPresetsMode", publicName: "editingPresetsMode", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, saveNewPresetsText: { classPropertyName: "saveNewPresetsText", publicName: "saveNewPresetsText", isSignal: true, isRequired: false, transformFunction: null }, saveAsNewPresetText: { classPropertyName: "saveAsNewPresetText", publicName: "saveAsNewPresetText", isSignal: true, isRequired: false, transformFunction: null }, savePresetText: { classPropertyName: "savePresetText", publicName: "savePresetText", isSignal: true, isRequired: false, transformFunction: null }, updateExistingPresetText: { classPropertyName: "updateExistingPresetText", publicName: "updateExistingPresetText", isSignal: true, isRequired: false, transformFunction: null }, resetFilterText: { classPropertyName: "resetFilterText", publicName: "resetFilterText", isSignal: true, isRequired: false, transformFunction: null }, applyFiltersText: { classPropertyName: "applyFiltersText", publicName: "applyFiltersText", isSignal: true, isRequired: false, transformFunction: null }, clearFilterText: { classPropertyName: "clearFilterText", publicName: "clearFilterText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", presetsLockedClicked: "presetsLockedClicked", saveNewPresets: "saveNewPresets", updatePresets: "updatePresets", applyFilters: "applyFilters", clearFilters: "clearFilters", resetFilters: "resetFilters", lockedFeatureClicked: "lockedFeatureClicked", filterDropdownGroupLockedClicked: "filterDropdownGroupLockedClicked" }, providers: [withSymbols(apFilter, apFilterFill)], viewQueries: [{ propertyName: "filterDropdown", first: true, predicate: FilterDropdownComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ap-button\n [apDropdownTrigger]=\"filterDropdown\"\n [config]=\"{ style: 'stroked', color: isFilterCountActive() ? 'blue' : 'grey' }\"\n ariaLabel=\"Button toggling filters\"\n name=\"toggle-filter\"\n symbolPosition=\"left\">\n <ap-symbol [symbolId]=\"isFilterCountActive() ? 'filter_fill' : 'filter'\" />\n @if (isFilterCountActive()) {\n <ap-counter\n size=\"big\"\n color=\"blue\"\n [background]=\"true\">\n {{ activeFilterCount() }}\n </ap-counter>\n }\n {{ buttonFilterText() }}\n</ap-button>\n\n<ap-filter-dropdown\n #filterDropdown\n [presetsFeatureLocked]=\"presetsFeatureLocked()\"\n [applyFiltersText]=\"applyFiltersText()\"\n [clearFilterText]=\"clearFilterText()\"\n [closable]=\"closable()\"\n [defaultPosition]=\"defaultPosition()\"\n [panelClass]=\"panelClass()\"\n [editingPresetsMode]=\"editingPresetsMode()\"\n [groups]=\"groups()\"\n [value]=\"value()\"\n [savedValue]=\"savedValue()\"\n [expandOnOpen]=\"expandOnOpen()\"\n [needApplyButton]=\"needApplyButton()\"\n [resetFilterText]=\"resetFilterText()\"\n [saveAsNewPresetText]=\"saveAsNewPresetText()\"\n [saveNewPresetsText]=\"saveNewPresetsText()\"\n [savePresetText]=\"savePresetText()\"\n [savePresetsMode]=\"savePresetsMode()\"\n [showBackdrop]=\"showBackdrop()\"\n (applyFilters)=\"applyFilters.emit($event)\"\n (clearFilters)=\"clearFilters.emit()\"\n (closed)=\"closed.emit()\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\"\n (opened)=\"opened.emit()\"\n (presetsLockedClicked)=\"presetsLockedClicked.emit()\"\n (resetFilters)=\"resetFilters.emit()\"\n (saveNewPresets)=\"saveNewPresets.emit($event)\"\n (updatePresets)=\"updatePresets.emit($event)\"\n [updateExistingPresetText]=\"updateExistingPresetText()\" />\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ap-button", inputs: ["ariaLabel", "disabled", "name", "form", "config", "loading", "locked", "menuTrigger", "symbolPosition", "symbolId"], outputs: ["menuOpened", "menuClosed", "click", "focus", "blur"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: FilterDropdownComponent, selector: "ap-filter-dropdown", inputs: ["groups", "value", "savedValue", "needApplyButton", "closable", "expandOnOpen", "presetsFeatureLocked", "savePresetsMode", "editingPresetsMode", "showBackdrop", "defaultPosition", "panelClass", "saveNewPresetsText", "saveAsNewPresetText", "savePresetText", "updateExistingPresetText", "resetFilterText", "applyFiltersText", "clearFilterText"], outputs: ["opened", "closed", "presetsLockedClicked", "saveNewPresets", "updatePresets", "applyFilters", "clearFilters", "resetFilters", "lockedFeatureClicked", "filterDropdownGroupLockedClicked"] }, { kind: "component", type: CounterComponent, selector: "ap-counter", inputs: ["color", "size", "notif", "background", "role"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
632
707
|
}
|
|
633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterDropdownButtonComponent, decorators: [{
|
|
634
709
|
type: Component,
|
|
635
|
-
args: [{ selector: 'ap-filter-dropdown-button', imports: [ButtonComponent, DropdownTriggerDirective, SymbolComponent, FilterDropdownComponent, CounterComponent], providers: [withSymbols(apFilter, apFilterFill)], template: "<ap-button\n [apDropdownTrigger]=\"filterDropdown\"\n [config]=\"{ style: 'stroked', color: isFilterCountActive() ? 'blue' : 'grey' }\"\n ariaLabel=\"Button toggling filters\"\n name=\"toggle-filter\"\n symbolPosition=\"left\">\n <ap-symbol [symbolId]=\"isFilterCountActive() ? 'filter_fill' : 'filter'\" />\n @if (isFilterCountActive()) {\n <ap-counter\n size=\"big\"\n color=\"blue\"\n [background]=\"true\">\n {{ activeFilterCount() }}\n </ap-counter>\n }\n {{ buttonFilterText() }}\n</ap-button>\n\n<ap-filter-dropdown\n #filterDropdown\n [presetsFeatureLocked]=\"presetsFeatureLocked()\"\n [applyFiltersText]=\"applyFiltersText()\"\n [clearFilterText]=\"clearFilterText()\"\n [closable]=\"closable()\"\n [defaultPosition]=\"defaultPosition()\"\n [panelClass]=\"panelClass()\"\n [editingPresetsMode]=\"editingPresetsMode()\"\n [groups]=\"groups()\"\n [value]=\"value()\"\n [savedValue]=\"savedValue()\"\n [expandOnOpen]=\"expandOnOpen()\"\n [needApplyButton]=\"needApplyButton()\"\n [resetFilterText]=\"resetFilterText()\"\n [saveAsNewPresetText]=\"saveAsNewPresetText()\"\n [saveNewPresetsText]=\"saveNewPresetsText()\"\n [savePresetText]=\"savePresetText()\"\n [savePresetsMode]=\"savePresetsMode()\"\n [showBackdrop]=\"showBackdrop()\"\n (applyFilters)=\"applyFilters.emit($event)\"\n (clearFilters)=\"clearFilters.emit()\"\n (closed)=\"closed.emit()\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\"\n (opened)=\"opened.emit()\"\n (presetsLockedClicked)=\"presetsLockedClicked.emit()\"\n (resetFilters)=\"resetFilters.emit()\"\n (saveNewPresets)=\"saveNewPresets.emit($event)\"\n (updatePresets)=\"updatePresets.emit($event)\"\n [updateExistingPresetText]=\"updateExistingPresetText()\" />\n" }]
|
|
710
|
+
args: [{ selector: 'ap-filter-dropdown-button', imports: [ButtonComponent, DropdownTriggerDirective, SymbolComponent, FilterDropdownComponent, CounterComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [withSymbols(apFilter, apFilterFill)], template: "<ap-button\n [apDropdownTrigger]=\"filterDropdown\"\n [config]=\"{ style: 'stroked', color: isFilterCountActive() ? 'blue' : 'grey' }\"\n ariaLabel=\"Button toggling filters\"\n name=\"toggle-filter\"\n symbolPosition=\"left\">\n <ap-symbol [symbolId]=\"isFilterCountActive() ? 'filter_fill' : 'filter'\" />\n @if (isFilterCountActive()) {\n <ap-counter\n size=\"big\"\n color=\"blue\"\n [background]=\"true\">\n {{ activeFilterCount() }}\n </ap-counter>\n }\n {{ buttonFilterText() }}\n</ap-button>\n\n<ap-filter-dropdown\n #filterDropdown\n [presetsFeatureLocked]=\"presetsFeatureLocked()\"\n [applyFiltersText]=\"applyFiltersText()\"\n [clearFilterText]=\"clearFilterText()\"\n [closable]=\"closable()\"\n [defaultPosition]=\"defaultPosition()\"\n [panelClass]=\"panelClass()\"\n [editingPresetsMode]=\"editingPresetsMode()\"\n [groups]=\"groups()\"\n [value]=\"value()\"\n [savedValue]=\"savedValue()\"\n [expandOnOpen]=\"expandOnOpen()\"\n [needApplyButton]=\"needApplyButton()\"\n [resetFilterText]=\"resetFilterText()\"\n [saveAsNewPresetText]=\"saveAsNewPresetText()\"\n [saveNewPresetsText]=\"saveNewPresetsText()\"\n [savePresetText]=\"savePresetText()\"\n [savePresetsMode]=\"savePresetsMode()\"\n [showBackdrop]=\"showBackdrop()\"\n (applyFilters)=\"applyFilters.emit($event)\"\n (clearFilters)=\"clearFilters.emit()\"\n (closed)=\"closed.emit()\"\n (filterDropdownGroupLockedClicked)=\"filterDropdownGroupLockedClicked.emit($event)\"\n (lockedFeatureClicked)=\"lockedFeatureClicked.emit($event)\"\n (opened)=\"opened.emit()\"\n (presetsLockedClicked)=\"presetsLockedClicked.emit()\"\n (resetFilters)=\"resetFilters.emit()\"\n (saveNewPresets)=\"saveNewPresets.emit($event)\"\n (updatePresets)=\"updatePresets.emit($event)\"\n [updateExistingPresetText]=\"updateExistingPresetText()\" />\n" }]
|
|
636
711
|
}], propDecorators: { filterDropdown: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FilterDropdownComponent), { isSignal: true }] }], buttonFilterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonFilterText", required: false }] }], groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], savedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "savedValue", required: false }] }], needApplyButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "needApplyButton", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], expandOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOnOpen", required: false }] }], presetsFeatureLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "presetsFeatureLocked", required: false }] }], savePresetsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "savePresetsMode", required: false }] }], editingPresetsMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editingPresetsMode", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], saveNewPresetsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveNewPresetsText", required: false }] }], saveAsNewPresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveAsNewPresetText", required: false }] }], savePresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "savePresetText", required: false }] }], updateExistingPresetText: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateExistingPresetText", required: false }] }], resetFilterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterText", required: false }] }], applyFiltersText: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyFiltersText", required: false }] }], clearFilterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearFilterText", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], presetsLockedClicked: [{ type: i0.Output, args: ["presetsLockedClicked"] }], saveNewPresets: [{ type: i0.Output, args: ["saveNewPresets"] }], updatePresets: [{ type: i0.Output, args: ["updatePresets"] }], applyFilters: [{ type: i0.Output, args: ["applyFilters"] }], clearFilters: [{ type: i0.Output, args: ["clearFilters"] }], resetFilters: [{ type: i0.Output, args: ["resetFilters"] }], lockedFeatureClicked: [{ type: i0.Output, args: ["lockedFeatureClicked"] }], filterDropdownGroupLockedClicked: [{ type: i0.Output, args: ["filterDropdownGroupLockedClicked"] }] } });
|
|
637
712
|
|
|
638
713
|
/**
|