@perses-dev/plugin-system 0.54.0-beta.8 → 0.54.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.
- package/dist/cjs/components/LinksEditor/LinksEditor.js +162 -0
- package/dist/cjs/components/LinksEditor/index.js +30 -0
- package/dist/cjs/components/MultiQueryEditor/MultiQueryEditor.js +2 -2
- package/dist/cjs/components/MultiQueryEditor/QueryEditorContainer.js +97 -12
- package/dist/cjs/components/MultiQueryEditor/index.js +1 -0
- package/dist/cjs/components/MultiQueryEditor/utils.js +36 -0
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +5 -7
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/context/ValidationProvider.js +3 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/remote/PluginRuntime.js +12 -12
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +21 -28
- package/dist/cjs/runtime/DataQueriesProvider/model.js +3 -119
- package/dist/cjs/runtime/index.js +0 -1
- package/dist/cjs/schema/index.js +30 -0
- package/dist/cjs/schema/panel.js +42 -0
- package/dist/components/LinksEditor/LinksEditor.d.ts +8 -0
- package/dist/components/LinksEditor/LinksEditor.d.ts.map +1 -0
- package/dist/components/LinksEditor/LinksEditor.js +149 -0
- package/dist/components/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/components/LinksEditor/index.d.ts +2 -0
- package/dist/components/LinksEditor/index.d.ts.map +1 -0
- package/dist/components/LinksEditor/index.js +15 -0
- package/dist/components/LinksEditor/index.js.map +1 -0
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js +2 -2
- package/dist/components/MultiQueryEditor/MultiQueryEditor.js.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.d.ts.map +1 -1
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js +99 -14
- package/dist/components/MultiQueryEditor/QueryEditorContainer.js.map +1 -1
- package/dist/components/MultiQueryEditor/index.d.ts +1 -0
- package/dist/components/MultiQueryEditor/index.d.ts.map +1 -1
- package/dist/components/MultiQueryEditor/index.js +1 -0
- package/dist/components/MultiQueryEditor/index.js.map +1 -1
- package/dist/components/MultiQueryEditor/utils.d.ts +8 -0
- package/dist/components/MultiQueryEditor/utils.d.ts.map +1 -0
- package/dist/components/MultiQueryEditor/utils.js +23 -0
- package/dist/components/MultiQueryEditor/utils.js.map +1 -0
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +2 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +6 -8
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/context/ValidationProvider.d.ts +2 -1
- package/dist/context/ValidationProvider.d.ts.map +1 -1
- package/dist/context/ValidationProvider.js +2 -1
- package/dist/context/ValidationProvider.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/model/panels.d.ts +9 -1
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js +3 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/remote/PluginRuntime.js +12 -12
- package/dist/remote/PluginRuntime.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +22 -29
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts +4 -4
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +0 -108
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +1 -2
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +15 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/panel.d.ts +6 -0
- package/dist/schema/panel.d.ts.map +1 -0
- package/dist/{runtime/QueryCountProvider.js → schema/panel.js} +12 -12
- package/dist/schema/panel.js.map +1 -0
- package/package.json +5 -5
- package/dist/cjs/runtime/QueryCountProvider.js +0 -83
- package/dist/runtime/QueryCountProvider.d.ts +0 -9
- package/dist/runtime/QueryCountProvider.d.ts.map +0 -1
- package/dist/runtime/QueryCountProvider.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 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 './panel';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schema/index.ts"],"sourcesContent":["// Copyright 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 './panel';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,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,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PluginSchema } from '@perses-dev/spec';
|
|
3
|
+
import { PanelEditorValues } from '../model';
|
|
4
|
+
export declare const panelEditorSchema: z.ZodSchema<PanelEditorValues>;
|
|
5
|
+
export declare function buildPanelEditorSchema(pluginSchema: PluginSchema): z.ZodSchema<PanelEditorValues>;
|
|
6
|
+
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/schema/panel.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAqD,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAG3D,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAKjG"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
// Copyright The Perses Authors
|
|
3
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
3
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,16 +10,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
11
|
// See the License for the specific language governing permissions and
|
|
13
12
|
// limitations under the License.
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
import { panelDefinitionSchema, buildPanelDefinitionSchema } from '@perses-dev/spec';
|
|
15
|
+
export const panelEditorSchema = z.object({
|
|
16
|
+
groupId: z.number(),
|
|
17
|
+
panelDefinition: panelDefinitionSchema
|
|
18
|
+
});
|
|
19
|
+
export function buildPanelEditorSchema(pluginSchema) {
|
|
20
|
+
return z.object({
|
|
21
|
+
groupId: z.number(),
|
|
22
|
+
panelDefinition: buildPanelDefinitionSchema(pluginSchema)
|
|
20
23
|
});
|
|
21
|
-
}
|
|
22
|
-
export const useQueryCountContext = ()=>{
|
|
23
|
-
return useContext(QueryCountContext);
|
|
24
|
-
};
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schema/panel.ts"],"sourcesContent":["// Copyright 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 { z } from 'zod';\nimport { PluginSchema, panelDefinitionSchema, buildPanelDefinitionSchema } from '@perses-dev/spec';\nimport { PanelEditorValues } from '../model';\n\nexport const panelEditorSchema: z.ZodSchema<PanelEditorValues> = z.object({\n groupId: z.number(),\n panelDefinition: panelDefinitionSchema,\n});\n\nexport function buildPanelEditorSchema(pluginSchema: PluginSchema): z.ZodSchema<PanelEditorValues> {\n return z.object({\n groupId: z.number(),\n panelDefinition: buildPanelDefinitionSchema(pluginSchema),\n });\n}\n"],"names":["z","panelDefinitionSchema","buildPanelDefinitionSchema","panelEditorSchema","object","groupId","number","panelDefinition","buildPanelEditorSchema","pluginSchema"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAAuBC,qBAAqB,EAAEC,0BAA0B,QAAQ,mBAAmB;AAGnG,OAAO,MAAMC,oBAAoDH,EAAEI,MAAM,CAAC;IACxEC,SAASL,EAAEM,MAAM;IACjBC,iBAAiBN;AACnB,GAAG;AAEH,OAAO,SAASO,uBAAuBC,YAA0B;IAC/D,OAAOT,EAAEI,MAAM,CAAC;QACdC,SAASL,EAAEM,MAAM;QACjBC,iBAAiBL,2BAA2BO;IAC9C;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/plugin-system",
|
|
3
|
-
"version": "0.54.0-
|
|
3
|
+
"version": "0.54.0-rc.0",
|
|
4
4
|
"description": "The plugin feature in Pereses",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@module-federation/enhanced": "^2.
|
|
32
|
-
"@perses-dev/components": "0.54.0-
|
|
31
|
+
"@module-federation/enhanced": "^2.6.0",
|
|
32
|
+
"@perses-dev/components": "0.54.0-rc.0",
|
|
33
33
|
"@perses-dev/core": "0.53.0",
|
|
34
|
-
"@perses-dev/spec": "0.2.0-beta.
|
|
35
|
-
"@perses-dev/client": "0.54.0-
|
|
34
|
+
"@perses-dev/spec": "0.2.0-beta.9",
|
|
35
|
+
"@perses-dev/client": "0.54.0-rc.0",
|
|
36
36
|
"date-fns": "^4.1.0",
|
|
37
37
|
"date-fns-tz": "^3.2.0",
|
|
38
38
|
"immer": "^10.1.1",
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Copyright 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: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get QueryCountProvider () {
|
|
25
|
-
return QueryCountProvider;
|
|
26
|
-
},
|
|
27
|
-
get useQueryCountContext () {
|
|
28
|
-
return useQueryCountContext;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
32
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
33
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
34
|
-
if (typeof WeakMap !== "function") return null;
|
|
35
|
-
var cacheBabelInterop = new WeakMap();
|
|
36
|
-
var cacheNodeInterop = new WeakMap();
|
|
37
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
38
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
39
|
-
})(nodeInterop);
|
|
40
|
-
}
|
|
41
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
42
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
46
|
-
return {
|
|
47
|
-
default: obj
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
51
|
-
if (cache && cache.has(obj)) {
|
|
52
|
-
return cache.get(obj);
|
|
53
|
-
}
|
|
54
|
-
var newObj = {
|
|
55
|
-
__proto__: null
|
|
56
|
-
};
|
|
57
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
58
|
-
for(var key in obj){
|
|
59
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
60
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
61
|
-
if (desc && (desc.get || desc.set)) {
|
|
62
|
-
Object.defineProperty(newObj, key, desc);
|
|
63
|
-
} else {
|
|
64
|
-
newObj[key] = obj[key];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
newObj.default = obj;
|
|
69
|
-
if (cache) {
|
|
70
|
-
cache.set(obj, newObj);
|
|
71
|
-
}
|
|
72
|
-
return newObj;
|
|
73
|
-
}
|
|
74
|
-
const QueryCountContext = /*#__PURE__*/ (0, _react.createContext)(0);
|
|
75
|
-
const QueryCountProvider = ({ queryCount, children })=>{
|
|
76
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(QueryCountContext.Provider, {
|
|
77
|
-
value: queryCount,
|
|
78
|
-
children: children
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const useQueryCountContext = ()=>{
|
|
82
|
-
return (0, _react.useContext)(QueryCountContext);
|
|
83
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
interface QueryCountProviderProps {
|
|
3
|
-
queryCount: number;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare const QueryCountProvider: React.FC<QueryCountProviderProps>;
|
|
7
|
-
export declare const useQueryCountContext: () => number;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=QueryCountProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryCountProvider.d.ts","sourceRoot":"","sources":["../../src/runtime/QueryCountProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAID,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAEhE,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,MAEvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/QueryCountProvider.tsx"],"sourcesContent":["// Copyright 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, { createContext, useContext, ReactNode } from 'react';\n\ninterface QueryCountProviderProps {\n queryCount: number;\n children: ReactNode;\n}\n\nconst QueryCountContext = createContext<number>(0);\n\nexport const QueryCountProvider: React.FC<QueryCountProviderProps> = ({ queryCount, children }) => {\n return <QueryCountContext.Provider value={queryCount}>{children}</QueryCountContext.Provider>;\n};\n\nexport const useQueryCountContext = (): number => {\n return useContext(QueryCountContext);\n};\n"],"names":["React","createContext","useContext","QueryCountContext","QueryCountProvider","queryCount","children","Provider","value","useQueryCountContext"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,SAASC,aAAa,EAAEC,UAAU,QAAmB,QAAQ;AAOpE,MAAMC,kCAAoBF,cAAsB;AAEhD,OAAO,MAAMG,qBAAwD,CAAC,EAAEC,UAAU,EAAEC,QAAQ,EAAE;IAC5F,qBAAO,KAACH,kBAAkBI,QAAQ;QAACC,OAAOH;kBAAaC;;AACzD,EAAE;AAEF,OAAO,MAAMG,uBAAuB;IAClC,OAAOP,WAAWC;AACpB,EAAE"}
|