@perses-dev/explore 0.0.0-snapshot-scatter-chart-embed-8efdfab → 0.0.0-snapshot-explorer-plugin-c4a7621

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 (80) hide show
  1. package/dist/cjs/components/ExploreManager/ExploreManager.js +109 -0
  2. package/dist/cjs/components/ExploreManager/ExplorerManagerProvider.js +84 -0
  3. package/dist/cjs/components/ExploreManager/ExplorerManagerProviderWithQueryParams.js +45 -0
  4. package/dist/cjs/components/ExploreManager/index.js +32 -0
  5. package/dist/cjs/components/ExploreManager/query-params.js +49 -0
  6. package/dist/cjs/components/ExploreToolbar/ExploreToolbar.js +9 -3
  7. package/dist/cjs/components/{TimeSeriesQueryEditor/index.js → index.js} +3 -2
  8. package/dist/cjs/index.js +1 -0
  9. package/dist/cjs/views/ViewExplore/ViewExplore.js +26 -27
  10. package/dist/cjs/views/ViewExplore/ViewExploreApp.js +7 -22
  11. package/dist/components/ExploreManager/ExploreManager.d.ts +6 -0
  12. package/dist/components/ExploreManager/ExploreManager.d.ts.map +1 -0
  13. package/dist/components/ExploreManager/ExploreManager.js +101 -0
  14. package/dist/components/ExploreManager/ExploreManager.js.map +1 -0
  15. package/dist/components/ExploreManager/ExplorerManagerProvider.d.ts +20 -0
  16. package/dist/components/ExploreManager/ExplorerManagerProvider.d.ts.map +1 -0
  17. package/dist/components/ExploreManager/ExplorerManagerProvider.js +68 -0
  18. package/dist/components/ExploreManager/ExplorerManagerProvider.js.map +1 -0
  19. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.d.ts +7 -0
  20. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.d.ts.map +1 -0
  21. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.js +32 -0
  22. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.js.map +1 -0
  23. package/dist/components/ExploreManager/index.d.ts +4 -0
  24. package/dist/components/ExploreManager/index.d.ts.map +1 -0
  25. package/dist/components/ExploreManager/index.js +17 -0
  26. package/dist/components/ExploreManager/index.js.map +1 -0
  27. package/dist/components/ExploreManager/query-params.d.ts +17 -0
  28. package/dist/components/ExploreManager/query-params.d.ts.map +1 -0
  29. package/dist/components/ExploreManager/query-params.js +34 -0
  30. package/dist/components/ExploreManager/query-params.js.map +1 -0
  31. package/dist/components/ExploreToolbar/ExploreToolbar.d.ts +3 -3
  32. package/dist/components/ExploreToolbar/ExploreToolbar.d.ts.map +1 -1
  33. package/dist/components/ExploreToolbar/ExploreToolbar.js +3 -2
  34. package/dist/components/ExploreToolbar/ExploreToolbar.js.map +1 -1
  35. package/dist/components/index.d.ts +3 -0
  36. package/dist/components/index.d.ts.map +1 -0
  37. package/dist/components/{TimeSeriesQueryEditor/index.js → index.js} +3 -2
  38. package/dist/components/index.js.map +1 -0
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +1 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/test/setup-tests.js.map +1 -1
  44. package/dist/views/ViewExplore/ViewExplore.d.ts +5 -7
  45. package/dist/views/ViewExplore/ViewExplore.d.ts.map +1 -1
  46. package/dist/views/ViewExplore/ViewExplore.js +22 -28
  47. package/dist/views/ViewExplore/ViewExplore.js.map +1 -1
  48. package/dist/views/ViewExplore/ViewExploreApp.d.ts +3 -3
  49. package/dist/views/ViewExplore/ViewExploreApp.d.ts.map +1 -1
  50. package/dist/views/ViewExplore/ViewExploreApp.js +7 -22
  51. package/dist/views/ViewExplore/ViewExploreApp.js.map +1 -1
  52. package/package.json +16 -13
  53. package/dist/cjs/components/PanelEditor/PanelEditorForm.js +0 -138
  54. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +0 -51
  55. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +0 -96
  56. package/dist/cjs/context/usePanelEditor.js +0 -89
  57. package/dist/cjs/context/useTimeSeriesQueryEditorActions.js +0 -132
  58. package/dist/components/PanelEditor/PanelEditorForm.d.ts +0 -15
  59. package/dist/components/PanelEditor/PanelEditorForm.d.ts.map +0 -1
  60. package/dist/components/PanelEditor/PanelEditorForm.js +0 -125
  61. package/dist/components/PanelEditor/PanelEditorForm.js.map +0 -1
  62. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +0 -12
  63. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +0 -1
  64. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +0 -43
  65. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +0 -1
  66. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +0 -12
  67. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +0 -1
  68. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +0 -83
  69. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +0 -1
  70. package/dist/components/TimeSeriesQueryEditor/index.d.ts +0 -2
  71. package/dist/components/TimeSeriesQueryEditor/index.d.ts.map +0 -1
  72. package/dist/components/TimeSeriesQueryEditor/index.js.map +0 -1
  73. package/dist/context/usePanelEditor.d.ts +0 -15
  74. package/dist/context/usePanelEditor.d.ts.map +0 -1
  75. package/dist/context/usePanelEditor.js +0 -84
  76. package/dist/context/usePanelEditor.js.map +0 -1
  77. package/dist/context/useTimeSeriesQueryEditorActions.d.ts +0 -14
  78. package/dist/context/useTimeSeriesQueryEditorActions.d.ts.map +0 -1
  79. package/dist/context/useTimeSeriesQueryEditorActions.js +0 -119
  80. package/dist/context/useTimeSeriesQueryEditorActions.js.map +0 -1
