persian-data-grid 0.5.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 (282) hide show
  1. package/OFL.txt +93 -0
  2. package/README.md +179 -22
  3. package/dist/ERPTableGroupRow-E5Q6FYDS.js +125 -0
  4. package/dist/ERPTableGroupRow-E5Q6FYDS.js.map +1 -0
  5. package/dist/ERPTableGroupRow-F2IPDYL5.cjs +131 -0
  6. package/dist/ERPTableGroupRow-F2IPDYL5.cjs.map +1 -0
  7. package/dist/GridPlugin-Bewn0X51.d.ts +57 -0
  8. package/dist/GridPlugin-DewWufGZ.d.cts +57 -0
  9. package/dist/GridPresenceService-GEH6535Q.js +3 -0
  10. package/dist/GridPresenceService-GEH6535Q.js.map +1 -0
  11. package/dist/GridPresenceService-RDN5FXHQ.cjs +12 -0
  12. package/dist/GridPresenceService-RDN5FXHQ.cjs.map +1 -0
  13. package/dist/GridSession-CeIfVFck.d.ts +2625 -0
  14. package/dist/GridSession-CmQn2RnL.d.cts +2625 -0
  15. package/dist/GridSyncService-3JQLEY65.cjs +12 -0
  16. package/dist/GridSyncService-3JQLEY65.cjs.map +1 -0
  17. package/dist/GridSyncService-GECXGEKL.js +3 -0
  18. package/dist/GridSyncService-GECXGEKL.js.map +1 -0
  19. package/dist/PdfRenderer-B9FJaCo_.d.cts +22 -0
  20. package/dist/PdfRenderer-bN7ca_Aj.d.ts +22 -0
  21. package/dist/RemoteApi-CCQxiSf1.d.cts +28 -0
  22. package/dist/RemoteApi-CCQxiSf1.d.ts +28 -0
  23. package/dist/SelectImpl-NM4O4IGW.js +447 -0
  24. package/dist/SelectImpl-NM4O4IGW.js.map +1 -0
  25. package/dist/SelectImpl-W2EI4T7O.cjs +453 -0
  26. package/dist/SelectImpl-W2EI4T7O.cjs.map +1 -0
  27. package/dist/UITableController-C71LXBiX.d.ts +678 -0
  28. package/dist/UITableController-CIwnHIw8.d.cts +678 -0
  29. package/dist/VazirmatnPdfRenderer-CpCqA-Wh.d.cts +96 -0
  30. package/dist/VazirmatnPdfRenderer-D46smncn.d.ts +96 -0
  31. package/dist/adapters/arian-erp.cjs +89 -0
  32. package/dist/adapters/arian-erp.cjs.map +1 -0
  33. package/dist/adapters/arian-erp.d.cts +62 -0
  34. package/dist/adapters/arian-erp.d.ts +62 -0
  35. package/dist/adapters/arian-erp.js +79 -0
  36. package/dist/adapters/arian-erp.js.map +1 -0
  37. package/dist/appendAtEnd-RHIQRG2W.cjs +35 -0
  38. package/dist/appendAtEnd-RHIQRG2W.cjs.map +1 -0
  39. package/dist/appendAtEnd-TJEABLGD.js +33 -0
  40. package/dist/appendAtEnd-TJEABLGD.js.map +1 -0
  41. package/dist/applyImportedRows-C2fWYoPy.d.cts +135 -0
  42. package/dist/applyImportedRows-Cqh_N_0k.d.ts +135 -0
  43. package/dist/applyRowVisibilityHandler-Q64ZFC7A.cjs +86 -0
  44. package/dist/applyRowVisibilityHandler-Q64ZFC7A.cjs.map +1 -0
  45. package/dist/applyRowVisibilityHandler-ZLZXQEGY.js +84 -0
  46. package/dist/applyRowVisibilityHandler-ZLZXQEGY.js.map +1 -0
  47. package/dist/broadcastChannelTransport-FHUMV76O.cjs +12 -0
  48. package/dist/broadcastChannelTransport-FHUMV76O.cjs.map +1 -0
  49. package/dist/broadcastChannelTransport-MIH53VNZ.js +3 -0
  50. package/dist/broadcastChannelTransport-MIH53VNZ.js.map +1 -0
  51. package/dist/callbackRemoteApi-BYLjmSI6.d.ts +51 -0
  52. package/dist/callbackRemoteApi-Cv26MmSD.d.cts +51 -0
  53. package/dist/cellRenderContext-BaNh4qn_.d.ts +42 -0
  54. package/dist/cellRenderContext-DvngkptV.d.cts +42 -0
  55. package/dist/chunk-27ALJSZP.js +12187 -0
  56. package/dist/chunk-27ALJSZP.js.map +1 -0
  57. package/dist/chunk-3HP3HQCW.cjs +688 -0
  58. package/dist/chunk-3HP3HQCW.cjs.map +1 -0
  59. package/dist/chunk-3Y3KKGEC.js +3 -0
  60. package/dist/chunk-3Y3KKGEC.js.map +1 -0
  61. package/dist/chunk-52LFOPXD.cjs +588 -0
  62. package/dist/chunk-52LFOPXD.cjs.map +1 -0
  63. package/dist/chunk-5ALMNLUR.cjs +1408 -0
  64. package/dist/chunk-5ALMNLUR.cjs.map +1 -0
  65. package/dist/chunk-5HKVMPBD.js +937 -0
  66. package/dist/chunk-5HKVMPBD.js.map +1 -0
  67. package/dist/chunk-72IVAOTK.cjs +38 -0
  68. package/dist/chunk-72IVAOTK.cjs.map +1 -0
  69. package/dist/chunk-77UXAJII.js +112 -0
  70. package/dist/chunk-77UXAJII.js.map +1 -0
  71. package/dist/chunk-7GWV5HGO.js +36 -0
  72. package/dist/chunk-7GWV5HGO.js.map +1 -0
  73. package/dist/chunk-7T6AWRPU.js +581 -0
  74. package/dist/chunk-7T6AWRPU.js.map +1 -0
  75. package/dist/chunk-AU3RDJYQ.js +243 -0
  76. package/dist/chunk-AU3RDJYQ.js.map +1 -0
  77. package/dist/chunk-CILNIWYW.cjs +100 -0
  78. package/dist/chunk-CILNIWYW.cjs.map +1 -0
  79. package/dist/chunk-CMQ4VLCW.cjs +840 -0
  80. package/dist/chunk-CMQ4VLCW.cjs.map +1 -0
  81. package/dist/chunk-DFFP7SJ6.cjs +257 -0
  82. package/dist/chunk-DFFP7SJ6.cjs.map +1 -0
  83. package/dist/chunk-E2J533UH.cjs +53 -0
  84. package/dist/chunk-E2J533UH.cjs.map +1 -0
  85. package/dist/chunk-EBV6HGZB.cjs +33 -0
  86. package/dist/chunk-EBV6HGZB.cjs.map +1 -0
  87. package/dist/chunk-F4PYOYHR.js +112 -0
  88. package/dist/chunk-F4PYOYHR.js.map +1 -0
  89. package/dist/chunk-F6EMC75A.cjs +34 -0
  90. package/dist/chunk-F6EMC75A.cjs.map +1 -0
  91. package/dist/chunk-GKE33FOJ.js +32 -0
  92. package/dist/chunk-GKE33FOJ.js.map +1 -0
  93. package/dist/chunk-GQEDLUMB.js +168 -0
  94. package/dist/chunk-GQEDLUMB.js.map +1 -0
  95. package/dist/chunk-HLOHWFOA.js +645 -0
  96. package/dist/chunk-HLOHWFOA.js.map +1 -0
  97. package/dist/chunk-IMPCRWYP.cjs +251 -0
  98. package/dist/chunk-IMPCRWYP.cjs.map +1 -0
  99. package/dist/chunk-IPPIXOVQ.js +317 -0
  100. package/dist/chunk-IPPIXOVQ.js.map +1 -0
  101. package/dist/chunk-J4XJ4UBC.js +1404 -0
  102. package/dist/chunk-J4XJ4UBC.js.map +1 -0
  103. package/dist/chunk-J7CPPFXT.cjs +89 -0
  104. package/dist/chunk-J7CPPFXT.cjs.map +1 -0
  105. package/dist/chunk-JOICD47Q.cjs +41 -0
  106. package/dist/chunk-JOICD47Q.cjs.map +1 -0
  107. package/dist/chunk-KCNTKYUY.js +206 -0
  108. package/dist/chunk-KCNTKYUY.js.map +1 -0
  109. package/dist/chunk-KHMG6EI2.js +13 -0
  110. package/dist/chunk-KHMG6EI2.js.map +1 -0
  111. package/dist/chunk-KMRURD5J.cjs +15 -0
  112. package/dist/chunk-KMRURD5J.cjs.map +1 -0
  113. package/dist/chunk-KRJG3KMP.cjs +174 -0
  114. package/dist/chunk-KRJG3KMP.cjs.map +1 -0
  115. package/dist/chunk-LY27YAXE.cjs +208 -0
  116. package/dist/chunk-LY27YAXE.cjs.map +1 -0
  117. package/dist/chunk-MT3KLB2Q.cjs +944 -0
  118. package/dist/chunk-MT3KLB2Q.cjs.map +1 -0
  119. package/dist/chunk-MUQQKPWR.js +84 -0
  120. package/dist/chunk-MUQQKPWR.js.map +1 -0
  121. package/dist/chunk-N7SJTINL.cjs +4 -0
  122. package/dist/chunk-N7SJTINL.cjs.map +1 -0
  123. package/dist/chunk-NB5GCGHL.js +833 -0
  124. package/dist/chunk-NB5GCGHL.js.map +1 -0
  125. package/dist/chunk-NQUVAJQA.js +298 -0
  126. package/dist/chunk-NQUVAJQA.js.map +1 -0
  127. package/dist/chunk-NTV2UUAJ.cjs +149 -0
  128. package/dist/chunk-NTV2UUAJ.cjs.map +1 -0
  129. package/dist/chunk-PJQWHF6T.js +31 -0
  130. package/dist/chunk-PJQWHF6T.js.map +1 -0
  131. package/dist/chunk-PQY54EL5.js +248 -0
  132. package/dist/chunk-PQY54EL5.js.map +1 -0
  133. package/dist/chunk-Q7TBBUTX.cjs +110 -0
  134. package/dist/chunk-Q7TBBUTX.cjs.map +1 -0
  135. package/dist/chunk-QZN7R2WP.cjs +114 -0
  136. package/dist/chunk-QZN7R2WP.cjs.map +1 -0
  137. package/dist/chunk-RKVSJU46.js +35 -0
  138. package/dist/chunk-RKVSJU46.js.map +1 -0
  139. package/dist/chunk-SVO62ZV2.js +50 -0
  140. package/dist/chunk-SVO62ZV2.js.map +1 -0
  141. package/dist/chunk-SX4VQXAA.cjs +114 -0
  142. package/dist/chunk-SX4VQXAA.cjs.map +1 -0
  143. package/dist/chunk-SZ7BLAY3.js +92 -0
  144. package/dist/chunk-SZ7BLAY3.js.map +1 -0
  145. package/dist/chunk-TN4MG6FY.js +112 -0
  146. package/dist/chunk-TN4MG6FY.js.map +1 -0
  147. package/dist/chunk-UC7PHDM6.cjs +331 -0
  148. package/dist/chunk-UC7PHDM6.cjs.map +1 -0
  149. package/dist/chunk-UXVLYUUW.js +108 -0
  150. package/dist/chunk-UXVLYUUW.js.map +1 -0
  151. package/dist/chunk-VBAZ77Q4.js +932 -0
  152. package/dist/chunk-VBAZ77Q4.js.map +1 -0
  153. package/dist/chunk-VSAFQTW5.cjs +319 -0
  154. package/dist/chunk-VSAFQTW5.cjs.map +1 -0
  155. package/dist/chunk-VYJQ2HTA.cjs +936 -0
  156. package/dist/chunk-VYJQ2HTA.cjs.map +1 -0
  157. package/dist/chunk-W5256BJ4.js +56 -0
  158. package/dist/chunk-W5256BJ4.js.map +1 -0
  159. package/dist/chunk-WTHTVKVI.cjs +12299 -0
  160. package/dist/chunk-WTHTVKVI.cjs.map +1 -0
  161. package/dist/chunk-WUMOSOEK.cjs +62 -0
  162. package/dist/chunk-WUMOSOEK.cjs.map +1 -0
  163. package/dist/chunk-XLRE2J25.js +140 -0
  164. package/dist/chunk-XLRE2J25.js.map +1 -0
  165. package/dist/chunk-Z4QPZ3Z3.cjs +114 -0
  166. package/dist/chunk-Z4QPZ3Z3.cjs.map +1 -0
  167. package/dist/createEngineGridQuery-BBkud5oE.d.ts +939 -0
  168. package/dist/createEngineGridQuery-D-fgO_jg.d.cts +939 -0
  169. package/dist/date-picker-jalali.cjs +263 -0
  170. package/dist/date-picker-jalali.cjs.map +1 -0
  171. package/dist/date-picker-jalali.d.cts +62 -0
  172. package/dist/date-picker-jalali.d.ts +62 -0
  173. package/dist/date-picker-jalali.js +256 -0
  174. package/dist/date-picker-jalali.js.map +1 -0
  175. package/dist/finance.cjs +205 -0
  176. package/dist/finance.cjs.map +1 -0
  177. package/dist/finance.d.cts +90 -0
  178. package/dist/finance.d.ts +90 -0
  179. package/dist/finance.js +157 -0
  180. package/dist/finance.js.map +1 -0
  181. package/dist/foldedColumn-IHDT4ARZ.cjs +66 -0
  182. package/dist/foldedColumn-IHDT4ARZ.cjs.map +1 -0
  183. package/dist/foldedColumn-TFURUKFG.js +64 -0
  184. package/dist/foldedColumn-TFURUKFG.js.map +1 -0
  185. package/dist/headless.cjs +729 -0
  186. package/dist/headless.cjs.map +1 -0
  187. package/dist/headless.d.cts +508 -0
  188. package/dist/headless.d.ts +508 -0
  189. package/dist/headless.js +226 -0
  190. package/dist/headless.js.map +1 -0
  191. package/dist/index-DN8M8Jkq.d.cts +14 -0
  192. package/dist/index-DmzL-F_o.d.ts +14 -0
  193. package/dist/index.cjs +8060 -11409
  194. package/dist/index.cjs.map +1 -1
  195. package/dist/index.d.cts +457 -2305
  196. package/dist/index.d.ts +457 -2305
  197. package/dist/index.js +7302 -11084
  198. package/dist/index.js.map +1 -1
  199. package/dist/locales/ar.cjs +12 -0
  200. package/dist/locales/ar.cjs.map +1 -0
  201. package/dist/locales/ar.d.cts +6 -0
  202. package/dist/locales/ar.d.ts +6 -0
  203. package/dist/locales/ar.js +3 -0
  204. package/dist/locales/ar.js.map +1 -0
  205. package/dist/locales/en.cjs +12 -0
  206. package/dist/locales/en.cjs.map +1 -0
  207. package/dist/locales/en.d.cts +6 -0
  208. package/dist/locales/en.d.ts +6 -0
  209. package/dist/locales/en.js +3 -0
  210. package/dist/locales/en.js.map +1 -0
  211. package/dist/locales/fa.cjs +12 -0
  212. package/dist/locales/fa.cjs.map +1 -0
  213. package/dist/locales/fa.d.cts +6 -0
  214. package/dist/locales/fa.d.ts +6 -0
  215. package/dist/locales/fa.js +3 -0
  216. package/dist/locales/fa.js.map +1 -0
  217. package/dist/locales/index.cjs +51 -0
  218. package/dist/locales/index.cjs.map +1 -0
  219. package/dist/locales/index.d.cts +5 -0
  220. package/dist/locales/index.d.ts +5 -0
  221. package/dist/locales/index.js +6 -0
  222. package/dist/locales/index.js.map +1 -0
  223. package/dist/memoryRecords-AWDKUJ2F.cjs +50 -0
  224. package/dist/memoryRecords-AWDKUJ2F.cjs.map +1 -0
  225. package/dist/memoryRecords-OJTGXLRH.js +47 -0
  226. package/dist/memoryRecords-OJTGXLRH.js.map +1 -0
  227. package/dist/pagedFooterTotals-DXCGDO6F.cjs +27 -0
  228. package/dist/pagedFooterTotals-DXCGDO6F.cjs.map +1 -0
  229. package/dist/pagedFooterTotals-ORWKUNE7.js +25 -0
  230. package/dist/pagedFooterTotals-ORWKUNE7.js.map +1 -0
  231. package/dist/pagedKit-MFGAJFSK.cjs +134 -0
  232. package/dist/pagedKit-MFGAJFSK.cjs.map +1 -0
  233. package/dist/pagedKit-WYWY4LRV.js +127 -0
  234. package/dist/pagedKit-WYWY4LRV.js.map +1 -0
  235. package/dist/pagedSearch-HCPJW7VM.js +38 -0
  236. package/dist/pagedSearch-HCPJW7VM.js.map +1 -0
  237. package/dist/pagedSearch-U3WCG4GN.cjs +42 -0
  238. package/dist/pagedSearch-U3WCG4GN.cjs.map +1 -0
  239. package/dist/plugins/csv.cjs +124 -0
  240. package/dist/plugins/csv.cjs.map +1 -0
  241. package/dist/plugins/csv.d.cts +44 -0
  242. package/dist/plugins/csv.d.ts +44 -0
  243. package/dist/plugins/csv.js +120 -0
  244. package/dist/plugins/csv.js.map +1 -0
  245. package/dist/plugins/excel.cjs +52 -0
  246. package/dist/plugins/excel.cjs.map +1 -0
  247. package/dist/plugins/excel.d.cts +14 -0
  248. package/dist/plugins/excel.d.ts +14 -0
  249. package/dist/plugins/excel.js +7 -0
  250. package/dist/plugins/excel.js.map +1 -0
  251. package/dist/plugins/pdf/fonts/vazirmatn.cjs +50 -0
  252. package/dist/plugins/pdf/fonts/vazirmatn.cjs.map +1 -0
  253. package/dist/plugins/pdf/fonts/vazirmatn.d.cts +24 -0
  254. package/dist/plugins/pdf/fonts/vazirmatn.d.ts +24 -0
  255. package/dist/plugins/pdf/fonts/vazirmatn.js +39 -0
  256. package/dist/plugins/pdf/fonts/vazirmatn.js.map +1 -0
  257. package/dist/plugins/pdf.cjs +24 -0
  258. package/dist/plugins/pdf.cjs.map +1 -0
  259. package/dist/plugins/pdf.d.cts +21 -0
  260. package/dist/plugins/pdf.d.ts +21 -0
  261. package/dist/plugins/pdf.js +7 -0
  262. package/dist/plugins/pdf.js.map +1 -0
  263. package/dist/presence.cjs +56 -0
  264. package/dist/presence.cjs.map +1 -0
  265. package/dist/presence.d.cts +17 -0
  266. package/dist/presence.d.ts +17 -0
  267. package/dist/presence.js +54 -0
  268. package/dist/presence.js.map +1 -0
  269. package/dist/rebuildRowVisibility-66EAZ356.cjs +21 -0
  270. package/dist/rebuildRowVisibility-66EAZ356.cjs.map +1 -0
  271. package/dist/rebuildRowVisibility-6TYM5BP2.js +19 -0
  272. package/dist/rebuildRowVisibility-6TYM5BP2.js.map +1 -0
  273. package/dist/styles.css +1440 -0
  274. package/dist/sync.cjs +148 -0
  275. package/dist/sync.cjs.map +1 -0
  276. package/dist/sync.d.cts +17 -0
  277. package/dist/sync.d.ts +17 -0
  278. package/dist/sync.js +146 -0
  279. package/dist/sync.js.map +1 -0
  280. package/dist/types-D__47BKv.d.cts +23 -0
  281. package/dist/types-D__47BKv.d.ts +23 -0
  282. package/package.json +185 -29
