@perses-dev/explore 0.0.0-snapshot-scatterplot-fix-imports-95e1b59 → 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 (54) 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/index.js +31 -0
  7. package/dist/cjs/index.js +1 -0
  8. package/dist/cjs/views/ViewExplore/ViewExplore.js +2 -2
  9. package/dist/cjs/views/ViewExplore/ViewExploreApp.js +6 -9
  10. package/dist/components/ExploreManager/ExploreManager.d.ts +6 -0
  11. package/dist/components/ExploreManager/ExploreManager.d.ts.map +1 -0
  12. package/dist/components/ExploreManager/ExploreManager.js +101 -0
  13. package/dist/components/ExploreManager/ExploreManager.js.map +1 -0
  14. package/dist/components/ExploreManager/ExplorerManagerProvider.d.ts +20 -0
  15. package/dist/components/ExploreManager/ExplorerManagerProvider.d.ts.map +1 -0
  16. package/dist/components/ExploreManager/ExplorerManagerProvider.js +68 -0
  17. package/dist/components/ExploreManager/ExplorerManagerProvider.js.map +1 -0
  18. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.d.ts +7 -0
  19. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.d.ts.map +1 -0
  20. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.js +32 -0
  21. package/dist/components/ExploreManager/ExplorerManagerProviderWithQueryParams.js.map +1 -0
  22. package/dist/components/ExploreManager/index.d.ts +4 -0
  23. package/dist/components/ExploreManager/index.d.ts.map +1 -0
  24. package/dist/components/ExploreManager/index.js +17 -0
  25. package/dist/components/ExploreManager/index.js.map +1 -0
  26. package/dist/components/ExploreManager/query-params.d.ts +17 -0
  27. package/dist/components/ExploreManager/query-params.d.ts.map +1 -0
  28. package/dist/components/ExploreManager/query-params.js +34 -0
  29. package/dist/components/ExploreManager/query-params.js.map +1 -0
  30. package/dist/components/ExploreToolbar/ExploreToolbar.d.ts +2 -2
  31. package/dist/components/ExploreToolbar/ExploreToolbar.d.ts.map +1 -1
  32. package/dist/components/ExploreToolbar/ExploreToolbar.js.map +1 -1
  33. package/dist/components/index.d.ts +3 -0
  34. package/dist/components/index.d.ts.map +1 -0
  35. package/dist/components/index.js +16 -0
  36. package/dist/components/index.js.map +1 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +1 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/views/ViewExplore/ViewExplore.d.ts +4 -4
  42. package/dist/views/ViewExplore/ViewExplore.d.ts.map +1 -1
  43. package/dist/views/ViewExplore/ViewExplore.js +3 -3
  44. package/dist/views/ViewExplore/ViewExplore.js.map +1 -1
  45. package/dist/views/ViewExplore/ViewExploreApp.d.ts +3 -3
  46. package/dist/views/ViewExplore/ViewExploreApp.d.ts.map +1 -1
  47. package/dist/views/ViewExplore/ViewExploreApp.js +6 -4
  48. package/dist/views/ViewExplore/ViewExploreApp.js.map +1 -1
  49. package/package.json +16 -12
  50. package/dist/cjs/components/TimeSeriesExplorer/TimeSeriesExplorer.js +0 -166
  51. package/dist/components/TimeSeriesExplorer/TimeSeriesExplorer.d.ts +0 -11
  52. package/dist/components/TimeSeriesExplorer/TimeSeriesExplorer.d.ts.map +0 -1
  53. package/dist/components/TimeSeriesExplorer/TimeSeriesExplorer.js +0 -109
  54. package/dist/components/TimeSeriesExplorer/TimeSeriesExplorer.js.map +0 -1
@@ -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
- import React from 'react';
1
+ import React, { ReactElement } from 'react';
2
2
  export interface ExploreToolbarProps {
3
3
  exploreTitleComponent?: React.ReactNode;
4
4
  }
5
- export declare const ExploreToolbar: (props: ExploreToolbarProps) => import("react/jsx-runtime").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":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,4CAuBxD,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"}
@@ -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/plugin-system';\nimport React from 'react';\n\nexport interface ExploreToolbarProps {\n exploreTitleComponent?: React.ReactNode;\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","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,WAAW,QAAQ;AAM1B,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"}
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"}
@@ -0,0 +1,16 @@
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 './ExploreToolbar';
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,10 +1,10 @@
1
1
  import { BoxProps } from '@mui/material';
