@agilemotion/oui-react-js 1.3.9 → 1.4.0
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.
- package/dist/{ApplicationContext.js → ApplicationManager.js} +196 -74
- package/dist/BasicApp.js +66 -63
- package/dist/BasicAppHome.js +85 -118
- package/dist/BusinessPortalAppHome.js +9 -15
- package/dist/DynamicJS.js +7 -3
- package/dist/RestUtils.js +13 -14
- package/dist/Utils.js +15 -9
- package/dist/WithRouter.js +34 -0
- package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
- package/dist/components/AlertBar.js +1 -1
- package/dist/components/Button.js +34 -25
- package/dist/components/Calendar.js +9 -45
- package/dist/components/DataGrid.js +49 -18
- package/dist/components/DataGridColumn.js +1 -1
- package/dist/components/DataGridFilter.js +2 -2
- package/dist/components/Dialog.js +1 -1
- package/dist/components/DocumentViewer.js +5 -5
- package/dist/components/FileThumb.js +30 -19
- package/dist/components/Graph.js +10 -2
- package/dist/components/GraphNode.js +1 -1
- package/dist/components/HtmlPanel.js +10 -5
- package/dist/components/Icon.js +8 -0
- package/dist/components/PopupView.js +1 -1
- package/dist/components/Portlet.js +100 -0
- package/dist/components/SignaturePanel.js +1 -1
- package/dist/components/SocketManager.js +2 -2
- package/dist/components/StepperTitleBar.js +4 -4
- package/dist/components/TabPanel.js +11 -3
- package/dist/components/TableCellContent.js +1 -1
- package/dist/components/TemplateDesigner.js +11 -11
- package/dist/components/TitleBar.js +4 -3
- package/dist/components/Toolbar.js +42 -11
- package/dist/components/Tree.js +3 -3
- package/dist/components/dashboard/BasicBusinessAppDashboard.js +9 -7
- package/dist/components/dashboard/components/Header.js +1 -1
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +74 -72
- package/dist/components/form/AutoComplete.js +31 -30
- package/dist/components/form/BaseField.js +38 -26
- package/dist/components/form/DatePicker.js +5 -2
- package/dist/components/form/FieldSet.js +11 -19
- package/dist/components/form/Form.js +24 -16
- package/dist/components/form/ImageEditor.js +4 -4
- package/dist/components/form/MultiFileUploadField.js +15 -14
- package/dist/components/form/RadioGroup.js +10 -11
- package/dist/components/form/Section.js +10 -0
- package/dist/components/form/TimePicker.js +1 -0
- package/dist/components/form/UploadField.js +115 -108
- package/dist/components/layout/Layout.js +65 -12
- package/dist/components/layout/View.css +1 -0
- package/dist/components/layout/View.js +20 -23
- package/dist/components/layout/ViewContainer.css +3 -0
- package/dist/components/layout/ViewContainer.js +59 -0
- package/dist/components/layout/ViewPort.js +50 -80
- package/dist/components/layout/Window.css +18 -0
- package/dist/components/layout/Window.js +287 -0
- package/dist/components/layout/WindowViewPort.js +71 -0
- package/dist/components/media/MediaSoupHelper.js +1 -1
- package/dist/components/media/Toolbar.css +18 -3
- package/dist/components/media/Toolbar.js +80 -56
- package/dist/components/media/TrainingRoom.js +97 -20
- package/dist/components/media/VCRoom.js +1 -1
- package/dist/components/media/VCRoomParticipant.js +17 -15
- package/dist/components/media/VCRoomRecorder.js +223 -0
- package/dist/components/media/VCRoomWorkspace.js +169 -156
- package/dist/components/media/VideoPlayer.css +10 -0
- package/dist/components/media/VideoPlayer.js +86 -0
- package/dist/components/menu/MenuButton.js +22 -6
- package/dist/components/menu/MenuLink.js +13 -10
- package/dist/components/navbars/HomeNavbar.js +2 -2
- package/dist/components/navbars/PortalNavbar.js +3 -3
- package/dist/components/signatures/AgilitySignaturePanel.js +4 -4
- package/dist/components/signatures/ImageSignatureInput.js +4 -4
- package/dist/components/signatures/SignatureInput.js +4 -4
- package/dist/components/signatures/SignatureTemplateDesigner.js +6 -6
- package/dist/event/ActionHandlers.js +3 -3
- package/dist/event/Observable.js +33 -15
- package/dist/event/RouteActionHandler.js +38 -29
- package/dist/event/ServiceCallActionHandler.js +4 -2
- package/dist/event/SignalGraphActionHandler.js +2 -2
- package/dist/js/Calendar.js +220 -0
- package/dist/js/Media.js +2 -2
- package/dist/view/Dashboard.js +34 -28
- package/dist/view/Views.js +30 -0
- package/dist/view/security/ChangePasswordBasic.js +6 -4
- package/dist/view/security/ForgotPassword.js +4 -4
- package/dist/view/security/ForgotPasswordBasic.js +4 -4
- package/dist/view/security/Login.js +4 -4
- package/dist/view/security/LoginBasic.js +5 -5
- package/dist/view/security/LoginBusinessPortal.js +4 -4
- package/dist/view/security/ResetPassword.js +4 -4
- package/dist/view/security/ResetPasswordBasic.js +6 -4
- package/package.json +6 -16
- package/gulpfile.js +0 -77
|
@@ -37,9 +37,18 @@ const TEMPLATE_TOKEN_REGEX = new RegExp('(([$]{1}[{]{1})(([a-zA-Z0-9_$.@#{}[\\]]
|
|
|
37
37
|
exports.TEMPLATE_TOKEN_REGEX = TEMPLATE_TOKEN_REGEX;
|
|
38
38
|
const LEGEND_ARROW_ICON = " <i class=\"fa fa-arrow-right fa-xs\" aria-hidden=\"true\" style='color:__COLOR__'></i> ";
|
|
39
39
|
exports.LEGEND_ARROW_ICON = LEGEND_ARROW_ICON;
|
|
40
|
+
const applicationContext = {};
|
|
40
41
|
|
|
41
|
-
class
|
|
42
|
+
class ApplicationManager {
|
|
42
43
|
constructor() {
|
|
44
|
+
_defineProperty(this, "addApplicationContextSubscription", subscription => {
|
|
45
|
+
return new Promise(resolve => {
|
|
46
|
+
_Observable.default.addApplicationContextSubscription(subscription);
|
|
47
|
+
|
|
48
|
+
resolve(applicationContext);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
43
52
|
_defineProperty(this, "setConfirmDialogHandler", controller => {
|
|
44
53
|
this.props.confirmationDialogController = controller;
|
|
45
54
|
});
|
|
@@ -56,16 +65,23 @@ class ApplicationContext {
|
|
|
56
65
|
return this.props.applicationHistory;
|
|
57
66
|
});
|
|
58
67
|
|
|
59
|
-
_defineProperty(this, "setViewPortHistory", history => {
|
|
60
|
-
this.props.viewPortHistory = history;
|
|
61
|
-
});
|
|
62
|
-
|
|
63
68
|
_defineProperty(this, "getAppBarTitle", () => {
|
|
64
69
|
return this.props.appBarTitle;
|
|
65
70
|
});
|
|
66
71
|
|
|
67
72
|
_defineProperty(this, "updateAppBarTitle", (viewId, title) => {
|
|
73
|
+
console.log('updateAppBarTitle VIEW LENGTH : ', this.views.length);
|
|
74
|
+
|
|
75
|
+
for (const view1 of this.views) {
|
|
76
|
+
console.log('updateAppBarTitle VIEW : ', view1.config.id);
|
|
77
|
+
}
|
|
78
|
+
|
|
68
79
|
let view = this.getView(viewId);
|
|
80
|
+
|
|
81
|
+
if (!view) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
69
85
|
let legendIconArrow = LEGEND_ARROW_ICON.replace('__COLOR__', this.props.secondaryColor);
|
|
70
86
|
let titleValue = '';
|
|
71
87
|
|
|
@@ -82,7 +98,7 @@ class ApplicationContext {
|
|
|
82
98
|
}
|
|
83
99
|
}
|
|
84
100
|
|
|
85
|
-
let legendValue =
|
|
101
|
+
let legendValue = '<span>';
|
|
86
102
|
let counter = 0;
|
|
87
103
|
|
|
88
104
|
for (const navHistoryElement of this.navHistory) {
|
|
@@ -93,10 +109,10 @@ class ApplicationContext {
|
|
|
93
109
|
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
|
-
legendValue +=
|
|
112
|
+
legendValue += '</span>';
|
|
97
113
|
this.props.appBarTitle = legendValue;
|
|
98
114
|
} else if (!view.popUp) {
|
|
99
|
-
let legendPath =
|
|
115
|
+
let legendPath = '';
|
|
100
116
|
|
|
101
117
|
for (let i = 0; i < this.graphs[0].initialNavHistoryDepth; i++) {
|
|
102
118
|
legendPath += "".concat(this.navHistory[i].title);
|
|
@@ -127,6 +143,10 @@ class ApplicationContext {
|
|
|
127
143
|
}
|
|
128
144
|
});
|
|
129
145
|
|
|
146
|
+
_defineProperty(this, "setViewPortHistory", history => {
|
|
147
|
+
this.props.viewPortHistory = history;
|
|
148
|
+
});
|
|
149
|
+
|
|
130
150
|
_defineProperty(this, "getViewPortHistory", () => {
|
|
131
151
|
return this.props.viewPortHistory;
|
|
132
152
|
});
|
|
@@ -158,7 +178,7 @@ class ApplicationContext {
|
|
|
158
178
|
|
|
159
179
|
_defineProperty(this, "addFile", (domain, file) => {
|
|
160
180
|
if (_Utils.default.isNull(domain)) {
|
|
161
|
-
console.error(
|
|
181
|
+
console.error('Please specify file domain');
|
|
162
182
|
return;
|
|
163
183
|
}
|
|
164
184
|
|
|
@@ -186,24 +206,42 @@ class ApplicationContext {
|
|
|
186
206
|
}
|
|
187
207
|
});
|
|
188
208
|
|
|
209
|
+
_defineProperty(this, "updateContext", values => {
|
|
210
|
+
_Observable.default.emitContextChangeEvent(applicationContext, values);
|
|
211
|
+
|
|
212
|
+
Object.keys(values).forEach(key => {
|
|
213
|
+
applicationContext[key] = values[key];
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
189
217
|
_defineProperty(this, "addView", (view, path, forward) => {
|
|
190
218
|
if (!view.popUp && !view.window) {
|
|
191
|
-
this.
|
|
219
|
+
let topView = this.getTopAnchorView();
|
|
192
220
|
|
|
193
|
-
if (
|
|
194
|
-
this.
|
|
221
|
+
if (topView) {
|
|
222
|
+
this.closeView(topView === null || topView === void 0 ? void 0 : topView.config.id);
|
|
195
223
|
}
|
|
196
224
|
} else {
|
|
197
225
|
if (view.popUp) {
|
|
198
226
|
this.props.confirmationDialogController.openPopupView(view);
|
|
199
227
|
}
|
|
228
|
+
|
|
229
|
+
if (view.window) {
|
|
230
|
+
let topView = this.getTopWindowView();
|
|
231
|
+
|
|
232
|
+
if (topView) {
|
|
233
|
+
this.closeView(topView === null || topView === void 0 ? void 0 : topView.config.id);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
200
236
|
}
|
|
201
237
|
|
|
202
238
|
if (view.parent) {
|
|
203
239
|
this.navHistory.splice(0, this.navHistory.length);
|
|
204
240
|
|
|
205
241
|
for (const contextView of this.views) {
|
|
206
|
-
|
|
242
|
+
let shouldClose = view.window && contextView.window || !view.window && !contextView.window;
|
|
243
|
+
|
|
244
|
+
if (!_Utils.default.isNull(contextView) && !_Utils.default.isNull(contextView.handle.api) && shouldClose) {
|
|
207
245
|
this.closeView(contextView.handle.api.id, forward);
|
|
208
246
|
}
|
|
209
247
|
}
|
|
@@ -211,51 +249,95 @@ class ApplicationContext {
|
|
|
211
249
|
|
|
212
250
|
let historyElement = {};
|
|
213
251
|
historyElement.viewId = view.config.id;
|
|
252
|
+
historyElement.parent = view.parent;
|
|
214
253
|
historyElement.path = path;
|
|
215
254
|
this.navHistory.push(historyElement);
|
|
216
255
|
this.views.push(view);
|
|
217
|
-
});
|
|
218
256
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
257
|
+
if (view.window) {
|
|
258
|
+
_Observable.default.emitContextChangeEvent(applicationContext, {
|
|
259
|
+
windowView: view
|
|
260
|
+
});
|
|
222
261
|
|
|
223
|
-
|
|
224
|
-
|
|
262
|
+
applicationContext.windowView = view;
|
|
263
|
+
}
|
|
225
264
|
|
|
226
|
-
let
|
|
265
|
+
let currentGraph = this.graphs.length > 0 ? this.graphs[this.graphs.length - 1] : null;
|
|
227
266
|
|
|
228
|
-
if (
|
|
229
|
-
|
|
267
|
+
if (!view.window && view.parent && currentGraph && currentGraph.config.isWindow) {
|
|
268
|
+
currentGraph.anchorView = view;
|
|
269
|
+
currentGraph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
270
|
+
this.updateContext({
|
|
271
|
+
windowDisplayState: 'MINIMIZED'
|
|
272
|
+
});
|
|
230
273
|
}
|
|
231
274
|
});
|
|
232
275
|
|
|
276
|
+
_defineProperty(this, "closeAllViews", () => {
|
|
277
|
+
for (const view of this.views) {
|
|
278
|
+
this.closeView(view.config.id, false);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
_Observable.default.emitContextChangeEvent(applicationContext, {
|
|
282
|
+
windowView: null
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
applicationContext.windowView = null;
|
|
286
|
+
});
|
|
287
|
+
|
|
233
288
|
_defineProperty(this, "closeView", (viewId, forward) => {
|
|
234
|
-
|
|
289
|
+
let view = this.getView(viewId);
|
|
235
290
|
|
|
236
|
-
|
|
237
|
-
|
|
291
|
+
if (view) {
|
|
292
|
+
if (!_Utils.default.isNull(view) && !_Utils.default.isNull(view.handle.api)) {
|
|
293
|
+
_Observable.default.clearEventListeners(viewId);
|
|
238
294
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
295
|
+
for (let i = 0; i < this.fileCache.length; i++) {
|
|
296
|
+
let cacheElement = this.fileCache[i];
|
|
244
297
|
|
|
245
|
-
|
|
298
|
+
if (cacheElement.domain === viewId) {
|
|
299
|
+
this.fileCache.slice(i, 1);
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
246
303
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
this.views
|
|
304
|
+
let count = 0;
|
|
305
|
+
|
|
306
|
+
for (const view of this.views) {
|
|
307
|
+
if (view.handle.api.id === viewId) {
|
|
308
|
+
this.views.splice(count, 1);
|
|
309
|
+
|
|
310
|
+
if (!view.popUp && !view.parent && (_Utils.default.isNull(forward) || forward === false)) {
|
|
311
|
+
let viewIndex = this.navHistory.findIndex(h => h.viewId === viewId);
|
|
312
|
+
|
|
313
|
+
if (viewIndex >= 0) {
|
|
314
|
+
this.navHistory.splice(viewIndex, 1);
|
|
315
|
+
}
|
|
316
|
+
} else if (view.popUp) {
|
|
317
|
+
this.props.confirmationDialogController.closePopupView();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
count++;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
let hasWindow = false;
|
|
250
326
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
327
|
+
for (const viewsElement of this.views) {
|
|
328
|
+
if (viewsElement.window) {
|
|
329
|
+
hasWindow = true;
|
|
330
|
+
break;
|
|
255
331
|
}
|
|
256
332
|
}
|
|
257
333
|
|
|
258
|
-
|
|
334
|
+
if (!hasWindow) {
|
|
335
|
+
_Observable.default.emitContextChangeEvent(applicationContext, {
|
|
336
|
+
windowView: null
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
applicationContext.windowView = null;
|
|
340
|
+
}
|
|
259
341
|
}
|
|
260
342
|
});
|
|
261
343
|
|
|
@@ -284,6 +366,10 @@ class ApplicationContext {
|
|
|
284
366
|
if (id === 'view') {
|
|
285
367
|
return view.handle.api;
|
|
286
368
|
}
|
|
369
|
+
} else {
|
|
370
|
+
if (id === 'trainingScheduleCalendarEventForm') {
|
|
371
|
+
console.log('NO HANDLES');
|
|
372
|
+
}
|
|
287
373
|
}
|
|
288
374
|
});
|
|
289
375
|
|
|
@@ -298,8 +384,6 @@ class ApplicationContext {
|
|
|
298
384
|
}
|
|
299
385
|
}
|
|
300
386
|
|
|
301
|
-
let currentView;
|
|
302
|
-
|
|
303
387
|
if (this.views.length === 0) {
|
|
304
388
|
return this.getViewComponent(this.props.dashboardView, id);
|
|
305
389
|
}
|
|
@@ -321,10 +405,10 @@ class ApplicationContext {
|
|
|
321
405
|
if (!_Utils.default.isNull(matches)) {
|
|
322
406
|
for (const match of matches) {
|
|
323
407
|
let expresionContent = match.substring(match.indexOf('{') + 1, match.lastIndexOf('}'));
|
|
324
|
-
let expressionValue =
|
|
408
|
+
let expressionValue = '';
|
|
325
409
|
|
|
326
|
-
if (expresionContent.startsWith(
|
|
327
|
-
let props = expresionContent.replace(
|
|
410
|
+
if (expresionContent.startsWith('$event.data') && !_Utils.default.isNull(eventData)) {
|
|
411
|
+
let props = expresionContent.replace('$event.data.', '').split('.');
|
|
328
412
|
let vo = eventData;
|
|
329
413
|
|
|
330
414
|
for (const prop of props) {
|
|
@@ -346,7 +430,7 @@ class ApplicationContext {
|
|
|
346
430
|
_defineProperty(this, "resolveExpressionValue", (expression, eventData = null) => {
|
|
347
431
|
let paramExpression = expression.match(/\(([^)]*)\)/);
|
|
348
432
|
let isEvent = expression.startsWith('$event.data');
|
|
349
|
-
let baseExpression = isEvent ?
|
|
433
|
+
let baseExpression = isEvent ? '$event.data' : !_Utils.default.isNull(paramExpression) && paramExpression.length > 0 ? expression.replace(paramExpression[0], '') : expression;
|
|
350
434
|
let expressionContent = baseExpression.substring(baseExpression.indexOf('{') + 1, baseExpression.indexOf('}'));
|
|
351
435
|
let isComponent = baseExpression.startsWith('@#{');
|
|
352
436
|
let isLib = baseExpression.startsWith('@@{');
|
|
@@ -360,7 +444,7 @@ class ApplicationContext {
|
|
|
360
444
|
|
|
361
445
|
if (index > 0) {
|
|
362
446
|
let propertyChain = expression.substring(index + expressionClosure.length);
|
|
363
|
-
let props = propertyChain.split(
|
|
447
|
+
let props = propertyChain.split('.');
|
|
364
448
|
|
|
365
449
|
for (const prop of props) {
|
|
366
450
|
if (_Utils.default.isNull(value)) {
|
|
@@ -377,10 +461,9 @@ class ApplicationContext {
|
|
|
377
461
|
|
|
378
462
|
return value;
|
|
379
463
|
} else if (isLib) {
|
|
380
|
-
if (idToken === 'view') {
|
|
381
|
-
|
|
382
|
-
}
|
|
383
|
-
|
|
464
|
+
/*if (idToken === 'view') {
|
|
465
|
+
idToken = this.getCurrentView().config.id + '_lib';
|
|
466
|
+
}*/
|
|
384
467
|
return this.libs[idToken];
|
|
385
468
|
}
|
|
386
469
|
|
|
@@ -411,7 +494,7 @@ class ApplicationContext {
|
|
|
411
494
|
scriptValue = null;
|
|
412
495
|
}
|
|
413
496
|
|
|
414
|
-
let objKey = key ===
|
|
497
|
+
let objKey = key === 'valueExpression' ? 'value' : key;
|
|
415
498
|
updated[objKey] = scriptValue !== null && scriptValue.instanceType === 'TypedValue' ? scriptValue.value : scriptValue;
|
|
416
499
|
|
|
417
500
|
if (typeof updated[objKey] === 'undefined') {
|
|
@@ -455,7 +538,7 @@ class ApplicationContext {
|
|
|
455
538
|
|
|
456
539
|
if (index > 0) {
|
|
457
540
|
let propertyChain = expression.substring(index + expressionClosure.length);
|
|
458
|
-
let props = propertyChain.split(
|
|
541
|
+
let props = propertyChain.split('.');
|
|
459
542
|
|
|
460
543
|
for (const prop of props) {
|
|
461
544
|
if (_Utils.default.isNull(value)) {
|
|
@@ -472,7 +555,7 @@ class ApplicationContext {
|
|
|
472
555
|
let val = null;
|
|
473
556
|
|
|
474
557
|
if (_Utils.default.isNull(parameterConfig.value)) {
|
|
475
|
-
console.error(
|
|
558
|
+
console.error('NULL parameter value expression in : ' + JSON.stringify(parameterConfig));
|
|
476
559
|
return null;
|
|
477
560
|
}
|
|
478
561
|
|
|
@@ -513,10 +596,10 @@ class ApplicationContext {
|
|
|
513
596
|
});
|
|
514
597
|
|
|
515
598
|
_defineProperty(this, "getId", () => {
|
|
516
|
-
return
|
|
599
|
+
return 'applicationManager';
|
|
517
600
|
});
|
|
518
601
|
|
|
519
|
-
if (!
|
|
602
|
+
if (!ApplicationManager.instance) {
|
|
520
603
|
this.views = [];
|
|
521
604
|
this.props = {};
|
|
522
605
|
this.listeners = [];
|
|
@@ -529,16 +612,16 @@ class ApplicationContext {
|
|
|
529
612
|
return instance.getId();
|
|
530
613
|
},
|
|
531
614
|
|
|
532
|
-
closeCurrentView() {
|
|
533
|
-
instance.closeCurrentView();
|
|
534
|
-
},
|
|
535
|
-
|
|
536
615
|
refreshUserAvatar(avatar) {
|
|
537
616
|
instance.refreshUserAvatar(avatar);
|
|
538
617
|
},
|
|
539
618
|
|
|
540
|
-
alert(message, messageType) {
|
|
541
|
-
instance.alert(message, messageType);
|
|
619
|
+
alert(viewId, message, messageType) {
|
|
620
|
+
instance.alert(viewId, message, messageType);
|
|
621
|
+
},
|
|
622
|
+
|
|
623
|
+
removeLoadedGraph(routeToAnchor) {
|
|
624
|
+
instance.removeLoadedGraph(routeToAnchor);
|
|
542
625
|
}
|
|
543
626
|
|
|
544
627
|
};
|
|
@@ -549,10 +632,26 @@ class ApplicationContext {
|
|
|
549
632
|
};
|
|
550
633
|
}
|
|
551
634
|
|
|
552
|
-
|
|
635
|
+
ApplicationManager.instance = this;
|
|
553
636
|
}
|
|
554
637
|
|
|
555
|
-
return
|
|
638
|
+
return ApplicationManager.instance;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
navigate(path) {
|
|
642
|
+
this.props.navigator(path);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
setDashboardSettings(dashboardSettings) {
|
|
646
|
+
this.props.dashboardSettings = dashboardSettings;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
getDashboardSettings() {
|
|
650
|
+
return this.props.dashboardSettings;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
setNavigator(navigator) {
|
|
654
|
+
this.props.navigator = navigator;
|
|
556
655
|
}
|
|
557
656
|
|
|
558
657
|
setHasActiveMeeting(hasActiveMeeting) {
|
|
@@ -599,8 +698,8 @@ class ApplicationContext {
|
|
|
599
698
|
this.listeners.push(listener);
|
|
600
699
|
}
|
|
601
700
|
|
|
602
|
-
alert(message, messageType) {
|
|
603
|
-
let event = new _Event.default(this, this.
|
|
701
|
+
alert(viewId, message, messageType) {
|
|
702
|
+
let event = new _Event.default(this, this.getView(viewId).config.id, {
|
|
604
703
|
messageType: messageType,
|
|
605
704
|
message: message
|
|
606
705
|
});
|
|
@@ -662,7 +761,7 @@ class ApplicationContext {
|
|
|
662
761
|
|
|
663
762
|
|
|
664
763
|
isExpression(objValue) {
|
|
665
|
-
return objValue && objValue.toString().startsWith(
|
|
764
|
+
return objValue && objValue.toString().startsWith('$event.data') || !_Utils.default.isNull(objValue) && typeof objValue === 'string' && !_Utils.default.isNull(objValue.match(_DynamicJS.TEMPLATE_REGEX));
|
|
666
765
|
}
|
|
667
766
|
/**
|
|
668
767
|
* Returns a view configuration with a particular id
|
|
@@ -673,39 +772,46 @@ class ApplicationContext {
|
|
|
673
772
|
loadAnchor(graph) {
|
|
674
773
|
this.navHistory.splice(graph.initialNavHistoryDepth - 1, this.navHistory.length);
|
|
675
774
|
this.addView(graph.anchorView, graph.anchorHistoryElement.path, true);
|
|
676
|
-
this.
|
|
677
|
-
this.
|
|
775
|
+
this.navigate('/view/unload');
|
|
776
|
+
this.navigate('/view/' + graph.anchorView.config.id);
|
|
678
777
|
}
|
|
679
778
|
|
|
680
779
|
removeLoadedGraph(routeBackToAnchor) {
|
|
681
780
|
if (this.graphs.length > 0) {
|
|
682
|
-
this.closeCurrentView(false);
|
|
683
781
|
let graph = this.graphs[this.graphs.length - 1];
|
|
782
|
+
let view = graph.config.isWindow ? this.getTopWindowView() : this.getTopAnchorView();
|
|
783
|
+
this.closeView(view.config.id, false);
|
|
684
784
|
|
|
685
785
|
if (!_Utils.default.isNull(graph.anchorHistoryElement) && routeBackToAnchor) {
|
|
686
786
|
this.loadAnchor(graph);
|
|
687
787
|
}
|
|
688
788
|
|
|
689
789
|
this.graphs.splice(0, this.graphs.length);
|
|
790
|
+
|
|
791
|
+
if (!_Utils.default.isNull(graph.anchorHistoryElement)) {
|
|
792
|
+
this.updateAppBarTitle(graph.anchorView.config.id, graph.anchorView.config.title);
|
|
793
|
+
}
|
|
690
794
|
}
|
|
691
795
|
}
|
|
692
796
|
|
|
693
|
-
loadGraph(isParent, isPopup, config, parameterValues) {
|
|
694
|
-
if (isParent && !isPopup) {
|
|
797
|
+
loadGraph(isParent, isPopup, isWindow, config, parameterValues) {
|
|
798
|
+
if (isParent && !isPopup && !isWindow) {
|
|
695
799
|
this.navHistory.splice(0, this.navHistory.length);
|
|
696
800
|
|
|
697
801
|
for (const contextView of this.views) {
|
|
698
802
|
this.closeView(contextView.handle.api.id, false);
|
|
699
803
|
}
|
|
700
804
|
|
|
701
|
-
this.getViewPortHistory().push(
|
|
805
|
+
this.getViewPortHistory().push('/switch');
|
|
702
806
|
}
|
|
703
807
|
|
|
808
|
+
config.isWindow = isWindow;
|
|
704
809
|
let graph = new _Graph.default(_Utils.default.parseConfig(config));
|
|
705
810
|
graph.initialNavHistoryDepth = this.navHistory.length;
|
|
706
811
|
|
|
707
812
|
if (this.navHistory.length > 0) {
|
|
708
|
-
graph.anchorView = this.getCurrentView();
|
|
813
|
+
graph.anchorView = this.getTopAnchorView(); //= this.getCurrentView();
|
|
814
|
+
|
|
709
815
|
graph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
710
816
|
}
|
|
711
817
|
|
|
@@ -718,6 +824,22 @@ class ApplicationContext {
|
|
|
718
824
|
this.graphs.push(graph);
|
|
719
825
|
}
|
|
720
826
|
|
|
827
|
+
getTopAnchorView() {
|
|
828
|
+
for (let i = this.views.length - 1; i >= 0; i--) {
|
|
829
|
+
if (!this.views[i].window) {
|
|
830
|
+
return this.views[i];
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
getTopWindowView() {
|
|
836
|
+
for (let i = this.views.length - 1; i >= 0; i--) {
|
|
837
|
+
if (this.views[i].window) {
|
|
838
|
+
return this.views[i];
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
721
843
|
signalGraph(id, event) {
|
|
722
844
|
if (this.graphs.length > 0) {
|
|
723
845
|
let graphToSignal = this.graphs[this.graphs.length - 1];
|
|
@@ -747,7 +869,7 @@ class ApplicationContext {
|
|
|
747
869
|
|
|
748
870
|
}
|
|
749
871
|
|
|
750
|
-
const instance = new
|
|
872
|
+
const instance = new ApplicationManager();
|
|
751
873
|
Object.freeze(instance);
|
|
752
874
|
var _default = instance;
|
|
753
875
|
exports.default = _default;
|
package/dist/BasicApp.js
CHANGED
|
@@ -27,6 +27,12 @@ var _core = require("@material-ui/core");
|
|
|
27
27
|
|
|
28
28
|
var _ThemeProvider = _interopRequireDefault(require("@material-ui/styles/ThemeProvider"));
|
|
29
29
|
|
|
30
|
+
var _reactRouter = require("react-router");
|
|
31
|
+
|
|
32
|
+
var _WithRouter = _interopRequireDefault(require("./WithRouter"));
|
|
33
|
+
|
|
34
|
+
var _ViewContainer = _interopRequireDefault(require("./components/layout/ViewContainer"));
|
|
35
|
+
|
|
30
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
37
|
|
|
32
38
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -48,67 +54,64 @@ const agilityTheme = (0, _core.createMuiTheme)({
|
|
|
48
54
|
}
|
|
49
55
|
});
|
|
50
56
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var _default = (0, _reactRouterDom.withRouter)(BasicApp);
|
|
113
|
-
|
|
57
|
+
const BasicApp = props => {
|
|
58
|
+
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
59
|
+
|
|
60
|
+
_react.default.useEffect(() => {
|
|
61
|
+
navigate("/");
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_MuiThemeProvider.default, {
|
|
65
|
+
muiTheme: _themeDefault.default
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, {
|
|
67
|
+
theme: agilityTheme
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Routes, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
69
|
+
path: "/",
|
|
70
|
+
element: props.home
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
72
|
+
path: "view/:id",
|
|
73
|
+
element: /*#__PURE__*/_react.default.createElement(_ViewContainer.default, null)
|
|
74
|
+
})), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
75
|
+
path: "/login",
|
|
76
|
+
element: /*#__PURE__*/_react.default.createElement(_LoginBasic.default, {
|
|
77
|
+
url: location + props.contextRoot + props.authUrl + "/login",
|
|
78
|
+
background: 'rgba(0, 0, 0, 0.65)',
|
|
79
|
+
textColor: props.loginTextColor,
|
|
80
|
+
footerLogo: props.footerLogo,
|
|
81
|
+
footerText: props.footerText,
|
|
82
|
+
footerWidth: props.footerWidth,
|
|
83
|
+
footerSplitterColor: props.footerSplitterColor,
|
|
84
|
+
title: props.loginTitle,
|
|
85
|
+
logo: props.logo
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
88
|
+
path: "/forgot-password",
|
|
89
|
+
element: /*#__PURE__*/_react.default.createElement(_ForgotPasswordBasic.default, {
|
|
90
|
+
url: location + props.contextRoot + props.authUrl + "/password/forgot",
|
|
91
|
+
background: 'rgba(0, 0, 0, 0.65)',
|
|
92
|
+
title: 'Business Agility',
|
|
93
|
+
logo: props.logo
|
|
94
|
+
})
|
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
96
|
+
path: "/reset-password",
|
|
97
|
+
element: /*#__PURE__*/_react.default.createElement(_ResetPasswordBasic.default, {
|
|
98
|
+
url: location + props.contextRoot + props.authUrl + "/password/confirmForgot",
|
|
99
|
+
background: 'rgba(0, 0, 0, 0.65)',
|
|
100
|
+
textColor: props.loginTextColor,
|
|
101
|
+
title: 'Business Agility',
|
|
102
|
+
logo: props.logo
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
105
|
+
path: "/change-password",
|
|
106
|
+
element: /*#__PURE__*/_react.default.createElement(_ChangePasswordBasic.default, {
|
|
107
|
+
url: location + props.contextRoot + props.authUrl + "/password/challenge",
|
|
108
|
+
background: 'rgba(0, 0, 0, 0.65)',
|
|
109
|
+
textColor: props.loginTextColor,
|
|
110
|
+
title: 'Business Agility',
|
|
111
|
+
logo: props.logo
|
|
112
|
+
})
|
|
113
|
+
}))));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var _default = BasicApp;
|
|
114
117
|
exports.default = _default;
|