@wavemaker/app-ng-runtime 11.4.0-next.25701 → 11.4.0-next.25703

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 (59) hide show
  1. app-ng-runtime/build-task/basic/tree/tree.build.d.ts +2 -1
  2. app-ng-runtime/build-task/bundles/index.umd.js +9 -7
  3. app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
  4. app-ng-runtime/build-task/esm2015/basic/tree/tree.build.js +4 -3
  5. app-ng-runtime/build-task/esm2015/navigation/popover/popover.build.js +3 -3
  6. app-ng-runtime/build-task/fesm2015/index.js +9 -7
  7. app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
  8. app-ng-runtime/components/base/bundles/index.umd.js +3 -6
  9. app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
  10. app-ng-runtime/components/base/esm2015/utils/widget-utils.js +4 -7
  11. app-ng-runtime/components/base/fesm2015/index.js +3 -6
  12. app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
  13. app-ng-runtime/components/base/utils/widget-utils.d.ts +1 -1
  14. app-ng-runtime/components/basic/tree/bundles/index.umd.js +256 -280
  15. app-ng-runtime/components/basic/tree/bundles/index.umd.js.map +1 -1
  16. app-ng-runtime/components/basic/tree/esm2015/public_api.js +2 -2
  17. app-ng-runtime/components/basic/tree/esm2015/tree.directive.js +310 -0
  18. app-ng-runtime/components/basic/tree/esm2015/tree.module.js +3 -3
  19. app-ng-runtime/components/basic/tree/fesm2015/index.js +248 -260
  20. app-ng-runtime/components/basic/tree/fesm2015/index.js.map +1 -1
  21. app-ng-runtime/components/basic/tree/index.metadata.json +1 -1
  22. app-ng-runtime/components/basic/tree/public_api.d.ts +1 -1
  23. app-ng-runtime/components/basic/tree/tree.directive.d.ts +35 -0
  24. app-ng-runtime/components/data/list/bundles/index.umd.js +4 -28
  25. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  26. app-ng-runtime/components/data/list/esm2015/list.component.js +5 -29
  27. app-ng-runtime/components/data/list/fesm2015/index.js +4 -28
  28. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  29. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  30. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  31. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +1 -1
  32. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  33. app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
  34. app-ng-runtime/components/input/epoch/bundles/index.umd.js +21 -39
  35. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  36. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +25 -43
  37. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +3 -3
  38. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time.component.js +2 -2
  39. app-ng-runtime/components/input/epoch/fesm2015/index.js +27 -45
  40. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  41. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  42. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +4 -3
  43. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  44. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +6 -5
  45. app-ng-runtime/components/navigation/popover/fesm2015/index.js +5 -4
  46. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  47. app-ng-runtime/package.json +1 -1
  48. app-ng-runtime/scripts/datatable/datatable.js +23 -23
  49. app-ng-runtime/variables/bundles/index.umd.js +4 -14
  50. app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
  51. app-ng-runtime/variables/esm2015/manager/action/notification-action.manager.js +6 -5
  52. app-ng-runtime/variables/esm2015/service/variables.service.js +1 -8
  53. app-ng-runtime/variables/fesm2015/index.js +5 -11
  54. app-ng-runtime/variables/fesm2015/index.js.map +1 -1
  55. app-ng-runtime/variables/index.metadata.json +1 -1
  56. app-ng-runtime/variables/service/variables.service.d.ts +0 -4
  57. app-ng-runtime/components/basic/tree/esm2015/tree.component.js +0 -322
  58. app-ng-runtime/components/basic/tree/tree.component.d.ts +0 -34
  59. app-ng-runtime/scripts/tree-keyboard-navigation/keyboard-navigation.js +0 -251
