@hpcc-js/marshaller 3.1.0 → 3.2.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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +17 -17
- package/src/dashy.ts +8 -0
- package/src/ddl2/dashboard.ts +9 -0
- package/src/ddl2/model/visualization.ts +1 -1
- package/types/dashy.d.ts +2 -0
- package/types/ddl2/dashboard.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/marshaller",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "hpcc-js - Viz Marshaller",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -39,23 +39,23 @@
|
|
|
39
39
|
"update-major": "npx --yes npm-check-updates -u"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hpcc-js/chart": "^3.7.
|
|
43
|
-
"@hpcc-js/codemirror": "^3.7.
|
|
44
|
-
"@hpcc-js/common": "^3.7.
|
|
45
|
-
"@hpcc-js/comms": "^3.15.
|
|
46
|
-
"@hpcc-js/composite": "^3.5.
|
|
47
|
-
"@hpcc-js/ddl-shim": "^3.3.
|
|
48
|
-
"@hpcc-js/dgrid": "^3.7.
|
|
49
|
-
"@hpcc-js/form": "^3.4.
|
|
50
|
-
"@hpcc-js/graph": "^3.7.
|
|
51
|
-
"@hpcc-js/layout": "^3.5.
|
|
52
|
-
"@hpcc-js/map": "^3.5.
|
|
53
|
-
"@hpcc-js/other": "^3.5.
|
|
54
|
-
"@hpcc-js/phosphor": "^3.6.
|
|
55
|
-
"@hpcc-js/util": "^3.5.
|
|
42
|
+
"@hpcc-js/chart": "^3.7.7",
|
|
43
|
+
"@hpcc-js/codemirror": "^3.7.7",
|
|
44
|
+
"@hpcc-js/common": "^3.7.8",
|
|
45
|
+
"@hpcc-js/comms": "^3.15.8",
|
|
46
|
+
"@hpcc-js/composite": "^3.5.9",
|
|
47
|
+
"@hpcc-js/ddl-shim": "^3.3.7",
|
|
48
|
+
"@hpcc-js/dgrid": "^3.7.8",
|
|
49
|
+
"@hpcc-js/form": "^3.4.7",
|
|
50
|
+
"@hpcc-js/graph": "^3.7.7",
|
|
51
|
+
"@hpcc-js/layout": "^3.5.13",
|
|
52
|
+
"@hpcc-js/map": "^3.5.7",
|
|
53
|
+
"@hpcc-js/other": "^3.5.7",
|
|
54
|
+
"@hpcc-js/phosphor": "^3.6.2",
|
|
55
|
+
"@hpcc-js/util": "^3.5.7"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@hpcc-js/esbuild-plugins": "^1.8.
|
|
58
|
+
"@hpcc-js/esbuild-plugins": "^1.8.9",
|
|
59
59
|
"d3-array": "^1",
|
|
60
60
|
"d3-collection": "^1",
|
|
61
61
|
"d3-dsv": "^1",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
74
74
|
},
|
|
75
75
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "6695c9be7e44c9a4dd50e36fad2044b287685e2e"
|
|
77
77
|
}
|
package/src/dashy.ts
CHANGED
|
@@ -170,6 +170,14 @@ export class Dashy extends SplitPanel {
|
|
|
170
170
|
return this._lhsDashboard.save();
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
serializeDDL(): string {
|
|
174
|
+
return JSON.stringify(this.save());
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
deserializeDDL(json: string): Promise<void> {
|
|
178
|
+
return this.restore(JSON.parse(json) as DDL2.Schema);
|
|
179
|
+
}
|
|
180
|
+
|
|
173
181
|
restore(json: DDL2.Schema): Promise<void> {
|
|
174
182
|
this._lhsSheet.active(this._lhsDashboard);
|
|
175
183
|
return this.clear().then(() => {
|
package/src/ddl2/dashboard.ts
CHANGED
|
@@ -256,8 +256,17 @@ export class Dashboard extends ChartPanel {
|
|
|
256
256
|
return ddlAdapter.write();
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
serializeDDL(): string {
|
|
260
|
+
return JSON.stringify(this.save());
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
deserializeDDL(json: string): this {
|
|
264
|
+
return this.restore(JSON.parse(json) as DDL2.Schema);
|
|
265
|
+
}
|
|
266
|
+
|
|
259
267
|
restore(_: DDL2.Schema, render: boolean = false): this {
|
|
260
268
|
this.ensureDockPanel(_ && _.properties && _.properties.layout instanceof Array ? "grid" : "dock");
|
|
269
|
+
this._ec.clear();
|
|
261
270
|
const ddlAdapter = new DDLAdapter(this);
|
|
262
271
|
ddlAdapter.read(_);
|
|
263
272
|
if (render) {
|
|
@@ -339,7 +339,7 @@ Visualization.prototype.chartType = function (this: Visualization, _?, props?) {
|
|
|
339
339
|
if (_ !== undefined && VizTypeSet.indexOf(_) === -1) {
|
|
340
340
|
_ = "Table";
|
|
341
341
|
}
|
|
342
|
-
const retVal = Visualization.prototype._origChartType.
|
|
342
|
+
const retVal = Visualization.prototype._origChartType.apply(this, arguments);
|
|
343
343
|
if (_ !== undefined) {
|
|
344
344
|
this.typeChanged();
|
|
345
345
|
if (props) {
|
package/types/dashy.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare class Dashy extends SplitPanel {
|
|
|
30
30
|
elementContainer(): ElementContainer;
|
|
31
31
|
clear(): Promise<void>;
|
|
32
32
|
save(): DDL2.Schema;
|
|
33
|
+
serializeDDL(): string;
|
|
34
|
+
deserializeDDL(json: string): Promise<void>;
|
|
33
35
|
restore(json: DDL2.Schema): Promise<void>;
|
|
34
36
|
importDDL(ddl: DDL1.DDLSchema | DDL2.Schema, baseUrl?: string, wuid?: string, dermatologyJson?: object): Promise<void>;
|
|
35
37
|
activeLHS(): Widget;
|
|
@@ -35,6 +35,8 @@ export declare class Dashboard extends ChartPanel {
|
|
|
35
35
|
ddl(_: DDL2.Schema): this;
|
|
36
36
|
layoutObj(_: object | null): this;
|
|
37
37
|
save(): DDL2.Schema;
|
|
38
|
+
serializeDDL(): string;
|
|
39
|
+
deserializeDDL(json: string): this;
|
|
38
40
|
restore(_: DDL2.Schema, render?: boolean): this;
|
|
39
41
|
importDDL(ddl: DDL1.DDLSchema | DDL2.Schema, baseUrl?: string, wuid?: string, dermatologyJson?: object): this;
|
|
40
42
|
javascript(): string;
|