@motifx-community/ui 0.1.0-beta.13 → 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 (459) hide show
  1. package/CHANGELOG.md +379 -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 +1 -1
  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/form/MxForm.d.ts +1 -1
  82. package/dist/components/markdown/Markdown.d.ts +87 -0
  83. package/dist/components/markdown/code-block.d.ts +57 -0
  84. package/dist/components/markdown/code-colorer.d.ts +11 -0
  85. package/dist/components/markdown/code-highlighter.d.ts +9 -0
  86. package/dist/components/markdown/code-run.d.ts +6 -0
  87. package/dist/components/markdown/diagram-renderer.d.ts +21 -0
  88. package/dist/components/markdown/entities.d.ts +2 -0
  89. package/dist/components/markdown/index.d.ts +8 -0
  90. package/dist/components/markdown/inline-writer.d.ts +85 -0
  91. package/dist/components/markdown/markdown-context.d.ts +53 -0
  92. package/dist/components/markdown/markdown-link-click-event-args.d.ts +9 -0
  93. package/dist/components/markdown/markdown-props.d.ts +40 -0
  94. package/dist/components/markdown/markdown-writer.d.ts +95 -0
  95. package/dist/components/markdown/math-block.d.ts +22 -0
  96. package/dist/components/markdown/math-renderer.d.ts +18 -0
  97. package/dist/components/markdown/safe-href.d.ts +5 -0
  98. package/dist/components/markdown/text-run.d.ts +7 -0
  99. package/dist/components/menubar/MenuBar.d.ts +4 -0
  100. package/dist/components/menubar/menu-bar-props.d.ts +6 -0
  101. package/dist/components/pivotgrid/PivotGrid.d.ts +415 -0
  102. package/dist/components/pivotgrid/index.d.ts +44 -0
  103. package/dist/components/pivotgrid/model/PivotArrangement.d.ts +29 -0
  104. package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +169 -0
  105. package/dist/components/pivotgrid/model/PivotCellRanges.d.ts +63 -0
  106. package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +47 -0
  107. package/dist/components/pivotgrid/model/PivotChart.d.ts +49 -0
  108. package/dist/components/pivotgrid/model/PivotDisplay.d.ts +61 -0
  109. package/dist/components/pivotgrid/model/PivotDrill.d.ts +19 -0
  110. package/dist/components/pivotgrid/model/PivotExpansion.d.ts +44 -0
  111. package/dist/components/pivotgrid/model/PivotFields.d.ts +55 -0
  112. package/dist/components/pivotgrid/model/PivotFilterValues.d.ts +36 -0
  113. package/dist/components/pivotgrid/model/PivotLayout.d.ts +75 -0
  114. package/dist/components/pivotgrid/model/PivotLoader.d.ts +29 -0
  115. package/dist/components/pivotgrid/model/PivotSheet.d.ts +44 -0
  116. package/dist/components/pivotgrid/model/PivotStateStore.d.ts +19 -0
  117. package/dist/components/pivotgrid/model/PivotTable.d.ts +78 -0
  118. package/dist/components/pivotgrid/model/PivotTexts.d.ts +47 -0
  119. package/dist/components/pivotgrid/model/PivotWindows.d.ts +120 -0
  120. package/dist/components/pivotgrid/model/pivot-copy.d.ts +26 -0
  121. package/dist/components/pivotgrid/model/pivot-csv.d.ts +9 -0
  122. package/dist/components/pivotgrid/model/pivot-header-cell.d.ts +19 -0
  123. package/dist/components/pivotgrid/model/pivot-line-key.d.ts +17 -0
  124. package/dist/components/pivotgrid/model/pivot-line.d.ts +14 -0
  125. package/dist/components/pivotgrid/pivot-grid-area.d.ts +2 -0
  126. package/dist/components/pivotgrid/pivot-grid-cell-click-event-args.d.ts +5 -0
  127. package/dist/components/pivotgrid/pivot-grid-cell-context.d.ts +19 -0
  128. package/dist/components/pivotgrid/pivot-grid-cell-dbl-click-event-args.d.ts +5 -0
  129. package/dist/components/pivotgrid/pivot-grid-cell-range.d.ts +16 -0
  130. package/dist/components/pivotgrid/pivot-grid-cell-selection-changed-event-args.d.ts +6 -0
  131. package/dist/components/pivotgrid/pivot-grid-chart-data.d.ts +15 -0
  132. package/dist/components/pivotgrid/pivot-grid-chart-options.d.ts +19 -0
  133. package/dist/components/pivotgrid/pivot-grid-column-resized-event-args.d.ts +8 -0
  134. package/dist/components/pivotgrid/pivot-grid-column-resizing.d.ts +15 -0
  135. package/dist/components/pivotgrid/pivot-grid-column.d.ts +19 -0
  136. package/dist/components/pivotgrid/pivot-grid-content-ready-event-args.d.ts +6 -0
  137. package/dist/components/pivotgrid/pivot-grid-context-menu-preparing-event-args.d.ts +22 -0
  138. package/dist/components/pivotgrid/pivot-grid-copying-event-args.d.ts +10 -0
  139. package/dist/components/pivotgrid/pivot-grid-custom-summary-info.d.ts +15 -0
  140. package/dist/components/pivotgrid/pivot-grid-data-error-event-args.d.ts +5 -0
  141. package/dist/components/pivotgrid/pivot-grid-drill-down.d.ts +14 -0
  142. package/dist/components/pivotgrid/pivot-grid-expanded-event-args.d.ts +6 -0
  143. package/dist/components/pivotgrid/pivot-grid-expanding-event-args.d.ts +9 -0
  144. package/dist/components/pivotgrid/pivot-grid-export-cell.d.ts +21 -0
  145. package/dist/components/pivotgrid/pivot-grid-export-options.d.ts +16 -0
  146. package/dist/components/pivotgrid/pivot-grid-export.d.ts +17 -0
  147. package/dist/components/pivotgrid/pivot-grid-exported-event-args.d.ts +9 -0
  148. package/dist/components/pivotgrid/pivot-grid-exporting-event-args.d.ts +17 -0
  149. package/dist/components/pivotgrid/pivot-grid-field-chooser.d.ts +20 -0
  150. package/dist/components/pivotgrid/pivot-grid-field-panel.d.ts +16 -0
  151. package/dist/components/pivotgrid/pivot-grid-field.d.ts +110 -0
  152. package/dist/components/pivotgrid/pivot-grid-fields-changed-event-args.d.ts +8 -0
  153. package/dist/components/pivotgrid/pivot-grid-filter-value.d.ts +4 -0
  154. package/dist/components/pivotgrid/pivot-grid-group-interval.d.ts +7 -0
  155. package/dist/components/pivotgrid/pivot-grid-header-filter-items-request.d.ts +9 -0
  156. package/dist/components/pivotgrid/pivot-grid-header-filter-items.d.ts +7 -0
  157. package/dist/components/pivotgrid/pivot-grid-load-panel.d.ts +11 -0
  158. package/dist/components/pivotgrid/pivot-grid-props.d.ts +121 -0
  159. package/dist/components/pivotgrid/pivot-grid-sheet-options.d.ts +14 -0
  160. package/dist/components/pivotgrid/pivot-grid-sheet.d.ts +19 -0
  161. package/dist/components/pivotgrid/pivot-grid-state.d.ts +54 -0
  162. package/dist/components/pivotgrid/pivot-grid-summary-cell.d.ts +29 -0
  163. package/dist/components/pivotgrid/pivot-grid-summary-display-mode.d.ts +5 -0
  164. package/dist/components/pivotgrid/pivot-grid-summary-type.d.ts +5 -0
  165. package/dist/components/pivotgrid/view/PivotFieldChooser.d.ts +71 -0
  166. package/dist/components/pivotgrid/view/PivotFieldPanel.d.ts +92 -0
  167. package/dist/components/pivotgrid/view/PivotView.d.ts +263 -0
  168. package/dist/components/resizable/Resizable.d.ts +2 -0
  169. package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +4 -0
  170. package/dist/components/ribbonmenu/RibbonMenu.d.ts +4 -1
  171. package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +8 -4
  172. package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +6 -0
  173. package/dist/components/scheduler/view/TimeView.d.ts +2 -0
  174. package/dist/components/scrollview/ScrollView.d.ts +48 -1
  175. package/dist/components/scrollview/index.d.ts +1 -0
  176. package/dist/components/scrollview/scroll-end-changed-event-args.d.ts +7 -0
  177. package/dist/components/scrollview/scroll-view-props.d.ts +9 -0
  178. package/dist/components/splitter/Splitter.d.ts +1 -3
  179. package/dist/components/tabdocs/TabDocumentManager.d.ts +3 -2
  180. package/dist/components/textarea/TextArea.d.ts +11 -0
  181. package/dist/components/textarea/text-area-props.d.ts +12 -1
  182. package/dist/components/textbox/TextBox.d.ts +3 -0
  183. package/dist/components/textbox/text-box-props.d.ts +3 -0
  184. package/dist/components/toolbar/Toolbar.d.ts +70 -1
  185. package/dist/components/toolbar/index.d.ts +5 -0
  186. package/dist/components/toolbar/toolbar-added-item.d.ts +9 -0
  187. package/dist/components/toolbar/toolbar-custom-menu-opening-event-args.d.ts +23 -0
  188. package/dist/components/toolbar/toolbar-customization.d.ts +18 -0
  189. package/dist/components/toolbar/toolbar-customized-event-args.d.ts +7 -0
  190. package/dist/components/toolbar/toolbar-item-display.d.ts +2 -0
  191. package/dist/components/toolbar/toolbar-item.d.ts +11 -1
  192. package/dist/components/toolbar/toolbar-props.d.ts +26 -0
  193. package/dist/components/toolbar/toolbar-targets.d.ts +22 -0
  194. package/dist/core/clipboard.d.ts +11 -0
  195. package/dist/core/enter-key-hint.d.ts +2 -0
  196. package/dist/core/look-watch.d.ts +2 -2
  197. package/dist/core/measure/look.d.ts +1 -1
  198. package/dist/core/measure/on-layout.d.ts +1 -1
  199. package/dist/core/measure/scroll.d.ts +3 -1
  200. package/dist/core/save-text.d.ts +2 -0
  201. package/dist/core/ui-strings.d.ts +190 -0
  202. package/dist/excel/excel-pivot-customize-cell-args.d.ts +8 -0
  203. package/dist/excel/excel-pivot-export-options.d.ts +44 -0
  204. package/dist/excel/excel-pivot-export-result.d.ts +6 -0
  205. package/dist/excel/export-pivot-grid.d.ts +35 -0
  206. package/dist/excel/index.d.ts +4 -0
  207. package/dist/excel/index.js +190 -56
  208. package/dist/excel/index.js.map +1 -1
  209. package/dist/excel/write-sheet.d.ts +16 -0
  210. package/dist/{formula-guard-NYlpoA-t.js → formula-guard-Bx48S0u3.js} +2 -2
  211. package/dist/formula-guard-Bx48S0u3.js.map +1 -0
  212. package/dist/generated/tokens.d.ts +7527 -4097
  213. package/dist/index.d.ts +6 -0
  214. package/dist/index.js +65982 -49896
  215. package/dist/index.js.map +1 -1
  216. package/dist/locales/en.json +179 -1
  217. package/dist/locales/tr.json +179 -1
  218. package/dist/parts/customizer/Customizer.d.ts +12 -6
  219. package/dist/parts/customizer/customizer-display.d.ts +2 -0
  220. package/dist/parts/customizer/customizer-node.d.ts +5 -0
  221. package/dist/parts/customizer/customizer-source.d.ts +15 -3
  222. package/dist/parts/item-layout/layout-added-item.d.ts +2 -2
  223. package/dist/parts/menu/MenuList.d.ts +5 -0
  224. package/dist/parts/popup/Popup.d.ts +2 -0
  225. package/dist/{components/datagrid/model → parts/table}/CellFormatter.d.ts +8 -8
  226. package/dist/{components/datagrid/view → parts/table}/HeaderFilter.d.ts +16 -11
  227. package/dist/parts/table/OffsetList.d.ts +21 -0
  228. package/dist/parts/table/ScaledOffsets.d.ts +32 -0
  229. package/dist/{components/datagrid/model → parts/table}/ValueIntervals.d.ts +12 -5
  230. package/dist/{components/datagrid/model → parts/table}/ValueListAdapter.d.ts +4 -4
  231. package/dist/parts/table/date-interval.d.ts +2 -0
  232. package/dist/parts/table/date-type.d.ts +3 -0
  233. package/dist/{components/datagrid/model → parts/table}/filter-tree-node.d.ts +3 -1
  234. package/dist/parts/table/filter-value.d.ts +9 -0
  235. package/dist/parts/table/format-column.d.ts +14 -0
  236. package/dist/parts/table/header-filter-host.d.ts +27 -0
  237. package/dist/parts/table/option-of.d.ts +6 -0
  238. package/dist/parts/table/slice-sheet.d.ts +8 -0
  239. package/dist/parts/table/table-sheet-cell.d.ts +13 -0
  240. package/dist/parts/table/table-sheet-column.d.ts +11 -0
  241. package/dist/parts/table/table-sheet-merge.d.ts +9 -0
  242. package/dist/parts/table/table-sheet-row.d.ts +8 -0
  243. package/dist/parts/table/table-sheet.d.ts +24 -0
  244. package/dist/parts/table/value-interval.d.ts +6 -0
  245. package/dist/{components/datagrid/model → parts/table}/value-list.d.ts +7 -2
  246. package/dist/parts/table/value-loader.d.ts +8 -0
  247. package/dist/parts/table/value-option.d.ts +5 -0
  248. package/dist/parts/table/value-type.d.ts +5 -0
  249. package/dist/parts/table/values-result.d.ts +6 -0
  250. package/dist/parts/window/follow-pointer.d.ts +9 -3
  251. package/dist/parts/window-list/WindowList.d.ts +105 -0
  252. package/dist/parts/window-list/window-list-source.d.ts +10 -0
  253. package/dist/pdf/export-pivot-grid.d.ts +21 -0
  254. package/dist/pdf/index.d.ts +3 -0
  255. package/dist/pdf/index.js +143 -16
  256. package/dist/pdf/index.js.map +1 -1
  257. package/dist/pdf/pdf-customize-cell-args.d.ts +1 -1
  258. package/dist/pdf/pdf-pivot-cell-args.d.ts +25 -0
  259. package/dist/pdf/pdf-pivot-export-options.d.ts +61 -0
  260. package/dist/pdf/pdf-table.d.ts +38 -6
  261. package/dist/slice-sheet-C116M42H.js +43 -0
  262. package/dist/slice-sheet-C116M42H.js.map +1 -0
  263. package/dist/styles.css +4484 -177
  264. package/dist/tokens/index.d.ts +7527 -4097
  265. package/dist/tokens/index.js +7527 -4097
  266. package/dist/tokens/index.js.map +1 -1
  267. package/dist/{tr-BvKE8jSF.js → tr-BGbF9uCs.js} +359 -3
  268. package/dist/tr-BGbF9uCs.js.map +1 -0
  269. package/docs/accordion.md +1 -1
  270. package/docs/actionsheet.md +1 -1
  271. package/docs/appbar.md +1 -1
  272. package/docs/appmenu-api.md +1 -1
  273. package/docs/appmenu-programmatic.md +1 -1
  274. package/docs/appmenu-search.md +1 -1
  275. package/docs/appmenu.md +1 -1
  276. package/docs/avatar.md +1 -1
  277. package/docs/badge.md +1 -1
  278. package/docs/bar-gauge-angles.md +1 -1
  279. package/docs/bar-gauge-data.md +1 -1
  280. package/docs/bar-gauge-labels.md +1 -1
  281. package/docs/bar-gauge.md +1 -1
  282. package/docs/barcode.md +1 -1
  283. package/docs/bottomnavigation.md +1 -1
  284. package/docs/bottomsheet.md +1 -1
  285. package/docs/breadcrumb.md +1 -1
  286. package/docs/button.md +1 -1
  287. package/docs/buttongroup.md +1 -1
  288. package/docs/buttons.md +1 -1
  289. package/docs/calendar.md +1 -1
  290. package/docs/card.md +1 -1
  291. package/docs/chart-bars.md +1 -1
  292. package/docs/chart-candles.md +1 -1
  293. package/docs/chart-funnel.md +1 -1
  294. package/docs/chart-heatmap.md +1 -1
  295. package/docs/chart-lines.md +1 -1
  296. package/docs/chart-live.md +1 -1
  297. package/docs/chart-pie.md +1 -1
  298. package/docs/chart-radar.md +1 -1
  299. package/docs/chart-ranges.md +1 -1
  300. package/docs/chart-references.md +1 -1
  301. package/docs/chart-scatter.md +1 -1
  302. package/docs/chart-waterfall.md +1 -1
  303. package/docs/chart-zoom.md +1 -1
  304. package/docs/chart.md +1 -1
  305. package/docs/chat.md +1512 -0
  306. package/docs/checkbox.md +1 -1
  307. package/docs/chip.md +2 -2
  308. package/docs/choice.md +1 -1
  309. package/docs/colorbox.md +1 -1
  310. package/docs/combobox.md +1 -1
  311. package/docs/commands.md +1 -1
  312. package/docs/control.md +1 -1
  313. package/docs/data.md +1 -1
  314. package/docs/datagrid-api.md +3 -3
  315. package/docs/datagrid-bands.md +1 -1
  316. package/docs/datagrid-drag-select.md +1 -1
  317. package/docs/datagrid-drag.md +1 -1
  318. package/docs/datagrid-editing.md +1 -1
  319. package/docs/datagrid-filtering.md +2 -2
  320. package/docs/datagrid-forms.md +1 -1
  321. package/docs/datagrid-grouping.md +7 -7
  322. package/docs/datagrid-layout.md +2 -2
  323. package/docs/datagrid-lookups.md +1 -1
  324. package/docs/datagrid-master-detail.md +1 -1
  325. package/docs/datagrid-scrolling.md +1 -1
  326. package/docs/datagrid-selection.md +1 -1
  327. package/docs/datagrid.md +1 -1
  328. package/docs/datebox.md +1 -1
  329. package/docs/daterangebox.md +1 -1
  330. package/docs/display.md +1 -1
  331. package/docs/draggable.md +2 -2
  332. package/docs/drawer.md +1 -1
  333. package/docs/dropdown.md +1 -1
  334. package/docs/editors.md +1 -1
  335. package/docs/feedback.md +1 -1
  336. package/docs/fileuploader.md +1 -1
  337. package/docs/filterbuilder.md +1 -1
  338. package/docs/formlayout.md +1 -1
  339. package/docs/foundations.md +1 -1
  340. package/docs/gallery.md +1 -1
  341. package/docs/gauge-base.md +1 -1
  342. package/docs/gauge-circular.md +1 -1
  343. package/docs/gauge-dashboards.md +1 -1
  344. package/docs/gauge-linear.md +1 -1
  345. package/docs/gauge-markers.md +1 -1
  346. package/docs/gauge-marks.md +1 -1
  347. package/docs/gauge-ranges.md +1 -1
  348. package/docs/gauge-scales.md +1 -1
  349. package/docs/gauge.md +1 -1
  350. package/docs/home.md +1 -1
  351. package/docs/keyboard.md +1 -1
  352. package/docs/language.md +1 -1
  353. package/docs/layout.md +1 -1
  354. package/docs/listbox.md +1 -1
  355. package/docs/loadpanel.md +1 -1
  356. package/docs/lookup.md +1 -1
  357. package/docs/markdown.md +343 -0
  358. package/docs/menus-api.md +3 -1
  359. package/docs/menus-context.md +2 -1
  360. package/docs/menus-customization.md +5 -1
  361. package/docs/menus-merging.md +1 -1
  362. package/docs/menus-programmatic.md +1 -1
  363. package/docs/menus.md +1 -1
  364. package/docs/multiview.md +1 -1
  365. package/docs/navigation.md +1 -1
  366. package/docs/numberbox.md +1 -1
  367. package/docs/otpinput.md +1 -1
  368. package/docs/pagination.md +1 -1
  369. package/docs/pivotgrid-api.md +180 -0
  370. package/docs/pivotgrid-chart.md +132 -0
  371. package/docs/pivotgrid-drilldown.md +142 -0
  372. package/docs/pivotgrid-export.md +207 -0
  373. package/docs/pivotgrid-fields.md +245 -0
  374. package/docs/pivotgrid-keyboard.md +223 -0
  375. package/docs/pivotgrid-layout.md +663 -0
  376. package/docs/pivotgrid-panel.md +223 -0
  377. package/docs/pivotgrid-remote.md +397 -0
  378. package/docs/pivotgrid-sorting.md +379 -0
  379. package/docs/pivotgrid-state.md +245 -0
  380. package/docs/pivotgrid-summaries.md +330 -0
  381. package/docs/pivotgrid.md +295 -0
  382. package/docs/popover.md +1 -1
  383. package/docs/progress.md +1 -1
  384. package/docs/qrcode.md +1 -1
  385. package/docs/radiogroup.md +1 -1
  386. package/docs/rating.md +1 -1
  387. package/docs/resizable.md +1 -1
  388. package/docs/ribbonmenu-api.md +2 -1
  389. package/docs/ribbonmenu-commands.md +1 -1
  390. package/docs/ribbonmenu-customization.md +3 -2
  391. package/docs/ribbonmenu-display.md +1 -1
  392. package/docs/ribbonmenu-layouts.md +1 -1
  393. package/docs/ribbonmenu-programmatic.md +1 -1
  394. package/docs/ribbonmenu.md +3 -1
  395. package/docs/scheduler-agenda.md +1 -1
  396. package/docs/scheduler-big-data.md +1 -1
  397. package/docs/scheduler-editing.md +1 -1
  398. package/docs/scheduler-form.md +1 -1
  399. package/docs/scheduler-icalendar.md +1 -1
  400. package/docs/scheduler-mobile.md +1 -1
  401. package/docs/scheduler-recurrence.md +1 -1
  402. package/docs/scheduler-resources.md +1 -1
  403. package/docs/scheduler-timeline.md +1 -1
  404. package/docs/scheduler.md +1 -1
  405. package/docs/scrollview.md +1 -1
  406. package/docs/shortcuteditor.md +1 -1
  407. package/docs/showcase-home.md +1 -1
  408. package/docs/showcase-mail.md +39 -0
  409. package/docs/showcase.md +1 -1
  410. package/docs/signature.md +1 -1
  411. package/docs/skeleton.md +1 -1
  412. package/docs/slider.md +1 -1
  413. package/docs/sortable.md +3 -6
  414. package/docs/sparkline.md +1 -1
  415. package/docs/speeddial.md +1 -1
  416. package/docs/splitter.md +1 -1
  417. package/docs/stepper.md +1 -1
  418. package/docs/switch.md +1 -1
  419. package/docs/tabdocs-dock.md +1 -1
  420. package/docs/tabdocs-drag.md +1 -1
  421. package/docs/tabdocs-menus.md +1 -1
  422. package/docs/tabdocs-mobile.md +1 -1
  423. package/docs/tabdocs-tabs.md +1 -1
  424. package/docs/tabdocs-windows.md +1 -1
  425. package/docs/tabdocs-workspace.md +1 -1
  426. package/docs/tabdocs.md +1 -1
  427. package/docs/tabs.md +1 -1
  428. package/docs/tagbox.md +1 -1
  429. package/docs/textarea.md +4 -1
  430. package/docs/textbox.md +2 -1
  431. package/docs/tileview.md +1 -1
  432. package/docs/timeline.md +1 -1
  433. package/docs/toast.md +1 -1
  434. package/docs/tokens.md +687 -1
  435. package/docs/toolbar-api.md +80 -0
  436. package/docs/toolbar-customization.md +261 -0
  437. package/docs/toolbar.md +4 -52
  438. package/docs/tooltip.md +1 -1
  439. package/docs/treeview.md +1 -1
  440. package/docs/validationsummary.md +1 -1
  441. package/docs/window.md +1 -1
  442. package/docs/wizard.md +1 -1
  443. package/llms-full.txt +18989 -12344
  444. package/llms.txt +29 -2
  445. package/package.json +2 -2
  446. package/dist/components/datagrid/model/date-type.d.ts +0 -3
  447. package/dist/components/datagrid/model/option-of.d.ts +0 -6
  448. package/dist/components/datagrid/model/value-loader.d.ts +0 -8
  449. package/dist/formula-guard-NYlpoA-t.js.map +0 -1
  450. package/dist/tr-BvKE8jSF.js.map +0 -1
  451. /package/dist/{components/datagrid/model → core}/text-ranges.d.ts +0 -0
  452. /package/dist/{components/datagrid/model → parts/table}/ExtraHeights.d.ts +0 -0
  453. /package/dist/{components/datagrid/model → parts/table}/ScrollGeometry.d.ts +0 -0
  454. /package/dist/{components/datagrid/model → parts/table}/cell-list.d.ts +0 -0
  455. /package/dist/{components/datagrid/model → parts/table}/date-like.d.ts +0 -0
  456. /package/dist/{components/datagrid/view → parts/table}/editor-value.d.ts +0 -0
  457. /package/dist/{components/datagrid/model → parts/table}/formula-guard.d.ts +0 -0
  458. /package/dist/{components/datagrid/model → parts/table}/parse-date-text.d.ts +0 -0
  459. /package/dist/{components/datagrid/model → parts/table}/same-value.d.ts +0 -0
