@perses-dev/plugin-system 0.27.0 → 0.29.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/PanelSpecEditor/PanelSpecEditor.js +75 -0
- package/dist/cjs/components/PanelSpecEditor/index.js +28 -0
- package/dist/cjs/components/PluginEditor/PluginEditor.js +2 -2
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +27 -6
- package/dist/cjs/components/{PluginKindSelect.js → PluginKindSelect/PluginKindSelect.js} +1 -1
- package/dist/cjs/components/PluginKindSelect/index.js +28 -0
- package/dist/cjs/components/{PluginSpecEditor.js → PluginSpecEditor/PluginSpecEditor.js} +2 -30
- package/dist/cjs/components/PluginSpecEditor/index.js +28 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +142 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +94 -0
- package/dist/cjs/components/TimeSeriesQueryEditor/index.js +28 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +88 -0
- package/dist/cjs/runtime/DataQueriesProvider/index.js +29 -0
- package/dist/cjs/runtime/DataQueriesProvider/model.js +16 -0
- package/dist/cjs/runtime/index.js +1 -0
- package/dist/cjs/test/render.js +4 -1
- package/dist/cjs/test/test-plugins/bert/index.js +27 -20
- package/dist/cjs/test/test-plugins/ernie/index.js +37 -4
- package/dist/cjs/test-utils/mock-plugin-registry.js +4 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +10 -0
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -0
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +69 -0
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -0
- package/dist/components/PanelSpecEditor/index.d.ts +2 -0
- package/dist/components/PanelSpecEditor/index.d.ts.map +1 -0
- package/dist/components/PanelSpecEditor/index.js +15 -0
- package/dist/components/PanelSpecEditor/index.js.map +1 -0
- package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +2 -2
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts +4 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +27 -6
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/{PluginKindSelect.d.ts → PluginKindSelect/PluginKindSelect.d.ts} +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -0
- package/dist/components/{PluginKindSelect.js → PluginKindSelect/PluginKindSelect.js} +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -0
- package/dist/components/PluginKindSelect/index.d.ts +2 -0
- package/dist/components/PluginKindSelect/index.d.ts.map +1 -0
- package/dist/components/PluginKindSelect/index.js +15 -0
- package/dist/components/PluginKindSelect/index.js.map +1 -0
- package/dist/components/PluginRegistry/PluginRegistry.d.ts +2 -2
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/{PluginSpecEditor.d.ts → PluginSpecEditor/PluginSpecEditor.d.ts} +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -0
- package/dist/components/{PluginSpecEditor.js → PluginSpecEditor/PluginSpecEditor.js} +3 -31
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -0
- package/dist/components/PluginSpecEditor/index.d.ts +2 -0
- package/dist/components/PluginSpecEditor/index.d.ts.map +1 -0
- package/dist/components/PluginSpecEditor/index.js +15 -0
- package/dist/components/PluginSpecEditor/index.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +8 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +131 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -0
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +13 -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/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/model/panels.d.ts +6 -5
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-base.d.ts +7 -0
- package/dist/model/plugin-base.d.ts.map +1 -1
- package/dist/model/plugin-base.js.map +1 -1
- package/dist/model/plugins.d.ts +3 -1
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +8 -0
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -0
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +74 -0
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/index.d.ts +3 -0
- package/dist/runtime/DataQueriesProvider/index.d.ts.map +1 -0
- package/dist/runtime/DataQueriesProvider/index.js +16 -0
- package/dist/runtime/DataQueriesProvider/index.js.map +1 -0
- package/dist/runtime/DataQueriesProvider/model.d.ts +27 -0
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -0
- package/dist/runtime/DataQueriesProvider/model.js +15 -0
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +1 -1
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +4 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/test-plugins/bert/index.d.ts.map +1 -1
- package/dist/test/test-plugins/bert/index.js +27 -20
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.d.ts +4 -1
- package/dist/test/test-plugins/ernie/index.d.ts.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +28 -1
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +4 -1
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/components/TimeSeriesQueryEditor.js +0 -42
- package/dist/components/PluginKindSelect.d.ts.map +0 -1
- package/dist/components/PluginKindSelect.js.map +0 -1
- package/dist/components/PluginSpecEditor.d.ts.map +0 -1
- package/dist/components/PluginSpecEditor.js.map +0 -1
- package/dist/components/TimeSeriesQueryEditor.d.ts +0 -14
- package/dist/components/TimeSeriesQueryEditor.d.ts.map +0 -1
- package/dist/components/TimeSeriesQueryEditor.js +0 -38
- package/dist/components/TimeSeriesQueryEditor.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PluginRegistry/PluginRegistry.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 { UnknownSpec, useEvent } from '@perses-dev/core';\nimport { useRef, useCallback, useMemo } from 'react';\nimport {\n PluginModuleResource,\n PluginType,\n PluginImplementation,\n Plugin,\n PluginLoader,\n DefaultPluginKinds,\n} from '../../model';\nimport { PluginRegistryContext } from '../../runtime';\nimport { usePluginIndexes, getTypeAndKindKey } from './plugin-indexes';\n\nexport interface PluginRegistryProps {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PluginRegistry/PluginRegistry.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 { UnknownSpec, useEvent } from '@perses-dev/core';\nimport { useRef, useCallback, useMemo } from 'react';\nimport {\n PluginModuleResource,\n PluginType,\n PluginImplementation,\n Plugin,\n PluginLoader,\n DefaultPluginKinds,\n} from '../../model';\nimport { PluginRegistryContext } from '../../runtime';\nimport { usePluginIndexes, getTypeAndKindKey } from './plugin-indexes';\n\nexport interface PluginRegistryProps {\n pluginLoader: PluginLoader;\n defaultPluginKinds: DefaultPluginKinds;\n children?: React.ReactNode;\n}\n\n/**\n * PluginRegistryContext provider that keeps track of all available plugins and provides an API for getting them or\n * querying the metadata about them.\n */\nexport function PluginRegistry(props: PluginRegistryProps) {\n const {\n pluginLoader: { getInstalledPlugins, importPluginModule },\n children,\n defaultPluginKinds,\n } = props;\n\n const getPluginIndexes = usePluginIndexes(getInstalledPlugins);\n\n // De-dupe calls to import plugin modules\n const importCache = useRef(new Map<PluginModuleResource, Promise<unknown>>());\n\n // Do useEvent here since this accesses the importPluginModule prop and we want a stable reference to it for the\n // callback below\n const loadPluginModule = useEvent((resource: PluginModuleResource) => {\n let request = importCache.current.get(resource);\n if (request === undefined) {\n request = importPluginModule(resource);\n importCache.current.set(resource, request);\n\n // Remove failed requests from the cache so they can potentially be retried\n request.catch(() => importCache.current.delete(resource));\n }\n return request;\n });\n\n const getPlugin = useCallback(\n async <T extends PluginType>(pluginType: T, kind: string): Promise<PluginImplementation<T>> => {\n // Get the indexes of the installed plugins\n const pluginIndexes = await getPluginIndexes();\n\n // Figure out what module the plugin is in by looking in the index\n const typeAndKindKey = getTypeAndKindKey(pluginType, kind);\n const resource = pluginIndexes.pluginResourcesByTypeAndKind.get(typeAndKindKey);\n if (resource === undefined) {\n throw new Error(`A ${pluginType} plugin for kind '${kind}' is not installed`);\n }\n\n // Treat the plugin module as a bunch of named exports that have plugins\n const pluginModule = (await loadPluginModule(resource)) as Record<string, Plugin<UnknownSpec>>;\n\n // We currently assume that plugin modules will have named exports that match the kinds they handle\n const plugin = pluginModule[kind];\n if (plugin === undefined) {\n throw new Error(\n `The ${pluginType} plugin for kind '${kind}' is missing from the ${resource.metadata.name} plugin module`\n );\n }\n\n return plugin as PluginImplementation<T>;\n },\n [getPluginIndexes, loadPluginModule]\n );\n\n const listPluginMetadata = useCallback(\n async (pluginType: PluginType) => {\n const pluginIndexes = await getPluginIndexes();\n return pluginIndexes.pluginMetadataByType.get(pluginType) ?? [];\n },\n [getPluginIndexes]\n );\n\n // Create the registry's context value and render\n const context = useMemo(\n () => ({ getPlugin, listPluginMetadata, defaultPluginKinds }),\n [getPlugin, listPluginMetadata, defaultPluginKinds]\n );\n return <PluginRegistryContext.Provider value={context}>{children}</PluginRegistryContext.Provider>;\n}\n"],"names":["useEvent","useRef","useCallback","useMemo","PluginRegistryContext","usePluginIndexes","getTypeAndKindKey","PluginRegistry","props","pluginLoader","getInstalledPlugins","importPluginModule","children","defaultPluginKinds","getPluginIndexes","importCache","Map","loadPluginModule","resource","request","current","get","undefined","set","catch","delete","getPlugin","pluginType","kind","pluginIndexes","typeAndKindKey","pluginResourcesByTypeAndKind","Error","pluginModule","plugin","metadata","name","listPluginMetadata","pluginMetadataByType","context","Provider","value"],"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;AAAA,SAAsBA,QAAQ,QAAQ,kBAAkB,CAAC;AACzD,SAASC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO,CAAC;AASrD,SAASC,qBAAqB,QAAQ,eAAe,CAAC;AACtD,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,kBAAkB,CAAC;AAQvE;;;CAGC,GACD,OAAO,SAASC,cAAc,CAACC,KAA0B,EAAE;IACzD,MAAM,EACJC,YAAY,EAAE,EAAEC,mBAAmB,CAAA,EAAEC,kBAAkB,CAAA,EAAE,CAAA,EACzDC,QAAQ,CAAA,EACRC,kBAAkB,CAAA,IACnB,GAAGL,KAAK,AAAC;IAEV,MAAMM,gBAAgB,GAAGT,gBAAgB,CAACK,mBAAmB,CAAC,AAAC;IAE/D,yCAAyC;IACzC,MAAMK,WAAW,GAAGd,MAAM,CAAC,IAAIe,GAAG,EAA0C,CAAC,AAAC;IAE9E,gHAAgH;IAChH,iBAAiB;IACjB,MAAMC,gBAAgB,GAAGjB,QAAQ,CAAC,CAACkB,QAA8B,GAAK;QACpE,IAAIC,OAAO,GAAGJ,WAAW,CAACK,OAAO,CAACC,GAAG,CAACH,QAAQ,CAAC,AAAC;QAChD,IAAIC,OAAO,KAAKG,SAAS,E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;QAACpB,gBAAgB;QAAEG,gBAAgB;KAAC,CACrC,AAAC;IAEF,MAAMoB,kBAAkB,GAAGnC,WAAW,CACpC,OAAOyB,UAAsB,GAAK;QAChC,MAAME,aAAa,GAAG,MAAMf,gBAAgB,EAAE,AAAC;YACxCe,GAAkD;QAAzD,OAAOA,CAAAA,GAAkD,GAAlDA,aAAa,CAACS,oBAAoB,CAACjB,GAAG,CAACM,UAAU,CAAC,cAAlDE,GAAkD,cAAlDA,GAAkD,GAAI,EAAE,CAAC;IAClE,CAAC,EACD;QAACf,gBAAgB;KAAC,CACnB,AAAC;IAEF,iDAAiD;IACjD,MAAMyB,OAAO,GAAGpC,OAAO,CACrB,IAAO,CAAA;YAAEuB,SAAS;YAAEW,kBAAkB;YAAExB,kBAAkB;SAAE,CAAA,AAAC,EAC7D;QAACa,SAAS;QAAEW,kBAAkB;QAAExB,kBAAkB;KAAC,CACpD,AAAC;IACF,qBAAO,KAACT,qBAAqB,CAACoC,QAAQ;QAACC,KAAK,EAAEF,OAAO;kBAAG3B,QAAQ;MAAkC,CAAC;AACrG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UnknownSpec } from '@perses-dev/core';
|
|
3
|
-
import { OptionsEditorProps, PluginType } from '
|
|
3
|
+
import { OptionsEditorProps, PluginType } from '../../model';
|
|
4
4
|
export interface PluginSpecEditorProps extends OptionsEditorProps<UnknownSpec> {
|
|
5
5
|
pluginType: PluginType;
|
|
6
6
|
pluginKind: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginSpecEditor.d.ts","sourceRoot":"","sources":["../../../src/components/PluginSpecEditor/PluginSpecEditor.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC5E,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,sBA4B5D"}
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { ErrorAlert
|
|
15
|
-
import { usePlugin } from '
|
|
16
|
-
import { OptionsEditorTabs } from './OptionsEditorTabs';
|
|
14
|
+
import { ErrorAlert } from '@perses-dev/components';
|
|
15
|
+
import { usePlugin } from '../../runtime';
|
|
17
16
|
export function PluginSpecEditor(props) {
|
|
18
17
|
const { pluginType , pluginKind , ...others } = props;
|
|
19
18
|
const { data: plugin , isLoading , error } = usePlugin(pluginType, pluginKind);
|
|
@@ -30,34 +29,7 @@ export function PluginSpecEditor(props) {
|
|
|
30
29
|
throw new Error(`Missing implementation for ${pluginType} plugin with kind '${pluginKind}'`);
|
|
31
30
|
}
|
|
32
31
|
if (pluginType === 'Panel') {
|
|
33
|
-
|
|
34
|
-
let tabs = [];
|
|
35
|
-
if (PanelQueryEditorComponent !== undefined) {
|
|
36
|
-
tabs.push({
|
|
37
|
-
label: 'Query',
|
|
38
|
-
content: /*#__PURE__*/ _jsx(PanelQueryEditorComponent, {
|
|
39
|
-
...others
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (panelOptionsEditorComponents !== undefined) {
|
|
44
|
-
tabs = tabs.concat(panelOptionsEditorComponents.map(({ label , content: OptionsEditorComponent })=>({
|
|
45
|
-
label,
|
|
46
|
-
content: /*#__PURE__*/ _jsx(OptionsEditorComponent, {
|
|
47
|
-
...others
|
|
48
|
-
})
|
|
49
|
-
})));
|
|
50
|
-
}
|
|
51
|
-
// always show json editor by default
|
|
52
|
-
tabs.push({
|
|
53
|
-
label: 'JSON',
|
|
54
|
-
content: /*#__PURE__*/ _jsx(JSONEditor, {
|
|
55
|
-
...others
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
return /*#__PURE__*/ _jsx(OptionsEditorTabs, {
|
|
59
|
-
tabs: tabs
|
|
60
|
-
});
|
|
32
|
+
throw new Error('This editor should not be used for panel type. Please use Panel Spec Editor instead.');
|
|
61
33
|
}
|
|
62
34
|
const { OptionsEditorComponent } = plugin;
|
|
63
35
|
if (OptionsEditorComponent !== undefined) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PluginSpecEditor/PluginSpecEditor.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 { ErrorAlert } from '@perses-dev/components';\nimport { UnknownSpec } from '@perses-dev/core';\nimport { OptionsEditorProps, PluginType } from '../../model';\nimport { usePlugin } from '../../runtime';\n\nexport interface PluginSpecEditorProps extends OptionsEditorProps<UnknownSpec> {\n pluginType: PluginType;\n pluginKind: string;\n}\n\nexport function PluginSpecEditor(props: PluginSpecEditorProps) {\n const { pluginType, pluginKind, ...others } = props;\n const { data: plugin, isLoading, error } = usePlugin(pluginType, pluginKind);\n\n if (error) {\n return <ErrorAlert error={error} />;\n }\n\n // TODO: Proper loading indicator\n if (isLoading) {\n return null;\n }\n\n if (plugin === undefined) {\n throw new Error(`Missing implementation for ${pluginType} plugin with kind '${pluginKind}'`);\n }\n\n if (pluginType === 'Panel') {\n throw new Error('This editor should not be used for panel type. Please use Panel Spec Editor instead.');\n }\n\n const { OptionsEditorComponent } = plugin;\n\n if (OptionsEditorComponent !== undefined) {\n return <OptionsEditorComponent {...others} />;\n }\n\n return null;\n}\n"],"names":["ErrorAlert","usePlugin","PluginSpecEditor","props","pluginType","pluginKind","others","data","plugin","isLoading","error","undefined","Error","OptionsEditorComponent"],"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;AAAA,SAASA,UAAU,QAAQ,wBAAwB,CAAC;AAGpD,SAASC,SAAS,QAAQ,eAAe,CAAC;AAO1C,OAAO,SAASC,gBAAgB,CAACC,KAA4B,EAAE;IAC7D,MAAM,EAAEC,UAAU,CAAA,EAAEC,UAAU,CAAA,EAAE,GAAGC,MAAM,EAAE,GAAGH,KAAK,AAAC;IACpD,MAAM,EAAEI,IAAI,EAAEC,MAAM,CAAA,EAAEC,SAAS,CAAA,EAAEC,KAAK,CAAA,EAAE,GAAGT,SAAS,CAACG,UAAU,EAAEC,UAAU,CAAC,AAAC;IAE7E,IAAIK,KAAK,EAAE;QACT,qBAAO,KAACV,UAAU;YAACU,KAAK,EAAEA,KAAK;UAAI,CAAC;IACtC,CAAC;IAED,iCAAiC;IACjC,IAAID,SAAS,EAAE;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAID,MAAM,KAAKG,SAAS,EAAE;QACxB,MAAM,IAAIC,KAAK,CAAC,CAAC,2BAA2B,EAAER,UAAU,CAAC,mBAAmB,EAAEC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED,IAAID,UAAU,KAAK,OAAO,EAAE;QAC1B,MAAM,IAAIQ,KAAK,CAAC,sFAAsF,CAAC,CAAC;IAC1G,CAAC;IAED,MAAM,EAAEC,sBAAsB,CAAA,EAAE,GAAGL,MAAM,AAAC;IAE1C,IAAIK,sBAAsB,KAAKF,SAAS,EAAE;QACxC,qBAAO,KAACE,sBAAsB;YAAE,GAAGP,MAAM;UAAI,CAAC;IAChD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PluginSpecEditor/index.tsx"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,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 './PluginSpecEditor';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PluginSpecEditor/index.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\nexport * from './PluginSpecEditor';\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,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TimeSeriesQueryDefinition, QueryDefinition } from '@perses-dev/core';
|
|
3
|
+
export interface TimeSeriesQueryEditorProps {
|
|
4
|
+
queries?: TimeSeriesQueryDefinition[];
|
|
5
|
+
onChange: (queries: QueryDefinition[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function TimeSeriesQueryEditor({ queries, onChange }: TimeSeriesQueryEditorProps): JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TimeSeriesQueryEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeSeriesQueryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAM9E,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACtC,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAChD;AAED,wBAAgB,qBAAqB,CAAC,EAAE,OAAY,EAAE,QAAQ,EAAE,EAAE,0BAA0B,eAwG3F"}
|
|
@@ -0,0 +1,131 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useState } from 'react';
|
|
15
|
+
import { produce } from 'immer';
|
|
16
|
+
import { Button, Stack } from '@mui/material';
|
|
17
|
+
import AddIcon from 'mdi-material-ui/Plus';
|
|
18
|
+
import { usePlugin, usePluginRegistry } from '../../runtime';
|
|
19
|
+
import { TimeSeriesQueryInput } from './TimeSeriesQueryInput';
|
|
20
|
+
const DEFAULT_QUERY_PLUGIN_TYPE = 'TimeSeriesQuery';
|
|
21
|
+
export function TimeSeriesQueryEditor({ queries =[] , onChange }) {
|
|
22
|
+
const hasMoreThanOneQuery = queries.length > 1;
|
|
23
|
+
const { defaultPluginKinds } = usePluginRegistry();
|
|
24
|
+
var ref;
|
|
25
|
+
const defaultTimeSeriesQueryKind = (ref = defaultPluginKinds === null || defaultPluginKinds === void 0 ? void 0 : defaultPluginKinds[DEFAULT_QUERY_PLUGIN_TYPE]) !== null && ref !== void 0 ? ref : '';
|
|
26
|
+
const { data: defaultQueryPlugin } = usePlugin(DEFAULT_QUERY_PLUGIN_TYPE, defaultTimeSeriesQueryKind, {
|
|
27
|
+
useErrorBoundary: true,
|
|
28
|
+
enabled: true
|
|
29
|
+
});
|
|
30
|
+
// State for which queries are collapsed
|
|
31
|
+
// TODO: Would be easier if we had IDs for queries.
|
|
32
|
+
const [queriesCollapsed, setQueriesCollapsed] = useState(queries.map(()=>false));
|
|
33
|
+
// Query handlers
|
|
34
|
+
const handleQueryChange = (index, queryDef)=>{
|
|
35
|
+
onChange(produce(queries, (draft)=>{
|
|
36
|
+
if (draft) {
|
|
37
|
+
draft[index] = queryDef;
|
|
38
|
+
} else {
|
|
39
|
+
draft = [
|
|
40
|
+
queryDef
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
const handleQueryAdd = ()=>{
|
|
46
|
+
if (!defaultQueryPlugin) return;
|
|
47
|
+
onChange(produce(queries, (draft)=>{
|
|
48
|
+
const queryDef = {
|
|
49
|
+
kind: DEFAULT_QUERY_PLUGIN_TYPE,
|
|
50
|
+
spec: {
|
|
51
|
+
plugin: {
|
|
52
|
+
kind: defaultTimeSeriesQueryKind,
|
|
53
|
+
spec: defaultQueryPlugin.createInitialOptions()
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
if (draft) {
|
|
58
|
+
draft.push(queryDef);
|
|
59
|
+
} else {
|
|
60
|
+
draft = [
|
|
61
|
+
...queries,
|
|
62
|
+
queryDef
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
setQueriesCollapsed((queriesCollapsed)=>{
|
|
67
|
+
queriesCollapsed.push(false);
|
|
68
|
+
return [
|
|
69
|
+
...queriesCollapsed
|
|
70
|
+
];
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
const handleQueryDelete = (index)=>{
|
|
74
|
+
onChange(produce(queries, (draft)=>{
|
|
75
|
+
draft.splice(index, 1);
|
|
76
|
+
}));
|
|
77
|
+
setQueriesCollapsed((queriesCollapsed)=>{
|
|
78
|
+
queriesCollapsed.splice(index, 1);
|
|
79
|
+
return [
|
|
80
|
+
...queriesCollapsed
|
|
81
|
+
];
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const handleQueryCollapseExpand = (index)=>{
|
|
85
|
+
setQueriesCollapsed((queriesCollapsed)=>{
|
|
86
|
+
queriesCollapsed[index] = !queriesCollapsed[index];
|
|
87
|
+
return [
|
|
88
|
+
...queriesCollapsed
|
|
89
|
+
];
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var ref1;
|
|
93
|
+
// show one query input if queries is empty
|
|
94
|
+
const queryDefinitions = queries.length ? queries : [
|
|
95
|
+
{
|
|
96
|
+
kind: 'TimeSeriesQuery',
|
|
97
|
+
spec: {
|
|
98
|
+
plugin: {
|
|
99
|
+
kind: (ref1 = defaultPluginKinds === null || defaultPluginKinds === void 0 ? void 0 : defaultPluginKinds['TimeSeriesQuery']) !== null && ref1 !== void 0 ? ref1 : '',
|
|
100
|
+
spec: {
|
|
101
|
+
query: ''
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
];
|
|
107
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
108
|
+
spacing: 1,
|
|
109
|
+
children: [
|
|
110
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
111
|
+
variant: "contained",
|
|
112
|
+
startIcon: /*#__PURE__*/ _jsx(AddIcon, {}),
|
|
113
|
+
sx: {
|
|
114
|
+
marginLeft: 'auto'
|
|
115
|
+
},
|
|
116
|
+
onClick: handleQueryAdd,
|
|
117
|
+
children: "Add Query"
|
|
118
|
+
}),
|
|
119
|
+
queryDefinitions.map((query, i)=>/*#__PURE__*/ _jsx(TimeSeriesQueryInput, {
|
|
120
|
+
index: i,
|
|
121
|
+
query: query,
|
|
122
|
+
isCollapsed: !!queriesCollapsed[i],
|
|
123
|
+
onChange: handleQueryChange,
|
|
124
|
+
onDelete: hasMoreThanOneQuery ? handleQueryDelete : undefined,
|
|
125
|
+
onCollapseExpand: handleQueryCollapseExpand
|
|
126
|
+
}, i))
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=TimeSeriesQueryEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.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 { useState } from 'react';\nimport { produce } from 'immer';\nimport { Button, Stack } from '@mui/material';\nimport AddIcon from 'mdi-material-ui/Plus';\nimport { TimeSeriesQueryDefinition, QueryDefinition } from '@perses-dev/core';\nimport { usePlugin, usePluginRegistry } from '../../runtime';\nimport { TimeSeriesQueryInput } from './TimeSeriesQueryInput';\n\nconst DEFAULT_QUERY_PLUGIN_TYPE = 'TimeSeriesQuery';\n\nexport interface TimeSeriesQueryEditorProps {\n queries?: TimeSeriesQueryDefinition[];\n onChange: (queries: QueryDefinition[]) => void;\n}\n\nexport function TimeSeriesQueryEditor({ queries = [], onChange }: TimeSeriesQueryEditorProps) {\n const hasMoreThanOneQuery = queries.length > 1;\n const { defaultPluginKinds } = usePluginRegistry();\n const defaultTimeSeriesQueryKind = defaultPluginKinds?.[DEFAULT_QUERY_PLUGIN_TYPE] ?? '';\n\n const { data: defaultQueryPlugin } = usePlugin(DEFAULT_QUERY_PLUGIN_TYPE, defaultTimeSeriesQueryKind, {\n useErrorBoundary: true,\n enabled: true,\n });\n\n // State for which queries are collapsed\n // TODO: Would be easier if we had IDs for queries.\n const [queriesCollapsed, setQueriesCollapsed] = useState(queries.map(() => false));\n\n // Query handlers\n const handleQueryChange = (index: number, queryDef: TimeSeriesQueryDefinition) => {\n onChange(\n produce(queries, (draft) => {\n if (draft) {\n draft[index] = queryDef;\n } else {\n draft = [queryDef];\n }\n })\n );\n };\n\n const handleQueryAdd = () => {\n if (!defaultQueryPlugin) return;\n onChange(\n produce(queries, (draft) => {\n const queryDef: TimeSeriesQueryDefinition = {\n kind: DEFAULT_QUERY_PLUGIN_TYPE,\n spec: {\n plugin: { kind: defaultTimeSeriesQueryKind, spec: defaultQueryPlugin.createInitialOptions() },\n },\n };\n if (draft) {\n draft.push(queryDef);\n } else {\n draft = [...queries, queryDef];\n }\n })\n );\n setQueriesCollapsed((queriesCollapsed) => {\n queriesCollapsed.push(false);\n return [...queriesCollapsed];\n });\n };\n\n const handleQueryDelete = (index: number) => {\n onChange(\n produce(queries, (draft) => {\n draft.splice(index, 1);\n })\n );\n setQueriesCollapsed((queriesCollapsed) => {\n queriesCollapsed.splice(index, 1);\n return [...queriesCollapsed];\n });\n };\n\n const handleQueryCollapseExpand = (index: number) => {\n setQueriesCollapsed((queriesCollapsed) => {\n queriesCollapsed[index] = !queriesCollapsed[index];\n return [...queriesCollapsed];\n });\n };\n\n // show one query input if queries is empty\n const queryDefinitions: TimeSeriesQueryDefinition[] = queries.length\n ? queries\n : [\n {\n kind: 'TimeSeriesQuery',\n spec: {\n plugin: {\n kind: defaultPluginKinds?.['TimeSeriesQuery'] ?? '',\n spec: {\n query: '',\n },\n },\n },\n },\n ];\n\n return (\n <Stack spacing={1}>\n <Button variant=\"contained\" startIcon={<AddIcon />} sx={{ marginLeft: 'auto' }} onClick={handleQueryAdd}>\n Add Query\n </Button>\n {queryDefinitions.map((query: TimeSeriesQueryDefinition, i: number) => (\n <TimeSeriesQueryInput\n key={i}\n index={i}\n query={query}\n isCollapsed={!!queriesCollapsed[i]}\n onChange={handleQueryChange}\n onDelete={hasMoreThanOneQuery ? handleQueryDelete : undefined}\n onCollapseExpand={handleQueryCollapseExpand}\n />\n ))}\n </Stack>\n );\n}\n"],"names":["useState","produce","Button","Stack","AddIcon","usePlugin","usePluginRegistry","TimeSeriesQueryInput","DEFAULT_QUERY_PLUGIN_TYPE","TimeSeriesQueryEditor","queries","onChange","hasMoreThanOneQuery","length","defaultPluginKinds","defaultTimeSeriesQueryKind","data","defaultQueryPlugin","useErrorBoundary","enabled","queriesCollapsed","setQueriesCollapsed","map","handleQueryChange","index","queryDef","draft","handleQueryAdd","kind","spec","plugin","createInitialOptions","push","handleQueryDelete","splice","handleQueryCollapseExpand","queryDefinitions","query","spacing","variant","startIcon","sx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BAAgB,CAACd,GAAG,CAAC,CAACe,KAAgC,EAAEO,CAAS,iBAChE,KAACrC,oBAAoB;oBAEnBiB,KAAK,EAAEoB,CAAC;oBACRP,KAAK,EAAEA,KAAK;oBACZQ,WAAW,EAAE,CAAC,CAACzB,gBAAgB,CAACwB,CAAC,CAAC;oBAClCjC,QAAQ,EAAEY,iBAAiB;oBAC3BuB,QAAQ,EAAElC,mBAAmB,GAAGqB,iBAAiB,GAAGc,SAAS;oBAC7DC,gBAAgB,EAAEb,yBAAyB;mBANtCS,CAAC,CAON,AACH,CAAC;;MACI,CACR;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TimeSeriesQueryDefinition } from '@perses-dev/core';
|
|
3
|
+
interface TimeSeriesQueryInputProps {
|
|
4
|
+
query: TimeSeriesQueryDefinition;
|
|
5
|
+
index: number;
|
|
6
|
+
onChange: (index: number, query: TimeSeriesQueryDefinition) => void;
|
|
7
|
+
onCollapseExpand: (index: number) => void;
|
|
8
|
+
isCollapsed?: boolean;
|
|
9
|
+
onDelete?: (index: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TimeSeriesQueryInput: ({ index, query, isCollapsed, onDelete, onChange, onCollapseExpand, }: TimeSeriesQueryInputProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=TimeSeriesQueryInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeSeriesQueryInput.d.ts","sourceRoot":"","sources":["../../../src/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAO7D,UAAU,yBAAyB;IACjC,KAAK,EAAE,yBAAyB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACpE,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,yEAO9B,yBAAyB,gBAsB3B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import produce from 'immer';
|
|
15
|
+
import { Stack, IconButton, Typography, Box } from '@mui/material';
|
|
16
|
+
import DeleteIcon from 'mdi-material-ui/DeleteOutline';
|
|
17
|
+
import ChevronDown from 'mdi-material-ui/ChevronDown';
|
|
18
|
+
import ChevronRight from 'mdi-material-ui/ChevronRight';
|
|
19
|
+
import { PluginEditor } from '../PluginEditor';
|
|
20
|
+
export const TimeSeriesQueryInput = ({ index , query , isCollapsed , onDelete , onChange , onCollapseExpand })=>{
|
|
21
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
22
|
+
spacing: 1,
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
25
|
+
direction: "row",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
borderBottom: 1,
|
|
28
|
+
borderColor: (theme)=>theme.palette.divider,
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
31
|
+
size: "small",
|
|
32
|
+
onClick: ()=>onCollapseExpand(index),
|
|
33
|
+
children: isCollapsed ? /*#__PURE__*/ _jsx(ChevronRight, {}) : /*#__PURE__*/ _jsx(ChevronDown, {})
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsxs(Typography, {
|
|
36
|
+
variant: "overline",
|
|
37
|
+
component: "h4",
|
|
38
|
+
children: [
|
|
39
|
+
"Query ",
|
|
40
|
+
index + 1
|
|
41
|
+
]
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
44
|
+
size: "small",
|
|
45
|
+
// Use `visibility` to ensure that the row has the same height when delete button is visible or not visible
|
|
46
|
+
sx: {
|
|
47
|
+
marginLeft: 'auto',
|
|
48
|
+
visibility: `${onDelete ? 'visible' : 'hidden'}`
|
|
49
|
+
},
|
|
50
|
+
onClick: ()=>onDelete && onDelete(index),
|
|
51
|
+
children: /*#__PURE__*/ _jsx(DeleteIcon, {})
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
!isCollapsed && /*#__PURE__*/ _jsx(QueryEditor, {
|
|
56
|
+
value: query,
|
|
57
|
+
onChange: (next)=>onChange(index, next)
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}, index);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Displays an editor for TimeSeriesQueryDefinition objects.
|
|
64
|
+
*/ function QueryEditor(props) {
|
|
65
|
+
const { value , onChange , ...others } = props;
|
|
66
|
+
const { spec: { plugin } , } = value;
|
|
67
|
+
const handlePluginChange = (next)=>{
|
|
68
|
+
onChange(produce(value, (draft)=>{
|
|
69
|
+
draft.spec.plugin = next;
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
73
|
+
...others,
|
|
74
|
+
children: /*#__PURE__*/ _jsx(PluginEditor, {
|
|
75
|
+
pluginType: "TimeSeriesQuery",
|
|
76
|
+
pluginKindLabel: "Query Type",
|
|
77
|
+
value: plugin,
|
|
78
|
+
onChange: handlePluginChange
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=TimeSeriesQueryInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.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 produce from 'immer';\nimport { TimeSeriesQueryDefinition } from '@perses-dev/core';\nimport { Stack, IconButton, Typography, BoxProps, Box } from '@mui/material';\nimport DeleteIcon from 'mdi-material-ui/DeleteOutline';\nimport ChevronDown from 'mdi-material-ui/ChevronDown';\nimport ChevronRight from 'mdi-material-ui/ChevronRight';\nimport { PluginEditor, PluginEditorProps } from '../PluginEditor';\n\ninterface TimeSeriesQueryInputProps {\n query: TimeSeriesQueryDefinition;\n index: number;\n onChange: (index: number, query: TimeSeriesQueryDefinition) => void;\n onCollapseExpand: (index: number) => void;\n isCollapsed?: boolean;\n onDelete?: (index: number) => void;\n}\n\nexport const TimeSeriesQueryInput = ({\n index,\n query,\n isCollapsed,\n onDelete,\n onChange,\n onCollapseExpand,\n}: TimeSeriesQueryInputProps) => {\n return (\n <Stack key={index} spacing={1}>\n <Stack direction=\"row\" alignItems=\"center\" borderBottom={1} borderColor={(theme) => theme.palette.divider}>\n <IconButton size=\"small\" onClick={() => onCollapseExpand(index)}>\n {isCollapsed ? <ChevronRight /> : <ChevronDown />}\n </IconButton>\n <Typography variant=\"overline\" component=\"h4\">\n Query {index + 1}\n </Typography>\n <IconButton\n size=\"small\"\n // Use `visibility` to ensure that the row has the same height when delete button is visible or not visible\n sx={{ marginLeft: 'auto', visibility: `${onDelete ? 'visible' : 'hidden'}` }}\n onClick={() => onDelete && onDelete(index)}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n {!isCollapsed && <QueryEditor value={query} onChange={(next) => onChange(index, next)} />}\n </Stack>\n );\n};\n\n// Props on MUI Box that we don't want people to pass because we're either redefining them or providing them in\n// this component\ntype OmittedMuiProps = 'children' | 'value' | 'onChange';\n\ninterface QueryEditorProps extends Omit<BoxProps, OmittedMuiProps> {\n value: TimeSeriesQueryDefinition;\n onChange: (next: TimeSeriesQueryDefinition) => void;\n}\n\n/**\n * Displays an editor for TimeSeriesQueryDefinition objects.\n */\nfunction QueryEditor(props: QueryEditorProps) {\n const { value, onChange, ...others } = props;\n const {\n spec: { plugin },\n } = value;\n\n const handlePluginChange: PluginEditorProps['onChange'] = (next) => {\n onChange(\n produce(value, (draft) => {\n draft.spec.plugin = next;\n })\n );\n };\n\n return (\n <Box {...others}>\n {/* If TimeSeriesQuery plugins ever have common props on the definition, the inputs could go here */}\n <PluginEditor\n pluginType=\"TimeSeriesQuery\"\n pluginKindLabel=\"Query Type\"\n value={plugin}\n onChange={handlePluginChange}\n />\n </Box>\n );\n}\n"],"names":["produce","Stack","IconButton","Typography","Box","DeleteIcon","ChevronDown","ChevronRight","PluginEditor","TimeSeriesQueryInput","index","query","isCollapsed","onDelete","onChange","onCollapseExpand","spacing","direction","alignItems","borderBottom","borderColor","theme","palette","divider","size","onClick","variant","component","sx","marginLeft","visibility","QueryEditor","value","next","props","others","spec","plugin","handlePluginChange","draft","pluginType","pluginKindLabel"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AACl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|
+
// 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 './TimeSeriesQueryEditor';
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TimeSeriesQueryEditor/index.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\nexport * from './TimeSeriesQueryEditor';\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,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
export * from './CalculationSelector';
|
|
14
14
|
export * from './DatasourceSelect';
|
|
15
15
|
export * from './OptionsEditorTabs';
|
|
16
|
+
export * from './PanelSpecEditor';
|
|
16
17
|
export * from './PluginEditor';
|
|
17
18
|
export * from './PluginKindSelect';
|
|
18
19
|
export * from './PluginRegistry';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/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 './CalculationSelector';\nexport * from './DatasourceSelect';\nexport * from './OptionsEditorTabs';\nexport * from './PluginEditor';\nexport * from './PluginKindSelect';\nexport * from './PluginRegistry';\nexport * from './PluginSpecEditor';\nexport * from './TimeSeriesQueryEditor';\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,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/components/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 './CalculationSelector';\nexport * from './DatasourceSelect';\nexport * from './OptionsEditorTabs';\nexport * from './PanelSpecEditor';\nexport * from './PluginEditor';\nexport * from './PluginKindSelect';\nexport * from './PluginRegistry';\nexport * from './PluginSpecEditor';\nexport * from './TimeSeriesQueryEditor';\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,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/dist/model/panels.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UnknownSpec } from '@perses-dev/core';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { UnknownSpec } from '@perses-dev/core';
|
|
3
3
|
import { OptionsEditorTab } from '../components';
|
|
4
4
|
import { OptionsEditorProps, Plugin } from './plugin-base';
|
|
5
5
|
export declare type PanelOptionsEditorComponent<T> = Pick<OptionsEditorTab, 'label'> & {
|
|
@@ -10,14 +10,15 @@ export declare type PanelOptionsEditorComponent<T> = Pick<OptionsEditorTab, 'lab
|
|
|
10
10
|
*/
|
|
11
11
|
export interface PanelPlugin<Spec = UnknownSpec> extends Plugin<Spec> {
|
|
12
12
|
PanelComponent: React.ComponentType<PanelProps<Spec>>;
|
|
13
|
-
/**
|
|
14
|
-
* React component for the content of "Query" tab
|
|
15
|
-
*/
|
|
16
|
-
PanelQueryEditorComponent?: React.ComponentType<OptionsEditorProps<Spec>>;
|
|
17
13
|
/**
|
|
18
14
|
* React components for custom tabs
|
|
19
15
|
*/
|
|
20
16
|
panelOptionsEditorComponents?: Array<PanelOptionsEditorComponent<Spec>>;
|
|
17
|
+
/**
|
|
18
|
+
* If true, query editor will be hidden for panel plugin
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
hideQueryEditor?: boolean;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* The props provided by Perses to a panel plugin's PanelComponent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/model/panels.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/model/panels.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE3D,oBAAY,2BAA2B,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG;IAC7E,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;CACrD,CAAC;AACF;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,IAAI,GAAG,WAAW,CAAE,SAAQ,MAAM,CAAC,IAAI,CAAC;IACnE,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD;;OAEG;IACH,4BAA4B,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,IAAI;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,iBAAiB,CAAC,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
|
package/dist/model/panels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/panels.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 { UnknownSpec } from '@perses-dev/core';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/model/panels.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 React from 'react';\nimport { UnknownSpec } from '@perses-dev/core';\nimport { OptionsEditorTab } from '../components';\nimport { OptionsEditorProps, Plugin } from './plugin-base';\n\nexport type PanelOptionsEditorComponent<T> = Pick<OptionsEditorTab, 'label'> & {\n content: React.ComponentType<OptionsEditorProps<T>>;\n};\n/**\n * Plugin the provides custom visualizations inside of a Panel.\n */\nexport interface PanelPlugin<Spec = UnknownSpec> extends Plugin<Spec> {\n PanelComponent: React.ComponentType<PanelProps<Spec>>;\n /**\n * React components for custom tabs\n */\n panelOptionsEditorComponents?: Array<PanelOptionsEditorComponent<Spec>>;\n /**\n * If true, query editor will be hidden for panel plugin\n * @default false\n */\n hideQueryEditor?: boolean;\n}\n\n/**\n * The props provided by Perses to a panel plugin's PanelComponent.\n */\nexport interface PanelProps<Spec> {\n spec: Spec;\n contentDimensions?: {\n width: number;\n height: number;\n };\n}\n"],"names":["React"],"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,KAAK,MAAM,OAAO,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QueryDefinition } from '@perses-dev/core';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* Base type of all plugin implementations.
|
|
@@ -19,4 +20,10 @@ export interface OptionsEditorProps<Spec> {
|
|
|
19
20
|
value: Spec;
|
|
20
21
|
onChange: (next: Spec) => void;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Common props passed to query editor component
|
|
25
|
+
*/
|
|
26
|
+
export interface QueryEditorProps<Spec> extends OptionsEditorProps<Spec> {
|
|
27
|
+
queries: QueryDefinition[];
|
|
28
|
+
}
|
|
22
29
|
//# sourceMappingURL=plugin-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.d.ts","sourceRoot":"","sources":["../../src/model/plugin-base.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,MAAM,CAAC,IAAI;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvE;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,IAAI;IAGtC,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC"}
|
|
1
|
+
{"version":3,"file":"plugin-base.d.ts","sourceRoot":"","sources":["../../src/model/plugin-base.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,MAAM,CAAC,IAAI;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvE;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,IAAI;IAGtC,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,CAAE,SAAQ,kBAAkB,CAAC,IAAI,CAAC;IACtE,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/plugin-base.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 React from 'react';\n\n/**\n * Base type of all plugin implementations.\n */\nexport interface Plugin<Spec> {\n /**\n * React component for editing the plugin's options in the UI.\n */\n OptionsEditorComponent?: React.ComponentType<OptionsEditorProps<Spec>>;\n\n /**\n * Callback for creating the initial options for the plugin.\n */\n createInitialOptions: () => Spec;\n}\n\n/**\n * Common props passed to options editor components.\n */\nexport interface OptionsEditorProps<Spec> {\n // TODO: These are temporary and may not actually make sense, so replace\n // with whatever makes sense as visual editing evolves\n value: Spec;\n onChange: (next: Spec) => void;\n}\n"],"names":["React"],"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;
|
|
1
|
+
{"version":3,"sources":["../../src/model/plugin-base.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 { QueryDefinition } from '@perses-dev/core';\nimport React from 'react';\n\n/**\n * Base type of all plugin implementations.\n */\nexport interface Plugin<Spec> {\n /**\n * React component for editing the plugin's options in the UI.\n */\n OptionsEditorComponent?: React.ComponentType<OptionsEditorProps<Spec>>;\n\n /**\n * Callback for creating the initial options for the plugin.\n */\n createInitialOptions: () => Spec;\n}\n\n/**\n * Common props passed to options editor components.\n */\nexport interface OptionsEditorProps<Spec> {\n // TODO: These are temporary and may not actually make sense, so replace\n // with whatever makes sense as visual editing evolves\n value: Spec;\n onChange: (next: Spec) => void;\n}\n\n/**\n * Common props passed to query editor component\n */\nexport interface QueryEditorProps<Spec> extends OptionsEditorProps<Spec> {\n queries: QueryDefinition[];\n}\n"],"names":["React"],"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;AAGjC,OAAOA,KAAK,MAAM,OAAO,CAAC"}
|
package/dist/model/plugins.d.ts
CHANGED
|
@@ -50,5 +50,7 @@ export declare type PluginImplementation<Type extends PluginType> = SupportedPlu
|
|
|
50
50
|
/**
|
|
51
51
|
* Default plugin kinds by plugin type.
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
declare type PluginKinds = Partial<Record<PluginType, string>>;
|
|
54
|
+
export declare type DefaultPluginKinds = Required<Pick<PluginKinds, 'TimeSeriesQuery'>> & Omit<PluginKinds, 'TimeSeriesQuery'>;
|
|
55
|
+
export {};
|
|
54
56
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/model/plugins.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED;;;GAGG;AACH,oBAAY,UAAU,GAAG;KAEtB,CAAC,IAAI,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK;CAC3F,CAAC,MAAM,gBAAgB,CAAC,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,eAAe,EAAE,qB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