ng-primitives 0.120.4 → 0.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +34 -51
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +68 -121
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +91 -115
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +35 -51
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +39 -35
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +85 -151
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +209 -223
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +88 -59
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +720 -620
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +30 -23
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
- package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
- package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
- package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
- package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
- package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
- package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
- package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
- package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
- package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
- package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
- package/types/ng-primitives-select.d.ts +687 -0
- package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
- package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
- package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
- package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
- package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/select/index.d.ts +0 -396
- package/tooltip/index.d.ts +0 -384
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -14,7 +14,7 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
14
14
|
return parentGroup;
|
|
15
15
|
}
|
|
16
16
|
const directionality = inject(Directionality);
|
|
17
|
-
const items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
17
|
+
const items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
18
18
|
const orientation = controlled(_orientation);
|
|
19
19
|
/**
|
|
20
20
|
* Get the items in the roving focus group sorted by order.
|
|
@@ -31,7 +31,7 @@ const [NgpRovingFocusGroupStateToken, ngpRovingFocusGroup, injectRovingFocusGrou
|
|
|
31
31
|
/**
|
|
32
32
|
* Store the active item in the roving focus group.
|
|
33
33
|
*/
|
|
34
|
-
const activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : []));
|
|
34
|
+
const activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
35
35
|
/**
|
|
36
36
|
* Activate an item in the roving focus group.
|
|
37
37
|
* @param item The item to activate
|
|
@@ -265,38 +265,27 @@ class NgpRovingFocusGroup {
|
|
|
265
265
|
* Determine the orientation of the roving focus group.
|
|
266
266
|
* @default 'vertical'
|
|
267
267
|
*/
|
|
268
|
-
this.orientation = input('vertical', ...(ngDevMode ?
|
|
269
|
-
alias: 'ngpRovingFocusGroupOrientation',
|
|
270
|
-
}]));
|
|
268
|
+
this.orientation = input('vertical', { ...(ngDevMode ? { debugName: "orientation" } : /* istanbul ignore next */ {}), alias: 'ngpRovingFocusGroupOrientation' });
|
|
271
269
|
/**
|
|
272
270
|
* Determine if focus should wrap when the end or beginning is reached.
|
|
273
271
|
*/
|
|
274
|
-
this.wrap = input(true, ...(ngDevMode ?
|
|
275
|
-
|
|
276
|
-
alias: 'ngpRovingFocusGroupWrap',
|
|
277
|
-
transform: booleanAttribute,
|
|
278
|
-
}]));
|
|
272
|
+
this.wrap = input(true, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), alias: 'ngpRovingFocusGroupWrap',
|
|
273
|
+
transform: booleanAttribute });
|
|
279
274
|
/**
|
|
280
275
|
* Determine if the home and end keys should navigate to the first and last items.
|
|
281
276
|
*/
|
|
282
|
-
this.homeEnd = input(true, ...(ngDevMode ?
|
|
283
|
-
|
|
284
|
-
alias: 'ngpRovingFocusGroupHomeEnd',
|
|
285
|
-
transform: booleanAttribute,
|
|
286
|
-
}]));
|
|
277
|
+
this.homeEnd = input(true, { ...(ngDevMode ? { debugName: "homeEnd" } : /* istanbul ignore next */ {}), alias: 'ngpRovingFocusGroupHomeEnd',
|
|
278
|
+
transform: booleanAttribute });
|
|
287
279
|
/**
|
|
288
280
|
* Determine if the roving focus group is disabled.
|
|
289
281
|
*/
|
|
290
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
291
|
-
|
|
292
|
-
alias: 'ngpRovingFocusGroupDisabled',
|
|
293
|
-
transform: booleanAttribute,
|
|
294
|
-
}]));
|
|
282
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpRovingFocusGroupDisabled',
|
|
283
|
+
transform: booleanAttribute });
|
|
295
284
|
/**
|
|
296
285
|
* Store the active item in the roving focus group.
|
|
297
286
|
* @internal
|
|
298
287
|
*/
|
|
299
|
-
this.activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : []));
|
|
288
|
+
this.activeItem = signal(null, ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
300
289
|
/**
|
|
301
290
|
* The state of the roving focus group.
|
|
302
291
|
*/
|
|
@@ -317,13 +306,13 @@ class NgpRovingFocusGroup {
|
|
|
317
306
|
this.state.setActiveItem(item.id(), origin);
|
|
318
307
|
}
|
|
319
308
|
}
|
|
320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
321
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpRovingFocusGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
310
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpRovingFocusGroup, isStandalone: true, selector: "[ngpRovingFocusGroup]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpRovingFocusGroupOrientation", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "ngpRovingFocusGroupWrap", isSignal: true, isRequired: false, transformFunction: null }, homeEnd: { classPropertyName: "homeEnd", publicName: "ngpRovingFocusGroupHomeEnd", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRovingFocusGroupDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
322
311
|
provideRovingFocusGroup(NgpRovingFocusGroup),
|
|
323
312
|
provideRovingFocusGroupState({ inherit: true }),
|
|
324
313
|
], exportAs: ["ngpRovingFocusGroup"], ngImport: i0 }); }
|
|
325
314
|
}
|
|
326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpRovingFocusGroup, decorators: [{
|
|
327
316
|
type: Directive,
|
|
328
317
|
args: [{
|
|
329
318
|
selector: '[ngpRovingFocusGroup]',
|
|
@@ -344,7 +333,7 @@ const [NgpRovingFocusItemStateToken, ngpRovingFocusItem, injectRovingFocusItemSt
|
|
|
344
333
|
/**
|
|
345
334
|
* Derive the tabindex of the roving focus item.
|
|
346
335
|
*/
|
|
347
|
-
const tabindex = computed(() => !group()?.disabled() && group()?.activeItem() === id ? 0 : -1, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
336
|
+
const tabindex = computed(() => !group()?.disabled() && group()?.activeItem() === id ? 0 : -1, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
348
337
|
// Setup host attribute bindings
|
|
349
338
|
attrBinding(element, 'tabindex', () => tabindex().toString());
|
|
350
339
|
// Setup keyboard event listener
|
|
@@ -392,22 +381,19 @@ class NgpRovingFocusItem {
|
|
|
392
381
|
/**
|
|
393
382
|
* Define if the item is disabled.
|
|
394
383
|
*/
|
|
395
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
396
|
-
|
|
397
|
-
alias: 'ngpRovingFocusItemDisabled',
|
|
398
|
-
transform: booleanAttribute,
|
|
399
|
-
}]));
|
|
384
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpRovingFocusItemDisabled',
|
|
385
|
+
transform: booleanAttribute });
|
|
400
386
|
this.state = ngpRovingFocusItem({ disabled: this.disabled });
|
|
401
387
|
/**
|
|
402
388
|
* Expose the internal id of the roving focus item.
|
|
403
389
|
* @internal
|
|
404
390
|
*/
|
|
405
|
-
this.id = computed(() => this.state.id(), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
391
|
+
this.id = computed(() => this.state.id(), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
406
392
|
}
|
|
407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
408
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpRovingFocusItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
394
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpRovingFocusItem, isStandalone: true, selector: "[ngpRovingFocusItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpRovingFocusItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideRovingFocusItemState()], exportAs: ["ngpRovingFocusItem"], ngImport: i0 }); }
|
|
409
395
|
}
|
|
410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpRovingFocusItem, decorators: [{
|
|
411
397
|
type: Directive,
|
|
412
398
|
args: [{
|
|
413
399
|
selector: '[ngpRovingFocusItem]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-state.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item-state.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.ts"],"sourcesContent":["import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { inject, signal, Signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { controlled, createPrimitive, injectInheritedState } from 'ng-primitives/state';\nimport type { NgpRovingFocusItemState } from '../roving-focus-item/roving-focus-item-state';\n\nexport interface NgpRovingFocusGroupState {\n /**\n * The orientation of the roving focus group.\n */\n readonly orientation: Signal<NgpOrientation>;\n /**\n * Whether the roving focus group should wrap around.\n */\n readonly wrap: Signal<boolean>;\n /**\n * Whether the Home and End keys are enabled.\n */\n readonly homeEnd: Signal<boolean>;\n /**\n * Whether the roving focus group is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * The id of the currently active item.\n */\n readonly activeItem: Signal<string | null>;\n /**\n * Handle keyboard navigation.\n * @param event The keyboard event\n */\n onKeydown(event: KeyboardEvent): void;\n /**\n * Set the active item by id.\n * @param id The id of the item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(id: string | null, origin?: FocusOrigin): void;\n /**\n * Register an item with the roving focus group.\n * @param item The item to register\n */\n register(item: NgpRovingFocusItemState): void;\n /**\n * Unregister an item from the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n unregister(item: NgpRovingFocusItemState): void;\n /**\n * Set the orientation of the roving focus group.\n * @param orientation The orientation value\n */\n setOrientation(orientation: NgpOrientation): void;\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n activateFirst(origin?: FocusOrigin): void;\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n activateLast(origin?: FocusOrigin): void;\n}\n\nexport interface NgpRovingFocusGroupProps {\n /**\n * The orientation of the roving focus group.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the roving focus group should wrap around.\n */\n readonly wrap?: Signal<boolean>;\n /**\n * Whether the Home and End keys are enabled.\n */\n readonly homeEnd?: Signal<boolean>;\n /**\n * Whether the roving focus group is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Whether to inherit state from a parent roving focus group.\n */\n readonly inherit?: boolean;\n}\n\nexport const [\n NgpRovingFocusGroupStateToken,\n ngpRovingFocusGroup,\n injectRovingFocusGroupState,\n provideRovingFocusGroupState,\n] = createPrimitive(\n 'NgpRovingFocusGroup',\n ({\n orientation: _orientation = signal('vertical'),\n wrap = signal(false),\n homeEnd = signal(true),\n disabled = signal(false),\n inherit = true,\n }: NgpRovingFocusGroupProps): NgpRovingFocusGroupState => {\n const parentGroup = inherit\n ? injectInheritedState(() => NgpRovingFocusGroupStateToken)?.()\n : null;\n\n if (parentGroup) {\n return parentGroup;\n }\n\n const directionality = inject(Directionality);\n const items = signal<NgpRovingFocusItemState[]>([]);\n const orientation = controlled(_orientation);\n\n /**\n * Get the items in the roving focus group sorted by order.\n */\n function getSortedItems() {\n return items().sort((a, b) => {\n // sort the items by their position in the document\n return a.element.nativeElement.compareDocumentPosition(b.element.nativeElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n }\n\n /**\n * Store the active item in the roving focus group.\n */\n const activeItem = signal<string | null>(null);\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n function setActiveItem(id: string | null, origin: FocusOrigin = 'program'): void {\n activeItem.set(id);\n const item = items().find(i => i.id() === id) ?? null;\n\n if (item) {\n item.focus(origin);\n }\n }\n\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateFirstItem(origin: FocusOrigin): void {\n // find the first item that is not disabled\n const item = getSortedItems().find(i => !i.disabled()) ?? null;\n\n // set the first item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateLastItem(origin: FocusOrigin): void {\n // find the last item that is not disabled\n const item = [...getSortedItems()].reverse().find(i => !i.disabled()) ?? null;\n\n // set the last item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the next item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateNextItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the first item\n if (!currentActiveItem) {\n activateFirstItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the next item that is not disabled\n const item = sortedItems.slice(index + 1).find(i => !i.disabled()) ?? null;\n\n // if we are at the end of the list, wrap to the beginning\n if (!item && wrap()) {\n activateFirstItem(origin);\n return;\n }\n\n // if there is no next item, do nothing\n if (!item) {\n return;\n }\n\n // set the next item as the active item\n setActiveItem(item.id(), origin);\n }\n\n /**\n * Activate the previous item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activatePreviousItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the last item\n if (!currentActiveItem) {\n activateLastItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the previous item that is not disabled\n const item =\n sortedItems\n .slice(0, index)\n .reverse()\n .find(i => !i.disabled()) ?? null;\n\n // if we are at the beginning of the list, wrap to the end\n if (!item && wrap()) {\n activateLastItem(origin);\n return;\n }\n\n // if there is no previous item, do nothing\n if (!item) {\n return;\n }\n\n // set the previous item as the active item\n setActiveItem(item.id(), origin);\n }\n\n /**\n * Handle keyboard navigation for the roving focus group.\n * @param event The keyboard event\n */\n function onKeydown(event: KeyboardEvent): void {\n if (disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activatePreviousItem('keyboard');\n } else {\n activateNextItem('keyboard');\n }\n }\n break;\n case 'ArrowRight':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activateNextItem('keyboard');\n } else {\n activatePreviousItem('keyboard');\n }\n }\n break;\n case 'Home':\n if (homeEnd()) {\n event.preventDefault();\n activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (homeEnd()) {\n event.preventDefault();\n activateLastItem('keyboard');\n }\n break;\n }\n }\n\n function register(item: NgpRovingFocusItemState): void {\n items.update(items => [...items, item]);\n\n // if there is no active item, make the first item the tabbable item\n if (!activeItem()) {\n activeItem.set(item.id());\n }\n }\n\n /**\n * Unregister an item with the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n function unregister(item: NgpRovingFocusItemState): void {\n items.update(items => items.filter(i => i !== item));\n\n // check if the unregistered item is the active item\n if (activeItem() === item.id()) {\n // if the active item is unregistered, activate the first item\n activeItem.set(items()[0]?.id() ?? null);\n }\n }\n\n /**\n * Set the orientation of the roving focus group.\n * @param value The orientation value\n */\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n return {\n orientation: orientation.asReadonly(),\n wrap,\n homeEnd,\n disabled,\n activeItem,\n setActiveItem,\n setOrientation,\n onKeydown,\n register,\n unregister,\n activateFirst: activateFirstItem,\n activateLast: activateLastItem,\n } satisfies NgpRovingFocusGroupState;\n },\n);\n","import { FactoryProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { NgpRovingFocusGroup } from './roving-focus-group';\n\nexport const NgpRovingFocusGroupToken = new InjectionToken<NgpRovingFocusGroup>(\n 'NgpRovingFocusGroupToken',\n);\n\n/**\n * Inject the RovingFocusGroup directive instance\n * @returns The RovingFocusGroup directive instance\n */\nexport function injectRovingFocusGroup(): NgpRovingFocusGroup {\n return inject(NgpRovingFocusGroupToken);\n}\n\nexport interface NgpRovingFocusGroupOptions {\n /**\n * Whether we should inherit the focus group from the parent\n * @default true\n */\n inherit?: boolean;\n}\n\n/**\n * Provide the RovingFocusGroup directive instance\n * @param type The RovingFocusGroup directive type\n * @returns The RovingFocusGroup token\n */\nexport function provideRovingFocusGroup(\n type: Type<NgpRovingFocusGroup>,\n { inherit = true }: NgpRovingFocusGroupOptions = {},\n): FactoryProvider {\n return {\n provide: NgpRovingFocusGroupToken,\n // Roving focus groups may be nested, in this case, the parent group should be used\n useFactory: () => {\n if (!inherit) {\n return inject(type, { self: true });\n }\n\n // If the parent group is not found, return the current group\n // This is useful for nested groups\n return (\n inject(NgpRovingFocusGroupToken, { skipSelf: true, optional: true }) ??\n inject(type, { self: true })\n );\n },\n };\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from './roving-focus-group-state';\nimport { provideRovingFocusGroup } from './roving-focus-group-token';\n\n/**\n * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.\n */\n@Directive({\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [\n provideRovingFocusGroup(NgpRovingFocusGroup),\n provideRovingFocusGroupState({ inherit: true }),\n ],\n})\nexport class NgpRovingFocusGroup {\n /**\n * Determine the orientation of the roving focus group.\n * @default 'vertical'\n */\n readonly orientation = input<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n */\n readonly wrap = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupWrap',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the home and end keys should navigate to the first and last items.\n */\n readonly homeEnd = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupHomeEnd',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the roving focus group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Store the active item in the roving focus group.\n * @internal\n */\n readonly activeItem = signal<NgpRovingFocusItem | null>(null);\n\n /**\n * The state of the roving focus group.\n */\n readonly state = ngpRovingFocusGroup({\n orientation: this.orientation,\n wrap: this.wrap,\n homeEnd: this.homeEnd,\n disabled: this.disabled,\n });\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(item: NgpRovingFocusItem | null, origin: FocusOrigin = 'program'): void {\n if (item) {\n this.state.setActiveItem(item.id(), origin);\n }\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, effect, ElementRef, inject, signal, Signal, untracked } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, listener } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectRovingFocusGroupState } from '../roving-focus-group/roving-focus-group-state';\n\n/**\n * The state interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemState {\n /**\n * The unique id of the roving focus item.\n */\n readonly id: Signal<string>;\n /**\n * Whether the item is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * The tabindex of the roving focus item.\n */\n readonly tabindex: Signal<number>;\n /**\n * The element reference of the roving focus item.\n */\n readonly element: ElementRef<HTMLElement>;\n /**\n * Focus the roving focus item.\n * @param origin The focus origin\n */\n focus(origin: FocusOrigin): void;\n}\n\n/**\n * The props interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemProps {\n /**\n * Whether the item is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [\n NgpRovingFocusItemStateToken,\n ngpRovingFocusItem,\n injectRovingFocusItemState,\n provideRovingFocusItemState,\n] = createPrimitive(\n 'NgpRovingFocusItem',\n ({ disabled = signal(false) }: NgpRovingFocusItemProps) => {\n const element = injectElementRef();\n const group = injectRovingFocusGroupState();\n const focusMonitor = inject(FocusMonitor);\n\n // genertate a unique id for the roving focus item - this is not a DOM id but an internal identifier\n const id = uniqueId('ngp-roving-focus-item');\n\n /**\n * Derive the tabindex of the roving focus item.\n */\n const tabindex = computed(() =>\n !group()?.disabled() && group()?.activeItem() === id ? 0 : -1,\n );\n\n // Setup host attribute bindings\n attrBinding(element, 'tabindex', () => tabindex().toString());\n\n // Setup keyboard event listener\n listener(element, 'keydown', (event: KeyboardEvent) => {\n if (disabled()) {\n return;\n }\n group()?.onKeydown(event);\n });\n\n // Setup click event listener\n listener(element, 'click', () => {\n if (disabled()) {\n return;\n }\n group()?.setActiveItem(id, 'mouse');\n });\n\n function focus(origin: FocusOrigin): void {\n focusMonitor.focusVia(element, origin);\n }\n\n const state: NgpRovingFocusItemState = {\n id: signal(id),\n disabled,\n tabindex,\n focus,\n element,\n };\n\n // Projected items may construct before the parent populates the shared group signal,\n // so register reactively once it becomes available.\n // See https://github.com/ng-primitives/ng-primitives/issues/735\n effect(onCleanup => {\n const groupState = group();\n if (!groupState) return;\n untracked(() => groupState.register(state));\n onCleanup(() => groupState.unregister(state));\n });\n\n return state satisfies NgpRovingFocusItemState;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from './roving-focus-item-state';\n\n/**\n * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.\n */\n@Directive({\n selector: '[ngpRovingFocusItem]',\n exportAs: 'ngpRovingFocusItem',\n providers: [provideRovingFocusItemState()],\n})\nexport class NgpRovingFocusItem {\n /**\n * Define if the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusItemDisabled',\n transform: booleanAttribute,\n });\n\n private readonly state = ngpRovingFocusItem({ disabled: this.disabled });\n\n /**\n * Expose the internal id of the roving focus item.\n * @internal\n */\n readonly id = computed(() => this.state.id());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0FO,MAAM,CACX,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,4BAA4B,EAC7B,GAAG,eAAe,CACjB,qBAAqB,EACrB,CAAC,EACC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,EAC9C,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EACpB,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EACtB,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,EACxB,OAAO,GAAG,IAAI,GACW,KAA8B;IACvD,MAAM,WAAW,GAAG;UAChB,oBAAoB,CAAC,MAAM,6BAA6B,CAAC;UACzD,IAAI;IAER,IAAI,WAAW,EAAE;AACf,QAAA,OAAO,WAAW;IACpB;AAEA,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,IAAA,MAAM,KAAK,GAAG,MAAM,CAA4B,EAAE,iDAAC;AACnD,IAAA,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5C;;AAEG;AACH,IAAA,SAAS,cAAc,GAAA;QACrB,O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AAA,EAAA,EAAA,EAAA,SAAA,EAFlB,CAAC,2BAA2B,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAE/B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,SAAS,EAAE,CAAC,2BAA2B,EAAE,CAAC;AAC3C,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-state.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item-state.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.ts"],"sourcesContent":["import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { inject, signal, Signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { controlled, createPrimitive, injectInheritedState } from 'ng-primitives/state';\nimport type { NgpRovingFocusItemState } from '../roving-focus-item/roving-focus-item-state';\n\nexport interface NgpRovingFocusGroupState {\n /**\n * The orientation of the roving focus group.\n */\n readonly orientation: Signal<NgpOrientation>;\n /**\n * Whether the roving focus group should wrap around.\n */\n readonly wrap: Signal<boolean>;\n /**\n * Whether the Home and End keys are enabled.\n */\n readonly homeEnd: Signal<boolean>;\n /**\n * Whether the roving focus group is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * The id of the currently active item.\n */\n readonly activeItem: Signal<string | null>;\n /**\n * Handle keyboard navigation.\n * @param event The keyboard event\n */\n onKeydown(event: KeyboardEvent): void;\n /**\n * Set the active item by id.\n * @param id The id of the item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(id: string | null, origin?: FocusOrigin): void;\n /**\n * Register an item with the roving focus group.\n * @param item The item to register\n */\n register(item: NgpRovingFocusItemState): void;\n /**\n * Unregister an item from the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n unregister(item: NgpRovingFocusItemState): void;\n /**\n * Set the orientation of the roving focus group.\n * @param orientation The orientation value\n */\n setOrientation(orientation: NgpOrientation): void;\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n activateFirst(origin?: FocusOrigin): void;\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n activateLast(origin?: FocusOrigin): void;\n}\n\nexport interface NgpRovingFocusGroupProps {\n /**\n * The orientation of the roving focus group.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the roving focus group should wrap around.\n */\n readonly wrap?: Signal<boolean>;\n /**\n * Whether the Home and End keys are enabled.\n */\n readonly homeEnd?: Signal<boolean>;\n /**\n * Whether the roving focus group is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Whether to inherit state from a parent roving focus group.\n */\n readonly inherit?: boolean;\n}\n\nexport const [\n NgpRovingFocusGroupStateToken,\n ngpRovingFocusGroup,\n injectRovingFocusGroupState,\n provideRovingFocusGroupState,\n] = createPrimitive(\n 'NgpRovingFocusGroup',\n ({\n orientation: _orientation = signal('vertical'),\n wrap = signal(false),\n homeEnd = signal(true),\n disabled = signal(false),\n inherit = true,\n }: NgpRovingFocusGroupProps): NgpRovingFocusGroupState => {\n const parentGroup = inherit\n ? injectInheritedState(() => NgpRovingFocusGroupStateToken)?.()\n : null;\n\n if (parentGroup) {\n return parentGroup;\n }\n\n const directionality = inject(Directionality);\n const items = signal<NgpRovingFocusItemState[]>([]);\n const orientation = controlled(_orientation);\n\n /**\n * Get the items in the roving focus group sorted by order.\n */\n function getSortedItems() {\n return items().sort((a, b) => {\n // sort the items by their position in the document\n return a.element.nativeElement.compareDocumentPosition(b.element.nativeElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n }\n\n /**\n * Store the active item in the roving focus group.\n */\n const activeItem = signal<string | null>(null);\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n function setActiveItem(id: string | null, origin: FocusOrigin = 'program'): void {\n activeItem.set(id);\n const item = items().find(i => i.id() === id) ?? null;\n\n if (item) {\n item.focus(origin);\n }\n }\n\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateFirstItem(origin: FocusOrigin): void {\n // find the first item that is not disabled\n const item = getSortedItems().find(i => !i.disabled()) ?? null;\n\n // set the first item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateLastItem(origin: FocusOrigin): void {\n // find the last item that is not disabled\n const item = [...getSortedItems()].reverse().find(i => !i.disabled()) ?? null;\n\n // set the last item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the next item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateNextItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the first item\n if (!currentActiveItem) {\n activateFirstItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the next item that is not disabled\n const item = sortedItems.slice(index + 1).find(i => !i.disabled()) ?? null;\n\n // if we are at the end of the list, wrap to the beginning\n if (!item && wrap()) {\n activateFirstItem(origin);\n return;\n }\n\n // if there is no next item, do nothing\n if (!item) {\n return;\n }\n\n // set the next item as the active item\n setActiveItem(item.id(), origin);\n }\n\n /**\n * Activate the previous item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activatePreviousItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the last item\n if (!currentActiveItem) {\n activateLastItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the previous item that is not disabled\n const item =\n sortedItems\n .slice(0, index)\n .reverse()\n .find(i => !i.disabled()) ?? null;\n\n // if we are at the beginning of the list, wrap to the end\n if (!item && wrap()) {\n activateLastItem(origin);\n return;\n }\n\n // if there is no previous item, do nothing\n if (!item) {\n return;\n }\n\n // set the previous item as the active item\n setActiveItem(item.id(), origin);\n }\n\n /**\n * Handle keyboard navigation for the roving focus group.\n * @param event The keyboard event\n */\n function onKeydown(event: KeyboardEvent): void {\n if (disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activatePreviousItem('keyboard');\n } else {\n activateNextItem('keyboard');\n }\n }\n break;\n case 'ArrowRight':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activateNextItem('keyboard');\n } else {\n activatePreviousItem('keyboard');\n }\n }\n break;\n case 'Home':\n if (homeEnd()) {\n event.preventDefault();\n activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (homeEnd()) {\n event.preventDefault();\n activateLastItem('keyboard');\n }\n break;\n }\n }\n\n function register(item: NgpRovingFocusItemState): void {\n items.update(items => [...items, item]);\n\n // if there is no active item, make the first item the tabbable item\n if (!activeItem()) {\n activeItem.set(item.id());\n }\n }\n\n /**\n * Unregister an item with the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n function unregister(item: NgpRovingFocusItemState): void {\n items.update(items => items.filter(i => i !== item));\n\n // check if the unregistered item is the active item\n if (activeItem() === item.id()) {\n // if the active item is unregistered, activate the first item\n activeItem.set(items()[0]?.id() ?? null);\n }\n }\n\n /**\n * Set the orientation of the roving focus group.\n * @param value The orientation value\n */\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n return {\n orientation: orientation.asReadonly(),\n wrap,\n homeEnd,\n disabled,\n activeItem,\n setActiveItem,\n setOrientation,\n onKeydown,\n register,\n unregister,\n activateFirst: activateFirstItem,\n activateLast: activateLastItem,\n } satisfies NgpRovingFocusGroupState;\n },\n);\n","import { FactoryProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { NgpRovingFocusGroup } from './roving-focus-group';\n\nexport const NgpRovingFocusGroupToken = new InjectionToken<NgpRovingFocusGroup>(\n 'NgpRovingFocusGroupToken',\n);\n\n/**\n * Inject the RovingFocusGroup directive instance\n * @returns The RovingFocusGroup directive instance\n */\nexport function injectRovingFocusGroup(): NgpRovingFocusGroup {\n return inject(NgpRovingFocusGroupToken);\n}\n\nexport interface NgpRovingFocusGroupOptions {\n /**\n * Whether we should inherit the focus group from the parent\n * @default true\n */\n inherit?: boolean;\n}\n\n/**\n * Provide the RovingFocusGroup directive instance\n * @param type The RovingFocusGroup directive type\n * @returns The RovingFocusGroup token\n */\nexport function provideRovingFocusGroup(\n type: Type<NgpRovingFocusGroup>,\n { inherit = true }: NgpRovingFocusGroupOptions = {},\n): FactoryProvider {\n return {\n provide: NgpRovingFocusGroupToken,\n // Roving focus groups may be nested, in this case, the parent group should be used\n useFactory: () => {\n if (!inherit) {\n return inject(type, { self: true });\n }\n\n // If the parent group is not found, return the current group\n // This is useful for nested groups\n return (\n inject(NgpRovingFocusGroupToken, { skipSelf: true, optional: true }) ??\n inject(type, { self: true })\n );\n },\n };\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from './roving-focus-group-state';\nimport { provideRovingFocusGroup } from './roving-focus-group-token';\n\n/**\n * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.\n */\n@Directive({\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [\n provideRovingFocusGroup(NgpRovingFocusGroup),\n provideRovingFocusGroupState({ inherit: true }),\n ],\n})\nexport class NgpRovingFocusGroup {\n /**\n * Determine the orientation of the roving focus group.\n * @default 'vertical'\n */\n readonly orientation = input<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n */\n readonly wrap = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupWrap',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the home and end keys should navigate to the first and last items.\n */\n readonly homeEnd = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupHomeEnd',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the roving focus group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Store the active item in the roving focus group.\n * @internal\n */\n readonly activeItem = signal<NgpRovingFocusItem | null>(null);\n\n /**\n * The state of the roving focus group.\n */\n readonly state = ngpRovingFocusGroup({\n orientation: this.orientation,\n wrap: this.wrap,\n homeEnd: this.homeEnd,\n disabled: this.disabled,\n });\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(item: NgpRovingFocusItem | null, origin: FocusOrigin = 'program'): void {\n if (item) {\n this.state.setActiveItem(item.id(), origin);\n }\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, effect, ElementRef, inject, signal, Signal, untracked } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, listener } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectRovingFocusGroupState } from '../roving-focus-group/roving-focus-group-state';\n\n/**\n * The state interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemState {\n /**\n * The unique id of the roving focus item.\n */\n readonly id: Signal<string>;\n /**\n * Whether the item is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * The tabindex of the roving focus item.\n */\n readonly tabindex: Signal<number>;\n /**\n * The element reference of the roving focus item.\n */\n readonly element: ElementRef<HTMLElement>;\n /**\n * Focus the roving focus item.\n * @param origin The focus origin\n */\n focus(origin: FocusOrigin): void;\n}\n\n/**\n * The props interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemProps {\n /**\n * Whether the item is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [\n NgpRovingFocusItemStateToken,\n ngpRovingFocusItem,\n injectRovingFocusItemState,\n provideRovingFocusItemState,\n] = createPrimitive(\n 'NgpRovingFocusItem',\n ({ disabled = signal(false) }: NgpRovingFocusItemProps) => {\n const element = injectElementRef();\n const group = injectRovingFocusGroupState();\n const focusMonitor = inject(FocusMonitor);\n\n // genertate a unique id for the roving focus item - this is not a DOM id but an internal identifier\n const id = uniqueId('ngp-roving-focus-item');\n\n /**\n * Derive the tabindex of the roving focus item.\n */\n const tabindex = computed(() =>\n !group()?.disabled() && group()?.activeItem() === id ? 0 : -1,\n );\n\n // Setup host attribute bindings\n attrBinding(element, 'tabindex', () => tabindex().toString());\n\n // Setup keyboard event listener\n listener(element, 'keydown', (event: KeyboardEvent) => {\n if (disabled()) {\n return;\n }\n group()?.onKeydown(event);\n });\n\n // Setup click event listener\n listener(element, 'click', () => {\n if (disabled()) {\n return;\n }\n group()?.setActiveItem(id, 'mouse');\n });\n\n function focus(origin: FocusOrigin): void {\n focusMonitor.focusVia(element, origin);\n }\n\n const state: NgpRovingFocusItemState = {\n id: signal(id),\n disabled,\n tabindex,\n focus,\n element,\n };\n\n // Projected items may construct before the parent populates the shared group signal,\n // so register reactively once it becomes available.\n // See https://github.com/ng-primitives/ng-primitives/issues/735\n effect(onCleanup => {\n const groupState = group();\n if (!groupState) return;\n untracked(() => groupState.register(state));\n onCleanup(() => groupState.unregister(state));\n });\n\n return state satisfies NgpRovingFocusItemState;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from './roving-focus-item-state';\n\n/**\n * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.\n */\n@Directive({\n selector: '[ngpRovingFocusItem]',\n exportAs: 'ngpRovingFocusItem',\n providers: [provideRovingFocusItemState()],\n})\nexport class NgpRovingFocusItem {\n /**\n * Define if the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusItemDisabled',\n transform: booleanAttribute,\n });\n\n private readonly state = ngpRovingFocusItem({ disabled: this.disabled });\n\n /**\n * Expose the internal id of the roving focus item.\n * @internal\n */\n readonly id = computed(() => this.state.id());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0FO,MAAM,CACX,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,4BAA4B,EAC7B,GAAG,eAAe,CACjB,qBAAqB,EACrB,CAAC,EACC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,EAC9C,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EACpB,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EACtB,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,EACxB,OAAO,GAAG,IAAI,GACW,KAA8B;IACvD,MAAM,WAAW,GAAG;UAChB,oBAAoB,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A,EAAA,EAAA,CAAA,CAAA;;4FAE/B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,SAAS,EAAE,CAAC,2BAA2B,EAAE,CAAC;AAC3C,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -37,10 +37,10 @@ class NgpSearchClear {
|
|
|
37
37
|
clear() {
|
|
38
38
|
this.search().clear();
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpSearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
41
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpSearchClear, isStandalone: true, selector: "[ngpSearchClear]", host: { listeners: { "click": "clear()" }, properties: { "tabindex": "-1", "attr.data-empty": "search().empty() ? \"\" : null" } }, exportAs: ["ngpSearchClear"], ngImport: i0 }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpSearchClear, decorators: [{
|
|
44
44
|
type: Directive,
|
|
45
45
|
args: [{
|
|
46
46
|
selector: '[ngpSearchClear]',
|
|
@@ -67,16 +67,16 @@ class NgpSearch {
|
|
|
67
67
|
/**
|
|
68
68
|
* The input field.
|
|
69
69
|
*/
|
|
70
|
-
this.input = signal(null, ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
70
|
+
this.input = signal(null, ...(ngDevMode ? [{ debugName: "input" }] : /* istanbul ignore next */ []));
|
|
71
71
|
/**
|
|
72
72
|
* The value of the input.
|
|
73
73
|
*/
|
|
74
|
-
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
74
|
+
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
75
75
|
/**
|
|
76
76
|
* Whether the input field is empty.
|
|
77
77
|
* @internal
|
|
78
78
|
*/
|
|
79
|
-
this.empty = computed(() => this.value() === '', ...(ngDevMode ? [{ debugName: "empty" }] : []));
|
|
79
|
+
this.empty = computed(() => this.value() === '', ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
|
|
80
80
|
/**
|
|
81
81
|
* The search field state.
|
|
82
82
|
*/
|
|
@@ -102,10 +102,10 @@ class NgpSearch {
|
|
|
102
102
|
.pipe(safeTakeUntilDestroyed(this.destroyRef))
|
|
103
103
|
.subscribe(() => this.value.set(input.value));
|
|
104
104
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
106
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
106
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpSearch, isStandalone: true, selector: "[ngpSearch]", host: { listeners: { "keydown.escape": "clear()" }, properties: { "attr.data-empty": "empty() ? \"\" : null" } }, providers: [provideSearchState()], exportAs: ["ngpSearch"], ngImport: i0 }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpSearch, decorators: [{
|
|
109
109
|
type: Directive,
|
|
110
110
|
args: [{
|
|
111
111
|
selector: '[ngpSearch]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search/search-state.ts","../../../../packages/ng-primitives/search/src/search-clear/search-clear.ts","../../../../packages/ng-primitives/search/src/search/search.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSearch } from './search';\n\n/**\n * The state token for the Search primitive.\n */\nexport const NgpSearchStateToken = createStateToken<NgpSearch>('Search');\n\n/**\n * Provides the Search state.\n */\nexport const provideSearchState = createStateProvider(NgpSearchStateToken);\n\n/**\n * Injects the Search state.\n */\nexport const injectSearchState = createStateInjector<NgpSearch>(NgpSearchStateToken);\n\n/**\n * The Search state registration function.\n */\nexport const searchState = createState(NgpSearchStateToken);\n","import { Directive, HostListener } from '@angular/core';\nimport { injectSearchState } from '../search/search-state';\n\n/**\n * The `NgpSearchClear` directive is can be added to a button to clear the search field on click.\n */\n@Directive({\n selector: '[ngpSearchClear]',\n exportAs: 'ngpSearchClear',\n host: {\n '[tabindex]': '-1',\n '[attr.data-empty]': 'search().empty() ? \"\" : null',\n },\n})\nexport class NgpSearchClear {\n /**\n * Access the Search instance.\n */\n protected readonly search = injectSearchState();\n\n /**\n * Clear the input field.\n */\n @HostListener('click')\n protected clear(): void {\n this.search().clear();\n }\n}\n","import { computed, DestroyRef, Directive, HostListener, inject, signal } from '@angular/core';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { fromEvent } from 'rxjs';\nimport { provideSearchState, searchState } from './search-state';\n\n/**\n * The `NgpSearch` directive is a container for the search field components.\n */\n@Directive({\n selector: '[ngpSearch]',\n exportAs: 'ngpSearch',\n providers: [provideSearchState()],\n host: {\n '[attr.data-empty]': 'empty() ? \"\" : null',\n },\n})\nexport class NgpSearch {\n /**\n * The destroy reference.\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * The input field.\n */\n private readonly input = signal<HTMLInputElement | null>(null);\n\n /**\n * The value of the input.\n */\n private readonly value = signal<string>('');\n\n /**\n * Whether the input field is empty.\n * @internal\n */\n readonly empty = computed(() => this.value() === '');\n\n /**\n * The search field state.\n */\n protected readonly state = searchState<NgpSearch>(this);\n\n @HostListener('keydown.escape')\n clear(): void {\n const input = this.input();\n\n if (!input) {\n return;\n }\n\n input.value = '';\n input.dispatchEvent(new Event('input', { bubbles: true }));\n }\n\n /**\n * Register the input field.\n * @param input The input field.\n * @internal\n */\n registerInput(input: HTMLInputElement): void {\n this.input.set(input);\n this.value.set(input.value);\n\n fromEvent(input, 'input')\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.value.set(input.value));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MASU,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;AASE;;AAEG;QACgB,IAAA,CAAA,MAAM,GAAG,iBAAiB,EAAE;AAShD,IAAA;AAPC;;AAEG;IAEO,KAAK,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACvB
|
|
1
|
+
{"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search/search-state.ts","../../../../packages/ng-primitives/search/src/search-clear/search-clear.ts","../../../../packages/ng-primitives/search/src/search/search.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSearch } from './search';\n\n/**\n * The state token for the Search primitive.\n */\nexport const NgpSearchStateToken = createStateToken<NgpSearch>('Search');\n\n/**\n * Provides the Search state.\n */\nexport const provideSearchState = createStateProvider(NgpSearchStateToken);\n\n/**\n * Injects the Search state.\n */\nexport const injectSearchState = createStateInjector<NgpSearch>(NgpSearchStateToken);\n\n/**\n * The Search state registration function.\n */\nexport const searchState = createState(NgpSearchStateToken);\n","import { Directive, HostListener } from '@angular/core';\nimport { injectSearchState } from '../search/search-state';\n\n/**\n * The `NgpSearchClear` directive is can be added to a button to clear the search field on click.\n */\n@Directive({\n selector: '[ngpSearchClear]',\n exportAs: 'ngpSearchClear',\n host: {\n '[tabindex]': '-1',\n '[attr.data-empty]': 'search().empty() ? \"\" : null',\n },\n})\nexport class NgpSearchClear {\n /**\n * Access the Search instance.\n */\n protected readonly search = injectSearchState();\n\n /**\n * Clear the input field.\n */\n @HostListener('click')\n protected clear(): void {\n this.search().clear();\n }\n}\n","import { computed, DestroyRef, Directive, HostListener, inject, signal } from '@angular/core';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { fromEvent } from 'rxjs';\nimport { provideSearchState, searchState } from './search-state';\n\n/**\n * The `NgpSearch` directive is a container for the search field components.\n */\n@Directive({\n selector: '[ngpSearch]',\n exportAs: 'ngpSearch',\n providers: [provideSearchState()],\n host: {\n '[attr.data-empty]': 'empty() ? \"\" : null',\n },\n})\nexport class NgpSearch {\n /**\n * The destroy reference.\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * The input field.\n */\n private readonly input = signal<HTMLInputElement | null>(null);\n\n /**\n * The value of the input.\n */\n private readonly value = signal<string>('');\n\n /**\n * Whether the input field is empty.\n * @internal\n */\n readonly empty = computed(() => this.value() === '');\n\n /**\n * The search field state.\n */\n protected readonly state = searchState<NgpSearch>(this);\n\n @HostListener('keydown.escape')\n clear(): void {\n const input = this.input();\n\n if (!input) {\n return;\n }\n\n input.value = '';\n input.dispatchEvent(new Event('input', { bubbles: true }));\n }\n\n /**\n * Register the input field.\n * @param input The input field.\n * @internal\n */\n registerInput(input: HTMLInputElement): void {\n this.input.set(input);\n this.value.set(input.value);\n\n fromEvent(input, 'input')\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.value.set(input.value));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MASU,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;AASE;;AAEG;QACgB,IAAA,CAAA,MAAM,GAAG,iBAAiB,EAAE;AAShD,IAAA;AAPC;;AAEG;IAEO,KAAK,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACvB;+GAZW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,gCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,E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