@@ -0,0 +1,68 @@
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 { createContext, useContext, useState } from 'react';
15
+ const ExplorerManagerContext = /*#__PURE__*/ createContext(undefined);
16
+ export function ExplorerManagerProvider({ children, store: externalStore }) {
17
+ // cache the state of currently not rendered explore UIs
18
+ const [explorerStateCache, setExplorerStateCache] = useState({});
19
+ // local store in case external store is not provided by prop
20
+ const localStore = useState({
21
+ explorer: undefined,
22
+ data: {}
23
+ });
24
+ // use store provided by 'store' prop if available, otherwise use local store
25
+ const [explorerState, setExplorerState] = externalStore ? externalStore : localStore;
26
+ const { explorer, data } = explorerState;
27
+ function setExplorer(newExplorer) {
28
+ if (explorer) {
29
+ // store current explorer state
30
+ explorerStateCache[explorer] = {
31
+ data
32
+ };
33
+ setExplorerStateCache(explorerStateCache);
34
+ }
35
+ // restore previous explorer state (if any)
36
+ const state = explorerStateCache[newExplorer] ?? {
37
+ data: {}
38
+ };
39
+ setExplorerState({
40
+ explorer: newExplorer,
41
+ data: state.data
42
+ });
43
+ }
44
+ function setData(newData) {
45
+ setExplorerState({
46
+ explorer,
47
+ data: newData
48
+ });
49
+ }
50
+ return /*#__PURE__*/ _jsx(ExplorerManagerContext.Provider, {
51
+ value: {
52
+ explorer,
53
+ data,
54
+ setExplorer,
55
+ setData
56
+ },
57
+ children: children
58
+ });
59
+ }
60
+ export function useExplorerManagerContext() {
61
+ const ctx = useContext(ExplorerManagerContext);
62
+ if (ctx === undefined) {
63
+ throw new Error('No ExplorerManagerContext found. Did you forget a Provider?');
64
+ }
65
+ return ctx;
66
+ }
67
+
68
+ //# sourceMappingURL=ExplorerManagerProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ExploreManager/ExplorerManagerProvider.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 { createContext, ReactElement, ReactNode, useContext, useState } from 'react';\n\ninterface ExplorerState<T> {\n explorer?: string;\n data: T;\n // tab: number;\n // queries: QueryDefinition[];\n}\n\ninterface ExplorerManagerContextType<T> {\n /** observability signal, for example metrics or traces */\n explorer?: string;\n data: T;\n setExplorer: (explorer: string) => void;\n setData: (data: T) => void;\n}\n\nconst ExplorerManagerContext = createContext<ExplorerManagerContextType<unknown> | undefined>(undefined);\n\ninterface ExplorerManagerProviderProps {\n children: ReactNode;\n store?: [ExplorerState<unknown>, (state: ExplorerState<unknown>) => void];\n}\n\nexport function ExplorerManagerProvider({\n children,\n store: externalStore,\n}: ExplorerManagerProviderProps): ReactElement {\n // cache the state of currently not rendered explore UIs\n const [explorerStateCache, setExplorerStateCache] = useState<\n Record<string, Omit<ExplorerState<unknown>, 'explorer'>>\n >({});\n // local store in case external store is not provided by prop\n const localStore = useState<ExplorerState<unknown>>({ explorer: undefined, data: {} });\n // use store provided by 'store' prop if available, otherwise use local store\n const [explorerState, setExplorerState] = externalStore ? externalStore : localStore;\n const { explorer, data } = explorerState;\n\n function setExplorer(newExplorer: string): void {\n if (explorer) {\n // store current explorer state\n explorerStateCache[explorer] = { data };\n setExplorerStateCache(explorerStateCache);\n }\n\n // restore previous explorer state (if any)\n const state = explorerStateCache[newExplorer] ?? { data: {} };\n setExplorerState({ explorer: newExplorer, data: state.data });\n }\n\n function setData(newData: unknown): void {\n setExplorerState({ explorer, data: newData });\n }\n\n return (\n <ExplorerManagerContext.Provider value={{ explorer, data, setExplorer, setData }}>\n {children}\n </ExplorerManagerContext.Provider>\n );\n}\n\nexport function useExplorerManagerContext<T>(): ExplorerManagerContextType<T> {\n const ctx = useContext(ExplorerManagerContext);\n if (ctx === undefined) {\n throw new Error('No ExplorerManagerContext found. Did you forget a Provider?');\n }\n return ctx as ExplorerManagerContextType<T>;\n}\n"],"names":["createContext","useContext","useState","ExplorerManagerContext","undefined","ExplorerManagerProvider","children","store","externalStore","explorerStateCache","setExplorerStateCache","localStore","explorer","data","explorerState","setExplorerState","setExplorer","newExplorer","state","setData","newData","Provider","value","useExplorerManagerContext","ctx","Error"],"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,SAASA,aAAa,EAA2BC,UAAU,EAAEC,QAAQ,QAAQ,QAAQ;AAiBrF,MAAMC,uCAAyBH,cAA+DI;AAO9F,OAAO,SAASC,wBAAwB,EACtCC,QAAQ,EACRC,OAAOC,aAAa,EACS;IAC7B,wDAAwD;IACxD,MAAM,CAACC,oBAAoBC,sBAAsB,GAAGR,SAElD,CAAC;IACH,6DAA6D;IAC7D,MAAMS,aAAaT,SAAiC;QAAEU,UAAUR;QAAWS,MAAM,CAAC;IAAE;IACpF,6EAA6E;IAC7E,MAAM,CAACC,eAAeC,iBAAiB,GAAGP,gBAAgBA,gBAAgBG;IAC1E,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC;IAE3B,SAASE,YAAYC,WAAmB;QACtC,IAAIL,UAAU;YACZ,+BAA+B;YAC/BH,kBAAkB,CAACG,SAAS,GAAG;gBAAEC;YAAK;YACtCH,sBAAsBD;QACxB;QAEA,2CAA2C;QAC3C,MAAMS,QAAQT,kBAAkB,CAACQ,YAAY,IAAI;YAAEJ,MAAM,CAAC;QAAE;QAC5DE,iBAAiB;YAAEH,UAAUK;YAAaJ,MAAMK,MAAML,IAAI;QAAC;IAC7D;IAEA,SAASM,QAAQC,OAAgB;QAC/BL,iBAAiB;YAAEH;YAAUC,MAAMO;QAAQ;IAC7C;IAEA,qBACE,KAACjB,uBAAuBkB,QAAQ;QAACC,OAAO;YAAEV;YAAUC;YAAMG;YAAaG;QAAQ;kBAC5Eb;;AAGP;AAEA,OAAO,SAASiB;IACd,MAAMC,MAAMvB,WAAWE;IACvB,IAAIqB,QAAQpB,WAAW;QACrB,MAAM,IAAIqB,MAAM;IAClB;IACA,OAAOD;AACT"}
@@ -0,0 +1,7 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ interface ExplorerManagerProviderWithQueryParamsProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare function ExplorerManagerProviderWithQueryParams({ children, }: ExplorerManagerProviderWithQueryParamsProps): ReactElement;
6
+ export {};
7
+ //# sourceMappingURL=ExplorerManagerProviderWithQueryParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplorerManagerProviderWithQueryParams.d.ts","sourceRoot":"","sources":["../../../src/components/ExploreManager/ExplorerManagerProviderWithQueryParams.tsx"],"names":[],"mappings":"AAaA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvD,UAAU,2CAA2C;IACnD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,sCAAsC,CAAC,EACrD,QAAQ,GACT,EAAE,2CAA2C,GAAG,YAAY,CAI5D"}
@@ -0,0 +1,32 @@
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 React from 'react';
15
+ import { JsonParam, StringParam, useQueryParams, withDefault } from 'use-query-params';
16
+ import { ExplorerManagerProvider } from './ExplorerManagerProvider';
17
+ const exploreQueryConfig = {
18
+ explorer: withDefault(StringParam, undefined),
19
+ data: withDefault(JsonParam, {})
20
+ };
21
+ export function ExplorerManagerProviderWithQueryParams({ children }) {
22
+ const [queryParams, setQueryParams] = useQueryParams(exploreQueryConfig);
23
+ return /*#__PURE__*/ _jsx(ExplorerManagerProvider, {
24
+ store: [
25
+ queryParams,
26
+ setQueryParams
27
+ ],
28
+ children: children
29
+ });
30
+ }
31
+
32
+ //# sourceMappingURL=ExplorerManagerProviderWithQueryParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ExploreManager/ExplorerManagerProviderWithQueryParams.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 React, { ReactElement, ReactNode } from 'react';\n\nimport { JsonParam, StringParam, useQueryParams, withDefault } from 'use-query-params';\nimport { ExplorerManagerProvider } from './ExplorerManagerProvider';\n\nconst exploreQueryConfig = {\n explorer: withDefault(StringParam, undefined),\n data: withDefault(JsonParam, {}),\n};\n\ninterface ExplorerManagerProviderWithQueryParamsProps {\n children: ReactNode;\n}\n\nexport function ExplorerManagerProviderWithQueryParams({\n children,\n}: ExplorerManagerProviderWithQueryParamsProps): ReactElement {\n const [queryParams, setQueryParams] = useQueryParams(exploreQueryConfig);\n\n return <ExplorerManagerProvider store={[queryParams, setQueryParams]}>{children}</ExplorerManagerProvider>;\n}\n"],"names":["React","JsonParam","StringParam","useQueryParams","withDefault","ExplorerManagerProvider","exploreQueryConfig","explorer","undefined","data","ExplorerManagerProviderWithQueryParams","children","queryParams","setQueryParams","store"],"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,OAAOA,WAAwC,QAAQ;AAEvD,SAASC,SAAS,EAAEC,WAAW,EAAEC,cAAc,EAAEC,WAAW,QAAQ,mBAAmB;AACvF,SAASC,uBAAuB,QAAQ,4BAA4B;AAEpE,MAAMC,qBAAqB;IACzBC,UAAUH,YAAYF,aAAaM;IACnCC,MAAML,YAAYH,WAAW,CAAC;AAChC;AAMA,OAAO,SAASS,uCAAuC,EACrDC,QAAQ,EACoC;IAC5C,MAAM,CAACC,aAAaC,eAAe,GAAGV,eAAeG;IAErD,qBAAO,KAACD;QAAwBS,OAAO;YAACF;YAAaC;SAAe;kBAAGF;;AACzE"}
@@ -0,0 +1,4 @@
1
+ export * from './ExploreManager';
2
+ export * from './ExplorerManagerProvider';
3
+ export * from './query-params';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExploreManager/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,17 @@
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 './ExploreManager';
14
+ export * from './ExplorerManagerProvider';
15
+ export * from './query-params';
16
+
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ExploreManager/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 './ExploreManager';\nexport * from './ExplorerManagerProvider';\nexport * from './query-params';\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,mBAAmB;AACjC,cAAc,4BAA4B;AAC1C,cAAc,iBAAiB"}
@@ -0,0 +1,17 @@
1
+ export declare const explorerQueryConfig: {
2
+ refresh: import("use-query-params").QueryParamConfig<import("@perses-dev/plugin-system").TimeOptionValue, import("@perses-dev/plugin-system").TimeOptionValue>;
3
+ start: import("use-query-params").QueryParamConfig<import("@perses-dev/plugin-system").TimeOptionValue, import("@perses-dev/plugin-system").TimeOptionValue>;
4
+ end: import("use-query-params").QueryParamConfig<import("@perses-dev/plugin-system").TimeOptionValue, import("@perses-dev/plugin-system").TimeOptionValue>;
5
+ explorer: import("use-query-params").QueryParamConfig<string | null | undefined, string | null | undefined>;
6
+ data: import("use-query-params").QueryParamConfig<any, any>;
7
+ };
8
+ interface ExplorerQueryData {
9
+ refresh?: Date;
10
+ start?: Date;
11
+ end?: Date;
12
+ explorer?: string;
13
+ data?: Record<string, unknown>;
14
+ }
15
+ export declare function useExplorerQueryParams(inputs: ExplorerQueryData): string;
16
+ export {};
17
+ //# sourceMappingURL=query-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../../src/components/ExploreManager/query-params.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAEF,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAGD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAGxE"}
@@ -0,0 +1,34 @@
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 { encodeQueryParams, JsonParam, StringParam, useQueryParams } from 'use-query-params';
14
+ import { TimeRangeParam } from '@perses-dev/plugin-system';
15
+ import { stringify } from 'qs';
16
+ export const explorerQueryConfig = {
17
+ refresh: TimeRangeParam,
18
+ start: TimeRangeParam,
19
+ end: TimeRangeParam,
20
+ explorer: StringParam,
21
+ data: JsonParam
22
+ };
23
+ // Provide a query string for the explorer page using the given inputs, but also including any existing query params
24
+ export function useExplorerQueryParams(inputs) {
25
+ const [query] = useQueryParams(explorerQueryConfig, {
26
+ updateType: 'replaceIn'
27
+ });
28
+ return stringify(encodeQueryParams(explorerQueryConfig, {
29
+ ...query,
30
+ ...inputs
31
+ }));
32
+ }
33
+
34
+ //# sourceMappingURL=query-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ExploreManager/query-params.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\nimport { encodeQueryParams, JsonParam, StringParam, useQueryParams } from 'use-query-params';\nimport { TimeRangeParam } from '@perses-dev/plugin-system';\nimport { stringify } from 'qs';\n\nexport const explorerQueryConfig = {\n refresh: TimeRangeParam,\n start: TimeRangeParam,\n end: TimeRangeParam,\n explorer: StringParam,\n data: JsonParam,\n};\n\ninterface ExplorerQueryData {\n refresh?: Date;\n start?: Date;\n end?: Date;\n explorer?: string;\n data?: Record<string, unknown>;\n}\n\n// Provide a query string for the explorer page using the given inputs, but also including any existing query params\nexport function useExplorerQueryParams(inputs: ExplorerQueryData): string {\n const [query] = useQueryParams(explorerQueryConfig, { updateType: 'replaceIn' });\n return stringify(encodeQueryParams(explorerQueryConfig, { ...query, ...inputs }));\n}\n"],"names":["encodeQueryParams","JsonParam","StringParam","useQueryParams","TimeRangeParam","stringify","explorerQueryConfig","refresh","start","end","explorer","data","useExplorerQueryParams","inputs","query","updateType"],"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,SAASA,iBAAiB,EAAEC,SAAS,EAAEC,WAAW,EAAEC,cAAc,QAAQ,mBAAmB;AAC7F,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,SAAS,QAAQ,KAAK;AAE/B,OAAO,MAAMC,sBAAsB;IACjCC,SAASH;IACTI,OAAOJ;IACPK,KAAKL;IACLM,UAAUR;IACVS,MAAMV;AACR,EAAE;AAUF,oHAAoH;AACpH,OAAO,SAASW,uBAAuBC,MAAyB;IAC9D,MAAM,CAACC,MAAM,GAAGX,eAAeG,qBAAqB;QAAES,YAAY;IAAY;IAC9E,OAAOV,UAAUL,kBAAkBM,qBAAqB;QAAE,GAAGQ,KAAK;QAAE,GAAGD,MAAM;IAAC;AAChF"}
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React, { ReactElement } from 'react';
2
2
  export interface ExploreToolbarProps {
3
- exploreTitleComponent?: JSX.Element;
3
+ exploreTitleComponent?: React.ReactNode;
4
4
  }
