@operato/data-grist 9.0.0-beta.6 → 9.0.0-beta.61

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 (472) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/README.md +337 -44
  3. package/dist/tsconfig.tsbuildinfo +1 -1
  4. package/package.json +11 -11
  5. package/dist/src/accumulator/accumulator.d.ts +0 -2
  6. package/dist/src/accumulator/accumulator.js +0 -42
  7. package/dist/src/accumulator/accumulator.js.map +0 -1
  8. package/dist/src/configure/column-builder.d.ts +0 -2
  9. package/dist/src/configure/column-builder.js +0 -99
  10. package/dist/src/configure/column-builder.js.map +0 -1
  11. package/dist/src/configure/config-builder.d.ts +0 -2
  12. package/dist/src/configure/config-builder.js +0 -36
  13. package/dist/src/configure/config-builder.js.map +0 -1
  14. package/dist/src/configure/filters-option-builder.d.ts +0 -2
  15. package/dist/src/configure/filters-option-builder.js +0 -7
  16. package/dist/src/configure/filters-option-builder.js.map +0 -1
  17. package/dist/src/configure/imex-option-builder.d.ts +0 -2
  18. package/dist/src/configure/imex-option-builder.js +0 -4
  19. package/dist/src/configure/imex-option-builder.js.map +0 -1
  20. package/dist/src/configure/list-option-builder.d.ts +0 -2
  21. package/dist/src/configure/list-option-builder.js +0 -8
  22. package/dist/src/configure/list-option-builder.js.map +0 -1
  23. package/dist/src/configure/rows-option-builder.d.ts +0 -2
  24. package/dist/src/configure/rows-option-builder.js +0 -26
  25. package/dist/src/configure/rows-option-builder.js.map +0 -1
  26. package/dist/src/configure/tree-option-builder.d.ts +0 -2
  27. package/dist/src/configure/tree-option-builder.js +0 -18
  28. package/dist/src/configure/tree-option-builder.js.map +0 -1
  29. package/dist/src/configure/zero-config.d.ts +0 -23
  30. package/dist/src/configure/zero-config.js +0 -59
  31. package/dist/src/configure/zero-config.js.map +0 -1
  32. package/dist/src/const.d.ts +0 -1
  33. package/dist/src/const.js +0 -2
  34. package/dist/src/const.js.map +0 -1
  35. package/dist/src/data-card/data-card-field.d.ts +0 -11
  36. package/dist/src/data-card/data-card-field.js +0 -106
  37. package/dist/src/data-card/data-card-field.js.map +0 -1
  38. package/dist/src/data-card/data-card-gutter-menu.d.ts +0 -2
  39. package/dist/src/data-card/data-card-gutter-menu.js +0 -96
  40. package/dist/src/data-card/data-card-gutter-menu.js.map +0 -1
  41. package/dist/src/data-card/data-card-gutter.d.ts +0 -12
  42. package/dist/src/data-card/data-card-gutter.js +0 -116
  43. package/dist/src/data-card/data-card-gutter.js.map +0 -1
  44. package/dist/src/data-card/data-card.d.ts +0 -19
  45. package/dist/src/data-card/data-card.js +0 -149
  46. package/dist/src/data-card/data-card.js.map +0 -1
  47. package/dist/src/data-card/event-handlers/record-card-click-handler.d.ts +0 -7
  48. package/dist/src/data-card/event-handlers/record-card-click-handler.js +0 -29
  49. package/dist/src/data-card/event-handlers/record-card-click-handler.js.map +0 -1
  50. package/dist/src/data-card/event-handlers/record-card-dblclick-handler.d.ts +0 -7
  51. package/dist/src/data-card/event-handlers/record-card-dblclick-handler.js +0 -29
  52. package/dist/src/data-card/event-handlers/record-card-dblclick-handler.js.map +0 -1
  53. package/dist/src/data-card/record-card.d.ts +0 -23
  54. package/dist/src/data-card/record-card.js +0 -288
  55. package/dist/src/data-card/record-card.js.map +0 -1
  56. package/dist/src/data-consumer.d.ts +0 -10
  57. package/dist/src/data-consumer.js +0 -2
  58. package/dist/src/data-consumer.js.map +0 -1
  59. package/dist/src/data-grid/data-grid-accum-field.d.ts +0 -16
  60. package/dist/src/data-grid/data-grid-accum-field.js +0 -133
  61. package/dist/src/data-grid/data-grid-accum-field.js.map +0 -1
  62. package/dist/src/data-grid/data-grid-body-style.d.ts +0 -1
  63. package/dist/src/data-grid/data-grid-body-style.js +0 -99
  64. package/dist/src/data-grid/data-grid-body-style.js.map +0 -1
  65. package/dist/src/data-grid/data-grid-body.d.ts +0 -52
  66. package/dist/src/data-grid/data-grid-body.js +0 -660
  67. package/dist/src/data-grid/data-grid-body.js.map +0 -1
  68. package/dist/src/data-grid/data-grid-field.d.ts +0 -25
  69. package/dist/src/data-grid/data-grid-field.js +0 -263
  70. package/dist/src/data-grid/data-grid-field.js.map +0 -1
  71. package/dist/src/data-grid/data-grid-footer.d.ts +0 -11
  72. package/dist/src/data-grid/data-grid-footer.js +0 -120
  73. package/dist/src/data-grid/data-grid-footer.js.map +0 -1
  74. package/dist/src/data-grid/data-grid-header.d.ts +0 -29
  75. package/dist/src/data-grid/data-grid-header.js +0 -531
  76. package/dist/src/data-grid/data-grid-header.js.map +0 -1
  77. package/dist/src/data-grid/data-grid.d.ts +0 -36
  78. package/dist/src/data-grid/data-grid.js +0 -260
  79. package/dist/src/data-grid/data-grid.js.map +0 -1
  80. package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.d.ts +0 -7
  81. package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.js +0 -57
  82. package/dist/src/data-grid/event-handlers/data-grid-body-click-handler.js.map +0 -1
  83. package/dist/src/data-grid/event-handlers/data-grid-body-contextmenu-handler.d.ts +0 -7
  84. package/dist/src/data-grid/event-handlers/data-grid-body-contextmenu-handler.js +0 -25
  85. package/dist/src/data-grid/event-handlers/data-grid-body-contextmenu-handler.js.map +0 -1
  86. package/dist/src/data-grid/event-handlers/data-grid-body-dblclick-handler.d.ts +0 -7
  87. package/dist/src/data-grid/event-handlers/data-grid-body-dblclick-handler.js +0 -34
  88. package/dist/src/data-grid/event-handlers/data-grid-body-dblclick-handler.js.map +0 -1
  89. package/dist/src/data-grid/event-handlers/data-grid-body-focus-change-handler.d.ts +0 -7
  90. package/dist/src/data-grid/event-handlers/data-grid-body-focus-change-handler.js +0 -19
  91. package/dist/src/data-grid/event-handlers/data-grid-body-focus-change-handler.js.map +0 -1
  92. package/dist/src/data-grid/event-handlers/data-grid-body-keydown-handler.d.ts +0 -7
  93. package/dist/src/data-grid/event-handlers/data-grid-body-keydown-handler.js +0 -226
  94. package/dist/src/data-grid/event-handlers/data-grid-body-keydown-handler.js.map +0 -1
  95. package/dist/src/data-grist.d.ts +0 -355
  96. package/dist/src/data-grist.js +0 -1022
  97. package/dist/src/data-grist.js.map +0 -1
  98. package/dist/src/data-list/data-list-field.d.ts +0 -11
  99. package/dist/src/data-list/data-list-field.js +0 -95
  100. package/dist/src/data-list/data-list-field.js.map +0 -1
  101. package/dist/src/data-list/data-list-gutter.d.ts +0 -12
  102. package/dist/src/data-list/data-list-gutter.js +0 -121
  103. package/dist/src/data-list/data-list-gutter.js.map +0 -1
  104. package/dist/src/data-list/data-list.d.ts +0 -18
  105. package/dist/src/data-list/data-list.js +0 -139
  106. package/dist/src/data-list/data-list.js.map +0 -1
  107. package/dist/src/data-list/event-handlers/record-partial-click-handler.d.ts +0 -7
  108. package/dist/src/data-list/event-handlers/record-partial-click-handler.js +0 -29
  109. package/dist/src/data-list/event-handlers/record-partial-click-handler.js.map +0 -1
  110. package/dist/src/data-list/event-handlers/record-partial-dblclick-handler.d.ts +0 -7
  111. package/dist/src/data-list/event-handlers/record-partial-dblclick-handler.js +0 -29
  112. package/dist/src/data-list/event-handlers/record-partial-dblclick-handler.js.map +0 -1
  113. package/dist/src/data-list/event-handlers/record-partial-long-press-handler.d.ts +0 -7
  114. package/dist/src/data-list/event-handlers/record-partial-long-press-handler.js +0 -29
  115. package/dist/src/data-list/event-handlers/record-partial-long-press-handler.js.map +0 -1
  116. package/dist/src/data-list/record-partial.d.ts +0 -21
  117. package/dist/src/data-list/record-partial.js +0 -252
  118. package/dist/src/data-list/record-partial.js.map +0 -1
  119. package/dist/src/data-manipulator.d.ts +0 -38
  120. package/dist/src/data-manipulator.js +0 -324
  121. package/dist/src/data-manipulator.js.map +0 -1
  122. package/dist/src/data-provider.d.ts +0 -50
  123. package/dist/src/data-provider.js +0 -200
  124. package/dist/src/data-provider.js.map +0 -1
  125. package/dist/src/data-report/data-report-body-style.d.ts +0 -1
  126. package/dist/src/data-report/data-report-body-style.js +0 -58
  127. package/dist/src/data-report/data-report-body-style.js.map +0 -1
  128. package/dist/src/data-report/data-report-body.d.ts +0 -18
  129. package/dist/src/data-report/data-report-body.js +0 -181
  130. package/dist/src/data-report/data-report-body.js.map +0 -1
  131. package/dist/src/data-report/data-report-component.d.ts +0 -21
  132. package/dist/src/data-report/data-report-component.js +0 -138
  133. package/dist/src/data-report/data-report-component.js.map +0 -1
  134. package/dist/src/data-report/data-report-field.d.ts +0 -13
  135. package/dist/src/data-report/data-report-field.js +0 -99
  136. package/dist/src/data-report/data-report-field.js.map +0 -1
  137. package/dist/src/data-report/data-report-header.d.ts +0 -1
  138. package/dist/src/data-report/data-report-header.js +0 -221
  139. package/dist/src/data-report/data-report-header.js.map +0 -1
  140. package/dist/src/data-report/event-handlers/data-report-body-click-handler.d.ts +0 -5
  141. package/dist/src/data-report/event-handlers/data-report-body-click-handler.js +0 -33
  142. package/dist/src/data-report/event-handlers/data-report-body-click-handler.js.map +0 -1
  143. package/dist/src/data-report/event-handlers/data-report-body-dblclick-handler.d.ts +0 -5
  144. package/dist/src/data-report/event-handlers/data-report-body-dblclick-handler.js +0 -19
  145. package/dist/src/data-report/event-handlers/data-report-body-dblclick-handler.js.map +0 -1
  146. package/dist/src/data-report/event-handlers/data-report-body-keydown-handler.d.ts +0 -5
  147. package/dist/src/data-report/event-handlers/data-report-body-keydown-handler.js +0 -58
  148. package/dist/src/data-report/event-handlers/data-report-body-keydown-handler.js.map +0 -1
  149. package/dist/src/data-report.d.ts +0 -44
  150. package/dist/src/data-report.js +0 -386
  151. package/dist/src/data-report.js.map +0 -1
  152. package/dist/src/editors/index.d.ts +0 -3
  153. package/dist/src/editors/index.js +0 -4
  154. package/dist/src/editors/index.js.map +0 -1
  155. package/dist/src/editors/ox-grist-editor-checkbox.d.ts +0 -7
  156. package/dist/src/editors/ox-grist-editor-checkbox.js +0 -27
  157. package/dist/src/editors/ox-grist-editor-checkbox.js.map +0 -1
  158. package/dist/src/editors/ox-grist-editor-color.d.ts +0 -4
  159. package/dist/src/editors/ox-grist-editor-color.js +0 -14
  160. package/dist/src/editors/ox-grist-editor-color.js.map +0 -1
  161. package/dist/src/editors/ox-grist-editor-date.d.ts +0 -4
  162. package/dist/src/editors/ox-grist-editor-date.js +0 -14
  163. package/dist/src/editors/ox-grist-editor-date.js.map +0 -1
  164. package/dist/src/editors/ox-grist-editor-datetime.d.ts +0 -6
  165. package/dist/src/editors/ox-grist-editor-datetime.js +0 -26
  166. package/dist/src/editors/ox-grist-editor-datetime.js.map +0 -1
  167. package/dist/src/editors/ox-grist-editor-email.d.ts +0 -4
  168. package/dist/src/editors/ox-grist-editor-email.js +0 -14
  169. package/dist/src/editors/ox-grist-editor-email.js.map +0 -1
  170. package/dist/src/editors/ox-grist-editor-file.d.ts +0 -6
  171. package/dist/src/editors/ox-grist-editor-file.js +0 -25
  172. package/dist/src/editors/ox-grist-editor-file.js.map +0 -1
  173. package/dist/src/editors/ox-grist-editor-image.d.ts +0 -7
  174. package/dist/src/editors/ox-grist-editor-image.js +0 -31
  175. package/dist/src/editors/ox-grist-editor-image.js.map +0 -1
  176. package/dist/src/editors/ox-grist-editor-month.d.ts +0 -4
  177. package/dist/src/editors/ox-grist-editor-month.js +0 -14
  178. package/dist/src/editors/ox-grist-editor-month.js.map +0 -1
  179. package/dist/src/editors/ox-grist-editor-multiple-select.d.ts +0 -8
  180. package/dist/src/editors/ox-grist-editor-multiple-select.js +0 -52
  181. package/dist/src/editors/ox-grist-editor-multiple-select.js.map +0 -1
  182. package/dist/src/editors/ox-grist-editor-number.d.ts +0 -6
  183. package/dist/src/editors/ox-grist-editor-number.js +0 -27
  184. package/dist/src/editors/ox-grist-editor-number.js.map +0 -1
  185. package/dist/src/editors/ox-grist-editor-password.d.ts +0 -4
  186. package/dist/src/editors/ox-grist-editor-password.js +0 -14
  187. package/dist/src/editors/ox-grist-editor-password.js.map +0 -1
  188. package/dist/src/editors/ox-grist-editor-select.d.ts +0 -4
  189. package/dist/src/editors/ox-grist-editor-select.js +0 -53
  190. package/dist/src/editors/ox-grist-editor-select.js.map +0 -1
  191. package/dist/src/editors/ox-grist-editor-tel.d.ts +0 -4
  192. package/dist/src/editors/ox-grist-editor-tel.js +0 -14
  193. package/dist/src/editors/ox-grist-editor-tel.js.map +0 -1
  194. package/dist/src/editors/ox-grist-editor-text.d.ts +0 -5
  195. package/dist/src/editors/ox-grist-editor-text.js +0 -17
  196. package/dist/src/editors/ox-grist-editor-text.js.map +0 -1
  197. package/dist/src/editors/ox-grist-editor-textarea.d.ts +0 -6
  198. package/dist/src/editors/ox-grist-editor-textarea.js +0 -18
  199. package/dist/src/editors/ox-grist-editor-textarea.js.map +0 -1
  200. package/dist/src/editors/ox-grist-editor-time.d.ts +0 -4
  201. package/dist/src/editors/ox-grist-editor-time.js +0 -14
  202. package/dist/src/editors/ox-grist-editor-time.js.map +0 -1
  203. package/dist/src/editors/ox-grist-editor-tree.d.ts +0 -6
  204. package/dist/src/editors/ox-grist-editor-tree.js +0 -27
  205. package/dist/src/editors/ox-grist-editor-tree.js.map +0 -1
  206. package/dist/src/editors/ox-grist-editor-varname.d.ts +0 -6
  207. package/dist/src/editors/ox-grist-editor-varname.js +0 -36
  208. package/dist/src/editors/ox-grist-editor-varname.js.map +0 -1
  209. package/dist/src/editors/ox-grist-editor-week.d.ts +0 -4
  210. package/dist/src/editors/ox-grist-editor-week.js +0 -14
  211. package/dist/src/editors/ox-grist-editor-week.js.map +0 -1
  212. package/dist/src/editors/ox-grist-editor.d.ts +0 -27
  213. package/dist/src/editors/ox-grist-editor.js +0 -197
  214. package/dist/src/editors/ox-grist-editor.js.map +0 -1
  215. package/dist/src/editors/ox-input-tree.d.ts +0 -20
  216. package/dist/src/editors/ox-input-tree.js +0 -221
  217. package/dist/src/editors/ox-input-tree.js.map +0 -1
  218. package/dist/src/editors/registry.d.ts +0 -12
  219. package/dist/src/editors/registry.js +0 -71
  220. package/dist/src/editors/registry.js.map +0 -1
  221. package/dist/src/empty-note.d.ts +0 -9
  222. package/dist/src/empty-note.js +0 -53
  223. package/dist/src/empty-note.js.map +0 -1
  224. package/dist/src/filters/filter-checkbox.d.ts +0 -3
  225. package/dist/src/filters/filter-checkbox.js +0 -41
  226. package/dist/src/filters/filter-checkbox.js.map +0 -1
  227. package/dist/src/filters/filter-input-barcode.d.ts +0 -3
  228. package/dist/src/filters/filter-input-barcode.js +0 -28
  229. package/dist/src/filters/filter-input-barcode.js.map +0 -1
  230. package/dist/src/filters/filter-input.d.ts +0 -2
  231. package/dist/src/filters/filter-input.js +0 -25
  232. package/dist/src/filters/filter-input.js.map +0 -1
  233. package/dist/src/filters/filter-range-date.d.ts +0 -2
  234. package/dist/src/filters/filter-range-date.js +0 -66
  235. package/dist/src/filters/filter-range-date.js.map +0 -1
  236. package/dist/src/filters/filter-range-number.d.ts +0 -2
  237. package/dist/src/filters/filter-range-number.js +0 -54
  238. package/dist/src/filters/filter-range-number.js.map +0 -1
  239. package/dist/src/filters/filter-select-buttons.d.ts +0 -3
  240. package/dist/src/filters/filter-select-buttons.js +0 -50
  241. package/dist/src/filters/filter-select-buttons.js.map +0 -1
  242. package/dist/src/filters/filter-select.d.ts +0 -3
  243. package/dist/src/filters/filter-select.js +0 -52
  244. package/dist/src/filters/filter-select.js.map +0 -1
  245. package/dist/src/filters/filter-styles.d.ts +0 -1
  246. package/dist/src/filters/filter-styles.js +0 -119
  247. package/dist/src/filters/filter-styles.js.map +0 -1
  248. package/dist/src/filters/filters-form.d.ts +0 -40
  249. package/dist/src/filters/filters-form.js +0 -430
  250. package/dist/src/filters/filters-form.js.map +0 -1
  251. package/dist/src/filters/index.d.ts +0 -8
  252. package/dist/src/filters/index.js +0 -9
  253. package/dist/src/filters/index.js.map +0 -1
  254. package/dist/src/filters/registry.d.ts +0 -7
  255. package/dist/src/filters/registry.js +0 -48
  256. package/dist/src/filters/registry.js.map +0 -1
  257. package/dist/src/formatters/date-formatter.d.ts +0 -1
  258. package/dist/src/formatters/date-formatter.js +0 -4
  259. package/dist/src/formatters/date-formatter.js.map +0 -1
  260. package/dist/src/formatters/index.d.ts +0 -1
  261. package/dist/src/formatters/index.js +0 -2
  262. package/dist/src/formatters/index.js.map +0 -1
  263. package/dist/src/formatters/number-formatter.d.ts +0 -1
  264. package/dist/src/formatters/number-formatter.js +0 -4
  265. package/dist/src/formatters/number-formatter.js.map +0 -1
  266. package/dist/src/formatters/registry.d.ts +0 -6
  267. package/dist/src/formatters/registry.js +0 -25
  268. package/dist/src/formatters/registry.js.map +0 -1
  269. package/dist/src/formatters/text-formatter.d.ts +0 -1
  270. package/dist/src/formatters/text-formatter.js +0 -4
  271. package/dist/src/formatters/text-formatter.js.map +0 -1
  272. package/dist/src/gutters/gutter-button.d.ts +0 -21
  273. package/dist/src/gutters/gutter-button.js +0 -40
  274. package/dist/src/gutters/gutter-button.js.map +0 -1
  275. package/dist/src/gutters/gutter-dirty.d.ts +0 -23
  276. package/dist/src/gutters/gutter-dirty.js +0 -87
  277. package/dist/src/gutters/gutter-dirty.js.map +0 -1
  278. package/dist/src/gutters/gutter-row-selector.d.ts +0 -21
  279. package/dist/src/gutters/gutter-row-selector.js +0 -70
  280. package/dist/src/gutters/gutter-row-selector.js.map +0 -1
  281. package/dist/src/gutters/gutter-sequence.d.ts +0 -35
  282. package/dist/src/gutters/gutter-sequence.js +0 -48
  283. package/dist/src/gutters/gutter-sequence.js.map +0 -1
  284. package/dist/src/gutters/index.d.ts +0 -1
  285. package/dist/src/gutters/index.js +0 -2
  286. package/dist/src/gutters/index.js.map +0 -1
  287. package/dist/src/gutters/registry.d.ts +0 -7
  288. package/dist/src/gutters/registry.js +0 -26
  289. package/dist/src/gutters/registry.js.map +0 -1
  290. package/dist/src/handlers/contextmenu-tree-mutation.d.ts +0 -3
  291. package/dist/src/handlers/contextmenu-tree-mutation.js +0 -64
  292. package/dist/src/handlers/contextmenu-tree-mutation.js.map +0 -1
  293. package/dist/src/handlers/index.d.ts +0 -1
  294. package/dist/src/handlers/index.js +0 -2
  295. package/dist/src/handlers/index.js.map +0 -1
  296. package/dist/src/handlers/move-down.d.ts +0 -3
  297. package/dist/src/handlers/move-down.js +0 -26
  298. package/dist/src/handlers/move-down.js.map +0 -1
  299. package/dist/src/handlers/move-up.d.ts +0 -3
  300. package/dist/src/handlers/move-up.js +0 -26
  301. package/dist/src/handlers/move-up.js.map +0 -1
  302. package/dist/src/handlers/record-copy.d.ts +0 -3
  303. package/dist/src/handlers/record-copy.js +0 -23
  304. package/dist/src/handlers/record-copy.js.map +0 -1
  305. package/dist/src/handlers/record-delete.d.ts +0 -3
  306. package/dist/src/handlers/record-delete.js +0 -16
  307. package/dist/src/handlers/record-delete.js.map +0 -1
  308. package/dist/src/handlers/record-view-handler.d.ts +0 -3
  309. package/dist/src/handlers/record-view-handler.js +0 -15
  310. package/dist/src/handlers/record-view-handler.js.map +0 -1
  311. package/dist/src/handlers/registry.d.ts +0 -7
  312. package/dist/src/handlers/registry.js +0 -34
  313. package/dist/src/handlers/registry.js.map +0 -1
  314. package/dist/src/handlers/select-row-toggle.d.ts +0 -3
  315. package/dist/src/handlers/select-row-toggle.js +0 -18
  316. package/dist/src/handlers/select-row-toggle.js.map +0 -1
  317. package/dist/src/handlers/select-row.d.ts +0 -3
  318. package/dist/src/handlers/select-row.js +0 -14
  319. package/dist/src/handlers/select-row.js.map +0 -1
  320. package/dist/src/index.d.ts +0 -14
  321. package/dist/src/index.js +0 -15
  322. package/dist/src/index.js.map +0 -1
  323. package/dist/src/personalizer/index.d.ts +0 -1
  324. package/dist/src/personalizer/index.js +0 -2
  325. package/dist/src/personalizer/index.js.map +0 -1
  326. package/dist/src/personalizer/ox-grist-filter-personalizer.d.ts +0 -8
  327. package/dist/src/personalizer/ox-grist-filter-personalizer.js +0 -178
  328. package/dist/src/personalizer/ox-grist-filter-personalizer.js.map +0 -1
  329. package/dist/src/personalizer/ox-grist-personalizer.d.ts +0 -8
  330. package/dist/src/personalizer/ox-grist-personalizer.js +0 -212
  331. package/dist/src/personalizer/ox-grist-personalizer.js.map +0 -1
  332. package/dist/src/record-view/event-handlers/record-view-body-click-handler.d.ts +0 -7
  333. package/dist/src/record-view/event-handlers/record-view-body-click-handler.js +0 -27
  334. package/dist/src/record-view/event-handlers/record-view-body-click-handler.js.map +0 -1
  335. package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.d.ts +0 -7
  336. package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.js +0 -22
  337. package/dist/src/record-view/event-handlers/record-view-body-keydown-handler.js.map +0 -1
  338. package/dist/src/record-view/index.d.ts +0 -2
  339. package/dist/src/record-view/index.js +0 -3
  340. package/dist/src/record-view/index.js.map +0 -1
  341. package/dist/src/record-view/ox-record-creator.d.ts +0 -26
  342. package/dist/src/record-view/ox-record-creator.js +0 -247
  343. package/dist/src/record-view/ox-record-creator.js.map +0 -1
  344. package/dist/src/record-view/record-view-body.d.ts +0 -21
  345. package/dist/src/record-view/record-view-body.js +0 -252
  346. package/dist/src/record-view/record-view-body.js.map +0 -1
  347. package/dist/src/record-view/record-view-handler.d.ts +0 -9
  348. package/dist/src/record-view/record-view-handler.js +0 -57
  349. package/dist/src/record-view/record-view-handler.js.map +0 -1
  350. package/dist/src/record-view/record-view.d.ts +0 -23
  351. package/dist/src/record-view/record-view.js +0 -117
  352. package/dist/src/record-view/record-view.js.map +0 -1
  353. package/dist/src/renderers/index.d.ts +0 -13
  354. package/dist/src/renderers/index.js +0 -14
  355. package/dist/src/renderers/index.js.map +0 -1
  356. package/dist/src/renderers/ox-grist-renderer-boolean.d.ts +0 -2
  357. package/dist/src/renderers/ox-grist-renderer-boolean.js +0 -39
  358. package/dist/src/renderers/ox-grist-renderer-boolean.js.map +0 -1
  359. package/dist/src/renderers/ox-grist-renderer-color.d.ts +0 -2
  360. package/dist/src/renderers/ox-grist-renderer-color.js +0 -12
  361. package/dist/src/renderers/ox-grist-renderer-color.js.map +0 -1
  362. package/dist/src/renderers/ox-grist-renderer-date.d.ts +0 -2
  363. package/dist/src/renderers/ox-grist-renderer-date.js +0 -53
  364. package/dist/src/renderers/ox-grist-renderer-date.js.map +0 -1
  365. package/dist/src/renderers/ox-grist-renderer-file.d.ts +0 -2
  366. package/dist/src/renderers/ox-grist-renderer-file.js +0 -27
  367. package/dist/src/renderers/ox-grist-renderer-file.js.map +0 -1
  368. package/dist/src/renderers/ox-grist-renderer-image.d.ts +0 -2
  369. package/dist/src/renderers/ox-grist-renderer-image.js +0 -24
  370. package/dist/src/renderers/ox-grist-renderer-image.js.map +0 -1
  371. package/dist/src/renderers/ox-grist-renderer-json5.d.ts +0 -2
  372. package/dist/src/renderers/ox-grist-renderer-json5.js +0 -30
  373. package/dist/src/renderers/ox-grist-renderer-json5.js.map +0 -1
  374. package/dist/src/renderers/ox-grist-renderer-link.d.ts +0 -2
  375. package/dist/src/renderers/ox-grist-renderer-link.js +0 -12
  376. package/dist/src/renderers/ox-grist-renderer-link.js.map +0 -1
  377. package/dist/src/renderers/ox-grist-renderer-password.d.ts +0 -2
  378. package/dist/src/renderers/ox-grist-renderer-password.js +0 -5
  379. package/dist/src/renderers/ox-grist-renderer-password.js.map +0 -1
  380. package/dist/src/renderers/ox-grist-renderer-progress.d.ts +0 -5
  381. package/dist/src/renderers/ox-grist-renderer-progress.js +0 -46
  382. package/dist/src/renderers/ox-grist-renderer-progress.js.map +0 -1
  383. package/dist/src/renderers/ox-grist-renderer-select.d.ts +0 -2
  384. package/dist/src/renderers/ox-grist-renderer-select.js +0 -50
  385. package/dist/src/renderers/ox-grist-renderer-select.js.map +0 -1
  386. package/dist/src/renderers/ox-grist-renderer-text.d.ts +0 -2
  387. package/dist/src/renderers/ox-grist-renderer-text.js +0 -11
  388. package/dist/src/renderers/ox-grist-renderer-text.js.map +0 -1
  389. package/dist/src/renderers/ox-grist-renderer-textarea.d.ts +0 -2
  390. package/dist/src/renderers/ox-grist-renderer-textarea.js +0 -5
  391. package/dist/src/renderers/ox-grist-renderer-textarea.js.map +0 -1
  392. package/dist/src/renderers/ox-grist-renderer-tree.d.ts +0 -12
  393. package/dist/src/renderers/ox-grist-renderer-tree.js +0 -183
  394. package/dist/src/renderers/ox-grist-renderer-tree.js.map +0 -1
  395. package/dist/src/renderers/ox-grist-renderer.d.ts +0 -15
  396. package/dist/src/renderers/ox-grist-renderer.js +0 -48
  397. package/dist/src/renderers/ox-grist-renderer.js.map +0 -1
  398. package/dist/src/renderers/registry.d.ts +0 -12
  399. package/dist/src/renderers/registry.js +0 -70
  400. package/dist/src/renderers/registry.js.map +0 -1
  401. package/dist/src/sorters/sorters-control.d.ts +0 -12
  402. package/dist/src/sorters/sorters-control.js +0 -138
  403. package/dist/src/sorters/sorters-control.js.map +0 -1
  404. package/dist/src/types.d.ts +0 -696
  405. package/dist/src/types.js +0 -23
  406. package/dist/src/types.js.map +0 -1
  407. package/dist/src/utils/index.d.ts +0 -2
  408. package/dist/src/utils/index.js +0 -3
  409. package/dist/src/utils/index.js.map +0 -1
  410. package/dist/src/utils/list-param.d.ts +0 -16
  411. package/dist/src/utils/list-param.js +0 -40
  412. package/dist/src/utils/list-param.js.map +0 -1
  413. package/dist/src/utils/supports-passive.d.ts +0 -1
  414. package/dist/src/utils/supports-passive.js +0 -13
  415. package/dist/src/utils/supports-passive.js.map +0 -1
  416. package/dist/stories/accumulator-format.stories.d.ts +0 -41
  417. package/dist/stories/accumulator-format.stories.js +0 -237
  418. package/dist/stories/accumulator-format.stories.js.map +0 -1
  419. package/dist/stories/barcode-input-filter.stories.d.ts +0 -33
  420. package/dist/stories/barcode-input-filter.stories.js +0 -185
  421. package/dist/stories/barcode-input-filter.stories.js.map +0 -1
  422. package/dist/stories/bounded-select-filters.stories.d.ts +0 -25
  423. package/dist/stories/bounded-select-filters.stories.js +0 -283
  424. package/dist/stories/bounded-select-filters.stories.js.map +0 -1
  425. package/dist/stories/bounded-select-record.stories.d.ts +0 -25
  426. package/dist/stories/bounded-select-record.stories.js +0 -286
  427. package/dist/stories/bounded-select-record.stories.js.map +0 -1
  428. package/dist/stories/click-event-custom.stories.d.ts +0 -45
  429. package/dist/stories/click-event-custom.stories.js +0 -248
  430. package/dist/stories/click-event-custom.stories.js.map +0 -1
  431. package/dist/stories/click-event.stories.d.ts +0 -45
  432. package/dist/stories/click-event.stories.js +0 -243
  433. package/dist/stories/click-event.stories.js.map +0 -1
  434. package/dist/stories/creatable-only-column.stories.d.ts +0 -29
  435. package/dist/stories/creatable-only-column.stories.js +0 -232
  436. package/dist/stories/creatable-only-column.stories.js.map +0 -1
  437. package/dist/stories/default-filters.stories.d.ts +0 -26
  438. package/dist/stories/default-filters.stories.js +0 -219
  439. package/dist/stories/default-filters.stories.js.map +0 -1
  440. package/dist/stories/dynamic-editable.stories.d.ts +0 -25
  441. package/dist/stories/dynamic-editable.stories.js +0 -293
  442. package/dist/stories/dynamic-editable.stories.js.map +0 -1
  443. package/dist/stories/empty-sorters.stories.d.ts +0 -25
  444. package/dist/stories/empty-sorters.stories.js +0 -162
  445. package/dist/stories/empty-sorters.stories.js.map +0 -1
  446. package/dist/stories/explicit-fetch.stories.d.ts +0 -25
  447. package/dist/stories/explicit-fetch.stories.js +0 -166
  448. package/dist/stories/explicit-fetch.stories.js.map +0 -1
  449. package/dist/stories/fixed-column.stories.d.ts +0 -26
  450. package/dist/stories/fixed-column.stories.js +0 -383
  451. package/dist/stories/fixed-column.stories.js.map +0 -1
  452. package/dist/stories/grid-setting.stories.d.ts +0 -47
  453. package/dist/stories/grid-setting.stories.js +0 -453
  454. package/dist/stories/grid-setting.stories.js.map +0 -1
  455. package/dist/stories/grist-modes.stories.d.ts +0 -37
  456. package/dist/stories/grist-modes.stories.js +0 -416
  457. package/dist/stories/grist-modes.stories.js.map +0 -1
  458. package/dist/stories/group-header.stories.d.ts +0 -26
  459. package/dist/stories/group-header.stories.js +0 -410
  460. package/dist/stories/group-header.stories.js.map +0 -1
  461. package/dist/stories/record-view.stories.d.ts +0 -24
  462. package/dist/stories/record-view.stories.js +0 -125
  463. package/dist/stories/record-view.stories.js.map +0 -1
  464. package/dist/stories/textarea.stories.d.ts +0 -37
  465. package/dist/stories/textarea.stories.js +0 -229
  466. package/dist/stories/textarea.stories.js.map +0 -1
  467. package/dist/stories/tree-column-with-checkbox.stories.d.ts +0 -26
  468. package/dist/stories/tree-column-with-checkbox.stories.js +0 -267
  469. package/dist/stories/tree-column-with-checkbox.stories.js.map +0 -1
  470. package/dist/stories/tree-column.stories.d.ts +0 -26
  471. package/dist/stories/tree-column.stories.js +0 -266
  472. package/dist/stories/tree-column.stories.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,236 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.0.0-beta.61](https://github.com/hatiolab/operato/compare/v9.0.0-beta.60...v9.0.0-beta.61) (2025-04-12)
7
+
8
+ **Note:** Version bump only for package @operato/data-grist
9
+
10
+
11
+
12
+
13
+
14
+ ## [9.0.0-beta.56](https://github.com/hatiolab/operato/compare/v9.0.0-beta.55...v9.0.0-beta.56) (2025-03-30)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * add addRecordToTop method into ox-grist ([57851b0](https://github.com/hatiolab/operato/commit/57851b0847e8f591a059345950da39b94e8d5122))
20
+ * title for ox-grist stories and README.md ([38476a5](https://github.com/hatiolab/operato/commit/38476a5994b142f29205014aa0238a1724fd7de1))
21
+
22
+
23
+
24
+ ## [9.0.0-beta.55](https://github.com/hatiolab/operato/compare/v9.0.0-beta.54...v9.0.0-beta.55) (2025-03-05)
25
+
26
+ **Note:** Version bump only for package @operato/data-grist
27
+
28
+
29
+
30
+
31
+
32
+ ## [9.0.0-beta.54](https://github.com/hatiolab/operato/compare/v9.0.0-beta.53...v9.0.0-beta.54) (2025-03-04)
33
+
34
+ **Note:** Version bump only for package @operato/data-grist
35
+
36
+
37
+
38
+
39
+
40
+ ## [9.0.0-beta.53](https://github.com/hatiolab/operato/compare/v9.0.0-beta.52...v9.0.0-beta.53) (2025-03-04)
41
+
42
+ **Note:** Version bump only for package @operato/data-grist
43
+
44
+
45
+
46
+
47
+
48
+ ## [9.0.0-beta.52](https://github.com/hatiolab/operato/compare/v9.0.0-beta.51...v9.0.0-beta.52) (2025-03-04)
49
+
50
+ **Note:** Version bump only for package @operato/data-grist
51
+
52
+
53
+
54
+
55
+
56
+ ## [9.0.0-beta.49](https://github.com/hatiolab/operato/compare/v9.0.0-beta.48...v9.0.0-beta.49) (2025-02-14)
57
+
58
+ **Note:** Version bump only for package @operato/data-grist
59
+
60
+
61
+
62
+
63
+
64
+ ## [9.0.0-beta.48](https://github.com/hatiolab/operato/compare/v9.0.0-beta.47...v9.0.0-beta.48) (2025-02-14)
65
+
66
+ **Note:** Version bump only for package @operato/data-grist
67
+
68
+
69
+
70
+
71
+
72
+ ## [9.0.0-beta.47](https://github.com/hatiolab/operato/compare/v9.0.0-beta.46...v9.0.0-beta.47) (2025-02-14)
73
+
74
+ **Note:** Version bump only for package @operato/data-grist
75
+
76
+
77
+
78
+
79
+
80
+ ## [9.0.0-beta.41](https://github.com/hatiolab/operato/compare/v9.0.0-beta.40...v9.0.0-beta.41) (2025-02-09)
81
+
82
+ **Note:** Version bump only for package @operato/data-grist
83
+
84
+
85
+
86
+
87
+
88
+ ## [9.0.0-beta.38](https://github.com/hatiolab/operato/compare/v9.0.0-beta.37...v9.0.0-beta.38) (2025-02-02)
89
+
90
+ **Note:** Version bump only for package @operato/data-grist
91
+
92
+
93
+
94
+
95
+
96
+ ## [9.0.0-beta.37](https://github.com/hatiolab/operato/compare/v9.0.0-beta.36...v9.0.0-beta.37) (2025-02-01)
97
+
98
+ **Note:** Version bump only for package @operato/data-grist
99
+
100
+
101
+
102
+
103
+
104
+ ## [9.0.0-beta.35](https://github.com/hatiolab/operato/compare/v9.0.0-beta.34...v9.0.0-beta.35) (2025-02-01)
105
+
106
+ **Note:** Version bump only for package @operato/data-grist
107
+
108
+
109
+
110
+
111
+
112
+ ## [9.0.0-beta.34](https://github.com/hatiolab/operato/compare/v9.0.0-beta.33...v9.0.0-beta.34) (2025-01-31)
113
+
114
+ **Note:** Version bump only for package @operato/data-grist
115
+
116
+
117
+
118
+
119
+
120
+ ## [9.0.0-beta.33](https://github.com/hatiolab/operato/compare/v9.0.0-beta.32...v9.0.0-beta.33) (2025-01-31)
121
+
122
+ **Note:** Version bump only for package @operato/data-grist
123
+
124
+
125
+
126
+
127
+
128
+ ## [9.0.0-beta.32](https://github.com/hatiolab/operato/compare/v9.0.0-beta.31...v9.0.0-beta.32) (2025-01-31)
129
+
130
+ **Note:** Version bump only for package @operato/data-grist
131
+
132
+
133
+
134
+
135
+
136
+ ## [9.0.0-beta.31](https://github.com/hatiolab/operato/compare/v9.0.0-beta.30...v9.0.0-beta.31) (2025-01-31)
137
+
138
+ **Note:** Version bump only for package @operato/data-grist
139
+
140
+
141
+
142
+
143
+
144
+ ## [9.0.0-beta.29](https://github.com/hatiolab/operato/compare/v9.0.0-beta.28...v9.0.0-beta.29) (2025-01-30)
145
+
146
+ **Note:** Version bump only for package @operato/data-grist
147
+
148
+
149
+
150
+
151
+
152
+ ## [9.0.0-beta.28](https://github.com/hatiolab/operato/compare/v9.0.0-beta.27...v9.0.0-beta.28) (2025-01-28)
153
+
154
+ **Note:** Version bump only for package @operato/data-grist
155
+
156
+
157
+
158
+
159
+
160
+ ## [9.0.0-beta.21](https://github.com/hatiolab/operato/compare/v9.0.0-beta.20...v9.0.0-beta.21) (2025-01-28)
161
+
162
+ **Note:** Version bump only for package @operato/data-grist
163
+
164
+
165
+
166
+
167
+
168
+ ## [9.0.0-beta.20](https://github.com/hatiolab/operato/compare/v9.0.0-beta.19...v9.0.0-beta.20) (2025-01-27)
169
+
170
+ **Note:** Version bump only for package @operato/data-grist
171
+
172
+
173
+
174
+
175
+
176
+ ## [9.0.0-beta.18](https://github.com/hatiolab/operato/compare/v9.0.0-beta.17...v9.0.0-beta.18) (2025-01-27)
177
+
178
+ **Note:** Version bump only for package @operato/data-grist
179
+
180
+
181
+
182
+
183
+
184
+ ## [9.0.0-beta.16](https://github.com/hatiolab/operato/compare/v9.0.0-beta.15...v9.0.0-beta.16) (2025-01-27)
185
+
186
+ **Note:** Version bump only for package @operato/data-grist
187
+
188
+
189
+
190
+
191
+
192
+ ## [9.0.0-beta.15](https://github.com/hatiolab/operato/compare/v9.0.0-beta.14...v9.0.0-beta.15) (2025-01-27)
193
+
194
+ **Note:** Version bump only for package @operato/data-grist
195
+
196
+
197
+
198
+
199
+
200
+ ## [9.0.0-beta.14](https://github.com/hatiolab/operato/compare/v9.0.0-beta.13...v9.0.0-beta.14) (2025-01-27)
201
+
202
+
203
+ ### :rocket: New Features
204
+
205
+ * module property-panel ([d78e4cf](https://github.com/hatiolab/operato/commit/d78e4cf7080b95fa74e61b42094b9f3f59f1409b))
206
+
207
+
208
+
209
+ ## [9.0.0-beta.11](https://github.com/hatiolab/operato/compare/v9.0.0-beta.10...v9.0.0-beta.11) (2025-01-25)
210
+
211
+
212
+ ### :bug: Bug Fix
213
+
214
+ * tsconfig option useDefineForClassFields=false ([0d77c0a](https://github.com/hatiolab/operato/commit/0d77c0aa620282c65b3c05f8e0b559e82836b6ab))
215
+
216
+
217
+
218
+ ## [9.0.0-beta.10](https://github.com/hatiolab/operato/compare/v9.0.0-beta.9...v9.0.0-beta.10) (2025-01-25)
219
+
220
+
221
+ ### :bug: Bug Fix
222
+
223
+ * i18next@24.2.1 ([1c5920c](https://github.com/hatiolab/operato/commit/1c5920c6f77d28f07051a0a49997b9fb1dbf08bf))
224
+ * tweak tsconfig.json ([3c424b1](https://github.com/hatiolab/operato/commit/3c424b18d046f95d5619076d113d49a4b4dc9bbb))
225
+
226
+
227
+
228
+ ## [9.0.0-beta.7](https://github.com/hatiolab/operato/compare/v9.0.0-beta.6...v9.0.0-beta.7) (2025-01-20)
229
+
230
+ **Note:** Version bump only for package @operato/data-grist
231
+
232
+
233
+
234
+
235
+
6
236
  ## [9.0.0-beta.6](https://github.com/hatiolab/operato/compare/v9.0.0-beta.5...v9.0.0-beta.6) (2025-01-20)
7
237
 
8
238
 
package/README.md CHANGED
@@ -1,95 +1,388 @@
1
- # \<data-grist>
1
+ # Data-Grist
2
2
 
3
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
3
+ Data-Grist is a powerful web component for displaying and manipulating data. It can present data in Grid, List, or Card formats and provides various features such as data sorting, filtering, editing, and more.
4
+
5
+ ## Key Features
6
+
7
+ - **Multiple Display Modes**: Flexibly display the same data in grid, list, or card formats
8
+ - **Data Manipulation**: Add, modify, and delete records
9
+ - **Sorting and Filtering**: Single/multi-column sorting, various filtering options
10
+ - **Editing Capabilities**: Inline cell editing, validation
11
+ - **Pagination**: Standard paging and infinite scroll support
12
+ - **Selection**: Single/multiple record selection
13
+ - **State Tracking**: Track changed (dirty) records
14
+ - **Customization**: Support for various renderers, editors, and event handlers
15
+ - **Mobile Responsive**: Responsive design support
4
16
 
5
17
  ## Installation
6
18
 
7
19
  ```bash
8
- npm i data-grist
20
+ npm install @operato/data-grist
9
21
  ```
10
22
 
11
- ## Usage
23
+ ## Basic Usage
12
24
 
13
25
  ```html
14
26
  <script type="module">
15
- import 'data-grist/data-grist.js';
27
+ import '@operato/data-grist/ox-grist.js'
16
28
  </script>
17
29
 
18
- <data-grist></data-grist>
30
+ <ox-grist
31
+ .mode=${'GRID'}
32
+ .config=${gridConfig}
33
+ .fetchHandler=${fetchDataFunction}
34
+ ></ox-grist>
19
35
  ```
20
36
 
21
- ## Linting with ESLint, Prettier, and Types
37
+ ## Modes
22
38
 
23
- To scan the project for linting errors, run
39
+ Data-Grist supports three display modes:
24
40
 
25
- ```bash
26
- npm run lint
41
+ - **GRID**: Tabular data display (default)
42
+ - **LIST**: Mobile-friendly list format display
43
+ - **CARD**: Card format display
44
+
45
+ ```javascript
46
+ // Set mode
47
+ gristElement.mode = 'GRID' // or 'LIST', 'CARD'
27
48
  ```
28
49
 
29
- You can lint with ESLint and Prettier individually as well
50
+ ## Configuration (Config)
51
+
52
+ Data-Grist provides various configuration options.
53
+
54
+ ```javascript
55
+ const config = {
56
+ columns: [
57
+ {
58
+ type: 'string',
59
+ name: 'name',
60
+ header: 'Name',
61
+ record: {
62
+ editable: true
63
+ },
64
+ sortable: true,
65
+ width: 150
66
+ }
67
+ // More columns...
68
+ ],
69
+ rows: {
70
+ appendable: true, // Allow adding new records
71
+ editable: true, // Allow editing records
72
+ selectable: {
73
+ // Record selection settings
74
+ multiple: true // Allow multiple selections
75
+ }
76
+ },
77
+ pagination: {
78
+ infinite: false, // Use paging instead of infinite scroll
79
+ page: 1, // Starting page
80
+ limit: 20 // Records per page
81
+ }
82
+ // Additional settings...
83
+ }
84
+ ```
30
85
 
31
- ```bash
32
- npm run lint:eslint
86
+ ### Column Types
87
+
88
+ ```javascript
89
+ // String column
90
+ {
91
+ type: 'string',
92
+ name: 'firstName',
93
+ header: 'First Name'
94
+ }
95
+
96
+ // Number column
97
+ {
98
+ type: 'number',
99
+ name: 'age',
100
+ header: 'Age',
101
+ record: {
102
+ align: 'right'
103
+ }
104
+ }
105
+
106
+ // Boolean column
107
+ {
108
+ type: 'boolean',
109
+ name: 'isActive',
110
+ header: 'Active'
111
+ }
112
+
113
+ // Link column
114
+ {
115
+ type: 'link',
116
+ name: 'website',
117
+ header: 'Website',
118
+ record: {
119
+ options: {
120
+ href: (column, record) => record.url,
121
+ target: '_blank'
122
+ }
123
+ }
124
+ }
125
+
126
+ // Gutter column (row number, checkbox, button, etc.)
127
+ {
128
+ type: 'gutter',
129
+ gutterName: 'sequence' // 'row-selector', 'button', 'dirty', etc.
130
+ }
33
131
  ```
34
132
 
35
- ```bash
36
- npm run lint:prettier
133
+ ## Fetching Data
134
+
135
+ Data can be retrieved through the `fetchHandler` function.
136
+
137
+ ```javascript
138
+ const fetchHandler = async params => {
139
+ const { page, limit, sorters, filters } = params
140
+
141
+ // Fetch data from server
142
+ const response = await fetch(`/api/data?page=${page}&limit=${limit}`)
143
+ const data = await response.json()
144
+
145
+ return {
146
+ total: data.total,
147
+ records: data.items
148
+ }
149
+ }
150
+
151
+ // Configure the grist
152
+ gristElement.fetchHandler = fetchHandler
37
153
  ```
38
154
 
39
- To automatically fix many linting errors, run
155
+ ## Record Manipulation API
40
156
 
41
- ```bash
42
- npm run format
157
+ ### Adding Records
158
+
159
+ ```javascript
160
+ // Add record at the end (default)
161
+ gristElement.addRecord({
162
+ name: 'John Doe',
163
+ age: 30
164
+ })
165
+
166
+ // Add record at the top
167
+ gristElement.addRecordToTop({
168
+ name: 'Jane Smith',
169
+ age: 25
170
+ })
43
171
  ```
44
172
 
45
- You can format using ESLint and Prettier individually as well
173
+ ### Record Selection
46
174
 
47
- ```bash
48
- npm run format:eslint
175
+ ```javascript
176
+ // Get all selected records
177
+ const selectedRecords = gristElement.selected
178
+
179
+ // Set selection
180
+ gristElement.selected = [record1, record2]
181
+
182
+ // Select records using a selector function
183
+ gristElement.select(record => record.age > 30)
49
184
  ```
50
185
 
51
- ```bash
52
- npm run format:prettier
186
+ ### Tracking Changed Records
187
+
188
+ ```javascript
189
+ // Get modified records
190
+ const dirtyRecords = gristElement.dirtyRecords
191
+
192
+ // Check for changes
193
+ gristElement.checkDirties()
194
+
195
+ // Export changes as patches
196
+ const patches = gristElement.exportPatchList()
53
197
  ```
54
198
 
55
- ## Testing with Web Test Runner
199
+ ## Events
56
200
 
57
- To run the suite of Web Test Runner tests, run
201
+ Data-Grist triggers various events.
58
202
 
59
- ```bash
60
- npm run test
203
+ ```javascript
204
+ // Record selection change event
205
+ gristElement.addEventListener('select-record-change', e => {
206
+ const { records, added, removed } = e.detail
207
+ console.log('Selected records:', records)
208
+ })
209
+
210
+ // Field change event
211
+ gristElement.addEventListener('field-change', e => {
212
+ const { after, before, column, record, row } = e.detail
213
+ console.log('Changed field:', column.name, 'from', before, 'to', after)
214
+ })
215
+
216
+ // Record change event
217
+ gristElement.addEventListener('record-change', e => {
218
+ const { before, after, column, row } = e.detail
219
+ console.log('Record changed:', row)
220
+ })
61
221
  ```
62
222
 
63
- To run the tests in watch mode (for &lt;abbr title=&#34;test driven development&#34;&gt;TDD&lt;/abbr&gt;, for example), run
223
+ ## Advanced Features
64
224
 
65
- ```bash
66
- npm run test:watch
225
+ ### Column Accumulation Feature (Accumulator)
226
+
227
+ ```javascript
228
+ {
229
+ type: 'number',
230
+ name: 'amount',
231
+ header: 'Amount',
232
+ accumulator: 'sum' // 'avg', 'count', 'min', 'max' or custom function
233
+ }
67
234
  ```
68
235
 
69
- ## Demoing with Storybook
236
+ ### Tree Structure Data
70
237
 
71
- To run a local instance of Storybook for your component, run
238
+ ```javascript
239
+ const config = {
240
+ // ...
241
+ tree: {
242
+ childrenProperty: 'children', // Property name where child nodes are stored
243
+ expanded: true // Initial tree expansion state
244
+ }
245
+ }
246
+ ```
72
247
 
73
- ```bash
74
- npm run storybook
248
+ ### Grouped Headers
249
+
250
+ ```javascript
251
+ const config = {
252
+ columns: [
253
+ // ...
254
+ {
255
+ type: 'string',
256
+ name: 'firstName',
257
+ header: 'First Name',
258
+ group: 'personalInfo'
259
+ },
260
+ {
261
+ type: 'string',
262
+ name: 'lastName',
263
+ header: 'Last Name',
264
+ group: 'personalInfo'
265
+ }
266
+ ],
267
+ // ...
268
+ rows: {
269
+ // ...
270
+ groups: [
271
+ {
272
+ name: 'personalInfo',
273
+ title: 'Personal Information'
274
+ }
275
+ ]
276
+ }
277
+ }
75
278
  ```
76
279
 
77
- To build a production version of Storybook, run
280
+ ### User Settings Storage
281
+
282
+ ```javascript
283
+ // Configure user settings provider
284
+ gristElement.personalConfigProvider = {
285
+ async load() {
286
+ // Load saved settings
287
+ return JSON.parse(localStorage.getItem('userGristConfig'))
288
+ },
289
+ async save(preference) {
290
+ // Save user settings
291
+ localStorage.setItem('userGristConfig', JSON.stringify(preference))
292
+ }
293
+ }
294
+ ```
78
295
 
79
- ```bash
80
- npm run storybook:build
296
+ ## Styling
297
+
298
+ Data-Grist can be styled through CSS variables.
299
+
300
+ ```css
301
+ ox-grist {
302
+ --grid-header-background-color: #f5f5f5;
303
+ --grid-record-background-color: white;
304
+ --grid-record-odd-background-color: #f9f9f9;
305
+ --grid-header-color: #333;
306
+ --grid-record-hover-background-color: #e9e9e9;
307
+ }
81
308
  ```
82
309
 
83
- ## Tooling configs
310
+ ## API Reference
311
+
312
+ ### Properties
313
+
314
+ | Property | Type | Description |
315
+ | ----------------- | -------- | ------------------------------------- |
316
+ | `mode` | string | Display mode ('GRID', 'LIST', 'CARD') |
317
+ | `config` | object | Grist configuration object |
318
+ | `data` | object | Data to display |
319
+ | `selectedRecords` | array | Array of selected records |
320
+ | `explicitFetch` | boolean | Enable explicit data fetching |
321
+ | `fetchHandler` | function | Data fetching function |
322
+ | `fetchOptions` | object | Data fetching options |
323
+ | `filters` | array | Array of filters |
324
+ | `sorters` | array | Array of sorters |
325
+ | `pagination` | object | Pagination settings |
326
+
327
+ ### Methods
328
+
329
+ | Method | Description |
330
+ | ------------------------------ | ------------------------------- |
331
+ | `fetch(reset)` | Fetch data |
332
+ | `addRecord(record)` | Add a record |
333
+ | `addRecordToTop(record)` | Add a record at the top |
334
+ | `deleteSelectedRecords(dirty)` | Delete selected records |
335
+ | `cloneSelectedRecords()` | Clone selected records |
336
+ | `checkDirties()` | Check for modified records |
337
+ | `undo()` | Undo last action |
338
+ | `redo()` | Redo undone action |
339
+ | `reset()` | Reset data |
340
+ | `commit()` | Commit changes |
341
+ | `select(selector, reset)` | Select records using a function |
342
+ | `exportPatchList(options)` | Export list of change patches |
343
+ | `exportRecords(options)` | Export record data |
344
+
345
+ ## Examples
346
+
347
+ ### Basic Grid
84
348
 
85
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
349
+ ```html
350
+ <ox-grist
351
+ .mode=${'GRID'}
352
+ .config=${gridConfig}
353
+ .fetchHandler=${fetchData}
354
+ @record-change=${handleRecordChange}
355
+ ></ox-grist>
356
+ ```
86
357
 
87
- If you customize the configuration a lot, you can consider moving them to individual files.
358
+ ### Editable Grid
88
359
 
89
- ## Local Demo with `web-dev-server`
360
+ ```html
361
+ <ox-grist
362
+ .mode=${'GRID'}
363
+ .config=${{
364
+ columns: [/* column definitions */],
365
+ rows: {
366
+ appendable: true,
367
+ editable: true,
368
+ selectable: { multiple: true }
369
+ }
370
+ }}
371
+ .data=${{ records: initialData }}
372
+ ></ox-grist>
373
+ ```
90
374
 
91
- ```bash
92
- npm start
375
+ ### Add Row to Top Button
376
+
377
+ ```html
378
+ <button @click="${() => gristRef.addRecordToTop()}">Add Row to Top</button>
379
+ <ox-grist id="my-grist"></ox-grist>
380
+
381
+ <script>
382
+ const gristRef = document.getElementById('my-grist')
383
+ </script>
93
384
  ```
94
385
 
95
- To run a local development server that serves the basic demo located in `demo/index.html`
386
+ ## License
387
+
388
+ MIT