@motifx-community/ui 0.1.0-beta.12 → 0.1.0-beta.14

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 (468) hide show
  1. package/CHANGELOG.md +414 -0
  2. package/README.md +2 -0
  3. package/dist/components/chart/Chart.d.ts +6 -4
  4. package/dist/components/chart/ChartPlot.d.ts +2 -1
  5. package/dist/components/chart/plot-view.d.ts +10 -2
  6. package/dist/components/chat/Chat.d.ts +276 -0
  7. package/dist/components/chat/ChatComposer.d.ts +172 -0
  8. package/dist/components/chat/ChatReply.d.ts +53 -0
  9. package/dist/components/chat/ChatWriter.d.ts +119 -0
  10. package/dist/components/chat/chat-ask-form.d.ts +64 -0
  11. package/dist/components/chat/chat-asked-entry.d.ts +21 -0
  12. package/dist/components/chat/chat-attachment-entry.d.ts +18 -0
  13. package/dist/components/chat/chat-choices-view.d.ts +40 -0
  14. package/dist/components/chat/chat-command.d.ts +7 -0
  15. package/dist/components/chat/chat-compaction-entry.d.ts +19 -0
  16. package/dist/components/chat/chat-composer-props.d.ts +63 -0
  17. package/dist/components/chat/chat-context-changed-event-args.d.ts +8 -0
  18. package/dist/components/chat/chat-context-item.d.ts +14 -0
  19. package/dist/components/chat/chat-copy-button.d.ts +11 -0
  20. package/dist/components/chat/chat-entry.d.ts +20 -0
  21. package/dist/components/chat/chat-flow-view.d.ts +32 -0
  22. package/dist/components/chat/chat-form-entry.d.ts +24 -0
  23. package/dist/components/chat/chat-form-view.d.ts +48 -0
  24. package/dist/components/chat/chat-history-event-args.d.ts +31 -0
  25. package/dist/components/chat/chat-load-older-event-args.d.ts +17 -0
  26. package/dist/components/chat/chat-look.d.ts +33 -0
  27. package/dist/components/chat/chat-mention.d.ts +21 -0
  28. package/dist/components/chat/chat-message-status.d.ts +2 -0
  29. package/dist/components/chat/chat-message.d.ts +23 -0
  30. package/dist/components/chat/chat-notice-entry.d.ts +20 -0
  31. package/dist/components/chat/chat-option.d.ts +7 -0
  32. package/dist/components/chat/chat-part.d.ts +110 -0
  33. package/dist/components/chat/chat-plan-entry.d.ts +25 -0
  34. package/dist/components/chat/chat-props.d.ts +70 -0
  35. package/dist/components/chat/chat-question-view.d.ts +41 -0
  36. package/dist/components/chat/chat-request.d.ts +173 -0
  37. package/dist/components/chat/chat-role.d.ts +2 -0
  38. package/dist/components/chat/chat-search-bar.d.ts +27 -0
  39. package/dist/components/chat/chat-search.d.ts +33 -0
  40. package/dist/components/chat/chat-send-event-args.d.ts +12 -0
  41. package/dist/components/chat/chat-sources-entry.d.ts +22 -0
  42. package/dist/components/chat/chat-text-entry.d.ts +20 -0
  43. package/dist/components/chat/chat-text-part.d.ts +5 -0
  44. package/dist/components/chat/chat-thinking-entry.d.ts +32 -0
  45. package/dist/components/chat/chat-todo-entry.d.ts +15 -0
  46. package/dist/components/chat/chat-tool-entry.d.ts +66 -0
  47. package/dist/components/chat/chat-tool-init.d.ts +18 -0
  48. package/dist/components/chat/chat-turn-view.d.ts +53 -0
  49. package/dist/components/chat/chat-turn.d.ts +8 -0
  50. package/dist/components/chat/chat-value-changed-event-args.d.ts +6 -0
  51. package/dist/components/chat/index.d.ts +22 -0
  52. package/dist/components/contextmenu/ContextMenu.d.ts +4 -0
  53. package/dist/components/contextmenu/context-menu-props.d.ts +6 -0
  54. package/dist/components/datagrid/DataGrid.d.ts +0 -12
  55. package/dist/components/datagrid/column-type.d.ts +2 -1
  56. package/dist/components/datagrid/grid-column.d.ts +4 -1
  57. package/dist/components/datagrid/grid-date-interval.d.ts +2 -1
  58. package/dist/components/datagrid/grid-filter-value.d.ts +2 -7
  59. package/dist/components/datagrid/grid-header-filter-interval.d.ts +2 -2
  60. package/dist/components/datagrid/grid-settings.d.ts +6 -3
  61. package/dist/components/datagrid/grid-sheet-cell.d.ts +3 -6
  62. package/dist/components/datagrid/grid-sheet-column.d.ts +2 -9
  63. package/dist/components/datagrid/grid-sheet-merge.d.ts +2 -7
  64. package/dist/components/datagrid/grid-sheet-row.d.ts +2 -5
  65. package/dist/components/datagrid/grid-sheet.d.ts +3 -2
  66. package/dist/components/datagrid/grid-summary-item.d.ts +5 -2
  67. package/dist/components/datagrid/grid-summary-texts.d.ts +2 -0
  68. package/dist/components/datagrid/grid-summary-type.d.ts +5 -2
  69. package/dist/components/datagrid/grid-summary.d.ts +3 -2
  70. package/dist/components/datagrid/list-option.d.ts +2 -4
  71. package/dist/components/datagrid/model/ColumnModel.d.ts +21 -3
  72. package/dist/components/datagrid/model/FilterValues.d.ts +15 -7
  73. package/dist/components/datagrid/model/GridExport.d.ts +1 -1
  74. package/dist/components/datagrid/model/GridModel.d.ts +2 -2
  75. package/dist/components/datagrid/model/LookupTexts.d.ts +1 -1
  76. package/dist/components/datagrid/view/CellEditor.d.ts +1 -1
  77. package/dist/components/datagrid/view/ColumnStyles.d.ts +4 -2
  78. package/dist/components/datagrid/view/GridBody.d.ts +1 -1
  79. package/dist/components/datagrid/view/HeaderRow.d.ts +3 -1
  80. package/dist/components/draggable/Draggable.d.ts +14 -3
  81. package/dist/components/dropdown/drop-down-props.d.ts +5 -2
  82. package/dist/components/form/MxForm.d.ts +1 -1
  83. package/dist/components/listbox/item-template.d.ts +4 -0
  84. package/dist/components/markdown/Markdown.d.ts +87 -0
  85. package/dist/components/markdown/code-block.d.ts +57 -0
  86. package/dist/components/markdown/code-colorer.d.ts +11 -0
  87. package/dist/components/markdown/code-highlighter.d.ts +9 -0
  88. package/dist/components/markdown/code-run.d.ts +6 -0
  89. package/dist/components/markdown/diagram-renderer.d.ts +21 -0
  90. package/dist/components/markdown/entities.d.ts +2 -0
  91. package/dist/components/markdown/index.d.ts +8 -0
  92. package/dist/components/markdown/inline-writer.d.ts +85 -0
  93. package/dist/components/markdown/markdown-context.d.ts +53 -0
  94. package/dist/components/markdown/markdown-link-click-event-args.d.ts +9 -0
  95. package/dist/components/markdown/markdown-props.d.ts +40 -0
  96. package/dist/components/markdown/markdown-writer.d.ts +95 -0
  97. package/dist/components/markdown/math-block.d.ts +22 -0
  98. package/dist/components/markdown/math-renderer.d.ts +18 -0
  99. package/dist/components/markdown/safe-href.d.ts +5 -0
  100. package/dist/components/markdown/text-run.d.ts +7 -0
  101. package/dist/components/menubar/MenuBar.d.ts +4 -0
  102. package/dist/components/menubar/menu-bar-props.d.ts +6 -0
  103. package/dist/components/pivotgrid/PivotGrid.d.ts +415 -0
  104. package/dist/components/pivotgrid/index.d.ts +44 -0
  105. package/dist/components/pivotgrid/model/PivotArrangement.d.ts +29 -0
  106. package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +169 -0
  107. package/dist/components/pivotgrid/model/PivotCellRanges.d.ts +63 -0
  108. package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +47 -0
  109. package/dist/components/pivotgrid/model/PivotChart.d.ts +49 -0
  110. package/dist/components/pivotgrid/model/PivotDisplay.d.ts +61 -0
  111. package/dist/components/pivotgrid/model/PivotDrill.d.ts +19 -0
  112. package/dist/components/pivotgrid/model/PivotExpansion.d.ts +44 -0
  113. package/dist/components/pivotgrid/model/PivotFields.d.ts +55 -0
  114. package/dist/components/pivotgrid/model/PivotFilterValues.d.ts +36 -0
  115. package/dist/components/pivotgrid/model/PivotLayout.d.ts +75 -0
  116. package/dist/components/pivotgrid/model/PivotLoader.d.ts +29 -0
  117. package/dist/components/pivotgrid/model/PivotSheet.d.ts +44 -0
  118. package/dist/components/pivotgrid/model/PivotStateStore.d.ts +19 -0
  119. package/dist/components/pivotgrid/model/PivotTable.d.ts +78 -0
  120. package/dist/components/pivotgrid/model/PivotTexts.d.ts +47 -0
  121. package/dist/components/pivotgrid/model/PivotWindows.d.ts +120 -0
  122. package/dist/components/pivotgrid/model/pivot-copy.d.ts +26 -0
  123. package/dist/components/pivotgrid/model/pivot-csv.d.ts +9 -0
  124. package/dist/components/pivotgrid/model/pivot-header-cell.d.ts +19 -0
  125. package/dist/components/pivotgrid/model/pivot-line-key.d.ts +17 -0
  126. package/dist/components/pivotgrid/model/pivot-line.d.ts +14 -0
  127. package/dist/components/pivotgrid/pivot-grid-area.d.ts +2 -0
  128. package/dist/components/pivotgrid/pivot-grid-cell-click-event-args.d.ts +5 -0
  129. package/dist/components/pivotgrid/pivot-grid-cell-context.d.ts +19 -0
  130. package/dist/components/pivotgrid/pivot-grid-cell-dbl-click-event-args.d.ts +5 -0
  131. package/dist/components/pivotgrid/pivot-grid-cell-range.d.ts +16 -0
  132. package/dist/components/pivotgrid/pivot-grid-cell-selection-changed-event-args.d.ts +6 -0
  133. package/dist/components/pivotgrid/pivot-grid-chart-data.d.ts +15 -0
  134. package/dist/components/pivotgrid/pivot-grid-chart-options.d.ts +19 -0
  135. package/dist/components/pivotgrid/pivot-grid-column-resized-event-args.d.ts +8 -0
  136. package/dist/components/pivotgrid/pivot-grid-column-resizing.d.ts +15 -0
  137. package/dist/components/pivotgrid/pivot-grid-column.d.ts +19 -0
  138. package/dist/components/pivotgrid/pivot-grid-content-ready-event-args.d.ts +6 -0
  139. package/dist/components/pivotgrid/pivot-grid-context-menu-preparing-event-args.d.ts +22 -0
  140. package/dist/components/pivotgrid/pivot-grid-copying-event-args.d.ts +10 -0
  141. package/dist/components/pivotgrid/pivot-grid-custom-summary-info.d.ts +15 -0
  142. package/dist/components/pivotgrid/pivot-grid-data-error-event-args.d.ts +5 -0
  143. package/dist/components/pivotgrid/pivot-grid-drill-down.d.ts +14 -0
  144. package/dist/components/pivotgrid/pivot-grid-expanded-event-args.d.ts +6 -0
  145. package/dist/components/pivotgrid/pivot-grid-expanding-event-args.d.ts +9 -0
  146. package/dist/components/pivotgrid/pivot-grid-export-cell.d.ts +21 -0
  147. package/dist/components/pivotgrid/pivot-grid-export-options.d.ts +16 -0
  148. package/dist/components/pivotgrid/pivot-grid-export.d.ts +17 -0
  149. package/dist/components/pivotgrid/pivot-grid-exported-event-args.d.ts +9 -0
  150. package/dist/components/pivotgrid/pivot-grid-exporting-event-args.d.ts +17 -0
  151. package/dist/components/pivotgrid/pivot-grid-field-chooser.d.ts +20 -0
  152. package/dist/components/pivotgrid/pivot-grid-field-panel.d.ts +16 -0
  153. package/dist/components/pivotgrid/pivot-grid-field.d.ts +110 -0
  154. package/dist/components/pivotgrid/pivot-grid-fields-changed-event-args.d.ts +8 -0
  155. package/dist/components/pivotgrid/pivot-grid-filter-value.d.ts +4 -0
  156. package/dist/components/pivotgrid/pivot-grid-group-interval.d.ts +7 -0
  157. package/dist/components/pivotgrid/pivot-grid-header-filter-items-request.d.ts +9 -0
  158. package/dist/components/pivotgrid/pivot-grid-header-filter-items.d.ts +7 -0
  159. package/dist/components/pivotgrid/pivot-grid-load-panel.d.ts +11 -0
  160. package/dist/components/pivotgrid/pivot-grid-props.d.ts +121 -0
  161. package/dist/components/pivotgrid/pivot-grid-sheet-options.d.ts +14 -0
  162. package/dist/components/pivotgrid/pivot-grid-sheet.d.ts +19 -0
  163. package/dist/components/pivotgrid/pivot-grid-state.d.ts +54 -0
  164. package/dist/components/pivotgrid/pivot-grid-summary-cell.d.ts +29 -0
  165. package/dist/components/pivotgrid/pivot-grid-summary-display-mode.d.ts +5 -0
  166. package/dist/components/pivotgrid/pivot-grid-summary-type.d.ts +5 -0
  167. package/dist/components/pivotgrid/view/PivotFieldChooser.d.ts +71 -0
  168. package/dist/components/pivotgrid/view/PivotFieldPanel.d.ts +92 -0
  169. package/dist/components/pivotgrid/view/PivotView.d.ts +263 -0
  170. package/dist/components/resizable/Resizable.d.ts +2 -0
  171. package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +4 -0
  172. package/dist/components/ribbonmenu/RibbonMenu.d.ts +4 -1
  173. package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +8 -4
  174. package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +6 -0
  175. package/dist/components/scheduler/view/TimeView.d.ts +2 -0
  176. package/dist/components/scrollview/ScrollView.d.ts +48 -1
  177. package/dist/components/scrollview/index.d.ts +1 -0
  178. package/dist/components/scrollview/scroll-end-changed-event-args.d.ts +7 -0
  179. package/dist/components/scrollview/scroll-view-props.d.ts +9 -0
  180. package/dist/components/splitter/Splitter.d.ts +1 -3
  181. package/dist/components/tabdocs/DocumentTab.d.ts +0 -1
  182. package/dist/components/tabdocs/PhoneBar.d.ts +0 -1
  183. package/dist/components/tabdocs/TabDocumentManager.d.ts +3 -2
  184. package/dist/components/textarea/TextArea.d.ts +11 -0
  185. package/dist/components/textarea/text-area-props.d.ts +12 -1
  186. package/dist/components/textbox/TextBox.d.ts +3 -0
  187. package/dist/components/textbox/text-box-props.d.ts +3 -0
  188. package/dist/components/toolbar/Toolbar.d.ts +70 -1
  189. package/dist/components/toolbar/index.d.ts +5 -0
  190. package/dist/components/toolbar/toolbar-added-item.d.ts +9 -0
  191. package/dist/components/toolbar/toolbar-custom-menu-opening-event-args.d.ts +23 -0
  192. package/dist/components/toolbar/toolbar-customization.d.ts +18 -0
  193. package/dist/components/toolbar/toolbar-customized-event-args.d.ts +7 -0
  194. package/dist/components/toolbar/toolbar-item-display.d.ts +2 -0
  195. package/dist/components/toolbar/toolbar-item.d.ts +11 -1
  196. package/dist/components/toolbar/toolbar-props.d.ts +26 -0
  197. package/dist/components/toolbar/toolbar-targets.d.ts +22 -0
  198. package/dist/components/treeview/TreeView.d.ts +8 -4
  199. package/dist/components/treeview/tree-view-item-template.d.ts +4 -0
  200. package/dist/core/clipboard.d.ts +11 -0
  201. package/dist/core/enter-key-hint.d.ts +2 -0
  202. package/dist/core/look-watch.d.ts +2 -2
  203. package/dist/core/measure/look.d.ts +1 -1
  204. package/dist/core/measure/on-layout.d.ts +1 -1
  205. package/dist/core/measure/scroll.d.ts +3 -1
  206. package/dist/core/save-text.d.ts +2 -0
  207. package/dist/core/show-icon.d.ts +3 -3
  208. package/dist/core/ui-strings.d.ts +190 -0
  209. package/dist/excel/excel-pivot-customize-cell-args.d.ts +8 -0
  210. package/dist/excel/excel-pivot-export-options.d.ts +44 -0
  211. package/dist/excel/excel-pivot-export-result.d.ts +6 -0
  212. package/dist/excel/export-pivot-grid.d.ts +35 -0
  213. package/dist/excel/index.d.ts +4 -0
  214. package/dist/excel/index.js +190 -56
  215. package/dist/excel/index.js.map +1 -1
  216. package/dist/excel/write-sheet.d.ts +16 -0
  217. package/dist/{formula-guard-NYlpoA-t.js → formula-guard-Bx48S0u3.js} +2 -2
  218. package/dist/formula-guard-Bx48S0u3.js.map +1 -0
  219. package/dist/generated/tokens.d.ts +7527 -4097
  220. package/dist/index.d.ts +6 -0
  221. package/dist/index.js +66924 -50915
  222. package/dist/index.js.map +1 -1
  223. package/dist/locales/en.json +179 -1
  224. package/dist/locales/tr.json +179 -1
  225. package/dist/parts/customizer/Customizer.d.ts +12 -6
  226. package/dist/parts/customizer/customizer-display.d.ts +2 -0
  227. package/dist/parts/customizer/customizer-node.d.ts +5 -0
  228. package/dist/parts/customizer/customizer-source.d.ts +15 -3
  229. package/dist/parts/item-layout/layout-added-item.d.ts +2 -2
  230. package/dist/parts/list/OptionList.d.ts +4 -3
  231. package/dist/parts/list/option-parts.d.ts +1 -1
  232. package/dist/parts/menu/MenuList.d.ts +5 -0
  233. package/dist/parts/popup/Popup.d.ts +2 -0
  234. package/dist/{components/datagrid/model → parts/table}/CellFormatter.d.ts +8 -8
  235. package/dist/{components/datagrid/view → parts/table}/HeaderFilter.d.ts +16 -11
  236. package/dist/parts/table/OffsetList.d.ts +21 -0
  237. package/dist/parts/table/ScaledOffsets.d.ts +32 -0
  238. package/dist/{components/datagrid/model → parts/table}/ValueIntervals.d.ts +12 -5
  239. package/dist/{components/datagrid/model → parts/table}/ValueListAdapter.d.ts +4 -4
  240. package/dist/parts/table/date-interval.d.ts +2 -0
  241. package/dist/parts/table/date-type.d.ts +3 -0
  242. package/dist/{components/datagrid/model → parts/table}/filter-tree-node.d.ts +3 -1
  243. package/dist/parts/table/filter-value.d.ts +9 -0
  244. package/dist/parts/table/format-column.d.ts +14 -0
  245. package/dist/parts/table/header-filter-host.d.ts +27 -0
  246. package/dist/parts/table/option-of.d.ts +6 -0
  247. package/dist/parts/table/slice-sheet.d.ts +8 -0
  248. package/dist/parts/table/table-sheet-cell.d.ts +13 -0
  249. package/dist/parts/table/table-sheet-column.d.ts +11 -0
  250. package/dist/parts/table/table-sheet-merge.d.ts +9 -0
  251. package/dist/parts/table/table-sheet-row.d.ts +8 -0
  252. package/dist/parts/table/table-sheet.d.ts +24 -0
  253. package/dist/parts/table/value-interval.d.ts +6 -0
  254. package/dist/{components/datagrid/model → parts/table}/value-list.d.ts +7 -2
  255. package/dist/parts/table/value-loader.d.ts +8 -0
  256. package/dist/parts/table/value-option.d.ts +5 -0
  257. package/dist/parts/table/value-type.d.ts +5 -0
  258. package/dist/parts/table/values-result.d.ts +6 -0
  259. package/dist/parts/window/follow-pointer.d.ts +9 -3
  260. package/dist/parts/window-list/WindowList.d.ts +105 -0
  261. package/dist/parts/window-list/window-list-source.d.ts +10 -0
  262. package/dist/pdf/export-pivot-grid.d.ts +21 -0
  263. package/dist/pdf/index.d.ts +3 -0
  264. package/dist/pdf/index.js +143 -16
  265. package/dist/pdf/index.js.map +1 -1
  266. package/dist/pdf/pdf-customize-cell-args.d.ts +1 -1
  267. package/dist/pdf/pdf-pivot-cell-args.d.ts +25 -0
  268. package/dist/pdf/pdf-pivot-export-options.d.ts +61 -0
  269. package/dist/pdf/pdf-table.d.ts +38 -6
  270. package/dist/slice-sheet-C116M42H.js +43 -0
  271. package/dist/slice-sheet-C116M42H.js.map +1 -0
  272. package/dist/styles.css +4527 -201
  273. package/dist/tokens/index.d.ts +7527 -4097
  274. package/dist/tokens/index.js +7527 -4097
  275. package/dist/tokens/index.js.map +1 -1
  276. package/dist/{tr-BvKE8jSF.js → tr-BGbF9uCs.js} +359 -3
  277. package/dist/tr-BGbF9uCs.js.map +1 -0
  278. package/docs/accordion.md +1 -1
  279. package/docs/actionsheet.md +1 -1
  280. package/docs/appbar.md +1 -1
  281. package/docs/appmenu-api.md +1 -1
  282. package/docs/appmenu-programmatic.md +1 -1
  283. package/docs/appmenu-search.md +1 -1
  284. package/docs/appmenu.md +1 -1
  285. package/docs/avatar.md +1 -1
  286. package/docs/badge.md +1 -1
  287. package/docs/bar-gauge-angles.md +1 -1
  288. package/docs/bar-gauge-data.md +1 -1
  289. package/docs/bar-gauge-labels.md +1 -1
  290. package/docs/bar-gauge.md +1 -1
  291. package/docs/barcode.md +1 -1
  292. package/docs/bottomnavigation.md +1 -1
  293. package/docs/bottomsheet.md +1 -1
  294. package/docs/breadcrumb.md +1 -1
  295. package/docs/button.md +1 -1
  296. package/docs/buttongroup.md +1 -1
  297. package/docs/buttons.md +1 -1
  298. package/docs/calendar.md +1 -1
  299. package/docs/card.md +1 -1
  300. package/docs/chart-bars.md +1 -1
  301. package/docs/chart-candles.md +1 -1
  302. package/docs/chart-funnel.md +1 -1
  303. package/docs/chart-heatmap.md +1 -1
  304. package/docs/chart-lines.md +1 -1
  305. package/docs/chart-live.md +1 -1
  306. package/docs/chart-pie.md +1 -1
  307. package/docs/chart-radar.md +1 -1
  308. package/docs/chart-ranges.md +1 -1
  309. package/docs/chart-references.md +1 -1
  310. package/docs/chart-scatter.md +1 -1
  311. package/docs/chart-waterfall.md +1 -1
  312. package/docs/chart-zoom.md +1 -1
  313. package/docs/chart.md +1 -1
  314. package/docs/chat.md +1512 -0
  315. package/docs/checkbox.md +1 -1
  316. package/docs/chip.md +2 -2
  317. package/docs/choice.md +1 -1
  318. package/docs/colorbox.md +1 -1
  319. package/docs/combobox.md +2 -1
  320. package/docs/commands.md +1 -1
  321. package/docs/control.md +1 -1
  322. package/docs/data.md +1 -1
  323. package/docs/datagrid-api.md +3 -3
  324. package/docs/datagrid-bands.md +1 -1
  325. package/docs/datagrid-drag-select.md +1 -1
  326. package/docs/datagrid-drag.md +1 -1
  327. package/docs/datagrid-editing.md +1 -1
  328. package/docs/datagrid-filtering.md +2 -2
  329. package/docs/datagrid-forms.md +1 -1
  330. package/docs/datagrid-grouping.md +7 -7
  331. package/docs/datagrid-layout.md +2 -2
  332. package/docs/datagrid-lookups.md +4 -1
  333. package/docs/datagrid-master-detail.md +1 -1
  334. package/docs/datagrid-scrolling.md +1 -1
  335. package/docs/datagrid-selection.md +1 -1
  336. package/docs/datagrid.md +1 -1
  337. package/docs/datebox.md +1 -1
  338. package/docs/daterangebox.md +1 -1
  339. package/docs/display.md +1 -1
  340. package/docs/draggable.md +2 -2
  341. package/docs/drawer.md +1 -1
  342. package/docs/dropdown.md +4 -3
  343. package/docs/editors.md +1 -1
  344. package/docs/feedback.md +1 -1
  345. package/docs/fileuploader.md +1 -1
  346. package/docs/filterbuilder.md +1 -1
  347. package/docs/formlayout.md +1 -1
  348. package/docs/foundations.md +1 -1
  349. package/docs/gallery.md +1 -1
  350. package/docs/gauge-base.md +1 -1
  351. package/docs/gauge-circular.md +1 -1
  352. package/docs/gauge-dashboards.md +1 -1
  353. package/docs/gauge-linear.md +1 -1
  354. package/docs/gauge-markers.md +1 -1
  355. package/docs/gauge-marks.md +1 -1
  356. package/docs/gauge-ranges.md +1 -1
  357. package/docs/gauge-scales.md +1 -1
  358. package/docs/gauge.md +1 -1
  359. package/docs/home.md +1 -1
  360. package/docs/keyboard.md +1 -1
  361. package/docs/language.md +1 -1
  362. package/docs/layout.md +1 -1
  363. package/docs/listbox.md +4 -3
  364. package/docs/loadpanel.md +1 -1
  365. package/docs/lookup.md +1 -1
  366. package/docs/markdown.md +343 -0
  367. package/docs/menus-api.md +3 -1
  368. package/docs/menus-context.md +2 -1
  369. package/docs/menus-customization.md +5 -1
  370. package/docs/menus-merging.md +1 -1
  371. package/docs/menus-programmatic.md +1 -1
  372. package/docs/menus.md +1 -1
  373. package/docs/multiview.md +1 -1
  374. package/docs/navigation.md +1 -1
  375. package/docs/numberbox.md +1 -1
  376. package/docs/otpinput.md +1 -1
  377. package/docs/pagination.md +1 -1
  378. package/docs/pivotgrid-api.md +180 -0
  379. package/docs/pivotgrid-chart.md +132 -0
  380. package/docs/pivotgrid-drilldown.md +142 -0
  381. package/docs/pivotgrid-export.md +207 -0
  382. package/docs/pivotgrid-fields.md +245 -0
  383. package/docs/pivotgrid-keyboard.md +223 -0
  384. package/docs/pivotgrid-layout.md +663 -0
  385. package/docs/pivotgrid-panel.md +223 -0
  386. package/docs/pivotgrid-remote.md +397 -0
  387. package/docs/pivotgrid-sorting.md +379 -0
  388. package/docs/pivotgrid-state.md +245 -0
  389. package/docs/pivotgrid-summaries.md +330 -0
  390. package/docs/pivotgrid.md +295 -0
  391. package/docs/popover.md +1 -1
  392. package/docs/progress.md +1 -1
  393. package/docs/qrcode.md +1 -1
  394. package/docs/radiogroup.md +1 -1
  395. package/docs/rating.md +1 -1
  396. package/docs/resizable.md +1 -1
  397. package/docs/ribbonmenu-api.md +2 -1
  398. package/docs/ribbonmenu-commands.md +1 -1
  399. package/docs/ribbonmenu-customization.md +3 -2
  400. package/docs/ribbonmenu-display.md +3 -3
  401. package/docs/ribbonmenu-layouts.md +1 -1
  402. package/docs/ribbonmenu-programmatic.md +1 -1
  403. package/docs/ribbonmenu.md +3 -1
  404. package/docs/scheduler-agenda.md +1 -1
  405. package/docs/scheduler-big-data.md +1 -1
  406. package/docs/scheduler-editing.md +1 -1
  407. package/docs/scheduler-form.md +1 -1
  408. package/docs/scheduler-icalendar.md +1 -1
  409. package/docs/scheduler-mobile.md +1 -1
  410. package/docs/scheduler-recurrence.md +1 -1
  411. package/docs/scheduler-resources.md +1 -1
  412. package/docs/scheduler-timeline.md +1 -1
  413. package/docs/scheduler.md +1 -1
  414. package/docs/scrollview.md +1 -1
  415. package/docs/shortcuteditor.md +1 -1
  416. package/docs/showcase-home.md +1 -1
  417. package/docs/showcase-mail.md +39 -0
  418. package/docs/showcase.md +1 -1
  419. package/docs/signature.md +1 -1
  420. package/docs/skeleton.md +1 -1
  421. package/docs/slider.md +1 -1
  422. package/docs/sortable.md +3 -6
  423. package/docs/sparkline.md +1 -1
  424. package/docs/speeddial.md +1 -1
  425. package/docs/splitter.md +1 -1
  426. package/docs/stepper.md +1 -1
  427. package/docs/switch.md +1 -1
  428. package/docs/tabdocs-dock.md +1 -1
  429. package/docs/tabdocs-drag.md +1 -1
  430. package/docs/tabdocs-menus.md +1 -1
  431. package/docs/tabdocs-mobile.md +1 -1
  432. package/docs/tabdocs-tabs.md +1 -1
  433. package/docs/tabdocs-windows.md +1 -1
  434. package/docs/tabdocs-workspace.md +1 -1
  435. package/docs/tabdocs.md +1 -1
  436. package/docs/tabs.md +1 -1
  437. package/docs/tagbox.md +4 -3
  438. package/docs/textarea.md +4 -1
  439. package/docs/textbox.md +2 -1
  440. package/docs/tileview.md +1 -1
  441. package/docs/timeline.md +1 -1
  442. package/docs/toast.md +1 -1
  443. package/docs/tokens.md +687 -1
  444. package/docs/toolbar-api.md +80 -0
  445. package/docs/toolbar-customization.md +261 -0
  446. package/docs/toolbar.md +4 -52
  447. package/docs/tooltip.md +1 -1
  448. package/docs/treeview.md +3 -3
  449. package/docs/validationsummary.md +1 -1
  450. package/docs/window.md +1 -1
  451. package/docs/wizard.md +1 -1
  452. package/llms-full.txt +19005 -12353
  453. package/llms.txt +29 -2
  454. package/package.json +5 -5
  455. package/dist/components/datagrid/model/date-type.d.ts +0 -3
  456. package/dist/components/datagrid/model/option-of.d.ts +0 -6
  457. package/dist/components/datagrid/model/value-loader.d.ts +0 -8
  458. package/dist/formula-guard-NYlpoA-t.js.map +0 -1
  459. package/dist/tr-BvKE8jSF.js.map +0 -1
  460. /package/dist/{components/datagrid/model → core}/text-ranges.d.ts +0 -0
  461. /package/dist/{components/datagrid/model → parts/table}/ExtraHeights.d.ts +0 -0
  462. /package/dist/{components/datagrid/model → parts/table}/ScrollGeometry.d.ts +0 -0
  463. /package/dist/{components/datagrid/model → parts/table}/cell-list.d.ts +0 -0
  464. /package/dist/{components/datagrid/model → parts/table}/date-like.d.ts +0 -0
  465. /package/dist/{components/datagrid/view → parts/table}/editor-value.d.ts +0 -0
  466. /package/dist/{components/datagrid/model → parts/table}/formula-guard.d.ts +0 -0
  467. /package/dist/{components/datagrid/model → parts/table}/parse-date-text.d.ts +0 -0
  468. /package/dist/{components/datagrid/model → parts/table}/same-value.d.ts +0 -0
