@fundamental-ngx/cdk 0.43.17 → 0.43.19

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.
@@ -1,27 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Optional, Inject, isDevMode, inject, Directive, EventEmitter, Input, Output, HostListener, NgModule, ContentChildren, forwardRef, HostBinding, ElementRef, INJECTOR, ContentChild, NgZone, Renderer2, Self, SkipSelf, PLATFORM_ID, QueryList, ViewContainerRef, Component, Injector, NgModuleFactory, Pipe, TemplateRef, ViewChild } from '@angular/core';
2
+ import { InjectionToken, Injectable, Optional, Inject, isDevMode, inject, ElementRef, INJECTOR, Directive, EventEmitter, Input, Output, NgModule, ContentChildren, forwardRef, HostBinding, HostListener, ContentChild, NgZone, Renderer2, Self, SkipSelf, PLATFORM_ID, QueryList, ViewContainerRef, Component, Injector, NgModuleFactory, Pipe, TemplateRef, ViewChild } from '@angular/core';
3
3
  import { DOCUMENT, CommonModule, AsyncPipe } from '@angular/common';
4
- import * as i1$3 from 'rxjs';
5
- import { BehaviorSubject, Subject, ReplaySubject, Observable, fromEvent, NEVER, merge, firstValueFrom, Subscription, takeUntil as takeUntil$1, startWith as startWith$1, switchMap, combineLatest, filter as filter$1, isObservable, of, map as map$1, take as take$1 } from 'rxjs';
4
+ import { BehaviorSubject, Subject, ReplaySubject, Observable, fromEvent, NEVER, merge, switchMap, first, map as map$1, takeUntil as takeUntil$1, Subscription, startWith as startWith$1, combineLatest, firstValueFrom, filter as filter$1, isObservable, of, take as take$1 } from 'rxjs';
6
5
  import * as i2 from '@angular/platform-browser';
7
6
  import { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
8
7
  import * as i1 from '@angular/router';
9
8
  import { takeUntil, filter, distinctUntilChanged, startWith, map, tap, take, debounceTime, mapTo, pairwise, finalize, shareReplay, switchMap as switchMap$1, delay } from 'rxjs/operators';
10
9
  import { RIGHT_ARROW, DOWN_ARROW, LEFT_ARROW, UP_ARROW, SPACE, ESCAPE, DELETE, ENTER, MAC_ENTER, TAB, HOME, END, ALT, CONTROL, META, SHIFT, BACKSPACE, A, C, V, X, PAGE_UP, PAGE_DOWN, DASH, NUMPAD_MINUS, NUMPAD_ZERO, NUMPAD_ONE, NUMPAD_TWO, NUMPAD_THREE, NUMPAD_FOUR, NUMPAD_FIVE, NUMPAD_SIX, NUMPAD_SEVEN, NUMPAD_EIGHT, NUMPAD_NINE, F2, hasModifierKey } from '@angular/cdk/keycodes';
11
- import { coerceBooleanProperty, coerceElement, coerceNumberProperty, coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';
10
+ import { createFocusTrap } from 'focus-trap';
12
11
  import * as i1$1 from '@angular/cdk/a11y';
13
12
  import { FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';
14
- import { createFocusTrap } from 'focus-trap';
13
+ import { coerceElement, coerceBooleanProperty, coerceNumberProperty, coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';
15
14
  import * as i1$2 from '@angular/cdk/observers';
16
- import { TranslationResolver, FD_LANGUAGE } from '@fundamental-ngx/i18n';
17
- import * as i1$4 from '@angular/cdk/overlay';
15
+ import * as i1$3 from '@angular/cdk/overlay';
18
16
  import { ViewportRuler, OverlayConfig, OverlayContainer } from '@angular/cdk/overlay';
19
17
  import { get, findLastIndex } from 'lodash-es';
20
18
  import equal from 'fast-deep-equal';
21
19
  import { __decorate, __metadata } from 'tslib';
22
- import * as i1$5 from '@angular/cdk/drag-drop';
20
+ import * as i1$4 from '@angular/cdk/drag-drop';
23
21
  import { DragDrop, moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
24
- import * as i1$6 from '@angular/cdk/portal';
22
+ import * as i1$5 from '@angular/cdk/portal';
25
23
  import { DomPortal, ComponentPortal, TemplatePortal, PortalModule, BasePortalOutlet, CdkPortalOutlet } from '@angular/cdk/portal';
26
24
  import escape from 'lodash-es/escape';
27
25
  import { trigger, state, style, transition, animate } from '@angular/animations';
@@ -315,638 +313,172 @@ class DeprecatedSelector {
315
313
  }
316
314
  }
317
315
 
318
- /* eslint-disable @typescript-eslint/member-ordering */
319
- class DeprecatedAutoCompleteDirective extends DeprecatedSelector {
316
+ /** Determines whether provided value is valid content density */
317
+ function isValidContentDensity(size) {
318
+ return size === 'cozy' || size === 'compact' || size === 'condensed';
320
319
  }
321
- DeprecatedAutoCompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedAutoCompleteDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
322
- DeprecatedAutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedAutoCompleteDirective, isStandalone: true, selector: "[fdAutoComplete], [fd-auto-complete]", providers: [
323
- {
324
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
325
- useValue: getDeprecatedModel('[fdkAutoComplete]', '[fdAutoComplete], [fd-auto-complete]')
326
- }
327
- ], usesInheritance: true, ngImport: i0 });
328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedAutoCompleteDirective, decorators: [{
329
- type: Directive,
330
- args: [{
331
- // eslint-disable-next-line @angular-eslint/directive-selector
332
- selector: '[fdAutoComplete], [fd-auto-complete]',
333
- standalone: true,
334
- providers: [
335
- {
336
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
337
- useValue: getDeprecatedModel('[fdkAutoComplete]', '[fdAutoComplete], [fd-auto-complete]')
338
- }
339
- ]
340
- }]
341
- }] });
342
- class AutoCompleteDirective {
343
- /** @hidden */
344
- constructor(_elementRef) {
345
- this._elementRef = _elementRef;
346
- /** Whether the auto complete directive should be enabled */
347
- this.enable = true;
348
- /** Matcher function for testing the str for a search term */
349
- this.matcher = (str, searchTerm) => str.startsWith(searchTerm);
350
- /** Display function. Accepts an object of the same type as the
351
- * items passed to dropdownValues as argument, and outputs a string.
352
- * An arrow function can be used to access the *this* keyword in the calling component.
353
- * See search input examples for details. */
354
- this.displayFn = this._defaultDisplay;
355
- /** Event thrown, when the auto ahead text is accepted */
356
- this.onComplete = new EventEmitter();
357
- /** @hidden */
358
- this._completeKeys = [ENTER];
359
- /** @hidden */
360
- this._fillKeys = [LEFT_ARROW, RIGHT_ARROW];
361
- /** @hidden */
362
- this._stopKeys = [BACKSPACE, DELETE, ESCAPE];
363
- }
320
+ /**
321
+ * Determines if "compact" styles should be applied based on provided content density
322
+ */
323
+ function isCompactDensity(size) {
324
+ return isValidContentDensity(size) && size !== 'cozy';
325
+ }
326
+
327
+ const DEFAULT_CONTENT_DENSITY = 'cozy';
328
+ /**
329
+ * Service taking care of ContentDensity
330
+ */
331
+ class ContentDensityService {
364
332
  /** @hidden */
365
- handleKeyboardEvent(event) {
366
- if (this.enable) {
367
- if (KeyUtil.isKeyCode(event, this._stopKeys)) {
368
- this._elementRef.nativeElement.value = this.inputText;
369
- }
370
- else if (KeyUtil.isKeyCode(event, this._completeKeys)) {
371
- this._sendCompleteEvent(true);
372
- this._moveIndicatorToLastCharacter();
373
- }
374
- else if (KeyUtil.isKeyCode(event, this._fillKeys)) {
375
- this._sendCompleteEvent(false);
376
- }
377
- else if (!this._isControlKey(event) && this.inputText) {
378
- /** Prevention from triggering typeahead, when having crtl/cmd + keys */
379
- if (!this._triggerTypeAhead()) {
380
- return;
381
- }
382
- this.oldValue = this.inputText;
383
- const item = this.options.find((option) => this.matcher(this.displayFn(option).toLocaleLowerCase(), this.inputText.toLocaleLowerCase()));
384
- if (item) {
385
- this._typeahead(this.displayFn(item));
386
- }
387
- }
333
+ constructor() {
334
+ /** Content Density BehaviourSubject */
335
+ this.contentDensity = new BehaviorSubject(DEFAULT_CONTENT_DENSITY);
336
+ if (isDevMode()) {
337
+ console.warn(`[Deprecated] ContentDensityService is deprecated and will be removed in the next major version.
338
+ Please use ContentDensityControllerService instead, or use the ContentDensityModule forRoot method.`);
388
339
  }
389
- this.lastKeyUpEvent = event;
390
340
  }
391
341
  /** @hidden */
392
- _typeahead(displayedValue) {
393
- this._elementRef.nativeElement.value = displayedValue;
394
- const selectionStartIndex = this.inputText.length;
395
- this._elementRef.nativeElement.setSelectionRange(selectionStartIndex, displayedValue.length);
342
+ get _contentDensityListener() {
343
+ return this.contentDensity.pipe(distinctUntilChanged(), startWith(this.contentDensity.getValue()));
396
344
  }
397
345
  /** @hidden */
398
- _isControlKey(event) {
399
- return KeyUtil.isKeyCode(event, CONTROL) || event.ctrlKey;
346
+ get _isCompactDensity() {
347
+ return this._contentDensityListener.pipe(map((density) => isCompactDensity(density)));
400
348
  }
349
+ }
350
+ ContentDensityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
351
+ ContentDensityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService });
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService, decorators: [{
353
+ type: Injectable
354
+ }], ctorParameters: function () { return []; } });
355
+
356
+ class DestroyedService extends ReplaySubject {
401
357
  /** @hidden */
402
- _defaultDisplay(value) {
403
- return value;
358
+ constructor() {
359
+ super(1);
404
360
  }
405
361
  /** @hidden */
406
- _triggerTypeAhead() {
407
- if (this.lastKeyUpEvent &&
408
- KeyUtil.isKeyCode(this.lastKeyUpEvent, CONTROL) &&
409
- this.inputText === this.oldValue) {
410
- return false;
362
+ ngOnDestroy() {
363
+ this.next();
364
+ this.complete();
365
+ }
366
+ }
367
+ DestroyedService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
368
+ DestroyedService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService });
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService, decorators: [{
370
+ type: Injectable
371
+ }], ctorParameters: function () { return []; } });
372
+
373
+ /** Generate a UUID v4 */
374
+ function uuidv4() {
375
+ const modifier = 16;
376
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
377
+ // eslint-disable-next-line no-bitwise
378
+ const r = (Math.random() * modifier) | 0,
379
+ // eslint-disable-next-line no-bitwise
380
+ v = c === 'x' ? r : (r & 0x3) | 0x8;
381
+ return v.toString(modifier);
382
+ });
383
+ }
384
+
385
+ class FocusTrapService {
386
+ constructor() {
387
+ /** @hidden */
388
+ this._focusTrapInstances = new Map();
389
+ }
390
+ /**
391
+ * Creates focus trap instance for defined element
392
+ * @param element Container for which to create focus trap
393
+ * @param userOptions Focus-trap specific configuration
394
+ * @returns {string} Unique ID of focus trap instance
395
+ */
396
+ createFocusTrap(element, userOptions) {
397
+ const uid = uuidv4();
398
+ const trap = createFocusTrap(element, userOptions);
399
+ this._focusTrapInstances.set(uid, trap);
400
+ this.activateFocusTrap(uid);
401
+ return uid;
402
+ }
403
+ /**
404
+ * Activates focus trap for defined ID
405
+ * @param id Unique ID of focus trap instance
406
+ */
407
+ activateFocusTrap(id) {
408
+ if (!this._focusTrapExists(id)) {
409
+ return;
411
410
  }
412
- else {
413
- return true;
411
+ const trap = this.getFocusTrapInstance(id);
412
+ trap?.activate();
413
+ }
414
+ /**
415
+ * Deactivates focus trap for defined ID
416
+ * @param id Unique ID of focus trap instance
417
+ */
418
+ deactivateFocusTrap(id) {
419
+ if (!this._focusTrapExists(id)) {
420
+ return;
421
+ }
422
+ const trap = this.getFocusTrapInstance(id);
423
+ trap?.deactivate();
424
+ this._focusTrapInstances.delete(id);
425
+ }
426
+ /**
427
+ * Pauses current focus trap.
428
+ */
429
+ pauseCurrentFocusTrap() {
430
+ if (this._focusTrapInstances.size === 0) {
431
+ return;
432
+ }
433
+ const trapItem = this._getLastTrapedItem();
434
+ trapItem?.pause();
435
+ }
436
+ /**
437
+ * Unpauses current focus trap.
438
+ */
439
+ unpauseCurrentFocusTrap() {
440
+ if (this._focusTrapInstances.size === 0) {
441
+ return;
414
442
  }
443
+ const trapItem = this._getLastTrapedItem();
444
+ trapItem?.unpause();
445
+ }
446
+ /**
447
+ * Get focus trap instance by ID.
448
+ * @param id ID of the instance.
449
+ * @returns Focus trap instance if exists.
450
+ */
451
+ getFocusTrapInstance(id) {
452
+ return this._focusTrapInstances.get(id);
415
453
  }
416
454
  /** @hidden */
417
- _sendCompleteEvent(forceClose) {
418
- this.onComplete.emit({
419
- term: this._elementRef.nativeElement.value,
420
- forceClose
421
- });
455
+ _getLastTrapedItem() {
456
+ const lastItem = Array.from(this._focusTrapInstances).pop();
457
+ return lastItem ? lastItem[1] : undefined;
422
458
  }
423
459
  /** @hidden */
424
- _moveIndicatorToLastCharacter() {
425
- const inputTextLength = this.inputText?.length ?? 0;
426
- this._elementRef.nativeElement.setSelectionRange(inputTextLength, inputTextLength);
460
+ _focusTrapExists(id) {
461
+ return this._focusTrapInstances.has(id);
427
462
  }
428
463
  }
429
- AutoCompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
430
- AutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AutoCompleteDirective, isStandalone: true, selector: "[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]", inputs: { options: "options", inputText: "inputText", enable: "enable", matcher: "matcher", displayFn: "displayFn" }, outputs: { onComplete: "onComplete" }, host: { listeners: { "keyup": "handleKeyboardEvent($event)" } }, ngImport: i0 });
431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteDirective, decorators: [{
432
- type: Directive,
464
+ FocusTrapService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ FocusTrapService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, providedIn: 'root' });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, decorators: [{
467
+ type: Injectable,
433
468
  args: [{
434
- selector: '[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]',
435
- standalone: true
469
+ providedIn: 'root'
436
470
  }]
437
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { options: [{
438
- type: Input
439
- }], inputText: [{
440
- type: Input
441
- }], enable: [{
442
- type: Input
443
- }], matcher: [{
444
- type: Input
445
- }], displayFn: [{
446
- type: Input
447
- }], onComplete: [{
448
- type: Output
449
- }], handleKeyboardEvent: [{
450
- type: HostListener,
451
- args: ['keyup', ['$event']]
452
- }] } });
471
+ }] });
453
472
 
