persian-data-grid 0.6.0 → 0.7.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 (137) hide show
  1. package/README.md +1 -1
  2. package/dist/{ERPTableGroupRow-PSAPAHGL.js → ERPTableGroupRow-E5Q6FYDS.js} +4 -4
  3. package/dist/{ERPTableGroupRow-PSAPAHGL.js.map → ERPTableGroupRow-E5Q6FYDS.js.map} +1 -1
  4. package/dist/{ERPTableGroupRow-J5Z2LRC5.cjs → ERPTableGroupRow-F2IPDYL5.cjs} +9 -9
  5. package/dist/{ERPTableGroupRow-J5Z2LRC5.cjs.map → ERPTableGroupRow-F2IPDYL5.cjs.map} +1 -1
  6. package/dist/{GridPlugin-CJCaYnlw.d.ts → GridPlugin-Bewn0X51.d.ts} +1 -1
  7. package/dist/{GridPlugin-oxhq8AsM.d.cts → GridPlugin-DewWufGZ.d.cts} +1 -1
  8. package/dist/{GridSession-Bc7UIawO.d.ts → GridSession-CeIfVFck.d.ts} +142 -9
  9. package/dist/{GridSession-B-9lLcoB.d.cts → GridSession-CmQn2RnL.d.cts} +142 -9
  10. package/dist/GridSyncService-3JQLEY65.cjs +12 -0
  11. package/dist/{GridSyncService-TAPAHABV.cjs.map → GridSyncService-3JQLEY65.cjs.map} +1 -1
  12. package/dist/GridSyncService-GECXGEKL.js +3 -0
  13. package/dist/{GridSyncService-KTLB4KP3.js.map → GridSyncService-GECXGEKL.js.map} +1 -1
  14. package/dist/{PdfRenderer-CBg7hWNS.d.cts → PdfRenderer-B9FJaCo_.d.cts} +1 -1
  15. package/dist/{PdfRenderer-1HFh6UeR.d.ts → PdfRenderer-bN7ca_Aj.d.ts} +1 -1
  16. package/dist/{UITableController-DU8RopUM.d.ts → UITableController-C71LXBiX.d.ts} +48 -2
  17. package/dist/{UITableController-Cuwq481K.d.cts → UITableController-CIwnHIw8.d.cts} +48 -2
  18. package/dist/{VazirmatnPdfRenderer-BCMpC1zy.d.cts → VazirmatnPdfRenderer-CpCqA-Wh.d.cts} +2 -2
  19. package/dist/{VazirmatnPdfRenderer-Dz_G-m3c.d.ts → VazirmatnPdfRenderer-D46smncn.d.ts} +2 -2
  20. package/dist/adapters/arian-erp.cjs +16 -4
  21. package/dist/adapters/arian-erp.cjs.map +1 -1
  22. package/dist/adapters/arian-erp.d.cts +3 -1
  23. package/dist/adapters/arian-erp.d.ts +3 -1
  24. package/dist/adapters/arian-erp.js +11 -3
  25. package/dist/adapters/arian-erp.js.map +1 -1
  26. package/dist/{applyImportedRows-BO6yxoAN.d.cts → applyImportedRows-C2fWYoPy.d.cts} +3 -3
  27. package/dist/{applyImportedRows-D4zVY8uD.d.ts → applyImportedRows-Cqh_N_0k.d.ts} +3 -3
  28. package/dist/{applyRowVisibilityHandler-LXCOGESZ.cjs → applyRowVisibilityHandler-Q64ZFC7A.cjs} +7 -6
  29. package/dist/applyRowVisibilityHandler-Q64ZFC7A.cjs.map +1 -0
  30. package/dist/{applyRowVisibilityHandler-KS6TMCBN.js → applyRowVisibilityHandler-ZLZXQEGY.js} +6 -5
  31. package/dist/applyRowVisibilityHandler-ZLZXQEGY.js.map +1 -0
  32. package/dist/callbackRemoteApi-BYLjmSI6.d.ts +51 -0
  33. package/dist/callbackRemoteApi-Cv26MmSD.d.cts +51 -0
  34. package/dist/{cellRenderContext-DB7V_mlu.d.ts → cellRenderContext-BaNh4qn_.d.ts} +2 -2
  35. package/dist/{cellRenderContext-DG5BOlxK.d.cts → cellRenderContext-DvngkptV.d.cts} +2 -2
  36. package/dist/{chunk-HTNJT2QU.js → chunk-27ALJSZP.js} +617 -104
  37. package/dist/chunk-27ALJSZP.js.map +1 -0
  38. package/dist/{chunk-KUBVDIF7.cjs → chunk-3HP3HQCW.cjs} +52 -17
  39. package/dist/chunk-3HP3HQCW.cjs.map +1 -0
  40. package/dist/{chunk-DXRCYW42.cjs → chunk-52LFOPXD.cjs} +43 -23
  41. package/dist/chunk-52LFOPXD.cjs.map +1 -0
  42. package/dist/{chunk-VVGYRZ7S.cjs → chunk-72IVAOTK.cjs} +4 -4
  43. package/dist/{chunk-VVGYRZ7S.cjs.map → chunk-72IVAOTK.cjs.map} +1 -1
  44. package/dist/{chunk-LJ7LMEXO.js → chunk-7GWV5HGO.js} +3 -3
  45. package/dist/{chunk-LJ7LMEXO.js.map → chunk-7GWV5HGO.js.map} +1 -1
  46. package/dist/{chunk-RM6ZWNT3.js → chunk-7T6AWRPU.js} +43 -23
  47. package/dist/chunk-7T6AWRPU.js.map +1 -0
  48. package/dist/{chunk-PXCHPZTP.cjs → chunk-CMQ4VLCW.cjs} +8 -7
  49. package/dist/{chunk-EHHHC5JV.js.map → chunk-CMQ4VLCW.cjs.map} +1 -1
  50. package/dist/chunk-E2J533UH.cjs +53 -0
  51. package/dist/chunk-E2J533UH.cjs.map +1 -0
  52. package/dist/chunk-F6EMC75A.cjs +34 -0
  53. package/dist/chunk-F6EMC75A.cjs.map +1 -0
  54. package/dist/chunk-GKE33FOJ.js +32 -0
  55. package/dist/chunk-GKE33FOJ.js.map +1 -0
  56. package/dist/{chunk-QQMU44KJ.js → chunk-HLOHWFOA.js} +52 -19
  57. package/dist/chunk-HLOHWFOA.js.map +1 -0
  58. package/dist/{chunk-633KP74Z.js → chunk-KCNTKYUY.js} +19 -2
  59. package/dist/chunk-KCNTKYUY.js.map +1 -0
  60. package/dist/{chunk-BLYVOV3G.cjs → chunk-LY27YAXE.cjs} +19 -2
  61. package/dist/chunk-LY27YAXE.cjs.map +1 -0
  62. package/dist/{chunk-EHHHC5JV.js → chunk-NB5GCGHL.js} +5 -4
  63. package/dist/chunk-NB5GCGHL.js.map +1 -0
  64. package/dist/{chunk-6XBXZPBW.js → chunk-NQUVAJQA.js} +3 -3
  65. package/dist/{chunk-6XBXZPBW.js.map → chunk-NQUVAJQA.js.map} +1 -1
  66. package/dist/chunk-SVO62ZV2.js +50 -0
  67. package/dist/chunk-SVO62ZV2.js.map +1 -0
  68. package/dist/{chunk-MU3RY46O.js → chunk-VBAZ77Q4.js} +3 -3
  69. package/dist/{chunk-MU3RY46O.js.map → chunk-VBAZ77Q4.js.map} +1 -1
  70. package/dist/{chunk-H2LESGMX.cjs → chunk-VSAFQTW5.cjs} +4 -4
  71. package/dist/{chunk-H2LESGMX.cjs.map → chunk-VSAFQTW5.cjs.map} +1 -1
  72. package/dist/{chunk-2BJCRYOS.cjs → chunk-VYJQ2HTA.cjs} +5 -5
  73. package/dist/{chunk-2BJCRYOS.cjs.map → chunk-VYJQ2HTA.cjs.map} +1 -1
  74. package/dist/{chunk-IIISFUW4.cjs → chunk-WTHTVKVI.cjs} +621 -108
  75. package/dist/chunk-WTHTVKVI.cjs.map +1 -0
  76. package/dist/{createEngineGridQuery-Mt1hc33m.d.ts → createEngineGridQuery-BBkud5oE.d.ts} +61 -6
  77. package/dist/{createEngineGridQuery-Dmq3i5v3.d.cts → createEngineGridQuery-D-fgO_jg.d.cts} +61 -6
  78. package/dist/date-picker-jalali.cjs +17 -17
  79. package/dist/date-picker-jalali.d.cts +3 -3
  80. package/dist/date-picker-jalali.d.ts +3 -3
  81. package/dist/date-picker-jalali.js +1 -1
  82. package/dist/headless.cjs +102 -102
  83. package/dist/headless.d.cts +13 -9
  84. package/dist/headless.d.ts +13 -9
  85. package/dist/headless.js +4 -4
  86. package/dist/index.cjs +440 -382
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/index.d.cts +34 -14
  89. package/dist/index.d.ts +34 -14
  90. package/dist/index.js +200 -143
  91. package/dist/index.js.map +1 -1
  92. package/dist/plugins/csv.cjs +3 -3
  93. package/dist/plugins/csv.d.cts +2 -2
  94. package/dist/plugins/csv.d.ts +2 -2
  95. package/dist/plugins/csv.js +2 -2
  96. package/dist/plugins/excel.cjs +11 -11
  97. package/dist/plugins/excel.d.cts +4 -4
  98. package/dist/plugins/excel.d.ts +4 -4
  99. package/dist/plugins/excel.js +3 -3
  100. package/dist/plugins/pdf/fonts/vazirmatn.cjs +6 -6
  101. package/dist/plugins/pdf/fonts/vazirmatn.d.cts +4 -4
  102. package/dist/plugins/pdf/fonts/vazirmatn.d.ts +4 -4
  103. package/dist/plugins/pdf/fonts/vazirmatn.js +3 -3
  104. package/dist/plugins/pdf.cjs +5 -5
  105. package/dist/plugins/pdf.d.cts +5 -5
  106. package/dist/plugins/pdf.d.ts +5 -5
  107. package/dist/plugins/pdf.js +2 -2
  108. package/dist/presence.d.cts +3 -3
  109. package/dist/presence.d.ts +3 -3
  110. package/dist/sync.cjs +2 -2
  111. package/dist/sync.d.cts +3 -3
  112. package/dist/sync.d.ts +3 -3
  113. package/dist/sync.js +1 -1
  114. package/package.json +3 -3
  115. package/dist/GridSyncService-KTLB4KP3.js +0 -3
  116. package/dist/GridSyncService-TAPAHABV.cjs +0 -12
  117. package/dist/applyRowVisibilityHandler-KS6TMCBN.js.map +0 -1
  118. package/dist/applyRowVisibilityHandler-LXCOGESZ.cjs.map +0 -1
  119. package/dist/callbackRemoteApi-BlXO5NJz.d.ts +0 -30
  120. package/dist/callbackRemoteApi-DgnXH-i0.d.cts +0 -30
  121. package/dist/chunk-633KP74Z.js.map +0 -1
  122. package/dist/chunk-ASPTRYRD.cjs +0 -21
  123. package/dist/chunk-ASPTRYRD.cjs.map +0 -1
  124. package/dist/chunk-BHDRUZH5.cjs +0 -33
  125. package/dist/chunk-BHDRUZH5.cjs.map +0 -1
  126. package/dist/chunk-BLYVOV3G.cjs.map +0 -1
  127. package/dist/chunk-DXRCYW42.cjs.map +0 -1
  128. package/dist/chunk-HTNJT2QU.js.map +0 -1
  129. package/dist/chunk-IIISFUW4.cjs.map +0 -1
  130. package/dist/chunk-KUBVDIF7.cjs.map +0 -1
  131. package/dist/chunk-KYAOSBQN.js +0 -31
  132. package/dist/chunk-KYAOSBQN.js.map +0 -1
  133. package/dist/chunk-PXCHPZTP.cjs.map +0 -1
  134. package/dist/chunk-QQMU44KJ.js.map +0 -1
  135. package/dist/chunk-RM6ZWNT3.js.map +0 -1
  136. package/dist/chunk-Y6W5V2CI.js +0 -19
  137. package/dist/chunk-Y6W5V2CI.js.map +0 -1
