@restio/ui 0.2.0 → 0.2.1-20260901160735
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
|
@@ -0,0 +1,1027 @@
|
|
|
1
|
+
import { At as Me, Bt as ce, C as Se, D as he, Dt as ue, E as We, Ht as xe, It as Ie, J as ze, Mt as Re, Nt as Fe, Pt as pe, Rt as U, T as be, Ut as Pe, Wt as Oe, dt as ke, et as Ee, f as Te, ft as fe, jt as le, tt as je, u as Be, w as He } from "./src-DaTjVaGd.js";
|
|
2
|
+
import { useCallback as f, useEffect as oe, useMemo as J, useRef as me, useState as W } from "react";
|
|
3
|
+
var Ze = 1;
|
|
4
|
+
function Ge(r, u) {
|
|
5
|
+
const m = r.col + r.w, c = r.row + r.h, y = u.col + u.w, x = u.row + u.h;
|
|
6
|
+
return r.col < y && m > u.col && r.row < x && c > u.row;
|
|
7
|
+
}
|
|
8
|
+
function ge(r) {
|
|
9
|
+
return r.col >= 1 && r.col + r.w - 1 <= 12 && r.row >= 1 && r.row + r.h - 1 <= 30;
|
|
10
|
+
}
|
|
11
|
+
function ne(r, u, m) {
|
|
12
|
+
for (const c of u)
|
|
13
|
+
if (c.id !== m && Ge(r, c.position))
|
|
14
|
+
return c.id;
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
function Ce(r, u, m) {
|
|
18
|
+
for (let x = 1; x <= 30 - u + 1; x++) for (let p = 1; p <= 12 - r + 1; p++) {
|
|
19
|
+
const S = {
|
|
20
|
+
col: p,
|
|
21
|
+
row: x,
|
|
22
|
+
w: r,
|
|
23
|
+
h: u
|
|
24
|
+
};
|
|
25
|
+
if (!ne(S, m)) return S;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
col: 1,
|
|
29
|
+
row: m.reduce((x, p) => Math.max(x, p.position.row + p.position.h), 1),
|
|
30
|
+
w: r,
|
|
31
|
+
h: u
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function Le(r, u) {
|
|
35
|
+
const m = {};
|
|
36
|
+
for (const c of r) {
|
|
37
|
+
const y = u[c.dataSourceId];
|
|
38
|
+
if (!y) continue;
|
|
39
|
+
const x = y.data ?? [], p = ke(x.length > 0 ? Object.keys(x[0]) : []), S = je(c.columns ?? p), D = /* @__PURE__ */ new Set(), l = [];
|
|
40
|
+
for (const _ of S) D.has(_.id) || (D.add(_.id), l.push(_));
|
|
41
|
+
m[c.dataSourceId] = l;
|
|
42
|
+
}
|
|
43
|
+
return m;
|
|
44
|
+
}
|
|
45
|
+
var _e = 0;
|
|
46
|
+
function ve() {
|
|
47
|
+
return _e += 1, `widget-${Date.now()}-${_e}`;
|
|
48
|
+
}
|
|
49
|
+
function we() {
|
|
50
|
+
return {
|
|
51
|
+
version: 1,
|
|
52
|
+
name: "Untitled Dashboard",
|
|
53
|
+
filters: null,
|
|
54
|
+
widgets: []
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function $e(r, u) {
|
|
58
|
+
const [m, c] = W(r ?? we), [y, x] = W(null), [p, S] = W(u ? "view" : "edit"), D = me(!1), l = f(() => {
|
|
59
|
+
D.current = !0;
|
|
60
|
+
}, []), _ = f((t, n, N) => {
|
|
61
|
+
c((s) => {
|
|
62
|
+
const g = {
|
|
63
|
+
id: ve(),
|
|
64
|
+
title: `New ${t}`,
|
|
65
|
+
componentType: t,
|
|
66
|
+
dataSourceId: n,
|
|
67
|
+
position: N
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
...s,
|
|
71
|
+
widgets: [...s.widgets, g]
|
|
72
|
+
};
|
|
73
|
+
}), l();
|
|
74
|
+
}, [l]), I = f((t) => {
|
|
75
|
+
c((n) => {
|
|
76
|
+
const N = Ce(6, 3, n.widgets), s = {
|
|
77
|
+
id: ve(),
|
|
78
|
+
position: N,
|
|
79
|
+
...t.widget
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
...n,
|
|
83
|
+
widgets: [...n.widgets, s]
|
|
84
|
+
};
|
|
85
|
+
}), l();
|
|
86
|
+
}, [l]), z = f((t) => {
|
|
87
|
+
c((n) => ({
|
|
88
|
+
...n,
|
|
89
|
+
widgets: n.widgets.filter((N) => N.id !== t)
|
|
90
|
+
})), x((n) => n === t ? null : n), l();
|
|
91
|
+
}, [l]), P = f((t, n) => {
|
|
92
|
+
c((N) => ({
|
|
93
|
+
...N,
|
|
94
|
+
widgets: N.widgets.map((s) => {
|
|
95
|
+
if (s.id !== t) return s;
|
|
96
|
+
const g = {
|
|
97
|
+
...s,
|
|
98
|
+
...n
|
|
99
|
+
};
|
|
100
|
+
if (n.dataSourceId && n.dataSourceId !== s.dataSourceId) {
|
|
101
|
+
const R = he[s.componentType] ?? [];
|
|
102
|
+
g.columns = void 0, g.componentProps = be(R), g.filters = void 0, g.uiConfig = void 0;
|
|
103
|
+
}
|
|
104
|
+
return g;
|
|
105
|
+
})
|
|
106
|
+
})), l();
|
|
107
|
+
}, [l]), j = f((t, n) => {
|
|
108
|
+
P(t, { position: n });
|
|
109
|
+
}, [P]), T = f((t) => {
|
|
110
|
+
x(t);
|
|
111
|
+
}, []), Y = m.widgets.find((t) => t.id === y) ?? null, H = f((t) => {
|
|
112
|
+
c((n) => ({
|
|
113
|
+
...n,
|
|
114
|
+
name: t
|
|
115
|
+
})), l();
|
|
116
|
+
}, [l]), a = f((t) => {
|
|
117
|
+
c((n) => ({
|
|
118
|
+
...n,
|
|
119
|
+
filters: typeof t == "function" ? t(n.filters) : t
|
|
120
|
+
})), l();
|
|
121
|
+
}, [l]), i = f((t) => {
|
|
122
|
+
c(t ?? we()), x(null), D.current = !1;
|
|
123
|
+
}, []), O = f((t) => {
|
|
124
|
+
c(t), x(null), D.current = !1;
|
|
125
|
+
}, []);
|
|
126
|
+
return {
|
|
127
|
+
state: {
|
|
128
|
+
config: m,
|
|
129
|
+
selectedWidgetId: y,
|
|
130
|
+
isDirty: D.current
|
|
131
|
+
},
|
|
132
|
+
mode: p,
|
|
133
|
+
setMode: S,
|
|
134
|
+
addWidget: _,
|
|
135
|
+
addPrebuiltWidget: I,
|
|
136
|
+
removeWidget: z,
|
|
137
|
+
updateWidget: P,
|
|
138
|
+
moveWidget: j,
|
|
139
|
+
selectWidget: T,
|
|
140
|
+
selectedWidget: Y,
|
|
141
|
+
setName: H,
|
|
142
|
+
setFilters: a,
|
|
143
|
+
resetConfig: i,
|
|
144
|
+
loadConfig: O
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
var d = {
|
|
148
|
+
"rst-dashboard-builder": "_rst-dashboard-builder_ukxxh_2",
|
|
149
|
+
"rst-dashboard-builder-sidebar": "_rst-dashboard-builder-sidebar_ukxxh_18",
|
|
150
|
+
"rst-dashboard-builder-sidebar-header": "_rst-dashboard-builder-sidebar-header_ukxxh_28",
|
|
151
|
+
"rst-dashboard-builder-sidebar-list": "_rst-dashboard-builder-sidebar-list_ukxxh_33",
|
|
152
|
+
"rst-dashboard-builder-widget-type-item": "_rst-dashboard-builder-widget-type-item_ukxxh_40",
|
|
153
|
+
"rst-dashboard-builder-widget-type-label": "_rst-dashboard-builder-widget-type-label_ukxxh_59",
|
|
154
|
+
"rst-dashboard-builder-widget-type-desc": "_rst-dashboard-builder-widget-type-desc_ukxxh_63",
|
|
155
|
+
"rst-dashboard-builder-main": "_rst-dashboard-builder-main_ukxxh_69",
|
|
156
|
+
"rst-dashboard-builder-toolbar": "_rst-dashboard-builder-toolbar_ukxxh_77",
|
|
157
|
+
"rst-dashboard-builder-toolbar-left": "_rst-dashboard-builder-toolbar-left_ukxxh_87",
|
|
158
|
+
"rst-dashboard-builder-toolbar-right": "_rst-dashboard-builder-toolbar-right_ukxxh_93",
|
|
159
|
+
"rst-dashboard-builder-name-input": "_rst-dashboard-builder-name-input_ukxxh_99",
|
|
160
|
+
"rst-dashboard-builder-name-display": "_rst-dashboard-builder-name-display_ukxxh_115",
|
|
161
|
+
"rst-dashboard-builder-view": "_rst-dashboard-builder-view_ukxxh_122",
|
|
162
|
+
"rst-dashboard-widget": "_rst-dashboard-widget_ukxxh_146",
|
|
163
|
+
"rst-switcher": "_rst-switcher_ukxxh_170",
|
|
164
|
+
"rst-dashboard-builder-canvas": "_rst-dashboard-builder-canvas_ukxxh_183",
|
|
165
|
+
"rst-dashboard-builder-grid": "_rst-dashboard-builder-grid_ukxxh_191",
|
|
166
|
+
"rst-dashboard-builder-grid-cell": "_rst-dashboard-builder-grid-cell_ukxxh_201",
|
|
167
|
+
"rst-dashboard-builder-grid-cell-view": "_rst-dashboard-builder-grid-cell-view_ukxxh_213",
|
|
168
|
+
"rst-dashboard-builder-grid-empty": "_rst-dashboard-builder-grid-empty_ukxxh_219",
|
|
169
|
+
"rst-dashboard-builder-widget": "_rst-dashboard-builder-widget_ukxxh_40",
|
|
170
|
+
"rst-dashboard-builder-widget-view": "_rst-dashboard-builder-widget-view_ukxxh_290",
|
|
171
|
+
"rst-dashboard-builder-widget-selected": "_rst-dashboard-builder-widget-selected_ukxxh_298",
|
|
172
|
+
"rst-dashboard-builder-widget-dragging": "_rst-dashboard-builder-widget-dragging_ukxxh_304",
|
|
173
|
+
"rst-dashboard-builder-widget-collision": "_rst-dashboard-builder-widget-collision_ukxxh_310",
|
|
174
|
+
"rst-dashboard-builder-resize-handle-n": "_rst-dashboard-builder-resize-handle-n_ukxxh_317",
|
|
175
|
+
"rst-dashboard-builder-resize-handle-s": "_rst-dashboard-builder-resize-handle-s_ukxxh_318",
|
|
176
|
+
"rst-dashboard-builder-resize-handle-e": "_rst-dashboard-builder-resize-handle-e_ukxxh_319",
|
|
177
|
+
"rst-dashboard-builder-resize-handle-w": "_rst-dashboard-builder-resize-handle-w_ukxxh_320",
|
|
178
|
+
"rst-dashboard-builder-resize-handle-ne": "_rst-dashboard-builder-resize-handle-ne_ukxxh_321",
|
|
179
|
+
"rst-dashboard-builder-resize-handle-nw": "_rst-dashboard-builder-resize-handle-nw_ukxxh_322",
|
|
180
|
+
"rst-dashboard-builder-resize-handle-se": "_rst-dashboard-builder-resize-handle-se_ukxxh_323",
|
|
181
|
+
"rst-dashboard-builder-resize-handle-sw": "_rst-dashboard-builder-resize-handle-sw_ukxxh_324",
|
|
182
|
+
"rst-dashboard-builder-filter-body": "_rst-dashboard-builder-filter-body_ukxxh_540",
|
|
183
|
+
"rst-dashboard-builder-filter-tabs": "_rst-dashboard-builder-filter-tabs_ukxxh_548",
|
|
184
|
+
"rst-dashboard-builder-configurator": "_rst-dashboard-builder-configurator_ukxxh_557",
|
|
185
|
+
"rst-dashboard-builder-configurator-header": "_rst-dashboard-builder-configurator-header_ukxxh_567",
|
|
186
|
+
"rst-dashboard-builder-configurator-body": "_rst-dashboard-builder-configurator-body_ukxxh_575",
|
|
187
|
+
"rst-dashboard-builder-configurator-empty": "_rst-dashboard-builder-configurator-empty_ukxxh_582",
|
|
188
|
+
"rst-dashboard-builder-configurator-divider": "_rst-dashboard-builder-configurator-divider_ukxxh_593",
|
|
189
|
+
"rst-dashboard-builder-field": "_rst-dashboard-builder-field_ukxxh_599",
|
|
190
|
+
"rst-dashboard-builder-field-label": "_rst-dashboard-builder-field-label_ukxxh_605",
|
|
191
|
+
"rst-dashboard-builder-checkbox-row": "_rst-dashboard-builder-checkbox-row_ukxxh_611",
|
|
192
|
+
"rst-dashboard-builder-checkbox-label": "_rst-dashboard-builder-checkbox-label_ukxxh_618",
|
|
193
|
+
"rst-dashboard-builder-drag-ghost": "_rst-dashboard-builder-drag-ghost_ukxxh_624",
|
|
194
|
+
"rst-dashboard-builder-drop-zone": "_rst-dashboard-builder-drop-zone_ukxxh_638",
|
|
195
|
+
"rst-dashboard-builder-add-widget-item": "_rst-dashboard-builder-add-widget-item_ukxxh_646",
|
|
196
|
+
"rst-dashboard-builder-add-widget-item-label": "_rst-dashboard-builder-add-widget-item-label_ukxxh_667",
|
|
197
|
+
"rst-dashboard-builder-add-widget-item-desc": "_rst-dashboard-builder-add-widget-item-desc_ukxxh_673",
|
|
198
|
+
"rst-dashboard-builder-template-wrapper": "_rst-dashboard-builder-template-wrapper_ukxxh_679",
|
|
199
|
+
"rst-dashboard-builder-template-picker": "_rst-dashboard-builder-template-picker_ukxxh_683",
|
|
200
|
+
"rst-dashboard-builder-template-picker-header": "_rst-dashboard-builder-template-picker-header_ukxxh_697",
|
|
201
|
+
"rst-dashboard-builder-template-item": "_rst-dashboard-builder-template-item_ukxxh_705",
|
|
202
|
+
"rst-dashboard-builder-template-item-name": "_rst-dashboard-builder-template-item-name_ukxxh_727",
|
|
203
|
+
"rst-dashboard-builder-template-item-desc": "_rst-dashboard-builder-template-item-desc_ukxxh_733"
|
|
204
|
+
}, q = 12, re = 30, de = 12;
|
|
205
|
+
function Ve({ widgets: r, onMoveWidget: u, onAddWidget: m, onChange: c }) {
|
|
206
|
+
const y = me(null), [x, p] = W(null), [S, D] = W(null), [l, _] = W(null), [I, z] = W(null), [P, j] = W(!1), [T, Y] = W(null), [H, a] = W(null), [i, O] = W(null), [t, n] = W(null), [N, s] = W(!1), g = f(() => y.current ? {
|
|
207
|
+
colWidth: (y.current.getBoundingClientRect().width - de * (q - 1)) / q,
|
|
208
|
+
rowHeight: 92
|
|
209
|
+
} : null, []), R = f((b, v) => {
|
|
210
|
+
if (!y.current) return {
|
|
211
|
+
col: 1,
|
|
212
|
+
row: 1
|
|
213
|
+
};
|
|
214
|
+
const C = y.current.getBoundingClientRect(), k = (C.width - de * (q - 1)) / q;
|
|
215
|
+
return {
|
|
216
|
+
col: Math.max(1, Math.min(q, Math.round((b - C.left) / (k + de)) + 1)),
|
|
217
|
+
row: Math.max(1, Math.min(re, Math.round((v - C.top) / 92) + 1))
|
|
218
|
+
};
|
|
219
|
+
}, []), Q = f((b) => {
|
|
220
|
+
if (b.preventDefault(), b.dataTransfer.types.includes("application/widget-type")) {
|
|
221
|
+
b.dataTransfer.dropEffect = "copy";
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (b.dataTransfer.types.includes("application/move-widget") && x && S && l) {
|
|
225
|
+
b.dataTransfer.dropEffect = "move";
|
|
226
|
+
const v = r.find((M) => M.id === x);
|
|
227
|
+
if (!v) return;
|
|
228
|
+
const C = g();
|
|
229
|
+
if (!C) return;
|
|
230
|
+
const k = b.clientX - S.x, L = b.clientY - S.y, se = Math.round(k / (C.colWidth + de)), V = Math.round(L / C.rowHeight), $ = {
|
|
231
|
+
col: Math.max(1, Math.min(q - v.position.w + 1, l.col + se)),
|
|
232
|
+
row: Math.max(1, Math.min(re - v.position.h + 1, l.row + V)),
|
|
233
|
+
w: v.position.w,
|
|
234
|
+
h: v.position.h
|
|
235
|
+
};
|
|
236
|
+
z($);
|
|
237
|
+
const E = ne($, r, x);
|
|
238
|
+
j(E !== null);
|
|
239
|
+
}
|
|
240
|
+
}, [
|
|
241
|
+
x,
|
|
242
|
+
S,
|
|
243
|
+
l,
|
|
244
|
+
g,
|
|
245
|
+
r
|
|
246
|
+
]), Z = f((b) => {
|
|
247
|
+
b.preventDefault();
|
|
248
|
+
const v = b.dataTransfer.getData("application/widget-type");
|
|
249
|
+
if (v) {
|
|
250
|
+
const { col: C, row: k } = R(b.clientX, b.clientY), L = {
|
|
251
|
+
col: C,
|
|
252
|
+
row: k,
|
|
253
|
+
w: 4,
|
|
254
|
+
h: 3
|
|
255
|
+
};
|
|
256
|
+
if (C + 4 - 1 > q && (L.col = 9), k + 3 - 1 > re && (L.row = 28), ne(L, r)) return;
|
|
257
|
+
m(v, "", L), c();
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
x && I && (!P && ge(I) && (u(x, I), c()), p(null), D(null), _(null), z(null), j(!1));
|
|
261
|
+
}, [
|
|
262
|
+
R,
|
|
263
|
+
r,
|
|
264
|
+
m,
|
|
265
|
+
c,
|
|
266
|
+
x,
|
|
267
|
+
I,
|
|
268
|
+
P,
|
|
269
|
+
u
|
|
270
|
+
]), ee = f((b, v) => {
|
|
271
|
+
b.stopPropagation(), b.dataTransfer.setData("application/move-widget", v.id), b.dataTransfer.effectAllowed = "move", p(v.id), D({
|
|
272
|
+
x: b.clientX,
|
|
273
|
+
y: b.clientY
|
|
274
|
+
}), _({ ...v.position }), z({ ...v.position }), j(!1);
|
|
275
|
+
}, []), h = f(() => {
|
|
276
|
+
p(null), D(null), _(null), z(null), j(!1);
|
|
277
|
+
}, []), te = f((b, v, C) => {
|
|
278
|
+
b.stopPropagation(), b.preventDefault(), Y(v.id), a(C), O({ ...v.position }), n({
|
|
279
|
+
x: b.clientX,
|
|
280
|
+
y: b.clientY
|
|
281
|
+
}), s(!1);
|
|
282
|
+
}, []);
|
|
283
|
+
return oe(() => {
|
|
284
|
+
if (!T || !H || !i || !t) return;
|
|
285
|
+
const b = (C) => {
|
|
286
|
+
if (!r.find((w) => w.id === T)) return;
|
|
287
|
+
const k = g();
|
|
288
|
+
if (!k) return;
|
|
289
|
+
const L = C.clientX - t.x, se = C.clientY - t.y, V = Math.round(L / (k.colWidth + de)), $ = Math.round(se / k.rowHeight), E = i.col, M = i.row, A = i.w, X = i.h;
|
|
290
|
+
let F = { ...i };
|
|
291
|
+
switch (H) {
|
|
292
|
+
case "e": {
|
|
293
|
+
const w = Math.max(1, Math.min(q - E + 1, A + V));
|
|
294
|
+
F = {
|
|
295
|
+
...F,
|
|
296
|
+
w
|
|
297
|
+
};
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
case "w": {
|
|
301
|
+
const w = Math.max(1, Math.min(E + A - 1, E + V)), B = E + A - w;
|
|
302
|
+
F = {
|
|
303
|
+
...i,
|
|
304
|
+
col: w,
|
|
305
|
+
w: Math.max(1, B)
|
|
306
|
+
};
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
case "s": {
|
|
310
|
+
const w = Math.max(1, Math.min(re - M + 1, X + $));
|
|
311
|
+
F = {
|
|
312
|
+
...i,
|
|
313
|
+
h: w
|
|
314
|
+
};
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
case "n": {
|
|
318
|
+
const w = Math.max(1, Math.min(M + X - 1, M + $)), B = M + X - w;
|
|
319
|
+
F = {
|
|
320
|
+
...i,
|
|
321
|
+
row: w,
|
|
322
|
+
h: Math.max(1, B)
|
|
323
|
+
};
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
case "se": {
|
|
327
|
+
const w = Math.max(1, Math.min(q - E + 1, A + V)), B = Math.max(1, Math.min(re - M + 1, X + $));
|
|
328
|
+
F = {
|
|
329
|
+
...i,
|
|
330
|
+
w,
|
|
331
|
+
h: B
|
|
332
|
+
};
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
case "sw": {
|
|
336
|
+
const w = Math.max(1, Math.min(E + A - 1, E + V)), B = E + A - w, o = Math.max(1, Math.min(re - M + 1, X + $));
|
|
337
|
+
F = {
|
|
338
|
+
...i,
|
|
339
|
+
col: w,
|
|
340
|
+
w: Math.max(1, B),
|
|
341
|
+
h: o
|
|
342
|
+
};
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
case "ne": {
|
|
346
|
+
const w = Math.max(1, Math.min(M + X - 1, M + $)), B = M + X - w, o = Math.max(1, Math.min(q - E + 1, A + V));
|
|
347
|
+
F = {
|
|
348
|
+
...i,
|
|
349
|
+
row: w,
|
|
350
|
+
h: Math.max(1, B),
|
|
351
|
+
w: o
|
|
352
|
+
};
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
case "nw": {
|
|
356
|
+
const w = Math.max(1, Math.min(E + A - 1, E + V)), B = Math.max(1, Math.min(M + X - 1, M + $)), o = E + A - w, G = M + X - B;
|
|
357
|
+
F = {
|
|
358
|
+
col: w,
|
|
359
|
+
row: B,
|
|
360
|
+
w: Math.max(1, o),
|
|
361
|
+
h: Math.max(1, G)
|
|
362
|
+
};
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
z(F), p(T);
|
|
367
|
+
const ie = ne(F, r, T);
|
|
368
|
+
s(ie !== null), j(ie !== null);
|
|
369
|
+
}, v = () => {
|
|
370
|
+
r.find((C) => C.id === T) && I && !N && ge(I) && (u(T, I), c()), Y(null), a(null), O(null), n(null), s(!1), p(null), D(null), _(null), z(null), j(!1);
|
|
371
|
+
};
|
|
372
|
+
return document.addEventListener("mousemove", b), document.addEventListener("mouseup", v), () => {
|
|
373
|
+
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", v);
|
|
374
|
+
};
|
|
375
|
+
}, [
|
|
376
|
+
T,
|
|
377
|
+
H,
|
|
378
|
+
i,
|
|
379
|
+
t,
|
|
380
|
+
r,
|
|
381
|
+
I,
|
|
382
|
+
N,
|
|
383
|
+
g,
|
|
384
|
+
u,
|
|
385
|
+
c
|
|
386
|
+
]), {
|
|
387
|
+
gridRef: y,
|
|
388
|
+
draggingWidgetId: x,
|
|
389
|
+
dragPreviewPos: I,
|
|
390
|
+
hasCollision: P,
|
|
391
|
+
resizeCollision: N,
|
|
392
|
+
handleDragOver: Q,
|
|
393
|
+
handleDrop: Z,
|
|
394
|
+
handleWidgetDragStart: ee,
|
|
395
|
+
handleWidgetDragEnd: h,
|
|
396
|
+
handleResizeStart: te,
|
|
397
|
+
pixelToGrid: R
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
var e = Pe(), Ae = 12, Xe = 20, ye = ({ widgets: r, selectedWidgetId: u, dataSources: m, onSelectWidget: c, onMoveWidget: y, onRemoveWidget: x, onAddWidget: p, onChange: S, getWidgetActions: D, mode: l = "edit" }) => {
|
|
401
|
+
const _ = l === "view", { gridRef: I, draggingWidgetId: z, dragPreviewPos: P, hasCollision: j, handleDragOver: T, handleDrop: Y, handleWidgetDragStart: H, handleWidgetDragEnd: a, handleResizeStart: i } = Ve({
|
|
402
|
+
widgets: r,
|
|
403
|
+
onMoveWidget: y,
|
|
404
|
+
onAddWidget: p,
|
|
405
|
+
onChange: S
|
|
406
|
+
}), O = f((s, g) => {
|
|
407
|
+
s.stopPropagation(), c(g);
|
|
408
|
+
}, [c]), t = f(() => {
|
|
409
|
+
c(null);
|
|
410
|
+
}, [c]), n = f((s) => {
|
|
411
|
+
const g = m[s.dataSourceId]?.data ?? [], R = g.length > 0 ? Object.keys(g[0]) : [];
|
|
412
|
+
return {
|
|
413
|
+
data: g,
|
|
414
|
+
columns: s.columns ?? ke(R)
|
|
415
|
+
};
|
|
416
|
+
}, [m]), N = [];
|
|
417
|
+
for (let s = 1; s <= Xe; s++) for (let g = 1; g <= Ae; g++) {
|
|
418
|
+
const R = _ ? d["rst-dashboard-builder-grid-cell-view"] : d["rst-dashboard-builder-grid-cell"];
|
|
419
|
+
N.push(/* @__PURE__ */ (0, e.jsx)("div", {
|
|
420
|
+
className: R,
|
|
421
|
+
style: {
|
|
422
|
+
gridColumn: g,
|
|
423
|
+
gridRow: s
|
|
424
|
+
}
|
|
425
|
+
}, `cell-${s}-${g}`));
|
|
426
|
+
}
|
|
427
|
+
return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
428
|
+
className: d["rst-dashboard-builder-canvas"],
|
|
429
|
+
onClick: t,
|
|
430
|
+
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
431
|
+
ref: I,
|
|
432
|
+
className: d["rst-dashboard-builder-grid"],
|
|
433
|
+
onDragOver: T,
|
|
434
|
+
onDrop: Y,
|
|
435
|
+
children: [
|
|
436
|
+
N,
|
|
437
|
+
r.length === 0 && /* @__PURE__ */ (0, e.jsx)("div", {
|
|
438
|
+
className: d["rst-dashboard-builder-grid-empty"],
|
|
439
|
+
children: "Drag a widget from the palette to get started"
|
|
440
|
+
}),
|
|
441
|
+
r.map((s) => {
|
|
442
|
+
const g = !_ && s.id === u, R = !_ && s.id === z, Q = n(s), Z = R && P ? P : s.position, ee = R && j;
|
|
443
|
+
return /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
444
|
+
className: [
|
|
445
|
+
d["rst-dashboard-builder-widget"],
|
|
446
|
+
_ ? d["rst-dashboard-builder-widget-view"] : "",
|
|
447
|
+
g ? d["rst-dashboard-builder-widget-selected"] : "",
|
|
448
|
+
R ? d["rst-dashboard-builder-widget-dragging"] : "",
|
|
449
|
+
ee ? d["rst-dashboard-builder-widget-collision"] : ""
|
|
450
|
+
].filter(Boolean).join(" "),
|
|
451
|
+
style: {
|
|
452
|
+
gridColumn: `${Z.col} / span ${Z.w}`,
|
|
453
|
+
gridRow: `${Z.row} / span ${Z.h}`
|
|
454
|
+
},
|
|
455
|
+
draggable: !_,
|
|
456
|
+
..._ ? {} : {
|
|
457
|
+
onDragStart: (h) => H(h, s),
|
|
458
|
+
onDragEnd: a,
|
|
459
|
+
onClick: (h) => O(h, s.id),
|
|
460
|
+
role: "button",
|
|
461
|
+
tabIndex: 0,
|
|
462
|
+
"aria-label": `Widget: ${s.title}`,
|
|
463
|
+
onKeyDown: (h) => {
|
|
464
|
+
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), c(s.id)), (h.key === "Delete" || h.key === "Backspace") && (h.preventDefault(), x(s.id), S());
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
children: [/* @__PURE__ */ (0, e.jsx)(Be, {
|
|
468
|
+
id: s.id,
|
|
469
|
+
dataSourceId: s.dataSourceId,
|
|
470
|
+
title: s.title,
|
|
471
|
+
subtitle: s.subtitle,
|
|
472
|
+
icon: s.icon,
|
|
473
|
+
data: Q.data,
|
|
474
|
+
columns: Q.columns,
|
|
475
|
+
enableExport: D?.(s).enableExport ?? !0,
|
|
476
|
+
enableScreenshot: D?.(s).enableScreenshot ?? !1,
|
|
477
|
+
enableExpand: D?.(s).enableExpand ?? !0,
|
|
478
|
+
enableFilter: D?.(s).enableFilter ?? !1,
|
|
479
|
+
fieldOptions: je(Q.columns),
|
|
480
|
+
children: ({ data: h }) => /* @__PURE__ */ (0, e.jsx)(Se, {
|
|
481
|
+
data: h,
|
|
482
|
+
columns: Q.columns,
|
|
483
|
+
activeComponent: s.componentType,
|
|
484
|
+
componentProps: s.componentProps,
|
|
485
|
+
showConfigurator: !1
|
|
486
|
+
})
|
|
487
|
+
}), !_ && g && /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [
|
|
488
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
489
|
+
className: d["rst-dashboard-builder-resize-handle-n"],
|
|
490
|
+
onMouseDown: (h) => i(h, s, "n")
|
|
491
|
+
}),
|
|
492
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
493
|
+
className: d["rst-dashboard-builder-resize-handle-s"],
|
|
494
|
+
onMouseDown: (h) => i(h, s, "s")
|
|
495
|
+
}),
|
|
496
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
497
|
+
className: d["rst-dashboard-builder-resize-handle-e"],
|
|
498
|
+
onMouseDown: (h) => i(h, s, "e")
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
501
|
+
className: d["rst-dashboard-builder-resize-handle-w"],
|
|
502
|
+
onMouseDown: (h) => i(h, s, "w")
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
505
|
+
className: d["rst-dashboard-builder-resize-handle-ne"],
|
|
506
|
+
onMouseDown: (h) => i(h, s, "ne")
|
|
507
|
+
}),
|
|
508
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
509
|
+
className: d["rst-dashboard-builder-resize-handle-nw"],
|
|
510
|
+
onMouseDown: (h) => i(h, s, "nw")
|
|
511
|
+
}),
|
|
512
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
513
|
+
className: d["rst-dashboard-builder-resize-handle-se"],
|
|
514
|
+
onMouseDown: (h) => i(h, s, "se")
|
|
515
|
+
}),
|
|
516
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
517
|
+
className: d["rst-dashboard-builder-resize-handle-sw"],
|
|
518
|
+
onMouseDown: (h) => i(h, s, "sw")
|
|
519
|
+
})
|
|
520
|
+
] })]
|
|
521
|
+
}, `${s.id}::${s.dataSourceId}`);
|
|
522
|
+
})
|
|
523
|
+
]
|
|
524
|
+
})
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
ye.displayName = "BuilderCanvas";
|
|
528
|
+
var Ye = [
|
|
529
|
+
{
|
|
530
|
+
type: "table-grid",
|
|
531
|
+
label: "Table",
|
|
532
|
+
icon: "table",
|
|
533
|
+
description: "Sortable, filterable data table"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
type: "chart",
|
|
537
|
+
label: "Chart",
|
|
538
|
+
icon: "chart",
|
|
539
|
+
description: "Bar, line, pie charts"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
type: "calendar",
|
|
543
|
+
label: "Calendar",
|
|
544
|
+
icon: "calendar",
|
|
545
|
+
description: "Calendar view of events"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
type: "card-list",
|
|
549
|
+
label: "Card List",
|
|
550
|
+
icon: "list",
|
|
551
|
+
description: "Visual card layout"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
type: "form",
|
|
555
|
+
label: "Form",
|
|
556
|
+
icon: "form",
|
|
557
|
+
description: "Editable form from schema"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
type: "gantt",
|
|
561
|
+
label: "Gantt",
|
|
562
|
+
icon: "chart-gantt",
|
|
563
|
+
description: "Project timeline view"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
type: "kpi",
|
|
567
|
+
label: "KPI",
|
|
568
|
+
icon: "chart",
|
|
569
|
+
description: "Single-metric KPI card"
|
|
570
|
+
}
|
|
571
|
+
], De = ({ widget: r, dataSources: u, onUpdate: m, onRemove: c, onClose: y, onAddWidget: x, prebuiltSections: p, onAddPrebuiltSection: S }) => {
|
|
572
|
+
const D = Object.values(u).map((a) => ({
|
|
573
|
+
value: a.id,
|
|
574
|
+
label: a.name
|
|
575
|
+
})), l = J(() => [{
|
|
576
|
+
value: "",
|
|
577
|
+
id: "none"
|
|
578
|
+
}, ...Object.keys(Oe).map((a) => ({
|
|
579
|
+
value: a,
|
|
580
|
+
leadingVisual: a
|
|
581
|
+
}))], []), _ = r?.dataSourceId, I = J(() => {
|
|
582
|
+
if (!_) return [];
|
|
583
|
+
const a = u[_];
|
|
584
|
+
return a ? a.fields.map((i) => ({
|
|
585
|
+
id: i.id,
|
|
586
|
+
header: i.name,
|
|
587
|
+
accessorKey: i.id
|
|
588
|
+
})) : [];
|
|
589
|
+
}, [_, u]), z = J(() => he[r?.componentType ?? "table-grid"] ?? [], [r?.componentType]), P = J(() => r?.componentProps ?? be(z), [r?.componentProps, z]), j = f((a, i) => {
|
|
590
|
+
m({ [a]: i });
|
|
591
|
+
}, [m]), T = f((a) => {
|
|
592
|
+
m({
|
|
593
|
+
componentType: a,
|
|
594
|
+
componentProps: be(he[a] ?? [])
|
|
595
|
+
});
|
|
596
|
+
}, [m]), Y = f((a, i) => {
|
|
597
|
+
m({ componentProps: {
|
|
598
|
+
...P,
|
|
599
|
+
[a]: i
|
|
600
|
+
} });
|
|
601
|
+
}, [P, m]), H = J(() => !p || p.length === 0 ? [] : p.filter((a) => a.version === 1), [p]);
|
|
602
|
+
return r ? /* @__PURE__ */ (0, e.jsxs)("aside", {
|
|
603
|
+
className: d["rst-dashboard-builder-configurator"],
|
|
604
|
+
"aria-label": "Widget configurator",
|
|
605
|
+
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
606
|
+
className: d["rst-dashboard-builder-configurator-header"],
|
|
607
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ce, {
|
|
608
|
+
variant: "heading",
|
|
609
|
+
children: "Configure"
|
|
610
|
+
}), /* @__PURE__ */ (0, e.jsx)(U, {
|
|
611
|
+
variant: "invisible",
|
|
612
|
+
size: "small",
|
|
613
|
+
leadingVisual: "close",
|
|
614
|
+
onClick: y,
|
|
615
|
+
"aria-label": "Close configurator"
|
|
616
|
+
})]
|
|
617
|
+
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
618
|
+
className: d["rst-dashboard-builder-configurator-body"],
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
621
|
+
className: d["rst-dashboard-builder-field"],
|
|
622
|
+
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
623
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
624
|
+
children: "Title"
|
|
625
|
+
}), /* @__PURE__ */ (0, e.jsx)(pe, {
|
|
626
|
+
value: r.title,
|
|
627
|
+
onChange: (a) => j("title", a ?? ""),
|
|
628
|
+
placeholder: "Widget title"
|
|
629
|
+
})]
|
|
630
|
+
}),
|
|
631
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
632
|
+
className: d["rst-dashboard-builder-field"],
|
|
633
|
+
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
634
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
635
|
+
children: "Subtitle"
|
|
636
|
+
}), /* @__PURE__ */ (0, e.jsx)(pe, {
|
|
637
|
+
value: r.subtitle ?? "",
|
|
638
|
+
onChange: (a) => j("subtitle", a || void 0),
|
|
639
|
+
placeholder: "Optional subtitle"
|
|
640
|
+
})]
|
|
641
|
+
}),
|
|
642
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
643
|
+
className: d["rst-dashboard-builder-field"],
|
|
644
|
+
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
645
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
646
|
+
children: "Icon"
|
|
647
|
+
}), /* @__PURE__ */ (0, e.jsx)(fe, {
|
|
648
|
+
value: r.icon ?? "",
|
|
649
|
+
onChange: (a) => j("icon", a || void 0),
|
|
650
|
+
options: l,
|
|
651
|
+
renderList: ({ options: a, value: i, onChange: O, onClose: t }) => /* @__PURE__ */ (0, e.jsx)(Fe, {
|
|
652
|
+
options: a,
|
|
653
|
+
activeIndex: [typeof i == "string" ? i : ""],
|
|
654
|
+
onClick: (n) => {
|
|
655
|
+
O(n.value), t();
|
|
656
|
+
},
|
|
657
|
+
showFilter: !0
|
|
658
|
+
})
|
|
659
|
+
})]
|
|
660
|
+
}),
|
|
661
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
662
|
+
className: d["rst-dashboard-builder-field"],
|
|
663
|
+
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
664
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
665
|
+
children: "Data Source"
|
|
666
|
+
}), /* @__PURE__ */ (0, e.jsx)(fe, {
|
|
667
|
+
value: r.dataSourceId,
|
|
668
|
+
onChange: (a) => j("dataSourceId", a),
|
|
669
|
+
options: D
|
|
670
|
+
})]
|
|
671
|
+
}),
|
|
672
|
+
r.dataSourceId && u[r.dataSourceId] && /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
673
|
+
className: d["rst-dashboard-builder-field"],
|
|
674
|
+
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
675
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
676
|
+
children: "Columns"
|
|
677
|
+
}), /* @__PURE__ */ (0, e.jsx)(Me, {
|
|
678
|
+
options: u[r.dataSourceId].fields.map((a) => ({
|
|
679
|
+
value: a.id,
|
|
680
|
+
label: a.name
|
|
681
|
+
})),
|
|
682
|
+
value: r.columns?.map((a) => a.id).filter(Boolean) ?? u[r.dataSourceId].fields.map((a) => a.id),
|
|
683
|
+
onChange: (a) => {
|
|
684
|
+
const i = u[r.dataSourceId], O = a.map((t) => i.fields.find((n) => n.id === t)).filter(Boolean).map((t) => ({
|
|
685
|
+
id: t.id,
|
|
686
|
+
header: t.name,
|
|
687
|
+
accessorKey: t.id
|
|
688
|
+
}));
|
|
689
|
+
m({ columns: O.length === i.fields.length ? void 0 : O });
|
|
690
|
+
}
|
|
691
|
+
})]
|
|
692
|
+
}),
|
|
693
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
694
|
+
className: d["rst-dashboard-builder-field"],
|
|
695
|
+
children: [
|
|
696
|
+
/* @__PURE__ */ (0, e.jsx)("label", {
|
|
697
|
+
className: d["rst-dashboard-builder-field-label"],
|
|
698
|
+
children: "Actions"
|
|
699
|
+
}),
|
|
700
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
701
|
+
className: d["rst-dashboard-builder-checkbox-row"],
|
|
702
|
+
children: [/* @__PURE__ */ (0, e.jsx)(le, {
|
|
703
|
+
checked: r.enableExport ?? !0,
|
|
704
|
+
onChange: (a) => j("enableExport", a)
|
|
705
|
+
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
706
|
+
className: d["rst-dashboard-builder-checkbox-label"],
|
|
707
|
+
children: "Export CSV"
|
|
708
|
+
})]
|
|
709
|
+
}),
|
|
710
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
711
|
+
className: d["rst-dashboard-builder-checkbox-row"],
|
|
712
|
+
children: [/* @__PURE__ */ (0, e.jsx)(le, {
|
|
713
|
+
checked: r.enableScreenshot ?? !1,
|
|
714
|
+
onChange: (a) => j("enableScreenshot", a)
|
|
715
|
+
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
716
|
+
className: d["rst-dashboard-builder-checkbox-label"],
|
|
717
|
+
children: "Screenshot"
|
|
718
|
+
})]
|
|
719
|
+
}),
|
|
720
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
721
|
+
className: d["rst-dashboard-builder-checkbox-row"],
|
|
722
|
+
children: [/* @__PURE__ */ (0, e.jsx)(le, {
|
|
723
|
+
checked: r.enableExpand ?? !0,
|
|
724
|
+
onChange: (a) => j("enableExpand", a)
|
|
725
|
+
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
726
|
+
className: d["rst-dashboard-builder-checkbox-label"],
|
|
727
|
+
children: "Expand"
|
|
728
|
+
})]
|
|
729
|
+
}),
|
|
730
|
+
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
731
|
+
className: d["rst-dashboard-builder-checkbox-row"],
|
|
732
|
+
children: [/* @__PURE__ */ (0, e.jsx)(le, {
|
|
733
|
+
checked: r.enableFilter ?? !0,
|
|
734
|
+
onChange: (a) => j("enableFilter", a)
|
|
735
|
+
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
736
|
+
className: d["rst-dashboard-builder-checkbox-label"],
|
|
737
|
+
children: "Filter"
|
|
738
|
+
})]
|
|
739
|
+
})
|
|
740
|
+
]
|
|
741
|
+
}),
|
|
742
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: d["rst-dashboard-builder-configurator-divider"] }),
|
|
743
|
+
/* @__PURE__ */ (0, e.jsx)(He, {
|
|
744
|
+
schema: z,
|
|
745
|
+
values: P,
|
|
746
|
+
onChange: Y,
|
|
747
|
+
columns: I,
|
|
748
|
+
scope: "all",
|
|
749
|
+
componentId: r.componentType,
|
|
750
|
+
onComponentChange: T,
|
|
751
|
+
componentMetaList: We
|
|
752
|
+
}, r.dataSourceId ?? "no-ds"),
|
|
753
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: d["rst-dashboard-builder-configurator-divider"] }),
|
|
754
|
+
/* @__PURE__ */ (0, e.jsx)(U, {
|
|
755
|
+
variant: "danger",
|
|
756
|
+
size: "small",
|
|
757
|
+
value: "Remove widget",
|
|
758
|
+
leadingVisual: "trash",
|
|
759
|
+
onClick: c
|
|
760
|
+
})
|
|
761
|
+
]
|
|
762
|
+
})]
|
|
763
|
+
}) : /* @__PURE__ */ (0, e.jsxs)("aside", {
|
|
764
|
+
className: d["rst-dashboard-builder-configurator"],
|
|
765
|
+
"aria-label": "Add widget",
|
|
766
|
+
children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
767
|
+
className: d["rst-dashboard-builder-configurator-header"],
|
|
768
|
+
children: /* @__PURE__ */ (0, e.jsx)(ce, {
|
|
769
|
+
variant: "heading",
|
|
770
|
+
children: "Add Widget"
|
|
771
|
+
})
|
|
772
|
+
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
773
|
+
className: d["rst-dashboard-builder-configurator-body"],
|
|
774
|
+
children: [Ye.map((a) => /* @__PURE__ */ (0, e.jsxs)("button", {
|
|
775
|
+
className: d["rst-dashboard-builder-add-widget-item"],
|
|
776
|
+
onClick: () => x(a.type),
|
|
777
|
+
children: [/* @__PURE__ */ (0, e.jsx)(xe, { src: a.icon }), /* @__PURE__ */ (0, e.jsxs)("div", { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
778
|
+
className: d["rst-dashboard-builder-add-widget-item-label"],
|
|
779
|
+
children: a.label
|
|
780
|
+
}), /* @__PURE__ */ (0, e.jsx)("div", {
|
|
781
|
+
className: d["rst-dashboard-builder-add-widget-item-desc"],
|
|
782
|
+
children: a.description
|
|
783
|
+
})] })]
|
|
784
|
+
}, a.type)), H.length > 0 && /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [
|
|
785
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: d["rst-dashboard-builder-configurator-divider"] }),
|
|
786
|
+
/* @__PURE__ */ (0, e.jsx)(ce, {
|
|
787
|
+
variant: "heading",
|
|
788
|
+
children: "Pre-built Sections"
|
|
789
|
+
}),
|
|
790
|
+
H.map((a) => /* @__PURE__ */ (0, e.jsxs)("button", {
|
|
791
|
+
className: d["rst-dashboard-builder-add-widget-item"],
|
|
792
|
+
onClick: () => S?.(a),
|
|
793
|
+
children: [/* @__PURE__ */ (0, e.jsx)(xe, { src: "layout" }), /* @__PURE__ */ (0, e.jsxs)("div", { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
794
|
+
className: d["rst-dashboard-builder-add-widget-item-label"],
|
|
795
|
+
children: a.name
|
|
796
|
+
}), /* @__PURE__ */ (0, e.jsx)("div", {
|
|
797
|
+
className: d["rst-dashboard-builder-add-widget-item-desc"],
|
|
798
|
+
children: a.description
|
|
799
|
+
})] })]
|
|
800
|
+
}, a.name))
|
|
801
|
+
] })]
|
|
802
|
+
})]
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
De.displayName = "WidgetConfigurator";
|
|
806
|
+
var Ke = ({ dataSources: r, initialConfig: u, templates: m, prebuiltSections: c, onSave: y, onChange: x, widgetActionDefaults: p, readOnly: S, className: D }) => {
|
|
807
|
+
const { state: l, mode: _, setMode: I, addWidget: z, addPrebuiltWidget: P, removeWidget: j, updateWidget: T, moveWidget: Y, selectWidget: H, selectedWidget: a, setName: i, setFilters: O, loadConfig: t } = $e(u, S), [n, N] = W(!1), [s, g] = W("dialog"), [R, Q] = W(null), [Z, ee] = W(null), [h, te] = W(!1), [b, v] = W(null), C = J(() => Le(l.config.widgets, r), [l.config.widgets, r]), k = _ === "view", L = k ? Z : l.config.filters;
|
|
808
|
+
oe(() => {
|
|
809
|
+
n && v(L);
|
|
810
|
+
}, [n]);
|
|
811
|
+
const se = f(() => {
|
|
812
|
+
k ? ee(b) : O(b), N(!1);
|
|
813
|
+
}, [
|
|
814
|
+
b,
|
|
815
|
+
k,
|
|
816
|
+
O
|
|
817
|
+
]);
|
|
818
|
+
oe(() => {
|
|
819
|
+
k && !h && (ee(l.config.filters), te(!0)), k || te(!1);
|
|
820
|
+
}, [
|
|
821
|
+
k,
|
|
822
|
+
h,
|
|
823
|
+
l.config.filters
|
|
824
|
+
]);
|
|
825
|
+
const V = me(x);
|
|
826
|
+
V.current = x;
|
|
827
|
+
const $ = f((o, G) => {
|
|
828
|
+
(k ? ee : O)((ae) => ({
|
|
829
|
+
...ae ?? {},
|
|
830
|
+
[o]: G
|
|
831
|
+
}));
|
|
832
|
+
}, [k, O]), E = J(() => ({
|
|
833
|
+
filters: L,
|
|
834
|
+
onFilterChange: $
|
|
835
|
+
}), [L, $]), M = J(() => !m || m.length === 0 ? [] : m.filter((o) => o.version === 1), [m]), A = J(() => M.map((o) => ({
|
|
836
|
+
value: o.name,
|
|
837
|
+
id: o.name,
|
|
838
|
+
description: o.description
|
|
839
|
+
})), [M]), X = f((o) => {
|
|
840
|
+
const G = M.find((K) => K.name === o);
|
|
841
|
+
if (!G) return;
|
|
842
|
+
const ae = {
|
|
843
|
+
version: 1,
|
|
844
|
+
...G.config
|
|
845
|
+
};
|
|
846
|
+
t(ae);
|
|
847
|
+
}, [M, t]), F = J(() => ({
|
|
848
|
+
enableExport: p?.enableExport ?? !0,
|
|
849
|
+
enableScreenshot: p?.enableScreenshot ?? !1,
|
|
850
|
+
enableExpand: p?.enableExpand ?? !0,
|
|
851
|
+
enableFilter: p?.enableFilter ?? !0
|
|
852
|
+
}), [p]), ie = f((o) => ({
|
|
853
|
+
enableExport: o.enableExport ?? F.enableExport,
|
|
854
|
+
enableScreenshot: o.enableScreenshot ?? F.enableScreenshot,
|
|
855
|
+
enableExpand: o.enableExpand ?? F.enableExpand,
|
|
856
|
+
enableFilter: o.enableFilter ?? F.enableFilter
|
|
857
|
+
}), [F]);
|
|
858
|
+
oe(() => {
|
|
859
|
+
V.current?.(l.config);
|
|
860
|
+
}, [l.config]);
|
|
861
|
+
const w = [d["rst-dashboard-builder"], D].filter(Boolean).join(" "), B = f(() => {
|
|
862
|
+
y(l.config);
|
|
863
|
+
}, [l.config, y]);
|
|
864
|
+
return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
865
|
+
className: w,
|
|
866
|
+
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
867
|
+
className: d["rst-dashboard-builder-main"],
|
|
868
|
+
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
869
|
+
className: d["rst-dashboard-builder-toolbar"],
|
|
870
|
+
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
871
|
+
className: d["rst-dashboard-builder-toolbar-left"],
|
|
872
|
+
children: [k ? /* @__PURE__ */ (0, e.jsx)("span", {
|
|
873
|
+
className: d["rst-dashboard-builder-name-display"],
|
|
874
|
+
children: l.config.name
|
|
875
|
+
}) : /* @__PURE__ */ (0, e.jsx)("input", {
|
|
876
|
+
className: d["rst-dashboard-builder-name-input"],
|
|
877
|
+
type: "text",
|
|
878
|
+
value: l.config.name,
|
|
879
|
+
onChange: (o) => i(o.target.value),
|
|
880
|
+
placeholder: "Dashboard name",
|
|
881
|
+
"aria-label": "Dashboard name"
|
|
882
|
+
}), Object.keys(C).length > 0 && /* @__PURE__ */ (0, e.jsx)(U, {
|
|
883
|
+
variant: "invisible",
|
|
884
|
+
size: "small",
|
|
885
|
+
leadingVisual: "filter",
|
|
886
|
+
onClick: () => N((o) => !o),
|
|
887
|
+
"aria-label": "Toggle filter panel",
|
|
888
|
+
"aria-pressed": n
|
|
889
|
+
})]
|
|
890
|
+
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
891
|
+
className: d["rst-dashboard-builder-toolbar-right"],
|
|
892
|
+
children: [
|
|
893
|
+
M.length > 0 && !k && /* @__PURE__ */ (0, e.jsx)(Re, {
|
|
894
|
+
options: A,
|
|
895
|
+
onChange: X,
|
|
896
|
+
placeholder: "Load Template",
|
|
897
|
+
size: "small"
|
|
898
|
+
}),
|
|
899
|
+
!S && /* @__PURE__ */ (0, e.jsx)(Ie, {
|
|
900
|
+
value: _,
|
|
901
|
+
options: [{ value: "edit" }, { value: "view" }],
|
|
902
|
+
onChange: (o) => I(o)
|
|
903
|
+
}),
|
|
904
|
+
!k && /* @__PURE__ */ (0, e.jsx)(U, {
|
|
905
|
+
variant: "primary",
|
|
906
|
+
size: "small",
|
|
907
|
+
value: "Save",
|
|
908
|
+
onClick: B
|
|
909
|
+
})
|
|
910
|
+
]
|
|
911
|
+
})]
|
|
912
|
+
}), /* @__PURE__ */ (0, e.jsx)(Te, {
|
|
913
|
+
value: E,
|
|
914
|
+
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
915
|
+
style: {
|
|
916
|
+
display: "flex",
|
|
917
|
+
flex: 1,
|
|
918
|
+
overflow: "hidden"
|
|
919
|
+
},
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ (0, e.jsx)(ye, {
|
|
922
|
+
mode: _,
|
|
923
|
+
widgets: l.config.widgets,
|
|
924
|
+
selectedWidgetId: l.selectedWidgetId,
|
|
925
|
+
dataSources: r,
|
|
926
|
+
onSelectWidget: H,
|
|
927
|
+
onMoveWidget: Y,
|
|
928
|
+
onRemoveWidget: j,
|
|
929
|
+
onAddWidget: z,
|
|
930
|
+
onChange: () => {
|
|
931
|
+
},
|
|
932
|
+
getWidgetActions: ie
|
|
933
|
+
}),
|
|
934
|
+
n && Object.keys(C).length > 0 && /* @__PURE__ */ (0, e.jsxs)(ue, {
|
|
935
|
+
open: n,
|
|
936
|
+
variant: s,
|
|
937
|
+
position: s === "dialog" ? "center" : "right",
|
|
938
|
+
onClose: () => N(!1),
|
|
939
|
+
closeOnEscape: !0,
|
|
940
|
+
closeOnClickOutside: s === "dialog",
|
|
941
|
+
width: s === "sidepanel" ? 360 : void 0,
|
|
942
|
+
maxWidth: s === "dialog" ? 640 : void 0,
|
|
943
|
+
maxHeight: s === "dialog" ? "80vh" : void 0,
|
|
944
|
+
"aria-label": "Dashboard filters",
|
|
945
|
+
children: [
|
|
946
|
+
/* @__PURE__ */ (0, e.jsx)(ue.Header, {
|
|
947
|
+
title: "Filters",
|
|
948
|
+
onClose: () => N(!1),
|
|
949
|
+
actions: /* @__PURE__ */ (0, e.jsx)(U, {
|
|
950
|
+
variant: "invisible",
|
|
951
|
+
size: "small",
|
|
952
|
+
leadingVisual: s === "dialog" ? "square-half" : "open-center",
|
|
953
|
+
onClick: () => g((o) => o === "dialog" ? "sidepanel" : "dialog"),
|
|
954
|
+
"aria-label": s === "dialog" ? "Switch to side panel" : "Switch to dialog"
|
|
955
|
+
})
|
|
956
|
+
}),
|
|
957
|
+
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
958
|
+
className: d["rst-dashboard-builder-filter-body"],
|
|
959
|
+
children: (() => {
|
|
960
|
+
const o = Object.keys(C);
|
|
961
|
+
if (o.length === 0) return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
962
|
+
style: { padding: "var(--rst-space-default)" },
|
|
963
|
+
children: "No data sources to filter."
|
|
964
|
+
});
|
|
965
|
+
const G = R && o.includes(R) ? R : o[0], ae = b?.[G] ?? Ee();
|
|
966
|
+
return /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
967
|
+
className: d["rst-dashboard-builder-filter-tabs"],
|
|
968
|
+
children: o.map((K) => /* @__PURE__ */ (0, e.jsx)(U, {
|
|
969
|
+
value: K,
|
|
970
|
+
variant: K === G ? "base" : "invisible",
|
|
971
|
+
size: "small",
|
|
972
|
+
onClick: () => Q(K),
|
|
973
|
+
children: K
|
|
974
|
+
}, K))
|
|
975
|
+
}), /* @__PURE__ */ (0, e.jsx)(ze, {
|
|
976
|
+
filters: ae,
|
|
977
|
+
onChange: (K) => v((Ne) => ({
|
|
978
|
+
...Ne ?? {},
|
|
979
|
+
[G]: K.filters.length === 0 ? null : K
|
|
980
|
+
})),
|
|
981
|
+
fieldOptions: C[G]
|
|
982
|
+
})] });
|
|
983
|
+
})()
|
|
984
|
+
}),
|
|
985
|
+
/* @__PURE__ */ (0, e.jsxs)(ue.Footer, { children: [/* @__PURE__ */ (0, e.jsx)(U, {
|
|
986
|
+
variant: "invisible",
|
|
987
|
+
size: "small",
|
|
988
|
+
value: "Clear",
|
|
989
|
+
onClick: () => v({})
|
|
990
|
+
}), /* @__PURE__ */ (0, e.jsx)(U, {
|
|
991
|
+
variant: "primary",
|
|
992
|
+
size: "small",
|
|
993
|
+
value: "Apply",
|
|
994
|
+
onClick: se
|
|
995
|
+
})] })
|
|
996
|
+
]
|
|
997
|
+
}),
|
|
998
|
+
!k && /* @__PURE__ */ (0, e.jsx)(De, {
|
|
999
|
+
widget: a,
|
|
1000
|
+
dataSources: r,
|
|
1001
|
+
onUpdate: (o) => {
|
|
1002
|
+
a && T(a.id, o);
|
|
1003
|
+
},
|
|
1004
|
+
onRemove: () => {
|
|
1005
|
+
a && j(a.id);
|
|
1006
|
+
},
|
|
1007
|
+
onClose: () => H(null),
|
|
1008
|
+
onAddWidget: (o) => {
|
|
1009
|
+
const G = Object.values(r)[0], ae = Ce(6, 3, l.config.widgets);
|
|
1010
|
+
z(o, G?.id ?? "", ae);
|
|
1011
|
+
},
|
|
1012
|
+
prebuiltSections: c,
|
|
1013
|
+
onAddPrebuiltSection: (o) => {
|
|
1014
|
+
P(o);
|
|
1015
|
+
}
|
|
1016
|
+
})
|
|
1017
|
+
]
|
|
1018
|
+
})
|
|
1019
|
+
})]
|
|
1020
|
+
})
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
Ke.displayName = "DashboardBuilder";
|
|
1024
|
+
export {
|
|
1025
|
+
Ze as DASHBOARD_CONFIG_VERSION,
|
|
1026
|
+
Ke as DashboardBuilder
|
|
1027
|
+
};
|