454
- class AutoCompleteModule {
455
- }
456
- AutoCompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
457
- AutoCompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, imports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective], exports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective] });
458
- AutoCompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule });
459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, decorators: [{
460
- type: NgModule,
461
- args: [{
462
- imports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective],
463
- exports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective],
464
- declarations: []
465
- }]
466
- }] });
467
-
468
- const FOCUSABLE_ITEM = new InjectionToken('Focusable Option');
469
-
470
- class DeprecatedFocusKeyManagerListDirective extends DeprecatedSelector {
471
- }
472
- DeprecatedFocusKeyManagerListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
473
- DeprecatedFocusKeyManagerListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedFocusKeyManagerListDirective, isStandalone: true, selector: "[fd-focus-key-manager-list], [fdFocusKeyManagerList]", providers: [
474
- {
475
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
476
- useValue: getDeprecatedModel('[fdkFocusKeyManagerList]', '[fd-focus-key-manager-list], [fdFocusKeyManagerList]')
477
- }
478
- ], usesInheritance: true, ngImport: i0 });
479
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerListDirective, decorators: [{
480
- type: Directive,
481
- args: [{
482
- // eslint-disable-next-line @angular-eslint/directive-selector
483
- selector: '[fd-focus-key-manager-list], [fdFocusKeyManagerList]',
484
- standalone: true,
485
- providers: [
486
- {
487
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
488
- useValue: getDeprecatedModel('[fdkFocusKeyManagerList]', '[fd-focus-key-manager-list], [fdFocusKeyManagerList]')
489
- }
490
- ]
491
- }]
492
- }] });
493
- /** Directive to apply Angular Material FocusKeyManager to lists.
494
- * To be used with FocusKeyManagerItemDirective
495
- */
496
- class FocusKeyManagerListDirective {
497
- /** @hidden */
498
- get focusKeyManager() {
499
- return this._focusKeyManager;
500
- }
501
- /** @hidden */
502
- constructor(_rtlService, _cdr) {
503
- this._rtlService = _rtlService;
504
- this._cdr = _cdr;
505
- /** @hidden */
506
- this._onDestroy$ = new Subject();
507
- }
508
- /** @hidden */
509
- ngOnChanges(changes) {
510
- if (!this._focusKeyManager) {
511
- return;
512
- }
513
- if ('orientation' in changes) {
514
- this._applyOrientation();
515
- }
516
- if ('skiPredicate' in changes) {
517
- this._focusKeyManager.skipPredicate(this.skipPredicate);
518
- }
519
- }
520
- /** @hidden */
521
- ngAfterContentInit() {
522
- this._focusKeyManager = new FocusKeyManager(this._items).skipPredicate(this.skipPredicate);
523
- this._applyOrientation();
524
- this._cdr.detectChanges();
525
- this._rtlService?.rtl
526
- .pipe(filter(() => this.orientation === 'horizontal'), takeUntil(this._onDestroy$))
527
- .subscribe(() => this._applyOrientation());
528
- }
529
- /** @hidden */
530
- ngOnDestroy() {
531
- this._onDestroy$.next();
532
- this._onDestroy$.complete();
533
- this._focusKeyManager.destroy();
534
- }
535
- /** Focus certain list's item */
536
- focusItem(item) {
537
- if (typeof item === 'number') {
538
- this._focusKeyManager.setActiveItem(item);
539
- }
540
- else {
541
- this._focusKeyManager.setActiveItem(item);
542
- }
543
- }
544
- /** @hidden */
545
- _applyOrientation() {
546
- switch (this.orientation) {
547
- case 'horizontal':
548
- this._focusKeyManager.withHorizontalOrientation(this._rtlService?.rtl.value ? 'rtl' : 'ltr');
549
- break;
550
- case 'vertical':
551
- this._focusKeyManager.withVerticalOrientation(true);
552
- break;
553
- }
554
- }
555
- }
556
- FocusKeyManagerListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerListDirective, deps: [{ token: RtlService, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
557
- FocusKeyManagerListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FocusKeyManagerListDirective, isStandalone: true, selector: "[fdkFocusKeyManagerList], [fd-focus-key-manager-list], [fdFocusKeyManagerList]", inputs: { orientation: "orientation", skipPredicate: "skipPredicate" }, queries: [{ propertyName: "_items", predicate: FOCUSABLE_ITEM }], usesOnChanges: true, ngImport: i0 });
558
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerListDirective, decorators: [{
559
- type: Directive,
560
- args: [{
561
- selector: `[fdkFocusKeyManagerList], [fd-focus-key-manager-list], [fdFocusKeyManagerList]`,
562
- standalone: true
563
- }]
564
- }], ctorParameters: function () { return [{ type: RtlService, decorators: [{
565
- type: Optional
566
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { orientation: [{
567
- type: Input
568
- }], skipPredicate: [{
569
- type: Input
570
- }], _items: [{
571
- type: ContentChildren,
572
- args: [FOCUSABLE_ITEM]
573
- }] } });
574
-
575
- class DeprecatedFocusKeyManagerItemDirective extends DeprecatedSelector {
576
- }
577
- DeprecatedFocusKeyManagerItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerItemDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
578
- DeprecatedFocusKeyManagerItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedFocusKeyManagerItemDirective, isStandalone: true, selector: "[fd-focus-key-manager-item], [fdFocusKeyManagerItem]", providers: [
579
- {
580
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
581
- useValue: getDeprecatedModel('[fdkFocusKeyManagerItem]', '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]')
582
- }
583
- ], usesInheritance: true, ngImport: i0 });
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerItemDirective, decorators: [{
585
- type: Directive,
586
- args: [{
587
- // eslint-disable-next-line @angular-eslint/directive-selector
588
- selector: '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]',
589
- standalone: true,
590
- providers: [
591
- {
592
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
593
- useValue: getDeprecatedModel('[fdkFocusKeyManagerItem]', '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]')
594
- }
595
- ]
596
- }]
597
- }] });
598
- /** Directive to apply Angular Material FocusKeyManager to lists.
599
- * To be used with FocusKeyManagerItemDirective
600
- */
601
- class FocusKeyManagerItemDirective {
602
- /** Whether item should be initially focused */
603
- set initialFocus(value) {
604
- this._initialFocus = coerceBooleanProperty(value);
605
- }
606
- /** @hidden */
607
- get _tabindex() {
608
- if (this._initialFocus) {
609
- return 0;
610
- }
611
- return this.nativeElement?.tabIndex ?? -1;
612
- }
613
- /** Native element of the item */
614
- get nativeElement() {
615
- return this._elRef?.nativeElement;
616
- }
617
- /** @hidden */
618
- get _focusKeyManager() {
619
- return this._list.focusKeyManager;
620
- }
621
- /** @hidden */
622
- constructor(_list, _elRef) {
623
- this._list = _list;
624
- this._elRef = _elRef;
625
- /** @hidden */
626
- this._initialFocus = false;
627
- }
628
- /** @hidden */
629
- _onFocus() {
630
- // For cases where initially selected item doesn't have 0 index
631
- this._focusKeyManager?.updateActiveItem(this);
632
- }
633
- /** @hidden */
634
- _onKeydown(event) {
635
- this._focusKeyManager?.onKeydown(event);
636
- }
637
- /** Focus current item native element */
638
- focus() {
639
- this._elRef?.nativeElement.focus();
640
- }
641
- }
642
- FocusKeyManagerItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerItemDirective, deps: [{ token: FocusKeyManagerListDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
643
- FocusKeyManagerItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FocusKeyManagerItemDirective, isStandalone: true, selector: "[fdkFocusKeyManagerItem], [fd-focus-key-manager-item], [fdFocusKeyManagerItem]", inputs: { initialFocus: "initialFocus", _tabindex: "_tabindex" }, host: { listeners: { "focus": "_onFocus()", "keydown": "_onKeydown($event)" }, properties: { "attr.tabindex": "this._tabindex" } }, providers: [{ provide: FOCUSABLE_ITEM, useExisting: forwardRef(() => FocusKeyManagerItemDirective) }], ngImport: i0 });
644
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerItemDirective, decorators: [{
645
- type: Directive,
646
- args: [{
647
- selector: '[fdkFocusKeyManagerItem], [fd-focus-key-manager-item], [fdFocusKeyManagerItem]',
648
- standalone: true,
649
- providers: [{ provide: FOCUSABLE_ITEM, useExisting: forwardRef(() => FocusKeyManagerItemDirective) }]
650
- }]
651
- }], ctorParameters: function () { return [{ type: FocusKeyManagerListDirective }, { type: i0.ElementRef }]; }, propDecorators: { initialFocus: [{
652
- type: Input
653
- }], _tabindex: [{
654
- type: Input
655
- }, {
656
- type: HostBinding,
657
- args: ['attr.tabindex']
658
- }], _onFocus: [{
659
- type: HostListener,
660
- args: ['focus']
661
- }], _onKeydown: [{
662
- type: HostListener,
663
- args: ['keydown', ['$event']]
664
- }] } });
665
-
666
- class FocusKeyManagerHelpersModule {
667
- }
668
- FocusKeyManagerHelpersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
669
- FocusKeyManagerHelpersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, imports: [FocusKeyManagerItemDirective,
670
- FocusKeyManagerListDirective,
671
- DeprecatedFocusKeyManagerItemDirective,
672
- DeprecatedFocusKeyManagerListDirective], exports: [FocusKeyManagerItemDirective,
673
- FocusKeyManagerListDirective,
674
- DeprecatedFocusKeyManagerItemDirective,
675
- DeprecatedFocusKeyManagerListDirective] });
676
- FocusKeyManagerHelpersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule });
677
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, decorators: [{
678
- type: NgModule,
679
- args: [{
680
- imports: [
681
- FocusKeyManagerItemDirective,
682
- FocusKeyManagerListDirective,
683
- DeprecatedFocusKeyManagerItemDirective,
684
- DeprecatedFocusKeyManagerListDirective
685
- ],
686
- exports: [
687
- FocusKeyManagerItemDirective,
688
- FocusKeyManagerListDirective,
689
- DeprecatedFocusKeyManagerItemDirective,
690
- DeprecatedFocusKeyManagerListDirective
691
- ]
692
- }]
693
- }] });
694
-
695
- const IgnoreClickOnSelectionDirectiveToken = new InjectionToken('Ignore click on selection directive');
696
-
697
- class DeprecatedIgnoreClickOnSelectionDirective extends DeprecatedSelector {
698
- }
699
- DeprecatedIgnoreClickOnSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedIgnoreClickOnSelectionDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
700
- DeprecatedIgnoreClickOnSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedIgnoreClickOnSelectionDirective, isStandalone: true, selector: "[fdIgnoreClickOnSelection]", providers: [
701
- {
702
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
703
- useValue: getDeprecatedModel('[fdkIgnoreClickOnSelection]', '[fdIgnoreClickOnSelection]')
704
- }
705
- ], usesInheritance: true, ngImport: i0 });
706
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedIgnoreClickOnSelectionDirective, decorators: [{
707
- type: Directive,
708
- args: [{
709
- // eslint-disable-next-line @angular-eslint/directive-selector
710
- selector: '[fdIgnoreClickOnSelection]',
711
- standalone: true,
712
- providers: [
713
- {
714
- provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
715
- useValue: getDeprecatedModel('[fdkIgnoreClickOnSelection]', '[fdIgnoreClickOnSelection]')
716
- }
717
- ]
718
- }]
719
- }] });
720
- /**
721
- * Directive will stop propagation and prevent default of click, if selected area is coming from
722
- * directive's host element. This gives ability to not cancel all clicks on element, just the ones
723
- * which include selection
724
- */
725
- class IgnoreClickOnSelectionDirective {
726
- /** @hidden */
727
- constructor(document, _elementRef) {
728
- this.document = document;
729
- this._elementRef = _elementRef;
730
- }
731
- /** Host click listener. Checks for selection existence and if finds one, checks anchor */
732
- clicked($event) {
733
- const selection = this.document.getSelection();
734
- if (selection?.toString()) {
735
- if (selection.anchorNode &&
736
- (this._elementRef.nativeElement.isSameNode(selection.anchorNode) ||
737
- this._elementRef.nativeElement.isSameNode(selection.anchorNode.parentElement))) {
738
- $event.stopPropagation();
739
- $event.preventDefault();
740
- }
741
- }
742
- }
743
- }
744
- IgnoreClickOnSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
745
- IgnoreClickOnSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IgnoreClickOnSelectionDirective, isStandalone: true, selector: "[fdkIgnoreClickOnSelection], [fdIgnoreClickOnSelection]", host: { listeners: { "click": "clicked($event)" } }, providers: [
746
- {
747
- provide: IgnoreClickOnSelectionDirectiveToken,
748
- useExisting: IgnoreClickOnSelectionDirective
749
- }
750
- ], ngImport: i0 });
751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionDirective, decorators: [{
752
- type: Directive,
753
- args: [{
754
- selector: '[fdkIgnoreClickOnSelection], [fdIgnoreClickOnSelection]',
755
- standalone: true,
756
- providers: [
757
- {
758
- provide: IgnoreClickOnSelectionDirectiveToken,
759
- useExisting: IgnoreClickOnSelectionDirective
760
- }
761
- ]
762
- }]
763
- }], ctorParameters: function () { return [{ type: Document, decorators: [{
764
- type: Inject,
765
- args: [DOCUMENT]
766
- }] }, { type: i0.ElementRef }]; }, propDecorators: { clicked: [{
767
- type: HostListener,
768
- args: ['click', ['$event']]
769
- }] } });
770
-
771
- class IgnoreClickOnSelectionModule {
772
- }
773
- IgnoreClickOnSelectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
774
- IgnoreClickOnSelectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, imports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective], exports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective] });
775
- IgnoreClickOnSelectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule });
776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, decorators: [{
777
- type: NgModule,
778
- args: [{
779
- imports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective],
780
- exports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective]
781
- }]
782
- }] });
783
-
784
- /** Determines whether provided value is valid content density */
785
- function isValidContentDensity(size) {
786
- return size === 'cozy' || size === 'compact' || size === 'condensed';
787
- }
788
- /**
789
- * Determines if "compact" styles should be applied based on provided content density
790
- */
791
- function isCompactDensity(size) {
792
- return isValidContentDensity(size) && size !== 'cozy';
793
- }
794
-
795
- const DEFAULT_CONTENT_DENSITY = 'cozy';
796
- /**
797
- * Service taking care of ContentDensity
798
- */
799
- class ContentDensityService {
800
- /** @hidden */
801
- constructor() {
802
- /** Content Density BehaviourSubject */
803
- this.contentDensity = new BehaviorSubject(DEFAULT_CONTENT_DENSITY);
804
- if (isDevMode()) {
805
- console.warn(`[Deprecated] ContentDensityService is deprecated and will be removed in the next major version.
806
- Please use ContentDensityControllerService instead, or use the ContentDensityModule forRoot method.`);
807
- }
808
- }
809
- /** @hidden */
810
- get _contentDensityListener() {
811
- return this.contentDensity.pipe(distinctUntilChanged(), startWith(this.contentDensity.getValue()));
812
- }
813
- /** @hidden */
814
- get _isCompactDensity() {
815
- return this._contentDensityListener.pipe(map((density) => isCompactDensity(density)));
816
- }
817
- }
818
- ContentDensityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
819
- ContentDensityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService });
820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContentDensityService, decorators: [{
821
- type: Injectable
822
- }], ctorParameters: function () { return []; } });
823
-
824
- class DestroyedService extends ReplaySubject {
825
- /** @hidden */
826
- constructor() {
827
- super(1);
828
- }
829
- /** @hidden */
830
- ngOnDestroy() {
831
- this.next();
832
- this.complete();
833
- }
834
- }
835
- DestroyedService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
836
- DestroyedService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService });
837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DestroyedService, decorators: [{
838
- type: Injectable
839
- }], ctorParameters: function () { return []; } });
840
-
841
- /** Generate a UUID v4 */
842
- function uuidv4() {
843
- const modifier = 16;
844
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
845
- // eslint-disable-next-line no-bitwise
846
- const r = (Math.random() * modifier) | 0,
847
- // eslint-disable-next-line no-bitwise
848
- v = c === 'x' ? r : (r & 0x3) | 0x8;
849
- return v.toString(modifier);
850
- });
851
- }
852
-
853
- class FocusTrapService {
854
- constructor() {
855
- /** @hidden */
856
- this._focusTrapInstances = new Map();
857
- }
858
- /**
859
- * Creates focus trap instance for defined element
860
- * @param element Container for which to create focus trap
861
- * @param userOptions Focus-trap specific configuration
862
- * @returns {string} Unique ID of focus trap instance
863
- */
864
- createFocusTrap(element, userOptions) {
865
- const uid = uuidv4();
866
- const trap = createFocusTrap(element, userOptions);
867
- this._focusTrapInstances.set(uid, trap);
868
- this.activateFocusTrap(uid);
869
- return uid;
870
- }
871
- /**
872
- * Activates focus trap for defined ID
873
- * @param id Unique ID of focus trap instance
874
- */
875
- activateFocusTrap(id) {
876
- if (!this._focusTrapExists(id)) {
877
- return;
878
- }
879
- const trap = this.getFocusTrapInstance(id);
880
- trap?.activate();
881
- }
882
- /**
883
- * Deactivates focus trap for defined ID
884
- * @param id Unique ID of focus trap instance
885
- */
886
- deactivateFocusTrap(id) {
887
- if (!this._focusTrapExists(id)) {
888
- return;
889
- }
890
- const trap = this.getFocusTrapInstance(id);
891
- trap?.deactivate();
892
- this._focusTrapInstances.delete(id);
893
- }
894
- /**
895
- * Pauses current focus trap.
896
- */
897
- pauseCurrentFocusTrap() {
898
- if (this._focusTrapInstances.size === 0) {
899
- return;
900
- }
901
- const trapItem = this._getLastTrapedItem();
902
- trapItem?.pause();
903
- }
904
- /**
905
- * Unpauses current focus trap.
906
- */
907
- unpauseCurrentFocusTrap() {
908
- if (this._focusTrapInstances.size === 0) {
909
- return;
910
- }
911
- const trapItem = this._getLastTrapedItem();
912
- trapItem?.unpause();
913
- }
914
- /**
915
- * Get focus trap instance by ID.
916
- * @param id ID of the instance.
917
- * @returns Focus trap instance if exists.
918
- */
919
- getFocusTrapInstance(id) {
920
- return this._focusTrapInstances.get(id);
921
- }
922
- /** @hidden */
923
- _getLastTrapedItem() {
924
- const lastItem = Array.from(this._focusTrapInstances).pop();
925
- return lastItem ? lastItem[1] : undefined;
926
- }
927
- /** @hidden */
928
- _focusTrapExists(id) {
929
- return this._focusTrapInstances.has(id);
930
- }
931
- }
932
- FocusTrapService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
933
- FocusTrapService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, providedIn: 'root' });
934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusTrapService, decorators: [{
935
- type: Injectable,
936
- args: [{
937
- providedIn: 'root'
938
- }]
939
- }] });
940
-
941
- const pxToNum = (pixels) => Number(pixels.replace('px', '')) || 0;
942
- const toNativeElement = (element) => element instanceof ElementRef ? element.nativeElement : element;
943
- /** Return elements capacity (width subtract by element padding)
944
- * @param element - HTMLelement or element reference
945
- * */
946
- function getElementCapacity(element) {
947
- const _element = toNativeElement(element);
948
- const computedStyle = window.getComputedStyle(_element);
949
- return pxToNum(computedStyle.width) - pxToNum(computedStyle.paddingLeft) - pxToNum(computedStyle.paddingRight);
473
+ const pxToNum = (pixels) => Number(pixels.replace('px', '')) || 0;
474
+ const toNativeElement = (element) => element instanceof ElementRef ? element.nativeElement : element;
475
+ /** Return elements capacity (width subtract by element padding)
476
+ * @param element - HTMLelement or element reference
477
+ * */
478
+ function getElementCapacity(element) {
479
+ const _element = toNativeElement(element);
480
+ const computedStyle = window.getComputedStyle(_element);
481
+ return pxToNum(computedStyle.width) - pxToNum(computedStyle.paddingLeft) - pxToNum(computedStyle.paddingRight);
950
482
  }
951
483
  /** Return elements width
952
484
  * @param element - HTMLelement or element reference
@@ -1135,312 +667,794 @@ class KeyboardSupportService {
1135
667
  this._tabKeyNavigation = true;
1136
668
  }
1137
669
  /** @hidden */
1138
- get keyManager() {
1139
- return this._keyManager;
670
+ get keyManager() {
671
+ return this._keyManager;
672
+ }
673
+ /** @hidden */
674
+ setKeyboardService(queryList, wrap, tabKeyNavigation = true) {
675
+ this._itemList = queryList;
676
+ this._tabKeyNavigation = tabKeyNavigation;
677
+ this._keyManager = new FocusKeyManager(queryList).withWrap(wrap).withHomeAndEnd();
678
+ queryList.changes
679
+ .pipe(takeUntil(this._onDestroy$), startWith(0))
680
+ .subscribe(() => this._refreshEscapeLogic(queryList));
681
+ }
682
+ /** @hidden */
683
+ onKeyDown(event) {
684
+ this._keyManager.onKeydown(event);
685
+ if (KeyUtil.isKeyCode(event, TAB)) {
686
+ if (KeyUtil.isKeyCode(event, TAB) && this._tabKeyNavigation) {
687
+ event.preventDefault();
688
+ hasModifierKey(event, 'shiftKey')
689
+ ? this.keyManager.setPreviousItemActive()
690
+ : this.keyManager.setNextItemActive();
691
+ }
692
+ }
693
+ }
694
+ /** Destroys KeyboardSupportService dependencies */
695
+ onDestroy() {
696
+ this._onDestroy$.next();
697
+ this._onDestroy$.complete();
698
+ this._keyManager.destroy();
699
+ }
700
+ /** @hidden */
701
+ _refreshEscapeLogic(queryList) {
702
+ const createEscapeListener = (listItem, onKeyCode, escapeDirection) => {
703
+ listItem.keyDown
704
+ .pipe(takeUntil(unsubscribe$), filter((event) => KeyUtil.isKeyCode(event, onKeyCode)), tap((event) => event.preventDefault()))
705
+ .subscribe(() => this.focusEscapeList.next(escapeDirection));
706
+ };
707
+ /** Finish all of the streams, form before */
708
+ this._onRefresh$.next();
709
+ const unsubscribe$ = merge(this._onRefresh$, this._onDestroy$);
710
+ if (queryList.length) {
711
+ createEscapeListener(queryList.last, DOWN_ARROW, 'down');
712
+ createEscapeListener(queryList.first, UP_ARROW, 'up');
713
+ }
714
+ }
715
+ }
716
+ KeyboardSupportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
717
+ KeyboardSupportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, providedIn: 'root' });
718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, decorators: [{
719
+ type: Injectable,
720
+ args: [{ providedIn: 'root' }]
721
+ }] });
722
+
723
+ class MockStorage {
724
+ // eslint-disable-next-line
725
+ key(index) { }
726
+ clear() { }
727
+ // eslint-disable-next-line
728
+ getItem(key) { }
729
+ // eslint-disable-next-line
730
+ removeItem(key) { }
731
+ // eslint-disable-next-line
732
+ setItem(key, value) { }
733
+ }
734
+ class LocalStorageService {
735
+ /** @hidden */
736
+ constructor() {
737
+ typeof localStorage !== 'undefined' ? (this._storage = localStorage) : (this._storage = new MockStorage());
738
+ }
739
+ /** Get item from local storage. */
740
+ get(key) {
741
+ const value = this._storage.getItem(key);
742
+ if (value) {
743
+ return JSON.parse(value);
744
+ }
745
+ return null;
746
+ }
747
+ /** Set item in local storage. */
748
+ set(key, value) {
749
+ this._storage.setItem(key, JSON.stringify(value));
750
+ }
751
+ }
752
+ LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
753
+ LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, decorators: [{
755
+ type: Injectable,
756
+ args: [{ providedIn: 'root' }]
757
+ }], ctorParameters: function () { return []; } });
758
+
759
+ class ResizeObserverFactory {
760
+ /** Factory to create ResizeObserver if it's present in browser. */
761
+ create(callback) {
762
+ return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
763
+ }
764
+ }
765
+ ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
766
+ ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, decorators: [{
768
+ type: Injectable,
769
+ args: [{ providedIn: 'root' }]
770
+ }] });
771
+ class ResizeObserverService {
772
+ /** @hidden */
773
+ constructor(_resizeObserverFactory) {
774
+ this._resizeObserverFactory = _resizeObserverFactory;
775
+ /** @hidden */
776
+ this._observedElements = new Map();
777
+ }
778
+ /** @hidden */
779
+ ngOnDestroy() {
780
+ this._observedElements.forEach((_, element) => this._cleanupObserver(element));
781
+ }
782
+ /** Observe the given element and emit whenever its size changes. */
783
+ observe(elementOrRef) {
784
+ const element = coerceElement(elementOrRef);
785
+ return new Observable((observer) => {
786
+ const stream = this._observeElement(element);
787
+ const subscription = stream?.subscribe(observer);
788
+ return () => {
789
+ subscription?.unsubscribe();
790
+ this._unobserveElement(element);
791
+ };
792
+ });
793
+ }
794
+ /**
795
+ * Observes the given element by using the existing MutationObserver if available, or creating a
796
+ * new one if not.
797
+ */
798
+ _observeElement(element) {
799
+ let observedElement = this._observedElements.get(element);
800
+ if (!observedElement) {
801
+ const stream = new Subject();
802
+ const observer = this._resizeObserverFactory.create((mutations) => stream.next(mutations));
803
+ if (observer) {
804
+ observer.observe(element);
805
+ }
806
+ observedElement = { observer, stream, count: 0 };
807
+ this._observedElements.set(element, observedElement);
808
+ }
809
+ observedElement.count++;
810
+ return observedElement?.stream;
811
+ }
812
+ /**
813
+ * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is
814
+ * observing this element.
815
+ */
816
+ _unobserveElement(element) {
817
+ const observedElement = this._observedElements.get(element);
818
+ if (!observedElement) {
819
+ return;
820
+ }
821
+ if (--observedElement.count) {
822
+ return;
823
+ }
824
+ this._cleanupObserver(element);
825
+ }
826
+ /** Clean up the underlying MutationObserver for the specified element. */
827
+ _cleanupObserver(element) {
828
+ const observedElement = this._observedElements.get(element);
829
+ if (!observedElement) {
830
+ return;
831
+ }
832
+ const { observer, stream } = observedElement;
833
+ if (observer) {
834
+ observer.disconnect();
835
+ }
836
+ stream.complete();
837
+ this._observedElements.delete(element);
838
+ }
839
+ }
840
+ ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
841
+ ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, decorators: [{
843
+ type: Injectable,
844
+ args: [{ providedIn: 'root' }]
845
+ }], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
846
+
847
+ class TabbableElementService {
848
+ /** @hidden */
849
+ constructor(_checker, _document) {
850
+ this._checker = _checker;
851
+ this._document = _document;
852
+ }
853
+ /** Get the first tabbable element from a DOM subtree (inclusive). */
854
+ getTabbableElement(root, focusLastElement = false, skipSelf = false) {
855
+ if (!skipSelf && this._checker.isFocusable(root) && this._checker.isTabbable(root)) {
856
+ return root;
857
+ }
858
+ // Iterate in DOM order. Note that IE doesn't have `children` for SVG, so we fall
859
+ // back to `childNodes` which includes text nodes, comments etc.
860
+ const rootChildren = root.children || root.childNodes;
861
+ const children = focusLastElement ? Array.from(rootChildren).reverse() : rootChildren;
862
+ for (let i = 0; i < children.length; i++) {
863
+ const tabbableChild = children[i].nodeType === this._document?.ELEMENT_NODE
864
+ ? this.getTabbableElement(children[i], focusLastElement)
865
+ : null;
866
+ if (tabbableChild) {
867
+ return tabbableChild;
868
+ }
869
+ }
870
+ return null;
871
+ }
872
+ }
873
+ TabbableElementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, deps: [{ token: i1$1.InteractivityChecker }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
874
+ TabbableElementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, providedIn: 'root' });
875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, decorators: [{
876
+ type: Injectable,
877
+ args: [{ providedIn: 'root' }]
878
+ }], ctorParameters: function () { return [{ type: i1$1.InteractivityChecker }, { type: Document, decorators: [{
879
+ type: Optional
880
+ }, {
881
+ type: Inject,
882
+ args: [DOCUMENT]
883
+ }] }]; } });
884
+
885
+ /**
886
+ * Retrieves native element from ElementRef.
887
+ */
888
+ function getNativeElement(element) {
889
+ let coercible = element;
890
+ if (hasElementRef(element)) {
891
+ coercible = element.elementRef;
892
+ }
893
+ return coerceElement(coercible);
894
+ }
895
+ /**
896
+ * Checks whether object has element reference in it.
897
+ */
898
+ function hasElementRef(something) {
899
+ return something && something['elementRef'] instanceof ElementRef;
900
+ }
901
+
902
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
903
+ class AttributeObserver {
904
+ /** @hidden */
905
+ constructor(_mutationObserverFactory) {
906
+ this._mutationObserverFactory = _mutationObserverFactory;
907
+ /** @Hidden */
908
+ this._observedElements = new Map();
1140
909
  }
1141
910
  /** @hidden */
1142
- setKeyboardService(queryList, wrap, tabKeyNavigation = true) {
1143
- this._itemList = queryList;
1144
- this._tabKeyNavigation = tabKeyNavigation;
1145
- this._keyManager = new FocusKeyManager(queryList).withWrap(wrap).withHomeAndEnd();
1146
- queryList.changes
1147
- .pipe(takeUntil(this._onDestroy$), startWith(0))
1148
- .subscribe(() => this._refreshEscapeLogic(queryList));
911
+ ngOnDestroy() {
912
+ this._observedElements.forEach((_, element) => this._cleanupObserver(element));
913
+ }
914
+ /** @Hidden */
915
+ observe(elementOrRef) {
916
+ const element = getNativeElement(elementOrRef);
917
+ return new Observable((observer) => {
918
+ const stream = this._observeElement(element);
919
+ const subscription = stream.subscribe(observer);
920
+ return () => {
921
+ subscription.unsubscribe();
922
+ this._unobserveElement(element);
923
+ };
924
+ });
925
+ }
926
+ /** @Hidden */
927
+ unobserve(element) {
928
+ this._unobserveElement(getNativeElement(element));
1149
929
  }
1150
930
  /** @hidden */
1151
- onKeyDown(event) {
1152
- this._keyManager.onKeydown(event);
1153
- if (KeyUtil.isKeyCode(event, TAB)) {
1154
- if (KeyUtil.isKeyCode(event, TAB) && this._tabKeyNavigation) {
1155
- event.preventDefault();
1156
- hasModifierKey(event, 'shiftKey')
1157
- ? this.keyManager.setPreviousItemActive()
1158
- : this.keyManager.setNextItemActive();
931
+ _observeElement(element) {
932
+ if (!this._observedElements.has(element)) {
933
+ const stream = new Subject();
934
+ const observer = this._mutationObserverFactory.create((mutations) => stream.next(mutations));
935
+ if (observer) {
936
+ observer.observe(element, {
937
+ attributes: true
938
+ });
1159
939
  }
940
+ this._observedElements.set(element, { observer, stream, count: 1 });
941
+ }
942
+ else {
943
+ this._observedElements.get(element).count++;
1160
944
  }
945
+ return this._observedElements.get(element).stream;
1161
946
  }
1162
- /** Destroys KeyboardSupportService dependencies */
1163
- onDestroy() {
1164
- this._onDestroy$.next();
1165
- this._onDestroy$.complete();
1166
- this._keyManager.destroy();
947
+ /** @Hidden */
948
+ _unobserveElement(element) {
949
+ if (this._observedElements.has(element)) {
950
+ this._observedElements.get(element).count--;
951
+ if (!this._observedElements.get(element).count) {
952
+ this._cleanupObserver(element);
953
+ }
954
+ }
1167
955
  }
1168
956
  /** @hidden */
1169
- _refreshEscapeLogic(queryList) {
1170
- const createEscapeListener = (listItem, onKeyCode, escapeDirection) => {
1171
- listItem.keyDown
1172
- .pipe(takeUntil(unsubscribe$), filter((event) => KeyUtil.isKeyCode(event, onKeyCode)), tap((event) => event.preventDefault()))
1173
- .subscribe(() => this.focusEscapeList.next(escapeDirection));
1174
- };
1175
- /** Finish all of the streams, form before */
1176
- this._onRefresh$.next();
1177
- const unsubscribe$ = merge(this._onRefresh$, this._onDestroy$);
1178
- if (queryList.length) {
1179
- createEscapeListener(queryList.last, DOWN_ARROW, 'down');
1180
- createEscapeListener(queryList.first, UP_ARROW, 'up');
957
+ _cleanupObserver(element) {
958
+ if (this._observedElements.has(element)) {
959
+ const { observer, stream } = this._observedElements.get(element);
960
+ if (observer) {
961
+ observer.disconnect();
962
+ }
963
+ stream.complete();
964
+ this._observedElements.delete(element);
1181
965
  }
1182
966
  }
1183
967
  }
1184
- KeyboardSupportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1185
- KeyboardSupportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, providedIn: 'root' });
1186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: KeyboardSupportService, decorators: [{
968
+ AttributeObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, deps: [{ token: i1$2.MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
969
+ AttributeObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, providedIn: 'root' });
970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, decorators: [{
1187
971
  type: Injectable,
1188
- args: [{ providedIn: 'root' }]
1189
- }] });
972
+ args: [{
973
+ providedIn: 'root'
974
+ }]
975
+ }], ctorParameters: function () { return [{ type: i1$2.MutationObserverFactory }]; } });
1190
976
 
1191
- class MockStorage {
1192
- // eslint-disable-next-line
1193
- key(index) { }
1194
- clear() { }
1195
- // eslint-disable-next-line
1196
- getItem(key) { }
1197
- // eslint-disable-next-line
1198
- removeItem(key) { }
1199
- // eslint-disable-next-line
1200
- setItem(key, value) { }
977
+ /* eslint-disable @typescript-eslint/member-ordering */
978
+ class DeprecatedAutoCompleteDirective extends DeprecatedSelector {
1201
979
  }
1202
- class LocalStorageService {
980
+ DeprecatedAutoCompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedAutoCompleteDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
981
+ DeprecatedAutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedAutoCompleteDirective, isStandalone: true, selector: "[fdAutoComplete], [fd-auto-complete]", providers: [
982
+ DestroyedService,
983
+ {
984
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
985
+ useValue: getDeprecatedModel('[fdkAutoComplete]', '[fdAutoComplete], [fd-auto-complete]')
986
+ }
987
+ ], usesInheritance: true, ngImport: i0 });
988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedAutoCompleteDirective, decorators: [{
989
+ type: Directive,
990
+ args: [{
991
+ // eslint-disable-next-line @angular-eslint/directive-selector
992
+ selector: '[fdAutoComplete], [fd-auto-complete]',
993
+ standalone: true,
994
+ providers: [
995
+ DestroyedService,
996
+ {
997
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
998
+ useValue: getDeprecatedModel('[fdkAutoComplete]', '[fdAutoComplete], [fd-auto-complete]')
999
+ }
1000
+ ]
1001
+ }]
1002
+ }] });
1003
+ class AutoCompleteDirective {
1203
1004
  /** @hidden */
1204
- constructor() {
1205
- typeof localStorage !== 'undefined' ? (this._storage = localStorage) : (this._storage = new MockStorage());
1005
+ // eslint-disable-next-line @typescript-eslint/member-ordering
1006
+ constructor(_elementRef, _zone, _destroy$) {
1007
+ this._elementRef = _elementRef;
1008
+ this._zone = _zone;
1009
+ this._destroy$ = _destroy$;
1010
+ /** Whether the auto complete directive should be enabled */
1011
+ this.enable = true;
1012
+ /** Matcher function for testing the str for a search term */
1013
+ this.matcher = (str, searchTerm) => str.startsWith(searchTerm);
1014
+ /** Display function. Accepts an object of the same type as the
1015
+ * items passed to dropdownValues as argument, and outputs a string.
1016
+ * An arrow function can be used to access the *this* keyword in the calling component.
1017
+ * See search input examples for details. */
1018
+ this.displayFn = this._defaultDisplay;
1019
+ /** Event thrown, when the auto ahead text is accepted */
1020
+ this.onComplete = new EventEmitter();
1021
+ /** @hidden */
1022
+ this._completeKeys = [ENTER];
1023
+ /** @hidden */
1024
+ this._fillKeys = [LEFT_ARROW, RIGHT_ARROW];
1025
+ /** @hidden */
1026
+ this._stopKeys = [BACKSPACE, DELETE, ESCAPE];
1027
+ /**
1028
+ * Fixes #10710
1029
+ * WIth chinese characters inputText property update was triggered after the keyup event trigger.
1030
+ * By ensuring that we set all properties we can proceed with stable data.
1031
+ */
1032
+ this._zone.runOutsideAngular(() => {
1033
+ const keyupEvent = fromEvent(this._elementRef.nativeElement, 'keyup');
1034
+ keyupEvent
1035
+ .pipe(switchMap((evt) => this._zone.onStable.pipe(first(), map$1(() => evt))), takeUntil$1(this._destroy$))
1036
+ .subscribe((evt) => {
1037
+ this._handleKeyboardEvent(evt);
1038
+ console.log(this.inputText);
1039
+ });
1040
+ });
1206
1041
  }
1207
- /** Get item from local storage. */
1208
- get(key) {
1209
- const value = this._storage.getItem(key);
1210
- if (value) {
1211
- return JSON.parse(value);
1042
+ /** @hidden */
1043
+ _handleKeyboardEvent(event) {
1044
+ if (this.enable) {
1045
+ if (KeyUtil.isKeyCode(event, this._stopKeys)) {
1046
+ this._elementRef.nativeElement.value = this.inputText;
1047
+ }
1048
+ else if (KeyUtil.isKeyCode(event, this._completeKeys)) {
1049
+ this._sendCompleteEvent(true);
1050
+ this._moveIndicatorToLastCharacter();
1051
+ }
1052
+ else if (KeyUtil.isKeyCode(event, this._fillKeys)) {
1053
+ this._sendCompleteEvent(false);
1054
+ }
1055
+ else if (!this._isControlKey(event) && this.inputText) {
1056
+ /** Prevention from triggering typeahead, when having crtl/cmd + keys */
1057
+ if (!this._triggerTypeAhead()) {
1058
+ return;
1059
+ }
1060
+ this.oldValue = this.inputText;
1061
+ const item = this.options.find((option) => this.matcher(this.displayFn(option).toLocaleLowerCase(), this.inputText.toLocaleLowerCase()));
1062
+ if (item) {
1063
+ this._typeahead(this.displayFn(item));
1064
+ }
1065
+ }
1212
1066
  }
1213
- return null;
1067
+ this.lastKeyUpEvent = event;
1214
1068
  }
1215
- /** Set item in local storage. */
1216
- set(key, value) {
1217
- this._storage.setItem(key, JSON.stringify(value));
1069
+ /** @hidden */
1070
+ _typeahead(displayedValue) {
1071
+ this._elementRef.nativeElement.value = displayedValue;
1072
+ const selectionStartIndex = this.inputText.length;
1073
+ this._elementRef.nativeElement.setSelectionRange(selectionStartIndex, displayedValue.length);
1074
+ }
1075
+ /** @hidden */
1076
+ _isControlKey(event) {
1077
+ return KeyUtil.isKeyCode(event, CONTROL) || event.ctrlKey;
1078
+ }
1079
+ /** @hidden */
1080
+ _defaultDisplay(value) {
1081
+ return value;
1082
+ }
1083
+ /** @hidden */
1084
+ _triggerTypeAhead() {
1085
+ if (this.lastKeyUpEvent &&
1086
+ KeyUtil.isKeyCode(this.lastKeyUpEvent, CONTROL) &&
1087
+ this.inputText === this.oldValue) {
1088
+ return false;
1089
+ }
1090
+ else {
1091
+ return true;
1092
+ }
1093
+ }
1094
+ /** @hidden */
1095
+ _sendCompleteEvent(forceClose) {
1096
+ this.onComplete.emit({
1097
+ term: this._elementRef.nativeElement.value,
1098
+ forceClose
1099
+ });
1100
+ }
1101
+ /** @hidden */
1102
+ _moveIndicatorToLastCharacter() {
1103
+ const inputTextLength = this.inputText?.length ?? 0;
1104
+ this._elementRef.nativeElement.setSelectionRange(inputTextLength, inputTextLength);
1218
1105
  }
1219
1106
  }
1220
- LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1221
- LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
1222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LocalStorageService, decorators: [{
1223
- type: Injectable,
1224
- args: [{ providedIn: 'root' }]
1225
- }], ctorParameters: function () { return []; } });
1107
+ AutoCompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: DestroyedService }], target: i0.ɵɵFactoryTarget.Directive });
1108
+ AutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AutoCompleteDirective, isStandalone: true, selector: "[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]", inputs: { options: "options", inputText: "inputText", enable: "enable", matcher: "matcher", displayFn: "displayFn" }, outputs: { onComplete: "onComplete" }, ngImport: i0 });
1109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteDirective, decorators: [{
1110
+ type: Directive,
1111
+ args: [{
1112
+ selector: '[fdkAutoComplete], [fdAutoComplete], [fd-auto-complete]',
1113
+ standalone: true
1114
+ }]
1115
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: DestroyedService }]; }, propDecorators: { options: [{
1116
+ type: Input
1117
+ }], inputText: [{
1118
+ type: Input
1119
+ }], enable: [{
1120
+ type: Input
1121
+ }], matcher: [{
1122
+ type: Input
1123
+ }], displayFn: [{
1124
+ type: Input
1125
+ }], onComplete: [{
1126
+ type: Output
1127
+ }] } });
1128
+
1129
+ class AutoCompleteModule {
1130
+ }
1131
+ AutoCompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1132
+ AutoCompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, imports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective], exports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective] });
1133
+ AutoCompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule });
1134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutoCompleteModule, decorators: [{
1135
+ type: NgModule,
1136
+ args: [{
1137
+ imports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective],
1138
+ exports: [AutoCompleteDirective, DeprecatedAutoCompleteDirective],
1139
+ declarations: []
1140
+ }]
1141
+ }] });
1226
1142
 
