@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.
- package/CHANGELOG.md +379 -0
- package/README.md +2 -0
- package/dist/components/chart/Chart.d.ts +6 -4
- package/dist/components/chart/ChartPlot.d.ts +2 -1
- package/dist/components/chart/plot-view.d.ts +10 -2
- package/dist/components/chat/Chat.d.ts +276 -0
- package/dist/components/chat/ChatComposer.d.ts +172 -0
- package/dist/components/chat/ChatReply.d.ts +53 -0
- package/dist/components/chat/ChatWriter.d.ts +119 -0
- package/dist/components/chat/chat-ask-form.d.ts +64 -0
- package/dist/components/chat/chat-asked-entry.d.ts +21 -0
- package/dist/components/chat/chat-attachment-entry.d.ts +18 -0
- package/dist/components/chat/chat-choices-view.d.ts +40 -0
- package/dist/components/chat/chat-command.d.ts +7 -0
- package/dist/components/chat/chat-compaction-entry.d.ts +19 -0
- package/dist/components/chat/chat-composer-props.d.ts +63 -0
- package/dist/components/chat/chat-context-changed-event-args.d.ts +8 -0
- package/dist/components/chat/chat-context-item.d.ts +14 -0
- package/dist/components/chat/chat-copy-button.d.ts +11 -0
- package/dist/components/chat/chat-entry.d.ts +20 -0
- package/dist/components/chat/chat-flow-view.d.ts +32 -0
- package/dist/components/chat/chat-form-entry.d.ts +24 -0
- package/dist/components/chat/chat-form-view.d.ts +48 -0
- package/dist/components/chat/chat-history-event-args.d.ts +31 -0
- package/dist/components/chat/chat-load-older-event-args.d.ts +17 -0
- package/dist/components/chat/chat-look.d.ts +33 -0
- package/dist/components/chat/chat-mention.d.ts +21 -0
- package/dist/components/chat/chat-message-status.d.ts +2 -0
- package/dist/components/chat/chat-message.d.ts +23 -0
- package/dist/components/chat/chat-notice-entry.d.ts +20 -0
- package/dist/components/chat/chat-option.d.ts +7 -0
- package/dist/components/chat/chat-part.d.ts +110 -0
- package/dist/components/chat/chat-plan-entry.d.ts +25 -0
- package/dist/components/chat/chat-props.d.ts +70 -0
- package/dist/components/chat/chat-question-view.d.ts +41 -0
- package/dist/components/chat/chat-request.d.ts +173 -0
- package/dist/components/chat/chat-role.d.ts +2 -0
- package/dist/components/chat/chat-search-bar.d.ts +27 -0
- package/dist/components/chat/chat-search.d.ts +33 -0
- package/dist/components/chat/chat-send-event-args.d.ts +12 -0
- package/dist/components/chat/chat-sources-entry.d.ts +22 -0
- package/dist/components/chat/chat-text-entry.d.ts +20 -0
- package/dist/components/chat/chat-text-part.d.ts +5 -0
- package/dist/components/chat/chat-thinking-entry.d.ts +32 -0
- package/dist/components/chat/chat-todo-entry.d.ts +15 -0
- package/dist/components/chat/chat-tool-entry.d.ts +66 -0
- package/dist/components/chat/chat-tool-init.d.ts +18 -0
- package/dist/components/chat/chat-turn-view.d.ts +53 -0
- package/dist/components/chat/chat-turn.d.ts +8 -0
- package/dist/components/chat/chat-value-changed-event-args.d.ts +6 -0
- package/dist/components/chat/index.d.ts +22 -0
- package/dist/components/contextmenu/ContextMenu.d.ts +4 -0
- package/dist/components/contextmenu/context-menu-props.d.ts +6 -0
- package/dist/components/datagrid/DataGrid.d.ts +0 -12
- package/dist/components/datagrid/column-type.d.ts +2 -1
- package/dist/components/datagrid/grid-column.d.ts +4 -1
- package/dist/components/datagrid/grid-date-interval.d.ts +2 -1
- package/dist/components/datagrid/grid-filter-value.d.ts +2 -7
- package/dist/components/datagrid/grid-header-filter-interval.d.ts +2 -2
- package/dist/components/datagrid/grid-settings.d.ts +6 -3
- package/dist/components/datagrid/grid-sheet-cell.d.ts +3 -6
- package/dist/components/datagrid/grid-sheet-column.d.ts +2 -9
- package/dist/components/datagrid/grid-sheet-merge.d.ts +2 -7
- package/dist/components/datagrid/grid-sheet-row.d.ts +2 -5
- package/dist/components/datagrid/grid-sheet.d.ts +3 -2
- package/dist/components/datagrid/grid-summary-item.d.ts +5 -2
- package/dist/components/datagrid/grid-summary-texts.d.ts +2 -0
- package/dist/components/datagrid/grid-summary-type.d.ts +5 -2
- package/dist/components/datagrid/grid-summary.d.ts +3 -2
- package/dist/components/datagrid/list-option.d.ts +2 -4
- package/dist/components/datagrid/model/ColumnModel.d.ts +21 -3
- package/dist/components/datagrid/model/FilterValues.d.ts +15 -7
- package/dist/components/datagrid/model/GridExport.d.ts +1 -1
- package/dist/components/datagrid/model/GridModel.d.ts +2 -2
- package/dist/components/datagrid/model/LookupTexts.d.ts +1 -1
- package/dist/components/datagrid/view/CellEditor.d.ts +1 -1
- package/dist/components/datagrid/view/ColumnStyles.d.ts +1 -1
- package/dist/components/datagrid/view/GridBody.d.ts +1 -1
- package/dist/components/datagrid/view/HeaderRow.d.ts +3 -1
- package/dist/components/draggable/Draggable.d.ts +14 -3
- package/dist/components/form/MxForm.d.ts +1 -1
- package/dist/components/markdown/Markdown.d.ts +87 -0
- package/dist/components/markdown/code-block.d.ts +57 -0
- package/dist/components/markdown/code-colorer.d.ts +11 -0
- package/dist/components/markdown/code-highlighter.d.ts +9 -0
- package/dist/components/markdown/code-run.d.ts +6 -0
- package/dist/components/markdown/diagram-renderer.d.ts +21 -0
- package/dist/components/markdown/entities.d.ts +2 -0
- package/dist/components/markdown/index.d.ts +8 -0
- package/dist/components/markdown/inline-writer.d.ts +85 -0
- package/dist/components/markdown/markdown-context.d.ts +53 -0
- package/dist/components/markdown/markdown-link-click-event-args.d.ts +9 -0
- package/dist/components/markdown/markdown-props.d.ts +40 -0
- package/dist/components/markdown/markdown-writer.d.ts +95 -0
- package/dist/components/markdown/math-block.d.ts +22 -0
- package/dist/components/markdown/math-renderer.d.ts +18 -0
- package/dist/components/markdown/safe-href.d.ts +5 -0
- package/dist/components/markdown/text-run.d.ts +7 -0
- package/dist/components/menubar/MenuBar.d.ts +4 -0
- package/dist/components/menubar/menu-bar-props.d.ts +6 -0
- package/dist/components/pivotgrid/PivotGrid.d.ts +415 -0
- package/dist/components/pivotgrid/index.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotArrangement.d.ts +29 -0
- package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +169 -0
- package/dist/components/pivotgrid/model/PivotCellRanges.d.ts +63 -0
- package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +47 -0
- package/dist/components/pivotgrid/model/PivotChart.d.ts +49 -0
- package/dist/components/pivotgrid/model/PivotDisplay.d.ts +61 -0
- package/dist/components/pivotgrid/model/PivotDrill.d.ts +19 -0
- package/dist/components/pivotgrid/model/PivotExpansion.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotFields.d.ts +55 -0
- package/dist/components/pivotgrid/model/PivotFilterValues.d.ts +36 -0
- package/dist/components/pivotgrid/model/PivotLayout.d.ts +75 -0
- package/dist/components/pivotgrid/model/PivotLoader.d.ts +29 -0
- package/dist/components/pivotgrid/model/PivotSheet.d.ts +44 -0
- package/dist/components/pivotgrid/model/PivotStateStore.d.ts +19 -0
- package/dist/components/pivotgrid/model/PivotTable.d.ts +78 -0
- package/dist/components/pivotgrid/model/PivotTexts.d.ts +47 -0
- package/dist/components/pivotgrid/model/PivotWindows.d.ts +120 -0
- package/dist/components/pivotgrid/model/pivot-copy.d.ts +26 -0
- package/dist/components/pivotgrid/model/pivot-csv.d.ts +9 -0
- package/dist/components/pivotgrid/model/pivot-header-cell.d.ts +19 -0
- package/dist/components/pivotgrid/model/pivot-line-key.d.ts +17 -0
- package/dist/components/pivotgrid/model/pivot-line.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-area.d.ts +2 -0
- package/dist/components/pivotgrid/pivot-grid-cell-click-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-cell-context.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-cell-dbl-click-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-cell-range.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-cell-selection-changed-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-chart-data.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-chart-options.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-column-resized-event-args.d.ts +8 -0
- package/dist/components/pivotgrid/pivot-grid-column-resizing.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-column.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-content-ready-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-context-menu-preparing-event-args.d.ts +22 -0
- package/dist/components/pivotgrid/pivot-grid-copying-event-args.d.ts +10 -0
- package/dist/components/pivotgrid/pivot-grid-custom-summary-info.d.ts +15 -0
- package/dist/components/pivotgrid/pivot-grid-data-error-event-args.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-drill-down.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-expanded-event-args.d.ts +6 -0
- package/dist/components/pivotgrid/pivot-grid-expanding-event-args.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-export-cell.d.ts +21 -0
- package/dist/components/pivotgrid/pivot-grid-export-options.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-export.d.ts +17 -0
- package/dist/components/pivotgrid/pivot-grid-exported-event-args.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-exporting-event-args.d.ts +17 -0
- package/dist/components/pivotgrid/pivot-grid-field-chooser.d.ts +20 -0
- package/dist/components/pivotgrid/pivot-grid-field-panel.d.ts +16 -0
- package/dist/components/pivotgrid/pivot-grid-field.d.ts +110 -0
- package/dist/components/pivotgrid/pivot-grid-fields-changed-event-args.d.ts +8 -0
- package/dist/components/pivotgrid/pivot-grid-filter-value.d.ts +4 -0
- package/dist/components/pivotgrid/pivot-grid-group-interval.d.ts +7 -0
- package/dist/components/pivotgrid/pivot-grid-header-filter-items-request.d.ts +9 -0
- package/dist/components/pivotgrid/pivot-grid-header-filter-items.d.ts +7 -0
- package/dist/components/pivotgrid/pivot-grid-load-panel.d.ts +11 -0
- package/dist/components/pivotgrid/pivot-grid-props.d.ts +121 -0
- package/dist/components/pivotgrid/pivot-grid-sheet-options.d.ts +14 -0
- package/dist/components/pivotgrid/pivot-grid-sheet.d.ts +19 -0
- package/dist/components/pivotgrid/pivot-grid-state.d.ts +54 -0
- package/dist/components/pivotgrid/pivot-grid-summary-cell.d.ts +29 -0
- package/dist/components/pivotgrid/pivot-grid-summary-display-mode.d.ts +5 -0
- package/dist/components/pivotgrid/pivot-grid-summary-type.d.ts +5 -0
- package/dist/components/pivotgrid/view/PivotFieldChooser.d.ts +71 -0
- package/dist/components/pivotgrid/view/PivotFieldPanel.d.ts +92 -0
- package/dist/components/pivotgrid/view/PivotView.d.ts +263 -0
- package/dist/components/resizable/Resizable.d.ts +2 -0
- package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +4 -0
- package/dist/components/ribbonmenu/RibbonMenu.d.ts +4 -1
- package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +8 -4
- package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +6 -0
- package/dist/components/scheduler/view/TimeView.d.ts +2 -0
- package/dist/components/scrollview/ScrollView.d.ts +48 -1
- package/dist/components/scrollview/index.d.ts +1 -0
- package/dist/components/scrollview/scroll-end-changed-event-args.d.ts +7 -0
- package/dist/components/scrollview/scroll-view-props.d.ts +9 -0
- package/dist/components/splitter/Splitter.d.ts +1 -3
- package/dist/components/tabdocs/TabDocumentManager.d.ts +3 -2
- package/dist/components/textarea/TextArea.d.ts +11 -0
- package/dist/components/textarea/text-area-props.d.ts +12 -1
- package/dist/components/textbox/TextBox.d.ts +3 -0
- package/dist/components/textbox/text-box-props.d.ts +3 -0
- package/dist/components/toolbar/Toolbar.d.ts +70 -1
- package/dist/components/toolbar/index.d.ts +5 -0
- package/dist/components/toolbar/toolbar-added-item.d.ts +9 -0
- package/dist/components/toolbar/toolbar-custom-menu-opening-event-args.d.ts +23 -0
- package/dist/components/toolbar/toolbar-customization.d.ts +18 -0
- package/dist/components/toolbar/toolbar-customized-event-args.d.ts +7 -0
- package/dist/components/toolbar/toolbar-item-display.d.ts +2 -0
- package/dist/components/toolbar/toolbar-item.d.ts +11 -1
- package/dist/components/toolbar/toolbar-props.d.ts +26 -0
- package/dist/components/toolbar/toolbar-targets.d.ts +22 -0
- package/dist/core/clipboard.d.ts +11 -0
- package/dist/core/enter-key-hint.d.ts +2 -0
- package/dist/core/look-watch.d.ts +2 -2
- package/dist/core/measure/look.d.ts +1 -1
- package/dist/core/measure/on-layout.d.ts +1 -1
- package/dist/core/measure/scroll.d.ts +3 -1
- package/dist/core/save-text.d.ts +2 -0
- package/dist/core/ui-strings.d.ts +190 -0
- package/dist/excel/excel-pivot-customize-cell-args.d.ts +8 -0
- package/dist/excel/excel-pivot-export-options.d.ts +44 -0
- package/dist/excel/excel-pivot-export-result.d.ts +6 -0
- package/dist/excel/export-pivot-grid.d.ts +35 -0
- package/dist/excel/index.d.ts +4 -0
- package/dist/excel/index.js +190 -56
- package/dist/excel/index.js.map +1 -1
- package/dist/excel/write-sheet.d.ts +16 -0
- package/dist/{formula-guard-NYlpoA-t.js → formula-guard-Bx48S0u3.js} +2 -2
- package/dist/formula-guard-Bx48S0u3.js.map +1 -0
- package/dist/generated/tokens.d.ts +7527 -4097
- package/dist/index.d.ts +6 -0
- package/dist/index.js +65982 -49896
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +179 -1
- package/dist/locales/tr.json +179 -1
- package/dist/parts/customizer/Customizer.d.ts +12 -6
- package/dist/parts/customizer/customizer-display.d.ts +2 -0
- package/dist/parts/customizer/customizer-node.d.ts +5 -0
- package/dist/parts/customizer/customizer-source.d.ts +15 -3
- package/dist/parts/item-layout/layout-added-item.d.ts +2 -2
- package/dist/parts/menu/MenuList.d.ts +5 -0
- package/dist/parts/popup/Popup.d.ts +2 -0
- package/dist/{components/datagrid/model → parts/table}/CellFormatter.d.ts +8 -8
- package/dist/{components/datagrid/view → parts/table}/HeaderFilter.d.ts +16 -11
- package/dist/parts/table/OffsetList.d.ts +21 -0
- package/dist/parts/table/ScaledOffsets.d.ts +32 -0
- package/dist/{components/datagrid/model → parts/table}/ValueIntervals.d.ts +12 -5
- package/dist/{components/datagrid/model → parts/table}/ValueListAdapter.d.ts +4 -4
- package/dist/parts/table/date-interval.d.ts +2 -0
- package/dist/parts/table/date-type.d.ts +3 -0
- package/dist/{components/datagrid/model → parts/table}/filter-tree-node.d.ts +3 -1
- package/dist/parts/table/filter-value.d.ts +9 -0
- package/dist/parts/table/format-column.d.ts +14 -0
- package/dist/parts/table/header-filter-host.d.ts +27 -0
- package/dist/parts/table/option-of.d.ts +6 -0
- package/dist/parts/table/slice-sheet.d.ts +8 -0
- package/dist/parts/table/table-sheet-cell.d.ts +13 -0
- package/dist/parts/table/table-sheet-column.d.ts +11 -0
- package/dist/parts/table/table-sheet-merge.d.ts +9 -0
- package/dist/parts/table/table-sheet-row.d.ts +8 -0
- package/dist/parts/table/table-sheet.d.ts +24 -0
- package/dist/parts/table/value-interval.d.ts +6 -0
- package/dist/{components/datagrid/model → parts/table}/value-list.d.ts +7 -2
- package/dist/parts/table/value-loader.d.ts +8 -0
- package/dist/parts/table/value-option.d.ts +5 -0
- package/dist/parts/table/value-type.d.ts +5 -0
- package/dist/parts/table/values-result.d.ts +6 -0
- package/dist/parts/window/follow-pointer.d.ts +9 -3
- package/dist/parts/window-list/WindowList.d.ts +105 -0
- package/dist/parts/window-list/window-list-source.d.ts +10 -0
- package/dist/pdf/export-pivot-grid.d.ts +21 -0
- package/dist/pdf/index.d.ts +3 -0
- package/dist/pdf/index.js +143 -16
- package/dist/pdf/index.js.map +1 -1
- package/dist/pdf/pdf-customize-cell-args.d.ts +1 -1
- package/dist/pdf/pdf-pivot-cell-args.d.ts +25 -0
- package/dist/pdf/pdf-pivot-export-options.d.ts +61 -0
- package/dist/pdf/pdf-table.d.ts +38 -6
- package/dist/slice-sheet-C116M42H.js +43 -0
- package/dist/slice-sheet-C116M42H.js.map +1 -0
- package/dist/styles.css +4484 -177
- package/dist/tokens/index.d.ts +7527 -4097
- package/dist/tokens/index.js +7527 -4097
- package/dist/tokens/index.js.map +1 -1
- package/dist/{tr-BvKE8jSF.js → tr-BGbF9uCs.js} +359 -3
- package/dist/tr-BGbF9uCs.js.map +1 -0
- package/docs/accordion.md +1 -1
- package/docs/actionsheet.md +1 -1
- package/docs/appbar.md +1 -1
- package/docs/appmenu-api.md +1 -1
- package/docs/appmenu-programmatic.md +1 -1
- package/docs/appmenu-search.md +1 -1
- package/docs/appmenu.md +1 -1
- package/docs/avatar.md +1 -1
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +1 -1
- package/docs/bottomsheet.md +1 -1
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +1 -1
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +1 -1
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/chat.md +1512 -0
- package/docs/checkbox.md +1 -1
- package/docs/chip.md +2 -2
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/commands.md +1 -1
- package/docs/control.md +1 -1
- package/docs/data.md +1 -1
- package/docs/datagrid-api.md +3 -3
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +1 -1
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +2 -2
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +7 -7
- package/docs/datagrid-layout.md +2 -2
- package/docs/datagrid-lookups.md +1 -1
- package/docs/datagrid-master-detail.md +1 -1
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datebox.md +1 -1
- package/docs/daterangebox.md +1 -1
- package/docs/display.md +1 -1
- package/docs/draggable.md +2 -2
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +1 -1
- package/docs/editors.md +1 -1
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +1 -1
- package/docs/formlayout.md +1 -1
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +1 -1
- package/docs/language.md +1 -1
- package/docs/layout.md +1 -1
- package/docs/listbox.md +1 -1
- package/docs/loadpanel.md +1 -1
- package/docs/lookup.md +1 -1
- package/docs/markdown.md +343 -0
- package/docs/menus-api.md +3 -1
- package/docs/menus-context.md +2 -1
- package/docs/menus-customization.md +5 -1
- package/docs/menus-merging.md +1 -1
- package/docs/menus-programmatic.md +1 -1
- package/docs/menus.md +1 -1
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +1 -1
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/pivotgrid-api.md +180 -0
- package/docs/pivotgrid-chart.md +132 -0
- package/docs/pivotgrid-drilldown.md +142 -0
- package/docs/pivotgrid-export.md +207 -0
- package/docs/pivotgrid-fields.md +245 -0
- package/docs/pivotgrid-keyboard.md +223 -0
- package/docs/pivotgrid-layout.md +663 -0
- package/docs/pivotgrid-panel.md +223 -0
- package/docs/pivotgrid-remote.md +397 -0
- package/docs/pivotgrid-sorting.md +379 -0
- package/docs/pivotgrid-state.md +245 -0
- package/docs/pivotgrid-summaries.md +330 -0
- package/docs/pivotgrid.md +295 -0
- package/docs/popover.md +1 -1
- package/docs/progress.md +1 -1
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +1 -1
- package/docs/rating.md +1 -1
- package/docs/resizable.md +1 -1
- package/docs/ribbonmenu-api.md +2 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +3 -2
- package/docs/ribbonmenu-display.md +1 -1
- package/docs/ribbonmenu-layouts.md +1 -1
- package/docs/ribbonmenu-programmatic.md +1 -1
- package/docs/ribbonmenu.md +3 -1
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +1 -1
- package/docs/shortcuteditor.md +1 -1
- package/docs/showcase-home.md +1 -1
- package/docs/showcase-mail.md +39 -0
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +1 -1
- package/docs/sortable.md +3 -6
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +1 -1
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +1 -1
- package/docs/switch.md +1 -1
- package/docs/tabdocs-dock.md +1 -1
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -1
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +1 -1
- package/docs/tagbox.md +1 -1
- package/docs/textarea.md +4 -1
- package/docs/textbox.md +2 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +687 -1
- package/docs/toolbar-api.md +80 -0
- package/docs/toolbar-customization.md +261 -0
- package/docs/toolbar.md +4 -52
- package/docs/tooltip.md +1 -1
- package/docs/treeview.md +1 -1
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +1 -1
- package/docs/wizard.md +1 -1
- package/llms-full.txt +18989 -12344
- package/llms.txt +29 -2
- package/package.json +2 -2
- package/dist/components/datagrid/model/date-type.d.ts +0 -3
- package/dist/components/datagrid/model/option-of.d.ts +0 -6
- package/dist/components/datagrid/model/value-loader.d.ts +0 -8
- package/dist/formula-guard-NYlpoA-t.js.map +0 -1
- package/dist/tr-BvKE8jSF.js.map +0 -1
- /package/dist/{components/datagrid/model → core}/text-ranges.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/ExtraHeights.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/ScrollGeometry.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/cell-list.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/date-like.d.ts +0 -0
- /package/dist/{components/datagrid/view → parts/table}/editor-value.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/formula-guard.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/parse-date-text.d.ts +0 -0
- /package/dist/{components/datagrid/model → parts/table}/same-value.d.ts +0 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
# PivotGrid: Totals and layout
|
|
2
|
+
|
|
3
|
+
> PivotGrid · @motifx-community/ui 0.1.0-beta.14
|
|
4
|
+
|
|
5
|
+
How the result is laid out: the totals and where they stand, the empty rows and columns, the row headers as a tree or in columns, where several data fields run, which members are open, the menu of the headers and cells, and what a data cell shows. Changing these settings lays the last result out again without loading it.
|
|
6
|
+
|
|
7
|
+
## Totals
|
|
8
|
+
|
|
9
|
+
An open member has a total of its children: `showRowTotals` and `showColumnTotals` switch them on each axis, and a field's `showTotals: false` for its own members. `showRowGrandTotals` and `showColumnGrandTotals` switch the grand totals; an axis without fields shows its grand total anyway, as its only line. Totals follow their members' children, or come before them on the axes `showTotalsPrior` names (`'rows'`, `'columns'` or `'both'`); in the tree layout, a row total before the children stands on its member's own line.
|
|
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
|
+
## Empty rows and columns
|
|
45
|
+
|
|
46
|
+
`showEmptyRows: false` and `showEmptyColumns: false` leave out the rows and the columns whose data fields are all empty at the grand total of the other axis, each with its children and its total. A count or a sum always has a value, so this is for averages, minimums, maximums and custom summaries of fields that are often empty. A member whose children are all left out stands as one that does not open. A pivot [read in parts](pivotgrid-remote.md#parts) asks the data layer for the members that are not empty (`nonEmpty`), so the others are not read at all.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
50
|
+
|
|
51
|
+
const PLACES: [string, string][] = [
|
|
52
|
+
['Marmara', 'İstanbul'],
|
|
53
|
+
['Marmara', 'Bursa'],
|
|
54
|
+
['Central Anatolia', 'Ankara'],
|
|
55
|
+
['Central Anatolia', 'Konya'],
|
|
56
|
+
['Aegean', 'İzmir'],
|
|
57
|
+
['Aegean', 'Muğla'],
|
|
58
|
+
['Black Sea', 'Trabzon'],
|
|
59
|
+
['Mediterranean', 'Antalya'],
|
|
60
|
+
];
|
|
61
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
62
|
+
|
|
63
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
64
|
+
export function makeSales(count: number): Sale[] {
|
|
65
|
+
return Array.from({ length: count }, (_, i) => {
|
|
66
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
67
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
68
|
+
return {
|
|
69
|
+
id: i + 1,
|
|
70
|
+
region,
|
|
71
|
+
city,
|
|
72
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
73
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
74
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
75
|
+
units: 1 + ((i * 31) % 12),
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Row headers and data fields
|
|
82
|
+
|
|
83
|
+
`rowHeaderLayout: 'tree'` (the default) puts the row headers in one column, each level further in, and an open member on a line of its own over its children. `'tabular'` gives each row field a column, and a member stands beside its children, as tall as they are. Several data fields run across the columns under every column member, or down the rows with `dataFieldArea: 'row'`. A field's `width` sets its column of row headers in the tabular layout, or a data field's cells; `rowHeight` fixes the height of a row, which otherwise follows the design language and the density.
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
87
|
+
|
|
88
|
+
const PLACES: [string, string][] = [
|
|
89
|
+
['Marmara', 'İstanbul'],
|
|
90
|
+
['Marmara', 'Bursa'],
|
|
91
|
+
['Central Anatolia', 'Ankara'],
|
|
92
|
+
['Central Anatolia', 'Konya'],
|
|
93
|
+
['Aegean', 'İzmir'],
|
|
94
|
+
['Aegean', 'Muğla'],
|
|
95
|
+
['Black Sea', 'Trabzon'],
|
|
96
|
+
['Mediterranean', 'Antalya'],
|
|
97
|
+
];
|
|
98
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
99
|
+
|
|
100
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
101
|
+
export function makeSales(count: number): Sale[] {
|
|
102
|
+
return Array.from({ length: count }, (_, i) => {
|
|
103
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
104
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
105
|
+
return {
|
|
106
|
+
id: i + 1,
|
|
107
|
+
region,
|
|
108
|
+
city,
|
|
109
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
110
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
111
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
112
|
+
units: 1 + ((i * 31) % 12),
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Column widths
|
|
119
|
+
|
|
120
|
+
The end of a column's header resizes its column by dragging, and so does the end of a title of the corner for a column of row headers; “Width” in a header's menu resizes it with the arrow keys. A data column takes its data field's width, so every column of that data field follows; a row field's column of row headers is its own, and the tree's one column, the column of data field titles and the data columns of several data fields down the rows have widths of their own.
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
124
|
+
|
|
125
|
+
const PLACES: [string, string][] = [
|
|
126
|
+
['Marmara', 'İstanbul'],
|
|
127
|
+
['Marmara', 'Bursa'],
|
|
128
|
+
['Central Anatolia', 'Ankara'],
|
|
129
|
+
['Central Anatolia', 'Konya'],
|
|
130
|
+
['Aegean', 'İzmir'],
|
|
131
|
+
['Aegean', 'Muğla'],
|
|
132
|
+
['Black Sea', 'Trabzon'],
|
|
133
|
+
['Mediterranean', 'Antalya'],
|
|
134
|
+
];
|
|
135
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
136
|
+
|
|
137
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
138
|
+
export function makeSales(count: number): Sale[] {
|
|
139
|
+
return Array.from({ length: count }, (_, i) => {
|
|
140
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
141
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
142
|
+
return {
|
|
143
|
+
id: i + 1,
|
|
144
|
+
region,
|
|
145
|
+
city,
|
|
146
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
147
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
148
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
149
|
+
units: 1 + ((i * 31) % 12),
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
What the user made is kept in the `state` (and with `layoutKey`), over the fields' `width`, and `onColumnResized` tells each column resized with its `width`. `columnWidth(column)` reads a column's width and `resizeColumn(column, width)` sets it from code. `columnResizing` turns resizing off (`enabled: false`) and sets the least width (`minWidth`, 48 by default) and the steps of the keys (`step` and `fineStep`, 10 and 1 pixels); a field's `allowResizing: false` keeps its columns as they are.
|
|
156
|
+
|
|
157
|
+
`wrapColumnHeaders` lets the text of the column headers and of the corner's titles wrap onto more lines, and the rows of column headers grow to hold it. Row headers and cells keep one line: every row of the body has one height, which is what lets the pivot draw only the rows in view.
|
|
158
|
+
|
|
159
|
+
## Opening and closing members
|
|
160
|
+
|
|
161
|
+
A field with `expanded` opens every member of its levels at first. A member's header opens and closes it, by the pointer anywhere on it and by Enter or Space. `onExpanding` comes first, with the member's `area`, `path` and `expanded` (`true` when it opens), and `cancel` keeps it as it is; `onExpanded` follows once the table shows it, after a server's answer where the children are loaded. `expandAll(area)` and `collapseAll(area)` open and close every member of an axis at once, and `expandAll(area, level)` and `collapseAll(area, level)` every member of one of its levels (0 is the top level), without these events.
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
165
|
+
|
|
166
|
+
const PLACES: [string, string][] = [
|
|
167
|
+
['Marmara', 'İstanbul'],
|
|
168
|
+
['Marmara', 'Bursa'],
|
|
169
|
+
['Central Anatolia', 'Ankara'],
|
|
170
|
+
['Central Anatolia', 'Konya'],
|
|
171
|
+
['Aegean', 'İzmir'],
|
|
172
|
+
['Aegean', 'Muğla'],
|
|
173
|
+
['Black Sea', 'Trabzon'],
|
|
174
|
+
['Mediterranean', 'Antalya'],
|
|
175
|
+
];
|
|
176
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
177
|
+
|
|
178
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
179
|
+
export function makeSales(count: number): Sale[] {
|
|
180
|
+
return Array.from({ length: count }, (_, i) => {
|
|
181
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
182
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
183
|
+
return {
|
|
184
|
+
id: i + 1,
|
|
185
|
+
region,
|
|
186
|
+
city,
|
|
187
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
188
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
189
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
190
|
+
units: 1 + ((i * 31) % 12),
|
|
191
|
+
};
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
A field's `allowExpanding: false` keeps the user from opening and closing its members: their headers have no arrow, Enter and Space do nothing on them, and the menu has no such items. `expanded`, `expandAll`, `collapseAll` and the state open them all the same, as the years above.
|
|
197
|
+
|
|
198
|
+
## Context menu
|
|
199
|
+
|
|
200
|
+
A right click, a long press, the Menu key or Shift and F10 opens the kit's context menu on a header, a title of the corner or a data cell, which becomes the active cell. On a member's header it opens or closes the member, opens or closes every member of its level, sorts each field of the other axis by the values of its row or column (with several data fields, by one picked in a submenu; chosen again, the field has its own order), and hides its field; on a data field's title it sorts by that data field and hides it. Each menu ends with the field chooser while `fieldChooser.enabled` is not `false`. A field's `allowSorting: false` or `allowDragging: false` leaves out its items.
|
|
201
|
+
|
|
202
|
+
`onContextMenuPreparing` comes before it opens, with the `area` (`'row'`, `'column'`, `'corner'` or `'data'`), a header's `kind` and `path`, the `field` of the header's level or title, a data cell's `cell` as `onCellClick` has it, and the `items`, which it can add to, take from or reorder; `cancel` opens nothing, and so does an empty list, which leaves the browser's own menu.
|
|
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
|
+
## Cells
|
|
238
|
+
|
|
239
|
+
`emptyText` is shown where no row falls (by default nothing). `cellTemplate` puts content of its own in a data cell, made once per cell; its context (`rowPath`, `columnPath`, `rowKind`, `columnKind`, `dataField`, `value`, `text`) is written in place as the cell shows other values, so read it in getters. `onCellClick` gets the same context and the `event`.
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
243
|
+
|
|
244
|
+
const PLACES: [string, string][] = [
|
|
245
|
+
['Marmara', 'İstanbul'],
|
|
246
|
+
['Marmara', 'Bursa'],
|
|
247
|
+
['Central Anatolia', 'Ankara'],
|
|
248
|
+
['Central Anatolia', 'Konya'],
|
|
249
|
+
['Aegean', 'İzmir'],
|
|
250
|
+
['Aegean', 'Muğla'],
|
|
251
|
+
['Black Sea', 'Trabzon'],
|
|
252
|
+
['Mediterranean', 'Antalya'],
|
|
253
|
+
];
|
|
254
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
255
|
+
|
|
256
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
257
|
+
export function makeSales(count: number): Sale[] {
|
|
258
|
+
return Array.from({ length: count }, (_, i) => {
|
|
259
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
260
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
261
|
+
return {
|
|
262
|
+
id: i + 1,
|
|
263
|
+
region,
|
|
264
|
+
city,
|
|
265
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
266
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
267
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
268
|
+
units: 1 + ((i * 31) % 12),
|
|
269
|
+
};
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
`cellClass` gives a data cell class names, read again whenever its value changes; the look of totals is the design language's, through `data-row-kind` and `data-column-kind`.
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
<PivotGrid data={sales} fields={fields} cellClass={(ctx) => (typeof ctx.value === 'number' && ctx.value < 0 ? 'loss' : undefined)} />
|
|
278
|
+
|
|
279
|
+
.mx-pivot-grid__cell.loss { color: var(--mx-color-danger-fg); }
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Feedback
|
|
283
|
+
|
|
284
|
+
Loading issues…
|
|
285
|
+
|
|
286
|
+
## Example files
|
|
287
|
+
|
|
288
|
+
`Totals.tsx`
|
|
289
|
+
|
|
290
|
+
```tsx
|
|
291
|
+
import { reactive } from '@motifx/core';
|
|
292
|
+
import { ButtonGroup, CheckBox, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
|
|
293
|
+
import { makeSales, type Sale } from './sales';
|
|
294
|
+
|
|
295
|
+
const sales = makeSales(20000);
|
|
296
|
+
|
|
297
|
+
const fields: PivotGridField<Sale>[] = [
|
|
298
|
+
{ field: 'region', title: 'Region', area: 'row', expanded: true },
|
|
299
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
300
|
+
{ field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'], expanded: true },
|
|
301
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
|
|
302
|
+
];
|
|
303
|
+
|
|
304
|
+
const PLACES = [
|
|
305
|
+
{ value: 'none', text: 'After' },
|
|
306
|
+
{ value: 'rows', text: 'Before, rows' },
|
|
307
|
+
{ value: 'columns', text: 'Before, columns' },
|
|
308
|
+
{ value: 'both', text: 'Before, both' },
|
|
309
|
+
];
|
|
310
|
+
|
|
311
|
+
/** The totals of open members and the grand totals, each switched on its own, after their members or before them. */
|
|
312
|
+
export default function Totals() {
|
|
313
|
+
const s = reactive({ rowTotals: true, columnTotals: true, rowGrand: true, columnGrand: true, prior: 'none' as 'none' | 'rows' | 'columns' | 'both' });
|
|
314
|
+
|
|
315
|
+
return (
|
|
316
|
+
<>
|
|
317
|
+
<Stack orientation="horizontal" wrap align="center">
|
|
318
|
+
<CheckBox label="Row totals" x-model={() => s.rowTotals} />
|
|
319
|
+
<CheckBox label="Column totals" x-model={() => s.columnTotals} />
|
|
320
|
+
<CheckBox label="Grand total row" x-model={() => s.rowGrand} />
|
|
321
|
+
<CheckBox label="Grand total column" x-model={() => s.columnGrand} />
|
|
322
|
+
</Stack>
|
|
323
|
+
<ButtonGroup label="Totals" items={PLACES} x-model={() => s.prior} />
|
|
324
|
+
<PivotGrid
|
|
325
|
+
class="pg-totals"
|
|
326
|
+
style="block-size: 22rem"
|
|
327
|
+
data={sales}
|
|
328
|
+
fields={fields}
|
|
329
|
+
showRowTotals={() => s.rowTotals}
|
|
330
|
+
showColumnTotals={() => s.columnTotals}
|
|
331
|
+
showRowGrandTotals={() => s.rowGrand}
|
|
332
|
+
showColumnGrandTotals={() => s.columnGrand}
|
|
333
|
+
showTotalsPrior={() => s.prior}
|
|
334
|
+
label="Sales by region and quarter"
|
|
335
|
+
/>
|
|
336
|
+
</>
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
`sales.ts`
|
|
342
|
+
|
|
343
|
+
```tsx
|
|
344
|
+
export type Sale = { id: number; region: string; city: string; product: string; date: string; amount: number; units: number };
|
|
345
|
+
|
|
346
|
+
const PLACES: [string, string][] = [
|
|
347
|
+
['Marmara', 'İstanbul'],
|
|
348
|
+
['Marmara', 'Bursa'],
|
|
349
|
+
['Central Anatolia', 'Ankara'],
|
|
350
|
+
['Central Anatolia', 'Konya'],
|
|
351
|
+
['Aegean', 'İzmir'],
|
|
352
|
+
['Aegean', 'Muğla'],
|
|
353
|
+
['Black Sea', 'Trabzon'],
|
|
354
|
+
['Mediterranean', 'Antalya'],
|
|
355
|
+
];
|
|
356
|
+
const PRODUCTS = ['Tea', 'Coffee', 'Hazelnuts', 'Figs', 'Olive oil'];
|
|
357
|
+
|
|
358
|
+
/** Sales spread over the places, the products and the days of 2024 and 2025; the same rows every time. */
|
|
359
|
+
export function makeSales(count: number): Sale[] {
|
|
360
|
+
return Array.from({ length: count }, (_, i) => {
|
|
361
|
+
const [region, city] = PLACES[(i * 7) % PLACES.length];
|
|
362
|
+
const day = new Date(2024, 0, 1 + ((i * 13) % 731));
|
|
363
|
+
return {
|
|
364
|
+
id: i + 1,
|
|
365
|
+
region,
|
|
366
|
+
city,
|
|
367
|
+
product: PRODUCTS[(i * 3) % PRODUCTS.length],
|
|
368
|
+
date: `${day.getFullYear()}-${String(day.getMonth() + 1).padStart(2, '0')}-${String(day.getDate()).padStart(2, '0')}`,
|
|
369
|
+
amount: ((i * 7919) % 50000) / 100,
|
|
370
|
+
units: 1 + ((i * 31) % 12),
|
|
371
|
+
};
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
`EmptyMembers.tsx`
|
|
377
|
+
|
|
378
|
+
```tsx
|
|
379
|
+
import { reactive } from '@motifx/core';
|
|
380
|
+
import { CheckBox, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
|
|
381
|
+
import { makeSales, type Sale } from './sales';
|
|
382
|
+
|
|
383
|
+
type Rated = Sale & { rating: number | null };
|
|
384
|
+
|
|
385
|
+
// Ratings were taken from the second half of 2024, nowhere in the Black Sea and never in Muğla.
|
|
386
|
+
const sales: Rated[] = makeSales(20000).map((s) => ({ ...s, rating: s.date < '2024-07-01' || s.region === 'Black Sea' || s.city === 'Muğla' ? null : 1 + (s.id % 5) }));
|
|
387
|
+
|
|
388
|
+
const fields: PivotGridField<Rated>[] = [
|
|
389
|
+
{ field: 'region', title: 'Region', area: 'row', expanded: true },
|
|
390
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
391
|
+
{ field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'], expanded: true },
|
|
392
|
+
{ field: 'rating', title: 'Rating', type: 'number', area: 'data', summaryType: 'avg', format: { maximumFractionDigits: 2 } },
|
|
393
|
+
];
|
|
394
|
+
|
|
395
|
+
/** Rows and columns whose average rating is empty, shown or left out. */
|
|
396
|
+
export default function EmptyMembers() {
|
|
397
|
+
const s = reactive({ rows: true, columns: true });
|
|
398
|
+
|
|
399
|
+
return (
|
|
400
|
+
<>
|
|
401
|
+
<Stack orientation="horizontal" wrap align="center">
|
|
402
|
+
<CheckBox label="Empty rows" x-model={() => s.rows} />
|
|
403
|
+
<CheckBox label="Empty columns" x-model={() => s.columns} />
|
|
404
|
+
</Stack>
|
|
405
|
+
<PivotGrid
|
|
406
|
+
class="pg-empty"
|
|
407
|
+
style="block-size: 22rem"
|
|
408
|
+
data={sales}
|
|
409
|
+
fields={fields}
|
|
410
|
+
showEmptyRows={() => s.rows}
|
|
411
|
+
showEmptyColumns={() => s.columns}
|
|
412
|
+
label="Average rating by region and quarter"
|
|
413
|
+
/>
|
|
414
|
+
</>
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
`Tabular.tsx`
|
|
420
|
+
|
|
421
|
+
```tsx
|
|
422
|
+
import { reactive } from '@motifx/core';
|
|
423
|
+
import { ButtonGroup, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
|
|
424
|
+
import { makeSales, type Sale } from './sales';
|
|
425
|
+
|
|
426
|
+
const fields: PivotGridField<Sale>[] = [
|
|
427
|
+
{ field: 'region', title: 'Region', area: 'row', expanded: true },
|
|
428
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
429
|
+
{ field: 'product', title: 'Product', area: 'column' },
|
|
430
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
|
|
431
|
+
{ field: 'units', title: 'Units', type: 'number', area: 'data', summaryType: 'sum', width: 90 },
|
|
432
|
+
];
|
|
433
|
+
|
|
434
|
+
const sales = makeSales(20000);
|
|
435
|
+
|
|
436
|
+
/** Row headers in a column per field or as a tree, and several data fields across the columns or down the rows. */
|
|
437
|
+
export default function Tabular() {
|
|
438
|
+
const s = reactive({ layout: 'tabular' as 'tabular' | 'tree', area: 'column' as 'column' | 'row' });
|
|
439
|
+
|
|
440
|
+
return (
|
|
441
|
+
<>
|
|
442
|
+
<Stack orientation="horizontal" wrap align="center">
|
|
443
|
+
<ButtonGroup label="Row headers" items={[{ value: 'tabular', text: 'Tabular' }, { value: 'tree', text: 'Tree' }]} x-model={() => s.layout} />
|
|
444
|
+
<ButtonGroup label="Data fields" items={[{ value: 'column', text: 'Across' }, { value: 'row', text: 'Down' }]} x-model={() => s.area} />
|
|
445
|
+
</Stack>
|
|
446
|
+
<PivotGrid
|
|
447
|
+
class="pg-tabular"
|
|
448
|
+
style="block-size: 26rem"
|
|
449
|
+
data={sales}
|
|
450
|
+
fields={fields}
|
|
451
|
+
rowHeaderLayout={() => s.layout}
|
|
452
|
+
dataFieldArea={() => s.area}
|
|
453
|
+
label="Sales by city and product"
|
|
454
|
+
/>
|
|
455
|
+
</>
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
`ColumnWidths.tsx`
|
|
461
|
+
|
|
462
|
+
```tsx
|
|
463
|
+
import { reactive } from '@motifx/core';
|
|
464
|
+
import { CheckBox, PivotGrid, type PivotGridColumn, type PivotGridField } from '@motifx-community/ui';
|
|
465
|
+
import { makeSales, type Sale } from './sales';
|
|
466
|
+
|
|
467
|
+
const fields: PivotGridField<Sale>[] = [
|
|
468
|
+
{ field: 'region', title: 'Region', area: 'row' },
|
|
469
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
470
|
+
{ field: 'product', title: 'Product', area: 'column' },
|
|
471
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
|
|
472
|
+
];
|
|
473
|
+
|
|
474
|
+
const sales = makeSales(20000);
|
|
475
|
+
|
|
476
|
+
/** What a column is called: its field's title. */
|
|
477
|
+
const titleOf = (column: PivotGridColumn<Sale>) => ('field' in column && column.field ? column.field.title : column.area);
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Columns resized at the end of a header (a title of the corner for a column of row headers), or with "Width" in its
|
|
481
|
+
* menu and the arrow keys; narrow, the column headers' text wraps.
|
|
482
|
+
*/
|
|
483
|
+
export default function ColumnWidths() {
|
|
484
|
+
const s = reactive({ told: '', wrap: true });
|
|
485
|
+
|
|
486
|
+
return (
|
|
487
|
+
<>
|
|
488
|
+
<CheckBox label="Wrap column headers" x-model={() => s.wrap} />
|
|
489
|
+
<PivotGrid
|
|
490
|
+
class="pg-widths"
|
|
491
|
+
style="block-size: 20rem"
|
|
492
|
+
data={sales}
|
|
493
|
+
fields={fields}
|
|
494
|
+
rowHeaderLayout="tabular"
|
|
495
|
+
label="Sales by city and product"
|
|
496
|
+
columnResizing={{ minWidth: 60 }}
|
|
497
|
+
wrapColumnHeaders={() => s.wrap}
|
|
498
|
+
onColumnResized={(e) => (s.told = `${titleOf(e.column)}: ${e.width} px`)}
|
|
499
|
+
/>
|
|
500
|
+
<output class="pg-widths-told">{() => s.told}</output>
|
|
501
|
+
</>
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
`Expanding.tsx`
|
|
507
|
+
|
|
508
|
+
```tsx
|
|
509
|
+
import { reactive } from '@motifx/core';
|
|
510
|
+
import { Button, PivotGrid, Stack, type PivotGridField } from '@motifx-community/ui';
|
|
511
|
+
import { makeSales, type Sale } from './sales';
|
|
512
|
+
|
|
513
|
+
const sales = makeSales(20000);
|
|
514
|
+
|
|
515
|
+
const fields: PivotGridField<Sale>[] = [
|
|
516
|
+
{ field: 'region', title: 'Region', area: 'row' },
|
|
517
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
518
|
+
// The years open from code only: their headers have no arrow.
|
|
519
|
+
{ field: 'date', title: 'Date', type: 'date', area: 'column', groupInterval: ['year', 'quarter'], allowExpanding: false },
|
|
520
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
|
|
521
|
+
];
|
|
522
|
+
|
|
523
|
+
/** Every member opened and closed from code, a member kept closed by `onExpanding`, years the user does not open, and a log of the events. */
|
|
524
|
+
export default function Expanding() {
|
|
525
|
+
const s = reactive({ log: [] as { id: number; text: string }[] });
|
|
526
|
+
let next = 0;
|
|
527
|
+
const log = (text: string) => {
|
|
528
|
+
s.log.unshift({ id: ++next, text });
|
|
529
|
+
if (s.log.length > 5) s.log.pop();
|
|
530
|
+
};
|
|
531
|
+
let grid: PivotGrid<Sale> | null = null;
|
|
532
|
+
|
|
533
|
+
return (
|
|
534
|
+
<>
|
|
535
|
+
<PivotGrid
|
|
536
|
+
class="pg-expanding"
|
|
537
|
+
style="block-size: 22rem"
|
|
538
|
+
data={sales}
|
|
539
|
+
fields={fields}
|
|
540
|
+
label="Sales by region and quarter"
|
|
541
|
+
onExpanding={(e) => {
|
|
542
|
+
if (e.area === 'row' && e.expanded && e.path[0] === 'Mediterranean') {
|
|
543
|
+
e.cancel = true;
|
|
544
|
+
log('Mediterranean stays closed');
|
|
545
|
+
}
|
|
546
|
+
}}
|
|
547
|
+
onExpanded={(e) => log(`${e.expanded ? 'Opened' : 'Closed'} ${e.path.join(' › ')}`)}
|
|
548
|
+
onContentReady={(e) => log(`Drawn: ${e.result?.rows.children?.length ?? 0} regions`)}
|
|
549
|
+
ref={(g: PivotGrid<Sale>) => (grid = g)}
|
|
550
|
+
/>
|
|
551
|
+
<Stack orientation="horizontal" wrap align="center">
|
|
552
|
+
<Button text="Open every row" variant="outline" onclick={() => grid?.expandAll('row')} />
|
|
553
|
+
<Button text="Close every row" variant="outline" onclick={() => grid?.collapseAll('row')} />
|
|
554
|
+
<Button text="Open every column" variant="outline" onclick={() => grid?.expandAll('column')} />
|
|
555
|
+
<Button text="Close every column" variant="outline" onclick={() => grid?.collapseAll('column')} />
|
|
556
|
+
</Stack>
|
|
557
|
+
<ol class="pg-expanding-log" aria-label="What happened" aria-live="polite">
|
|
558
|
+
{s.log.map((entry) => (
|
|
559
|
+
<li key={entry.id}>{entry.text}</li>
|
|
560
|
+
))}
|
|
561
|
+
</ol>
|
|
562
|
+
</>
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
`ContextMenu.tsx`
|
|
568
|
+
|
|
569
|
+
```tsx
|
|
570
|
+
import { reactive } from '@motifx/core';
|
|
571
|
+
import { PivotGrid, type PivotGridField } from '@motifx-community/ui';
|
|
572
|
+
import { makeSales, type Sale } from './sales';
|
|
573
|
+
|
|
574
|
+
const sales = makeSales(20000);
|
|
575
|
+
|
|
576
|
+
const fields: PivotGridField<Sale>[] = [
|
|
577
|
+
{ field: 'region', title: 'Region', area: 'row' },
|
|
578
|
+
{ field: 'city', title: 'City', area: 'row' },
|
|
579
|
+
{ field: 'product', title: 'Product', area: 'column' },
|
|
580
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 } },
|
|
581
|
+
{ field: 'units', title: 'Units', type: 'number', area: 'data', summaryType: 'sum' },
|
|
582
|
+
];
|
|
583
|
+
|
|
584
|
+
/** The pivot's menu on its headers and cells, with an item of the app's own on a data cell. */
|
|
585
|
+
export default function ContextMenu() {
|
|
586
|
+
const s = reactive({ picked: 'Right-click a data cell, or press Shift+F10 on it, and choose “Note this value”.' });
|
|
587
|
+
|
|
588
|
+
return (
|
|
589
|
+
<>
|
|
590
|
+
<PivotGrid
|
|
591
|
+
class="pg-menu"
|
|
592
|
+
style="block-size: 22rem"
|
|
593
|
+
data={sales}
|
|
594
|
+
fields={fields}
|
|
595
|
+
fieldPanel={{ visible: true }}
|
|
596
|
+
label="Sales with a menu on every header and cell"
|
|
597
|
+
onContextMenuPreparing={(e) => {
|
|
598
|
+
const cell = e.cell;
|
|
599
|
+
if (e.area !== 'data' || !cell) return;
|
|
600
|
+
const where = [cell.rowPath.join(' › ') || 'Grand total', cell.columnPath.join(' › ') || 'Grand total'].join(', ');
|
|
601
|
+
e.items.unshift({ text: 'Note this value', click: () => (s.picked = `${cell.dataField?.title}, ${where}: ${cell.text}`) });
|
|
602
|
+
}}
|
|
603
|
+
/>
|
|
604
|
+
<p class="pg-menu-note" aria-live="polite">
|
|
605
|
+
{s.picked}
|
|
606
|
+
</p>
|
|
607
|
+
</>
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
`Cells.tsx`
|
|
613
|
+
|
|
614
|
+
```tsx
|
|
615
|
+
import { reactive } from '@motifx/core';
|
|
616
|
+
import { PivotGrid, type PivotGridCellContext, type PivotGridField } from '@motifx-community/ui';
|
|
617
|
+
import { makeSales, type Sale } from './sales';
|
|
618
|
+
|
|
619
|
+
const sales = makeSales(20000);
|
|
620
|
+
|
|
621
|
+
const fields: PivotGridField<Sale>[] = [
|
|
622
|
+
{ field: 'region', title: 'Region', area: 'row' },
|
|
623
|
+
{ field: 'city', title: 'City', area: 'column' },
|
|
624
|
+
{ field: 'amount', title: 'Amount', type: 'number', area: 'data', summaryType: 'sum', format: { maximumFractionDigits: 0 }, width: 150 },
|
|
625
|
+
];
|
|
626
|
+
|
|
627
|
+
// The largest amount of a city: the bars are measured against it.
|
|
628
|
+
const byCity = new Map<string, number>();
|
|
629
|
+
for (const sale of sales) byCity.set(sale.city, (byCity.get(sale.city) ?? 0) + sale.amount);
|
|
630
|
+
const largest = Math.max(...byCity.values());
|
|
631
|
+
|
|
632
|
+
// A bar before the text in the cells of a region and a city; the context is written in place, so the getters follow.
|
|
633
|
+
function cell(ctx: PivotGridCellContext<Sale>) {
|
|
634
|
+
const share = () => (ctx.rowKind === 'member' && ctx.columnKind === 'member' && typeof ctx.value === 'number' ? Math.round((ctx.value / largest) * 40) : 0);
|
|
635
|
+
return (
|
|
636
|
+
<span style="display: flex; align-items: center; gap: var(--mx-space-2); inline-size: 100%">
|
|
637
|
+
<span style={() => `flex: none; block-size: 0.375rem; border-radius: var(--mx-radius-full); background: var(--mx-color-accent-fg); inline-size: ${share()}%`} />
|
|
638
|
+
<span style="margin-inline-start: auto">{() => ctx.text}</span>
|
|
639
|
+
</span>
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/** Content of its own in the data cells, a text where no sale falls, and the cell clicked. */
|
|
644
|
+
export default function Cells() {
|
|
645
|
+
const s = reactive({ clicked: 'Click a cell.' });
|
|
646
|
+
|
|
647
|
+
return (
|
|
648
|
+
<>
|
|
649
|
+
<PivotGrid
|
|
650
|
+
class="pg-cells"
|
|
651
|
+
style="block-size: 18rem"
|
|
652
|
+
data={sales}
|
|
653
|
+
fields={fields}
|
|
654
|
+
emptyText="–"
|
|
655
|
+
cellTemplate={cell}
|
|
656
|
+
onCellClick={(e) => (s.clicked = `${e.rowPath.join(' › ') || 'Grand total'}, ${e.columnPath.join(' › ') || 'Grand total'}: ${e.value === undefined ? 'no sales' : e.text}`)}
|
|
657
|
+
label="Sales by region and city"
|
|
658
|
+
/>
|
|
659
|
+
<output class="pg-cells-clicked">{() => s.clicked}</output>
|
|
660
|
+
</>
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
```
|