igniteui-angular 21.2.6 → 21.2.8

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.
@@ -14636,7 +14636,10 @@ class IgxGridTransactionPipe {
14636
14636
  const result = DataUtil.mergeTransactions(cloneArray(collection), this.grid.transactions.getAggregatedChanges(true), this.grid.primaryKey, this.grid.dataCloneStrategy);
14637
14637
  return result;
14638
14638
  }
14639
- return collection;
14639
+ // Return a shallow copy so downstream pipes and igxGridForOf always
14640
+ // receive a new array reference when pipeTrigger changes, regardless
14641
+ // of whether the source array was mutated in place.
14642
+ return cloneArray(collection);
14640
14643
  }
14641
14644
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IgxGridTransactionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
14642
14645
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: IgxGridTransactionPipe, isStandalone: true, name: "gridTransaction" }); }
@@ -23033,6 +23036,58 @@ class RowEditPositionStrategy extends ConnectedPositioningStrategy {
23033
23036
  this.settings.verticalStartPoint = this.settings.verticalDirection = this.isTop ? VerticalAlignment.Top : VerticalAlignment.Bottom;
23034
23037
  this.settings.openAnimation = this.isTop ? scaleInVerBottom : scaleInVerTop;
23035
23038
  super.position(contentElement, { width: targetElement.clientWidth, height: targetElement.clientHeight }, document, initialCall, targetElement);
23039
+ if (this.settings.clipToVisibleArea) {
23040
+ // After positioning in the top layer, keep the overlay clipped to the visible grid body.
23041
+ this.updateContentClip(contentElement);
23042
+ }
23043
+ }
23044
+ updateContentClip(contentElement) {
23045
+ const container = this.settings.container;
23046
+ if (!container) {
23047
+ return;
23048
+ }
23049
+ const clippingRect = this.getClippingRect(container);
23050
+ const contentRect = contentElement.getBoundingClientRect();
23051
+ // Convert the clipped overflow on each side to CSS inset values.
23052
+ const top = Math.round(Math.max(clippingRect.top - contentRect.top, 0));
23053
+ const right = Math.round(Math.max(contentRect.right - clippingRect.right, 0));
23054
+ const bottom = Math.round(Math.max(contentRect.bottom - clippingRect.bottom, 0));
23055
+ const left = Math.round(Math.max(clippingRect.left - contentRect.left, 0));
23056
+ // When the overlay is fully outside the clipping rect, hide it and block its action buttons.
23057
+ const fullyClipped = top >= contentRect.height || bottom >= contentRect.height ||
23058
+ left >= contentRect.width || right >= contentRect.width;
23059
+ // Row-edit overlays are rendered in the top layer, so clip the content explicitly to the grid's visible area.
23060
+ contentElement.style.clipPath = fullyClipped ? 'inset(100%)' :
23061
+ (top || right || bottom || left ? `inset(${top}px ${right}px ${bottom}px ${left}px)` : '');
23062
+ contentElement.style.pointerEvents = fullyClipped ? 'none' : '';
23063
+ contentElement.style.visibility = fullyClipped ? 'hidden' : '';
23064
+ }
23065
+ getClippingRect(element) {
23066
+ const document = element.ownerDocument;
23067
+ const gridBody = element.closest('[igxgridbody]') || element;
23068
+ const rect = gridBody.getBoundingClientRect();
23069
+ // Start with the current grid body, then narrow it by parent grid bodies.
23070
+ const clippingRect = { top: rect.top, right: rect.right, bottom: rect.bottom, left: rect.left };
23071
+ let parent = gridBody.parentElement?.closest('[igxgridbody]');
23072
+ // Intersect with parent grid bodies so nested grids respect their parent scroll bounds.
23073
+ while (parent) {
23074
+ const parentRect = parent.getBoundingClientRect();
23075
+ clippingRect.top = Math.max(clippingRect.top, parentRect.top);
23076
+ clippingRect.right = Math.min(clippingRect.right, parentRect.right);
23077
+ clippingRect.bottom = Math.min(clippingRect.bottom, parentRect.bottom);
23078
+ clippingRect.left = Math.max(clippingRect.left, parentRect.left);
23079
+ if (clippingRect.top >= clippingRect.bottom || clippingRect.left >= clippingRect.right) {
23080
+ break;
23081
+ }
23082
+ parent = parent.parentElement?.closest('[igxgridbody]');
23083
+ }
23084
+ // Keep the clipping area inside the viewport because popover content is viewport-positioned.
23085
+ return {
23086
+ top: Math.max(clippingRect.top, 0),
23087
+ right: Math.min(clippingRect.right, document.documentElement.clientWidth),
23088
+ bottom: Math.min(clippingRect.bottom, document.documentElement.clientHeight),
23089
+ left: Math.max(clippingRect.left, 0)
23090
+ };
23036
23091
  }
23037
23092
  /**
23038
23093
  * Cleans up the IntersectionObserver and stored references
@@ -24734,8 +24789,8 @@ class GridBaseAPIService {
24734
24789
  grid.transactions.add(transaction);
24735
24790
  }
24736
24791
  else {
24737
- grid.data.push(rowData);
24738
- grid.data = cloneArray(grid.data);
24792
+ (grid.data ?? (grid.data = [])).push(rowData);
24793
+ grid.summaryService.clearSummaryCache();
24739
24794
  }
24740
24795
  grid.validation.markAsTouched(rowId);
24741
24796
  grid.validation.update(rowId, rowData);
@@ -24750,8 +24805,8 @@ class GridBaseAPIService {
24750
24805
  grid.transactions.add(transaction, grid.data[index]);
24751
24806
  }
24752
24807
  else {
24753
- grid.data.splice(index, 1);
24754
- grid.data = cloneArray(grid.data);
24808
+ (grid.data ?? (grid.data = [])).splice(index, 1);
24809
+ grid.summaryService.clearSummaryCache();
24755
24810
  }
24756
24811
  }
24757
24812
  else {