2
- import { DatasourceStoreProviderProps, TemplateVariableProviderProps } from '@perses-dev/dashboards';
3
- import React from 'react';
2
+ import { DatasourceStoreProviderProps, VariableProviderProps } from '@perses-dev/dashboards';
3
+ import React, { ReactElement } from 'react';
4
4
  export interface ViewExploreProps extends Omit<BoxProps, 'children'> {
5
5
  datasourceApi: DatasourceStoreProviderProps['datasourceApi'];
6
- externalVariableDefinitions?: TemplateVariableProviderProps['externalVariableDefinitions'];
6
+ externalVariableDefinitions?: VariableProviderProps['externalVariableDefinitions'];
7
7
  exploreTitleComponent?: React.ReactNode;
8
8
  }
9
- export declare function ViewExplore(props: ViewExploreProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ViewExplore(props: ViewExploreProps): ReactElement;
10
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;AAQ9C,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAG9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAClE,aAAa,EAAE,4BAA4B,CAAC,eAAe,CAAC,CAAC;IAC7D,2BAA2B,CAAC,EAAE,6BAA6B,CAAC,6BAA6B,CAAC,CAAC;IAC3F,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAkClD"}
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,7 +15,7 @@ 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, TemplateVariableProvider } from '@perses-dev/dashboards';
18
+ import { DatasourceStoreProvider, VariableProvider } from '@perses-dev/dashboards';
19
19
  import React from 'react';
20
20
  import { ViewExploreApp } from './ViewExploreApp';
