@perses-dev/plugin-system 0.51.0-beta.0 → 0.51.0-rc.0

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 (107) hide show
  1. package/dist/cjs/components/DatasourceSelect.js +155 -71
  2. package/dist/cjs/components/MultiQueryEditor/QueryEditorContainer.js +2 -2
  3. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +91 -1
  4. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +11 -7
  5. package/dist/cjs/constants/user-interface-text.js +3 -1
  6. package/dist/cjs/remote/PluginRuntime.js +168 -162
  7. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +13 -0
  8. package/dist/cjs/runtime/plugin-registry.js +13 -4
  9. package/dist/cjs/runtime/time-series-queries.js +3 -13
  10. package/dist/cjs/runtime/trace-queries.js +46 -16
  11. package/dist/cjs/{stories/shared-utils/index.js → runtime/utils.js} +21 -12
  12. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
  13. package/dist/components/DatasourceSelect.d.ts +8 -3
  14. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  15. package/dist/components/DatasourceSelect.js +148 -72
  16. package/dist/components/DatasourceSelect.js.map +1 -1
  17. package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
  18. package/dist/components/MultiQueryEditor/QueryEditorContainer.js +1 -1
  19. package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
  20. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  21. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  22. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  23. package/dist/components/PluginRegistry/plugin-indexes.d.ts +1 -1
  24. package/dist/components/PluginRegistry/plugin-indexes.d.ts.map +1 -1
  25. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  26. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +2 -1
  27. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
  28. package/dist/components/TimeRangeControls/TimeRangeControls.js +94 -2
  29. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
  30. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  31. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +11 -7
  32. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  33. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  34. package/dist/components/Variables/variable-model.js.map +1 -1
  35. package/dist/constants/user-interface-text.d.ts +2 -0
  36. package/dist/constants/user-interface-text.d.ts.map +1 -1
  37. package/dist/constants/user-interface-text.js +3 -1
  38. package/dist/constants/user-interface-text.js.map +1 -1
  39. package/dist/model/trace-queries.d.ts +13 -1
  40. package/dist/model/trace-queries.d.ts.map +1 -1
  41. package/dist/model/trace-queries.js.map +1 -1
  42. package/dist/remote/PluginLoaderComponent.js.map +1 -1
  43. package/dist/remote/PluginRuntime.d.ts +0 -1
  44. package/dist/remote/PluginRuntime.d.ts.map +1 -1
  45. package/dist/remote/PluginRuntime.js +169 -160
  46. package/dist/remote/PluginRuntime.js.map +1 -1
  47. package/dist/remote/remotePluginLoader.js.map +1 -1
  48. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  49. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  50. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts +7 -0
  51. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.d.ts.map +1 -1
  52. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js +13 -0
  53. package/dist/runtime/TimeRangeProvider/TimeRangeSettingsProvider.js.map +1 -1
  54. package/dist/runtime/plugin-registry.d.ts +2 -2
  55. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  56. package/dist/runtime/plugin-registry.js +13 -4
  57. package/dist/runtime/plugin-registry.js.map +1 -1
  58. package/dist/runtime/time-series-queries.d.ts.map +1 -1
  59. package/dist/runtime/time-series-queries.js +1 -11
  60. package/dist/runtime/time-series-queries.js.map +1 -1
  61. package/dist/runtime/trace-queries.d.ts.map +1 -1
  62. package/dist/runtime/trace-queries.js +47 -17
  63. package/dist/runtime/trace-queries.js.map +1 -1
  64. package/dist/runtime/utils.d.ts +7 -0
  65. package/dist/runtime/utils.d.ts.map +1 -0
  66. package/dist/{stories/shared-utils/index.js → runtime/utils.js} +12 -2
  67. package/dist/runtime/utils.js.map +1 -0
  68. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  69. package/package.json +7 -9
  70. package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +0 -41
  71. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +0 -34
  72. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +0 -42
  73. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +0 -101
  74. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemVariables.js +0 -42
  75. package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +0 -41
  76. package/dist/cjs/stories/shared-utils/decorators/index.js +0 -35
  77. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +0 -13
  78. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +0 -1
  79. package/dist/stories/shared-utils/decorators/WithDataQueries.js +0 -33
  80. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +0 -1
  81. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +0 -4
  82. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +0 -1
  83. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js +0 -26
  84. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +0 -1
  85. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +0 -13
  86. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +0 -1
  87. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +0 -39
  88. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +0 -1
  89. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +0 -13
  90. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +0 -1
  91. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +0 -95
  92. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +0 -1
  93. package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.d.ts +0 -13
  94. package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.d.ts.map +0 -1
  95. package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.js +0 -39
  96. package/dist/stories/shared-utils/decorators/WithPluginSystemVariables.js.map +0 -1
  97. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +0 -13
  98. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +0 -1
  99. package/dist/stories/shared-utils/decorators/WithTimeRange.js +0 -33
  100. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +0 -1
  101. package/dist/stories/shared-utils/decorators/index.d.ts +0 -7
  102. package/dist/stories/shared-utils/decorators/index.d.ts.map +0 -1
  103. package/dist/stories/shared-utils/decorators/index.js +0 -20
  104. package/dist/stories/shared-utils/decorators/index.js.map +0 -1
  105. package/dist/stories/shared-utils/index.d.ts +0 -2
  106. package/dist/stories/shared-utils/index.d.ts.map +0 -1
  107. package/dist/stories/shared-utils/index.js.map +0 -1
