@hpcc-js/marshaller 2.28.5 → 2.28.7

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 +22 -22
  3. package/dist/index.es6.js.map +1 -1
  4. package/dist/index.js +20 -20
  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 +16 -16
  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,114 +1,114 @@
1
- import { publish } from "@hpcc-js/common";
2
- import { DDL2 } from "@hpcc-js/ddl-shim";
3
- import { ElementContainer } from "../model/element";
4
- import { Activity, ActivityPipeline } from "./activity";
5
- import { DatasourceRefType } from "./datasource";
6
- import { DSPicker } from "./dspicker";
7
- import { Filters } from "./filter";
8
- import { GroupBy } from "./groupby";
9
- import { Limit } from "./limit";
10
- import { Project } from "./project";
11
- import { Sort } from "./sort";
12
-
13
- export class HipiePipeline extends ActivityPipeline {
14
-
15
- @publish(null, "widget", "Data Source 2")
16
- _datasource: DSPicker | DatasourceRefType;
17
- datasource(): DSPicker | DatasourceRefType;
18
- datasource(_: DSPicker | DatasourceRefType): this;
19
- datasource(_?: DSPicker | DatasourceRefType): DSPicker | DatasourceRefType | this {
20
- if (!arguments.length) return this._datasource;
21
- this._datasource = _;
22
- this.updateSequence();
23
- return this;
24
- }
25
-
26
- @publish(null, "widget", "Client Filters")
27
- _filters: Filters;
28
- filters(): Filters;
29
- filters(_: Filters): this;
30
- filters(_?: Filters): Filters | this {
31
- if (!arguments.length) return this._filters;
32
- this._filters = _;
33
- this.updateSequence();
34
- return this;
35
- }
36
-
37
- @publish(null, "widget", "Project")
38
- _project: Project;
39
- project(): Project;
40
- project(_: Project): this;
41
- project(_?: Project): Project | this {
42
- if (!arguments.length) return this._project;
43
- this._project = _;
44
- this.updateSequence();
45
- return this;
46
- }
47
-
48
- @publish(null, "widget", "Group By")
49
- _groupBy: GroupBy;
50
- groupBy(): GroupBy;
51
- groupBy(_: GroupBy): this;
52
- groupBy(_?: GroupBy): GroupBy | this {
53
- if (!arguments.length) return this._groupBy;
54
- this._groupBy = _;
55
- this.updateSequence();
56
- return this;
57
- }
58
-
59
- @publish(null, "widget", "Sort")
60
- _sort: Sort;
61
- sort(): Sort;
62
- sort(_: Sort): this;
63
- sort(_?: Sort): Sort | this {
64
- if (!arguments.length) return this._sort;
65
- this._sort = _;
66
- this.updateSequence();
67
- return this;
68
- }
69
-
70
- @publish(null, "widget", "Limit output")
71
- _limit: Limit;
72
- limit(): Limit;
73
- limit(_: Limit): this;
74
- limit(_?: Limit): Limit | this {
75
- if (!arguments.length) return this._limit;
76
- this._limit = _;
77
- this.updateSequence();
78
- return this;
79
- }
80
-
81
- constructor(private _ec: ElementContainer, viewID: string) {
82
- super();
83
- this._id = viewID;
84
- this._datasource = new DSPicker(this._ec);
85
- this._filters = new Filters(this._ec);
86
- this._project = new Project();
87
- this._groupBy = new GroupBy();
88
- this._sort = new Sort();
89
- this._limit = new Limit();
90
- this.updateSequence();
91
- }
92
-
93
- activities(): Activity[];
94
- activities(_: Activity[]): this;
95
- activities(_?: Activity[]): Activity[] | this {
96
- const retVal = super.activities.apply(this, arguments);
97
- return retVal;
98
- }
99
-
100
- private updateSequence() {
101
- this.activities([
102
- this.datasource() as Activity,
103
- this.filters(),
104
- this.project(),
105
- this.groupBy(),
106
- this.sort(),
107
- this.limit()
108
- ]);
109
- }
110
-
111
- selectionFields(): ReadonlyArray<DDL2.IField> {
112
- return this.last().outFields();
113
- }
114
- }
1
+ import { publish } from "@hpcc-js/common";
2
+ import { DDL2 } from "@hpcc-js/ddl-shim";
3
+ import { ElementContainer } from "../model/element";
4
+ import { Activity, ActivityPipeline } from "./activity";
5
+ import { DatasourceRefType } from "./datasource";
6
+ import { DSPicker } from "./dspicker";
7
+ import { Filters } from "./filter";
8
+ import { GroupBy } from "./groupby";
9
+ import { Limit } from "./limit";
10
+ import { Project } from "./project";
11
+ import { Sort } from "./sort";
12
+
13
+ export class HipiePipeline extends ActivityPipeline {
14
+
15
+ @publish(null, "widget", "Data Source 2")
16
+ _datasource: DSPicker | DatasourceRefType;
17
+ datasource(): DSPicker | DatasourceRefType;
18
+ datasource(_: DSPicker | DatasourceRefType): this;
19
+ datasource(_?: DSPicker | DatasourceRefType): DSPicker | DatasourceRefType | this {
20
+ if (!arguments.length) return this._datasource;
21
+ this._datasource = _;
22
+ this.updateSequence();
23
+ return this;
24
+ }
25
+
26
+ @publish(null, "widget", "Client Filters")
27
+ _filters: Filters;
28
+ filters(): Filters;
29
+ filters(_: Filters): this;
30
+ filters(_?: Filters): Filters | this {
31
+ if (!arguments.length) return this._filters;
32
+ this._filters = _;
33
+ this.updateSequence();
34
+ return this;
35
+ }
36
+
37
+ @publish(null, "widget", "Project")
38
+ _project: Project;
39
+ project(): Project;
40
+ project(_: Project): this;
41
+ project(_?: Project): Project | this {
42
+ if (!arguments.length) return this._project;
43
+ this._project = _;
44
+ this.updateSequence();
45
+ return this;
46
+ }
47
+
48
+ @publish(null, "widget", "Group By")
49
+ _groupBy: GroupBy;
50
+ groupBy(): GroupBy;
51
+ groupBy(_: GroupBy): this;
52
+ groupBy(_?: GroupBy): GroupBy | this {
53
+ if (!arguments.length) return this._groupBy;
54
+ this._groupBy = _;
55
+ this.updateSequence();
56
+ return this;
57
+ }
58
+
59
+ @publish(null, "widget", "Sort")
60
+ _sort: Sort;
61
+ sort(): Sort;
62
+ sort(_: Sort): this;
63
+ sort(_?: Sort): Sort | this {
64
+ if (!arguments.length) return this._sort;
65
+ this._sort = _;
66
+ this.updateSequence();
67
+ return this;
68
+ }
69
+
70
+ @publish(null, "widget", "Limit output")
71
+ _limit: Limit;
72
+ limit(): Limit;
73
+ limit(_: Limit): this;
74
+ limit(_?: Limit): Limit | this {
75
+ if (!arguments.length) return this._limit;
76
+ this._limit = _;
77
+ this.updateSequence();
78
+ return this;
79
+ }
80
+
81
+ constructor(private _ec: ElementContainer, viewID: string) {
82
+ super();
83
+ this._id = viewID;
84
+ this._datasource = new DSPicker(this._ec);
85
+ this._filters = new Filters(this._ec);
86
+ this._project = new Project();
87
+ this._groupBy = new GroupBy();
88
+ this._sort = new Sort();
89
+ this._limit = new Limit();
90
+ this.updateSequence();
91
+ }
92
+
93
+ activities(): Activity[];
94
+ activities(_: Activity[]): this;
95
+ activities(_?: Activity[]): Activity[] | this {
96
+ const retVal = super.activities.apply(this, arguments);
97
+ return retVal;
98
+ }
99
+
100
+ private updateSequence() {
101
+ this.activities([
102
+ this.datasource() as Activity,
103
+ this.filters(),
104
+ this.project(),
105
+ this.groupBy(),
106
+ this.sort(),
107
+ this.limit()
108
+ ]);
109
+ }
110
+
111
+ selectionFields(): ReadonlyArray<DDL2.IField> {
112
+ return this.last().outFields();
113
+ }
114
+ }
@@ -1,49 +1,49 @@
1
- import { publish } from "@hpcc-js/common";
2
- import { DDL2 } from "@hpcc-js/ddl-shim";
3
- import { hashSum } from "@hpcc-js/util";
4
- import { Activity } from "./activity";
5
-
6
- export class Limit extends Activity {
7
-
8
- @publish(undefined, "number", "Limit output")
9
- rows: publish<this, number | undefined>;
10
- rows_exists: () => boolean;
11
-
12
- constructor() {
13
- super();
14
- }
15
-
16
- toDDL(): DDL2.ILimit {
17
- return {
18
- type: "limit",
19
- limit: this.rows()
20
- };
21
- }
22
-
23
- fromDDL(ddl: DDL2.ILimit): this {
24
- return this
25
- .rows(ddl.limit)
26
- ;
27
- }
28
-
29
- static fromDDL(ddl: DDL2.ILimit): Limit {
30
- return new Limit().fromDDL(ddl);
31
- }
32
-
33
- hash(): string {
34
- return hashSum({
35
- limit: this.rows()
36
- });
37
- }
38
-
39
- exists(): boolean {
40
- return this.rows_exists() && this.rows() > 0;
41
- }
42
-
43
- computeData(): ReadonlyArray<object> {
44
- const data = super.computeData();
45
- if (data.length === 0 || !this.exists()) return data;
46
- return data.slice(0, Math.min(this.rows(), data.length));
47
- }
48
- }
49
- Limit.prototype._class += " Limit";
1
+ import { publish } from "@hpcc-js/common";
2
+ import { DDL2 } from "@hpcc-js/ddl-shim";
3
+ import { hashSum } from "@hpcc-js/util";
4
+ import { Activity } from "./activity";
5
+
6
+ export class Limit extends Activity {
7
+
8
+ @publish(undefined, "number", "Limit output")
9
+ rows: publish<this, number | undefined>;
10
+ rows_exists: () => boolean;
11
+
12
+ constructor() {
13
+ super();
14
+ }
15
+
16
+ toDDL(): DDL2.ILimit {
17
+ return {
18
+ type: "limit",
19
+ limit: this.rows()
20
+ };
21
+ }
22
+
23
+ fromDDL(ddl: DDL2.ILimit): this {
24
+ return this
25
+ .rows(ddl.limit)
26
+ ;
27
+ }
28
+
29
+ static fromDDL(ddl: DDL2.ILimit): Limit {
30
+ return new Limit().fromDDL(ddl);
31
+ }
32
+
33
+ hash(): string {
34
+ return hashSum({
35
+ limit: this.rows()
36
+ });
37
+ }
38
+
39
+ exists(): boolean {
40
+ return this.rows_exists() && this.rows() > 0;
41
+ }
42
+
43
+ computeData(): ReadonlyArray<object> {
44
+ const data = super.computeData();
45
+ if (data.length === 0 || !this.exists()) return data;
46
+ return data.slice(0, Math.min(this.rows(), data.length));
47
+ }
48
+ }
49
+ Limit.prototype._class += " Limit";
@@ -1,62 +1,62 @@
1
- import { publish } from "@hpcc-js/common";
2
- import { Result } from "@hpcc-js/comms";
3
- import { DDL2 } from "@hpcc-js/ddl-shim";
4
- import { ElementContainer } from "../model/element";
5
- import { ESPResult } from "./wuresult";
6
-
7
- export class LogicalFile extends ESPResult {
8
-
9
- @publish("", "string", "ESP Url (http://x.x.x.x:8010)")
10
- url: publish<this, string>;
11
- @publish("", "string", "Node Group")
12
- nodeGroup: publish<this, string>;
13
- @publish("", "string", "Logical File Name")
14
- logicalFile: publish<this, string>;
15
-
16
- constructor(_ec: ElementContainer) {
17
- super(_ec);
18
- }
19
-
20
- toDDL(): DDL2.ILogicalFile {
21
- return {
22
- type: "logicalfile",
23
- id: this.id(),
24
- url: this.url(),
25
- logicalFile: this.logicalFile(),
26
- fields: this.responseFields()
27
- };
28
- }
29
-
30
- fromDDL(ddl: DDL2.ILogicalFile, skipID = false): this {
31
- (skipID ? this : this.id(ddl.id))
32
- .url(ddl.url)
33
- .logicalFile(ddl.logicalFile)
34
- ;
35
- return this;
36
- }
37
-
38
- static fromDDL(ec: ElementContainer, ddl: DDL2.ILogicalFile, skipID = false): LogicalFile {
39
- return new LogicalFile(ec).fromDDL(ddl, skipID);
40
- }
41
-
42
- _createResult(): Result {
43
- return Result.attachLogicalFile({ baseUrl: this.url(), hookSend: this._ec.hookSend() }, this.nodeGroup(), this.logicalFile());
44
- }
45
-
46
- sourceHash(): string {
47
- return super.hash({
48
- logicalFile: this.logicalFile()
49
- });
50
- }
51
-
52
- hash(more: object): string {
53
- return super.hash({
54
- ddl: this.toDDL()
55
- });
56
- }
57
-
58
- label(): string {
59
- return `${this.logicalFile()}`;
60
- }
61
- }
62
- LogicalFile.prototype._class += " LogicalFile";
1
+ import { publish } from "@hpcc-js/common";
2
+ import { Result } from "@hpcc-js/comms";
3
+ import { DDL2 } from "@hpcc-js/ddl-shim";
4
+ import { ElementContainer } from "../model/element";
5
+ import { ESPResult } from "./wuresult";
6
+
7
+ export class LogicalFile extends ESPResult {
8
+
9
+ @publish("", "string", "ESP Url (http://x.x.x.x:8010)")
10
+ url: publish<this, string>;
11
+ @publish("", "string", "Node Group")
12
+ nodeGroup: publish<this, string>;
13
+ @publish("", "string", "Logical File Name")
14
+ logicalFile: publish<this, string>;
15
+
16
+ constructor(_ec: ElementContainer) {
17
+ super(_ec);
18
+ }
19
+
20
+ toDDL(): DDL2.ILogicalFile {
21
+ return {
22
+ type: "logicalfile",
23
+ id: this.id(),
24
+ url: this.url(),
25
+ logicalFile: this.logicalFile(),
26
+ fields: this.responseFields()
27
+ };
28
+ }
29
+
30
+ fromDDL(ddl: DDL2.ILogicalFile, skipID = false): this {
31
+ (skipID ? this : this.id(ddl.id))
32
+ .url(ddl.url)
33
+ .logicalFile(ddl.logicalFile)
34
+ ;
35
+ return this;
36
+ }
37
+
38
+ static fromDDL(ec: ElementContainer, ddl: DDL2.ILogicalFile, skipID = false): LogicalFile {
39
+ return new LogicalFile(ec).fromDDL(ddl, skipID);
40
+ }
41
+
42
+ _createResult(): Result {
43
+ return Result.attachLogicalFile({ baseUrl: this.url(), hookSend: this._ec.hookSend() }, this.nodeGroup(), this.logicalFile());
44
+ }
45
+
46
+ sourceHash(): string {
47
+ return super.hash({
48
+ logicalFile: this.logicalFile()
49
+ });
50
+ }
51
+
52
+ hash(more: object): string {
53
+ return super.hash({
54
+ ddl: this.toDDL()
55
+ });
56
+ }
57
+
58
+ label(): string {
59
+ return `${this.logicalFile()}`;
60
+ }
61
+ }
62
+ LogicalFile.prototype._class += " LogicalFile";
@@ -1,12 +1,12 @@
1
- import { HipiePipeline } from "./hipiepipeline";
2
-
3
- export class NullView extends HipiePipeline {
4
- hash(): string {
5
- return super.hash();
6
- }
7
-
8
- _fetch(from: number, count: number): Promise<any[]> {
9
- return Promise.resolve([]);
10
- }
11
- }
12
- NullView.prototype._class += " NullView";
1
+ import { HipiePipeline } from "./hipiepipeline";
2
+
3
+ export class NullView extends HipiePipeline {
4
+ hash(): string {
5
+ return super.hash();
6
+ }
7
+
8
+ _fetch(from: number, count: number): Promise<any[]> {
9
+ return Promise.resolve([]);
10
+ }
11
+ }
12
+ NullView.prototype._class += " NullView";