@firestitch/list 18.0.83 → 18.0.84

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 (31) hide show
  1. package/app/classes/data-controller.d.ts +6 -1
  2. package/app/components/body/row/inline-action/inline-action.component.d.ts +2 -3
  3. package/app/components/list/list.component.d.ts +0 -7
  4. package/app/directives/draggable-list/draggable-list.directive.d.ts +45 -3
  5. package/esm2022/app/classes/data-controller.mjs +7 -2
  6. package/esm2022/app/classes/index.mjs +1 -1
  7. package/esm2022/app/classes/reorder-controller.mjs +14 -6
  8. package/esm2022/app/components/body/row/cell/cell.component.mjs +3 -3
  9. package/esm2022/app/components/body/row/inline-action/inline-action.component.mjs +1 -7
  10. package/esm2022/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +3 -3
  11. package/esm2022/app/components/head/head-cell/head-cell.component.mjs +1 -1
  12. package/esm2022/app/components/list/list.component.mjs +6 -27
  13. package/esm2022/app/components/loader/loader.component.mjs +1 -1
  14. package/esm2022/app/directives/draggable-list/draggable-list.directive.mjs +118 -41
  15. package/esm2022/app/directives/empty-state/empty-state.directive.mjs +1 -1
  16. package/esm2022/app/directives/footer/footer.directive.mjs +1 -1
  17. package/esm2022/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs +1 -1
  18. package/esm2022/app/directives/header/header.directive.mjs +1 -1
  19. package/esm2022/app/directives/heading/heading.directive.mjs +1 -1
  20. package/esm2022/app/directives/index.mjs +1 -1
  21. package/esm2022/app/enums/page-change-type.enum.mjs +1 -1
  22. package/esm2022/app/enums/pagination-strategy.enum.mjs +1 -1
  23. package/esm2022/app/enums/state.enum.mjs +1 -1
  24. package/esm2022/app/interfaces/cellconfig.interface.mjs +1 -1
  25. package/esm2022/app/interfaces/draggable-list.interface.mjs +1 -1
  26. package/esm2022/app/interfaces/external-params.interface.mjs +1 -1
  27. package/esm2022/app/interfaces/sorting-change-event.interface.mjs +1 -1
  28. package/esm2022/app/models/row-action.model.mjs +7 -2
  29. package/fesm2022/firestitch-list.mjs +150 -81
  30. package/fesm2022/firestitch-list.mjs.map +1 -1
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, NgZone, ChangeDetectorRef, ElementRef, Renderer2, Directive, Input, Pipe, EventEmitter, Component, ChangeDetectionStrategy, Output, input, effect, HostBinding, computed, TemplateRef, ViewContainerRef, ViewChild, ContentChild, isDevMode, HostListener, ContentChildren, InjectionToken, Injector, NgModule } from '@angular/core';
3
3
  import { BehaviorSubject, Subject, Observable, map as map$1, merge, of, from, combineLatest, EMPTY } from 'rxjs';
4
- import { takeUntil, map, take, distinctUntilChanged, skip, filter, tap, shareReplay, delay, switchMap, debounceTime, mapTo, catchError } from 'rxjs/operators';
4
+ import { finalize, takeUntil, map, take, distinctUntilChanged, skip, filter, tap, shareReplay, delay, switchMap, debounceTime, mapTo, catchError } from 'rxjs/operators';
5
5
  import { get, isString, isObject, isBoolean, isFunction, cloneDeep, random, mergeWith } from 'lodash-es';
6
6
  import { BreakpointObserver } from '@angular/cdk/layout';
7
7
  import { NgClass, AsyncPipe, NgTemplateOutlet, Location, DecimalPipe } from '@angular/common';
