@hpcc-js/other 2.17.1 → 2.17.3

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 (46) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +41 -41
  3. package/dist/index.es6.js +5 -5
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +5 -5
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +5 -5
  10. package/src/Audio.ts +83 -83
  11. package/src/AutoCompleteText.css +21 -21
  12. package/src/AutoCompleteText.ts +124 -124
  13. package/src/CalendarHeatMap.css +26 -26
  14. package/src/CalendarHeatMap.ts +243 -243
  15. package/src/Comms.ts +1085 -1085
  16. package/src/ESP.ts +451 -451
  17. package/src/HPCCBadge.ts +220 -220
  18. package/src/HeatMap.ts +135 -135
  19. package/src/Html.css +5 -5
  20. package/src/Html.ts +44 -44
  21. package/src/IconList.css +3 -3
  22. package/src/IconList.ts +86 -86
  23. package/src/Legend.css +85 -85
  24. package/src/Legend.ts +220 -220
  25. package/src/MorphText.css +11 -11
  26. package/src/MorphText.ts +102 -102
  27. package/src/NestedTable.ts +51 -51
  28. package/src/Opportunity.css +80 -80
  29. package/src/Opportunity.ts +488 -488
  30. package/src/Paginator.css +120 -120
  31. package/src/Paginator.ts +164 -164
  32. package/src/Persist.ts +151 -151
  33. package/src/PropertyEditor.css +130 -130
  34. package/src/PropertyEditor.ts +750 -750
  35. package/src/RadioCheckbox.css +6 -6
  36. package/src/RadioCheckbox.ts +123 -123
  37. package/src/Select.css +7 -7
  38. package/src/Select.ts +120 -120
  39. package/src/Table.css +92 -92
  40. package/src/Table.ts +1050 -1050
  41. package/src/ThemeEditor.css +195 -195
  42. package/src/ThemeEditor.ts +744 -744
  43. package/src/__package__.ts +3 -3
  44. package/src/index.ts +23 -23
  45. package/types/__package__.d.ts +2 -2
  46. package/types-3.4/__package__.d.ts +2 -2
