@perses-dev/explore 0.51.0-beta.0 → 0.51.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ExploreManager/ExploreManager.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 { Card, Stack, Tab, Tabs, useMediaQuery } from '@mui/material';\nimport { PluginLoaderComponent, useListPluginMetadata } from '@perses-dev/plugin-system';\nimport { ReactElement, ReactNode, useEffect, useMemo } from 'react';\nimport { ExploreToolbar } from '../ExploreToolbar';\nimport { useExplorerManagerContext } from './ExplorerManagerProvider';\n\nexport interface ExploreManagerProps {\n exploreTitleComponent?: ReactNode;\n}\n\nexport function ExploreManager(props: ExploreManagerProps): ReactElement {\n const { exploreTitleComponent } = props;\n const { explorer, setExplorer } = useExplorerManagerContext();\n\n const plugins = useListPluginMetadata(['Explore']);\n\n const smallScreen = useMediaQuery('(max-width: 768px)');\n\n const explorerPluginsMap = useMemo(\n () =>\n Object.fromEntries(plugins.data?.map((plugin) => [`${plugin.module.name}-${plugin.spec.name}`, plugin]) ?? []),\n [plugins.data]\n );\n\n useEffect(() => {\n const plugins = Object.keys(explorerPluginsMap);\n if (!explorer && plugins?.[0]) {\n setExplorer(plugins[0]);\n }\n }, [explorerPluginsMap, explorer, setExplorer]);\n\n const currentPlugin = explorer ? explorerPluginsMap[explorer] : undefined;\n\n if (!explorer) {\n return <div>No explorer plugin available</div>;\n }\n\n return (\n <Stack sx={{ width: '100%' }} px={2} pb={2} pt={1.5} gap={3}>\n <ExploreToolbar exploreTitleComponent={exploreTitleComponent} />\n\n <Stack direction={smallScreen ? 'column' : 'row'} gap={2} sx={{ width: '100%' }}>\n <Tabs\n orientation={smallScreen ? 'horizontal' : 'vertical'}\n value={explorer}\n onChange={(_, state) => setExplorer(state)}\n variant={smallScreen ? 'fullWidth' : 'scrollable'}\n sx={{\n borderRight: smallScreen ? 0 : 1,\n borderBottom: smallScreen ? 1 : 0,\n borderColor: 'divider',\n minWidth: '100px',\n }}\n >\n {plugins.data?.map((plugin) => (\n <Tab\n key={`${plugin.module.name}-${plugin.spec.name}`}\n value={`${plugin.module.name}-${plugin.spec.name}`}\n label={plugin.spec.display.name}\n />\n ))}\n </Tabs>\n <Card sx={{ padding: '10px', width: '100%' }}>\n {currentPlugin && (\n <PluginLoaderComponent\n key={`${currentPlugin.module.name}-${currentPlugin.spec.name}`}\n plugin={{\n name: currentPlugin.spec.name,\n moduleName: currentPlugin.module.name,\n }}\n />\n )}\n </Card>\n </Stack>\n </Stack>\n );\n}\n"],"names":["Card","Stack","Tab","Tabs","useMediaQuery","PluginLoaderComponent","useListPluginMetadata","useEffect","useMemo","ExploreToolbar","useExplorerManagerContext","ExploreManager","props","exploreTitleComponent","explorer","setExplorer","plugins","smallScreen","explorerPluginsMap","Object","fromEntries","data","map","plugin","module","name","spec","keys","currentPlugin","undefined","div","sx","width","px","pb","pt","gap","direction","orientation","value","onChange","_","state","variant","borderRight","borderBottom","borderColor","minWidth","label","display","padding","moduleName"],"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,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,aAAa,QAAQ,gBAAgB;AACtE,SAASC,qBAAqB,EAAEC,qBAAq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YAAY2B;wBACpCC,SAAS1B,cAAc,cAAc;wBACrCc,IAAI;4BACFa,aAAa3B,cAAc,IAAI;4BAC/B4B,cAAc5B,cAAc,IAAI;4BAChC6B,aAAa;4BACbC,UAAU;wBACZ;kCAEC/B,QAAQK,IAAI,EAAEC,IAAI,CAACC,uBAClB,KAACrB;gCAECqC,OAAO,CAAC,EAAEhB,OAAOC,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEF,OAAOG,IAAI,CAACD,IAAI,CAAC,CAAC;gCAClDuB,OAAOzB,OAAOG,IAAI,CAACuB,OAAO,CAACxB,IAAI;+BAF1B,CAAC,EAAEF,OAAOC,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEF,OAAOG,IAAI,CAACD,IAAI,CAAC,CAAC;;kCAMtD,KAACzB;wBAAK+B,IAAI;4BAAEmB,SAAS;4BAAQlB,OAAO;wBAAO;kCACxCJ,+BACC,KAACvB;4BAECkB,QAAQ;gCACNE,MAAMG,cAAcF,IAAI,CAACD,IAAI;gCAC7B0B,YAAYvB,cAAcJ,MAAM,CAACC,IAAI;4BACvC;2BAJK,CAAC,EAAEG,cAAcJ,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEG,cAAcF,IAAI,CAACD,IAAI,CAAC,CAAC;;;;;;AAW5E"}
1
+ {"version":3,"sources":["../../../src/components/ExploreManager/ExploreManager.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 { Card, Stack, Tab, Tabs, useMediaQuery } from '@mui/material';\nimport { PluginLoaderComponent, useListPluginMetadata } from '@perses-dev/plugin-system';\nimport { ReactElement, ReactNode, useEffect, useMemo } from 'react';\nimport { ExploreToolbar } from '../ExploreToolbar';\nimport { useExplorerManagerContext } from './ExplorerManagerProvider';\n\nexport interface ExploreManagerProps {\n exploreTitleComponent?: ReactNode;\n}\n\nexport function ExploreManager(props: ExploreManagerProps): ReactElement {\n const { exploreTitleComponent } = props;\n const { explorer, setExplorer } = useExplorerManagerContext();\n\n const plugins = useListPluginMetadata(['Explore']);\n\n const smallScreen = useMediaQuery('(max-width: 768px)');\n\n const explorerPluginsMap = useMemo(\n () =>\n Object.fromEntries(plugins.data?.map((plugin) => [`${plugin.module.name}-${plugin.spec.name}`, plugin]) ?? []),\n [plugins.data]\n );\n\n useEffect(() => {\n const plugins = Object.keys(explorerPluginsMap);\n if (!explorer && plugins?.[0]) {\n setExplorer(plugins[0]);\n }\n }, [explorerPluginsMap, explorer, setExplorer]);\n\n const currentPlugin = explorer ? explorerPluginsMap[explorer] : undefined;\n\n if (!explorer) {\n return <div>No explorer plugin available</div>;\n }\n\n return (\n <Stack sx={{ width: '100%' }} px={2} pb={2} pt={1.5} gap={3}>\n <ExploreToolbar exploreTitleComponent={exploreTitleComponent} />\n\n <Stack direction={smallScreen ? 'column' : 'row'} gap={2} sx={{ width: '100%' }}>\n <Tabs\n orientation={smallScreen ? 'horizontal' : 'vertical'}\n value={explorer}\n onChange={(_, state) => setExplorer(state)}\n variant={smallScreen ? 'fullWidth' : 'scrollable'}\n sx={{\n borderRight: smallScreen ? 0 : 1,\n borderBottom: smallScreen ? 1 : 0,\n borderColor: 'divider',\n minWidth: '100px',\n }}\n >\n {plugins.data?.map((plugin) => (\n <Tab\n key={`${plugin.module.name}-${plugin.spec.name}`}\n value={`${plugin.module.name}-${plugin.spec.name}`}\n label={plugin.spec.display.name}\n />\n ))}\n </Tabs>\n <Card sx={{ padding: '10px', width: '100%' }}>\n {currentPlugin && (\n <PluginLoaderComponent\n key={`${currentPlugin.module.name}-${currentPlugin.spec.name}`}\n plugin={{\n name: currentPlugin.spec.name,\n moduleName: currentPlugin.module.name,\n }}\n />\n )}\n </Card>\n </Stack>\n </Stack>\n );\n}\n"],"names":["Card","Stack","Tab","Tabs","useMediaQuery","PluginLoaderComponent","useListPluginMetadata","useEffect","useMemo","ExploreToolbar","useExplorerManagerContext","ExploreManager","props","exploreTitleComponent","explorer","setExplorer","plugins","smallScreen","explorerPluginsMap","Object","fromEntries","data","map","plugin","module","name","spec","keys","currentPlugin","undefined","div","sx","width","px","pb","pt","gap","direction","orientation","value","onChange","_","state","variant","borderRight","borderBottom","borderColor","minWidth","label","display","padding","moduleName"],"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,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAEC,IAAI,EAAEC,aAAa,QAAQ,gBAAgB;AACtE,SAASC,qBAAqB,EAAEC,qBAAqB,QAAQ,4BAA4B;AACzF,SAAkCC,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AACpE,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,yBAAyB,QAAQ,4BAA4B;AAMtE,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,qBAAqB,EAAE,GAAGD;IAClC,MAAM,EAAEE,QAAQ,EAAEC,WAAW,EAAE,GAAGL;IAElC,MAAMM,UAAUV,sBAAsB;QAAC;KAAU;IAEjD,MAAMW,cAAcb,cAAc;IAElC,MAAMc,qBAAqBV,QACzB,IACEW,OAAOC,WAAW,CAACJ,QAAQK,IAAI,EAAEC,IAAI,CAACC,SAAW;gBAAC,GAAGA,OAAOC,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEF,OAAOG,IAAI,CAACD,IAAI,EAAE;gBAAEF;aAAO,KAAK,EAAE,GAC/G;QAACP,QAAQK,IAAI;KAA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AI,CAACD,IAAI;gCAC7B0B,YAAYvB,cAAcJ,MAAM,CAACC,IAAI;4BACvC;2BAJK,GAAGG,cAAcJ,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEG,cAAcF,IAAI,CAACD,IAAI,EAAE;;;;;;AAW5E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/explore",
3
- "version": "0.51.0-beta.0",
3
+ "version": "0.51.0-rc.0",
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",
@@ -28,27 +28,26 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@nexucis/fuzzy": "^0.5.1",
31
- "@perses-dev/components": "0.51.0-beta.0",
32
- "@perses-dev/core": "0.51.0-beta.0",
33
- "@perses-dev/dashboards": "0.51.0-beta.0",
34
- "@perses-dev/plugin-system": "0.51.0-beta.0",
31
+ "@perses-dev/components": "0.51.0-rc.0",
32
+ "@perses-dev/core": "0.51.0-rc.0",
33
+ "@perses-dev/dashboards": "0.51.0-rc.0",
34
+ "@perses-dev/plugin-system": "0.51.0-rc.0",
35
35
  "@types/react-grid-layout": "^1.3.2",
36
- "date-fns": "^2.28.0",
37
- "immer": "^9.0.15",
36
+ "date-fns": "^4.1.0",
37
+ "immer": "^10.1.1",
38
38
  "mdi-material-ui": "^7.9.2",
39
39
  "qs": "^6.13.0",
40
40
  "react-grid-layout": "^1.3.4",
41
41
  "react-hook-form": "^7.46.1",
42
42
  "react-intersection-observer": "^9.4.0",
43
43
  "react-virtuoso": "^4.12.2",
44
- "use-immer": "^0.7.0",
44
+ "use-immer": "^0.11.0",
45
45
  "use-query-params": "^2.1.1",
46
46
  "use-resize-observer": "^9.0.0",
47
47
  "zustand": "^4.3.3"
48
48
  },
49
49
  "devDependencies": {
50
- "@perses-dev/internal-utils": "0.51.0-beta.0",
51
- "@perses-dev/storybook": "0.51.0-beta.0",
50
+ "@perses-dev/internal-utils": "0.51.0-rc.0",
52
51
  "history": "^5.3.0",
53
52
  "intersection-observer": "^0.12.2",
54
53
  "react-router-dom": "^6.11.0"