@@ -148,10 +148,14 @@ class ReorderController {
148
148
  if (returnedValue && returnedValue instanceof Observable) {
149
149
  this.disableReorderAction();
150
150
  returnedValue
151
- .pipe(takeUntil(this._destroy$))
151
+ .pipe(
152
+ // finalize, not the next handler: a start callback that errors would otherwise
153
+ // leave the reorder action disabled for good.
154
+ finalize(() => {
155
+ this.enableReorderAction();
156
+ }), takeUntil(this._destroy$))
152
157
  .subscribe(() => {
153
158
  this.enabled = true;
154
- this.enableReorderAction();
155
159
  });
156
160
  return;
157
161
  }
@@ -164,10 +168,14 @@ class ReorderController {
164
168
  if (returnedValue && returnedValue instanceof Observable) {
165
169
  this.disableReorderAction();
166
170
  returnedValue
167
- .pipe(takeUntil(this._destroy$))
171
+ .pipe(
172
+ // finalize, not the next handler: a done callback that errors would otherwise
173
+ // leave the reorder action disabled for good.
174
+ finalize(() => {
175
+ this.enableReorderAction();
176
+ }), takeUntil(this._destroy$))
168
177
  .subscribe(() => {
169
178
  this.enabled = false;
170
- this.enableReorderAction();
171
179
  });
172
180
  return;
173
181
  }
@@ -1098,6 +1106,9 @@ class FsListDraggableListDirective {
1098
1106
  _draggableElementHeight;
1099
1107
  _draggableElementIndex;
1100
1108
  _draggableElementStartIndex;
1109
+ // Snapshotted at drag start next to the row dims, so the clamp and the hit-test always
1110
+ // describe the same frozen layout.
1111
+ _containerBounds;
1101
1112
  // Handlers
1102
1113
  _dragToHandler = this.dragTo.bind(this);
1103
1114
  _dragEndHandler = this.dragEnd.bind(this);
@@ -1105,6 +1116,18 @@ class FsListDraggableListDirective {
1105
1116
  _childRowElements;
1106
1117
  _dragStart$ = new Subject();
1107
1118
  _dragEnd$ = new Subject();
1119
+ /**
1120
+ * A reload that swaps the array out from under an in-flight drag leaves the frozen geometry
1121
+ * cache describing rows that no longer exist -- the hit-test then indexes past the end of
1122
+ * `_rows`. Drop the drag instead of dragging against a stale snapshot. Safe because
1123
+ * `swapWithIndex()` mutates the array in place, so its identity is stable within a drag.
1124
+ */
1125
+ set rows(value) {
1126
+ if (this._rows && value !== this._rows) {
1127
+ this._cleanupDrag();
1128
+ }
1129
+ this._rows = value;
1130
+ }
1108
1131
  _rows;
1109
1132
  _draggableChildrenDirectives = [];
1110
1133
  _selectedRowsDirectives = [];
@@ -1176,7 +1199,7 @@ class FsListDraggableListDirective {
1176
1199
  const targetRow = this._rows[elemIndex];
1177
1200
  if (this._multipleDraggableElementPreview) {
1178
1201
  this._multipleDraggableElementPreview.style.left = `${event.clientX}px`;
1179
- this._multipleDraggableElementPreview.style.top = `${event.clientY}px`;
1202
+ this._multipleDraggableElementPreview.style.top = `${this._clampPreviewTop(event.clientY, 0)}px`;
1180
1203
  }
1181
1204
  // Can not drag before first group and after last group
1182
1205
  const swapWithBoundaryGroupElement = (elemIndex === 0 || elemIndex === this._rows.length - 1)
@@ -1197,25 +1220,39 @@ class FsListDraggableListDirective {
1197
1220
  }
1198
1221
  }
1199
1222
  }
1200
- // FIXME
1201
1223
  if (this._draggableElementPreview) {
1202
- const topOffset = (event.y || event.clientY) - (this._draggableElementHeight / 2);
1224
+ const topOffset = this._clampPreviewTop(event.y || event.clientY, this._draggableElementHeight ?? 0);
1203
1225
  this._draggableElementPreview.style.top = `${topOffset}px`;
1204
1226
  }
1205
1227
  }
1206
1228
  }
1207
1229
  /**
1208
- * Remove events and classes after drag finish
1230
+ * Finish the drag: tear the drag down first, then tell the consumer.
1231
+ *
1232
+ * Teardown must never sit downstream of the consumer callbacks. `doneCallback` runs inside
1233
+ * `_zone.run()`, which re-throws synchronously, so a consumer that threw used to abort the rest
1234
+ * of this method -- leaving the cloned preview in the DOM and the document `mousemove` listener
1235
+ * attached, i.e. a row that follows the cursor forever and can only be cleared by a refresh.
1236
+ *
1237
+ * Nothing after `_cleanupDrag()` reads drag state: `finishReorder()` and both callbacks work off
1238
+ * the data controller alone. The one value that does -- whether the row actually moved -- is
1239
+ * snapshotted first.
1209
1240
  */
1210
1241
  dragEnd() {
1211
- this._dragInProgress = false;
1212
- this._breakpoints?.resume();
1242
+ // On touch, `touchend` and the compatibility `mouseup` both fire. Without this the second
1243
+ // pass tears down state that is already null.
1244
+ if (!this._dragInProgress) {
1245
+ return;
1246
+ }
1247
+ const moved = this._draggableElementStartIndex !== this._draggableElementIndex;
1248
+ this._cleanupDrag();
1213
1249
  this._reorderController.dataController.finishReorder();
1214
- if (this._reorderController.movedCallback
1215
- && this._draggableElementStartIndex !== this._draggableElementIndex) {
1250
+ if (this._reorderController.movedCallback && moved) {
1216
1251
  this._reorderController.movedCallback(this._reorderController.dataController.reorderData);
1217
1252
  }
1218
- if (this._reorderController.strategy === ReorderStrategy.Always) {
1253
+ // There is no drag threshold, so a bare click on the handle opens and closes a drag. Only
1254
+ // report a reorder the user actually performed.
1255
+ if (moved && this._reorderController.strategy === ReorderStrategy.Always) {
1219
1256
  this._zone.run(() => {
1220
1257
  if (this._reorderController.doneCallback) {
1221
1258
  const result = this._reorderController.doneCallback(this._reorderController.dataController.reorderData);
@@ -1223,31 +1260,11 @@ class FsListDraggableListDirective {
1223
1260
  }
1224
1261
  });
1225
1262
  }
1226
- // this._reorderController.dataController.updateOrderByRows(this._rows);
1227
- ///
1228
- this._containerElement.nativeElement.classList.remove('drag-hidden');
1229
- this._draggableElement.classList.remove('draggable-elem');
1230
- window.document.body.classList.remove('reorder-in-progress');
1231
- this._draggableElement = null;
1232
- if (this._draggableElementPreview) {
1233
- this._draggableElementPreview.remove();
1234
- this._draggableElementPreview = null;
1235
- }
1236
- else {
1237
- this._renderer.removeChild(document.body, this._multipleDraggableElementPreview);
1238
- this._multipleDraggableElementPreview = null;
1239
- }
1240
- this._draggableElementHeight = null;
1241
- this._draggableElementIndex = null;
1242
- this._draggableElementStartIndex = null;
1243
- this._selectedRowsDirectives = [];
1244
- window.removeEventListener('touchmove', this._windowTouchMoveHandler);
1245
- window.document.removeEventListener('mousemove', this._dragToHandler);
1246
- window.document.removeEventListener('touchmove', this._dragToHandler);
1247
- window.document.removeEventListener('mouseup', this._dragEndHandler);
1248
- window.document.removeEventListener('touchend', this._dragEndHandler);
1249
- window.document.removeEventListener('touchcancel', this._dragEndHandler);
1250
- this._dragEnd$.next(null);
1263
+ }
1264
+ ngOnDestroy() {
1265
+ this._cleanupDrag();
1266
+ this._destroy$.next(null);
1267
+ this._destroy$.complete();
1251
1268
  }
1252
1269
  get _isMultipleDrag() {
1253
1270
  return this._reorderController.multiple && this._selectedRowsDirectives.length > 1;
@@ -1256,6 +1273,7 @@ class FsListDraggableListDirective {
1256
1273
  * looking row elements and save their dims
1257
1274
  */
1258
1275
  prepareElements() {
1276
+ this._containerBounds = this._containerElement.nativeElement.getBoundingClientRect();
1259
1277
  this.lookupChildElements();
1260
1278
  this.calcElementsDimensions();
1261
1279
  }
@@ -1374,14 +1392,81 @@ class FsListDraggableListDirective {
1374
1392
  draggableCells[index].style.width = `${dims.width}px`;
1375
1393
  });
1376
1394
  }
1395
+ /**
1396
+ * Drop every trace of the in-flight drag: document listeners first, so nothing can re-enter
1397
+ * mid-teardown, then the DOM classes and the preview clone. Safe to call when no drag is
1398
+ * running, and deliberately free of consumer callbacks so it can never be skipped by one.
1399
+ */
1400
+ _cleanupDrag() {
1401
+ if (!this._dragInProgress) {
1402
+ return;
1403
+ }
1404
+ this._dragInProgress = false;
1405
+ this._removeDragListeners();
1406
+ this._breakpoints?.resume();
1407
+ this._containerElement.nativeElement.classList.remove('drag-hidden');
1408
+ window.document.body.classList.remove('reorder-in-progress');
1409
+ this._draggableElement?.classList.remove('draggable-elem');
1410
+ this._draggableElement = null;
1411
+ this._removeDragPreviews();
1412
+ this._draggableElementHeight = null;
1413
+ this._draggableElementIndex = null;
1414
+ this._draggableElementStartIndex = null;
1415
+ this._containerBounds = null;
1416
+ this._selectedRowsDirectives = [];
1417
+ this._dragEnd$.next(null);
1418
+ }
1419
+ /**
1420
+ * Independent checks, not if/else: a single drag creates only the cloned row, a multiple drag
1421
+ * only the preview block, and a drag torn down early may have neither. The old if/else fed a
1422
+ * null into Renderer2.removeChild(), which is `oldChild.remove()` and throws.
1423
+ */
1424
+ _removeDragPreviews() {
1425
+ if (this._draggableElementPreview) {
1426
+ this._draggableElementPreview.remove();
1427
+ this._draggableElementPreview = null;
1428
+ }
1429
+ if (this._multipleDraggableElementPreview) {
1430
+ this._renderer.removeChild(document.body, this._multipleDraggableElementPreview);
1431
+ this._multipleDraggableElementPreview = null;
1432
+ }
1433
+ }
1434
+ /**
1435
+ * Detach everything `dragStart()` bound to the document. Called first during teardown so no
1436
+ * pointer event can re-enter the drag while its state is half-released.
1437
+ */
1438
+ _removeDragListeners() {
1439
+ window.removeEventListener('touchmove', this._windowTouchMoveHandler);
1440
+ window.document.removeEventListener('mousemove', this._dragToHandler);
1441
+ window.document.removeEventListener('touchmove', this._dragToHandler);
1442
+ window.document.removeEventListener('mouseup', this._dragEndHandler);
1443
+ window.document.removeEventListener('touchend', this._dragEndHandler);
1444
+ window.document.removeEventListener('touchcancel', this._dragEndHandler);
1445
+ }
1446
+ /**
1447
+ * Keep the preview inside the list. Unclamped it follows the pointer anywhere on the page --
1448
+ * over the app header, out of a dialog -- which reads as a row that escaped and cannot be
1449
+ * dropped.
1450
+ */
1451
+ _clampPreviewTop(pointerY, height) {
1452
+ const top = pointerY - (height / 2);
1453
+ const bounds = this._containerBounds;
1454
+ if (!bounds) {
1455
+ return top;
1456
+ }
1457
+ return Math.min(Math.max(top, bounds.top), Math.max(bounds.top, bounds.bottom - height));
1458
+ }
1377
1459
  _waitUntilIsNotDone(doneResult) {
1378
1460
  if (doneResult instanceof Observable) {
1379
1461
  this._reorderController.disableReorderAction();
1380
1462
  doneResult
1381
- .pipe(takeUntil(this._destroy$))
1382
- .subscribe(() => {
1463
+ .pipe(
1464
+ // finalize, not the next handler: a done callback that errors would otherwise leave
1465
+ // the reorder action disabled for good.
1466
+ finalize(() => {
1383
1467
  this._reorderController.enableReorderAction();
1384
- });
1468
+ }), takeUntil(this._destroy$))
1469
+ .subscribe();
1385
1470
  }
1386
1471
  }
1387
1472
  _detectSelectedRows() {
@@ -1409,7 +1494,7 @@ class FsListDraggableListDirective {
1409
1494
  }
1410
1495
  }
1411
1496
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListDraggableListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1412
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsListDraggableListDirective, isStandalone: true, selector: "[fsListDraggableList]", inputs: { _rows: ["rows", "_rows"] }, ngImport: i0 });
1497
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsListDraggableListDirective, isStandalone: true, selector: "[fsListDraggableList]", inputs: { rows: "rows" }, ngImport: i0 });
1413
1498
  }
