ngwr 14.0.1 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,8 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
3
3
  import { isPlatformBrowser } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
5
  import { input, model, output, signal, viewChild, computed, inject, DestroyRef, PLATFORM_ID, effect, afterNextRender, ViewEncapsulation, Component } from '@angular/core';
6
+ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
+ import { skip, debounce, timer } from 'rxjs';
6
8
  import { WrHotkey } from 'ngwr/hotkey';
7
9
  import { useI18nText, readI18nText } from 'ngwr/i18n';
8
10
  import { WrIcon } from 'ngwr/icon';
@@ -78,8 +80,15 @@ class WrCommandPalette {
78
80
  /** Text shown when no items match. Falls back to `commandPalette.noResults`. */
79
81
  emptyText = input(null, /* @ts-ignore */
80
82
  ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
83
+ /**
84
+ * Overrides the `commandPalette.loading` catalog string, shown instead of
85
+ * {@link emptyText} while {@link loading} is true.
86
+ */
87
+ loadingText = input(null, /* @ts-ignore */
88
+ ...(ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []));
81
89
  resolvedPlaceholder = useI18nText(this.placeholder, 'commandPalette.placeholder', 'Type a command or search…');
82
90
  resolvedEmpty = useI18nText(this.emptyText, 'commandPalette.noResults', 'No results');
91
+ resolvedLoading = useI18nText(this.loadingText, 'commandPalette.loading', 'Searching…');
83
92
  /**
84
93
  * The key-cap chip beside the search field. It was the literal `esc` in the
85
94
  * template — the one string on this component no catalog could reach, so a
@@ -98,8 +107,48 @@ class WrCommandPalette {
98
107
  responsive = input(undefined, { ...(ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {}), transform: (v) => (v == null ? undefined : coerceBooleanProperty(v)) });
99
108
  /** Fires when the user commits an item (Enter / click). */
100
109
  picked = output();
101
- query = signal('', /* @ts-ignore */
110
+ /**
111
+ * The search text. Two-way, so a host can seed it, clear it, or read what the
112
+ * user is looking for — the palette used to keep this to itself, which is what
113
+ * made it impossible to back with anything but a static `items` array.
114
+ *
115
+ * Writing it does NOT re-run a host's search on its own: the debounced
116
+ * {@link searchChange} output is what fires, on exactly the cadence
117
+ * {@link debounceMs} sets.
118
+ */
119
+ query = model('', /* @ts-ignore */
102
120
  ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
121
+ /**
122
+ * The item list is already scoped to the query upstream — skip the built-in
123
+ * client-side filter. Set it when `[items]` is fed from a server via the
124
+ * {@link searchChange} output.
125
+ *
126
+ * Without this, a backend that ranks or tolerates typos (returning rows whose
127
+ * labels do not literally contain the query) would have those rows hidden
128
+ * again on the client — the same rule `wr-select` follows, and the same
129
+ * reason. @default false
130
+ */
131
+ serverSearch = input(false, { ...(ngDevMode ? { debugName: "serverSearch" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
132
+ /**
133
+ * A host-driven search is in flight. Swaps the empty row for
134
+ * {@link loadingText} — an async palette that says "No results" between every
135
+ * keystroke and its answer is stating something false. @default false
136
+ */
137
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
138
+ /**
139
+ * How long the query must settle before {@link searchChange} fires, in ms.
140
+ * A search request per keystroke is what exhausts a metered search backend:
141
+ * typing `select` is six requests at 0 and roughly one at 250. @default 250
142
+ */
143
+ debounceMs = input(250, { ...(ngDevMode ? { debugName: "debounceMs" } : /* istanbul ignore next */ {}), transform: (v) => Math.max(0, Number(v) || 0) });
144
+ /**
145
+ * The settled query. This is the hook for a server-backed palette: dispatch
146
+ * on it, then feed the result into `[items]` with `[serverSearch]` set.
147
+ *
148
+ * Fires on the {@link debounceMs} cadence, NOT per keystroke — `queryChange`
149
+ * is the per-keystroke signal if that is what you want.
150
+ */
151
+ searchChange = output();
103
152
  activeIndex = signal(0, /* @ts-ignore */
104
153
  ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
105
154
  /** Whether the current opening is presented full-screen. Decided on open. */
@@ -146,8 +195,21 @@ class WrCommandPalette {
146
195
  * and holds it, so that is retained DOM, not just a stray object.
147
196
  */
148
197
  destroyed = false;
198
+ /** Whether this palette filters `items` itself. */
199
+ clientFilter = computed(() => !this.serverSearch(), /* @ts-ignore */
200
+ ...(ngDevMode ? [{ debugName: "clientFilter" }] : /* istanbul ignore next */ []));
201
+ /**
202
+ * Nothing has been asked yet, so there is nothing to report as missing.
203
+ *
204
+ * A client-filtered palette cannot reach this state — an empty query matches
205
+ * every item, so the list is never empty on open. A server-backed one opens
206
+ * with no items by construction, and saying "No results" before a single
207
+ * keystroke answers a question nobody asked.
208
+ */
209
+ awaitingQuery = computed(() => this.serverSearch() && this.query().trim().length === 0, /* @ts-ignore */
210
+ ...(ngDevMode ? [{ debugName: "awaitingQuery" }] : /* istanbul ignore next */ []));
149
211
  /** Grouped view — what the template renders. */
150
- buckets = computed(() => bucketize(this.items().filter(item => matches(item, this.query()))), /* @ts-ignore */
212
+ buckets = computed(() => bucketize(this.clientFilter() ? this.items().filter(item => matches(item, this.query())) : this.items()), /* @ts-ignore */
151
213
  ...(ngDevMode ? [{ debugName: "buckets" }] : /* istanbul ignore next */ []));
152
214
  /**
153
215
  * Flat list in RENDER order — what keyboard navigation walks, and what every
@@ -160,6 +222,21 @@ class WrCommandPalette {
160
222
  filtered = computed(() => this.buckets().flatMap(bucket => bucket.items), /* @ts-ignore */
161
223
  ...(ngDevMode ? [{ debugName: "filtered" }] : /* istanbul ignore next */ []));
162
224
  constructor() {
225
+ // The settled query, for a host-driven search. `debounce(() => timer(...))`
226
+ // rather than `debounceTime(this.debounceMs())`: this runs in the
227
+ // constructor, where inputs are not bound yet, so reading the input eagerly
228
+ // would pin the delay to the default and ignore `[debounceMs]` for good.
229
+ //
230
+ // `skip(1)` sits BEFORE the debounce so it drops the mount-time replay of
231
+ // the empty query and nothing else. Downstream it would instead drop the
232
+ // first SETTLED emission — and when a fast typist's opening keystrokes
233
+ // coalesce with that initial `''`, the dropped emission is their query.
234
+ //
235
+ // Both rules are `wr-select`'s, arrived at there the hard way; this is the
236
+ // same pipeline minus the async loader, which the palette does not own.
237
+ toObservable(this.query)
238
+ .pipe(skip(1), debounce(() => timer(this.debounceMs())), takeUntilDestroyed(this.destroyRef))
239
+ .subscribe(query => this.searchChange.emit(query));
163
240
  // Bind / re-bind the global trigger whenever the spec changes.
164
241
  effect(() => {
165
242
  this.bindingHandle?.unbind();
@@ -345,12 +422,12 @@ class WrCommandPalette {
345
422
  this.close();
346
423
  }
347
424
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrCommandPalette, deps: [], target: i0.ɵɵFactoryTarget.Component });
348
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: WrCommandPalette, isStandalone: true, selector: "wr-command-palette", inputs: { paletteLabel: { classPropertyName: "paletteLabel", publicName: "paletteLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, closeOnPick: { classPropertyName: "closeOnPick", publicName: "closeOnPick", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", picked: "picked" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
425
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: WrCommandPalette, isStandalone: true, selector: "wr-command-palette", inputs: { paletteLabel: { classPropertyName: "paletteLabel", publicName: "paletteLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, closeOnPick: { classPropertyName: "closeOnPick", publicName: "closeOnPick", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, serverSearch: { classPropertyName: "serverSearch", publicName: "serverSearch", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", picked: "picked", query: "queryChange", searchChange: "searchChange" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (loading()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedLoading() }}</div>\n } @else if (filtered().length === 0 && !awaitingQuery()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Footer slot. A real palette carries something under the list \u2014 a key\n legend, a result count, a provider's required attribution \u2014 and there\n was nowhere to put it. Projected rather than an input, because the\n content is markup (a link, a logo) rather than a string.\n\n Outside the listbox on purpose: a `role=\"listbox\"` may own only\n `option` and `group` children, the same rule the buckets and the empty\n row already follow. -->\n <div class=\"wr-command-palette__footer\">\n <ng-content select=\"[wrCommandPaletteFooter]\" />\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
349
426
  }
350
427
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrCommandPalette, decorators: [{
351
428
  type: Component,
352
- args: [{ selector: 'wr-command-palette', encapsulation: ViewEncapsulation.None, imports: [WrIcon], template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n" }]
353
- }], ctorParameters: () => [], propDecorators: { paletteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paletteLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], closeOnPick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnPick", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], picked: [{ type: i0.Output, args: ["picked"] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
429
+ args: [{ selector: 'wr-command-palette', encapsulation: ViewEncapsulation.None, imports: [WrIcon], template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (loading()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedLoading() }}</div>\n } @else if (filtered().length === 0 && !awaitingQuery()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Footer slot. A real palette carries something under the list \u2014 a key\n legend, a result count, a provider's required attribution \u2014 and there\n was nowhere to put it. Projected rather than an input, because the\n content is markup (a link, a logo) rather than a string.\n\n Outside the listbox on purpose: a `role=\"listbox\"` may own only\n `option` and `group` children, the same rule the buckets and the empty\n row already follow. -->\n <div class=\"wr-command-palette__footer\">\n <ng-content select=\"[wrCommandPaletteFooter]\" />\n </div>\n </div>\n </div>\n}\n" }]
430
+ }], ctorParameters: () => [], propDecorators: { paletteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paletteLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], closeOnPick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnPick", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], picked: [{ type: i0.Output, args: ["picked"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], serverSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSearch", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
354
431
 
355
432
  /**
356
433
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-command-palette.mjs","sources":["../../../projects/lib/command-palette/command-palette.ts","../../../projects/lib/command-palette/command-palette.html","../../../projects/lib/command-palette/ngwr-command-palette.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { WrHotkey, type WrHotkeyHandle, type WrHotkeySpec } from 'ngwr/hotkey';\nimport { readI18nText, useI18nText } from 'ngwr/i18n';\nimport { WrIcon } from 'ngwr/icon';\nimport { WR_RESPONSIVE_OVERLAYS, wrPresentAsSheet } from 'ngwr/overlay';\nimport { isComposing } from 'ngwr/utils';\n\nimport type { WrCommandItem } from './interfaces';\n\ninterface Bucket {\n readonly title: string | null;\n readonly items: readonly WrCommandItem[];\n}\n\nlet listboxUid = 0;\n\nfunction bucketize(items: readonly WrCommandItem[]): readonly Bucket[] {\n const map = new Map<string | null, WrCommandItem[]>();\n for (const item of items) {\n const key = item.group ?? null;\n const bucket = map.get(key);\n if (bucket) bucket.push(item);\n else map.set(key, [item]);\n }\n return [...map.entries()].map(([title, items]) => ({ title, items }));\n}\n\nfunction matches(item: WrCommandItem, query: string): boolean {\n if (!query) return true;\n const q = query.toLowerCase();\n if (item.label.toLowerCase().includes(q)) return true;\n if (item.description?.toLowerCase().includes(q)) return true;\n if (item.group?.toLowerCase().includes(q)) return true;\n if (item.keywords?.some(k => k.toLowerCase().includes(q))) return true;\n return false;\n}\n\n/**\n * `⌘K`-style command palette — a centred modal with a search input and\n * filtered list of actions. Items can be grouped, have icons, descriptions,\n * and visual shortcut hints.\n *\n * Drop one at the root of the app, pass it the list of commands, and bind\n * a global hotkey (default `'mod+k'`). Use `[(open)]` for controlled\n * visibility, or let it manage itself.\n *\n * @example\n * ```html\n * <wr-command-palette [items]=\"commands\" trigger=\"mod+k\" (picked)=\"onPicked($event)\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/command-palette\n */\n@Component({\n selector: 'wr-command-palette',\n templateUrl: './command-palette.html',\n encapsulation: ViewEncapsulation.None,\n imports: [WrIcon],\n})\nexport class WrCommandPalette {\n /** Accessible name. Falls back to `commandPalette.label`, then `'Command palette'`. */\n readonly paletteLabel = input<string | null>(null);\n\n protected readonly resolvedPaletteLabel = useI18nText(this.paletteLabel, 'commandPalette.label', 'Command palette');\n\n /** Items shown in the palette. */\n readonly items = input<readonly WrCommandItem[]>([]);\n\n /** Controlled open state (two-way bindable). @default false */\n readonly open = model(false);\n\n /** Global hotkey that opens the palette. `null` disables auto-binding. @default 'mod+k' */\n readonly trigger = input<WrHotkeySpec | null>('mod+k');\n\n /** Search input placeholder. Falls back to `commandPalette.placeholder`. */\n readonly placeholder = input<string | null>(null);\n\n /** Text shown when no items match. Falls back to `commandPalette.noResults`. */\n readonly emptyText = input<string | null>(null);\n\n protected readonly resolvedPlaceholder = useI18nText(\n this.placeholder,\n 'commandPalette.placeholder',\n 'Type a command or search…'\n );\n protected readonly resolvedEmpty = useI18nText(this.emptyText, 'commandPalette.noResults', 'No results');\n\n /**\n * The key-cap chip beside the search field. It was the literal `esc` in the\n * template — the one string on this component no catalog could reach, so a\n * fully Russian palette still hinted in English.\n */\n protected readonly resolvedEscHint = readI18nText('commandPalette.escHint', 'esc');\n\n /** Auto-close on `(picked)`. Set false to keep open. @default true */\n readonly closeOnPick = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Present the palette full-screen on small viewports instead of a centred\n * modal. `undefined` follows the app-wide `provideWrResponsiveOverlays()`\n * setting; `true`/`false` overrides it. The palette docks to the top (it\n * auto-focuses its input, so the on-screen keyboard stays clear).\n * @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /** Fires when the user commits an item (Enter / click). */\n readonly picked = output<WrCommandItem>();\n\n protected readonly query = signal('');\n protected readonly activeIndex = signal(0);\n\n /** Whether the current opening is presented full-screen. Decided on open. */\n protected readonly presentAsSheet = signal(false);\n protected readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('input');\n protected readonly panelEl = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** Listbox id (referenced by the input's `aria-controls`). */\n protected readonly listboxId = `wr-command-palette-listbox-${++listboxUid}`;\n\n /** @internal Build a stable option id for a given flat index. */\n protected optionId(i: number): string {\n return `${this.listboxId}-opt-${i}`;\n }\n\n /**\n * A `role=\"listbox\"` may only own `option` and `group` children, so a titled\n * bucket becomes a labelled group and an untitled one drops out of the tree\n * entirely — leaving its options as the listbox's own children rather than as\n * role-less wrappers ARIA has no rule for.\n */\n protected groupTitleId(index: number): string {\n return `${this.listboxId}-group-${index}`;\n }\n\n /** Id of the active option for `aria-activedescendant`. */\n protected readonly activeOptionId = computed<string | null>(() => {\n const i = this.activeIndex();\n return i >= 0 && i < this.filtered().length ? this.optionId(i) : null;\n });\n\n private readonly hotkeys = inject(WrHotkey);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly destroyRef = inject(DestroyRef);\n private readonly focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private bindingHandle: WrHotkeyHandle | null = null;\n private focusTrap: ConfigurableFocusTrap | null = null;\n private previouslyFocused: HTMLElement | null = null;\n\n /**\n * The open branch below builds the trap inside a `queueMicrotask`, so a\n * palette destroyed while open — in the same task that opened it — runs its\n * destroy hook first and then constructs a fresh trap nothing will ever\n * destroy. A `ConfigurableFocusTrap` plants two anchor elements in the panel\n * and holds it, so that is retained DOM, not just a stray object.\n */\n private destroyed = false;\n\n /** Grouped view — what the template renders. */\n protected readonly buckets = computed<readonly Bucket[]>(() =>\n bucketize(this.items().filter(item => matches(item, this.query())))\n );\n\n /**\n * Flat list in RENDER order — what keyboard navigation walks, and what every\n * index in this component means. Derived FROM the buckets rather than from the\n * filter: `bucketize` collects each group as it first appears, so a flat\n * source-order list disagrees with the screen the moment two groups interleave.\n * It did, and one ArrowDown moved the highlight two rows while Enter fired the\n * command below the one that looked selected.\n */\n protected readonly filtered = computed<readonly WrCommandItem[]>(() =>\n this.buckets().flatMap(bucket => bucket.items)\n );\n\n constructor() {\n // Bind / re-bind the global trigger whenever the spec changes.\n effect(() => {\n this.bindingHandle?.unbind();\n const spec = this.trigger();\n if (!spec) return;\n this.bindingHandle = this.hotkeys.bind(\n spec,\n event => {\n // CLAIM the chord, and the distinction is the whole point: the\n // `preventDefault` OPTION suppresses the browser, while a handler\n // calling `preventDefault()` is how `WrHotkey` is documented to learn\n // that a binding took the chord and the lower-priority ones should be\n // skipped. A palette that only toggled left the chord unclaimed, so\n // two palettes on one page would both open on `mod+k`.\n event.preventDefault();\n this.open.update(v => !v);\n },\n { allowInInput: true }\n );\n });\n\n // Reset query + active index whenever we open.\n effect(() => {\n if (!this.open()) return;\n this.query.set('');\n this.activeIndex.set(0);\n });\n\n // Sheet presentation, kept OUT of the reset above: reading `responsive()` there\n // made the reset depend on it, so a `[responsive]` bound to a signal that\n // flipped while the palette was open wiped whatever the user had typed.\n effect(() => {\n this.presentAsSheet.set(wrPresentAsSheet(this.responsive(), this.responsiveConfig));\n });\n\n // Focus trap + restore.\n effect(() => {\n if (!this.isBrowser) return;\n if (this.open()) {\n const active = document.activeElement;\n this.previouslyFocused = active instanceof HTMLElement ? active : null;\n queueMicrotask(() => {\n if (this.destroyed) return;\n const host = this.panelEl()?.nativeElement;\n if (!host) return;\n this.focusTrap?.destroy();\n this.focusTrap = this.focusTrapFactory.create(host);\n void this.focusTrap.focusInitialElementWhenReady();\n });\n } else {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n const restore = this.previouslyFocused;\n this.previouslyFocused = null;\n if (restore && typeof restore.focus === 'function') restore.focus();\n }\n });\n\n afterNextRender(() => {\n if (this.open()) this.inputEl()?.nativeElement.focus();\n });\n\n // Auto-focus the input when opened.\n effect(() => {\n if (!this.open()) return;\n queueMicrotask(() => this.inputEl()?.nativeElement.focus());\n });\n\n // Clamp the active index when the filtered list shrinks.\n effect(() => {\n const max = Math.max(0, this.filtered().length - 1);\n if (this.activeIndex() > max) this.activeIndex.set(max);\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.bindingHandle?.unbind();\n // The trap is torn down in the close branch of the effect above, which never\n // runs when the component itself goes away while still open — leaving a live\n // trap holding the removed panel and its document listeners.\n this.focusTrap?.destroy();\n this.focusTrap = null;\n });\n }\n\n // Template handlers\n\n protected onQueryInput(event: Event): void {\n this.query.set((event.target as HTMLInputElement).value);\n this.activeIndex.set(0);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n // Every key below belongs to the input method while it is converting: Enter\n // accepts a candidate, Escape cancels the conversion, the arrows walk the\n // candidate list. Acting on them closed the palette — and threw the query\n // away — the first time a Japanese user pressed Escape to undo a reading.\n if (isComposing(event)) return;\n\n const list = this.filtered();\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (list.length > 0) this.activeIndex.set((this.activeIndex() + 1) % list.length);\n this.revealActive();\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (list.length > 0) this.activeIndex.set((this.activeIndex() - 1 + list.length) % list.length);\n this.revealActive();\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(0);\n this.revealActive();\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(Math.max(0, list.length - 1));\n this.revealActive();\n break;\n case 'Enter': {\n event.preventDefault();\n const item = list[this.activeIndex()];\n if (item) this.commit(item);\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.close();\n break;\n default:\n break;\n }\n }\n\n protected onBackdropClick(): void {\n this.close();\n }\n\n protected onItemClick(item: WrCommandItem, event: MouseEvent): void {\n event.preventDefault();\n this.commit(item);\n }\n\n protected onItemHover(item: WrCommandItem): void {\n const i = this.filtered().indexOf(item);\n if (i >= 0) this.activeIndex.set(i);\n }\n\n /** Flat index of an item within the filtered list — for highlight checks. */\n protected indexOf(item: WrCommandItem): number {\n return this.filtered().indexOf(item);\n }\n\n // Public API\n\n /** Open the palette. */\n show(): void {\n this.open.set(true);\n }\n\n /** Close the palette. */\n close(): void {\n this.open.set(false);\n }\n\n // Internals\n\n /**\n * Keep the highlighted option on screen. The body is a fixed-height scroller and\n * the options are not focusable, so nothing moves it on the browser's behalf —\n * arrow keys walked the highlight straight off the bottom and out of sight.\n * Keyboard only: doing it on hover would fight the pointer that caused it.\n * `wr-select` and `wr-tree` keep the same promise through their own\n * `ensureVisible`; theirs is index maths because they are virtualized.\n */\n private revealActive(): void {\n if (!this.isBrowser) return;\n const id = this.activeOptionId();\n if (!id) return;\n // Ids are position-based and stable, so the element is findable straight away —\n // no need to wait for change detection to re-mark the active row.\n this.panelEl()?.nativeElement.querySelector<HTMLElement>(`#${id}`)?.scrollIntoView({ block: 'nearest' });\n }\n\n private commit(item: WrCommandItem): void {\n item.action?.();\n this.picked.emit(item);\n if (this.closeOnPick()) this.close();\n }\n}\n","@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable — keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children — the same rule\n the buckets already follow — so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAmCH,IAAI,UAAU,GAAG,CAAC;AAElB,SAAS,SAAS,CAAC,KAA+B,EAAA;AAChD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkC;AACrD,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI;QAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3B,QAAA,IAAI,MAAM;AAAE,YAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3B;IACA,OAAO,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AACvE;AAEA,SAAS,OAAO,CAAC,IAAmB,EAAE,KAAa,EAAA;AACjD,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AAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,OAAO,iEACZ,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/IzE;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-command-palette.mjs","sources":["../../../projects/lib/command-palette/command-palette.ts","../../../projects/lib/command-palette/command-palette.html","../../../projects/lib/command-palette/ngwr-command-palette.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\n\nimport { debounce, skip, timer } from 'rxjs';\n\nimport { WrHotkey, type WrHotkeyHandle, type WrHotkeySpec } from 'ngwr/hotkey';\nimport { readI18nText, useI18nText } from 'ngwr/i18n';\nimport { WrIcon } from 'ngwr/icon';\nimport { WR_RESPONSIVE_OVERLAYS, wrPresentAsSheet } from 'ngwr/overlay';\nimport { isComposing } from 'ngwr/utils';\n\nimport type { WrCommandItem } from './interfaces';\n\ninterface Bucket {\n readonly title: string | null;\n readonly items: readonly WrCommandItem[];\n}\n\nlet listboxUid = 0;\n\nfunction bucketize(items: readonly WrCommandItem[]): readonly Bucket[] {\n const map = new Map<string | null, WrCommandItem[]>();\n for (const item of items) {\n const key = item.group ?? null;\n const bucket = map.get(key);\n if (bucket) bucket.push(item);\n else map.set(key, [item]);\n }\n return [...map.entries()].map(([title, items]) => ({ title, items }));\n}\n\nfunction matches(item: WrCommandItem, query: string): boolean {\n if (!query) return true;\n const q = query.toLowerCase();\n if (item.label.toLowerCase().includes(q)) return true;\n if (item.description?.toLowerCase().includes(q)) return true;\n if (item.group?.toLowerCase().includes(q)) return true;\n if (item.keywords?.some(k => k.toLowerCase().includes(q))) return true;\n return false;\n}\n\n/**\n * `⌘K`-style command palette — a centred modal with a search input and\n * filtered list of actions. Items can be grouped, have icons, descriptions,\n * and visual shortcut hints.\n *\n * Drop one at the root of the app, pass it the list of commands, and bind\n * a global hotkey (default `'mod+k'`). Use `[(open)]` for controlled\n * visibility, or let it manage itself.\n *\n * @example\n * ```html\n * <wr-command-palette [items]=\"commands\" trigger=\"mod+k\" (picked)=\"onPicked($event)\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/command-palette\n */\n@Component({\n selector: 'wr-command-palette',\n templateUrl: './command-palette.html',\n encapsulation: ViewEncapsulation.None,\n imports: [WrIcon],\n})\nexport class WrCommandPalette {\n /** Accessible name. Falls back to `commandPalette.label`, then `'Command palette'`. */\n readonly paletteLabel = input<string | null>(null);\n\n protected readonly resolvedPaletteLabel = useI18nText(this.paletteLabel, 'commandPalette.label', 'Command palette');\n\n /** Items shown in the palette. */\n readonly items = input<readonly WrCommandItem[]>([]);\n\n /** Controlled open state (two-way bindable). @default false */\n readonly open = model(false);\n\n /** Global hotkey that opens the palette. `null` disables auto-binding. @default 'mod+k' */\n readonly trigger = input<WrHotkeySpec | null>('mod+k');\n\n /** Search input placeholder. Falls back to `commandPalette.placeholder`. */\n readonly placeholder = input<string | null>(null);\n\n /** Text shown when no items match. Falls back to `commandPalette.noResults`. */\n readonly emptyText = input<string | null>(null);\n\n /**\n * Overrides the `commandPalette.loading` catalog string, shown instead of\n * {@link emptyText} while {@link loading} is true.\n */\n readonly loadingText = input<string | null>(null);\n\n protected readonly resolvedPlaceholder = useI18nText(\n this.placeholder,\n 'commandPalette.placeholder',\n 'Type a command or search…'\n );\n protected readonly resolvedEmpty = useI18nText(this.emptyText, 'commandPalette.noResults', 'No results');\n protected readonly resolvedLoading = useI18nText(this.loadingText, 'commandPalette.loading', 'Searching…');\n\n /**\n * The key-cap chip beside the search field. It was the literal `esc` in the\n * template — the one string on this component no catalog could reach, so a\n * fully Russian palette still hinted in English.\n */\n protected readonly resolvedEscHint = readI18nText('commandPalette.escHint', 'esc');\n\n /** Auto-close on `(picked)`. Set false to keep open. @default true */\n readonly closeOnPick = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Present the palette full-screen on small viewports instead of a centred\n * modal. `undefined` follows the app-wide `provideWrResponsiveOverlays()`\n * setting; `true`/`false` overrides it. The palette docks to the top (it\n * auto-focuses its input, so the on-screen keyboard stays clear).\n * @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /** Fires when the user commits an item (Enter / click). */\n readonly picked = output<WrCommandItem>();\n\n /**\n * The search text. Two-way, so a host can seed it, clear it, or read what the\n * user is looking for — the palette used to keep this to itself, which is what\n * made it impossible to back with anything but a static `items` array.\n *\n * Writing it does NOT re-run a host's search on its own: the debounced\n * {@link searchChange} output is what fires, on exactly the cadence\n * {@link debounceMs} sets.\n */\n readonly query = model('');\n\n /**\n * The item list is already scoped to the query upstream — skip the built-in\n * client-side filter. Set it when `[items]` is fed from a server via the\n * {@link searchChange} output.\n *\n * Without this, a backend that ranks or tolerates typos (returning rows whose\n * labels do not literally contain the query) would have those rows hidden\n * again on the client — the same rule `wr-select` follows, and the same\n * reason. @default false\n */\n readonly serverSearch = input(false, { transform: coerceBooleanProperty });\n\n /**\n * A host-driven search is in flight. Swaps the empty row for\n * {@link loadingText} — an async palette that says \"No results\" between every\n * keystroke and its answer is stating something false. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /**\n * How long the query must settle before {@link searchChange} fires, in ms.\n * A search request per keystroke is what exhausts a metered search backend:\n * typing `select` is six requests at 0 and roughly one at 250. @default 250\n */\n readonly debounceMs = input(250, { transform: (v: unknown): number => Math.max(0, Number(v) || 0) });\n\n /**\n * The settled query. This is the hook for a server-backed palette: dispatch\n * on it, then feed the result into `[items]` with `[serverSearch]` set.\n *\n * Fires on the {@link debounceMs} cadence, NOT per keystroke — `queryChange`\n * is the per-keystroke signal if that is what you want.\n */\n readonly searchChange = output<string>();\n\n protected readonly activeIndex = signal(0);\n\n /** Whether the current opening is presented full-screen. Decided on open. */\n protected readonly presentAsSheet = signal(false);\n protected readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('input');\n protected readonly panelEl = viewChild<ElementRef<HTMLElement>>('panel');\n\n /** Listbox id (referenced by the input's `aria-controls`). */\n protected readonly listboxId = `wr-command-palette-listbox-${++listboxUid}`;\n\n /** @internal Build a stable option id for a given flat index. */\n protected optionId(i: number): string {\n return `${this.listboxId}-opt-${i}`;\n }\n\n /**\n * A `role=\"listbox\"` may only own `option` and `group` children, so a titled\n * bucket becomes a labelled group and an untitled one drops out of the tree\n * entirely — leaving its options as the listbox's own children rather than as\n * role-less wrappers ARIA has no rule for.\n */\n protected groupTitleId(index: number): string {\n return `${this.listboxId}-group-${index}`;\n }\n\n /** Id of the active option for `aria-activedescendant`. */\n protected readonly activeOptionId = computed<string | null>(() => {\n const i = this.activeIndex();\n return i >= 0 && i < this.filtered().length ? this.optionId(i) : null;\n });\n\n private readonly hotkeys = inject(WrHotkey);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly destroyRef = inject(DestroyRef);\n private readonly focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private bindingHandle: WrHotkeyHandle | null = null;\n private focusTrap: ConfigurableFocusTrap | null = null;\n private previouslyFocused: HTMLElement | null = null;\n\n /**\n * The open branch below builds the trap inside a `queueMicrotask`, so a\n * palette destroyed while open — in the same task that opened it — runs its\n * destroy hook first and then constructs a fresh trap nothing will ever\n * destroy. A `ConfigurableFocusTrap` plants two anchor elements in the panel\n * and holds it, so that is retained DOM, not just a stray object.\n */\n private destroyed = false;\n\n /** Whether this palette filters `items` itself. */\n protected readonly clientFilter = computed(() => !this.serverSearch());\n\n /**\n * Nothing has been asked yet, so there is nothing to report as missing.\n *\n * A client-filtered palette cannot reach this state — an empty query matches\n * every item, so the list is never empty on open. A server-backed one opens\n * with no items by construction, and saying \"No results\" before a single\n * keystroke answers a question nobody asked.\n */\n protected readonly awaitingQuery = computed(() => this.serverSearch() && this.query().trim().length === 0);\n\n /** Grouped view — what the template renders. */\n protected readonly buckets = computed<readonly Bucket[]>(() =>\n bucketize(this.clientFilter() ? this.items().filter(item => matches(item, this.query())) : this.items())\n );\n\n /**\n * Flat list in RENDER order — what keyboard navigation walks, and what every\n * index in this component means. Derived FROM the buckets rather than from the\n * filter: `bucketize` collects each group as it first appears, so a flat\n * source-order list disagrees with the screen the moment two groups interleave.\n * It did, and one ArrowDown moved the highlight two rows while Enter fired the\n * command below the one that looked selected.\n */\n protected readonly filtered = computed<readonly WrCommandItem[]>(() =>\n this.buckets().flatMap(bucket => bucket.items)\n );\n\n constructor() {\n // The settled query, for a host-driven search. `debounce(() => timer(...))`\n // rather than `debounceTime(this.debounceMs())`: this runs in the\n // constructor, where inputs are not bound yet, so reading the input eagerly\n // would pin the delay to the default and ignore `[debounceMs]` for good.\n //\n // `skip(1)` sits BEFORE the debounce so it drops the mount-time replay of\n // the empty query and nothing else. Downstream it would instead drop the\n // first SETTLED emission — and when a fast typist's opening keystrokes\n // coalesce with that initial `''`, the dropped emission is their query.\n //\n // Both rules are `wr-select`'s, arrived at there the hard way; this is the\n // same pipeline minus the async loader, which the palette does not own.\n toObservable(this.query)\n .pipe(\n skip(1),\n debounce(() => timer(this.debounceMs())),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(query => this.searchChange.emit(query));\n\n // Bind / re-bind the global trigger whenever the spec changes.\n effect(() => {\n this.bindingHandle?.unbind();\n const spec = this.trigger();\n if (!spec) return;\n this.bindingHandle = this.hotkeys.bind(\n spec,\n event => {\n // CLAIM the chord, and the distinction is the whole point: the\n // `preventDefault` OPTION suppresses the browser, while a handler\n // calling `preventDefault()` is how `WrHotkey` is documented to learn\n // that a binding took the chord and the lower-priority ones should be\n // skipped. A palette that only toggled left the chord unclaimed, so\n // two palettes on one page would both open on `mod+k`.\n event.preventDefault();\n this.open.update(v => !v);\n },\n { allowInInput: true }\n );\n });\n\n // Reset query + active index whenever we open.\n effect(() => {\n if (!this.open()) return;\n this.query.set('');\n this.activeIndex.set(0);\n });\n\n // Sheet presentation, kept OUT of the reset above: reading `responsive()` there\n // made the reset depend on it, so a `[responsive]` bound to a signal that\n // flipped while the palette was open wiped whatever the user had typed.\n effect(() => {\n this.presentAsSheet.set(wrPresentAsSheet(this.responsive(), this.responsiveConfig));\n });\n\n // Focus trap + restore.\n effect(() => {\n if (!this.isBrowser) return;\n if (this.open()) {\n const active = document.activeElement;\n this.previouslyFocused = active instanceof HTMLElement ? active : null;\n queueMicrotask(() => {\n if (this.destroyed) return;\n const host = this.panelEl()?.nativeElement;\n if (!host) return;\n this.focusTrap?.destroy();\n this.focusTrap = this.focusTrapFactory.create(host);\n void this.focusTrap.focusInitialElementWhenReady();\n });\n } else {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n const restore = this.previouslyFocused;\n this.previouslyFocused = null;\n if (restore && typeof restore.focus === 'function') restore.focus();\n }\n });\n\n afterNextRender(() => {\n if (this.open()) this.inputEl()?.nativeElement.focus();\n });\n\n // Auto-focus the input when opened.\n effect(() => {\n if (!this.open()) return;\n queueMicrotask(() => this.inputEl()?.nativeElement.focus());\n });\n\n // Clamp the active index when the filtered list shrinks.\n effect(() => {\n const max = Math.max(0, this.filtered().length - 1);\n if (this.activeIndex() > max) this.activeIndex.set(max);\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.bindingHandle?.unbind();\n // The trap is torn down in the close branch of the effect above, which never\n // runs when the component itself goes away while still open — leaving a live\n // trap holding the removed panel and its document listeners.\n this.focusTrap?.destroy();\n this.focusTrap = null;\n });\n }\n\n // Template handlers\n\n protected onQueryInput(event: Event): void {\n this.query.set((event.target as HTMLInputElement).value);\n this.activeIndex.set(0);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n // Every key below belongs to the input method while it is converting: Enter\n // accepts a candidate, Escape cancels the conversion, the arrows walk the\n // candidate list. Acting on them closed the palette — and threw the query\n // away — the first time a Japanese user pressed Escape to undo a reading.\n if (isComposing(event)) return;\n\n const list = this.filtered();\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (list.length > 0) this.activeIndex.set((this.activeIndex() + 1) % list.length);\n this.revealActive();\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (list.length > 0) this.activeIndex.set((this.activeIndex() - 1 + list.length) % list.length);\n this.revealActive();\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(0);\n this.revealActive();\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(Math.max(0, list.length - 1));\n this.revealActive();\n break;\n case 'Enter': {\n event.preventDefault();\n const item = list[this.activeIndex()];\n if (item) this.commit(item);\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.close();\n break;\n default:\n break;\n }\n }\n\n protected onBackdropClick(): void {\n this.close();\n }\n\n protected onItemClick(item: WrCommandItem, event: MouseEvent): void {\n event.preventDefault();\n this.commit(item);\n }\n\n protected onItemHover(item: WrCommandItem): void {\n const i = this.filtered().indexOf(item);\n if (i >= 0) this.activeIndex.set(i);\n }\n\n /** Flat index of an item within the filtered list — for highlight checks. */\n protected indexOf(item: WrCommandItem): number {\n return this.filtered().indexOf(item);\n }\n\n // Public API\n\n /** Open the palette. */\n show(): void {\n this.open.set(true);\n }\n\n /** Close the palette. */\n close(): void {\n this.open.set(false);\n }\n\n // Internals\n\n /**\n * Keep the highlighted option on screen. The body is a fixed-height scroller and\n * the options are not focusable, so nothing moves it on the browser's behalf —\n * arrow keys walked the highlight straight off the bottom and out of sight.\n * Keyboard only: doing it on hover would fight the pointer that caused it.\n * `wr-select` and `wr-tree` keep the same promise through their own\n * `ensureVisible`; theirs is index maths because they are virtualized.\n */\n private revealActive(): void {\n if (!this.isBrowser) return;\n const id = this.activeOptionId();\n if (!id) return;\n // Ids are position-based and stable, so the element is findable straight away —\n // no need to wait for change detection to re-mark the active row.\n this.panelEl()?.nativeElement.querySelector<HTMLElement>(`#${id}`)?.scrollIntoView({ block: 'nearest' });\n }\n\n private commit(item: WrCommandItem): void {\n item.action?.();\n this.picked.emit(item);\n if (this.closeOnPick()) this.close();\n }\n}\n","@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable — keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">{{ resolvedEscHint() }}</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children — the same rule\n the buckets already follow — so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (loading()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedLoading() }}</div>\n } @else if (filtered().length === 0 && !awaitingQuery()) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Footer slot. A real palette carries something under the list — a key\n legend, a result count, a provider's required attribution — and there\n was nowhere to put it. Projected rather than an input, because the\n content is markup (a link, a logo) rather than a string.\n\n Outside the listbox on purpose: a `role=\"listbox\"` may own only\n `option` and `group` children, the same rule the buckets and the empty\n row already follow. -->\n <div class=\"wr-command-palette__footer\">\n <ng-content select=\"[wrCommandPaletteFooter]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;AAKG;AAsCH,IAAI,UAAU,GAAG,CAAC;AAElB,SAAS,SAAS,CAAC,KAA+B,EAAA;AAChD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkC;AACrD,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI;QAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3B,QAAA,IAAI,MAAM;AAAE,YAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3B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A,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,OAAO,iEACZ,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtMzE;;AAEG;;;;"}
@@ -254,11 +254,11 @@ class WrSortableList {
254
254
  return { index: index + 1, total: this.items().length };
255
255
  }
256
256
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrSortableList, deps: [], target: i0.ɵɵFactoryTarget.Component });
257
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: WrSortableList, isStandalone: true, selector: "wr-sortable-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lockAxis: { classPropertyName: "lockAxis", publicName: "lockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragStartDelay: { classPropertyName: "dragStartDelay", publicName: "dragStartDelay", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", reorder: "reorder" }, host: { classAttribute: "wr-sortable-list" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "rowEls", predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only \u2014 a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n", styles: [".wr-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-table__sort-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-tabs__tab:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-sidebar__entry:focus-visible,.wr-sidebar__group-toggle:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sidebar__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-anchor__link:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-collapse__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-command-palette__option:focus-visible,.wr-command-palette__panel input:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-mention-panel__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-segmented__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-back-top:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-carousel__nav:focus-visible,.wr-carousel__dot:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-speed-dial__trigger:focus-visible,.wr-speed-dial__action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-stepper__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-window__chrome-action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-date-picker__trigger:focus-visible,.wr-time-picker__step:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-dropdown-item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-alert__close:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list__item--grabbed{cursor:grabbing;box-shadow:0 6px 12px rgba(var(--wr-color-backdrop-rgb),.22)}.wr-sortable-list__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-on-surface-rgb),.45);transition:color .15s ease}@media(pointer:coarse){.wr-drag-handle{position:relative}.wr-drag-handle:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;min-width:44px;min-height:44px;transform:translate(-50%,-50%)}}.wr-drag-handle:hover{color:var(--wr-color-on-surface)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview.wr-sortable-list__item{box-sizing:border-box;color:var(--wr-color-on-surface);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.wr-sortable-list .cdk-drag-placeholder{opacity:.35;background:var(--wr-color-fill-strong);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-on-surface-rgb),.25);outline-offset:-1px}.cdk-drag-animating.wr-sortable-list__item{transition:transform .18s var(--wr-ease-spring)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s var(--wr-ease-spring)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
257
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: WrSortableList, isStandalone: true, selector: "wr-sortable-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lockAxis: { classPropertyName: "lockAxis", publicName: "lockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragStartDelay: { classPropertyName: "dragStartDelay", publicName: "dragStartDelay", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", reorder: "reorder" }, host: { classAttribute: "wr-sortable-list" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "rowEls", predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only \u2014 a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n", styles: [".wr-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-table__sort-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-tabs__tab:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-sidebar__entry:focus-visible,.wr-sidebar__group-toggle:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sidebar__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-anchor__link:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-collapse__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-command-palette__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-mention-panel__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-segmented__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-back-top:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-carousel__nav:focus-visible,.wr-carousel__dot:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-speed-dial__trigger:focus-visible,.wr-speed-dial__action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-stepper__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-window__chrome-action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-date-picker__trigger:focus-visible,.wr-time-picker__step:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-dropdown-item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-alert__close:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list__item--grabbed{cursor:grabbing;box-shadow:0 6px 12px rgba(var(--wr-color-backdrop-rgb),.22)}.wr-sortable-list__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-on-surface-rgb),.45);transition:color .15s ease}@media(pointer:coarse){.wr-drag-handle{position:relative}.wr-drag-handle:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;min-width:44px;min-height:44px;transform:translate(-50%,-50%)}}.wr-drag-handle:hover{color:var(--wr-color-on-surface)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview.wr-sortable-list__item{box-sizing:border-box;color:var(--wr-color-on-surface);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.wr-sortable-list .cdk-drag-placeholder{opacity:.35;background:var(--wr-color-fill-strong);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-on-surface-rgb),.25);outline-offset:-1px}.cdk-drag-animating.wr-sortable-list__item{transition:transform .18s var(--wr-ease-spring)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s var(--wr-ease-spring)}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
258
258
  }
259
259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: WrSortableList, decorators: [{
260
260
  type: Component,
261
- args: [{ selector: 'wr-sortable-list', encapsulation: ViewEncapsulation.None, imports: [CdkDropList, CdkDrag, NgTemplateOutlet], host: { class: 'wr-sortable-list' }, template: "<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only \u2014 a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n", styles: [".wr-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-table__sort-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-tabs__tab:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-sidebar__entry:focus-visible,.wr-sidebar__group-toggle:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sidebar__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-anchor__link:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-collapse__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-command-palette__option:focus-visible,.wr-command-palette__panel input:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-mention-panel__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-segmented__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-back-top:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-carousel__nav:focus-visible,.wr-carousel__dot:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-speed-dial__trigger:focus-visible,.wr-speed-dial__action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-stepper__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-window__chrome-action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-date-picker__trigger:focus-visible,.wr-time-picker__step:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-dropdown-item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-alert__close:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list__item--grabbed{cursor:grabbing;box-shadow:0 6px 12px rgba(var(--wr-color-backdrop-rgb),.22)}.wr-sortable-list__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-on-surface-rgb),.45);transition:color .15s ease}@media(pointer:coarse){.wr-drag-handle{position:relative}.wr-drag-handle:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;min-width:44px;min-height:44px;transform:translate(-50%,-50%)}}.wr-drag-handle:hover{color:var(--wr-color-on-surface)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview.wr-sortable-list__item{box-sizing:border-box;color:var(--wr-color-on-surface);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.wr-sortable-list .cdk-drag-placeholder{opacity:.35;background:var(--wr-color-fill-strong);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-on-surface-rgb),.25);outline-offset:-1px}.cdk-drag-animating.wr-sortable-list__item{transition:transform .18s var(--wr-ease-spring)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s var(--wr-ease-spring)}\n"] }]
261
+ args: [{ selector: 'wr-sortable-list', encapsulation: ViewEncapsulation.None, imports: [CdkDropList, CdkDrag, NgTemplateOutlet], host: { class: 'wr-sortable-list' }, template: "<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only \u2014 a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n", styles: [".wr-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-table__sort-btn:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-tabs__tab:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-sidebar__entry:focus-visible,.wr-sidebar__group-toggle:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sidebar__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-anchor__link:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-collapse__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo);outline-offset:-2px}.wr-command-palette__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-mention-panel__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-segmented__option:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-back-top:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-carousel__nav:focus-visible,.wr-carousel__dot:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-speed-dial__trigger:focus-visible,.wr-speed-dial__action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-stepper__header:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-window__chrome-action:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-date-picker__trigger:focus-visible,.wr-time-picker__step:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-dropdown-item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-alert__close:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list{display:block}.wr-sortable-list__list{display:flex;flex-direction:column;gap:var(--wr-sortable-list-gap, .5rem)}.wr-sortable-list__item{cursor:grab;-webkit-user-select:none;user-select:none;transition:box-shadow .18s ease}.wr-sortable-list__item.cdk-drag-disabled{cursor:default}.wr-sortable-list__item:active{cursor:grabbing}.wr-sortable-list__item:focus-visible{outline:var(--wr-focus-ring-width) solid var(--wr-focus-ring-color);outline-offset:var(--wr-focus-ring-offset);box-shadow:0 0 0 var(--wr-focus-ring-offset) var(--wr-focus-ring-halo)}.wr-sortable-list__item--grabbed{cursor:grabbing;box-shadow:0 6px 12px rgba(var(--wr-color-backdrop-rgb),.22)}.wr-sortable-list__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wr-sortable-list[orientation=horizontal] .wr-sortable-list__list,.wr-sortable-list[data-orientation=horizontal] .wr-sortable-list__list{flex-direction:row}.wr-drag-handle{cursor:grab;display:inline-flex;align-items:center;justify-content:center;color:rgba(var(--wr-color-on-surface-rgb),.45);transition:color .15s ease}@media(pointer:coarse){.wr-drag-handle{position:relative}.wr-drag-handle:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;min-width:44px;min-height:44px;transform:translate(-50%,-50%)}}.wr-drag-handle:hover{color:var(--wr-color-on-surface)}.wr-drag-handle:active{cursor:grabbing}.cdk-drag-preview.wr-sortable-list__item{box-sizing:border-box;color:var(--wr-color-on-surface);font-family:var(--wr-font-family-base);transition:none;filter:drop-shadow(0 8px 12px rgba(var(--wr-color-backdrop-rgb),.24)) drop-shadow(0 2px 3px rgba(var(--wr-color-backdrop-rgb),.16))}.wr-sortable-list .cdk-drag-placeholder{opacity:.35;background:var(--wr-color-fill-strong);border-radius:var(--wr-border-radius-base);outline:1px dashed rgba(var(--wr-color-on-surface-rgb),.25);outline-offset:-1px}.cdk-drag-animating.wr-sortable-list__item{transition:transform .18s var(--wr-ease-spring)}.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder){transition:transform .18s var(--wr-ease-spring)}\n"] }]
262
262
  }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }, { type: i0.Output, args: ["itemsChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], lockAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAxis", required: false }] }], dragStartDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragStartDelay", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], reorder: [{ type: i0.Output, args: ["reorder"] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], rowEls: [{ type: i0.ViewChildren, args: ['row', { isSignal: true }] }] } });
263
263
 
264
264
  /**