@perses-dev/dashboards 0.0.0-snapshot-panel-extra-content-2-2767e21 → 0.0.0-snapshot-scatter-chart-embed-8efdfab
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/cjs/components/AddGroupButton/AddGroupButton.js +10 -7
- package/dist/cjs/components/AddGroupButton/index.js +10 -8
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +10 -11
- package/dist/cjs/components/AddPanelButton/index.js +10 -8
- package/dist/cjs/components/Dashboard/Dashboard.js +11 -9
- package/dist/cjs/components/Dashboard/index.js +10 -8
- package/dist/cjs/components/DashboardStickyToolbar/DashboardStickyToolbar.js +53 -22
- package/dist/cjs/components/DashboardStickyToolbar/index.js +10 -8
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +81 -102
- package/dist/cjs/components/DashboardToolbar/index.js +10 -8
- package/dist/cjs/components/Datasources/DatasourceEditor.js +237 -0
- package/dist/cjs/components/Datasources/EditDatasourcesButton.js +106 -0
- package/dist/cjs/components/Datasources/index.js +31 -0
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +12 -10
- package/dist/cjs/components/DeletePanelDialog/index.js +10 -8
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +17 -15
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +5 -3
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/DownloadButton/DownloadButton.js +12 -10
- package/dist/cjs/components/DownloadButton/index.js +10 -8
- package/dist/cjs/components/EditButton/EditButton.js +8 -6
- package/dist/cjs/components/EditButton/index.js +10 -8
- package/dist/cjs/components/EditJsonButton/EditJsonButton.js +15 -11
- package/dist/cjs/components/EditJsonButton/index.js +10 -8
- package/dist/cjs/components/EditJsonDialog/EditJsonDialog.js +46 -24
- package/dist/cjs/components/EditJsonDialog/index.js +10 -8
- package/dist/cjs/components/EmptyDashboard/EmptyDashboard.js +18 -16
- package/dist/cjs/components/EmptyDashboard/index.js +10 -8
- package/dist/cjs/components/GridLayout/GridContainer.js +5 -3
- package/dist/cjs/components/GridLayout/GridItemContent.js +33 -13
- package/dist/cjs/components/GridLayout/GridLayout.js +18 -16
- package/dist/cjs/components/GridLayout/GridTitle.js +35 -33
- package/dist/cjs/components/GridLayout/index.js +13 -11
- package/dist/cjs/components/Panel/Panel.js +22 -23
- package/dist/cjs/components/Panel/PanelContent.js +11 -8
- package/dist/cjs/components/Panel/PanelHeader.js +33 -31
- package/dist/cjs/components/Panel/index.js +10 -8
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +25 -77
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +231 -141
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +11 -9
- package/dist/cjs/components/PanelDrawer/index.js +11 -8
- package/dist/cjs/components/PanelDrawer/usePanelEditor.js +3 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +18 -16
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +15 -11
- package/dist/cjs/components/PanelGroupDialog/index.js +10 -8
- package/dist/cjs/components/QuerySummaryTable/QuerySummaryTable.js +47 -45
- package/dist/cjs/components/QuerySummaryTable/index.js +10 -8
- package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +23 -21
- package/dist/cjs/components/SaveChangesConfirmationDialog/index.js +10 -8
- package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +11 -9
- package/dist/cjs/components/SaveDashboardButton/index.js +10 -8
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +46 -19
- package/dist/cjs/components/TimeRangeControls/index.js +10 -8
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +5 -3
- package/dist/cjs/components/ToolbarIconButton/index.js +10 -8
- package/dist/cjs/components/Variables/BuiltinVariableAccordions.js +140 -0
- package/dist/cjs/components/Variables/EditVariablesButton.js +19 -15
- package/dist/cjs/components/Variables/TemplateVariable.js +259 -110
- package/dist/cjs/components/Variables/VariableEditor.js +354 -117
- package/dist/cjs/components/Variables/VariableList.js +44 -22
- package/dist/cjs/components/Variables/index.js +14 -11
- package/dist/cjs/components/index.js +32 -29
- package/dist/cjs/constants/grid-layout-config.js +6 -2
- package/dist/cjs/constants/index.js +12 -9
- package/dist/cjs/constants/styles.js +42 -0
- package/dist/cjs/constants/user-interface-text.js +9 -2
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +43 -35
- package/dist/cjs/context/DashboardProvider/common.js +6 -2
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +70 -38
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +5 -3
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/edit-json-dialog-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/index.js +12 -10
- package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +13 -11
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +8 -6
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +15 -7
- package/dist/cjs/context/DashboardProvider/panel-slice.js +3 -1
- package/dist/cjs/context/DashboardProvider/save-changes-dialog-slice.js +3 -1
- package/dist/cjs/context/DatasourceStoreProvider.js +167 -46
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +205 -51
- package/dist/cjs/context/TemplateVariableProvider/hydrationUtils.js +65 -13
- package/dist/cjs/context/TemplateVariableProvider/index.js +10 -8
- package/dist/cjs/context/TemplateVariableProvider/query-params.js +17 -7
- package/dist/cjs/context/TemplateVariableProvider/utils.js +49 -9
- package/dist/cjs/context/index.js +13 -11
- package/dist/cjs/context/useDashboard.js +12 -8
- package/dist/cjs/index.js +12 -10
- package/dist/cjs/stories/decorators/WithDashboard.js +6 -4
- package/dist/cjs/stories/decorators/WithDatasourceStore.js +6 -4
- package/dist/cjs/stories/decorators/WithTemplateVariables.js +6 -4
- package/dist/cjs/stories/decorators/constants.js +5 -3
- package/dist/cjs/stories/decorators/index.js +13 -11
- package/dist/cjs/test/dashboard-provider.js +8 -4
- package/dist/cjs/test/datasource-provider.js +16 -12
- package/dist/cjs/test/index.js +13 -11
- package/dist/cjs/test/plugin-registry.js +6 -4
- package/dist/cjs/test/render.js +27 -20
- package/dist/cjs/test/setup-tests.js +2 -2
- package/dist/cjs/test/testDashboard.js +13 -11
- package/dist/cjs/utils/index.js +11 -9
- package/dist/cjs/utils/panelUtils.js +9 -3
- package/dist/cjs/utils/time.js +5 -3
- package/dist/cjs/validation/index.js +30 -0
- package/dist/cjs/validation/panel.js +29 -0
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +30 -16
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +64 -20
- package/dist/cjs/views/ViewDashboard/index.js +10 -8
- package/dist/cjs/views/index.js +10 -8
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.js +2 -1
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -1
- package/dist/components/AddGroupButton/index.js.map +1 -1
- package/dist/components/AddPanelButton/AddPanelButton.js +2 -5
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -1
- package/dist/components/AddPanelButton/index.js.map +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Dashboard/index.js.map +1 -1
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.d.ts.map +1 -1
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js +37 -8
- package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js.map +1 -1
- package/dist/components/DashboardStickyToolbar/index.js.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +61 -84
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/DashboardToolbar/index.js.map +1 -1
- package/dist/components/Datasources/DatasourceEditor.d.ts +8 -0
- package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -0
- package/dist/components/Datasources/DatasourceEditor.js +224 -0
- package/dist/components/Datasources/DatasourceEditor.js.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts +3 -0
- package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -0
- package/dist/components/Datasources/EditDatasourcesButton.js +93 -0
- package/dist/components/Datasources/EditDatasourcesButton.js.map +1 -0
- package/dist/components/Datasources/index.d.ts +3 -0
- package/dist/components/Datasources/index.d.ts.map +1 -0
- package/dist/components/Datasources/index.js +16 -0
- package/dist/components/Datasources/index.js.map +1 -0
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -2
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/EditButton/EditButton.js.map +1 -1
- package/dist/components/EditButton/index.js.map +1 -1
- package/dist/components/EditJsonButton/EditJsonButton.d.ts +4 -1
- package/dist/components/EditJsonButton/EditJsonButton.d.ts.map +1 -1
- package/dist/components/EditJsonButton/EditJsonButton.js +5 -3
- package/dist/components/EditJsonButton/EditJsonButton.js.map +1 -1
- package/dist/components/EditJsonButton/index.js.map +1 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.d.ts +5 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.d.ts.map +1 -1
- package/dist/components/EditJsonDialog/EditJsonDialog.js +32 -12
- package/dist/components/EditJsonDialog/EditJsonDialog.js.map +1 -1
- package/dist/components/EditJsonDialog/index.js.map +1 -1
- package/dist/components/EmptyDashboard/EmptyDashboard.js.map +1 -1
- package/dist/components/EmptyDashboard/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.js.map +1 -1
- package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +27 -9
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +2 -2
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/index.js.map +1 -1
- package/dist/components/Panel/Panel.d.ts +13 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +9 -12
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/PanelContent.d.ts +2 -1
- package/dist/components/Panel/PanelContent.d.ts.map +1 -1
- package/dist/components/Panel/PanelContent.js +3 -2
- package/dist/components/Panel/PanelContent.js.map +1 -1
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +22 -76
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts +4 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +225 -139
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +2 -2
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/index.d.ts +1 -0
- package/dist/components/PanelDrawer/index.d.ts.map +1 -1
- package/dist/components/PanelDrawer/index.js +1 -0
- package/dist/components/PanelDrawer/index.js.map +1 -1
- package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
- package/dist/components/PanelGroupDialog/index.js.map +1 -1
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js +6 -6
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
- package/dist/components/QuerySummaryTable/index.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +4 -4
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js +4 -4
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
- package/dist/components/SaveDashboardButton/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +26 -5
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/components/ToolbarIconButton/index.js.map +1 -1
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts +8 -0
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts.map +1 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js +127 -0
- package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -0
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
- package/dist/components/Variables/EditVariablesButton.js +8 -6
- package/dist/components/Variables/EditVariablesButton.js.map +1 -1
- package/dist/components/Variables/TemplateVariable.d.ts +12 -2
- package/dist/components/Variables/TemplateVariable.d.ts.map +1 -1
- package/dist/components/Variables/TemplateVariable.js +242 -103
- package/dist/components/Variables/TemplateVariable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts +9 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +324 -97
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts +5 -0
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +31 -19
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/Variables/index.d.ts +1 -0
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +1 -0
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/constants/grid-layout-config.js.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/styles.d.ts +5 -0
- package/dist/constants/styles.d.ts.map +1 -0
- package/dist/constants/styles.js +23 -0
- package/dist/constants/styles.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +3 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +3 -0
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +2 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +8 -6
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +2 -2
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js +2 -2
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/edit-json-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts +2 -2
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js +7 -7
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js +2 -2
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +3 -3
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/save-changes-dialog-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.d.ts +15 -10
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +161 -42
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts +49 -13
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +178 -41
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.d.ts +9 -2
- package/dist/context/TemplateVariableProvider/hydrationUtils.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/hydrationUtils.js +67 -12
- package/dist/context/TemplateVariableProvider/hydrationUtils.js.map +1 -1
- package/dist/context/TemplateVariableProvider/index.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
- package/dist/context/TemplateVariableProvider/utils.d.ts +27 -2
- package/dist/context/TemplateVariableProvider/utils.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider/utils.js +48 -6
- package/dist/context/TemplateVariableProvider/utils.js.map +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/useDashboard.d.ts.map +1 -1
- package/dist/context/useDashboard.js +5 -3
- package/dist/context/useDashboard.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/decorators/WithDashboard.js.map +1 -1
- package/dist/stories/decorators/WithDatasourceStore.js.map +1 -1
- package/dist/stories/decorators/WithTemplateVariables.js.map +1 -1
- package/dist/stories/decorators/constants.js +2 -2
- package/dist/stories/decorators/constants.js.map +1 -1
- package/dist/stories/decorators/index.js.map +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/datasource-provider.d.ts.map +1 -1
- package/dist/test/datasource-provider.js +5 -7
- package/dist/test/datasource-provider.js.map +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +8 -3
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/testDashboard.js +10 -10
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/panelUtils.js.map +1 -1
- package/dist/utils/time.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +15 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/panel.d.ts +19 -0
- package/dist/validation/panel.d.ts.map +1 -0
- package/dist/validation/panel.js +21 -0
- package/dist/validation/panel.js.map +1 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts +1 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js +17 -5
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +3 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +54 -12
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/dist/views/ViewDashboard/index.js.map +1 -1
- package/dist/views/index.js.map +1 -1
- package/package.json +8 -7
|
@@ -21,31 +21,63 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
useEditMode: ()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
useEditMode: function() {
|
|
25
|
+
return useEditMode;
|
|
26
|
+
},
|
|
27
|
+
useDashboardActions: function() {
|
|
28
|
+
return useDashboardActions;
|
|
29
|
+
},
|
|
30
|
+
usePanelGroupIds: function() {
|
|
31
|
+
return usePanelGroupIds;
|
|
32
|
+
},
|
|
33
|
+
useListPanelGroups: function() {
|
|
34
|
+
return useListPanelGroups;
|
|
35
|
+
},
|
|
36
|
+
usePanelGroup: function() {
|
|
37
|
+
return usePanelGroup;
|
|
38
|
+
},
|
|
39
|
+
usePanelGroupActions: function() {
|
|
40
|
+
return usePanelGroupActions;
|
|
41
|
+
},
|
|
42
|
+
usePanelGroupEditor: function() {
|
|
43
|
+
return usePanelGroupEditor;
|
|
44
|
+
},
|
|
45
|
+
useDeletePanelGroupDialog: function() {
|
|
46
|
+
return useDeletePanelGroupDialog;
|
|
47
|
+
},
|
|
48
|
+
usePanel: function() {
|
|
49
|
+
return usePanel;
|
|
50
|
+
},
|
|
51
|
+
usePanelActions: function() {
|
|
52
|
+
return usePanelActions;
|
|
53
|
+
},
|
|
54
|
+
usePanelEditor: function() {
|
|
55
|
+
return usePanelEditor;
|
|
56
|
+
},
|
|
57
|
+
useDeletePanelDialog: function() {
|
|
58
|
+
return useDeletePanelDialog;
|
|
59
|
+
},
|
|
60
|
+
useDashboardDuration: function() {
|
|
61
|
+
return useDashboardDuration;
|
|
62
|
+
},
|
|
63
|
+
useSaveChangesConfirmationDialog: function() {
|
|
64
|
+
return useSaveChangesConfirmationDialog;
|
|
65
|
+
},
|
|
66
|
+
useDiscardChangesConfirmationDialog: function() {
|
|
67
|
+
return useDiscardChangesConfirmationDialog;
|
|
68
|
+
},
|
|
69
|
+
useEditJsonDialog: function() {
|
|
70
|
+
return useEditJsonDialog;
|
|
71
|
+
}
|
|
40
72
|
});
|
|
41
73
|
const _react = require("react");
|
|
42
|
-
const
|
|
74
|
+
const _DashboardProvider = require("./DashboardProvider");
|
|
43
75
|
const selectEditMode = ({ isEditMode , setEditMode })=>({
|
|
44
76
|
isEditMode,
|
|
45
77
|
setEditMode
|
|
46
78
|
});
|
|
47
79
|
function useEditMode() {
|
|
48
|
-
return (0,
|
|
80
|
+
return (0, _DashboardProvider.useDashboardStore)(selectEditMode);
|
|
49
81
|
}
|
|
50
82
|
const selectDashboardActions = ({ setDashboard , openAddPanelGroup , openAddPanel })=>({
|
|
51
83
|
setDashboard,
|
|
@@ -53,7 +85,7 @@ const selectDashboardActions = ({ setDashboard , openAddPanelGroup , openAddPane
|
|
|
53
85
|
openAddPanel
|
|
54
86
|
});
|
|
55
87
|
function useDashboardActions() {
|
|
56
|
-
const { setDashboard , openAddPanelGroup , openAddPanel } = (0,
|
|
88
|
+
const { setDashboard , openAddPanelGroup , openAddPanel } = (0, _DashboardProvider.useDashboardStore)(selectDashboardActions);
|
|
57
89
|
return {
|
|
58
90
|
setDashboard,
|
|
59
91
|
openAddPanelGroup: ()=>openAddPanelGroup(),
|
|
@@ -62,12 +94,12 @@ function useDashboardActions() {
|
|
|
62
94
|
}
|
|
63
95
|
const selectPanelGroupOrder = (state)=>state.panelGroupOrder;
|
|
64
96
|
function usePanelGroupIds() {
|
|
65
|
-
return (0,
|
|
97
|
+
return (0, _DashboardProvider.useDashboardStore)(selectPanelGroupOrder);
|
|
66
98
|
}
|
|
67
99
|
const selectPanelGroups = (state)=>state.panelGroups;
|
|
68
100
|
function useListPanelGroups() {
|
|
69
101
|
const panelGroupIds = usePanelGroupIds();
|
|
70
|
-
const panelGroups = (0,
|
|
102
|
+
const panelGroups = (0, _DashboardProvider.useDashboardStore)(selectPanelGroups);
|
|
71
103
|
return (0, _react.useMemo)(()=>{
|
|
72
104
|
return panelGroupIds.map((id)=>{
|
|
73
105
|
const group = panelGroups[id];
|
|
@@ -82,7 +114,7 @@ function useListPanelGroups() {
|
|
|
82
114
|
]);
|
|
83
115
|
}
|
|
84
116
|
function usePanelGroup(panelGroupId) {
|
|
85
|
-
const panelGroup = (0,
|
|
117
|
+
const panelGroup = (0, _DashboardProvider.useDashboardStore)((0, _react.useCallback)((state)=>state.panelGroups[panelGroupId], [
|
|
86
118
|
panelGroupId
|
|
87
119
|
]));
|
|
88
120
|
if (panelGroup === undefined) {
|
|
@@ -98,7 +130,7 @@ const selectPanelGroupActions = ({ openEditPanelGroup , deletePanelGroup , openA
|
|
|
98
130
|
});
|
|
99
131
|
function usePanelGroupActions(panelGroupId) {
|
|
100
132
|
const { moveUp , moveDown } = useMovePanelGroup(panelGroupId);
|
|
101
|
-
const { openEditPanelGroup , deletePanelGroup , openAddPanel , updatePanelGroupLayouts } = (0,
|
|
133
|
+
const { openEditPanelGroup , deletePanelGroup , openAddPanel , updatePanelGroupLayouts } = (0, _DashboardProvider.useDashboardStore)(selectPanelGroupActions);
|
|
102
134
|
return {
|
|
103
135
|
openEditPanelGroup: ()=>openEditPanelGroup(panelGroupId),
|
|
104
136
|
deletePanelGroup: ()=>deletePanelGroup(panelGroupId),
|
|
@@ -114,11 +146,11 @@ const selectPanelGroupsLength = (state)=>state.panelGroupOrder.length;
|
|
|
114
146
|
* Returns functions for moving a panel group up or down. A function will be undefined if the panel group can't be
|
|
115
147
|
* moved in that direction.
|
|
116
148
|
*/ function useMovePanelGroup(panelGroupId) {
|
|
117
|
-
const currentIndex = (0,
|
|
149
|
+
const currentIndex = (0, _DashboardProvider.useDashboardStore)((0, _react.useCallback)((store)=>store.panelGroupOrder.findIndex((id)=>id === panelGroupId), [
|
|
118
150
|
panelGroupId
|
|
119
151
|
]));
|
|
120
|
-
const panelGroupsLength = (0,
|
|
121
|
-
const swapPanelGroups = (0,
|
|
152
|
+
const panelGroupsLength = (0, _DashboardProvider.useDashboardStore)(selectPanelGroupsLength);
|
|
153
|
+
const swapPanelGroups = (0, _DashboardProvider.useDashboardStore)(selectSwapPanelGroups);
|
|
122
154
|
if (currentIndex < 0) {
|
|
123
155
|
throw new Error(`Could not find panel group with Id ${panelGroupId} in order array`);
|
|
124
156
|
}
|
|
@@ -131,7 +163,7 @@ const selectPanelGroupsLength = (state)=>state.panelGroupOrder.length;
|
|
|
131
163
|
}
|
|
132
164
|
const selectPanelGroupEditor = (state)=>state.panelGroupEditor;
|
|
133
165
|
function usePanelGroupEditor() {
|
|
134
|
-
return (0,
|
|
166
|
+
return (0, _DashboardProvider.useDashboardStore)(selectPanelGroupEditor);
|
|
135
167
|
}
|
|
136
168
|
const selectDeletePanelGroupDialog = ({ deletePanelGroupDialog , openDeletePanelGroupDialog , closeDeletePanelGroupDialog , deletePanelGroup })=>({
|
|
137
169
|
deletePanelGroupDialog,
|
|
@@ -140,7 +172,7 @@ const selectDeletePanelGroupDialog = ({ deletePanelGroupDialog , openDeletePanel
|
|
|
140
172
|
deletePanelGroup
|
|
141
173
|
});
|
|
142
174
|
function useDeletePanelGroupDialog() {
|
|
143
|
-
const { deletePanelGroupDialog , openDeletePanelGroupDialog , closeDeletePanelGroupDialog , deletePanelGroup } = (0,
|
|
175
|
+
const { deletePanelGroupDialog , openDeletePanelGroupDialog , closeDeletePanelGroupDialog , deletePanelGroup } = (0, _DashboardProvider.useDashboardStore)(selectDeletePanelGroupDialog);
|
|
144
176
|
return {
|
|
145
177
|
deletePanelGroupDialog,
|
|
146
178
|
deletePanelGroup,
|
|
@@ -150,9 +182,9 @@ function useDeletePanelGroupDialog() {
|
|
|
150
182
|
}
|
|
151
183
|
function usePanel(panelGroupItemId) {
|
|
152
184
|
const { panelGroupId , panelGroupItemLayoutId: panelGroupLayoutId } = panelGroupItemId;
|
|
153
|
-
const panel = (0,
|
|
154
|
-
var
|
|
155
|
-
const panelKey = (
|
|
185
|
+
const panel = (0, _DashboardProvider.useDashboardStore)((0, _react.useCallback)((store)=>{
|
|
186
|
+
var _store_panelGroups_panelGroupId;
|
|
187
|
+
const panelKey = (_store_panelGroups_panelGroupId = store.panelGroups[panelGroupId]) === null || _store_panelGroups_panelGroupId === void 0 ? void 0 : _store_panelGroups_panelGroupId.itemPanelKeys[panelGroupLayoutId];
|
|
156
188
|
if (panelKey === undefined) return;
|
|
157
189
|
return store.panels[panelKey];
|
|
158
190
|
}, [
|
|
@@ -170,7 +202,7 @@ const selectPanelActions = ({ openEditPanel , openDeletePanelDialog , duplicateP
|
|
|
170
202
|
duplicatePanel
|
|
171
203
|
});
|
|
172
204
|
function usePanelActions(panelGroupItemId) {
|
|
173
|
-
const { openEditPanel , openDeletePanelDialog , duplicatePanel } = (0,
|
|
205
|
+
const { openEditPanel , openDeletePanelDialog , duplicatePanel } = (0, _DashboardProvider.useDashboardStore)(selectPanelActions);
|
|
174
206
|
return {
|
|
175
207
|
openEditPanel: ()=>openEditPanel(panelGroupItemId),
|
|
176
208
|
openDeletePanelDialog: ()=>openDeletePanelDialog(panelGroupItemId),
|
|
@@ -179,7 +211,7 @@ function usePanelActions(panelGroupItemId) {
|
|
|
179
211
|
}
|
|
180
212
|
const selectPanelEditor = (state)=>state.panelEditor;
|
|
181
213
|
function usePanelEditor() {
|
|
182
|
-
return (0,
|
|
214
|
+
return (0, _DashboardProvider.useDashboardStore)(selectPanelEditor);
|
|
183
215
|
}
|
|
184
216
|
const selectDeletePanelDialog = ({ deletePanelDialog , deletePanel , closeDeletePanelDialog })=>({
|
|
185
217
|
deletePanelDialog,
|
|
@@ -188,11 +220,11 @@ const selectDeletePanelDialog = ({ deletePanelDialog , deletePanel , closeDelete
|
|
|
188
220
|
});
|
|
189
221
|
function useDeletePanelDialog() {
|
|
190
222
|
// TODO: Refactor similar to other dialogs/editors so these are on the editor state itself
|
|
191
|
-
return (0,
|
|
223
|
+
return (0, _DashboardProvider.useDashboardStore)(selectDeletePanelDialog);
|
|
192
224
|
}
|
|
193
225
|
const selectDashboardDuration = (state)=>state.duration;
|
|
194
226
|
function useDashboardDuration() {
|
|
195
|
-
return (0,
|
|
227
|
+
return (0, _DashboardProvider.useDashboardStore)(selectDashboardDuration);
|
|
196
228
|
}
|
|
197
229
|
const selectSaveChangesConfirmationDialog = ({ saveChangesConfirmationDialog , openSaveChangesConfirmationDialog , closeSaveChangesConfirmationDialog })=>({
|
|
198
230
|
saveChangesConfirmationDialog,
|
|
@@ -200,7 +232,7 @@ const selectSaveChangesConfirmationDialog = ({ saveChangesConfirmationDialog , o
|
|
|
200
232
|
closeSaveChangesConfirmationDialog
|
|
201
233
|
});
|
|
202
234
|
function useSaveChangesConfirmationDialog() {
|
|
203
|
-
return (0,
|
|
235
|
+
return (0, _DashboardProvider.useDashboardStore)(selectSaveChangesConfirmationDialog);
|
|
204
236
|
}
|
|
205
237
|
const selectDiscardChangesConfirmationDialog = ({ discardChangesConfirmationDialog , openDiscardChangesConfirmationDialog , closeDiscardChangesConfirmationDialog })=>({
|
|
206
238
|
discardChangesConfirmationDialog,
|
|
@@ -208,7 +240,7 @@ const selectDiscardChangesConfirmationDialog = ({ discardChangesConfirmationDial
|
|
|
208
240
|
closeDiscardChangesConfirmationDialog
|
|
209
241
|
});
|
|
210
242
|
function useDiscardChangesConfirmationDialog() {
|
|
211
|
-
return (0,
|
|
243
|
+
return (0, _DashboardProvider.useDashboardStore)(selectDiscardChangesConfirmationDialog);
|
|
212
244
|
}
|
|
213
245
|
const selectEditJsonDialog = ({ editJsonDialog , openEditJsonDialog , closeEditJsonDialog })=>({
|
|
214
246
|
editJsonDialog,
|
|
@@ -216,5 +248,5 @@ const selectEditJsonDialog = ({ editJsonDialog , openEditJsonDialog , closeEditJ
|
|
|
216
248
|
closeEditJsonDialog
|
|
217
249
|
});
|
|
218
250
|
function useEditJsonDialog() {
|
|
219
|
-
return (0,
|
|
251
|
+
return (0, _DashboardProvider.useDashboardStore)(selectEditJsonDialog);
|
|
220
252
|
}
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createDeletePanelGroupSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createDeletePanelGroupSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const createDeletePanelGroupSlice = (set, get)=>({
|
|
22
24
|
deletePanelGroup (panelGroupId) {
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createDeletePanelSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createDeletePanelSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
function createDeletePanelSlice() {
|
|
22
24
|
// Return the state creator function for Zustand that uses the panels provided as intitial state
|
|
@@ -58,11 +60,11 @@ function createDeletePanelSlice() {
|
|
|
58
60
|
throw new Error(`Could not find panel ${panelKey}`);
|
|
59
61
|
}
|
|
60
62
|
set((state)=>{
|
|
61
|
-
var
|
|
63
|
+
var _panelGroup_title;
|
|
62
64
|
state.deletePanelDialog = {
|
|
63
65
|
panelGroupItemId: panelGroupItemId,
|
|
64
66
|
panelName: panel.spec.display.name,
|
|
65
|
-
panelGroupName: (
|
|
67
|
+
panelGroupName: (_panelGroup_title = panelGroup.title) !== null && _panelGroup_title !== void 0 ? _panelGroup_title : ''
|
|
66
68
|
};
|
|
67
69
|
});
|
|
68
70
|
},
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createDiscardChangesDialogSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createDiscardChangesDialogSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const createDiscardChangesDialogSlice = (set)=>({
|
|
22
24
|
isOpen: false,
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createDuplicatePanelSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createDuplicatePanelSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const _panelUtils = require("../../utils/panelUtils");
|
|
22
24
|
const _common = require("./common");
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createEditJsonDialogSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createEditJsonDialogSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const createEditJsonDialogSlice = (set)=>({
|
|
22
24
|
openEditJsonDialog () {
|
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
17
|
+
_export_star(require("./common"), exports);
|
|
18
|
+
_export_star(require("./dashboard-provider-api"), exports);
|
|
19
|
+
_export_star(require("./DashboardProvider"), exports);
|
|
20
|
+
function _export_star(from, to) {
|
|
21
21
|
Object.keys(from).forEach(function(k) {
|
|
22
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
23
|
+
Object.defineProperty(to, k, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return from[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
});
|
|
29
31
|
return from;
|
|
30
32
|
}
|
|
@@ -16,22 +16,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createPanelEditorSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createPanelEditorSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const _panelUtils = require("../../utils/panelUtils");
|
|
22
24
|
const _common = require("./common");
|
|
23
|
-
const
|
|
25
|
+
const _panelgroupslice = require("./panel-group-slice");
|
|
24
26
|
function createPanelEditorSlice() {
|
|
25
27
|
// Return the state creator function for Zustand that uses the panels provided as intitial state
|
|
26
28
|
return (set, get)=>{
|
|
27
29
|
return {
|
|
28
30
|
panelEditor: undefined,
|
|
29
31
|
openEditPanel (panelGroupItemId) {
|
|
30
|
-
var
|
|
32
|
+
var _panelGroups_panelGroupId;
|
|
31
33
|
const { panels , panelGroups } = get();
|
|
32
34
|
// Figure out the panel key at that location
|
|
33
35
|
const { panelGroupId , panelGroupItemLayoutId: panelGroupLayoutId } = panelGroupItemId;
|
|
34
|
-
const panelKey = (
|
|
36
|
+
const panelKey = (_panelGroups_panelGroupId = panelGroups[panelGroupId]) === null || _panelGroups_panelGroupId === void 0 ? void 0 : _panelGroups_panelGroupId.itemPanelKeys[panelGroupLayoutId];
|
|
35
37
|
if (panelKey === undefined) {
|
|
36
38
|
throw new Error(`Could not find Panel Group item ${panelGroupItemId}`);
|
|
37
39
|
}
|
|
@@ -41,7 +43,7 @@ function createPanelEditorSlice() {
|
|
|
41
43
|
throw new Error(`Cannot find Panel with key '${panelKey}'`);
|
|
42
44
|
}
|
|
43
45
|
const editorState = {
|
|
44
|
-
mode: '
|
|
46
|
+
mode: 'update',
|
|
45
47
|
initialValues: {
|
|
46
48
|
groupId: panelGroupItemId.panelGroupId,
|
|
47
49
|
panelDefinition: panelToEdit
|
|
@@ -94,21 +96,21 @@ function createPanelEditorSlice() {
|
|
|
94
96
|
});
|
|
95
97
|
},
|
|
96
98
|
openAddPanel (panelGroupId) {
|
|
97
|
-
var
|
|
99
|
+
var _get_initialValues;
|
|
98
100
|
// If a panel group isn't supplied, add to the first group or create a group if there aren't any
|
|
99
101
|
let newGroup = undefined;
|
|
100
102
|
panelGroupId !== null && panelGroupId !== void 0 ? panelGroupId : panelGroupId = get().panelGroupOrder[0];
|
|
101
103
|
if (panelGroupId === undefined) {
|
|
102
|
-
newGroup = (0,
|
|
104
|
+
newGroup = (0, _panelgroupslice.createEmptyPanelGroup)();
|
|
103
105
|
newGroup.title = 'Panel Group';
|
|
104
106
|
panelGroupId = newGroup.id;
|
|
105
107
|
}
|
|
106
|
-
var
|
|
108
|
+
var _get_initialValues_panelDefinition;
|
|
107
109
|
const editorState = {
|
|
108
|
-
mode: '
|
|
110
|
+
mode: 'create',
|
|
109
111
|
initialValues: {
|
|
110
112
|
groupId: panelGroupId,
|
|
111
|
-
panelDefinition: (
|
|
113
|
+
panelDefinition: (_get_initialValues_panelDefinition = (_get_initialValues = get().initialValues) === null || _get_initialValues === void 0 ? void 0 : _get_initialValues.panelDefinition) !== null && _get_initialValues_panelDefinition !== void 0 ? _get_initialValues_panelDefinition : (0, _common.createPanelDefinition)()
|
|
112
114
|
},
|
|
113
115
|
applyChanges: (next)=>{
|
|
114
116
|
const name = next.panelDefinition.spec.display.name;
|
|
@@ -141,7 +143,7 @@ function createPanelEditorSlice() {
|
|
|
141
143
|
set((state)=>{
|
|
142
144
|
// Add the new panel group if one was created for the panel
|
|
143
145
|
if (newGroup !== undefined) {
|
|
144
|
-
(0,
|
|
146
|
+
(0, _panelgroupslice.addPanelGroup)(state, newGroup);
|
|
145
147
|
}
|
|
146
148
|
// Open the editor with the new state
|
|
147
149
|
state.panelEditor = editorState;
|
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createPanelGroupEditorSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createPanelGroupEditorSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _panelgroupslice = require("./panel-group-slice");
|
|
22
24
|
const createPanelGroupEditorSlice = (set, get)=>({
|
|
23
25
|
panelGroupEditor: undefined,
|
|
24
26
|
openAddPanelGroup: ()=>{
|
|
@@ -30,11 +32,11 @@ const createPanelGroupEditorSlice = (set, get)=>({
|
|
|
30
32
|
isCollapsed: false
|
|
31
33
|
},
|
|
32
34
|
applyChanges (next) {
|
|
33
|
-
const newGroup = (0,
|
|
35
|
+
const newGroup = (0, _panelgroupslice.createEmptyPanelGroup)();
|
|
34
36
|
newGroup.title = next.title;
|
|
35
37
|
newGroup.isCollapsed = next.isCollapsed;
|
|
36
38
|
set((draft)=>{
|
|
37
|
-
(0,
|
|
39
|
+
(0, _panelgroupslice.addPanelGroup)(draft, newGroup);
|
|
38
40
|
});
|
|
39
41
|
},
|
|
40
42
|
close () {
|
|
@@ -53,12 +55,12 @@ const createPanelGroupEditorSlice = (set, get)=>({
|
|
|
53
55
|
if (existingGroup === undefined) {
|
|
54
56
|
throw new Error(`Panel group with Id ${panelGroupId} does not exist`);
|
|
55
57
|
}
|
|
56
|
-
var
|
|
58
|
+
var _existingGroup_title;
|
|
57
59
|
// Create the editor state
|
|
58
60
|
const editor = {
|
|
59
61
|
mode: 'Edit',
|
|
60
62
|
initialValues: {
|
|
61
|
-
title: (
|
|
63
|
+
title: (_existingGroup_title = existingGroup.title) !== null && _existingGroup_title !== void 0 ? _existingGroup_title : '',
|
|
62
64
|
isCollapsed: existingGroup.isCollapsed
|
|
63
65
|
},
|
|
64
66
|
applyChanges (next) {
|
|
@@ -21,10 +21,18 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
createPanelGroupSlice: ()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
createPanelGroupSlice: function() {
|
|
25
|
+
return createPanelGroupSlice;
|
|
26
|
+
},
|
|
27
|
+
convertLayoutsToPanelGroups: function() {
|
|
28
|
+
return convertLayoutsToPanelGroups;
|
|
29
|
+
},
|
|
30
|
+
createEmptyPanelGroup: function() {
|
|
31
|
+
return createEmptyPanelGroup;
|
|
32
|
+
},
|
|
33
|
+
addPanelGroup: function() {
|
|
34
|
+
return addPanelGroup;
|
|
35
|
+
}
|
|
28
36
|
});
|
|
29
37
|
const _core = require("@perses-dev/core");
|
|
30
38
|
const _common = require("./common");
|
|
@@ -67,7 +75,7 @@ function convertLayoutsToPanelGroups(layouts) {
|
|
|
67
75
|
const panelGroups = {};
|
|
68
76
|
const panelGroupIdOrder = [];
|
|
69
77
|
for (const layout of layouts){
|
|
70
|
-
var
|
|
78
|
+
var _layout_spec_display, _layout_spec_display_collapse, _layout_spec_display1;
|
|
71
79
|
const itemLayouts = [];
|
|
72
80
|
const itemPanelKeys = {};
|
|
73
81
|
// Split layout information from panel keys to make it easier to update just layouts on move/resize of panels
|
|
@@ -86,8 +94,8 @@ function convertLayoutsToPanelGroups(layouts) {
|
|
|
86
94
|
const panelGroupId = (0, _common.generateId)();
|
|
87
95
|
panelGroups[panelGroupId] = {
|
|
88
96
|
id: panelGroupId,
|
|
89
|
-
isCollapsed: ((
|
|
90
|
-
title: (
|
|
97
|
+
isCollapsed: ((_layout_spec_display = layout.spec.display) === null || _layout_spec_display === void 0 ? void 0 : (_layout_spec_display_collapse = _layout_spec_display.collapse) === null || _layout_spec_display_collapse === void 0 ? void 0 : _layout_spec_display_collapse.open) === false,
|
|
98
|
+
title: (_layout_spec_display1 = layout.spec.display) === null || _layout_spec_display1 === void 0 ? void 0 : _layout_spec_display1.title,
|
|
91
99
|
itemLayouts,
|
|
92
100
|
itemPanelKeys
|
|
93
101
|
};
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createPanelSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createPanelSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
function createPanelSlice(panels) {
|
|
22
24
|
return ()=>({
|
|
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createSaveChangesDialogSlice", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return createSaveChangesDialogSlice;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
23
|
const createSaveChangesDialogSlice = (set)=>({
|
|
22
24
|
isOpen: false,
|