@@ -1,251 +0,0 @@
1
- (function ($) {
2
- /**
3
- * Dummy function to provide a placeholder for the destroy function
4
- */
5
- $.fn.zTreeKeyboardNavigationDestroy = function () {
6
- }
7
-
8
- /**
9
- * Creates a function that adds keyboard navigation:
10
- * Home: home key (keycode 36) Goes to the first root element is visible
11
- * End: end key (keycode 35) Goes to the last leaf node and will expand nodes and scroll the element into view
12
- * Down: right cursor key (keycode 39) Goes to the next visible node in the tree following the hierarchy
13
- * Next: down cursor key (keycode 40) Goes to the next visible node at the same level
14
- * Up: up cursor key (keycode 37) Goes to the prior visible node at the same level
15
- * Previous: left cursor key (keycode 38) Goes to the prior visible node following the hierarchy
16
- * Toggle: space key (keycode 32) Toggles the expand/collapse state of a parent node
17
- * @param {IxTreeObj} zTree
18
- * @param {string|JQuery<HTMLElement} element
19
- * @param {IJSON[]} selectedNodes
20
- */
21
- $.fn.zTreeKeyboardNavigation = function (zTree, element, selectedNodes = null, treeicon) {
22
- if (typeof element === 'string' || element instanceof String) {
23
- element = $(element);
24
- }
25
-
26
- var rootNodes = zTree.getNodes();
27
- if (!rootNodes) return;
28
-
29
- var focusSelectedNode = function () {
30
- if ((selectedNodes = zTree.getSelectedNodes()) && selectedNodes.length) {
31
- $("#" + selectedNodes[0].tId).focus();
32
- }
33
- }
34
-
35
- // Clear the previous event handler (there may be none)
36
- $.fn.zTreeKeyboardNavigationDestroy();
37
-
38
- /**
39
- * Make it possible to destroy (remove the event handlers)
40
- */
41
- $.fn.zTreeKeyboardNavigationDestroy = function () {
42
- $(element).off('keydown');
43
- }
44
-
45
- $.fn.changeTreeIcons = function () {
46
- let eleClose = $('.app-tree li span.button.switch');
47
-
48
- $(eleClose).map((idx, ele) => {
49
- $(ele).addClass(treeicon);
50
- $(ele).on("click", function (e) {
51
- setTimeout(() => {
52
- $(ele).addClass(treeicon);
53
- }, 0);
54
- });
55
- })
56
- }
57
-
58
-
59
- $(element).on('keydown', function (e) {
60
- var selectedNodes = zTree.getSelectedNodes();
61
- var selectedNode = selectedNodes.length ? selectedNodes[0] : null;
62
-
63
- var processSpace = function () {
64
- // If there are no nodes or the selected node is not a parent, get out
65
- if (selectedNode && selectedNode.isParent) {
66
- // Toggle the node
67
- zTree.expandNode(selectedNode, selectedNode.open ? false : true, true, true);
68
- $.fn.changeTreeIcons()
69
- }
70
- }
71
-
72
- var processHome = function () {
73
- zTree.selectNode(rootNodes[0], false, true);
74
- }
75
-
76
- var processEnd = function () {
77
- var nodes = zTree.transformToArray(rootNodes);
78
- // Select the last node
79
- zTree.selectNode(nodes[nodes.length - 1]);
80
- }
81
-
82
- var processUp = function () {
83
- var priorNode;
84
- if (selectedNode) {
85
- priorNode = selectedNode.getPreNode();
86
- if (!priorNode) return;
87
- }
88
- else {
89
- processEnd();
90
- }
91
-
92
- if (!priorNode) return;
93
-
94
- zTree.selectNode(priorNode);
95
- }
96
-
97
- var processDown = function () {
98
- var nextNode;
99
- if (selectedNode) {
100
- nextNode = selectedNode.getNextNode();
101
- if (!nextNode) return;
102
- }
103
- else {
104
- processHome();
105
- }
106
-
107
- if (!nextNode) return;
108
-
109
- zTree.selectNode(nextNode);
110
- }
111
-
112
- var processOut = function () {
113
- if (!selectedNode) return;
114
-
115
- var parentNode = selectedNode.getParentNode();
116
- var priorNode = selectedNode.getPreNode();
117
- if (!parentNode && !priorNode) return; // Must have been the root node
118
-
119
- if (priorNode) {
120
- if (priorNode.isParent) {
121
- // There is a prior node, now the the question is where is the last open node?
122
- while (priorNode) {
123
- if (!priorNode.isParent || !priorNode.open || !priorNode.children) break;
124
-
125
- priorNode = priorNode.children[priorNode.children.length - 1];
126
- }
127
-
128
- zTree.selectNode(priorNode);
129
- return;
130
- }
131
- else {
132
- zTree.selectNode(priorNode);
133
- return;
134
- }
135
- }
136
-
137
- // Find the parent node with a valid prior sibling
138
- if (parentNode) {
139
- // This call should be silent otherwise (in my view a bug in)
140
- // selectNode causes the root node to blur
141
- zTree.selectNode(parentNode, false, true);
142
- }
143
- }
144
-
145
- var processIn = function () {
146
- if (!selectedNode) return;
147
-
148
- if (selectedNode.isParent && selectedNode.open && selectedNode.children) {
149
- zTree.selectNode(selectedNode.children[0]);
150
- return;
151
- }
152
-
153
- var nextNode = selectedNode.getNextNode();
154
- if (nextNode) {
155
- zTree.selectNode(nextNode);
156
- }
157
- else {
158
- // Cannot be root if there is a selected node that is not a parent
159
- var node = selectedNode;
160
- // Find the parent node with a valid next sibling
161
- while (node = node.getParentNode()) {
162
- var nextNode = node.getNextNode();
163
- if (nextNode) {
164
- zTree.selectNode(nextNode);
165
- break;
166
- }
167
- }
168
- }
169
- }
170
-
171
- var processLetter = function (keyCode) {
172
- if (!Array.from({ length: 26 }, (v, i) => i + 65).includes(keyCode & 95)) return false;
173
-
174
- var nodes = zTree.transformToArray(rootNodes);
175
- nodes = nodes.filter(node => {
176
- return 'accesskey' in node && node.accesskey.length && (node.accesskey.charCodeAt(0) & 95) == keyCode;
177
- });
178
-
179
- if (!nodes.length) return false;
180
-
181
- var selectedNodes = zTree.getSelectedNodes();
182
- if (!selectedNodes.length) return false;
183
-
184
- if (selectedNodes[0] == nodes[0]) return false;
185
-
186
- zTree.selectNode(nodes[0]);
187
-
188
- return true;
189
- }
190
-
191
- // console.log('before');
192
- // console.log(document.activeElement);
193
-
194
- switch (e.keyCode) {
195
- case 32: /* Toggle parent nodes */
196
- processSpace();
197
- return;
198
-
199
- case 36: /* Home - go to the root node */
200
- processHome();
201
- break;
202
-
203
- case 35: /* End - go to the last node */
204
- processEnd();
205
- break;
206
-
207
- case 33: /* PageUp */
208
- // Do nothing
209
- break;
210
-
211
- case 34: /* PageDown */
212
- // Do nothing
213
- break;
214
-
215
- case 37: /* Left */
216
- processOut();
217
- break;
218
-
219
- case 38: /* Up */
220
- processUp();
221
- break;
222
-
223
- case 39: /* Right */
224
- processIn();
225
- break;
226
-
227
- case 40: /* Down */
228
- processDown();
229
- break;
230
-
231
- default:
232
- if (!processLetter(e.keyCode & 95)) return;
233
- break;
234
- }
235
-
236
- // console.log('after');
237
- // console.log(document.activeElement);
238
- focusSelectedNode();
239
- });
240
-
241
- if (selectedNodes && selectedNodes.length) {
242
- zTree.selectNode(selectedNodes[0]);
243
- focusSelectedNode();
244
- }
245
- else {
246
- $(element).trigger({ type: 'keydown', which: 36, keyCode: 36 });
247
- }
248
-
249
- }
250
-
251
- })(jQuery);