@hpcc-js/marshaller 2.28.7 → 2.28.9

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.
Files changed (55) hide show
  1. package/LICENSE +43 -43
  2. package/dist/index.es6.js +25 -13
  3. package/dist/index.es6.js.map +1 -1
  4. package/dist/index.js +25 -13
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +2 -2
  7. package/dist/index.min.js.map +1 -1
  8. package/package.json +14 -14
  9. package/src/__package__.ts +3 -3
  10. package/src/dashy.css +239 -239
  11. package/src/dashy.ts +521 -521
  12. package/src/ddl1/DDLApi.ts +229 -229
  13. package/src/ddl1/FlyoutButton.ts +120 -120
  14. package/src/ddl1/Graph.ts +93 -93
  15. package/src/ddl1/HTML.ts +77 -77
  16. package/src/ddl1/HipieDDL.ts +2437 -2437
  17. package/src/ddl1/HipieDDLMixin.ts +380 -380
  18. package/src/ddl1/Tabbed.ts +91 -91
  19. package/src/ddl1/TargetMarshaller.ts +57 -57
  20. package/src/ddl2/PopupManager.ts +89 -89
  21. package/src/ddl2/activities/activity.ts +431 -431
  22. package/src/ddl2/activities/databomb.ts +237 -237
  23. package/src/ddl2/activities/datasource.ts +52 -52
  24. package/src/ddl2/activities/dspicker.ts +106 -106
  25. package/src/ddl2/activities/filter.ts +542 -542
  26. package/src/ddl2/activities/form.ts +153 -153
  27. package/src/ddl2/activities/groupby.ts +439 -439
  28. package/src/ddl2/activities/hipiepipeline.ts +114 -114
  29. package/src/ddl2/activities/limit.ts +49 -49
  30. package/src/ddl2/activities/logicalfile.ts +62 -62
  31. package/src/ddl2/activities/nullview.ts +12 -12
  32. package/src/ddl2/activities/project.ts +764 -764
  33. package/src/ddl2/activities/rest.ts +568 -568
  34. package/src/ddl2/activities/roxie.ts +490 -490
  35. package/src/ddl2/activities/sampledata.json +16264 -16264
  36. package/src/ddl2/activities/sort.ts +176 -176
  37. package/src/ddl2/activities/wuresult.ts +395 -395
  38. package/src/ddl2/dashboard.css +13 -13
  39. package/src/ddl2/dashboard.ts +330 -330
  40. package/src/ddl2/dashboardDockPanel.ts +123 -123
  41. package/src/ddl2/dashboardGrid.ts +202 -202
  42. package/src/ddl2/ddl.ts +410 -410
  43. package/src/ddl2/ddleditor.ts +60 -60
  44. package/src/ddl2/dsTable.ts +238 -238
  45. package/src/ddl2/dvTable.ts +31 -31
  46. package/src/ddl2/graphadapter.ts +297 -297
  47. package/src/ddl2/javascriptadapter.ts +354 -354
  48. package/src/ddl2/model/element.ts +398 -398
  49. package/src/ddl2/model/visualization.ts +351 -351
  50. package/src/ddl2/model/vizChartPanel.ts +149 -149
  51. package/src/ddl2/pipelinePanel.css +4 -4
  52. package/src/ddl2/pipelinePanel.ts +465 -465
  53. package/src/index.ts +26 -26
  54. package/types/__package__.d.ts +2 -2
  55. package/types-3.4/__package__.d.ts +2 -2
