@agilemotion/oui-react-js 1.6.0 → 1.6.2
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/ApplicationManager.js +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +65 -18
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.css +0 -157
- package/dist/components/DocumentTemplateDesignerComponent.js +118 -62
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +35 -19
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +5 -5
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -154
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
package/dist/components/Graph.js
CHANGED
|
@@ -15,82 +15,122 @@ var _Utils = _interopRequireDefault(require("../Utils"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
19
|
+
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
+
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
|
|
26
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
+
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
29
|
+
|
|
18
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let index = 0;
|
|
24
|
-
let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
|
|
32
|
+
var Graph = /*#__PURE__*/function () {
|
|
33
|
+
function Graph(config) {
|
|
34
|
+
var _this = this;
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
_classCallCheck(this, Graph);
|
|
37
|
+
|
|
38
|
+
_defineProperty(this, "getCurrentNodeIndex", function () {
|
|
39
|
+
var index = 0;
|
|
40
|
+
var collection = _this.config.stepperMode === null || _this.config.stepperMode === "DYNAMIC" ? _this.path : _this.config.nodes;
|
|
41
|
+
|
|
42
|
+
var _iterator = _createForOfIteratorHelper(collection),
|
|
43
|
+
_step;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
47
|
+
var element = _step.value;
|
|
48
|
+
|
|
49
|
+
if (_this.current.config.name === element.name) {
|
|
50
|
+
return index;
|
|
51
|
+
}
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
index++;
|
|
54
|
+
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
_iterator.e(err);
|
|
57
|
+
} finally {
|
|
58
|
+
_iterator.f();
|
|
32
59
|
}
|
|
33
60
|
|
|
34
61
|
return null;
|
|
35
62
|
});
|
|
36
63
|
|
|
37
|
-
_defineProperty(this, "init", ()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
64
|
+
_defineProperty(this, "init", function () {
|
|
65
|
+
var root = _this.config.nodes[0];
|
|
66
|
+
_this.current = new _GraphNode.default(_this.config.nodes[0]);
|
|
67
|
+
|
|
68
|
+
_this.addNodeToPath(_this.current);
|
|
41
69
|
|
|
42
70
|
if (root.action.actionType === 'route') {
|
|
43
|
-
root.action.window =
|
|
71
|
+
root.action.window = _this.config.isWindow;
|
|
44
72
|
}
|
|
45
73
|
|
|
46
|
-
_ActionHandlers.default.invokeHandler(root.action, null, null,
|
|
74
|
+
_ActionHandlers.default.invokeHandler(root.action, null, null, _this.config.id);
|
|
47
75
|
});
|
|
48
76
|
|
|
49
|
-
_defineProperty(this, "signal", event
|
|
50
|
-
|
|
77
|
+
_defineProperty(this, "signal", function (event) {
|
|
78
|
+
var nextNodeName = _this.current.getNextNode(event);
|
|
51
79
|
|
|
52
|
-
if (
|
|
80
|
+
if (_this.current.config.last && nextNodeName === null) {
|
|
53
81
|
_ApplicationManager.default.removeLoadedGraph(true);
|
|
54
82
|
} else {
|
|
55
83
|
if (!_Utils.default.isNull(nextNodeName)) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.current = new _GraphNode.default(node);
|
|
59
|
-
this.addNodeToPath(this.current);
|
|
84
|
+
var _iterator2 = _createForOfIteratorHelper(_this.config.nodes),
|
|
85
|
+
_step2;
|
|
60
86
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
89
|
+
var node = _step2.value;
|
|
90
|
+
|
|
91
|
+
if (node.name === nextNodeName) {
|
|
92
|
+
_this.current = new _GraphNode.default(node);
|
|
93
|
+
|
|
94
|
+
_this.addNodeToPath(_this.current);
|
|
64
95
|
|
|
65
|
-
|
|
96
|
+
if (node.action.actionType === 'route') {
|
|
97
|
+
node.action.window = _this.config.isWindow;
|
|
98
|
+
}
|
|
66
99
|
|
|
67
|
-
|
|
100
|
+
_ActionHandlers.default.invokeHandler(node.action, null, null, _this.config.id);
|
|
101
|
+
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
68
104
|
}
|
|
105
|
+
} catch (err) {
|
|
106
|
+
_iterator2.e(err);
|
|
107
|
+
} finally {
|
|
108
|
+
_iterator2.f();
|
|
69
109
|
}
|
|
70
110
|
}
|
|
71
111
|
|
|
72
|
-
if (
|
|
112
|
+
if (_this.current === null) {
|
|
73
113
|
console.error("Node name could not be found : " + nextNodeName);
|
|
74
114
|
}
|
|
75
115
|
}
|
|
76
116
|
});
|
|
77
117
|
|
|
78
|
-
_defineProperty(this, "setCurrentNodeTitle", title
|
|
79
|
-
if (
|
|
80
|
-
|
|
118
|
+
_defineProperty(this, "setCurrentNodeTitle", function (title) {
|
|
119
|
+
if (_this.current !== null) {
|
|
120
|
+
_this.current.title = title;
|
|
81
121
|
}
|
|
82
122
|
});
|
|
83
123
|
|
|
84
|
-
_defineProperty(this, "addNodeToPath", node
|
|
85
|
-
if (
|
|
86
|
-
|
|
124
|
+
_defineProperty(this, "addNodeToPath", function (node) {
|
|
125
|
+
if (_this.path.length === 0) {
|
|
126
|
+
_this.path.push(node);
|
|
87
127
|
} else {
|
|
88
|
-
|
|
128
|
+
var lastNode = _this.path[_this.path.length - 1];
|
|
89
129
|
|
|
90
130
|
if (lastNode.config.name === node.config.name) {
|
|
91
|
-
|
|
131
|
+
_this.path.pop();
|
|
92
132
|
} else {
|
|
93
|
-
|
|
133
|
+
_this.path.push(node);
|
|
94
134
|
}
|
|
95
135
|
}
|
|
96
136
|
});
|
|
@@ -101,59 +141,87 @@ class Graph {
|
|
|
101
141
|
this.path = [];
|
|
102
142
|
}
|
|
103
143
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
144
|
+
_createClass(Graph, [{
|
|
145
|
+
key: "getTitleStack",
|
|
146
|
+
value: function getTitleStack() {
|
|
147
|
+
var titleStack = [];
|
|
148
|
+
var index = 0;
|
|
149
|
+
|
|
150
|
+
if (this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC") {
|
|
151
|
+
var _iterator3 = _createForOfIteratorHelper(this.path),
|
|
152
|
+
_step3;
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
156
|
+
var pathElement = _step3.value;
|
|
157
|
+
var stackItem = {};
|
|
158
|
+
stackItem.title = pathElement.title;
|
|
159
|
+
stackItem.index = index++;
|
|
160
|
+
titleStack.push(stackItem);
|
|
161
|
+
}
|
|
162
|
+
} catch (err) {
|
|
163
|
+
_iterator3.e(err);
|
|
164
|
+
} finally {
|
|
165
|
+
_iterator3.f();
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
var _iterator4 = _createForOfIteratorHelper(this.config.nodes),
|
|
169
|
+
_step4;
|
|
170
|
+
|
|
171
|
+
try {
|
|
172
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
173
|
+
var node = _step4.value;
|
|
174
|
+
var _stackItem = {};
|
|
175
|
+
_stackItem.title = node.title;
|
|
176
|
+
_stackItem.index = index++;
|
|
177
|
+
titleStack.push(_stackItem);
|
|
178
|
+
}
|
|
179
|
+
} catch (err) {
|
|
180
|
+
_iterator4.e(err);
|
|
181
|
+
} finally {
|
|
182
|
+
_iterator4.f();
|
|
183
|
+
}
|
|
121
184
|
}
|
|
122
|
-
}
|
|
123
185
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
186
|
+
return titleStack;
|
|
187
|
+
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "title",
|
|
190
|
+
get: function get() {
|
|
191
|
+
return this.config.title;
|
|
192
|
+
}
|
|
193
|
+
}, {
|
|
194
|
+
key: "value",
|
|
195
|
+
get: function get() {
|
|
196
|
+
if (_Utils.default.isNull(this.config.valueObjectType)) {
|
|
197
|
+
var value = {};
|
|
198
|
+
|
|
199
|
+
for (var _i = 0, _Object$keys = Object.keys(this.modelData); _i < _Object$keys.length; _i++) {
|
|
200
|
+
var key = _Object$keys[_i];
|
|
201
|
+
value[key] = this.modelData[key];
|
|
202
|
+
}
|
|
134
203
|
|
|
135
|
-
|
|
136
|
-
value[key] = this.modelData[key];
|
|
204
|
+
return value;
|
|
137
205
|
}
|
|
138
206
|
|
|
139
|
-
return
|
|
207
|
+
return this.modelData;
|
|
140
208
|
}
|
|
209
|
+
}, {
|
|
210
|
+
key: "model",
|
|
211
|
+
get: function get() {
|
|
212
|
+
return this.modelData;
|
|
213
|
+
},
|
|
214
|
+
set: function set(model) {
|
|
215
|
+
this.modelData = model;
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "id",
|
|
219
|
+
get: function get() {
|
|
220
|
+
return this.config.id;
|
|
221
|
+
}
|
|
222
|
+
}]);
|
|
141
223
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
get model() {
|
|
146
|
-
return this.modelData;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
set model(model) {
|
|
150
|
-
this.modelData = model;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
get id() {
|
|
154
|
-
return this.config.id;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
}
|
|
224
|
+
return Graph;
|
|
225
|
+
}();
|
|
158
226
|
|
|
159
227
|
exports.default = Graph;
|
|
@@ -15,63 +15,83 @@ var _Utils = _interopRequireDefault(require("./../Utils"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
19
|
+
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
+
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
|
|
18
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_defineProperty(this, "evaluateEdge", (edge, event) => {
|
|
23
|
-
let totalEdgeCount = this.config.edges.length;
|
|
28
|
+
var GraphNode = function GraphNode(config) {
|
|
29
|
+
var _this = this;
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
_classCallCheck(this, GraphNode);
|
|
32
|
+
|
|
33
|
+
_defineProperty(this, "evaluateEdge", function (edge, event) {
|
|
34
|
+
var totalEdgeCount = _this.config.edges.length;
|
|
35
|
+
|
|
36
|
+
if (_Utils.default.isNull(edge.condition) && totalEdgeCount === 0) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (_Utils.default.isNull(edge.condition) && totalEdgeCount > 0) {
|
|
41
|
+
console.error("Missing required condition for link : " + JSON.stringify(edge));
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
28
44
|
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
if (!_Utils.default.isNull(edge.condition)) {
|
|
46
|
+
var eventSource = edge.condition.eventSource;
|
|
47
|
+
var expression = edge.condition.expression;
|
|
48
|
+
|
|
49
|
+
if (_Utils.default.isNull(eventSource) && _Utils.default.isNull(expression)) {
|
|
50
|
+
console.error("Empty condition for link : " + JSON.stringify(edge));
|
|
31
51
|
return false;
|
|
32
52
|
}
|
|
33
53
|
|
|
34
|
-
|
|
35
|
-
let eventSource = edge.condition.eventSource;
|
|
36
|
-
let expression = edge.condition.expression;
|
|
54
|
+
var sourceId = event.source.api.id;
|
|
37
55
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
if (totalEdgeCount === 0) {
|
|
57
|
+
return (_Utils.default.isNull(eventSource) || sourceId === eventSource) && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
|
|
58
|
+
} else {
|
|
59
|
+
return sourceId === eventSource && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
42
63
|
|
|
43
|
-
|
|
64
|
+
_defineProperty(this, "getNextNode", function (event) {
|
|
65
|
+
var activeEdge = null;
|
|
44
66
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return sourceId === eventSource && (_Utils.default.isNull(expression) || _DynamicJS.default.executeScript('graphEdge_' + Math.random(), expression));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
67
|
+
if (!_Utils.default.isNull(_this.config.edges)) {
|
|
68
|
+
var _iterator = _createForOfIteratorHelper(_this.config.edges),
|
|
69
|
+
_step;
|
|
52
70
|
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
try {
|
|
72
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
73
|
+
var edge = _step.value;
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
for (const edge of this.config.edges) {
|
|
58
|
-
if (this.evaluateEdge(edge, event)) {
|
|
75
|
+
if (_this.evaluateEdge(edge, event)) {
|
|
59
76
|
activeEdge = edge;
|
|
60
77
|
break;
|
|
61
78
|
}
|
|
62
79
|
}
|
|
80
|
+
} catch (err) {
|
|
81
|
+
_iterator.e(err);
|
|
82
|
+
} finally {
|
|
83
|
+
_iterator.f();
|
|
63
84
|
}
|
|
85
|
+
}
|
|
64
86
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return null;
|
|
70
|
-
});
|
|
87
|
+
if (activeEdge !== null) {
|
|
88
|
+
return activeEdge.targetNodeName;
|
|
89
|
+
}
|
|
71
90
|
|
|
72
|
-
|
|
73
|
-
}
|
|
91
|
+
return null;
|
|
92
|
+
});
|
|
74
93
|
|
|
75
|
-
|
|
94
|
+
this.config = config;
|
|
95
|
+
};
|
|
76
96
|
|
|
77
97
|
exports.default = GraphNode;
|
|
@@ -23,59 +23,80 @@ var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var Handlebars = require('handlebars');
|
|
39
|
+
|
|
40
|
+
var status = function status(response) {
|
|
29
41
|
if (response.ok) {
|
|
30
42
|
return Promise.resolve(response);
|
|
31
43
|
} else {
|
|
32
|
-
|
|
44
|
+
var error = new Error(response.statusText);
|
|
33
45
|
error.code = response.status;
|
|
34
46
|
return Promise.reject(error);
|
|
35
47
|
}
|
|
36
48
|
};
|
|
37
49
|
|
|
38
|
-
|
|
50
|
+
var json = function json(response) {
|
|
39
51
|
return response.text();
|
|
40
52
|
};
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
var location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
|
|
43
55
|
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
var HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
57
|
+
var _React$useState = _react.default.useState(null),
|
|
58
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
59
|
+
template = _React$useState2[0],
|
|
60
|
+
setTemplate = _React$useState2[1];
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
var _React$useState3 = _react.default.useState(null),
|
|
63
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
64
|
+
content = _React$useState4[0],
|
|
65
|
+
setContent = _React$useState4[1];
|
|
48
66
|
|
|
49
|
-
|
|
67
|
+
var _React$useState5 = _react.default.useState(false),
|
|
68
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
69
|
+
visible = _React$useState6[0],
|
|
70
|
+
setVisible = _React$useState6[1];
|
|
50
71
|
|
|
51
|
-
_react.default.useEffect(()
|
|
72
|
+
_react.default.useEffect(function () {
|
|
52
73
|
props.handle.api = api();
|
|
53
74
|
});
|
|
54
75
|
|
|
55
|
-
_react.default.useEffect(()
|
|
76
|
+
_react.default.useEffect(function () {
|
|
56
77
|
if (template) {
|
|
57
|
-
|
|
78
|
+
var event = new _Event.default(props.handle, props.viewId, null);
|
|
58
79
|
|
|
59
80
|
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
60
81
|
}
|
|
61
82
|
}, [template]);
|
|
62
83
|
|
|
63
|
-
_react.default.useEffect(()
|
|
64
|
-
|
|
84
|
+
_react.default.useEffect(function () {
|
|
85
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
65
86
|
|
|
66
87
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
67
88
|
|
|
68
89
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
69
90
|
|
|
70
|
-
|
|
91
|
+
var configTemplate = props.config.template;
|
|
71
92
|
|
|
72
93
|
if (configTemplate && configTemplate.endsWith('.html')) {
|
|
73
|
-
|
|
94
|
+
var fetchConfig = {
|
|
74
95
|
method: 'GET'
|
|
75
96
|
};
|
|
76
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data
|
|
97
|
+
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(function (data) {
|
|
77
98
|
setTemplate(data);
|
|
78
|
-
}).catch(e
|
|
99
|
+
}).catch(function (e) {
|
|
79
100
|
console.error(e);
|
|
80
101
|
}));
|
|
81
102
|
} else {
|
|
@@ -85,45 +106,53 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
Handlebars.registerHelper({
|
|
88
|
-
eq: (v1, v2)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
109
|
+
eq: function eq(v1, v2) {
|
|
110
|
+
return v1 === v2;
|
|
111
|
+
},
|
|
112
|
+
ne: function ne(v1, v2) {
|
|
113
|
+
return v1 !== v2;
|
|
114
|
+
},
|
|
115
|
+
lt: function lt(v1, v2) {
|
|
116
|
+
return v1 < v2;
|
|
117
|
+
},
|
|
118
|
+
gt: function gt(v1, v2) {
|
|
119
|
+
return v1 > v2;
|
|
120
|
+
},
|
|
121
|
+
lte: function lte(v1, v2) {
|
|
122
|
+
return v1 <= v2;
|
|
123
|
+
},
|
|
124
|
+
gte: function gte(v1, v2) {
|
|
125
|
+
return v1 >= v2;
|
|
126
|
+
},
|
|
127
|
+
and: function and() {
|
|
96
128
|
return Array.prototype.every.call(arguments, Boolean);
|
|
97
129
|
},
|
|
98
|
-
|
|
99
|
-
or() {
|
|
130
|
+
or: function or() {
|
|
100
131
|
return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
|
|
101
132
|
}
|
|
102
|
-
|
|
103
133
|
});
|
|
104
134
|
props.handle.api.refresh();
|
|
105
|
-
return ()
|
|
135
|
+
return function () {
|
|
106
136
|
_Observable.default.clearComponentEventListeners(props.handle);
|
|
107
137
|
};
|
|
108
138
|
}, []);
|
|
109
139
|
|
|
110
|
-
|
|
140
|
+
var api = function api() {
|
|
111
141
|
return {
|
|
112
142
|
get id() {
|
|
113
143
|
return props.config.id;
|
|
114
144
|
},
|
|
115
145
|
|
|
116
|
-
loadData: actionConfig
|
|
146
|
+
loadData: function loadData(actionConfig) {
|
|
117
147
|
if (actionConfig && actionConfig.value) {
|
|
118
|
-
|
|
148
|
+
var data = _ApplicationManager.default.resolveExpressionValue(actionConfig.value);
|
|
119
149
|
|
|
120
|
-
|
|
150
|
+
var templateScript = Handlebars.compile(template);
|
|
121
151
|
setContent(templateScript(data));
|
|
122
152
|
}
|
|
123
153
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
154
|
+
refresh: function refresh() {
|
|
155
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
127
156
|
|
|
128
157
|
if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(parsedConfig.visible)) {
|
|
129
158
|
setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
@@ -131,8 +160,7 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
131
160
|
setVisible(true);
|
|
132
161
|
}
|
|
133
162
|
},
|
|
134
|
-
|
|
135
|
-
getChildren: () => {
|
|
163
|
+
getChildren: function getChildren() {
|
|
136
164
|
return [];
|
|
137
165
|
},
|
|
138
166
|
|