ngx-eiffage-material 0.0.46 → 0.0.48

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.
package/index.d.ts CHANGED
@@ -898,7 +898,7 @@ declare class NgxAlert {
898
898
  type: _angular_core.InputSignal<AlertType>;
899
899
  title: _angular_core.InputSignal<string | undefined>;
900
900
  message: _angular_core.InputSignal<string | undefined>;
901
- iconName: _angular_core.Signal<"info" | "warning" | "error" | "check_circle">;
901
+ iconName: _angular_core.Signal<"error" | "info" | "warning" | "check_circle">;
902
902
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxAlert, never>;
903
903
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxAlert, "ngx-alert", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
904
904
  }
@@ -932,7 +932,7 @@ declare class NgxPaginatedSelect<T, U extends PaginatedFilter<T>> implements OnI
932
932
  * - 'chips': a chip per selected item (default when multiple=true)
933
933
  * - 'text': a single comma-joined text line
934
934
  */
935
- readonly displayMode: _angular_core.InputSignal<"chips" | "text">;
935
+ readonly displayMode: _angular_core.InputSignal<"text" | "chips">;
936
936
  /** Whether to show the search input inside the bottom sheet */
937
937
  readonly showSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
938
938
  /** Placeholder for the search input inside the bottom sheet */
@@ -1041,16 +1041,23 @@ declare class NgxPaginatedSelectBottomSheetComponent<T, U extends PaginatedFilte
1041
1041
  readonly allSelected: _angular_core.Signal<boolean>;
1042
1042
  readonly someSelected: _angular_core.Signal<boolean>;
1043
1043
  /**
1044
- * Only reads `resource.value()` — never `data.filters()`.
1044
+ * Reactively depends ONLY on `resource.value()`. The filter snapshot is read
1045
+ * via `untracked` so external filter changes (parent-driven, e.g. an extra
1046
+ * filters panel) do NOT create a reactive dependency here — that would make
1047
+ * the effect re-run on scroll page increments with stale resource data,
1048
+ * duplicating items and breaking `onScroll` (see original limitation).
1045
1049
  *
1046
- * When a query change or a new open resets to page 1 we call
1047
- * `accumulatedItems.set([])` synchronously *before* updating the filter,
1048
- * so by the time this effect fires with new data it always appends onto an
1049
- * already-clean array. Reading `data.filters()` here would cause the effect
1050
- * to run a second time (with stale resource data) the moment the page number
1051
- * is incremented on scroll, duplicating items and making
1052
- * `options().length >= total()` so `onScroll` would never fire again.
1050
+ * Reset logic:
1051
+ * - Fingerprint the current filter identity (everything except `pageNumber`).
1052
+ * - If the fingerprint changed since the previous fetch, this fetch belongs
1053
+ * to a different filter set → replace the accumulated array.
1054
+ * - If only `pageNumber` moved, this is a scroll-load-more → append.
1055
+ *
1056
+ * This is what allows callers to mutate `data.filters` from outside (extra
1057
+ * filter selects, checkboxes, etc.) and have the list refresh cleanly
1058
+ * without the previous page's items lingering.
1053
1059
  */
1060
+ private _lastFilterFingerprint;
1054
1061
  private readonly _accumEffect;
1055
1062
  constructor();
1056
1063
  isSelected(item: T): boolean;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-eiffage-material",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"