@@ -0,0 +1,330 @@
1
+ # PivotGrid: Summaries and display
2
+
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.14
4
+
5
+ A data field sums up the rows of each cell. It shows that value as it is, or as a share of a total or of its parent, a change from the member before, a running total, or a calculation of your own.
6
+
7
+ ## Summaries
8
+
9
+ A data field's `summaryType` sums up the rows of each cell and total: `count` (the default), `countDistinct` (the different values that are not empty), `sum`, `avg`, `min` and `max`. `custom` calls `calculateCustomSummary` once with `summaryProcess: 'start'`, once per row with `'calculate'`, and once with `'finalize'`: it keeps its running value in `totalValue`, which becomes the cell's value. A custom summary is computed in memory, so a server's rows are loaded for it.
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
+ A count shows as a plain number. `format` takes `Intl` options for numbers and dates, or a function of the value.
45
+
46
+ ## Shares
47
+
48
+ `summaryDisplayMode` shows a value as a share: of its row's total (`percentOfRowTotal`), of its column's (`percentOfColumnTotal`), of the grand total (`percentOfGrandTotal`), or of its parent member's value on the rows (`percentOfRowParent`) or the columns (`percentOfColumnParent`); a top member's parent is the grand total. A share shows as a percentage unless the field has a `format` of its own. Two data fields of one `field` show the value beside its share; the second needs a `name`.
49
+
50
+ ```tsx
51
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
52
+
53
+ const PLACES: [string, string][] = [
54
+ ['Marmara', 'İstanbul'],
55
+ ['Marmara', 'Bursa'],
56
+ ['Central Anatolia', 'Ankara'],
57
+ ['Central Anatolia', 'Konya'],
58
+ ['Aegean', 'İzmir'],
59
+ ['Aegean', 'Muğla'],
60
+ ['Black Sea', 'Trabzon'],
61
+ ['Mediterranean', 'Antalya'],
62
+ ];
63
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
64
+
65
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
66
+ export function makeSales(count: number): Sale[] {
67
+ return Array.from({ length: count }, (_, i) => {
68
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
69
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
70
+ return {
71
+ id: i + 1,
72
+ region,
73
+ city,
74
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
75
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
76
+ amount: ((i * 7919) % 50000) / 100,
77
+ units: 1 + ((i * 31) % 12),
78
+ };
79
+ });
80
+ }
81
+ ```
82
+
83
+ ## Changes and running totals
84
+
85
+ `absoluteVariation` shows how far a value moved from the member before it among its siblings, `percentVariation` by how much of that value; `displayAlong` looks back along the columns (the default) or the rows. The first member has none before it, and its cell stays empty. `runningTotal` adds up the values along the columns or the rows, among the members of one parent, so each year starts again; the display mode then works on the sums: with `percentOfRowParent`, a month shows the share of its year so far.
86
+
87
+ ```tsx
88
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
89
+
90
+ const PLACES: [string, string][] = [
91
+ ['Marmara', 'İstanbul'],
92
+ ['Marmara', 'Bursa'],
93
+ ['Central Anatolia', 'Ankara'],
94
+ ['Central Anatolia', 'Konya'],
95
+ ['Aegean', 'İzmir'],
96
+ ['Aegean', 'Muğla'],
97
+ ['Black Sea', 'Trabzon'],
98
+ ['Mediterranean', 'Antalya'],
99
+ ];
100
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
101
+
102
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
103
+ export function makeSales(count: number): Sale[] {
104
+ return Array.from({ length: count }, (_, i) => {
105
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
106
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
107
+ return {
108
+ id: i + 1,
109
+ region,
110
+ city,
111
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
112
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
113
+ amount: ((i * 7919) % 50000) / 100,
114
+ units: 1 + ((i * 31) % 12),
115
+ };
116
+ });
117
+ }
118
+ ```
119
+
120
+ ## A calculation of your own
121
+
122
+ `calculateSummaryValue` works out what a cell shows from the cell and the cells around it (`PivotGridSummaryCell`): `value()` of its data field or of another, `parent(axis)`, `previous(axis)` and `next(axis)` among its siblings, `total(axis)` and `grandTotal()`. A value is what a field shows before its display calculation. It returns what the cell shows, formatted by the field's `format` when it is a number or a date; `null` leaves the cell empty.
123
+
124
+ ```tsx
125
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
126
+
127
+ const PLACES: [string, string][] = [
128
+ ['Marmara', 'İstanbul'],
129
+ ['Marmara', 'Bursa'],
130
+ ['Central Anatolia', 'Ankara'],
131
+ ['Central Anatolia', 'Konya'],
132
+ ['Aegean', 'İzmir'],
133
+ ['Aegean', 'Muğla'],
134
+ ['Black Sea', 'Trabzon'],
135
+ ['Mediterranean', 'Antalya'],
136
+ ];
137
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
138
+
139
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
140
+ export function makeSales(count: number): Sale[] {
141
+ return Array.from({ length: count }, (_, i) => {
142
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
143
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
144
+ return {
145
+ id: i + 1,
146
+ region,
147
+ city,
148
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
149
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
150
+ amount: ((i * 7919) % 50000) / 100,
151
+ units: 1 + ((i * 31) % 12),
152
+ };
153
+ });
154
+ }
155
+ ```
156
+
157
+ ## On a server and in parts
158
+
159
+ Display calculations run in the browser over the values read, whatever computed them. A cell, its text, what Ctrl+C copies and the value `onCellClick` gives are what it shows; the order of members by a data field's total stays by the summaries. Read in parts, the values a cell needs are read with those in view (the totals, the parent, the member before), and a running total comes from the data layer with the values (`running` of `loadPivotCells`); the cell reads as loading until they come.
160
+
161
+ ## Feedback
162
+
163
+ Loading issues…
164
+
165
+ ## Example files
166
+
167
+ `Summaries.tsx`
168
+
169
+ ```tsx
170
+ import { PivotGrid, type PivotGridCustomSummaryInfo, type PivotGridField } from '@motifx-community/ui';
171
+ import { makeSales, type Sale } from './sales';
172
+
173
+ const sales = makeSales(20000);
174
+
175
+ // The amount per unit over a cell's rows: both sums first, divided at the end.
176
+ function perUnit(info: PivotGridCustomSummaryInfo<Sale>) {
177
+ const sums = info.totalValue as { amount: number; units: number };
178
+ if (info.summaryProcess === 'start') info.totalValue = { amount: 0, units: 0 };
179
+ else if (info.summaryProcess === 'calculate') {
180
+ sums.amount += info.row!.amount;
181
+ sums.units += info.row!.units;
182
+ } else info.totalValue = sums.units ? sums.amount / sums.units : null;
183
+ }
184
+
185
+ const fields: PivotGridField<Sale>[] = [
186
+ { field: 'product', title: 'Product', area: 'row' },
187
+ { field: 'id', title: 'Sales', area: 'data', summaryType: 'count' },
188
+ { field: 'city', title: 'Cities', area: 'data', summaryType: 'countDistinct' },
189
+ { field: 'amount', title: 'Total', type: 'number', area: 'data', summaryType: 'sum', format: { style: 'currency', currency: 'TRY', currencyDisplay: 'narrowSymbol', maximumFractionDigits: 0 } },
190
+ { field: 'amount', title: 'Average', type: 'number', area: 'data', summaryType: 'avg', format: { maximumFractionDigits: 2 } },
191
+ { field: 'amount', title: 'Smallest', type: 'number', area: 'data', summaryType: 'min' },
192
+ { field: 'amount', title: 'Largest', type: 'number', area: 'data', summaryType: 'max' },
193
+ { title: 'Per unit', area: 'data', summaryType: 'custom', calculateCustomSummary: perUnit, format: { maximumFractionDigits: 2 } },
194
+ ];
195
+
196
+ /** Every built-in summary of a data field, and one of its own. */
197
+ export default function Summaries() {
198
+ return <PivotGrid class="pg-summaries" style="block-size: 18rem" data={sales} fields={fields} label="Summaries of the sales by product" />;
199
+ }
200
+ ```
201
+
202
+ `sales.ts`
203
+
204
+ ```tsx
205
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
206
+
207
+ const PLACES: [string, string][] = [
208
+ ['Marmara', 'İstanbul'],
209
+ ['Marmara', 'Bursa'],
210
+ ['Central Anatolia', 'Ankara'],
211
+ ['Central Anatolia', 'Konya'],
212
+ ['Aegean', 'İzmir'],
213
+ ['Aegean', 'Muğla'],
214
+ ['Black Sea', 'Trabzon'],
215
+ ['Mediterranean', 'Antalya'],
216
+ ];
217
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
218
+
219
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
220
+ export function makeSales(count: number): Sale[] {
221
+ return Array.from({ length: count }, (_, i) => {
222
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
223
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
224
+ return {
225
+ id: i + 1,
226
+ region,
227
+ city,
228
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
229
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
230
+ amount: ((i * 7919) % 50000) / 100,
231
+ units: 1 + ((i * 31) % 12),
232
+ };
233
+ });
234
+ }
235
+ ```
236
+
237
+ `Display.tsx`
238
+
239
+ ```tsx
240
+ import { reactive } from '@motifx/core';
241
+ import { ButtonGroup, PivotGrid, type PivotGridField, type PivotGridSummaryDisplayMode } from '@motifx-community/ui';
242
+ import { makeSales, type Sale } from './sales';
243
+
244
+ const sales = makeSales(20000);
245
+
246
+ const MODES: { value: PivotGridSummaryDisplayMode; text: string }[] = [
247
+ { value: 'percentOfRowTotal', text: 'Of the row' },
248
+ { value: 'percentOfColumnTotal', text: 'Of the column' },
249
+ { value: 'percentOfGrandTotal', text: 'Of all' },
250
+ { value: 'percentOfRowParent', text: 'Of the region' },
251
+ ];
252
+
253
+ /** The amount of each city and year beside its share: of its row, of its column, of all, or of its region. */
254
+ export default function Display() {
255
+ const s = reactive({ mode: 'percentOfRowTotal' as PivotGridSummaryDisplayMode });
256
+ const fields = (): PivotGridField<Sale>[] => [
257
+ { field: 'region', title: 'Region', area: 'row', expanded: true },
258
+ { field: 'city', title: 'City', area: 'row' },
259
+ { field: 'date', title: 'Year', type: 'date', area: 'column', groupInterval: 'year' },
260
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
261
+ { field: 'amount', name: 'share', title: 'Share', type: 'number', area: 'data', summaryType: 'sum', summaryDisplayMode: s.mode },
262
+ ];
263
+
264
+ return (
265
+ <>
266
+ <ButtonGroup label="Share" items={MODES} x-model={() => s.mode} />
267
+ <PivotGrid class="pg-display" style="block-size: 24rem" data={sales} fields={fields} label="Amounts and their shares by city and year" />
268
+ </>
269
+ );
270
+ }
271
+ ```
272
+
273
+ `Variation.tsx`
274
+
275
+ ```tsx
276
+ import { PivotGrid, type PivotGridField } from '@motifx-community/ui';
277
+ import { makeSales, type Sale } from './sales';
278
+
279
+ const sales = makeSales(20000);
280
+
281
+ const amount = (more: Partial<PivotGridField<Sale>>): PivotGridField<Sale> => ({ field: 'amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 }, ...more });
282
+
283
+ // Down the months of each year: the change from the month before, and the year so far.
284
+ const fields: PivotGridField<Sale>[] = [
285
+ { field: 'date', title: 'Date', type: 'date', area: 'row', groupInterval: ['year', 'month'], expanded: true },
286
+ amount({ title: 'Amount' }),
287
+ amount({ name: 'change', title: 'Change', summaryDisplayMode: 'absoluteVariation', displayAlong: 'row' }),
288
+ amount({ name: 'changePercent', title: 'Change %', summaryDisplayMode: 'percentVariation', displayAlong: 'row', format: undefined }),
289
+ amount({ name: 'soFar', title: 'Year so far', runningTotal: 'row' }),
290
+ amount({ name: 'shareSoFar', title: 'Share of the year so far', runningTotal: 'row', summaryDisplayMode: 'percentOfRowParent', format: undefined }),
291
+ ];
292
+
293
+ /** Changes from the month before and running totals through each year. */
294
+ export default function Variation() {
295
+ return <PivotGrid class="pg-variation" style="block-size: 24rem" data={sales} fields={fields} label="Monthly amounts, their changes and the year so far" />;
296
+ }
297
+ ```
298
+
299
+ `OwnCalculation.tsx`
300
+
301
+ ```tsx
302
+ import { PivotGrid, type PivotGridField, type PivotGridSummaryCell } from '@motifx-community/ui';
303
+ import { makeSales, type Sale } from './sales';
304
+
305
+ const sales = makeSales(20000);
306
+
307
+ /**
308
+ * How much more a product sells in a region than it does everywhere, 100 being the same: the product's share of the
309
+ * region against its share of all sales.
310
+ */
311
+ function index(cell: PivotGridSummaryCell<Sale>): number | null {
312
+ const value = cell.value() as number | undefined;
313
+ const region = cell.total('column').value() as number | undefined;
314
+ const product = cell.total('row').value() as number | undefined;
315
+ const all = cell.grandTotal().value() as number | undefined;
316
+ if (!value || !region || !product || !all) return null;
317
+ return (value / region / (product / all)) * 100;
318
+ }
319
+
320
+ const fields: PivotGridField<Sale>[] = [
321
+ { field: 'region', title: 'Region', area: 'row' },
322
+ { field: 'product', title: 'Product', area: 'column' },
323
+ { field: 'amount', title: 'Index', type: 'number', area: 'data', summaryType: 'sum', calculateSummaryValue: index, format: { maximumFractionDigits: 0 } },
324
+ ];
325
+
326
+ /** A product's index in each region: a calculation of the field's own over the cell and its totals. */
327
+ export default function OwnCalculation() {
328
+ return <PivotGrid class="pg-own-calculation" style="block-size: 18rem" data={sales} fields={fields} label="Product index by region" />;
329
+ }
330
+ ```
@@ -0,0 +1,295 @@
1
+ # PivotGrid
2
+
3
+ > PivotGrid · @motifx-community/ui 0.1.0-beta.14
4
+
5
+ A pivot table: rows summed up by row fields down the side and column fields across the top, with a value of every data field where they cross and totals for every member. The data layer computes it (`loadPivot`), in the browser for rows in memory or on the server where the adapter can. Members open and close, and the table draws only the rows and columns in view.
6
+
7
+ ## Import
8
+
9
+ ```tsx
10
+ import { PivotGrid, type PivotGridField } from '@motifx-community/ui';
11
+ ```
12
+
13
+ ## Rows, columns and values
14
+
15
+ Each field has an `area`: `row` fields make the members down the side, `column` fields the members across the top, and `data` fields the values where they cross. A date field grouped by `['year', 'quarter']` makes two levels. Press a member's header, or Enter on it, to open it; its total follows its children. See [Fields and areas](pivotgrid-fields.md) and [Totals and layout](pivotgrid-layout.md).
16
+
17
+ ```tsx
18
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
19
+
20
+ const PLACES: [string, string][] = [
21
+ ['Marmara', 'İstanbul'],
22
+ ['Marmara', 'Bursa'],
23
+ ['Central Anatolia', 'Ankara'],
24
+ ['Central Anatolia', 'Konya'],
25
+ ['Aegean', 'İzmir'],
26
+ ['Aegean', 'Muğla'],
27
+ ['Black Sea', 'Trabzon'],
28
+ ['Mediterranean', 'Antalya'],
29
+ ];
30
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
31
+
32
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
33
+ export function makeSales(count: number): Sale[] {
34
+ return Array.from({ length: count }, (_, i) => {
35
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
36
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
37
+ return {
38
+ id: i + 1,
39
+ region,
40
+ city,
41
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
42
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
43
+ amount: ((i * 7919) % 50000) / 100,
44
+ units: 1 + ((i * 31) % 12),
45
+ };
46
+ });
47
+ }
48
+ ```
49
+
50
+ ## Rows in memory or on a server
51
+
52
+ `data` takes rows in memory: the pivot computes every member at once in the browser, so opening one only shows it. `dataSource` takes a `DataSource` of any adapter, and the pivot covers its query (filter, search) and loads again when it changes. An adapter that computes pivots (`capabilities.pivot`: OData with `$apply`, or a REST service with a pivot address) is asked for the members open only, and again when one opens; any other adapter's rows are loaded and pivoted in the browser.
53
+
54
+ Below, 100,000 sales stand in for a server that answers a little later. A failed load is told under the table with a Retry button, and in `onDataErrorOccurred`.
55
+
56
+ ```tsx
57
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
58
+
59
+ const PLACES: [string, string][] = [
60
+ ['Marmara', 'İstanbul'],
61
+ ['Marmara', 'Bursa'],
62
+ ['Central Anatolia', 'Ankara'],
63
+ ['Central Anatolia', 'Konya'],
64
+ ['Aegean', 'İzmir'],
65
+ ['Aegean', 'Muğla'],
66
+ ['Black Sea', 'Trabzon'],
67
+ ['Mediterranean', 'Antalya'],
68
+ ];
69
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
70
+
71
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
72
+ export function makeSales(count: number): Sale[] {
73
+ return Array.from({ length: count }, (_, i) => {
74
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
75
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
76
+ return {
77
+ id: i + 1,
78
+ region,
79
+ city,
80
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
81
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
82
+ amount: ((i * 7919) % 50000) / 100,
83
+ units: 1 + ((i * 31) % 12),
84
+ };
85
+ });
86
+ }
87
+ ```
88
+
89
+ ## Large results
90
+
91
+ 100,000 sales by region, city and product down the side and by month across the top, every member open. Only the rows and columns in view are drawn; the headers stay at the top and the start while the cells scroll.
92
+
93
+ ```tsx
94
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
95
+
96
+ const PLACES: [string, string][] = [
97
+ ['Marmara', 'İstanbul'],
98
+ ['Marmara', 'Bursa'],
99
+ ['Central Anatolia', 'Ankara'],
100
+ ['Central Anatolia', 'Konya'],
101
+ ['Aegean', 'İzmir'],
102
+ ['Aegean', 'Muğla'],
103
+ ['Black Sea', 'Trabzon'],
104
+ ['Mediterranean', 'Antalya'],
105
+ ];
106
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
107
+
108
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
109
+ export function makeSales(count: number): Sale[] {
110
+ return Array.from({ length: count }, (_, i) => {
111
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
112
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
113
+ return {
114
+ id: i + 1,
115
+ region,
116
+ city,
117
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
118
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
119
+ amount: ((i * 7919) % 50000) / 100,
120
+ units: 1 + ((i * 31) % 12),
121
+ };
122
+ });
123
+ }
124
+ ```
125
+
126
+ Measured in Chrome on a desktop computer: the pivot of the 100,000 rows is computed in about a tenth of a second, and the table shows about 0.4 seconds after the page starts loading. Every member is computed at once, so a member opens or closes in about 25 ms.
127
+
128
+ ## Feedback
129
+
130
+ Loading issues…
131
+
132
+ ## Example files
133
+
134
+ `Overview.tsx`
135
+
136
+ ```tsx
137
+ import { PivotGrid, type PivotGridField } from '@motifx-community/ui';
138
+ import { makeSales, type Sale } from './sales';
139
+
140
+ const fields: PivotGridField<Sale>[] = [
141
+ { field: 'region', title: 'Region', area: 'row' },
142
+ { field: 'city', title: 'City', area: 'row' },
143
+ { field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'] },
144
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
145
+ ];
146
+
147
+ const sales = makeSales(20000);
148
+
149
+ export default function Overview() {
150
+ return <PivotGrid style="block-size: 26rem" data={sales} fields={fields} label="Sales by region and quarter" />;
151
+ }
152
+ ```
153
+
154
+ `sales.ts`
155
+
156
+ ```tsx
157
+ export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
158
+
159
+ const PLACES: [string, string][] = [
160
+ ['Marmara', 'İstanbul'],
161
+ ['Marmara', 'Bursa'],
162
+ ['Central Anatolia', 'Ankara'],
163
+ ['Central Anatolia', 'Konya'],
164
+ ['Aegean', 'İzmir'],
165
+ ['Aegean', 'Muğla'],
166
+ ['Black Sea', 'Trabzon'],
167
+ ['Mediterranean', 'Antalya'],
168
+ ];
169
+ const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
170
+
171
+ /** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
172
+ export function makeSales(count: number): Sale[] {
173
+ return Array.from({ length: count }, (_, i) => {
174
+ const [region, city] = PLACES[(i * 7) % PLACES.length];
175
+ const day = new Date(2024, 0, 1 + ((i * 13) % 731));
176
+ return {
177
+ id: i + 1,
178
+ region,
179
+ city,
180
+ product: PRODUCTS[(i * 3) % PRODUCTS.length],
181
+ date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
182
+ amount: ((i * 7919) % 50000) / 100,
183
+ units: 1 + ((i * 31) % 12),
184
+ };
185
+ });
186
+ }
187
+ ```
188
+
189
+ `Server.tsx`
190
+
191
+ ```tsx
192
+ import { reactive } from '@motifx/core';
193
+ import { data } from '@motifx-community/data';
194
+ import { Button, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
195
+ import { makeSales, type Sale } from './sales';
196
+ import { SalesServer } from './sales-server';
197
+
198
+ const fields: PivotGridField<Sale>[] = [
199
+ { field: 'region', title: 'Region', area: 'row' },
200
+ { field: 'city', title: 'City', area: 'row' },
201
+ { field: 'product', title: 'Product', area: 'row' },
202
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
203
+ { field: 'units', title: 'Units', type: 'number', area: 'data', summaryType: 'sum' },
204
+ ];
205
+
206
+ /** A pivot a server computes: one answer per open member, and a failed answer shown with Retry. */
207
+ export default function Server() {
208
+ const s = reactive({ answers: 0, open: 0 });
209
+ const server = new SalesServer(makeSales(100000), (options) => {
210
+ s.answers++;
211
+ s.open = Array.isArray(options.expandedRows) ? options.expandedRows.length : 0;
212
+ });
213
+ const sales = new data.DataSource<Sale, number>({ adapter: server });
214
+ let grid: PivotGrid<Sale> | null = null;
215
+
216
+ return (
217
+ <>
218
+ <PivotGrid
219
+ class="pg-server"
220
+ style="block-size: 24rem"
221
+ dataSource={sales}
222
+ fields={fields}
223
+ label="Sales computed on the server"
224
+ ref={(g: PivotGrid<Sale>) => (grid = g)}
225
+ />
226
+ <Stack orientation="horizontal" wrap align="center">
227
+ <Button text="Fail the next answer" variant="outline" onclick={() => server.failNext()} />
228
+ <Button text="Load again" variant="outline" onclick={() => grid?.refresh()} />
229
+ <output class="pg-server-answers">{() => `Answers: ${s.answers} · open members in the last: ${s.open}`}</output>
230
+ </Stack>
231
+ </>
232
+ );
233
+ }
234
+ ```
235
+
236
+ `sales-server.ts`
237
+
238
+ ```tsx
239
+ import { data } from '@motifx-community/data';
240
+ import type { Sale } from './sales';
241
+
242
+ /**
243
+ * Sales in memory acting as a server that computes pivots (`capabilities.pivot`): it answers a little later, computes
244
+ * the children of the open members only, and can fail its next answer.
245
+ */
246
+ export class SalesServer extends data.ArrayAdapter<Sale, number> {
247
+ private failing = false;
248
+
249
+ constructor(
250
+ private readonly sales: Sale[],
251
+ private readonly asked: (options: data.PivotLoadOptions<Sale>) => void,
252
+ ) {
253
+ super({ data: sales, key: 'id' });
254
+ }
255
+
256
+ failNext() {
257
+ this.failing = true;
258
+ }
259
+
260
+ protected override backendCapabilities(): data.Capabilities {
261
+ return { ...super.backendCapabilities(), pivot: true };
262
+ }
263
+
264
+ protected override async loadPivotGroups(options: data.PivotLoadOptions<Sale>): Promise<unknown> {
265
+ this.asked(options);
266
+ await new Promise((done) => setTimeout(done, 400));
267
+ if (this.failing) {
268
+ this.failing = false;
269
+ throw new Error('The sales service did not answer.');
270
+ }
271
+ return data.pivotGroups(this.sales, options);
272
+ }
273
+ }
274
+ ```
275
+
276
+ `Large.tsx`
277
+
278
+ ```tsx
279
+ import { PivotGrid, type PivotGridField } from '@motifx-community/ui';
280
+ import { makeSales, type Sale } from './sales';
281
+
282
+ const fields: PivotGridField<Sale>[] = [
283
+ { field: 'region', title: 'Region', area: 'row', expanded: true },
284
+ { field: 'city', title: 'City', area: 'row', expanded: true },
285
+ { field: 'product', title: 'Product', area: 'row' },
286
+ { field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter', 'month'], expanded: true },
287
+ { field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
288
+ ];
289
+
290
+ const sales = makeSales(100000);
291
+
292
+ export default function Large() {
293
+ return <PivotGrid style="block-size: 30rem" data={sales} fields={fields} label="100,000 sales by place, product and month" />;
294
+ }
295
+ ```
package/docs/popover.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Popover
2
2
 
