@tectra-ng/blocks 0.0.0-stage → 0.1.6
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,663 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, Injector, Pipe, ViewContainerRef, afterNextRender, booleanAttribute, computed, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { Overlay } from "@angular/cdk/overlay";
|
|
4
|
+
import { TemplatePortal } from "@angular/cdk/portal";
|
|
5
|
+
import { Router } from "@angular/router";
|
|
6
|
+
import { TxFocusTrap, uniqueId } from "@tectra-ng/core/a11y";
|
|
7
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
8
|
+
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
9
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
10
|
+
import { TxIcon } from "@tectra-ng/icons";
|
|
11
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
12
|
+
function filterPaletteItems(items, query) {
|
|
13
|
+
const term = (query ?? "").trim().toLowerCase();
|
|
14
|
+
if (!term) return [...items];
|
|
15
|
+
return items.filter((item) => item.label.toLowerCase().includes(term) || (item.sublabel ?? "").toLowerCase().includes(term));
|
|
16
|
+
}
|
|
17
|
+
function menuPaletteItems(menu, group = "pages") {
|
|
18
|
+
const items = /* @__PURE__ */ new Map();
|
|
19
|
+
const walk = (nodes, parent) => {
|
|
20
|
+
for (const node of nodes) {
|
|
21
|
+
if (node.visible === false || node.disabled || node.separator) continue;
|
|
22
|
+
const label = node.label ?? "";
|
|
23
|
+
if (node.routerLink !== void 0) {
|
|
24
|
+
const id = `page:${typeof node.routerLink === "string" ? node.routerLink : node.routerLink.join("/")}:${JSON.stringify(node.queryParams ?? {})}`;
|
|
25
|
+
if (!items.has(id)) items.set(id, {
|
|
26
|
+
id,
|
|
27
|
+
group,
|
|
28
|
+
label,
|
|
29
|
+
sublabel: parent || void 0,
|
|
30
|
+
icon: node.icon ?? "file",
|
|
31
|
+
routerLink: node.routerLink,
|
|
32
|
+
queryParams: node.queryParams
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (node.items?.length) walk(node.items, label);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
for (const section of menu ?? []) if (section.items?.length) walk(section.items, section.label ?? "");
|
|
39
|
+
else walk([section], "");
|
|
40
|
+
return [...items.values()];
|
|
41
|
+
}
|
|
42
|
+
var TxCommandPaletteFilterPipe = class TxCommandPaletteFilterPipe {
|
|
43
|
+
transform(items, query) {
|
|
44
|
+
return filterPaletteItems(items, query);
|
|
45
|
+
}
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
47
|
+
minVersion: "12.0.0",
|
|
48
|
+
version: "22.2.3",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
type: TxCommandPaletteFilterPipe,
|
|
51
|
+
deps: [],
|
|
52
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
53
|
+
});
|
|
54
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
55
|
+
minVersion: "14.0.0",
|
|
56
|
+
version: "22.2.3",
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
type: TxCommandPaletteFilterPipe,
|
|
59
|
+
isStandalone: true,
|
|
60
|
+
name: "commandPaletteFilter"
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "22.2.3",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: TxCommandPaletteFilterPipe,
|
|
68
|
+
decorators: [{
|
|
69
|
+
type: Pipe,
|
|
70
|
+
args: [{ name: "commandPaletteFilter" }]
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
var TxMenuPaletteItemsPipe = class TxMenuPaletteItemsPipe {
|
|
74
|
+
transform(menu, group = "pages") {
|
|
75
|
+
return menuPaletteItems(menu, group);
|
|
76
|
+
}
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
78
|
+
minVersion: "12.0.0",
|
|
79
|
+
version: "22.2.3",
|
|
80
|
+
ngImport: i0,
|
|
81
|
+
type: TxMenuPaletteItemsPipe,
|
|
82
|
+
deps: [],
|
|
83
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
84
|
+
});
|
|
85
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
86
|
+
minVersion: "14.0.0",
|
|
87
|
+
version: "22.2.3",
|
|
88
|
+
ngImport: i0,
|
|
89
|
+
type: TxMenuPaletteItemsPipe,
|
|
90
|
+
isStandalone: true,
|
|
91
|
+
name: "menuPaletteItems"
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
95
|
+
minVersion: "12.0.0",
|
|
96
|
+
version: "22.2.3",
|
|
97
|
+
ngImport: i0,
|
|
98
|
+
type: TxMenuPaletteItemsPipe,
|
|
99
|
+
decorators: [{
|
|
100
|
+
type: Pipe,
|
|
101
|
+
args: [{ name: "menuPaletteItems" }]
|
|
102
|
+
}]
|
|
103
|
+
});
|
|
104
|
+
const MAC = /mac|iphone|ipad/i;
|
|
105
|
+
var TxCommandPalette = class TxCommandPalette {
|
|
106
|
+
document = inject(DOCUMENT);
|
|
107
|
+
injector = inject(Injector);
|
|
108
|
+
host = inject(ElementRef);
|
|
109
|
+
router = inject(Router, { optional: true });
|
|
110
|
+
overlay = inject(Overlay);
|
|
111
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
112
|
+
layer = viewChild.required("layer", ...ngDevMode ? [{ debugName: "layer" }] : /* istanbul ignore next */ []);
|
|
113
|
+
overlayRef = null;
|
|
114
|
+
label = input(void 0, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
115
|
+
placeholder = input(void 0, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
116
|
+
icon = input("search", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
117
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
118
|
+
groupLabels = input({}, ...ngDevMode ? [{ debugName: "groupLabels" }] : /* istanbul ignore next */ []);
|
|
119
|
+
loading = input(false, {
|
|
120
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
121
|
+
transform: booleanAttribute
|
|
122
|
+
});
|
|
123
|
+
emptyText = input(void 0, ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
124
|
+
loadingText = input(void 0, ...ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []);
|
|
125
|
+
minQueryLength = input(2, {
|
|
126
|
+
...ngDevMode ? { debugName: "minQueryLength" } : /* istanbul ignore next */ {},
|
|
127
|
+
transform: numberAttribute
|
|
128
|
+
});
|
|
129
|
+
debounceTime = input(300, {
|
|
130
|
+
...ngDevMode ? { debugName: "debounceTime" } : /* istanbul ignore next */ {},
|
|
131
|
+
transform: numberAttribute
|
|
132
|
+
});
|
|
133
|
+
shortcutKey = input("k", ...ngDevMode ? [{ debugName: "shortcutKey" }] : /* istanbul ignore next */ []);
|
|
134
|
+
localFilter = input(false, {
|
|
135
|
+
...ngDevMode ? { debugName: "localFilter" } : /* istanbul ignore next */ {},
|
|
136
|
+
transform: booleanAttribute
|
|
137
|
+
});
|
|
138
|
+
compact = input(false, {
|
|
139
|
+
...ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {},
|
|
140
|
+
transform: booleanAttribute
|
|
141
|
+
});
|
|
142
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
143
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
144
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
145
|
+
unstyled = input(void 0, {
|
|
146
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
147
|
+
transform: optionalBoolean
|
|
148
|
+
});
|
|
149
|
+
queryChange = output();
|
|
150
|
+
searchChange = output();
|
|
151
|
+
itemSelect = output();
|
|
152
|
+
opened = output();
|
|
153
|
+
closed = output();
|
|
154
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
155
|
+
passThrough = injectPassThrough("commandPalette", this, this.pt, this.ptOptions);
|
|
156
|
+
translations = injectTranslations();
|
|
157
|
+
id = uniqueId("tx-command-palette");
|
|
158
|
+
tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-command-palette"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
|
|
159
|
+
hostStyle = computed(() => ({
|
|
160
|
+
...this.tokenStyle(),
|
|
161
|
+
...this.passThrough().root?.style
|
|
162
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
163
|
+
isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
164
|
+
query = signal("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
|
|
165
|
+
activeIndex = signal(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
166
|
+
mac = signal(false, ...ngDevMode ? [{ debugName: "mac" }] : /* istanbul ignore next */ []);
|
|
167
|
+
name = computed(() => this.label() ?? this.translations().search, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
168
|
+
hint = computed(() => this.placeholder() ?? this.name(), ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
169
|
+
shortcutLabel = computed(() => `${this.mac() ? "⌘" : "Ctrl "}${this.shortcutKey().toUpperCase()}`, ...ngDevMode ? [{ debugName: "shortcutLabel" }] : /* istanbul ignore next */ []);
|
|
170
|
+
shortcutAria = computed(() => `${this.mac() ? "Meta" : "Control"}+${this.shortcutKey().toUpperCase()}`, ...ngDevMode ? [{ debugName: "shortcutAria" }] : /* istanbul ignore next */ []);
|
|
171
|
+
visibleItems = computed(() => this.localFilter() ? filterPaletteItems(this.items(), this.query()) : [...this.items()], ...ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []);
|
|
172
|
+
activeId = computed(() => this.visibleItems().length ? `${this.id}-option-${this.activeIndex()}` : null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
|
|
173
|
+
searchTimer;
|
|
174
|
+
lockedOverflow = null;
|
|
175
|
+
constructor() {
|
|
176
|
+
afterNextRender(() => {
|
|
177
|
+
const navigator = this.document.defaultView?.navigator;
|
|
178
|
+
this.mac.set(MAC.test(navigator?.platform ?? navigator?.userAgent ?? ""));
|
|
179
|
+
});
|
|
180
|
+
inject(DestroyRef).onDestroy(() => {
|
|
181
|
+
clearTimeout(this.searchTimer);
|
|
182
|
+
this.unlockScroll();
|
|
183
|
+
this.overlayRef?.dispose();
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
open() {
|
|
187
|
+
if (this.isOpen()) return;
|
|
188
|
+
this.activeIndex.set(0);
|
|
189
|
+
this.attachLayer();
|
|
190
|
+
this.isOpen.set(true);
|
|
191
|
+
this.lockScroll();
|
|
192
|
+
this.opened.emit();
|
|
193
|
+
}
|
|
194
|
+
close() {
|
|
195
|
+
if (!this.isOpen()) return;
|
|
196
|
+
clearTimeout(this.searchTimer);
|
|
197
|
+
this.isOpen.set(false);
|
|
198
|
+
this.query.set("");
|
|
199
|
+
this.activeIndex.set(0);
|
|
200
|
+
this.unlockScroll();
|
|
201
|
+
this.closed.emit();
|
|
202
|
+
}
|
|
203
|
+
select(item) {
|
|
204
|
+
this.itemSelect.emit(item);
|
|
205
|
+
if (item.routerLink !== void 0 && this.router) {
|
|
206
|
+
const commands = typeof item.routerLink === "string" ? [item.routerLink] : [...item.routerLink];
|
|
207
|
+
this.router.navigate(commands, { queryParams: item.queryParams });
|
|
208
|
+
}
|
|
209
|
+
item.command?.();
|
|
210
|
+
this.close();
|
|
211
|
+
}
|
|
212
|
+
onDocumentKeydown(event) {
|
|
213
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === this.shortcutKey().toLowerCase()) {
|
|
214
|
+
event.preventDefault();
|
|
215
|
+
if (this.isOpen()) this.close();
|
|
216
|
+
else this.open();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (event.key === "Escape" && this.isOpen()) {
|
|
220
|
+
event.preventDefault();
|
|
221
|
+
this.close();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
onPanelKeydown(event) {
|
|
225
|
+
switch (event.key) {
|
|
226
|
+
case "ArrowDown":
|
|
227
|
+
event.preventDefault();
|
|
228
|
+
this.move(1);
|
|
229
|
+
break;
|
|
230
|
+
case "ArrowUp":
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
this.move(-1);
|
|
233
|
+
break;
|
|
234
|
+
case "Home":
|
|
235
|
+
case "End":
|
|
236
|
+
if (this.visibleItems().length && event.target instanceof HTMLElement && event.target.getAttribute("role") !== "combobox") {
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
this.setActive(event.key === "Home" ? 0 : this.visibleItems().length - 1);
|
|
239
|
+
}
|
|
240
|
+
break;
|
|
241
|
+
case "Enter": {
|
|
242
|
+
const item = this.visibleItems()[this.activeIndex()];
|
|
243
|
+
if (item) {
|
|
244
|
+
event.preventDefault();
|
|
245
|
+
this.select(item);
|
|
246
|
+
}
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
onInput(event) {
|
|
252
|
+
const value = event.target.value;
|
|
253
|
+
this.query.set(value.trim());
|
|
254
|
+
this.activeIndex.set(0);
|
|
255
|
+
this.queryChange.emit(this.query());
|
|
256
|
+
clearTimeout(this.searchTimer);
|
|
257
|
+
this.searchTimer = setTimeout(() => {
|
|
258
|
+
const term = value.trim();
|
|
259
|
+
this.searchChange.emit(term.length >= this.minQueryLength() ? term : "");
|
|
260
|
+
}, this.debounceTime());
|
|
261
|
+
}
|
|
262
|
+
setActive(index) {
|
|
263
|
+
this.activeIndex.set(index);
|
|
264
|
+
afterNextRender(() => {
|
|
265
|
+
this.document.getElementById(`${this.id}-option-${index}`)?.scrollIntoView?.({ block: "nearest" });
|
|
266
|
+
}, { injector: this.injector });
|
|
267
|
+
}
|
|
268
|
+
isNewGroup(index) {
|
|
269
|
+
const items = this.visibleItems();
|
|
270
|
+
return index === 0 || items[index].group !== items[index - 1].group;
|
|
271
|
+
}
|
|
272
|
+
groupLabel(group) {
|
|
273
|
+
return this.groupLabels()[group] ?? group;
|
|
274
|
+
}
|
|
275
|
+
attachLayer() {
|
|
276
|
+
if (!this.overlayRef) this.overlayRef = this.overlay.create({ positionStrategy: this.overlay.position().global() });
|
|
277
|
+
if (!this.overlayRef.hasAttached()) this.overlayRef.attach(new TemplatePortal(this.layer(), this.viewContainerRef));
|
|
278
|
+
}
|
|
279
|
+
move(delta) {
|
|
280
|
+
const total = this.visibleItems().length;
|
|
281
|
+
if (total) this.setActive((this.activeIndex() + delta + total) % total);
|
|
282
|
+
}
|
|
283
|
+
lockScroll() {
|
|
284
|
+
const body = this.document.body;
|
|
285
|
+
if (!body || this.lockedOverflow !== null || !this.host.nativeElement.isConnected) return;
|
|
286
|
+
this.lockedOverflow = body.style.overflow;
|
|
287
|
+
body.style.overflow = "hidden";
|
|
288
|
+
}
|
|
289
|
+
unlockScroll() {
|
|
290
|
+
if (this.lockedOverflow === null) return;
|
|
291
|
+
this.document.body.style.overflow = this.lockedOverflow;
|
|
292
|
+
this.lockedOverflow = null;
|
|
293
|
+
}
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
295
|
+
minVersion: "12.0.0",
|
|
296
|
+
version: "22.2.3",
|
|
297
|
+
ngImport: i0,
|
|
298
|
+
type: TxCommandPalette,
|
|
299
|
+
deps: [],
|
|
300
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
301
|
+
});
|
|
302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
303
|
+
minVersion: "17.0.0",
|
|
304
|
+
version: "22.2.3",
|
|
305
|
+
type: TxCommandPalette,
|
|
306
|
+
isStandalone: true,
|
|
307
|
+
selector: "tx-command-palette",
|
|
308
|
+
inputs: {
|
|
309
|
+
label: {
|
|
310
|
+
classPropertyName: "label",
|
|
311
|
+
publicName: "label",
|
|
312
|
+
isSignal: true,
|
|
313
|
+
isRequired: false,
|
|
314
|
+
transformFunction: null
|
|
315
|
+
},
|
|
316
|
+
placeholder: {
|
|
317
|
+
classPropertyName: "placeholder",
|
|
318
|
+
publicName: "placeholder",
|
|
319
|
+
isSignal: true,
|
|
320
|
+
isRequired: false,
|
|
321
|
+
transformFunction: null
|
|
322
|
+
},
|
|
323
|
+
icon: {
|
|
324
|
+
classPropertyName: "icon",
|
|
325
|
+
publicName: "icon",
|
|
326
|
+
isSignal: true,
|
|
327
|
+
isRequired: false,
|
|
328
|
+
transformFunction: null
|
|
329
|
+
},
|
|
330
|
+
items: {
|
|
331
|
+
classPropertyName: "items",
|
|
332
|
+
publicName: "items",
|
|
333
|
+
isSignal: true,
|
|
334
|
+
isRequired: false,
|
|
335
|
+
transformFunction: null
|
|
336
|
+
},
|
|
337
|
+
groupLabels: {
|
|
338
|
+
classPropertyName: "groupLabels",
|
|
339
|
+
publicName: "groupLabels",
|
|
340
|
+
isSignal: true,
|
|
341
|
+
isRequired: false,
|
|
342
|
+
transformFunction: null
|
|
343
|
+
},
|
|
344
|
+
loading: {
|
|
345
|
+
classPropertyName: "loading",
|
|
346
|
+
publicName: "loading",
|
|
347
|
+
isSignal: true,
|
|
348
|
+
isRequired: false,
|
|
349
|
+
transformFunction: null
|
|
350
|
+
},
|
|
351
|
+
emptyText: {
|
|
352
|
+
classPropertyName: "emptyText",
|
|
353
|
+
publicName: "emptyText",
|
|
354
|
+
isSignal: true,
|
|
355
|
+
isRequired: false,
|
|
356
|
+
transformFunction: null
|
|
357
|
+
},
|
|
358
|
+
loadingText: {
|
|
359
|
+
classPropertyName: "loadingText",
|
|
360
|
+
publicName: "loadingText",
|
|
361
|
+
isSignal: true,
|
|
362
|
+
isRequired: false,
|
|
363
|
+
transformFunction: null
|
|
364
|
+
},
|
|
365
|
+
minQueryLength: {
|
|
366
|
+
classPropertyName: "minQueryLength",
|
|
367
|
+
publicName: "minQueryLength",
|
|
368
|
+
isSignal: true,
|
|
369
|
+
isRequired: false,
|
|
370
|
+
transformFunction: null
|
|
371
|
+
},
|
|
372
|
+
debounceTime: {
|
|
373
|
+
classPropertyName: "debounceTime",
|
|
374
|
+
publicName: "debounceTime",
|
|
375
|
+
isSignal: true,
|
|
376
|
+
isRequired: false,
|
|
377
|
+
transformFunction: null
|
|
378
|
+
},
|
|
379
|
+
shortcutKey: {
|
|
380
|
+
classPropertyName: "shortcutKey",
|
|
381
|
+
publicName: "shortcutKey",
|
|
382
|
+
isSignal: true,
|
|
383
|
+
isRequired: false,
|
|
384
|
+
transformFunction: null
|
|
385
|
+
},
|
|
386
|
+
localFilter: {
|
|
387
|
+
classPropertyName: "localFilter",
|
|
388
|
+
publicName: "localFilter",
|
|
389
|
+
isSignal: true,
|
|
390
|
+
isRequired: false,
|
|
391
|
+
transformFunction: null
|
|
392
|
+
},
|
|
393
|
+
compact: {
|
|
394
|
+
classPropertyName: "compact",
|
|
395
|
+
publicName: "compact",
|
|
396
|
+
isSignal: true,
|
|
397
|
+
isRequired: false,
|
|
398
|
+
transformFunction: null
|
|
399
|
+
},
|
|
400
|
+
dt: {
|
|
401
|
+
classPropertyName: "dt",
|
|
402
|
+
publicName: "dt",
|
|
403
|
+
isSignal: true,
|
|
404
|
+
isRequired: false,
|
|
405
|
+
transformFunction: null
|
|
406
|
+
},
|
|
407
|
+
pt: {
|
|
408
|
+
classPropertyName: "pt",
|
|
409
|
+
publicName: "pt",
|
|
410
|
+
isSignal: true,
|
|
411
|
+
isRequired: false,
|
|
412
|
+
transformFunction: null
|
|
413
|
+
},
|
|
414
|
+
ptOptions: {
|
|
415
|
+
classPropertyName: "ptOptions",
|
|
416
|
+
publicName: "ptOptions",
|
|
417
|
+
isSignal: true,
|
|
418
|
+
isRequired: false,
|
|
419
|
+
transformFunction: null
|
|
420
|
+
},
|
|
421
|
+
unstyled: {
|
|
422
|
+
classPropertyName: "unstyled",
|
|
423
|
+
publicName: "unstyled",
|
|
424
|
+
isSignal: true,
|
|
425
|
+
isRequired: false,
|
|
426
|
+
transformFunction: null
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
outputs: {
|
|
430
|
+
queryChange: "queryChange",
|
|
431
|
+
searchChange: "searchChange",
|
|
432
|
+
itemSelect: "itemSelect",
|
|
433
|
+
opened: "opened",
|
|
434
|
+
closed: "closed"
|
|
435
|
+
},
|
|
436
|
+
host: {
|
|
437
|
+
listeners: { "document:keydown": "onDocumentKeydown($event)" },
|
|
438
|
+
properties: {
|
|
439
|
+
"class": "passThrough().root?.class",
|
|
440
|
+
"style": "hostStyle()",
|
|
441
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
442
|
+
"class.tx-command-palette--compact": "compact()"
|
|
443
|
+
},
|
|
444
|
+
classAttribute: "tx-command-palette"
|
|
445
|
+
},
|
|
446
|
+
viewQueries: [{
|
|
447
|
+
propertyName: "layer",
|
|
448
|
+
first: true,
|
|
449
|
+
predicate: ["layer"],
|
|
450
|
+
descendants: true,
|
|
451
|
+
isSignal: true
|
|
452
|
+
}],
|
|
453
|
+
ngImport: i0,
|
|
454
|
+
template: "<button\n type=\"button\"\n class=\"tx-command-palette__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-keyshortcuts]=\"shortcutAria()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n (click)=\"open()\"\n>\n <tx-icon class=\"tx-command-palette__trigger-icon\" aria-hidden=\"true\" [name]=\"icon()\" />\n <span class=\"tx-command-palette__trigger-text\">{{ name() }}</span>\n <kbd class=\"tx-command-palette__kbd\" aria-hidden=\"true\">{{ shortcutLabel() }}</kbd>\n</button>\n<ng-template #layer>\n @if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the mask closes on a click; Escape closes from the panel -->\n <div\n class=\"tx-command-palette__overlay\"\n animate.enter=\"tx-command-palette__overlay--enter\"\n animate.leave=\"tx-command-palette__overlay--leave\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().overlay?.class\"\n (click)=\"close()\"\n >\n <div\n class=\"tx-command-palette__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n txFocusTrap\n animate.enter=\"tx-command-palette__panel--enter\"\n animate.leave=\"tx-command-palette__panel--leave\"\n [attr.aria-label]=\"name()\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <div class=\"tx-command-palette__search\" [class]=\"passThrough().search?.class\" [style]=\"passThrough().search?.style\">\n <tx-icon class=\"tx-command-palette__search-icon\" aria-hidden=\"true\" name=\"search\" />\n <input\n class=\"tx-command-palette__input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"id + '-list'\"\n [attr.aria-activedescendant]=\"activeId()\"\n [attr.aria-label]=\"hint()\"\n [placeholder]=\"hint()\"\n (input)=\"onInput($event)\"\n />\n @if (loading()) {\n <tx-icon class=\"tx-command-palette__spinner\" aria-hidden=\"true\" name=\"spinner\" />\n }\n </div>\n <div class=\"tx-command-palette__results\" [class]=\"passThrough().results?.class\" [style]=\"passThrough().results?.style\">\n <div class=\"tx-command-palette__list\" role=\"listbox\" [id]=\"id + '-list'\" [attr.aria-label]=\"name()\">\n @for (item of visibleItems(); track item.id; let index = $index) {\n @if (isNewGroup(index)) {\n <div class=\"tx-command-palette__group\" role=\"presentation\">{{ groupLabel(item.group) }}</div>\n }\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"tx-command-palette__item\"\n [id]=\"id + '-option-' + index\"\n [class.tx-command-palette__item--active]=\"activeIndex() === index\"\n [attr.aria-selected]=\"activeIndex() === index\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (mouseenter)=\"activeIndex.set(index)\"\n (click)=\"select(item)\"\n >\n <span class=\"tx-command-palette__item-icon\" aria-hidden=\"true\"><tx-icon [name]=\"item.icon ?? 'file'\" /></span>\n <span class=\"tx-command-palette__label\">{{ item.label }}</span>\n @if (item.sublabel) {\n <span class=\"tx-command-palette__sublabel\">{{ item.sublabel }}</span>\n }\n <tx-icon class=\"tx-command-palette__arrow\" aria-hidden=\"true\" name=\"arrow-right\" />\n </button>\n }\n </div>\n @if (loading()) {\n <div class=\"tx-command-palette__status\" role=\"status\">\n <tx-icon class=\"tx-command-palette__spinner\" aria-hidden=\"true\" name=\"spinner\" />\n <span>{{ loadingText() ?? translations().searching }}</span>\n </div>\n } @else if (!visibleItems().length && query()) {\n <div class=\"tx-command-palette__status tx-command-palette__status--empty\" role=\"status\">{{ emptyText() ?? translations().nothingFound }}</div>\n }\n </div>\n <div class=\"tx-command-palette__footer\" aria-hidden=\"true\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <span class=\"tx-command-palette__hint\"><kbd>↑</kbd><kbd>↓</kbd> {{ translations().paletteNavigate }}</span>\n <span class=\"tx-command-palette__hint\"><kbd>↵</kbd> {{ translations().paletteOpen }}</span>\n <span class=\"tx-command-palette__hint\"><kbd>esc</kbd> {{ translations().paletteClose }}</span>\n </div>\n </div>\n </div>\n }\n</ng-template>\n",
|
|
455
|
+
styles: [":host{display:inline-flex}.tx-command-palette__trigger{position:relative;display:inline-flex;align-items:center;border:0;cursor:pointer;font:inherit}.tx-command-palette__overlay{position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center}.tx-command-palette__panel{display:flex;flex-direction:column;box-sizing:border-box;width:100%;overflow:hidden}.tx-command-palette__search{display:flex;align-items:center}.tx-command-palette__input{flex:1;min-width:0;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit}.tx-command-palette__results{flex:1;min-height:0;overflow-y:auto}.tx-command-palette__list{display:flex;flex-direction:column}.tx-command-palette__item{display:flex;align-items:center;width:100%;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:start}.tx-command-palette__item-icon{display:grid;flex-shrink:0;place-items:center}.tx-command-palette__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-command-palette__sublabel{flex-shrink:0;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-command-palette__arrow{opacity:0}.tx-command-palette__item--active .tx-command-palette__arrow{opacity:1}.tx-command-palette__status{display:flex;align-items:center;justify-content:center}.tx-command-palette__footer,.tx-command-palette__hint{display:flex;align-items:center}.tx-command-palette__spinner{animation:tx-command-palette-spin 1s linear infinite}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-command-palette__trigger{gap:var(--tx-command-palette-trigger-gap);height:var(--tx-command-palette-trigger-height);padding:var(--tx-command-palette-trigger-padding);border-radius:var(--tx-command-palette-trigger-border-radius);background:var(--tx-command-palette-trigger-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-ring-color),var(--tx-command-palette-trigger-shadow);color:var(--tx-command-palette-trigger-color);font-size:var(--tx-command-palette-trigger-font-size);transition:background-color var(--tx-command-palette-trigger-duration),color var(--tx-command-palette-trigger-duration),box-shadow var(--tx-command-palette-trigger-duration),scale var(--tx-command-palette-trigger-duration)}:host([data-styled]) .tx-command-palette__trigger:hover{background:var(--tx-command-palette-trigger-hover-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-ring-color),var(--tx-command-palette-trigger-hover-shadow);color:var(--tx-command-palette-trigger-hover-color)}:host([data-styled]) .tx-command-palette__trigger:active{scale:var(--tx-command-palette-trigger-active-scale)}:host([data-styled]) .tx-command-palette__trigger:focus-visible{outline:none;box-shadow:var(--tx-command-palette-trigger-focus-ring-shadow)}:host([data-styled]) .tx-command-palette__kbd{margin-inline-start:var(--tx-command-palette-trigger-kbd-margin-start);padding:var(--tx-command-palette-trigger-kbd-padding);border-radius:var(--tx-command-palette-trigger-kbd-border-radius);background:var(--tx-command-palette-trigger-kbd-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-kbd-ring-color);font-family:inherit;font-size:var(--tx-command-palette-trigger-kbd-font-size);font-weight:var(--tx-command-palette-trigger-kbd-font-weight);line-height:1}.tx-command-palette__overlay[data-styled]{z-index:var(--tx-command-palette-overlay-z-index);padding:var(--tx-command-palette-overlay-padding);background:var(--tx-command-palette-overlay-background);font-family:var(--tx-font-family);-webkit-backdrop-filter:blur(var(--tx-command-palette-overlay-blur));backdrop-filter:blur(var(--tx-command-palette-overlay-blur))}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--enter{animation:tx-command-palette-fade-in var(--tx-command-palette-overlay-enter-duration) ease-out}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--leave{animation:tx-command-palette-fade-out var(--tx-command-palette-overlay-leave-duration) ease-in forwards}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel{max-width:var(--tx-command-palette-panel-max-width);max-height:var(--tx-command-palette-panel-max-height);border:1px solid var(--tx-command-palette-panel-border-color);border-radius:var(--tx-command-palette-panel-border-radius);background:var(--tx-command-palette-panel-background);box-shadow:var(--tx-command-palette-panel-shadow);color:var(--tx-command-palette-panel-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--enter{animation:tx-command-palette-pop-in var(--tx-command-palette-panel-enter-duration) var(--tx-command-palette-panel-easing)}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--leave{animation:tx-command-palette-pop-out var(--tx-command-palette-panel-leave-duration) ease-in forwards}.tx-command-palette__overlay[data-styled] .tx-command-palette__search{gap:var(--tx-command-palette-search-gap);padding:var(--tx-command-palette-search-padding);border-bottom:1px solid var(--tx-command-palette-panel-border-color);font-size:var(--tx-command-palette-search-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__search-icon{color:var(--tx-command-palette-search-icon-color);font-size:var(--tx-command-palette-search-icon-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__input::placeholder{color:var(--tx-command-palette-search-placeholder-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__spinner{color:var(--tx-command-palette-search-icon-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__results{padding:var(--tx-command-palette-results-padding)}.tx-command-palette__overlay[data-styled] .tx-command-palette__group{padding:var(--tx-command-palette-results-group-padding);color:var(--tx-command-palette-results-group-color);font-size:var(--tx-command-palette-results-group-font-size);font-weight:var(--tx-command-palette-results-group-font-weight);letter-spacing:var(--tx-command-palette-results-group-letter-spacing);text-transform:uppercase}.tx-command-palette__overlay[data-styled] .tx-command-palette__item{gap:var(--tx-command-palette-item-gap);padding:var(--tx-command-palette-item-padding);border-radius:var(--tx-command-palette-item-border-radius);color:var(--tx-command-palette-item-color);font-size:var(--tx-command-palette-item-font-size);transition:background-color var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item--active{background:var(--tx-command-palette-item-active-background)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item-icon{width:var(--tx-command-palette-item-icon-size);height:var(--tx-command-palette-item-icon-size);border-radius:var(--tx-command-palette-item-icon-border-radius);background:var(--tx-command-palette-item-icon-background);color:var(--tx-command-palette-item-icon-color);font-size:var(--tx-command-palette-item-icon-font-size);transition:background-color var(--tx-command-palette-item-duration),color var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item--active .tx-command-palette__item-icon{background:var(--tx-command-palette-item-active-icon-background);color:var(--tx-command-palette-item-active-icon-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__label{font-weight:var(--tx-command-palette-item-label-font-weight)}.tx-command-palette__overlay[data-styled] .tx-command-palette__sublabel{color:var(--tx-command-palette-item-sublabel-color);font-size:var(--tx-command-palette-item-sublabel-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__arrow{color:var(--tx-command-palette-item-arrow-color);font-size:var(--tx-command-palette-item-arrow-size);transition:opacity var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__status{gap:var(--tx-command-palette-results-status-gap);padding:var(--tx-command-palette-results-status-padding);color:var(--tx-command-palette-results-status-color);font-size:var(--tx-command-palette-results-status-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__status--empty{padding:var(--tx-command-palette-results-empty-padding)}.tx-command-palette__overlay[data-styled] .tx-command-palette__footer{gap:var(--tx-command-palette-footer-gap);padding:var(--tx-command-palette-footer-padding);border-top:1px solid var(--tx-command-palette-panel-border-color);background:var(--tx-command-palette-footer-background)}.tx-command-palette__overlay[data-styled] .tx-command-palette__hint{gap:var(--tx-command-palette-footer-hint-gap);color:var(--tx-command-palette-footer-hint-color);font-size:var(--tx-command-palette-footer-hint-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__hint kbd{display:inline-flex;align-items:center;justify-content:center;min-width:var(--tx-command-palette-footer-kbd-min-width);box-sizing:border-box;padding:var(--tx-command-palette-footer-kbd-padding);border:1px solid var(--tx-command-palette-panel-border-color);border-radius:var(--tx-command-palette-footer-kbd-border-radius);background:var(--tx-command-palette-footer-kbd-background);font-family:inherit;font-size:var(--tx-command-palette-footer-kbd-font-size);font-weight:var(--tx-font-weight-medium)}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger{justify-content:center;width:var(--tx-command-palette-trigger-height);padding:0}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger .tx-command-palette__trigger-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger .tx-command-palette__kbd{display:none}@media(width<=768px){:host([data-styled]) .tx-command-palette__trigger{justify-content:center;width:var(--tx-command-palette-trigger-height);padding:0}:host([data-styled]) .tx-command-palette__trigger .tx-command-palette__trigger-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-command-palette__trigger .tx-command-palette__kbd{display:none}}@keyframes tx-command-palette-spin{to{rotate:360deg}}@keyframes tx-command-palette-fade-in{0%{opacity:0}}@keyframes tx-command-palette-fade-out{to{opacity:0}}@keyframes tx-command-palette-pop-in{0%{opacity:0;transform:translateY(-8px) scale(.98)}}@keyframes tx-command-palette-pop-out{to{opacity:0;transform:translateY(-8px) scale(.98)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-command-palette__trigger{transition:none}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--enter,.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--leave,.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--enter,.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--leave{animation:none}.tx-command-palette__overlay[data-styled] .tx-command-palette__item,.tx-command-palette__overlay[data-styled] .tx-command-palette__item-icon,.tx-command-palette__overlay[data-styled] .tx-command-palette__arrow{transition:none}}\n"],
|
|
456
|
+
dependencies: [{
|
|
457
|
+
kind: "directive",
|
|
458
|
+
type: TxFocusTrap,
|
|
459
|
+
selector: "[txFocusTrap]",
|
|
460
|
+
inputs: [
|
|
461
|
+
"txFocusTrap",
|
|
462
|
+
"autoFocus",
|
|
463
|
+
"restoreFocus"
|
|
464
|
+
]
|
|
465
|
+
}, {
|
|
466
|
+
kind: "component",
|
|
467
|
+
type: TxIcon,
|
|
468
|
+
selector: "tx-icon",
|
|
469
|
+
inputs: ["name"]
|
|
470
|
+
}],
|
|
471
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
475
|
+
minVersion: "12.0.0",
|
|
476
|
+
version: "22.2.3",
|
|
477
|
+
ngImport: i0,
|
|
478
|
+
type: TxCommandPalette,
|
|
479
|
+
decorators: [{
|
|
480
|
+
type: Component,
|
|
481
|
+
args: [{
|
|
482
|
+
selector: "tx-command-palette",
|
|
483
|
+
imports: [TxFocusTrap, TxIcon],
|
|
484
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
485
|
+
host: {
|
|
486
|
+
class: "tx-command-palette",
|
|
487
|
+
"[class]": "passThrough().root?.class",
|
|
488
|
+
"[style]": "hostStyle()",
|
|
489
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
490
|
+
"[class.tx-command-palette--compact]": "compact()",
|
|
491
|
+
"(document:keydown)": "onDocumentKeydown($event)"
|
|
492
|
+
},
|
|
493
|
+
template: "<button\n type=\"button\"\n class=\"tx-command-palette__trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-keyshortcuts]=\"shortcutAria()\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n (click)=\"open()\"\n>\n <tx-icon class=\"tx-command-palette__trigger-icon\" aria-hidden=\"true\" [name]=\"icon()\" />\n <span class=\"tx-command-palette__trigger-text\">{{ name() }}</span>\n <kbd class=\"tx-command-palette__kbd\" aria-hidden=\"true\">{{ shortcutLabel() }}</kbd>\n</button>\n<ng-template #layer>\n @if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the mask closes on a click; Escape closes from the panel -->\n <div\n class=\"tx-command-palette__overlay\"\n animate.enter=\"tx-command-palette__overlay--enter\"\n animate.leave=\"tx-command-palette__overlay--leave\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [style]=\"tokenStyle()\"\n [class]=\"passThrough().overlay?.class\"\n (click)=\"close()\"\n >\n <div\n class=\"tx-command-palette__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n txFocusTrap\n animate.enter=\"tx-command-palette__panel--enter\"\n animate.leave=\"tx-command-palette__panel--leave\"\n [attr.aria-label]=\"name()\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n <div class=\"tx-command-palette__search\" [class]=\"passThrough().search?.class\" [style]=\"passThrough().search?.style\">\n <tx-icon class=\"tx-command-palette__search-icon\" aria-hidden=\"true\" name=\"search\" />\n <input\n class=\"tx-command-palette__input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"id + '-list'\"\n [attr.aria-activedescendant]=\"activeId()\"\n [attr.aria-label]=\"hint()\"\n [placeholder]=\"hint()\"\n (input)=\"onInput($event)\"\n />\n @if (loading()) {\n <tx-icon class=\"tx-command-palette__spinner\" aria-hidden=\"true\" name=\"spinner\" />\n }\n </div>\n <div class=\"tx-command-palette__results\" [class]=\"passThrough().results?.class\" [style]=\"passThrough().results?.style\">\n <div class=\"tx-command-palette__list\" role=\"listbox\" [id]=\"id + '-list'\" [attr.aria-label]=\"name()\">\n @for (item of visibleItems(); track item.id; let index = $index) {\n @if (isNewGroup(index)) {\n <div class=\"tx-command-palette__group\" role=\"presentation\">{{ groupLabel(item.group) }}</div>\n }\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"tx-command-palette__item\"\n [id]=\"id + '-option-' + index\"\n [class.tx-command-palette__item--active]=\"activeIndex() === index\"\n [attr.aria-selected]=\"activeIndex() === index\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n (mouseenter)=\"activeIndex.set(index)\"\n (click)=\"select(item)\"\n >\n <span class=\"tx-command-palette__item-icon\" aria-hidden=\"true\"><tx-icon [name]=\"item.icon ?? 'file'\" /></span>\n <span class=\"tx-command-palette__label\">{{ item.label }}</span>\n @if (item.sublabel) {\n <span class=\"tx-command-palette__sublabel\">{{ item.sublabel }}</span>\n }\n <tx-icon class=\"tx-command-palette__arrow\" aria-hidden=\"true\" name=\"arrow-right\" />\n </button>\n }\n </div>\n @if (loading()) {\n <div class=\"tx-command-palette__status\" role=\"status\">\n <tx-icon class=\"tx-command-palette__spinner\" aria-hidden=\"true\" name=\"spinner\" />\n <span>{{ loadingText() ?? translations().searching }}</span>\n </div>\n } @else if (!visibleItems().length && query()) {\n <div class=\"tx-command-palette__status tx-command-palette__status--empty\" role=\"status\">{{ emptyText() ?? translations().nothingFound }}</div>\n }\n </div>\n <div class=\"tx-command-palette__footer\" aria-hidden=\"true\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <span class=\"tx-command-palette__hint\"><kbd>↑</kbd><kbd>↓</kbd> {{ translations().paletteNavigate }}</span>\n <span class=\"tx-command-palette__hint\"><kbd>↵</kbd> {{ translations().paletteOpen }}</span>\n <span class=\"tx-command-palette__hint\"><kbd>esc</kbd> {{ translations().paletteClose }}</span>\n </div>\n </div>\n </div>\n }\n</ng-template>\n",
|
|
494
|
+
styles: [":host{display:inline-flex}.tx-command-palette__trigger{position:relative;display:inline-flex;align-items:center;border:0;cursor:pointer;font:inherit}.tx-command-palette__overlay{position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center}.tx-command-palette__panel{display:flex;flex-direction:column;box-sizing:border-box;width:100%;overflow:hidden}.tx-command-palette__search{display:flex;align-items:center}.tx-command-palette__input{flex:1;min-width:0;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit}.tx-command-palette__results{flex:1;min-height:0;overflow-y:auto}.tx-command-palette__list{display:flex;flex-direction:column}.tx-command-palette__item{display:flex;align-items:center;width:100%;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:start}.tx-command-palette__item-icon{display:grid;flex-shrink:0;place-items:center}.tx-command-palette__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-command-palette__sublabel{flex-shrink:0;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-command-palette__arrow{opacity:0}.tx-command-palette__item--active .tx-command-palette__arrow{opacity:1}.tx-command-palette__status{display:flex;align-items:center;justify-content:center}.tx-command-palette__footer,.tx-command-palette__hint{display:flex;align-items:center}.tx-command-palette__spinner{animation:tx-command-palette-spin 1s linear infinite}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-command-palette__trigger{gap:var(--tx-command-palette-trigger-gap);height:var(--tx-command-palette-trigger-height);padding:var(--tx-command-palette-trigger-padding);border-radius:var(--tx-command-palette-trigger-border-radius);background:var(--tx-command-palette-trigger-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-ring-color),var(--tx-command-palette-trigger-shadow);color:var(--tx-command-palette-trigger-color);font-size:var(--tx-command-palette-trigger-font-size);transition:background-color var(--tx-command-palette-trigger-duration),color var(--tx-command-palette-trigger-duration),box-shadow var(--tx-command-palette-trigger-duration),scale var(--tx-command-palette-trigger-duration)}:host([data-styled]) .tx-command-palette__trigger:hover{background:var(--tx-command-palette-trigger-hover-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-ring-color),var(--tx-command-palette-trigger-hover-shadow);color:var(--tx-command-palette-trigger-hover-color)}:host([data-styled]) .tx-command-palette__trigger:active{scale:var(--tx-command-palette-trigger-active-scale)}:host([data-styled]) .tx-command-palette__trigger:focus-visible{outline:none;box-shadow:var(--tx-command-palette-trigger-focus-ring-shadow)}:host([data-styled]) .tx-command-palette__kbd{margin-inline-start:var(--tx-command-palette-trigger-kbd-margin-start);padding:var(--tx-command-palette-trigger-kbd-padding);border-radius:var(--tx-command-palette-trigger-kbd-border-radius);background:var(--tx-command-palette-trigger-kbd-background);box-shadow:inset 0 0 0 1px var(--tx-command-palette-trigger-kbd-ring-color);font-family:inherit;font-size:var(--tx-command-palette-trigger-kbd-font-size);font-weight:var(--tx-command-palette-trigger-kbd-font-weight);line-height:1}.tx-command-palette__overlay[data-styled]{z-index:var(--tx-command-palette-overlay-z-index);padding:var(--tx-command-palette-overlay-padding);background:var(--tx-command-palette-overlay-background);font-family:var(--tx-font-family);-webkit-backdrop-filter:blur(var(--tx-command-palette-overlay-blur));backdrop-filter:blur(var(--tx-command-palette-overlay-blur))}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--enter{animation:tx-command-palette-fade-in var(--tx-command-palette-overlay-enter-duration) ease-out}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--leave{animation:tx-command-palette-fade-out var(--tx-command-palette-overlay-leave-duration) ease-in forwards}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel{max-width:var(--tx-command-palette-panel-max-width);max-height:var(--tx-command-palette-panel-max-height);border:1px solid var(--tx-command-palette-panel-border-color);border-radius:var(--tx-command-palette-panel-border-radius);background:var(--tx-command-palette-panel-background);box-shadow:var(--tx-command-palette-panel-shadow);color:var(--tx-command-palette-panel-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--enter{animation:tx-command-palette-pop-in var(--tx-command-palette-panel-enter-duration) var(--tx-command-palette-panel-easing)}.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--leave{animation:tx-command-palette-pop-out var(--tx-command-palette-panel-leave-duration) ease-in forwards}.tx-command-palette__overlay[data-styled] .tx-command-palette__search{gap:var(--tx-command-palette-search-gap);padding:var(--tx-command-palette-search-padding);border-bottom:1px solid var(--tx-command-palette-panel-border-color);font-size:var(--tx-command-palette-search-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__search-icon{color:var(--tx-command-palette-search-icon-color);font-size:var(--tx-command-palette-search-icon-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__input::placeholder{color:var(--tx-command-palette-search-placeholder-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__spinner{color:var(--tx-command-palette-search-icon-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__results{padding:var(--tx-command-palette-results-padding)}.tx-command-palette__overlay[data-styled] .tx-command-palette__group{padding:var(--tx-command-palette-results-group-padding);color:var(--tx-command-palette-results-group-color);font-size:var(--tx-command-palette-results-group-font-size);font-weight:var(--tx-command-palette-results-group-font-weight);letter-spacing:var(--tx-command-palette-results-group-letter-spacing);text-transform:uppercase}.tx-command-palette__overlay[data-styled] .tx-command-palette__item{gap:var(--tx-command-palette-item-gap);padding:var(--tx-command-palette-item-padding);border-radius:var(--tx-command-palette-item-border-radius);color:var(--tx-command-palette-item-color);font-size:var(--tx-command-palette-item-font-size);transition:background-color var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item--active{background:var(--tx-command-palette-item-active-background)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item-icon{width:var(--tx-command-palette-item-icon-size);height:var(--tx-command-palette-item-icon-size);border-radius:var(--tx-command-palette-item-icon-border-radius);background:var(--tx-command-palette-item-icon-background);color:var(--tx-command-palette-item-icon-color);font-size:var(--tx-command-palette-item-icon-font-size);transition:background-color var(--tx-command-palette-item-duration),color var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__item--active .tx-command-palette__item-icon{background:var(--tx-command-palette-item-active-icon-background);color:var(--tx-command-palette-item-active-icon-color)}.tx-command-palette__overlay[data-styled] .tx-command-palette__label{font-weight:var(--tx-command-palette-item-label-font-weight)}.tx-command-palette__overlay[data-styled] .tx-command-palette__sublabel{color:var(--tx-command-palette-item-sublabel-color);font-size:var(--tx-command-palette-item-sublabel-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__arrow{color:var(--tx-command-palette-item-arrow-color);font-size:var(--tx-command-palette-item-arrow-size);transition:opacity var(--tx-command-palette-item-duration)}.tx-command-palette__overlay[data-styled] .tx-command-palette__status{gap:var(--tx-command-palette-results-status-gap);padding:var(--tx-command-palette-results-status-padding);color:var(--tx-command-palette-results-status-color);font-size:var(--tx-command-palette-results-status-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__status--empty{padding:var(--tx-command-palette-results-empty-padding)}.tx-command-palette__overlay[data-styled] .tx-command-palette__footer{gap:var(--tx-command-palette-footer-gap);padding:var(--tx-command-palette-footer-padding);border-top:1px solid var(--tx-command-palette-panel-border-color);background:var(--tx-command-palette-footer-background)}.tx-command-palette__overlay[data-styled] .tx-command-palette__hint{gap:var(--tx-command-palette-footer-hint-gap);color:var(--tx-command-palette-footer-hint-color);font-size:var(--tx-command-palette-footer-hint-font-size)}.tx-command-palette__overlay[data-styled] .tx-command-palette__hint kbd{display:inline-flex;align-items:center;justify-content:center;min-width:var(--tx-command-palette-footer-kbd-min-width);box-sizing:border-box;padding:var(--tx-command-palette-footer-kbd-padding);border:1px solid var(--tx-command-palette-panel-border-color);border-radius:var(--tx-command-palette-footer-kbd-border-radius);background:var(--tx-command-palette-footer-kbd-background);font-family:inherit;font-size:var(--tx-command-palette-footer-kbd-font-size);font-weight:var(--tx-font-weight-medium)}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger{justify-content:center;width:var(--tx-command-palette-trigger-height);padding:0}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger .tx-command-palette__trigger-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled].tx-command-palette--compact) .tx-command-palette__trigger .tx-command-palette__kbd{display:none}@media(width<=768px){:host([data-styled]) .tx-command-palette__trigger{justify-content:center;width:var(--tx-command-palette-trigger-height);padding:0}:host([data-styled]) .tx-command-palette__trigger .tx-command-palette__trigger-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-command-palette__trigger .tx-command-palette__kbd{display:none}}@keyframes tx-command-palette-spin{to{rotate:360deg}}@keyframes tx-command-palette-fade-in{0%{opacity:0}}@keyframes tx-command-palette-fade-out{to{opacity:0}}@keyframes tx-command-palette-pop-in{0%{opacity:0;transform:translateY(-8px) scale(.98)}}@keyframes tx-command-palette-pop-out{to{opacity:0;transform:translateY(-8px) scale(.98)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-command-palette__trigger{transition:none}.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--enter,.tx-command-palette__overlay[data-styled].tx-command-palette__overlay--leave,.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--enter,.tx-command-palette__overlay[data-styled] .tx-command-palette__panel--leave{animation:none}.tx-command-palette__overlay[data-styled] .tx-command-palette__item,.tx-command-palette__overlay[data-styled] .tx-command-palette__item-icon,.tx-command-palette__overlay[data-styled] .tx-command-palette__arrow{transition:none}}\n"]
|
|
495
|
+
}]
|
|
496
|
+
}],
|
|
497
|
+
ctorParameters: () => [],
|
|
498
|
+
propDecorators: {
|
|
499
|
+
layer: [{
|
|
500
|
+
type: i0.ViewChild,
|
|
501
|
+
args: ["layer", { isSignal: true }]
|
|
502
|
+
}],
|
|
503
|
+
label: [{
|
|
504
|
+
type: i0.Input,
|
|
505
|
+
args: [{
|
|
506
|
+
isSignal: true,
|
|
507
|
+
alias: "label",
|
|
508
|
+
required: false
|
|
509
|
+
}]
|
|
510
|
+
}],
|
|
511
|
+
placeholder: [{
|
|
512
|
+
type: i0.Input,
|
|
513
|
+
args: [{
|
|
514
|
+
isSignal: true,
|
|
515
|
+
alias: "placeholder",
|
|
516
|
+
required: false
|
|
517
|
+
}]
|
|
518
|
+
}],
|
|
519
|
+
icon: [{
|
|
520
|
+
type: i0.Input,
|
|
521
|
+
args: [{
|
|
522
|
+
isSignal: true,
|
|
523
|
+
alias: "icon",
|
|
524
|
+
required: false
|
|
525
|
+
}]
|
|
526
|
+
}],
|
|
527
|
+
items: [{
|
|
528
|
+
type: i0.Input,
|
|
529
|
+
args: [{
|
|
530
|
+
isSignal: true,
|
|
531
|
+
alias: "items",
|
|
532
|
+
required: false
|
|
533
|
+
}]
|
|
534
|
+
}],
|
|
535
|
+
groupLabels: [{
|
|
536
|
+
type: i0.Input,
|
|
537
|
+
args: [{
|
|
538
|
+
isSignal: true,
|
|
539
|
+
alias: "groupLabels",
|
|
540
|
+
required: false
|
|
541
|
+
}]
|
|
542
|
+
}],
|
|
543
|
+
loading: [{
|
|
544
|
+
type: i0.Input,
|
|
545
|
+
args: [{
|
|
546
|
+
isSignal: true,
|
|
547
|
+
alias: "loading",
|
|
548
|
+
required: false
|
|
549
|
+
}]
|
|
550
|
+
}],
|
|
551
|
+
emptyText: [{
|
|
552
|
+
type: i0.Input,
|
|
553
|
+
args: [{
|
|
554
|
+
isSignal: true,
|
|
555
|
+
alias: "emptyText",
|
|
556
|
+
required: false
|
|
557
|
+
}]
|
|
558
|
+
}],
|
|
559
|
+
loadingText: [{
|
|
560
|
+
type: i0.Input,
|
|
561
|
+
args: [{
|
|
562
|
+
isSignal: true,
|
|
563
|
+
alias: "loadingText",
|
|
564
|
+
required: false
|
|
565
|
+
}]
|
|
566
|
+
}],
|
|
567
|
+
minQueryLength: [{
|
|
568
|
+
type: i0.Input,
|
|
569
|
+
args: [{
|
|
570
|
+
isSignal: true,
|
|
571
|
+
alias: "minQueryLength",
|
|
572
|
+
required: false
|
|
573
|
+
}]
|
|
574
|
+
}],
|
|
575
|
+
debounceTime: [{
|
|
576
|
+
type: i0.Input,
|
|
577
|
+
args: [{
|
|
578
|
+
isSignal: true,
|
|
579
|
+
alias: "debounceTime",
|
|
580
|
+
required: false
|
|
581
|
+
}]
|
|
582
|
+
}],
|
|
583
|
+
shortcutKey: [{
|
|
584
|
+
type: i0.Input,
|
|
585
|
+
args: [{
|
|
586
|
+
isSignal: true,
|
|
587
|
+
alias: "shortcutKey",
|
|
588
|
+
required: false
|
|
589
|
+
}]
|
|
590
|
+
}],
|
|
591
|
+
localFilter: [{
|
|
592
|
+
type: i0.Input,
|
|
593
|
+
args: [{
|
|
594
|
+
isSignal: true,
|
|
595
|
+
alias: "localFilter",
|
|
596
|
+
required: false
|
|
597
|
+
}]
|
|
598
|
+
}],
|
|
599
|
+
compact: [{
|
|
600
|
+
type: i0.Input,
|
|
601
|
+
args: [{
|
|
602
|
+
isSignal: true,
|
|
603
|
+
alias: "compact",
|
|
604
|
+
required: false
|
|
605
|
+
}]
|
|
606
|
+
}],
|
|
607
|
+
dt: [{
|
|
608
|
+
type: i0.Input,
|
|
609
|
+
args: [{
|
|
610
|
+
isSignal: true,
|
|
611
|
+
alias: "dt",
|
|
612
|
+
required: false
|
|
613
|
+
}]
|
|
614
|
+
}],
|
|
615
|
+
pt: [{
|
|
616
|
+
type: i0.Input,
|
|
617
|
+
args: [{
|
|
618
|
+
isSignal: true,
|
|
619
|
+
alias: "pt",
|
|
620
|
+
required: false
|
|
621
|
+
}]
|
|
622
|
+
}],
|
|
623
|
+
ptOptions: [{
|
|
624
|
+
type: i0.Input,
|
|
625
|
+
args: [{
|
|
626
|
+
isSignal: true,
|
|
627
|
+
alias: "ptOptions",
|
|
628
|
+
required: false
|
|
629
|
+
}]
|
|
630
|
+
}],
|
|
631
|
+
unstyled: [{
|
|
632
|
+
type: i0.Input,
|
|
633
|
+
args: [{
|
|
634
|
+
isSignal: true,
|
|
635
|
+
alias: "unstyled",
|
|
636
|
+
required: false
|
|
637
|
+
}]
|
|
638
|
+
}],
|
|
639
|
+
queryChange: [{
|
|
640
|
+
type: i0.Output,
|
|
641
|
+
args: ["queryChange"]
|
|
642
|
+
}],
|
|
643
|
+
searchChange: [{
|
|
644
|
+
type: i0.Output,
|
|
645
|
+
args: ["searchChange"]
|
|
646
|
+
}],
|
|
647
|
+
itemSelect: [{
|
|
648
|
+
type: i0.Output,
|
|
649
|
+
args: ["itemSelect"]
|
|
650
|
+
}],
|
|
651
|
+
opened: [{
|
|
652
|
+
type: i0.Output,
|
|
653
|
+
args: ["opened"]
|
|
654
|
+
}],
|
|
655
|
+
closed: [{
|
|
656
|
+
type: i0.Output,
|
|
657
|
+
args: ["closed"]
|
|
658
|
+
}]
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
export { TxCommandPalette, TxCommandPaletteFilterPipe, TxMenuPaletteItemsPipe, filterPaletteItems, menuPaletteItems };
|
|
662
|
+
|
|
663
|
+
//# sourceMappingURL=tectra-ng-blocks-command-palette.mjs.map
|