1414
1499
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListDraggableListDirective, decorators: [{
1415
1500
  type: Directive,
@@ -1417,7 +1502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1417
1502
  selector: '[fsListDraggableList]',
1418
1503
  standalone: true,
1419
1504
  }]
1420
- }], propDecorators: { _rows: [{
1505
+ }], propDecorators: { rows: [{
1421
1506
  type: Input,
1422
1507
  args: ['rows']
1423
1508
  }] } });
@@ -1544,7 +1629,12 @@ class RowAction {
1544
1629
  this.menu = value.menu ?? true;
1545
1630
  this.remove = value.remove;
1546
1631
  this.className = value.className;
1547
- this.type = this.menu && this.icon && !this.label && !value.type ? ActionType.Icon : value.type ?? ActionType.Basic;
1632
+ // An icon-only action renders as an icon button whether it sits in the menu or inline.
1633
+ // This used to be gated on `menu`, so an inline action came out Basic and
1634
+ // FsRowInlineActionComponent corrected `type` from its ngOnInit. That correction silently
1635
+ // stopped happening once a reload re-bound a new RowAction into a reused view, flipping the
1636
+ // template's @switch and blanking the action.
1637
+ this.type = value.type ?? (this.icon && !this.label ? ActionType.Icon : ActionType.Basic);
1548
1638
  this.show = value.show;
1549
1639
  this.restore = value.restore;
1550
1640
  this.rowActions = value.rowActions
@@ -1720,11 +1810,6 @@ class FsRowInlineActionComponent {
1720
1810
  actionClick(event) {
1721
1811
  this.clicked.emit(event);
1722
1812
  }
1723
- ngOnInit() {
1724
- if (!this.rowAction.label && this.rowAction.icon) {
1725
- this.rowAction.type = ActionType.Icon;
1726
- }
1727
- }
1728
1813
  fileSelected(event) {
1729
1814
  this.fileSelect.emit(event);
1730
1815
  }
@@ -2586,11 +2671,11 @@ class FsCellComponent {
2586
2671
  }
2587
2672
  }
2588
2673
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2589
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.7", type: FsCellComponent, isStandalone: true, selector: "[fs-cell]", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: false, isRequired: false, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: false, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fs-list-col": "this.isColl", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #defaultCellTemplate let-value=\"value\">\n {{value}}\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2674
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.7", type: FsCellComponent, isStandalone: true, selector: "[fs-cell]", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: false, isRequired: false, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: false, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fs-list-col": "this.isColl", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2590
2675
  }
