@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
@@ -269,6 +269,8 @@ export interface UiStrings {
269
269
  gridSummaryAvg: string;
270
270
  gridSummaryAvgOtherColumn: string;
271
271
  gridSummaryCount: string;
272
+ gridSummaryCountDistinct: string;
273
+ gridSummaryCountDistinctOtherColumn: string;
272
274
  gridSummarySeparator: string;
273
275
  gridTotalSummary: string;
274
276
  filterBuilderLabel: string;
@@ -545,6 +547,34 @@ export interface UiStrings {
545
547
  customizerName: string;
546
548
  /** The customizer's keyboard page (`{keys}` and `{names}` are filled in). */
547
549
  customizerKeyboard: string;
550
+ /** The customizer of a flat list (a toolbar): adding, separators, what an item shows. */
551
+ customizerAdd: string;
552
+ customizerNewSeparator: string;
553
+ customizerSeparator: string;
554
+ customizerDisplay: string;
555
+ customizerDisplayIcon: string;
556
+ customizerDisplayText: string;
557
+ customizerDisplayBoth: string;
558
+ /** Toolbar: the menu that changes it (`{name}` is filled in), and its name in menus when it has no label. */
559
+ toolbarHide: string;
560
+ toolbarRemove: string;
561
+ toolbarRemoveSeparator: string;
562
+ toolbarAddSeparator: string;
563
+ toolbarMoveLeft: string;
564
+ toolbarMoveRight: string;
565
+ toolbarMoveUp: string;
566
+ toolbarMoveDown: string;
567
+ toolbarDisplay: string;
568
+ toolbarDisplayIcon: string;
569
+ toolbarDisplayText: string;
570
+ toolbarDisplayBoth: string;
571
+ toolbarShowHidden: string;
572
+ toolbarCustomize: string;
573
+ toolbarReset: string;
574
+ toolbarUnnamed: string;
575
+ /** MenuBar, RibbonMenu and ContextMenu: sending a command to a toolbar (`{name}` is the toolbar's). */
576
+ menuBarAddToToolbar: string;
577
+ menuBarRemoveFromToolbar: string;
548
578
  /** ShortcutEditor, and the names of the kit's own keyboard shortcuts. `{keys}`, `{names}` and `{n}` are filled in. */
549
579
  shortcutEditorLabel: string;
550
580
  shortcutEditorPressKeys: string;
@@ -805,4 +835,164 @@ export interface UiStrings {
805
835
  scrollPullDown: string;
806
836
  scrollRelease: string;
807
837
  scrollRefreshing: string;
838
+ /** The markdown view. */
839
+ markdownCopy: string;
840
+ markdownCopied: string;
841
+ markdownTaskDone: string;
842
+ markdownTaskOpen: string;
843
+ /** The chat. `{count}` is filled in. */
844
+ chatLabel: string;
845
+ chatYou: string;
846
+ chatAssistant: string;
847
+ chatSystem: string;
848
+ chatLoadEarlier: string;
849
+ chatLoadFailed: string;
850
+ chatNewMessages: string;
851
+ chatJumpToLatest: string;
852
+ chatSend: string;
853
+ chatStop: string;
854
+ chatPlaceholder: string;
855
+ chatStopped: string;
856
+ chatFailed: string;
857
+ chatThinking: string;
858
+ chatThought: string;
859
+ chatThoughtBrief: string;
860
+ chatSeconds: string;
861
+ chatKilobytes: string;
862
+ chatWorking: string;
863
+ chatStopHint: string;
864
+ chatShowMore: string;
865
+ chatShowLess: string;
866
+ chatTasks: string;
867
+ chatQueuePlaceholder: string;
868
+ chatRemove: string;
869
+ chatAllowTool: string;
870
+ chatAllow: string;
871
+ chatDeny: string;
872
+ chatDenyHint: string;
873
+ chatAllowed: string;
874
+ chatAllowedAlways: string;
875
+ chatDenied: string;
876
+ chatUnanswered: string;
877
+ chatPlan: string;
878
+ chatPlanReady: string;
879
+ chatPlanApprove: string;
880
+ chatPlanKeep: string;
881
+ chatPlanHint: string;
882
+ chatPlanApproved: string;
883
+ chatPlanKept: string;
884
+ chatQuestions: string;
885
+ chatQuestionCount: string;
886
+ chatWaitingAnswer: string;
887
+ chatAnswered: string;
888
+ chatDeclined: string;
889
+ chatAnswer: string;
890
+ chatOther: string;
891
+ chatOtherHint: string;
892
+ chatDecide: string;
893
+ chatPrevious: string;
894
+ chatNext: string;
895
+ chatSubmitAnswers: string;
896
+ chatRequired: string;
897
+ chatWaitingYou: string;
898
+ chatModeHint: string;
899
+ chatModel: string;
900
+ chatThinkingToggle: string;
901
+ chatUsage: string;
902
+ chatAttach: string;
903
+ chatAttachments: string;
904
+ chatCommands: string;
905
+ chatCopy: string;
906
+ chatCopied: string;
907
+ chatEdit: string;
908
+ chatRewind: string;
909
+ chatFork: string;
910
+ chatCancel: string;
911
+ chatRetry: string;
912
+ chatRetryingIn: string;
913
+ chatRetried: string;
914
+ chatCompacted: string;
915
+ /** A footnote's reference, and the link from its note back to it (`{number}` is the footnote's). */
916
+ markdownFootnote: string;
917
+ markdownFootnoteBack: string;
918
+ /** Said to screen readers when a reply ends. */
919
+ chatReplied: string;
920
+ /** The search over the conversation: its box, which result of how many (`{index}`, `{count}`), none, its buttons. */
921
+ chatSearch: string;
922
+ chatSearchCount: string;
923
+ chatSearchNone: string;
924
+ chatSearchPrevious: string;
925
+ chatSearchNext: string;
926
+ /** A long code block: the button that shows all its lines (`{count}`), and the one that folds it again. */
927
+ markdownShowLines: string;
928
+ markdownShowFewer: string;
929
+ /** A reply's actions: another reply in its place, and whether it was good. */
930
+ chatRegenerate: string;
931
+ chatGood: string;
932
+ chatBad: string;
933
+ /** The sources a reply names. */
934
+ chatSources: string;
935
+ /** A form a reply asks the user to fill in: its name, who asks (`{source}`), its buttons, and what the user did. */
936
+ chatForm: string;
937
+ chatFormFrom: string;
938
+ chatFormSubmit: string;
939
+ chatFormDecline: string;
940
+ chatFormCancel: string;
941
+ chatFormDeclined: string;
942
+ chatFormCancelled: string;
943
+ pivotGrandTotal: string;
944
+ pivotTotal: string;
945
+ pivotEmpty: string;
946
+ pivotQuarter: string;
947
+ pivotRange: string;
948
+ pivotCellLabel: string;
949
+ pivotNoValue: string;
950
+ pivotFieldPanel: string;
951
+ pivotFilterFields: string;
952
+ pivotDataFields: string;
953
+ pivotColumnFields: string;
954
+ pivotRowFields: string;
955
+ pivotFieldAreaEmpty: string;
956
+ pivotFieldChipHint: string;
957
+ pivotFieldAscending: string;
958
+ pivotFieldDescending: string;
959
+ pivotFieldMenu: string;
960
+ pivotSortAscending: string;
961
+ pivotSortDescending: string;
962
+ pivotMoveToFilter: string;
963
+ pivotMoveToData: string;
964
+ pivotMoveToColumns: string;
965
+ pivotMoveToRows: string;
966
+ pivotMoveEarlier: string;
967
+ pivotMoveLater: string;
968
+ pivotRemoveField: string;
969
+ pivotFieldMoved: string;
970
+ pivotFieldRemoved: string;
971
+ pivotFieldFiltered: string;
972
+ pivotFilterValues: string;
973
+ pivotFieldChooser: string;
974
+ pivotAllFields: string;
975
+ pivotHeaderMenu: string;
976
+ pivotCellMenu: string;
977
+ pivotExpand: string;
978
+ pivotCollapse: string;
979
+ pivotExpandAll: string;
980
+ pivotCollapseAll: string;
981
+ pivotSortByColumn: string;
982
+ pivotSortByRow: string;
983
+ pivotHideField: string;
984
+ pivotCopiedCell: string;
985
+ pivotCopiedCells: string;
986
+ pivotCopyTooMany: string;
987
+ pivotExport: string;
988
+ pivotExportTo: string;
989
+ pivotExporting: string;
990
+ pivotExported: string;
991
+ pivotExportFailed: string;
992
+ pivotExportCanceled: string;
993
+ pivotExportProgress: string;
994
+ pivotExportCancel: string;
995
+ pivotResizeColumn: string;
996
+ pivotResizingHint: string;
997
+ pivotWidthIs: string;
808
998
  }
@@ -0,0 +1,8 @@
1
+ import type { Cell } from 'exceljs';
2
+ import type { PivotGridExportCell } from '../components/pivotgrid/pivot-grid-export-cell';
3
+ /** What `exportPivotGrid`'s `customizeCell` receives for each written cell: the pivot's cell and the ExcelJS cell, with its value and style set. */
4
+ export interface ExcelPivotCustomizeCellArgs<T = any> {
5
+ readonly pivotCell: PivotGridExportCell<T>;
6
+ /** Change its `value`, `numFmt`, `font`, `fill`, `alignment`, `border`… */
7
+ readonly excelCell: Cell;
8
+ }
@@ -0,0 +1,44 @@
1
+ import type { Worksheet } from 'exceljs';
2
+ import type { PivotGrid } from '../components/pivotgrid/PivotGrid';
3
+ import type { PivotGridLoadPanel } from '../components/pivotgrid/pivot-grid-load-panel';
4
+ import type { ExcelPivotCustomizeCellArgs } from './excel-pivot-customize-cell-args';
5
+ /** The options of `exportPivotGrid`. Every field except `component` and `worksheet` has a default. */
6
+ export interface ExcelPivotExportOptions<T = any> {
7
+ /** The pivot to export. */
8
+ component: PivotGrid<T>;
9
+ /** The ExcelJS worksheet to write to (`workbook.addWorksheet('Sales')`); the sheets that continue it are added after it. */
10
+ worksheet: Worksheet;
11
+ /**
12
+ * Where the first cell goes: `{ row, column }` from 1, or a reference such as `'B2'`. The sheets that continue the
13
+ * table start at the same cell. The default is `{ row: 1, column: 1 }`.
14
+ */
15
+ topLeftCell?: {
16
+ row: number;
17
+ column: number;
18
+ } | string;
19
+ /** Called for every written cell, after its value and style are set. */
20
+ customizeCell?: (e: ExcelPivotCustomizeCellArgs<T>) => void;
21
+ /** Keeps columns as wide as they are in the pivot. The default is `true`. */
22
+ keepColumnWidths?: boolean;
23
+ /** Writes the rows of column headers and the corner. The default is `true`. */
24
+ headers?: boolean;
25
+ /** Keeps the rows of column headers and the columns of row headers in view while the sheet scrolls. The default is `true`. */
26
+ frozenHeader?: boolean;
27
+ /** Merges a header over the lines and levels it covers. The default is `true`. */
28
+ mergeHeaders?: boolean;
29
+ /** In the tree layout, lets the rows of an open member be folded in Excel under its own (at most 7 levels). The default is `true`. */
30
+ outline?: boolean;
31
+ /** Gives number and date cells an Excel number format made from the format their cells show them with. The default is `true`. */
32
+ numberFormats?: boolean;
33
+ /** Prefixes text that a spreadsheet would run as a formula (`=`, `+`, `-`, `@`…) with `'`. The default is `false`. */
34
+ encodeExecutableContent?: boolean;
35
+ /**
36
+ * Shows the panel over the table while a pivot read in parts is read, with its progress and a button that stops the
37
+ * export. It is on by default.
38
+ */
39
+ loadPanel?: boolean | PivotGridLoadPanel;
40
+ /** Called after each part of a pivot read in parts arrives, with the rows read and the rows there are. */
41
+ onProgress?: (loaded: number, total: number) => void;
42
+ /** Stops the export, and its promise rejects with an `AbortError`. */
43
+ signal?: AbortSignal;
44
+ }
@@ -0,0 +1,6 @@
1
+ import type { Worksheet } from 'exceljs';
2
+ import type { CellRange } from './cell-range';
3
+ /** What `exportPivotGrid` wrote: the cells of the first worksheet, and every worksheet, the first and those that continue it. */
4
+ export interface ExcelPivotExportResult extends CellRange {
5
+ readonly worksheets: readonly Worksheet[];
6
+ }
@@ -0,0 +1,35 @@
1
+ import type { Cell, Worksheet } from 'exceljs';
2
+ import type { PivotGridSheet, PivotGridSheetCell } from '../components/pivotgrid/pivot-grid-sheet';
3
+ import type { ExcelPivotExportOptions } from './excel-pivot-export-options';
4
+ import type { ExcelPivotExportResult } from './excel-pivot-export-result';
5
+ import { type ExcelSheetOptions } from './write-sheet';
6
+ /**
7
+ * Writes a PivotGrid to an ExcelJS worksheet: the rows of column headers (merged over the columns they cover) and the
8
+ * corner, then a row per line of the table with its row headers (merged down the lines they cover), every open member's
9
+ * (read whole where the pivot is read in parts). Numbers stay numbers with the format their cells show them with, totals
10
+ * are bold, and the headers stay in view. A table larger than a worksheet (1,048,576 rows, 16,384 columns) goes on in
11
+ * worksheets added after it, each with the rows of column headers and the columns of row headers again. Provide your own
12
+ * ExcelJS: create the workbook and the worksheet, then save the workbook when the promise resolves.
13
+ *
14
+ * @example
15
+ * onExporting={(e) => {
16
+ * if (e.format !== 'xlsx') return;
17
+ * const workbook = new ExcelJS.Workbook();
18
+ * exportPivotGrid({ component: e.component, worksheet: workbook.addWorksheet('Sales') })
19
+ * .then(() => workbook.xlsx.writeBuffer())
20
+ * .then((buffer) => saveFile(new Blob([buffer]), 'Sales.xlsx'));
21
+ * }}
22
+ */
23
+ export declare function exportPivotGrid<T = any>(options: ExcelPivotExportOptions<T>): Promise<ExcelPivotExportResult>;
24
+ /**
25
+ * Writes a pivot's sheet from `start` on a worksheet, and where it does not fit in one (`limits`), on worksheets added
26
+ * after it: the rows by as many as fit, then the columns, each part under the rows of column headers and after the
27
+ * columns of row headers again.
28
+ */
29
+ export declare function writePivotSheets<T>(sheet: PivotGridSheet<T>, first: Worksheet, start: {
30
+ row: number;
31
+ column: number;
32
+ }, options: ExcelSheetOptions, customize: (cell: PivotGridSheetCell<T>, excelCell: Cell) => void, limits?: {
33
+ rows: number;
34
+ columns: number;
35
+ }): ExcelPivotExportResult;
@@ -1,4 +1,8 @@
1
1
  export { exportDataGrid } from './export-data-grid';
2
+ export { exportPivotGrid } from './export-pivot-grid';
3
+ export type { ExcelPivotExportOptions } from './excel-pivot-export-options';
4
+ export type { ExcelPivotCustomizeCellArgs } from './excel-pivot-customize-cell-args';
5
+ export type { ExcelPivotExportResult } from './excel-pivot-export-result';
2
6
  export { excelNumberFormat } from './number-format';
3
7
  export { excelDateFormat } from './date-format';
4
8
  export type { ExcelExportOptions } from './excel-export-options';
@@ -1,4 +1,5 @@
1
- import { t as guardFormula } from "../formula-guard-NYlpoA-t.js";
1
+ import { t as guardFormula } from "../formula-guard-Bx48S0u3.js";
2
+ import { t as sliceSheet } from "../slice-sheet-C116M42H.js";
2
3
  //#region src/excel/date-format.ts
3
4
  /** A day whose parts can be told apart: month 2, day 3, hour 4 (one digit each unless padded). */
4
5
  var SAMPLE = new Date(2009, 1, 3, 4, 5, 6, 789);
@@ -91,7 +92,7 @@ function around(parts) {
91
92
  return out + formatLiteral(text);
92
93
  }
93
94
  //#endregion
94
- //#region src/excel/export-data-grid.ts
95
+ //#region src/excel/write-sheet.ts
95
96
  /** Pixels of one character of Excel's default font (Calibri 11), which column widths count in. */
96
97
  var DIGIT_WIDTH = 7;
97
98
  /** Excel's widest column, in characters. */
@@ -99,54 +100,11 @@ var MAX_WIDTH = 255;
99
100
  /** Excel's deepest outline. */
100
101
  var MAX_LEVEL = 7;
101
102
  /**
102
- * Writes a DataGrid to an ExcelJS worksheet: the header row, the group rows ("Column: value", with
103
- * their summaries) with outline levels, the data rows in the grid's order with its filter, search and
104
- * grouping (every matching row, loaded in parts from a server), the group footers and the totals.
105
- * Numbers stay numbers with a number format created from the column's `Intl` format, dates stay dates,
106
- * yes/no cells are `TRUE` / `FALSE`, and lookup and list cells hold their text. Provide your own ExcelJS:
107
- * create the workbook and the worksheet, then save the workbook when the promise resolves with the cells written.
108
- *
109
- * @example
110
- * onExporting={(e) => {
111
- * if (e.format !== 'xlsx') return;
112
- * const workbook = new ExcelJS.Workbook();
113
- * exportDataGrid({ component: e.component, worksheet: workbook.addWorksheet('Orders'), selectedRowsOnly: e.selectedRowsOnly })
114
- * .then(() => workbook.xlsx.writeBuffer())
115
- * .then((buffer) => saveFile(new Blob([buffer]), 'Orders.xlsx'));
116
- * }}
103
+ * Writes a sheet to an ExcelJS worksheet from `start`: the rows with their outline levels, numbers and dates with
104
+ * formats made from their column's `Intl` options, the header frozen and merged as the sheet says. `customize` is
105
+ * called for every written cell. The export functions of the components write their sheets with it.
117
106
  */
118
- function exportDataGrid(options) {
119
- if (!options || typeof options !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid needs an options object."));
120
- const { component, worksheet } = options;
121
- if (!component || typeof component.exportSheet !== "function") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid: `component` must be a DataGrid."));
122
- if (!worksheet || typeof worksheet !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid: `worksheet` must be an ExcelJS worksheet."));
123
- const start = topLeft(worksheet, options.topLeftCell);
124
- return component.exportSheet({
125
- format: "xlsx",
126
- selectedRowsOnly: options.selectedRowsOnly,
127
- headers: options.headers,
128
- groups: options.groups,
129
- summaries: options.summaries,
130
- pageSize: options.pageSize,
131
- onProgress: options.onProgress,
132
- signal: options.signal,
133
- loadPanel: options.loadPanel ?? true
134
- }, (sheet) => write(sheet, worksheet, start, options));
135
- }
136
- function topLeft(worksheet, given) {
137
- if (typeof given === "string") {
138
- const cell = worksheet.getCell(given);
139
- return {
140
- row: Number(cell.row),
141
- column: Number(cell.col)
142
- };
143
- }
144
- return {
145
- row: given?.row ?? 1,
146
- column: given?.column ?? 1
147
- };
148
- }
149
- function write(sheet, worksheet, start, options) {
107
+ function writeSheet(sheet, worksheet, start, options, customize) {
150
108
  const cols = sheet.columns;
151
109
  const range = {
152
110
  from: { ...start },
@@ -168,22 +126,40 @@ function write(sheet, worksheet, start, options) {
168
126
  date: formats && col.dateFormat ? excelDateFormat(new Intl.DateTimeFormat(sheet.locale, col.dateFormat)) : null,
169
127
  numbers: /* @__PURE__ */ new Map()
170
128
  }));
129
+ const own = /* @__PURE__ */ new Map();
130
+ const writerOf = (cell, j) => {
131
+ if (!formats || !cell.numberFormat && !cell.dateFormat) return writers[j];
132
+ const key = JSON.stringify([cell.numberFormat ?? null, cell.dateFormat ?? null]);
133
+ let writer = own.get(key);
134
+ if (!writer) {
135
+ writer = {
136
+ number: cell.numberFormat ? new Intl.NumberFormat(sheet.locale, cell.numberFormat) : null,
137
+ date: cell.dateFormat ? excelDateFormat(new Intl.DateTimeFormat(sheet.locale, cell.dateFormat)) : null,
138
+ numbers: /* @__PURE__ */ new Map()
139
+ };
140
+ own.set(key, writer);
141
+ }
142
+ return writer;
143
+ };
171
144
  sheet.rows.forEach((row, i) => {
172
145
  const excelRow = worksheet.getRow(start.row + i);
173
146
  if (row.rowType !== "header" && options.outline !== false) excelRow.outlineLevel = Math.min(MAX_LEVEL, row.level);
174
147
  row.cells.forEach((cell, j) => {
175
148
  const excelCell = excelRow.getCell(start.column + j);
176
- writeCell(excelCell, cell, row.rowType, j, cols[j], writers[j], sheet.rtl, options);
177
- options.customizeCell?.({
178
- gridCell: cell.gridCell,
179
- excelCell
180
- });
149
+ writeCell(excelCell, cell, row.rowType, j, cols[j], writerOf(cell, j), sheet.rtl, options);
150
+ customize?.(cell, excelCell);
181
151
  if (options.encodeExecutableContent && typeof excelCell.value === "string") excelCell.value = guardFormula(excelCell.value);
182
152
  });
183
153
  range.to.row = start.row + i;
184
154
  });
185
155
  const view = { ...worksheet.views[0] ?? {} };
186
156
  if (sheet.rtl) view.rightToLeft = true;
157
+ const headerColumns = sheet.headerColumns ?? 0;
158
+ if (headerColumns > 0 && options.frozenHeader !== false && !("state" in view)) Object.assign(view, {
159
+ state: "frozen",
160
+ xSplit: start.column + headerColumns - 1,
161
+ ...sheet.headerRows > 0 ? { ySplit: start.row + sheet.headerRows - 1 } : {}
162
+ });
187
163
  if (sheet.headerRows > 0) {
188
164
  if (options.frozenHeader !== false && !("state" in view)) Object.assign(view, {
189
165
  state: "frozen",
@@ -209,7 +185,7 @@ function writeCell(excelCell, cell, rowType, index, col, writer, rtl, options) {
209
185
  if (value === null) return;
210
186
  const header = rowType === "header";
211
187
  const groupText = rowType === "group" && index === 0;
212
- if (rowType !== "data") excelCell.font = {
188
+ if (rowType !== "data" || cell.strong) excelCell.font = {
213
189
  ...excelCell.font,
214
190
  bold: true
215
191
  };
@@ -238,6 +214,164 @@ function excelDate(date) {
238
214
  return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
239
215
  }
240
216
  //#endregion
241
- export { excelDateFormat, excelNumberFormat, exportDataGrid };
217
+ //#region src/excel/export-data-grid.ts
218
+ /**
219
+ * Writes a DataGrid to an ExcelJS worksheet: the header row, the group rows ("Column: value", with
220
+ * their summaries) with outline levels, the data rows in the grid's order with its filter, search and
221
+ * grouping (every matching row, loaded in parts from a server), the group footers and the totals.
222
+ * Numbers stay numbers with a number format created from the column's `Intl` format, dates stay dates,
223
+ * yes/no cells are `TRUE` / `FALSE`, and lookup and list cells hold their text. Provide your own ExcelJS:
224
+ * create the workbook and the worksheet, then save the workbook when the promise resolves with the cells written.
225
+ *
226
+ * @example
227
+ * onExporting={(e) => {
228
+ * if (e.format !== 'xlsx') return;
229
+ * const workbook = new ExcelJS.Workbook();
230
+ * exportDataGrid({ component: e.component, worksheet: workbook.addWorksheet('Orders'), selectedRowsOnly: e.selectedRowsOnly })
231
+ * .then(() => workbook.xlsx.writeBuffer())
232
+ * .then((buffer) => saveFile(new Blob([buffer]), 'Orders.xlsx'));
233
+ * }}
234
+ */
235
+ function exportDataGrid(options) {
236
+ if (!options || typeof options !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid needs an options object."));
237
+ const { component, worksheet } = options;
238
+ if (!component || typeof component.exportSheet !== "function") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid: `component` must be a DataGrid."));
239
+ if (!worksheet || typeof worksheet !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportDataGrid: `worksheet` must be an ExcelJS worksheet."));
240
+ const start = topLeft$1(worksheet, options.topLeftCell);
241
+ return component.exportSheet({
242
+ format: "xlsx",
243
+ selectedRowsOnly: options.selectedRowsOnly,
244
+ headers: options.headers,
245
+ groups: options.groups,
246
+ summaries: options.summaries,
247
+ pageSize: options.pageSize,
248
+ onProgress: options.onProgress,
249
+ signal: options.signal,
250
+ loadPanel: options.loadPanel ?? true
251
+ }, (sheet) => writeSheet(sheet, worksheet, start, options, options.customizeCell && ((cell, excelCell) => options.customizeCell({
252
+ gridCell: cell.gridCell,
253
+ excelCell
254
+ }))));
255
+ }
256
+ function topLeft$1(worksheet, given) {
257
+ if (typeof given === "string") {
258
+ const cell = worksheet.getCell(given);
259
+ return {
260
+ row: Number(cell.row),
261
+ column: Number(cell.col)
262
+ };
263
+ }
264
+ return {
265
+ row: given?.row ?? 1,
266
+ column: given?.column ?? 1
267
+ };
268
+ }
269
+ //#endregion
270
+ //#region src/excel/export-pivot-grid.ts
271
+ /** Excel's rows and columns in a worksheet. */
272
+ var EXCEL_LIMITS = {
273
+ rows: 1048576,
274
+ columns: 16384
275
+ };
276
+ /** Excel's longest worksheet name. */
277
+ var NAME_LENGTH = 31;
278
+ /**
279
+ * Writes a PivotGrid to an ExcelJS worksheet: the rows of column headers (merged over the columns they cover) and the
280
+ * corner, then a row per line of the table with its row headers (merged down the lines they cover), every open member's
281
+ * (read whole where the pivot is read in parts). Numbers stay numbers with the format their cells show them with, totals
282
+ * are bold, and the headers stay in view. A table larger than a worksheet (1,048,576 rows, 16,384 columns) goes on in
283
+ * worksheets added after it, each with the rows of column headers and the columns of row headers again. Provide your own
284
+ * ExcelJS: create the workbook and the worksheet, then save the workbook when the promise resolves.
285
+ *
286
+ * @example
287
+ * onExporting={(e) => {
288
+ * if (e.format !== 'xlsx') return;
289
+ * const workbook = new ExcelJS.Workbook();
290
+ * exportPivotGrid({ component: e.component, worksheet: workbook.addWorksheet('Sales') })
291
+ * .then(() => workbook.xlsx.writeBuffer())
292
+ * .then((buffer) => saveFile(new Blob([buffer]), 'Sales.xlsx'));
293
+ * }}
294
+ */
295
+ function exportPivotGrid(options) {
296
+ if (!options || typeof options !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportPivotGrid needs an options object."));
297
+ const { component, worksheet } = options;
298
+ if (!component || typeof component.exportSheet !== "function" || typeof component.chartData !== "function") return Promise.reject(/* @__PURE__ */ new TypeError("exportPivotGrid: `component` must be a PivotGrid."));
299
+ if (!worksheet || typeof worksheet !== "object") return Promise.reject(/* @__PURE__ */ new TypeError("exportPivotGrid: `worksheet` must be an ExcelJS worksheet."));
300
+ const start = topLeft(worksheet, options.topLeftCell);
301
+ return component.exportSheet({
302
+ format: "xlsx",
303
+ headers: options.headers,
304
+ onProgress: options.onProgress,
305
+ signal: options.signal,
306
+ loadPanel: options.loadPanel ?? true
307
+ }, (sheet) => {
308
+ const tree = sheet.rowHeaderLayout === "tree";
309
+ const customize = (cell, excelCell) => {
310
+ const p = cell.pivotCell;
311
+ if (tree && p.area === "row" && p.kind !== "dataField" && (p.path?.length ?? 0) > 1) excelCell.alignment = {
312
+ ...excelCell.alignment,
313
+ indent: p.path.length - 1
314
+ };
315
+ options.customizeCell?.({
316
+ pivotCell: p,
317
+ excelCell
318
+ });
319
+ };
320
+ return writePivotSheets(sheet, worksheet, start, {
321
+ ...options,
322
+ autoFilterEnabled: false,
323
+ booleanText: false
324
+ }, customize);
325
+ });
326
+ }
327
+ /**
328
+ * Writes a pivot's sheet from `start` on a worksheet, and where it does not fit in one (`limits`), on worksheets added
329
+ * after it: the rows by as many as fit, then the columns, each part under the rows of column headers and after the
330
+ * columns of row headers again.
331
+ */
332
+ function writePivotSheets(sheet, first, start, options, customize, limits = EXCEL_LIMITS) {
333
+ const head = sheet.headerRows;
334
+ const side = sheet.headerColumns;
335
+ const rowsEach = limits.rows - (start.row - 1) - head;
336
+ const columnsEach = limits.columns - (start.column - 1) - side;
337
+ if (rowsEach < 1 || columnsEach < 1) throw new RangeError("exportPivotGrid: the headers do not fit in a worksheet from `topLeftCell`.");
338
+ const rowParts = Math.max(1, Math.ceil((sheet.rows.length - head) / rowsEach));
339
+ const columnParts = Math.max(1, Math.ceil((sheet.columns.length - side) / columnsEach));
340
+ const worksheets = [];
341
+ let range = null;
342
+ for (let r = 0; r < rowParts; r++) for (let c = 0; c < columnParts; c++) {
343
+ const worksheet = worksheets.length ? addSheet(first, worksheets.length + 1) : first;
344
+ const written = writeSheet(sliceSheet(sheet, head + r * rowsEach, head + (r + 1) * rowsEach, side + c * columnsEach, side + (c + 1) * columnsEach), worksheet, start, options, customize);
345
+ range ??= written;
346
+ worksheets.push(worksheet);
347
+ }
348
+ return {
349
+ ...range,
350
+ worksheets
351
+ };
352
+ }
353
+ /** A worksheet after the first, named after it with its number: "Sales (2)". */
354
+ function addSheet(first, n) {
355
+ const workbook = first.workbook;
356
+ const named = (k) => `${first.name.slice(0, NAME_LENGTH - String(k).length - 3)} (${k})`;
357
+ let k = n;
358
+ while (workbook.getWorksheet(named(k))) k++;
359
+ return workbook.addWorksheet(named(k));
360
+ }
361
+ function topLeft(worksheet, given) {
362
+ if (typeof given === "string") {
363
+ const cell = worksheet.getCell(given);
364
+ return {
365
+ row: Number(cell.row),
366
+ column: Number(cell.col)
367
+ };
368
+ }
369
+ return {
370
+ row: given?.row ?? 1,
371
+ column: given?.column ?? 1
372
+ };
373
+ }
374
+ //#endregion
375
+ export { excelDateFormat, excelNumberFormat, exportDataGrid, exportPivotGrid };
242
376
 
243
377
  //# sourceMappingURL=index.js.map