1227
- class ResizeObserverFactory {
1228
- /** Factory to create ResizeObserver if it's present in browser. */
1229
- create(callback) {
1230
- return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
1231
- }
1143
+ const FOCUSABLE_ITEM = new InjectionToken('Focusable Option');
1144
+
1145
+ class DeprecatedFocusKeyManagerListDirective extends DeprecatedSelector {
1232
1146
  }
1233
- ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1234
- ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
1235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverFactory, decorators: [{
1236
- type: Injectable,
1237
- args: [{ providedIn: 'root' }]
1147
+ DeprecatedFocusKeyManagerListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1148
+ DeprecatedFocusKeyManagerListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedFocusKeyManagerListDirective, isStandalone: true, selector: "[fd-focus-key-manager-list], [fdFocusKeyManagerList]", providers: [
1149
+ {
1150
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1151
+ useValue: getDeprecatedModel('[fdkFocusKeyManagerList]', '[fd-focus-key-manager-list], [fdFocusKeyManagerList]')
1152
+ }
1153
+ ], usesInheritance: true, ngImport: i0 });
1154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerListDirective, decorators: [{
1155
+ type: Directive,
1156
+ args: [{
1157
+ // eslint-disable-next-line @angular-eslint/directive-selector
1158
+ selector: '[fd-focus-key-manager-list], [fdFocusKeyManagerList]',
1159
+ standalone: true,
1160
+ providers: [
1161
+ {
1162
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1163
+ useValue: getDeprecatedModel('[fdkFocusKeyManagerList]', '[fd-focus-key-manager-list], [fdFocusKeyManagerList]')
1164
+ }
1165
+ ]
1166
+ }]
1238
1167
  }] });
