@fundamental-ngx/core 0.65.0-rc.9 → 0.65.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.
Files changed (28) hide show
  1. package/fesm2022/fundamental-ngx-core-avatar-group.mjs +118 -39
  2. package/fesm2022/fundamental-ngx-core-avatar-group.mjs.map +1 -1
  3. package/fesm2022/fundamental-ngx-core-combobox.mjs +165 -21
  4. package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
  5. package/fesm2022/fundamental-ngx-core-date-picker.mjs +1 -4
  6. package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
  7. package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +21 -0
  8. package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
  9. package/fesm2022/fundamental-ngx-core-icon.mjs +2 -2
  10. package/fesm2022/fundamental-ngx-core-icon.mjs.map +1 -1
  11. package/fesm2022/fundamental-ngx-core-menu.mjs +63 -2
  12. package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
  13. package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +20 -35
  14. package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
  15. package/fesm2022/fundamental-ngx-core-popover.mjs +22 -40
  16. package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
  17. package/fesm2022/fundamental-ngx-core-table.mjs +373 -499
  18. package/fesm2022/fundamental-ngx-core-table.mjs.map +1 -1
  19. package/package.json +3 -3
  20. package/schematics/package.json +1 -1
  21. package/types/fundamental-ngx-core-avatar-group.d.ts +52 -19
  22. package/types/fundamental-ngx-core-combobox.d.ts +44 -6
  23. package/types/fundamental-ngx-core-datetime-picker.d.ts +3 -1
  24. package/types/fundamental-ngx-core-menu.d.ts +8 -1
  25. package/types/fundamental-ngx-core-mobile-mode.d.ts +2 -0
  26. package/types/fundamental-ngx-core-multi-combobox.d.ts +1 -1
  27. package/types/fundamental-ngx-core-popover.d.ts +11 -16
  28. package/types/fundamental-ngx-core-table.d.ts +133 -164
