@perses-dev/dashboards 0.51.0-beta.0 → 0.51.0-beta.1

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.
Files changed (57) hide show
  1. package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +21 -9
  2. package/dist/cjs/context/VariableProvider/VariableProvider.js +16 -20
  3. package/dist/cjs/test/datasource-provider.js +1 -1
  4. package/dist/components/Datasources/DatasourceEditor.js.map +1 -1
  5. package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
  6. package/dist/components/GridLayout/GridContainer.js.map +1 -1
  7. package/dist/components/GridLayout/GridLayout.js.map +1 -1
  8. package/dist/components/GridLayout/GridTitle.js.map +1 -1
  9. package/dist/components/Panel/HeaderIconButton.d.ts +1 -1
  10. package/dist/components/Panel/HeaderIconButton.d.ts.map +1 -1
  11. package/dist/components/Panel/Panel.js.map +1 -1
  12. package/dist/components/Panel/PanelHeader.js.map +1 -1
  13. package/dist/components/Panel/PanelLinks.js.map +1 -1
  14. package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
  15. package/dist/components/PanelDrawer/PanelEditorForm.js +21 -9
  16. package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
  17. package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
  18. package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
  19. package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -1
  20. package/dist/components/Variables/Variable.js.map +1 -1
  21. package/dist/components/Variables/VariableEditor.js.map +1 -1
  22. package/dist/components/Variables/VariableList.js.map +1 -1
  23. package/dist/constants/user-interface-text.js.map +1 -1
  24. package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
  25. package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
  26. package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
  27. package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
  28. package/dist/context/DashboardProvider/panel-group-slice.d.ts +1 -1
  29. package/dist/context/DashboardProvider/panel-group-slice.d.ts.map +1 -1
  30. package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
  31. package/dist/context/DatasourceStoreProvider.js.map +1 -1
  32. package/dist/context/VariableProvider/VariableProvider.d.ts.map +1 -1
  33. package/dist/context/VariableProvider/VariableProvider.js +13 -12
  34. package/dist/context/VariableProvider/VariableProvider.js.map +1 -1
  35. package/dist/context/VariableProvider/query-params.js.map +1 -1
  36. package/dist/context/useDashboard.js.map +1 -1
  37. package/dist/test/datasource-provider.d.ts +1 -1
  38. package/dist/test/datasource-provider.d.ts.map +1 -1
  39. package/dist/test/datasource-provider.js +1 -1
  40. package/dist/test/datasource-provider.js.map +1 -1
  41. package/dist/utils/panelUtils.js.map +1 -1
  42. package/package.json +8 -9
  43. package/dist/cjs/stories/decorators/WithDashboard.js +0 -41
  44. package/dist/cjs/stories/decorators/WithDatasourceStore.js +0 -39
  45. package/dist/cjs/stories/decorators/WithVariables.js +0 -37
  46. package/dist/cjs/stories/decorators/constants.js +0 -39
  47. package/dist/cjs/stories/decorators/index.js +0 -33
  48. package/dist/stories/decorators/WithDashboard.js +0 -33
  49. package/dist/stories/decorators/WithDashboard.js.map +0 -1
  50. package/dist/stories/decorators/WithDatasourceStore.js +0 -31
  51. package/dist/stories/decorators/WithDatasourceStore.js.map +0 -1
  52. package/dist/stories/decorators/WithVariables.js +0 -29
  53. package/dist/stories/decorators/WithVariables.js.map +0 -1
  54. package/dist/stories/decorators/constants.js +0 -31
  55. package/dist/stories/decorators/constants.js.map +0 -1
  56. package/dist/stories/decorators/index.js +0 -18
  57. package/dist/stories/decorators/index.js.map +0 -1
