@restio/ui 0.0.7-SNAPSHOT → 0.0.9-SNAPSHOT
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/dist/components/anchored-overlay/anchored-overlay-types.d.ts +1 -1
- package/dist/components/anchored-overlay/anchored-overlay-types.js +2 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.js.map +1 -0
- package/dist/components/anchored-overlay/anchored-overlay.d.ts +2 -2
- package/dist/components/anchored-overlay/anchored-overlay.js +67 -0
- package/dist/components/anchored-overlay/anchored-overlay.js.map +1 -0
- package/dist/components/banner/banner-types.d.ts +1 -1
- package/dist/components/banner/banner-types.js +2 -0
- package/dist/components/banner/banner-types.js.map +1 -0
- package/dist/components/banner/banner.d.ts +2 -2
- package/dist/components/banner/banner.js +29 -0
- package/dist/components/banner/banner.js.map +1 -0
- package/dist/components/button/button-types.d.ts +1 -1
- package/dist/components/button/button-types.js +2 -0
- package/dist/components/button/button-types.js.map +1 -0
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +20 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button-group/button-group-types.js +2 -0
- package/dist/components/button-group/button-group-types.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +2 -2
- package/dist/components/button-group/button-group.js +16 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/checkbox/checkbox-types.d.ts +1 -1
- package/dist/components/checkbox/checkbox-types.js +2 -0
- package/dist/components/checkbox/checkbox-types.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -2
- package/dist/components/checkbox/checkbox.js +19 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +1 -1
- package/dist/components/code-block/code-block.js +9 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/file-upload/file-upload-types.d.ts +1 -1
- package/dist/components/file-upload/file-upload-types.js +2 -0
- package/dist/components/file-upload/file-upload-types.js.map +1 -0
- package/dist/components/file-upload/file-upload-utils.js +10 -0
- package/dist/components/file-upload/file-upload-utils.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +2 -2
- package/dist/components/file-upload/file-upload.js +106 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/graph/graph-types.js +2 -0
- package/dist/components/graph/graph-types.js.map +1 -0
- package/dist/components/graph/graph.d.ts +1 -1
- package/dist/components/graph/graph.js +21 -0
- package/dist/components/graph/graph.js.map +1 -0
- package/dist/components/input/date/date-calendar.d.ts +2 -2
- package/dist/components/input/date/date-calendar.js +114 -0
- package/dist/components/input/date/date-calendar.js.map +1 -0
- package/dist/components/input/date/date-input-field.d.ts +2 -2
- package/dist/components/input/date/date-input-field.js +61 -0
- package/dist/components/input/date/date-input-field.js.map +1 -0
- package/dist/components/input/date/date-picker.d.ts +2 -2
- package/dist/components/input/date/date-picker.js +35 -0
- package/dist/components/input/date/date-picker.js.map +1 -0
- package/dist/components/input/date/date-range-input-field.d.ts +2 -2
- package/dist/components/input/date/date-range-input-field.js +90 -0
- package/dist/components/input/date/date-range-input-field.js.map +1 -0
- package/dist/components/input/date/date-range-picker.d.ts +2 -2
- package/dist/components/input/date/date-range-picker.js +74 -0
- package/dist/components/input/date/date-range-picker.js.map +1 -0
- package/dist/components/input/date/date-shortcuts.d.ts +2 -2
- package/dist/components/input/date/date-shortcuts.js +47 -0
- package/dist/components/input/date/date-shortcuts.js.map +1 -0
- package/dist/components/input/date/date-types.d.ts +1 -1
- package/dist/components/input/date/date-types.js +2 -0
- package/dist/components/input/date/date-types.js.map +1 -0
- package/dist/components/input/date/date-utils.d.ts +1 -1
- package/dist/components/input/date/date-utils.js +203 -0
- package/dist/components/input/date/date-utils.js.map +1 -0
- package/dist/components/input/input-types.js +2 -0
- package/dist/components/input/input-types.js.map +1 -0
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +14 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/number/input-number-types.d.ts +1 -1
- package/dist/components/input/number/input-number-types.js +2 -0
- package/dist/components/input/number/input-number-types.js.map +1 -0
- package/dist/components/input/number/input-number.d.ts +2 -2
- package/dist/components/input/number/input-number.js +11 -0
- package/dist/components/input/number/input-number.js.map +1 -0
- package/dist/components/input/text/input-text-types.d.ts +1 -1
- package/dist/components/input/text/input-text-types.js +2 -0
- package/dist/components/input/text/input-text-types.js.map +1 -0
- package/dist/components/input/text/input-text.d.ts +2 -2
- package/dist/components/input/text/input-text.js +8 -0
- package/dist/components/input/text/input-text.js.map +1 -0
- package/dist/components/kbd/kbd-types.js +2 -0
- package/dist/components/kbd/kbd-types.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +2 -2
- package/dist/components/kbd/kbd.js +12 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd-group/kbd-group-types.js +2 -0
- package/dist/components/kbd-group/kbd-group-types.js.map +1 -0
- package/dist/components/kbd-group/kbd-group.d.ts +2 -2
- package/dist/components/kbd-group/kbd-group.js +15 -0
- package/dist/components/kbd-group/kbd-group.js.map +1 -0
- package/dist/components/list/list-types.d.ts +1 -1
- package/dist/components/list/list-types.js +2 -0
- package/dist/components/list/list-types.js.map +1 -0
- package/dist/components/list/list-utils.d.ts +4 -4
- package/dist/components/list/list-utils.js +73 -0
- package/dist/components/list/list-utils.js.map +1 -0
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +68 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/menu/anchored-navigation-menu.d.ts +3 -3
- package/dist/components/menu/anchored-navigation-menu.js +48 -0
- package/dist/components/menu/anchored-navigation-menu.js.map +1 -0
- package/dist/components/menu/menu-assets.d.ts +1 -1
- package/dist/components/menu/menu-assets.js +35 -0
- package/dist/components/menu/menu-assets.js.map +1 -0
- package/dist/components/menu/menu-types.d.ts +2 -2
- package/dist/components/menu/menu-types.js +2 -0
- package/dist/components/menu/menu-types.js.map +1 -0
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/menu/menu.js +86 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/otp/otp-types.js +2 -0
- package/dist/components/otp/otp-types.js.map +1 -0
- package/dist/components/otp/otp-utils.js +22 -0
- package/dist/components/otp/otp-utils.js.map +1 -0
- package/dist/components/otp/otp.d.ts +3 -2
- package/dist/components/otp/otp.js +85 -0
- package/dist/components/otp/otp.js.map +1 -0
- package/dist/components/select/select-types.d.ts +1 -1
- package/dist/components/select/select-types.js +2 -0
- package/dist/components/select/select-types.js.map +1 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +52 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/tag/tag-types.d.ts +1 -1
- package/dist/components/tag/tag-types.js +2 -0
- package/dist/components/tag/tag-types.js.map +1 -0
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +16 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/textarea/textarea-types.d.ts +2 -2
- package/dist/components/textarea/textarea-types.js +2 -0
- package/dist/components/textarea/textarea-types.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +19 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/toast-group/toast-group-types.d.ts +1 -1
- package/dist/components/toast-group/toast-group-types.js +2 -0
- package/dist/components/toast-group/toast-group-types.js.map +1 -0
- package/dist/components/toast-group/toast-group.d.ts +2 -2
- package/dist/components/toast-group/toast-group.js +25 -0
- package/dist/components/toast-group/toast-group.js.map +1 -0
- package/dist/components/typography/typography-types.d.ts +1 -1
- package/dist/components/typography/typography-types.js +11 -0
- package/dist/components/typography/typography-types.js.map +1 -0
- package/dist/components/typography/typography.d.ts +2 -2
- package/dist/components/typography/typography.js +17 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/custom-components/chat/chat-types.d.ts +1 -1
- package/dist/custom-components/chat/chat-types.js +2 -0
- package/dist/custom-components/chat/chat-types.js.map +1 -0
- package/dist/custom-components/chat/chat.d.ts +1 -1
- package/dist/custom-components/chat/chat.js +14 -0
- package/dist/custom-components/chat/chat.js.map +1 -0
- package/dist/custom-components/layout/layout-types.js +2 -0
- package/dist/custom-components/layout/layout-types.js.map +1 -0
- package/dist/custom-components/layout/layout.d.ts +2 -2
- package/dist/custom-components/layout/layout.js +46 -0
- package/dist/custom-components/layout/layout.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js +25 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js +169 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js +206 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js +251 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +8 -2
- package/dist/custom-components/layout-builder/layout-builder-validation.js +445 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-builder.js +908 -0
- package/dist/custom-components/layout-builder/layout-builder.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +1 -1
- package/dist/custom-components/layout-builder/layout-json-editor-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-json-editor.js +103 -0
- package/dist/custom-components/layout-builder/layout-json-editor.js.map +1 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js +100 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js.map +1 -0
- package/dist/custom-components/markdown/markdown-types.d.ts +3 -3
- package/dist/custom-components/markdown/markdown-types.js +2 -0
- package/dist/custom-components/markdown/markdown-types.js.map +1 -0
- package/dist/custom-components/markdown/markdown-utils.js +10 -0
- package/dist/custom-components/markdown/markdown-utils.js.map +1 -0
- package/dist/custom-components/markdown/markdown.d.ts +2 -2
- package/dist/custom-components/markdown/markdown.js +39 -0
- package/dist/custom-components/markdown/markdown.js.map +1 -0
- package/dist/custom-components/mindmap/index.d.ts +2 -2
- package/dist/custom-components/mindmap/index.js +2 -0
- package/dist/custom-components/mindmap/index.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree-types.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree-types.js +2 -0
- package/dist/custom-components/mindmap/mind-tree-types.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree.js +201 -0
- package/dist/custom-components/mindmap/mind-tree.js.map +1 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +1 -1
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js +277 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js +2 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +2 -2
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js +32 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js.map +1 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +1 -1
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js +19 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js.map +1 -0
- package/dist/custom-components/timeline/timeline-types.js +2 -0
- package/dist/custom-components/timeline/timeline-types.js.map +1 -0
- package/dist/custom-components/timeline/timeline.d.ts +2 -2
- package/dist/custom-components/timeline/timeline.js +64 -0
- package/dist/custom-components/timeline/timeline.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-edge.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-edge.js +31 -0
- package/dist/custom-components/workflow/layout/workflow-edge.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-layout-types.js +2 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout.d.ts +2 -2
- package/dist/custom-components/workflow/layout/workflow-layout.js +284 -0
- package/dist/custom-components/workflow/layout/workflow-layout.js.map +1 -0
- package/dist/custom-components/workflow/node/workflow-node.d.ts +1 -1
- package/dist/custom-components/workflow/node/workflow-node.js +22 -0
- package/dist/custom-components/workflow/node/workflow-node.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel-types.js +2 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel.js +53 -0
- package/dist/custom-components/workflow/panel/workflow-panel.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js +2 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +1 -1
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js +19 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js.map +1 -0
- package/dist/custom-components/workflow/utils/workflow-validation.d.ts +2 -2
- package/dist/custom-components/workflow/utils/workflow-validation.js +257 -0
- package/dist/custom-components/workflow/utils/workflow-validation.js.map +1 -0
- package/dist/custom-components/workflow/workflow-types.d.ts +3 -3
- package/dist/custom-components/workflow/workflow-types.js +2 -0
- package/dist/custom-components/workflow/workflow-types.js.map +1 -0
- package/dist/custom-components/workflow/workflow.d.ts +1 -1
- package/dist/custom-components/workflow/workflow.js +125 -0
- package/dist/custom-components/workflow/workflow.js.map +1 -0
- package/dist/data-components/assets/data-components-asset.js +2 -0
- package/dist/data-components/assets/data-components-asset.js.map +1 -0
- package/dist/data-components/calendar/calendar-types.d.ts +1 -1
- package/dist/data-components/calendar/calendar-types.js +2 -0
- package/dist/data-components/calendar/calendar-types.js.map +1 -0
- package/dist/data-components/calendar/calendar-utils.js +2 -0
- package/dist/data-components/calendar/calendar-utils.js.map +1 -0
- package/dist/data-components/calendar/calendar.d.ts +1 -1
- package/dist/data-components/calendar/calendar.js +78 -0
- package/dist/data-components/calendar/calendar.js.map +1 -0
- package/dist/data-components/cell/cell-switch.d.ts +1 -1
- package/dist/data-components/cell/cell-switch.js +68 -0
- package/dist/data-components/cell/cell-switch.js.map +1 -0
- package/dist/data-components/cell/cell-types.d.ts +2 -2
- package/dist/data-components/cell/cell-types.js +2 -0
- package/dist/data-components/cell/cell-types.js.map +1 -0
- package/dist/data-components/cell/cell-utils.js +60 -0
- package/dist/data-components/cell/cell-utils.js.map +1 -0
- package/dist/data-components/cell/cell.d.ts +1 -1
- package/dist/data-components/cell/cell.js +63 -0
- package/dist/data-components/cell/cell.js.map +1 -0
- package/dist/data-components/chart/chart-types.d.ts +1 -1
- package/dist/data-components/chart/chart-types.js +2 -0
- package/dist/data-components/chart/chart-types.js.map +1 -0
- package/dist/data-components/chart/chart.d.ts +1 -1
- package/dist/data-components/chart/chart.js +121 -0
- package/dist/data-components/chart/chart.js.map +1 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +1 -1
- package/dist/data-components/chart/sankey/sankeyChart.js +111 -0
- package/dist/data-components/chart/sankey/sankeyChart.js.map +1 -0
- package/dist/data-components/data-structure/data-structure-utils.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure-utils.js +28 -0
- package/dist/data-components/data-structure/data-structure-utils.js.map +1 -0
- package/dist/data-components/data-structure/data-structure.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure.js +2 -0
- package/dist/data-components/data-structure/data-structure.js.map +1 -0
- package/dist/data-components/data-structure/stories-assets.d.ts +5 -1
- package/dist/data-components/data-structure/stories-assets.js +199 -0
- package/dist/data-components/data-structure/stories-assets.js.map +1 -0
- package/dist/data-components/form/form-types.d.ts +2 -2
- package/dist/data-components/form/form-types.js +2 -0
- package/dist/data-components/form/form-types.js.map +1 -0
- package/dist/data-components/form/form.d.ts +1 -1
- package/dist/data-components/form/form.js +124 -0
- package/dist/data-components/form/form.js.map +1 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js +31 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js +264 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js +306 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js +33 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js +59 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js +167 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js +157 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js +27 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js +12 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +6 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js +7 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js +15 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js +50 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js +2 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer.js +47 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.js.map +1 -0
- package/dist/data-components/table-grid/formula/evaluator.js +91 -0
- package/dist/data-components/table-grid/formula/evaluator.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder-types.js +2 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder.js +47 -0
- package/dist/data-components/table-grid/formula/formula-builder.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula.test.js +50 -0
- package/dist/data-components/table-grid/formula/formula.test.js.map +1 -0
- package/dist/data-components/table-grid/formula/index.js +40 -0
- package/dist/data-components/table-grid/formula/index.js.map +1 -0
- package/dist/data-components/table-grid/formula/parser.js +179 -0
- package/dist/data-components/table-grid/formula/parser.js.map +1 -0
- package/dist/data-components/table-grid/formula/tokenizer.js +140 -0
- package/dist/data-components/table-grid/formula/tokenizer.js.map +1 -0
- package/dist/data-components/table-grid/formula/types.js +2 -0
- package/dist/data-components/table-grid/formula/types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js +2 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel.js +91 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-column-menu.js +84 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header-types.js +2 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header.js +148 -0
- package/dist/data-components/table-grid/header/table-grid-header.js.map +1 -0
- package/dist/data-components/table-grid/hooks/use-table.d.ts +1 -1
- package/dist/data-components/table-grid/hooks/use-table.js +18 -0
- package/dist/data-components/table-grid/hooks/use-table.js.map +1 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +1 -1
- package/dist/data-components/table-grid/pinning/pinning-utils.js +70 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js +89 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-table.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-table.js +26 -0
- package/dist/data-components/table-grid/pivot/pivot-table.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-types.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-utils.js +150 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +3 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.js +2 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row-utils.js +35 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row.js +68 -0
- package/dist/data-components/table-grid/row/table-grid-row.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-types.js +2 -0
- package/dist/data-components/table-grid/selection/selection-types.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-utils.d.ts +2 -2
- package/dist/data-components/table-grid/selection/selection-utils.js +136 -0
- package/dist/data-components/table-grid/selection/selection-utils.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js +2 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +1 -1
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js +7 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js.map +1 -0
- package/dist/data-components/table-grid/sorting/sorting.d.ts +1 -1
- package/dist/data-components/table-grid/sorting/sorting.js +45 -0
- package/dist/data-components/table-grid/sorting/sorting.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context-types.js +2 -0
- package/dist/data-components/table-grid/table-context/table-context-types.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context.js +4 -0
- package/dist/data-components/table-grid/table-context/table-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-context.js +258 -0
- package/dist/data-components/table-grid/table-grid-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-types.d.ts +9 -7
- package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-types.js +2 -0
- package/dist/data-components/table-grid/table-grid-types.js.map +1 -0
- package/dist/data-components/table-grid/table-grid.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid.js +144 -0
- package/dist/data-components/table-grid/table-grid.js.map +1 -0
- package/dist/data-components/table-grid/table-utils.d.ts +1 -1
- package/dist/data-components/table-grid/table-utils.js +116 -0
- package/dist/data-components/table-grid/table-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js +2 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +1 -1
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js +61 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +2 -2
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js +23 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +1 -1
- package/dist/experimental-components/filter-builder/filter-builder-types.js +2 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder.d.ts +3 -2
- package/dist/experimental-components/filter-builder/filter-builder.js +139 -0
- package/dist/experimental-components/filter-builder/filter-builder.js.map +1 -0
- package/dist/framework-components/appbar/appbar-assets.js +5 -0
- package/dist/framework-components/appbar/appbar-assets.js.map +1 -0
- package/dist/framework-components/appbar/appbar-types.d.ts +1 -1
- package/dist/framework-components/appbar/appbar-types.js +2 -0
- package/dist/framework-components/appbar/appbar-types.js.map +1 -0
- package/dist/framework-components/appbar/appbar.d.ts +2 -2
- package/dist/framework-components/appbar/appbar.js +36 -0
- package/dist/framework-components/appbar/appbar.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js +2 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist/framework-components/breadcrumbs/breadcrumbs.js +31 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/framework-components/drawer/drawer-types.d.ts +2 -2
- package/dist/framework-components/drawer/drawer-types.js +2 -0
- package/dist/framework-components/drawer/drawer-types.js.map +1 -0
- package/dist/framework-components/drawer/drawer.d.ts +2 -2
- package/dist/framework-components/drawer/drawer.js +10 -0
- package/dist/framework-components/drawer/drawer.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-context.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold-context.js +10 -0
- package/dist/framework-components/scaffold/scaffold-context.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-types.d.ts +1 -1
- package/dist/framework-components/scaffold/scaffold-types.js +2 -0
- package/dist/framework-components/scaffold/scaffold-types.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold.js +76 -0
- package/dist/framework-components/scaffold/scaffold.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-assets.js +4 -0
- package/dist/framework-components/sidebar/sidebar-assets.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-context.d.ts +2 -2
- package/dist/framework-components/sidebar/sidebar-context.js +9 -0
- package/dist/framework-components/sidebar/sidebar-context.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js +12 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-types.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar.d.ts +3 -3
- package/dist/framework-components/sidebar/sidebar.js +42 -0
- package/dist/framework-components/sidebar/sidebar.js.map +1 -0
- package/dist/hooks/useDynamicVirtualList.d.ts +76 -0
- package/dist/hooks/useDynamicVirtualList.d.ts.map +1 -0
- package/dist/hooks/useDynamicVirtualList.js +208 -0
- package/dist/hooks/useDynamicVirtualList.js.map +1 -0
- package/dist/hooks/useFixedVirtualList.d.ts +35 -0
- package/dist/hooks/useFixedVirtualList.d.ts.map +1 -0
- package/dist/hooks/useFixedVirtualList.js +64 -0
- package/dist/hooks/useFixedVirtualList.js.map +1 -0
- package/dist/hooks/useShortcut.d.ts +1 -1
- package/dist/hooks/useShortcut.js +86 -0
- package/dist/hooks/useShortcut.js.map +1 -0
- package/dist/hooks/useTour/useTour-context-internal.d.ts +2 -2
- package/dist/hooks/useTour/useTour-context-internal.js +7 -0
- package/dist/hooks/useTour/useTour-context-internal.js.map +1 -0
- package/dist/hooks/useTour/useTour-context.d.ts +3 -3
- package/dist/hooks/useTour/useTour-context.js +54 -0
- package/dist/hooks/useTour/useTour-context.js.map +1 -0
- package/dist/hooks/useTour/useTour-types.d.ts +1 -1
- package/dist/hooks/useTour/useTour-types.js +2 -0
- package/dist/hooks/useTour/useTour-types.js.map +1 -0
- package/dist/hooks/useTour/useTour.d.ts +1 -1
- package/dist/hooks/useTour/useTour.js +408 -0
- package/dist/hooks/useTour/useTour.js.map +1 -0
- package/dist/hooks/useVirtualListScroll.d.ts +1 -1
- package/dist/hooks/useVirtualListScroll.js +79 -0
- package/dist/hooks/useVirtualListScroll.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-prompts.js +98 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js +5 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-validator.js +74 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel-types.js +2 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel.js +111 -0
- package/dist/providers/ai-assistant/ai-chat-panel.js.map +1 -0
- package/dist/providers/shortcut/shortcut-context.d.ts +2 -2
- package/dist/providers/shortcut/shortcut-context.js +7 -0
- package/dist/providers/shortcut/shortcut-context.js.map +1 -0
- package/dist/providers/shortcut/shortcut-provider.d.ts +1 -1
- package/dist/providers/shortcut/shortcut-provider.js +267 -0
- package/dist/providers/shortcut/shortcut-provider.js.map +1 -0
- package/dist/providers/theme/index.js +2 -0
- package/dist/providers/theme/index.js.map +1 -0
- package/dist/providers/theme/theme-provider-types.js +2 -0
- package/dist/providers/theme/theme-provider-types.js.map +1 -0
- package/dist/providers/theme/themeProvider.d.ts +2 -2
- package/dist/providers/theme/themeProvider.js +17 -0
- package/dist/providers/theme/themeProvider.js.map +1 -0
- package/dist/test/vitest.utils.js +2 -0
- package/dist/test/vitest.utils.js.map +1 -0
- package/dist/types/global-types.js +10 -0
- package/dist/types/global-types.js.map +1 -0
- package/dist/types/storybook-types.js +2 -0
- package/dist/types/storybook-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar-types.d.ts +1 -1
- package/dist/utility-components/avatar/avatar-types.js +2 -0
- package/dist/utility-components/avatar/avatar-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar.d.ts +2 -2
- package/dist/utility-components/avatar/avatar.js +10 -0
- package/dist/utility-components/avatar/avatar.js.map +1 -0
- package/dist/utility-components/chip/chip-types.d.ts +2 -2
- package/dist/utility-components/chip/chip-types.js +2 -0
- package/dist/utility-components/chip/chip-types.js.map +1 -0
- package/dist/utility-components/chip/chip.d.ts +2 -2
- package/dist/utility-components/chip/chip.js +11 -0
- package/dist/utility-components/chip/chip.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text-types.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text-types.js +2 -0
- package/dist/utility-components/helper-text/helper-text-types.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text.js +12 -0
- package/dist/utility-components/helper-text/helper-text.js.map +1 -0
- package/dist/utility-components/icon/icon-assets.js +95 -0
- package/dist/utility-components/icon/icon-assets.js.map +1 -0
- package/dist/utility-components/icon/icon-types.d.ts +1 -1
- package/dist/utility-components/icon/icon-types.js +2 -0
- package/dist/utility-components/icon/icon-types.js.map +1 -0
- package/dist/utility-components/icon/icon.d.ts +2 -2
- package/dist/utility-components/icon/icon.js +28 -0
- package/dist/utility-components/icon/icon.js.map +1 -0
- package/dist/utility-components/label/label-types.js +2 -0
- package/dist/utility-components/label/label-types.js.map +1 -0
- package/dist/utility-components/label/label.d.ts +1 -1
- package/dist/utility-components/label/label.js +10 -0
- package/dist/utility-components/label/label.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js +2 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts +2 -2
- package/dist/utility-components/overlay-panel/overlay-panel.js +98 -0
- package/dist/utility-components/overlay-panel/overlay-panel.js.map +1 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +1 -1
- package/dist/utility-components/overlay-panel/use-focus-trap.js +61 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton-types.js +2 -0
- package/dist/utility-components/skeleton/skeleton-types.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton.d.ts +2 -2
- package/dist/utility-components/skeleton/skeleton.js +14 -0
- package/dist/utility-components/skeleton/skeleton.js.map +1 -0
- package/dist/utility-components/stack/stack-types.js +2 -0
- package/dist/utility-components/stack/stack-types.js.map +1 -0
- package/dist/utility-components/stack/stack.d.ts +2 -2
- package/dist/utility-components/stack/stack.js +12 -0
- package/dist/utility-components/stack/stack.js.map +1 -0
- package/dist/utility-components/toast/toast-types.d.ts +1 -1
- package/dist/utility-components/toast/toast-types.js +2 -0
- package/dist/utility-components/toast/toast-types.js.map +1 -0
- package/dist/utility-components/toast/toast.d.ts +2 -2
- package/dist/utility-components/toast/toast.js +21 -0
- package/dist/utility-components/toast/toast.js.map +1 -0
- package/dist/utils/general.d.ts +1 -1
- package/dist/utils/general.js +27 -0
- package/dist/utils/general.js.map +1 -0
- package/dist/utils/shortcut-utils.js +164 -0
- package/dist/utils/shortcut-utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/svg/alert.svg +0 -1
- package/dist/assets/svg/arrow-down-up.svg +0 -1
- package/dist/assets/svg/arrow-down.svg +0 -1
- package/dist/assets/svg/arrow-left.svg +0 -1
- package/dist/assets/svg/arrow-right.svg +0 -1
- package/dist/assets/svg/arrow-up.svg +0 -1
- package/dist/assets/svg/arrow_drop_down.svg +0 -1
- package/dist/assets/svg/calendar.svg +0 -1
- package/dist/assets/svg/check.svg +0 -1
- package/dist/assets/svg/chevron-down.svg +0 -1
- package/dist/assets/svg/chevron-right.svg +0 -1
- package/dist/assets/svg/clipboard.svg +0 -1
- package/dist/assets/svg/close.svg +0 -1
- package/dist/assets/svg/copy.svg +0 -1
- package/dist/assets/svg/cursor.svg +0 -1
- package/dist/assets/svg/cut.svg +0 -1
- package/dist/assets/svg/delete.svg +0 -1
- package/dist/assets/svg/dock-left-arrow.svg +0 -1
- package/dist/assets/svg/dock-right-arrow.svg +0 -1
- package/dist/assets/svg/document-outline.svg +0 -1
- package/dist/assets/svg/download.svg +0 -1
- package/dist/assets/svg/drag.svg +0 -1
- package/dist/assets/svg/error.svg +0 -1
- package/dist/assets/svg/expand-right.svg +0 -1
- package/dist/assets/svg/expand.svg +0 -1
- package/dist/assets/svg/eye.svg +0 -1
- package/dist/assets/svg/fullscreen.svg +0 -1
- package/dist/assets/svg/gear.svg +0 -1
- package/dist/assets/svg/groups.svg +0 -1
- package/dist/assets/svg/help.svg +0 -1
- package/dist/assets/svg/info.svg +0 -1
- package/dist/assets/svg/logo.svg +0 -9
- package/dist/assets/svg/menu.svg +0 -1
- package/dist/assets/svg/message-bubble-question-mark.svg +0 -1
- package/dist/assets/svg/pencil.svg +0 -1
- package/dist/assets/svg/plus.svg +0 -1
- package/dist/assets/svg/restio.svg +0 -5
- package/dist/assets/svg/search.svg +0 -1
- package/dist/assets/svg/send.svg +0 -1
- package/dist/assets/svg/shrink-right.svg +0 -1
- package/dist/assets/svg/sidebar.svg +0 -1
- package/dist/assets/svg/terminal.svg +0 -1
- package/dist/assets/svg/timer.svg +0 -1
- package/dist/assets/svg/warning.svg +0 -1
- package/dist/assets/svg/zoom-minus.svg +0 -1
- package/dist/assets/svg/zoom-plus.svg +0 -1
- package/dist/restio-ui.cjs.js +0 -109
- package/dist/restio-ui.es.js +0 -34377
- package/dist/ui.css +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-grid-row.js","sourceRo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I,WAAW,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,YAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,GAAQ,EAG9G,CAAC,aAAa,IAAI,CACjB,KAAC,IAAI,IACH,KAAK,EAAE,KAA2B,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,CAAC,IAAI,EACjB,QAAQ,EAAE,GAAG,CAAC,KAAK,EACnB,QAAQ,EACN,CAAC,OAAO,IAAI,eAAe,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK;oCAC3D,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;wCACrD,CAAC,CAAC,OAAO;wCACT,CAAC,CAAC,aAAa;oCACjB,CAAC,CAAC,OAAO,EAEb,aAAa,EAAE,qBAAqB,EACpC,cAAc,EAAE,KAAK,EACrB,SAAS,EAAE,KAAK,GAChB,CACH,IACG,IA1CD,GAAG,GAAG,CAAC,EAAE,IAAI,QAAQ,EAAE,CA2CzB,CACN,CAAC;YACJ,CAAC,CAAC,IACC,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-types.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/selection/selection-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableRow } from
|
|
2
|
-
import { CheckboxSelectionState } from
|
|
1
|
+
import { TableRow } from "../table-grid-types";
|
|
2
|
+
import { CheckboxSelectionState } from "./selection-types";
|
|
3
3
|
/**
|
|
4
4
|
* Recursively collect all descendant IDs for a **tree row** using `getSubRows`.
|
|
5
5
|
* Works even when sub-trees are collapsed (traverses original data, not rendered rows).
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Descendant ID collection
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
/**
|
|
5
|
+
* Recursively collect all descendant IDs for a **tree row** using `getSubRows`.
|
|
6
|
+
* Works even when sub-trees are collapsed (traverses original data, not rendered rows).
|
|
7
|
+
* Row IDs follow the same convention as `buildTableRows`: `"${parentId}.${index}"`.
|
|
8
|
+
*/
|
|
9
|
+
export function collectTreeDescendantIds(rowId, rowData, getSubRows) {
|
|
10
|
+
const subRowsData = getSubRows(rowData, 0);
|
|
11
|
+
if (!subRowsData || subRowsData.length === 0)
|
|
12
|
+
return [];
|
|
13
|
+
const ids = [];
|
|
14
|
+
subRowsData.forEach((subRow, index) => {
|
|
15
|
+
const subRowId = `${rowId}.${index}`;
|
|
16
|
+
ids.push(subRowId);
|
|
17
|
+
ids.push(...collectTreeDescendantIds(subRowId, subRow, getSubRows));
|
|
18
|
+
});
|
|
19
|
+
return ids;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Collect descendant IDs for a **group row** from the flat rendered-rows list.
|
|
23
|
+
* Only non-group (data) rows are included.
|
|
24
|
+
*/
|
|
25
|
+
export function collectGroupDescendantIds(groupRowId, allRows) {
|
|
26
|
+
const ids = [];
|
|
27
|
+
const directChildren = allRows.filter((r) => r.parentId === groupRowId);
|
|
28
|
+
directChildren.forEach((child) => {
|
|
29
|
+
if (!child.isGroup)
|
|
30
|
+
ids.push(child.id);
|
|
31
|
+
// Recurse for nested groups
|
|
32
|
+
ids.push(...collectGroupDescendantIds(child.id, allRows));
|
|
33
|
+
});
|
|
34
|
+
return ids;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Return all descendant IDs for a row, handling both tree and group cases.
|
|
38
|
+
* For group rows the rendered row list is used; for tree rows `getSubRows` is used.
|
|
39
|
+
*/
|
|
40
|
+
export function getDescendantIds(row, allRenderedRows, getSubRows) {
|
|
41
|
+
if (row.isGroup)
|
|
42
|
+
return collectGroupDescendantIds(row.id, allRenderedRows);
|
|
43
|
+
if (getSubRows)
|
|
44
|
+
return collectTreeDescendantIds(row.id, row.data, getSubRows);
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Selection state computation
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Compute the checkbox display state (checked / unchecked / indeterminate) for a row.
|
|
52
|
+
*
|
|
53
|
+
* - Leaf row → checked if its ID is in `selectedIds`.
|
|
54
|
+
* - Parent row → checked/indeterminate/unchecked based on how many descendants are selected.
|
|
55
|
+
* The parent's own ID in `selectedIds` is intentionally ignored for display purposes;
|
|
56
|
+
* only descendants drive the visual state.
|
|
57
|
+
*/
|
|
58
|
+
export function computeRowSelectionState(row, selectedIds, allRenderedRows, getSubRows) {
|
|
59
|
+
const descendantIds = getDescendantIds(row, allRenderedRows, getSubRows);
|
|
60
|
+
if (descendantIds.length === 0) {
|
|
61
|
+
return selectedIds.has(row.id) ? "checked" : "unchecked";
|
|
62
|
+
}
|
|
63
|
+
const selectedCount = descendantIds.filter((id) => selectedIds.has(id)).length;
|
|
64
|
+
if (selectedCount === 0)
|
|
65
|
+
return "unchecked";
|
|
66
|
+
if (selectedCount === descendantIds.length)
|
|
67
|
+
return "checked";
|
|
68
|
+
return "indeterminate";
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Compute the "select all" header checkbox state from all known selectable IDs.
|
|
72
|
+
*/
|
|
73
|
+
export function computeAllSelectionState(allIds, selectedIds) {
|
|
74
|
+
if (allIds.length === 0)
|
|
75
|
+
return "unchecked";
|
|
76
|
+
const selectedCount = allIds.filter((id) => selectedIds.has(id)).length;
|
|
77
|
+
if (selectedCount === 0)
|
|
78
|
+
return "unchecked";
|
|
79
|
+
if (selectedCount === allIds.length)
|
|
80
|
+
return "checked";
|
|
81
|
+
return "indeterminate";
|
|
82
|
+
}
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Toggle helpers
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
/**
|
|
87
|
+
* Toggle a row's selection with cascading.
|
|
88
|
+
* - "unchecked" → select self + all descendants.
|
|
89
|
+
* - "checked" / "indeterminate" → deselect self + all descendants.
|
|
90
|
+
*
|
|
91
|
+
* Group rows are virtual (not real data), so their own ID is **never** added;
|
|
92
|
+
* only their descendant data-row IDs are toggled.
|
|
93
|
+
*/
|
|
94
|
+
export function toggleRowSelection(row, currentSelected, allRenderedRows, getSubRows) {
|
|
95
|
+
const currentState = computeRowSelectionState(row, currentSelected, allRenderedRows, getSubRows);
|
|
96
|
+
const descendantIds = getDescendantIds(row, allRenderedRows, getSubRows);
|
|
97
|
+
// Group rows are virtual — only cascade to their data children.
|
|
98
|
+
const idsToToggle = row.isGroup ? descendantIds : [row.id, ...descendantIds];
|
|
99
|
+
const next = new Set(currentSelected);
|
|
100
|
+
if (currentState === "unchecked") {
|
|
101
|
+
idsToToggle.forEach((id) => next.add(id));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
idsToToggle.forEach((id) => next.delete(id));
|
|
105
|
+
}
|
|
106
|
+
return next;
|
|
107
|
+
}
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// "Select all" helpers
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
/**
|
|
112
|
+
* Collect **all** selectable row IDs from the original data (all levels).
|
|
113
|
+
* This is used for the "select all" operation and its state computation.
|
|
114
|
+
*
|
|
115
|
+
* In group mode, only the rendered non-group rows are used (group rows are virtual).
|
|
116
|
+
* In tree/flat mode, all rows are collected recursively from `data`.
|
|
117
|
+
*/
|
|
118
|
+
export function collectAllSelectableIds(data, allRenderedRows, getSubRows, hasGrouping = false) {
|
|
119
|
+
if (hasGrouping) {
|
|
120
|
+
return allRenderedRows.filter((r) => !r.isGroup).map((r) => r.id);
|
|
121
|
+
}
|
|
122
|
+
const collect = (items, parentId) => {
|
|
123
|
+
const ids = [];
|
|
124
|
+
items.forEach((item, index) => {
|
|
125
|
+
const rowId = parentId ? `${parentId}.${index}` : `${index}`;
|
|
126
|
+
ids.push(rowId);
|
|
127
|
+
const subRows = getSubRows?.(item, index);
|
|
128
|
+
if (subRows && subRows.length > 0) {
|
|
129
|
+
ids.push(...collect(subRows, rowId));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return ids;
|
|
133
|
+
};
|
|
134
|
+
return collect(data);
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=selection-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-utils.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/selection/selection-utils.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAa,EACb,OAAc,EACd,UAA8D;IAE9D,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC3C,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAExD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACpC,MAAM,QAAQ,GAAG,GAAG,KAAK,IAAI,KAAK,EAAE,CAAC;QACrC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,GAAG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAAkB,EAClB,OAA0B;IAE1B,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ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,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-grid-sidebar-types.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/sidebar/table-grid-sidebar-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TableGridSidebarProps } from
|
|
1
|
+
import { TableGridSidebarProps } from "./table-grid-sidebar-types";
|
|
2
2
|
export declare function TableGridSidebar({ enablePivot, enableFormula, enableColumnVisibility, enableAI, onPivotClick, onFormulaClick, onColumnVisibilityClick, onAIClick, }: TableGridSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=table-grid-sidebar.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../../../components/button/button";
|
|
3
|
+
import styles from "../table-grid.module.css";
|
|
4
|
+
export function TableGridSidebar({ enablePivot, enableFormula, enableColumnVisibility, enableAI, onPivotClick, onFormulaClick, onColumnVisibilityClick, onAIClick, }) {
|
|
5
|
+
return (_jsxs("div", { className: styles["rst-table-sidebar"], children: [enablePivot && _jsx(Button, { variant: "invisible", size: "small", leadingVisual: "groups", title: "Pivot Mode", onClick: onPivotClick }), enableFormula && _jsx(Button, { variant: "invisible", size: "small", leadingVisual: "pencil", title: "Formula Builder", onClick: onFormulaClick }), enableColumnVisibility && (_jsx(Button, { variant: "invisible", size: "small", leadingVisual: "columns", title: "Column Visibility", onClick: onColumnVisibilityClick })), enableAI && _jsx(Button, { variant: "invisible", size: "small", leadingVisual: "sparkle", title: "AI Assistant", onClick: onAIClick })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=table-grid-sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-grid-sidebar.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/sidebar/table-grid-sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAG9C,MAAM,UAAU,gBAAgB,CAAC,EAC/B,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,SAAS,GACa;IACtB,OAAO,CACL,eAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,aACxC,WAAW,IAAI,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,EAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,YAAY,GAAI,EAC7H,aAAa,IAAI,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,EAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,cAAc,GAAI,EACtI,sBAAsB,IAAI,CACzB,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,KAAK,EAAC,mBAAmB,EAAC,OAAO,EAAE,uBAAuB,GAAI,CAClI,EACA,QAAQ,IAAI,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,SAAS,GAAI,IACvH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applies sorting to the data based on the current sorting state and column definitions.
|
|
3
|
+
* @param data - The data to be sorted.
|
|
4
|
+
* @param sorting - The current sorting state.
|
|
5
|
+
* @param columns - The column definitions.
|
|
6
|
+
* @returns The sorted data.
|
|
7
|
+
*/
|
|
8
|
+
export function applySorting(data, sorting, columns) {
|
|
9
|
+
if (sorting.length === 0)
|
|
10
|
+
return data;
|
|
11
|
+
const sortConfig = sorting[0]; // For simplicity, just handle single column sorting
|
|
12
|
+
const column = columns.find((col) => (col.id || col.accessorKey) === sortConfig.id);
|
|
13
|
+
if (!column)
|
|
14
|
+
return data;
|
|
15
|
+
return [...data].sort((a, b) => {
|
|
16
|
+
let valueA;
|
|
17
|
+
let valueB;
|
|
18
|
+
if (column.accessorFn) {
|
|
19
|
+
valueA = column.accessorFn(a);
|
|
20
|
+
valueB = column.accessorFn(b);
|
|
21
|
+
}
|
|
22
|
+
else if (column.accessorKey) {
|
|
23
|
+
valueA = a[column.accessorKey];
|
|
24
|
+
valueB = b[column.accessorKey];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
// Custom sorting function
|
|
30
|
+
if (column.sortingFn) {
|
|
31
|
+
const base = column.sortingFn(a, b, sortConfig.id);
|
|
32
|
+
return sortConfig.desc ? -base : base;
|
|
33
|
+
}
|
|
34
|
+
// Default sorting
|
|
35
|
+
if (valueA === valueB)
|
|
36
|
+
return 0;
|
|
37
|
+
if (valueA === null || valueA === undefined)
|
|
38
|
+
return 1;
|
|
39
|
+
if (valueB === null || valueB === undefined)
|
|
40
|
+
return -1;
|
|
41
|
+
const result = valueA < valueB ? -1 : 1;
|
|
42
|
+
return sortConfig.desc ? -result : result;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=sorting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sorting.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/sorting/sorting.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAQ,IAAa,EAAE,OAAqB,EAAE,OAA2B;IACnG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,MAAM,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AAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,CAAC,CAAC,CAAC;QAEvD,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ColumnDef, TableOptions } from
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ColumnDef, TableOptions } from "../table-grid-types";
|
|
3
3
|
export interface TableProviderProps<TData> {
|
|
4
4
|
readonly children: ReactNode;
|
|
5
5
|
readonly initialData: TData[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-context-types.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/table-context/table-context-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TableContextValue } from
|
|
2
|
-
export declare const TableContext: import(
|
|
1
|
+
import { TableContextValue } from "../table-grid-types";
|
|
2
|
+
export declare const TableContext: import("react").Context<TableContextValue<any> | undefined>;
|
|
3
3
|
//# sourceMappingURL=table-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-context.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/table-context/table-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAqC,SAAS,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TableProviderProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TableProviderProps } from "./table-context/table-context-types";
|
|
3
3
|
export declare function TableProvider<TData>({ children, initialData, columns, getSubRows, onDataChange, onSelectionChange, options, addFormulaColumn, }: TableProviderProps<TData>): React.ReactElement;
|
|
4
4
|
//# sourceMappingURL=table-grid-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-grid-context.d.ts","sourceRoot":"","sources":["../../../src/data-components/table-grid/table-grid-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAYzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,EACnC,QAAQ,EACR,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAY,EACZ,gBAAgB,GACjB,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"table-grid-context.d.ts","sourceRoot":"","sources":["../../../src/data-components/table-grid/table-grid-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAYzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,EACnC,QAAQ,EACR,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAY,EACZ,gBAAgB,GACjB,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,CA8RhD"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useMemo, useEffect, useRef } from "react";
|
|
3
|
+
import { TableContext } from "./table-context/table-context";
|
|
4
|
+
import { applySorting } from "./sorting/sorting";
|
|
5
|
+
import { buildTableRows, groupData, getColId } from "./table-utils";
|
|
6
|
+
import { sortColumnsByPin } from "./pinning/pinning-utils";
|
|
7
|
+
import { toggleRowSelection as toggleRowSelectionUtil, computeRowSelectionState, computeAllSelectionState, collectAllSelectableIds, } from "./selection/selection-utils";
|
|
8
|
+
export function TableProvider({ children, initialData, columns, getSubRows, onDataChange, onSelectionChange, options = {}, addFormulaColumn, }) {
|
|
9
|
+
// Detect display mode based on data structure
|
|
10
|
+
const displayMode = useMemo(() => {
|
|
11
|
+
if (!getSubRows)
|
|
12
|
+
return "table";
|
|
13
|
+
const hasAnySubRows = initialData.some((row, index) => {
|
|
14
|
+
const subRows = getSubRows(row, index);
|
|
15
|
+
return subRows && subRows.length > 0;
|
|
16
|
+
});
|
|
17
|
+
if (hasAnySubRows) {
|
|
18
|
+
return columns.length > 1 ? "table-tree" : "tree";
|
|
19
|
+
}
|
|
20
|
+
return "table";
|
|
21
|
+
}, [getSubRows, initialData, columns.length]);
|
|
22
|
+
const [state, setState] = useState({
|
|
23
|
+
dataState: initialData,
|
|
24
|
+
sorting: [],
|
|
25
|
+
grouping: [],
|
|
26
|
+
expandedRows: new Set(),
|
|
27
|
+
displayMode,
|
|
28
|
+
selectedRows: new Set(),
|
|
29
|
+
columnOrder: [],
|
|
30
|
+
hiddenColumns: new Set(),
|
|
31
|
+
columnPinning: {},
|
|
32
|
+
});
|
|
33
|
+
// Sync internal dataState with external data prop changes
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
setState((prev) => ({
|
|
36
|
+
...prev,
|
|
37
|
+
dataState: initialData,
|
|
38
|
+
}));
|
|
39
|
+
}, [initialData]);
|
|
40
|
+
const setSorting = useCallback((sorting) => {
|
|
41
|
+
setState((prev) => ({ ...prev, sorting }));
|
|
42
|
+
}, []);
|
|
43
|
+
const setGrouping = useCallback((grouping) => {
|
|
44
|
+
setState((prev) => ({ ...prev, grouping }));
|
|
45
|
+
}, []);
|
|
46
|
+
const setColumnOrder = useCallback((columnOrder) => {
|
|
47
|
+
setState((prev) => ({ ...prev, columnOrder }));
|
|
48
|
+
}, []);
|
|
49
|
+
const setSelectedRows = useCallback((ids) => {
|
|
50
|
+
setState((prev) => ({ ...prev, selectedRows: ids }));
|
|
51
|
+
}, []);
|
|
52
|
+
const toggleColumnVisibility = useCallback((columnId) => {
|
|
53
|
+
setState((prev) => {
|
|
54
|
+
const next = new Set(prev.hiddenColumns);
|
|
55
|
+
if (next.has(columnId)) {
|
|
56
|
+
next.delete(columnId);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
next.add(columnId);
|
|
60
|
+
}
|
|
61
|
+
return { ...prev, hiddenColumns: next };
|
|
62
|
+
});
|
|
63
|
+
}, []);
|
|
64
|
+
const setPinColumn = useCallback((columnId, pinning) => {
|
|
65
|
+
setState((prev) => ({
|
|
66
|
+
...prev,
|
|
67
|
+
columnPinning: { ...prev.columnPinning, [columnId]: pinning },
|
|
68
|
+
}));
|
|
69
|
+
}, []);
|
|
70
|
+
const toggleRowExpansion = useCallback((rowId) => {
|
|
71
|
+
setState((prev) => {
|
|
72
|
+
const newExpandedRows = new Set(prev.expandedRows);
|
|
73
|
+
if (newExpandedRows.has(rowId)) {
|
|
74
|
+
newExpandedRows.delete(rowId);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
newExpandedRows.add(rowId);
|
|
78
|
+
}
|
|
79
|
+
return { ...prev, expandedRows: newExpandedRows };
|
|
80
|
+
});
|
|
81
|
+
}, []);
|
|
82
|
+
const updateCellValue = useCallback((rowData, columnId, newValue) => {
|
|
83
|
+
setState((prev) => {
|
|
84
|
+
const column = columns.find((col) => (col.id || col.accessorKey) === columnId);
|
|
85
|
+
if (!column || !column.accessorKey)
|
|
86
|
+
return prev;
|
|
87
|
+
// Find the original item by reference — stable across sorting/grouping
|
|
88
|
+
const sourceIndex = prev.dataState.indexOf(rowData);
|
|
89
|
+
if (sourceIndex === -1)
|
|
90
|
+
return prev;
|
|
91
|
+
const newDataState = [...prev.dataState];
|
|
92
|
+
newDataState[sourceIndex] = { ...newDataState[sourceIndex], [column.accessorKey]: newValue };
|
|
93
|
+
if (onDataChange) {
|
|
94
|
+
onDataChange(newDataState);
|
|
95
|
+
}
|
|
96
|
+
return { ...prev, dataState: newDataState };
|
|
97
|
+
});
|
|
98
|
+
}, [columns, onDataChange]);
|
|
99
|
+
const getRows = useCallback(() => {
|
|
100
|
+
const sortedData = applySorting(state.dataState, state.sorting, columns);
|
|
101
|
+
if (state.grouping.length > 0) {
|
|
102
|
+
return groupData(sortedData, state.grouping, columns, state.expandedRows);
|
|
103
|
+
}
|
|
104
|
+
return buildTableRows(sortedData, getSubRows, state.expandedRows, displayMode);
|
|
105
|
+
}, [state.dataState, state.sorting, state.grouping, state.expandedRows, columns, getSubRows, displayMode]);
|
|
106
|
+
// Pre-computed rows — memoized so all consumers share the same result without re-running applySorting
|
|
107
|
+
const rows = useMemo(() => {
|
|
108
|
+
return getRows();
|
|
109
|
+
}, [getRows]);
|
|
110
|
+
const setGlobalFilter = useCallback((filter) => {
|
|
111
|
+
setState((prev) => ({ ...prev, globalFilter: filter }));
|
|
112
|
+
}, []);
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
// Selection
|
|
115
|
+
// ---------------------------------------------------------------------------
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// Fire onSelectionChange as a side-effect whenever selectedRows changes,
|
|
118
|
+
// avoiding the "setState during render" issue that occurs when calling an
|
|
119
|
+
// external setState inside a setState updater.
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
121
|
+
const isFirstRender = useRef(true);
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
if (isFirstRender.current) {
|
|
124
|
+
isFirstRender.current = false;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (!onSelectionChange)
|
|
128
|
+
return;
|
|
129
|
+
const selectedIds = Array.from(state.selectedRows);
|
|
130
|
+
const selectedData = state.dataState.filter((_, idx) => selectedIds.includes(String(idx)));
|
|
131
|
+
onSelectionChange(selectedIds, selectedData);
|
|
132
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
|
+
}, [state.selectedRows]);
|
|
134
|
+
const toggleRowSelection = useCallback((row) => {
|
|
135
|
+
setState((prev) => {
|
|
136
|
+
const allRenderedRows = (() => {
|
|
137
|
+
const sortedData = applySorting(prev.dataState, prev.sorting, columns);
|
|
138
|
+
if (prev.grouping.length > 0) {
|
|
139
|
+
return groupData(sortedData, prev.grouping, columns, prev.expandedRows);
|
|
140
|
+
}
|
|
141
|
+
return buildTableRows(sortedData, getSubRows, prev.expandedRows, displayMode);
|
|
142
|
+
})();
|
|
143
|
+
const next = toggleRowSelectionUtil(row, prev.selectedRows, allRenderedRows, getSubRows);
|
|
144
|
+
return { ...prev, selectedRows: next };
|
|
145
|
+
});
|
|
146
|
+
}, [columns, getSubRows, displayMode]);
|
|
147
|
+
const toggleAllSelection = useCallback(() => {
|
|
148
|
+
setState((prev) => {
|
|
149
|
+
const allRenderedRows = (() => {
|
|
150
|
+
const sortedData = applySorting(prev.dataState, prev.sorting, columns);
|
|
151
|
+
if (prev.grouping.length > 0) {
|
|
152
|
+
return groupData(sortedData, prev.grouping, columns, prev.expandedRows);
|
|
153
|
+
}
|
|
154
|
+
return buildTableRows(sortedData, getSubRows, prev.expandedRows, displayMode);
|
|
155
|
+
})();
|
|
156
|
+
const allIds = collectAllSelectableIds(prev.dataState, allRenderedRows, getSubRows, prev.grouping.length > 0);
|
|
157
|
+
const allSelected = allIds.every((id) => prev.selectedRows.has(id));
|
|
158
|
+
const next = allSelected ? new Set() : new Set(allIds);
|
|
159
|
+
return { ...prev, selectedRows: next };
|
|
160
|
+
});
|
|
161
|
+
}, [columns, getSubRows, displayMode]);
|
|
162
|
+
const getRowSelectionState = useCallback((row) => {
|
|
163
|
+
return computeRowSelectionState(row, state.selectedRows, rows, getSubRows);
|
|
164
|
+
}, [rows, state.selectedRows, getSubRows]);
|
|
165
|
+
const getAllSelectionState = useCallback(() => {
|
|
166
|
+
const allIds = collectAllSelectableIds(state.dataState, rows, getSubRows, state.grouping.length > 0);
|
|
167
|
+
return computeAllSelectionState(allIds, state.selectedRows);
|
|
168
|
+
}, [rows, state.dataState, state.selectedRows, getSubRows, state.grouping]);
|
|
169
|
+
const visibleColumns = useMemo(() => {
|
|
170
|
+
// 1. Apply column order
|
|
171
|
+
let result;
|
|
172
|
+
if (state.columnOrder.length > 0) {
|
|
173
|
+
const idToCol = new Map(columns.map((col, i) => [getColId(col, i), col]));
|
|
174
|
+
const ordered = state.columnOrder.flatMap((id) => {
|
|
175
|
+
const col = idToCol.get(id);
|
|
176
|
+
return col ? [col] : [];
|
|
177
|
+
});
|
|
178
|
+
const orderedSet = new Set(state.columnOrder);
|
|
179
|
+
const extra = columns.filter((col, i) => !orderedSet.has(getColId(col, i)));
|
|
180
|
+
result = [...ordered, ...extra];
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
result = [...columns];
|
|
184
|
+
}
|
|
185
|
+
// 2. Filter hidden columns
|
|
186
|
+
if (state.hiddenColumns.size > 0) {
|
|
187
|
+
const origIdxMap = new Map(columns.map((col, i) => [col, i]));
|
|
188
|
+
result = result.filter((col) => {
|
|
189
|
+
const origIdx = origIdxMap.get(col) ?? 0;
|
|
190
|
+
return !state.hiddenColumns.has(getColId(col, origIdx));
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
// 3. Apply grouping
|
|
194
|
+
if (state.grouping.length > 0) {
|
|
195
|
+
const groupColumnIds = new Set(state.grouping);
|
|
196
|
+
const origIdxMap = new Map(columns.map((col, i) => [col, i]));
|
|
197
|
+
const groupColumn = { id: "__group__", header: "Group", minSize: 200 };
|
|
198
|
+
const filteredColumns = result.filter((col) => {
|
|
199
|
+
const origIdx = origIdxMap.get(col) ?? 0;
|
|
200
|
+
return !groupColumnIds.has(getColId(col, origIdx));
|
|
201
|
+
});
|
|
202
|
+
// __group__ is always leftmost; pin-sort the rest
|
|
203
|
+
return [groupColumn, ...sortColumnsByPin(filteredColumns, state.columnPinning)];
|
|
204
|
+
}
|
|
205
|
+
// 4. Sort by pin direction: left-pinned first, center in middle, right-pinned last
|
|
206
|
+
return sortColumnsByPin(result, state.columnPinning);
|
|
207
|
+
}, [state.grouping, state.columnOrder, state.hiddenColumns, state.columnPinning, columns]);
|
|
208
|
+
const contextValue = useMemo(() => ({
|
|
209
|
+
data: state.dataState,
|
|
210
|
+
columns,
|
|
211
|
+
visibleColumns,
|
|
212
|
+
getSubRows,
|
|
213
|
+
state,
|
|
214
|
+
displayMode,
|
|
215
|
+
setSorting,
|
|
216
|
+
setGrouping,
|
|
217
|
+
toggleRowExpansion,
|
|
218
|
+
updateCellValue,
|
|
219
|
+
rows,
|
|
220
|
+
getRows,
|
|
221
|
+
options,
|
|
222
|
+
toggleRowSelection,
|
|
223
|
+
toggleAllSelection,
|
|
224
|
+
getRowSelectionState,
|
|
225
|
+
getAllSelectionState,
|
|
226
|
+
setGlobalFilter,
|
|
227
|
+
setColumnOrder,
|
|
228
|
+
toggleColumnVisibility,
|
|
229
|
+
setPinColumn,
|
|
230
|
+
setSelectedRows,
|
|
231
|
+
addFormulaColumn,
|
|
232
|
+
}), [
|
|
233
|
+
state,
|
|
234
|
+
columns,
|
|
235
|
+
visibleColumns,
|
|
236
|
+
getSubRows,
|
|
237
|
+
displayMode,
|
|
238
|
+
setSorting,
|
|
239
|
+
setGrouping,
|
|
240
|
+
toggleRowExpansion,
|
|
241
|
+
updateCellValue,
|
|
242
|
+
rows,
|
|
243
|
+
getRows,
|
|
244
|
+
options,
|
|
245
|
+
toggleRowSelection,
|
|
246
|
+
toggleAllSelection,
|
|
247
|
+
getRowSelectionState,
|
|
248
|
+
getAllSelectionState,
|
|
249
|
+
setGlobalFilter,
|
|
250
|
+
setColumnOrder,
|
|
251
|
+
toggleColumnVisibility,
|
|
252
|
+
setPinColumn,
|
|
253
|
+
setSelectedRows,
|
|
254
|
+
addFormulaColumn,
|
|
255
|
+
]);
|
|
256
|
+
return _jsx(TableContext.Provider, { value: contextValue, children: children });
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=table-grid-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-grid-context.js","sourceRoot":"","sources":["../../../src/data-components/table-grid/table-grid-context.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,kBAAkB,IAAI,sBAAsB,EAC5C,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,UAAU,aAAa,CAAQ,EACnC,QAAQ,EACR,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,OAAO,GAAG,EAAE,EACZ,gBAAgB,GACU;IAC1B,8CAA8C;IAC9C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAyB,EAAE;QACrD,IAAI,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC;QAChC,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACpD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACvC,OAAO,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC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QACf,IAAI;QACJ,OAAO;QACP,OAAO;QACP,kBAAkB;QAClB,kBAAkB;QAClB,oBAAoB;QACpB,oBAAoB;QACpB,eAAe;QACf,cAAc;QACd,sBAAsB;QACtB,YAAY;QACZ,eAAe;QACf,gBAAgB;KACjB,CACF,CAAC;IAEF,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAwC,YAAG,QAAQ,GAAyB,CAAC;AACpH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataStructureColumn, DataStructureComponent } from
|
|
2
|
-
import { PivotConfig } from
|
|
3
|
-
import { AggregationFn } from
|
|
4
|
-
import { AIProvider, AIQuickAction } from
|
|
1
|
+
import { DataStructureColumn, DataStructureComponent } from "../data-structure/data-structure";
|
|
2
|
+
import { PivotConfig } from "./pivot/pivot-types";
|
|
3
|
+
import { AggregationFn } from "./aggregation/aggregation-utils";
|
|
4
|
+
import { AIProvider, AIQuickAction } from "../../providers/ai-assistant/ai-assistant-types";
|
|
5
5
|
export type TableGridDisplayMode = "tree" | "table" | "table-tree";
|
|
6
6
|
/** Keyed map of column sticky-pin offsets (left/right pixel values). */
|
|
7
7
|
export type ColumnOffsets = Record<string, {
|
|
@@ -167,7 +167,9 @@ export interface TableContextValue<TData> {
|
|
|
167
167
|
toggleRowExpansion: (rowId: string) => void;
|
|
168
168
|
/** Update a cell value — pass the original row data reference (stable across sort/group) */
|
|
169
169
|
updateCellValue: (rowData: TData, columnId: string, newValue: TData[keyof TData]) => void;
|
|
170
|
-
/**
|
|
170
|
+
/** Pre-computed rows (sorted, grouped, flattened) — O(1) to read, computed once per render cycle */
|
|
171
|
+
rows: TableRow<TData>[];
|
|
172
|
+
/** Get processed rows — returns the same pre-computed rows array as `rows` */
|
|
171
173
|
getRows: () => TableRow<TData>[];
|
|
172
174
|
/** Table configuration options */
|
|
173
175
|
options: TableOptions;
|
|
@@ -176,9 +178,9 @@ export interface TableContextValue<TData> {
|
|
|
176
178
|
/** Toggle the "select all" state */
|
|
177
179
|
toggleAllSelection: () => void;
|
|
178
180
|
/** Get the checkbox display state for a row */
|
|
179
|
-
getRowSelectionState: (row: TableRow<TData>) => import(
|
|
181
|
+
getRowSelectionState: (row: TableRow<TData>) => import("./selection/selection-types").CheckboxSelectionState;
|
|
180
182
|
/** Get the "select all" header checkbox state */
|
|
181
|
-
getAllSelectionState: () => import(
|
|
183
|
+
getAllSelectionState: () => import("./selection/selection-types").CheckboxSelectionState;
|
|
182
184
|
/** Set the column order (array of column IDs) */
|
|
183
185
|
setColumnOrder: (order: string[]) => void;
|
|
184
186
|
/** Toggle visibility for a single column by its ID */
|