ngrx-entity-crud 19.4.0-beta.7 → 19.4.0-beta.9

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/README.md CHANGED
@@ -399,24 +399,51 @@ import { NecDashboardComponent } from 'ngrx-entity-crud/devtools';
399
399
  lazyReportUrl="assets/lazy-report.json"
400
400
  [idbDatabaseNames]="['NgRxStateStore']"
401
401
  [allowRevealValues]="false"
402
- [pollingMs]="0"></nec-dashboard>`,
402
+ [pollingMs]="0"
403
+ (sliceReset)="onSliceReset($event)"></nec-dashboard>`,
403
404
  })
404
- export class DevPanelComponent {}
405
+ export class DevPanelComponent {
406
+ onSliceReset(sliceKey: string): void {
407
+ // reactivity hook: a CRUD slice has just been reset to its initial state
408
+ }
409
+ }
405
410
  ```
406
411
 
407
412
  Inputs: `blacklist` / `whitelist` (`string[]`, filter store slices), `lazyReportUrl`
408
413
  (default `assets/lazy-report.json`; empty string disables the static correlation),
409
414
  `idbDatabaseNames` (`string[]`, DB names to inspect where `indexedDB.databases()` is unsupported —
410
415
  Firefox / older Safari), `pollingMs` (`number`, auto-refresh; `0` = manual), `allowRevealValues`
411
- (`boolean`, opt-in masked value reveal).
416
+ (`boolean`, opt-in masked value reveal — gates both localStorage values and IndexedDB record
417
+ values), `idbEntryLimit` (`number`, default `50`, max records read per object store in the
418
+ IndexedDB tree).
419
+
420
+ Outputs: `sliceReset` (`EventEmitter<string>`) emits the slice key whenever a full `Reset` is
421
+ dispatched (including via the global **Azzera tutte** button).
412
422
 
413
423
  Notes:
424
+ - The **Store NgRx** panel exposes per-row actions: **reset** dispatches the library's `Reset`
425
+ action (`[key] Reset`), restoring the slice to its `initialState` (empty entities, selection,
426
+ criteria and responses); **reset responses** dispatches the lighter `ResetResponses`
427
+ (`[key] Reset Response`). A toolbar **Azzera tutte** button resets every listed slice at once.
428
+ All three are destructive and require an inline two-step confirmation before dispatching.
429
+ Because the slice key in the root state matches the action name by convention (the `store`
430
+ schematic feeds the same `Names.NAME` to both `StoreModule.forFeature` and `createCrudActions`),
431
+ the dashboard can target the right action from the slice key alone — no per-domain wiring needed.
432
+ After a reset the dashboard refreshes its counts; if you persist the NgRx state (e.g. to
433
+ IndexedDB), your persistence layer will write back the emptied state, clearing the local data.
434
+ - The **Store NgRx** panel has a toggle button: by default it lists every mounted slice, but
435
+ **Mostra solo le slice con dati** filters down to slices that actually hold data (entities for
436
+ `plural`, an `item` for `singular`, or cached responses).
414
437
  - IndexedDB is introspected **agnostically** via native APIs (`indexedDB.databases()` + `count()`),
415
438
  with an optional `NEC_IDB_ADAPTER` injection token for custom providers. Byte sizes per
416
439
  record/store are not measurable; only record counts and the aggregate origin quota
417
- (`navigator.storage.estimate()`) are shown.
418
- - `<nec-dashboard>` requires Angular 17+ on the consumer (standalone component + control flow);
419
- the main entry-point keeps the wider peer range.
440
+ (`navigator.storage.estimate()`) are shown. The panel renders an **expandable tree** (database →
441
+ object store record): expanding an object store lazily reads up to `idbEntryLimit` records and
442
+ lists their keys; with `[allowRevealValues]="true"` each record can be expanded further to show
443
+ its value (serialized to JSON and masked for sensitive patterns).
444
+ - `<nec-dashboard>` is a standalone component built with the classic structural directives
445
+ (`*ngIf`/`*ngFor`), so it stays compatible with Angular 14+ consumers; the main entry-point keeps
446
+ the wider peer range.
420
447
 
421
448
  ## Running unit tests
422
449
  Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
@@ -48,6 +48,24 @@ export interface NecIdbReport {
48
48
  databases: NecIdbDbReport[];
49
49
  note?: string;
50
50
  }
51
+ /** Un record di un object store IndexedDB, letto ON-DEMAND per la vista ad albero. */
52
+ export interface NecIdbEntry {
53
+ /** Chiave primaria del record, serializzata a stringa. */
54
+ key: string;
55
+ /** Valore grezzo del record; la dashboard lo serializza/maschera prima di mostrarlo. */
56
+ value: unknown;
57
+ }
58
+ /** Risultato della lettura on-demand dei record di un object store (vista ad albero). */
59
+ export interface NecIdbStoreEntries {
60
+ db: string;
61
+ store: string;
62
+ entries: NecIdbEntry[];
63
+ /** Conteggio totale dei record (`count()`); `null` se non determinabile. */
64
+ total: number | null;
65
+ /** `true` se `entries` è troncato rispetto a `total` (raggiunto il `limit`). */
66
+ truncated: boolean;
67
+ note?: string;
68
+ }
51
69
  /**
52
70
  * Punto di estensione agnostico: il consumer può fornire un adapter esplicito (via
53
71
  * `NEC_IDB_ADAPTER`) per conteggi accurati quando la sua libreria di persistenza nasconde
@@ -68,6 +86,8 @@ export interface NecStoreSlice {
68
86
  /** Numero entità (solo slice `plural`). */
69
87
  entityCount?: number;
70
88
  responsesCount: number;
89
+ /** `true` se la slice contiene dati: entità (`plural`), item (`singular`) o response. */
90
+ hasData: boolean;
71
91
  }
72
92
  export type NecRuntimeStatus = 'loaded' | 'lazy-not-loaded' | 'unknown';
73
93
  export interface NecLazyEntry {
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/models.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,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AAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iFAAiF;IACjF,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IACtB,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
@@ -1,17 +1,19 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { NecIdbReport, NecQuotaEstimate, NecStorageReport, NecStoreReport } from './models';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { NecIdbReport, NecIdbStoreEntries, NecQuotaEstimate, NecStorageReport, NecStoreReport } from './models';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * `<nec-dashboard>` — dashboard di gestione progetto plug-and-play.
6
6
  *
7
7
  * Standalone, OnPush, template HTML inline (nessun PrimeNG → importabile ovunque). Tre
8
- * pannelli: localStorage, IndexedDB (agnostico), store NgRx + sezioni lazy. Per privacy
9
- * mostra SOLO chiavi/dimensioni/conteggi, mai i valori grezzi. Refresh manuale di default;
10
- * polling opt-in via `pollingMs`. Pensato per essere usabile anche in produzione.
8
+ * pannelli: localStorage, IndexedDB (agnostico, con vista ad albero espandibile), store NgRx
9
+ * + sezioni lazy. Per privacy mostra di default SOLO chiavi/dimensioni/conteggi; i valori
10
+ * (localStorage e record IndexedDB) sono rivelabili solo con `allowRevealValues` e comunque
11
+ * mascherati. Refresh manuale di default; polling opt-in via `pollingMs`. Usabile anche in
12
+ * produzione.
11
13
  *
12
14
  * Il template usa le direttive strutturali classiche (`*ngIf`/`*ngFor` + `CommonModule`)
13
15
  * anziché il control-flow `@if`/`@for`: così il componente resta compatibile con Angular
14
- * >= 12 (la nuova sintassi alzerebbe il `minVersion` del pacchetto a 17).
16
+ * >= 14 (il `minVersion` del componente standalone; il control-flow lo alzerebbe a 17).
15
17
  */
16
18
  export declare class NecDashboardComponent implements OnInit, OnDestroy {
17
19
  private readonly localStorageProbe;
@@ -27,8 +29,12 @@ export declare class NecDashboardComponent implements OnInit, OnDestroy {
27
29
  idbDatabaseNames: string[];
28
30
  /** Intervallo di auto-refresh in ms; 0 = solo manuale (default). */
29
31
  pollingMs: number;
30
- /** Abilita il reveal opt-in dei valori localStorage (sempre mascherati). Default: false. */
32
+ /** Abilita il reveal opt-in dei valori localStorage e dei record IndexedDB (sempre mascherati). Default: false. */
31
33
  allowRevealValues: boolean;
34
+ /** Numero massimo di record letti per object store nella vista ad albero IndexedDB. Default: 50. */
35
+ idbEntryLimit: number;
36
+ /** Emesso (con la slice key) a ogni `Reset` completo dispacciato, incluso l'azzera-tutte. */
37
+ sliceReset: EventEmitter<string>;
32
38
  readonly busy: import("@angular/core").WritableSignal<boolean>;
33
39
  readonly lastUpdated: import("@angular/core").WritableSignal<string>;
34
40
  readonly storage: import("@angular/core").WritableSignal<NecStorageReport>;
@@ -36,12 +42,63 @@ export declare class NecDashboardComponent implements OnInit, OnDestroy {
36
42
  readonly idb: import("@angular/core").WritableSignal<NecIdbReport>;
37
43
  readonly storeReport: import("@angular/core").WritableSignal<NecStoreReport>;
38
44
  readonly revealed: import("@angular/core").WritableSignal<Record<string, string>>;
45
+ /** Slice in attesa di conferma per il `Reset` completo (conferma a due step). */
46
+ readonly pendingResetKey: import("@angular/core").WritableSignal<string>;
47
+ /** Slice in attesa di conferma per il `ResetResponses`. */
48
+ readonly pendingResponsesKey: import("@angular/core").WritableSignal<string>;
49
+ /** `true` quando è in attesa di conferma l'azzeramento globale di tutte le slice. */
50
+ readonly pendingResetAll: import("@angular/core").WritableSignal<boolean>;
51
+ /** `true` per mostrare solo le slice che contengono dati (filtro del pannello Store NgRx). */
52
+ readonly onlyWithData: import("@angular/core").WritableSignal<boolean>;
53
+ /** Slice visibili in base al filtro `onlyWithData`. */
54
+ readonly visibleSlices: import("@angular/core").Signal<import("./models").NecStoreSlice[]>;
55
+ /** Stato di espansione della vista ad albero IndexedDB (chiavi: vedi `dbId`/`storeId`/`keyId`). */
56
+ readonly expandedDbs: import("@angular/core").WritableSignal<Record<string, boolean>>;
57
+ readonly expandedStores: import("@angular/core").WritableSignal<Record<string, boolean>>;
58
+ readonly expandedKeys: import("@angular/core").WritableSignal<Record<string, boolean>>;
59
+ /** Record letti on-demand per object store, indicizzati per `storeId`. */
60
+ readonly idbEntries: import("@angular/core").WritableSignal<Record<string, NecIdbStoreEntries>>;
61
+ /** Object store in corso di lettura, indicizzati per `storeId`. */
62
+ readonly idbLoading: import("@angular/core").WritableSignal<Record<string, boolean>>;
39
63
  private timer;
64
+ /** Un refresh richiesto mentre un altro è già in corso: viene ri-eseguito al termine. */
65
+ private pendingRefresh;
40
66
  ngOnInit(): void;
41
67
  ngOnDestroy(): void;
42
68
  refresh(): Promise<void>;
43
69
  /** Reveal opt-in di un valore localStorage, sempre passato per `maskValue` (privacy). */
44
70
  reveal(key: string): void;
71
+ /** Alterna fra "tutte le slice" e "solo le slice con dati". */
72
+ toggleOnlyWithData(): void;
73
+ private storeId;
74
+ private keyId;
75
+ isDbExpanded(db: string): boolean;
76
+ toggleDb(db: string): void;
77
+ isStoreExpanded(db: string, store: string): boolean;
78
+ /** Espande/collassa un object store; alla prima espansione ne legge i record on-demand. */
79
+ toggleStore(db: string, store: string): Promise<void>;
80
+ isStoreLoading(db: string, store: string): boolean;
81
+ entriesFor(db: string, store: string): NecIdbStoreEntries | undefined;
82
+ isKeyExpanded(db: string, store: string, key: string): boolean;
83
+ toggleKey(db: string, store: string, key: string): void;
84
+ /** Serializza e maschera (privacy) il valore grezzo di un record IndexedDB per la UI. */
85
+ formatIdbValue(value: unknown): string;
86
+ /** Collassa l'intero albero IndexedDB e svuota la cache dei record (chiamato a ogni refresh). */
87
+ private collapseIdbTree;
88
+ /** Step 1: chiede conferma per il `Reset` completo della slice. */
89
+ requestReset(key: string): void;
90
+ /** Step 1: chiede conferma per il `ResetResponses` della slice. */
91
+ requestResetResponses(key: string): void;
92
+ /** Step 1: chiede conferma per l'azzeramento globale di tutte le slice. */
93
+ requestResetAll(): void;
94
+ /** Annulla qualsiasi conferma pendente (reset/responses/azzera-tutte). */
95
+ cancelPending(): void;
96
+ /** Step 2: dispaccia il `Reset` della slice, emette `sliceReset` e ricarica i conteggi. */
97
+ confirmReset(key: string): void;
98
+ /** Step 2: dispaccia il `ResetResponses` della slice e ricarica i conteggi. */
99
+ confirmResetResponses(key: string): void;
100
+ /** Step 2: dispaccia il `Reset` su tutte le slice elencate, emettendo `sliceReset` per ciascuna. */
101
+ confirmResetAll(): void;
45
102
  isSensitive(key: string): boolean;
46
103
  /** trackBy per le righe identificate da `key` (entry localStorage, slice store). */
47
104
  trackByKey(_: number, item: {
@@ -53,6 +110,6 @@ export declare class NecDashboardComponent implements OnInit, OnDestroy {
53
110
  }): string;
54
111
  formatBytes(n: number | undefined | null): string;
55
112
  static ɵfac: i0.ɵɵFactoryDeclaration<NecDashboardComponent, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<NecDashboardComponent, "nec-dashboard", never, { "blacklist": { "alias": "blacklist"; "required": false; }; "whitelist": { "alias": "whitelist"; "required": false; }; "lazyReportUrl": { "alias": "lazyReportUrl"; "required": false; }; "idbDatabaseNames": { "alias": "idbDatabaseNames"; "required": false; }; "pollingMs": { "alias": "pollingMs"; "required": false; }; "allowRevealValues": { "alias": "allowRevealValues"; "required": false; }; }, {}, never, never, true, never>;
113
+ static ɵcmp: i0.ɵɵComponentDeclaration<NecDashboardComponent, "nec-dashboard", never, { "blacklist": { "alias": "blacklist"; "required": false; }; "whitelist": { "alias": "whitelist"; "required": false; }; "lazyReportUrl": { "alias": "lazyReportUrl"; "required": false; }; "idbDatabaseNames": { "alias": "idbDatabaseNames"; "required": false; }; "pollingMs": { "alias": "pollingMs"; "required": false; }; "allowRevealValues": { "alias": "allowRevealValues"; "required": false; }; "idbEntryLimit": { "alias": "idbEntryLimit"; "required": false; }; }, { "sliceReset": "sliceReset"; }, never, never, true, never>;
57
114
  }
58
115
  //# sourceMappingURL=nec-dashboard.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nec-dashboard.component.d.ts","sourceRoot":"","sources":["../../../libs/ngrx-entity-crud/devtools/nec-dashboard.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,SAAS,EACT,MAAM,EAEP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;;AAM1F;;;;;;;;;;;GAWG;AACH,qBAyQa,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuC;IACzE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoC;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAE3D,2DAA2D;IAClD,SAAS,EAAE,MAAM,EAAE,CAAM;IAClC,oFAAoF;IAC3E,SA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AAG,EAAE,MAAM,GAAG,IAAI;IAM/B,mEAAmE;IACnE,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMxC,2EAA2E;IAC3E,eAAe,IAAI,IAAI;IAMvB,0EAA0E;IAC1E,aAAa,IAAI,IAAI;IAMrB,2FAA2F;IAC3F,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO/B,+EAA+E;IAC/E,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMxC,oGAAoG;IACpG,eAAe,IAAI,IAAI;IAUvB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC,oFAAoF;IACpF,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,GAAG,MAAM;IAIlD,0FAA0F;IAC1F,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,MAAM;IAIpD,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM;yCArQtC,qBAAqB;2CAArB,qBAAqB;CAiRjC"}
@@ -1,4 +1,4 @@
1
- import { NecIdbAdapter, NecIdbReport } from '../models';
1
+ import { NecIdbAdapter, NecIdbReport, NecIdbStoreEntries } from '../models';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Riepilogo IndexedDB AGNOSTICO rispetto alla libreria di persistenza.
@@ -19,6 +19,16 @@ export declare class NecIndexedDbProbeService {
19
19
  read(fallbackDatabaseNames?: string[], openTimeoutMs?: number): Promise<NecIdbReport>;
20
20
  private listDatabaseNames;
21
21
  private inspectDatabase;
22
+ /**
23
+ * Legge ON-DEMAND i record di un object store, per la vista ad albero della dashboard.
24
+ *
25
+ * Usa un cursore e si ferma a `limit` record (default 50) per non caricare in memoria interi
26
+ * store enormi; `truncated` segnala se ci sono altri record oltre il limite. Restituisce i
27
+ * valori GREZZI: la serializzazione/mascheratura per la privacy spetta alla dashboard.
28
+ */
29
+ readStoreEntries(dbName: string, storeName: string, limit?: number, openTimeoutMs?: number): Promise<NecIdbStoreEntries>;
30
+ /** Serializza una `IDBValidKey` (stringa/numero/Date/array) in stringa per la UI. */
31
+ private stringifyKey;
22
32
  static ɵfac: i0.ɵɵFactoryDeclaration<NecIndexedDbProbeService, [{ optional: true; }]>;
23
33
  static ɵprov: i0.ɵɵInjectableDeclaration<NecIndexedDbProbeService>;
24
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nec-indexeddb-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-indexeddb-probe.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAkB,YAAY,EAAoB,MAAM,WAAW,CAAC;;AAGzF;;;;;;;GAOG;AACH,qBACa,wBAAwB;IACc,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa,GAAG,IAAI;IAE/F;;;;OAIG;IACG,IAAI,CAAC,qBAAqB,GAAE,MAAM,EAAO,EAAE,aAAa,SAAO,GAAG,OAAO,CAAC,YAAY,CAAC;YA2C/E,iBAAiB;IAkB/B,OAAO,CAAC,eAAe;yCArEZ,wBAAwB;6CAAxB,wBAAwB;CA0KpC"}
1
+ {"version":3,"file":"nec-indexeddb-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-indexeddb-probe.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EAGb,YAAY,EACZ,kBAAkB,EAEnB,MAAM,WAAW,CAAC;;AAGnB;;;;;;;GAOG;AACH,qBACa,wBAAwB;IACc,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa,GAAG,IAAI;IAE/F;;;;OAIG;IACG,IAAI,CAAC,qBAAqB,GAAE,MAAM,EAAO,EAAE,aAAa,SAAO,GAAG,OAAO,CAAC,YAAY,CAAC;YA2C/E,iBAAiB;IAkB/B,OAAO,CAAC,eAAe;IAsGvB;;;;;;OAMG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,KAAK,SAAK,EACV,aAAa,SAAO,GACnB,OAAO,CAAC,kBAAkB,CAAC;IAqH9B,qFAAqF;IACrF,OAAO,CAAC,YAAY;yCA7ST,wBAAwB;6CAAxB,wBAAwB;CAuTpC"}
@@ -15,6 +15,24 @@ export declare class NecStoreProbeService {
15
15
  private readonly store;
16
16
  /** Lettura sincrona dello stato root (NgRx emette il valore corrente all'iscrizione). */
17
17
  read(opts?: ProbeOptions): NecStoreReport;
18
+ /**
19
+ * Type dell'azione `Reset` della libreria per una slice CRUD.
20
+ *
21
+ * Vale la convenzione degli schematic `store`: la feature key nello stato root coincide col
22
+ * nome passato a `createCrudActions` (entrambi `Names.NAME`), quindi il type `[key] Reset`
23
+ * (vedi `actions.ts`, `CrudEnum.RESET`) è ricostruibile dalla sola `key` letta da {@link read}.
24
+ */
25
+ resetActionType(sliceKey: string): string;
26
+ /** Type dell'azione `ResetResponses` (`[key] Reset Response`): svuota solo la cache delle response. */
27
+ resetResponsesActionType(sliceKey: string): string;
28
+ /**
29
+ * Dispaccia il `Reset` della slice: riporta lo stato a `initialState` (entità, selezione,
30
+ * criteri e response vuoti). La libreria di persistenza, reagendo al cambio di stato, riscrive
31
+ * lo stato vuoto e di fatto svuota i dati salvati in locale.
32
+ */
33
+ reset(sliceKey: string): void;
34
+ /** Dispaccia il `ResetResponses` della slice: svuota solo le response, lasciando entità e selezione. */
35
+ resetResponses(sliceKey: string): void;
18
36
  /** Come `read()`, ma correla con l'inventario statico di `lazy-report.json` (se raggiungibile). */
19
37
  readWithLazyReport(url: string, opts?: ProbeOptions): Promise<NecStoreReport>;
20
38
  private fetchLazyReport;
@@ -1 +1 @@
1
- {"version":3,"file":"nec-store-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-store-probe.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6B,cAAc,EAAgB,MAAM,WAAW,CAAC;;AAEpF,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IAEvC,yFAAyF;IACzF,IAAI,CAAC,IAAI,GAAE,YAAiB,GAAG,cAAc;IA4D7C,mGAAmG;IAC7F,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;YASzE,eAAe;IA6C7B;;;OAGG;IACH,OAAO,CAAC,UAAU;yCA3HP,oBAAoB;6CAApB,oBAAoB;CA8HhC"}
1
+ {"version":3,"file":"nec-store-probe.service.d.ts","sourceRoot":"","sources":["../../../../libs/ngrx-entity-crud/devtools/probes/nec-store-probe.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6B,cAAc,EAAgB,MAAM,WAAW,CAAC;;AAEpF,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,qBACa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IAEvC,yFAAyF;IACzF,IAAI,CAAC,IAAI,GAAE,YAAiB,GAAG,cAAc;IAkE7C;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIzC,uGAAuG;IACvG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIlD;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI7B,wGAAwG;IACxG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAItC,mGAAmG;IAC7F,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;YASzE,eAAe;IA6C7B;;;OAGG;IACH,OAAO,CAAC,UAAU;yCA/JP,oBAAoB;6CAApB,oBAAoB;CAkKhC"}