@@ -507,12 +507,18 @@ type ColumnVisibilityRule = {
507
507
  kind: 'whenTableType';
508
508
  tableType: string;
509
509
  };
510
+ /**
511
+ * Remote flag/response resolution. The response callbacks use METHOD syntax
512
+ * (bivariant) so a host-typed config (`TResponse` = the host's query response)
513
+ * stays assignable to the default `ResolveOnConfig<K>` (`TResponse` = `unknown`)
514
+ * used inside the engine.
515
+ */
510
516
  interface ResolveOnConfig<K = unknown, TResponse = unknown> {
511
517
  endpoint: string;
512
518
  fieldName: string;
513
519
  buildParams: (row: Record<string, unknown>) => Record<string, unknown>;
514
- getResponse?: (response: TResponse, row: Row) => unknown;
515
- mapFlags?: (response: TResponse) => Record<string, boolean>;
520
+ getResponse?(response: TResponse, row: Row): unknown;
521
+ mapFlags?(response: TResponse): Record<string, boolean>;
516
522
  }
517
523
  type ColumnAccessControl = {
518
524
  allowRoles?: string[];
@@ -529,7 +535,8 @@ interface IDependOn {
529
535
  }
530
536
  type DefaultOptionType = {
531
537
  value?: string | number;
532
- label?: string;
538
+ /** Renderable label; the UI-aware public type narrows it to `ReactNode`. */
539
+ label?: unknown;
533
540
  title?: string;
534
541
  [key: string]: unknown;
535
542
  };
@@ -578,13 +585,19 @@ interface ColumnSchema<T = unknown, K = unknown> {
578
585
  label: string;
579
586
  value: string | number;
580
587
  }[];
581
- indexOptions?: (...args: unknown[]) => unknown[];
582
- onChange?: (...args: unknown[]) => void;
588
+ /**
589
+ * Engine-side (loose) callback shapes. Declared with METHOD syntax
590
+ * (bivariant) so the precise host-facing signatures of the public
591
+ * `ColumnSchema` (UIRow, UITableController, ItemType, ...) stay assignable.
592
+ */
593
+ indexOptions?(...args: unknown[]): unknown[];
594
+ onChange?(...args: unknown[]): void;
583
595
  displayFormat?: (value: unknown) => unknown;
584
596
  minWidth?: number;
585
- style?: Record<string, string | number>;
597
+ /** Inline style object (the public type narrows it to `CSSProperties`). */
598
+ style?: object;
586
599
  popUpWidth?: number;
587
- dynamicSelectFilterOption?: (inputValue: string, option: unknown) => boolean;
600
+ dynamicSelectFilterOption?(inputValue: string, option: unknown): boolean;
588
601
  labelValue?: 'selectDisplay' | 'selectValue';
589
602
  /**
590
603
  * ColumnDef-only fields restored by `toColumnDef` (PR-81).
@@ -892,6 +905,27 @@ declare function pageWindow(page: number, pageSize: number): {
892
905
  * Typing updates drafts; Commit writes; Cancel discards.
893
906
  */
894
907
  type CellEditType = 'cell' | 'fullRow';
908
+ /**
909
+ * When typed values become durable.
910
+ * - `immediate`: every editor change is written to the table at once (the
911
+ * draft only mirrors it for a stable input). Host reads — `getRowView`,
912
+ * snapshots, totals, `computed` / `resolveOn` — always see what the user
913
+ * typed. `Esc` ends editing and keeps the value. Default for
914
+ * `persistence: 'paged-idb'` (the arianERP document-grid contract).
915
+ * - `deferred`: typing only updates a session draft; the value is written when
916
+ * the edit is committed (move / Enter / Tab / focus leaves the grid / a
917
+ * durable read such as `getFullSnapShot`). `Esc` discards the draft.
918
+ * Default for the event-sourced mode (no EventStore write per keystroke).
919
+ */
920
+ type CellEditCommit = 'immediate' | 'deferred';
921
+ /**
922
+ * What `Enter` does on an active cell.
923
+ * - `nextCell`: like `Tab` — next editable cell of the row, then the first
924
+ * cell of the next row; past the last row a new empty row is added.
925
+ * `Shift+Enter` goes back. (Default; the data-entry behaviour.)
926
+ * - `down`: commit and move to the cell below (spreadsheet style).
927
+ */
928
+ type EnterNavigation = 'nextCell' | 'down';
895
929
  type CellEditValue = {
896
930
  value: unknown;
897
931
  display: unknown;
@@ -901,10 +935,15 @@ type CellEditSession = {
901
935
  /** Focused column while editing. */
902
936
  columnId: string;
903
937
  editType: CellEditType;
904
- /** Values at edit start — restored on cancel. */
938
+ /**
939
+ * Values at edit start — restored on cancel. Moves forward when the draft
940
+ * is written without ending the session (immediate commit / flush).
941
+ */
905
942
  baseline: Readonly<Record<string, CellEditValue>>;
906
943
  /** Working copies. */
907
944
  drafts: Record<string, CellEditValue>;
945
+ /** Writes of one session share it, so undo reverts the whole edit at once. */
946
+ correlationId: string;
908
947
  };
909
948
  type CellEditOptions = {
910
949
  /** Default true — activate cell starts edit. False ⇒ need Enter / double-click / api.startEditingCell. */
@@ -913,6 +952,10 @@ type CellEditOptions = {
913
952
  stopEditingWhenCellsLoseFocus: boolean;
914
953
  /** Default `cell`. `fullRow` edits every editable column on the row. */
915
954
  editType: CellEditType;
955
+ /** Default `deferred` (createGrid picks `immediate` for `paged-idb`). */
956
+ commit: CellEditCommit;
957
+ /** Default `nextCell`. */
958
+ enterNavigation: EnterNavigation;
916
959
  };
917
960
 
918
961
  /**
@@ -925,6 +968,38 @@ type IRequestConfig = {
925
968
  method?: 'GET' | 'POST';
926
969
  [key: string]: unknown;
927
970
  };
971
+ /**
972
+ * Envelope returned by arianERP query endpoints. Structural twin of the host's
973
+ * `IBaseQueryResponse<T>`: it is the response type handed to
974
+ * `ColumnSchema.resolveOn.getResponse` / `mapFlags`.
975
+ */
976
+ interface IBaseQueryResponse<T = unknown> {
977
+ Result: string;
978
+ Error?: string;
979
+ ErrorCode?: string;
980
+ InnerException?: string;
981
+ AdditionalInfo?: unknown;
982
+ Data: T;
983
+ TotalCount: number;
984
+ ReturnCount: number;
985
+ ReadFromCache: boolean;
986
+ ExportFile?: string;
987
+ ExportString?: string;
988
+ YearPlanId?: number;
989
+ Url?: string;
990
+ }
991
+ /**
992
+ * `RemoteApi` as seen by host `computed` callbacks: `request()` resolves to the
993
+ * ERP envelope by default. The payload is `unknown`; hosts name its shape
994
+ * through the type argument (`request<IBaseQueryResponse<Row[]>>(…)`).
995
+ */
996
+ interface HostRemoteApi {
997
+ request<TResponse = IBaseQueryResponse<unknown>>(input: {
998
+ endpoint: string;
999
+ params?: Record<string, unknown>;
1000
+ method?: 'GET' | 'POST';
1001
+ }): Promise<TResponse>;
1002
+ }
928
1003
 
929
1004
  interface UIRow {
930
1005
  id: number;
@@ -2038,8 +2113,14 @@ declare class SparseRowIndex<T> {
2038
2113
  private orderedIds;
2039
2114
  /** id → position in `orderedIds` (PR-99). */
2040
2115
  private readonly posById;
2116
+ private revisionCount;
2041
2117
  constructor(entries?: Iterable<readonly [number, T]>);
2042
2118
  get size(): number;
2119
+ /**
2120
+ * Bumped by every change of ids, order or values. O(1) change detection for
2121
+ * subscribers (a sort keeps `size` but changes the order).
2122
+ */
2123
+ get revision(): number;
2043
2124
  getOrderedIds(): readonly number[];
2044
2125
  getById(id: number): T | undefined;
2045
2126
  /** O(1) position of `id`, or `-1`. */
@@ -2109,6 +2190,15 @@ declare class TableEngine {
2109
2190
  /** Durable command store id (for CHANGE_CELL_* on edit commit). */
2110
2191
  private commandStore?;
2111
2192
  private cellEditOptions;
2193
+ /**
2194
+ * Cell writes coming from editors / host input, executed one at a time in
2195
+ * arrival order. Consecutive values for the same cell coalesce (latest
2196
+ * wins). Until a write landed, the queued value is what the cell shows.
2197
+ */
2198
+ private readonly cellWrites;
2199
+ private cellWriteChain;
2200
+ /** > 0 while a queued write executes (re-entrant settle must not wait on itself). */
2201
+ private cellWriteDepth;
2112
2202
  readonly errors: Map<string, CellError>;
2113
2203
  readonly searchResult: Map<string, CellError>;
2114
2204
  private readonly asyncCellCache;
@@ -2234,7 +2324,45 @@ declare class TableEngine {
2234
2324
  setCellEditOptions(partial: Partial<CellEditOptions>): void;
2235
2325
  getCellEditOptions(): CellEditOptions;
2236
2326
  getCellEdit(): CellEditSession | null;
2327
+ /**
2328
+ * What the cell editor shows: the session draft, else a value that was
2329
+ * typed but whose write has not reached the table yet (no flicker back to
2330
+ * the old value while it is in flight). `null` = show the table value.
2331
+ */
2237
2332
  getEditDraft(rowId: number, columnId: string): CellEditValue | null;
2333
+ /** Editor / host value for a cell (`UI_CELL_CHANGE`). Resolves once it is durable. */
2334
+ inputCellValue(rowId: number, columnId: string, value: unknown): Promise<void>;
2335
+ /** Editor / host display label for a cell (`UI_CELL_CHANGE_DISPLAY`). */
2336
+ inputCellDisplay(rowId: number, columnId: string, display: unknown): Promise<void>;
2337
+ private inputCell;
2338
+ private enqueueCellWrite;
2339
+ private runCellWrite;
2340
+ /**
2341
+ * Resolves when every queued cell write reached the table. Called from inside
2342
+ * a write (re-entrant) it returns at once instead of waiting on itself.
2343
+ */
2344
+ settleCellWrites(): Promise<void>;
2345
+ /** Queues CHANGE_CELL_* for `columnIds` of `session`; returns the value writes. */
2346
+ private queueDraftWrites;
2347
+ /**
2348
+ * Make what the user typed durable WITHOUT ending the edit: dirty drafts are
2349
+ * written and become the session baseline, then all queued writes settle.
2350
+ * Every durable read (snapshot, row stream, export) calls this first, so a
2351
+ * save never misses the value still in the editor.
2352
+ */
2353
+ flushCellEdit(): Promise<void>;
2354
+ /**
2355
+ * Focus / pointer moved outside the grid. Deferred commit ends the edit per
2356
+ * `stopEditingWhenCellsLoseFocus`; immediate commit has nothing pending and
2357
+ * keeps the editor (legacy table behaviour).
2358
+ */
2359
+ leaveGridFocus(): Promise<void>;
2360
+ /**
2361
+ * Before dispose / unmount: commit (or drop, when
2362
+ * `stopEditingWhenCellsLoseFocus` is false) the open edit and wait until
2363
+ * every queued write is durable.
2364
+ */
2365
+ settleEditsForTeardown(): Promise<void>;
2238
2366
  isEditingCell(rowId: number, columnId: string): boolean;
2239
2367
  /**
2240
2368
  * Begin a session-only draft for the cell (or full row). Does not touch EventStore.
@@ -2271,6 +2399,7 @@ declare class TableEngine {
2271
2399
  private validateCellFull;
2272
2400
  private finishValidation;
2273
2401
  private collectValidationJobs;
2402
+ /** Replaces the error map; true when the set of errors / messages changed. */
2274
2403
  private applyValidationErrors;
2275
2404
  private runValidationSync;
2276
2405
  private runValidationAsync;
@@ -2325,6 +2454,8 @@ declare class ChangelogProjection {
2325
2454
  private subscribers;
2326
2455
  private seenEventIds;
2327
2456
  private started;
2457
+ /** Incremented by start() and stop(); invalidates an in-flight catch-up. */
2458
+ private run;
2328
2459
  constructor(eventStore: EventStore);
2329
2460
  /**
2330
2461
  * Catch up via readAll, then subscribe for live events.
@@ -2332,6 +2463,8 @@ declare class ChangelogProjection {
2332
2463
  */
2333
2464
  start(): Promise<void>;
2334
2465
  stop(): void;
2466
+ /** Stop and drop all subscribers (grid teardown). Entries stay readable. */
2467
+ dispose(): void;
2335
2468
  query(filter?: ChangelogQuery): ChangelogEntry[];
2336
2469
  count(filter?: ChangelogQuery): number;
2337
2470
  subscribe(notify: (entries: ChangelogEntry[]) => void, filter?: ChangelogQuery): Unsubscribe;
@@ -2489,4 +2622,4 @@ interface GridSession {
2489
2622
  subscribeViewport(listener: () => void): () => void;
2490
2623
  }
2491
2624
 
2492
- export { type CycleSortModelOptions as $, type AggFunc as A, type AriaSortValue as B, type ColumnSchema as C, type DefaultOptionType as D, type EventStore as E, type FilterModel as F, type GridEvent as G, HistoryPanelViewModel as H, type ArrowDirection as I, type BooleanColumnFilter as J, type BooleanFilterOp as K, type BuiltinFilterKind as L, type MobileTableViewState as M, type CellRangeBounds as N, type CellRangeSelection as O, type ColumnDefBridge as P, type ColumnField as Q, Row as R, type ColumnFilter as S, type TableSnapShot as T, type UIRow as U, type ValidCell as V, type WindowedTableRepository as W, type ColumnPinned as X, type CombinedColumnFilter as Y, type CustomColumnFilter as Z, type CustomFilterFn as _, type Unsubscribe as a, sortPriorityForColumn as a$, type DateColumnFilter as a0, type DateFilterOp as a1, type FilterAccessor as a2, type FilterDef as a3, type FilterJoin as a4, HEADER_SORT_CLICK_MAX_MOVE_PX as a5, INDEX_COL_ID as a6, type ItemType as a7, type NumberColumnFilter as a8, type NumberFilterOp as a9, compareSortValues as aA, compareTypedValues as aB, createEmptyCellRangeSelection as aC, ctrlClickCell as aD, cycleSortModel as aE, defaultGetRowId as aF, ensureIndexColumnDef as aG, isBlankSortValue as aH, isCellInRange as aI, isColumnFilterActive as aJ, isHeaderColumnSortable as aK, isServerRowModel as aL, isWindowedRepository as aM, mapRowDataToRowInputs as aN, mergeCellRanges as aO, moveCellAddress as aP, normalizeCellRange as aQ, normalizeDigits as aR, normalizeFilterText as aS, pageWindow as aT, rangeFromAnchorFocus as aU, rangesOverlap as aV, resolveBuiltinFilterKind as aW, selectAllCellRanges as aX, shiftArrowCell as aY, shiftClickCell as aZ, shouldCommitHeaderSortClick as a_, type PersistedRowRecord as aa, type RowModelType as ab, RowStateEnum as ac, type SetColumnFilter as ad, type SetFilterOp as ae, type SimpleColumnFilter as af, type SortAccessor as ag, type SortDirection as ah, type SortModel as ai, type SortModelItem as aj, type SortValueComparator as ak, SparseRowIndex as al, type TextColumnFilter as am, type TextFilterOp as an, type ViewIntent as ao, Viewport as ap, type VisibleRange as aq, applyFilter as ar, applyHostRowDataToTable as as, applySort as at, ariaSortForColumn as au, clampColIndex as av, clampRowIndex as aw, clickCell as ax, colIndex as ay, collectUniqueFilterValues as az, type GridSession as b, type ExportRequestedPayload as b0, type ImportRequestedPayload as b1, type IRule as b2, type ColumnVisibilityRule as b3, type IDependOn as b4, type Actor$1 as b5, type ColDefOrGroup as b6, type TableRepository as b7, type PermissionPolicy as b8, type CellEditType as b9, type IMultiSelectConfig as ba, type ColumnGroupDef as bb, type ColumnGroupMeta as bc, type ColumnGroupPathEntry as bd, isColumnGroupDef as be, type CollectionScope as c, type CellRange as d, TableEngine as e, Table as f, type TableActions as g, type GridSearchState as h, ChangelogProjection as i, CellUndoStack as j, type TableViewState as k, type ColumnDef as l, type GetRowId as m, Cell as n, type ChangelogQuery as o, type ChangelogEntry as p, type HistoryQuery as q, type HistoryItem as r, type ActiveCell as s, type CellEditValue as t, type MobileEditorState as u, type ValidationCallbackResult as v, type CellAddress as w, type FieldType as x, type AggFuncName as y, type AppendResult as z };
2625
+ export { type CycleSortModelOptions as $, type AggFunc as A, type AriaSortValue as B, type ColumnSchema as C, type DefaultOptionType as D, type EventStore as E, type FilterModel as F, type GridEvent as G, HistoryPanelViewModel as H, type ArrowDirection as I, type BooleanColumnFilter as J, type BooleanFilterOp as K, type BuiltinFilterKind as L, type MobileTableViewState as M, type CellRangeBounds as N, type CellRangeSelection as O, type ColumnDefBridge as P, type ColumnField as Q, Row as R, type ColumnFilter as S, type TableSnapShot as T, type UIRow as U, type ValidCell as V, type WindowedTableRepository as W, type ColumnPinned as X, type CombinedColumnFilter as Y, type CustomColumnFilter as Z, type CustomFilterFn as _, type Unsubscribe as a, sortPriorityForColumn as a$, type DateColumnFilter as a0, type DateFilterOp as a1, type FilterAccessor as a2, type FilterDef as a3, type FilterJoin as a4, HEADER_SORT_CLICK_MAX_MOVE_PX as a5, INDEX_COL_ID as a6, type ItemType as a7, type NumberColumnFilter as a8, type NumberFilterOp as a9, compareSortValues as aA, compareTypedValues as aB, createEmptyCellRangeSelection as aC, ctrlClickCell as aD, cycleSortModel as aE, defaultGetRowId as aF, ensureIndexColumnDef as aG, isBlankSortValue as aH, isCellInRange as aI, isColumnFilterActive as aJ, isHeaderColumnSortable as aK, isServerRowModel as aL, isWindowedRepository as aM, mapRowDataToRowInputs as aN, mergeCellRanges as aO, moveCellAddress as aP, normalizeCellRange as aQ, normalizeDigits as aR, normalizeFilterText as aS, pageWindow as aT, rangeFromAnchorFocus as aU, rangesOverlap as aV, resolveBuiltinFilterKind as aW, selectAllCellRanges as aX, shiftArrowCell as aY, shiftClickCell as aZ, shouldCommitHeaderSortClick as a_, type PersistedRowRecord as aa, type RowModelType as ab, RowStateEnum as ac, type SetColumnFilter as ad, type SetFilterOp as ae, type SimpleColumnFilter as af, type SortAccessor as ag, type SortDirection as ah, type SortModel as ai, type SortModelItem as aj, type SortValueComparator as ak, SparseRowIndex as al, type TextColumnFilter as am, type TextFilterOp as an, type ViewIntent as ao, Viewport as ap, type VisibleRange as aq, applyFilter as ar, applyHostRowDataToTable as as, applySort as at, ariaSortForColumn as au, clampColIndex as av, clampRowIndex as aw, clickCell as ax, colIndex as ay, collectUniqueFilterValues as az, type GridSession as b, type ExportRequestedPayload as b0, type ImportRequestedPayload as b1, type IRule as b2, type ColumnVisibilityRule as b3, type IDependOn as b4, type ResolveOnConfig as b5, type IBaseQueryResponse as b6, type HostRemoteApi as b7, type Actor$1 as b8, type ColDefOrGroup as b9, type TableRepository as ba, type PermissionPolicy as bb, type CellEditType as bc, type CellEditCommit as bd, type EnterNavigation as be, type IMultiSelectConfig as bf, type ColumnGroupDef as bg, type ColumnGroupMeta as bh, type ColumnGroupPathEntry as bi, isColumnGroupDef as bj, type CollectionScope as c, type CellRange as d, TableEngine as e, Table as f, type TableActions as g, type GridSearchState as h, ChangelogProjection as i, CellUndoStack as j, type TableViewState as k, type ColumnDef as l, type GetRowId as m, Cell as n, type ChangelogQuery as o, type ChangelogEntry as p, type HistoryQuery as q, type HistoryItem as r, type ActiveCell as s, type CellEditValue as t, type MobileEditorState as u, type ValidationCallbackResult as v, type CellAddress as w, type FieldType as x, type AggFuncName as y, type AppendResult as z };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkLY27YAXE_cjs = require('./chunk-LY27YAXE.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "GridSyncService", {
8
+ enumerable: true,
9
+ get: function () { return chunkLY27YAXE_cjs.GridSyncService; }
10
+ });
11
+ //# sourceMappingURL=GridSyncService-3JQLEY65.cjs.map
12
+ //# sourceMappingURL=GridSyncService-3JQLEY65.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"GridSyncService-TAPAHABV.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"GridSyncService-3JQLEY65.cjs"}
@@ -0,0 +1,3 @@
1
+ export { GridSyncService } from './chunk-KCNTKYUY.js';
2
+ //# sourceMappingURL=GridSyncService-GECXGEKL.js.map
3
+ //# sourceMappingURL=GridSyncService-GECXGEKL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"GridSyncService-KTLB4KP3.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"GridSyncService-GECXGEKL.js"}
@@ -1,4 +1,4 @@
1
- import { E as ExportSource } from './GridPlugin-oxhq8AsM.cjs';
1
+ import { E as ExportSource } from './GridPlugin-DewWufGZ.cjs';
2
2
 
3
3
  /**
4
4
  * Port so PDF libraries stay out of Core.
@@ -1,4 +1,4 @@
1
- import { E as ExportSource } from './GridPlugin-CJCaYnlw.js';
1
+ import { E as ExportSource } from './GridPlugin-Bewn0X51.js';
2
2
 
3
3
  /**
4
4
  * Port so PDF libraries stay out of Core.
@@ -1,4 +1,4 @@
1
- import { d as CellRange, e as TableEngine, G as GridEvent, a as Unsubscribe, E as EventStore, f as Table, g as TableActions, h as GridSearchState, F as FilterModel, i as ChangelogProjection, H as HistoryPanelViewModel, j as CellUndoStack, b as GridSession, k as TableViewState, l as ColumnDef, m as GetRowId, M as MobileTableViewState, U as UIRow, R as Row, A as AggFunc, c as CollectionScope, T as TableSnapShot, n as Cell, o as ChangelogQuery, p as ChangelogEntry, q as HistoryQuery, r as HistoryItem, s as ActiveCell, t as CellEditValue, u as MobileEditorState, v as ValidationCallbackResult, V as ValidCell } from './GridSession-Bc7UIawO.js';
1
+ import { d as CellRange, e as TableEngine, G as GridEvent, a as Unsubscribe, E as EventStore, f as Table, g as TableActions, h as GridSearchState, F as FilterModel, i as ChangelogProjection, H as HistoryPanelViewModel, j as CellUndoStack, b as GridSession, k as TableViewState, l as ColumnDef, m as GetRowId, M as MobileTableViewState, U as UIRow, R as Row, A as AggFunc, c as CollectionScope, T as TableSnapShot, n as Cell, o as ChangelogQuery, p as ChangelogEntry, q as HistoryQuery, r as HistoryItem, s as ActiveCell, t as CellEditValue, u as MobileEditorState, v as ValidationCallbackResult, V as ValidCell } from './GridSession-CeIfVFck.js';
2
2
  import { A as AuditLogger, R as RemoteApi } from './RemoteApi-CCQxiSf1.js';
3
3
 
4
4
  /**
@@ -140,6 +140,12 @@ type SyncPort = {
140
140
  */
141
141
  resolveConflict(conflictId: string, choice: ManualResolution): Promise<void>;
142
142
  subscribeConflicts(listener: (conflicts: readonly SyncConflict[]) => void): () => void;
143
+ /**
144
+ * Release listeners / deferred state when the grid is torn down. After
145
+ * this, `sync()` is a no-op that returns an empty result. Optional so
146
+ * custom SyncPort implementations keep compiling.
147
+ */
148
+ dispose?(): void;
143
149
  };
144
150
 
145
151
  /** Peer presence snapshot (PR-139). */
@@ -217,10 +223,14 @@ declare class OfflineStatus {
217
223
  private syncedIds;
218
224
  private connectivityUnsub;
219
225
  private storeUnsub;
226
+ /** Incremented by every stop(); invalidates an in-flight start(). */
227
+ private lifecycle;
220
228
  private readonly connectivityListeners;
221
229
  private readonly pendingListeners;
222
230
  constructor(options: OfflineStatusOptions);
223
231
  start(eventStore: EventStore): Promise<void>;
232
+ /** Stop listening and drop all listeners. The instance is inert afterwards. */
233
+ dispose(): void;
224
234
  stop(): void;
225
235
  getConnectivity(): Connectivity;
226
236
  getPendingChanges(): readonly PendingChange[];
@@ -441,6 +451,9 @@ declare class UITableController {
441
451
  private clipboardOptions;
442
452
  private syncPort?;
443
453
  private presencePort?;
454
+ /** Set by releaseResources(); the first call's promise is reused (idempotent). */
455
+ private releasePromise?;
456
+ private resourceTeardown?;
444
457
  constructor(engine: TableEngine, store: string, tableKey: string, audit: AuditLogger, changelogProjection?: ChangelogProjection | undefined, historyPanelViewModel?: HistoryPanelViewModel | undefined, cellUndoStack?: CellUndoStack | undefined, session?: GridSession | undefined, remoteApi?: RemoteApi | undefined, offlineStatus?: OfflineStatus | undefined);
445
458
  getRemoteApi(): RemoteApi | undefined;
446
459
  getOfflineStatus(): OfflineStatus | undefined;
@@ -448,6 +461,14 @@ declare class UITableController {
448
461
  setSyncPort(port: SyncPort | undefined): void;
449
462
  getPresencePort(): PresencePort | undefined;
450
463
  setPresencePort(port: PresencePort | undefined): void;
464
+ /**
465
+ * Composition root hook: the callback that releases every resource the grid
466
+ * created (subscriptions, projections, plugins, owned event store).
467
+ * Run once by {@link releaseResources}.
468
+ */
469
+ setResourceTeardown(teardown: (() => void | Promise<void>) | undefined): void;
470
+ /** True once resources were released (via releaseResources or dispose). */
471
+ isReleased(): boolean;
451
472
  getPresencePeers(): readonly PresencePeer[];
452
473
  subscribePresencePeers(cb: (peers: readonly PresencePeer[]) => void): () => void;
453
474
  /** Broadcast local active cell to peers (no-op without presence). */
@@ -475,6 +496,7 @@ declare class UITableController {
475
496
  private safe;
476
497
  private changePageSize;
477
498
  private changePage;
499
+ /** Editor of this cell → session draft (written per `cellEditCommit`); otherwise write-through. */
478
500
  private onCellChange;
479
501
  private onDescriptionSave;
480
502
  private onCellDisplayChange;
@@ -583,6 +605,16 @@ declare class UITableController {
583
605
  startCellEdit(rowId: number, columnId: string): void;
584
606
  cancelCellEdit(): void;
585
607
  commitCellEdit(): Promise<number>;
608
+ /**
609
+ * Write what is still in the cell editor (the edit stays open) and wait
610
+ * until every pending cell write is durable. `getFullSnapShot` /
611
+ * `iterateRowsFromDb` / exports already do this; call it before reading
612
+ * synchronous APIs (`getRowView`, `getSnapShot`) for a save.
613
+ */
614
+ flushCellEdit(): Promise<void>;
615
+ /** DataGrid: focus / pointer left the grid (see `stopEditingWhenCellsLoseFocus`). */
616
+ leaveGridFocus(): Promise<void>;
617
+ private settleEditsForTeardown;
586
618
  getEditDraft(rowId: number, columnId: string): CellEditValue | null;
587
619
  isEditingCell(rowId: number, columnId: string): boolean;
588
620
  getMobileEditor(): MobileEditorState | undefined;
@@ -624,7 +656,21 @@ declare class UITableController {
624
656
  onRowSelect(rowId: number): void;
625
657
  getCellRanges(): readonly CellRange[];
626
658
  addCellRange(range: CellRange): void;
627
- dispose(): void;
659
+ /**
660
+ * Full dispose: `TABLE_DISPOSED` (windowed repo: drop the RAM page window,
661
+ * other repos: `repo.delete` — unchanged data semantics) followed by
662
+ * {@link releaseResources}. Idempotent; the promise settles once teardown
663
+ * finished and never rejects.
664
+ */
665
+ dispose(): Promise<void>;
666
+ /**
667
+ * Resource-only teardown: stops subscriptions, projections, sync, presence,
668
+ * plugins, server row model and closes an event store the grid opened.
669
+ * Does NOT dispatch `TABLE_DISPOSED` — persisted table data is untouched.
670
+ * Idempotent (same promise on every call); never rejects.
671
+ */
672
+ releaseResources(): Promise<void>;
673
+ private runResourceTeardown;
628
674
  dispatch(command: UITableCommand): Promise<void>;
629
675
  private dispatchInternal;
630
676
  }
@@ -1,4 +1,4 @@
1
- import { d as CellRange, e as TableEngine, G as GridEvent, a as Unsubscribe, E as EventStore, f as Table, g as TableActions, h as GridSearchState, F as FilterModel, i as ChangelogProjection, H as HistoryPanelViewModel, j as CellUndoStack, b as GridSession, k as TableViewState, l as ColumnDef, m as GetRowId, M as MobileTableViewState, U as UIRow, R as Row, A as AggFunc, c as CollectionScope, T as TableSnapShot, n as Cell, o as ChangelogQuery, p as ChangelogEntry, q as HistoryQuery, r as HistoryItem, s as ActiveCell, t as CellEditValue, u as MobileEditorState, v as ValidationCallbackResult, V as ValidCell } from './GridSession-B-9lLcoB.cjs';
1
+ import { d as CellRange, e as TableEngine, G as GridEvent, a as Unsubscribe, E as EventStore, f as Table, g as TableActions, h as GridSearchState, F as FilterModel, i as ChangelogProjection, H as HistoryPanelViewModel, j as CellUndoStack, b as GridSession, k as TableViewState, l as ColumnDef, m as GetRowId, M as MobileTableViewState, U as UIRow, R as Row, A as AggFunc, c as CollectionScope, T as TableSnapShot, n as Cell, o as ChangelogQuery, p as ChangelogEntry, q as HistoryQuery, r as HistoryItem, s as ActiveCell, t as CellEditValue, u as MobileEditorState, v as ValidationCallbackResult, V as ValidCell } from './GridSession-CmQn2RnL.cjs';
2
2
  import { A as AuditLogger, R as RemoteApi } from './RemoteApi-CCQxiSf1.cjs';
3
3
 
4
4
  /**
@@ -140,6 +140,12 @@ type SyncPort = {
140
140
  */
141
141
  resolveConflict(conflictId: string, choice: ManualResolution): Promise<void>;
142
142
  subscribeConflicts(listener: (conflicts: readonly SyncConflict[]) => void): () => void;
143
+ /**
144
+ * Release listeners / deferred state when the grid is torn down. After
145
+ * this, `sync()` is a no-op that returns an empty result. Optional so
146
+ * custom SyncPort implementations keep compiling.
147
+ */
148
+ dispose?(): void;
143
149
  };
144
150
 
145
151
  /** Peer presence snapshot (PR-139). */
@@ -217,10 +223,14 @@ declare class OfflineStatus {
217
223
  private syncedIds;
218
224
  private connectivityUnsub;
219
225
  private storeUnsub;
226
+ /** Incremented by every stop(); invalidates an in-flight start(). */
227
+ private lifecycle;
220
228
  private readonly connectivityListeners;
221
229
  private readonly pendingListeners;
222
230
  constructor(options: OfflineStatusOptions);
223
231
  start(eventStore: EventStore): Promise<void>;
232
+ /** Stop listening and drop all listeners. The instance is inert afterwards. */
233
+ dispose(): void;
224
234
  stop(): void;
225
235
  getConnectivity(): Connectivity;
226
236
  getPendingChanges(): readonly PendingChange[];
@@ -441,6 +451,9 @@ declare class UITableController {
441
451
  private clipboardOptions;
442
452
  private syncPort?;
443
453
  private presencePort?;
454
+ /** Set by releaseResources(); the first call's promise is reused (idempotent). */
455
+ private releasePromise?;
456
+ private resourceTeardown?;
444
457
  constructor(engine: TableEngine, store: string, tableKey: string, audit: AuditLogger, changelogProjection?: ChangelogProjection | undefined, historyPanelViewModel?: HistoryPanelViewModel | undefined, cellUndoStack?: CellUndoStack | undefined, session?: GridSession | undefined, remoteApi?: RemoteApi | undefined, offlineStatus?: OfflineStatus | undefined);
445
458
  getRemoteApi(): RemoteApi | undefined;
446
459
  getOfflineStatus(): OfflineStatus | undefined;
@@ -448,6 +461,14 @@ declare class UITableController {
448
461
  setSyncPort(port: SyncPort | undefined): void;
449
462
  getPresencePort(): PresencePort | undefined;
450
463
  setPresencePort(port: PresencePort | undefined): void;
464
+ /**
465
+ * Composition root hook: the callback that releases every resource the grid
466
+ * created (subscriptions, projections, plugins, owned event store).
467
+ * Run once by {@link releaseResources}.
468
+ */
469
+ setResourceTeardown(teardown: (() => void | Promise<void>) | undefined): void;
470
+ /** True once resources were released (via releaseResources or dispose). */
471
+ isReleased(): boolean;
451
472
  getPresencePeers(): readonly PresencePeer[];
452
473
  subscribePresencePeers(cb: (peers: readonly PresencePeer[]) => void): () => void;
453
474
  /** Broadcast local active cell to peers (no-op without presence). */
@@ -475,6 +496,7 @@ declare class UITableController {
475
496
  private safe;
476
497
  private changePageSize;
477
498
  private changePage;
499
+ /** Editor of this cell → session draft (written per `cellEditCommit`); otherwise write-through. */
478
500
  private onCellChange;
479
501
  private onDescriptionSave;
480
502
  private onCellDisplayChange;
@@ -583,6 +605,16 @@ declare class UITableController {
583
605
  startCellEdit(rowId: number, columnId: string): void;
584
606
  cancelCellEdit(): void;
585
607
  commitCellEdit(): Promise<number>;
608
+ /**
609
+ * Write what is still in the cell editor (the edit stays open) and wait
610
+ * until every pending cell write is durable. `getFullSnapShot` /
611
+ * `iterateRowsFromDb` / exports already do this; call it before reading
612
+ * synchronous APIs (`getRowView`, `getSnapShot`) for a save.
613
+ */
614
+ flushCellEdit(): Promise<void>;
615
+ /** DataGrid: focus / pointer left the grid (see `stopEditingWhenCellsLoseFocus`). */
616
+ leaveGridFocus(): Promise<void>;
617
+ private settleEditsForTeardown;
586
618
  getEditDraft(rowId: number, columnId: string): CellEditValue | null;
587
619
  isEditingCell(rowId: number, columnId: string): boolean;
588
620
  getMobileEditor(): MobileEditorState | undefined;
@@ -624,7 +656,21 @@ declare class UITableController {
624
656
  onRowSelect(rowId: number): void;
625
657
  getCellRanges(): readonly CellRange[];
626
658
  addCellRange(range: CellRange): void;
627
- dispose(): void;
659
+ /**
660
+ * Full dispose: `TABLE_DISPOSED` (windowed repo: drop the RAM page window,
661
+ * other repos: `repo.delete` — unchanged data semantics) followed by
662
+ * {@link releaseResources}. Idempotent; the promise settles once teardown
663
+ * finished and never rejects.
664
+ */
665
+ dispose(): Promise<void>;
666
+ /**
667
+ * Resource-only teardown: stops subscriptions, projections, sync, presence,
668
+ * plugins, server row model and closes an event store the grid opened.
669
+ * Does NOT dispatch `TABLE_DISPOSED` — persisted table data is untouched.
670
+ * Idempotent (same promise on every call); never rejects.
671
+ */
672
+ releaseResources(): Promise<void>;
673
+ private runResourceTeardown;
628
674
  dispatch(command: UITableCommand): Promise<void>;
629
675
  private dispatchInternal;
630
676
  }
@@ -1,5 +1,5 @@
1
- import { G as GridPlugin, a as GridPluginContext, E as ExportSource } from './GridPlugin-oxhq8AsM.cjs';
2
- import { P as PdfRenderer, a as PdfRenderOptions } from './PdfRenderer-CBg7hWNS.cjs';
1
+ import { G as GridPlugin, a as GridPluginContext, E as ExportSource } from './GridPlugin-DewWufGZ.cjs';
2
+ import { P as PdfRenderer, a as PdfRenderOptions } from './PdfRenderer-B9FJaCo_.cjs';
3
3
 
4
4
  /**
5
5
  * Document PDF template options (PR-141).
@@ -1,5 +1,5 @@
1
- import { G as GridPlugin, a as GridPluginContext, E as ExportSource } from './GridPlugin-CJCaYnlw.js';
2
- import { P as PdfRenderer, a as PdfRenderOptions } from './PdfRenderer-1HFh6UeR.js';
1
+ import { G as GridPlugin, a as GridPluginContext, E as ExportSource } from './GridPlugin-Bewn0X51.js';
2
+ import { P as PdfRenderer, a as PdfRenderOptions } from './PdfRenderer-bN7ca_Aj.js';
3
3
 
4
4
  /**
5
5
  * Document PDF template options (PR-141).
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkASPTRYRD_cjs = require('../chunk-ASPTRYRD.cjs');
3
+ var chunkE2J533UH_cjs = require('../chunk-E2J533UH.cjs');
4
4
 
5
5
  // infrastructure/Repositories/fetchRemoteApi.ts
6
6
  function readCookie(name) {
@@ -58,9 +58,17 @@ var FetchRemoteApi = class {
58
58
  body: payload ? JSON.stringify(payload) : void 0
59
59
  });
60
60
  if (!res.ok) {
61
- this.err?.handle(`RemoteApi request failed: ${res.status}`, "FetchRemoteApi.request");
61
+ throw new Error(
62
+ `RemoteApi request failed: HTTP ${res.status} ${input.endpoint}`
63
+ );
64
+ }
65
+ try {
66
+ return await res.json();
67
+ } catch {
68
+ throw new Error(
69
+ `RemoteApi response is not valid JSON: HTTP ${res.status} ${input.endpoint}`
70
+ );
62
71
  }
63
- return await res.json();
64
72
  } catch (error) {
65
73
  this.err?.handle(error, "FetchRemoteApi.request");
66
74
  throw error;
@@ -70,7 +78,11 @@ var FetchRemoteApi = class {
70
78
 
71
79
  Object.defineProperty(exports, "CallbackRemoteApi", {
72
80
  enumerable: true,
73
- get: function () { return chunkASPTRYRD_cjs.CallbackRemoteApi; }
81
+ get: function () { return chunkE2J533UH_cjs.CallbackRemoteApi; }
82
+ });
83
+ Object.defineProperty(exports, "createBaseQueryRemoteApi", {
84
+ enumerable: true,
85
+ get: function () { return chunkE2J533UH_cjs.createBaseQueryRemoteApi; }
74
86
  });
75
87
  exports.FetchRemoteApi = FetchRemoteApi;
76
88
  //# sourceMappingURL=arian-erp.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../infrastructure/Repositories/fetchRemoteApi.ts"],"names":[],"mappings":"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","file":"arian-erp.cjs","sourcesContent":["import { EngineErrorHandler } from '../../engine/EngineErrorHandler';\r\nimport { RemoteApi } from '../../application/ports/RemoteApi';\r\n\r\nexport type ErpDefaults = {\r\n PlaceId?: { id?: number };\r\n YearId?: { id?: number };\r\n LanguageId?: { id?: number };\r\n CashierId?: { id?: number };\r\n CurrencyId?: { id?: number };\r\n};\r\n\r\nfunction readCookie(name: string): string {\r\n if (typeof document === 'undefined') return '';\r\n const cookies = document.cookie.split(';');\r\n const cookie = cookies.find((item) => item.trim().startsWith(`${name}=`));\r\n if (!cookie) return '';\r\n return cookie.trim().slice(name.length + 1);\r\n}\r\n\r\nfunction readErpDefaults(): ErpDefaults {\r\n if (typeof window === 'undefined') return {};\r\n try {\r\n const storage = localStorage.getItem('persist:arianERP');\r\n const parsedStorage = JSON.parse(storage ?? '{}');\r\n const parsedConfig = JSON.parse(parsedStorage.config ?? '{}');\r\n return parsedConfig.defaultConfigs ?? {};\r\n } catch {\r\n return {};\r\n }\r\n}\r\n\r\nfunction joinUrl(baseUrl: string, endpoint: string): string {\r\n if (/^https?:\\/\\//i.test(endpoint)) return endpoint;\r\n const base = baseUrl.replace(/\\/$/, '');\r\n const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\r\n return `${base}${path}`;\r\n}\r\n\r\n/**\r\n * Host-injected RemoteApi for arianERP.\r\n * Not the package default — pass `remoteApi={new FetchRemoteApi()}` from the ERP host.\r\n * Reads auth cookie `_auth` and redux-persist `persist:arianERP`, then POSTs JSON\r\n * (relative URLs work on the ERP host).\r\n * See `examples/host-arian-erp/host-arian-erp.md`.\r\n */\r\nexport type FetchRemoteApiOptions = {\r\n baseUrl?: string;\r\n /** Inject the bearer token (e.g. from the host's auth store). Default: cookie `_auth`. */\r\n getToken?: () => string | undefined | null;\r\n /** Inject ERP defaults (e.g. from Redux). Default: localStorage `persist:arianERP`. */\r\n getDefaults?: () => ErpDefaults;\r\n /** Custom fetch (tests, interceptors, token refresh). Default: global `fetch`. */\r\n fetcher?: typeof fetch;\r\n};\r\n\r\nexport class FetchRemoteApi implements RemoteApi {\r\n constructor(\r\n private readonly err?: EngineErrorHandler,\r\n private readonly options: FetchRemoteApiOptions = {},\r\n ) {}\r\n\r\n async request<TResponse = unknown>(input: {\r\n endpoint: string;\r\n params?: Record<string, unknown>;\r\n method?: 'GET' | 'POST';\r\n }): Promise<TResponse> {\r\n try {\r\n const defaults = this.options.getDefaults?.() ?? readErpDefaults();\r\n const token = this.options.getToken\r\n ? (this.options.getToken() ?? '')\r\n : readCookie('_auth');\r\n const method = input.method ?? 'POST';\r\n const url = joinUrl(this.options.baseUrl ?? '', input.endpoint);\r\n const payload =\r\n method === 'GET'\r\n ? undefined\r\n : {\r\n ...(input.params ?? {}),\r\n Defaults: {\r\n CurrencyId: defaults.CurrencyId?.id,\r\n CashierId: defaults.CashierId?.id,\r\n PlaceId: defaults.PlaceId?.id,\r\n YearId: defaults.YearId?.id,\r\n LangId: defaults.LanguageId?.id,\r\n },\r\n };\r\n\r\n const headers: Record<string, string> = {\r\n 'Content-Type': 'application/json',\r\n };\r\n if (token) headers.Authorization = `Bearer ${token}`;\r\n\r\n const res = await (this.options.fetcher ?? fetch)(url, {\r\n method,\r\n headers,\r\n body: payload ? JSON.stringify(payload) : undefined,\r\n });\r\n if (!res.ok) {\r\n this.err?.handle(`RemoteApi request failed: ${res.status}`, 'FetchRemoteApi.request');\r\n }\r\n return (await res.json()) as TResponse;\r\n } catch (error) {\r\n this.err?.handle(error, 'FetchRemoteApi.request');\r\n throw error;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../infrastructure/Repositories/fetchRemoteApi.ts"],"names":[],"mappings":";;;;;AAWA,SAAS,WAAW,IAAA,EAAsB;AACxC,EAAA,IAAI,OAAO,QAAA,KAAa,WAAA,EAAa,OAAO,EAAA;AAC5C,EAAA,MAAM,OAAA,GAAU,QAAA,CAAS,MAAA,CAAO,KAAA,CAAM,GAAG,CAAA;AACzC,EAAA,MAAM,MAAA,GAAS,OAAA,CAAQ,IAAA,CAAK,CAAC,IAAA,KAAS,IAAA,CAAK,IAAA,EAAK,CAAE,UAAA,CAAW,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,CAAC,CAAA;AACxE,EAAA,IAAI,CAAC,QAAQ,OAAO,EAAA;AACpB,EAAA,OAAO,OAAO,IAAA,EAAK,CAAE,KAAA,CAAM,IAAA,CAAK,SAAS,CAAC,CAAA;AAC5C;AAEA,SAAS,eAAA,GAA+B;AACtC,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,EAAC;AAC3C,EAAA,IAAI;AACF,IAAA,MAAM,OAAA,GAAU,YAAA,CAAa,OAAA,CAAQ,kBAAkB,CAAA;AACvD,IAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,KAAA,CAAM,OAAA,IAAW,IAAI,CAAA;AAChD,IAAA,MAAM,YAAA,GAAe,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,UAAU,IAAI,CAAA;AAC5D,IAAA,OAAO,YAAA,CAAa,kBAAkB,EAAC;AAAA,EACzC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,EAAC;AAAA,EACV;AACF;AAEA,SAAS,OAAA,CAAQ,SAAiB,QAAA,EAA0B;AAC1D,EAAA,IAAI,eAAA,CAAgB,IAAA,CAAK,QAAQ,CAAA,EAAG,OAAO,QAAA;AAC3C,EAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,OAAA,CAAQ,KAAA,EAAO,EAAE,CAAA;AACtC,EAAA,MAAM,OAAO,QAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GAAI,QAAA,GAAW,IAAI,QAAQ,CAAA,CAAA;AAC/D,EAAA,OAAO,CAAA,EAAG,IAAI,CAAA,EAAG,IAAI,CAAA,CAAA;AACvB;AAqBO,IAAM,iBAAN,MAA0C;AAAA,EAC/C,WAAA,CACmB,GAAA,EACA,OAAA,GAAiC,EAAC,EACnD;AAFiB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AACA,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAAA,EAChB;AAAA,EAEH,MAAM,QAA6B,KAAA,EAIZ;AACrB,IAAA,IAAI;AACF,MAAA,MAAM,QAAA,GAAW,IAAA,CAAK,OAAA,CAAQ,WAAA,QAAmB,eAAA,EAAgB;AACjE,MAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,OAAA,CAAQ,QAAA,GACtB,IAAA,CAAK,QAAQ,QAAA,EAAS,IAAK,EAAA,GAC5B,UAAA,CAAW,OAAO,CAAA;AACtB,MAAA,MAAM,MAAA,GAAS,MAAM,MAAA,IAAU,MAAA;AAC/B,MAAA,MAAM,MAAM,OAAA,CAAQ,IAAA,CAAK,QAAQ,OAAA,IAAW,EAAA,EAAI,MAAM,QAAQ,CAAA;AAC9D,MAAA,MAAM,OAAA,GACJ,MAAA,KAAW,KAAA,GACP,KAAA,CAAA,GACA;AAAA,QACE,GAAI,KAAA,CAAM,MAAA,IAAU,EAAC;AAAA,QACrB,QAAA,EAAU;AAAA,UACR,UAAA,EAAY,SAAS,UAAA,EAAY,EAAA;AAAA,UACjC,SAAA,EAAW,SAAS,SAAA,EAAW,EAAA;AAAA,UAC/B,OAAA,EAAS,SAAS,OAAA,EAAS,EAAA;AAAA,UAC3B,MAAA,EAAQ,SAAS,MAAA,EAAQ,EAAA;AAAA,UACzB,MAAA,EAAQ,SAAS,UAAA,EAAY;AAAA;AAC/B,OACF;AAEN,MAAA,MAAM,OAAA,GAAkC;AAAA,QACtC,cAAA,EAAgB;AAAA,OAClB;AACA,MAAA,IAAI,KAAA,EAAO,OAAA,CAAQ,aAAA,GAAgB,CAAA,OAAA,EAAU,KAAK,CAAA,CAAA;AAElD,MAAA,MAAM,MAAM,MAAA,CAAO,IAAA,CAAK,OAAA,CAAQ,OAAA,IAAW,OAAO,GAAA,EAAK;AAAA,QACrD,MAAA;AAAA,QACA,OAAA;AAAA,QACA,IAAA,EAAM,OAAA,GAAU,IAAA,CAAK,SAAA,CAAU,OAAO,CAAA,GAAI,KAAA;AAAA,OAC3C,CAAA;AACD,MAAA,IAAI,CAAC,IAAI,EAAA,EAAI;AAEX,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,+BAAA,EAAkC,GAAA,CAAI,MAAM,CAAA,CAAA,EAAI,MAAM,QAAQ,CAAA;AAAA,SAChE;AAAA,MACF;AACA,MAAA,IAAI;AACF,QAAA,OAAQ,MAAM,IAAI,IAAA,EAAK;AAAA,MACzB,CAAA,CAAA,MAAQ;AACN,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAA,2CAAA,EAA8C,GAAA,CAAI,MAAM,CAAA,CAAA,EAAI,MAAM,QAAQ,CAAA;AAAA,SAC5E;AAAA,MACF;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,IAAA,CAAK,GAAA,EAAK,MAAA,CAAO,KAAA,EAAO,wBAAwB,CAAA;AAChD,MAAA,MAAM,KAAA;AAAA,IACR;AAAA,EACF;AACF","file":"arian-erp.cjs","sourcesContent":["import { EngineErrorHandler } from '../../engine/EngineErrorHandler';\nimport { RemoteApi } from '../../application/ports/RemoteApi';\n\nexport type ErpDefaults = {\n PlaceId?: { id?: number };\n YearId?: { id?: number };\n LanguageId?: { id?: number };\n CashierId?: { id?: number };\n CurrencyId?: { id?: number };\n};\n\nfunction readCookie(name: string): string {\n if (typeof document === 'undefined') return '';\n const cookies = document.cookie.split(';');\n const cookie = cookies.find((item) => item.trim().startsWith(`${name}=`));\n if (!cookie) return '';\n return cookie.trim().slice(name.length + 1);\n}\n\nfunction readErpDefaults(): ErpDefaults {\n if (typeof window === 'undefined') return {};\n try {\n const storage = localStorage.getItem('persist:arianERP');\n const parsedStorage = JSON.parse(storage ?? '{}');\n const parsedConfig = JSON.parse(parsedStorage.config ?? '{}');\n return parsedConfig.defaultConfigs ?? {};\n } catch {\n return {};\n }\n}\n\nfunction joinUrl(baseUrl: string, endpoint: string): string {\n if (/^https?:\\/\\//i.test(endpoint)) return endpoint;\n const base = baseUrl.replace(/\\/$/, '');\n const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\n return `${base}${path}`;\n}\n\n/**\n * Host-injected RemoteApi for arianERP.\n * Not the package default — pass `remoteApi={new FetchRemoteApi()}` from the ERP host.\n * Reads auth cookie `_auth` and redux-persist `persist:arianERP`, then POSTs JSON\n * (relative URLs work on the ERP host).\n * Non-2xx responses and non-JSON bodies reject with an `Error` naming the HTTP\n * status and endpoint (also reported through the optional error handler).\n * See `examples/host-arian-erp/host-arian-erp.md`.\n */\nexport type FetchRemoteApiOptions = {\n baseUrl?: string;\n /** Inject the bearer token (e.g. from the host's auth store). Default: cookie `_auth`. */\n getToken?: () => string | undefined | null;\n /** Inject ERP defaults (e.g. from Redux). Default: localStorage `persist:arianERP`. */\n getDefaults?: () => ErpDefaults;\n /** Custom fetch (tests, interceptors, token refresh). Default: global `fetch`. */\n fetcher?: typeof fetch;\n};\n\nexport class FetchRemoteApi implements RemoteApi {\n constructor(\n private readonly err?: EngineErrorHandler,\n private readonly options: FetchRemoteApiOptions = {},\n ) {}\n\n async request<TResponse = unknown>(input: {\n endpoint: string;\n params?: Record<string, unknown>;\n method?: 'GET' | 'POST';\n }): Promise<TResponse> {\n try {\n const defaults = this.options.getDefaults?.() ?? readErpDefaults();\n const token = this.options.getToken\n ? (this.options.getToken() ?? '')\n : readCookie('_auth');\n const method = input.method ?? 'POST';\n const url = joinUrl(this.options.baseUrl ?? '', input.endpoint);\n const payload =\n method === 'GET'\n ? undefined\n : {\n ...(input.params ?? {}),\n Defaults: {\n CurrencyId: defaults.CurrencyId?.id,\n CashierId: defaults.CashierId?.id,\n PlaceId: defaults.PlaceId?.id,\n YearId: defaults.YearId?.id,\n LangId: defaults.LanguageId?.id,\n },\n };\n\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n if (token) headers.Authorization = `Bearer ${token}`;\n\n const res = await (this.options.fetcher ?? fetch)(url, {\n method,\n headers,\n body: payload ? JSON.stringify(payload) : undefined,\n });\n if (!res.ok) {\n // Never hand an error body to callers as if it were data.\n throw new Error(\n `RemoteApi request failed: HTTP ${res.status} ${input.endpoint}`,\n );\n }\n try {\n return (await res.json()) as TResponse;\n } catch {\n throw new Error(\n `RemoteApi response is not valid JSON: HTTP ${res.status} ${input.endpoint}`,\n );\n }\n } catch (error) {\n this.err?.handle(error, 'FetchRemoteApi.request');\n throw error;\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { C as ConsoleAuditLogger, R as RemoteApi } from '../RemoteApi-CCQxiSf1.cjs';
2
- export { C as CallbackRemoteApi, R as RemoteApiRequest } from '../callbackRemoteApi-DgnXH-i0.cjs';
2
+ export { B as BaseQueryResult, C as CallbackRemoteApi, R as RemoteApiRequest, c as createBaseQueryRemoteApi } from '../callbackRemoteApi-Cv26MmSD.cjs';
3
3
 
4
4
  declare class EngineErrorHandler {
5
5
  private readonly audit;
@@ -35,6 +35,8 @@ type ErpDefaults = {
35
35
  * Not the package default — pass `remoteApi={new FetchRemoteApi()}` from the ERP host.
36
36
  * Reads auth cookie `_auth` and redux-persist `persist:arianERP`, then POSTs JSON
37
37
  * (relative URLs work on the ERP host).
38
+ * Non-2xx responses and non-JSON bodies reject with an `Error` naming the HTTP
39
+ * status and endpoint (also reported through the optional error handler).
38
40
  * See `examples/host-arian-erp/host-arian-erp.md`.
39
41
  */
40
42
  type FetchRemoteApiOptions = {
@@ -1,5 +1,5 @@
1
1
  import { C as ConsoleAuditLogger, R as RemoteApi } from '../RemoteApi-CCQxiSf1.js';
2
- export { C as CallbackRemoteApi, R as RemoteApiRequest } from '../callbackRemoteApi-BlXO5NJz.js';
2
+ export { B as BaseQueryResult, C as CallbackRemoteApi, R as RemoteApiRequest, c as createBaseQueryRemoteApi } from '../callbackRemoteApi-BYLjmSI6.js';
3
3
 
4
4
  declare class EngineErrorHandler {
5
5
  private readonly audit;
@@ -35,6 +35,8 @@ type ErpDefaults = {
35
35
  * Not the package default — pass `remoteApi={new FetchRemoteApi()}` from the ERP host.
36
36
  * Reads auth cookie `_auth` and redux-persist `persist:arianERP`, then POSTs JSON
37
37
  * (relative URLs work on the ERP host).
38
+ * Non-2xx responses and non-JSON bodies reject with an `Error` naming the HTTP
39
+ * status and endpoint (also reported through the optional error handler).
38
40
  * See `examples/host-arian-erp/host-arian-erp.md`.
39
41
  */
40
42
  type FetchRemoteApiOptions = {