1239
- class ResizeObserverService {
1168
+ /** Directive to apply Angular Material FocusKeyManager to lists.
1169
+ * To be used with FocusKeyManagerItemDirective
1170
+ */
1171
+ class FocusKeyManagerListDirective {
1240
1172
  /** @hidden */
1241
- constructor(_resizeObserverFactory) {
1242
- this._resizeObserverFactory = _resizeObserverFactory;
1243
- /** @hidden */
1244
- this._observedElements = new Map();
1173
+ get focusKeyManager() {
1174
+ return this._focusKeyManager;
1245
1175
  }
1246
1176
  /** @hidden */
1247
- ngOnDestroy() {
1248
- this._observedElements.forEach((_, element) => this._cleanupObserver(element));
1249
- }
1250
- /** Observe the given element and emit whenever its size changes. */
1251
- observe(elementOrRef) {
1252
- const element = coerceElement(elementOrRef);
1253
- return new Observable((observer) => {
1254
- const stream = this._observeElement(element);
1255
- const subscription = stream?.subscribe(observer);
1256
- return () => {
1257
- subscription?.unsubscribe();
1258
- this._unobserveElement(element);
1259
- };
1260
- });
1261
- }
1262
- /**
1263
- * Observes the given element by using the existing MutationObserver if available, or creating a
1264
- * new one if not.
1265
- */
1266
- _observeElement(element) {
1267
- let observedElement = this._observedElements.get(element);
1268
- if (!observedElement) {
1269
- const stream = new Subject();
1270
- const observer = this._resizeObserverFactory.create((mutations) => stream.next(mutations));
1271
- if (observer) {
1272
- observer.observe(element);
1273
- }
1274
- observedElement = { observer, stream, count: 0 };
1275
- this._observedElements.set(element, observedElement);
1276
- }
1277
- observedElement.count++;
1278
- return observedElement?.stream;
1177
+ constructor(_rtlService, _cdr) {
1178
+ this._rtlService = _rtlService;
1179
+ this._cdr = _cdr;
1180
+ /** @hidden */
1181
+ this._onDestroy$ = new Subject();
1279
1182
  }
1280
- /**
1281
- * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is
1282
- * observing this element.
1283
- */
1284
- _unobserveElement(element) {
1285
- const observedElement = this._observedElements.get(element);
1286
- if (!observedElement) {
1287
- return;
1288
- }
1289
- if (--observedElement.count) {
1183
+ /** @hidden */
1184
+ ngOnChanges(changes) {
1185
+ if (!this._focusKeyManager) {
1290
1186
  return;
1291
1187
  }
1292
- this._cleanupObserver(element);
1293
- }
1294
- /** Clean up the underlying MutationObserver for the specified element. */
1295
- _cleanupObserver(element) {
1296
- const observedElement = this._observedElements.get(element);
1297
- if (!observedElement) {
1298
- return;
1188
+ if ('orientation' in changes) {
1189
+ this._applyOrientation();
1299
1190
  }
1300
- const { observer, stream } = observedElement;
1301
- if (observer) {
1302
- observer.disconnect();
1191
+ if ('skiPredicate' in changes) {
1192
+ this._focusKeyManager.skipPredicate(this.skipPredicate);
1303
1193
  }
1304
- stream.complete();
1305
- this._observedElements.delete(element);
1306
1194
  }
1307
- }
1308
- ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
1309
- ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
1310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ResizeObserverService, decorators: [{
1311
- type: Injectable,
1312
- args: [{ providedIn: 'root' }]
1313
- }], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
1314
-
1315
- class TabbableElementService {
1316
1195
  /** @hidden */
1317
- constructor(_checker, _document) {
1318
- this._checker = _checker;
1319
- this._document = _document;
1196
+ ngAfterContentInit() {
1197
+ this._focusKeyManager = new FocusKeyManager(this._items).skipPredicate(this.skipPredicate);
1198
+ this._applyOrientation();
1199
+ this._cdr.detectChanges();
1200
+ this._rtlService?.rtl
1201
+ .pipe(filter(() => this.orientation === 'horizontal'), takeUntil(this._onDestroy$))
1202
+ .subscribe(() => this._applyOrientation());
1320
1203
  }
1321
- /** Get the first tabbable element from a DOM subtree (inclusive). */
1322
- getTabbableElement(root, focusLastElement = false, skipSelf = false) {
1323
- if (!skipSelf && this._checker.isFocusable(root) && this._checker.isTabbable(root)) {
1324
- return root;
1204
+ /** @hidden */
1205
+ ngOnDestroy() {
1206
+ this._onDestroy$.next();
1207
+ this._onDestroy$.complete();
1208
+ this._focusKeyManager.destroy();
1209
+ }
1210
+ /** Focus certain list's item */
1211
+ focusItem(item) {
1212
+ if (typeof item === 'number') {
1213
+ this._focusKeyManager.setActiveItem(item);
1325
1214
  }
1326
- // Iterate in DOM order. Note that IE doesn't have `children` for SVG, so we fall
1327
- // back to `childNodes` which includes text nodes, comments etc.
1328
- const rootChildren = root.children || root.childNodes;
1329
- const children = focusLastElement ? Array.from(rootChildren).reverse() : rootChildren;
1330
- for (let i = 0; i < children.length; i++) {
1331
- const tabbableChild = children[i].nodeType === this._document?.ELEMENT_NODE
1332
- ? this.getTabbableElement(children[i], focusLastElement)
1333
- : null;
1334
- if (tabbableChild) {
1335
- return tabbableChild;
1336
- }
1215
+ else {
1216
+ this._focusKeyManager.setActiveItem(item);
1217
+ }
1218
+ }
1219
+ /** @hidden */
1220
+ _applyOrientation() {
1221
+ switch (this.orientation) {
1222
+ case 'horizontal':
1223
+ this._focusKeyManager.withHorizontalOrientation(this._rtlService?.rtl.value ? 'rtl' : 'ltr');
1224
+ break;
1225
+ case 'vertical':
1226
+ this._focusKeyManager.withVerticalOrientation(true);
1227
+ break;
1337
1228
  }
1338
- return null;
1339
1229
  }
1340
1230
  }
1341
- TabbableElementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, deps: [{ token: i1$1.InteractivityChecker }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1342
- TabbableElementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, providedIn: 'root' });
1343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabbableElementService, decorators: [{
1344
- type: Injectable,
1345
- args: [{ providedIn: 'root' }]
1346
- }], ctorParameters: function () { return [{ type: i1$1.InteractivityChecker }, { type: Document, decorators: [{
1231
+ FocusKeyManagerListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerListDirective, deps: [{ token: RtlService, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1232
+ FocusKeyManagerListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FocusKeyManagerListDirective, isStandalone: true, selector: "[fdkFocusKeyManagerList], [fd-focus-key-manager-list], [fdFocusKeyManagerList]", inputs: { orientation: "orientation", skipPredicate: "skipPredicate" }, queries: [{ propertyName: "_items", predicate: FOCUSABLE_ITEM }], usesOnChanges: true, ngImport: i0 });
1233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerListDirective, decorators: [{
1234
+ type: Directive,
1235
+ args: [{
1236
+ selector: `[fdkFocusKeyManagerList], [fd-focus-key-manager-list], [fdFocusKeyManagerList]`,
1237
+ standalone: true
1238
+ }]
1239
+ }], ctorParameters: function () { return [{ type: RtlService, decorators: [{
1347
1240
  type: Optional
1348
- }, {
1349
- type: Inject,
1350
- args: [DOCUMENT]
1351
- }] }]; } });
1241
+ }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { orientation: [{
1242
+ type: Input
1243
+ }], skipPredicate: [{
1244
+ type: Input
1245
+ }], _items: [{
1246
+ type: ContentChildren,
1247
+ args: [FOCUSABLE_ITEM]
1248
+ }] } });
1352
1249
 
1353
- /**
1354
- * Retrieves native element from ElementRef.
1355
- */
1356
- function getNativeElement(element) {
1357
- let coercible = element;
1358
- if (hasElementRef(element)) {
1359
- coercible = element.elementRef;
1360
- }
1361
- return coerceElement(coercible);
1250
+ class DeprecatedFocusKeyManagerItemDirective extends DeprecatedSelector {
1362
1251
  }
1363
- /**
1364
- * Checks whether object has element reference in it.
1252
+ DeprecatedFocusKeyManagerItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerItemDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1253
+ DeprecatedFocusKeyManagerItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedFocusKeyManagerItemDirective, isStandalone: true, selector: "[fd-focus-key-manager-item], [fdFocusKeyManagerItem]", providers: [
1254
+ {
1255
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1256
+ useValue: getDeprecatedModel('[fdkFocusKeyManagerItem]', '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]')
1257
+ }
1258
+ ], usesInheritance: true, ngImport: i0 });
1259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedFocusKeyManagerItemDirective, decorators: [{
1260
+ type: Directive,
1261
+ args: [{
1262
+ // eslint-disable-next-line @angular-eslint/directive-selector
1263
+ selector: '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]',
1264
+ standalone: true,
1265
+ providers: [
1266
+ {
1267
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1268
+ useValue: getDeprecatedModel('[fdkFocusKeyManagerItem]', '[fd-focus-key-manager-item], [fdFocusKeyManagerItem]')
1269
+ }
1270
+ ]
1271
+ }]
1272
+ }] });
1273
+ /** Directive to apply Angular Material FocusKeyManager to lists.
1274
+ * To be used with FocusKeyManagerItemDirective
1365
1275
  */
1366
- function hasElementRef(something) {
1367
- return something && something['elementRef'] instanceof ElementRef;
1368
- }
1369
-
1370
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
1371
- class AttributeObserver {
1276
+ class FocusKeyManagerItemDirective {
1277
+ /** Whether item should be initially focused */
1278
+ set initialFocus(value) {
1279
+ this._initialFocus = coerceBooleanProperty(value);
1280
+ }
1372
1281
  /** @hidden */
1373
- constructor(_mutationObserverFactory) {
1374
- this._mutationObserverFactory = _mutationObserverFactory;
1375
- /** @Hidden */
1376
- this._observedElements = new Map();
1282
+ get _tabindex() {
1283
+ if (this._initialFocus) {
1284
+ return 0;
1285
+ }
1286
+ return this.nativeElement?.tabIndex ?? -1;
1287
+ }
1288
+ /** Native element of the item */
1289
+ get nativeElement() {
1290
+ return this._elRef?.nativeElement;
1377
1291
  }
1378
1292
  /** @hidden */
1379
- ngOnDestroy() {
1380
- this._observedElements.forEach((_, element) => this._cleanupObserver(element));
1293
+ get _focusKeyManager() {
1294
+ return this._list.focusKeyManager;
1381
1295
  }
1382
- /** @Hidden */
1383
- observe(elementOrRef) {
1384
- const element = getNativeElement(elementOrRef);
1385
- return new Observable((observer) => {
1386
- const stream = this._observeElement(element);
1387
- const subscription = stream.subscribe(observer);
1388
- return () => {
1389
- subscription.unsubscribe();
1390
- this._unobserveElement(element);
1391
- };
1392
- });
1296
+ /** @hidden */
1297
+ constructor(_list, _elRef) {
1298
+ this._list = _list;
1299
+ this._elRef = _elRef;
1300
+ /** @hidden */
1301
+ this._initialFocus = false;
1393
1302
  }
1394
- /** @Hidden */
1395
- unobserve(element) {
1396
- this._unobserveElement(getNativeElement(element));
1303
+ /** @hidden */
1304
+ _onFocus() {
1305
+ // For cases where initially selected item doesn't have 0 index
1306
+ this._focusKeyManager?.updateActiveItem(this);
1397
1307
  }
1398
1308
  /** @hidden */
1399
- _observeElement(element) {
1400
- if (!this._observedElements.has(element)) {
1401
- const stream = new Subject();
1402
- const observer = this._mutationObserverFactory.create((mutations) => stream.next(mutations));
1403
- if (observer) {
1404
- observer.observe(element, {
1405
- attributes: true
1406
- });
1407
- }
1408
- this._observedElements.set(element, { observer, stream, count: 1 });
1409
- }
1410
- else {
1411
- this._observedElements.get(element).count++;
1412
- }
1413
- return this._observedElements.get(element).stream;
1309
+ _onKeydown(event) {
1310
+ this._focusKeyManager?.onKeydown(event);
1414
1311
  }
1415
- /** @Hidden */
1416
- _unobserveElement(element) {
1417
- if (this._observedElements.has(element)) {
1418
- this._observedElements.get(element).count--;
1419
- if (!this._observedElements.get(element).count) {
1420
- this._cleanupObserver(element);
1421
- }
1422
- }
1312
+ /** Focus current item native element */
1313
+ focus() {
1314
+ this._elRef?.nativeElement.focus();
1423
1315
  }
1316
+ }
1317
+ FocusKeyManagerItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerItemDirective, deps: [{ token: FocusKeyManagerListDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1318
+ FocusKeyManagerItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FocusKeyManagerItemDirective, isStandalone: true, selector: "[fdkFocusKeyManagerItem], [fd-focus-key-manager-item], [fdFocusKeyManagerItem]", inputs: { initialFocus: "initialFocus", _tabindex: "_tabindex" }, host: { listeners: { "focus": "_onFocus()", "keydown": "_onKeydown($event)" }, properties: { "attr.tabindex": "this._tabindex" } }, providers: [{ provide: FOCUSABLE_ITEM, useExisting: forwardRef(() => FocusKeyManagerItemDirective) }], ngImport: i0 });
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerItemDirective, decorators: [{
1320
+ type: Directive,
1321
+ args: [{
1322
+ selector: '[fdkFocusKeyManagerItem], [fd-focus-key-manager-item], [fdFocusKeyManagerItem]',
1323
+ standalone: true,
1324
+ providers: [{ provide: FOCUSABLE_ITEM, useExisting: forwardRef(() => FocusKeyManagerItemDirective) }]
1325
+ }]
1326
+ }], ctorParameters: function () { return [{ type: FocusKeyManagerListDirective }, { type: i0.ElementRef }]; }, propDecorators: { initialFocus: [{
1327
+ type: Input
1328
+ }], _tabindex: [{
1329
+ type: Input
1330
+ }, {
1331
+ type: HostBinding,
1332
+ args: ['attr.tabindex']
1333
+ }], _onFocus: [{
1334
+ type: HostListener,
1335
+ args: ['focus']
1336
+ }], _onKeydown: [{
1337
+ type: HostListener,
1338
+ args: ['keydown', ['$event']]
1339
+ }] } });
1340
+
1341
+ class FocusKeyManagerHelpersModule {
1342
+ }
1343
+ FocusKeyManagerHelpersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1344
+ FocusKeyManagerHelpersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, imports: [FocusKeyManagerItemDirective,
1345
+ FocusKeyManagerListDirective,
1346
+ DeprecatedFocusKeyManagerItemDirective,
1347
+ DeprecatedFocusKeyManagerListDirective], exports: [FocusKeyManagerItemDirective,
1348
+ FocusKeyManagerListDirective,
1349
+ DeprecatedFocusKeyManagerItemDirective,
1350
+ DeprecatedFocusKeyManagerListDirective] });
1351
+ FocusKeyManagerHelpersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule });
1352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FocusKeyManagerHelpersModule, decorators: [{
1353
+ type: NgModule,
1354
+ args: [{
1355
+ imports: [
1356
+ FocusKeyManagerItemDirective,
1357
+ FocusKeyManagerListDirective,
1358
+ DeprecatedFocusKeyManagerItemDirective,
1359
+ DeprecatedFocusKeyManagerListDirective
1360
+ ],
1361
+ exports: [
1362
+ FocusKeyManagerItemDirective,
1363
+ FocusKeyManagerListDirective,
1364
+ DeprecatedFocusKeyManagerItemDirective,
1365
+ DeprecatedFocusKeyManagerListDirective
1366
+ ]
1367
+ }]
1368
+ }] });
1369
+
1370
+ const IgnoreClickOnSelectionDirectiveToken = new InjectionToken('Ignore click on selection directive');
1371
+
1372
+ class DeprecatedIgnoreClickOnSelectionDirective extends DeprecatedSelector {
1373
+ }
1374
+ DeprecatedIgnoreClickOnSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedIgnoreClickOnSelectionDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1375
+ DeprecatedIgnoreClickOnSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedIgnoreClickOnSelectionDirective, isStandalone: true, selector: "[fdIgnoreClickOnSelection]", providers: [
1376
+ {
1377
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1378
+ useValue: getDeprecatedModel('[fdkIgnoreClickOnSelection]', '[fdIgnoreClickOnSelection]')
1379
+ }
1380
+ ], usesInheritance: true, ngImport: i0 });
1381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedIgnoreClickOnSelectionDirective, decorators: [{
1382
+ type: Directive,
1383
+ args: [{
1384
+ // eslint-disable-next-line @angular-eslint/directive-selector
1385
+ selector: '[fdIgnoreClickOnSelection]',
1386
+ standalone: true,
1387
+ providers: [
1388
+ {
1389
+ provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1390
+ useValue: getDeprecatedModel('[fdkIgnoreClickOnSelection]', '[fdIgnoreClickOnSelection]')
1391
+ }
1392
+ ]
1393
+ }]
1394
+ }] });
1395
+ /**
1396
+ * Directive will stop propagation and prevent default of click, if selected area is coming from
1397
+ * directive's host element. This gives ability to not cancel all clicks on element, just the ones
1398
+ * which include selection
1399
+ */
1400
+ class IgnoreClickOnSelectionDirective {
1424
1401
  /** @hidden */
1425
- _cleanupObserver(element) {
1426
- if (this._observedElements.has(element)) {
1427
- const { observer, stream } = this._observedElements.get(element);
1428
- if (observer) {
1429
- observer.disconnect();
1402
+ constructor(document, _elementRef) {
1403
+ this.document = document;
1404
+ this._elementRef = _elementRef;
1405
+ }
1406
+ /** Host click listener. Checks for selection existence and if finds one, checks anchor */
1407
+ clicked($event) {
1408
+ const selection = this.document.getSelection();
1409
+ if (selection?.toString()) {
1410
+ if (selection.anchorNode &&
1411
+ (this._elementRef.nativeElement.isSameNode(selection.anchorNode) ||
1412
+ this._elementRef.nativeElement.isSameNode(selection.anchorNode.parentElement))) {
1413
+ $event.stopPropagation();
1414
+ $event.preventDefault();
1430
1415
  }
1431
- stream.complete();
1432
- this._observedElements.delete(element);
1433
1416
  }
1434
1417
  }
1435
1418
  }
1436
- AttributeObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, deps: [{ token: i1$2.MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
1437
- AttributeObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, providedIn: 'root' });
1438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AttributeObserver, decorators: [{
1439
- type: Injectable,
1419
+ IgnoreClickOnSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1420
+ IgnoreClickOnSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IgnoreClickOnSelectionDirective, isStandalone: true, selector: "[fdkIgnoreClickOnSelection], [fdIgnoreClickOnSelection]", host: { listeners: { "click": "clicked($event)" } }, providers: [
1421
+ {
1422
+ provide: IgnoreClickOnSelectionDirectiveToken,
1423
+ useExisting: IgnoreClickOnSelectionDirective
1424
+ }
1425
+ ], ngImport: i0 });
1426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionDirective, decorators: [{
1427
+ type: Directive,
1440
1428
  args: [{
1441
- providedIn: 'root'
1429
+ selector: '[fdkIgnoreClickOnSelection], [fdIgnoreClickOnSelection]',
1430
+ standalone: true,
1431
+ providers: [
1432
+ {
1433
+ provide: IgnoreClickOnSelectionDirectiveToken,
1434
+ useExisting: IgnoreClickOnSelectionDirective
1435
+ }
1436
+ ]
1442
1437
  }]
1443
- }], ctorParameters: function () { return [{ type: i1$2.MutationObserverFactory }]; } });
1438
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
1439
+ type: Inject,
1440
+ args: [DOCUMENT]
1441
+ }] }, { type: i0.ElementRef }]; }, propDecorators: { clicked: [{
1442
+ type: HostListener,
1443
+ args: ['click', ['$event']]
1444
+ }] } });
1445
+
1446
+ class IgnoreClickOnSelectionModule {
1447
+ }
1448
+ IgnoreClickOnSelectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1449
+ IgnoreClickOnSelectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, imports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective], exports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective] });
1450
+ IgnoreClickOnSelectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule });
1451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IgnoreClickOnSelectionModule, decorators: [{
1452
+ type: NgModule,
1453
+ args: [{
1454
+ imports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective],
1455
+ exports: [IgnoreClickOnSelectionDirective, DeprecatedIgnoreClickOnSelectionDirective]
1456
+ }]
1457
+ }] });
1444
1458
 
