@restio/ui 0.2.0 → 0.2.1-20260901123418
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/README.md +78 -8
- package/dist/core.cjs +1 -0
- package/dist/core.d.ts +803 -0
- package/dist/core.js +30 -0
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1423 -0
- package/dist/data.js +24 -0
- package/dist/experimental.cjs +1 -0
- package/dist/experimental.d.ts +486 -0
- package/dist/experimental.js +1027 -0
- package/dist/framework.cjs +1 -0
- package/dist/framework.d.ts +788 -0
- package/dist/framework.js +31 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +3124 -143
- package/dist/index.js +90 -0
- package/dist/{restio-ui.es.js → src-DaTjVaGd.js} +24815 -25017
- package/dist/src-gB-fpYMb.cjs +156 -0
- package/dist/ui.css +1 -1
- package/package.json +46 -25
- 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/chart-area.svg +0 -1
- package/dist/assets/svg/chart-bar-stacked.svg +0 -1
- package/dist/assets/svg/chart-bar.svg +0 -1
- package/dist/assets/svg/chart-candlestick.svg +0 -1
- package/dist/assets/svg/chart-gantt.svg +0 -1
- package/dist/assets/svg/chart-line.svg +0 -1
- package/dist/assets/svg/chart-pie.svg +0 -1
- package/dist/assets/svg/chart-sankey.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/discussion.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/file-plus.svg +0 -1
- package/dist/assets/svg/filter.svg +0 -1
- package/dist/assets/svg/form.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/list.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/open-center.svg +0 -1
- package/dist/assets/svg/pencil.svg +0 -1
- package/dist/assets/svg/pie-chart.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/square-half.svg +0 -1
- package/dist/assets/svg/table.svg +0 -1
- package/dist/assets/svg/terminal.svg +0 -1
- package/dist/assets/svg/timer.svg +0 -1
- package/dist/assets/svg/transaction.svg +0 -1
- package/dist/assets/svg/vertical-expand.svg +0 -1
- package/dist/assets/svg/wallet.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/components/anchored-overlay/anchored-overlay-types.d.ts +0 -22
- package/dist/components/anchored-overlay/anchored-overlay.d.ts +0 -4
- package/dist/components/anchored-overlay/anchored-overlay.test.d.ts +0 -0
- package/dist/components/anchored-overlay/stories/anchored-overlay-example.stories.d.ts +0 -6
- package/dist/components/banner/banner-types.d.ts +0 -12
- package/dist/components/banner/banner.d.ts +0 -4
- package/dist/components/banner/banner.stories.d.ts +0 -11
- package/dist/components/button/button-types.d.ts +0 -11
- package/dist/components/button/button.d.ts +0 -3
- package/dist/components/button/stories/button-example.stories.d.ts +0 -8
- package/dist/components/button/stories/button.stories.d.ts +0 -8
- package/dist/components/button-dropdown/button-dropdown-types.d.ts +0 -19
- package/dist/components/button-dropdown/button-dropdown.d.ts +0 -7
- package/dist/components/button-dropdown/button-dropdown.test.d.ts +0 -0
- package/dist/components/button-dropdown/stories/button-dropdown.stories.d.ts +0 -10
- package/dist/components/button-group/button-group-types.d.ts +0 -15
- package/dist/components/button-group/button-group.d.ts +0 -3
- package/dist/components/button-group/button-group.stories.d.ts +0 -7
- package/dist/components/button-group/button-group.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox-types.d.ts +0 -15
- package/dist/components/checkbox/checkbox.d.ts +0 -3
- package/dist/components/checkbox/checkbox.test.d.ts +0 -0
- package/dist/components/checkbox/stories/checkbox-example.stories.d.ts +0 -7
- package/dist/components/checkbox/stories/checkbox.stories.d.ts +0 -6
- package/dist/components/checkbox-group/checkbox-group-types.d.ts +0 -27
- package/dist/components/checkbox-group/checkbox-group.d.ts +0 -7
- package/dist/components/checkbox-group/checkbox-group.test.d.ts +0 -0
- package/dist/components/checkbox-group/stories/checkbox-group-example.stories.d.ts +0 -6
- package/dist/components/checkbox-group/stories/checkbox-group.stories.d.ts +0 -10
- package/dist/components/code-block/code-block.d.ts +0 -7
- package/dist/components/file-upload/file-upload-types.d.ts +0 -36
- package/dist/components/file-upload/file-upload-utils.d.ts +0 -1
- package/dist/components/file-upload/file-upload.d.ts +0 -3
- package/dist/components/file-upload/file-upload.test.d.ts +0 -1
- package/dist/components/file-upload/stories/file-upload.stories.d.ts +0 -8
- package/dist/components/input/date/date-calendar.d.ts +0 -3
- package/dist/components/input/date/date-input-field.d.ts +0 -8
- package/dist/components/input/date/date-picker.d.ts +0 -7
- package/dist/components/input/date/date-range-input-field.d.ts +0 -8
- package/dist/components/input/date/date-range-picker.d.ts +0 -8
- package/dist/components/input/date/date-shortcuts.d.ts +0 -3
- package/dist/components/input/date/date-types.d.ts +0 -52
- package/dist/components/input/date/date-utils.d.ts +0 -50
- package/dist/components/input/date/stories/date.stories.d.ts +0 -5
- package/dist/components/input/input-types.d.ts +0 -27
- package/dist/components/input/input.d.ts +0 -3
- package/dist/components/input/number/input-number-types.d.ts +0 -7
- package/dist/components/input/number/input-number.d.ts +0 -3
- package/dist/components/input/number/input-number.stories.d.ts +0 -6
- package/dist/components/input/text/input-text-types.d.ts +0 -6
- package/dist/components/input/text/input-text.d.ts +0 -3
- package/dist/components/input/text/stories/input-text.stories.d.ts +0 -9
- package/dist/components/kbd/kbd-types.d.ts +0 -6
- package/dist/components/kbd/kbd.d.ts +0 -4
- package/dist/components/kbd/kbd.stories.d.ts +0 -9
- package/dist/components/kbd-group/kbd-group-types.d.ts +0 -14
- package/dist/components/kbd-group/kbd-group.d.ts +0 -4
- package/dist/components/kbd-group/kbd-group.stories.d.ts +0 -10
- package/dist/components/list/list-types.d.ts +0 -37
- package/dist/components/list/list-utils.d.ts +0 -46
- package/dist/components/list/list.d.ts +0 -2
- package/dist/components/list/list.stories.d.ts +0 -12
- package/dist/components/list/list.test.d.ts +0 -0
- package/dist/components/menu/anchored-navigation-menu.d.ts +0 -18
- package/dist/components/menu/menu-assets.d.ts +0 -2
- package/dist/components/menu/menu-types.d.ts +0 -21
- package/dist/components/menu/menu.d.ts +0 -8
- package/dist/components/menu/stories/anchored-navigation-menu.stories.d.ts +0 -7
- package/dist/components/otp/otp-types.d.ts +0 -29
- package/dist/components/otp/otp-utils.d.ts +0 -14
- package/dist/components/otp/otp.d.ts +0 -3
- package/dist/components/otp/otp.stories.d.ts +0 -145
- package/dist/components/progress-bar/progress-bar-types.d.ts +0 -19
- package/dist/components/progress-bar/progress-bar.d.ts +0 -6
- package/dist/components/progress-bar/progress-bar.test.d.ts +0 -1
- package/dist/components/progress-bar/stories/progress-bar-example.stories.d.ts +0 -8
- package/dist/components/progress-bar/stories/progress-bar.stories.d.ts +0 -9
- package/dist/components/radio/radio-types.d.ts +0 -13
- package/dist/components/radio/radio.d.ts +0 -7
- package/dist/components/radio/radio.test.d.ts +0 -0
- package/dist/components/radio/stories/radio-example.stories.d.ts +0 -7
- package/dist/components/radio/stories/radio.stories.d.ts +0 -6
- package/dist/components/radio-group/radio-group-types.d.ts +0 -29
- package/dist/components/radio-group/radio-group.d.ts +0 -7
- package/dist/components/radio-group/radio-group.test.d.ts +0 -0
- package/dist/components/radio-group/stories/radio-group-example.stories.d.ts +0 -6
- package/dist/components/radio-group/stories/radio-group.stories.d.ts +0 -10
- package/dist/components/select/select-switch.d.ts +0 -26
- package/dist/components/select/select-types.d.ts +0 -35
- package/dist/components/select/select.d.ts +0 -4
- package/dist/components/select/select.stories.d.ts +0 -20
- package/dist/components/select/select.test.d.ts +0 -0
- package/dist/components/select/templates/grid-template.d.ts +0 -7
- package/dist/components/select/templates/list-template.d.ts +0 -7
- package/dist/components/select/templates/preview-dialog-template.d.ts +0 -9
- package/dist/components/select/templates/select-template-types.d.ts +0 -12
- package/dist/components/selection-grid/selection-grid-types.d.ts +0 -19
- package/dist/components/selection-grid/selection-grid.d.ts +0 -7
- package/dist/components/selection-grid/stories/selection-grid-example.stories.d.ts +0 -7
- package/dist/components/selection-grid/stories/selection-grid.stories.d.ts +0 -10
- package/dist/components/tag/tag-types.d.ts +0 -9
- package/dist/components/tag/tag.d.ts +0 -3
- package/dist/components/tag/tag.stories.d.ts +0 -12
- package/dist/components/textarea/textarea-types.d.ts +0 -54
- package/dist/components/textarea/textarea.d.ts +0 -3
- package/dist/components/textarea/textarea.stories.d.ts +0 -25
- package/dist/components/toast-group/toast-group-types.d.ts +0 -5
- package/dist/components/toast-group/toast-group.d.ts +0 -4
- package/dist/components/toast-group/toast-group.stories.d.ts +0 -6
- package/dist/components/typography/typography-types.d.ts +0 -58
- package/dist/components/typography/typography.d.ts +0 -3
- package/dist/components/typography/typography.stories.d.ts +0 -10
- package/dist/custom-components/chat/chat-types.d.ts +0 -18
- package/dist/custom-components/chat/chat.d.ts +0 -2
- package/dist/custom-components/chat/chat.stories.d.ts +0 -7
- package/dist/custom-components/layout/layout-renderers.d.ts +0 -8
- package/dist/custom-components/layout/layout-types.d.ts +0 -43
- package/dist/custom-components/layout/layout.d.ts +0 -12
- package/dist/custom-components/layout/layout.stories.d.ts +0 -7
- package/dist/custom-components/markdown/components/img/zoomable-image.d.ts +0 -4
- package/dist/custom-components/markdown/markdown-types.d.ts +0 -28
- package/dist/custom-components/markdown/markdown-utils.d.ts +0 -1
- package/dist/custom-components/markdown/markdown.d.ts +0 -3
- package/dist/custom-components/markdown/markdown.stories.d.ts +0 -6
- package/dist/custom-components/mindmap/index.d.ts +0 -2
- package/dist/custom-components/mindmap/mind-tree-types.d.ts +0 -93
- package/dist/custom-components/mindmap/mind-tree.d.ts +0 -3
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +0 -64
- package/dist/custom-components/mindmap/stories/mind-tree.stories.d.ts +0 -11
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.d.ts +0 -59
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +0 -17
- package/dist/custom-components/shortcut-tooltip/stories/shortcut-tooltip.stories.d.ts +0 -10
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +0 -6
- package/dist/custom-components/timeline/timeline-types.d.ts +0 -45
- package/dist/custom-components/timeline/timeline.d.ts +0 -19
- package/dist/custom-components/timeline/timeline.stories.d.ts +0 -8
- package/dist/custom-components/workflow/layout/workflow-edge.d.ts +0 -3
- package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +0 -73
- package/dist/custom-components/workflow/layout/workflow-layout.d.ts +0 -37
- package/dist/custom-components/workflow/node/workflow-node.d.ts +0 -3
- package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +0 -17
- package/dist/custom-components/workflow/panel/workflow-panel.d.ts +0 -3
- package/dist/custom-components/workflow/stories/workflow-overlay.stories.d.ts +0 -7
- package/dist/custom-components/workflow/stories/workflow-toolbar.stories.d.ts +0 -6
- package/dist/custom-components/workflow/stories/workflow.stories.d.ts +0 -7
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.d.ts +0 -23
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +0 -3
- package/dist/custom-components/workflow/utils/workflow-validation.d.ts +0 -47
- package/dist/custom-components/workflow/workflow-types.d.ts +0 -203
- package/dist/custom-components/workflow/workflow.d.ts +0 -6
- package/dist/data-components/assets/cell-types-asset.d.ts +0 -38
- package/dist/data-components/assets/data-components-asset.d.ts +0 -13
- package/dist/data-components/calendar/calendar-types.d.ts +0 -30
- package/dist/data-components/calendar/calendar-utils.d.ts +0 -5
- package/dist/data-components/calendar/calendar.d.ts +0 -4
- package/dist/data-components/calendar/stories/calendar.stories.d.ts +0 -22
- package/dist/data-components/card/card-types.d.ts +0 -20
- package/dist/data-components/card/card.d.ts +0 -10
- package/dist/data-components/card/stories/card.stories.d.ts +0 -13
- package/dist/data-components/card-list/card-list-types.d.ts +0 -21
- package/dist/data-components/card-list/card-list.d.ts +0 -12
- package/dist/data-components/card-list/models/ecommerce.d.ts +0 -12
- package/dist/data-components/card-list/stories/card-list.stories.d.ts +0 -29
- package/dist/data-components/cell/cell-registry.d.ts +0 -28
- package/dist/data-components/cell/cell-types.d.ts +0 -39
- package/dist/data-components/cell/cell-utils.d.ts +0 -21
- package/dist/data-components/cell/cell.d.ts +0 -2
- package/dist/data-components/cell/colors-editor/colors-editor-types.d.ts +0 -15
- package/dist/data-components/cell/colors-editor/colors-editor.d.ts +0 -7
- package/dist/data-components/cell/stories/cell-all-examples.stories.d.ts +0 -13
- package/dist/data-components/cell/test/cell-utils.test.d.ts +0 -1
- package/dist/data-components/cell/test/cell.test.d.ts +0 -0
- package/dist/data-components/chart/chart-series-edit/chart-series-edit-types.d.ts +0 -22
- package/dist/data-components/chart/chart-series-edit/chart-series-edit.d.ts +0 -9
- package/dist/data-components/chart/chart-tooltip/chart-tooltip-types.d.ts +0 -13
- package/dist/data-components/chart/chart-tooltip/chart-tooltip.d.ts +0 -7
- package/dist/data-components/chart/chart-types.d.ts +0 -106
- package/dist/data-components/chart/chart-utils.d.ts +0 -27
- package/dist/data-components/chart/chart.d.ts +0 -4
- package/dist/data-components/chart/chart.stories.d.ts +0 -15
- package/dist/data-components/chart/geo/geoChart.d.ts +0 -10
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +0 -37
- package/dist/data-components/data-component-configurator/data-component-configurator-types.d.ts +0 -35
- package/dist/data-components/data-component-configurator/data-component-configurator.d.ts +0 -17
- package/dist/data-components/data-component-types.d.ts +0 -10
- package/dist/data-components/data-component-utils.d.ts +0 -3
- package/dist/data-components/data-structure/data-structure-utils.d.ts +0 -15
- package/dist/data-components/data-structure/data-structure.d.ts +0 -43
- package/dist/data-components/data-structure/stories-assets.d.ts +0 -86
- package/dist/data-components/filter/filter-engine.d.ts +0 -14
- package/dist/data-components/filter/filter-types.d.ts +0 -40
- package/dist/data-components/filter/filter-utils.d.ts +0 -43
- package/dist/data-components/form/form-types.d.ts +0 -70
- package/dist/data-components/form/form.d.ts +0 -3
- package/dist/data-components/form/form.test.d.ts +0 -0
- package/dist/data-components/form/stories/form-advanced-cells.stories.d.ts +0 -15
- package/dist/data-components/form/stories/form-complex.stories.d.ts +0 -7
- package/dist/data-components/form/stories/form-dynamic.stories.d.ts +0 -20
- package/dist/data-components/form/stories/form-validation-examples.stories.d.ts +0 -7
- package/dist/data-components/form/stories/form.stories.d.ts +0 -17
- package/dist/data-components/gantt/ai-assistant/gantt-ai-executor.d.ts +0 -8
- package/dist/data-components/gantt/ai-assistant/gantt-ai-panel.d.ts +0 -11
- package/dist/data-components/gantt/ai-assistant/gantt-ai-schema.d.ts +0 -6
- package/dist/data-components/gantt/ai-assistant/gantt-ai-tools.d.ts +0 -2
- package/dist/data-components/gantt/arrows/gantt-arrows.d.ts +0 -20
- package/dist/data-components/gantt/gantt-context.d.ts +0 -12
- package/dist/data-components/gantt/gantt-types.d.ts +0 -101
- package/dist/data-components/gantt/gantt-utils.d.ts +0 -60
- package/dist/data-components/gantt/gantt.d.ts +0 -3
- package/dist/data-components/gantt/hooks/useGanttDrag.d.ts +0 -14
- package/dist/data-components/gantt/hooks/useGanttTimeline.d.ts +0 -17
- package/dist/data-components/gantt/sidebar/gantt-sidebar-types.d.ts +0 -9
- package/dist/data-components/gantt/sidebar/gantt-sidebar.d.ts +0 -2
- package/dist/data-components/gantt/stories/gantt-stories-utils.d.ts +0 -12
- package/dist/data-components/gantt/stories/gantt.stories.d.ts +0 -20
- package/dist/data-components/switcher/prop-form/prop-form-adapter.d.ts +0 -9
- package/dist/data-components/switcher/prop-form/prop-form-types.d.ts +0 -16
- package/dist/data-components/switcher/prop-form/prop-form.d.ts +0 -6
- package/dist/data-components/switcher/prop-schema/prop-schema-types.d.ts +0 -52
- package/dist/data-components/switcher/prop-schema/prop-schema-utils.d.ts +0 -14
- package/dist/data-components/switcher/prop-schema/prop-schema.d.ts +0 -37
- package/dist/data-components/switcher/switcher-types.d.ts +0 -57
- package/dist/data-components/switcher/switcher.d.ts +0 -12
- package/dist/data-components/switcher/switcher.stories.d.ts +0 -7
- package/dist/data-components/table-grid/aggregation/aggregation-utils.d.ts +0 -8
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +0 -8
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +0 -12
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +0 -13
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +0 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +0 -3
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +0 -5
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +0 -93
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +0 -4
- package/dist/data-components/table-grid/ai-assistant/table-grid-ai.stories.d.ts +0 -9
- package/dist/data-components/table-grid/editability/table-grid-editability.stories.d.ts +0 -7
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.d.ts +0 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +0 -8
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.d.ts +0 -5
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.d.ts +0 -5
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +0 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +0 -5
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.d.ts +0 -6
- package/dist/data-components/table-grid/external-functionalities/import/table-grid-import.stories.d.ts +0 -6
- package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +0 -4
- package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +0 -2
- package/dist/data-components/table-grid/formula/evaluator.d.ts +0 -10
- package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +0 -7
- package/dist/data-components/table-grid/formula/formula-builder.d.ts +0 -2
- package/dist/data-components/table-grid/formula/formula.test.d.ts +0 -1
- package/dist/data-components/table-grid/formula/index.d.ts +0 -11
- package/dist/data-components/table-grid/formula/parser.d.ts +0 -23
- package/dist/data-components/table-grid/formula/table-grid-formula.stories.d.ts +0 -9
- package/dist/data-components/table-grid/formula/tokenizer.d.ts +0 -15
- package/dist/data-components/table-grid/formula/types.d.ts +0 -38
- package/dist/data-components/table-grid/grouping/grouping.d.ts +0 -14
- package/dist/data-components/table-grid/grouping/table-grid-grouping.stories.d.ts +0 -7
- package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +0 -6
- package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +0 -3
- package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +0 -9
- package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +0 -5
- package/dist/data-components/table-grid/header/table-grid-header.d.ts +0 -3
- package/dist/data-components/table-grid/hooks/use-table.d.ts +0 -2
- package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +0 -20
- package/dist/data-components/table-grid/pinning/table-grid-pinning.stories.d.ts +0 -17
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +0 -16
- package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +0 -3
- package/dist/data-components/table-grid/pivot/pivot-table.d.ts +0 -7
- package/dist/data-components/table-grid/pivot/pivot-types.d.ts +0 -52
- package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +0 -13
- package/dist/data-components/table-grid/pivot/table-grid-pivot.stories.d.ts +0 -15
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +0 -10
- package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +0 -16
- package/dist/data-components/table-grid/row/table-grid-row.d.ts +0 -2
- package/dist/data-components/table-grid/selection/selection-types.d.ts +0 -2
- package/dist/data-components/table-grid/selection/selection-utils.d.ts +0 -48
- package/dist/data-components/table-grid/selection/table-grid-selection.stories.d.ts +0 -9
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.d.ts +0 -27
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +0 -2
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.stories.d.ts +0 -10
- package/dist/data-components/table-grid/sorting/sorting.d.ts +0 -7
- package/dist/data-components/table-grid/sorting/table-grid-sorting-groups.stories.d.ts +0 -5
- package/dist/data-components/table-grid/sorting/table-grid-sorting.stories.d.ts +0 -6
- package/dist/data-components/table-grid/stories/table-grid-columns.stories.d.ts +0 -8
- package/dist/data-components/table-grid/stories/table-grid-states.stories.d.ts +0 -8
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +0 -16
- package/dist/data-components/table-grid/table-context/table-context.d.ts +0 -2
- package/dist/data-components/table-grid/table-grid-context.d.ts +0 -3
- package/dist/data-components/table-grid/table-grid-features.stories.d.ts +0 -11
- package/dist/data-components/table-grid/table-grid-panels.d.ts +0 -21
- package/dist/data-components/table-grid/table-grid-types.d.ts +0 -246
- package/dist/data-components/table-grid/table-grid.d.ts +0 -10
- package/dist/data-components/table-grid/table-grid.stories.d.ts +0 -14
- package/dist/data-components/table-grid/table-utils.d.ts +0 -17
- package/dist/data-components/ui-layer/ui-layer-types.d.ts +0 -81
- package/dist/data-components/ui-layer/ui-layer-utils.d.ts +0 -12
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.d.ts +0 -14
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +0 -11
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +0 -3
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.stories.d.ts +0 -9
- package/dist/experimental-components/dashboard-builder/builder-canvas-hooks.d.ts +0 -46
- package/dist/experimental-components/dashboard-builder/builder-canvas.d.ts +0 -33
- package/dist/experimental-components/dashboard-builder/dashboard-builder-hooks.d.ts +0 -23
- package/dist/experimental-components/dashboard-builder/dashboard-builder-types.d.ts +0 -173
- package/dist/experimental-components/dashboard-builder/dashboard-builder-utils.d.ts +0 -37
- package/dist/experimental-components/dashboard-builder/dashboard-builder.d.ts +0 -13
- package/dist/experimental-components/dashboard-builder/dashboard-builder.stories.d.ts +0 -8
- package/dist/experimental-components/dashboard-builder/widget-configurator.d.ts +0 -25
- package/dist/experimental-components/dashboard-builder/widget-palette.d.ts +0 -19
- package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +0 -11
- package/dist/experimental-components/filter-builder/filter-builder.d.ts +0 -11
- package/dist/experimental-components/filter-builder/filter-builder.stories.d.ts +0 -15
- package/dist/framework-components/appbar/appbar-assets.d.ts +0 -1
- package/dist/framework-components/appbar/appbar-types.d.ts +0 -18
- package/dist/framework-components/appbar/appbar.d.ts +0 -8
- package/dist/framework-components/appbar/appbar.stories.d.ts +0 -6
- package/dist/framework-components/blank-slate/blank-slate-types.d.ts +0 -31
- package/dist/framework-components/blank-slate/blank-slate.d.ts +0 -10
- package/dist/framework-components/blank-slate/blank-slate.stories.d.ts +0 -9
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.d.ts +0 -13
- package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +0 -3
- package/dist/framework-components/breadcrumbs/breadcrumbs.stories.d.ts +0 -7
- package/dist/framework-components/dashboard/dashboard-context.d.ts +0 -11
- package/dist/framework-components/dashboard/dashboard-real-world.stories.d.ts +0 -6
- package/dist/framework-components/dashboard/dashboard-types.d.ts +0 -47
- package/dist/framework-components/dashboard/dashboard-widget-actions.d.ts +0 -0
- package/dist/framework-components/dashboard/dashboard-widget-types.d.ts +0 -85
- package/dist/framework-components/dashboard/dashboard-widget.d.ts +0 -17
- package/dist/framework-components/dashboard/dashboard.d.ts +0 -15
- package/dist/framework-components/dashboard/dashboard.stories.d.ts +0 -7
- package/dist/framework-components/dashboard/data-engine/aggregation-engine.d.ts +0 -10
- package/dist/framework-components/dashboard/data-engine/data-engine-client.d.ts +0 -46
- package/dist/framework-components/dashboard/data-engine/data-engine-types.d.ts +0 -118
- package/dist/framework-components/dashboard/data-engine/data-engine.d.ts +0 -86
- package/dist/framework-components/dashboard/data-engine/data-engine.test.d.ts +0 -1
- package/dist/framework-components/dashboard/data-engine/data-engine.worker.d.ts +0 -1
- package/dist/framework-components/dashboard/data-engine/field-inference.d.ts +0 -9
- package/dist/framework-components/dashboard/data-engine/filter-adapter.d.ts +0 -11
- package/dist/framework-components/dashboard/data-engine/index.d.ts +0 -7
- package/dist/framework-components/dashboard/data-engine/join-engine.d.ts +0 -16
- package/dist/framework-components/drawer/drawer-types.d.ts +0 -6
- package/dist/framework-components/drawer/drawer.d.ts +0 -4
- package/dist/framework-components/scaffold/scaffold-context.d.ts +0 -3
- package/dist/framework-components/scaffold/scaffold-types.d.ts +0 -17
- package/dist/framework-components/scaffold/scaffold.d.ts +0 -6
- package/dist/framework-components/scaffold/scaffold.stories.d.ts +0 -7
- package/dist/framework-components/scaffold/scaffold.test.d.ts +0 -0
- package/dist/framework-components/section/section-types.d.ts +0 -15
- package/dist/framework-components/section/section.d.ts +0 -8
- package/dist/framework-components/section/section.stories.d.ts +0 -6
- package/dist/framework-components/sidebar/sidebar-assets.d.ts +0 -1
- package/dist/framework-components/sidebar/sidebar-context.d.ts +0 -3
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.d.ts +0 -5
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +0 -2
- package/dist/framework-components/sidebar/sidebar-types.d.ts +0 -12
- package/dist/framework-components/sidebar/sidebar.d.ts +0 -16
- package/dist/framework-components/sidebar/sidebar.stories.d.ts +0 -6
- package/dist/framework-components/stepper/stepper-types.d.ts +0 -13
- package/dist/framework-components/stepper/stepper.d.ts +0 -8
- package/dist/framework-components/stepper/stepper.stories.d.ts +0 -7
- package/dist/hooks/useDynamicVirtualList.d.ts +0 -75
- package/dist/hooks/useEscapeClose.d.ts +0 -2
- package/dist/hooks/useFixedVirtualList.d.ts +0 -34
- package/dist/hooks/useOverlayAnimation.d.ts +0 -17
- package/dist/hooks/useShortcut.d.ts +0 -19
- package/dist/hooks/useTour/stories/useTour.stories.d.ts +0 -24
- package/dist/hooks/useTour/useTour-context-internal.d.ts +0 -6
- package/dist/hooks/useTour/useTour-context.d.ts +0 -9
- package/dist/hooks/useTour/useTour-types.d.ts +0 -191
- package/dist/hooks/useTour/useTour.d.ts +0 -2
- package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +0 -7
- package/dist/providers/ai-assistant/ai-assistant-types.d.ts +0 -77
- package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +0 -22
- package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +0 -24
- package/dist/providers/ai-assistant/ai-chat-panel.d.ts +0 -2
- package/dist/providers/shortcut/shortcut-context.d.ts +0 -6
- package/dist/providers/shortcut/shortcut-provider.d.ts +0 -34
- package/dist/providers/stories/theme-provider.stories.d.ts +0 -6
- package/dist/providers/theme/index.d.ts +0 -3
- package/dist/providers/theme/theme-provider-types.d.ts +0 -5
- package/dist/providers/theme/themeProvider.d.ts +0 -9
- package/dist/restio-ui.cjs.js +0 -173
- package/dist/types/global-types.d.ts +0 -46
- package/dist/types/storybook-types.d.ts +0 -1
- package/dist/utility-components/avatar/avatar-types.d.ts +0 -15
- package/dist/utility-components/avatar/avatar.d.ts +0 -4
- package/dist/utility-components/avatar/avatar.stories.d.ts +0 -8
- package/dist/utility-components/chip/chip-types.d.ts +0 -16
- package/dist/utility-components/chip/chip.d.ts +0 -3
- package/dist/utility-components/chip/chip.stories.d.ts +0 -10
- package/dist/utility-components/helper-text/helper-text-types.d.ts +0 -19
- package/dist/utility-components/helper-text/helper-text.d.ts +0 -2
- package/dist/utility-components/helper-text/helper-text.stories.d.ts +0 -10
- package/dist/utility-components/helper-text/helper-text.test.d.ts +0 -1
- package/dist/utility-components/icon/icon-assets.d.ts +0 -1
- package/dist/utility-components/icon/icon-types.d.ts +0 -23
- package/dist/utility-components/icon/icon.d.ts +0 -3
- package/dist/utility-components/icon/stories/icon.stories.d.ts +0 -10
- package/dist/utility-components/label/label-types.d.ts +0 -18
- package/dist/utility-components/label/label.d.ts +0 -2
- package/dist/utility-components/label/label.test.d.ts +0 -1
- package/dist/utility-components/overlay-panel/overlay-panel-footer/overlay-panel-footer-types.d.ts +0 -6
- package/dist/utility-components/overlay-panel/overlay-panel-footer/overlay-panel-footer.d.ts +0 -4
- package/dist/utility-components/overlay-panel/overlay-panel-header/overlay-panel-header-types.d.ts +0 -12
- package/dist/utility-components/overlay-panel/overlay-panel-header/overlay-panel-header.d.ts +0 -4
- package/dist/utility-components/overlay-panel/overlay-panel-types.d.ts +0 -65
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts +0 -3
- package/dist/utility-components/overlay-panel/overlay-panel.stories.d.ts +0 -13
- package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +0 -7
- package/dist/utility-components/skeleton/skeleton-types.d.ts +0 -6
- package/dist/utility-components/skeleton/skeleton.d.ts +0 -3
- package/dist/utility-components/skeleton/stories/skeleton.stories.d.ts +0 -9
- package/dist/utility-components/stack/stack-types.d.ts +0 -10
- package/dist/utility-components/stack/stack.d.ts +0 -7
- package/dist/utility-components/stack/stack.stories.d.ts +0 -4
- package/dist/utility-components/toast/toast-types.d.ts +0 -8
- package/dist/utility-components/toast/toast.d.ts +0 -4
- package/dist/utility-components/toast/toast.stories.d.ts +0 -8
- package/dist/utils/general.d.ts +0 -8
- package/dist/utils/shortcut-utils.d.ts +0 -43
- package/dist/vitest.setup.d.ts +0 -0
package/dist/data.d.ts
ADDED
|
@@ -0,0 +1,1423 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { UIEventHandler, Ref } from 'react';
|
|
3
|
+
|
|
4
|
+
/** Interface for an option in a component */
|
|
5
|
+
interface Option {
|
|
6
|
+
value: string;
|
|
7
|
+
/** Human-readable label shown in the UI; falls back to `value` when omitted. */
|
|
8
|
+
label?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
leadingVisual?: string;
|
|
11
|
+
imageSrc?: string;
|
|
12
|
+
imageAlt?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
children?: Option[];
|
|
16
|
+
onClick?: (option: Option) => void;
|
|
17
|
+
}
|
|
18
|
+
/** Sizing values */
|
|
19
|
+
type Size = "extraSmall" | "small" | "default" | "large" | "extraLarge";
|
|
20
|
+
/** Edit mode for interactive cell components */
|
|
21
|
+
type EditMode = 'click' | 'doubleClick' | 'always' | 'never';
|
|
22
|
+
/** State for component */
|
|
23
|
+
type State = "base" | "success" | "warning" | "danger" | "info" | "idle";
|
|
24
|
+
type ChartType = "line" | "bar" | "pie" | "area" | "scatter" | "sankey" | "sparkline" | "geo" | "composed";
|
|
25
|
+
type ComposedSeriesType = "line" | "bar" | "area" | "scatter";
|
|
26
|
+
declare const CellType: {
|
|
27
|
+
readonly SELECT: "SELECT";
|
|
28
|
+
readonly MULTI_SELECT: "MULTI_SELECT";
|
|
29
|
+
readonly BUTTON_GROUP: "BUTTON_GROUP";
|
|
30
|
+
readonly TEXT: "TEXT";
|
|
31
|
+
readonly TEXTAREA: "TEXTAREA";
|
|
32
|
+
readonly NUMBER: "NUMBER";
|
|
33
|
+
readonly DATE: "DATE";
|
|
34
|
+
readonly DATE_RANGE: "DATE_RANGE";
|
|
35
|
+
readonly IMAGE: "IMAGE";
|
|
36
|
+
readonly TABLE_GRID: "TABLE_GRID";
|
|
37
|
+
readonly CHART: "CHART";
|
|
38
|
+
readonly CHART_SERIES: "CHART_SERIES";
|
|
39
|
+
readonly PROGRESS: "PROGRESS";
|
|
40
|
+
readonly CHECKBOX_GROUP: "CHECKBOX_GROUP";
|
|
41
|
+
readonly CHECKBOX: "CHECKBOX";
|
|
42
|
+
readonly RADIO_GROUP: "RADIO_GROUP";
|
|
43
|
+
readonly COLORS: "COLORS";
|
|
44
|
+
readonly SPARKLINE: "SPARKLINE";
|
|
45
|
+
readonly BUTTON_DROPDOWN: "BUTTON_DROPDOWN";
|
|
46
|
+
readonly BUTTON: "BUTTON";
|
|
47
|
+
readonly TAG: "TAG";
|
|
48
|
+
};
|
|
49
|
+
type CellType = typeof CellType[keyof typeof CellType];
|
|
50
|
+
/** Responsive layout breakpoint */
|
|
51
|
+
type Breakpoint = 'mobile' | 'tablet' | 'desktop';
|
|
52
|
+
|
|
53
|
+
type alignX = 'start' | 'center' | 'end' | 'space-between' | 'space-around';
|
|
54
|
+
type alignY = 'start' | 'center' | 'end' | 'stretch';
|
|
55
|
+
/** Layout block node */
|
|
56
|
+
type BlockNode = {
|
|
57
|
+
type: 'block';
|
|
58
|
+
/** The field/column identifier that the consumer maps to a Cell */
|
|
59
|
+
fieldId: string;
|
|
60
|
+
};
|
|
61
|
+
/** Grid child node */
|
|
62
|
+
type GridChild = {
|
|
63
|
+
node: LayoutNode;
|
|
64
|
+
col: number;
|
|
65
|
+
row: number;
|
|
66
|
+
w: number;
|
|
67
|
+
h: number;
|
|
68
|
+
/** Horizontal alignment of content within the grid cell */
|
|
69
|
+
alignX?: alignX;
|
|
70
|
+
/** Vertical alignment of content within the grid cell */
|
|
71
|
+
alignY?: alignY;
|
|
72
|
+
};
|
|
73
|
+
/** Grid container node */
|
|
74
|
+
type GridContainer = {
|
|
75
|
+
type: 'grid';
|
|
76
|
+
columns: number;
|
|
77
|
+
rows?: number;
|
|
78
|
+
gap?: number;
|
|
79
|
+
children: GridChild[];
|
|
80
|
+
};
|
|
81
|
+
/** Flex container node */
|
|
82
|
+
type FlexContainer = {
|
|
83
|
+
type: 'flex';
|
|
84
|
+
direction?: 'row' | 'column';
|
|
85
|
+
gap?: number;
|
|
86
|
+
alignX?: alignX;
|
|
87
|
+
alignY?: alignY;
|
|
88
|
+
children: LayoutNode[];
|
|
89
|
+
};
|
|
90
|
+
/** Union of all node types */
|
|
91
|
+
type LayoutNode = BlockNode | GridContainer | FlexContainer;
|
|
92
|
+
/** Responsive layout mapping breakpoints to layout trees */
|
|
93
|
+
type ResponsiveLayout = {
|
|
94
|
+
[K in Breakpoint]: LayoutNode;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
interface BaseTypographyProps {
|
|
98
|
+
/**
|
|
99
|
+
* Prefer children when rendering rich/nested content
|
|
100
|
+
*/
|
|
101
|
+
children?: React__default.ReactNode;
|
|
102
|
+
variant: TypographyVariant;
|
|
103
|
+
/**
|
|
104
|
+
* Flag to indicate if the component is disabled.
|
|
105
|
+
* @optional
|
|
106
|
+
*/
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Optional color string i can pass to the text
|
|
110
|
+
* @optional
|
|
111
|
+
*/
|
|
112
|
+
color?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Font weight applied to the text.
|
|
115
|
+
* @optional
|
|
116
|
+
*/
|
|
117
|
+
fontWeight?: string | number;
|
|
118
|
+
/**
|
|
119
|
+
* Font style applied to the text.
|
|
120
|
+
* @optional
|
|
121
|
+
*/
|
|
122
|
+
fontStyle?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Text decoration applied to the text.
|
|
125
|
+
* @optional
|
|
126
|
+
*/
|
|
127
|
+
textDecoration?: string;
|
|
128
|
+
}
|
|
129
|
+
type TypographyVariant = "display" | "heading" | "body" | "label" | "code" | "subtitle" | "title" | "caption" | "article-h1" | "article-h2" | "article-h3" | "article-h4" | "article-body" | "article-code" | "article-quote" | "article-caption" | "article-list";
|
|
130
|
+
|
|
131
|
+
interface IconProps {
|
|
132
|
+
/**
|
|
133
|
+
* Icon name for SVG file or URL for image
|
|
134
|
+
*/
|
|
135
|
+
src: string;
|
|
136
|
+
/**
|
|
137
|
+
* Manage disabled state
|
|
138
|
+
*/
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Manage disabled state
|
|
142
|
+
*/
|
|
143
|
+
state?: State;
|
|
144
|
+
/**
|
|
145
|
+
* Width of the icon
|
|
146
|
+
*/
|
|
147
|
+
width?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Height of the icon
|
|
150
|
+
*/
|
|
151
|
+
height?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface ProgressBarProps {
|
|
155
|
+
/** Current progress value */
|
|
156
|
+
value: number;
|
|
157
|
+
/** Minimum value of the range. Defaults to 0. */
|
|
158
|
+
min?: number;
|
|
159
|
+
/** Maximum value of the range. Defaults to 100. */
|
|
160
|
+
max?: number;
|
|
161
|
+
/** Visual variant for color theming */
|
|
162
|
+
variant?: State;
|
|
163
|
+
/** Whether the progress bar is in an indeterminate loading state */
|
|
164
|
+
indeterminate?: boolean;
|
|
165
|
+
/** Whether to show the header with percentage (left) and value (right) above the bar */
|
|
166
|
+
showLabel?: boolean;
|
|
167
|
+
/** Custom label text (overrides the percentage on the left) */
|
|
168
|
+
label?: string;
|
|
169
|
+
/** Custom formatter for the value shown on the right */
|
|
170
|
+
formatValue?: (value: number) => string;
|
|
171
|
+
/** Height of the progress bar */
|
|
172
|
+
height?: number;
|
|
173
|
+
/** Whether the component is disabled */
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
/** Additional CSS class name */
|
|
176
|
+
className?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Maps each CellType to the component-specific props that can be passed
|
|
181
|
+
* via `uiVariant` in a rule. TypeScript enforces that you only pass props
|
|
182
|
+
* the underlying component actually understands.
|
|
183
|
+
*/
|
|
184
|
+
type CellUIVariantMap = {
|
|
185
|
+
[K in CellType]: K extends "IMAGE" ? Partial<Omit<IconProps, "src">> : K extends "TAG" ? Partial<{
|
|
186
|
+
state: State;
|
|
187
|
+
size: Size;
|
|
188
|
+
}> : K extends "PROGRESS" ? Partial<Pick<ProgressBarProps, "variant" | "showLabel" | "height">> : Partial<Omit<BaseTypographyProps, "children" | "variant">>;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Given a tuple of `DataStructureColumn`, produces a union of
|
|
192
|
+
* `{ columnId: string; cellType: CellType }` entries.
|
|
193
|
+
*/
|
|
194
|
+
type ColumnTypeMap<TData, TColumns extends readonly DataStructureColumn<TData>[]> = {
|
|
195
|
+
[K in keyof TColumns]: TColumns[K] extends DataStructureColumn<TData> ? {
|
|
196
|
+
columnId: TColumns[K]["id"] extends string ? TColumns[K]["id"] : string;
|
|
197
|
+
cellType: TColumns[K]["cellType"] extends CellType ? TColumns[K]["cellType"] : CellType;
|
|
198
|
+
} : never;
|
|
199
|
+
}[number];
|
|
200
|
+
/**
|
|
201
|
+
* Looks up the `cellType` for a given `columnId` from a columns array.
|
|
202
|
+
* Falls back to `CellType` if not found.
|
|
203
|
+
*/
|
|
204
|
+
type LookupCellType<TData, TColumns extends readonly DataStructureColumn<TData>[], TId extends string> = Extract<ColumnTypeMap<TData, TColumns>, {
|
|
205
|
+
columnId: TId;
|
|
206
|
+
}> extends {
|
|
207
|
+
cellType: infer R;
|
|
208
|
+
} ? R extends CellType ? R : CellType : CellType;
|
|
209
|
+
/** Comparison operators for AST-like UI rules */
|
|
210
|
+
type UIRuleOperator = "==" | "!=" | ">" | ">=" | "<" | "<=" | "includes" | "startsWith" | "endsWith" | "isEmpty" | "isNotEmpty";
|
|
211
|
+
/**
|
|
212
|
+
* A single declarative styling rule evaluated against a row.
|
|
213
|
+
* Rules are compiled once into fast evaluators — no runtime functions.
|
|
214
|
+
*
|
|
215
|
+
* When `field` and `op` are omitted, the rule always matches (static styling).
|
|
216
|
+
*
|
|
217
|
+
* @example conditional
|
|
218
|
+
* { field: "price", op: ">", value: 100, uiVariant: { color: "var(--rst-color-success)", fontWeight: "bold" } }
|
|
219
|
+
*
|
|
220
|
+
* @example static (always applies)
|
|
221
|
+
* { uiVariant: { color: "red" } }
|
|
222
|
+
*/
|
|
223
|
+
interface DataStructureUIRule<TData, K extends CellType = CellType> {
|
|
224
|
+
/** Which field to evaluate — omit for a static rule that always matches */
|
|
225
|
+
field?: keyof TData;
|
|
226
|
+
/** Comparison operator — omit for a static rule that always matches */
|
|
227
|
+
op?: UIRuleOperator;
|
|
228
|
+
/** Comparison value (not needed for isEmpty / isNotEmpty) */
|
|
229
|
+
value?: unknown;
|
|
230
|
+
/**
|
|
231
|
+
* Component-specific props forwarded to the underlying renderer.
|
|
232
|
+
* TypeScript enforces the correct props based on the column's `cellType`.
|
|
233
|
+
*/
|
|
234
|
+
uiVariant?: CellUIVariantMap[K];
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Per-column UI configuration.
|
|
238
|
+
* Matches a schema column via `columnId` (same as `DataStructureColumn.id` or `accessorKey`).
|
|
239
|
+
*/
|
|
240
|
+
interface DataStructureUIColumn<TData, TColumns extends readonly DataStructureColumn<TData>[] = DataStructureColumn<TData>[], TId extends string = string> {
|
|
241
|
+
/** Matches `DataStructureColumn.id` or `accessorKey` */
|
|
242
|
+
columnId: TId;
|
|
243
|
+
/** Ordered rules — first match wins. Rules without `field`/`op` always match. */
|
|
244
|
+
rules?: DataStructureUIRule<TData, LookupCellType<TData, TColumns, TId>>[];
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Top-level UI configuration passed to any data-component.
|
|
248
|
+
* `TColumns` is inferred from the `columns` prop — `cellType` is looked up automatically.
|
|
249
|
+
*/
|
|
250
|
+
interface DataStructureUIConfig<TData, TColumns extends readonly DataStructureColumn<TData>[] = DataStructureColumn<TData>[]> {
|
|
251
|
+
columns?: DataStructureUIColumn<TData, TColumns, string>[];
|
|
252
|
+
/** Container-level styling applied to the component root (e.g. Card state). */
|
|
253
|
+
container?: DataStructureUIContainer;
|
|
254
|
+
}
|
|
255
|
+
/** Container-level UI configuration.*/
|
|
256
|
+
interface DataStructureUIContainer {
|
|
257
|
+
/** Component-specific props forwarded to the container root renderer. */
|
|
258
|
+
uiVariant?: Record<string, unknown>;
|
|
259
|
+
}
|
|
260
|
+
/** Pre-resolved cell styling — Cell never resolves UI, only consumes this */
|
|
261
|
+
interface ResolvedCellUI {
|
|
262
|
+
/** Component-specific props resolved from uiVariant rules */
|
|
263
|
+
uiVariant?: Record<string, unknown>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
interface DataStructureComponent<TData> {
|
|
267
|
+
/** Array of data to display in the chart */
|
|
268
|
+
data: TData[];
|
|
269
|
+
/** Column definitions - reused from TableGrid */
|
|
270
|
+
columns?: DataStructureColumn<TData>[];
|
|
271
|
+
/** Function to get subrows for a given row */
|
|
272
|
+
getSubRows?: (originalRow: TData, index: number) => TData[] | undefined;
|
|
273
|
+
/** UI configuration for conditional styling and presentation */
|
|
274
|
+
uiConfig?: DataStructureUIConfig<TData>;
|
|
275
|
+
}
|
|
276
|
+
interface DataStructureColumn<TData, TValue = TData[keyof TData]> {
|
|
277
|
+
/** Unique identifier for the column */
|
|
278
|
+
id?: string;
|
|
279
|
+
/** Display header text */
|
|
280
|
+
header?: string;
|
|
281
|
+
/** Simple accessor key for primitive values */
|
|
282
|
+
accessorKey?: keyof TData;
|
|
283
|
+
/** Optional: options for select inputs */
|
|
284
|
+
options?: Option[];
|
|
285
|
+
/** Formula string using column IDs as references */
|
|
286
|
+
formula?: string;
|
|
287
|
+
/** Enable editing for this column */
|
|
288
|
+
enableEditing?: boolean;
|
|
289
|
+
/** Optional: mark field as required */
|
|
290
|
+
required?: boolean;
|
|
291
|
+
/** Disable editing for this column */
|
|
292
|
+
disabled?: boolean;
|
|
293
|
+
/** Function accessor for complex values */
|
|
294
|
+
accessorFn?: (row: TData) => TValue;
|
|
295
|
+
/** Visual representation type for cells with options or specific data types */
|
|
296
|
+
cellType?: CellType;
|
|
297
|
+
/** Helper text shown below the field (e.g. "Opzionale", "Usa +/− per il segno"). */
|
|
298
|
+
helperText?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Generic column-level configuration for the target component.
|
|
301
|
+
* Mirrors the uiConfig pattern: carries the props of the component
|
|
302
|
+
* referenced by `cellType` (e.g. ChartProps for CHART, TableGridProps for TABLE_GRID).
|
|
303
|
+
* `data` and `columns` are excluded — they come from the cell value and schema.
|
|
304
|
+
*/
|
|
305
|
+
columnConfig?: Record<string, unknown>;
|
|
306
|
+
/**
|
|
307
|
+
* Called when an interactive cell (e.g. BUTTON, IMAGE click) fires an action.
|
|
308
|
+
* The cell handler decides when to invoke it; the first argument is the
|
|
309
|
+
* action id (for BUTTON = `option.value`). Works in any data-component
|
|
310
|
+
* that renders Cell in display mode (CardList, TableGrid, …).
|
|
311
|
+
*/
|
|
312
|
+
onCellClick?: (actionId: string, rowData: TData, column: DataStructureColumn<TData, TValue>) => void;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Maps a layout slot (`block.fieldId`) to the data-column option value (`col.id ?? String(accessorKey)`) that fills it.
|
|
317
|
+
*/
|
|
318
|
+
type SlotMap = {
|
|
319
|
+
slotId: string;
|
|
320
|
+
column: string;
|
|
321
|
+
}[];
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Props for the Card component.
|
|
325
|
+
* Renders a single data row as a card with optional layout configuration.
|
|
326
|
+
*/
|
|
327
|
+
interface CardSpecificProps<TData> {
|
|
328
|
+
/** Single row of data to display in the card */
|
|
329
|
+
data: TData;
|
|
330
|
+
/** Responsive layout configuration for card fields */
|
|
331
|
+
layout?: ResponsiveLayout;
|
|
332
|
+
/** Maps a column (`accessorKey`) to a layout slot id (`block.fieldId`).*/
|
|
333
|
+
slotMap?: SlotMap;
|
|
334
|
+
/** Additional CSS class for the card container */
|
|
335
|
+
className?: string;
|
|
336
|
+
/** Semantic state for the card container (colors background/border). */
|
|
337
|
+
state?: State;
|
|
338
|
+
/** Called when the card is clicked */
|
|
339
|
+
onClick?: () => void;
|
|
340
|
+
/** Whether the card is in selected state */
|
|
341
|
+
selected?: boolean;
|
|
342
|
+
/** Whether the card is disabled (muted, non-interactive look) */
|
|
343
|
+
disabled?: boolean;
|
|
344
|
+
}
|
|
345
|
+
type CardProps<TData> = Omit<DataStructureComponent<TData>, "data"> & CardSpecificProps<TData>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Renders a single data row as a card with optional layout configuration.
|
|
349
|
+
* Fields are displayed using Cell components and optionally arranged via Layout.
|
|
350
|
+
*/
|
|
351
|
+
declare function Card<TData>({ data, columns, layout, className, uiConfig, onClick, selected, disabled, slotMap, state }: CardProps<TData>): React__default.JSX.Element;
|
|
352
|
+
declare namespace Card {
|
|
353
|
+
var displayName: string;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Per-series row of the composed-series matrix.
|
|
358
|
+
* `column` references a Y-axis data column by id/accessor;
|
|
359
|
+
* `type` decides which cartesian primitive (line/bar/area/scatter) renders;
|
|
360
|
+
* `color` is optional — falls back to the chart palette when omitted.
|
|
361
|
+
*/
|
|
362
|
+
interface ChartSeriesConfig<TData = Record<string, unknown>> {
|
|
363
|
+
column: keyof TData | string;
|
|
364
|
+
type: ComposedSeriesType;
|
|
365
|
+
color?: string;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Configuration for Sankey charts.
|
|
369
|
+
* stageColumns: ordered list of columns that define the flow stages (min 2).
|
|
370
|
+
* - Null/undefined/empty values in a row are skipped, creating a direct link
|
|
371
|
+
* between the nearest non-empty columns on both sides.
|
|
372
|
+
* valueColumn: numeric column used as the flow weight.
|
|
373
|
+
*
|
|
374
|
+
* @example 2-level (source → target)
|
|
375
|
+
* { stageColumns: ["from", "to"], valueColumn: "amount" }
|
|
376
|
+
*
|
|
377
|
+
* @example multi-level journey
|
|
378
|
+
* { stageColumns: ["channel", "device", "outcome"], valueColumn: "count" }
|
|
379
|
+
*/
|
|
380
|
+
interface SankeyConfig<TData> {
|
|
381
|
+
stageColumns: (keyof TData)[];
|
|
382
|
+
valueColumn: keyof TData;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Configuration for Geo charts.
|
|
386
|
+
* geoJson: GeoJSON FeatureCollection with MultiPolygon geometry.
|
|
387
|
+
* regionColumn: column in TData that maps to the "name" property in geoJson features.
|
|
388
|
+
* valueColumn: numeric column used for the choropleth color scale.
|
|
389
|
+
* colorRange: [minColor, maxColor] — two CSS color strings for the gradient.
|
|
390
|
+
*/
|
|
391
|
+
interface GeoConfig<TData> {
|
|
392
|
+
geoJson: {
|
|
393
|
+
type: "FeatureCollection";
|
|
394
|
+
features: Array<{
|
|
395
|
+
type: "Feature";
|
|
396
|
+
properties: Record<string, unknown>;
|
|
397
|
+
geometry: {
|
|
398
|
+
type: "MultiPolygon" | "Polygon";
|
|
399
|
+
coordinates: number[][][][] | number[][][];
|
|
400
|
+
};
|
|
401
|
+
}>;
|
|
402
|
+
};
|
|
403
|
+
regionColumn: keyof TData;
|
|
404
|
+
valueColumn: keyof TData;
|
|
405
|
+
colorRange?: [string, string];
|
|
406
|
+
}
|
|
407
|
+
interface ChartSpecificProps<TData> {
|
|
408
|
+
/** Type of chart to render */
|
|
409
|
+
type: ChartType;
|
|
410
|
+
/** Column to use for X-axis (category/labels). Not required for type="sankey". */
|
|
411
|
+
xAxisColumn?: keyof TData;
|
|
412
|
+
/** Column(s) to use for Y-axis (values). Not required for type="sankey". */
|
|
413
|
+
yAxisColumns?: (keyof TData)[];
|
|
414
|
+
/** Chart title */
|
|
415
|
+
title?: string;
|
|
416
|
+
/** Chart subtitle */
|
|
417
|
+
subtitle?: string;
|
|
418
|
+
/** Width of the chart */
|
|
419
|
+
width?: number | `${number}%`;
|
|
420
|
+
/** Height of the chart */
|
|
421
|
+
height?: number | `${number}%`;
|
|
422
|
+
/** Custom colors for chart series */
|
|
423
|
+
colors?: string[];
|
|
424
|
+
/**
|
|
425
|
+
* Per-series matrix used when type === "composed" (Cartesian-only mixes:
|
|
426
|
+
* line + bar + area + scatter). For the single-type cartesian types
|
|
427
|
+
* (line/bar/area/scatter), the matrix is derived from yAxisColumns and
|
|
428
|
+
* every entry adopts `type` — so the prop form only needs to manage one
|
|
429
|
+
* matrix for all cartesian charts. Ignored for pie/sankey/sparkline/geo.
|
|
430
|
+
*/
|
|
431
|
+
series?: ChartSeriesConfig<TData>[];
|
|
432
|
+
/** Show/hide chart elements */
|
|
433
|
+
showGrid?: boolean;
|
|
434
|
+
showTooltip?: boolean;
|
|
435
|
+
showLegend?: boolean;
|
|
436
|
+
showXAxis?: boolean;
|
|
437
|
+
showYAxis?: boolean;
|
|
438
|
+
/** Callback when a data point is clicked */
|
|
439
|
+
onDataPointClick?: (data: TData, index: number) => void;
|
|
440
|
+
/** Chart layout orientation */
|
|
441
|
+
layout?: "horizontal" | "vertical";
|
|
442
|
+
/** Configuration required when type="sankey" */
|
|
443
|
+
sankeyConfig?: SankeyConfig<TData>;
|
|
444
|
+
/** Configuration required when type="geo" */
|
|
445
|
+
geoConfig?: GeoConfig<TData>;
|
|
446
|
+
}
|
|
447
|
+
type ChartProps<TData> = DataStructureComponent<TData> & ChartSpecificProps<TData>;
|
|
448
|
+
|
|
449
|
+
declare const Chart: <TData extends object>({ data, columns, type, xAxisColumn, yAxisColumns, title, subtitle, width, height, colors, showGrid, showTooltip, showLegend, showXAxis, showYAxis, layout, series, sankeyConfig, geoConfig, uiConfig, }: ChartProps<TData>) => React__default.JSX.Element;
|
|
450
|
+
|
|
451
|
+
interface ToolCall {
|
|
452
|
+
tool: string;
|
|
453
|
+
arguments: Record<string, unknown>;
|
|
454
|
+
}
|
|
455
|
+
interface ToolParameterSchema {
|
|
456
|
+
name: string;
|
|
457
|
+
type: string;
|
|
458
|
+
description: string;
|
|
459
|
+
required?: boolean;
|
|
460
|
+
}
|
|
461
|
+
interface ToolDefinition {
|
|
462
|
+
name: string;
|
|
463
|
+
description: string;
|
|
464
|
+
parameters: ToolParameterSchema[];
|
|
465
|
+
}
|
|
466
|
+
interface ColumnSchema {
|
|
467
|
+
id: string;
|
|
468
|
+
label: string;
|
|
469
|
+
type: "string" | "number" | "date" | "boolean" | "unknown";
|
|
470
|
+
/** Valid option values for select / button-group columns */
|
|
471
|
+
options?: string[];
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Serializable snapshot of the current table state passed to the AI provider.
|
|
475
|
+
* All IDs align with ColumnSchema ids and 0-based rowIndex values.
|
|
476
|
+
*/
|
|
477
|
+
interface AITableContext {
|
|
478
|
+
/** All data rows. rowIndex (0-based) in tool calls maps to this array. */
|
|
479
|
+
rows: Record<string, unknown>[];
|
|
480
|
+
/** Active sort criteria in priority order */
|
|
481
|
+
sorting?: Array<{
|
|
482
|
+
column: string;
|
|
483
|
+
direction: "asc" | "desc";
|
|
484
|
+
}>;
|
|
485
|
+
/** Column IDs currently used for grouping */
|
|
486
|
+
grouping?: string[];
|
|
487
|
+
/** IDs of rows currently selected */
|
|
488
|
+
selectedRowIds?: string[];
|
|
489
|
+
/** Column IDs that are hidden */
|
|
490
|
+
hiddenColumnIds?: string[];
|
|
491
|
+
/** Current column display order (empty = natural order) */
|
|
492
|
+
columnOrder?: string[];
|
|
493
|
+
/** Current column pinning overrides */
|
|
494
|
+
columnPinning?: Record<string, "left" | "right">;
|
|
495
|
+
}
|
|
496
|
+
interface AIResponse {
|
|
497
|
+
message: string;
|
|
498
|
+
toolCalls: ToolCall[];
|
|
499
|
+
}
|
|
500
|
+
interface AIProvider {
|
|
501
|
+
processMessage(input: string, schema: ColumnSchema[], tools: ToolDefinition[], tableContext?: AITableContext): Promise<AIResponse>;
|
|
502
|
+
}
|
|
503
|
+
interface AIQuickAction {
|
|
504
|
+
/** Button label shown to the user */
|
|
505
|
+
label: string;
|
|
506
|
+
/** The prompt text sent to the AI when this action is triggered */
|
|
507
|
+
prompt: string;
|
|
508
|
+
/** Optional icon name (from the icon system) */
|
|
509
|
+
icon?: string;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
type GanttView = "year" | "month" | "week" | "day";
|
|
513
|
+
/**
|
|
514
|
+
* Relation types:
|
|
515
|
+
* - FS (Finish-to-Start): arrow from end of predecessor to start of successor
|
|
516
|
+
* - SS (Start-to-Start): arrow from start of predecessor to start of successor
|
|
517
|
+
* - FF (Finish-to-Finish): arrow from end of predecessor to end of successor
|
|
518
|
+
* - SF (Start-to-Finish): arrow from start of predecessor to end of successor
|
|
519
|
+
*/
|
|
520
|
+
type GanttRelationType = "FS" | "SS" | "FF" | "SF";
|
|
521
|
+
/**
|
|
522
|
+
* A single dependency descriptor.
|
|
523
|
+
* The `dependencyColumnId` field on each row can resolve to:
|
|
524
|
+
* - `string` — single dependency ID (defaults to "FS")
|
|
525
|
+
* - `string[]` — multiple dependency IDs (all default to "FS")
|
|
526
|
+
* - `GanttDependency` — single dependency with explicit type
|
|
527
|
+
* - `GanttDependency[]` — multiple dependencies with explicit types
|
|
528
|
+
*/
|
|
529
|
+
interface GanttDependency {
|
|
530
|
+
id: string;
|
|
531
|
+
type?: GanttRelationType;
|
|
532
|
+
}
|
|
533
|
+
interface GanttSpecificProps<TData> {
|
|
534
|
+
/** Column id or accessorKey for the start date (must resolve to Date, ISO string, or timestamp) */
|
|
535
|
+
startColumnId: string | keyof TData;
|
|
536
|
+
/** Column id or accessorKey for the end date (must resolve to Date, ISO string, or timestamp) */
|
|
537
|
+
endColumnId: string | keyof TData;
|
|
538
|
+
/** Column id or accessorKey for the event label */
|
|
539
|
+
eventColumnId: string | keyof TData;
|
|
540
|
+
/** Column id or accessorKey that uniquely identifies each row */
|
|
541
|
+
idColumnId?: string | keyof TData;
|
|
542
|
+
/**
|
|
543
|
+
* Column id or accessorKey for the dependency field.
|
|
544
|
+
* Resolves to string | string[] | GanttDependency | GanttDependency[]
|
|
545
|
+
*/
|
|
546
|
+
dependencyColumnId?: string | keyof TData;
|
|
547
|
+
/**
|
|
548
|
+
* IDs of columns to display in the left data-grid panel.
|
|
549
|
+
* If not provided, all columns (excluding dependencyColumnId) are shown.
|
|
550
|
+
*/
|
|
551
|
+
gridColumnIds?: string[];
|
|
552
|
+
/** Time granularity for the timeline header */
|
|
553
|
+
view?: GanttView;
|
|
554
|
+
/** Reference date used to determine the visible range. Defaults to `new Date()` */
|
|
555
|
+
initialDate?: Date;
|
|
556
|
+
/** Optional function to override the background color of an event bar */
|
|
557
|
+
eventColorFn?: (row: TData) => string | undefined;
|
|
558
|
+
/** Enable sorting on the left grid panel columns */
|
|
559
|
+
enableSorting?: boolean;
|
|
560
|
+
/** Enable the AI assistant sidebar panel */
|
|
561
|
+
enableAIAssistant?: boolean;
|
|
562
|
+
/** AI provider instance used by the AI assistant panel */
|
|
563
|
+
aiProvider?: AIProvider;
|
|
564
|
+
/** Pre-configured quick-action buttons shown in the AI chat */
|
|
565
|
+
aiQuickActions?: AIQuickAction[];
|
|
566
|
+
/** When true, AI tool calls require explicit user confirmation before being applied */
|
|
567
|
+
requiresConfirmation?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Called when the user manually drags or resizes an event bar.
|
|
570
|
+
* Receives the original row data and the new start/end Dates.
|
|
571
|
+
*/
|
|
572
|
+
onEventChange?: (row: TData, newStart: Date, newEnd: Date) => void;
|
|
573
|
+
}
|
|
574
|
+
type GanttProps<TData> = DataStructureComponent<TData> & GanttSpecificProps<TData>;
|
|
575
|
+
|
|
576
|
+
declare function Gantt<TData>(props: GanttProps<TData>): React$1.JSX.Element;
|
|
577
|
+
|
|
578
|
+
type AggregationFn = "sum" | "count" | "avg" | "min" | "max";
|
|
579
|
+
|
|
580
|
+
/** Backward-compatible alias — prefer AggregationFn for new code. */
|
|
581
|
+
type PivotAggregation = AggregationFn;
|
|
582
|
+
interface PivotValueField {
|
|
583
|
+
/** The field ID (column accessorKey or id) to aggregate */
|
|
584
|
+
field: string;
|
|
585
|
+
/** Aggregation function to apply */
|
|
586
|
+
aggregation: PivotAggregation;
|
|
587
|
+
/** Optional display label */
|
|
588
|
+
label?: string;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Configuration for pivot mode.
|
|
592
|
+
* rowFields: column IDs whose values form the row groups.
|
|
593
|
+
* columnFields: column IDs whose unique values become dynamic columns.
|
|
594
|
+
* valueFields: numeric fields to aggregate at each row × column intersection.
|
|
595
|
+
*/
|
|
596
|
+
interface PivotConfig {
|
|
597
|
+
rowFields: string[];
|
|
598
|
+
columnFields: string[];
|
|
599
|
+
valueFields: PivotValueField[];
|
|
600
|
+
}
|
|
601
|
+
/** A resolved column in the computed pivot result */
|
|
602
|
+
interface PivotColumnDef {
|
|
603
|
+
id: string;
|
|
604
|
+
/** Primary label: row-field name OR column-field value (e.g. "New York") */
|
|
605
|
+
label: string;
|
|
606
|
+
/** Secondary label shown in the second header row: aggregation + field (e.g. "Salary (sum)"). Only present for value columns when columnFields are in use. */
|
|
607
|
+
subLabel?: string;
|
|
608
|
+
/** true when this column represents a row grouping field (left side) */
|
|
609
|
+
isRowField: boolean;
|
|
610
|
+
/** The value from the pivot column field (e.g. "New York") */
|
|
611
|
+
columnFieldValue?: string;
|
|
612
|
+
/** The column field ID (e.g. "location") */
|
|
613
|
+
columnFieldId?: string;
|
|
614
|
+
/** The value field aggregation spec */
|
|
615
|
+
valueField?: PivotValueField;
|
|
616
|
+
}
|
|
617
|
+
/** A single row in the computed pivot result */
|
|
618
|
+
interface PivotRow {
|
|
619
|
+
id: string;
|
|
620
|
+
/** Values for each row field */
|
|
621
|
+
rowValues: Record<string, string>;
|
|
622
|
+
/** Aggregated cell values keyed by PivotColumnDef.id */
|
|
623
|
+
cells: Record<string, number | string | null>;
|
|
624
|
+
}
|
|
625
|
+
/** Full computed pivot output */
|
|
626
|
+
interface ComputedPivotData {
|
|
627
|
+
columns: PivotColumnDef[];
|
|
628
|
+
rows: PivotRow[];
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
interface DateRange {
|
|
632
|
+
from: Date | undefined;
|
|
633
|
+
to: Date | undefined;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
type FilterColumnType = "string" | "number" | "date" | "boolean";
|
|
637
|
+
type StringOperator = "equals" | "not_equals" | "contains" | "starts_with" | "ends_with" | "in" | "not_in" | "is_null" | "is_not_null";
|
|
638
|
+
type NumberOperator = "equals" | "not_equals" | "greater" | "greater_equals" | "less" | "less_equals" | "in" | "not_in" | "is_null" | "is_not_null";
|
|
639
|
+
type DateOperator = "equals" | "not_equals" | "after" | "after_or_on" | "before" | "before_or_on" | "between" | "is_null" | "is_not_null";
|
|
640
|
+
type BooleanOperator = "is_true" | "is_false" | "is_null" | "is_not_null";
|
|
641
|
+
type FilterOperator = StringOperator | NumberOperator | DateOperator | BooleanOperator;
|
|
642
|
+
type FilterValue = string | string[] | number | number[] | Date | boolean | DateRange | null;
|
|
643
|
+
interface FilterFieldProp {
|
|
644
|
+
/** Matches ColumnDef id or accessorKey (stringified) */
|
|
645
|
+
id: string;
|
|
646
|
+
/** Human-readable label (from ColumnDef.header) */
|
|
647
|
+
label: string;
|
|
648
|
+
/** Column data type used to pick operators and value input */
|
|
649
|
+
type: FilterColumnType;
|
|
650
|
+
/** Available values for `in` / `not_in` operators (from CellType.SELECT / MULTI_SELECT columns) */
|
|
651
|
+
availableOptions?: Option[];
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Per-field read-only flags for a condition. Each flag locks a single
|
|
655
|
+
*/
|
|
656
|
+
interface ConditionReadOnly {
|
|
657
|
+
/** Locks the field selector (first dropdown). */
|
|
658
|
+
field?: boolean;
|
|
659
|
+
/** Locks the operator selector (second dropdown). */
|
|
660
|
+
operator?: boolean;
|
|
661
|
+
/** Locks the value input. */
|
|
662
|
+
value?: boolean;
|
|
663
|
+
/** Hides the delete button. */
|
|
664
|
+
delete?: boolean;
|
|
665
|
+
}
|
|
666
|
+
interface FilterCondition {
|
|
667
|
+
type: "condition";
|
|
668
|
+
field: FilterFieldProp;
|
|
669
|
+
operator: FilterOperator;
|
|
670
|
+
value: FilterValue;
|
|
671
|
+
/** Optional per-field read-only flags (stored on the condition, not global). */
|
|
672
|
+
readOnly?: ConditionReadOnly;
|
|
673
|
+
}
|
|
674
|
+
interface FilterGroup {
|
|
675
|
+
type: "group";
|
|
676
|
+
logic: "and" | "or";
|
|
677
|
+
filters: FilterNode[];
|
|
678
|
+
}
|
|
679
|
+
/** Recursive union — use `node.type` to discriminate */
|
|
680
|
+
type FilterNode = FilterCondition | FilterGroup;
|
|
681
|
+
|
|
682
|
+
type TableGridDisplayMode = "tree" | "table" | "table-tree";
|
|
683
|
+
/** Which grid lines (cell borders) are visible. */
|
|
684
|
+
type TableGridShowGrid = ShowGridLines;
|
|
685
|
+
/** All valid showGrid values. */
|
|
686
|
+
declare const ShowGridLines: {
|
|
687
|
+
readonly None: "none";
|
|
688
|
+
readonly Vertical: "vertical";
|
|
689
|
+
readonly Horizontal: "horizontal";
|
|
690
|
+
readonly Both: "both";
|
|
691
|
+
};
|
|
692
|
+
type ShowGridLines = (typeof ShowGridLines)[keyof typeof ShowGridLines];
|
|
693
|
+
interface TableGridSpecificProps<TData> {
|
|
694
|
+
/** Enable sorting functionality */
|
|
695
|
+
enableSorting?: boolean;
|
|
696
|
+
/** Enable row selection */
|
|
697
|
+
enableSelection?: boolean;
|
|
698
|
+
/** Enable editing functionality */
|
|
699
|
+
enableEditing?: boolean;
|
|
700
|
+
/** Callback when a row is clicked */
|
|
701
|
+
onRowClick?: (row: TData, index: number) => void;
|
|
702
|
+
/** Callback when data changes */
|
|
703
|
+
onDataChange?: (data: TData[]) => void;
|
|
704
|
+
/** Callback fired when the selection changes */
|
|
705
|
+
onSelectionChange?: (selectedIds: string[], selectedData: TData[]) => void;
|
|
706
|
+
/** Enable grouping functionality */
|
|
707
|
+
enableGrouping?: boolean;
|
|
708
|
+
/** Callback when grouping changes */
|
|
709
|
+
onGroupingChange?: (grouping: string[]) => void;
|
|
710
|
+
/** Custom className for styling */
|
|
711
|
+
className?: string;
|
|
712
|
+
/** Enable virtualization */
|
|
713
|
+
enableVirtualization?: boolean;
|
|
714
|
+
/** Height of each row in pixels (required for virtualization) */
|
|
715
|
+
virtualizedRowHeight?: number;
|
|
716
|
+
/** Height of the scrollable container in pixels (required for virtualization) */
|
|
717
|
+
virtualizedContainerHeight?: number;
|
|
718
|
+
/** When true, cells keep a fixed single-line height; overflowing content is clipped. */
|
|
719
|
+
oneLine?: boolean;
|
|
720
|
+
/** Which grid lines (cell borders) are visible. Defaults to "both". */
|
|
721
|
+
showGrid?: TableGridShowGrid;
|
|
722
|
+
/** Enable sticky header */
|
|
723
|
+
stickyHeader?: boolean;
|
|
724
|
+
/** Enable sticky footer */
|
|
725
|
+
stickyFooter?: boolean;
|
|
726
|
+
/** Enable pivot table mode — shows the pivot icon in the right toolbar */
|
|
727
|
+
enablePivot?: boolean;
|
|
728
|
+
/** Initial or controlled pivot configuration */
|
|
729
|
+
pivotConfig?: PivotConfig;
|
|
730
|
+
/** Callback when the pivot configuration changes */
|
|
731
|
+
onPivotConfigChange?: (config: PivotConfig) => void;
|
|
732
|
+
/** Enable the formula builder — shows the formula icon in the right toolbar */
|
|
733
|
+
enableFormulaBuilder?: boolean;
|
|
734
|
+
/**
|
|
735
|
+
* Controls how column widths are calculated.
|
|
736
|
+
* - `"auto"` (default): columns share the available width; `size` is ignored.
|
|
737
|
+
* - `"fixed"`: each column uses its `size` value; the table scrolls horizontally when the total exceeds the container.
|
|
738
|
+
*/
|
|
739
|
+
columnSizing?: "auto" | "fixed";
|
|
740
|
+
/** Show loading skeleton state while data is being fetched */
|
|
741
|
+
loading?: boolean;
|
|
742
|
+
/** Allow columns to be reordered via drag & drop on the header */
|
|
743
|
+
enableColumnReorder?: boolean;
|
|
744
|
+
/** Show a column visibility toggle panel in the right sidebar */
|
|
745
|
+
enableColumnVisibility?: boolean;
|
|
746
|
+
/** Show a filter panel in the right sidebar */
|
|
747
|
+
enableFiltering?: boolean;
|
|
748
|
+
/** Enable the AI assistant chat panel in the right sidebar */
|
|
749
|
+
enableAIAssistant?: boolean;
|
|
750
|
+
/** AI provider instance for processing natural-language commands */
|
|
751
|
+
aiProvider?: AIProvider;
|
|
752
|
+
/** When true, AI-suggested actions are held for explicit user confirmation before being applied */
|
|
753
|
+
requiresConfirmation?: boolean;
|
|
754
|
+
/** Pre-configured action buttons shown in the AI chat panel for one-click commands */
|
|
755
|
+
aiQuickActions?: AIQuickAction[];
|
|
756
|
+
/**
|
|
757
|
+
* Called whenever a new formula column is created (via the builder or AI).
|
|
758
|
+
* Use this to persist the column definition on your server so it can be
|
|
759
|
+
* re-supplied via the `columns` prop on the next load.
|
|
760
|
+
*/
|
|
761
|
+
onFormulaColumnAdd?: (col: ColumnDef<TData>) => void;
|
|
762
|
+
/**
|
|
763
|
+
* Forwarded to the inner scroll container (`rst-table-container`).
|
|
764
|
+
* Allows an external component to react to scroll events from the table body.
|
|
765
|
+
* Works for both virtualized and non-virtualized modes.
|
|
766
|
+
*/
|
|
767
|
+
onScroll?: UIEventHandler<HTMLDivElement>;
|
|
768
|
+
/**
|
|
769
|
+
* Ref forwarded to the inner scroll container (`rst-table-container`).
|
|
770
|
+
* Allows an external component to programmatically read or set `scrollTop`.
|
|
771
|
+
* Works for both virtualized and non-virtualized modes.
|
|
772
|
+
*/
|
|
773
|
+
scrollContainerRef?: Ref<HTMLDivElement>;
|
|
774
|
+
}
|
|
775
|
+
type TableGridProps<TData> = DataStructureComponent<TData> & TableGridSpecificProps<TData>;
|
|
776
|
+
interface ColumnDef<TData, TValue = TData[keyof TData]> extends DataStructureColumn<TData, TValue> {
|
|
777
|
+
/** Column width */
|
|
778
|
+
size?: number;
|
|
779
|
+
minSize?: number;
|
|
780
|
+
maxSize?: number;
|
|
781
|
+
/** Enable sorting for this column */
|
|
782
|
+
enableSorting?: boolean;
|
|
783
|
+
/** Sort function for custom sorting */
|
|
784
|
+
sortingFn?: (a: TData, b: TData, columnId: string) => number;
|
|
785
|
+
/** Pin column to left or right */
|
|
786
|
+
pinned?: "left" | "right" | false;
|
|
787
|
+
/** Footer content. Pass a string for a static label, a function for dynamic JSX,
|
|
788
|
+
* or { aggregation } to auto-compute a total from the column data. */
|
|
789
|
+
footer?: string | {
|
|
790
|
+
aggregation: AggregationFn;
|
|
791
|
+
label?: string;
|
|
792
|
+
} | ((props: {
|
|
793
|
+
column: ColumnDef<TData>;
|
|
794
|
+
}) => React.ReactNode);
|
|
795
|
+
}
|
|
796
|
+
interface TableRow<TData> {
|
|
797
|
+
/** Row unique ID */
|
|
798
|
+
id: string;
|
|
799
|
+
/** Original data object for the row */
|
|
800
|
+
data: TData;
|
|
801
|
+
/** Index in the original data array */
|
|
802
|
+
index: number;
|
|
803
|
+
/** Parent row ID if this is a subrow */
|
|
804
|
+
parentId?: string;
|
|
805
|
+
/** Depth level in the hierarchy (0 = top level) */
|
|
806
|
+
depth: number;
|
|
807
|
+
/** Whether this row is expanded (has visible subrows) */
|
|
808
|
+
isExpanded: boolean;
|
|
809
|
+
/** Subrows if any */
|
|
810
|
+
subRows?: TableRow<TData>[];
|
|
811
|
+
/** Whether this is a group row */
|
|
812
|
+
isGroup?: boolean;
|
|
813
|
+
/** The value being grouped on */
|
|
814
|
+
groupingValue?: string;
|
|
815
|
+
/** The column ID being grouped on */
|
|
816
|
+
groupingColumnId?: string;
|
|
817
|
+
/** All original data items in this group (set only when isGroup=true) */
|
|
818
|
+
groupItems?: TData[];
|
|
819
|
+
}
|
|
820
|
+
interface TableState<TData> {
|
|
821
|
+
/** Current data in the table */
|
|
822
|
+
dataState: TData[];
|
|
823
|
+
/** Current sorting state */
|
|
824
|
+
sorting: SortingState;
|
|
825
|
+
/** Current grouping state (column IDs) */
|
|
826
|
+
grouping: string[];
|
|
827
|
+
/** Expanded rows */
|
|
828
|
+
expandedRows: Set<string>;
|
|
829
|
+
/** Display mode based on data structure */
|
|
830
|
+
displayMode: TableGridDisplayMode;
|
|
831
|
+
/** Set of selected row IDs */
|
|
832
|
+
selectedRows: Set<string>;
|
|
833
|
+
/** Ordered list of column IDs (empty = natural order) */
|
|
834
|
+
columnOrder: string[];
|
|
835
|
+
/** Set of hidden column IDs */
|
|
836
|
+
hiddenColumns: Set<string>;
|
|
837
|
+
/** Dynamic pinning overrides — takes precedence over ColumnDef.pinned */
|
|
838
|
+
columnPinning: Record<string, "left" | "right" | false>;
|
|
839
|
+
/** Active filter tree — null means no filter applied */
|
|
840
|
+
filterGroup: FilterGroup | null;
|
|
841
|
+
/** Whether filtering is enabled */
|
|
842
|
+
enableFiltering?: boolean;
|
|
843
|
+
}
|
|
844
|
+
type SortingState = {
|
|
845
|
+
id: string;
|
|
846
|
+
desc: boolean;
|
|
847
|
+
}[];
|
|
848
|
+
|
|
849
|
+
declare function TableGrid<TData>({ data, columns, getSubRows, onDataChange, onSelectionChange, enableSorting, enableSelection, enableEditing, enableGrouping, enableVirtualization, stickyHeader, stickyFooter, columnSizing, enableColumnReorder, enableColumnVisibility, enableFiltering, enableAIAssistant, aiProvider, onFormulaColumnAdd: externalOnFormulaColumnAdd, loading, uiConfig, oneLine, showGrid, ...toolPassThrough }: TableGridProps<TData>): React$1.JSX.Element;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Read a CSV/TSV/custom-delimited file and convert it into
|
|
853
|
+
* { data, columns } matching DataStructureComponent<TData> props.
|
|
854
|
+
*/
|
|
855
|
+
declare function createDataStructureFromFile<TData extends Record<string, unknown> = Record<string, unknown>>(file: File): Promise<{
|
|
856
|
+
data: TData[];
|
|
857
|
+
columns: ColumnDef<TData, TData[keyof TData]>[];
|
|
858
|
+
}>;
|
|
859
|
+
|
|
860
|
+
interface CellProps<TData, TValue> {
|
|
861
|
+
/** The actual value to display/edit */
|
|
862
|
+
value: TValue;
|
|
863
|
+
/** Column definition for configuration */
|
|
864
|
+
column: DataStructureColumn<TData, TValue>;
|
|
865
|
+
/** Original row data */
|
|
866
|
+
rowData: TData;
|
|
867
|
+
/** Row index */
|
|
868
|
+
rowIndex: number;
|
|
869
|
+
/** Edit mode behavior */
|
|
870
|
+
editMode?: EditMode;
|
|
871
|
+
/** Whether this cell is editable (overrides column config) */
|
|
872
|
+
isEditable?: boolean;
|
|
873
|
+
/** Error message to display */
|
|
874
|
+
error?: string;
|
|
875
|
+
/** Whether the cell is disabled */
|
|
876
|
+
disabled?: boolean;
|
|
877
|
+
/** Whether the cell is in a loading state — renders a skeleton placeholder */
|
|
878
|
+
loading?: boolean;
|
|
879
|
+
/** Whether to show the label above the cell (default: true) */
|
|
880
|
+
showLabel?: boolean;
|
|
881
|
+
/** Whether to show the helper/error text below the cell (default: true) */
|
|
882
|
+
showHelperText?: boolean;
|
|
883
|
+
/** Helper text shown below the cell when no error is present */
|
|
884
|
+
helperText?: string;
|
|
885
|
+
/** Alignment of the label (default: "top") */
|
|
886
|
+
labelAlign?: "top" | "left";
|
|
887
|
+
/** Pre-resolved UI styling — Cell never resolves UI, only consumes it */
|
|
888
|
+
ui?: ResolvedCellUI;
|
|
889
|
+
/** Callback when value changes */
|
|
890
|
+
onValueChange?: (newValue: TValue, rowData: TData, column: DataStructureColumn<TData, TValue>) => void;
|
|
891
|
+
/** Callback when editing starts */
|
|
892
|
+
onEditStart?: (rowData: TData, column: DataStructureColumn<TData, TValue>) => void;
|
|
893
|
+
/** Callback when editing ends */
|
|
894
|
+
onEditEnd?: (rowData: TData, column: DataStructureColumn<TData, TValue>) => void;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
declare const Cell: <TData, TValue>({ value, column, rowData, editMode, isEditable, error, disabled, loading, showLabel, showHelperText, labelAlign, helperText, ui, onValueChange, onEditStart, onEditEnd, }: CellProps<TData, TValue>) => React$1.JSX.Element;
|
|
898
|
+
|
|
899
|
+
interface CalendarSpecificProps<TData> {
|
|
900
|
+
/** Column id or accessorKey for the date column (must resolve to a Date or ISO string) */
|
|
901
|
+
dateColumnId: string | keyof TData;
|
|
902
|
+
/** Column id or accessorKey for the event/title column */
|
|
903
|
+
eventColumnId: string | keyof TData;
|
|
904
|
+
/** Optional starting month (Date) to render */
|
|
905
|
+
initialMonth?: Date;
|
|
906
|
+
/** Calendar View */
|
|
907
|
+
view?: CalendarView;
|
|
908
|
+
/**
|
|
909
|
+
* Column id or accessorKey of a field that already contains the summary
|
|
910
|
+
* value to display for that day (or month in year view).
|
|
911
|
+
*/
|
|
912
|
+
summaryColumnId?: string | keyof TData;
|
|
913
|
+
/**
|
|
914
|
+
* Maximum number of events to show per day cell before collapsing the rest
|
|
915
|
+
* into a "+ N more" button. Defaults to unlimited.
|
|
916
|
+
*/
|
|
917
|
+
maxEvents?: number;
|
|
918
|
+
/**
|
|
919
|
+
* Optional function to override the background color of a specific event chip.
|
|
920
|
+
* Receives the data row and returns a CSS color string, or undefined to use the default.
|
|
921
|
+
* @example eventColorFn={(row) => row.type === 'holiday' ? '#f59e0b' : undefined}
|
|
922
|
+
*/
|
|
923
|
+
eventColorFn?: (row: TData) => string | undefined;
|
|
924
|
+
}
|
|
925
|
+
type CalendarProps<TData> = DataStructureComponent<TData> & CalendarSpecificProps<TData>;
|
|
926
|
+
type CalendarView = "month" | "week" | "day" | "year";
|
|
927
|
+
|
|
928
|
+
declare function Calendar<TData>({ data, columns, dateColumnId, eventColumnId, initialMonth, view, summaryColumnId, maxEvents, eventColorFn, uiConfig, }: CalendarProps<TData>): React__default.JSX.Element;
|
|
929
|
+
|
|
930
|
+
type ButtonVariant = "base" | "primary" | "danger" | "invisible" | "link";
|
|
931
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
932
|
+
alignContent?: 'start' | 'center';
|
|
933
|
+
leadingVisual?: string;
|
|
934
|
+
trailingVisual?: string;
|
|
935
|
+
loading?: boolean;
|
|
936
|
+
size?: Size;
|
|
937
|
+
variant?: ButtonVariant;
|
|
938
|
+
disabled?: boolean;
|
|
939
|
+
/** State where interaction and animation are disabled */
|
|
940
|
+
readOnly?: boolean;
|
|
941
|
+
count?: number;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* Delta operation for a single column when the form state changes.
|
|
946
|
+
* The server returns only the columns that need to be added, updated, or removed.
|
|
947
|
+
*/
|
|
948
|
+
interface FormColumnDelta<TData> {
|
|
949
|
+
/** What to do with this column */
|
|
950
|
+
action: "add" | "update" | "remove";
|
|
951
|
+
/** The column definition */
|
|
952
|
+
column: FormColumn<TData>;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Server response to a field change.
|
|
956
|
+
* Only the changed pieces are returned — the form merges them with existing state.
|
|
957
|
+
*
|
|
958
|
+
* - `data`: partial data to merge (e.g. reset dependent fields to null)
|
|
959
|
+
* - `columns`: delta operations on columns (add new dependent fields, update options, remove fields)
|
|
960
|
+
* - `layout`: optional new layout. If omitted, the form recalculates from current columns.
|
|
961
|
+
*/
|
|
962
|
+
interface FormChangeResponse<TData> {
|
|
963
|
+
/** Partial data delta — merged with current formData */
|
|
964
|
+
data?: Partial<TData>;
|
|
965
|
+
/** Column delta operations — applied to current columns */
|
|
966
|
+
columns?: FormColumnDelta<TData>[];
|
|
967
|
+
/** Optional new layout. If omitted, layout is recalculated from updated columns. */
|
|
968
|
+
layout?: ResponsiveLayout;
|
|
969
|
+
}
|
|
970
|
+
interface FormSpecificProps<TData> {
|
|
971
|
+
/** Override columns with form-specific options */
|
|
972
|
+
columns?: FormColumn<TData>[];
|
|
973
|
+
/** label alignment */
|
|
974
|
+
labelAlign?: "left" | "top";
|
|
975
|
+
/** Optional layout configuration */
|
|
976
|
+
layout?: ResponsiveLayout;
|
|
977
|
+
/** Maps a column (`accessorKey`) to a layout slot id (`block.fieldId`).*/
|
|
978
|
+
slotMap?: SlotMap;
|
|
979
|
+
/** Callback when form is submitted */
|
|
980
|
+
onSubmit?: (data: TData) => void;
|
|
981
|
+
/** Callback when cancel is clicked */
|
|
982
|
+
onCancel?: () => void;
|
|
983
|
+
/** Custom action buttons rendered in the form footer.*/
|
|
984
|
+
actions?: ButtonProps[];
|
|
985
|
+
/**
|
|
986
|
+
* Server-driven callback invoked on every field change.
|
|
987
|
+
*
|
|
988
|
+
* The server receives the current form state and the changed field,
|
|
989
|
+
* and returns a **partial delta** — only the pieces that changed.
|
|
990
|
+
* The form merges the delta into its state and re-renders only
|
|
991
|
+
* the affected fields.
|
|
992
|
+
*
|
|
993
|
+
* Fields not yet resolved (loading) show a skeleton placeholder.
|
|
994
|
+
*
|
|
995
|
+
* @param formData - Current complete form data
|
|
996
|
+
* @param changedField - The accessorKey of the field that changed
|
|
997
|
+
* @param newValue - The new value of the changed field
|
|
998
|
+
* @returns A partial delta with data, column operations, and optional layout
|
|
999
|
+
*/
|
|
1000
|
+
onFormChange?: (formData: TData, changedField: keyof TData, newValue: TData[keyof TData]) => Promise<FormChangeResponse<TData>>;
|
|
1001
|
+
}
|
|
1002
|
+
type FormProps<TData> = DataStructureComponent<TData> & FormSpecificProps<TData>;
|
|
1003
|
+
interface FormColumn<TData> extends DataStructureColumn<TData> {
|
|
1004
|
+
/** Optional: custom message when required validation fails */
|
|
1005
|
+
requiredMessage?: string;
|
|
1006
|
+
/** Optional: custom validation function */
|
|
1007
|
+
validate?: (value: TData[keyof TData], rowData: TData) => string | undefined;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
declare function Form<TData>({ data, columns, layout, slotMap, onSubmit, onCancel, onFormChange, uiConfig, labelAlign, actions }: FormProps<TData>): React__default.JSX.Element;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Props for the CardList component.
|
|
1014
|
+
* Renders an array of data as a list of cards.
|
|
1015
|
+
*/
|
|
1016
|
+
interface CardListSpecificProps<TData> {
|
|
1017
|
+
/** Responsive layout configuration for each card's fields */
|
|
1018
|
+
layout?: ResponsiveLayout;
|
|
1019
|
+
/** Maps a column (`accessorKey`) to a layout slot id (`block.fieldId`)*/
|
|
1020
|
+
slotMap?: SlotMap;
|
|
1021
|
+
/** Additional CSS class for the container */
|
|
1022
|
+
containerClassName?: string;
|
|
1023
|
+
/** Called when a card is clicked, with the item data */
|
|
1024
|
+
onCardClick?: (item: TData) => void;
|
|
1025
|
+
/** Currently selected item (single selection) */
|
|
1026
|
+
selected?: TData;
|
|
1027
|
+
/** Array of selected items (multi-selection) */
|
|
1028
|
+
multiSelection?: TData[];
|
|
1029
|
+
/** Function to determine if an item is selected (used when TData is not comparable by reference) */
|
|
1030
|
+
isSelected?: (item: TData, selectedItem: TData) => boolean;
|
|
1031
|
+
}
|
|
1032
|
+
type CardListProps<TData> = DataStructureComponent<TData> & CardListSpecificProps<TData>;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* Renders an array of data as a list of cards.
|
|
1036
|
+
* Each card is configured with the same columns and layout.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function CardList<TData>({ data, columns, layout, slotMap, containerClassName, uiConfig, onCardClick, selected, multiSelection, isSelected, }: CardListProps<TData>): React$1.JSX.Element;
|
|
1039
|
+
declare namespace CardList {
|
|
1040
|
+
var displayName: string;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/** Position where a dragged node can be dropped, relative to a drop target. */
|
|
1044
|
+
type TreeDropPosition = "inside" | "before" | "after";
|
|
1045
|
+
/** Payload describing the drop of a dragged node onto a target node. */
|
|
1046
|
+
interface TreeDropPayload {
|
|
1047
|
+
/** Id of the dragged node. */
|
|
1048
|
+
sourceId: string;
|
|
1049
|
+
/** Id of the node used as drop target. */
|
|
1050
|
+
targetId: string;
|
|
1051
|
+
/** Where the node is dropped relative to the target. */
|
|
1052
|
+
position: TreeDropPosition;
|
|
1053
|
+
}
|
|
1054
|
+
/** Internal (non-data) state of a row, fed to the row renderer. */
|
|
1055
|
+
interface TreeRowState {
|
|
1056
|
+
depth: number;
|
|
1057
|
+
isExpanded: boolean;
|
|
1058
|
+
isSelected: boolean;
|
|
1059
|
+
isOver: boolean;
|
|
1060
|
+
dropPosition: TreeDropPosition | undefined;
|
|
1061
|
+
isDragging: boolean;
|
|
1062
|
+
isDisabled: boolean;
|
|
1063
|
+
}
|
|
1064
|
+
/** Contract passed from the Tree to each row (accessors, callbacks, state fns). */
|
|
1065
|
+
interface TreeRowScope<TData> {
|
|
1066
|
+
getNodeId: (node: TData) => string;
|
|
1067
|
+
getNodeLabel: (node: TData) => string;
|
|
1068
|
+
getChildren: (node: TData) => TData[] | undefined;
|
|
1069
|
+
isExpanded: (id: string) => boolean;
|
|
1070
|
+
isSelected: (id: string) => boolean;
|
|
1071
|
+
isDragging: (id: string) => boolean;
|
|
1072
|
+
/** Id of the unique direct parent of the hovered node, if any. */
|
|
1073
|
+
parentOfHoveredId?: string;
|
|
1074
|
+
/** Set the id of the row currently hovered (undefined to clear). */
|
|
1075
|
+
setHoveredId: (id: string | undefined) => void;
|
|
1076
|
+
hoverTargetId: string | undefined;
|
|
1077
|
+
hoverPosition: TreeDropPosition | undefined;
|
|
1078
|
+
/** True while the current hover target is not a valid drop target (rejected). */
|
|
1079
|
+
dropRejected: boolean;
|
|
1080
|
+
onToggle: (id: string) => void;
|
|
1081
|
+
onSelect: (id: string) => void;
|
|
1082
|
+
onDragStart: (e: React__default.DragEvent, id: string) => void;
|
|
1083
|
+
onDragOver: (e: React__default.DragEvent, id: string) => void;
|
|
1084
|
+
onDragLeave: () => void;
|
|
1085
|
+
onDrop: (e: React__default.DragEvent, id: string) => void;
|
|
1086
|
+
onAction?: (actionId: string, node: TData, id: string) => void;
|
|
1087
|
+
renderNode?: (node: TData, state: TreeRowState) => React__default.ReactNode;
|
|
1088
|
+
getNodeIcon?: (node: TData) => string | undefined;
|
|
1089
|
+
getNodeDisabled?: (node: TData) => boolean;
|
|
1090
|
+
actions?: Option[];
|
|
1091
|
+
draggable?: boolean;
|
|
1092
|
+
enableDragAndDrop?: boolean;
|
|
1093
|
+
enableConnection?: boolean;
|
|
1094
|
+
depth: number;
|
|
1095
|
+
}
|
|
1096
|
+
/** Imperative handle exposed via `ref` for programmatic expansion control. */
|
|
1097
|
+
interface TreeHandle {
|
|
1098
|
+
expandAll: () => void;
|
|
1099
|
+
collapseAll: () => void;
|
|
1100
|
+
expandToLevel: (level: number) => void;
|
|
1101
|
+
collapseToLevel: (level: number) => void;
|
|
1102
|
+
}
|
|
1103
|
+
interface TreeProps<TData> {
|
|
1104
|
+
/** Array of root nodes of the forest. */
|
|
1105
|
+
data: TData[];
|
|
1106
|
+
/** Accessor returning the children of a node (undefined for leaves). */
|
|
1107
|
+
getChildren: (node: TData) => TData[] | undefined;
|
|
1108
|
+
/** Accessor returning a stable unique id for the node. */
|
|
1109
|
+
getNodeId: (node: TData) => string;
|
|
1110
|
+
/** Id of the currently selected branch (node that also "comprises" its children). */
|
|
1111
|
+
selectedId?: string;
|
|
1112
|
+
/** Called when a node is selected. */
|
|
1113
|
+
onSelect?: (node: TData, id: string) => void;
|
|
1114
|
+
/** Initial expanded ids. */
|
|
1115
|
+
defaultExpandedIds?: string[];
|
|
1116
|
+
/**
|
|
1117
|
+
* Row actions rendered in the overflow menu. The `value` of each option is
|
|
1118
|
+
* passed to `onAction`; the consumer fully owns their behavior.
|
|
1119
|
+
*/
|
|
1120
|
+
actions?: Option[];
|
|
1121
|
+
/** Called when an action (from `actions`) is fired. */
|
|
1122
|
+
onAction?: (actionId: string, node: TData, id: string) => void;
|
|
1123
|
+
/** Whether rows are draggable and the drag handle is shown. Defaults to true. */
|
|
1124
|
+
enableDragAndDrop?: boolean;
|
|
1125
|
+
/** Whether vertical connection lines are shown. Defaults to true. */
|
|
1126
|
+
enableConnection?: boolean;
|
|
1127
|
+
/** Custom validator run before emitting a drop. Return false to reject. */
|
|
1128
|
+
canDrop?: (payload: TreeDropPayload) => boolean;
|
|
1129
|
+
/** Per-node drop validator. */
|
|
1130
|
+
canDropNode?: (source: TData, target: TData, position: TreeDropPosition) => boolean;
|
|
1131
|
+
/** Emitted when a node is dropped onto/around a target. */
|
|
1132
|
+
onNodeDrop?: (payload: TreeDropPayload) => void;
|
|
1133
|
+
/** Custom renderer for the row content. Receives the node + internal state. */
|
|
1134
|
+
renderNode?: (node: TData, state: TreeRowState) => React__default.ReactNode;
|
|
1135
|
+
/** Extract the display label of a node. Defaults to a `label` field. */
|
|
1136
|
+
getNodeLabel?: (node: TData) => string;
|
|
1137
|
+
/** Extract the icon for a node. Emoji strings are rendered as text; URLs/names use the Icon component. */
|
|
1138
|
+
getNodeIcon?: (node: TData) => string | undefined;
|
|
1139
|
+
/** Extract whether a node is disabled. Disabled nodes are not draggable and get a disabled style. */
|
|
1140
|
+
getNodeDisabled?: (node: TData) => boolean;
|
|
1141
|
+
/** Accessibility label describing the whole tree. */
|
|
1142
|
+
ariaLabel?: string;
|
|
1143
|
+
className?: string;
|
|
1144
|
+
/** Imperative handle for programmatic expansion control (see {@link TreeHandle}). */
|
|
1145
|
+
ref?: React__default.Ref<TreeHandle>;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/** Renders a hierarchical (tree) structure as a sortable, accessible list. */
|
|
1149
|
+
declare function Tree<TData>(props: TreeProps<TData> & {
|
|
1150
|
+
ref?: React__default.Ref<TreeHandle>;
|
|
1151
|
+
}): React__default.JSX.Element;
|
|
1152
|
+
|
|
1153
|
+
interface TreeCardSpecificProps<TData> {
|
|
1154
|
+
/** Column definitions used to render each card's fields. */
|
|
1155
|
+
columns?: DataStructureColumn<TData>[];
|
|
1156
|
+
/** Responsive layout configuration for each card's fields. */
|
|
1157
|
+
layout?: ResponsiveLayout;
|
|
1158
|
+
/** Maps a column (`accessorKey`) to a layout slot id (`block.fieldId`). */
|
|
1159
|
+
slotMap?: SlotMap;
|
|
1160
|
+
/** UI configuration for conditional styling and presentation. */
|
|
1161
|
+
uiConfig?: DataStructureUIConfig<TData>;
|
|
1162
|
+
/** Which nodes get a card body: every node, or only the last nesting level (leaves). Defaults to "all". */
|
|
1163
|
+
cardsAt?: "all" | "leaves";
|
|
1164
|
+
}
|
|
1165
|
+
/** Props for the TreeCard component — combines Tree props with Card-specific layout configuration. */
|
|
1166
|
+
interface TreeCardProps<TData> extends TreeProps<TData>, TreeCardSpecificProps<TData> {
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/** Renders a hierarchical (tree) structure as nested Cards, reusing {@link Tree}'s mechanism. */
|
|
1170
|
+
declare function TreeCard<TData>(props: TreeCardProps<TData> & {
|
|
1171
|
+
ref?: React__default.Ref<TreeHandle>;
|
|
1172
|
+
}): React__default.JSX.Element;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Props for the KPI component.
|
|
1176
|
+
* A KPI is a single-metric Card;
|
|
1177
|
+
*/
|
|
1178
|
+
interface KPISpecificProps<TData> {
|
|
1179
|
+
/** Single row of data to display in the KPI */
|
|
1180
|
+
data: TData;
|
|
1181
|
+
/** Layout for the KPI fields. Reuse a shared layout example or supply a custom one. */
|
|
1182
|
+
layout?: ResponsiveLayout;
|
|
1183
|
+
/** Maps a column (`accessorKey`) to a layout slot id (`block.fieldId`).*/
|
|
1184
|
+
slotMap?: SlotMap;
|
|
1185
|
+
/** Additional CSS class for the KPI container */
|
|
1186
|
+
className?: string;
|
|
1187
|
+
/** Called when the KPI is clicked */
|
|
1188
|
+
onClick?: () => void;
|
|
1189
|
+
}
|
|
1190
|
+
type KPIProps<TData> = Omit<DataStructureComponent<TData>, "data"> & KPISpecificProps<TData>;
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* KPI component — a single-metric Card.
|
|
1194
|
+
*/
|
|
1195
|
+
declare function KPI<TData>({ data, columns, layout, slotMap, className, uiConfig, onClick }: KPIProps<TData>): React$1.JSX.Element;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* Shared finance layouts, usable by any component that accepts a
|
|
1199
|
+
* `ResponsiveLayout` (Card, KPI, CardList).
|
|
1200
|
+
*
|
|
1201
|
+
* Field IDs are intentionally generic so they work with any dataset that
|
|
1202
|
+
* follows the KPI shape: `label`, `value`, `delta`, `trend`, `icon`.
|
|
1203
|
+
*/
|
|
1204
|
+
/**
|
|
1205
|
+
* Compact KPI layout: label on top, big value in the middle, delta/trend
|
|
1206
|
+
* at the bottom. On small breakpoints it collapses to a single column.
|
|
1207
|
+
*/
|
|
1208
|
+
declare const financeKpiLayout: ResponsiveLayout;
|
|
1209
|
+
/**
|
|
1210
|
+
* Finance layout with leading icon on the right side (icon spans the whole
|
|
1211
|
+
* height). Useful when the dataset includes a representative icon/illustration.
|
|
1212
|
+
*/
|
|
1213
|
+
declare const financeKpiLayoutWithIcon: ResponsiveLayout;
|
|
1214
|
+
|
|
1215
|
+
/** A registered CardList layout preset. */
|
|
1216
|
+
interface CardLayoutPreset {
|
|
1217
|
+
id: string;
|
|
1218
|
+
label: string;
|
|
1219
|
+
description: string;
|
|
1220
|
+
/** Bundled SVG icon name shown in the selector. */
|
|
1221
|
+
leadingVisual?: string;
|
|
1222
|
+
layout: ResponsiveLayout;
|
|
1223
|
+
}
|
|
1224
|
+
/**
|
|
1225
|
+
* Card layout: icon on the left, name + type next to it, actions right-aligned.
|
|
1226
|
+
*
|
|
1227
|
+
* Field IDs: `icon`, `name`, `type`, `actions`.
|
|
1228
|
+
*
|
|
1229
|
+
* ┌──────────────────────────────────────┐
|
|
1230
|
+
* │ icon name actions │
|
|
1231
|
+
* │ type │
|
|
1232
|
+
* └──────────────────────────────────────┘
|
|
1233
|
+
*/
|
|
1234
|
+
declare const cardLayoutWithIcon: ResponsiveLayout;
|
|
1235
|
+
/** Maps a preset id to its `ResponsiveLayout`. Falls back to `undefined`. */
|
|
1236
|
+
declare function resolveCardLayoutPreset(id?: string): ResponsiveLayout | undefined;
|
|
1237
|
+
/** Option shape consumed by the card-list layout selector. */
|
|
1238
|
+
declare const cardLayoutPresetOptions: {
|
|
1239
|
+
value: string;
|
|
1240
|
+
label: string;
|
|
1241
|
+
description: string;
|
|
1242
|
+
leadingVisual: string | undefined;
|
|
1243
|
+
}[];
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* A registered KPI layout preset.
|
|
1247
|
+
*
|
|
1248
|
+
* `id` is the value stored in the widget config (and resolved back to a
|
|
1249
|
+
* `ResponsiveLayout` at render time by the Switcher). `label` / `description`
|
|
1250
|
+
* drive the selector UI; `layout` is the actual tree rendered in the preview
|
|
1251
|
+
* and passed to the `KPI` component.
|
|
1252
|
+
*/
|
|
1253
|
+
interface KpiLayoutPreset {
|
|
1254
|
+
id: string;
|
|
1255
|
+
label: string;
|
|
1256
|
+
description: string;
|
|
1257
|
+
/** Bundled SVG icon name shown in the selector. */
|
|
1258
|
+
leadingVisual?: string;
|
|
1259
|
+
layout: ResponsiveLayout;
|
|
1260
|
+
}
|
|
1261
|
+
/** Maps a preset id to its `ResponsiveLayout`. Falls back to `undefined`. */
|
|
1262
|
+
declare function resolveKpiLayoutPreset(id?: string): ResponsiveLayout | undefined;
|
|
1263
|
+
/** Option shape consumed by the `preview-dialog` selector. */
|
|
1264
|
+
declare const kpiLayoutPresetOptions: {
|
|
1265
|
+
value: string;
|
|
1266
|
+
label: string;
|
|
1267
|
+
description: string;
|
|
1268
|
+
leadingVisual: string | undefined;
|
|
1269
|
+
}[];
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Identifiers for all data-components that the switcher can render.
|
|
1273
|
+
*/
|
|
1274
|
+
type DataComponentId = "table-grid" | "chart" | "calendar" | "gantt" | "form" | "card-list" | "kpi";
|
|
1275
|
+
/**
|
|
1276
|
+
* Maps each component id to its specific props interface (without DataStructureComponent).
|
|
1277
|
+
* Used by the switcher to type the dynamic `componentProps` state.
|
|
1278
|
+
*/
|
|
1279
|
+
type ComponentSpecificPropsMap<TData> = {
|
|
1280
|
+
"table-grid": TableGridSpecificProps<TData>;
|
|
1281
|
+
"chart": ChartSpecificProps<TData>;
|
|
1282
|
+
"calendar": CalendarSpecificProps<TData>;
|
|
1283
|
+
"gantt": GanttSpecificProps<TData>;
|
|
1284
|
+
"form": FormSpecificProps<TData>;
|
|
1285
|
+
"card-list": CardListSpecificProps<TData>;
|
|
1286
|
+
"kpi": KPISpecificProps<TData>;
|
|
1287
|
+
};
|
|
1288
|
+
/**
|
|
1289
|
+
* Props for the Switcher component.
|
|
1290
|
+
* Accepts the shared DataStructureComponent props plus an optional initial component.
|
|
1291
|
+
*
|
|
1292
|
+
* Two modes:
|
|
1293
|
+
* - **Uncontrolled**: provide `initialComponent` / `initialComponentProps`. Switcher manages its own state.
|
|
1294
|
+
* - **Controlled**: provide `activeComponent` / `componentProps`. The parent manages state,
|
|
1295
|
+
* and the Switcher reflects changes immediately. Use this when an external configurator
|
|
1296
|
+
* (e.g. DashboardBuilder) drives the configuration.
|
|
1297
|
+
*/
|
|
1298
|
+
interface SwitcherProps<TData> extends DataStructureComponent<TData> {
|
|
1299
|
+
/** Initial active component. Defaults to "table-grid". (Uncontrolled mode) */
|
|
1300
|
+
initialComponent?: DataComponentId;
|
|
1301
|
+
/** Initial specific props for the active component. (Uncontrolled mode) */
|
|
1302
|
+
initialComponentProps?: Partial<ComponentSpecificPropsMap<TData>[DataComponentId]>;
|
|
1303
|
+
/** Active component. When provided, Switcher runs in controlled mode. */
|
|
1304
|
+
activeComponent?: DataComponentId;
|
|
1305
|
+
/** Current component props. When provided, Switcher runs in controlled mode. */
|
|
1306
|
+
componentProps?: Record<string, unknown>;
|
|
1307
|
+
/** Whether to show the "Configure" button and overlay. Default: true. */
|
|
1308
|
+
showConfigurator?: boolean;
|
|
1309
|
+
/** Called when the active component changes. */
|
|
1310
|
+
onComponentChange?: (componentId: DataComponentId) => void;
|
|
1311
|
+
/** Called when the specific props change. */
|
|
1312
|
+
onComponentPropsChange?: (props: Partial<ComponentSpecificPropsMap<TData>[DataComponentId]>) => void;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Switcher — wraps a data-component
|
|
1317
|
+
* Shared props (data, columns, uiConfig, getSubRows) are passed to every component.
|
|
1318
|
+
* Specific props are managed per-component via the config overlay.
|
|
1319
|
+
*
|
|
1320
|
+
* Two modes:
|
|
1321
|
+
* - **Uncontrolled**: provide `initialComponent` / `initialComponentProps`
|
|
1322
|
+
* - **Controlled**: provide `activeComponent` / `componentProps` (external configurator drives state)
|
|
1323
|
+
*/
|
|
1324
|
+
declare const Switcher: <TData extends object>({ data, columns, getSubRows, uiConfig, initialComponent, initialComponentProps, activeComponent: controlledComponent, componentProps: controlledProps, showConfigurator, onComponentChange, onComponentPropsChange, }: SwitcherProps<TData>) => React__default.JSX.Element;
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Where a prop field is configurable.
|
|
1328
|
+
* - `"all"`: visible in both Switcher and Dashboard configurator
|
|
1329
|
+
* - `"switcher"`: visible only in the Switcher panel
|
|
1330
|
+
* - `"dashboard"`: visible only in the Dashboard configurator
|
|
1331
|
+
* - `"none"`: not configurable via UI (callbacks, complex objects, etc.)
|
|
1332
|
+
*/
|
|
1333
|
+
type PropFieldScope = "all" | "switcher" | "dashboard" | "none";
|
|
1334
|
+
/**
|
|
1335
|
+
* Describes a single configurable prop field for the dynamic PropForm.
|
|
1336
|
+
*/
|
|
1337
|
+
interface PropFieldDescriptor {
|
|
1338
|
+
/** Prop name (matches the key in the SpecificProps interface). */
|
|
1339
|
+
name: string;
|
|
1340
|
+
/** Control type to render. */
|
|
1341
|
+
type: "boolean" | "string" | "number" | "select" | "column" | "columns" | "color[]" | "chart-series" | "slot-map";
|
|
1342
|
+
/** Human-readable label. */
|
|
1343
|
+
label: string;
|
|
1344
|
+
/** Default value when the prop is not set. */
|
|
1345
|
+
defaultValue: unknown;
|
|
1346
|
+
/**
|
|
1347
|
+
* Where this field is configurable.
|
|
1348
|
+
* @default "all"
|
|
1349
|
+
*/
|
|
1350
|
+
scope?: PropFieldScope;
|
|
1351
|
+
/** Options for "select" type controls. */
|
|
1352
|
+
options?: {
|
|
1353
|
+
label: string;
|
|
1354
|
+
value: string;
|
|
1355
|
+
description?: string;
|
|
1356
|
+
leadingVisual?: string;
|
|
1357
|
+
}[];
|
|
1358
|
+
/**
|
|
1359
|
+
* Generic column-level configuration forwarded as-is to the generated
|
|
1360
|
+
*/
|
|
1361
|
+
columnConfig?: Record<string, unknown>;
|
|
1362
|
+
/**
|
|
1363
|
+
* Optional condition: if provided, the field is only visible when this
|
|
1364
|
+
* function returns true given the current form values.
|
|
1365
|
+
*/
|
|
1366
|
+
condition?: (formValues: Record<string, unknown>) => boolean;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Registry mapping each DataComponentId to its array of PropFieldDescriptors.
|
|
1370
|
+
*/
|
|
1371
|
+
type PropSchemaRegistry = Record<string, PropFieldDescriptor[]>;
|
|
1372
|
+
|
|
1373
|
+
/**
|
|
1374
|
+
* Props for the shared DataComponentConfigurator.
|
|
1375
|
+
*
|
|
1376
|
+
* This component is used in two contexts:
|
|
1377
|
+
* 1. **Switcher** — shows the component selector + prop form (scope: "switcher")
|
|
1378
|
+
* 2. **Dashboard widget configurator** — shows only the prop form (scope: "dashboard")
|
|
1379
|
+
*/
|
|
1380
|
+
interface DataComponentConfiguratorProps {
|
|
1381
|
+
/** Schema for the active component's configurable fields. */
|
|
1382
|
+
schema: PropFieldDescriptor[];
|
|
1383
|
+
/** Current values for all fields. */
|
|
1384
|
+
values: Record<string, unknown>;
|
|
1385
|
+
/** Called when a field value changes. */
|
|
1386
|
+
onChange: (name: string, value: unknown) => void;
|
|
1387
|
+
/** Available columns (for "column" / "columns" type fields). */
|
|
1388
|
+
columns?: DataStructureColumn<Record<string, unknown>>[];
|
|
1389
|
+
/**
|
|
1390
|
+
* Scope filter — only fields matching this scope are rendered.
|
|
1391
|
+
* @default "all"
|
|
1392
|
+
*/
|
|
1393
|
+
scope?: PropFieldScope;
|
|
1394
|
+
/** When provided, shows the component selector panel. */
|
|
1395
|
+
componentId?: DataComponentId;
|
|
1396
|
+
/** Called when the active component changes. */
|
|
1397
|
+
onComponentChange?: (componentId: DataComponentId) => void;
|
|
1398
|
+
/** Metadata list for the component selector. */
|
|
1399
|
+
componentMetaList?: {
|
|
1400
|
+
id: DataComponentId;
|
|
1401
|
+
label: string;
|
|
1402
|
+
icon: string;
|
|
1403
|
+
}[];
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Shared configurator for data-components.
|
|
1408
|
+
*
|
|
1409
|
+
* Renders:
|
|
1410
|
+
* - An optional **component selector** (when `componentMetaList` is provided)
|
|
1411
|
+
* - A **dynamic prop form** filtered by the given scope
|
|
1412
|
+
*
|
|
1413
|
+
* Used by:
|
|
1414
|
+
* - **Switcher** — full configurator with component selector + all props
|
|
1415
|
+
* - **Dashboard widget configurator** — prop form only (scope: "dashboard")
|
|
1416
|
+
*/
|
|
1417
|
+
declare const DataComponentConfigurator: {
|
|
1418
|
+
({ schema, values, onChange, columns, scope, componentId, onComponentChange, componentMetaList, }: DataComponentConfiguratorProps): React__default.JSX.Element;
|
|
1419
|
+
displayName: string;
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
export { Calendar, Card, CardList, Cell, Chart, DataComponentConfigurator, Form, Gantt, KPI, Switcher, TableGrid, Tree, TreeCard, cardLayoutPresetOptions, cardLayoutWithIcon, createDataStructureFromFile, financeKpiLayout, financeKpiLayoutWithIcon, kpiLayoutPresetOptions, resolveCardLayoutPreset, resolveKpiLayoutPreset };
|
|
1423
|
+
export type { CalendarProps, CardLayoutPreset, CardListProps, CardProps, CellProps, ChartProps, ChartType, ColumnDef, ComponentSpecificPropsMap, ComputedPivotData, DataComponentConfiguratorProps, DataComponentId, DataStructureColumn, DataStructureComponent, DataStructureUIColumn, DataStructureUIConfig, DataStructureUIContainer, DataStructureUIRule, FormChangeResponse, FormColumn, FormColumnDelta, FormProps, GanttDependency, GanttProps, GanttRelationType, GanttView, GeoConfig, KPIProps, KPISpecificProps, KpiLayoutPreset, PivotAggregation, PivotConfig, PivotValueField, PropFieldDescriptor, PropFieldScope, PropSchemaRegistry, ResolvedCellUI, SankeyConfig, SwitcherProps, TableGridProps, TableRow, TableState, TreeCardProps, TreeDropPayload, TreeDropPosition, TreeHandle, TreeProps, TreeRowScope, TreeRowState, UIRuleOperator };
|