@@ -1,31 +0,0 @@
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
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { DatasourceStoreProvider } from '@perses-dev/dashboards';
15
- import { defaultDatasourceProps } from '../../test';
16
- // Type guard because storybook types parameters as `any`
17
- function isWithDatasourceStoreParameter(parameter) {
18
- return !!parameter && typeof parameter === 'object' && 'props' in parameter;
19
- }
20
- export const WithDatasourceStore = (Story, context)=>{
21
- const initParameter = context.parameters.withDatasourceStore;
22
- const parameter = isWithDatasourceStoreParameter(initParameter) ? initParameter : undefined;
23
- const props = parameter?.props;
24
- return /*#__PURE__*/ _jsx(DatasourceStoreProvider, {
25
- ...defaultDatasourceProps,
26
- ...props,
27
- children: /*#__PURE__*/ _jsx(Story, {})
28
- });
29
- };
30
-
31
- //# sourceMappingURL=WithDatasourceStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/stories/decorators/WithDatasourceStore.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 { StoryFn, StoryContext } from '@storybook/react';\nimport { DatasourceStoreProvider, DatasourceStoreProviderProps } from '@perses-dev/dashboards';\nimport { ReactElement } from 'react';\nimport { defaultDatasourceProps } from '../../test';\n\ndeclare module '@storybook/react' {\n interface Parameters {\n withDatasourceStore?: WithDatasourceStoreParameter;\n }\n}\n\nexport type WithDatasourceStoreParameter = {\n props: Partial<DatasourceStoreProviderProps>;\n};\n\n// Type guard because storybook types parameters as `any`\nfunction isWithDatasourceStoreParameter(\n parameter: unknown | WithDatasourceStoreParameter\n): parameter is WithDatasourceStoreParameter {\n return !!parameter && typeof parameter === 'object' && 'props' in parameter;\n}\n\nexport const WithDatasourceStore = (Story: StoryFn, context: StoryContext<unknown>): ReactElement => {\n const initParameter = context.parameters.withDatasourceStore;\n const parameter = isWithDatasourceStoreParameter(initParameter) ? initParameter : undefined;\n const props = parameter?.props;\n\n return (\n <DatasourceStoreProvider {...defaultDatasourceProps} {...props}>\n <Story />\n </DatasourceStoreProvider>\n );\n};\n"],"names":["DatasourceStoreProvider","defaultDatasourceProps","isWithDatasourceStoreParameter","parameter","WithDatasourceStore","Story","context","initParameter","parameters","withDatasourceStore","undefined","props"],"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,SAASA,uBAAuB,QAAsC,yBAAyB;AAE/F,SAASC,sBAAsB,QAAQ,aAAa;AAYpD,yDAAyD;AACzD,SAASC,+BACPC,SAAiD;IAEjD,OAAO,CAAC,CAACA,aAAa,OAAOA,cAAc,YAAY,WAAWA;AACpE;AAEA,OAAO,MAAMC,sBAAsB,CAACC,OAAgBC;IAClD,MAAMC,gBAAgBD,QAAQE,UAAU,CAACC,mBAAmB;IAC5D,MAAMN,YAAYD,+BAA+BK,iBAAiBA,gBAAgBG;IAClF,MAAMC,QAAQR,WAAWQ;IAEzB,qBACE,KAACX;QAAyB,GAAGC,sBAAsB;QAAG,GAAGU,KAAK;kBAC5D,cAAA,KAACN;;AAGP,EAAE"}
@@ -1,29 +0,0 @@
1
- // Copyright 2024 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
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { VariableProvider } from '@perses-dev/dashboards';
15
- // Type guard because storybook types parameters as `any`
16
- function isWithVariableParameter(parameter) {
17
- return !!parameter && typeof parameter === 'object' && 'props' in parameter;
18
- }
19
- export const WithVariables = (Story, context)=>{
20
- const initParameter = context.parameters.withVariables;
21
- const parameter = isWithVariableParameter(initParameter) ? initParameter : undefined;
22
- const props = parameter?.props;
23
- return /*#__PURE__*/ _jsx(VariableProvider, {
24
- ...props,
25
- children: /*#__PURE__*/ _jsx(Story, {})
26
- });
27
- };
28
-
29
- //# sourceMappingURL=WithVariables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/stories/decorators/WithVariables.tsx"],"sourcesContent":["// Copyright 2024 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 { StoryFn, StoryContext } from '@storybook/react';\nimport { VariableProvider, VariableProviderProps } from '@perses-dev/dashboards';\nimport { ReactElement } from 'react';\n\ndeclare module '@storybook/react' {\n interface Parameters {\n withVariables?: WithVariableParameter;\n }\n}\n\nexport type WithVariableParameter = {\n props: Partial<VariableProviderProps>;\n};\n\n// Type guard because storybook types parameters as `any`\nfunction isWithVariableParameter(parameter: unknown | WithVariableParameter): parameter is WithVariableParameter {\n return !!parameter && typeof parameter === 'object' && 'props' in parameter;\n}\n\nexport const WithVariables = (Story: StoryFn, context: StoryContext<unknown>): ReactElement => {\n const initParameter = context.parameters.withVariables;\n const parameter = isWithVariableParameter(initParameter) ? initParameter : undefined;\n const props = parameter?.props;\n\n return (\n <VariableProvider {...props}>\n <Story />\n </VariableProvider>\n );\n};\n"],"names":["VariableProvider","isWithVariableParameter","parameter","WithVariables","Story","context","initParameter","parameters","withVariables","undefined","props"],"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,SAASA,gBAAgB,QAA+B,yBAAyB;AAajF,yDAAyD;AACzD,SAASC,wBAAwBC,SAA0C;IACzE,OAAO,CAAC,CAACA,aAAa,OAAOA,cAAc,YAAY,WAAWA;AACpE;AAEA,OAAO,MAAMC,gBAAgB,CAACC,OAAgBC;IAC5C,MAAMC,gBAAgBD,QAAQE,UAAU,CAACC,aAAa;IACtD,MAAMN,YAAYD,wBAAwBK,iBAAiBA,gBAAgBG;IAC3E,MAAMC,QAAQR,WAAWQ;IAEzB,qBACE,KAACV;QAAkB,GAAGU,KAAK;kBACzB,cAAA,KAACN;;AAGP,EAAE"}
@@ -1,31 +0,0 @@
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 EMPTY_DASHBOARD_RESOURCE = {
14
- kind: 'Dashboard',
15
- metadata: {
16
- name: 'My Dashboard',
17
- project: 'Storybook',
18
- createdAt: '2021-11-09T00:00:00Z',
19
- updatedAt: '2021-11-09T00:00:00Z',
20
- version: 0
21
- },
22
- spec: {
23
- duration: '1h',
24
- refreshInterval: '0s',
25
- variables: [],
26
- layouts: [],
27
- panels: {}
28
- }
29
- };
30
-
31
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/stories/decorators/constants.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 { DashboardResource } from '@perses-dev/core';\n\nexport const EMPTY_DASHBOARD_RESOURCE: DashboardResource = {\n kind: 'Dashboard',\n metadata: {\n name: 'My Dashboard',\n project: 'Storybook',\n createdAt: '2021-11-09T00:00:00Z',\n updatedAt: '2021-11-09T00:00:00Z',\n version: 0,\n },\n spec: {\n duration: '1h',\n refreshInterval: '0s',\n variables: [],\n layouts: [],\n panels: {},\n },\n};\n"],"names":["EMPTY_DASHBOARD_RESOURCE","kind","metadata","name","project","createdAt","updatedAt","version","spec","duration","refreshInterval","variables","layouts","panels"],"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;AAIjC,OAAO,MAAMA,2BAA8C;IACzDC,MAAM;IACNC,UAAU;QACRC,MAAM;QACNC,SAAS;QACTC,WAAW;QACXC,WAAW;QACXC,SAAS;IACX;IACAC,MAAM;QACJC,UAAU;QACVC,iBAAiB;QACjBC,WAAW,EAAE;QACbC,SAAS,EAAE;QACXC,QAAQ,CAAC;IACX;AACF,EAAE"}
@@ -1,18 +0,0 @@
1
- // Copyright 2024 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 './constants';
14
- export * from './WithDashboard';
15
- export * from './WithDatasourceStore';
16
- export * from './WithVariables';
17
-
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/stories/decorators/index.ts"],"sourcesContent":["// Copyright 2024 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 './constants';\nexport * from './WithDashboard';\nexport * from './WithDatasourceStore';\nexport * from './WithVariables';\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,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,kBAAkB"}