@agilemotion/oui-react-js 1.6.3 → 1.6.5
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 +675 -1044
- package/dist/BasicApp.js +7 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +26 -21
|
@@ -1,104 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
8
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
13
|
-
|
|
14
9
|
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
16
10
|
var _Icon = _interopRequireDefault(require("./../Icon"));
|
|
17
|
-
|
|
18
11
|
var _colors = require("material-ui/styles/colors");
|
|
19
|
-
|
|
20
12
|
require("./PortalNavbar.css");
|
|
21
|
-
|
|
22
13
|
var _reactstrap = require("reactstrap");
|
|
23
|
-
|
|
24
14
|
var _ActionHandlers = _interopRequireDefault(require("../../event/ActionHandlers"));
|
|
25
|
-
|
|
26
15
|
var _ApplicationManager = _interopRequireWildcard(require("../../ApplicationManager"));
|
|
27
|
-
|
|
28
16
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
-
|
|
48
|
-
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
49
|
-
return {
|
|
50
|
-
iconButtonLabel: {
|
|
51
|
-
display: 'flex',
|
|
52
|
-
flexDirection: 'column'
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
58
|
-
var classes = useStyles();
|
|
59
|
-
|
|
60
|
-
var _React$useState = _react.default.useState(props.avatar),
|
|
61
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
62
|
-
avatarUrl = _React$useState2[0],
|
|
63
|
-
setAvatarUrl = _React$useState2[1];
|
|
64
|
-
|
|
65
|
-
var _React$useState3 = _react.default.useState(null),
|
|
66
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
67
|
-
selectedButton = _React$useState4[0],
|
|
68
|
-
setSelectedButton = _React$useState4[1];
|
|
69
|
-
|
|
70
|
-
var initializing = _react.default.useRef(true);
|
|
71
|
-
|
|
72
|
-
var keyCounter = 0;
|
|
73
|
-
|
|
74
|
-
_react.default.useEffect(function () {
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
21
|
+
iconButtonLabel: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'column'
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
const PortalNavbar = /*#__PURE__*/_react.default.memo(props => {
|
|
27
|
+
const classes = useStyles();
|
|
28
|
+
const [avatarUrl, setAvatarUrl] = _react.default.useState(props.avatar);
|
|
29
|
+
const [selectedButton, setSelectedButton] = _react.default.useState(null);
|
|
30
|
+
const initializing = _react.default.useRef(true);
|
|
31
|
+
let keyCounter = 0;
|
|
32
|
+
_react.default.useEffect(() => {
|
|
75
33
|
setSelectedButton(props.currentModule);
|
|
76
34
|
}, [props.currentModule]);
|
|
77
|
-
|
|
78
|
-
_react.default.useEffect(function () {
|
|
35
|
+
_react.default.useEffect(() => {
|
|
79
36
|
if (initializing.current) {
|
|
80
|
-
|
|
37
|
+
let avatarListener = {};
|
|
81
38
|
avatarListener.type = _ApplicationManager.AVATAR_LISTENER_TYPE;
|
|
82
|
-
|
|
83
|
-
avatarListener.handler = function (avatar) {
|
|
39
|
+
avatarListener.handler = avatar => {
|
|
84
40
|
setAvatarUrl(avatar.url);
|
|
85
41
|
};
|
|
86
|
-
|
|
87
42
|
_ApplicationManager.default.addApplicationListener(avatarListener);
|
|
88
|
-
|
|
89
43
|
initializing.current = false;
|
|
90
44
|
}
|
|
91
45
|
}, []);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var actionConfig = {};
|
|
46
|
+
const launchView = path => {
|
|
47
|
+
let actionConfig = {};
|
|
95
48
|
actionConfig.actionType = 'route';
|
|
96
49
|
actionConfig.path = path;
|
|
97
50
|
actionConfig.parent = true;
|
|
98
|
-
|
|
99
51
|
_ActionHandlers.default.invokeHandler(actionConfig);
|
|
100
52
|
};
|
|
101
|
-
|
|
102
53
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
103
54
|
className: "row portal-navbar-container",
|
|
104
55
|
style: {
|
|
@@ -124,7 +75,7 @@ var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
124
75
|
}
|
|
125
76
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
77
|
className: "row"
|
|
127
|
-
}, props.modules ? props.modules.map(
|
|
78
|
+
}, props.modules ? props.modules.map(module => {
|
|
128
79
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
129
80
|
className: "col-*-*",
|
|
130
81
|
style: {
|
|
@@ -143,7 +94,7 @@ var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
143
94
|
classes: {
|
|
144
95
|
label: classes.iconButtonLabel
|
|
145
96
|
},
|
|
146
|
-
onClick:
|
|
97
|
+
onClick: () => {
|
|
147
98
|
setSelectedButton(module.name);
|
|
148
99
|
props.moduleChangeHandler(module.name);
|
|
149
100
|
}
|
|
@@ -180,9 +131,7 @@ var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
180
131
|
color: "default",
|
|
181
132
|
"data-toggle": "dropdown",
|
|
182
133
|
nav: true,
|
|
183
|
-
onClick:
|
|
184
|
-
return e.preventDefault();
|
|
185
|
-
}
|
|
134
|
+
onClick: e => e.preventDefault()
|
|
186
135
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
187
136
|
"aria-controls": "menu-list-grow",
|
|
188
137
|
style: {
|
|
@@ -219,9 +168,7 @@ var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
219
168
|
tag: "li"
|
|
220
169
|
}, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
|
|
221
170
|
className: "nav-item",
|
|
222
|
-
onClick:
|
|
223
|
-
return launchView('system/views/user-profile.json');
|
|
224
|
-
}
|
|
171
|
+
onClick: () => launchView('system/views/user-profile.json')
|
|
225
172
|
}, " ", "Profile", " "), " "), " ", /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
|
|
226
173
|
divider: true,
|
|
227
174
|
tag: "li"
|
|
@@ -234,6 +181,4 @@ var PortalNavbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
234
181
|
className: "separator d-lg-none"
|
|
235
182
|
})), " "), " "))))));
|
|
236
183
|
});
|
|
237
|
-
|
|
238
|
-
var _default = PortalNavbar;
|
|
239
|
-
exports.default = _default;
|
|
184
|
+
var _default = exports.default = PortalNavbar;
|
|
@@ -4,164 +4,77 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
11
|
-
|
|
12
9
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
13
|
-
|
|
14
10
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
15
|
-
|
|
16
11
|
var _Dialog = _interopRequireDefault(require("@material-ui/core/Dialog"));
|
|
17
|
-
|
|
18
12
|
var _DialogContent = _interopRequireDefault(require("@material-ui/core/DialogContent"));
|
|
19
|
-
|
|
20
13
|
var _DialogTitle = _interopRequireDefault(require("@material-ui/core/DialogTitle"));
|
|
21
|
-
|
|
22
14
|
var _SignatureInput = _interopRequireDefault(require("../signatures/SignatureInput"));
|
|
23
|
-
|
|
24
15
|
var _htmlToImage = require("html-to-image");
|
|
25
|
-
|
|
26
16
|
var _DocumentContainer = _interopRequireDefault(require("./DocumentContainer"));
|
|
27
|
-
|
|
28
17
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
29
|
-
|
|
30
18
|
var _reactPromiseTracker = require("react-promise-tracker");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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) {
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
const status = response => {
|
|
49
21
|
if (response.ok) {
|
|
50
22
|
return Promise.resolve(response);
|
|
51
23
|
} else {
|
|
52
|
-
|
|
24
|
+
let error = new Error(response.statusText);
|
|
53
25
|
error.code = response.status;
|
|
54
26
|
return Promise.reject(error);
|
|
55
27
|
}
|
|
56
28
|
};
|
|
57
|
-
|
|
58
|
-
var json = function json(response) {
|
|
29
|
+
const json = response => {
|
|
59
30
|
return response.text();
|
|
60
31
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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];
|
|
74
|
-
|
|
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];
|
|
79
|
-
|
|
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];
|
|
84
|
-
|
|
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];
|
|
89
|
-
|
|
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];
|
|
94
|
-
|
|
95
|
-
_react.default.useEffect(function () {
|
|
32
|
+
const location = window.location.protocol + '//' + window.location.hostname;
|
|
33
|
+
const AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
34
|
+
const [inputMode, setInputMode] = _react.default.useState(null);
|
|
35
|
+
const [open, setOpen] = _react.default.useState(false);
|
|
36
|
+
const [signing, setSigning] = _react.default.useState(false);
|
|
37
|
+
const [signatureImage, setSignatureImage] = _react.default.useState(null);
|
|
38
|
+
const [initialImage, setInitialImage] = _react.default.useState(null);
|
|
39
|
+
const [systemSignatures, setSystemSignatures] = _react.default.useState(null);
|
|
40
|
+
_react.default.useEffect(() => {
|
|
96
41
|
fetchImages();
|
|
97
42
|
}, []);
|
|
98
|
-
|
|
99
|
-
_react.default.useEffect(function () {
|
|
43
|
+
_react.default.useEffect(() => {
|
|
100
44
|
if (!_Utils.default.isNull(initialImage) && !_Utils.default.isNull(signatureImage)) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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();
|
|
45
|
+
let signers = props.config.documents[0].signers;
|
|
46
|
+
for (const signer of signers) {
|
|
47
|
+
if (signer.email === props.config.signatoryId) {
|
|
48
|
+
let signingInputs = signer.signatureInputs;
|
|
49
|
+
for (const signingInput of signingInputs) {
|
|
50
|
+
if ('SIGN' === signingInput.inputType) {
|
|
51
|
+
signingInput.value = signatureImage;
|
|
52
|
+
} else if ('INITIAL' === signingInput.inputType) {
|
|
53
|
+
signingInput.value = initialImage;
|
|
130
54
|
}
|
|
131
55
|
}
|
|
132
56
|
}
|
|
133
|
-
} catch (err) {
|
|
134
|
-
_iterator.e(err);
|
|
135
|
-
} finally {
|
|
136
|
-
_iterator.f();
|
|
137
57
|
}
|
|
138
|
-
|
|
139
58
|
props.valueChangeHandler(signers);
|
|
140
59
|
}
|
|
141
60
|
}, [initialImage, signatureImage]);
|
|
142
|
-
|
|
143
|
-
var showInput = function showInput(mode) {
|
|
61
|
+
const showInput = mode => {
|
|
144
62
|
setInputMode(mode);
|
|
145
63
|
setOpen(true);
|
|
146
64
|
};
|
|
147
|
-
|
|
148
|
-
var doSign = function doSign(dataUrl) {
|
|
65
|
+
const doSign = dataUrl => {
|
|
149
66
|
setSigning(false);
|
|
150
|
-
|
|
151
67
|
if (inputMode === 'SIGN') {
|
|
152
68
|
setSignatureImage(dataUrl);
|
|
153
69
|
} else {
|
|
154
70
|
setInitialImage(dataUrl);
|
|
155
71
|
}
|
|
156
|
-
|
|
157
72
|
setOpen(false);
|
|
158
73
|
};
|
|
159
|
-
|
|
160
|
-
var sign = function sign(method, data) {
|
|
74
|
+
const sign = (method, data) => {
|
|
161
75
|
setSigning(true);
|
|
162
|
-
|
|
163
76
|
if (method === 'type') {
|
|
164
|
-
|
|
77
|
+
let node = document.getElementById('template');
|
|
165
78
|
node.innerText = data;
|
|
166
79
|
(0, _htmlToImage.toPng)(node).then(function (dataUrl) {
|
|
167
80
|
doSign(dataUrl);
|
|
@@ -172,10 +85,9 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
172
85
|
doSign(data.url);
|
|
173
86
|
}
|
|
174
87
|
};
|
|
175
|
-
|
|
176
88
|
function getFetchConfig() {
|
|
177
|
-
|
|
178
|
-
|
|
89
|
+
const accessToken = sessionStorage.getItem('accessToken');
|
|
90
|
+
const idToken = sessionStorage.getItem('idToken');
|
|
179
91
|
return {
|
|
180
92
|
method: 'GET',
|
|
181
93
|
headers: {
|
|
@@ -185,24 +97,21 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
185
97
|
}
|
|
186
98
|
};
|
|
187
99
|
}
|
|
188
|
-
|
|
189
100
|
function fetchImages() {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(
|
|
101
|
+
let fetchConfig = getFetchConfig();
|
|
102
|
+
let url = location + _ApplicationManager.default.getContextRoot() + props.signatureImageUrl + '/find';
|
|
103
|
+
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data => {
|
|
193
104
|
if (data && data.length > 0) {
|
|
194
|
-
|
|
105
|
+
let images = JSON.parse(data);
|
|
195
106
|
setSystemSignatures(images);
|
|
196
107
|
}
|
|
197
|
-
}).catch(
|
|
108
|
+
}).catch(e => {
|
|
198
109
|
if (e.code === 401) {
|
|
199
110
|
_ApplicationManager.default.clear();
|
|
200
|
-
|
|
201
111
|
_ApplicationManager.default.getApplicationHistory().push('/login');
|
|
202
112
|
}
|
|
203
113
|
}));
|
|
204
114
|
}
|
|
205
|
-
|
|
206
115
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
207
116
|
ref: ref,
|
|
208
117
|
style: {
|
|
@@ -233,13 +142,12 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
233
142
|
imageProcessingUrl: props.imageProcessingUrl,
|
|
234
143
|
signatureImageUrl: props.signatureImageUrl,
|
|
235
144
|
systemImage: systemSignatures,
|
|
236
|
-
systemSignaturesChangeHandler:
|
|
145
|
+
systemSignaturesChangeHandler: newSignatures => {
|
|
237
146
|
setSystemSignatures(newSignatures);
|
|
238
147
|
},
|
|
239
|
-
callback: function
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
148
|
+
callback: function (action) {
|
|
149
|
+
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
150
|
+
let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
243
151
|
if (action === 'CLOSE') {
|
|
244
152
|
setOpen(false);
|
|
245
153
|
} else {
|
|
@@ -267,7 +175,7 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
267
175
|
width: '100px',
|
|
268
176
|
height: '48px'
|
|
269
177
|
},
|
|
270
|
-
onClick:
|
|
178
|
+
onClick: () => {
|
|
271
179
|
showInput('INITIAL');
|
|
272
180
|
},
|
|
273
181
|
startIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
@@ -281,7 +189,7 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
281
189
|
width: '100px',
|
|
282
190
|
height: '48px'
|
|
283
191
|
},
|
|
284
|
-
onClick:
|
|
192
|
+
onClick: () => {
|
|
285
193
|
showInput('SIGN');
|
|
286
194
|
},
|
|
287
195
|
startIcon: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
@@ -298,6 +206,4 @@ var AgilitySignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
298
206
|
initialImage: initialImage
|
|
299
207
|
})));
|
|
300
208
|
}));
|
|
301
|
-
|
|
302
|
-
var _default = AgilitySignaturePanel;
|
|
303
|
-
exports.default = _default;
|
|
209
|
+
var _default = exports.default = AgilitySignaturePanel;
|
|
@@ -4,67 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = AlertItem;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Alert = _interopRequireDefault(require("@material-ui/lab/Alert"));
|
|
11
|
-
|
|
12
9
|
var _AlertTitle = _interopRequireDefault(require("@material-ui/lab/AlertTitle"));
|
|
13
|
-
|
|
14
10
|
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
16
11
|
var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
}
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const utils = new _ViewUtils.default();
|
|
14
|
+
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
15
|
+
root: {
|
|
16
|
+
width: '100%',
|
|
17
|
+
'& > * + *': {
|
|
18
|
+
marginTop: theme.spacing(2)
|
|
40
19
|
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
44
22
|
function AlertItem(props) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
setMessage = _React$useState2[1];
|
|
51
|
-
|
|
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];
|
|
56
|
-
|
|
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];
|
|
61
|
-
|
|
62
|
-
_react.default.useEffect(function () {
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
const [message, setMessage] = _react.default.useState(props.message);
|
|
25
|
+
const [alertStyle, setAlertStyle] = _react.default.useState(props.alertStyle);
|
|
26
|
+
const [title, setTitle] = _react.default.useState(props.alertTitle);
|
|
27
|
+
_react.default.useEffect(() => {
|
|
63
28
|
setMessage(props.message);
|
|
64
29
|
setAlertStyle(props.alertStyle);
|
|
65
30
|
setTitle(props.alertTitle);
|
|
66
31
|
}, [props.message, props.alertStyle, props.alertTitle]);
|
|
67
|
-
|
|
68
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
69
33
|
className: classes.root
|
|
70
34
|
}, !utils.isNull(message) && message.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_Alert.default, {
|
|
@@ -4,36 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactBootstrap = require("react-bootstrap");
|
|
11
|
-
|
|
12
9
|
require("./widgets.css");
|
|
13
|
-
|
|
14
10
|
var _ViewUtils = _interopRequireDefault(require("./ViewUtils"));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var utils = new _ViewUtils.default();
|
|
19
|
-
var styles = {
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const utils = new _ViewUtils.default();
|
|
13
|
+
const styles = {
|
|
20
14
|
height: "auto",
|
|
21
15
|
maxHeight: "90vh"
|
|
22
16
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_react.default.useEffect(function () {
|
|
17
|
+
const CardLayout = props => {
|
|
18
|
+
_react.default.useEffect(() => {
|
|
26
19
|
if (props.mode !== "lookup") {
|
|
27
20
|
utils.setLegend(props.title);
|
|
28
21
|
}
|
|
29
22
|
}, [props.title]);
|
|
30
|
-
|
|
31
23
|
return /*#__PURE__*/_react.default.createElement(_reactBootstrap.Card, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Card.Body, {
|
|
32
24
|
style: styles
|
|
33
25
|
}, props.mode === "lookup" ? /*#__PURE__*/_react.default.createElement("div", {
|
|
34
26
|
className: "legend"
|
|
35
27
|
}, props.title) : null, props.children));
|
|
36
28
|
};
|
|
37
|
-
|
|
38
|
-
var _default = CardLayout;
|
|
39
|
-
exports.default = _default;
|
|
29
|
+
var _default = exports.default = CardLayout;
|