@@ -0,0 +1,223 @@
1
+ # PivotGrid: Field panel and chooser
2
+
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.14
4
+
5
+ The user arranges the fields: in the field panel over the table, where each kind of field has an area of chips. What the user changes is laid over `fields`; `arrangedFields` reads it, `fieldOption` reads and writes it from code, and `onFieldsChanged` tells every change.
6
+
7
+ ## Field panel
8
+
9
+ `fieldPanel: { visible: true }` shows the panel: the filter, data, column and row fields, each area with its chips in order (`showFilterFields`, `showDataFields`, `showColumnFields` and `showRowFields` hide one). A chip is dragged to another area or along its own; pressing a row or column field's chip turns the order of its members around. `allowFieldDragging: false` keeps every chip in place, and a field's `allowDragging: false` or `allowSorting: false` its own.
10
+
11
+ ```tsx
12
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
13
+
14
+ const PLACES: [string, string][] = [
15
+ ['Marmara', 'İstanbul'],
16
+ ['Marmara', 'Bursa'],
17
+ ['Central Anatolia', 'Ankara'],
18
+ ['Central Anatolia', 'Konya'],
19
+ ['Aegean', 'İzmir'],
20
+ ['Aegean', 'Muğla'],
21
+ ['Black Sea', 'Trabzon'],
22
+ ['Mediterranean', 'Antalya'],
23
+ ];
24
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
25
+
26
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
27
+ export function makeSales(count: number): Sale[] {
28
+ return Array.from({ length: count }, (_, i) => {
29
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
30
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
31
+ return {
32
+ id: i + 1,
33
+ region,
34
+ city,
35
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
36
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
37
+ amount: ((i * 7919) % 50000) / 100,
38
+ units: 1 + ((i * 31) % 12),
39
+ };
40
+ });
41
+ }
42
+ ```
43
+
44
+ ## Header filter
45
+
46
+ The funnel in a chip, or “Filter values” in its menu, opens the field's header filter: its values with their rows, a search box and “Select all”, or entries of the app's own. What it keeps and where its values come from is told under [Header filter](pivotgrid-sorting.md#header-filter).
47
+
48
+ ## Field chooser
49
+
50
+ The field chooser is a window with every field in a list that searches, each checked while it is in an area, beside the four areas (`layout: 'side'`, the default) or over them (`'stacked'`). A field checked in takes the area it was given, else the data fields when it sums up its rows, else the row fields; unchecked, it leaves every area. In the areas, chips move and filter as in the field panel. Changes apply at once (`applyChangesMode: 'instantly'`), or with OK (`'onDemand'`), and Cancel, Escape or the close button leave the pivot as it was. The panel's button opens it, and so does `openFieldChooser()`; `fieldChooser: { enabled: false }` offers none.
51
+
52
+ ```tsx
53
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
54
+
55
+ const PLACES: [string, string][] = [
56
+ ['Marmara', 'İstanbul'],
57
+ ['Marmara', 'Bursa'],
58
+ ['Central Anatolia', 'Ankara'],
59
+ ['Central Anatolia', 'Konya'],
60
+ ['Aegean', 'İzmir'],
61
+ ['Aegean', 'Muğla'],
62
+ ['Black Sea', 'Trabzon'],
63
+ ['Mediterranean', 'Antalya'],
64
+ ];
65
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
66
+
67
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
68
+ export function makeSales(count: number): Sale[] {
69
+ return Array.from({ length: count }, (_, i) => {
70
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
71
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
72
+ return {
73
+ id: i + 1,
74
+ region,
75
+ city,
76
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
77
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
78
+ amount: ((i * 7919) % 50000) / 100,
79
+ units: 1 + ((i * 31) % 12),
80
+ };
81
+ });
82
+ }
83
+ ```
84
+
85
+ ## From the keys
86
+
87
+ The chips are one Tab stop; the arrow keys go from chip to chip across the areas, and Home and End to the first and the last. Enter or Space turns the order around, Shift and Left or Right moves the chip along its area, and Delete takes the field out. Alt and Down, Shift and F10 or the menu key open the chip's menu, which sorts, opens the header filter, moves the field to another area, earlier or later, or takes it out. Every move is announced.
88
+
89
+ ## Arranging from code
90
+
91
+ `fieldOption(field)` returns a copy of a field as arranged, `fieldOption(field, name)` one of its options, and `fieldOption(field, name, value)` or `fieldOption(field, { … })` changes them the way the user's changes are kept. A field is named by its place in `fields`, its `name`, its `field` or its `title`; two fields of one `field` take a `name`. A new `fields` list drops what was changed. Options that only lay the result out (`sortBy`, `sortBySummaryField`, `title`, `format`, `width`, `showTotals`) lay it out again without a load; the others load it again. An axis keeps its open members on the levels it keeps from the top.
92
+
93
+ ## Feedback
94
+
95
+ Loading issues…
96
+
97
+ ## Example files
98
+
99
+ `FieldPanel.tsx`
100
+
101
+ ```tsx
102
+ import { reactive } from '@motifx/core';
103
+ import { Button, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
104
+ import { makeSales, type Sale } from './sales';
105
+
106
+ const sales = makeSales(20000);
107
+
108
+ const fields: PivotGridField<Sale>[] = [
109
+ { field: 'region', title: 'Region', area: 'row' },
110
+ { field: 'city', title: 'City', area: 'row' },
111
+ { field: 'date', title: 'Year', type: 'date', area: 'column', groupInterval: 'year' },
112
+ { field: 'product', title: 'Product', area: 'filter' },
113
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
114
+ { field: 'units', title: 'Units', type: 'number', summaryType: 'sum' },
115
+ ];
116
+
117
+ /** The field panel: chips moved between the areas and along them, orders turned, and what the user did told. */
118
+ export default function FieldPanel() {
119
+ const s = reactive({ told: 'Move a chip.' });
120
+ let pivot: PivotGrid<Sale> | null = null;
121
+ const where = (f: PivotGridField<Sale>) => (f.area ? `${f.title} in ${f.area}` : `${f.title} out`);
122
+
123
+ return (
124
+ <>
125
+ <PivotGrid
126
+ class="pg-panel"
127
+ style="block-size: 26rem"
128
+ data={sales}
129
+ fields={fields}
130
+ fieldPanel={{ visible: true }}
131
+ onFieldsChanged={(e) => (s.told = e.fields.map(where).join(', '))}
132
+ label="Sales arranged in the field panel"
133
+ ref={(g: PivotGrid<Sale>) => (pivot = g)}
134
+ />
135
+ <Stack orientation="horizontal" wrap align="center">
136
+ <Button text="Units into the data fields" variant="outline" onclick={() => pivot?.fieldOption('units', 'area', 'data')} />
137
+ <Button text="Start again" variant="outline" onclick={() => pivot && (pivot.fields = [...fields])} />
138
+ <output class="pg-panel-told">{() => s.told}</output>
139
+ </Stack>
140
+ </>
141
+ );
142
+ }
143
+ ```
144
+
145
+ `sales.ts`
146
+
147
+ ```tsx
148
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
149
+
150
+ const PLACES: [string, string][] = [
151
+ ['Marmara', 'İstanbul'],
152
+ ['Marmara', 'Bursa'],
153
+ ['Central Anatolia', 'Ankara'],
154
+ ['Central Anatolia', 'Konya'],
155
+ ['Aegean', 'İzmir'],
156
+ ['Aegean', 'Muğla'],
157
+ ['Black Sea', 'Trabzon'],
158
+ ['Mediterranean', 'Antalya'],
159
+ ];
160
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
161
+
162
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
163
+ export function makeSales(count: number): Sale[] {
164
+ return Array.from({ length: count }, (_, i) => {
165
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
166
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
167
+ return {
168
+ id: i + 1,
169
+ region,
170
+ city,
171
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
172
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
173
+ amount: ((i * 7919) % 50000) / 100,
174
+ units: 1 + ((i * 31) % 12),
175
+ };
176
+ });
177
+ }
178
+ ```
179
+
180
+ `FieldChooser.tsx`
181
+
182
+ ```tsx
183
+ import { reactive } from '@motifx/core';
184
+ import { Button, ButtonGroup, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
185
+ import { makeSales, type Sale } from './sales';
186
+
187
+ const sales = makeSales(20000);
188
+
189
+ const fields: PivotGridField<Sale>[] = [
190
+ { field: 'region', title: 'Region', area: 'row' },
191
+ { field: 'city', title: 'City' },
192
+ { field: 'product', title: 'Product', area: 'column' },
193
+ { field: 'date', title: 'Year', type: 'date', groupInterval: 'year' },
194
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
195
+ { field: 'units', title: 'Units', type: 'number', summaryType: 'sum' },
196
+ ];
197
+
198
+ /** The field chooser, from the panel's button or from code: beside or over the areas, applied at once or with OK. */
199
+ export default function FieldChooser() {
200
+ const s = reactive({ layout: 'side' as 'side' | 'stacked', mode: 'instantly' as 'instantly' | 'onDemand' });
201
+ let pivot: PivotGrid<Sale> | null = null;
202
+
203
+ return (
204
+ <>
205
+ <Stack orientation="horizontal" wrap align="center">
206
+ <ButtonGroup label="Layout" items={[{ value: 'side', text: 'Side by side' }, { value: 'stacked', text: 'Stacked' }]} x-model={() => s.layout} />
207
+ <ButtonGroup label="Changes" items={[{ value: 'instantly', text: 'At once' }, { value: 'onDemand', text: 'With OK' }]} x-model={() => s.mode} />
208
+ <Button text="Open the field chooser" variant="outline" onclick={() => pivot?.openFieldChooser()} />
209
+ </Stack>
210
+ <PivotGrid
211
+ class="pg-chooser"
212
+ style="block-size: 22rem"
213
+ data={sales}
214
+ fields={fields}
215
+ fieldPanel={{ visible: true }}
216
+ fieldChooser={() => ({ layout: s.layout, applyChangesMode: s.mode })}
217
+ label="Sales arranged in the field chooser"
218
+ ref={(g: PivotGrid<Sale>) => (pivot = g)}
219
+ />
220
+ </>
221
+ );
222
+ }
223
+ ```
@@ -0,0 +1,397 @@
1
+ # PivotGrid: Remote data
2
+
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.14
4
+
5
+ A pivot a server computes is read from it: the members open, or, where the server computes the parts of pivots too, only what the view reaches as it scrolls, so a large result never comes whole.
6
+
7
+ ## Pivots a server computes
8
+
9
+ With a `dataSource` whose adapter computes pivots (`capabilities.pivot`: OData with `aggregation`, REST with `pivot`), the server groups and sums the rows, and the pivot gets the members and values of the members open; opening a member asks for its children, and a header filter for the members of its field alone. A field read with `value` or a custom summary needs the rows: they are loaded and pivoted in the browser. The [overview](pivotgrid.md#data) has an example.
10
+
11
+ ## Read in parts as it scrolls
12
+
13
+ Where the adapter computes the parts of pivots too (`capabilities.pivotWindow`: OData with `aggregation`, REST with `pivot` unless `window: false`), the pivot reads them by itself as the view reaches them. The first view takes three requests: the first part of each axis, which tells how many members it has, then the values of those parts; a level open by default adds one, read first. Values are read a part at a time too: a scroll within the parts read asks for nothing, and the next part is read half a part before the view reaches it. A long move waits until the scroll stops, so the parts passed over are not read, and lets go of the requests still on their way. A member not read yet shows as an empty line that reads as loading. `partSize` sets the members of a part: 100 rows and 40 columns by default.
14
+
15
+ ```tsx
16
+ import { data } from '@motifx-community/data';
17
+ import type { Order } from './orders';
18
+
19
+ /**
20
+ * A server in a worker: a million orders of 100,000 customers over two years, and the pivot endpoint the REST adapter
21
+ * asks, answering whole pivots and the parts a view reads (`kind`) with the data layer's own memory engine. As a
22
+ * database would, it finds the orders of regions or of customers by an index, and keeps the members it ordered for a
23
+ * while, so the next part of a long list is taken from them.
24
+ */
25
+ const REGIONS = ['Marmara', 'Aegean', 'Mediterranean', 'Central Anatolia', 'Black Sea', 'Eastern Anatolia', 'Southeastern Anatolia', 'Thrace'];
26
+ const ctx: data.EvaluateContext = { locale: 'en-US', fields: { date: 'date' } };
27
+
28
+ const NAMES = Array.from({ length: 100_000 }, (_, c) => `Customer ${String(c).padStart(6, '0')}`);
29
+ const DAYS = Array.from({ length: 731 }, (_, d) => {
30
+ const day = new Date(2024, 0, 1 + d);
31
+ return `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`;
32
+ });
33
+ const orders: Order[] = Array.from({ length: 1_000_000 }, (_, i) => {
34
+ const customer = (i * 7919) % 100_000;
35
+ return { id: i + 1, region: REGIONS[customer % REGIONS.length], customer: NAMES[customer], date: DAYS[(i * 13) % 731], amount: ((i * 104_729) % 90_000) / 100 };
36
+ });
37
+
38
+ /** The orders by the value of a field, for the fields an index is kept on. */
39
+ const INDEXED: readonly string[] = ['region', 'customer'];
40
+ const indexes = new Map<string, Map<unknown, Order[]>>();
41
+
42
+ function indexOf(field: string): Map<unknown, Order[]> | null {
43
+ if (!INDEXED.includes(field)) return null;
44
+ let index = indexes.get(field);
45
+ if (!index) {
46
+ index = new Map();
47
+ for (const order of orders) {
48
+ const key = order[field as keyof Order];
49
+ let list = index.get(key);
50
+ if (!list) index.set(key, (list = []));
51
+ list.push(order);
52
+ }
53
+ indexes.set(field, index);
54
+ }
55
+ return index;
56
+ }
57
+
58
+ /**
59
+ * The orders under the members of these paths, found by the index of the deepest level every path reaches; `null`
60
+ * where none can tell (a total, an interval, no index).
61
+ */
62
+ function under(levels: readonly data.PivotLevel<Order>[], paths: readonly (readonly unknown[])[]): Order[] | null {
63
+ if (!paths.length) return null;
64
+ const reached = Math.min(...paths.map((path) => path.length));
65
+ for (let k = Math.min(reached, levels.length) - 1; k >= 0; k--) {
66
+ const level = levels[k];
67
+ const index = level.interval === undefined && !level.value ? indexOf(String(level.field)) : null;
68
+ if (index) return [...new Set(paths.map((path) => path[k]))].flatMap((key) => index.get(key) ?? []);
69
+ }
70
+ return null;
71
+ }
72
+
73
+ /** Every member of a parent, ordered, by what was asked: the next part of the list is taken from them. */
74
+ const ordered = new Map<string, data.PivotSliceResult>();
75
+
76
+ function members(o: data.PivotMembersOptions<Order>): data.PivotMembersResult {
77
+ if (o.find?.length) return data.pivotMembers(under(o.levels, o.slices.map((s) => s.parent)) ?? orders, o, ctx);
78
+ const { slices, ...asked } = o;
79
+ return {
80
+ slices: slices.map((slice) => {
81
+ const id = JSON.stringify([asked, slice.parent]);
82
+ let all = ordered.get(id);
83
+ if (!all) {
84
+ all = data.pivotMembers(under(o.levels, [slice.parent]) ?? orders, { ...asked, slices: [{ parent: slice.parent }] }, ctx).slices[0];
85
+ ordered.set(id, all);
86
+ if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
87
+ }
88
+ const skip = slice.skip ?? 0;
89
+ return { parent: slice.parent, total: all.total, members: slice.take === undefined ? all.members.slice(skip) : all.members.slice(skip, skip + slice.take) };
90
+ }),
91
+ };
92
+ }
93
+
94
+ function answer(body: Record<string, unknown>): unknown {
95
+ switch (body.kind) {
96
+ case 'members':
97
+ return members(body as unknown as data.PivotMembersOptions<Order>);
98
+ case 'counts': {
99
+ const o = body as unknown as data.PivotCountsOptions<Order>;
100
+ const r = data.pivotCounts(under(o.levels, o.paths) ?? orders, o, ctx);
101
+ return { counts: o.paths.map((path) => ({ path, count: r.childCount(path) })) };
102
+ }
103
+ case 'cells': {
104
+ const o = body as unknown as data.PivotCellsOptions<Order>;
105
+ // The orders of one axis's members hold every crossing: those of the axis that has fewer are counted. A running
106
+ // total adds up the siblings too, in an order that may read their totals: the orders under the members' parents on
107
+ // its axis, and all of them across it.
108
+ const along = new Set(o.running?.map((r) => r.axis));
109
+ const parents = (paths: readonly (readonly unknown[])[]) => paths.map((p) => p.slice(0, -1));
110
+ const byRows = along.has('columns') ? null : under(o.rows, along.has('rows') ? parents(o.rowPaths) : o.rowPaths);
111
+ const byColumns = along.has('rows') ? null : under(o.columns, along.has('columns') ? parents(o.columnPaths) : o.columnPaths);
112
+ const rows = byRows && byColumns ? (byRows.length <= byColumns.length ? byRows : byColumns) : (byRows ?? byColumns ?? orders);
113
+ // As a server answers: the crossings some order falls in, with the running totals asked for.
114
+ return data.pivotCellGroups(rows, o, ctx);
115
+ }
116
+ default:
117
+ return data.pivotGroups(orders, body as data.PivotLoadOptions, ctx);
118
+ }
119
+ }
120
+
121
+ self.onmessage = (e: MessageEvent<{ id: number; body: string }>) => {
122
+ const started = performance.now();
123
+ const body = JSON.stringify(answer(JSON.parse(e.data.body) as Record<string, unknown>));
124
+ self.postMessage({ id: e.data.id, body, ms: performance.now() - started });
125
+ };
126
+ ```
127
+
128
+ Above, a million orders stand on a server in a worker that answers the REST adapter as an endpoint would, one request at a time; like a database, it finds the orders of regions and customers by an index and keeps the members it ordered. The note under the pivot counts what it answered: with the regions open, the first view takes four requests; with the customers across, three.
129
+
130
+ The button at the end of the field panel exports the pivot to CSV: it is read whole, a run of rows at a time, the next run read while one is written, and the panel over the table counts the rows ([Export](pivotgrid-export.md#parts)).
131
+
132
+ ## What is read whole
133
+
134
+ A level open by default (`expanded`, `expandAll`) has its members read whole with the number of their children: the members open must be known to place the others. So does a level ordered in the browser, by `compare` or by the text of parts of dates; a level ordered by a data field is ordered on the server. A member opened one by one under a member read in parts is found by its place among its parent's children. The values read stay through a new order or layout of the same fields; a new query or new fields read them again.
135
+
136
+ ## Selecting and copying
137
+
138
+ Cell ranges and the active cell keep their members through the parts that come and go. Ctrl+C and `copy()` read the cells of the ranges first, up to 100,000 of them; past that nothing is copied, and that is told. `copy()` resolves to the text. `onContentReady` gives no result (`null`), and `result` and `layout` stay `null`: no whole result is read.
139
+
140
+ ## Wide pivots
141
+
142
+ Columns are drawn as rows are: only those in view have cells. Where they are wider than a browser scrolls (past ten million pixels), the scroll is scaled, so 100,000 columns scroll as a hundred do; the example shows it with the customers across.
143
+
144
+ ## A server of your own
145
+
146
+ A REST endpoint answers the parts as the data layer asks for them, a body with `kind` (`members`, `counts` or `cells`); the data layer's README gives each body and answer. Its memory engine computes them over rows a server holds (`pivotMembers`, `pivotCounts`, `pivotCellGroups`), as the worker above does.
147
+
148
+ ## Feedback
149
+
150
+ Loading issues…
151
+
152
+ ## Example files
153
+
154
+ `Parts.tsx`
155
+
156
+ ```tsx
157
+ import { reactive } from '@motifx/core';
158
+ import { ButtonGroup, PivotGrid, type PivotGridField } from '@motifx-community/ui';
159
+ import { ordersSource, type Order } from './orders';
160
+
161
+ const PLACES = [
162
+ { value: 'down', text: 'Customers down' },
163
+ { value: 'across', text: 'Customers across' },
164
+ ];
165
+
166
+ /**
167
+ * A million orders on a server that computes pivots and their parts: the pivot reads the members and values in view
168
+ * as it scrolls, never the whole result. Across, 100,000 customers take more room than a browser scrolls. Exported, it
169
+ * is read whole, a run of rows at a time.
170
+ */
171
+ export default function Parts() {
172
+ const s = reactive({ place: 'down', members: 0, cells: 0, whole: 0, last: 0, exported: '' });
173
+ let started = 0;
174
+ const { source, stop } = ordersSource((e) => {
175
+ if (e.kind === 'cells') s.cells++;
176
+ else if (e.kind === 'whole') s.whole++;
177
+ else s.members++;
178
+ s.last = Math.round(e.ms);
179
+ });
180
+ const amount: PivotGridField<Order> = { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } };
181
+ const fields = (): PivotGridField<Order>[] =>
182
+ s.place === 'down'
183
+ ? [
184
+ { field: 'region', title: 'Region', area: 'row', expanded: true },
185
+ { field: 'customer', title: 'Customer', area: 'row' },
186
+ { field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'] },
187
+ amount,
188
+ ]
189
+ : [
190
+ { field: 'date', title: 'Date', type: 'date', area: 'row', groupInterval: ['year', 'quarter'] },
191
+ { field: 'customer', title: 'Customer', area: 'column' },
192
+ amount,
193
+ ];
194
+
195
+ return (
196
+ <>
197
+ <ButtonGroup label="Customers" items={PLACES} x-model={() => s.place} />
198
+ <PivotGrid
199
+ class="pg-parts"
200
+ style="block-size: 26rem"
201
+ dataSource={source}
202
+ fields={fields}
203
+ label="A million orders, read in parts"
204
+ fieldPanel={{ visible: true }}
205
+ export={{ formats: ['csv'], fileName: 'Orders' }}
206
+ onExporting={() => (started = performance.now())}
207
+ onExported={(e) => (s.exported = `Exported ${e.rows.toLocaleString('en')} rows in ${((performance.now() - started) / 1000).toFixed(1)} s.`)}
208
+ ref={(g: PivotGrid<Order>) => g.motif.setDisposable(stop)}
209
+ />
210
+ <p class="pg-parts-asked" aria-live="polite">
211
+ {() => `Asked for ${s.members} parts of members and ${s.cells} of values, ${s.whole} whole pivots; the last took the server ${s.last} ms.`}
212
+ </p>
213
+ <p class="pg-parts-exported">{() => s.exported}</p>
214
+ </>
215
+ );
216
+ }
217
+ ```
218
+
219
+ `orders.ts`
220
+
221
+ ```tsx
222
+ import { data } from '@motifx-community/data';
223
+
224
+ export type Order = { id: number; region: string; customer: string; date: string; amount: number };
225
+
226
+ /** A request the pivot sent: its kind (`whole` for a whole pivot) and how long the server took. */
227
+ export interface Asked {
228
+ kind: 'whole' | 'members' | 'counts' | 'cells';
229
+ ms: number;
230
+ }
231
+
232
+ /** A request waiting for the server. */
233
+ interface Job {
234
+ id: number;
235
+ body: string;
236
+ done: (response: Response) => void;
237
+ failed: (reason: unknown) => void;
238
+ }
239
+
240
+ /**
241
+ * A data source over the orders of a server in a worker: a REST adapter whose endpoint computes pivots and their parts,
242
+ * its requests carried to the worker in place of the network. The server answers one request at a time; a request let
243
+ * go of (its `signal`) fails at once, and is not sent if its turn has not come. `asked` hears each one answered.
244
+ */
245
+ export function ordersSource(asked: (e: Asked) => void): { source: data.DataSource<Order, number>; stop: () => void } {
246
+ const worker = new Worker(new URL('./orders-worker.ts', import.meta.url), { type: 'module' });
247
+ const queue: Job[] = [];
248
+ let busy: Job | null = null;
249
+ let next = 0;
250
+ const send = () => {
251
+ if (busy || !queue.length) return;
252
+ busy = queue.shift()!;
253
+ worker.postMessage({ id: busy.id, body: busy.body });
254
+ };
255
+ worker.onmessage = (e: MessageEvent<{ id: number; body: string; ms: number }>) => {
256
+ const job = busy!;
257
+ busy = null;
258
+ asked({ kind: (JSON.parse(job.body) as { kind?: Asked['kind'] }).kind ?? 'whole', ms: e.data.ms });
259
+ job.done(new Response(e.data.body, { status: 200, headers: { 'content-type': 'application/json' } }));
260
+ send();
261
+ };
262
+ const fetch = (_: string, init: RequestInit) =>
263
+ new Promise<Response>((done, failed) => {
264
+ const signal = init.signal;
265
+ if (signal?.aborted) return failed(signal.reason);
266
+ const job: Job = { id: ++next, body: String(init.body), done, failed };
267
+ signal?.addEventListener(
268
+ 'abort',
269
+ () => {
270
+ const at = queue.indexOf(job);
271
+ if (at >= 0) queue.splice(at, 1);
272
+ failed(signal.reason);
273
+ },
274
+ { once: true },
275
+ );
276
+ queue.push(job);
277
+ send();
278
+ });
279
+ const adapter = new data.RestAdapter<Order, number>({ url: '/orders', key: 'id', fields: { date: 'date' }, pivot: { url: '/orders/pivot' }, fetch });
280
+ return { source: new data.DataSource<Order, number>({ adapter }), stop: () => worker.terminate() };
281
+ }
282
+ ```
283
+
284
+ `orders-worker.ts`
285
+
286
+ ```tsx
287
+ import { data } from '@motifx-community/data';
288
+ import type { Order } from './orders';
289
+
290
+ /**
291
+ * A server in a worker: a million orders of 100,000 customers over two years, and the pivot endpoint the REST adapter
292
+ * asks, answering whole pivots and the parts a view reads (`kind`) with the data layer's own memory engine. As a
293
+ * database would, it finds the orders of regions or of customers by an index, and keeps the members it ordered for a
294
+ * while, so the next part of a long list is taken from them.
295
+ */
296
+ const REGIONS = ['Marmara', 'Aegean', 'Mediterranean', 'Central Anatolia', 'Black Sea', 'Eastern Anatolia', 'Southeastern Anatolia', 'Thrace'];
297
+ const ctx: data.EvaluateContext = { locale: 'en-US', fields: { date: 'date' } };
298
+
299
+ const NAMES = Array.from({ length: 100_000 }, (_, c) => `Customer ${String(c).padStart(6, '0')}`);
300
+ const DAYS = Array.from({ length: 731 }, (_, d) => {
301
+ const day = new Date(2024, 0, 1 + d);
302
+ return `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`;
303
+ });
304
+ const orders: Order[] = Array.from({ length: 1_000_000 }, (_, i) => {
305
+ const customer = (i * 7919) % 100_000;
306
+ return { id: i + 1, region: REGIONS[customer % REGIONS.length], customer: NAMES[customer], date: DAYS[(i * 13) % 731], amount: ((i * 104_729) % 90_000) / 100 };
307
+ });
308
+
309
+ /** The orders by the value of a field, for the fields an index is kept on. */
310
+ const INDEXED: readonly string[] = ['region', 'customer'];
311
+ const indexes = new Map<string, Map<unknown, Order[]>>();
312
+
313
+ function indexOf(field: string): Map<unknown, Order[]> | null {
314
+ if (!INDEXED.includes(field)) return null;
315
+ let index = indexes.get(field);
316
+ if (!index) {
317
+ index = new Map();
318
+ for (const order of orders) {
319
+ const key = order[field as keyof Order];
320
+ let list = index.get(key);
321
+ if (!list) index.set(key, (list = []));
322
+ list.push(order);
323
+ }
324
+ indexes.set(field, index);
325
+ }
326
+ return index;
327
+ }
328
+
329
+ /**
330
+ * The orders under the members of these paths, found by the index of the deepest level every path reaches; `null`
331
+ * where none can tell (a total, an interval, no index).
332
+ */
333
+ function under(levels: readonly data.PivotLevel<Order>[], paths: readonly (readonly unknown[])[]): Order[] | null {
334
+ if (!paths.length) return null;
335
+ const reached = Math.min(...paths.map((path) => path.length));
336
+ for (let k = Math.min(reached, levels.length) - 1; k >= 0; k--) {
337
+ const level = levels[k];
338
+ const index = level.interval === undefined && !level.value ? indexOf(String(level.field)) : null;
339
+ if (index) return [...new Set(paths.map((path) => path[k]))].flatMap((key) => index.get(key) ?? []);
340
+ }
341
+ return null;
342
+ }
343
+
344
+ /** Every member of a parent, ordered, by what was asked: the next part of the list is taken from them. */
345
+ const ordered = new Map<string, data.PivotSliceResult>();
346
+
347
+ function members(o: data.PivotMembersOptions<Order>): data.PivotMembersResult {
348
+ if (o.find?.length) return data.pivotMembers(under(o.levels, o.slices.map((s) => s.parent)) ?? orders, o, ctx);
349
+ const { slices, ...asked } = o;
350
+ return {
351
+ slices: slices.map((slice) => {
352
+ const id = JSON.stringify([asked, slice.parent]);
353
+ let all = ordered.get(id);
354
+ if (!all) {
355
+ all = data.pivotMembers(under(o.levels, [slice.parent]) ?? orders, { ...asked, slices: [{ parent: slice.parent }] }, ctx).slices[0];
356
+ ordered.set(id, all);
357
+ if (ordered.size > 64) ordered.delete(ordered.keys().next().value!);
358
+ }
359
+ const skip = slice.skip ?? 0;
360
+ return { parent: slice.parent, total: all.total, members: slice.take === undefined ? all.members.slice(skip) : all.members.slice(skip, skip + slice.take) };
361
+ }),
362
+ };
363
+ }
364
+
365
+ function answer(body: Record<string, unknown>): unknown {
366
+ switch (body.kind) {
367
+ case 'members':
368
+ return members(body as unknown as data.PivotMembersOptions<Order>);
369
+ case 'counts': {
370
+ const o = body as unknown as data.PivotCountsOptions<Order>;
371
+ const r = data.pivotCounts(under(o.levels, o.paths) ?? orders, o, ctx);
372
+ return { counts: o.paths.map((path) => ({ path, count: r.childCount(path) })) };
373
+ }
374
+ case 'cells': {
375
+ const o = body as unknown as data.PivotCellsOptions<Order>;
376
+ // The orders of one axis's members hold every crossing: those of the axis that has fewer are counted. A running
377
+ // total adds up the siblings too, in an order that may read their totals: the orders under the members' parents on
378
+ // its axis, and all of them across it.
379
+ const along = new Set(o.running?.map((r) => r.axis));
380
+ const parents = (paths: readonly (readonly unknown[])[]) => paths.map((p) => p.slice(0, -1));
381
+ const byRows = along.has('columns') ? null : under(o.rows, along.has('rows') ? parents(o.rowPaths) : o.rowPaths);
382
+ const byColumns = along.has('rows') ? null : under(o.columns, along.has('columns') ? parents(o.columnPaths) : o.columnPaths);
383
+ const rows = byRows && byColumns ? (byRows.length <= byColumns.length ? byRows : byColumns) : (byRows ?? byColumns ?? orders);
384
+ // As a server answers: the crossings some order falls in, with the running totals asked for.
385
+ return data.pivotCellGroups(rows, o, ctx);
386
+ }
387
+ default:
388
+ return data.pivotGroups(orders, body as data.PivotLoadOptions, ctx);
389
+ }
390
+ }
391
+
392
+ self.onmessage = (e: MessageEvent<{ id: number; body: string }>) => {
393
+ const started = performance.now();
394
+ const body = JSON.stringify(answer(JSON.parse(e.data.body) as Record<string, unknown>));
395
+ self.postMessage({ id: e.data.id, body, ms: performance.now() - started });
396
+ };
397
+ ```