5
- export declare const ExploreToolbar: (props: ExploreToolbarProps) => JSX.Element;
5
+ export declare const ExploreToolbar: (props: ExploreToolbarProps) => ReactElement;
6
6
  //# sourceMappingURL=ExploreToolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExploreToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ExploreToolbar/ExploreToolbar.tsx"],"names":[],"mappings":";AAgBA,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,gBAuBxD,CAAC"}
1
+ {"version":3,"file":"ExploreToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ExploreToolbar/ExploreToolbar.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,KAAG,YAuB3D,CAAC"}
@@ -12,9 +12,10 @@
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { Stack, Box, useTheme, useMediaQuery } from '@mui/material';
15
- import { TimeRangeControls } from '@perses-dev/dashboards';
15
+ import { TimeRangeControls } from '@perses-dev/plugin-system';
16
+ import React from 'react';
16
17
  export const ExploreToolbar = (props)=>{
17
- const { exploreTitleComponent } = props;
18
+ const { exploreTitleComponent } = props;
18
19
  const isBiggerThanLg = useMediaQuery(useTheme().breakpoints.up('lg'));
19
20
  const testId = 'explore-toolbar';
20
21
  return /*#__PURE__*/ _jsx(Stack, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ExploreToolbar/ExploreToolbar.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 { Stack, Box, useTheme, useMediaQuery } from '@mui/material';\nimport { TimeRangeControls } from '@perses-dev/dashboards';\n\nexport interface ExploreToolbarProps {\n exploreTitleComponent?: JSX.Element;\n}\n\nexport const ExploreToolbar = (props: ExploreToolbarProps) => {\n const { exploreTitleComponent } = props;\n\n const isBiggerThanLg = useMediaQuery(useTheme().breakpoints.up('lg'));\n\n const testId = 'explore-toolbar';\n\n return (\n <Stack data-testid={testId}>\n <Box sx={{ display: 'flex', width: '100%' }}>\n {exploreTitleComponent}\n <Stack\n direction=\"row\"\n spacing={1}\n ml=\"auto\"\n flexWrap={isBiggerThanLg ? 'nowrap' : 'wrap-reverse'}\n justifyContent=\"end\"\n >\n <TimeRangeControls />\n </Stack>\n </Box>\n </Stack>\n );\n};\n"],"names":["Stack","Box","useTheme","useMediaQuery","TimeRangeControls","ExploreToolbar","props","exploreTitleComponent","isBiggerThanLg","breakpoints","up","testId","data-testid","sx","display","width","direction","spacing","ml","flexWrap","justifyContent"],"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,SAASA,KAAK,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,gBAAgB;AACpE,SAASC,iBAAiB,QAAQ,yBAAyB;AAM3D,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,MAAM,EAAEC,sBAAqB,EAAE,GAAGD;IAElC,MAAME,iBAAiBL,cAAcD,WAAWO,YAAYC,GAAG;IAE/D,MAAMC,SAAS;IAEf,qBACE,KAACX;QAAMY,eAAaD;kBAClB,cAAA,MAACV;YAAIY,IAAI;gBAAEC,SAAS;gBAAQC,OAAO;YAAO;;gBACvCR;8BACD,KAACP;oBACCgB,WAAU;oBACVC,SAAS;oBACTC,IAAG;oBACHC,UAAUX,iBAAiB,WAAW;oBACtCY,gBAAe;8BAEf,cAAA,KAAChB;;;;;AAKX,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/ExploreToolbar/ExploreToolbar.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 { Stack, Box, useTheme, useMediaQuery } from '@mui/material';\nimport { TimeRangeControls } from '@perses-dev/plugin-system';\nimport React, { ReactElement } from 'react';\n\nexport interface ExploreToolbarProps {\n exploreTitleComponent?: React.ReactNode;\n}\n\nexport const ExploreToolbar = (props: ExploreToolbarProps): ReactElement => {\n const { exploreTitleComponent } = props;\n\n const isBiggerThanLg = useMediaQuery(useTheme().breakpoints.up('lg'));\n\n const testId = 'explore-toolbar';\n\n return (\n <Stack data-testid={testId}>\n <Box sx={{ display: 'flex', width: '100%' }}>\n {exploreTitleComponent}\n <Stack\n direction=\"row\"\n spacing={1}\n ml=\"auto\"\n flexWrap={isBiggerThanLg ? 'nowrap' : 'wrap-reverse'}\n justifyContent=\"end\"\n >\n <TimeRangeControls />\n </Stack>\n </Box>\n </Stack>\n );\n};\n"],"names":["Stack","Box","useTheme","useMediaQuery","TimeRangeControls","React","ExploreToolbar","props","exploreTitleComponent","isBiggerThanLg","breakpoints","up","testId","data-testid","sx","display","width","direction","spacing","ml","flexWrap","justifyContent"],"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,SAASA,KAAK,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,gBAAgB;AACpE,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,OAAOC,WAA6B,QAAQ;AAM5C,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,MAAM,EAAEC,qBAAqB,EAAE,GAAGD;IAElC,MAAME,iBAAiBN,cAAcD,WAAWQ,WAAW,CAACC,EAAE,CAAC;IAE/D,MAAMC,SAAS;IAEf,qBACE,KAACZ;QAAMa,eAAaD;kBAClB,cAAA,MAACX;YAAIa,IAAI;gBAAEC,SAAS;gBAAQC,OAAO;YAAO;;gBACvCR;8BACD,KAACR;oBACCiB,WAAU;oBACVC,SAAS;oBACTC,IAAG;oBACHC,UAAUX,iBAAiB,WAAW;oBACtCY,gBAAe;8BAEf,cAAA,KAACjB;;;;;AAKX,EAAE"}
@@ -0,0 +1,3 @@
1
+ export * from './ExploreManager';
2
+ export * from './ExploreToolbar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright 2024 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,7 @@
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 './TimeSeriesQueryEditor';
13
+ export * from './ExploreManager';
14
+ export * from './ExploreToolbar';
14
15
 
15
16
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/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 './ExploreManager';\nexport * from './ExploreToolbar';\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,mBAAmB;AACjC,cAAc,mBAAmB"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './views';
2
+ export * from './components';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -11,5 +11,6 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  export * from './views';
14
+ export * from './components';
14
15
 
15
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/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 './views';\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,UAAU"}
1
+ {"version":3,"sources":["../src/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 './views';\nexport * from './components';\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,UAAU;AACxB,cAAc,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test/setup-tests.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 { defaultFallbackInView } from 'react-intersection-observer';\n\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n\n// Tell react-intersection-observer that everything should be considered in-view for tests (see package documentation\n// for other options)\ndefaultFallbackInView(true);\n"],"names":["defaultFallbackInView","jest","mock"],"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,SAASA,qBAAqB,QAAQ,8BAA8B;AAEpE,iCAAiC;AACjC,OAAO,0CAA0C;AAEjD,iFAAiF;AACjFC,KAAKC,KAAK;AAEV,qHAAqH;AACrH,qBAAqB;AACrBF,sBAAsB"}
1
+ {"version":3,"sources":["../../src/test/setup-tests.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 { defaultFallbackInView } from 'react-intersection-observer';\n\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n\n// Tell react-intersection-observer that everything should be considered in-view for tests (see package documentation\n// for other options)\ndefaultFallbackInView(true);\n"],"names":["defaultFallbackInView","jest","mock"],"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,SAASA,qBAAqB,QAAQ,8BAA8B;AAEpE,iCAAiC;AACjC,OAAO,0CAA0C;AAEjD,iFAAiF;AACjFC,KAAKC,IAAI,CAAC;AAEV,qHAAqH;AACrH,qBAAqB;AACrBF,sBAAsB"}
@@ -1,12 +1,10 @@
1
- /// <reference types="react" />
2
1
  import { BoxProps } from '@mui/material';
3
- import { DashboardResource } from '@perses-dev/core';
4
- import { DatasourceStoreProviderProps, TemplateVariableProviderProps } from '@perses-dev/dashboards';
2
+ import { DatasourceStoreProviderProps, VariableProviderProps } from '@perses-dev/dashboards';
3
+ import React, { ReactElement } from 'react';
5
4
  export interface ViewExploreProps extends Omit<BoxProps, 'children'> {
6
- dashboardResource: DashboardResource;
7
5
  datasourceApi: DatasourceStoreProviderProps['datasourceApi'];
8
- externalVariableDefinitions?: TemplateVariableProviderProps['externalVariableDefinitions'];
9
- exploreTitleComponent?: JSX.Element;
6
+ externalVariableDefinitions?: VariableProviderProps['externalVariableDefinitions'];
7
+ exploreTitleComponent?: React.ReactNode;
10
8
  }
11
- export declare function ViewExplore(props: ViewExploreProps): JSX.Element;
9
+ export declare function ViewExplore(props: ViewExploreProps): ReactElement;
12
10
  //# sourceMappingURL=ViewExplore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewExplore.d.ts","sourceRoot":"","sources":["../../../src/views/ViewExplore/ViewExplore.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C,OAAO,EAAwD,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE3G,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAI9B,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAClE,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,aAAa,EAAE,4BAA4B,CAAC,eAAe,CAAC,CAAC;IAC7D,2BAA2B,CAAC,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,CAAC;IAC3F,qBAAqB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACrC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAoClD"}
1
+ {"version":3,"file":"ViewExplore.d.ts","sourceRoot":"","sources":["../../../src/views/ViewExplore/ViewExplore.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQ9C,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EAGtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAClE,aAAa,EAAE,4BAA4B,CAAC,eAAe,CAAC,CAAC;IAC7D,2BAA2B,CAAC,EAAE,qBAAqB,CAAC,6BAA6B,CAAC,CAAC;IACnF,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAkCjE"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright 2024 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
@@ -15,39 +15,33 @@ import { Box } from '@mui/material';
15
15
  import { TimeRangeProviderWithQueryParams, useInitialRefreshInterval, useInitialTimeRange } from '@perses-dev/plugin-system';
16
16
  import { DEFAULT_DASHBOARD_DURATION, DEFAULT_REFRESH_INTERVAL } from '@perses-dev/core';
17
17
  import { ErrorAlert, ErrorBoundary, combineSx } from '@perses-dev/components';
18
- import { DatasourceStoreProvider, DashboardProvider, TemplateVariableProvider } from '@perses-dev/dashboards';
18
+ import { DatasourceStoreProvider, VariableProvider } from '@perses-dev/dashboards';
19
+ import React from 'react';
19
20
  import { ViewExploreApp } from './ViewExploreApp';
20
21
  export function ViewExplore(props) {
21
- const { dashboardResource , datasourceApi , externalVariableDefinitions , sx , exploreTitleComponent , ...others } = props;
22
+ const { datasourceApi, externalVariableDefinitions, sx, exploreTitleComponent, ...others } = props;
22
23
  const initialTimeRange = useInitialTimeRange(DEFAULT_DASHBOARD_DURATION);
23
24
  const initialRefreshInterval = useInitialRefreshInterval(DEFAULT_REFRESH_INTERVAL);
24
25
  return /*#__PURE__*/ _jsx(DatasourceStoreProvider, {
25
- dashboardResource: dashboardResource,
26
26
  datasourceApi: datasourceApi,
27
- children: /*#__PURE__*/ _jsx(DashboardProvider, {
28
- initialState: {
29
- dashboardResource,
30
- isEditMode: true
31
- },
32
- children: /*#__PURE__*/ _jsx(TimeRangeProviderWithQueryParams, {
33
- initialTimeRange: initialTimeRange,
34
- initialRefreshInterval: initialRefreshInterval,
35
- children: /*#__PURE__*/ _jsx(TemplateVariableProvider, {
36
- externalVariableDefinitions: externalVariableDefinitions,
37
- children: /*#__PURE__*/ _jsx(Box, {
38
- sx: combineSx({
39
- display: 'flex',
40
- width: '100%',
41
- height: '100%',
42
- position: 'relative',
43
- overflow: 'hidden'
44
- }, sx),
45
- ...others,
46
- children: /*#__PURE__*/ _jsx(ErrorBoundary, {
47
- FallbackComponent: ErrorAlert,
48
- children: /*#__PURE__*/ _jsx(ViewExploreApp, {
49
- exploreTitleComponent: exploreTitleComponent
50
- })
27
+ children: /*#__PURE__*/ _jsx(TimeRangeProviderWithQueryParams, {
28
+ initialTimeRange: initialTimeRange,
29
+ initialRefreshInterval: initialRefreshInterval,
30
+ children: /*#__PURE__*/ _jsx(VariableProvider, {
31
+ externalVariableDefinitions: externalVariableDefinitions,
32
+ children: /*#__PURE__*/ _jsx(Box, {
33
+ sx: combineSx({
34
+ display: 'flex',
35
+ width: '100%',
36
+ height: '100%',
37
+ position: 'relative',
38
+ overflow: 'hidden'
39
+ }, sx),
40
+ ...others,
41
+ children: /*#__PURE__*/ _jsx(ErrorBoundary, {
42
+ FallbackComponent: ErrorAlert,
43
+ children: /*#__PURE__*/ _jsx(ViewExploreApp, {
44
+ exploreTitleComponent: exploreTitleComponent
51
45
  })
52
46
  })
53
47
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/views/ViewExplore/ViewExplore.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 { Box, BoxProps } from '@mui/material';\nimport {\n TimeRangeProviderWithQueryParams,\n useInitialRefreshInterval,\n useInitialTimeRange,\n} from '@perses-dev/plugin-system';\nimport { DEFAULT_DASHBOARD_DURATION, DEFAULT_REFRESH_INTERVAL, DashboardResource } from '@perses-dev/core';\nimport { ErrorAlert, ErrorBoundary, combineSx } from '@perses-dev/components';\nimport {\n DatasourceStoreProviderProps,\n TemplateVariableProviderProps,\n DatasourceStoreProvider,\n DashboardProvider,\n TemplateVariableProvider,\n} from '@perses-dev/dashboards';\nimport { ViewExploreApp } from './ViewExploreApp';\n\nexport interface ViewExploreProps extends Omit<BoxProps, 'children'> {\n dashboardResource: DashboardResource;\n datasourceApi: DatasourceStoreProviderProps['datasourceApi'];\n externalVariableDefinitions?: TemplateVariableProviderProps['externalVariableDefinitions'];\n exploreTitleComponent?: JSX.Element;\n}\n\nexport function ViewExplore(props: ViewExploreProps) {\n const { dashboardResource, datasourceApi, externalVariableDefinitions, sx, exploreTitleComponent, ...others } = props;\n\n const initialTimeRange = useInitialTimeRange(DEFAULT_DASHBOARD_DURATION);\n const initialRefreshInterval = useInitialRefreshInterval(DEFAULT_REFRESH_INTERVAL);\n\n return (\n <DatasourceStoreProvider dashboardResource={dashboardResource} datasourceApi={datasourceApi}>\n <DashboardProvider initialState={{ dashboardResource, isEditMode: true }}>\n <TimeRangeProviderWithQueryParams\n initialTimeRange={initialTimeRange}\n initialRefreshInterval={initialRefreshInterval}\n >\n <TemplateVariableProvider externalVariableDefinitions={externalVariableDefinitions}>\n <Box\n sx={combineSx(\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n position: 'relative',\n overflow: 'hidden',\n },\n sx\n )}\n {...others}\n >\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <ViewExploreApp exploreTitleComponent={exploreTitleComponent} />\n </ErrorBoundary>\n </Box>\n </TemplateVariableProvider>\n </TimeRangeProviderWithQueryParams>\n </DashboardProvider>\n </DatasourceStoreProvider>\n );\n}\n"],"names":["Box","TimeRangeProviderWithQueryParams","useInitialRefreshInterval","useInitialTimeRange","DEFAULT_DASHBOARD_DURATION","DEFAULT_REFRESH_INTERVAL","ErrorAlert","ErrorBoundary","combineSx","DatasourceStoreProvider","DashboardProvider","TemplateVariableProvider","ViewExploreApp","ViewExplore","props","dashboardResource","datasourceApi","externalVariableDefinitions","sx","exploreTitleComponent","others","initialTimeRange","initialRefreshInterval","initialState","isEditMode","display","width","height","position","overflow","FallbackComponent"],"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,SAASA,GAAG,QAAkB,gBAAgB;AAC9C,SACEC,gCAAgC,EAChCC,yBAAyB,EACzBC,mBAAmB,QACd,4BAA4B;AACnC,SAASC,0BAA0B,EAAEC,wBAAwB,QAA2B,mBAAmB;AAC3G,SAASC,UAAU,EAAEC,aAAa,EAAEC,SAAS,QAAQ,yBAAyB;AAC9E,SAGEC,uBAAuB,EACvBC,iBAAiB,EACjBC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,cAAc,QAAQ,mBAAmB;AASlD,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EAAEC,kBAAiB,EAAEC,cAAa,EAAEC,4BAA2B,EAAEC,GAAE,EAAEC,sBAAqB,EAAE,GAAGC,QAAQ,GAAGN;IAEhH,MAAMO,mBAAmBlB,oBAAoBC;IAC7C,MAAMkB,yBAAyBpB,0BAA0BG;IAEzD,qBACE,KAACI;QAAwBM,mBAAmBA;QAAmBC,eAAeA;kBAC5E,cAAA,KAACN;YAAkBa,cAAc;gBAAER;gBAAmBS,YAAY;YAAK;sBACrE,cAAA,KAACvB;gBACCoB,kBAAkBA;gBAClBC,wBAAwBA;0BAExB,cAAA,KAACX;oBAAyBM,6BAA6BA;8BACrD,cAAA,KAACjB;wBACCkB,IAAIV,UACF;4BACEiB,SAAS;4BACTC,OAAO;4BACPC,QAAQ;4BACRC,UAAU;4BACVC,UAAU;wBACZ,GACAX;wBAED,GAAGE,MAAM;kCAEV,cAAA,KAACb;4BAAcuB,mBAAmBxB;sCAChC,cAAA,KAACM;gCAAeO,uBAAuBA;;;;;;;;AAQvD"}
1
+ {"version":3,"sources":["../../../src/views/ViewExplore/ViewExplore.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 { Box, BoxProps } from '@mui/material';\nimport {\n TimeRangeProviderWithQueryParams,\n useInitialRefreshInterval,\n useInitialTimeRange,\n} from '@perses-dev/plugin-system';\nimport { DEFAULT_DASHBOARD_DURATION, DEFAULT_REFRESH_INTERVAL } from '@perses-dev/core';\nimport { ErrorAlert, ErrorBoundary, combineSx } from '@perses-dev/components';\nimport {\n DatasourceStoreProviderProps,\n VariableProviderProps,\n DatasourceStoreProvider,\n VariableProvider,\n} from '@perses-dev/dashboards';\nimport React, { ReactElement } from 'react';\nimport { ViewExploreApp } from './ViewExploreApp';\n\nexport interface ViewExploreProps extends Omit<BoxProps, 'children'> {\n datasourceApi: DatasourceStoreProviderProps['datasourceApi'];\n externalVariableDefinitions?: VariableProviderProps['externalVariableDefinitions'];\n exploreTitleComponent?: React.ReactNode;\n}\n\nexport function ViewExplore(props: ViewExploreProps): ReactElement {\n const { datasourceApi, externalVariableDefinitions, sx, exploreTitleComponent, ...others } = props;\n\n const initialTimeRange = useInitialTimeRange(DEFAULT_DASHBOARD_DURATION);\n const initialRefreshInterval = useInitialRefreshInterval(DEFAULT_REFRESH_INTERVAL);\n\n return (\n <DatasourceStoreProvider datasourceApi={datasourceApi}>\n <TimeRangeProviderWithQueryParams\n initialTimeRange={initialTimeRange}\n initialRefreshInterval={initialRefreshInterval}\n >\n <VariableProvider externalVariableDefinitions={externalVariableDefinitions}>\n <Box\n sx={combineSx(\n {\n display: 'flex',\n width: '100%',\n height: '100%',\n position: 'relative',\n overflow: 'hidden',\n },\n sx\n )}\n {...others}\n >\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <ViewExploreApp exploreTitleComponent={exploreTitleComponent} />\n </ErrorBoundary>\n </Box>\n </VariableProvider>\n </TimeRangeProviderWithQueryParams>\n </DatasourceStoreProvider>\n );\n}\n"],"names":["Box","TimeRangeProviderWithQueryParams","useInitialRefreshInterval","useInitialTimeRange","DEFAULT_DASHBOARD_DURATION","DEFAULT_REFRESH_INTERVAL","ErrorAlert","ErrorBoundary","combineSx","DatasourceStoreProvider","VariableProvider","React","ViewExploreApp","ViewExplore","props","datasourceApi","externalVariableDefinitions","sx","exploreTitleComponent","others","initialTimeRange","initialRefreshInterval","display","width","height","position","overflow","FallbackComponent"],"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,SAASA,GAAG,QAAkB,gBAAgB;AAC9C,SACEC,gCAAgC,EAChCC,yBAAyB,EACzBC,mBAAmB,QACd,4BAA4B;AACnC,SAASC,0BAA0B,EAAEC,wBAAwB,QAAQ,mBAAmB;AACxF,SAASC,UAAU,EAAEC,aAAa,EAAEC,SAAS,QAAQ,yBAAyB;AAC9E,SAGEC,uBAAuB,EACvBC,gBAAgB,QACX,yBAAyB;AAChC,OAAOC,WAA6B,QAAQ;AAC5C,SAASC,cAAc,QAAQ,mBAAmB;AAQlD,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EAAEC,aAAa,EAAEC,2BAA2B,EAAEC,EAAE,EAAEC,qBAAqB,EAAE,GAAGC,QAAQ,GAAGL;IAE7F,MAAMM,mBAAmBjB,oBAAoBC;IAC7C,MAAMiB,yBAAyBnB,0BAA0BG;IAEzD,qBACE,KAACI;QAAwBM,eAAeA;kBACtC,cAAA,KAACd;YACCmB,kBAAkBA;YAClBC,wBAAwBA;sBAExB,cAAA,KAACX;gBAAiBM,6BAA6BA;0BAC7C,cAAA,KAAChB;oBACCiB,IAAIT,UACF;wBACEc,SAAS;wBACTC,OAAO;wBACPC,QAAQ;wBACRC,UAAU;wBACVC,UAAU;oBACZ,GACAT;oBAED,GAAGE,MAAM;8BAEV,cAAA,KAACZ;wBAAcoB,mBAAmBrB;kCAChC,cAAA,KAACM;4BAAeM,uBAAuBA;;;;;;;AAOrD"}
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  export interface ViewAppProps {
3
- exploreTitleComponent?: JSX.Element;
3
+ exploreTitleComponent?: ReactNode;
4
4
  }
5
- export declare function ViewExploreApp(props: ViewAppProps): JSX.Element;
5
+ export declare function ViewExploreApp(props: ViewAppProps): ReactElement;
6
6
  //# sourceMappingURL=ViewExploreApp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewExploreApp.d.ts","sourceRoot":"","sources":["../../../src/views/ViewExplore/ViewExploreApp.tsx"],"names":[],"mappings":";AAkBA,MAAM,WAAW,YAAY;IAC3B,qBAAqB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACrC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,eAoCjD"}
1
+ {"version":3,"file":"ViewExploreApp.d.ts","sourceRoot":"","sources":["../../../src/views/ViewExplore/ViewExploreApp.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhD,MAAM,WAAW,YAAY;IAC3B,qBAAqB,CAAC,EAAE,SAAS,CAAC;CACnC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAsBhE"}
@@ -13,26 +13,11 @@
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { Box } from '@mui/material';
15
15
  import { ChartsProvider, useChartsTheme } from '@perses-dev/components';
16
- import { PanelEditorForm } from '../../components/PanelEditor/PanelEditorForm';
16
+ import { ExploreManager } from '../../components';
17
+ import { ExplorerManagerProviderWithQueryParams } from '../../components/ExploreManager/ExplorerManagerProviderWithQueryParams';
17
18
  export function ViewExploreApp(props) {
18
- const { exploreTitleComponent } = props;
19
+ const { exploreTitleComponent } = props;
19
20
  const chartsTheme = useChartsTheme();
20
- const data = {
21
- groupId: 0,
22
- panelDefinition: {
23
- kind: 'Panel',
24
- spec: {
25
- display: {
26
- name: ''
27
- },
28
- plugin: {
29
- kind: 'TimeSeriesChart',
30
- spec: {}
31
- },
32
- queries: []
33
- }
34
- }
35
- };
36
21
  return /*#__PURE__*/ _jsx(Box, {
37
22
  sx: {
38
23
  flexGrow: 1,
@@ -44,10 +29,10 @@ export function ViewExploreApp(props) {
44
29
  children: /*#__PURE__*/ _jsx(ChartsProvider, {
45
30
  chartsTheme: chartsTheme,
46
31
  enablePinning: false,
47
- children: /*#__PURE__*/ _jsx(PanelEditorForm, {
48
- initialAction: "update",
49
- initialValues: data,
50
- exploreTitleComponent: exploreTitleComponent
32
+ children: /*#__PURE__*/ _jsx(ExplorerManagerProviderWithQueryParams, {
33
+ children: /*#__PURE__*/ _jsx(ExploreManager, {
34
+ exploreTitleComponent: exploreTitleComponent
35
+ })
51
36
  })
52
37
  })
53
38
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/views/ViewExplore/ViewExploreApp.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 { Box } from '@mui/material';\nimport { ChartsProvider, useChartsTheme } from '@perses-dev/components';\nimport { PanelEditorValues } from '@perses-dev/dashboards';\nimport { PanelEditorForm } from '../../components/PanelEditor/PanelEditorForm';\n\nexport interface ViewAppProps {\n exploreTitleComponent?: JSX.Element;\n}\n\nexport function ViewExploreApp(props: ViewAppProps) {\n const { exploreTitleComponent } = props;\n\n const chartsTheme = useChartsTheme();\n const data: PanelEditorValues = {\n groupId: 0,\n panelDefinition: {\n kind: 'Panel',\n spec: {\n display: {\n name: '',\n },\n plugin: {\n kind: 'TimeSeriesChart',\n spec: {},\n },\n queries: [],\n },\n },\n };\n\n return (\n <Box\n sx={{\n flexGrow: 1,\n overflowX: 'hidden',\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <ChartsProvider chartsTheme={chartsTheme} enablePinning={false}>\n <PanelEditorForm initialAction=\"update\" initialValues={data} exploreTitleComponent={exploreTitleComponent} />\n </ChartsProvider>\n </Box>\n );\n}\n"],"names":["Box","ChartsProvider","useChartsTheme","PanelEditorForm","ViewExploreApp","props","exploreTitleComponent","chartsTheme","data","groupId","panelDefinition","kind","spec","display","name","plugin","queries","sx","flexGrow","overflowX","overflowY","flexDirection","enablePinning","initialAction","initialValues"],"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,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,cAAc,EAAEC,cAAc,QAAQ,yBAAyB;AAExE,SAASC,eAAe,QAAQ,+CAA+C;AAM/E,OAAO,SAASC,eAAeC,KAAmB;IAChD,MAAM,EAAEC,sBAAqB,EAAE,GAAGD;IAElC,MAAME,cAAcL;IACpB,MAAMM,OAA0B;QAC9BC,SAAS;QACTC,iBAAiB;YACfC,MAAM;YACNC,MAAM;gBACJC,SAAS;oBACPC,MAAM;gBACR;gBACAC,QAAQ;oBACNJ,MAAM;oBACNC,MAAM,CAAC;gBACT;gBACAI,SAAS,EAAE;YACb;QACF;IACF;IAEA,qBACE,KAAChB;QACCiB,IAAI;YACFC,UAAU;YACVC,WAAW;YACXC,WAAW;YACXP,SAAS;YACTQ,eAAe;QACjB;kBAEA,cAAA,KAACpB;YAAeM,aAAaA;YAAae,eAAe;sBACvD,cAAA,KAACnB;gBAAgBoB,eAAc;gBAASC,eAAehB;gBAAMF,uBAAuBA;;;;AAI5F"}
1
+ {"version":3,"sources":["../../../src/views/ViewExplore/ViewExploreApp.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 { Box } from '@mui/material';\nimport { ChartsProvider, useChartsTheme } from '@perses-dev/components';\nimport { ReactElement, ReactNode } from 'react';\nimport { ExploreManager } from '../../components';\nimport { ExplorerManagerProviderWithQueryParams } from '../../components/ExploreManager/ExplorerManagerProviderWithQueryParams';\n\nexport interface ViewAppProps {\n exploreTitleComponent?: ReactNode;\n}\n\nexport function ViewExploreApp(props: ViewAppProps): ReactElement {\n const { exploreTitleComponent } = props;\n\n const chartsTheme = useChartsTheme();\n\n return (\n <Box\n sx={{\n flexGrow: 1,\n overflowX: 'hidden',\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <ChartsProvider chartsTheme={chartsTheme} enablePinning={false}>\n <ExplorerManagerProviderWithQueryParams>\n <ExploreManager exploreTitleComponent={exploreTitleComponent} />\n </ExplorerManagerProviderWithQueryParams>\n </ChartsProvider>\n </Box>\n );\n}\n"],"names":["Box","ChartsProvider","useChartsTheme","ExploreManager","ExplorerManagerProviderWithQueryParams","ViewExploreApp","props","exploreTitleComponent","chartsTheme","sx","flexGrow","overflowX","overflowY","display","flexDirection","enablePinning"],"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,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,cAAc,EAAEC,cAAc,QAAQ,yBAAyB;AAExE,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,sCAAsC,QAAQ,yEAAyE;AAMhI,OAAO,SAASC,eAAeC,KAAmB;IAChD,MAAM,EAAEC,qBAAqB,EAAE,GAAGD;IAElC,MAAME,cAAcN;IAEpB,qBACE,KAACF;QACCS,IAAI;YACFC,UAAU;YACVC,WAAW;YACXC,WAAW;YACXC,SAAS;YACTC,eAAe;QACjB;kBAEA,cAAA,KAACb;YAAeO,aAAaA;YAAaO,eAAe;sBACvD,cAAA,KAACX;0BACC,cAAA,KAACD;oBAAeI,uBAAuBA;;;;;AAKjD"}