1445
1459
  class DeprecatedInitialFocusDirective extends DeprecatedSelector {
1446
1460
  constructor() {
@@ -1884,96 +1898,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1884
1898
  }]
1885
1899
  }] });
1886
1900
 
1887
- class MultiAnnouncerDirective {
1888
- /** @hidden */
1889
- constructor(_language$) {
1890
- this._language$ = _language$;
1891
- /** @hidden */
1892
- this._translationResolver = new TranslationResolver();
1893
- /** @hidden */
1894
- this._noResultsAnnounced = false;
1895
- /** @hidden */
1896
- this._resultsAnnounced = false;
1897
- /** @hidden */
1898
- this._announcement = '';
1899
- /** @hidden */
1900
- this._liveAnnouncer = inject(LiveAnnouncer);
1901
- this._init();
1902
- }
1903
- /** @hidden */
1904
- async _init() {
1905
- this._language = await firstValueFrom(this._language$);
1906
- }
1907
- /** @hidden */
1908
- _makeSearchTermChangeAnnouncements(event) {
1909
- if (KeyUtil.isKeyType(event, 'alphabetical') || KeyUtil.isKeyType(event, 'numeric')) {
1910
- this._liveAnnouncer.clear();
1911
- if (!this.multiAnnouncerOptions.length && !this._noResultsAnnounced) {
1912
- this._buildAnnouncement('noResults');
1913
- this._noResultsAnnounced = true;
1914
- this._resultsAnnounced = false;
1915
- }
1916
- else if (this.multiAnnouncerOptions.length) {
1917
- this._buildAnnouncement(this.multiAnnouncerOptions.length);
1918
- if (!this._resultsAnnounced) {
1919
- this._buildAnnouncement('navigateSelectionsWithArrows');
1920
- this._noResultsAnnounced = false;
1921
- this._resultsAnnounced = true;
1922
- }
1923
- }
1924
- this._buildAnnouncement('escapeNavigateTokens');
1925
- this._makeAnnouncement(this._announcement);
1926
- }
1927
- }
1928
- /** @hidden */
1929
- _buildAnnouncement(message) {
1930
- this._announcement =
1931
- this._announcement +
1932
- this._translationResolver.resolve(this._language, typeof message === 'string'
1933
- ? 'coreMultiInput.' + message
1934
- : message === 1
1935
- ? 'coreMultiInput.countListResultsSingular'
1936
- : 'coreMultiInput.countListResultsPlural', { count: message }) +
1937
- ' ';
1938
- }
1939
- /** @hidden */
1940
- async _makeAnnouncement(message) {
1941
- await this._liveAnnouncer.announce(message, 'assertive').then(() => {
1942
- this._announcement = '';
1943
- });
1944
- }
1945
- }
1946
- MultiAnnouncerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerDirective, deps: [{ token: FD_LANGUAGE }], target: i0.ɵɵFactoryTarget.Directive });
1947
- MultiAnnouncerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: MultiAnnouncerDirective, isStandalone: true, selector: "[fdkMultiAnnouncer]", inputs: { multiAnnouncerOptions: "multiAnnouncerOptions" }, host: { listeners: { "keyup": "_makeSearchTermChangeAnnouncements($event)" } }, exportAs: ["fdkMultiAnnouncer"], ngImport: i0 });
1948
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerDirective, decorators: [{
1949
- type: Directive,
1950
- args: [{
1951
- selector: '[fdkMultiAnnouncer]',
1952
- exportAs: 'fdkMultiAnnouncer',
1953
- standalone: true
1954
- }]
1955
- }], ctorParameters: function () { return [{ type: i1$3.Observable, decorators: [{
1956
- type: Inject,
1957
- args: [FD_LANGUAGE]
1958
- }] }]; }, propDecorators: { multiAnnouncerOptions: [{
1959
- type: Input
1960
- }], _makeSearchTermChangeAnnouncements: [{
1961
- type: HostListener,
1962
- args: ['keyup', ['$event']]
1963
- }] } });
1964
- class MultiAnnouncerModule {
1965
- }
1966
- MultiAnnouncerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1967
- MultiAnnouncerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerModule, imports: [MultiAnnouncerDirective], exports: [MultiAnnouncerDirective] });
1968
- MultiAnnouncerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerModule });
1969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiAnnouncerModule, decorators: [{
1970
- type: NgModule,
1971
- args: [{
1972
- imports: [MultiAnnouncerDirective],
1973
- exports: [MultiAnnouncerDirective]
1974
- }]
1975
- }] });
1976
-
1977
1901
  class DeprecatedOnlyDigitsDirective extends DeprecatedSelector {
1978
1902
  }
