@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/Persist.ts CHANGED
@@ -1,151 +1,151 @@
1
- export function discover(widget) {
2
- return widget.publishedProperties(false, true);
3
- }
4
-
5
- export function widgetArrayWalker(widgets, visitor) {
6
- if (!widgets)
7
- return;
8
- widgets.forEach(function (widget) {
9
- widget.widgetWalker(visitor);
10
- });
11
- }
12
-
13
- export function widgetPropertyWalker(widget2, visitor, filter?) {
14
- widget2.widgetWalker(function (widget) {
15
- widget.propertyWalker(visitor, filter);
16
- });
17
- }
18
-
19
- export function serializeTheme(widget, filter) {
20
- return JSON.stringify(serializeThemeToObject(widget, filter));
21
- }
22
-
23
- export function serializeThemeToObject(widget2, filter?) {
24
- filter = filter || ["surface", "Color", "Font", "palette"];
25
-
26
- const propObj = {};
27
- widgetPropertyWalker(widget2, null, function (widget, item) {
28
- if (widget[item.id + "_modified"]() || widget.publishedProperty(item.id).origDefaultValue !== widget.publishedProperty(item.id).defaultValue) {
29
- if (_isFilterMatch(item.id, filter)) {
30
- const classParts = widget._class.trim().split(" ");
31
- for (const i in classParts) {
32
- if (classParts.HasOwnProperty(i)) {
33
- if (propObj[classParts[i]] === undefined) {
34
- propObj[classParts[i]] = {};
35
- }
36
- if (propObj[classParts[i]][item.id] === undefined) {
37
- propObj[classParts[i]][item.id] = widget[item.id]();
38
- break;
39
- } else if (propObj[classParts[i]][item.id] === widget[item.id]()) {
40
- break;
41
- }
42
- }
43
- }
44
- }
45
- }
46
- });
47
-
48
- function _isFilterMatch(str, arr) {
49
- let ret = false;
50
- for (const i in arr) {
51
- if (str.indexOf(arr[i]) !== -1) {
52
- ret = true;
53
- break;
54
- }
55
- }
56
- return ret;
57
- }
58
- return propObj;
59
- }
60
- export function removeTheme(widget2, callback) {
61
- widgetPropertyWalker(widget2, null, function (widget, item) {
62
- widget.publishedProperty(item.id).defaultValue = widget.publishedProperty(item.id).origDefaultValue;
63
- });
64
-
65
- if (typeof (callback) === "function") {
66
- callback.call(this);
67
- }
68
- }
69
- export function applyTheme(widget2, themeObj, callback) {
70
- const context = this;
71
- widgetPropertyWalker(widget2, null, function (widget3, item) {
72
- switch (item.type) {
73
- case "widget":
74
- context.applyTheme(widget3[item.id](), themeObj);
75
- return true;
76
- case "widgetArray":
77
- const widgetArray = widget3[item.id]();
78
- widgetArray.forEach(function (widget) {
79
- context.applyTheme(widget, themeObj);
80
- }, this);
81
- return true;
82
- default:
83
- widget3.applyTheme(themeObj);
84
- break;
85
- }
86
- });
87
- if (typeof (callback) === "function") {
88
- callback.call(this);
89
- }
90
- }
91
-
92
- export function serializeToObject(widget, filter?, includeData?, includeState?) {
93
- const retVal: any = {
94
- __class: widget.classID()
95
- };
96
- if (widget._id.indexOf(widget._idSeed) !== 0) {
97
- retVal.__id = widget._id;
98
- }
99
- if (widget.version) {
100
- retVal.__version = widget.version();
101
- }
102
- retVal.__properties = {};
103
-
104
- widget.propertyWalker((childWwidget2, item) => {
105
- if (childWwidget2[item.id + "_modified"]()) {
106
- switch (item.type) {
107
- case "widget":
108
- retVal.__properties[item.id] = serializeToObject(childWwidget2[item.id](), null, includeData, includeState && !widget.serializeState); // Only include state once
109
- return true;
110
- case "widgetArray":
111
- case "propertyArray":
112
- retVal.__properties[item.id] = [];
113
- const widgetArray = childWwidget2[item.id]();
114
- widgetArray.forEach((childWwidget) => {
115
- retVal.__properties[item.id].push(serializeToObject(childWwidget, null, includeData, includeState && !widget.serializeState)); // Only include state once
116
- });
117
- return true;
118
- default:
119
- retVal.__properties[item.id] = childWwidget2[item.id]();
120
- break;
121
- }
122
- }
123
- }, filter);
124
-
125
- if (widget.classID() === "marshaller_Graph") {
126
- const vertices = widget.data().vertices;
127
- if (vertices) {
128
- this.__vertices = vertices.map(item => {
129
- return serializeToObject(item, null, includeData, includeState && !widget.serializeState);
130
- });
131
- }
132
- }
133
- if (includeData && widget.data) {
134
- if (!retVal.__data) retVal.__data = {};
135
- retVal.__data.data = widget.data();
136
- }
137
- if (includeState) {
138
- if (widget.serializeState) {
139
- retVal.__state = widget.serializeState();
140
- } else if (widget.data) {
141
- retVal.__state = {
142
- data: widget.data()
143
- };
144
- }
145
- }
146
- return retVal;
147
- }
148
-
149
- export function serialize(widget, filter?, includeData?, includeState?) {
150
- return JSON.stringify(serializeToObject(widget, filter, includeData, includeState));
151
- }
1
+ export function discover(widget) {
2
+ return widget.publishedProperties(false, true);
3
+ }
4
+
5
+ export function widgetArrayWalker(widgets, visitor) {
6
+ if (!widgets)
7
+ return;
8
+ widgets.forEach(function (widget) {
9
+ widget.widgetWalker(visitor);
10
+ });
11
+ }
12
+
13
+ export function widgetPropertyWalker(widget2, visitor, filter?) {
14
+ widget2.widgetWalker(function (widget) {
15
+ widget.propertyWalker(visitor, filter);
16
+ });
17
+ }
18
+
19
+ export function serializeTheme(widget, filter) {
20
+ return JSON.stringify(serializeThemeToObject(widget, filter));
21
+ }
22
+
23
+ export function serializeThemeToObject(widget2, filter?) {
24
+ filter = filter || ["surface", "Color", "Font", "palette"];
25
+
26
+ const propObj = {};
27
+ widgetPropertyWalker(widget2, null, function (widget, item) {
28
+ if (widget[item.id + "_modified"]() || widget.publishedProperty(item.id).origDefaultValue !== widget.publishedProperty(item.id).defaultValue) {
29
+ if (_isFilterMatch(item.id, filter)) {
30
+ const classParts = widget._class.trim().split(" ");
31
+ for (const i in classParts) {
32
+ if (classParts.HasOwnProperty(i)) {
33
+ if (propObj[classParts[i]] === undefined) {
34
+ propObj[classParts[i]] = {};
35
+ }
36
+ if (propObj[classParts[i]][item.id] === undefined) {
37
+ propObj[classParts[i]][item.id] = widget[item.id]();
38
+ break;
39
+ } else if (propObj[classParts[i]][item.id] === widget[item.id]()) {
40
+ break;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ });
47
+
48
+ function _isFilterMatch(str, arr) {
49
+ let ret = false;
50
+ for (const i in arr) {
51
+ if (str.indexOf(arr[i]) !== -1) {
52
+ ret = true;
53
+ break;
54
+ }
55
+ }
56
+ return ret;
57
+ }
58
+ return propObj;
59
+ }
60
+ export function removeTheme(widget2, callback) {
61
+ widgetPropertyWalker(widget2, null, function (widget, item) {
62
+ widget.publishedProperty(item.id).defaultValue = widget.publishedProperty(item.id).origDefaultValue;
63
+ });
64
+
65
+ if (typeof (callback) === "function") {
66
+ callback.call(this);
67
+ }
68
+ }
69
+ export function applyTheme(widget2, themeObj, callback) {
70
+ const context = this;
71
+ widgetPropertyWalker(widget2, null, function (widget3, item) {
72
+ switch (item.type) {
73
+ case "widget":
74
+ context.applyTheme(widget3[item.id](), themeObj);
75
+ return true;
76
+ case "widgetArray":
77
+ const widgetArray = widget3[item.id]();
78
+ widgetArray.forEach(function (widget) {
79
+ context.applyTheme(widget, themeObj);
80
+ }, this);
81
+ return true;
82
+ default:
83
+ widget3.applyTheme(themeObj);
84
+ break;
85
+ }
86
+ });
87
+ if (typeof (callback) === "function") {
88
+ callback.call(this);
89
+ }
90
+ }
91
+
92
+ export function serializeToObject(widget, filter?, includeData?, includeState?) {
93
+ const retVal: any = {
94
+ __class: widget.classID()
95
+ };
96
+ if (widget._id.indexOf(widget._idSeed) !== 0) {
97
+ retVal.__id = widget._id;
98
+ }
99
+ if (widget.version) {
100
+ retVal.__version = widget.version();
101
+ }
102
+ retVal.__properties = {};
103
+
104
+ widget.propertyWalker((childWwidget2, item) => {
105
+ if (childWwidget2[item.id + "_modified"]()) {
106
+ switch (item.type) {
107
+ case "widget":
108
+ retVal.__properties[item.id] = serializeToObject(childWwidget2[item.id](), null, includeData, includeState && !widget.serializeState); // Only include state once
109
+ return true;
110
+ case "widgetArray":
111
+ case "propertyArray":
112
+ retVal.__properties[item.id] = [];
113
+ const widgetArray = childWwidget2[item.id]();
114
+ widgetArray.forEach((childWwidget) => {
115
+ retVal.__properties[item.id].push(serializeToObject(childWwidget, null, includeData, includeState && !widget.serializeState)); // Only include state once
116
+ });
117
+ return true;
118
+ default:
119
+ retVal.__properties[item.id] = childWwidget2[item.id]();
120
+ break;
121
+ }
122
+ }
123
+ }, filter);
124
+
125
+ if (widget.classID() === "marshaller_Graph") {
126
+ const vertices = widget.data().vertices;
127
+ if (vertices) {
128
+ this.__vertices = vertices.map(item => {
129
+ return serializeToObject(item, null, includeData, includeState && !widget.serializeState);
130
+ });
131
+ }
132
+ }
133
+ if (includeData && widget.data) {
134
+ if (!retVal.__data) retVal.__data = {};
135
+ retVal.__data.data = widget.data();
136
+ }
137
+ if (includeState) {
138
+ if (widget.serializeState) {
139
+ retVal.__state = widget.serializeState();
140
+ } else if (widget.data) {
141
+ retVal.__state = {
142
+ data: widget.data()
143
+ };
144
+ }
145
+ }
146
+ return retVal;
147
+ }
148
+
149
+ export function serialize(widget, filter?, includeData?, includeState?) {
150
+ return JSON.stringify(serializeToObject(widget, filter, includeData, includeState));
151
+ }
@@ -1,131 +1,131 @@
1
- .other_PropertyEditor{
2
- overflow-y:scroll;
3
- height:100%;
4
- width:100%;
5
- }
6
- .other_PropertyEditor .other_PropertyEditor{
7
- overflow:hidden;
8
- }
9
- .other_PropertyEditor .property-table{
10
- width:100%;
11
- border: 1px solid #ddd;
12
- border-width:0 0 0 1px;
13
- }
14
- .other_PropertyEditor thead > tr > th{background-color:#333;}
15
- .other_PropertyEditor .other_PropertyEditor th{background-color:#444;}
16
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#555;}
17
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#666;}
18
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#777;}
19
-
20
- .other_PropertyEditor .headerRow{background-color:#eee;}
21
- .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ddd;}
22
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ccc;}
23
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#bbb;}
24
- .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#aaa;}
25
-
26
- .other_PropertyEditor .fa {
27
- font-size:14px;
28
- width:14px
29
- }
30
-
31
- .other_PropertyEditor div.property-table-collapsed {
32
- display:none;
33
- }
34
-
35
- .other_PropertyEditor .headerRow > .peInput {
36
- padding-top:2px;
37
- }
38
-
39
- .other_PropertyEditor .headerRow > .peInput > span {
40
- font-weight: bold;
41
- padding-left: 2px;
42
- }
43
-
44
- .other_PropertyEditor .headerRow > .peInput > i {
45
- float:right;
46
- padding-top: 2px;
47
- padding-bottom: 2px;
48
- }
49
-
50
- .other_PropertyEditor .headerRow > span > i:hover {
51
- background-color: #555;
52
- cursor:pointer;
53
- }
54
- .other_PropertyEditor .property-table thead > tr > th {
55
- text-align:left;
56
- background-color:#333;
57
- color:#fff;
58
- padding-top:2px;
59
- padding-left:4px;
60
- }
61
- .other_PropertyEditor .property-table thead > tr > th > i {
62
- float:right;
63
- padding-top: 2px;
64
- padding-right: 4px;
65
- padding-bottom: 2px;
66
- }
67
- .other_PropertyEditor .property-table thead > tr > th > i:hover{
68
- background-color: #555;
69
- cursor:pointer;
70
- }
71
- .other_PropertyEditor .property-table tbody > tr:nth-child(even){
72
- background-color: #F9F9F9;
73
- }
74
- .other_PropertyEditor .property-table tbody > tr:nth-child(odd){
75
- background-color: #FFF;
76
- }
77
- .other_PropertyEditor .property-table tbody > tr > td{
78
- text-align:left;
79
- color:#333;
80
- padding:0 0 0 2px;
81
- }
82
- .other_PropertyEditor .property-table tbody > tr.disabled > td {
83
- color:gray;
84
- }
85
- .other_PropertyEditor .property-table tbody > tr.invalid > td {
86
- color:red;
87
- }
88
- .other_PropertyEditor .property-input-cell > div{
89
- padding-left: 8px;
90
- }
91
- .other_PropertyEditor .property-label{
92
- padding-right: 4px;
93
- box-sizing: border-box;
94
- height: 20px;
95
- }
96
- .other_PropertyEditor td.property-input-cell{
97
- text-align:left;
98
- height:20px;
99
- padding:1px 0;
100
- width:80%
101
- }
102
- .other_PropertyEditor .property-input-cell > input,
103
- .other_PropertyEditor .property-input-cell > textarea{
104
- width:100%;
105
- box-sizing: border-box;
106
- }
107
- .other_PropertyEditor .property-input-cell > input{
108
- height: 20px;
109
- }
110
- .other_PropertyEditor .property-input-cell > textarea{
111
- height: 120px;
112
- }
113
- .other_PropertyEditor .property-input-cell.boolean-cell{
114
- width:auto;
115
- margin:0;
116
- position:relative;
117
- }
118
- .other_PropertyEditor .property-input-cell > input[type="checkbox"]{
119
- width:auto;
120
- margin:0;
121
- position:absolute;
122
- top: 0;
123
- }
124
- .other_PropertyEditor .html-color-cell > input{
125
- width:80%;
126
- }
127
- .other_PropertyEditor .html-color-cell > input[type="color"]{
128
- width:20%;
129
- position: relative;
130
- top: -1px;
1
+ .other_PropertyEditor{
2
+ overflow-y:scroll;
3
+ height:100%;
4
+ width:100%;
5
+ }
6
+ .other_PropertyEditor .other_PropertyEditor{
7
+ overflow:hidden;
8
+ }
9
+ .other_PropertyEditor .property-table{
10
+ width:100%;
11
+ border: 1px solid #ddd;
12
+ border-width:0 0 0 1px;
13
+ }
14
+ .other_PropertyEditor thead > tr > th{background-color:#333;}
15
+ .other_PropertyEditor .other_PropertyEditor th{background-color:#444;}
16
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#555;}
17
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#666;}
18
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor th{background-color:#777;}
19
+
20
+ .other_PropertyEditor .headerRow{background-color:#eee;}
21
+ .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ddd;}
22
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#ccc;}
23
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#bbb;}
24
+ .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .other_PropertyEditor .headerRow{background-color:#aaa;}
25
+
26
+ .other_PropertyEditor .fa {
27
+ font-size:14px;
28
+ width:14px
29
+ }
30
+
31
+ .other_PropertyEditor div.property-table-collapsed {
32
+ display:none;
33
+ }
34
+
35
+ .other_PropertyEditor .headerRow > .peInput {
36
+ padding-top:2px;
37
+ }
38
+
39
+ .other_PropertyEditor .headerRow > .peInput > span {
40
+ font-weight: bold;
41
+ padding-left: 2px;
42
+ }
43
+
44
+ .other_PropertyEditor .headerRow > .peInput > i {
45
+ float:right;
46
+ padding-top: 2px;
47
+ padding-bottom: 2px;
48
+ }
49
+
50
+ .other_PropertyEditor .headerRow > span > i:hover {
51
+ background-color: #555;
52
+ cursor:pointer;
53
+ }
54
+ .other_PropertyEditor .property-table thead > tr > th {
55
+ text-align:left;
56
+ background-color:#333;
57
+ color:#fff;
58
+ padding-top:2px;
59
+ padding-left:4px;
60
+ }
61
+ .other_PropertyEditor .property-table thead > tr > th > i {
62
+ float:right;
63
+ padding-top: 2px;
64
+ padding-right: 4px;
65
+ padding-bottom: 2px;
66
+ }
67
+ .other_PropertyEditor .property-table thead > tr > th > i:hover{
68
+ background-color: #555;
69
+ cursor:pointer;
70
+ }
71
+ .other_PropertyEditor .property-table tbody > tr:nth-child(even){
72
+ background-color: #F9F9F9;
73
+ }
74
+ .other_PropertyEditor .property-table tbody > tr:nth-child(odd){
75
+ background-color: #FFF;
76
+ }
77
+ .other_PropertyEditor .property-table tbody > tr > td{
78
+ text-align:left;
79
+ color:#333;
80
+ padding:0 0 0 2px;
81
+ }
82
+ .other_PropertyEditor .property-table tbody > tr.disabled > td {
83
+ color:gray;
84
+ }
85
+ .other_PropertyEditor .property-table tbody > tr.invalid > td {
86
+ color:red;
87
+ }
88
+ .other_PropertyEditor .property-input-cell > div{
89
+ padding-left: 8px;
90
+ }
91
+ .other_PropertyEditor .property-label{
92
+ padding-right: 4px;
93
+ box-sizing: border-box;
94
+ height: 20px;
95
+ }
96
+ .other_PropertyEditor td.property-input-cell{
97
+ text-align:left;
98
+ height:20px;
99
+ padding:1px 0;
100
+ width:80%
101
+ }
102
+ .other_PropertyEditor .property-input-cell > input,
103
+ .other_PropertyEditor .property-input-cell > textarea{
104
+ width:100%;
105
+ box-sizing: border-box;
106
+ }
107
+ .other_PropertyEditor .property-input-cell > input{
108
+ height: 20px;
109
+ }
110
+ .other_PropertyEditor .property-input-cell > textarea{
111
+ height: 120px;
112
+ }
113
+ .other_PropertyEditor .property-input-cell.boolean-cell{
114
+ width:auto;
115
+ margin:0;
116
+ position:relative;
117
+ }
118
+ .other_PropertyEditor .property-input-cell > input[type="checkbox"]{
119
+ width:auto;
120
+ margin:0;
121
+ position:absolute;
122
+ top: 0;
123
+ }
124
+ .other_PropertyEditor .html-color-cell > input{
125
+ width:80%;
126
+ }
127
+ .other_PropertyEditor .html-color-cell > input[type="color"]{
128
+ width:20%;
129
+ position: relative;
130
+ top: -1px;
131
131
  }