package/src/MorphText.ts CHANGED
@@ -1,102 +1,102 @@
1
- import { SVGWidget } from "@hpcc-js/common";
2
-
3
- import "../src/MorphText.css";
4
-
5
- export class MorphText extends SVGWidget {
6
- _fontWidth;
7
- _textElement;
8
-
9
- constructor() {
10
- super();
11
- }
12
-
13
- enter(domNode, element) {
14
- if (!this.fontSize()) {
15
- const style = window.getComputedStyle(domNode, null);
16
- this.fontSize(parseInt(style.fontSize));
17
- }
18
- this._fontWidth = this.fontSize() * 32 / 48;
19
- this._textElement = element.append("g")
20
- ;
21
- }
22
-
23
- dateTime() {
24
- const d = new Date();
25
- const seconds = d.getSeconds().toString().length === 1 ? "0" + d.getSeconds() : d.getSeconds();
26
- const minutes = d.getMinutes().toString().length === 1 ? "0" + d.getMinutes() : d.getMinutes();
27
- const hours = d.getHours().toString().length === 1 ? "0" + d.getHours() : d.getHours();
28
- const ampm = d.getHours() >= 12 ? "pm" : "am";
29
- const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
30
- const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
31
- return days[d.getDay()] + " " + months[d.getMonth()] + " " + d.getDate() + " " + d.getFullYear() + " " + hours + ":" + minutes + ":" + seconds + ampm;
32
- }
33
-
34
- update(domNode, element) {
35
- const context = this;
36
- const text = this._textElement.selectAll("text")
37
- .data(this.data(), function (d) { return d.id; })
38
- ;
39
- text
40
- .attr("class", "update")
41
- ;
42
- this.transition.apply(text)
43
- .attr("x", function (d, i) { return (-context.data().length / 2 + i) * context._fontWidth + context._fontWidth / 2; })
44
- ;
45
-
46
- const newText = text.enter().append("text")
47
- .attr("class", "enter")
48
- .attr("font-size", this.fontSize())
49
- .attr("dy", ".35em")
50
- .attr("y", (this.reverse() ? +1 : -1) * this._fontWidth * 2)
51
- .attr("x", function (d, i) { return (-context.data().length / 2 + i) * context._fontWidth + context._fontWidth / 2; })
52
- .style("fill-opacity", 1e-6)
53
- .style("text-anchor", this.anchor())
54
- .text(function (d) { return d.text; })
55
- ;
56
- this.transition.apply(newText)
57
- .attr("y", 0)
58
- .style("fill-opacity", 1)
59
- ;
60
-
61
- text.exit()
62
- .attr("class", "exit")
63
- ;
64
- this.transition.apply(text.exit())
65
- .attr("y", (this.reverse() ? -1 : +1) * this._fontWidth * 2)
66
- .style("fill-opacity", 1e-6)
67
- .remove()
68
- ;
69
- }
70
- anchor: { (): string; (_: string): MorphText };
71
- anchor_exists: () => boolean;
72
- fontSize: { (): number; (_: number): MorphText };
73
- fontSize_exists: () => boolean;
74
- reverse: { (): boolean; (_: boolean): MorphText };
75
- reverse_exists: () => boolean;
76
- text: (_?: string) => MorphText | this;
77
- text_exists: () => boolean;
78
- }
79
- MorphText.prototype._class += " other_MorphText";
80
-
81
- MorphText.prototype.publish("anchor", "middle", "set", "Sets anchor point", ["middle"], { tags: ["Basic"] });
82
- MorphText.prototype.publish("fontSize", 14, "number", "Sets fontsize", null, { tags: ["Basic"] });
83
- MorphText.prototype.publish("reverse", false, "boolean", "Reverse Animation", null, { tags: ["Basic"] });
84
- MorphText.prototype.publish("text", "", "string", "Sets text/data of widget", null, { tags: ["Basic"] });
85
-
86
- const _origText = MorphText.prototype.text;
87
- MorphText.prototype.text = function (_) {
88
- const retVal = _origText.apply(this, arguments);
89
- if (arguments.length) {
90
- const usedChars = {};
91
- const chars = _.split("");
92
- this.data(chars.map(function (d) {
93
- const id = "_" + d;
94
- if (usedChars[id] === undefined) {
95
- usedChars[id] = 0;
96
- }
97
- usedChars[id]++;
98
- return { text: d, id: d.charCodeAt(0) + (1024 * usedChars[id]) };
99
- }));
100
- }
101
- return retVal;
102
- };
1
+ import { SVGWidget } from "@hpcc-js/common";
2
+
3
+ import "../src/MorphText.css";
4
+
5
+ export class MorphText extends SVGWidget {
6
+ _fontWidth;
7
+ _textElement;
8
+
9
+ constructor() {
10
+ super();
11
+ }
12
+
13
+ enter(domNode, element) {
14
+ if (!this.fontSize()) {
15
+ const style = window.getComputedStyle(domNode, null);
16
+ this.fontSize(parseInt(style.fontSize));
17
+ }
18
+ this._fontWidth = this.fontSize() * 32 / 48;
19
+ this._textElement = element.append("g")
20
+ ;
21
+ }
22
+
23
+ dateTime() {
24
+ const d = new Date();
25
+ const seconds = d.getSeconds().toString().length === 1 ? "0" + d.getSeconds() : d.getSeconds();
26
+ const minutes = d.getMinutes().toString().length === 1 ? "0" + d.getMinutes() : d.getMinutes();
27
+ const hours = d.getHours().toString().length === 1 ? "0" + d.getHours() : d.getHours();
28
+ const ampm = d.getHours() >= 12 ? "pm" : "am";
29
+ const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
30
+ const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
31
+ return days[d.getDay()] + " " + months[d.getMonth()] + " " + d.getDate() + " " + d.getFullYear() + " " + hours + ":" + minutes + ":" + seconds + ampm;
32
+ }
33
+
34
+ update(domNode, element) {
35
+ const context = this;
36
+ const text = this._textElement.selectAll("text")
37
+ .data(this.data(), function (d) { return d.id; })
38
+ ;
39
+ text
40
+ .attr("class", "update")
41
+ ;
42
+ this.transition.apply(text)
43
+ .attr("x", function (d, i) { return (-context.data().length / 2 + i) * context._fontWidth + context._fontWidth / 2; })
44
+ ;
45
+
46
+ const newText = text.enter().append("text")
47
+ .attr("class", "enter")
48
+ .attr("font-size", this.fontSize())
49
+ .attr("dy", ".35em")
50
+ .attr("y", (this.reverse() ? +1 : -1) * this._fontWidth * 2)
51
+ .attr("x", function (d, i) { return (-context.data().length / 2 + i) * context._fontWidth + context._fontWidth / 2; })
52
+ .style("fill-opacity", 1e-6)
53
+ .style("text-anchor", this.anchor())
54
+ .text(function (d) { return d.text; })
55
+ ;
56
+ this.transition.apply(newText)
57
+ .attr("y", 0)
58
+ .style("fill-opacity", 1)
59
+ ;
60
+
61
+ text.exit()
62
+ .attr("class", "exit")
63
+ ;
64
+ this.transition.apply(text.exit())
65
+ .attr("y", (this.reverse() ? -1 : +1) * this._fontWidth * 2)
66
+ .style("fill-opacity", 1e-6)
67
+ .remove()
68
+ ;
69
+ }
70
+ anchor: { (): string; (_: string): MorphText };
71
+ anchor_exists: () => boolean;
72
+ fontSize: { (): number; (_: number): MorphText };
73
+ fontSize_exists: () => boolean;
74
+ reverse: { (): boolean; (_: boolean): MorphText };
75
+ reverse_exists: () => boolean;
76
+ text: (_?: string) => MorphText | this;
77
+ text_exists: () => boolean;
78
+ }
79
+ MorphText.prototype._class += " other_MorphText";
80
+
81
+ MorphText.prototype.publish("anchor", "middle", "set", "Sets anchor point", ["middle"], { tags: ["Basic"] });
82
+ MorphText.prototype.publish("fontSize", 14, "number", "Sets fontsize", null, { tags: ["Basic"] });
83
+ MorphText.prototype.publish("reverse", false, "boolean", "Reverse Animation", null, { tags: ["Basic"] });
84
+ MorphText.prototype.publish("text", "", "string", "Sets text/data of widget", null, { tags: ["Basic"] });
85
+
86
+ const _origText = MorphText.prototype.text;
87
+ MorphText.prototype.text = function (_) {
88
+ const retVal = _origText.apply(this, arguments);
89
+ if (arguments.length) {
90
+ const usedChars = {};
91
+ const chars = _.split("");
92
+ this.data(chars.map(function (d) {
93
+ const id = "_" + d;
94
+ if (usedChars[id] === undefined) {
95
+ usedChars[id] = 0;
96
+ }
97
+ usedChars[id]++;
98
+ return { text: d, id: d.charCodeAt(0) + (1024 * usedChars[id]) };
99
+ }));
100
+ }
101
+ return retVal;
102
+ };
@@ -1,51 +1,51 @@
1
- import { Table } from "./Table";
2
-
3
- export class NestedTable extends Table {
4
- constructor() {
5
- super();
6
- this.minWidgetHeight(240);
7
- this.minWidgetWidth(360);
8
- }
9
- }
10
- NestedTable.prototype._class += " other_NestedTable";
11
-
12
- const origColumns = NestedTable.prototype.columns;
13
- NestedTable.prototype.columns = function (_?) {
14
- if (arguments.length) {
15
- this._columns = _;
16
- return origColumns.call(this, _.map(function (col) {
17
- if (typeof col === "object") {
18
- return col.label;
19
- }
20
- return col;
21
- }));
22
- }
23
- return origColumns.apply(this, arguments);
24
- };
25
-
26
- const origData = NestedTable.prototype.data;
27
- NestedTable.prototype.data = function (_?: any): NestedTable | any {
28
- if (arguments.length) {
29
- const context = this;
30
- return origData.call(this, _.map(function (row) {
31
- return row.map(function (cell, idx) {
32
- if (cell instanceof Array) {
33
- let columns = [];
34
- if (typeof context._columns[idx] === "object" && context._columns[idx].columns) {
35
- columns = context._columns[idx].columns;
36
- } else {
37
- for (let i = 0; i < cell.length; ++i) {
38
- columns.push(context._columns[idx] + "." + i);
39
- }
40
- }
41
- return new Table()
42
- .columns(columns)
43
- .data(cell)
44
- ;
45
- }
46
- return cell;
47
- });
48
- }));
49
- }
50
- return origData.apply(this, arguments);
51
- };
1
+ import { Table } from "./Table";
2
+
3
+ export class NestedTable extends Table {
4
+ constructor() {
5
+ super();
6
+ this.minWidgetHeight(240);
7
+ this.minWidgetWidth(360);
8
+ }
9
+ }
10
+ NestedTable.prototype._class += " other_NestedTable";
11
+
12
+ const origColumns = NestedTable.prototype.columns;
13
+ NestedTable.prototype.columns = function (_?) {
14
+ if (arguments.length) {
15
+ this._columns = _;
16
+ return origColumns.call(this, _.map(function (col) {
17
+ if (typeof col === "object") {
18
+ return col.label;
19
+ }
20
+ return col;
21
+ }));
22
+ }
23
+ return origColumns.apply(this, arguments);
24
+ };
25
+
26
+ const origData = NestedTable.prototype.data;
27
+ NestedTable.prototype.data = function (_?: any): NestedTable | any {
28
+ if (arguments.length) {
29
+ const context = this;
30
+ return origData.call(this, _.map(function (row) {
31
+ return row.map(function (cell, idx) {
32
+ if (cell instanceof Array) {
33
+ let columns = [];
34
+ if (typeof context._columns[idx] === "object" && context._columns[idx].columns) {
35
+ columns = context._columns[idx].columns;
36
+ } else {
37
+ for (let i = 0; i < cell.length; ++i) {
38
+ columns.push(context._columns[idx] + "." + i);
39
+ }
40
+ }
41
+ return new Table()
42
+ .columns(columns)
43
+ .data(cell)
44
+ ;
45
+ }
46
+ return cell;
47
+ });
48
+ }));
49
+ }
50
+ return origData.apply(this, arguments);
51
+ };
@@ -1,81 +1,81 @@
1
- .graph_Opportunity {
2
- transform: translate(20px,20px)scale(1) !important;
3
- }
4
-
5
- .graph_Opportunity .group {
6
- stroke-width: 1.0;
7
- stroke:#555;
8
- fill:#FEFEFE;
9
- }
10
-
11
- .graph_Opportunity .group_headings {
12
- font-family: "Helvetica","Arial",sans-serif;
13
- font-size: 14px;
14
- font-weight: 700;
15
- line-height: 20px;
16
- }
17
-
18
- .graph_Opportunity .node_prev_rect {
19
- fill:white;
20
- stroke-width:2;
21
- stroke:#000;
22
- stroke-dasharray:3,3;
23
- opacity:0.6;
24
- }
25
-
26
- .graph_Opportunity .node_rev_change {
27
- fill:white;
28
- }
29
- .graph_Opportunity .node_rev_change_text {
30
- font-size:18px;
31
- font-family:Arial;
32
- color: black;
33
- font-weight: bold;
34
- }
35
-
36
- .graph_Opportunity .node_date_change {
37
- fill:white;
38
- }
39
-
40
- .graph_Opportunity .node_date_change_text {
41
- font-size:18px;
42
- font-family:Arial;
43
- color: black;
44
- font-weight: bold;
45
- }
46
-
47
- .graph_Opportunity .node_prev_text {
48
- font-size:9px;
49
- font-family:Arial;
50
- opacity:0.6;
51
- }
52
-
53
- .graph_Opportunity .node_cur_rect {
54
- stroke-width:2;
55
- stroke:#000;
56
- }
57
-
58
- .graph_Opportunity .node_cur_text {
59
- font-size:9px;
60
- font-family:Arial;
61
- text-decoration: underline;
62
- }
63
-
64
- .graph_Opportunity .arrowhead {
65
- refX:6;
66
- }
67
-
68
- .graph_Opportunity-tooltip.tooltip {
69
- position: absolute;
70
- text-align: left;
71
- width:350px;
72
- height: 135px;
73
- padding: 10px;
74
- padding-top: 15px;
75
- font: 14px arial;
76
- background: #BDBDBD;
77
- border: 0px;
78
- border-radius: 8px;
79
- pointer-events: none;
80
- z-index: 1;
1
+ .graph_Opportunity {
2
+ transform: translate(20px,20px)scale(1) !important;
3
+ }
4
+
5
+ .graph_Opportunity .group {
6
+ stroke-width: 1.0;
7
+ stroke:#555;
8
+ fill:#FEFEFE;
9
+ }
10
+
11
+ .graph_Opportunity .group_headings {
12
+ font-family: "Helvetica","Arial",sans-serif;
13
+ font-size: 14px;
14
+ font-weight: 700;
15
+ line-height: 20px;
16
+ }
17
+
18
+ .graph_Opportunity .node_prev_rect {
19
+ fill:white;
20
+ stroke-width:2;
21
+ stroke:#000;
22
+ stroke-dasharray:3,3;
23
+ opacity:0.6;
24
+ }
25
+
26
+ .graph_Opportunity .node_rev_change {
27
+ fill:white;
28
+ }
29
+ .graph_Opportunity .node_rev_change_text {
30
+ font-size:18px;
31
+ font-family:Arial;
32
+ color: black;
33
+ font-weight: bold;
34
+ }
35
+
36
+ .graph_Opportunity .node_date_change {
37
+ fill:white;
38
+ }
39
+
40
+ .graph_Opportunity .node_date_change_text {
41
+ font-size:18px;
42
+ font-family:Arial;
43
+ color: black;
44
+ font-weight: bold;
45
+ }
46
+
47
+ .graph_Opportunity .node_prev_text {
48
+ font-size:9px;
49
+ font-family:Arial;
50
+ opacity:0.6;
51
+ }
52
+
53
+ .graph_Opportunity .node_cur_rect {
54
+ stroke-width:2;
55
+ stroke:#000;
56
+ }
57
+
58
+ .graph_Opportunity .node_cur_text {
59
+ font-size:9px;
60
+ font-family:Arial;
61
+ text-decoration: underline;
62
+ }
63
+
64
+ .graph_Opportunity .arrowhead {
65
+ refX:6;
66
+ }
67
+
68
+ .graph_Opportunity-tooltip.tooltip {
69
+ position: absolute;
70
+ text-align: left;
71
+ width:350px;
72
+ height: 135px;
73
+ padding: 10px;
74
+ padding-top: 15px;
75
+ font: 14px arial;
76
+ background: #BDBDBD;
77
+ border: 0px;
78
+ border-radius: 8px;
79
+ pointer-events: none;
80
+ z-index: 1;
81
81
  }