1979
1903
  DeprecatedOnlyDigitsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedOnlyDigitsDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
@@ -2352,7 +2276,7 @@ class OverflowListDirective {
2352
2276
  });
2353
2277
  }
2354
2278
  }
2355
- OverflowListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OverflowListDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ViewportRuler }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2279
+ OverflowListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OverflowListDirective, deps: [{ token: i0.ElementRef }, { token: i1$3.ViewportRuler }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2356
2280
  OverflowListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: OverflowListDirective, isStandalone: true, selector: "[fdkOverflowList], [fdOverflowList], [fd-overflow-list]", inputs: { overflowOffset: "overflowOffset", isRtl: "isRtl", itemCssBlockValue: "itemCssBlockValue" }, outputs: { overflowChanged: "overflowChanged" }, queries: [{ propertyName: "overflowItems", predicate: OverflowListItemDirective }], ngImport: i0 });
2357
2281
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OverflowListDirective, decorators: [{
2358
2282
  type: Directive,
@@ -2360,7 +2284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2360
2284
  selector: '[fdkOverflowList], [fdOverflowList], [fd-overflow-list]',
2361
2285
  standalone: true
2362
2286
  }]
2363
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ViewportRuler }, { type: i0.NgZone }]; }, propDecorators: { overflowOffset: [{
2287
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ViewportRuler }, { type: i0.NgZone }]; }, propDecorators: { overflowOffset: [{
2364
2288
  type: Input
2365
2289
  }], isRtl: [{
2366
2290
  type: Input
@@ -6009,7 +5933,7 @@ class DndItemDirective {
6009
5933
  }));
6010
5934
  }
