@tectra-ng/blocks 0.0.0-stage → 0.1.7
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/README.md +16 -2
- package/action-tile/README.md +33 -0
- package/actions-menu/README.md +42 -0
- package/app-footer/README.md +30 -0
- package/app-layout/README.md +51 -0
- package/command-palette/README.md +63 -0
- package/console-layout/README.md +70 -0
- package/cookie-notice/README.md +45 -0
- package/empty-state/README.md +35 -0
- package/fesm2022/tectra-ng-blocks-action-tile.mjs +294 -0
- package/fesm2022/tectra-ng-blocks-action-tile.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs +380 -0
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-app-footer.mjs +276 -0
- package/fesm2022/tectra-ng-blocks-app-footer.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-app-layout.mjs +544 -0
- package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-command-palette.mjs +663 -0
- package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-console-layout.mjs +1060 -0
- package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +416 -0
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-empty-state.mjs +278 -0
- package/fesm2022/tectra-ng-blocks-empty-state.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs +959 -0
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-kanban.mjs +864 -0
- package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-network-status.mjs +303 -0
- package/fesm2022/tectra-ng-blocks-network-status.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-page-header.mjs +195 -0
- package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs +692 -0
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-public-header.mjs +372 -0
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-qr-code.mjs +487 -0
- package/fesm2022/tectra-ng-blocks-qr-code.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-switch-language.mjs +316 -0
- package/fesm2022/tectra-ng-blocks-switch-language.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-switch-theme.mjs +416 -0
- package/fesm2022/tectra-ng-blocks-switch-theme.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs +260 -0
- package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-wizard.mjs +1284 -0
- package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks.mjs +4 -0
- package/fesm2022/tectra-ng-blocks.mjs.map +1 -0
- package/filters-panel/README.md +68 -0
- package/kanban/README.md +55 -0
- package/network-status/README.md +33 -0
- package/package.json +137 -3
- package/page-header/README.md +32 -0
- package/pinned-tabs/README.md +42 -0
- package/public-header/README.md +44 -0
- package/qr-code/README.md +52 -0
- package/switch-language/README.md +33 -0
- package/switch-theme/README.md +32 -0
- package/topbar-preferences/README.md +35 -0
- package/types/tectra-ng-blocks-action-tile.d.ts +114 -0
- package/types/tectra-ng-blocks-action-tile.d.ts.map +1 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts +112 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -0
- package/types/tectra-ng-blocks-app-footer.d.ts +111 -0
- package/types/tectra-ng-blocks-app-footer.d.ts.map +1 -0
- package/types/tectra-ng-blocks-app-layout.d.ts +212 -0
- package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -0
- package/types/tectra-ng-blocks-command-palette.d.ts +291 -0
- package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -0
- package/types/tectra-ng-blocks-console-layout.d.ts +454 -0
- package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -0
- package/types/tectra-ng-blocks-cookie-notice.d.ts +168 -0
- package/types/tectra-ng-blocks-cookie-notice.d.ts.map +1 -0
- package/types/tectra-ng-blocks-empty-state.d.ts +138 -0
- package/types/tectra-ng-blocks-empty-state.d.ts.map +1 -0
- package/types/tectra-ng-blocks-filters-panel.d.ts +314 -0
- package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -0
- package/types/tectra-ng-blocks-kanban.d.ts +260 -0
- package/types/tectra-ng-blocks-kanban.d.ts.map +1 -0
- package/types/tectra-ng-blocks-network-status.d.ts +108 -0
- package/types/tectra-ng-blocks-network-status.d.ts.map +1 -0
- package/types/tectra-ng-blocks-page-header.d.ts +86 -0
- package/types/tectra-ng-blocks-page-header.d.ts.map +1 -0
- package/types/tectra-ng-blocks-pinned-tabs.d.ts +159 -0
- package/types/tectra-ng-blocks-pinned-tabs.d.ts.map +1 -0
- package/types/tectra-ng-blocks-public-header.d.ts +142 -0
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -0
- package/types/tectra-ng-blocks-qr-code.d.ts +160 -0
- package/types/tectra-ng-blocks-qr-code.d.ts.map +1 -0
- package/types/tectra-ng-blocks-switch-language.d.ts +106 -0
- package/types/tectra-ng-blocks-switch-language.d.ts.map +1 -0
- package/types/tectra-ng-blocks-switch-theme.d.ts +108 -0
- package/types/tectra-ng-blocks-switch-theme.d.ts.map +1 -0
- package/types/tectra-ng-blocks-topbar-preferences.d.ts +103 -0
- package/types/tectra-ng-blocks-topbar-preferences.d.ts.map +1 -0
- package/types/tectra-ng-blocks-wizard.d.ts +682 -0
- package/types/tectra-ng-blocks-wizard.d.ts.map +1 -0
- package/types/tectra-ng-blocks.d.ts +2 -0
- package/types/tectra-ng-blocks.d.ts.map +1 -0
- package/wizard/README.md +77 -0
|
@@ -0,0 +1,959 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, InjectionToken, Injector, Pipe, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, linkedSignal, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { TxFluid } from "@tectra-ng/core/fluid";
|
|
4
|
+
import { CdkDrag, CdkDragHandle, CdkDropList, moveItemInArray } from "@angular/cdk/drag-drop";
|
|
5
|
+
import { uniqueId } from "@tectra-ng/core/a11y";
|
|
6
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
7
|
+
import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
|
|
8
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
9
|
+
import { TxIcon } from "@tectra-ng/icons";
|
|
10
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
11
|
+
import { TxButton } from "@tectra-ng/ui/button";
|
|
12
|
+
import { TxPopover, TxPopoverTrigger } from "@tectra-ng/ui/popover";
|
|
13
|
+
import { TxTooltip } from "@tectra-ng/ui/tooltip";
|
|
14
|
+
const TX_FILTERS_PANEL = new InjectionToken("TX_FILTERS_PANEL");
|
|
15
|
+
var TxFilterField = class TxFilterField {
|
|
16
|
+
panel = inject(TX_FILTERS_PANEL, { optional: true });
|
|
17
|
+
txFilterField = input.required(...ngDevMode ? [{ debugName: "txFilterField" }] : /* istanbul ignore next */ []);
|
|
18
|
+
filterLabel = input.required(...ngDevMode ? [{ debugName: "filterLabel" }] : /* istanbul ignore next */ []);
|
|
19
|
+
filterActive = input(false, {
|
|
20
|
+
...ngDevMode ? { debugName: "filterActive" } : /* istanbul ignore next */ {},
|
|
21
|
+
transform: booleanAttribute
|
|
22
|
+
});
|
|
23
|
+
hidden = computed(() => this.panel?.isFieldHidden(this.txFilterField()) ?? false, ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
|
|
24
|
+
order = computed(() => this.panel?.fieldOrder(this.txFilterField()) ?? null, ...ngDevMode ? [{ debugName: "order" }] : /* istanbul ignore next */ []);
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
26
|
+
minVersion: "12.0.0",
|
|
27
|
+
version: "22.2.3",
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
type: TxFilterField,
|
|
30
|
+
deps: [],
|
|
31
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
32
|
+
});
|
|
33
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
34
|
+
minVersion: "17.1.0",
|
|
35
|
+
version: "22.2.3",
|
|
36
|
+
type: TxFilterField,
|
|
37
|
+
isStandalone: true,
|
|
38
|
+
selector: "[txFilterField]",
|
|
39
|
+
inputs: {
|
|
40
|
+
txFilterField: {
|
|
41
|
+
classPropertyName: "txFilterField",
|
|
42
|
+
publicName: "txFilterField",
|
|
43
|
+
isSignal: true,
|
|
44
|
+
isRequired: true,
|
|
45
|
+
transformFunction: null
|
|
46
|
+
},
|
|
47
|
+
filterLabel: {
|
|
48
|
+
classPropertyName: "filterLabel",
|
|
49
|
+
publicName: "filterLabel",
|
|
50
|
+
isSignal: true,
|
|
51
|
+
isRequired: true,
|
|
52
|
+
transformFunction: null
|
|
53
|
+
},
|
|
54
|
+
filterActive: {
|
|
55
|
+
classPropertyName: "filterActive",
|
|
56
|
+
publicName: "filterActive",
|
|
57
|
+
isSignal: true,
|
|
58
|
+
isRequired: false,
|
|
59
|
+
transformFunction: null
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
host: {
|
|
63
|
+
properties: {
|
|
64
|
+
"attr.hidden": "hidden() ? \"\" : null",
|
|
65
|
+
"style.display": "hidden() ? \"none\" : null",
|
|
66
|
+
"style.order": "order()"
|
|
67
|
+
},
|
|
68
|
+
classAttribute: "tx-filter-field"
|
|
69
|
+
},
|
|
70
|
+
providers: [{
|
|
71
|
+
provide: TxFluid,
|
|
72
|
+
useFactory: () => new TxFluid()
|
|
73
|
+
}],
|
|
74
|
+
ngImport: i0
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
78
|
+
minVersion: "12.0.0",
|
|
79
|
+
version: "22.2.3",
|
|
80
|
+
ngImport: i0,
|
|
81
|
+
type: TxFilterField,
|
|
82
|
+
decorators: [{
|
|
83
|
+
type: Directive,
|
|
84
|
+
args: [{
|
|
85
|
+
selector: "[txFilterField]",
|
|
86
|
+
providers: [{
|
|
87
|
+
provide: TxFluid,
|
|
88
|
+
useFactory: () => new TxFluid()
|
|
89
|
+
}],
|
|
90
|
+
host: {
|
|
91
|
+
class: "tx-filter-field",
|
|
92
|
+
"[attr.hidden]": "hidden() ? \"\" : null",
|
|
93
|
+
"[style.display]": "hidden() ? \"none\" : null",
|
|
94
|
+
"[style.order]": "order()"
|
|
95
|
+
}
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
propDecorators: {
|
|
99
|
+
txFilterField: [{
|
|
100
|
+
type: i0.Input,
|
|
101
|
+
args: [{
|
|
102
|
+
isSignal: true,
|
|
103
|
+
alias: "txFilterField",
|
|
104
|
+
required: true
|
|
105
|
+
}]
|
|
106
|
+
}],
|
|
107
|
+
filterLabel: [{
|
|
108
|
+
type: i0.Input,
|
|
109
|
+
args: [{
|
|
110
|
+
isSignal: true,
|
|
111
|
+
alias: "filterLabel",
|
|
112
|
+
required: true
|
|
113
|
+
}]
|
|
114
|
+
}],
|
|
115
|
+
filterActive: [{
|
|
116
|
+
type: i0.Input,
|
|
117
|
+
args: [{
|
|
118
|
+
isSignal: true,
|
|
119
|
+
alias: "filterActive",
|
|
120
|
+
required: false
|
|
121
|
+
}]
|
|
122
|
+
}]
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
var TxFiltersReset = class TxFiltersReset {
|
|
126
|
+
host = inject(ElementRef);
|
|
127
|
+
trigger() {
|
|
128
|
+
this.host.nativeElement.click();
|
|
129
|
+
}
|
|
130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
131
|
+
minVersion: "12.0.0",
|
|
132
|
+
version: "22.2.3",
|
|
133
|
+
ngImport: i0,
|
|
134
|
+
type: TxFiltersReset,
|
|
135
|
+
deps: [],
|
|
136
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
137
|
+
});
|
|
138
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
139
|
+
minVersion: "14.0.0",
|
|
140
|
+
version: "22.2.3",
|
|
141
|
+
type: TxFiltersReset,
|
|
142
|
+
isStandalone: true,
|
|
143
|
+
selector: "[txFiltersReset]",
|
|
144
|
+
host: { classAttribute: "tx-filters-panel__reset" },
|
|
145
|
+
ngImport: i0
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
149
|
+
minVersion: "12.0.0",
|
|
150
|
+
version: "22.2.3",
|
|
151
|
+
ngImport: i0,
|
|
152
|
+
type: TxFiltersReset,
|
|
153
|
+
decorators: [{
|
|
154
|
+
type: Directive,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: "[txFiltersReset]",
|
|
157
|
+
host: { class: "tx-filters-panel__reset" }
|
|
158
|
+
}]
|
|
159
|
+
}]
|
|
160
|
+
});
|
|
161
|
+
function hasFilterValue(...values) {
|
|
162
|
+
return values.some((value) => {
|
|
163
|
+
if (value === null || value === void 0) return false;
|
|
164
|
+
if (typeof value === "string") return value.trim().length > 0;
|
|
165
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
166
|
+
return true;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
var TxHasFilterValuePipe = class TxHasFilterValuePipe {
|
|
170
|
+
transform(...values) {
|
|
171
|
+
return hasFilterValue(...values);
|
|
172
|
+
}
|
|
173
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
174
|
+
minVersion: "12.0.0",
|
|
175
|
+
version: "22.2.3",
|
|
176
|
+
ngImport: i0,
|
|
177
|
+
type: TxHasFilterValuePipe,
|
|
178
|
+
deps: [],
|
|
179
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
180
|
+
});
|
|
181
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
182
|
+
minVersion: "14.0.0",
|
|
183
|
+
version: "22.2.3",
|
|
184
|
+
ngImport: i0,
|
|
185
|
+
type: TxHasFilterValuePipe,
|
|
186
|
+
isStandalone: true,
|
|
187
|
+
name: "hasFilterValue"
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
191
|
+
minVersion: "12.0.0",
|
|
192
|
+
version: "22.2.3",
|
|
193
|
+
ngImport: i0,
|
|
194
|
+
type: TxHasFilterValuePipe,
|
|
195
|
+
decorators: [{
|
|
196
|
+
type: Pipe,
|
|
197
|
+
args: [{ name: "hasFilterValue" }]
|
|
198
|
+
}]
|
|
199
|
+
});
|
|
200
|
+
const COLLAPSE_QUERY = "(width < 64rem)";
|
|
201
|
+
const OVERLAY_CONTAINER = ".cdk-overlay-container";
|
|
202
|
+
const CLOSE_FALLBACK_MS = 400;
|
|
203
|
+
var TxFiltersPanel = class TxFiltersPanel {
|
|
204
|
+
document = inject(DOCUMENT);
|
|
205
|
+
host = inject(ElementRef);
|
|
206
|
+
injector = inject(Injector);
|
|
207
|
+
locale = inject(TxLocaleService);
|
|
208
|
+
variant = input("card", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
209
|
+
busy = input(false, {
|
|
210
|
+
...ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {},
|
|
211
|
+
transform: booleanAttribute
|
|
212
|
+
});
|
|
213
|
+
stateKey = input(void 0, ...ngDevMode ? [{ debugName: "stateKey" }] : /* istanbul ignore next */ []);
|
|
214
|
+
stateStorage = input("local", ...ngDevMode ? [{ debugName: "stateStorage" }] : /* istanbul ignore next */ []);
|
|
215
|
+
defaultVisible = input(3, {
|
|
216
|
+
...ngDevMode ? { debugName: "defaultVisible" } : /* istanbul ignore next */ {},
|
|
217
|
+
transform: numberAttribute
|
|
218
|
+
});
|
|
219
|
+
collapse = input("auto", ...ngDevMode ? [{ debugName: "collapse" }] : /* istanbul ignore next */ []);
|
|
220
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
221
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
222
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
223
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
224
|
+
unstyled = input(void 0, {
|
|
225
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
226
|
+
transform: optionalBoolean
|
|
227
|
+
});
|
|
228
|
+
layoutChange = output();
|
|
229
|
+
expandedChange = output();
|
|
230
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
231
|
+
passThrough = injectPassThrough("filtersPanel", this, this.pt, this.ptOptions);
|
|
232
|
+
translations = injectTranslations();
|
|
233
|
+
id = uniqueId("tx-filters-panel");
|
|
234
|
+
fields = contentChildren(TxFilterField, {
|
|
235
|
+
...ngDevMode ? { debugName: "fields" } : /* istanbul ignore next */ {},
|
|
236
|
+
descendants: true
|
|
237
|
+
});
|
|
238
|
+
resetAction = contentChild(TxFiltersReset, {
|
|
239
|
+
...ngDevMode ? { debugName: "resetAction" } : /* istanbul ignore next */ {},
|
|
240
|
+
descendants: true
|
|
241
|
+
});
|
|
242
|
+
fieldsContainer = viewChild.required("fieldsContainer", ...ngDevMode ? [{ debugName: "fieldsContainer" }] : /* istanbul ignore next */ []);
|
|
243
|
+
toggleButton = viewChild("toggleButton", ...ngDevMode ? [{ debugName: "toggleButton" }] : /* istanbul ignore next */ []);
|
|
244
|
+
menuList = viewChild("menuList", ...ngDevMode ? [{ debugName: "menuList" }] : /* istanbul ignore next */ []);
|
|
245
|
+
projectedCount = signal(0, ...ngDevMode ? [{ debugName: "projectedCount" }] : /* istanbul ignore next */ []);
|
|
246
|
+
narrow = signal(false, ...ngDevMode ? [{ debugName: "narrow" }] : /* istanbul ignore next */ []);
|
|
247
|
+
expanded = signal(false, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
|
|
248
|
+
closing = signal(false, ...ngDevMode ? [{ debugName: "closing" }] : /* istanbul ignore next */ []);
|
|
249
|
+
closingTimer;
|
|
250
|
+
menuOpen = signal(false, ...ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []);
|
|
251
|
+
collapsible = computed(() => this.collapse() !== "never" && Math.max(this.fields().length, this.projectedCount()) > 1, ...ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []);
|
|
252
|
+
folded = computed(() => this.collapsible() && (this.collapse() === "always" || this.narrow()), ...ngDevMode ? [{ debugName: "folded" }] : /* istanbul ignore next */ []);
|
|
253
|
+
activeCount = computed(() => this.fields().filter((field) => field.filterActive()).length, ...ngDevMode ? [{ debugName: "activeCount" }] : /* istanbul ignore next */ []);
|
|
254
|
+
customizable = computed(() => !!this.stateKey() && this.fields().length > 0, ...ngDevMode ? [{ debugName: "customizable" }] : /* istanbul ignore next */ []);
|
|
255
|
+
layout = linkedSignal(() => this.readLayout(this.stateKey()), ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
256
|
+
orderedKeys = computed(() => {
|
|
257
|
+
const keys = this.fields().map((field) => field.txFilterField());
|
|
258
|
+
const stored = (this.layout()?.order ?? []).filter((key) => keys.includes(key));
|
|
259
|
+
return [...stored, ...keys.filter((key) => !stored.includes(key))];
|
|
260
|
+
}, ...ngDevMode ? [{ debugName: "orderedKeys" }] : /* istanbul ignore next */ []);
|
|
261
|
+
chosenKeys = computed(() => this.layout()?.visible ?? this.orderedKeys().slice(0, this.defaultVisible()), ...ngDevMode ? [{ debugName: "chosenKeys" }] : /* istanbul ignore next */ []);
|
|
262
|
+
visibleKeys = computed(() => /* @__PURE__ */ new Set([...this.chosenKeys(), ...this.fields().filter((field) => field.filterActive()).map((field) => field.txFilterField())]), ...ngDevMode ? [{ debugName: "visibleKeys" }] : /* istanbul ignore next */ []);
|
|
263
|
+
options = computed(() => {
|
|
264
|
+
const fields = new Map(this.fields().map((field) => [field.txFilterField(), field]));
|
|
265
|
+
const visible = this.visibleKeys();
|
|
266
|
+
return this.orderedKeys().map((key) => ({
|
|
267
|
+
key,
|
|
268
|
+
label: fields.get(key)?.filterLabel() ?? key,
|
|
269
|
+
visible: visible.has(key),
|
|
270
|
+
active: fields.get(key)?.filterActive() ?? false
|
|
271
|
+
}));
|
|
272
|
+
}, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
273
|
+
visibleCount = computed(() => this.options().filter((option) => option.visible).length, ...ngDevMode ? [{ debugName: "visibleCount" }] : /* istanbul ignore next */ []);
|
|
274
|
+
hiddenCount = computed(() => this.options().length - this.visibleCount(), ...ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []);
|
|
275
|
+
counterText = computed(() => this.locale.translate("filtersShown", {
|
|
276
|
+
shown: this.visibleCount(),
|
|
277
|
+
total: this.options().length
|
|
278
|
+
}), ...ngDevMode ? [{ debugName: "counterText" }] : /* istanbul ignore next */ []);
|
|
279
|
+
menuButtonLabel = computed(() => {
|
|
280
|
+
const label = this.translations().showFilters;
|
|
281
|
+
const count = this.hiddenCount();
|
|
282
|
+
return count ? this.locale.translate("filtersHidden", {
|
|
283
|
+
label,
|
|
284
|
+
count
|
|
285
|
+
}) : label;
|
|
286
|
+
}, ...ngDevMode ? [{ debugName: "menuButtonLabel" }] : /* istanbul ignore next */ []);
|
|
287
|
+
tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-filters-panel"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
|
|
288
|
+
hostStyle = computed(() => ({
|
|
289
|
+
...this.tokenStyle(),
|
|
290
|
+
...this.passThrough().root?.style
|
|
291
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
292
|
+
menuPopoverDt = {
|
|
293
|
+
root: {
|
|
294
|
+
borderRadius: "var(--tx-filters-panel-menu-border-radius)",
|
|
295
|
+
shadow: "var(--tx-filters-panel-menu-shadow)",
|
|
296
|
+
padding: "0"
|
|
297
|
+
},
|
|
298
|
+
content: { padding: "0" }
|
|
299
|
+
};
|
|
300
|
+
menuPopoverPt = computed(() => ({ root: { style: this.tokenStyle() } }), ...ngDevMode ? [{ debugName: "menuPopoverPt" }] : /* istanbul ignore next */ []);
|
|
301
|
+
constructor() {
|
|
302
|
+
inject(DestroyRef).onDestroy(() => clearTimeout(this.closingTimer));
|
|
303
|
+
effect((onCleanup) => {
|
|
304
|
+
const view = this.document.defaultView;
|
|
305
|
+
if (!view?.matchMedia) return;
|
|
306
|
+
const media = view.matchMedia(COLLAPSE_QUERY);
|
|
307
|
+
const update = () => {
|
|
308
|
+
this.narrow.set(media.matches);
|
|
309
|
+
if (!this.folded()) this.setExpanded(false);
|
|
310
|
+
};
|
|
311
|
+
untracked(update);
|
|
312
|
+
media.addEventListener?.("change", update);
|
|
313
|
+
onCleanup(() => media.removeEventListener?.("change", update));
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
ngAfterViewInit() {
|
|
317
|
+
this.projectedCount.set(this.fieldsContainer().nativeElement.children.length);
|
|
318
|
+
}
|
|
319
|
+
isFieldHidden(key) {
|
|
320
|
+
return this.customizable() && !this.folded() && !this.visibleKeys().has(key);
|
|
321
|
+
}
|
|
322
|
+
fieldOrder(key) {
|
|
323
|
+
return this.customizable() ? this.orderedKeys().indexOf(key) : null;
|
|
324
|
+
}
|
|
325
|
+
toggle(key) {
|
|
326
|
+
const option = this.options().find((item) => item.key === key);
|
|
327
|
+
if (!option || option.active) return;
|
|
328
|
+
const chosen = this.chosenKeys();
|
|
329
|
+
const next = chosen.includes(key) ? chosen.filter((item) => item !== key) : [...chosen, key];
|
|
330
|
+
const order = this.orderedKeys();
|
|
331
|
+
this.saveLayout({
|
|
332
|
+
order,
|
|
333
|
+
visible: order.filter((item) => next.includes(item))
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
move(key, offset) {
|
|
337
|
+
const order = [...this.orderedKeys()];
|
|
338
|
+
const from = order.indexOf(key);
|
|
339
|
+
const to = from + offset;
|
|
340
|
+
if (from < 0 || to < 0 || to >= order.length) return;
|
|
341
|
+
moveItemInArray(order, from, to);
|
|
342
|
+
this.saveLayout({
|
|
343
|
+
order,
|
|
344
|
+
visible: this.chosenKeys()
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
reset() {
|
|
348
|
+
this.layout.set(null);
|
|
349
|
+
this.writeLayout(null);
|
|
350
|
+
this.layoutChange.emit(null);
|
|
351
|
+
}
|
|
352
|
+
setExpanded(expanded) {
|
|
353
|
+
if (this.expanded() === expanded) return;
|
|
354
|
+
this.finishClosing();
|
|
355
|
+
if (!expanded && this.folded() && !this.isUnstyled() && !this.document.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
|
|
356
|
+
this.closing.set(true);
|
|
357
|
+
this.closingTimer = setTimeout(() => this.finishClosing(), CLOSE_FALLBACK_MS);
|
|
358
|
+
}
|
|
359
|
+
this.expanded.set(expanded);
|
|
360
|
+
this.expandedChange.emit(expanded);
|
|
361
|
+
}
|
|
362
|
+
onPanelAnimationEnd(event) {
|
|
363
|
+
if (event.target === event.currentTarget && this.closing()) this.finishClosing();
|
|
364
|
+
}
|
|
365
|
+
finishClosing() {
|
|
366
|
+
clearTimeout(this.closingTimer);
|
|
367
|
+
this.closing.set(false);
|
|
368
|
+
}
|
|
369
|
+
clearFilters() {
|
|
370
|
+
this.resetAction()?.trigger();
|
|
371
|
+
}
|
|
372
|
+
drop(event) {
|
|
373
|
+
if (event.previousIndex === event.currentIndex) return;
|
|
374
|
+
const order = [...this.orderedKeys()];
|
|
375
|
+
moveItemInArray(order, event.previousIndex, event.currentIndex);
|
|
376
|
+
this.saveLayout({
|
|
377
|
+
order,
|
|
378
|
+
visible: this.chosenKeys()
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
onMenuKeydown(event, key) {
|
|
382
|
+
const menu = event.currentTarget?.closest(".tx-filters-panel-menu");
|
|
383
|
+
const items = Array.from(menu?.querySelectorAll("[role^=\"menuitem\"]") ?? []);
|
|
384
|
+
const index = items.indexOf(event.target);
|
|
385
|
+
if (event.altKey && (event.key === "ArrowUp" || event.key === "ArrowDown")) {
|
|
386
|
+
event.preventDefault();
|
|
387
|
+
this.move(key, event.key === "ArrowUp" ? -1 : 1);
|
|
388
|
+
afterNextRender(() => this.focusMenuItem(key), { injector: this.injector });
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
const target = {
|
|
392
|
+
ArrowDown: (index + 1) % items.length,
|
|
393
|
+
ArrowUp: (index - 1 + items.length) % items.length,
|
|
394
|
+
Home: 0,
|
|
395
|
+
End: items.length - 1
|
|
396
|
+
}[event.key];
|
|
397
|
+
if (target !== void 0 && items.length) {
|
|
398
|
+
event.preventDefault();
|
|
399
|
+
items[target].focus();
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
closeOnOutsideClick(event) {
|
|
403
|
+
if (!this.expanded()) return;
|
|
404
|
+
const target = event.target;
|
|
405
|
+
if (!target?.isConnected || target.closest(OVERLAY_CONTAINER)) return;
|
|
406
|
+
if (!(this.host.nativeElement.contains(target) && !!target.closest(".tx-filters-panel__panel, .tx-filters-panel__toggle"))) this.setExpanded(false);
|
|
407
|
+
}
|
|
408
|
+
closeOnEscape(event) {
|
|
409
|
+
if (!this.expanded() || event.target?.closest?.(OVERLAY_CONTAINER)) return;
|
|
410
|
+
const hadFocus = this.host.nativeElement.contains(this.document.activeElement);
|
|
411
|
+
this.setExpanded(false);
|
|
412
|
+
if (hadFocus) this.toggleButton()?.nativeElement.focus();
|
|
413
|
+
}
|
|
414
|
+
focusMenuItem(key) {
|
|
415
|
+
Array.from(this.menuList()?.nativeElement.querySelectorAll("[data-key]") ?? []).find((item) => item.getAttribute("data-key") === key)?.focus();
|
|
416
|
+
}
|
|
417
|
+
saveLayout(layout) {
|
|
418
|
+
this.layout.set(layout);
|
|
419
|
+
this.writeLayout(layout);
|
|
420
|
+
this.layoutChange.emit(layout);
|
|
421
|
+
}
|
|
422
|
+
storage() {
|
|
423
|
+
try {
|
|
424
|
+
const view = this.document.defaultView;
|
|
425
|
+
return (this.stateStorage() === "session" ? view?.sessionStorage : view?.localStorage) ?? null;
|
|
426
|
+
} catch {
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
readLayout(key) {
|
|
431
|
+
if (!key) return null;
|
|
432
|
+
try {
|
|
433
|
+
const stored = JSON.parse(this.storage()?.getItem(key) ?? "null");
|
|
434
|
+
if (Array.isArray(stored)) return {
|
|
435
|
+
order: [],
|
|
436
|
+
visible: stored.map(String)
|
|
437
|
+
};
|
|
438
|
+
if (stored && typeof stored === "object") {
|
|
439
|
+
const { order, visible } = stored;
|
|
440
|
+
return {
|
|
441
|
+
order: Array.isArray(order) ? order.map(String) : [],
|
|
442
|
+
visible: Array.isArray(visible) ? visible.map(String) : null
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
return null;
|
|
446
|
+
} catch {
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
writeLayout(layout) {
|
|
451
|
+
const key = this.stateKey();
|
|
452
|
+
if (!key) return;
|
|
453
|
+
try {
|
|
454
|
+
if (layout) this.storage()?.setItem(key, JSON.stringify(layout));
|
|
455
|
+
else this.storage()?.removeItem(key);
|
|
456
|
+
} catch {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
461
|
+
minVersion: "12.0.0",
|
|
462
|
+
version: "22.2.3",
|
|
463
|
+
ngImport: i0,
|
|
464
|
+
type: TxFiltersPanel,
|
|
465
|
+
deps: [],
|
|
466
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
467
|
+
});
|
|
468
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
469
|
+
minVersion: "17.0.0",
|
|
470
|
+
version: "22.2.3",
|
|
471
|
+
type: TxFiltersPanel,
|
|
472
|
+
isStandalone: true,
|
|
473
|
+
selector: "tx-filters-panel",
|
|
474
|
+
inputs: {
|
|
475
|
+
variant: {
|
|
476
|
+
classPropertyName: "variant",
|
|
477
|
+
publicName: "variant",
|
|
478
|
+
isSignal: true,
|
|
479
|
+
isRequired: false,
|
|
480
|
+
transformFunction: null
|
|
481
|
+
},
|
|
482
|
+
busy: {
|
|
483
|
+
classPropertyName: "busy",
|
|
484
|
+
publicName: "busy",
|
|
485
|
+
isSignal: true,
|
|
486
|
+
isRequired: false,
|
|
487
|
+
transformFunction: null
|
|
488
|
+
},
|
|
489
|
+
stateKey: {
|
|
490
|
+
classPropertyName: "stateKey",
|
|
491
|
+
publicName: "stateKey",
|
|
492
|
+
isSignal: true,
|
|
493
|
+
isRequired: false,
|
|
494
|
+
transformFunction: null
|
|
495
|
+
},
|
|
496
|
+
stateStorage: {
|
|
497
|
+
classPropertyName: "stateStorage",
|
|
498
|
+
publicName: "stateStorage",
|
|
499
|
+
isSignal: true,
|
|
500
|
+
isRequired: false,
|
|
501
|
+
transformFunction: null
|
|
502
|
+
},
|
|
503
|
+
defaultVisible: {
|
|
504
|
+
classPropertyName: "defaultVisible",
|
|
505
|
+
publicName: "defaultVisible",
|
|
506
|
+
isSignal: true,
|
|
507
|
+
isRequired: false,
|
|
508
|
+
transformFunction: null
|
|
509
|
+
},
|
|
510
|
+
collapse: {
|
|
511
|
+
classPropertyName: "collapse",
|
|
512
|
+
publicName: "collapse",
|
|
513
|
+
isSignal: true,
|
|
514
|
+
isRequired: false,
|
|
515
|
+
transformFunction: null
|
|
516
|
+
},
|
|
517
|
+
ariaLabel: {
|
|
518
|
+
classPropertyName: "ariaLabel",
|
|
519
|
+
publicName: "ariaLabel",
|
|
520
|
+
isSignal: true,
|
|
521
|
+
isRequired: false,
|
|
522
|
+
transformFunction: null
|
|
523
|
+
},
|
|
524
|
+
dt: {
|
|
525
|
+
classPropertyName: "dt",
|
|
526
|
+
publicName: "dt",
|
|
527
|
+
isSignal: true,
|
|
528
|
+
isRequired: false,
|
|
529
|
+
transformFunction: null
|
|
530
|
+
},
|
|
531
|
+
pt: {
|
|
532
|
+
classPropertyName: "pt",
|
|
533
|
+
publicName: "pt",
|
|
534
|
+
isSignal: true,
|
|
535
|
+
isRequired: false,
|
|
536
|
+
transformFunction: null
|
|
537
|
+
},
|
|
538
|
+
ptOptions: {
|
|
539
|
+
classPropertyName: "ptOptions",
|
|
540
|
+
publicName: "ptOptions",
|
|
541
|
+
isSignal: true,
|
|
542
|
+
isRequired: false,
|
|
543
|
+
transformFunction: null
|
|
544
|
+
},
|
|
545
|
+
unstyled: {
|
|
546
|
+
classPropertyName: "unstyled",
|
|
547
|
+
publicName: "unstyled",
|
|
548
|
+
isSignal: true,
|
|
549
|
+
isRequired: false,
|
|
550
|
+
transformFunction: null
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
outputs: {
|
|
554
|
+
layoutChange: "layoutChange",
|
|
555
|
+
expandedChange: "expandedChange"
|
|
556
|
+
},
|
|
557
|
+
host: {
|
|
558
|
+
attributes: { "role": "search" },
|
|
559
|
+
listeners: {
|
|
560
|
+
"document:click": "closeOnOutsideClick($event)",
|
|
561
|
+
"document:keydown.escape": "closeOnEscape($event)"
|
|
562
|
+
},
|
|
563
|
+
properties: {
|
|
564
|
+
"class": "passThrough().root?.class",
|
|
565
|
+
"style": "hostStyle()",
|
|
566
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
567
|
+
"attr.data-variant": "variant()",
|
|
568
|
+
"attr.data-collapse": "collapse()",
|
|
569
|
+
"attr.aria-label": "ariaLabel() ?? null",
|
|
570
|
+
"attr.aria-busy": "busy() || null",
|
|
571
|
+
"class.tx-filters-panel--busy": "busy()",
|
|
572
|
+
"class.tx-filters-panel--collapsible": "collapsible()",
|
|
573
|
+
"class.tx-filters-panel--expanded": "expanded()",
|
|
574
|
+
"class.tx-filters-panel--closing": "closing()"
|
|
575
|
+
},
|
|
576
|
+
classAttribute: "tx-filters-panel"
|
|
577
|
+
},
|
|
578
|
+
providers: [{
|
|
579
|
+
provide: TX_FILTERS_PANEL,
|
|
580
|
+
useExisting: forwardRef(() => TxFiltersPanel)
|
|
581
|
+
}],
|
|
582
|
+
queries: [{
|
|
583
|
+
propertyName: "fields",
|
|
584
|
+
predicate: TxFilterField,
|
|
585
|
+
descendants: true,
|
|
586
|
+
isSignal: true
|
|
587
|
+
}, {
|
|
588
|
+
propertyName: "resetAction",
|
|
589
|
+
first: true,
|
|
590
|
+
predicate: TxFiltersReset,
|
|
591
|
+
descendants: true,
|
|
592
|
+
isSignal: true
|
|
593
|
+
}],
|
|
594
|
+
viewQueries: [
|
|
595
|
+
{
|
|
596
|
+
propertyName: "fieldsContainer",
|
|
597
|
+
first: true,
|
|
598
|
+
predicate: ["fieldsContainer"],
|
|
599
|
+
descendants: true,
|
|
600
|
+
isSignal: true
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
propertyName: "toggleButton",
|
|
604
|
+
first: true,
|
|
605
|
+
predicate: ["toggleButton"],
|
|
606
|
+
descendants: true,
|
|
607
|
+
isSignal: true
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
propertyName: "menuList",
|
|
611
|
+
first: true,
|
|
612
|
+
predicate: ["menuList"],
|
|
613
|
+
descendants: true,
|
|
614
|
+
isSignal: true
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
ngImport: i0,
|
|
618
|
+
template: "@if (collapsible()) {\n <button\n #toggleButton\n type=\"button\"\n class=\"tx-filters-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"id + '-panel'\"\n (click)=\"setExpanded(!expanded())\"\n >\n <tx-icon name=\"filter\" aria-hidden=\"true\" />\n <span>{{ translations().filters }}</span>\n @if (activeCount()) {\n <span class=\"tx-filters-panel__count tx-filters-panel__count--inline\">{{ activeCount() }}</span>\n }\n <tx-icon class=\"tx-filters-panel__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n}\n<div\n class=\"tx-filters-panel__panel\"\n [id]=\"id + '-panel'\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n (animationend)=\"onPanelAnimationEnd($event)\"\n>\n <div\n #fieldsContainer\n class=\"tx-filters-panel__fields\"\n [class]=\"passThrough().fields?.class\"\n [style]=\"passThrough().fields?.style\"\n >\n <ng-content />\n </div>\n @if (collapsible() && resetAction()) {\n <div class=\"tx-filters-panel__panel-footer\">\n <button\n txButton\n type=\"button\"\n severity=\"warn\"\n outlined\n fluid\n icon=\"filter-slash\"\n [unstyled]=\"isUnstyled()\"\n (click)=\"clearFilters()\"\n >\n {{ translations().clearFilters }}\n </button>\n </div>\n }\n</div>\n<div class=\"tx-filters-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @if (customizable()) {\n <button\n type=\"button\"\n class=\"tx-filters-panel__menu-button\"\n aria-haspopup=\"menu\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n [class.tx-filters-panel__menu-button--open]=\"menuOpen()\"\n [attr.aria-label]=\"menuButtonLabel()\"\n [txTooltip]=\"menuOpen() ? undefined : translations().filters\"\n tooltipPlacement=\"top\"\n [txPopoverTrigger]=\"menu\"\n >\n <tx-icon name=\"sliders-h\" aria-hidden=\"true\" />\n @if (hiddenCount()) {\n <span class=\"tx-filters-panel__count tx-filters-panel__count--corner\" aria-hidden=\"true\">{{ hiddenCount() }}</span>\n }\n </button>\n <tx-popover\n #menu\n placement=\"bottom-end\"\n [offset]=\"8\"\n [ariaLabel]=\"translations().showFilters\"\n [dt]=\"menuPopoverDt\"\n [pt]=\"menuPopoverPt()\"\n [unstyled]=\"isUnstyled()\"\n (opened)=\"menuOpen.set(true)\"\n (closed)=\"menuOpen.set(false)\"\n >\n <div class=\"tx-filters-panel-menu\" [attr.data-styled]=\"!isUnstyled() || null\" [class]=\"passThrough().menu?.class\" [style]=\"passThrough().menu?.style\">\n <div class=\"tx-filters-panel-menu__head\">\n <span class=\"tx-filters-panel-menu__title\" [id]=\"id + '-menu-title'\">{{ translations().showFilters }}</span>\n <span class=\"tx-filters-panel-menu__counter\">{{ counterText() }}</span>\n </div>\n <div\n #menuList\n class=\"tx-filters-panel-menu__list\"\n role=\"menu\"\n cdkDropList\n cdkDropListLockAxis=\"y\"\n [attr.aria-labelledby]=\"id + '-menu-title'\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (option of options(); track option.key) {\n <div\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-filters-panel-menu__row\"\n role=\"none\"\n [cdkDragBoundary]=\"menuList\"\n [class.tx-filters-panel-menu__row--on]=\"option.visible\"\n [class.tx-filters-panel-menu__row--locked]=\"option.active\"\n >\n <button\n type=\"button\"\n class=\"tx-filters-panel-menu__toggle\"\n role=\"menuitemcheckbox\"\n [attr.data-key]=\"option.key\"\n [attr.aria-checked]=\"option.visible\"\n [attr.aria-disabled]=\"option.active || null\"\n [attr.aria-description]=\"option.active ? translations().filterHasValue : null\"\n [title]=\"option.active ? translations().filterHasValue : ''\"\n (click)=\"toggle(option.key)\"\n (keydown)=\"onMenuKeydown($event, option.key)\"\n >\n <span class=\"tx-filters-panel-menu__check\" aria-hidden=\"true\"><tx-icon name=\"check\" /></span>\n <span class=\"tx-filters-panel-menu__label\">{{ option.label }}</span>\n @if (option.active) {\n <span class=\"tx-filters-panel-menu__dot\" aria-hidden=\"true\"></span>\n }\n </button>\n <span class=\"tx-filters-panel-menu__handle\" cdkDragHandle aria-hidden=\"true\" [title]=\"translations().reorderFilter\">\n <tx-icon name=\"bars\" />\n </span>\n </div>\n }\n </div>\n <div class=\"tx-filters-panel-menu__footer\" role=\"none\">\n <button type=\"button\" class=\"tx-filters-panel-menu__reset\" role=\"menuitem\" (click)=\"reset()\" (keydown)=\"onMenuKeydown($event, '')\">\n {{ translations().resetFiltersLayout }}\n </button>\n </div>\n </div>\n </tx-popover>\n }\n <ng-content select=\"[txFiltersActions]\" />\n</div>\n",
|
|
619
|
+
styles: [":host{position:relative;display:flex;flex-wrap:wrap;align-items:flex-end}:host(.tx-filters-panel--busy){pointer-events:none}.tx-filters-panel__panel{display:contents}.tx-filters-panel__fields{display:grid;flex:1;grid-template-columns:repeat(auto-fill,minmax(var(--tx-filters-panel-fields-min-column-width),1fr));min-width:min(100%,var(--tx-filters-panel-fields-min-width))}.tx-filters-panel__fields:empty,.tx-filters-panel__actions:empty{display:none}.tx-filters-panel__actions{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:flex-end;margin-inline-start:auto}.tx-filters-panel__toggle,.tx-filters-panel__panel-footer{display:none}.tx-filters-panel__toggle,.tx-filters-panel__menu-button{position:relative;align-items:center;justify-content:center;border:0;cursor:pointer;font:inherit}.tx-filters-panel__menu-button{display:inline-flex}.tx-filters-panel-menu{display:flex;flex-direction:column}.tx-filters-panel-menu__head{display:flex;align-items:baseline;justify-content:space-between}.tx-filters-panel-menu__list{display:flex;flex-direction:column;min-height:0;overflow-y:auto}.tx-filters-panel-menu__row{display:flex;align-items:center}.tx-filters-panel-menu__toggle,.tx-filters-panel-menu__reset{display:flex;align-items:center;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:start}.tx-filters-panel-menu__toggle{flex:1;min-width:0}.tx-filters-panel-menu__toggle[aria-disabled=true]{cursor:default}.tx-filters-panel-menu__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-filters-panel-menu__reset{width:100%}.tx-filters-panel-menu__handle{display:grid;flex-shrink:0;place-items:center;cursor:grab}.tx-filters-panel-menu__handle:active{cursor:grabbing}@media(width<64rem){:host(.tx-filters-panel--collapsible[data-collapse=auto]){align-items:center}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__toggle{display:inline-flex}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel{position:absolute;top:100%;inset-inline-start:0;display:none;flex-direction:column;box-sizing:border-box;width:100%}:host(.tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--expanded) .tx-filters-panel__panel,:host(.tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--closing) .tx-filters-panel__panel{display:flex}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__fields{flex:1 1 auto;align-content:start;width:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel-footer{display:block}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__menu-button,:host(.tx-filters-panel--collapsible[data-collapse=auto]) ::ng-deep .tx-filters-panel__reset{display:none}}:host(.tx-filters-panel--collapsible[data-collapse=always]){align-items:center}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__toggle{display:inline-flex}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel{position:absolute;top:100%;inset-inline-start:0;display:none;flex-direction:column;box-sizing:border-box;width:100%}:host(.tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--expanded) .tx-filters-panel__panel,:host(.tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--closing) .tx-filters-panel__panel{display:flex}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__fields{flex:1 1 auto;align-content:start;width:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel-footer{display:block}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__menu-button,:host(.tx-filters-panel--collapsible[data-collapse=always]) ::ng-deep .tx-filters-panel__reset{display:none}:host([data-styled]){gap:var(--tx-filters-panel-gap);padding:var(--tx-filters-panel-padding);border-radius:var(--tx-filters-panel-border-radius);background:var(--tx-filters-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-border-color);color:var(--tx-filters-panel-color);font-family:var(--tx-font-family)}:host([data-styled][data-variant=plain]){padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field{position:relative}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field>*{visibility:hidden}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before,:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after{position:absolute;inset-inline:0;border-radius:var(--tx-skeleton-border-radius);background-color:var(--tx-skeleton-background);background-image:linear-gradient(90deg,transparent 35%,var(--tx-skeleton-wave-color) 50%,transparent 65%);background-size:300% 100%;animation:tx-filters-panel-skeleton var(--tx-skeleton-duration) ease-in-out infinite;content:\"\"}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before{top:var(--tx-filters-panel-skeleton-label-offset);width:var(--tx-filters-panel-skeleton-label-width);height:var(--tx-skeleton-line-height)}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after{bottom:0;height:var(--tx-filters-panel-skeleton-control-height);border-radius:var(--tx-filters-panel-skeleton-control-border-radius)}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:has(>:only-child):before{display:none}@keyframes tx-filters-panel-skeleton{0%{background-position:100% 0}to{background-position:0 0}}:host([data-styled]) .tx-filters-panel__fields{column-gap:var(--tx-filters-panel-fields-column-gap);row-gap:var(--tx-filters-panel-fields-row-gap)}:host([data-styled]) .tx-filters-panel__actions{gap:var(--tx-filters-panel-actions-gap)}:host([data-styled]) .tx-filters-panel__toggle,:host([data-styled]) .tx-filters-panel__menu-button{min-height:var(--tx-filters-panel-button-size);border-radius:var(--tx-filters-panel-button-border-radius);background:var(--tx-filters-panel-button-background);box-shadow:inset 0 0 0 1px var(--tx-filters-panel-button-border-color);font-size:var(--tx-filters-panel-button-font-size);font-weight:var(--tx-filters-panel-button-font-weight);transition:background-color var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing),color var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-filters-panel__toggle tx-icon,:host([data-styled]) .tx-filters-panel__menu-button tx-icon{font-size:var(--tx-filters-panel-button-icon-size)}:host([data-styled]) .tx-filters-panel__toggle:hover,:host([data-styled]) .tx-filters-panel__menu-button:hover{background:var(--tx-filters-panel-button-hover-background)}:host([data-styled]) .tx-filters-panel__toggle:focus-visible,:host([data-styled]) .tx-filters-panel__menu-button:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--tx-filters-panel-button-border-color),var(--tx-filters-panel-button-focus-ring-shadow)}:host([data-styled]) .tx-filters-panel__toggle{height:var(--tx-filters-panel-button-size);gap:var(--tx-filters-panel-button-gap);padding:0 var(--tx-filters-panel-button-padding-x);color:var(--tx-filters-panel-button-color)}:host([data-styled]) .tx-filters-panel__chevron{transition:rotate var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing)}:host([data-styled].tx-filters-panel--expanded) .tx-filters-panel__chevron{rotate:180deg}:host([data-styled]) .tx-filters-panel__menu-button{min-width:var(--tx-filters-panel-button-size);aspect-ratio:1;padding:0;color:var(--tx-filters-panel-button-muted-color)}:host([data-styled]) .tx-filters-panel__menu-button:hover,:host([data-styled]) .tx-filters-panel__menu-button.tx-filters-panel__menu-button--open{background:var(--tx-filters-panel-button-hover-background);color:var(--tx-filters-panel-button-color)}:host([data-styled]) .tx-filters-panel__count{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--tx-filters-panel-count-size);height:var(--tx-filters-panel-count-size);padding:0 var(--tx-filters-panel-count-padding-x);border-radius:var(--tx-radius-full);background:var(--tx-filters-panel-count-background);color:var(--tx-filters-panel-count-color);font-size:var(--tx-filters-panel-count-font-size);font-weight:var(--tx-filters-panel-count-font-weight);font-variant-numeric:tabular-nums;line-height:1}:host([data-styled]) .tx-filters-panel__count--corner{position:absolute;top:var(--tx-filters-panel-count-offset);right:var(--tx-filters-panel-count-offset);box-shadow:0 0 0 var(--tx-filters-panel-count-ring-width) var(--tx-filters-panel-count-ring-color);pointer-events:none}@media(width<64rem){:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel{z-index:var(--tx-filters-panel-panel-z-index);gap:var(--tx-filters-panel-panel-gap);max-width:var(--tx-filters-panel-panel-max-width);max-height:var(--tx-filters-panel-panel-max-height);margin-top:var(--tx-filters-panel-panel-offset);padding:var(--tx-filters-panel-panel-padding);transform-origin:top left;border-radius:var(--tx-filters-panel-panel-border-radius);background:var(--tx-filters-panel-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-panel-border-color),var(--tx-filters-panel-panel-shadow)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--expanded) .tx-filters-panel__panel{animation:tx-filters-panel-in var(--tx-filters-panel-panel-enter-duration) var(--tx-filters-panel-panel-enter-easing)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--closing) .tx-filters-panel__panel{animation:tx-filters-panel-out var(--tx-filters-panel-panel-leave-duration) var(--tx-filters-panel-panel-leave-easing) forwards}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__fields{margin:-2px;padding:2px}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel-footer{padding-top:var(--tx-filters-panel-panel-footer-padding);border-top:1px solid var(--tx-filters-panel-panel-border-color)}}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel{z-index:var(--tx-filters-panel-panel-z-index);gap:var(--tx-filters-panel-panel-gap);max-width:var(--tx-filters-panel-panel-max-width);max-height:var(--tx-filters-panel-panel-max-height);margin-top:var(--tx-filters-panel-panel-offset);padding:var(--tx-filters-panel-panel-padding);transform-origin:top left;border-radius:var(--tx-filters-panel-panel-border-radius);background:var(--tx-filters-panel-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-panel-border-color),var(--tx-filters-panel-panel-shadow)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--expanded) .tx-filters-panel__panel{animation:tx-filters-panel-in var(--tx-filters-panel-panel-enter-duration) var(--tx-filters-panel-panel-enter-easing)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--closing) .tx-filters-panel__panel{animation:tx-filters-panel-out var(--tx-filters-panel-panel-leave-duration) var(--tx-filters-panel-panel-leave-easing) forwards}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__fields{margin:-2px;padding:2px}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel-footer{padding-top:var(--tx-filters-panel-panel-footer-padding);border-top:1px solid var(--tx-filters-panel-panel-border-color)}@keyframes tx-filters-panel-out{to{opacity:0;transform:translateY(-6px) scale(.98)}}@keyframes tx-filters-panel-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}.tx-filters-panel-menu[data-styled]{box-sizing:border-box;width:var(--tx-filters-panel-menu-width);max-height:var(--tx-filters-panel-menu-max-height);padding:var(--tx-filters-panel-menu-padding)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__head{gap:var(--tx-filters-panel-menu-head-gap);padding:var(--tx-filters-panel-menu-head-padding)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__title{color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-title-font-size);font-weight:var(--tx-filters-panel-menu-title-font-weight);letter-spacing:var(--tx-filters-panel-menu-title-letter-spacing);text-transform:uppercase}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__counter{color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-title-font-size);font-variant-numeric:tabular-nums}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__list{gap:var(--tx-filters-panel-menu-row-gap)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row{border-radius:var(--tx-filters-panel-menu-row-border-radius);transition:background-color var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:hover,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:has(:focus-visible){background:var(--tx-filters-panel-menu-row-hover-background)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset{height:var(--tx-filters-panel-menu-row-height);border-radius:var(--tx-filters-panel-menu-row-border-radius);font-size:var(--tx-filters-panel-menu-row-font-size)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle:focus-visible,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle{gap:var(--tx-filters-panel-menu-row-gap-inner);padding:var(--tx-filters-panel-menu-row-padding);color:var(--tx-text-primary)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:not(.tx-filters-panel-menu__row--on) .tx-filters-panel-menu__label{color:var(--tx-filters-panel-menu-muted-color)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__check{display:grid;flex-shrink:0;place-items:center;width:var(--tx-filters-panel-menu-check-size);color:var(--tx-filters-panel-menu-check-color);font-size:var(--tx-filters-panel-menu-handle-icon-size);opacity:0;scale:.5;transition:opacity var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing),scale var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__check tx-icon{--tx-icon-stroke-width: 2.5}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row--on .tx-filters-panel-menu__check{opacity:1;scale:1}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__dot{flex-shrink:0;width:var(--tx-filters-panel-menu-dot-size);height:var(--tx-filters-panel-menu-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-filters-panel-menu-dot-color)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__handle{width:var(--tx-filters-panel-menu-handle-width);height:var(--tx-filters-panel-menu-row-height);border-radius:var(--tx-filters-panel-menu-handle-border-radius);color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-handle-icon-size);opacity:0;transition:opacity var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:hover .tx-filters-panel-menu__handle,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:has(:focus-visible) .tx-filters-panel-menu__handle{opacity:.5}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row .tx-filters-panel-menu__handle:hover,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row.cdk-drag-preview .tx-filters-panel-menu__handle{opacity:1}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__footer{margin-top:var(--tx-filters-panel-menu-footer-spacing);padding-top:var(--tx-filters-panel-menu-footer-spacing);border-top:1px solid var(--tx-surface-border)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset{padding:var(--tx-filters-panel-menu-reset-padding);color:var(--tx-filters-panel-menu-reset-color);transition:background-color var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset:hover{background:var(--tx-filters-panel-menu-row-hover-background)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row.cdk-drag-preview{box-sizing:border-box;border-radius:var(--tx-filters-panel-menu-row-border-radius);background:var(--tx-filters-panel-menu-drag-background);box-shadow:0 0 0 1px var(--tx-surface-border),var(--tx-filters-panel-menu-drag-shadow);color:var(--tx-text-primary);font-family:var(--tx-font-family);font-size:var(--tx-filters-panel-menu-row-font-size)}.tx-filters-panel-menu__row.cdk-drag-placeholder{opacity:var(--tx-filters-panel-menu-placeholder-opacity)}.tx-filters-panel-menu__row.cdk-drag-animating,.tx-filters-panel-menu__list.cdk-drop-list-dragging .tx-filters-panel-menu__row:not(.cdk-drag-placeholder){transition:transform var(--tx-filters-panel-menu-drag-duration) var(--tx-filters-panel-menu-drag-easing)}@media(prefers-reduced-motion:reduce){:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before,:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after,:host([data-styled]) .tx-filters-panel__panel,.tx-filters-panel-menu__row.cdk-drag-animating,.tx-filters-panel-menu__list.cdk-drop-list-dragging .tx-filters-panel-menu__row:not(.cdk-drag-placeholder){animation:none!important;transition:none}}\n"],
|
|
620
|
+
dependencies: [
|
|
621
|
+
{
|
|
622
|
+
kind: "directive",
|
|
623
|
+
type: CdkDropList,
|
|
624
|
+
selector: "[cdkDropList], cdk-drop-list",
|
|
625
|
+
inputs: [
|
|
626
|
+
"cdkDropListConnectedTo",
|
|
627
|
+
"cdkDropListData",
|
|
628
|
+
"cdkDropListOrientation",
|
|
629
|
+
"id",
|
|
630
|
+
"cdkDropListLockAxis",
|
|
631
|
+
"cdkDropListDisabled",
|
|
632
|
+
"cdkDropListSortingDisabled",
|
|
633
|
+
"cdkDropListEnterPredicate",
|
|
634
|
+
"cdkDropListSortPredicate",
|
|
635
|
+
"cdkDropListAutoScrollDisabled",
|
|
636
|
+
"cdkDropListAutoScrollStep",
|
|
637
|
+
"cdkDropListElementContainer",
|
|
638
|
+
"cdkDropListHasAnchor"
|
|
639
|
+
],
|
|
640
|
+
outputs: [
|
|
641
|
+
"cdkDropListDropped",
|
|
642
|
+
"cdkDropListEntered",
|
|
643
|
+
"cdkDropListExited",
|
|
644
|
+
"cdkDropListSorted"
|
|
645
|
+
],
|
|
646
|
+
exportAs: ["cdkDropList"]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
kind: "directive",
|
|
650
|
+
type: CdkDrag,
|
|
651
|
+
selector: "[cdkDrag]",
|
|
652
|
+
inputs: [
|
|
653
|
+
"cdkDragData",
|
|
654
|
+
"cdkDragLockAxis",
|
|
655
|
+
"cdkDragRootElement",
|
|
656
|
+
"cdkDragBoundary",
|
|
657
|
+
"cdkDragStartDelay",
|
|
658
|
+
"cdkDragFreeDragPosition",
|
|
659
|
+
"cdkDragDisabled",
|
|
660
|
+
"cdkDragConstrainPosition",
|
|
661
|
+
"cdkDragPreviewClass",
|
|
662
|
+
"cdkDragPreviewContainer",
|
|
663
|
+
"cdkDragScale"
|
|
664
|
+
],
|
|
665
|
+
outputs: [
|
|
666
|
+
"cdkDragStarted",
|
|
667
|
+
"cdkDragReleased",
|
|
668
|
+
"cdkDragEnded",
|
|
669
|
+
"cdkDragEntered",
|
|
670
|
+
"cdkDragExited",
|
|
671
|
+
"cdkDragDropped",
|
|
672
|
+
"cdkDragMoved"
|
|
673
|
+
],
|
|
674
|
+
exportAs: ["cdkDrag"]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
kind: "directive",
|
|
678
|
+
type: CdkDragHandle,
|
|
679
|
+
selector: "[cdkDragHandle]",
|
|
680
|
+
inputs: ["cdkDragHandleDisabled"]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
kind: "component",
|
|
684
|
+
type: TxIcon,
|
|
685
|
+
selector: "tx-icon",
|
|
686
|
+
inputs: ["name"]
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
kind: "component",
|
|
690
|
+
type: TxButton,
|
|
691
|
+
selector: "button[txButton], a[txButton]",
|
|
692
|
+
inputs: [
|
|
693
|
+
"label",
|
|
694
|
+
"severity",
|
|
695
|
+
"size",
|
|
696
|
+
"variant",
|
|
697
|
+
"outlined",
|
|
698
|
+
"text",
|
|
699
|
+
"link",
|
|
700
|
+
"rounded",
|
|
701
|
+
"raised",
|
|
702
|
+
"plain",
|
|
703
|
+
"fluid",
|
|
704
|
+
"disabled",
|
|
705
|
+
"tabindex",
|
|
706
|
+
"icon",
|
|
707
|
+
"iconPos",
|
|
708
|
+
"iconOnly",
|
|
709
|
+
"loading",
|
|
710
|
+
"loadingIcon",
|
|
711
|
+
"badge",
|
|
712
|
+
"badgeSeverity",
|
|
713
|
+
"dt",
|
|
714
|
+
"pt",
|
|
715
|
+
"ptOptions",
|
|
716
|
+
"unstyled"
|
|
717
|
+
]
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
kind: "component",
|
|
721
|
+
type: TxPopover,
|
|
722
|
+
selector: "tx-popover",
|
|
723
|
+
inputs: [
|
|
724
|
+
"placement",
|
|
725
|
+
"offset",
|
|
726
|
+
"arrow",
|
|
727
|
+
"header",
|
|
728
|
+
"closeButton",
|
|
729
|
+
"dismissable",
|
|
730
|
+
"closeOnEscape",
|
|
731
|
+
"autoFocus",
|
|
732
|
+
"restoreFocus",
|
|
733
|
+
"scroll",
|
|
734
|
+
"ariaLabel",
|
|
735
|
+
"ariaLabelledBy",
|
|
736
|
+
"panelClass",
|
|
737
|
+
"open",
|
|
738
|
+
"dt",
|
|
739
|
+
"pt",
|
|
740
|
+
"ptOptions",
|
|
741
|
+
"unstyled"
|
|
742
|
+
],
|
|
743
|
+
outputs: [
|
|
744
|
+
"openChange",
|
|
745
|
+
"opened",
|
|
746
|
+
"closed"
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
kind: "directive",
|
|
751
|
+
type: TxPopoverTrigger,
|
|
752
|
+
selector: "[txPopoverTrigger]",
|
|
753
|
+
inputs: ["txPopoverTrigger"]
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
kind: "directive",
|
|
757
|
+
type: TxTooltip,
|
|
758
|
+
selector: "[txTooltip]",
|
|
759
|
+
inputs: [
|
|
760
|
+
"txTooltip",
|
|
761
|
+
"tooltipPlacement",
|
|
762
|
+
"tooltipEvent",
|
|
763
|
+
"tooltipShowDelay",
|
|
764
|
+
"tooltipHideDelay",
|
|
765
|
+
"tooltipLife",
|
|
766
|
+
"tooltipOffset",
|
|
767
|
+
"tooltipArrow",
|
|
768
|
+
"tooltipInteractive",
|
|
769
|
+
"tooltipDisabled",
|
|
770
|
+
"tooltipOverflowOnly",
|
|
771
|
+
"tooltipMultiline",
|
|
772
|
+
"tooltipContext",
|
|
773
|
+
"tooltipClass",
|
|
774
|
+
"tooltipDt",
|
|
775
|
+
"tooltipPt",
|
|
776
|
+
"tooltipPtOptions",
|
|
777
|
+
"tooltipUnstyled"
|
|
778
|
+
],
|
|
779
|
+
outputs: ["tooltipShown", "tooltipHidden"],
|
|
780
|
+
exportAs: ["txTooltip"]
|
|
781
|
+
}
|
|
782
|
+
],
|
|
783
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
784
|
+
});
|
|
785
|
+
};
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
787
|
+
minVersion: "12.0.0",
|
|
788
|
+
version: "22.2.3",
|
|
789
|
+
ngImport: i0,
|
|
790
|
+
type: TxFiltersPanel,
|
|
791
|
+
decorators: [{
|
|
792
|
+
type: Component,
|
|
793
|
+
args: [{
|
|
794
|
+
selector: "tx-filters-panel",
|
|
795
|
+
imports: [
|
|
796
|
+
CdkDropList,
|
|
797
|
+
CdkDrag,
|
|
798
|
+
CdkDragHandle,
|
|
799
|
+
TxIcon,
|
|
800
|
+
TxButton,
|
|
801
|
+
TxPopover,
|
|
802
|
+
TxPopoverTrigger,
|
|
803
|
+
TxTooltip
|
|
804
|
+
],
|
|
805
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
806
|
+
providers: [{
|
|
807
|
+
provide: TX_FILTERS_PANEL,
|
|
808
|
+
useExisting: forwardRef(() => TxFiltersPanel)
|
|
809
|
+
}],
|
|
810
|
+
host: {
|
|
811
|
+
class: "tx-filters-panel",
|
|
812
|
+
role: "search",
|
|
813
|
+
"[class]": "passThrough().root?.class",
|
|
814
|
+
"[style]": "hostStyle()",
|
|
815
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
816
|
+
"[attr.data-variant]": "variant()",
|
|
817
|
+
"[attr.data-collapse]": "collapse()",
|
|
818
|
+
"[attr.aria-label]": "ariaLabel() ?? null",
|
|
819
|
+
"[attr.aria-busy]": "busy() || null",
|
|
820
|
+
"[class.tx-filters-panel--busy]": "busy()",
|
|
821
|
+
"[class.tx-filters-panel--collapsible]": "collapsible()",
|
|
822
|
+
"[class.tx-filters-panel--expanded]": "expanded()",
|
|
823
|
+
"[class.tx-filters-panel--closing]": "closing()",
|
|
824
|
+
"(document:click)": "closeOnOutsideClick($event)",
|
|
825
|
+
"(document:keydown.escape)": "closeOnEscape($event)"
|
|
826
|
+
},
|
|
827
|
+
template: "@if (collapsible()) {\n <button\n #toggleButton\n type=\"button\"\n class=\"tx-filters-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"id + '-panel'\"\n (click)=\"setExpanded(!expanded())\"\n >\n <tx-icon name=\"filter\" aria-hidden=\"true\" />\n <span>{{ translations().filters }}</span>\n @if (activeCount()) {\n <span class=\"tx-filters-panel__count tx-filters-panel__count--inline\">{{ activeCount() }}</span>\n }\n <tx-icon class=\"tx-filters-panel__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n </button>\n}\n<div\n class=\"tx-filters-panel__panel\"\n [id]=\"id + '-panel'\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n (animationend)=\"onPanelAnimationEnd($event)\"\n>\n <div\n #fieldsContainer\n class=\"tx-filters-panel__fields\"\n [class]=\"passThrough().fields?.class\"\n [style]=\"passThrough().fields?.style\"\n >\n <ng-content />\n </div>\n @if (collapsible() && resetAction()) {\n <div class=\"tx-filters-panel__panel-footer\">\n <button\n txButton\n type=\"button\"\n severity=\"warn\"\n outlined\n fluid\n icon=\"filter-slash\"\n [unstyled]=\"isUnstyled()\"\n (click)=\"clearFilters()\"\n >\n {{ translations().clearFilters }}\n </button>\n </div>\n }\n</div>\n<div class=\"tx-filters-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @if (customizable()) {\n <button\n type=\"button\"\n class=\"tx-filters-panel__menu-button\"\n aria-haspopup=\"menu\"\n [class]=\"passThrough().menuButton?.class\"\n [style]=\"passThrough().menuButton?.style\"\n [class.tx-filters-panel__menu-button--open]=\"menuOpen()\"\n [attr.aria-label]=\"menuButtonLabel()\"\n [txTooltip]=\"menuOpen() ? undefined : translations().filters\"\n tooltipPlacement=\"top\"\n [txPopoverTrigger]=\"menu\"\n >\n <tx-icon name=\"sliders-h\" aria-hidden=\"true\" />\n @if (hiddenCount()) {\n <span class=\"tx-filters-panel__count tx-filters-panel__count--corner\" aria-hidden=\"true\">{{ hiddenCount() }}</span>\n }\n </button>\n <tx-popover\n #menu\n placement=\"bottom-end\"\n [offset]=\"8\"\n [ariaLabel]=\"translations().showFilters\"\n [dt]=\"menuPopoverDt\"\n [pt]=\"menuPopoverPt()\"\n [unstyled]=\"isUnstyled()\"\n (opened)=\"menuOpen.set(true)\"\n (closed)=\"menuOpen.set(false)\"\n >\n <div class=\"tx-filters-panel-menu\" [attr.data-styled]=\"!isUnstyled() || null\" [class]=\"passThrough().menu?.class\" [style]=\"passThrough().menu?.style\">\n <div class=\"tx-filters-panel-menu__head\">\n <span class=\"tx-filters-panel-menu__title\" [id]=\"id + '-menu-title'\">{{ translations().showFilters }}</span>\n <span class=\"tx-filters-panel-menu__counter\">{{ counterText() }}</span>\n </div>\n <div\n #menuList\n class=\"tx-filters-panel-menu__list\"\n role=\"menu\"\n cdkDropList\n cdkDropListLockAxis=\"y\"\n [attr.aria-labelledby]=\"id + '-menu-title'\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (option of options(); track option.key) {\n <div\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-filters-panel-menu__row\"\n role=\"none\"\n [cdkDragBoundary]=\"menuList\"\n [class.tx-filters-panel-menu__row--on]=\"option.visible\"\n [class.tx-filters-panel-menu__row--locked]=\"option.active\"\n >\n <button\n type=\"button\"\n class=\"tx-filters-panel-menu__toggle\"\n role=\"menuitemcheckbox\"\n [attr.data-key]=\"option.key\"\n [attr.aria-checked]=\"option.visible\"\n [attr.aria-disabled]=\"option.active || null\"\n [attr.aria-description]=\"option.active ? translations().filterHasValue : null\"\n [title]=\"option.active ? translations().filterHasValue : ''\"\n (click)=\"toggle(option.key)\"\n (keydown)=\"onMenuKeydown($event, option.key)\"\n >\n <span class=\"tx-filters-panel-menu__check\" aria-hidden=\"true\"><tx-icon name=\"check\" /></span>\n <span class=\"tx-filters-panel-menu__label\">{{ option.label }}</span>\n @if (option.active) {\n <span class=\"tx-filters-panel-menu__dot\" aria-hidden=\"true\"></span>\n }\n </button>\n <span class=\"tx-filters-panel-menu__handle\" cdkDragHandle aria-hidden=\"true\" [title]=\"translations().reorderFilter\">\n <tx-icon name=\"bars\" />\n </span>\n </div>\n }\n </div>\n <div class=\"tx-filters-panel-menu__footer\" role=\"none\">\n <button type=\"button\" class=\"tx-filters-panel-menu__reset\" role=\"menuitem\" (click)=\"reset()\" (keydown)=\"onMenuKeydown($event, '')\">\n {{ translations().resetFiltersLayout }}\n </button>\n </div>\n </div>\n </tx-popover>\n }\n <ng-content select=\"[txFiltersActions]\" />\n</div>\n",
|
|
828
|
+
styles: [":host{position:relative;display:flex;flex-wrap:wrap;align-items:flex-end}:host(.tx-filters-panel--busy){pointer-events:none}.tx-filters-panel__panel{display:contents}.tx-filters-panel__fields{display:grid;flex:1;grid-template-columns:repeat(auto-fill,minmax(var(--tx-filters-panel-fields-min-column-width),1fr));min-width:min(100%,var(--tx-filters-panel-fields-min-width))}.tx-filters-panel__fields:empty,.tx-filters-panel__actions:empty{display:none}.tx-filters-panel__actions{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:flex-end;margin-inline-start:auto}.tx-filters-panel__toggle,.tx-filters-panel__panel-footer{display:none}.tx-filters-panel__toggle,.tx-filters-panel__menu-button{position:relative;align-items:center;justify-content:center;border:0;cursor:pointer;font:inherit}.tx-filters-panel__menu-button{display:inline-flex}.tx-filters-panel-menu{display:flex;flex-direction:column}.tx-filters-panel-menu__head{display:flex;align-items:baseline;justify-content:space-between}.tx-filters-panel-menu__list{display:flex;flex-direction:column;min-height:0;overflow-y:auto}.tx-filters-panel-menu__row{display:flex;align-items:center}.tx-filters-panel-menu__toggle,.tx-filters-panel-menu__reset{display:flex;align-items:center;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:start}.tx-filters-panel-menu__toggle{flex:1;min-width:0}.tx-filters-panel-menu__toggle[aria-disabled=true]{cursor:default}.tx-filters-panel-menu__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-filters-panel-menu__reset{width:100%}.tx-filters-panel-menu__handle{display:grid;flex-shrink:0;place-items:center;cursor:grab}.tx-filters-panel-menu__handle:active{cursor:grabbing}@media(width<64rem){:host(.tx-filters-panel--collapsible[data-collapse=auto]){align-items:center}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__toggle{display:inline-flex}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel{position:absolute;top:100%;inset-inline-start:0;display:none;flex-direction:column;box-sizing:border-box;width:100%}:host(.tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--expanded) .tx-filters-panel__panel,:host(.tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--closing) .tx-filters-panel__panel{display:flex}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__fields{flex:1 1 auto;align-content:start;width:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel-footer{display:block}:host(.tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__menu-button,:host(.tx-filters-panel--collapsible[data-collapse=auto]) ::ng-deep .tx-filters-panel__reset{display:none}}:host(.tx-filters-panel--collapsible[data-collapse=always]){align-items:center}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__toggle{display:inline-flex}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel{position:absolute;top:100%;inset-inline-start:0;display:none;flex-direction:column;box-sizing:border-box;width:100%}:host(.tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--expanded) .tx-filters-panel__panel,:host(.tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--closing) .tx-filters-panel__panel{display:flex}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__fields{flex:1 1 auto;align-content:start;width:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel-footer{display:block}:host(.tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__menu-button,:host(.tx-filters-panel--collapsible[data-collapse=always]) ::ng-deep .tx-filters-panel__reset{display:none}:host([data-styled]){gap:var(--tx-filters-panel-gap);padding:var(--tx-filters-panel-padding);border-radius:var(--tx-filters-panel-border-radius);background:var(--tx-filters-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-border-color);color:var(--tx-filters-panel-color);font-family:var(--tx-font-family)}:host([data-styled][data-variant=plain]){padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field{position:relative}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field>*{visibility:hidden}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before,:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after{position:absolute;inset-inline:0;border-radius:var(--tx-skeleton-border-radius);background-color:var(--tx-skeleton-background);background-image:linear-gradient(90deg,transparent 35%,var(--tx-skeleton-wave-color) 50%,transparent 65%);background-size:300% 100%;animation:tx-filters-panel-skeleton var(--tx-skeleton-duration) ease-in-out infinite;content:\"\"}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before{top:var(--tx-filters-panel-skeleton-label-offset);width:var(--tx-filters-panel-skeleton-label-width);height:var(--tx-skeleton-line-height)}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after{bottom:0;height:var(--tx-filters-panel-skeleton-control-height);border-radius:var(--tx-filters-panel-skeleton-control-border-radius)}:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:has(>:only-child):before{display:none}@keyframes tx-filters-panel-skeleton{0%{background-position:100% 0}to{background-position:0 0}}:host([data-styled]) .tx-filters-panel__fields{column-gap:var(--tx-filters-panel-fields-column-gap);row-gap:var(--tx-filters-panel-fields-row-gap)}:host([data-styled]) .tx-filters-panel__actions{gap:var(--tx-filters-panel-actions-gap)}:host([data-styled]) .tx-filters-panel__toggle,:host([data-styled]) .tx-filters-panel__menu-button{min-height:var(--tx-filters-panel-button-size);border-radius:var(--tx-filters-panel-button-border-radius);background:var(--tx-filters-panel-button-background);box-shadow:inset 0 0 0 1px var(--tx-filters-panel-button-border-color);font-size:var(--tx-filters-panel-button-font-size);font-weight:var(--tx-filters-panel-button-font-weight);transition:background-color var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing),color var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-filters-panel__toggle tx-icon,:host([data-styled]) .tx-filters-panel__menu-button tx-icon{font-size:var(--tx-filters-panel-button-icon-size)}:host([data-styled]) .tx-filters-panel__toggle:hover,:host([data-styled]) .tx-filters-panel__menu-button:hover{background:var(--tx-filters-panel-button-hover-background)}:host([data-styled]) .tx-filters-panel__toggle:focus-visible,:host([data-styled]) .tx-filters-panel__menu-button:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--tx-filters-panel-button-border-color),var(--tx-filters-panel-button-focus-ring-shadow)}:host([data-styled]) .tx-filters-panel__toggle{height:var(--tx-filters-panel-button-size);gap:var(--tx-filters-panel-button-gap);padding:0 var(--tx-filters-panel-button-padding-x);color:var(--tx-filters-panel-button-color)}:host([data-styled]) .tx-filters-panel__chevron{transition:rotate var(--tx-filters-panel-button-transition-duration) var(--tx-motion-easing)}:host([data-styled].tx-filters-panel--expanded) .tx-filters-panel__chevron{rotate:180deg}:host([data-styled]) .tx-filters-panel__menu-button{min-width:var(--tx-filters-panel-button-size);aspect-ratio:1;padding:0;color:var(--tx-filters-panel-button-muted-color)}:host([data-styled]) .tx-filters-panel__menu-button:hover,:host([data-styled]) .tx-filters-panel__menu-button.tx-filters-panel__menu-button--open{background:var(--tx-filters-panel-button-hover-background);color:var(--tx-filters-panel-button-color)}:host([data-styled]) .tx-filters-panel__count{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:var(--tx-filters-panel-count-size);height:var(--tx-filters-panel-count-size);padding:0 var(--tx-filters-panel-count-padding-x);border-radius:var(--tx-radius-full);background:var(--tx-filters-panel-count-background);color:var(--tx-filters-panel-count-color);font-size:var(--tx-filters-panel-count-font-size);font-weight:var(--tx-filters-panel-count-font-weight);font-variant-numeric:tabular-nums;line-height:1}:host([data-styled]) .tx-filters-panel__count--corner{position:absolute;top:var(--tx-filters-panel-count-offset);right:var(--tx-filters-panel-count-offset);box-shadow:0 0 0 var(--tx-filters-panel-count-ring-width) var(--tx-filters-panel-count-ring-color);pointer-events:none}@media(width<64rem){:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel{z-index:var(--tx-filters-panel-panel-z-index);gap:var(--tx-filters-panel-panel-gap);max-width:var(--tx-filters-panel-panel-max-width);max-height:var(--tx-filters-panel-panel-max-height);margin-top:var(--tx-filters-panel-panel-offset);padding:var(--tx-filters-panel-panel-padding);transform-origin:top left;border-radius:var(--tx-filters-panel-panel-border-radius);background:var(--tx-filters-panel-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-panel-border-color),var(--tx-filters-panel-panel-shadow)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--expanded) .tx-filters-panel__panel{animation:tx-filters-panel-in var(--tx-filters-panel-panel-enter-duration) var(--tx-filters-panel-panel-enter-easing)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto].tx-filters-panel--closing) .tx-filters-panel__panel{animation:tx-filters-panel-out var(--tx-filters-panel-panel-leave-duration) var(--tx-filters-panel-panel-leave-easing) forwards}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__fields{margin:-2px;padding:2px}:host([data-styled].tx-filters-panel--collapsible[data-collapse=auto]) .tx-filters-panel__panel-footer{padding-top:var(--tx-filters-panel-panel-footer-padding);border-top:1px solid var(--tx-filters-panel-panel-border-color)}}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel{z-index:var(--tx-filters-panel-panel-z-index);gap:var(--tx-filters-panel-panel-gap);max-width:var(--tx-filters-panel-panel-max-width);max-height:var(--tx-filters-panel-panel-max-height);margin-top:var(--tx-filters-panel-panel-offset);padding:var(--tx-filters-panel-panel-padding);transform-origin:top left;border-radius:var(--tx-filters-panel-panel-border-radius);background:var(--tx-filters-panel-panel-background);box-shadow:0 0 0 1px var(--tx-filters-panel-panel-border-color),var(--tx-filters-panel-panel-shadow)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--expanded) .tx-filters-panel__panel{animation:tx-filters-panel-in var(--tx-filters-panel-panel-enter-duration) var(--tx-filters-panel-panel-enter-easing)}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always].tx-filters-panel--closing) .tx-filters-panel__panel{animation:tx-filters-panel-out var(--tx-filters-panel-panel-leave-duration) var(--tx-filters-panel-panel-leave-easing) forwards}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__fields{margin:-2px;padding:2px}:host([data-styled].tx-filters-panel--collapsible[data-collapse=always]) .tx-filters-panel__panel-footer{padding-top:var(--tx-filters-panel-panel-footer-padding);border-top:1px solid var(--tx-filters-panel-panel-border-color)}@keyframes tx-filters-panel-out{to{opacity:0;transform:translateY(-6px) scale(.98)}}@keyframes tx-filters-panel-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}.tx-filters-panel-menu[data-styled]{box-sizing:border-box;width:var(--tx-filters-panel-menu-width);max-height:var(--tx-filters-panel-menu-max-height);padding:var(--tx-filters-panel-menu-padding)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__head{gap:var(--tx-filters-panel-menu-head-gap);padding:var(--tx-filters-panel-menu-head-padding)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__title{color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-title-font-size);font-weight:var(--tx-filters-panel-menu-title-font-weight);letter-spacing:var(--tx-filters-panel-menu-title-letter-spacing);text-transform:uppercase}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__counter{color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-title-font-size);font-variant-numeric:tabular-nums}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__list{gap:var(--tx-filters-panel-menu-row-gap)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row{border-radius:var(--tx-filters-panel-menu-row-border-radius);transition:background-color var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:hover,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:has(:focus-visible){background:var(--tx-filters-panel-menu-row-hover-background)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset{height:var(--tx-filters-panel-menu-row-height);border-radius:var(--tx-filters-panel-menu-row-border-radius);font-size:var(--tx-filters-panel-menu-row-font-size)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle:focus-visible,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__toggle{gap:var(--tx-filters-panel-menu-row-gap-inner);padding:var(--tx-filters-panel-menu-row-padding);color:var(--tx-text-primary)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:not(.tx-filters-panel-menu__row--on) .tx-filters-panel-menu__label{color:var(--tx-filters-panel-menu-muted-color)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__check{display:grid;flex-shrink:0;place-items:center;width:var(--tx-filters-panel-menu-check-size);color:var(--tx-filters-panel-menu-check-color);font-size:var(--tx-filters-panel-menu-handle-icon-size);opacity:0;scale:.5;transition:opacity var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing),scale var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__check tx-icon{--tx-icon-stroke-width: 2.5}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row--on .tx-filters-panel-menu__check{opacity:1;scale:1}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__dot{flex-shrink:0;width:var(--tx-filters-panel-menu-dot-size);height:var(--tx-filters-panel-menu-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-filters-panel-menu-dot-color)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__handle{width:var(--tx-filters-panel-menu-handle-width);height:var(--tx-filters-panel-menu-row-height);border-radius:var(--tx-filters-panel-menu-handle-border-radius);color:var(--tx-filters-panel-menu-muted-color);font-size:var(--tx-filters-panel-menu-handle-icon-size);opacity:0;transition:opacity var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:hover .tx-filters-panel-menu__handle,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row:has(:focus-visible) .tx-filters-panel-menu__handle{opacity:.5}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row .tx-filters-panel-menu__handle:hover,.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row.cdk-drag-preview .tx-filters-panel-menu__handle{opacity:1}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__footer{margin-top:var(--tx-filters-panel-menu-footer-spacing);padding-top:var(--tx-filters-panel-menu-footer-spacing);border-top:1px solid var(--tx-surface-border)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset{padding:var(--tx-filters-panel-menu-reset-padding);color:var(--tx-filters-panel-menu-reset-color);transition:background-color var(--tx-filters-panel-menu-transition-duration) var(--tx-motion-easing)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__reset:hover{background:var(--tx-filters-panel-menu-row-hover-background)}.tx-filters-panel-menu[data-styled] .tx-filters-panel-menu__row.cdk-drag-preview{box-sizing:border-box;border-radius:var(--tx-filters-panel-menu-row-border-radius);background:var(--tx-filters-panel-menu-drag-background);box-shadow:0 0 0 1px var(--tx-surface-border),var(--tx-filters-panel-menu-drag-shadow);color:var(--tx-text-primary);font-family:var(--tx-font-family);font-size:var(--tx-filters-panel-menu-row-font-size)}.tx-filters-panel-menu__row.cdk-drag-placeholder{opacity:var(--tx-filters-panel-menu-placeholder-opacity)}.tx-filters-panel-menu__row.cdk-drag-animating,.tx-filters-panel-menu__list.cdk-drop-list-dragging .tx-filters-panel-menu__row:not(.cdk-drag-placeholder){transition:transform var(--tx-filters-panel-menu-drag-duration) var(--tx-filters-panel-menu-drag-easing)}@media(prefers-reduced-motion:reduce){:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:before,:host([data-styled].tx-filters-panel--busy) ::ng-deep .tx-filter-field:after,:host([data-styled]) .tx-filters-panel__panel,.tx-filters-panel-menu__row.cdk-drag-animating,.tx-filters-panel-menu__list.cdk-drop-list-dragging .tx-filters-panel-menu__row:not(.cdk-drag-placeholder){animation:none!important;transition:none}}\n"]
|
|
829
|
+
}]
|
|
830
|
+
}],
|
|
831
|
+
ctorParameters: () => [],
|
|
832
|
+
propDecorators: {
|
|
833
|
+
variant: [{
|
|
834
|
+
type: i0.Input,
|
|
835
|
+
args: [{
|
|
836
|
+
isSignal: true,
|
|
837
|
+
alias: "variant",
|
|
838
|
+
required: false
|
|
839
|
+
}]
|
|
840
|
+
}],
|
|
841
|
+
busy: [{
|
|
842
|
+
type: i0.Input,
|
|
843
|
+
args: [{
|
|
844
|
+
isSignal: true,
|
|
845
|
+
alias: "busy",
|
|
846
|
+
required: false
|
|
847
|
+
}]
|
|
848
|
+
}],
|
|
849
|
+
stateKey: [{
|
|
850
|
+
type: i0.Input,
|
|
851
|
+
args: [{
|
|
852
|
+
isSignal: true,
|
|
853
|
+
alias: "stateKey",
|
|
854
|
+
required: false
|
|
855
|
+
}]
|
|
856
|
+
}],
|
|
857
|
+
stateStorage: [{
|
|
858
|
+
type: i0.Input,
|
|
859
|
+
args: [{
|
|
860
|
+
isSignal: true,
|
|
861
|
+
alias: "stateStorage",
|
|
862
|
+
required: false
|
|
863
|
+
}]
|
|
864
|
+
}],
|
|
865
|
+
defaultVisible: [{
|
|
866
|
+
type: i0.Input,
|
|
867
|
+
args: [{
|
|
868
|
+
isSignal: true,
|
|
869
|
+
alias: "defaultVisible",
|
|
870
|
+
required: false
|
|
871
|
+
}]
|
|
872
|
+
}],
|
|
873
|
+
collapse: [{
|
|
874
|
+
type: i0.Input,
|
|
875
|
+
args: [{
|
|
876
|
+
isSignal: true,
|
|
877
|
+
alias: "collapse",
|
|
878
|
+
required: false
|
|
879
|
+
}]
|
|
880
|
+
}],
|
|
881
|
+
ariaLabel: [{
|
|
882
|
+
type: i0.Input,
|
|
883
|
+
args: [{
|
|
884
|
+
isSignal: true,
|
|
885
|
+
alias: "ariaLabel",
|
|
886
|
+
required: false
|
|
887
|
+
}]
|
|
888
|
+
}],
|
|
889
|
+
dt: [{
|
|
890
|
+
type: i0.Input,
|
|
891
|
+
args: [{
|
|
892
|
+
isSignal: true,
|
|
893
|
+
alias: "dt",
|
|
894
|
+
required: false
|
|
895
|
+
}]
|
|
896
|
+
}],
|
|
897
|
+
pt: [{
|
|
898
|
+
type: i0.Input,
|
|
899
|
+
args: [{
|
|
900
|
+
isSignal: true,
|
|
901
|
+
alias: "pt",
|
|
902
|
+
required: false
|
|
903
|
+
}]
|
|
904
|
+
}],
|
|
905
|
+
ptOptions: [{
|
|
906
|
+
type: i0.Input,
|
|
907
|
+
args: [{
|
|
908
|
+
isSignal: true,
|
|
909
|
+
alias: "ptOptions",
|
|
910
|
+
required: false
|
|
911
|
+
}]
|
|
912
|
+
}],
|
|
913
|
+
unstyled: [{
|
|
914
|
+
type: i0.Input,
|
|
915
|
+
args: [{
|
|
916
|
+
isSignal: true,
|
|
917
|
+
alias: "unstyled",
|
|
918
|
+
required: false
|
|
919
|
+
}]
|
|
920
|
+
}],
|
|
921
|
+
layoutChange: [{
|
|
922
|
+
type: i0.Output,
|
|
923
|
+
args: ["layoutChange"]
|
|
924
|
+
}],
|
|
925
|
+
expandedChange: [{
|
|
926
|
+
type: i0.Output,
|
|
927
|
+
args: ["expandedChange"]
|
|
928
|
+
}],
|
|
929
|
+
fields: [{
|
|
930
|
+
type: i0.ContentChildren,
|
|
931
|
+
args: [i0.forwardRef(() => TxFilterField), {
|
|
932
|
+
descendants: true,
|
|
933
|
+
isSignal: true
|
|
934
|
+
}]
|
|
935
|
+
}],
|
|
936
|
+
resetAction: [{
|
|
937
|
+
type: i0.ContentChild,
|
|
938
|
+
args: [i0.forwardRef(() => TxFiltersReset), {
|
|
939
|
+
descendants: true,
|
|
940
|
+
isSignal: true
|
|
941
|
+
}]
|
|
942
|
+
}],
|
|
943
|
+
fieldsContainer: [{
|
|
944
|
+
type: i0.ViewChild,
|
|
945
|
+
args: ["fieldsContainer", { isSignal: true }]
|
|
946
|
+
}],
|
|
947
|
+
toggleButton: [{
|
|
948
|
+
type: i0.ViewChild,
|
|
949
|
+
args: ["toggleButton", { isSignal: true }]
|
|
950
|
+
}],
|
|
951
|
+
menuList: [{
|
|
952
|
+
type: i0.ViewChild,
|
|
953
|
+
args: ["menuList", { isSignal: true }]
|
|
954
|
+
}]
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
export { TX_FILTERS_PANEL, TxFilterField, TxFiltersPanel, TxFiltersReset, TxHasFilterValuePipe, hasFilterValue };
|
|
958
|
+
|
|
959
|
+
//# sourceMappingURL=tectra-ng-blocks-filters-panel.mjs.map
|