@perses-dev/core 0.4.0 → 0.5.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/utils/panel-refs.js +1 -1
- package/dist/model/layout.d.ts +7 -5
- package/dist/model/layout.d.ts.map +1 -1
- package/dist/model/panels.d.ts +2 -1
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/resource.d.ts +1 -0
- package/dist/model/resource.d.ts.map +1 -1
- package/dist/utils/panel-refs.js +1 -1
- package/package.json +1 -2
|
@@ -18,7 +18,7 @@ exports.resolvePanelRef = void 0;
|
|
|
18
18
|
* a PanelDefinition.
|
|
19
19
|
*/
|
|
20
20
|
function resolvePanelRef(spec, panelRef) {
|
|
21
|
-
const panelsKey = panelRef.$ref.substring(
|
|
21
|
+
const panelsKey = panelRef.$ref.substring(14);
|
|
22
22
|
const panelDefinition = spec.panels[panelsKey];
|
|
23
23
|
if (panelDefinition === undefined) {
|
|
24
24
|
throw new Error(`Could not resolve panels reference ${panelRef.$ref}`);
|
package/dist/model/layout.d.ts
CHANGED
|
@@ -2,13 +2,15 @@ import { PanelRef } from './panels';
|
|
|
2
2
|
export declare type LayoutDefinition = GridDefinition;
|
|
3
3
|
export interface GridDefinition {
|
|
4
4
|
kind: 'Grid';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
spec: {
|
|
6
|
+
display?: {
|
|
7
|
+
title: string;
|
|
8
|
+
collapse?: {
|
|
9
|
+
open: boolean;
|
|
10
|
+
};
|
|
9
11
|
};
|
|
12
|
+
items: GridItemDefinition[];
|
|
10
13
|
};
|
|
11
|
-
items: GridItemDefinition[];
|
|
12
14
|
}
|
|
13
15
|
export interface GridItemDefinition {
|
|
14
16
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/model/layout.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,oBAAY,gBAAgB,GAAG,cAAc,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/model/layout.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,oBAAY,gBAAgB,GAAG,cAAc,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAC;YACd,QAAQ,CAAC,EAAE;gBACT,IAAI,EAAE,OAAO,CAAC;aACf,CAAC;SACH,CAAC;QACF,KAAK,EAAE,kBAAkB,EAAE,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,QAAQ,CAAC;CACnB"}
|
package/dist/model/panels.d.ts
CHANGED
|
@@ -5,12 +5,13 @@ import { Definition, JsonObject } from './definitions';
|
|
|
5
5
|
export interface PanelDefinition<Options extends JsonObject = JsonObject> extends Definition<Options> {
|
|
6
6
|
display: {
|
|
7
7
|
name: string;
|
|
8
|
+
description?: string;
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* A reference to a panel defined in the DashboardSpec.
|
|
12
13
|
*/
|
|
13
14
|
export interface PanelRef {
|
|
14
|
-
$ref: `#/panels/${string}`;
|
|
15
|
+
$ref: `#/spec/panels/${string}`;
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=panels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/model/panels.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,UAAU,CAAC,OAAO,CAAC;IACnG,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/model/panels.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,UAAU,CAAC,OAAO,CAAC;IACnG,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,iBAAiB,MAAM,EAAE,CAAC;CACjC"}
|
package/dist/model/resource.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAaA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAItD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAaA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAItD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,eAAe,GAAG,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/utils/panel-refs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function resolvePanelRef(e,r){const n=r.$ref.substring(
|
|
1
|
+
export function resolvePanelRef(e,r){const n=r.$ref.substring(14),o=e.panels[n];if(void 0===o)throw new Error(`Could not resolve panels reference ${r.$ref}`);return o}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Core functionality consumed by both the Perses UI and plugins",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@perses-dev/core": "^0.4.0",
|
|
27
26
|
"date-fns": "^2.28.0",
|
|
28
27
|
"lodash-es": "^4.17.21"
|
|
29
28
|
},
|