@perses-dev/dashboards 0.0.0-snapshot-embed-import-errors-8906900 → 0.0.0-snapshot-test-internal-dep-dd238ac
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 +43 -0
- package/dist/cjs/components/AddGroupButton/index.js +28 -0
- package/dist/cjs/components/AddPanelButton/AddPanelButton.js +43 -0
- package/dist/cjs/components/AddPanelButton/index.js +28 -0
- package/dist/cjs/components/Dashboard/Dashboard.js +1 -1
- package/dist/cjs/components/Dashboard/index.js +1 -1
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +49 -22
- package/dist/cjs/components/DashboardToolbar/index.js +1 -1
- package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +9 -31
- package/dist/cjs/components/DeletePanelDialog/index.js +1 -1
- package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -1
- package/dist/cjs/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +2 -1
- package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/cjs/components/DownloadButton/DownloadButton.js +16 -46
- package/dist/cjs/components/DownloadButton/index.js +1 -1
- package/dist/cjs/components/GridLayout/GridContainer.js +2 -1
- package/dist/cjs/components/GridLayout/GridItemContent.js +3 -2
- package/dist/cjs/components/GridLayout/GridLayout.js +6 -8
- package/dist/cjs/components/GridLayout/GridTitle.js +14 -11
- package/dist/cjs/components/GridLayout/index.js +1 -1
- package/dist/cjs/components/Panel/Panel.js +6 -6
- package/dist/cjs/components/Panel/PanelContent.js +3 -2
- package/dist/cjs/components/Panel/PanelHeader.js +26 -8
- package/dist/cjs/components/Panel/index.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/cjs/components/PanelDrawer/index.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +4 -1
- package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/cjs/components/PanelGroupDialog/index.js +1 -1
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +19 -11
- package/dist/cjs/components/TimeRangeControls/index.js +1 -1
- package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/cjs/components/ToolbarIconButton/index.js +1 -1
- package/dist/cjs/components/Variables/EditVariablesButton.js +75 -0
- package/dist/cjs/components/Variables/Variable.js +1 -1
- package/dist/cjs/components/Variables/VariableEditor.js +10 -6
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +6 -7
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/cjs/components/Variables/VariableList.js +45 -111
- package/dist/cjs/components/Variables/index.js +4 -2
- package/dist/cjs/components/Variables/variable-model.js +1 -1
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/{utils/functions.js → constants/grid-layout-config.js} +14 -6
- package/dist/cjs/constants/index.js +29 -0
- package/dist/cjs/constants/user-interface-text.js +61 -0
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +38 -14
- package/dist/cjs/context/DashboardProvider/common.js +1 -1
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +7 -5
- package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +62 -0
- package/dist/cjs/context/DashboardProvider/index.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +9 -38
- package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/cjs/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/cjs/context/DatasourceStoreProvider.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/index.js +1 -1
- package/dist/cjs/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/cjs/context/index.js +1 -1
- package/dist/cjs/context/useDashboard.js +5 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/test/dashboard-provider.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/plugin-registry.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test/testDashboard.js +1 -1
- package/dist/cjs/utils/index.js +28 -0
- package/dist/cjs/utils/panelUtils.js +168 -0
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +5 -2
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +5 -3
- package/dist/cjs/views/ViewDashboard/index.js +1 -1
- package/dist/cjs/views/index.js +1 -1
- package/dist/components/AddGroupButton/AddGroupButton.d.ts +3 -0
- package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -0
- package/dist/components/AddGroupButton/AddGroupButton.js +32 -0
- package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -0
- package/dist/components/AddGroupButton/index.d.ts +2 -0
- package/dist/components/AddGroupButton/index.d.ts.map +1 -0
- package/dist/{utils/functions.js → components/AddGroupButton/index.js} +3 -5
- package/dist/components/AddGroupButton/index.js.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts +3 -0
- package/dist/components/AddPanelButton/AddPanelButton.d.ts.map +1 -0
- package/dist/components/AddPanelButton/AddPanelButton.js +32 -0
- package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -0
- package/dist/components/AddPanelButton/index.d.ts +2 -0
- package/dist/components/AddPanelButton/index.d.ts.map +1 -0
- package/dist/components/AddPanelButton/index.js +15 -0
- package/dist/components/AddPanelButton/index.js.map +1 -0
- package/dist/components/Dashboard/Dashboard.js +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Dashboard/index.js +1 -1
- package/dist/components/Dashboard/index.js.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +50 -23
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/DashboardToolbar/index.js +1 -1
- package/dist/components/DashboardToolbar/index.js.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.d.ts.map +1 -1
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js +8 -25
- package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
- package/dist/components/DeletePanelDialog/index.js +1 -1
- package/dist/components/DeletePanelDialog/index.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -1
- package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js +1 -1
- package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +2 -1
- package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js +1 -1
- package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts +5 -1
- package/dist/components/DownloadButton/DownloadButton.d.ts.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.js +17 -8
- package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
- package/dist/components/DownloadButton/index.js +1 -1
- package/dist/components/DownloadButton/index.js.map +1 -1
- package/dist/components/GridLayout/GridContainer.d.ts.map +1 -1
- package/dist/components/GridLayout/GridContainer.js +2 -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 +3 -2
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +6 -8
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
- package/dist/components/GridLayout/GridTitle.js +14 -11
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/index.js +1 -1
- package/dist/components/GridLayout/index.js.map +1 -1
- package/dist/components/Panel/Panel.js +7 -7
- package/dist/components/Panel/Panel.js.map +1 -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.d.ts +1 -0
- package/dist/components/Panel/PanelHeader.d.ts.map +1 -1
- package/dist/components/Panel/PanelHeader.js +26 -8
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +2 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/index.js +1 -1
- package/dist/components/PanelDrawer/index.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js +4 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
- package/dist/components/PanelGroupDialog/index.js +1 -1
- package/dist/components/PanelGroupDialog/index.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +2 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +21 -13
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/TimeRangeControls/index.js +1 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/components/ToolbarIconButton/index.js +1 -1
- package/dist/components/ToolbarIconButton/index.js.map +1 -1
- package/dist/components/Variables/EditVariablesButton.d.ts +3 -0
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -0
- package/dist/components/Variables/EditVariablesButton.js +64 -0
- package/dist/components/Variables/EditVariablesButton.js.map +1 -0
- package/dist/components/Variables/Variable.js +1 -1
- package/dist/components/Variables/Variable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js +10 -6
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +8 -9
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js +1 -1
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +47 -74
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/Variables/index.d.ts +3 -1
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +4 -2
- package/dist/components/Variables/index.js.map +1 -1
- package/dist/components/Variables/variable-model.js +1 -1
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/constants/grid-layout-config.d.ts +6 -0
- package/dist/constants/grid-layout-config.d.ts.map +1 -0
- package/dist/constants/grid-layout-config.js +19 -0
- package/dist/constants/grid-layout-config.js.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +16 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/user-interface-text.d.ts +30 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -0
- package/dist/constants/user-interface-text.js +49 -0
- package/dist/constants/user-interface-text.js.map +1 -0
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +6 -4
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +38 -9
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.js +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +1 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +7 -5
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js +1 -1
- package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
- package/dist/context/DashboardProvider/duplicate-panel-slice.d.ts +19 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.js +58 -0
- package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -0
- package/dist/context/DashboardProvider/index.d.ts +1 -1
- package/dist/context/DashboardProvider/index.d.ts.map +1 -1
- package/dist/context/DashboardProvider/index.js +1 -1
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts +4 -0
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js +7 -36
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +1 -1
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +1 -1
- package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
- package/dist/context/TemplateVariableProvider/index.js +1 -1
- package/dist/context/TemplateVariableProvider/index.js.map +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js +1 -1
- package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
- package/dist/context/index.js +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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/test/dashboard-provider.js +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/plugin-registry.js +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/testDashboard.js +1 -1
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/panelUtils.d.ts +27 -0
- package/dist/utils/panelUtils.d.ts.map +1 -0
- package/dist/utils/panelUtils.js +174 -0
- package/dist/utils/panelUtils.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 +5 -2
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +2 -0
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +5 -3
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/dist/views/ViewDashboard/index.js +1 -1
- package/dist/views/ViewDashboard/index.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/cjs/components/Panel/Panel.test.js +0 -129
- package/dist/cjs/components/PanelDrawer/PanelDrawer.test.js +0 -131
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.test.js +0 -87
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.test.js +0 -95
- package/dist/cjs/components/Variables/variable-model.test.js +0 -106
- package/dist/cjs/context/TemplateVariableProvider/query-params.test.js +0 -82
- package/dist/cjs/views/ViewDashboard/tests/panelGroups.test.js +0 -110
- package/dist/components/Panel/Panel.test.d.ts +0 -2
- package/dist/components/Panel/Panel.test.d.ts.map +0 -1
- package/dist/components/Panel/Panel.test.js +0 -122
- package/dist/components/Panel/Panel.test.js.map +0 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.d.ts +0 -2
- package/dist/components/PanelDrawer/PanelDrawer.test.d.ts.map +0 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.js +0 -124
- package/dist/components/PanelDrawer/PanelDrawer.test.js.map +0 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.d.ts +0 -2
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.d.ts.map +0 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js +0 -80
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js.map +0 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.d.ts +0 -2
- package/dist/components/TimeRangeControls/TimeRangeControls.test.d.ts.map +0 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js +0 -88
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js.map +0 -1
- package/dist/components/Variables/variable-model.test.d.ts +0 -2
- package/dist/components/Variables/variable-model.test.d.ts.map +0 -1
- package/dist/components/Variables/variable-model.test.js +0 -104
- package/dist/components/Variables/variable-model.test.js.map +0 -1
- package/dist/context/TemplateVariableProvider/query-params.test.d.ts +0 -2
- package/dist/context/TemplateVariableProvider/query-params.test.d.ts.map +0 -1
- package/dist/context/TemplateVariableProvider/query-params.test.js +0 -80
- package/dist/context/TemplateVariableProvider/query-params.test.js.map +0 -1
- package/dist/utils/functions.d.ts +0 -2
- package/dist/utils/functions.d.ts.map +0 -1
- package/dist/utils/functions.js.map +0 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts +0 -2
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts.map +0 -1
- package/dist/views/ViewDashboard/tests/panelGroups.test.js +0 -103
- package/dist/views/ViewDashboard/tests/panelGroups.test.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -11,90 +11,63 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import PencilIcon from 'mdi-material-ui/Pencil';
|
|
14
|
+
import { useState } from 'react';
|
|
15
|
+
import { AppBar, Box, IconButton, useScrollTrigger } from '@mui/material';
|
|
17
16
|
import PinOutline from 'mdi-material-ui/PinOutline';
|
|
18
17
|
import PinOffOutline from 'mdi-material-ui/PinOffOutline';
|
|
19
|
-
import {
|
|
20
|
-
import { useTemplateVariableDefinitions, useEditMode, useTemplateVariableActions } from '../../context';
|
|
18
|
+
import { useTemplateVariableDefinitions } from '../../context';
|
|
21
19
|
import { TemplateVariable } from './Variable';
|
|
22
|
-
|
|
20
|
+
const VARIABLE_INPUT_MIN_WIDTH = '120px';
|
|
21
|
+
const VARIABLE_INPUT_MAX_WIDTH = '240px';
|
|
23
22
|
export function TemplateVariableList(props) {
|
|
24
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
25
23
|
const [isPin, setIsPin] = useState(props.initialVariableIsSticky);
|
|
26
24
|
const variableDefinitions = useTemplateVariableDefinitions();
|
|
27
|
-
const { isEditMode } = useEditMode();
|
|
28
|
-
const { setVariableDefinitions } = useTemplateVariableActions();
|
|
29
25
|
const scrollTrigger = useScrollTrigger({
|
|
30
26
|
disableHysteresis: true
|
|
31
27
|
});
|
|
32
28
|
const isSticky = scrollTrigger && props.initialVariableIsSticky && isPin;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
justifyContent: "space-between",
|
|
73
|
-
my: isSticky ? 2 : 0,
|
|
74
|
-
ml: isSticky ? 2 : 0,
|
|
75
|
-
children: [
|
|
76
|
-
/*#__PURE__*/ _jsx(Stack, {
|
|
77
|
-
direction: "row",
|
|
78
|
-
spacing: 1,
|
|
79
|
-
children: variableDefinitions.map((v)=>{
|
|
80
|
-
var ref;
|
|
81
|
-
/*#__PURE__*/ return _jsx(Box, {
|
|
82
|
-
display: ((ref = v.spec.display) === null || ref === void 0 ? void 0 : ref.hidden) ? 'none' : undefined,
|
|
83
|
-
children: /*#__PURE__*/ _jsx(TemplateVariable, {
|
|
84
|
-
name: v.spec.name
|
|
85
|
-
}, v.spec.name)
|
|
86
|
-
}, v.spec.name);
|
|
87
|
-
})
|
|
88
|
-
}),
|
|
89
|
-
props.initialVariableIsSticky && /*#__PURE__*/ _jsx(IconButton, {
|
|
90
|
-
onClick: ()=>setIsPin(!isPin),
|
|
91
|
-
children: isPin ? /*#__PURE__*/ _jsx(PinOutline, {}) : /*#__PURE__*/ _jsx(PinOffOutline, {})
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
})
|
|
29
|
+
return(// marginBottom={-1} counteracts the marginBottom={1} on every variable input.
|
|
30
|
+
// The margin on the inputs is for spacing between inputs, but is not meant to add space to bottom of the container.
|
|
31
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
32
|
+
marginBottom: -1,
|
|
33
|
+
"data-testid": "variable-list",
|
|
34
|
+
children: /*#__PURE__*/ _jsx(AppBar, {
|
|
35
|
+
color: "inherit",
|
|
36
|
+
position: isSticky ? 'fixed' : 'static',
|
|
37
|
+
elevation: isSticky ? 4 : 0,
|
|
38
|
+
sx: {
|
|
39
|
+
backgroundColor: 'inherit',
|
|
40
|
+
...props.sx
|
|
41
|
+
},
|
|
42
|
+
children: /*#__PURE__*/ _jsxs(Box, {
|
|
43
|
+
display: "flex",
|
|
44
|
+
flexWrap: "wrap",
|
|
45
|
+
alignItems: "start",
|
|
46
|
+
my: isSticky ? 2 : 0,
|
|
47
|
+
ml: isSticky ? 2 : 0,
|
|
48
|
+
children: [
|
|
49
|
+
variableDefinitions.map((v)=>{
|
|
50
|
+
var ref;
|
|
51
|
+
/*#__PURE__*/ return _jsx(Box, {
|
|
52
|
+
display: ((ref = v.spec.display) === null || ref === void 0 ? void 0 : ref.hidden) ? 'none' : undefined,
|
|
53
|
+
minWidth: VARIABLE_INPUT_MIN_WIDTH,
|
|
54
|
+
maxWidth: VARIABLE_INPUT_MAX_WIDTH,
|
|
55
|
+
marginBottom: 1,
|
|
56
|
+
marginRight: 1,
|
|
57
|
+
"data-testid": "template-variable",
|
|
58
|
+
children: /*#__PURE__*/ _jsx(TemplateVariable, {
|
|
59
|
+
name: v.spec.name
|
|
60
|
+
}, v.spec.name)
|
|
61
|
+
}, v.spec.name);
|
|
62
|
+
}),
|
|
63
|
+
props.initialVariableIsSticky && /*#__PURE__*/ _jsx(IconButton, {
|
|
64
|
+
onClick: ()=>setIsPin(!isPin),
|
|
65
|
+
children: isPin ? /*#__PURE__*/ _jsx(PinOutline, {}) : /*#__PURE__*/ _jsx(PinOffOutline, {})
|
|
66
|
+
})
|
|
67
|
+
]
|
|
95
68
|
})
|
|
96
|
-
|
|
97
|
-
});
|
|
69
|
+
})
|
|
70
|
+
}));
|
|
98
71
|
}
|
|
99
72
|
|
|
100
73
|
//# sourceMappingURL=VariableList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Variables/VariableList.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Variables/VariableList.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useState } from 'react';\nimport { AppBar, Box, IconButton, SxProps, Theme, useScrollTrigger } from '@mui/material';\nimport PinOutline from 'mdi-material-ui/PinOutline';\nimport PinOffOutline from 'mdi-material-ui/PinOffOutline';\nimport { VariableDefinition } from '@perses-dev/core';\nimport { useTemplateVariableDefinitions } from '../../context';\nimport { TemplateVariable } from './Variable';\n\nconst VARIABLE_INPUT_MIN_WIDTH = '120px';\nconst VARIABLE_INPUT_MAX_WIDTH = '240px';\n\ninterface TemplateVariableListProps {\n initialVariableIsSticky?: boolean;\n sx?: SxProps<Theme>;\n}\n\nexport function TemplateVariableList(props: TemplateVariableListProps) {\n const [isPin, setIsPin] = useState(props.initialVariableIsSticky);\n const variableDefinitions: VariableDefinition[] = useTemplateVariableDefinitions();\n\n const scrollTrigger = useScrollTrigger({ disableHysteresis: true });\n const isSticky = scrollTrigger && props.initialVariableIsSticky && isPin;\n\n return (\n // marginBottom={-1} counteracts the marginBottom={1} on every variable input.\n // The margin on the inputs is for spacing between inputs, but is not meant to add space to bottom of the container.\n <Box marginBottom={-1} data-testid=\"variable-list\">\n <AppBar\n color=\"inherit\"\n position={isSticky ? 'fixed' : 'static'}\n elevation={isSticky ? 4 : 0}\n sx={{ backgroundColor: 'inherit', ...props.sx }}\n >\n <Box display=\"flex\" flexWrap=\"wrap\" alignItems=\"start\" my={isSticky ? 2 : 0} ml={isSticky ? 2 : 0}>\n {variableDefinitions.map((v) => (\n <Box\n key={v.spec.name}\n display={v.spec.display?.hidden ? 'none' : undefined}\n minWidth={VARIABLE_INPUT_MIN_WIDTH}\n maxWidth={VARIABLE_INPUT_MAX_WIDTH}\n marginBottom={1}\n marginRight={1}\n data-testid=\"template-variable\"\n >\n <TemplateVariable key={v.spec.name} name={v.spec.name} />\n </Box>\n ))}\n {props.initialVariableIsSticky && (\n <IconButton onClick={() => setIsPin(!isPin)}>{isPin ? <PinOutline /> : <PinOffOutline />}</IconButton>\n )}\n </Box>\n </AppBar>\n </Box>\n );\n}\n"],"names":["useState","AppBar","Box","IconButton","useScrollTrigger","PinOutline","PinOffOutline","useTemplateVariableDefinitions","TemplateVariable","VARIABLE_INPUT_MIN_WIDTH","VARIABLE_INPUT_MAX_WIDTH","TemplateVariableList","props","isPin","setIsPin","initialVariableIsSticky","variableDefinitions","scrollTrigger","disableHysteresis","isSticky","marginBottom","data-testid","color","position","elevation","sx","backgroundColor","display","flexWrap","alignItems","my","ml","map","v","spec","hidden","undefined","minWidth","maxWidth","marginRight","name","onClick"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,QAAQ,QAAQ,OAAO,CAAC;AACjC,SAASC,MAAM,EAAEC,GAAG,EAAEC,UAAU,EAAkBC,gBAAgB,QAAQ,eAAe,CAAC;AAC1F,OAAOC,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAOC,aAAa,MAAM,+BAA+B,CAAC;AAE1D,SAASC,8BAA8B,QAAQ,eAA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O,cAAdM,GAAc,WAAQ,GAAtBA,KAAAA,CAAsB,GAAtBA,GAAc,CAAEE,MAAM,CAAA,GAAG,MAAM,GAAGC,SAAS;4BACpDC,QAAQ,EAAE5B,wBAAwB;4BAClC6B,QAAQ,EAAE5B,wBAAwB;4BAClCU,YAAY,EAAE,CAAC;4BACfmB,WAAW,EAAE,CAAC;4BACdlB,aAAW,EAAC,mBAAmB;sCAE/B,cAAA,KAACb,gBAAgB;gCAAmBgC,IAAI,EAAEP,CAAC,CAACC,IAAI,CAACM,IAAI;+BAA9BP,CAAC,CAACC,IAAI,CAACM,IAAI,CAAuB;2BARpDP,CAAC,CAACC,IAAI,CAACM,IAAI,CASZ,CAAA;qBACP,CAAC;oBACD5B,KAAK,CAACG,uBAAuB,kBAC5B,KAACZ,UAAU;wBAACsC,OAAO,EAAE,IAAM3B,QAAQ,CAAC,CAACD,KAAK,CAAC;kCAAGA,KAAK,iBAAG,KAACR,UAAU,KAAG,iBAAG,KAACC,aAAa,KAAG;sBAAc,AACvG;;cACG;UACC;MACL,EACN;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Variables/index.tsx"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Variables/index.tsx"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
+
export * from './EditVariablesButton';
|
|
13
14
|
export * from './Variable';
|
|
14
|
-
export * from './
|
|
15
|
+
export * from './VariableEditor';
|
|
15
16
|
export * from './VariableEditorForm';
|
|
17
|
+
export * from './VariableList';
|
|
16
18
|
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Variables/index.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Variables/index.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './EditVariablesButton';\nexport * from './Variable';\nexport * from './VariableEditor';\nexport * from './VariableEditorForm';\nexport * from './VariableList';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Variables/variable-model.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Variables/variable-model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ListVariableDefinition } from '@perses-dev/core';\nimport {\n useDatasourceStore,\n usePlugin,\n useTemplateVariableValues,\n useTimeRange,\n VariableOption,\n VariableStateMap,\n} from '@perses-dev/plugin-system';\nimport { useQuery } from '@tanstack/react-query';\n\nexport function filterVariableList(data: VariableOption[], capturedRegexp: RegExp): VariableOption[] {\n const result: VariableOption[] = [];\n const filteredSet = new Set<string>();\n for (const variableValue of data) {\n const matches = variableValue.value.matchAll(capturedRegexp);\n let concat = '';\n for (const match of matches) {\n for (let i = 1; i < match.length; i++) {\n const m = match[i];\n if (m !== undefined) {\n concat = `${concat}${m}`;\n }\n }\n }\n if (concat !== '' && !filteredSet.has(concat)) {\n // like that we are avoiding to have duplicating variable value\n filteredSet.add(concat);\n result.push({ label: variableValue.label, value: concat });\n }\n }\n return result;\n}\n\nexport function useListVariablePluginValues(definition: ListVariableDefinition) {\n const { data: variablePlugin } = usePlugin('Variable', definition.spec.plugin.kind);\n const datasourceStore = useDatasourceStore();\n const allVariables = useTemplateVariableValues();\n const { absoluteTimeRange: timeRange, refreshKey } = useTimeRange();\n\n const variablePluginCtx = { timeRange, datasourceStore, variables: allVariables };\n\n const spec = definition.spec.plugin.spec;\n const capturingRegexp =\n definition.spec.capturing_regexp !== undefined ? new RegExp(definition.spec.capturing_regexp, 'g') : undefined;\n\n let dependsOnVariables: string[] | undefined;\n if (variablePlugin?.dependsOn) {\n const dependencies = variablePlugin.dependsOn(spec, variablePluginCtx);\n dependsOnVariables = dependencies.variables;\n }\n\n const variables = useTemplateVariableValues(dependsOnVariables);\n\n let waitToLoad = false;\n if (dependsOnVariables) {\n waitToLoad = dependsOnVariables.some((v) => variables[v]?.loading);\n }\n\n const variablesValueKey = getVariableValuesKey(variables);\n\n return useQuery(\n [name, definition, variablesValueKey, timeRange, refreshKey],\n async () => {\n const resp = await variablePlugin?.getVariableOptions(spec, { datasourceStore, variables, timeRange });\n if (resp === undefined) {\n return [];\n }\n if (capturingRegexp === undefined) {\n return resp.data;\n }\n return filterVariableList(resp.data, capturingRegexp);\n },\n { enabled: !!variablePlugin || waitToLoad }\n );\n}\n\n/**\n * Returns a serialized string of the current state of variable values.\n */\nexport function getVariableValuesKey(v: VariableStateMap) {\n return Object.values(v)\n .map((v) => JSON.stringify(v.value))\n .join(',');\n}\n\nexport const VARIABLE_TYPES = [\n { label: 'List', kind: 'ListVariable' },\n { label: 'Text', kind: 'TextVariable' },\n] as const;\n"],"names":["useDatasourceStore","usePlugin","useTemplateVariableValues","useTimeRange","useQuery","filterVariableList","data","capturedRegexp","result","filteredSet","Set","variableValue","matches","value","matchAll","concat","match","i","length","m","undefined","has","add","push","label","useListVariablePluginValues","definition","variablePlugin","spec","plugin","kind","datasourceStore","allVariables","absoluteTimeRange","timeRange","refreshKey","variablePluginCtx","variables","capturingRegexp","capturing_regexp","RegExp","dependsOnVariables","dependsOn","dependencies","waitToLoad","some","v","loading","variablesValueKey","getVariableValuesKey","name","resp","getVariableOptions","enabled","Object","values","map","JSON","stringify","join","VARIABLE_TYPES"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SACEA,kBAAkB,EAClBC,SAAS,EACTC,yBAAyB,EACzBC,YAAY,QAGP,2BAA2B,CAAC;AACnC,SAASC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oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
+
export * from './AddGroupButton';
|
|
14
|
+
export * from './AddPanelButton';
|
|
13
15
|
export * from './Dashboard';
|
|
14
16
|
export * from './DashboardToolbar';
|
|
15
17
|
export * from './DeletePanelDialog';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AddGroupButton';\nexport * from './AddPanelButton';\nexport * from './Dashboard';\nexport * from './DashboardToolbar';\nexport * from './DeletePanelDialog';\nexport * from './DeletePanelGroupDialog';\nexport * from './DiscardChangesConfirmationDialog';\nexport * from './DownloadButton';\nexport * from './GridLayout';\nexport * from './Panel';\nexport * from './PanelDrawer';\nexport * from './PanelGroupDialog';\nexport * from './TimeRangeControls';\nexport * from './ToolbarIconButton';\nexport * from './Variables';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-layout-config.d.ts","sourceRoot":"","sources":["../../src/constants/grid-layout-config.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,gBAAgB;;;CAA8B,CAAC;AAE5D,eAAO,MAAM,4BAA4B,MAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export const GRID_LAYOUT_COLS = {
|
|
14
|
+
sm: 24,
|
|
15
|
+
xxs: 2
|
|
16
|
+
};
|
|
17
|
+
export const GRID_LAYOUT_SMALL_BREAKPOINT = 'sm';
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=grid-layout-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/constants/grid-layout-config.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const GRID_LAYOUT_COLS = { sm: 24, xxs: 2 } as const;\n\nexport const GRID_LAYOUT_SMALL_BREAKPOINT = 'sm' as const;\n"],"names":["GRID_LAYOUT_COLS","sm","xxs","GRID_LAYOUT_SMALL_BREAKPOINT"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAMA,gBAAgB,GAAG;IAAEC,EAAE,EAAE,EAAE;IAAEC,GAAG,EAAE,CAAC;CAAE,AAAS,CAAC;AAE5D,OAAO,MAAMC,4BAA4B,GAAG,IAAI,AAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAaA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './grid-layout-config';
|
|
14
|
+
export * from './user-interface-text';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/constants/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './grid-layout-config';\nexport * from './user-interface-text';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const TOOLTIP_TEXT: {
|
|
2
|
+
addPanel: string;
|
|
3
|
+
addGroup: string;
|
|
4
|
+
downloadDashboard: string;
|
|
5
|
+
editVariables: string;
|
|
6
|
+
refreshDashboard: string;
|
|
7
|
+
addPanelToGroup: string;
|
|
8
|
+
deleteGroup: string;
|
|
9
|
+
editGroup: string;
|
|
10
|
+
moveGroupDown: string;
|
|
11
|
+
moveGroupUp: string;
|
|
12
|
+
editPanel: string;
|
|
13
|
+
duplicatePanel: string;
|
|
14
|
+
deletePanel: string;
|
|
15
|
+
movePanel: string;
|
|
16
|
+
refreshVariableValues: string;
|
|
17
|
+
copyVariableValues: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const ARIA_LABEL_TEXT: {
|
|
20
|
+
addPanelToGroup: (groupName: string) => string;
|
|
21
|
+
deleteGroup: (groupName: string) => string;
|
|
22
|
+
editGroup: (groupName: string) => string;
|
|
23
|
+
moveGroupDown: (groupName: string) => string;
|
|
24
|
+
moveGroupUp: (groupName: string) => string;
|
|
25
|
+
editPanel: (panelName: string) => string;
|
|
26
|
+
duplicatePanel: (panelName: string) => string;
|
|
27
|
+
deletePanel: (panelName: string) => string;
|
|
28
|
+
movePanel: (panelName: string) => string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=user-interface-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-interface-text.d.ts","sourceRoot":"","sources":["../../src/constants/user-interface-text.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAqBxB,CAAC;AAEF,eAAO,MAAM,eAAe;iCAEG,MAAM;6BACV,MAAM;2BACR,MAAM;+BACF,MAAM;6BACR,MAAM;2BAER,MAAM;gCACD,MAAM;6BACT,MAAM;2BACR,MAAM;CAC9B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export const TOOLTIP_TEXT = {
|
|
14
|
+
// Toolbar buttons
|
|
15
|
+
addPanel: 'Add panel',
|
|
16
|
+
addGroup: 'Add panel group',
|
|
17
|
+
downloadDashboard: 'Download JSON',
|
|
18
|
+
editVariables: 'Edit variables',
|
|
19
|
+
refreshDashboard: 'Refresh dashboard',
|
|
20
|
+
// Group buttons
|
|
21
|
+
addPanelToGroup: 'Add panel to group',
|
|
22
|
+
deleteGroup: 'Delete group',
|
|
23
|
+
editGroup: 'Edit group',
|
|
24
|
+
moveGroupDown: 'Move group down',
|
|
25
|
+
moveGroupUp: 'Move group up',
|
|
26
|
+
// Panel buttons
|
|
27
|
+
editPanel: 'Edit',
|
|
28
|
+
duplicatePanel: 'Duplicate',
|
|
29
|
+
deletePanel: 'Delete',
|
|
30
|
+
movePanel: 'Move',
|
|
31
|
+
// Variable editor buttons
|
|
32
|
+
refreshVariableValues: 'Refresh values',
|
|
33
|
+
copyVariableValues: 'Copy values to clipboard'
|
|
34
|
+
};
|
|
35
|
+
export const ARIA_LABEL_TEXT = {
|
|
36
|
+
// Group buttons
|
|
37
|
+
addPanelToGroup: (groupName)=>`add panel to group ${groupName}`,
|
|
38
|
+
deleteGroup: (groupName)=>`delete group ${groupName}`,
|
|
39
|
+
editGroup: (groupName)=>`edit group ${groupName}`,
|
|
40
|
+
moveGroupDown: (groupName)=>`move group ${groupName} down`,
|
|
41
|
+
moveGroupUp: (groupName)=>`move group ${groupName} up`,
|
|
42
|
+
// Panel buttons
|
|
43
|
+
editPanel: (panelName)=>`edit panel ${panelName}`,
|
|
44
|
+
duplicatePanel: (panelName)=>`duplicate panel ${panelName}`,
|
|
45
|
+
deletePanel: (panelName)=>`delete panel ${panelName}`,
|
|
46
|
+
movePanel: (panelName)=>`move panel ${panelName}`
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=user-interface-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/constants/user-interface-text.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const TOOLTIP_TEXT = {\n // Toolbar buttons\n addPanel: 'Add panel',\n addGroup: 'Add panel group',\n downloadDashboard: 'Download JSON',\n editVariables: 'Edit variables',\n refreshDashboard: 'Refresh dashboard',\n // Group buttons\n addPanelToGroup: 'Add panel to group',\n deleteGroup: 'Delete group',\n editGroup: 'Edit group',\n moveGroupDown: 'Move group down',\n moveGroupUp: 'Move group up',\n // Panel buttons\n editPanel: 'Edit',\n duplicatePanel: 'Duplicate',\n deletePanel: 'Delete',\n movePanel: 'Move',\n // Variable editor buttons\n refreshVariableValues: 'Refresh values',\n copyVariableValues: 'Copy values to clipboard',\n};\n\nexport const ARIA_LABEL_TEXT = {\n // Group buttons\n addPanelToGroup: (groupName: string) => `add panel to group ${groupName}`,\n deleteGroup: (groupName: string) => `delete group ${groupName}`,\n editGroup: (groupName: string) => `edit group ${groupName}`,\n moveGroupDown: (groupName: string) => `move group ${groupName} down`,\n moveGroupUp: (groupName: string) => `move group ${groupName} up`,\n // Panel buttons\n editPanel: (panelName: string) => `edit panel ${panelName}`,\n duplicatePanel: (panelName: string) => `duplicate panel ${panelName}`,\n deletePanel: (panelName: string) => `delete panel ${panelName}`,\n movePanel: (panelName: string) => `move panel ${panelName}`,\n};\n"],"names":["TOOLTIP_TEXT","addPanel","addGroup","downloadDashboard","editVariables","refreshDashboard","addPanelToGroup","deleteGroup","editGroup","moveGroupDown","moveGroupUp","editPanel","duplicatePanel","deletePanel","movePanel","refreshVariableValues","copyVariableValues","ARIA_LABEL_TEXT","groupName","panelName"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAMA,YAAY,GAAG;IAC1B,kBAAkB;IAClBC,QAAQ,EAAE,WAAW;IACrBC,QAAQ,EAAE,iBAAiB;IAC3B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 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { StoreApi } from 'zustand';
|
|
3
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { DashboardResource, Display, ProjectMetadata, RelativeTimeRange } from '@perses-dev/core';
|
|
4
4
|
import { PanelGroupEditorSlice } from './panel-group-editor-slice';
|
|
5
5
|
import { PanelGroupSlice } from './panel-group-slice';
|
|
6
6
|
import { PanelEditorSlice } from './panel-editor-slice';
|
|
@@ -8,12 +8,14 @@ import { PanelSlice } from './panel-slice';
|
|
|
8
8
|
import { DeletePanelGroupSlice } from './delete-panel-group-slice';
|
|
9
9
|
import { DeletePanelSlice } from './delete-panel-slice';
|
|
10
10
|
import { DiscardChangesConfirmationDialogSlice } from './discard-changes-dialog-slice';
|
|
11
|
-
|
|
11
|
+
import { DuplicatePanelSlice } from './duplicate-panel-slice';
|
|
12
|
+
export interface DashboardStoreState extends PanelGroupSlice, PanelSlice, PanelGroupEditorSlice, DeletePanelGroupSlice, PanelEditorSlice, DeletePanelSlice, DiscardChangesConfirmationDialogSlice, DuplicatePanelSlice {
|
|
12
13
|
isEditMode: boolean;
|
|
13
14
|
setEditMode: (isEditMode: boolean) => void;
|
|
14
15
|
defaultTimeRange: RelativeTimeRange;
|
|
15
16
|
setDashboard: (dashboard: DashboardResource) => void;
|
|
16
17
|
metadata: ProjectMetadata;
|
|
18
|
+
display?: Display;
|
|
17
19
|
}
|
|
18
20
|
export interface DashboardStoreProps {
|
|
19
21
|
dashboardResource: DashboardResource;
|
|
@@ -21,7 +23,7 @@ export interface DashboardStoreProps {
|
|
|
21
23
|
}
|
|
22
24
|
export interface DashboardProviderProps {
|
|
23
25
|
initialState: DashboardStoreProps;
|
|
24
|
-
children?:
|
|
26
|
+
children?: ReactNode;
|
|
25
27
|
}
|
|
26
28
|
export declare const DashboardContext: import("react").Context<StoreApi<DashboardStoreState> | undefined>;
|
|
27
29
|
export declare function useDashboardStore<T>(selector: (state: DashboardStoreState) => T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardProvider.d.ts","sourceRoot":"","sources":["../../../src/context/DashboardProvider/DashboardProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardProvider.d.ts","sourceRoot":"","sources":["../../../src/context/DashboardProvider/DashboardProvider.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,EAAiB,SAAS,EAAgD,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAA+B,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAAsD,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EAA0B,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAoB,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAA+B,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAChG,OAAO,EAA0B,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAmC,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AACxH,OAAO,EAA6B,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,MAAM,WAAW,mBACf,SAAQ,eAAe,EACrB,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,qCAAqC,EACrC,mBAAmB;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,YAAY,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACrD,QAAQ,EAAE,eAAe,CAAC;IAC1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