21
21
  export function ViewExplore(props) {
@@ -27,7 +27,7 @@ export function ViewExplore(props) {
27
27
  children: /*#__PURE__*/ _jsx(TimeRangeProviderWithQueryParams, {
28
28
  initialTimeRange: initialTimeRange,
29
29
  initialRefreshInterval: initialRefreshInterval,
30
- children: /*#__PURE__*/ _jsx(TemplateVariableProvider, {
30
+ children: /*#__PURE__*/ _jsx(VariableProvider, {
31
31
  externalVariableDefinitions: externalVariableDefinitions,
32
32
  children: /*#__PURE__*/ _jsx(Box, {
33
33
  sx: combineSx({
@@ -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 } from '@perses-dev/core';\nimport { ErrorAlert, ErrorBoundary, combineSx } from '@perses-dev/components';\nimport {\n DatasourceStoreProviderProps,\n TemplateVariableProviderProps,\n DatasourceStoreProvider,\n TemplateVariableProvider,\n} from '@perses-dev/dashboards';\nimport React from 'react';\nimport { ViewExploreApp } from './ViewExploreApp';\n\nexport interface ViewExploreProps extends Omit<BoxProps, 'children'> {\n datasourceApi: DatasourceStoreProviderProps['datasourceApi'];\n externalVariableDefinitions?: TemplateVariableProviderProps['externalVariableDefinitions'];\n exploreTitleComponent?: React.ReactNode;\n}\n\nexport function ViewExplore(props: ViewExploreProps) {\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 <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 </DatasourceStoreProvider>\n );\n}\n"],"names":["Box","TimeRangeProviderWithQueryParams","useInitialRefreshInterval","useInitialTimeRange","DEFAULT_DASHBOARD_DURATION","DEFAULT_REFRESH_INTERVAL","ErrorAlert","ErrorBoundary","combineSx","DatasourceStoreProvider","TemplateVariableProvider","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,wBAAwB,QACnB,yBAAyB;AAChC,OAAOC,WAAW,QAAQ;AAC1B,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;gBAAyBM,6BAA6BA;0BACrD,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
+ {"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
- import React from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  export interface ViewAppProps {
3
- exploreTitleComponent?: React.ReactNode;
3
+ exploreTitleComponent?: ReactNode;
4
4
  }
5
- export declare function ViewExploreApp(props: ViewAppProps): import("react/jsx-runtime").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":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,2CAoBjD"}
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,8 +13,8 @@
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 React from 'react';
17
- import { TimeSeriesExplorer } from '../../components/TimeSeriesExplorer/TimeSeriesExplorer';
16
+ import { ExploreManager } from '../../components';
17
+ import { ExplorerManagerProviderWithQueryParams } from '../../components/ExploreManager/ExplorerManagerProviderWithQueryParams';
18
18
  export function ViewExploreApp(props) {
19
19
  const { exploreTitleComponent } = props;
20
20
  const chartsTheme = useChartsTheme();
@@ -29,8 +29,10 @@ export function ViewExploreApp(props) {
29
29
  children: /*#__PURE__*/ _jsx(ChartsProvider, {
30
30
  chartsTheme: chartsTheme,
31
31
  enablePinning: false,
32
- children: /*#__PURE__*/ _jsx(TimeSeriesExplorer, {
33
- exploreTitleComponent: exploreTitleComponent
32
+ children: /*#__PURE__*/ _jsx(ExplorerManagerProviderWithQueryParams, {
33
+ children: /*#__PURE__*/ _jsx(ExploreManager, {
34
+ exploreTitleComponent: exploreTitleComponent
35
+ })
34
36
  })
35
37
  })
36
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 React from 'react';\nimport { TimeSeriesExplorer } from '../../components/TimeSeriesExplorer/TimeSeriesExplorer';\n\nexport interface ViewAppProps {\n exploreTitleComponent?: React.ReactNode;\n}\n\nexport function ViewExploreApp(props: ViewAppProps) {\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 <TimeSeriesExplorer exploreTitleComponent={exploreTitleComponent} />\n </ChartsProvider>\n </Box>\n );\n}\n"],"names":["Box","ChartsProvider","useChartsTheme","React","TimeSeriesExplorer","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;AACxE,OAAOC,WAAW,QAAQ;AAC1B,SAASC,kBAAkB,QAAQ,yDAAyD;AAM5F,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;gBAAmBG,uBAAuBA;;;;AAInD"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/explore",
3
- "version": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
3
+ "version": "0.0.0-snapshot-explorer-plugin-c4a7621",
4
4
  "description": "The explore feature in Perses",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -27,32 +27,36 @@
27
27
  "lint:fix": "eslint --fix src --ext .ts,.tsx"
28
28
  },
29
29
  "dependencies": {
30
- "@perses-dev/components": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
31
- "@perses-dev/core": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
32
- "@perses-dev/panels-plugin": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
33
- "@perses-dev/plugin-system": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
34
- "@perses-dev/dashboards": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
30
+ "@nexucis/fuzzy": "^0.5.1",
31
+ "@perses-dev/components": "0.0.0-snapshot-explorer-plugin-c4a7621",
32
+ "@perses-dev/core": "0.0.0-snapshot-explorer-plugin-c4a7621",
33
+ "@perses-dev/dashboards": "0.0.0-snapshot-explorer-plugin-c4a7621",
34
+ "@perses-dev/panels-plugin": "0.0.0-snapshot-explorer-plugin-c4a7621",
35
+ "@perses-dev/plugin-system": "0.0.0-snapshot-explorer-plugin-c4a7621",
35
36
  "@types/react-grid-layout": "^1.3.2",
36
37
  "date-fns": "^2.28.0",
37
38
  "immer": "^9.0.15",
38
- "mdi-material-ui": "^7.4.0",
39
+ "mdi-material-ui": "^7.9.2",
40
+ "qs": "^6.13.0",
39
41
  "react-grid-layout": "^1.3.4",
40
42
  "react-hook-form": "^7.46.1",
41
43
  "react-intersection-observer": "^9.4.0",
44
+ "react-virtuoso": "^4.12.2",
42
45
  "use-immer": "^0.7.0",
43
46
  "use-query-params": "^2.1.1",
44
47
  "use-resize-observer": "^9.0.0",
45
48
  "zustand": "^4.3.3"
46
49
  },
47
50
  "devDependencies": {
48
- "@perses-dev/internal-utils": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
49
- "@perses-dev/storybook": "0.0.0-snapshot-scatterplot-fix-imports-95e1b59",
51
+ "@perses-dev/internal-utils": "0.0.0-snapshot-explorer-plugin-c4a7621",
52
+ "@perses-dev/storybook": "0.0.0-snapshot-explorer-plugin-c4a7621",
50
53
  "history": "^5.3.0",
51
- "intersection-observer": "^0.12.2"
54
+ "intersection-observer": "^0.12.2",
55
+ "react-router-dom": "^6.11.0"
52
56
  },
53
57
  "peerDependencies": {
54
- "@mui/material": "^5.10.0",
55
- "@tanstack/react-query": "^4.7.1",
58
+ "@mui/material": "^6.1.10",
59
+ "@tanstack/react-query": "^5.64.2",
56
60
  "react": "^17.0.2 || ^18.0.0",
57
61
  "react-dom": "^17.0.2 || ^18.0.0"
58
62
  },
@@ -1,166 +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
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- function _export(target, all) {
18
- for(var name in all)Object.defineProperty(target, name, {
19
- enumerable: true,
20
- get: all[name]
21
- });
22
- }
23
- _export(exports, {
24
- TimeSeriesExplorer: function() {
25
- return TimeSeriesExplorer;
26
- },
27
- TimeSeriesPanel: function() {
28
- return TimeSeriesPanel;
29
- }
30
- });
31
- const _jsxruntime = require("react/jsx-runtime");
32
- const _pluginsystem = require("@perses-dev/plugin-system");
33
- const _material = require("@mui/material");
34
- const _components = require("@perses-dev/components");
35
- const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
36
- const _panelsplugin = require("@perses-dev/panels-plugin");
37
- const _ExploreToolbar = require("../ExploreToolbar");
38
- function _getRequireWildcardCache(nodeInterop) {
39
- if (typeof WeakMap !== "function") return null;
40
- var cacheBabelInterop = new WeakMap();
41
- var cacheNodeInterop = new WeakMap();
42
- return (_getRequireWildcardCache = function(nodeInterop) {
43
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
44
- })(nodeInterop);
45
- }
46
- function _interop_require_wildcard(obj, nodeInterop) {
47
- if (!nodeInterop && obj && obj.__esModule) {
48
- return obj;
49
- }
50
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
51
- return {
52
- default: obj
53
- };
54
- }
55
- var cache = _getRequireWildcardCache(nodeInterop);
56
- if (cache && cache.has(obj)) {
57
- return cache.get(obj);
58
- }
59
- var newObj = {
60
- __proto__: null
61
- };
62
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
63
- for(var key in obj){
64
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
65
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
66
- if (desc && (desc.get || desc.set)) {
67
- Object.defineProperty(newObj, key, desc);
68
- } else {
69
- newObj[key] = obj[key];
70
- }
71
- }
72
- }
73
- newObj.default = obj;
74
- if (cache) {
75
- cache.set(obj, newObj);
76
- }
77
- return newObj;
78
- }
79
- const PANEL_PREVIEW_HEIGHT = 300;
80
- const PANEL_PREVIEW_DEFAULT_WIDTH = 840;
81
- function TimeSeriesPanel({ queries }) {
82
- const boxRef = (0, _react.useRef)(null);
83
- let width = PANEL_PREVIEW_DEFAULT_WIDTH;
84
- if (boxRef.current !== null) {
85
- width = boxRef.current.getBoundingClientRect().width;
86
- }
87
- const suggestedStepMs = (0, _pluginsystem.useSuggestedStepMs)(width);
88
- // map TimeSeriesQueryDefinition to Definition<UnknownSpec>
89
- const definitions = queries.length ? queries.map((query)=>{
90
- return {
91
- kind: query.spec.plugin.kind,
92
- spec: query.spec.plugin.spec
93
- };
94
- }) : [];
95
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
96
- ref: boxRef,
97
- height: PANEL_PREVIEW_HEIGHT,
98
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
99
- definitions: definitions,
100
- options: {
101
- suggestedStepMs
102
- },
103
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_panelsplugin.TimeSeriesChart.PanelComponent, {
104
- contentDimensions: {
105
- width,
106
- height: PANEL_PREVIEW_HEIGHT
107
- },
108
- spec: {}
109
- })
110
- })
111
- });
112
- }
113
- function TimeSeriesExplorer(props) {
114
- const { exploreTitleComponent } = props;
115
- const [queries, setQueries] = (0, _react.useState)();
116
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
117
- sx: {
118
- width: '100%'
119
- },
120
- px: 2,
121
- pb: 2,
122
- pt: 1.5,
123
- gap: 2,
124
- children: [
125
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_ExploreToolbar.ExploreToolbar, {
126
- exploreTitleComponent: exploreTitleComponent
127
- }),
128
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Grid, {
129
- container: true,
130
- spacing: 2,
131
- children: [
132
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
133
- item: true,
134
- xs: 12,
135
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
136
- gap: 1,
137
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.TimeSeriesQueryEditor, {
138
- onChange: setQueries,
139
- queries: queries
140
- })
141
- })
142
- }),
143
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
144
- item: true,
145
- xs: 12,
146
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
147
- gap: 1,
148
- children: [
149
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
150
- variant: "h4",
151
- children: "Preview"
152
- }),
153
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorBoundary, {
154
- FallbackComponent: _components.ErrorAlert,
155
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(TimeSeriesPanel, {
156
- queries: queries !== null && queries !== void 0 ? queries : []
157
- })
158
- })
159
- ]
160
- })
161
- })
162
- ]
163
- })
164
- ]
165
- });
166
- }
@@ -1,11 +0,0 @@
1
- import { QueryDefinition } from '@perses-dev/core';
2
- import React from 'react';
3
- export interface TimeseriesExplorerProps {
4
- exploreTitleComponent?: React.ReactNode;
5
- }
6
- export interface PanelPreviewValues {
7
- queries: QueryDefinition[];
8
- }
9
- export declare function TimeSeriesPanel({ queries }: PanelPreviewValues): import("react/jsx-runtime").JSX.Element;
10
- export declare function TimeSeriesExplorer(props: TimeseriesExplorerProps): import("react/jsx-runtime").JSX.Element;
11
- //# sourceMappingURL=TimeSeriesExplorer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimeSeriesExplorer.d.ts","sourceRoot":"","sources":["../../../src/components/TimeSeriesExplorer/TimeSeriesExplorer.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAA2B,MAAM,OAAO,CAAC;AAIhD,MAAM,WAAW,uBAAuB;IACtC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAKD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,2CA+B9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAyBhE"}