3
- > Feedback · @motifx-community/ui 0.1.0-beta.13
3
+ > Feedback · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  Displays content next to a related element, such as a title, a close button, a form or a card. It opens on click or on hover, follows its target, and points to it with an arrow where the design language includes one.
6
6
 
package/docs/progress.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ProgressBar and Spinner
2
2
 
3
- > Feedback · @motifx-community/ui 0.1.0-beta.13
3
+ > Feedback · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  ProgressBar shows how far an operation has progressed, as a line or a circle, or indicates activity when the progress is unknown. Spinner shows that the system is busy. It is a rotating ring that can stand alone or cover a panel while it loads, and it can wait for a delay so that quick operations do not cause a flash.
6
6
 
package/docs/qrcode.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QRCode
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.13
3
+ > Display · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  A QR code, drawn as vectors so that it stays sharp at any size. It has no dependencies, chooses the smallest version that holds the text, and can carry a logo.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # RadioGroup
2
2
 
3
- > Choice · @motifx-community/ui 0.1.0-beta.13
3
+ > Choice · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  A set of mutually exclusive options. Options can come from plain values, custom objects or a live list, and can be arranged vertically, horizontally or in columns. Individual options can be disabled, hidden or given help text. The group is a single Tab stop, and the arrow keys move between options.
6
6
 
package/docs/rating.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Rating
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.13
3
+ > Editors · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  A row of stars for entering or displaying a score, in whole or half steps. Rating is a field, so the label, help text, rules and `x-model` work the same way as on any other field.
6
6
 
package/docs/resizable.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Resizable
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.13
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.14
4
4
 
5
5
  A box that users can resize from its edges and corners with the pointer, or with the arrow keys on the grip in its end corner. It respects minimum and maximum sizes, can stay within an area, and can preserve its aspect ratio.
6
6