@@ -1,33 +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 { TimeRangeProvider } from '@perses-dev/plugin-system';
15
- // Type guard because storybook types parameters as `any`
16
- function isWithTimeRangeParameter(parameter) {
17
- return !!parameter && typeof parameter === 'object' && 'props' in parameter;
18
- }
19
- export const WithTimeRange = (Story, context)=>{
20
- const initParameter = context.parameters.withTimeRange;
21
- const parameter = isWithTimeRangeParameter(initParameter) ? initParameter : undefined;
22
- const props = parameter?.props;
23
- return /*#__PURE__*/ _jsx(TimeRangeProvider, {
24
- refreshInterval: "0s",
25
- timeRange: {
26
- pastDuration: '1h'
27
- },
28
- ...props,
29
- children: /*#__PURE__*/ _jsx(Story, {})
30
- });
31
- };
32
-
33
- //# sourceMappingURL=WithTimeRange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/stories/shared-utils/decorators/WithTimeRange.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 { TimeRangeProvider, TimeRangeFromQueryProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\n\ndeclare module '@storybook/react' {\n interface Parameters {\n withTimeRange?: WithTimeRangeParameter;\n }\n}\n\nexport type WithTimeRangeParameter = {\n props: Partial<TimeRangeFromQueryProps>;\n};\n\n// Type guard because storybook types parameters as `any`\nfunction isWithTimeRangeParameter(parameter: unknown | WithTimeRangeParameter): parameter is WithTimeRangeParameter {\n return !!parameter && typeof parameter === 'object' && 'props' in parameter;\n}\n\nexport const WithTimeRange = (Story: StoryFn, context: StoryContext<unknown>): ReactElement => {\n const initParameter = context.parameters.withTimeRange;\n const parameter = isWithTimeRangeParameter(initParameter) ? initParameter : undefined;\n const props = parameter?.props;\n\n return (\n <TimeRangeProvider refreshInterval=\"0s\" timeRange={{ pastDuration: '1h' }} {...props}>\n <Story />\n </TimeRangeProvider>\n );\n};\n"],"names":["TimeRangeProvider","isWithTimeRangeParameter","parameter","WithTimeRange","Story","context","initParameter","parameters","withTimeRange","undefined","props","refreshInterval","timeRange","pastDuration"],"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,iBAAiB,QAAiC,4BAA4B;AAavF,yDAAyD;AACzD,SAASC,yBAAyBC,SAA2C;IAC3E,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,yBAAyBK,iBAAiBA,gBAAgBG;IAC5E,MAAMC,QAAQR,WAAWQ;IAEzB,qBACE,KAACV;QAAkBW,iBAAgB;QAAKC,WAAW;YAAEC,cAAc;QAAK;QAAI,GAAGH,KAAK;kBAClF,cAAA,KAACN;;AAGP,EAAE"}
@@ -1,7 +0,0 @@
1
- export * from './WithDataQueries';
2
- export * from './WithPluginRegistry';
3
- export * from './WithPluginSystemBuiltinVariables';
4
- export * from './WithPluginSystemDatasourceStore';
5
- export * from './WithPluginSystemVariables';
6
- export * from './WithTimeRange';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stories/shared-utils/decorators/index.ts"],"names":[],"mappings":"AAaA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC"}
@@ -1,20 +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 './WithDataQueries';
14
- export * from './WithPluginRegistry';
15
- export * from './WithPluginSystemBuiltinVariables';
16
- export * from './WithPluginSystemDatasourceStore';
17
- export * from './WithPluginSystemVariables';
18
- export * from './WithTimeRange';
19
-
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/stories/shared-utils/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 './WithDataQueries';\nexport * from './WithPluginRegistry';\nexport * from './WithPluginSystemBuiltinVariables';\nexport * from './WithPluginSystemDatasourceStore';\nexport * from './WithPluginSystemVariables';\nexport * from './WithTimeRange';\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,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,qCAAqC;AACnD,cAAc,oCAAoC;AAClD,cAAc,8BAA8B;AAC5C,cAAc,kBAAkB"}
@@ -1,2 +0,0 @@
1
- export * from './decorators';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stories/shared-utils/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/stories/shared-utils/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 './decorators';\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,eAAe"}