@perses-dev/explore 0.42.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.
- package/LICENSE +201 -0
- package/dist/cjs/components/ExploreToolbar/ExploreToolbar.js +50 -0
- package/dist/cjs/components/ExploreToolbar/index.js +30 -0
- package/dist/cjs/components/PanelEditor/PanelEditorForm.js +138 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +51 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +96 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/index.js +30 -0
- package/dist/cjs/context/usePanelEditor.js +89 -0
- package/dist/cjs/context/useTimeSeriesQueryEditorActions.js +132 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/test/setup-tests.js +23 -0
- package/dist/cjs/views/ViewExplore/ViewExplore.js +67 -0
- package/dist/cjs/views/ViewExplore/ViewExploreApp.js +64 -0
- package/dist/cjs/views/ViewExplore/index.js +30 -0
- package/dist/cjs/views/index.js +30 -0
- package/dist/components/ExploreToolbar/ExploreToolbar.d.ts +6 -0
- package/dist/components/ExploreToolbar/ExploreToolbar.d.ts.map +1 -0
- package/dist/components/ExploreToolbar/ExploreToolbar.js +42 -0
- package/dist/components/ExploreToolbar/ExploreToolbar.js.map +1 -0
- package/dist/components/ExploreToolbar/index.d.ts +2 -0
- package/dist/components/ExploreToolbar/index.d.ts.map +1 -0
- package/dist/components/ExploreToolbar/index.js +15 -0
- package/dist/components/ExploreToolbar/index.js.map +1 -0
- package/dist/components/PanelEditor/PanelEditorForm.d.ts +15 -0
- package/dist/components/PanelEditor/PanelEditorForm.d.ts.map +1 -0
- package/dist/components/PanelEditor/PanelEditorForm.js +125 -0
- package/dist/components/PanelEditor/PanelEditorForm.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +12 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +43 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +12 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +83 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/index.d.ts +2 -0
- package/dist/components/TimeSeriesQueryEditor/index.d.ts.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/index.js +15 -0
- package/dist/components/TimeSeriesQueryEditor/index.js.map +1 -0
- package/dist/context/usePanelEditor.d.ts +15 -0
- package/dist/context/usePanelEditor.d.ts.map +1 -0
- package/dist/context/usePanelEditor.js +84 -0
- package/dist/context/usePanelEditor.js.map +1 -0
- package/dist/context/useTimeSeriesQueryEditorActions.d.ts +14 -0
- package/dist/context/useTimeSeriesQueryEditorActions.d.ts.map +1 -0
- package/dist/context/useTimeSeriesQueryEditorActions.js +119 -0
- package/dist/context/useTimeSeriesQueryEditorActions.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/test/setup-tests.d.ts +2 -0
- package/dist/test/setup-tests.d.ts.map +1 -0
- package/dist/test/setup-tests.js +22 -0
- package/dist/test/setup-tests.js.map +1 -0
- package/dist/views/ViewExplore/ViewExplore.d.ts +12 -0
- package/dist/views/ViewExplore/ViewExplore.d.ts.map +1 -0
- package/dist/views/ViewExplore/ViewExplore.js +59 -0
- package/dist/views/ViewExplore/ViewExplore.js.map +1 -0
- package/dist/views/ViewExplore/ViewExploreApp.d.ts +6 -0
- package/dist/views/ViewExplore/ViewExploreApp.d.ts.map +1 -0
- package/dist/views/ViewExplore/ViewExploreApp.js +56 -0
- package/dist/views/ViewExplore/ViewExploreApp.js.map +1 -0
- package/dist/views/ViewExplore/index.d.ts +2 -0
- package/dist/views/ViewExplore/index.d.ts.map +1 -0
- package/dist/views/ViewExplore/index.js +15 -0
- package/dist/views/ViewExplore/index.js.map +1 -0
- package/dist/views/index.d.ts +2 -0
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/index.js +15 -0
- package/dist/views/index.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './views';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/test/setup-tests.ts"],"names":[],"mappings":"AAgBA,OAAO,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { defaultFallbackInView } from 'react-intersection-observer';
|
|
14
|
+
// Add testing library assertions
|
|
15
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
16
|
+
// Always mock e-charts during tests since we don't have a proper canvas in jsdom
|
|
17
|
+
jest.mock('echarts/core');
|
|
18
|
+
// Tell react-intersection-observer that everything should be considered in-view for tests (see package documentation
|
|
19
|
+
// for other options)
|
|
20
|
+
defaultFallbackInView(true);
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=setup-tests.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
import { DashboardResource } from '@perses-dev/core';
|
|
4
|
+
import { DatasourceStoreProviderProps, TemplateVariableProviderProps } from '@perses-dev/dashboards';
|
|
5
|
+
export interface ViewExploreProps extends Omit<BoxProps, 'children'> {
|
|
6
|
+
dashboardResource: DashboardResource;
|
|
7
|
+
datasourceApi: DatasourceStoreProviderProps['datasourceApi'];
|
|
8
|
+
externalVariableDefinitions?: TemplateVariableProviderProps['externalVariableDefinitions'];
|
|
9
|
+
exploreTitleComponent?: JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export declare function ViewExplore(props: ViewExploreProps): JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ViewExplore.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Box } from '@mui/material';
|
|
15
|
+
import { TimeRangeProviderWithQueryParams, useInitialRefreshInterval, useInitialTimeRange } from '@perses-dev/plugin-system';
|
|
16
|
+
import { DEFAULT_DASHBOARD_DURATION, DEFAULT_REFRESH_INTERVAL } from '@perses-dev/core';
|
|
17
|
+
import { ErrorAlert, ErrorBoundary, combineSx } from '@perses-dev/components';
|
|
18
|
+
import { DatasourceStoreProvider, DashboardProvider, TemplateVariableProvider } from '@perses-dev/dashboards';
|
|
19
|
+
import { ViewExploreApp } from './ViewExploreApp';
|
|
20
|
+
export function ViewExplore(props) {
|
|
21
|
+
const { dashboardResource , datasourceApi , externalVariableDefinitions , sx , exploreTitleComponent , ...others } = props;
|
|
22
|
+
const initialTimeRange = useInitialTimeRange(DEFAULT_DASHBOARD_DURATION);
|
|
23
|
+
const initialRefreshInterval = useInitialRefreshInterval(DEFAULT_REFRESH_INTERVAL);
|
|
24
|
+
return /*#__PURE__*/ _jsx(DatasourceStoreProvider, {
|
|
25
|
+
dashboardResource: dashboardResource,
|
|
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
|
+
})
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=ViewExplore.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Box } from '@mui/material';
|
|
15
|
+
import { ChartsProvider, useChartsTheme } from '@perses-dev/components';
|
|
16
|
+
import { PanelEditorForm } from '../../components/PanelEditor/PanelEditorForm';
|
|
17
|
+
export function ViewExploreApp(props) {
|
|
18
|
+
const { exploreTitleComponent } = props;
|
|
19
|
+
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
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
37
|
+
sx: {
|
|
38
|
+
flexGrow: 1,
|
|
39
|
+
overflowX: 'hidden',
|
|
40
|
+
overflowY: 'auto',
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column'
|
|
43
|
+
},
|
|
44
|
+
children: /*#__PURE__*/ _jsx(ChartsProvider, {
|
|
45
|
+
chartsTheme: chartsTheme,
|
|
46
|
+
enablePinning: false,
|
|
47
|
+
children: /*#__PURE__*/ _jsx(PanelEditorForm, {
|
|
48
|
+
initialAction: "update",
|
|
49
|
+
initialValues: data,
|
|
50
|
+
exploreTitleComponent: exploreTitleComponent
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=ViewExploreApp.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/ViewExplore/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './ViewExplore';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/views/ViewExplore/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 './ViewExplore';\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,gBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/views/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
export * from './ViewExplore';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/views/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 './ViewExplore';\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,gBAAgB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@perses-dev/explore",
|
|
3
|
+
"version": "0.42.0",
|
|
4
|
+
"description": "The explore feature in Perses",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/perses/perses.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/perses/perses/issues"
|
|
13
|
+
},
|
|
14
|
+
"module": "dist/index.js",
|
|
15
|
+
"main": "dist/cjs/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rimraf dist/",
|
|
20
|
+
"build": "concurrently \"npm:build:*\"",
|
|
21
|
+
"build:cjs": "swc ./src -d dist/cjs --config-file ../.cjs.swcrc",
|
|
22
|
+
"build:esm": "swc ./src -d dist --config-file ../.swcrc",
|
|
23
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"start": "concurrently -P \"npm:build:* -- {*}\" -- --watch",
|
|
26
|
+
"test": "cross-env TZ=UTC jest",
|
|
27
|
+
"test:watch": "npm run test -- --watch",
|
|
28
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
29
|
+
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@perses-dev/components": "0.42.0",
|
|
33
|
+
"@perses-dev/core": "0.42.0",
|
|
34
|
+
"@perses-dev/plugin-system": "0.42.0",
|
|
35
|
+
"@perses-dev/dashboards": "0.42.0",
|
|
36
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
37
|
+
"date-fns": "^2.28.0",
|
|
38
|
+
"immer": "^9.0.15",
|
|
39
|
+
"mdi-material-ui": "^7.4.0",
|
|
40
|
+
"react-grid-layout": "^1.3.4",
|
|
41
|
+
"react-hook-form": "^7.46.1",
|
|
42
|
+
"react-intersection-observer": "^9.4.0",
|
|
43
|
+
"use-immer": "^0.7.0",
|
|
44
|
+
"use-query-params": "^2.1.1",
|
|
45
|
+
"use-resize-observer": "^9.0.0",
|
|
46
|
+
"zustand": "^4.3.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@perses-dev/internal-utils": "0.42.0",
|
|
50
|
+
"@perses-dev/storybook": "0.42.0",
|
|
51
|
+
"history": "^5.3.0",
|
|
52
|
+
"intersection-observer": "^0.12.2"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@mui/material": "^5.10.0",
|
|
56
|
+
"@tanstack/react-query": "^4.7.1",
|
|
57
|
+
"react": "^17.0.2 || ^18.0.0",
|
|
58
|
+
"react-dom": "^17.0.2 || ^18.0.0"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"dist"
|
|
62
|
+
]
|
|
63
|
+
}
|