6011
5935
  }
6012
- DndItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DndItemDirective, deps: [{ token: i0.ElementRef }, { token: i1$5.DragDrop }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
5936
+ DndItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DndItemDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.DragDrop }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
6013
5937
  DndItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DndItemDirective, selector: "[fdkDndItem], [fd-dnd-item]", inputs: { item: ["fdkDndItem", "item"], applyDragItemClass: "applyDragItemClass", containerSelector: "containerSelector", stickInPlace: "stickInPlace", draggable: "draggable", classWhenElementDragged: "classWhenElementDragged" }, outputs: { moved: "moved", released: "released", started: "started" }, host: { properties: { "class.fd-dnd-item": "this.applyDragItemClass" } }, providers: [DragDrop, { provide: DND_ITEM, useExisting: forwardRef(() => DndItemDirective) }], ngImport: i0 });
6014
5938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DndItemDirective, decorators: [{
6015
5939
  type: Directive,
@@ -6017,7 +5941,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
6017
5941
  selector: '[fdkDndItem], [fd-dnd-item]',
6018
5942
  providers: [DragDrop, { provide: DND_ITEM, useExisting: forwardRef(() => DndItemDirective) }]
6019
5943
  }]
6020
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$5.DragDrop }, { type: i0.Renderer2 }]; }, propDecorators: { item: [{
5944
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.DragDrop }, { type: i0.Renderer2 }]; }, propDecorators: { item: [{
6021
5945
  type: Input,
6022
5946
  args: ['fdkDndItem']
6023
5947
  }], applyDragItemClass: [{
@@ -6458,7 +6382,7 @@ class DynamicPortalComponent {
6458
6382
  }
6459
6383
  }
6460
6384
  DynamicPortalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DynamicPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6461
- DynamicPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DynamicPortalComponent, isStandalone: true, selector: "fdk-dynamic-portal", inputs: { domElement: "domElement", component: "component", template: "template" }, usesOnChanges: true, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="portal"></ng-template>`, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
6385
+ DynamicPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DynamicPortalComponent, isStandalone: true, selector: "fdk-dynamic-portal", inputs: { domElement: "domElement", component: "component", template: "template" }, usesOnChanges: true, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="portal"></ng-template>`, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
6462
6386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DynamicPortalComponent, decorators: [{
6463
6387
  type: Component,
6464
6388
  args: [{
@@ -7203,11 +7127,11 @@ class BaseToastService {
7203
7127
  return !!position.boundTo;
7204
7128
  }
7205
7129
  }
7206
- BaseToastService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseToastService, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
7130
+ BaseToastService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseToastService, deps: [{ token: i1$3.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
7207
7131
  BaseToastService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseToastService });
7208
7132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseToastService, decorators: [{
7209
7133
  type: Injectable
7210
- }], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }]; } });
7134
+ }], ctorParameters: function () { return [{ type: i1$3.Overlay }, { type: i0.Injector }]; } });
7211
7135
 