2591
2676
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsCellComponent, decorators: [{
2592
2677
  type: Component,
2593
- args: [{ selector: '[fs-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #defaultCellTemplate let-value=\"value\">\n {{value}}\n</ng-template>\n" }]
2678
+ args: [{ selector: '[fs-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n" }]
2594
2679
  }], ctorParameters: () => [], propDecorators: { isColl: [{
2595
2680
  type: HostBinding,
2596
2681
  args: ['class.fs-list-col']
@@ -3187,11 +3272,11 @@ class FsFooterCellComponent extends FsCellComponent {
3187
3272
  super();
3188
3273
  }
3189
3274
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFooterCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3190
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFooterCellComponent, isStandalone: true, selector: "[fs-list-footer-cell]", usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #cell let-value=\"value\">\n {{value}}\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3275
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFooterCellComponent, isStandalone: true, selector: "[fs-list-footer-cell]", usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #cell let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3191
3276
  }
3192
3277
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFooterCellComponent, decorators: [{
3193
3278
  type: Component,
3194
- args: [{ selector: '[fs-list-footer-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #cell let-value=\"value\">\n {{value}}\n</ng-template>\n" }]
3279
+ args: [{ selector: '[fs-list-footer-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #cell let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n" }]
3195
3280
  }], ctorParameters: () => [] });
3196
3281
 
3197
3282
  class FsFooterRowComponent extends FsRowComponent {
@@ -3996,7 +4081,12 @@ class DataController {
3996
4081
  this.visibleRows = [];
3997
4082
  }
3998
4083
  /**
3999
- * Update data for specified row
4084
+ * Shallow-merge new values into the matching row's data.
4085
+ *
4086
+ * The merge is a spread, so the result is always a plain object: a row whose data is a class
4087
+ * instance loses its prototype here, and anything exposed through a prototype getter is
4088
+ * dropped rather than copied. Reload the list instead when rows hold models.
4089
+ *
4000
4090
  * @param rows
4001
4091
  * @param trackBy
4002
4092
  */
@@ -6329,7 +6419,6 @@ class FsListComponent {
6329
6419
  _mergedListConfig;
6330
6420
  _filterRef;
6331
6421
  _filterParamsReady = false;
6332
- _filtersReadyEmitted = false;
6333
6422
  _destroy = new Subject();
6334
6423
  _injector = inject(Injector);
6335
6424
  _config = inject(FS_LIST_CONFIG, { optional: true });
@@ -6493,6 +6582,8 @@ class FsListComponent {
6493
6582
  }
6494
6583
  filterReady() {
6495
6584
  this.list.filtersReady();
6585
+ this._filterParamsReady = true;
6586
+ this._emitFiltersReadyEvent();
6496
6587
  }
6497
6588
  /**
6498
6589
  * Update visibility for specific column
@@ -6553,15 +6644,10 @@ class FsListComponent {
6553
6644
  return this.list.columns.hasHeader;
6554
6645
  }
6555
6646
  _emitFiltersReadyEvent() {
6556
- // The `filterReference` view query re-runs when the surrounding @if re-evaluates, so this
6557
- // is reached more than once with both conditions already met. Consumers treat the event as
6558
- // "here is the filter, set yourself up" -- emitting it repeatedly would re-run that setup.
6559
- if (this._filtersReadyEmitted || !this.filterRef || !this._filterParamsReady) {
6560
- return;
6647
+ if (!!this.filterRef && this._filterParamsReady) {
6648
+ this.filtersReady.emit();
6649
+ this._cdRef.markForCheck();
6561
6650
  }
6562
- this._filtersReadyEmitted = true;
6563
- this.filtersReady.emit();
6564
- this._cdRef.markForCheck();
6565
6651
  }
6566
6652
  get inDialog() {
6567
6653
  return !!this._dialogRef || !!this._drawerRef;
@@ -6600,11 +6686,7 @@ class FsListComponent {
6600
6686
  this._breakpoints.observe(this._el.nativeElement);
6601
6687
  this.list = new List(this._el, listConfig, this._selectionDialog, this._route, this._persistance, this.inDialog, this._breakpoints);
6602
6688
  this.rowHoverHighlight = this.list.rowHoverHighlight;
6603
- // A new List brings a new filter, so the previous readiness must not carry over.
6604
- this._filterParamsReady = false;
6605
- this._filtersReadyEmitted = false;
6606
6689
  this._waitFirstLoad();
6607
- this._subscribeToFiltersReady();
6608
6690
  this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions, this.list.selection);
6609
6691
  this._rebuildColumns();
6610
6692
  this._listenSortingChange();
@@ -6675,19 +6757,6 @@ class FsListComponent {
6675
6757
  .forEach((item) => item.updateActions());
6676
6758
  });
6677
6759
  }
6678
- /**
6679
- * The filter announces readiness through the `init` callback installed on its config, which
6680
- * lands in `List._filterInit`. Forwarding it here is what arms `(filtersReady)` -- without it
6681
- * `_filterParamsReady` never flips and the event cannot fire.
6682
- */
6683
- _subscribeToFiltersReady() {
6684
- this.list.filtersReady$
6685
- .pipe(takeUntil(this.list.destroy$), takeUntil(this._destroy))
6686
- .subscribe(() => {
6687
- this._filterParamsReady = true;
6688
- this._emitFiltersReadyEvent();
6689
- });
6690
- }
6691
6760
  _subscribeToGroupExpandStatusChange() {
6692
6761
  if (this.list.dataController.hasGroups) {
6693
6762
  this._groupExpandNotifier.expandStatusChange$