@wavemaker/app-ng-runtime 11.4.0-next.25501 → 11.4.0-next.25701
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.
- app-ng-runtime/build-task/basic/tree/tree.build.d.ts +1 -2
- app-ng-runtime/build-task/bundles/index.umd.js +9 -11
- app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
- app-ng-runtime/build-task/esm2015/basic/tree/tree.build.js +3 -4
- app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +3 -3
- app-ng-runtime/build-task/esm2015/navigation/popover/popover.build.js +3 -3
- app-ng-runtime/build-task/fesm2015/index.js +9 -11
- app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +29 -4
- app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/base/esm2015/public_api.js +2 -2
- app-ng-runtime/components/base/esm2015/utils/widget-utils.js +22 -4
- app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
- app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
- app-ng-runtime/components/base/fesm2015/index.js +30 -6
- app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/index.metadata.json +1 -1
- app-ng-runtime/components/base/public_api.d.ts +1 -1
- app-ng-runtime/components/base/utils/widget-utils.d.ts +8 -1
- app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js +2 -2
- app-ng-runtime/components/basic/rich-text-editor/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/basic/rich-text-editor/esm2015/rich-text-editor.component.js +3 -3
- app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js +2 -2
- app-ng-runtime/components/basic/rich-text-editor/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/basic/tree/bundles/index.umd.js +280 -256
- app-ng-runtime/components/basic/tree/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/basic/tree/esm2015/public_api.js +2 -2
- app-ng-runtime/components/basic/tree/esm2015/tree.component.js +322 -0
- app-ng-runtime/components/basic/tree/esm2015/tree.module.js +3 -3
- app-ng-runtime/components/basic/tree/fesm2015/index.js +260 -248
- app-ng-runtime/components/basic/tree/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/basic/tree/index.metadata.json +1 -1
- app-ng-runtime/components/basic/tree/public_api.d.ts +1 -1
- app-ng-runtime/components/basic/tree/tree.component.d.ts +34 -0
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js +39 -23
- app-ng-runtime/components/containers/tabs/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/containers/tabs/esm2015/tab-pane/tab-pane.component.js +8 -1
- app-ng-runtime/components/containers/tabs/esm2015/tabs.animator.js +33 -13
- app-ng-runtime/components/containers/tabs/fesm2015/index.js +40 -13
- app-ng-runtime/components/containers/tabs/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/containers/tabs/tabs.animator.d.ts +5 -1
- app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
- app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
- app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
- app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
- app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/form/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/bundles/index.umd.js +63 -48
- app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/list/esm2015/list.component.js +61 -46
- app-ng-runtime/components/data/list/fesm2015/index.js +60 -45
- app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/list/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/list.component.d.ts +1 -1
- app-ng-runtime/components/data/pagination/bundles/index.umd.js +22 -5
- app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +23 -6
- app-ng-runtime/components/data/pagination/fesm2015/index.js +22 -5
- app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/pagination/index.metadata.json +1 -1
- app-ng-runtime/components/data/pagination/pagination.component.d.ts +1 -0
- app-ng-runtime/components/data/table/bundles/index.umd.js +66 -13
- app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/table/esm2015/table-filter.directive.js +3 -2
- app-ng-runtime/components/data/table/esm2015/table.component.js +63 -13
- app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
- app-ng-runtime/components/data/table/fesm2015/index.js +66 -13
- app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/table/index.metadata.json +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +9 -0
- app-ng-runtime/components/dialogs/default/base-dialog.d.ts +1 -0
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js +17 -3
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +18 -5
- app-ng-runtime/components/dialogs/default/fesm2015/index.js +17 -4
- app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +5 -0
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +97 -32
- app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/input/epoch/date-time/date-time-picker.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +73 -26
- app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +3 -4
- app-ng-runtime/components/input/epoch/esm2015/date-time/date-time-picker.component.js +31 -11
- app-ng-runtime/components/input/epoch/esm2015/date-time/date-time.component.js +2 -2
- app-ng-runtime/components/input/epoch/fesm2015/index.js +105 -39
- app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
- app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
- app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
- app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -1
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +5 -3
- app-ng-runtime/components/navigation/popover/fesm2015/index.js +4 -2
- app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +7 -1
- app-ng-runtime/core/bundles/index.umd.js.map +1 -1
- app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
- app-ng-runtime/core/fesm2015/index.js +7 -1
- app-ng-runtime/core/fesm2015/index.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/bundles/index.umd.js +24 -6
- app-ng-runtime/mobile/components/page/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/esm2015/page.directive.js +20 -3
- app-ng-runtime/mobile/components/page/default/fesm2015/index.js +19 -2
- app-ng-runtime/mobile/components/page/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/mobile/components/page/default/index.metadata.json +1 -1
- app-ng-runtime/mobile/components/page/default/page.directive.d.ts +4 -1
- app-ng-runtime/mobile/core/bundles/index.umd.js +2 -1
- app-ng-runtime/mobile/core/bundles/index.umd.js.map +1 -1
- app-ng-runtime/mobile/core/esm2015/services/device.service.js +3 -2
- app-ng-runtime/mobile/core/fesm2015/index.js +2 -1
- app-ng-runtime/mobile/core/fesm2015/index.js.map +1 -1
- app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js +3 -2
- app-ng-runtime/mobile/runtime-dynamic/bundles/index.umd.js.map +1 -1
- app-ng-runtime/mobile/runtime-dynamic/esm2015/services/live-sync.service.js +4 -3
- app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js +3 -2
- app-ng-runtime/mobile/runtime-dynamic/fesm2015/index.js.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/runtime/base/bundles/index.umd.js +1 -0
- app-ng-runtime/runtime/base/bundles/index.umd.js.map +1 -1
- app-ng-runtime/runtime/base/esm2015/services/prefab-manager.service.js +2 -1
- app-ng-runtime/runtime/base/fesm2015/index.js +1 -0
- app-ng-runtime/runtime/base/fesm2015/index.js.map +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +117 -48
- app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +3 -3
- app-ng-runtime/scripts/tree-keyboard-navigation/keyboard-navigation.js +251 -0
- app-ng-runtime/variables/bundles/index.umd.js +19 -16
- app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
- app-ng-runtime/variables/esm2015/constants/variables.constants.js +3 -9
- app-ng-runtime/variables/esm2015/manager/action/notification-action.manager.js +5 -6
- app-ng-runtime/variables/esm2015/service/variables.service.js +8 -1
- app-ng-runtime/variables/fesm2015/index.js +13 -14
- app-ng-runtime/variables/fesm2015/index.js.map +1 -1
- app-ng-runtime/variables/index.metadata.json +1 -1
- app-ng-runtime/variables/service/variables.service.d.ts +4 -0
- app-ng-runtime/components/basic/tree/esm2015/tree.directive.js +0 -310
- app-ng-runtime/components/basic/tree/tree.directive.d.ts +0 -35
|
@@ -0,0 +1,251 @@
|
|
|
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);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wm/core'), require('angular2-websocket/angular2-websocket'), require('@metrichor/jmespath'), require('@angular/core'), require('@angular/router'), require('@wm/oAuth'), require('@wm/security'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@wm/variables', ['exports', '@wm/core', 'angular2-websocket/angular2-websocket', '@metrichor/jmespath', '@angular/core', '@angular/router', '@wm/oAuth', '@wm/security', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm.core, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.
|
|
5
|
-
})(this, (function (exports, core, angular2Websocket, jmespath, core$1, router, oAuth, security,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wavemaker/variables'), require('@wm/core'), require('angular2-websocket/angular2-websocket'), require('@metrichor/jmespath'), require('@angular/core'), require('@angular/router'), require('@wm/oAuth'), require('@wm/security'), require('@angular/common'), require('@angular/common/http'), require('ngx-toastr'), require('@wm/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@wm/variables', ['exports', '@wavemaker/variables', '@wm/core', 'angular2-websocket/angular2-websocket', '@metrichor/jmespath', '@angular/core', '@angular/router', '@wm/oAuth', '@wm/security', '@angular/common', '@angular/common/http', 'ngx-toastr', '@wm/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.variables = {}), global.wm_common_variables, global.wm.core, global.angularWebSocket, global.jmespath, global.ng.core, global.ng.router, global.wm.oAuth, global.wm.security, global.ng.common, global.ng.common.http, global.ngxToastr, global.wm.http));
|
|
5
|
+
})(this, (function (exports, variables, core, angular2Websocket, jmespath, core$1, router, oAuth, security, common, http, ngxToastr, http$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var CONSTANTS = {
|
|
8
8
|
hasCordova: window['cordova'] !== undefined,
|
|
@@ -327,14 +327,7 @@
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
};
|
|
330
|
-
var $rootScope =
|
|
331
|
-
project: {
|
|
332
|
-
deployedUrl: './',
|
|
333
|
-
id: 'temp_id'
|
|
334
|
-
},
|
|
335
|
-
projectName: 'test_project_name',
|
|
336
|
-
isApplicationType: true
|
|
337
|
-
};
|
|
330
|
+
var $rootScope = variables.$rootScope;
|
|
338
331
|
|
|
339
332
|
/*! *****************************************************************************
|
|
340
333
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1571,9 +1564,9 @@
|
|
|
1571
1564
|
}
|
|
1572
1565
|
};
|
|
1573
1566
|
NotificationActionManager.prototype.notifyViaDialog = function (variable, options) {
|
|
1574
|
-
var commonPageDialogId = 'Common' + _.capitalize(variable.operation) + 'Dialog',
|
|
1567
|
+
var commonPageDialogId = 'Common' + _.capitalize(variable.operation) + 'Dialog', dialogId = commonPageDialogId;
|
|
1575
1568
|
var closeCallBackFn = function () { return initiateCallback('onOk', variable, options.data); };
|
|
1576
|
-
exports.dialogService.open(dialogId,
|
|
1569
|
+
exports.dialogService.open(dialogId, undefined, {
|
|
1577
1570
|
notification: {
|
|
1578
1571
|
'title': options.title || variable.dataBinding.title,
|
|
1579
1572
|
'text': options.message || variable.dataBinding.text,
|
|
@@ -1582,12 +1575,12 @@
|
|
|
1582
1575
|
'alerttype': options.alerttype || variable.dataBinding.alerttype || 'information',
|
|
1583
1576
|
onOk: function () {
|
|
1584
1577
|
// Close the action dialog after triggering onOk callback event
|
|
1585
|
-
exports.dialogService.close(dialogId,
|
|
1578
|
+
exports.dialogService.close(dialogId, undefined, closeCallBackFn);
|
|
1586
1579
|
},
|
|
1587
1580
|
onCancel: function () {
|
|
1588
1581
|
initiateCallback('onCancel', variable, options.data);
|
|
1589
1582
|
// Close the action dialog after triggering onCancel callback event
|
|
1590
|
-
exports.dialogService.close(dialogId,
|
|
1583
|
+
exports.dialogService.close(dialogId, undefined);
|
|
1591
1584
|
},
|
|
1592
1585
|
onClose: function () {
|
|
1593
1586
|
initiateCallback('onClose', variable, options.data);
|
|
@@ -3493,6 +3486,14 @@
|
|
|
3493
3486
|
{ type: core.AbstractHttpService }
|
|
3494
3487
|
]; };
|
|
3495
3488
|
|
|
3489
|
+
var Formatter = /** @class */ (function () {
|
|
3490
|
+
function Formatter() {
|
|
3491
|
+
}
|
|
3492
|
+
Formatter.prototype.format = function (value, format) {
|
|
3493
|
+
return exports.appManager.getPipe('date').transform(value, format);
|
|
3494
|
+
};
|
|
3495
|
+
return Formatter;
|
|
3496
|
+
}());
|
|
3496
3497
|
var VariablesService = /** @class */ (function () {
|
|
3497
3498
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
3498
3499
|
this.httpService = httpService;
|
|
@@ -3618,6 +3619,7 @@
|
|
|
3618
3619
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
3619
3620
|
this.processBinding(varInstance, scope, 'dataBinding', this.getBindSourceTarget(varInstance));
|
|
3620
3621
|
varInstance.httpService = this.httpService;
|
|
3622
|
+
varInstance.dateFormatter = new Formatter();
|
|
3621
3623
|
varInstance.subscribe('afterInvoke', function () { return core.$invokeWatchers(true); });
|
|
3622
3624
|
if (varInstance.category === 'wm.LiveVariable' && varInstance.operation === 'read') {
|
|
3623
3625
|
core.processFilterExpBindNode(varInstance._context, varInstance.filterExpressions, varInstance);
|
|
@@ -3712,6 +3714,7 @@
|
|
|
3712
3714
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
3713
3715
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
3714
3716
|
exports.DeviceVariableService = DeviceVariableService;
|
|
3717
|
+
exports.Formatter = Formatter;
|
|
3715
3718
|
exports.MetadataService = MetadataService;
|
|
3716
3719
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
3717
3720
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|