@@ -836,7 +836,7 @@ class PopoverService {
836
836
  if ((!this._overlayRef || !this._overlayRef.hasAttached()) && !this.disabled() && this._triggerElement) {
837
837
  const position = this._getPositionStrategy();
838
838
  this._overlayRef = this._overlay.create(this._getOverlayConfig(position));
839
- this._startAncestorResizeObserver();
839
+ this._startLayoutShiftObserver();
840
840
  if (this._placementContainerValue) {
841
841
  const placementElement = this._placementContainerValue instanceof ElementRef
842
842
  ? this._placementContainerValue.nativeElement
@@ -1352,31 +1352,30 @@ class PopoverService {
1352
1352
  }
1353
1353
  /**
1354
1354
  * @hidden
1355
- * Starts a MutationObserver on the nearest scrollable ancestor of the trigger element (falling
1356
- * back to document.body) to detect layout shifts that would invalidate the overlay position.
1357
- * Two mutation types are observed within the subtree:
1358
- * - `childList`: catches elements being added to or removed from the DOM (e.g. a banner/toast
1359
- * that is fully removed after its timer expires).
1360
- * - `attributes` with `attributeFilter: ['style', 'class']`: catches visibility toggling via
1361
- * CSS (e.g. `display: none` applied inline or through a utility class, as the
1362
- * `fd-message-strip` autoDismiss directive does).
1363
- * The callback is debounced through `requestAnimationFrame` so that rapid batched mutations
1364
- * (Angular rendering a whole subtree at once) only trigger a single `updatePosition()` call.
1355
+ * Starts a MutationObserver on document.body to detect any layout shift that could
1356
+ * invalidate the overlay position — including mutations in elements outside the trigger's
1357
+ * nearest scroll container (e.g. a collapsible header above a table pushing the trigger down).
1358
+ *
1359
+ * Observed mutation types:
1360
+ * - `childList`: elements added/removed from the DOM (Angular `@if`, ngIf, toast dismissed).
1361
+ * - `attributes` with `attributeFilter: ['style', 'class']`: visibility toggled via CSS.
1362
+ *
1363
+ * The callback is debounced through `requestAnimationFrame` so rapid batched mutations
1364
+ * only trigger a single `updatePosition()` call per frame.
1365
1365
  */
1366
- _startAncestorResizeObserver() {
1366
+ _startLayoutShiftObserver() {
1367
1367
  const trigger = this._triggerHtmlElement;
1368
1368
  if (!trigger) {
1369
1369
  return;
1370
1370
  }
1371
1371
  let animationFrame = null;
1372
1372
  const scheduleUpdate = (records) => {
1373
- // Skip self-caused mutations, else we loop: updatePosition() writes `style` on the
1374
- // overlay's position wrapper (.cdk-overlay-connected-position-bounding-box), which this
1375
- // observer would see and react to. Test against .cdk-overlay-container, not
1376
- // overlayElement -- the wrapper is overlayElement's parent, so it isn't contained by it.
1377
- const overlayEl = this._overlayRef?.overlayElement;
1378
- const overlayContainer = overlayEl?.closest('.cdk-overlay-container') ?? overlayEl;
1379
- if (overlayContainer && records.every((record) => overlayContainer.contains(record.target))) {
1373
+ // Skip self-caused mutations: updatePosition() writes `style` on hostElement
1374
+ // (the CDK position bounding-box) and its descendants. Using hostElement as the
1375
+ // scope boundary covers both the default case (.cdk-overlay-container) and the
1376
+ // placementContainer case where the host is moved outside that container.
1377
+ const overlayHost = this._overlayRef?.hostElement;
1378
+ if (overlayHost && records.every((record) => overlayHost.contains(record.target))) {
1380
1379
  return;
1381
1380
  }
1382
1381
  if (animationFrame !== null) {
@@ -1388,29 +1387,13 @@ class PopoverService {
1388
1387
  });
1389
1388
  };
1390
1389
  this._ancestorMutationObserver = new MutationObserver(scheduleUpdate);
1391
- const container = this._findScrollableAncestor(trigger);
1392
- this._ancestorMutationObserver.observe(container, {
1390
+ this._ancestorMutationObserver.observe(document.body, {
1393
1391
  subtree: true,
1394
1392
  childList: true,
1395
1393
  attributes: true,
1396
1394
  attributeFilter: ['style', 'class']
1397
1395
  });
1398
1396
  }
1399
- /**
1400
- * @hidden
1401
- * Returns the nearest scrollable ancestor, or document.body when none is found.
1402
- */
1403
- _findScrollableAncestor(el) {
1404
- let parent = el.parentElement;
1405
- while (parent && parent !== document.body) {
1406
- const { overflow, overflowX, overflowY } = getComputedStyle(parent);
1407
- if (/auto|scroll|overlay/.test(overflow + overflowX + overflowY)) {
1408
- return parent;
1409
- }
1410
- parent = parent.parentElement;
1411
- }
1412
- return document.body;
1413
- }
1414
1397
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1415
1398
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverService }); }
1416
1399
  }
@@ -1751,10 +1734,10 @@ class PopoverComponent {
1751
1734
  bodyRole: effectiveConfig.bodyRole,
1752
1735
  bodyAriaLabelledBy: effectiveConfig.bodyAriaLabelledBy
1753
1736
  });
1754
- // Full sync only when trigger is set and not in mobile mode (for fdPopoverTrigger directive).
1755
1737
  // In mobile mode, the dialog handles open/close — the popover service should not be involved.
1756
- if (triggerValue && !this.mobile()) {
1757
- this._syncToService(effectiveConfig, triggerValue);
1738
+ const triggerElement = triggerValue ?? this.triggerOrigin()?.elementRef.nativeElement;
1739
+ if (triggerElement && !this.mobile()) {
1740
+ this._syncToService(effectiveConfig, triggerElement);
1758
1741
  }
1759
1742
  });
1760
1743
  }
@@ -1876,7 +1859,6 @@ class PopoverComponent {
1876
1859
  this._popoverService.closeOnNavigation.set(effectiveConfig.closeOnNavigation);
1877
1860
  this._popoverService.fixedPosition.set(effectiveConfig.fixedPosition);
1878
1861
  this._popoverService.resizable.set(effectiveConfig.resizable);
1879
- this._popoverService.isOpen.set(this.isOpen());
1880
1862
  this._popoverService.updateTriggerElement(triggerValue);
1881
1863
  }
1882
1864
  /** @hidden Select and instantiate popover view mode */