@restio/ui 0.0.7-SNAPSHOT → 0.0.9-SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/anchored-overlay/anchored-overlay-types.d.ts +1 -1
- package/dist/components/anchored-overlay/anchored-overlay-types.js +2 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.js.map +1 -0
- package/dist/components/anchored-overlay/anchored-overlay.d.ts +2 -2
- package/dist/components/anchored-overlay/anchored-overlay.js +67 -0
- package/dist/components/anchored-overlay/anchored-overlay.js.map +1 -0
- package/dist/components/banner/banner-types.d.ts +1 -1
- package/dist/components/banner/banner-types.js +2 -0
- package/dist/components/banner/banner-types.js.map +1 -0
- package/dist/components/banner/banner.d.ts +2 -2
- package/dist/components/banner/banner.js +29 -0
- package/dist/components/banner/banner.js.map +1 -0
- package/dist/components/button/button-types.d.ts +1 -1
- package/dist/components/button/button-types.js +2 -0
- package/dist/components/button/button-types.js.map +1 -0
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +20 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button-group/button-group-types.js +2 -0
- package/dist/components/button-group/button-group-types.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +2 -2
- package/dist/components/button-group/button-group.js +16 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/checkbox/checkbox-types.d.ts +1 -1
- package/dist/components/checkbox/checkbox-types.js +2 -0
- package/dist/components/checkbox/checkbox-types.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -2
- package/dist/components/checkbox/checkbox.js +19 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +1 -1
- package/dist/components/code-block/code-block.js +9 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/file-upload/file-upload-types.d.ts +1 -1
- package/dist/components/file-upload/file-upload-types.js +2 -0
- package/dist/components/file-upload/file-upload-types.js.map +1 -0
- package/dist/components/file-upload/file-upload-utils.js +10 -0
- package/dist/components/file-upload/file-upload-utils.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +2 -2
- package/dist/components/file-upload/file-upload.js +106 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/graph/graph-types.js +2 -0
- package/dist/components/graph/graph-types.js.map +1 -0
- package/dist/components/graph/graph.d.ts +1 -1
- package/dist/components/graph/graph.js +21 -0
- package/dist/components/graph/graph.js.map +1 -0
- package/dist/components/input/date/date-calendar.d.ts +2 -2
- package/dist/components/input/date/date-calendar.js +114 -0
- package/dist/components/input/date/date-calendar.js.map +1 -0
- package/dist/components/input/date/date-input-field.d.ts +2 -2
- package/dist/components/input/date/date-input-field.js +61 -0
- package/dist/components/input/date/date-input-field.js.map +1 -0
- package/dist/components/input/date/date-picker.d.ts +2 -2
- package/dist/components/input/date/date-picker.js +35 -0
- package/dist/components/input/date/date-picker.js.map +1 -0
- package/dist/components/input/date/date-range-input-field.d.ts +2 -2
- package/dist/components/input/date/date-range-input-field.js +90 -0
- package/dist/components/input/date/date-range-input-field.js.map +1 -0
- package/dist/components/input/date/date-range-picker.d.ts +2 -2
- package/dist/components/input/date/date-range-picker.js +74 -0
- package/dist/components/input/date/date-range-picker.js.map +1 -0
- package/dist/components/input/date/date-shortcuts.d.ts +2 -2
- package/dist/components/input/date/date-shortcuts.js +47 -0
- package/dist/components/input/date/date-shortcuts.js.map +1 -0
- package/dist/components/input/date/date-types.d.ts +1 -1
- package/dist/components/input/date/date-types.js +2 -0
- package/dist/components/input/date/date-types.js.map +1 -0
- package/dist/components/input/date/date-utils.d.ts +1 -1
- package/dist/components/input/date/date-utils.js +203 -0
- package/dist/components/input/date/date-utils.js.map +1 -0
- package/dist/components/input/input-types.js +2 -0
- package/dist/components/input/input-types.js.map +1 -0
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +14 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/number/input-number-types.d.ts +1 -1
- package/dist/components/input/number/input-number-types.js +2 -0
- package/dist/components/input/number/input-number-types.js.map +1 -0
- package/dist/components/input/number/input-number.d.ts +2 -2
- package/dist/components/input/number/input-number.js +11 -0
- package/dist/components/input/number/input-number.js.map +1 -0
- package/dist/components/input/text/input-text-types.d.ts +1 -1
- package/dist/components/input/text/input-text-types.js +2 -0
- package/dist/components/input/text/input-text-types.js.map +1 -0
- package/dist/components/input/text/input-text.d.ts +2 -2
- package/dist/components/input/text/input-text.js +8 -0
- package/dist/components/input/text/input-text.js.map +1 -0
- package/dist/components/kbd/kbd-types.js +2 -0
- package/dist/components/kbd/kbd-types.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +2 -2
- package/dist/components/kbd/kbd.js +12 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd-group/kbd-group-types.js +2 -0
- package/dist/components/kbd-group/kbd-group-types.js.map +1 -0
- package/dist/components/kbd-group/kbd-group.d.ts +2 -2
- package/dist/components/kbd-group/kbd-group.js +15 -0
- package/dist/components/kbd-group/kbd-group.js.map +1 -0
- package/dist/components/list/list-types.d.ts +1 -1
- package/dist/components/list/list-types.js +2 -0
- package/dist/components/list/list-types.js.map +1 -0
- package/dist/components/list/list-utils.d.ts +4 -4
- package/dist/components/list/list-utils.js +73 -0
- package/dist/components/list/list-utils.js.map +1 -0
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +68 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/menu/anchored-navigation-menu.d.ts +3 -3
- package/dist/components/menu/anchored-navigation-menu.js +48 -0
- package/dist/components/menu/anchored-navigation-menu.js.map +1 -0
- package/dist/components/menu/menu-assets.d.ts +1 -1
- package/dist/components/menu/menu-assets.js +35 -0
- package/dist/components/menu/menu-assets.js.map +1 -0
- package/dist/components/menu/menu-types.d.ts +2 -2
- package/dist/components/menu/menu-types.js +2 -0
- package/dist/components/menu/menu-types.js.map +1 -0
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/menu/menu.js +86 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/otp/otp-types.js +2 -0
- package/dist/components/otp/otp-types.js.map +1 -0
- package/dist/components/otp/otp-utils.js +22 -0
- package/dist/components/otp/otp-utils.js.map +1 -0
- package/dist/components/otp/otp.d.ts +3 -2
- package/dist/components/otp/otp.js +85 -0
- package/dist/components/otp/otp.js.map +1 -0
- package/dist/components/select/select-types.d.ts +1 -1
- package/dist/components/select/select-types.js +2 -0
- package/dist/components/select/select-types.js.map +1 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +52 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/tag/tag-types.d.ts +1 -1
- package/dist/components/tag/tag-types.js +2 -0
- package/dist/components/tag/tag-types.js.map +1 -0
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +16 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/textarea/textarea-types.d.ts +2 -2
- package/dist/components/textarea/textarea-types.js +2 -0
- package/dist/components/textarea/textarea-types.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +19 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/toast-group/toast-group-types.d.ts +1 -1
- package/dist/components/toast-group/toast-group-types.js +2 -0
- package/dist/components/toast-group/toast-group-types.js.map +1 -0
- package/dist/components/toast-group/toast-group.d.ts +2 -2
- package/dist/components/toast-group/toast-group.js +25 -0
- package/dist/components/toast-group/toast-group.js.map +1 -0
- package/dist/components/typography/typography-types.d.ts +1 -1
- package/dist/components/typography/typography-types.js +11 -0
- package/dist/components/typography/typography-types.js.map +1 -0
- package/dist/components/typography/typography.d.ts +2 -2
- package/dist/components/typography/typography.js +17 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/custom-components/chat/chat-types.d.ts +1 -1
- package/dist/custom-components/chat/chat-types.js +2 -0
- package/dist/custom-components/chat/chat-types.js.map +1 -0
- package/dist/custom-components/chat/chat.d.ts +1 -1
- package/dist/custom-components/chat/chat.js +14 -0
- package/dist/custom-components/chat/chat.js.map +1 -0
- package/dist/custom-components/layout/layout-types.js +2 -0
- package/dist/custom-components/layout/layout-types.js.map +1 -0
- package/dist/custom-components/layout/layout.d.ts +2 -2
- package/dist/custom-components/layout/layout.js +46 -0
- package/dist/custom-components/layout/layout.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js +25 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js +169 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js +206 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js +251 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +8 -2
- package/dist/custom-components/layout-builder/layout-builder-validation.js +445 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-builder.js +908 -0
- package/dist/custom-components/layout-builder/layout-builder.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +1 -1
- package/dist/custom-components/layout-builder/layout-json-editor-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-json-editor.js +103 -0
- package/dist/custom-components/layout-builder/layout-json-editor.js.map +1 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js +100 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js.map +1 -0
- package/dist/custom-components/markdown/markdown-types.d.ts +3 -3
- package/dist/custom-components/markdown/markdown-types.js +2 -0
- package/dist/custom-components/markdown/markdown-types.js.map +1 -0
- package/dist/custom-components/markdown/markdown-utils.js +10 -0
- package/dist/custom-components/markdown/markdown-utils.js.map +1 -0
- package/dist/custom-components/markdown/markdown.d.ts +2 -2
- package/dist/custom-components/markdown/markdown.js +39 -0
- package/dist/custom-components/markdown/markdown.js.map +1 -0
- package/dist/custom-components/mindmap/index.d.ts +2 -2
- package/dist/custom-components/mindmap/index.js +2 -0
- package/dist/custom-components/mindmap/index.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree-types.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree-types.js +2 -0
- package/dist/custom-components/mindmap/mind-tree-types.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree.js +201 -0
- package/dist/custom-components/mindmap/mind-tree.js.map +1 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +1 -1
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js +277 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js +2 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +2 -2
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js +32 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js.map +1 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +1 -1
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js +19 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js.map +1 -0
- package/dist/custom-components/timeline/timeline-types.js +2 -0
- package/dist/custom-components/timeline/timeline-types.js.map +1 -0
- package/dist/custom-components/timeline/timeline.d.ts +2 -2
- package/dist/custom-components/timeline/timeline.js +64 -0
- package/dist/custom-components/timeline/timeline.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-edge.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-edge.js +31 -0
- package/dist/custom-components/workflow/layout/workflow-edge.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-layout-types.js +2 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout.d.ts +2 -2
- package/dist/custom-components/workflow/layout/workflow-layout.js +284 -0
- package/dist/custom-components/workflow/layout/workflow-layout.js.map +1 -0
- package/dist/custom-components/workflow/node/workflow-node.d.ts +1 -1
- package/dist/custom-components/workflow/node/workflow-node.js +22 -0
- package/dist/custom-components/workflow/node/workflow-node.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel-types.js +2 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel.js +53 -0
- package/dist/custom-components/workflow/panel/workflow-panel.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js +2 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +1 -1
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js +19 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js.map +1 -0
- package/dist/custom-components/workflow/utils/workflow-validation.d.ts +2 -2
- package/dist/custom-components/workflow/utils/workflow-validation.js +257 -0
- package/dist/custom-components/workflow/utils/workflow-validation.js.map +1 -0
- package/dist/custom-components/workflow/workflow-types.d.ts +3 -3
- package/dist/custom-components/workflow/workflow-types.js +2 -0
- package/dist/custom-components/workflow/workflow-types.js.map +1 -0
- package/dist/custom-components/workflow/workflow.d.ts +1 -1
- package/dist/custom-components/workflow/workflow.js +125 -0
- package/dist/custom-components/workflow/workflow.js.map +1 -0
- package/dist/data-components/assets/data-components-asset.js +2 -0
- package/dist/data-components/assets/data-components-asset.js.map +1 -0
- package/dist/data-components/calendar/calendar-types.d.ts +1 -1
- package/dist/data-components/calendar/calendar-types.js +2 -0
- package/dist/data-components/calendar/calendar-types.js.map +1 -0
- package/dist/data-components/calendar/calendar-utils.js +2 -0
- package/dist/data-components/calendar/calendar-utils.js.map +1 -0
- package/dist/data-components/calendar/calendar.d.ts +1 -1
- package/dist/data-components/calendar/calendar.js +78 -0
- package/dist/data-components/calendar/calendar.js.map +1 -0
- package/dist/data-components/cell/cell-switch.d.ts +1 -1
- package/dist/data-components/cell/cell-switch.js +68 -0
- package/dist/data-components/cell/cell-switch.js.map +1 -0
- package/dist/data-components/cell/cell-types.d.ts +2 -2
- package/dist/data-components/cell/cell-types.js +2 -0
- package/dist/data-components/cell/cell-types.js.map +1 -0
- package/dist/data-components/cell/cell-utils.js +60 -0
- package/dist/data-components/cell/cell-utils.js.map +1 -0
- package/dist/data-components/cell/cell.d.ts +1 -1
- package/dist/data-components/cell/cell.js +63 -0
- package/dist/data-components/cell/cell.js.map +1 -0
- package/dist/data-components/chart/chart-types.d.ts +1 -1
- package/dist/data-components/chart/chart-types.js +2 -0
- package/dist/data-components/chart/chart-types.js.map +1 -0
- package/dist/data-components/chart/chart.d.ts +1 -1
- package/dist/data-components/chart/chart.js +121 -0
- package/dist/data-components/chart/chart.js.map +1 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +1 -1
- package/dist/data-components/chart/sankey/sankeyChart.js +111 -0
- package/dist/data-components/chart/sankey/sankeyChart.js.map +1 -0
- package/dist/data-components/data-structure/data-structure-utils.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure-utils.js +28 -0
- package/dist/data-components/data-structure/data-structure-utils.js.map +1 -0
- package/dist/data-components/data-structure/data-structure.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure.js +2 -0
- package/dist/data-components/data-structure/data-structure.js.map +1 -0
- package/dist/data-components/data-structure/stories-assets.d.ts +5 -1
- package/dist/data-components/data-structure/stories-assets.js +199 -0
- package/dist/data-components/data-structure/stories-assets.js.map +1 -0
- package/dist/data-components/form/form-types.d.ts +2 -2
- package/dist/data-components/form/form-types.js +2 -0
- package/dist/data-components/form/form-types.js.map +1 -0
- package/dist/data-components/form/form.d.ts +1 -1
- package/dist/data-components/form/form.js +124 -0
- package/dist/data-components/form/form.js.map +1 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js +31 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js +264 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js +306 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js +33 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js +59 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js +167 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js +157 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js +27 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js +12 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +6 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js +7 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js +15 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js +50 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js +2 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer.js +47 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.js.map +1 -0
- package/dist/data-components/table-grid/formula/evaluator.js +91 -0
- package/dist/data-components/table-grid/formula/evaluator.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder-types.js +2 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder.js +47 -0
- package/dist/data-components/table-grid/formula/formula-builder.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula.test.js +50 -0
- package/dist/data-components/table-grid/formula/formula.test.js.map +1 -0
- package/dist/data-components/table-grid/formula/index.js +40 -0
- package/dist/data-components/table-grid/formula/index.js.map +1 -0
- package/dist/data-components/table-grid/formula/parser.js +179 -0
- package/dist/data-components/table-grid/formula/parser.js.map +1 -0
- package/dist/data-components/table-grid/formula/tokenizer.js +140 -0
- package/dist/data-components/table-grid/formula/tokenizer.js.map +1 -0
- package/dist/data-components/table-grid/formula/types.js +2 -0
- package/dist/data-components/table-grid/formula/types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js +2 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel.js +91 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-column-menu.js +84 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header-types.js +2 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header.js +148 -0
- package/dist/data-components/table-grid/header/table-grid-header.js.map +1 -0
- package/dist/data-components/table-grid/hooks/use-table.d.ts +1 -1
- package/dist/data-components/table-grid/hooks/use-table.js +18 -0
- package/dist/data-components/table-grid/hooks/use-table.js.map +1 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +1 -1
- package/dist/data-components/table-grid/pinning/pinning-utils.js +70 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js +89 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-table.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-table.js +26 -0
- package/dist/data-components/table-grid/pivot/pivot-table.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-types.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-utils.js +150 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +3 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.js +2 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row-utils.js +35 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row.js +68 -0
- package/dist/data-components/table-grid/row/table-grid-row.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-types.js +2 -0
- package/dist/data-components/table-grid/selection/selection-types.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-utils.d.ts +2 -2
- package/dist/data-components/table-grid/selection/selection-utils.js +136 -0
- package/dist/data-components/table-grid/selection/selection-utils.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js +2 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +1 -1
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js +7 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js.map +1 -0
- package/dist/data-components/table-grid/sorting/sorting.d.ts +1 -1
- package/dist/data-components/table-grid/sorting/sorting.js +45 -0
- package/dist/data-components/table-grid/sorting/sorting.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context-types.js +2 -0
- package/dist/data-components/table-grid/table-context/table-context-types.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context.js +4 -0
- package/dist/data-components/table-grid/table-context/table-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-context.js +258 -0
- package/dist/data-components/table-grid/table-grid-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-types.d.ts +9 -7
- package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-types.js +2 -0
- package/dist/data-components/table-grid/table-grid-types.js.map +1 -0
- package/dist/data-components/table-grid/table-grid.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid.js +144 -0
- package/dist/data-components/table-grid/table-grid.js.map +1 -0
- package/dist/data-components/table-grid/table-utils.d.ts +1 -1
- package/dist/data-components/table-grid/table-utils.js +116 -0
- package/dist/data-components/table-grid/table-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js +2 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +1 -1
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js +61 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +2 -2
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js +23 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +1 -1
- package/dist/experimental-components/filter-builder/filter-builder-types.js +2 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder.d.ts +3 -2
- package/dist/experimental-components/filter-builder/filter-builder.js +139 -0
- package/dist/experimental-components/filter-builder/filter-builder.js.map +1 -0
- package/dist/framework-components/appbar/appbar-assets.js +5 -0
- package/dist/framework-components/appbar/appbar-assets.js.map +1 -0
- package/dist/framework-components/appbar/appbar-types.d.ts +1 -1
- package/dist/framework-components/appbar/appbar-types.js +2 -0
- package/dist/framework-components/appbar/appbar-types.js.map +1 -0
- package/dist/framework-components/appbar/appbar.d.ts +2 -2
- package/dist/framework-components/appbar/appbar.js +36 -0
- package/dist/framework-components/appbar/appbar.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js +2 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist/framework-components/breadcrumbs/breadcrumbs.js +31 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/framework-components/drawer/drawer-types.d.ts +2 -2
- package/dist/framework-components/drawer/drawer-types.js +2 -0
- package/dist/framework-components/drawer/drawer-types.js.map +1 -0
- package/dist/framework-components/drawer/drawer.d.ts +2 -2
- package/dist/framework-components/drawer/drawer.js +10 -0
- package/dist/framework-components/drawer/drawer.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-context.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold-context.js +10 -0
- package/dist/framework-components/scaffold/scaffold-context.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-types.d.ts +1 -1
- package/dist/framework-components/scaffold/scaffold-types.js +2 -0
- package/dist/framework-components/scaffold/scaffold-types.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold.js +76 -0
- package/dist/framework-components/scaffold/scaffold.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-assets.js +4 -0
- package/dist/framework-components/sidebar/sidebar-assets.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-context.d.ts +2 -2
- package/dist/framework-components/sidebar/sidebar-context.js +9 -0
- package/dist/framework-components/sidebar/sidebar-context.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js +12 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-types.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar.d.ts +3 -3
- package/dist/framework-components/sidebar/sidebar.js +42 -0
- package/dist/framework-components/sidebar/sidebar.js.map +1 -0
- package/dist/hooks/useDynamicVirtualList.d.ts +76 -0
- package/dist/hooks/useDynamicVirtualList.d.ts.map +1 -0
- package/dist/hooks/useDynamicVirtualList.js +208 -0
- package/dist/hooks/useDynamicVirtualList.js.map +1 -0
- package/dist/hooks/useFixedVirtualList.d.ts +35 -0
- package/dist/hooks/useFixedVirtualList.d.ts.map +1 -0
- package/dist/hooks/useFixedVirtualList.js +64 -0
- package/dist/hooks/useFixedVirtualList.js.map +1 -0
- package/dist/hooks/useShortcut.d.ts +1 -1
- package/dist/hooks/useShortcut.js +86 -0
- package/dist/hooks/useShortcut.js.map +1 -0
- package/dist/hooks/useTour/useTour-context-internal.d.ts +2 -2
- package/dist/hooks/useTour/useTour-context-internal.js +7 -0
- package/dist/hooks/useTour/useTour-context-internal.js.map +1 -0
- package/dist/hooks/useTour/useTour-context.d.ts +3 -3
- package/dist/hooks/useTour/useTour-context.js +54 -0
- package/dist/hooks/useTour/useTour-context.js.map +1 -0
- package/dist/hooks/useTour/useTour-types.d.ts +1 -1
- package/dist/hooks/useTour/useTour-types.js +2 -0
- package/dist/hooks/useTour/useTour-types.js.map +1 -0
- package/dist/hooks/useTour/useTour.d.ts +1 -1
- package/dist/hooks/useTour/useTour.js +408 -0
- package/dist/hooks/useTour/useTour.js.map +1 -0
- package/dist/hooks/useVirtualListScroll.d.ts +1 -1
- package/dist/hooks/useVirtualListScroll.js +79 -0
- package/dist/hooks/useVirtualListScroll.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-prompts.js +98 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js +5 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-validator.js +74 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel-types.js +2 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel.js +111 -0
- package/dist/providers/ai-assistant/ai-chat-panel.js.map +1 -0
- package/dist/providers/shortcut/shortcut-context.d.ts +2 -2
- package/dist/providers/shortcut/shortcut-context.js +7 -0
- package/dist/providers/shortcut/shortcut-context.js.map +1 -0
- package/dist/providers/shortcut/shortcut-provider.d.ts +1 -1
- package/dist/providers/shortcut/shortcut-provider.js +267 -0
- package/dist/providers/shortcut/shortcut-provider.js.map +1 -0
- package/dist/providers/theme/index.js +2 -0
- package/dist/providers/theme/index.js.map +1 -0
- package/dist/providers/theme/theme-provider-types.js +2 -0
- package/dist/providers/theme/theme-provider-types.js.map +1 -0
- package/dist/providers/theme/themeProvider.d.ts +2 -2
- package/dist/providers/theme/themeProvider.js +17 -0
- package/dist/providers/theme/themeProvider.js.map +1 -0
- package/dist/test/vitest.utils.js +2 -0
- package/dist/test/vitest.utils.js.map +1 -0
- package/dist/types/global-types.js +10 -0
- package/dist/types/global-types.js.map +1 -0
- package/dist/types/storybook-types.js +2 -0
- package/dist/types/storybook-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar-types.d.ts +1 -1
- package/dist/utility-components/avatar/avatar-types.js +2 -0
- package/dist/utility-components/avatar/avatar-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar.d.ts +2 -2
- package/dist/utility-components/avatar/avatar.js +10 -0
- package/dist/utility-components/avatar/avatar.js.map +1 -0
- package/dist/utility-components/chip/chip-types.d.ts +2 -2
- package/dist/utility-components/chip/chip-types.js +2 -0
- package/dist/utility-components/chip/chip-types.js.map +1 -0
- package/dist/utility-components/chip/chip.d.ts +2 -2
- package/dist/utility-components/chip/chip.js +11 -0
- package/dist/utility-components/chip/chip.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text-types.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text-types.js +2 -0
- package/dist/utility-components/helper-text/helper-text-types.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text.js +12 -0
- package/dist/utility-components/helper-text/helper-text.js.map +1 -0
- package/dist/utility-components/icon/icon-assets.js +95 -0
- package/dist/utility-components/icon/icon-assets.js.map +1 -0
- package/dist/utility-components/icon/icon-types.d.ts +1 -1
- package/dist/utility-components/icon/icon-types.js +2 -0
- package/dist/utility-components/icon/icon-types.js.map +1 -0
- package/dist/utility-components/icon/icon.d.ts +2 -2
- package/dist/utility-components/icon/icon.js +28 -0
- package/dist/utility-components/icon/icon.js.map +1 -0
- package/dist/utility-components/label/label-types.js +2 -0
- package/dist/utility-components/label/label-types.js.map +1 -0
- package/dist/utility-components/label/label.d.ts +1 -1
- package/dist/utility-components/label/label.js +10 -0
- package/dist/utility-components/label/label.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js +2 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts +2 -2
- package/dist/utility-components/overlay-panel/overlay-panel.js +98 -0
- package/dist/utility-components/overlay-panel/overlay-panel.js.map +1 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +1 -1
- package/dist/utility-components/overlay-panel/use-focus-trap.js +61 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton-types.js +2 -0
- package/dist/utility-components/skeleton/skeleton-types.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton.d.ts +2 -2
- package/dist/utility-components/skeleton/skeleton.js +14 -0
- package/dist/utility-components/skeleton/skeleton.js.map +1 -0
- package/dist/utility-components/stack/stack-types.js +2 -0
- package/dist/utility-components/stack/stack-types.js.map +1 -0
- package/dist/utility-components/stack/stack.d.ts +2 -2
- package/dist/utility-components/stack/stack.js +12 -0
- package/dist/utility-components/stack/stack.js.map +1 -0
- package/dist/utility-components/toast/toast-types.d.ts +1 -1
- package/dist/utility-components/toast/toast-types.js +2 -0
- package/dist/utility-components/toast/toast-types.js.map +1 -0
- package/dist/utility-components/toast/toast.d.ts +2 -2
- package/dist/utility-components/toast/toast.js +21 -0
- package/dist/utility-components/toast/toast.js.map +1 -0
- package/dist/utils/general.d.ts +1 -1
- package/dist/utils/general.js +27 -0
- package/dist/utils/general.js.map +1 -0
- package/dist/utils/shortcut-utils.js +164 -0
- package/dist/utils/shortcut-utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/svg/alert.svg +0 -1
- package/dist/assets/svg/arrow-down-up.svg +0 -1
- package/dist/assets/svg/arrow-down.svg +0 -1
- package/dist/assets/svg/arrow-left.svg +0 -1
- package/dist/assets/svg/arrow-right.svg +0 -1
- package/dist/assets/svg/arrow-up.svg +0 -1
- package/dist/assets/svg/arrow_drop_down.svg +0 -1
- package/dist/assets/svg/calendar.svg +0 -1
- package/dist/assets/svg/check.svg +0 -1
- package/dist/assets/svg/chevron-down.svg +0 -1
- package/dist/assets/svg/chevron-right.svg +0 -1
- package/dist/assets/svg/clipboard.svg +0 -1
- package/dist/assets/svg/close.svg +0 -1
- package/dist/assets/svg/copy.svg +0 -1
- package/dist/assets/svg/cursor.svg +0 -1
- package/dist/assets/svg/cut.svg +0 -1
- package/dist/assets/svg/delete.svg +0 -1
- package/dist/assets/svg/dock-left-arrow.svg +0 -1
- package/dist/assets/svg/dock-right-arrow.svg +0 -1
- package/dist/assets/svg/document-outline.svg +0 -1
- package/dist/assets/svg/download.svg +0 -1
- package/dist/assets/svg/drag.svg +0 -1
- package/dist/assets/svg/error.svg +0 -1
- package/dist/assets/svg/expand-right.svg +0 -1
- package/dist/assets/svg/expand.svg +0 -1
- package/dist/assets/svg/eye.svg +0 -1
- package/dist/assets/svg/fullscreen.svg +0 -1
- package/dist/assets/svg/gear.svg +0 -1
- package/dist/assets/svg/groups.svg +0 -1
- package/dist/assets/svg/help.svg +0 -1
- package/dist/assets/svg/info.svg +0 -1
- package/dist/assets/svg/logo.svg +0 -9
- package/dist/assets/svg/menu.svg +0 -1
- package/dist/assets/svg/message-bubble-question-mark.svg +0 -1
- package/dist/assets/svg/pencil.svg +0 -1
- package/dist/assets/svg/plus.svg +0 -1
- package/dist/assets/svg/restio.svg +0 -5
- package/dist/assets/svg/search.svg +0 -1
- package/dist/assets/svg/send.svg +0 -1
- package/dist/assets/svg/shrink-right.svg +0 -1
- package/dist/assets/svg/sidebar.svg +0 -1
- package/dist/assets/svg/terminal.svg +0 -1
- package/dist/assets/svg/timer.svg +0 -1
- package/dist/assets/svg/warning.svg +0 -1
- package/dist/assets/svg/zoom-minus.svg +0 -1
- package/dist/assets/svg/zoom-plus.svg +0 -1
- package/dist/restio-ui.cjs.js +0 -109
- package/dist/restio-ui.es.js +0 -34377
- package/dist/ui.css +0 -2
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data types and mock data for data-components stories
|
|
3
|
+
* This file centralizes all interfaces and sample data used across stories
|
|
4
|
+
*/
|
|
5
|
+
export const userData = [
|
|
6
|
+
{
|
|
7
|
+
id: "1",
|
|
8
|
+
firstName: "Tanner",
|
|
9
|
+
lastName: "Linsley",
|
|
10
|
+
age: 33,
|
|
11
|
+
visits: 100,
|
|
12
|
+
progress: 50,
|
|
13
|
+
status: "Married",
|
|
14
|
+
address: { city: "San Francisco", country: "USA" },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "2",
|
|
18
|
+
firstName: "Kevin",
|
|
19
|
+
lastName: "Vandy",
|
|
20
|
+
age: 27,
|
|
21
|
+
visits: 200,
|
|
22
|
+
progress: 100,
|
|
23
|
+
status: "Single",
|
|
24
|
+
address: { city: "New York", country: "USA" },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "3",
|
|
28
|
+
firstName: "John",
|
|
29
|
+
lastName: "Doe",
|
|
30
|
+
age: 45,
|
|
31
|
+
visits: 75,
|
|
32
|
+
progress: 25,
|
|
33
|
+
status: "Married",
|
|
34
|
+
address: { city: "London", country: "UK" },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "4",
|
|
38
|
+
firstName: "Jane",
|
|
39
|
+
lastName: "Smith",
|
|
40
|
+
age: 29,
|
|
41
|
+
visits: 150,
|
|
42
|
+
progress: 80,
|
|
43
|
+
status: "Single",
|
|
44
|
+
address: { city: "Toronto", country: "Canada" },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "5",
|
|
48
|
+
firstName: "Alice",
|
|
49
|
+
lastName: "Johnson",
|
|
50
|
+
age: 35,
|
|
51
|
+
visits: 120,
|
|
52
|
+
progress: 65,
|
|
53
|
+
status: "Married",
|
|
54
|
+
address: { city: "Sydney", country: "Australia" },
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
export const basicColumns = [
|
|
58
|
+
{
|
|
59
|
+
accessorKey: "firstName",
|
|
60
|
+
header: "First Name",
|
|
61
|
+
size: 150,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
accessorKey: "lastName",
|
|
65
|
+
header: "Last Name",
|
|
66
|
+
size: 150,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
accessorKey: "age",
|
|
70
|
+
header: "Age",
|
|
71
|
+
size: 80,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
accessorKey: "visits",
|
|
75
|
+
header: "Visits",
|
|
76
|
+
size: 100,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
accessorKey: "progress",
|
|
80
|
+
header: "Progress (%)",
|
|
81
|
+
size: 100,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
accessorKey: "status",
|
|
85
|
+
header: "Status",
|
|
86
|
+
size: 120,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
// Generator for large datasets
|
|
90
|
+
export const generateUserData = (count) => {
|
|
91
|
+
const firstNames = ["John", "Jane", "Bob", "Alice", "Charlie"];
|
|
92
|
+
const lastNames = ["Doe", "Smith", "Johnson", "Brown", "Williams"];
|
|
93
|
+
const statuses = ["Married", "Single", "Complicated"];
|
|
94
|
+
const cities = ["San Francisco", "New York", "London", "Toronto", "Sydney"];
|
|
95
|
+
const countries = ["USA", "USA", "UK", "Canada", "Australia"];
|
|
96
|
+
return Array.from({ length: count }).map((_, i) => ({
|
|
97
|
+
id: `${i + 1}`,
|
|
98
|
+
firstName: firstNames[i % 5],
|
|
99
|
+
lastName: lastNames[i % 5],
|
|
100
|
+
email: `user${i + 1}@example.com`,
|
|
101
|
+
age: 20 + (i % 40),
|
|
102
|
+
visits: Math.floor(Math.random() * 1000),
|
|
103
|
+
progress: Math.floor(Math.random() * 100),
|
|
104
|
+
status: statuses[i % 3],
|
|
105
|
+
bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
106
|
+
address: {
|
|
107
|
+
city: cities[i % 5],
|
|
108
|
+
country: countries[i % 5],
|
|
109
|
+
},
|
|
110
|
+
}));
|
|
111
|
+
};
|
|
112
|
+
export const employeeData = [
|
|
113
|
+
{ id: "1", name: "John Doe", department: "Engineering", role: "Frontend Dev", salary: 80000, location: "New York" },
|
|
114
|
+
{ id: "2", name: "Jane Smith", department: "Engineering", role: "Backend Dev", salary: 90000, location: "London" },
|
|
115
|
+
{ id: "3", name: "Bob Johnson", department: "Sales", role: "Sales Rep", salary: 60000, location: "New York" },
|
|
116
|
+
{ id: "4", name: "Alice Brown", department: "Sales", role: "Manager", salary: 100000, location: "London" },
|
|
117
|
+
{ id: "5", name: "Charlie Wilson", department: "Marketing", role: "Designer", salary: 70000, location: "Berlin" },
|
|
118
|
+
{ id: "6", name: "Eva Davis", department: "Engineering", role: "DevOps", salary: 95000, location: "Berlin" },
|
|
119
|
+
];
|
|
120
|
+
export const projectManagerData = [
|
|
121
|
+
{ id: "1", name: "Alex", total_projects: 10, closed_projects: 8, revenue: 10000, cost: 5000, customer_count: 50 },
|
|
122
|
+
{ id: "2", name: "Sarah", total_projects: 20, closed_projects: 19, revenue: 25000, cost: 10000, customer_count: 100 },
|
|
123
|
+
{ id: "3", name: "Mike", total_projects: 15, closed_projects: 5, revenue: 8000, cost: 7000, customer_count: 20 },
|
|
124
|
+
];
|
|
125
|
+
export const hierarchicalData = [
|
|
126
|
+
{
|
|
127
|
+
id: "dept-1",
|
|
128
|
+
name: "Engineering",
|
|
129
|
+
budget: 2500000,
|
|
130
|
+
manager: "Sarah Johnson",
|
|
131
|
+
employees: [
|
|
132
|
+
{
|
|
133
|
+
id: "emp-1",
|
|
134
|
+
name: "John Smith",
|
|
135
|
+
role: "Senior Engineer",
|
|
136
|
+
salary: 120000,
|
|
137
|
+
startDate: "2022-01-15",
|
|
138
|
+
projects: [
|
|
139
|
+
{ id: "proj-1", name: "API Redesign", status: "Active", deadline: "2024-03-15" },
|
|
140
|
+
{ id: "proj-2", name: "Database Migration", status: "Completed", deadline: "2023-12-01" },
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "emp-2",
|
|
145
|
+
name: "Alice Chen",
|
|
146
|
+
role: "Frontend Developer",
|
|
147
|
+
salary: 95000,
|
|
148
|
+
startDate: "2023-03-01",
|
|
149
|
+
projects: [{ id: "proj-3", name: "UI Component Library", status: "Active", deadline: "2024-02-28" }],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: "dept-2",
|
|
155
|
+
name: "Marketing",
|
|
156
|
+
budget: 800000,
|
|
157
|
+
manager: "Mike Wilson",
|
|
158
|
+
employees: [
|
|
159
|
+
{
|
|
160
|
+
id: "emp-3",
|
|
161
|
+
name: "Emma Davis",
|
|
162
|
+
role: "Marketing Specialist",
|
|
163
|
+
salary: 65000,
|
|
164
|
+
startDate: "2023-06-01",
|
|
165
|
+
projects: [{ id: "proj-4", name: "Q1 Campaign", status: "Pending", deadline: "2024-01-31" }],
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
export const calendarEventData = [
|
|
171
|
+
{ id: "1", title: "Team Meeting", date: new Date() },
|
|
172
|
+
{ id: "2", title: "Release", date: new Date(new Date().getTime() + 24 * 60 * 60 * 1000) },
|
|
173
|
+
{ id: "3", title: "Conference", date: new Date(new Date().getTime() + 5 * 24 * 60 * 60 * 1000) },
|
|
174
|
+
{ id: "4", title: "One-off", date: new Date(new Date().getTime() - 3 * 24 * 60 * 60 * 1000) },
|
|
175
|
+
];
|
|
176
|
+
export const cashFlowData = [
|
|
177
|
+
{ source: "Salary", target: "Rent", amount: 1200 },
|
|
178
|
+
{ source: "Salary", target: "Food", amount: 400 },
|
|
179
|
+
{ source: "Salary", target: "Transport", amount: 200 },
|
|
180
|
+
{ source: "Salary", target: "Savings", amount: 600 },
|
|
181
|
+
{ source: "Freelance", target: "Savings", amount: 300 },
|
|
182
|
+
{ source: "Freelance", target: "Investments", amount: 500 },
|
|
183
|
+
{ source: "Dividends", target: "Investments", amount: 400 },
|
|
184
|
+
{ source: "Dividends", target: "Savings", amount: 150 },
|
|
185
|
+
];
|
|
186
|
+
export const userJourneyData = [
|
|
187
|
+
{ channel: "Organic", device: "Mobile", outcome: "Purchase", count: 120 },
|
|
188
|
+
{ channel: "Organic", device: "Desktop", outcome: "Purchase", count: 90 },
|
|
189
|
+
{ channel: "Organic", device: "Desktop", outcome: "Bounce", count: 60 },
|
|
190
|
+
{ channel: "Paid", device: "Mobile", outcome: "Purchase", count: 70 },
|
|
191
|
+
{ channel: "Paid", device: "Desktop", outcome: "Cart", count: 50 },
|
|
192
|
+
{ channel: "Paid", device: "Mobile", outcome: "Bounce", count: 30 },
|
|
193
|
+
{ channel: "Email", device: "Mobile", outcome: "Purchase", count: 40 },
|
|
194
|
+
{ channel: "Email", device: "Desktop", outcome: "Bounce", count: 25 },
|
|
195
|
+
// Direct channel → outcome (skip device stage)
|
|
196
|
+
{ channel: "Referral", device: null, outcome: "Purchase", count: 80 },
|
|
197
|
+
{ channel: "Referral", device: null, outcome: "Cart", count: 35 },
|
|
198
|
+
];
|
|
199
|
+
//# sourceMappingURL=stories-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories-assets.js","sourceRoot":"","sources":["../../../src/data-components/data-structure/stories-assets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,MAAM,CAAC,MAAM,QAAQ,GAAW;IAC9B;QACE,EAAE,EAAE,GAAG;QACP,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,SAAS;QACnB,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE;KACnD;IACD;QACE,EAAE,EAAE,GAAG;QACP,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,OAAO;QAC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AAU,EAAE,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAI,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,MAAM,EAAK,MAAM,EAAE,QAAQ,EAAG,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,MAAM,EAAK,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAM,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,MAAM,EAAK,MAAM,EAAE,QAAQ,EAAG,OAAO,EAAE,QAAQ,EAAI,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,OAAO,EAAI,MAAM,EAAE,QAAQ,EAAG,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,OAAO,EAAI,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAI,KAAK,EAAE,EAAE,EAAG;IAC1E,+CAA+C;IAC/C,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAM,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAG;IAC1E,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAM,OAAO,EAAE,MAAM,EAAM,KAAK,EAAE,EAAE,EAAG;CAC3E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataStructureComponent, DataStructureColumn } from
|
|
2
|
-
import { ResponsiveLayout } from
|
|
1
|
+
import { DataStructureComponent, DataStructureColumn } from "../data-structure/data-structure";
|
|
2
|
+
import { ResponsiveLayout } from "../../custom-components/layout/layout-types";
|
|
3
3
|
export interface FormProps<TData> extends DataStructureComponent<TData> {
|
|
4
4
|
/** Override columns with form-specific options */
|
|
5
5
|
columns?: FormColumn<TData>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-types.js","sourceRoot":"","sources":["../../../src/data-components/form/form-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useMemo } from "react";
|
|
3
|
+
import styles from "./form.module.css";
|
|
4
|
+
import { Button } from "../../components/button/button";
|
|
5
|
+
import { Cell } from "../cell/cell";
|
|
6
|
+
import { Layout } from "../../custom-components/layout/layout";
|
|
7
|
+
import { generateColumnsFromSchema } from "../data-structure/data-structure-utils";
|
|
8
|
+
export function Form({ data, columns, layout, onSubmit, onCancel }) {
|
|
9
|
+
// Initialize state with the first row of data
|
|
10
|
+
const [formData, setFormData] = useState(() => {
|
|
11
|
+
return data && data.length > 0 ? { ...data[0] } : {};
|
|
12
|
+
});
|
|
13
|
+
// Generate columns from schema if not provided
|
|
14
|
+
const schema = data[0] ? Object.keys(data[0]) : [];
|
|
15
|
+
const formColumns = columns || generateColumnsFromSchema(schema);
|
|
16
|
+
// Track validation errors
|
|
17
|
+
const [errors, setErrors] = useState({});
|
|
18
|
+
// Update state if data prop changes
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (data && data.length > 0) {
|
|
21
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
22
|
+
setFormData({ ...data[0] });
|
|
23
|
+
}
|
|
24
|
+
}, [data]);
|
|
25
|
+
// Same pattern as TableGridRow
|
|
26
|
+
const getCellValue = (column, rowData) => {
|
|
27
|
+
if (column.accessorFn) {
|
|
28
|
+
return column.accessorFn(rowData);
|
|
29
|
+
}
|
|
30
|
+
else if (column.accessorKey) {
|
|
31
|
+
return rowData[column.accessorKey];
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
};
|
|
35
|
+
const handleCellValueChange = (newValue, rowData, column) => {
|
|
36
|
+
const columnKey = column.accessorKey;
|
|
37
|
+
setFormData((prev) => ({
|
|
38
|
+
...prev,
|
|
39
|
+
[columnKey]: newValue,
|
|
40
|
+
}));
|
|
41
|
+
// Clear error for this field when value changes
|
|
42
|
+
if (errors[columnKey]) {
|
|
43
|
+
setErrors((prev) => {
|
|
44
|
+
const newErrors = { ...prev };
|
|
45
|
+
delete newErrors[columnKey];
|
|
46
|
+
return newErrors;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// Validate a single field
|
|
51
|
+
const validateField = (column, value, rowData) => {
|
|
52
|
+
const columnKey = column.accessorKey;
|
|
53
|
+
// Check required
|
|
54
|
+
if (column.required && (value === undefined || value === null || value === "")) {
|
|
55
|
+
return column.requiredMessage || `${String(column.header || columnKey)} is required`;
|
|
56
|
+
}
|
|
57
|
+
// Run custom validation if provided
|
|
58
|
+
if (column.validate) {
|
|
59
|
+
return column.validate(value, rowData);
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
};
|
|
63
|
+
// Validate all fields
|
|
64
|
+
const validateForm = () => {
|
|
65
|
+
const newErrors = {};
|
|
66
|
+
let hasErrors = false;
|
|
67
|
+
formColumns.forEach((column) => {
|
|
68
|
+
const columnKey = column.accessorKey;
|
|
69
|
+
if (!columnKey)
|
|
70
|
+
return;
|
|
71
|
+
const value = getCellValue(column, formData);
|
|
72
|
+
const error = validateField(column, value, formData);
|
|
73
|
+
if (error) {
|
|
74
|
+
newErrors[columnKey] = error;
|
|
75
|
+
hasErrors = true;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
setErrors(newErrors);
|
|
79
|
+
return !hasErrors;
|
|
80
|
+
};
|
|
81
|
+
const handleSubmit = (e) => {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
// Validate form before submitting
|
|
84
|
+
if (validateForm()) {
|
|
85
|
+
onSubmit?.(formData);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
// Transform layout to map string keys (column IDs) to indices
|
|
89
|
+
const processedLayout = useMemo(() => {
|
|
90
|
+
if (!layout)
|
|
91
|
+
return undefined;
|
|
92
|
+
const processBreakpoint = (bp) => {
|
|
93
|
+
const bpLayout = layout[bp];
|
|
94
|
+
if (!bpLayout)
|
|
95
|
+
return undefined;
|
|
96
|
+
const newBlocks = {};
|
|
97
|
+
formColumns.forEach((col, index) => {
|
|
98
|
+
const key = col.id || String(col.accessorKey);
|
|
99
|
+
// Try to find block by column ID/accessor, fallback to index
|
|
100
|
+
const block = bpLayout.blocks[key] || bpLayout.blocks[index];
|
|
101
|
+
if (block) {
|
|
102
|
+
newBlocks[index] = block;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return { ...bpLayout, blocks: newBlocks };
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
desktop: processBreakpoint("desktop") || layout.desktop,
|
|
109
|
+
tablet: processBreakpoint("tablet") || layout.tablet,
|
|
110
|
+
mobile: processBreakpoint("mobile") || layout.mobile,
|
|
111
|
+
};
|
|
112
|
+
}, [layout, formColumns]);
|
|
113
|
+
if (!data || data.length === 0) {
|
|
114
|
+
return _jsx("div", { children: "No data to display" });
|
|
115
|
+
}
|
|
116
|
+
const fields = formColumns.map((column, index) => {
|
|
117
|
+
const columnKey = column.accessorKey;
|
|
118
|
+
const value = getCellValue(column, formData);
|
|
119
|
+
const error = columnKey ? errors[columnKey] : undefined;
|
|
120
|
+
return (_jsx(Cell, { value: value, column: column, rowData: formData, rowIndex: 0, editMode: "always", isEditable: true, onValueChange: handleCellValueChange, error: error }, index));
|
|
121
|
+
});
|
|
122
|
+
return (_jsxs("form", { className: styles["rst-form"], onSubmit: handleSubmit, children: [processedLayout ? _jsx(Layout, { layout: processedLayout, children: fields }) : fields, _jsxs("div", { className: styles["rst-form-actions"], children: [onCancel && _jsx(Button, { type: "button", variant: "invisible", onClick: onCancel, value: "Cancel" }), _jsx(Button, { type: "submit", variant: "primary", value: "Save" })] })] }));
|
|
123
|
+
}
|
|
124
|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ggregate(values, fn) {
|
|
6
|
+
if (values.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
switch (fn) {
|
|
9
|
+
case "sum":
|
|
10
|
+
return values.reduce((a, b) => a + b, 0);
|
|
11
|
+
case "count":
|
|
12
|
+
return values.length;
|
|
13
|
+
case "avg":
|
|
14
|
+
return values.reduce((a, b) => a + b, 0) / values.length;
|
|
15
|
+
case "min":
|
|
16
|
+
return values.reduce((m, v) => (v < m ? v : m), Infinity);
|
|
17
|
+
case "max":
|
|
18
|
+
return values.reduce((m, v) => (v > m ? v : m), -Infinity);
|
|
19
|
+
default:
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Formats an aggregated value for display (numbers: integers stay clean, floats round to 2 dp; null/undefined → em dash; strings pass through). */
|
|
24
|
+
export function formatAggregated(value) {
|
|
25
|
+
if (value === null || value === undefined)
|
|
26
|
+
return "—";
|
|
27
|
+
if (typeof value === "string")
|
|
28
|
+
return value;
|
|
29
|
+
return Number.isInteger(value) ? String(value) : value.toFixed(2);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=aggregation-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregation-utils.js","sourceRoot":"","sources":["../../../../src/data-components/table-grid/aggregation/aggregation-utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAgB,EAAE,EAAiB;IAC3D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,QAAQ,EAAE,EAAE,CAAC;QACX,KAAK,KAAK;YACR,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC3C,KAAK,OAAO;YACV,OAAO,MAAM,CAAC,MAAM,CAAC;QACvB,KAAK,KAAK;YACR,OAAO,MAAM,CAAC,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