@@ -1,106 +1,106 @@
1
- import { publish } from "@hpcc-js/common";
2
- import { DDL2 } from "@hpcc-js/ddl-shim";
3
- import { ElementContainer } from "../model/element";
4
- import { ActivitySelection, IActivityError } from "./activity";
5
- import { Databomb, emptyDatabomb } from "./databomb";
6
- import { DatasourceRef, DatasourceRefType } from "./datasource";
7
- import { Form } from "./form";
8
- import { LogicalFile } from "./logicalfile";
9
- import { RestResult, RestResultRef } from "./rest";
10
- import { HipieResultRef, RoxieResult, RoxieService } from "./roxie";
11
- import { WUResult, WUResultRef } from "./wuresult";
12
-
13
- let dsPickerID = 0;
14
- export class DSPicker extends ActivitySelection {
15
- private _nullDatasource = emptyDatabomb;
16
-
17
- @publish("", "set", "Activity", function (this: DSPicker) { return this.datasourceIDs(); }, { optional: false })
18
- _datasourceID: string; // DDL2.IDatasourceType;
19
- datasourceID(): string;
20
- datasourceID(_: string): this;
21
- datasourceID(_?: string): this | string {
22
- if (!arguments.length) return this._datasourceID;
23
- if (this._datasourceID !== _) {
24
- this._datasourceID = _;
25
- this.refreshRef(_);
26
- }
27
- return this;
28
- }
29
-
30
- @publish("", "widget", "Activity")
31
- _datasourceRef: DatasourceRef;
32
- datasourceRef(): DatasourceRef;
33
- datasourceRef(_: DatasourceRef): this;
34
- datasourceRef(_?: DatasourceRef): this | DatasourceRef {
35
- return super.selection.apply(this, arguments);
36
- }
37
-
38
- datasource(): DatasourceRefType {
39
- return this.datasourceRef().datasource();
40
- }
41
-
42
- refreshRef(id: string) {
43
- const ds: DatasourceRefType = this._ec.datasource(id);
44
- if (ds instanceof Databomb) {
45
- this.selection(new DatasourceRef().datasource(ds));
46
- } else if (ds instanceof Form) {
47
- this.selection(new DatasourceRef().datasource(ds));
48
- } else if (ds instanceof LogicalFile) {
49
- this.selection(new DatasourceRef().datasource(ds));
50
- } else if (ds instanceof RoxieService) {
51
- this.selection(new DatasourceRef().datasource(ds));
52
- } else if (ds instanceof WUResult) {
53
- this.selection(new WUResultRef().datasource(ds));
54
- } else if (ds instanceof RoxieResult) {
55
- this.selection(new HipieResultRef(this._ec).datasource(ds));
56
- } else if (ds instanceof RestResult) {
57
- this.selection(new RestResultRef(this._ec).datasource(ds));
58
- }
59
- }
60
-
61
- selection(): DatasourceRef;
62
- selection(_: DatasourceRef): this;
63
- selection(_?: DatasourceRef): DatasourceRef | this {
64
- const retVal = super.selection.apply(this, arguments);
65
- if (!arguments.length) return retVal || this._nullDatasource;
66
- if (this._datasourceID !== _.datasource().id()) {
67
- this._datasourceID = _.datasource().id();
68
- }
69
- return this;
70
- }
71
-
72
- validate(): IActivityError[] {
73
- return this.selection().validate();
74
- }
75
-
76
- constructor(private _ec: ElementContainer) {
77
- super();
78
- this._id = `ds_${++dsPickerID}`;
79
- const ds = this._ec.datasources()[0];
80
- this.datasourceID(ds.id());
81
- }
82
-
83
- toDDL(): DDL2.IDatasourceRef {
84
- return {
85
- ...this.datasourceRef().toDDL(),
86
- id: this.datasourceID()
87
- };
88
- }
89
-
90
- // Activity overrides ---
91
- hash(more: { [key: string]: any } = {}): string {
92
- return super.hash({
93
- ...more
94
- });
95
- }
96
-
97
- datasourceIDs() {
98
- return this._ec.datasources().map(ds => {
99
- return {
100
- value: ds.id(),
101
- text: `${ds.label()} ${ds.id() !== ds.label() ? ` (${ds.id()})` : ""}`
102
- };
103
- });
104
- }
105
- }
106
- DSPicker.prototype._class += " DSPicker";
1
+ import { publish } from "@hpcc-js/common";
2
+ import { DDL2 } from "@hpcc-js/ddl-shim";
3
+ import { ElementContainer } from "../model/element";
4
+ import { ActivitySelection, IActivityError } from "./activity";
5
+ import { Databomb, emptyDatabomb } from "./databomb";
6
+ import { DatasourceRef, DatasourceRefType } from "./datasource";
7
+ import { Form } from "./form";
8
+ import { LogicalFile } from "./logicalfile";
9
+ import { RestResult, RestResultRef } from "./rest";
10
+ import { HipieResultRef, RoxieResult, RoxieService } from "./roxie";
11
+ import { WUResult, WUResultRef } from "./wuresult";
12
+
13
+ let dsPickerID = 0;
14
+ export class DSPicker extends ActivitySelection {
15
+ private _nullDatasource = emptyDatabomb;
16
+
17
+ @publish("", "set", "Activity", function (this: DSPicker) { return this.datasourceIDs(); }, { optional: false })
18
+ _datasourceID: string; // DDL2.IDatasourceType;
19
+ datasourceID(): string;
20
+ datasourceID(_: string): this;
21
+ datasourceID(_?: string): this | string {
22
+ if (!arguments.length) return this._datasourceID;
23
+ if (this._datasourceID !== _) {
24
+ this._datasourceID = _;
25
+ this.refreshRef(_);
26
+ }
27
+ return this;
28
+ }
29
+
30
+ @publish("", "widget", "Activity")
31
+ _datasourceRef: DatasourceRef;
32
+ datasourceRef(): DatasourceRef;
33
+ datasourceRef(_: DatasourceRef): this;
34
+ datasourceRef(_?: DatasourceRef): this | DatasourceRef {
35
+ return super.selection.apply(this, arguments);
36
+ }
37
+
38
+ datasource(): DatasourceRefType {
39
+ return this.datasourceRef().datasource();
40
+ }
41
+
42
+ refreshRef(id: string) {
43
+ const ds: DatasourceRefType = this._ec.datasource(id);
44
+ if (ds instanceof Databomb) {
45
+ this.selection(new DatasourceRef().datasource(ds));
46
+ } else if (ds instanceof Form) {
47
+ this.selection(new DatasourceRef().datasource(ds));
48
+ } else if (ds instanceof LogicalFile) {
49
+ this.selection(new DatasourceRef().datasource(ds));
50
+ } else if (ds instanceof RoxieService) {
51
+ this.selection(new DatasourceRef().datasource(ds));
52
+ } else if (ds instanceof WUResult) {
53
+ this.selection(new WUResultRef().datasource(ds));
54
+ } else if (ds instanceof RoxieResult) {
55
+ this.selection(new HipieResultRef(this._ec).datasource(ds));
56
+ } else if (ds instanceof RestResult) {
57
+ this.selection(new RestResultRef(this._ec).datasource(ds));
58
+ }
59
+ }
60
+
61
+ selection(): DatasourceRef;
62
+ selection(_: DatasourceRef): this;
63
+ selection(_?: DatasourceRef): DatasourceRef | this {
64
+ const retVal = super.selection.apply(this, arguments);
65
+ if (!arguments.length) return retVal || this._nullDatasource;
66
+ if (this._datasourceID !== _.datasource().id()) {
67
+ this._datasourceID = _.datasource().id();
68
+ }
69
+ return this;
70
+ }
71
+
72
+ validate(): IActivityError[] {
73
+ return this.selection().validate();
74
+ }
75
+
76
+ constructor(private _ec: ElementContainer) {
77
+ super();
78
+ this._id = `ds_${++dsPickerID}`;
79
+ const ds = this._ec.datasources()[0];
80
+ this.datasourceID(ds.id());
81
+ }
82
+
83
+ toDDL(): DDL2.IDatasourceRef {
84
+ return {
85
+ ...this.datasourceRef().toDDL(),
86
+ id: this.datasourceID()
87
+ };
88
+ }
89
+
90
+ // Activity overrides ---
91
+ hash(more: { [key: string]: any } = {}): string {
92
+ return super.hash({
93
+ ...more
94
+ });
95
+ }
96
+
97
+ datasourceIDs() {
98
+ return this._ec.datasources().map(ds => {
99
+ return {
100
+ value: ds.id(),
101
+ text: `${ds.label()} ${ds.id() !== ds.label() ? ` (${ds.id()})` : ""}`
102
+ };
103
+ });
104
+ }
105
+ }
106
+ DSPicker.prototype._class += " DSPicker";