@fundamental-ngx/cdk 0.43.0-rc.8 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1436,9 +1436,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1436
1436
  }], ctorParameters: function () { return [{ type: i1$2.MutationObserverFactory }]; } });
1437
1437
 
1438
1438
  class DeprecatedInitialFocusDirective extends DeprecatedSelector {
1439
+ constructor() {
1440
+ super(...arguments);
1441
+ /** @hidden */
1442
+ this._initialFocusDirective = inject(InitialFocusDirective, { host: true });
1443
+ }
1444
+ /**
1445
+ * CSS selector of an element that should be focused.
1446
+ */
1447
+ set initialFocusTarget(value) {
1448
+ this._initialFocusDirective.fdkInitialFocus = value;
1449
+ }
1439
1450
  }
1440
1451
  DeprecatedInitialFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeprecatedInitialFocusDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1441
- DeprecatedInitialFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedInitialFocusDirective, isStandalone: true, selector: "[fdInitialFocus], [fd-initial-focus]", providers: [
1452
+ DeprecatedInitialFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DeprecatedInitialFocusDirective, isStandalone: true, selector: "[fdInitialFocus], [fd-initial-focus]", inputs: { initialFocusTarget: ["fd-initial-focus", "initialFocusTarget"] }, providers: [
1442
1453
  {
1443
1454
  provide: FD_DEPRECATED_DIRECTIVE_SELECTOR,
1444
1455
  useValue: getDeprecatedModel('[fdkInitialFocus]', '[fdInitialFocus], [fd-initial-focus]')
@@ -1457,7 +1468,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1457
1468
  }
1458
1469
  ]
1459
1470
  }]
1460
- }] });
1471
+ }], propDecorators: { initialFocusTarget: [{
1472
+ type: Input,
1473
+ args: ['fd-initial-focus']
1474
+ }] } });
1461
1475
  class InitialFocusDirective {
1462
1476
  /**
1463
1477
  * Whether initial focus enabled for a current element.
@@ -1479,7 +1493,7 @@ class InitialFocusDirective {
1479
1493
  /**
1480
1494
  * CSS selector of an element that should be focused.
1481
1495
  */
1482
- this.focusableItem = '.fd-initial-focus-item';
1496
+ this.fdkInitialFocus = '.fd-initial-focus-item';
1483
1497
  /** @hidden */
1484
1498
  this._destroy$ = inject(DestroyedService);
1485
1499
  /** @hidden */
@@ -1514,10 +1528,11 @@ class InitialFocusDirective {
1514
1528
  * Searches for an appropriate focusable element
1515
1529
  */
1516
1530
  _getFocusableElement() {
1517
- if (!this.focusableItem) {
1531
+ if (!this.fdkInitialFocus) {
1518
1532
  return this._tabbableService.getTabbableElement(this._elmRef.nativeElement, this.focusLastElement);
1519
1533
  }
1520
- const autoFocusableItems = this._elmRef.nativeElement.querySelectorAll(this.focusableItem);
1534
+ const autoFocusableItems = this._elmRef.nativeElement.querySelectorAll(this.fdkInitialFocus);
1535
+ console.log(autoFocusableItems);
1521
1536
  if (autoFocusableItems.length > 0) {
1522
1537
  return !this.focusLastElement ? autoFocusableItems[0] : autoFocusableItems[autoFocusableItems.length - 1];
1523
1538
  }
@@ -1534,7 +1549,7 @@ class InitialFocusDirective {
1534
1549
  }
1535
1550
  }
1536
1551
  InitialFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InitialFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TabbableElementService }], target: i0.ɵɵFactoryTarget.Directive });
1537
- InitialFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: InitialFocusDirective, isStandalone: true, selector: "[fdkInitialFocus], [fdInitialFocus], [fd-initial-focus]", inputs: { focusableItem: ["fd-initial-focus", "focusableItem"], enabled: "enabled", focusLastElement: "focusLastElement" }, providers: [
1552
+ InitialFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: InitialFocusDirective, isStandalone: true, selector: "[fdkInitialFocus], [fdInitialFocus], [fd-initial-focus]", inputs: { fdkInitialFocus: "fdkInitialFocus", enabled: "enabled", focusLastElement: "focusLastElement" }, providers: [
1538
1553
  DestroyedService,
1539
1554
  TabbableElementService,
1540
1555
  {
@@ -1556,9 +1571,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1556
1571
  }
1557
1572
  ]
1558
1573
  }]
1559
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: TabbableElementService }]; }, propDecorators: { focusableItem: [{
1560
- type: Input,
1561
- args: ['fd-initial-focus']
1574
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: TabbableElementService }]; }, propDecorators: { fdkInitialFocus: [{
1575
+ type: Input
1562
1576
  }], enabled: [{
1563
1577
  type: Input
1564
1578
  }], focusLastElement: [{