@@ -0,0 +1,678 @@
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
+ import { A as AuditLogger, R as RemoteApi } from './RemoteApi-CCQxiSf1.js';
3
+
4
+ /**
5
+ * Pure clipboard payload builder (PR-106).
6
+ * No DOM — keyboard/UI wiring writes via infrastructure.
7
+ */
8
+
9
+ type ClipboardCellSnapshot = {
10
+ value: unknown;
11
+ display: string;
12
+ };
13
+ type ClipboardRowSnapshot = {
14
+ id: number;
15
+ cells: Record<string, ClipboardCellSnapshot | undefined>;
16
+ /** Infinite/server placeholder row — skipped in clipboard output. */
17
+ loading?: boolean;
18
+ };
19
+ type ClipboardColumnMeta = {
20
+ id: string;
21
+ header: string;
22
+ };
23
+ type ProcessCellForClipboardParams = {
24
+ value: unknown;
25
+ display: string;
26
+ colId: string;
27
+ rowIndex: number;
28
+ rowId: number;
29
+ };
30
+ type ClipboardCopyBuildOptions = {
31
+ /** When true, use formatted display strings (valueFormatter output). Default false. */
32
+ copyFormattedValue?: boolean;
33
+ /** Prepend a header row with column captions. Default false. */
34
+ copyHeadersToClipboard?: boolean;
35
+ /** Eastern digits → ASCII for Excel. Default true. */
36
+ copyDigitsAsLatin?: boolean;
37
+ processCellForClipboard?: (params: ProcessCellForClipboardParams) => string;
38
+ };
39
+ type ClipboardPayload = {
40
+ plainText: string;
41
+ html: string;
42
+ ranges: readonly CellRange[];
43
+ };
44
+ declare function resolveCopyRanges(ranges: readonly CellRange[], activeCell: {
45
+ rowIndex: number;
46
+ colId: string;
47
+ } | null | undefined): CellRange[];
48
+ declare function buildClipboardPayload(input: {
49
+ ranges: readonly CellRange[];
50
+ rows: readonly ClipboardRowSnapshot[];
51
+ columns: readonly ClipboardColumnMeta[];
52
+ activeCell?: {
53
+ rowIndex: number;
54
+ colId: string;
55
+ } | null;
56
+ options?: ClipboardCopyBuildOptions;
57
+ }): ClipboardPayload | null;
58
+
59
+ type ClipboardCopyEvent = {
60
+ plainText: string;
61
+ html: string;
62
+ ranges: readonly CellRange[];
63
+ };
64
+ type ClipboardPasteEvent = {
65
+ text: string;
66
+ applied: number;
67
+ skipped: number;
68
+ rowsAdded: number;
69
+ };
70
+ type GridPasteRuntimeOptions = {
71
+ /** When true (default), paste past the last row adds empty rows. */
72
+ pasteAddsRows?: boolean;
73
+ onClipboardPaste?: (event: ClipboardPasteEvent) => boolean | void;
74
+ };
75
+ type GridClipboardRuntimeOptions = ClipboardCopyBuildOptions & GridPasteRuntimeOptions & {
76
+ onClipboardCopy?: (event: ClipboardCopyEvent) => boolean | void;
77
+ };
78
+ type PasteGridResult = {
79
+ applied: number;
80
+ skipped: number;
81
+ rowsAdded: number;
82
+ };
83
+ declare function writeSystemClipboard(payload: Pick<ClipboardPayload, 'plainText' | 'html'>): Promise<void>;
84
+ declare function copyGridSelectionToClipboard(engine: TableEngine, options?: GridClipboardRuntimeOptions): Promise<boolean>;
85
+ declare function cutGridSelectionToClipboard(engine: TableEngine, store: string, tableKey: string, options?: GridClipboardRuntimeOptions): Promise<boolean>;
86
+ declare function readSystemClipboardText(): Promise<string>;
87
+ declare function pasteGridFromClipboard(engine: TableEngine, store: string, tableKey: string, options?: GridClipboardRuntimeOptions): Promise<PasteGridResult>;
88
+
89
+ /** Conflict resolution policy (PR-138). */
90
+ type SyncConflictPolicy = 'lastWriteWins' | 'serverWins' | 'manual';
91
+ type SyncCellKey = {
92
+ readonly rowId: number;
93
+ readonly columnId: string;
94
+ };
95
+ /** One side of a cell conflict (local or remote). */
96
+ type SyncConflictSide = {
97
+ readonly eventId: string;
98
+ readonly value: unknown;
99
+ readonly occurredAt: number;
100
+ readonly version: number;
101
+ };
102
+ type SyncConflict = {
103
+ readonly id: string;
104
+ readonly key: SyncCellKey;
105
+ readonly local: SyncConflictSide;
106
+ readonly remote: SyncConflictSide;
107
+ };
108
+ type ManualResolution = 'local' | 'remote';
109
+ type SyncTransport = {
110
+ /** Push local events to the remote log. Returns accepted event ids. */
111
+ push(events: readonly GridEvent[]): Promise<{
112
+ acceptedIds: readonly string[];
113
+ }>;
114
+ /** Pull remote events after `since` cursor. */
115
+ pull(since: number): Promise<{
116
+ events: readonly GridEvent[];
117
+ cursor: number;
118
+ }>;
119
+ };
120
+ type SyncResult = {
121
+ readonly pushed: number;
122
+ readonly pulled: number;
123
+ readonly applied: number;
124
+ readonly conflicts: readonly SyncConflict[];
125
+ };
126
+ /**
127
+ * SyncPort: push local pending events, pull remote, resolve cell conflicts.
128
+ * OCC on EventStore remains the local concurrency gate; this port is
129
+ * cross-client merge (PR-138).
130
+ */
131
+ type SyncPort = {
132
+ getPolicy(): SyncConflictPolicy;
133
+ setPolicy(policy: SyncConflictPolicy): void;
134
+ getOpenConflicts(): readonly SyncConflict[];
135
+ /** Push + pull + apply policy. */
136
+ sync(): Promise<SyncResult>;
137
+ /**
138
+ * Resolve one manual conflict. `choice: 'local'` keeps local value;
139
+ * `'remote'` applies the server value.
140
+ */
141
+ resolveConflict(conflictId: string, choice: ManualResolution): Promise<void>;
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;
149
+ };
150
+
151
+ /** Peer presence snapshot (PR-139). */
152
+ type PresencePeer = {
153
+ readonly peerId: string;
154
+ readonly actorId: string;
155
+ readonly label: string;
156
+ readonly color: string;
157
+ /** Active cell, if any. */
158
+ readonly rowId: number | null;
159
+ readonly columnId: string | null;
160
+ readonly updatedAt: number;
161
+ };
162
+ type PresenceLocalState = {
163
+ readonly peerId: string;
164
+ readonly actorId: string;
165
+ readonly label: string;
166
+ readonly color: string;
167
+ rowId: number | null;
168
+ columnId: string | null;
169
+ };
170
+ type PresenceMessage = {
171
+ readonly kind: 'presence';
172
+ readonly peer: PresencePeer;
173
+ } | {
174
+ readonly kind: 'leave';
175
+ readonly peerId: string;
176
+ };
177
+ type PresenceTransport = {
178
+ publish(message: PresenceMessage): void;
179
+ subscribe(listener: (message: PresenceMessage) => void): () => void;
180
+ };
181
+ type PresencePort = {
182
+ getLocal(): PresenceLocalState;
183
+ getPeers(): readonly PresencePeer[];
184
+ /** Update local cursor / focus cell and broadcast. */
185
+ setActiveCell(rowId: number | null, columnId: string | null): void;
186
+ /** Announce leave and stop. */
187
+ dispose(): void;
188
+ subscribe(listener: (peers: readonly PresencePeer[]) => void): () => void;
189
+ };
190
+
191
+ /** Host / test seam for online detection (no DOM in application/). */
192
+ type ConnectivitySource = {
193
+ getOnline(): boolean;
194
+ subscribe(listener: (online: boolean) => void): Unsubscribe;
195
+ };
196
+ /** Optional durable set of synced event ids (host/infra; not DOM here). */
197
+ type SyncWatermarkStore = {
198
+ load(): readonly string[];
199
+ save(ids: readonly string[]): void;
200
+ };
201
+ type Connectivity = 'online' | 'offline';
202
+ type PendingChange = {
203
+ readonly eventId: string;
204
+ readonly type: string;
205
+ readonly occurredAt: number;
206
+ readonly summary: string;
207
+ /** Full event for SyncPort push (PR-138). */
208
+ readonly event: GridEvent;
209
+ };
210
+ type OfflineStatusOptions = {
211
+ readonly tableId: string;
212
+ readonly connectivity: ConnectivitySource;
213
+ readonly watermark?: SyncWatermarkStore;
214
+ };
215
+ /**
216
+ * Product offline session (PR-137): connectivity + pending local data mutations
217
+ * not yet marked synced (SyncPort in PR-138 will call `markSynced`).
218
+ */
219
+ declare class OfflineStatus {
220
+ private readonly options;
221
+ private online;
222
+ private pending;
223
+ private syncedIds;
224
+ private connectivityUnsub;
225
+ private storeUnsub;
226
+ /** Incremented by every stop(); invalidates an in-flight start(). */
227
+ private lifecycle;
228
+ private readonly connectivityListeners;
229
+ private readonly pendingListeners;
230
+ constructor(options: OfflineStatusOptions);
231
+ start(eventStore: EventStore): Promise<void>;
232
+ /** Stop listening and drop all listeners. The instance is inert afterwards. */
233
+ dispose(): void;
234
+ stop(): void;
235
+ getConnectivity(): Connectivity;
236
+ getPendingChanges(): readonly PendingChange[];
237
+ getPendingCount(): number;
238
+ /** Mark pending mutations as synced (clears queue / advances watermark). */
239
+ markSynced(eventIds?: readonly string[]): void;
240
+ subscribeConnectivity(listener: (state: Connectivity) => void): Unsubscribe;
241
+ subscribePending(listener: (items: readonly PendingChange[]) => void): Unsubscribe;
242
+ private consider;
243
+ private emitConnectivity;
244
+ private emitPending;
245
+ private loadWatermark;
246
+ private persistWatermark;
247
+ }
248
+ /** Always-online source for Node tests / SSR. */
249
+ declare const alwaysOnlineConnectivity: ConnectivitySource;
250
+
251
+ interface UICommandBase {
252
+ readonly type: string;
253
+ }
254
+ interface UICellChangeEvent extends UICommandBase {
255
+ readonly type: 'UI_CELL_CHANGE';
256
+ readonly rowId: number;
257
+ readonly columnId: string;
258
+ readonly value: unknown;
259
+ }
260
+ interface UIDescriptionSaveEvent extends UICommandBase {
261
+ readonly type: 'UI_DESCRIPTION_SAVE';
262
+ readonly rowId: number;
263
+ readonly flag: boolean;
264
+ }
265
+ interface UICellChangeDisplayEvent extends UICommandBase {
266
+ readonly type: 'UI_CELL_CHANGE_DISPLAY';
267
+ readonly rowId: number;
268
+ readonly columnId: string;
269
+ readonly value: string;
270
+ }
271
+ interface UIMoveActiveCellEvent extends UICommandBase {
272
+ readonly type: 'UI_MOVE_ACTIVE_CELL';
273
+ readonly rowId: number;
274
+ readonly columnId: string;
275
+ readonly direction: "next" | "prev";
276
+ }
277
+ interface UIMoveActiveVerticalCellEvent extends UICommandBase {
278
+ readonly type: 'UI_MOVE_ACTIVE_CELL_VERTICAL';
279
+ readonly rowId: number;
280
+ readonly columnId: string;
281
+ readonly direction: 'up' | 'down';
282
+ }
283
+ interface UIActiveFirstCellEvent extends UICommandBase {
284
+ readonly type: 'UI_ACTIVE_FIRST_CELL';
285
+ readonly rowId: number;
286
+ }
287
+ interface UIActiveCellEvent extends UICommandBase {
288
+ readonly type: 'UI_ACTIVE_CELL';
289
+ readonly rowId: number;
290
+ readonly columnId: string;
291
+ readonly shiftKey?: boolean;
292
+ readonly ctrlKey?: boolean;
293
+ }
294
+ interface ChangePageSizeUiCommand extends UICommandBase {
295
+ readonly type: 'CHANGE_PAGE_SIZE';
296
+ readonly pageSize: number;
297
+ }
298
+ interface ChangePageUiCommand extends UICommandBase {
299
+ readonly type: 'CHANGE_PAGE';
300
+ readonly page: number;
301
+ }
302
+ interface ActiveRowUiCommand extends UICommandBase {
303
+ readonly type: 'UI_ACTIVE_ROW';
304
+ readonly rowId: number;
305
+ }
306
+ interface AddEmptyRowUiCommand extends UICommandBase {
307
+ readonly type: 'ADD_EMPTY_ROW';
308
+ }
309
+ interface AddNewRowsUiCommand extends UICommandBase {
310
+ readonly type: 'ADD_NEW_ROWS';
311
+ readonly detailFieldKey: string;
312
+ readonly rows: {
313
+ key: string;
314
+ value: unknown;
315
+ display: unknown;
316
+ }[][];
317
+ }
318
+ interface DuplicateRowUiCommand extends UICommandBase {
319
+ readonly type: 'DUPLICATE_ROW';
320
+ readonly rowId: number;
321
+ }
322
+ interface DeleteRowUiCommand extends UICommandBase {
323
+ readonly type: 'ROW_DELETED';
324
+ readonly rowId: number;
325
+ }
326
+ interface DeleteSelectedRowsUiCommand extends UICommandBase {
327
+ readonly type: 'UI_DELETE_SELECTED_ROW';
328
+ }
329
+ interface DeleteTableUiCommand extends UICommandBase {
330
+ readonly type: 'TABLE_DELETED';
331
+ }
332
+ interface RegisterTableUiCommand extends UICommandBase {
333
+ readonly type: 'TABLE_REGISTERED';
334
+ readonly storeName: string;
335
+ readonly table: Table;
336
+ }
337
+ interface ToggleRowExpandedUiCommand extends UICommandBase {
338
+ readonly type: 'TOGGLE_ROW_EXPANDED';
339
+ readonly rowId: number;
340
+ }
341
+ interface ReorderRowUiCommand extends UICommandBase {
342
+ readonly type: 'ROW_REORDERED';
343
+ readonly draggedRowId: number;
344
+ readonly droppedRowId: number;
345
+ readonly position: 'before' | 'after';
346
+ }
347
+ interface ReorderColumnUiCommand extends UICommandBase {
348
+ readonly type: 'COLUMN_REORDERED';
349
+ readonly sourceIndex: number;
350
+ readonly destIndex: number;
351
+ }
352
+ interface ToggleRowSelectedUiCommand extends UICommandBase {
353
+ readonly type: 'TOGGLE_ROW_SELECTED';
354
+ }
355
+ interface TogglePageRowSelectedUiCommand extends UICommandBase {
356
+ readonly type: 'TOGGLE_PAGE_ROW_SELECTED';
357
+ }
358
+ interface ClearRowSelectionUiCommand extends UICommandBase {
359
+ readonly type: 'CLEAR_ROW_SELECTION';
360
+ }
361
+ interface RowSelectedUiCommand extends UICommandBase {
362
+ readonly type: 'ROW_SELECTED';
363
+ readonly rowId: number;
364
+ }
365
+ interface ActionTableUiCommand extends UICommandBase {
366
+ readonly type: 'UI_ACTION_TABLE';
367
+ readonly action: TableActions;
368
+ }
369
+ interface ActiveCollectionUiCommand extends UICommandBase {
370
+ readonly type: 'UI_CHANGE_ACTIVE_COLLECTION';
371
+ readonly activeCollection: string;
372
+ }
373
+ interface KeyDownUiCommand extends UICommandBase {
374
+ readonly type: 'KEY_DOWN';
375
+ readonly event: KeyboardEvent;
376
+ readonly ctx: {
377
+ tableKey: string;
378
+ activeRowId: number | null;
379
+ activeColumnId: string | null;
380
+ };
381
+ }
382
+ interface SetGridSearchUiCommand extends UICommandBase {
383
+ readonly type: 'UI_SET_GRID_SEARCH';
384
+ readonly search: GridSearchState;
385
+ }
386
+ interface ClearGridSearchUiCommand extends UICommandBase {
387
+ readonly type: 'UI_CLEAR_GRID_SEARCH';
388
+ }
389
+ interface OpenMobileAddUiCommand extends UICommandBase {
390
+ readonly type: 'UI_OPEN_MOBILE_ADD';
391
+ }
392
+ interface OpenMobileEditUiCommand extends UICommandBase {
393
+ readonly type: 'UI_OPEN_MOBILE_EDIT';
394
+ readonly rowId: number;
395
+ }
396
+ interface CloseMobileEditorUiCommand extends UICommandBase {
397
+ readonly type: 'UI_CLOSE_MOBILE_EDITOR';
398
+ }
399
+ interface ResizeColumnUiCommand extends UICommandBase {
400
+ readonly type: 'UI_RESIZE_COLUMN';
401
+ readonly columnId: string;
402
+ readonly width: number;
403
+ }
404
+ interface SetColumnVisibleUiCommand extends UICommandBase {
405
+ readonly type: 'UI_SET_COLUMN_VISIBLE';
406
+ readonly columnId: string;
407
+ readonly visible: boolean;
408
+ }
409
+ interface SetSortModelUiCommand {
410
+ readonly type: 'UI_SET_SORT_MODEL';
411
+ readonly sortModel: readonly {
412
+ readonly colId: string;
413
+ readonly sort: 'asc' | 'desc';
414
+ }[];
415
+ }
416
+ interface SetQuickFilterTextUiCommand {
417
+ readonly type: 'UI_SET_QUICK_FILTER_TEXT';
418
+ readonly quickFilterText: string;
419
+ }
420
+ interface SetFilterModelUiCommand {
421
+ readonly type: 'UI_SET_FILTER_MODEL';
422
+ readonly filterModel: FilterModel;
423
+ }
424
+ interface SetRowGroupColumnsUiCommand {
425
+ readonly type: 'UI_SET_ROW_GROUP_COLUMNS';
426
+ readonly columns: readonly string[];
427
+ }
428
+ interface SetGroupDefaultExpandedUiCommand {
429
+ readonly type: 'UI_SET_GROUP_DEFAULT_EXPANDED';
430
+ readonly expanded: boolean;
431
+ }
432
+ interface ToggleRowGroupUiCommand {
433
+ readonly type: 'UI_TOGGLE_ROW_GROUP';
434
+ readonly groupKey: string;
435
+ }
436
+ type UITableCommand = ActiveRowUiCommand | ToggleRowSelectedUiCommand | TogglePageRowSelectedUiCommand | ClearRowSelectionUiCommand | RowSelectedUiCommand | UIMoveActiveVerticalCellEvent | UIMoveActiveCellEvent | UIActiveCellEvent | UIActiveFirstCellEvent | UICellChangeEvent | UIDescriptionSaveEvent | UICellChangeDisplayEvent | ChangePageSizeUiCommand | ChangePageUiCommand | AddEmptyRowUiCommand | AddNewRowsUiCommand | DuplicateRowUiCommand | DeleteRowUiCommand | DeleteTableUiCommand | RegisterTableUiCommand | ToggleRowExpandedUiCommand | ReorderRowUiCommand | ReorderColumnUiCommand | ActionTableUiCommand | ActiveCollectionUiCommand | DeleteSelectedRowsUiCommand | KeyDownUiCommand | SetGridSearchUiCommand | ClearGridSearchUiCommand | OpenMobileAddUiCommand | OpenMobileEditUiCommand | CloseMobileEditorUiCommand | ResizeColumnUiCommand | SetColumnVisibleUiCommand | SetSortModelUiCommand | SetQuickFilterTextUiCommand | SetFilterModelUiCommand | SetRowGroupColumnsUiCommand | SetGroupDefaultExpandedUiCommand | ToggleRowGroupUiCommand;
437
+
438
+ declare class UITableController {
439
+ private readonly engine;
440
+ private readonly store;
441
+ private readonly tableKey;
442
+ private readonly audit;
443
+ private readonly changelogProjection?;
444
+ private readonly historyPanelViewModel?;
445
+ private readonly cellUndoStack?;
446
+ private readonly session?;
447
+ private readonly remoteApi?;
448
+ private readonly offlineStatus?;
449
+ private disposed;
450
+ private layoutViewportWidth;
451
+ private clipboardOptions;
452
+ private syncPort?;
453
+ private presencePort?;
454
+ /** Set by releaseResources(); the first call's promise is reused (idempotent). */
455
+ private releasePromise?;
456
+ private resourceTeardown?;
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);
458
+ getRemoteApi(): RemoteApi | undefined;
459
+ getOfflineStatus(): OfflineStatus | undefined;
460
+ getSyncPort(): SyncPort | undefined;
461
+ setSyncPort(port: SyncPort | undefined): void;
462
+ getPresencePort(): PresencePort | undefined;
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;
472
+ getPresencePeers(): readonly PresencePeer[];
473
+ subscribePresencePeers(cb: (peers: readonly PresencePeer[]) => void): () => void;
474
+ /** Broadcast local active cell to peers (no-op without presence). */
475
+ publishPresenceCell(rowId: number | null, columnId: string | null): void;
476
+ getConnectivity(): Connectivity;
477
+ getPendingChangeCount(): number;
478
+ getPendingChanges(): readonly PendingChange[];
479
+ markPendingSynced(eventIds?: readonly string[]): void;
480
+ subscribeConnectivity(cb: (state: Connectivity) => void): () => void;
481
+ subscribePendingChanges(cb: (items: readonly PendingChange[]) => void): () => void;
482
+ getSyncPolicy(): SyncConflictPolicy | undefined;
483
+ setSyncPolicy(policy: SyncConflictPolicy): void;
484
+ getOpenSyncConflicts(): readonly SyncConflict[];
485
+ subscribeSyncConflicts(cb: (conflicts: readonly SyncConflict[]) => void): () => void;
486
+ syncNow(): Promise<SyncResult | null>;
487
+ resolveSyncConflict(conflictId: string, choice: ManualResolution): Promise<void>;
488
+ /** Apply a remote cell value (used by SyncPort; dual-writes via engine). */
489
+ applySyncedCellValue(rowId: number, columnId: string, value: unknown): Promise<void>;
490
+ configureClipboard(options: Partial<GridClipboardRuntimeOptions>): void;
491
+ getClipboardOptions(): GridClipboardRuntimeOptions;
492
+ applyFillHandleDrag(extendTo: {
493
+ rowIndex: number;
494
+ colIndex: number;
495
+ }, copyOnly: boolean): Promise<PasteGridResult>;
496
+ private safe;
497
+ private changePageSize;
498
+ private changePage;
499
+ /** Editor of this cell → session draft (written per `cellEditCommit`); otherwise write-through. */
500
+ private onCellChange;
501
+ private onDescriptionSave;
502
+ private onCellDisplayChange;
503
+ private setActiveCell;
504
+ private setActiveRow;
505
+ private moveActiveCellVertical;
506
+ private reorderRow;
507
+ private reorderColumns;
508
+ private addEmptyRow;
509
+ private openMobileAddEditor;
510
+ private addNewRows;
511
+ private duplicateRow;
512
+ private deleteRow;
513
+ private deleteRows;
514
+ private deleteTable;
515
+ private registerTable;
516
+ private toggleRowExpanded;
517
+ private toggleRowSelect;
518
+ private togglePageRowSelect;
519
+ private clearRowSelection;
520
+ private selectFromActiveToLast;
521
+ private activateFirstEditableCell;
522
+ private moveToNextCell;
523
+ private setTableAction;
524
+ private setActiveCollection;
525
+ private setGridSearch;
526
+ private setMobileEditor;
527
+ private resizeColumn;
528
+ setColumnVisible(columnId: string, visible: boolean): void;
529
+ setLayoutViewportWidth(width: number): void;
530
+ getLayoutViewportWidth(): number;
531
+ /** Measure header + cell text off-DOM and resize columns (PR-112). */
532
+ autoSizeColumns(colIds?: string[]): void;
533
+ setColumnPinned(columnId: string, pinned: 'start' | 'end' | null): void;
534
+ toggleColumnGroup(groupId: string): void;
535
+ /** Scale column widths to fit the last known scrollport width (PR-112). */
536
+ sizeColumnsToFit(containerWidth?: number): void;
537
+ /** Session-only sort (PR-90). Empty model restores document `index` order. */
538
+ setSortModel(sortModel: readonly {
539
+ colId: string;
540
+ sort: 'asc' | 'desc';
541
+ }[]): void;
542
+ /** Session-only quick filter (PR-93). Empty string shows all rows. */
543
+ setQuickFilterText(quickFilterText: string): void;
544
+ getQuickFilterText(): string;
545
+ /** Session-only column filter model (PR-94). */
546
+ setFilterModel(filterModel: FilterModel): void;
547
+ /** Session-only row grouping (PR-120). Only the first column is active. */
548
+ setRowGroupColumns(columns: readonly string[]): void;
549
+ getRowGroupColumns(): string[];
550
+ setGroupDefaultExpanded(expanded: boolean): void;
551
+ toggleRowGroup(groupKey: string): void;
552
+ getFilterModel(): FilterModel;
553
+ getViewState(): TableViewState | null | undefined;
554
+ applyHostRowData<TRow>(rowData: readonly TRow[], columnDefs?: ColumnDef<TRow>[], getRowId?: GetRowId<TRow>): void;
555
+ getMobileViewState(): MobileTableViewState | null | undefined;
556
+ getRowView(rowId: number): UIRow | null;
557
+ getAllRows(): Row[] | null;
558
+ getAllUIRows(): UIRow[] | null;
559
+ getUiRowAbsoluteIndex(rowId: number): number;
560
+ findColumnSearchMatches(columnId: string, query: string): {
561
+ rowId: number;
562
+ columnId: string;
563
+ }[];
564
+ getColumnTotals(): Record<string, number>;
565
+ getColumnAggs(): Record<string, unknown>;
566
+ getColumnAggValue(columnId: string, overrideAgg?: AggFunc): unknown;
567
+ subscribeColumnTotals(cb: (totals: Record<string, number>) => void): (() => void) | null;
568
+ subscribeColumnAggs(cb: (aggs: Record<string, unknown>) => void): (() => void) | null;
569
+ getSnapShot(collectionScope?: CollectionScope): TableSnapShot | null;
570
+ /** True in persistence 'paged-idb' mode (RAM holds one page window). */
571
+ isPagedWindow(): boolean;
572
+ /** Full IndexedDB snapshot for server save / export. */
573
+ getFullSnapShot(collectionScope?: CollectionScope): Promise<TableSnapShot | null>;
574
+ /**
575
+ * Stream serialized row records from IndexedDB in bounded batches (no full
576
+ * load). Heap holds one batch at a time. Return false from onBatch to stop.
577
+ */
578
+ iterateRowsFromDb(collectionScope: CollectionScope, onBatch: (records: {
579
+ rowId: number;
580
+ collection: string;
581
+ sortIndex: number;
582
+ rowState: string;
583
+ cells: Record<string, {
584
+ value: unknown;
585
+ originalValue: unknown;
586
+ display: unknown;
587
+ }>;
588
+ }[], ordinalBase: number) => Promise<boolean | void>, batchSize?: number): Promise<void>;
589
+ getCell(rowId: number, columnId: string): Cell | null | undefined;
590
+ getChangelog(filter?: Omit<ChangelogQuery, 'tableId'>): ChangelogEntry[];
591
+ getChangelogCount(filter?: Omit<ChangelogQuery, 'tableId'>): number;
592
+ subscribeChangelog(cb: (entries: ChangelogEntry[]) => void, filter?: Omit<ChangelogQuery, 'tableId'>): () => void;
593
+ getHistoryItems(filter?: Omit<HistoryQuery, 'tableId'>): HistoryItem[];
594
+ getHistoryItemCount(filter?: Omit<HistoryQuery, 'tableId'>): number;
595
+ subscribeHistoryItems(cb: (items: HistoryItem[]) => void, filter?: Omit<HistoryQuery, 'tableId'>): () => void;
596
+ canUndo(): boolean;
597
+ canRedo(): boolean;
598
+ undo(): Promise<boolean>;
599
+ redo(): Promise<boolean>;
600
+ getActiveRow(): number | null;
601
+ getSelectedRows(): Record<number, boolean> | null | undefined;
602
+ getActiveCell(): ActiveCell | undefined;
603
+ refreshView(): void;
604
+ clearActiveCell(cancel?: boolean): Promise<void>;
605
+ startCellEdit(rowId: number, columnId: string): void;
606
+ cancelCellEdit(): void;
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;
618
+ getEditDraft(rowId: number, columnId: string): CellEditValue | null;
619
+ isEditingCell(rowId: number, columnId: string): boolean;
620
+ getMobileEditor(): MobileEditorState | undefined;
621
+ resetMobileVisibleRows(size?: number): void;
622
+ loadMoreMobileRows(step?: number): void;
623
+ revealAllMobileRows(minSize?: number): void;
624
+ isActiveCell(rowId: number, columnId: string): boolean | null;
625
+ isActiveRow(rowId: number): boolean | null;
626
+ isSelectedRow(rowId: number): boolean | null;
627
+ isCutRow(rowId: number): boolean | null;
628
+ subscribe(cb: () => void): (() => void) | null;
629
+ subscribeSelected<TSelected>(selector: () => TSelected, listener: (selected: TSelected) => void, isEqual?: (a: TSelected, b: TSelected) => boolean): () => void;
630
+ getSession(): GridSession | undefined;
631
+ getTableKey(): string;
632
+ /**
633
+ * Streamed column subscription (Memory Iron Rule compliant): every row's
634
+ * {id, rowNum, value} is folded into via (heap = one batch,
635
+ * never the full dataset); fires only when the column data changed.
636
+ *
637
+ * Legacy form (cb receives the
638
+ * item array) is still supported.
639
+ */
640
+ subscribeColumn<T>(columnId: string, collections: CollectionScope, reducer: (acc: T, item: {
641
+ id: number;
642
+ rowNum: unknown;
643
+ value: unknown;
644
+ }) => T, seed: T, cb: (acc: T) => void): (() => void) | null;
645
+ subscribeColumn<T>(columnId: string, collections: CollectionScope, cb: (values: Array<{
646
+ id: number;
647
+ rowNum: unknown;
648
+ value: T;
649
+ }>) => void): (() => void) | null;
650
+ validation: () => (callback: (result: ValidationCallbackResult) => void) => void;
651
+ isValidCell(rowId: number, columnId: string): ValidCell | null;
652
+ onRowClick(rowId: number, modifiers: {
653
+ ctrlKey: boolean;
654
+ shiftKey: boolean;
655
+ }): void;
656
+ onRowSelect(rowId: number): void;
657
+ getCellRanges(): readonly CellRange[];
658
+ addCellRange(range: CellRange): 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;
674
+ dispatch(command: UITableCommand): Promise<void>;
675
+ private dispatchInternal;
676
+ }
677
+
678
+ export { type SyncWatermarkStore as A, type Connectivity as B, type ClipboardCellSnapshot as C, type PendingChange as D, alwaysOnlineConnectivity as E, type GridClipboardRuntimeOptions as G, type ManualResolution as M, OfflineStatus as O, type PresenceLocalState as P, type SyncConflict as S, UITableController as U, type PresenceMessage as a, type PresencePeer as b, type PresencePort as c, type PresenceTransport as d, type SyncConflictPolicy as e, type SyncConflictSide as f, type SyncPort as g, type SyncResult as h, type SyncTransport as i, type PasteGridResult as j, type ClipboardColumnMeta as k, type ClipboardCopyBuildOptions as l, type ClipboardCopyEvent as m, type ClipboardPasteEvent as n, type ClipboardPayload as o, type ClipboardRowSnapshot as p, type GridPasteRuntimeOptions as q, type ProcessCellForClipboardParams as r, buildClipboardPayload as s, copyGridSelectionToClipboard as t, cutGridSelectionToClipboard as u, pasteGridFromClipboard as v, readSystemClipboardText as w, resolveCopyRanges as x, writeSystemClipboard as y, type ConnectivitySource as z };