7212
7136
  const toastConnectedTopPosition = {
7213
7137
  originX: 'center',
@@ -7708,5 +7632,5 @@ class BaseToastDurationDismissibleConfig extends BaseToastConfig {
7708
7632
  * Generated bundle index. Do not edit.
7709
7633
  */
7710
7634
 
7711
- export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AsyncOrSyncPipe, AttributeObserver, AutoCompleteDirective, AutoCompleteModule, BaseAnimatedToastConfig, BaseDismissibleToastService, BaseToastActionDismissibleRef, BaseToastConfig, BaseToastContainerComponent, BaseToastDurationDismissibleConfig, BaseToastDurationDismissibleContainerComponent, BaseToastDurationDismissibleRef, BaseToastOverlayContainer, BaseToastPosition, BaseToastRef, BaseToastService, BreakpointDirective, BreakpointModule, ClickedBehaviorModule, ClickedDirective, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DND_ITEM, DND_LIST, DefaultReadonlyViewModifier, DeprecatedAutoCompleteDirective, DeprecatedClickedDirective, DeprecatedDisabledBehaviorDirective, DeprecatedFocusKeyManagerItemDirective, DeprecatedFocusKeyManagerListDirective, DeprecatedFocusableItemDirective, DeprecatedFocusableListDirective, DeprecatedIgnoreClickOnSelectionDirective, DeprecatedInitialFocusDirective, DeprecatedLineClampDirective, DeprecatedLineClampTargetDirective, DeprecatedOnlyDigitsDirective, DeprecatedOverflowListDirective, DeprecatedOverflowListItemDirective, DeprecatedReadonlyBehaviorDirective, DeprecatedRepeatDirective, DeprecatedResizeDirective, DeprecatedResizeHandleDirective, DeprecatedTemplateSelectorDirective, DeprecatedTruncateSelectorDirective, DestroyedService, DisabledBehaviorDirective, DisabledBehaviorModule, DisabledObserver, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, DynamicPortalComponent, ELEMENT_REF_EXCEPTION, FDK_DISABLED_DIRECTIVE, FDK_FOCUSABLE_GRID_DIRECTIVE, FDK_FOCUSABLE_ITEM_DIRECTIVE, FDK_FOCUSABLE_LIST_DIRECTIVE, FDK_READONLY_DIRECTIVE, FDK_SELECTABLE_ITEM_PROVIDER, FOCUSABLE_ITEM, FdkClickedProvider, FdkDisabledProvider, FdkReadonlyProvider, FilterStringsPipe, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, FocusableGridDirective, FocusableGridModule, FocusableItemDirective, FocusableItemModule, FocusableListDirective, FocusableListModule, FocusableObserver, FunctionStrategy, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionDirectiveToken, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IntersectionSpyDirective, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, MakeAsyncPipe, ModuleDeprecations, MultiAnnouncerDirective, MultiAnnouncerModule, OVERFLOW_PRIORITY_SCORE, ObservableStrategy, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, PromiseStrategy, RTL_LANGUAGE, RangeSelector, ReadonlyBehaviorDirective, ReadonlyBehaviorModule, ReadonlyObserver, RepeatDirective, RepeatModule, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, ResponsiveBreakpoints, RtlService, SafePipe, SearchHighlightPipe, SelectComponentRootToken, SelectableItemDirective, SelectableItemToken, SelectableListDirective, SelectableListModule, SelectionService, THEME_SWITCHER_ROUTER_MISSING_ERROR, TabbableElementService, TemplateDirective, TemplateModule, ThemesService, ToastBottomCenterPosition, ToastBottomLeftPosition, ToastBottomRightPosition, ToastTopCenterPosition, ToastTopLeftPosition, ToastTopRightPosition, TruncateDirective, TruncateModule, TruncatePipe, TwoDigitsPipe, UtilsModule, ValueByPathPipe, ValueStrategy, ViewportSizeObservable, alternateSetter, applyCssClass, applyCssStyle, baseToastAnimations, coerceArraySafe, coerceBoolean, coerceCssPixel, consumerProviderFactory, dfs, getBreakpointName, getDocumentFontSize, getElementCapacity, getElementWidth, getNativeElement, getRandomColorAccent, hasElementRef, intersectionObservable, isBlank, isBoolean, isCompactDensity, isFunction, isJsObject, isNumber, isObject, isOdd, isPresent, isPromise, isString, isStringMap, isSubscribable, isType, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollIntoView, scrollTop, selectStrategy, setDisabledState, setReadonlyState, toNativeElement, toastConnectedBottomLeftPosition, toastConnectedBottomPosition, toastConnectedBottomRightPosition, toastConnectedTopLeftPosition, toastConnectedTopPosition, toastConnectedTopRightPosition, uuidv4 };
7635
+ export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AsyncOrSyncPipe, AttributeObserver, AutoCompleteDirective, AutoCompleteModule, BaseAnimatedToastConfig, BaseDismissibleToastService, BaseToastActionDismissibleRef, BaseToastConfig, BaseToastContainerComponent, BaseToastDurationDismissibleConfig, BaseToastDurationDismissibleContainerComponent, BaseToastDurationDismissibleRef, BaseToastOverlayContainer, BaseToastPosition, BaseToastRef, BaseToastService, BreakpointDirective, BreakpointModule, ClickedBehaviorModule, ClickedDirective, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DND_ITEM, DND_LIST, DefaultReadonlyViewModifier, DeprecatedAutoCompleteDirective, DeprecatedClickedDirective, DeprecatedDisabledBehaviorDirective, DeprecatedFocusKeyManagerItemDirective, DeprecatedFocusKeyManagerListDirective, DeprecatedFocusableItemDirective, DeprecatedFocusableListDirective, DeprecatedIgnoreClickOnSelectionDirective, DeprecatedInitialFocusDirective, DeprecatedLineClampDirective, DeprecatedLineClampTargetDirective, DeprecatedOnlyDigitsDirective, DeprecatedOverflowListDirective, DeprecatedOverflowListItemDirective, DeprecatedReadonlyBehaviorDirective, DeprecatedRepeatDirective, DeprecatedResizeDirective, DeprecatedResizeHandleDirective, DeprecatedTemplateSelectorDirective, DeprecatedTruncateSelectorDirective, DestroyedService, DisabledBehaviorDirective, DisabledBehaviorModule, DisabledObserver, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, DynamicPortalComponent, ELEMENT_REF_EXCEPTION, FDK_DISABLED_DIRECTIVE, FDK_FOCUSABLE_GRID_DIRECTIVE, FDK_FOCUSABLE_ITEM_DIRECTIVE, FDK_FOCUSABLE_LIST_DIRECTIVE, FDK_READONLY_DIRECTIVE, FDK_SELECTABLE_ITEM_PROVIDER, FOCUSABLE_ITEM, FdkClickedProvider, FdkDisabledProvider, FdkReadonlyProvider, FilterStringsPipe, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, FocusableGridDirective, FocusableGridModule, FocusableItemDirective, FocusableItemModule, FocusableListDirective, FocusableListModule, FocusableObserver, FunctionStrategy, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionDirectiveToken, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IntersectionSpyDirective, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, MakeAsyncPipe, ModuleDeprecations, OVERFLOW_PRIORITY_SCORE, ObservableStrategy, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, PromiseStrategy, RTL_LANGUAGE, RangeSelector, ReadonlyBehaviorDirective, ReadonlyBehaviorModule, ReadonlyObserver, RepeatDirective, RepeatModule, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, ResponsiveBreakpoints, RtlService, SafePipe, SearchHighlightPipe, SelectComponentRootToken, SelectableItemDirective, SelectableItemToken, SelectableListDirective, SelectableListModule, SelectionService, THEME_SWITCHER_ROUTER_MISSING_ERROR, TabbableElementService, TemplateDirective, TemplateModule, ThemesService, ToastBottomCenterPosition, ToastBottomLeftPosition, ToastBottomRightPosition, ToastTopCenterPosition, ToastTopLeftPosition, ToastTopRightPosition, TruncateDirective, TruncateModule, TruncatePipe, TwoDigitsPipe, UtilsModule, ValueByPathPipe, ValueStrategy, ViewportSizeObservable, alternateSetter, applyCssClass, applyCssStyle, baseToastAnimations, coerceArraySafe, coerceBoolean, coerceCssPixel, consumerProviderFactory, dfs, getBreakpointName, getDocumentFontSize, getElementCapacity, getElementWidth, getNativeElement, getRandomColorAccent, hasElementRef, intersectionObservable, isBlank, isBoolean, isCompactDensity, isFunction, isJsObject, isNumber, isObject, isOdd, isPresent, isPromise, isString, isStringMap, isSubscribable, isType, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollIntoView, scrollTop, selectStrategy, setDisabledState, setReadonlyState, toNativeElement, toastConnectedBottomLeftPosition, toastConnectedBottomPosition, toastConnectedBottomRightPosition, toastConnectedTopLeftPosition, toastConnectedTopPosition, toastConnectedTopRightPosition, uuidv4 };
7712
7636
  //# sourceMappingURL=fundamental-ngx-cdk-utils.mjs.map