@eox/chart 1.2.1 → 1.2.2
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/eox-chart.js +11982 -13036
- package/dist/eox-chart.umd.cjs +22 -26
- package/package.json +5 -5
- package/src/main.js +2 -2
- package/src/methods/encode/encode-spec-b64.js +8 -2
- package/src/methods/render/render-chart.js +1 -1
- package/types/main.d.ts +2 -2
- package/types/main.d.ts.map +1 -1
- package/types/methods/encode/encode-spec-b64.d.ts.map +1 -1
- package/types/methods/render/render-chart.d.ts +2 -2
- package/types/methods/render/render-chart.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/chart",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git@github.com:EOX-A/EOxElements.git"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"vite": "^8.
|
|
10
|
+
"vite": "^8.3.5"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
13
|
"npm": ">=8.0.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@eox/elements-utils": "^1.2.0",
|
|
41
41
|
"@eox/ui": "^1.1.0",
|
|
42
|
-
"deepmerge-ts": "^
|
|
42
|
+
"deepmerge-ts": "^8.0.2",
|
|
43
43
|
"lit": "^3.3.3",
|
|
44
44
|
"vega": "^6.4.0",
|
|
45
|
-
"vega-embed": "^7.
|
|
46
|
-
"vega-lite": "^6.
|
|
45
|
+
"vega-embed": "^7.3.0",
|
|
46
|
+
"vega-lite": "^6.5.0"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/main.js
CHANGED
|
@@ -65,14 +65,14 @@ export class EOxChart extends LitElement {
|
|
|
65
65
|
/**
|
|
66
66
|
* Renders the element without a shadow root
|
|
67
67
|
*
|
|
68
|
-
* @type {
|
|
68
|
+
* @type {boolean}
|
|
69
69
|
*/
|
|
70
70
|
this.noShadow = false;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Render the element without additional styles
|
|
74
74
|
*
|
|
75
|
-
* @type {
|
|
75
|
+
* @type {boolean}
|
|
76
76
|
*/
|
|
77
77
|
this.unstyled = false;
|
|
78
78
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const CHUNK_SIZE = 8192;
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Encode object to base64 string
|
|
3
5
|
* @param {import("vega-embed").VisualizationSpec} chartSpec
|
|
@@ -8,8 +10,12 @@ const base64EncodeSpec = (chartSpec) => {
|
|
|
8
10
|
const json = JSON.stringify(chartSpec);
|
|
9
11
|
const encoder = new TextEncoder();
|
|
10
12
|
const data = encoder.encode(json);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
let binaryString = "";
|
|
14
|
+
for (let i = 0; i < data.length; i += CHUNK_SIZE) {
|
|
15
|
+
const chunk = data.subarray(i, i + CHUNK_SIZE);
|
|
16
|
+
// @ts-expect-error Argument of type 'Uint8Array' is not assignable to parameter of type 'number[]'.
|
|
17
|
+
binaryString += String.fromCharCode.apply(null, chunk);
|
|
18
|
+
}
|
|
13
19
|
return btoa(binaryString);
|
|
14
20
|
};
|
|
15
21
|
export default base64EncodeSpec;
|
|
@@ -7,7 +7,7 @@ import { DEFAULT_SPEC, DEFAULT_OPT } from "../../enums";
|
|
|
7
7
|
*
|
|
8
8
|
* @param {import("../../main").EOxChart} EOxChart The eox-chart instance
|
|
9
9
|
* @param {import("vega-embed").VisualizationSpec} spec
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {object=} dataValues
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
const renderChartMethod = (EOxChart, spec, opt, dataValues) => {
|
package/types/main.d.ts
CHANGED
|
@@ -64,13 +64,13 @@ export class EOxChart extends LitElement {
|
|
|
64
64
|
/**
|
|
65
65
|
* Renders the element without a shadow root
|
|
66
66
|
*
|
|
67
|
-
* @type {
|
|
67
|
+
* @type {boolean}
|
|
68
68
|
*/
|
|
69
69
|
noShadow: boolean;
|
|
70
70
|
/**
|
|
71
71
|
* Render the element without additional styles
|
|
72
72
|
*
|
|
73
|
-
* @type {
|
|
73
|
+
* @type {boolean}
|
|
74
74
|
*/
|
|
75
75
|
unstyled: boolean;
|
|
76
76
|
/**
|
package/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACE;;;;;;;;;;;;;;;;;MAME;IAKA;;;;OAIG;IACH,MAFU,OAAO,YAAY,EAAE,iBAAiB,GAAG,MAAM,CAEpC;IAErB;;;;OAIG;IACH,KAFU,OAAO,YAAY,EAAE,YAAY,CAEvB;IAEpB;;;;OAIG;IACH,YAFU;QAAC,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,kCAAkC,EAAE,UAAU,CAAA;KAAC,GAAG,MAAM,CAEzE;IAE3B;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACE;;;;;;;;;;;;;;;;;MAME;IAKA;;;;OAIG;IACH,MAFU,OAAO,YAAY,EAAE,iBAAiB,GAAG,MAAM,CAEpC;IAErB;;;;OAIG;IACH,KAFU,OAAO,YAAY,EAAE,YAAY,CAEvB;IAEpB;;;;OAIG;IACH,YAFU;QAAC,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,kCAAkC,EAAE,UAAU,CAAA;KAAC,GAAG,MAAM,CAEzE;IAE3B;;;;OAIG;IACH,UAFU,OAAO,CAEI;IAErB;;;;OAIG;IACH,UAFU,OAAO,CAEI;IAErB;;;;;OAKG;IACH,wBAA2B;IAE3B;;;;;OAKG;IACH,kBAAqB;IAGvB;;OAEG;IACH,sCAUC;IAED;;OAEG;IACH,gCAUC;IAED;;;;OAIG;IACH,2BAFW,OAAO,KAAK,EAAE,cAAc,iBAQtC;IASD;;OAEG;IACH,qBA0CC;IASD;;OAEG;IACH,+CAQC;CACF;2BAnNgC,KAAK;iCAKL,kBAAkB;0BADzB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode-spec-b64.d.ts","sourceRoot":"","sources":["../../../src/methods/encode/encode-spec-b64.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"encode-spec-b64.d.ts","sourceRoot":"","sources":["../../../src/methods/encode/encode-spec-b64.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,6CAHW,OAAO,YAAY,EAAE,iBAAiB,GACpC,MAAM,CAclB"}
|
|
@@ -4,8 +4,8 @@ export default renderChartMethod;
|
|
|
4
4
|
*
|
|
5
5
|
* @param {import("../../main").EOxChart} EOxChart The eox-chart instance
|
|
6
6
|
* @param {import("vega-embed").VisualizationSpec} spec
|
|
7
|
-
* @param {
|
|
7
|
+
* @param {object=} dataValues
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
declare function renderChartMethod(EOxChart: import("../../main").EOxChart, spec: import("vega-embed").VisualizationSpec, opt: any, dataValues?:
|
|
10
|
+
declare function renderChartMethod(EOxChart: import("../../main").EOxChart, spec: import("vega-embed").VisualizationSpec, opt: any, dataValues?: object | undefined): void;
|
|
11
11
|
//# sourceMappingURL=render-chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-chart.d.ts","sourceRoot":"","sources":["../../../src/methods/render/render-chart.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AACH,6CALW,OAAO,YAAY,EAAE,QAAQ,QAC7B,OAAO,YAAY,EAAE,iBAAiB,yBACtC,
|
|
1
|
+
{"version":3,"file":"render-chart.d.ts","sourceRoot":"","sources":["../../../src/methods/render/render-chart.js"],"names":[],"mappings":";AAIA;;;;;;;GAOG;AACH,6CALW,OAAO,YAAY,EAAE,QAAQ,QAC7B,OAAO,YAAY,EAAE,iBAAiB,yBACtC,MAAM,YAAC,QA8BjB"}
|