@agilemotion/oui-react-js 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +57 -22
- 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.js +124 -48
- 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 +32 -17
- 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 +4 -4
- 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 +2 -3
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- 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
|
@@ -31,67 +31,121 @@ var _reactPromiseTracker = require("react-promise-tracker");
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var status = function status(response) {
|
|
35
49
|
if (response.ok) {
|
|
36
50
|
return Promise.resolve(response);
|
|
37
51
|
} else {
|
|
38
|
-
|
|
52
|
+
var error = new Error(response.statusText);
|
|
39
53
|
error.code = response.status;
|
|
40
54
|
return Promise.reject(error);
|
|
41
55
|
}
|
|
42
56
|
};
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
var json = function json(response) {
|
|
45
59
|
return response.text();
|
|
46
60
|
};
|
|
47
61
|
|
|
48
|
-
|
|
62
|
+
var location = window.location.protocol + '//' + window.location.hostname;
|
|
49
63
|
|
|
50
|
-
|
|
51
|
-
|
|
64
|
+
var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
65
|
+
var _React$useState = _react.default.useState(null),
|
|
66
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
67
|
+
inputMode = _React$useState2[0],
|
|
68
|
+
setInputMode = _React$useState2[1];
|
|
52
69
|
|
|
53
|
-
|
|
70
|
+
var _React$useState3 = _react.default.useState(false),
|
|
71
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
72
|
+
open = _React$useState4[0],
|
|
73
|
+
setOpen = _React$useState4[1];
|
|
54
74
|
|
|
55
|
-
|
|
75
|
+
var _React$useState5 = _react.default.useState(false),
|
|
76
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
77
|
+
signing = _React$useState6[0],
|
|
78
|
+
setSigning = _React$useState6[1];
|
|
56
79
|
|
|
57
|
-
|
|
80
|
+
var _React$useState7 = _react.default.useState(null),
|
|
81
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
82
|
+
signatureImage = _React$useState8[0],
|
|
83
|
+
setSignatureImage = _React$useState8[1];
|
|
58
84
|
|
|
59
|
-
|
|
85
|
+
var _React$useState9 = _react.default.useState(null),
|
|
86
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
87
|
+
initialImage = _React$useState10[0],
|
|
88
|
+
setInitialImage = _React$useState10[1];
|
|
60
89
|
|
|
61
|
-
|
|
90
|
+
var _React$useState11 = _react.default.useState(null),
|
|
91
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
92
|
+
systemSignatures = _React$useState12[0],
|
|
93
|
+
setSystemSignatures = _React$useState12[1];
|
|
62
94
|
|
|
63
|
-
_react.default.useEffect(()
|
|
95
|
+
_react.default.useEffect(function () {
|
|
64
96
|
fetchImages();
|
|
65
97
|
}, []);
|
|
66
98
|
|
|
67
|
-
_react.default.useEffect(()
|
|
99
|
+
_react.default.useEffect(function () {
|
|
68
100
|
if (!_Utils.default.isNull(initialImage) && !_Utils.default.isNull(signatureImage)) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
101
|
+
var signers = props.config.documents[0].signers;
|
|
102
|
+
|
|
103
|
+
var _iterator = _createForOfIteratorHelper(signers),
|
|
104
|
+
_step;
|
|
105
|
+
|
|
106
|
+
try {
|
|
107
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
108
|
+
var signer = _step.value;
|
|
109
|
+
|
|
110
|
+
if (signer.email === props.config.signatoryId) {
|
|
111
|
+
var signingInputs = signer.signatureInputs;
|
|
112
|
+
|
|
113
|
+
var _iterator2 = _createForOfIteratorHelper(signingInputs),
|
|
114
|
+
_step2;
|
|
115
|
+
|
|
116
|
+
try {
|
|
117
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
118
|
+
var signingInput = _step2.value;
|
|
119
|
+
|
|
120
|
+
if ('SIGN' === signingInput.inputType) {
|
|
121
|
+
signingInput.value = signatureImage;
|
|
122
|
+
} else if ('INITIAL' === signingInput.inputType) {
|
|
123
|
+
signingInput.value = initialImage;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} catch (err) {
|
|
127
|
+
_iterator2.e(err);
|
|
128
|
+
} finally {
|
|
129
|
+
_iterator2.f();
|
|
80
130
|
}
|
|
81
131
|
}
|
|
82
132
|
}
|
|
133
|
+
} catch (err) {
|
|
134
|
+
_iterator.e(err);
|
|
135
|
+
} finally {
|
|
136
|
+
_iterator.f();
|
|
83
137
|
}
|
|
84
138
|
|
|
85
139
|
props.valueChangeHandler(signers);
|
|
86
140
|
}
|
|
87
141
|
}, [initialImage, signatureImage]);
|
|
88
142
|
|
|
89
|
-
|
|
143
|
+
var showInput = function showInput(mode) {
|
|
90
144
|
setInputMode(mode);
|
|
91
145
|
setOpen(true);
|
|
92
146
|
};
|
|
93
147
|
|
|
94
|
-
|
|
148
|
+
var doSign = function doSign(dataUrl) {
|
|
95
149
|
setSigning(false);
|
|
96
150
|
|
|
97
151
|
if (inputMode === 'SIGN') {
|
|
@@ -103,11 +157,11 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
103
157
|
setOpen(false);
|
|
104
158
|
};
|
|
105
159
|
|
|
106
|
-
|
|
160
|
+
var sign = function sign(method, data) {
|
|
107
161
|
setSigning(true);
|
|
108
162
|
|
|
109
163
|
if (method === 'type') {
|
|
110
|
-
|
|
164
|
+
var node = document.getElementById('template');
|
|
111
165
|
node.innerText = data;
|
|
112
166
|
(0, _htmlToImage.toPng)(node).then(function (dataUrl) {
|
|
113
167
|
doSign(dataUrl);
|
|
@@ -120,8 +174,8 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
120
174
|
};
|
|
121
175
|
|
|
122
176
|
function getFetchConfig() {
|
|
123
|
-
|
|
124
|
-
|
|
177
|
+
var accessToken = sessionStorage.getItem('accessToken');
|
|
178
|
+
var idToken = sessionStorage.getItem('idToken');
|
|
125
179
|
return {
|
|
126
180
|
method: 'GET',
|
|
127
181
|
headers: {
|
|
@@ -133,14 +187,14 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
133
187
|
}
|
|
134
188
|
|
|
135
189
|
function fetchImages() {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data
|
|
190
|
+
var fetchConfig = getFetchConfig();
|
|
191
|
+
var url = location + _ApplicationManager.default.getContextRoot() + props.signatureImageUrl + '/find';
|
|
192
|
+
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(function (data) {
|
|
139
193
|
if (data && data.length > 0) {
|
|
140
|
-
|
|
194
|
+
var images = JSON.parse(data);
|
|
141
195
|
setSystemSignatures(images);
|
|
142
196
|
}
|
|
143
|
-
}).catch(e
|
|
197
|
+
}).catch(function (e) {
|
|
144
198
|
if (e.code === 401) {
|
|
145
199
|
_ApplicationManager.default.clear();
|
|
146
200
|
|
|
@@ -179,10 +233,13 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
179
233
|
imageProcessingUrl: props.imageProcessingUrl,
|
|
180
234
|
signatureImageUrl: props.signatureImageUrl,
|
|
181
235
|
systemImage: systemSignatures,
|
|
182
|
-
systemSignaturesChangeHandler: newSignatures
|
|
236
|
+
systemSignaturesChangeHandler: function systemSignaturesChangeHandler(newSignatures) {
|
|
183
237
|
setSystemSignatures(newSignatures);
|
|
184
238
|
},
|
|
185
|
-
callback: (action
|
|
239
|
+
callback: function callback(action) {
|
|
240
|
+
var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
241
|
+
var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
242
|
+
|
|
186
243
|
if (action === 'CLOSE') {
|
|
187
244
|
setOpen(false);
|
|
188
245
|
} else {
|
|
@@ -210,7 +267,7 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
210
267
|
width: '100px',
|
|
211
268
|
height: '48px'
|
|
212
269
|
},
|
|
213
|
-
onClick: ()
|
|
270
|
+
onClick: function onClick() {
|
|
214
271
|
showInput('INITIAL');
|
|
215
272
|
},
|
|
216
273
|
startIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
@@ -224,7 +281,7 @@ const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
224
281
|
width: '100px',
|
|
225
282
|
height: '48px'
|
|
226
283
|
},
|
|
227
|
-
onClick: ()
|
|
284
|
+
onClick: function onClick() {
|
|
228
285
|
showInput('SIGN');
|
|
229
286
|
},
|
|
230
287
|
startIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
@@ -17,26 +17,49 @@ var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
|
|
22
|
+
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."); }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
|
|
32
|
+
var utils = new _ViewUtils.default();
|
|
33
|
+
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
34
|
+
return {
|
|
35
|
+
root: {
|
|
36
|
+
width: '100%',
|
|
37
|
+
'& > * + *': {
|
|
38
|
+
marginTop: theme.spacing(2)
|
|
39
|
+
}
|
|
26
40
|
}
|
|
27
|
-
}
|
|
28
|
-
})
|
|
41
|
+
};
|
|
42
|
+
});
|
|
29
43
|
|
|
30
44
|
function AlertItem(props) {
|
|
31
|
-
|
|
45
|
+
var classes = useStyles();
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
var _React$useState = _react.default.useState(props.message),
|
|
48
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
49
|
+
message = _React$useState2[0],
|
|
50
|
+
setMessage = _React$useState2[1];
|
|
34
51
|
|
|
35
|
-
|
|
52
|
+
var _React$useState3 = _react.default.useState(props.alertStyle),
|
|
53
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
54
|
+
alertStyle = _React$useState4[0],
|
|
55
|
+
setAlertStyle = _React$useState4[1];
|
|
36
56
|
|
|
37
|
-
|
|
57
|
+
var _React$useState5 = _react.default.useState(props.alertTitle),
|
|
58
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
59
|
+
title = _React$useState6[0],
|
|
60
|
+
setTitle = _React$useState6[1];
|
|
38
61
|
|
|
39
|
-
_react.default.useEffect(()
|
|
62
|
+
_react.default.useEffect(function () {
|
|
40
63
|
setMessage(props.message);
|
|
41
64
|
setAlertStyle(props.alertStyle);
|
|
42
65
|
setTitle(props.alertTitle);
|
|
@@ -15,14 +15,14 @@ var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var utils = new _ViewUtils.default();
|
|
19
|
+
var styles = {
|
|
20
20
|
height: "auto",
|
|
21
21
|
maxHeight: "90vh"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
_react.default.useEffect(()
|
|
24
|
+
var CardLayout = function CardLayout(props) {
|
|
25
|
+
_react.default.useEffect(function () {
|
|
26
26
|
if (props.mode !== "lookup") {
|
|
27
27
|
utils.setLegend(props.title);
|
|
28
28
|
}
|
|
@@ -13,93 +13,177 @@ var _reactHtmlRenderer = _interopRequireDefault(require("react-html-renderer"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
const [documentContent, setDocumentContent] = _react.default.useState(null);
|
|
16
|
+
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
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."); }
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
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); }
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
|
+
|
|
30
|
+
var DocumentContainer = function DocumentContainer(props) {
|
|
31
|
+
var _React$useState = _react.default.useState(null),
|
|
32
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33
|
+
documentContent = _React$useState2[0],
|
|
34
|
+
setDocumentContent = _React$useState2[1];
|
|
35
|
+
|
|
36
|
+
var _React$useState3 = _react.default.useState(null),
|
|
37
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
38
|
+
signatureImage = _React$useState4[0],
|
|
39
|
+
setSignatureImage = _React$useState4[1];
|
|
40
|
+
|
|
41
|
+
var _React$useState5 = _react.default.useState(null),
|
|
42
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
43
|
+
initialImage = _React$useState6[0],
|
|
44
|
+
setInitialImage = _React$useState6[1];
|
|
45
|
+
|
|
46
|
+
var _React$useState7 = _react.default.useState(null),
|
|
47
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
48
|
+
htmlRendererProps = _React$useState8[0],
|
|
49
|
+
setHtmlRendererProps = _React$useState8[1];
|
|
50
|
+
|
|
51
|
+
_react.default.useEffect(function () {
|
|
26
52
|
if (signatureImage !== props.signatureImage) {
|
|
27
53
|
setSignatureImage(props.signatureImage);
|
|
28
54
|
}
|
|
29
55
|
}, [props.signatureImage]);
|
|
30
56
|
|
|
31
|
-
_react.default.useEffect(()
|
|
57
|
+
_react.default.useEffect(function () {
|
|
32
58
|
if (initialImage !== props.initialImage) {
|
|
33
59
|
setInitialImage(props.initialImage);
|
|
34
60
|
}
|
|
35
61
|
}, [props.initialImage]);
|
|
36
62
|
|
|
37
|
-
_react.default.useEffect(()
|
|
63
|
+
_react.default.useEffect(function () {
|
|
38
64
|
createTemplate();
|
|
39
65
|
}, [initialImage, signatureImage]);
|
|
40
66
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
for (const signer of signers) {
|
|
49
|
-
total += signer.signatureInputs.length;
|
|
50
|
-
}
|
|
67
|
+
var createTemplate = function createTemplate() {
|
|
68
|
+
var template = props.config.documents[0].template;
|
|
69
|
+
var signers = props.config.documents[0].signers;
|
|
70
|
+
var count = 0;
|
|
71
|
+
var total = 0;
|
|
72
|
+
var rendererProps = {};
|
|
51
73
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let signingInputs = signer.signatureInputs;
|
|
74
|
+
var _iterator = _createForOfIteratorHelper(signers),
|
|
75
|
+
_step;
|
|
55
76
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
77
|
+
try {
|
|
78
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
79
|
+
var signer = _step.value;
|
|
80
|
+
total += signer.signatureInputs.length;
|
|
61
81
|
}
|
|
82
|
+
} catch (err) {
|
|
83
|
+
_iterator.e(err);
|
|
84
|
+
} finally {
|
|
85
|
+
_iterator.f();
|
|
62
86
|
}
|
|
63
87
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let signingInputs = signer.signatureInputs;
|
|
88
|
+
var _iterator2 = _createForOfIteratorHelper(signers),
|
|
89
|
+
_step2;
|
|
67
90
|
|
|
68
|
-
|
|
69
|
-
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
93
|
+
var _signer = _step2.value;
|
|
70
94
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
95
|
+
if (_signer.email === props.config.signatoryId) {
|
|
96
|
+
var signingInputs = _signer.signatureInputs;
|
|
74
97
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
template = template.replace(signingInput.tagName, "<sgvp".concat(signingInput.index, " />"));
|
|
98
|
+
var _iterator4 = _createForOfIteratorHelper(signingInputs),
|
|
99
|
+
_step4;
|
|
78
100
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
}, "SIGN" === signingInput.inputType && signatureImage !== null ? /*#__PURE__*/_react.default.createElement("img", {
|
|
87
|
-
src: signatureImage,
|
|
88
|
-
alt: '',
|
|
89
|
-
style: {
|
|
90
|
-
maxHeight: '100%',
|
|
91
|
-
maxWidth: '100%'
|
|
101
|
+
try {
|
|
102
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
103
|
+
var signingInput = _step4.value;
|
|
104
|
+
signingInput.isFirst = count === 0;
|
|
105
|
+
signingInput.isLast = count === total - 1;
|
|
106
|
+
count++;
|
|
92
107
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator4.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator4.f();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} catch (err) {
|
|
116
|
+
_iterator2.e(err);
|
|
117
|
+
} finally {
|
|
118
|
+
_iterator2.f();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
var _iterator3 = _createForOfIteratorHelper(signers),
|
|
122
|
+
_step3;
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
126
|
+
var _signer2 = _step3.value;
|
|
127
|
+
|
|
128
|
+
if (_signer2.email === props.config.signatoryId) {
|
|
129
|
+
var _signingInputs = _signer2.signatureInputs;
|
|
130
|
+
|
|
131
|
+
var _iterator5 = _createForOfIteratorHelper(_signingInputs),
|
|
132
|
+
_step5;
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
var _loop = function _loop() {
|
|
136
|
+
var signingInput = _step5.value;
|
|
137
|
+
var color = 'transparent';
|
|
138
|
+
|
|
139
|
+
if ("SIGN" === signingInput.inputType && signatureImage === null || "INITIAL" === signingInput.inputType && initialImage === null) {
|
|
140
|
+
color = 'red';
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
console.log(signingInput.tagName + " - " + signingInput.index + " - " + initialImage);
|
|
144
|
+
console.log(signingInput);
|
|
145
|
+
template = template.replace(signingInput.tagName, "<sgvp".concat(signingInput.index, " />"));
|
|
146
|
+
|
|
147
|
+
rendererProps["sgvp".concat(signingInput.index)] = function (props) {
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
style: {
|
|
150
|
+
borderRadius: '4px',
|
|
151
|
+
position: 'absolute',
|
|
152
|
+
width: '100px',
|
|
153
|
+
height: '60px'
|
|
154
|
+
}
|
|
155
|
+
}, "SIGN" === signingInput.inputType && signatureImage !== null ? /*#__PURE__*/_react.default.createElement("img", {
|
|
156
|
+
src: signatureImage,
|
|
157
|
+
alt: '',
|
|
158
|
+
style: {
|
|
159
|
+
maxHeight: '100%',
|
|
160
|
+
maxWidth: '100%'
|
|
161
|
+
}
|
|
162
|
+
}) : "INITIAL" === signingInput.inputType && initialImage !== null ? /*#__PURE__*/_react.default.createElement("img", {
|
|
163
|
+
src: initialImage,
|
|
164
|
+
alt: '',
|
|
165
|
+
style: {
|
|
166
|
+
maxHeight: '100%',
|
|
167
|
+
maxWidth: '100%'
|
|
168
|
+
}
|
|
169
|
+
}) : null);
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
174
|
+
_loop();
|
|
99
175
|
}
|
|
100
|
-
}
|
|
176
|
+
} catch (err) {
|
|
177
|
+
_iterator5.e(err);
|
|
178
|
+
} finally {
|
|
179
|
+
_iterator5.f();
|
|
180
|
+
}
|
|
101
181
|
}
|
|
102
182
|
}
|
|
183
|
+
} catch (err) {
|
|
184
|
+
_iterator3.e(err);
|
|
185
|
+
} finally {
|
|
186
|
+
_iterator3.f();
|
|
103
187
|
}
|
|
104
188
|
|
|
105
189
|
setHtmlRendererProps(rendererProps);
|