@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
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -37,170 +39,210 @@ var _TemplateItemEventHandler = _interopRequireDefault(require("../TemplateItemE
|
|
|
37
39
|
|
|
38
40
|
require("../TemplateDesigner.css");
|
|
39
41
|
|
|
40
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
42
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
41
43
|
|
|
42
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
44
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
45
|
|
|
44
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
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; } } }; }
|
|
49
|
+
|
|
50
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
51
|
+
|
|
52
|
+
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."); }
|
|
53
|
+
|
|
54
|
+
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); }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
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; }
|
|
59
|
+
|
|
60
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61
|
+
|
|
62
|
+
var INITIAL_ITEM = {
|
|
47
63
|
defaultWidthOnPageDrop: 80,
|
|
48
64
|
defaultHeightOnPageDrop: 80
|
|
49
65
|
};
|
|
50
|
-
|
|
66
|
+
var SIGN_ITEM = {
|
|
51
67
|
defaultWidthOnPageDrop: 200,
|
|
52
68
|
defaultHeightOnPageDrop: 80
|
|
53
69
|
};
|
|
54
|
-
|
|
70
|
+
var TEXT_ITEM = {
|
|
55
71
|
defaultWidthOnPageDrop: 200,
|
|
56
72
|
defaultHeightOnPageDrop: 80
|
|
57
73
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
input: {
|
|
65
|
-
display: 'none'
|
|
66
|
-
},
|
|
67
|
-
errorMessageDisplay: {
|
|
68
|
-
color: 'red'
|
|
69
|
-
},
|
|
70
|
-
propertyWindow: {
|
|
71
|
-
height: '400px',
|
|
72
|
-
margin: '4px',
|
|
73
|
-
borderRadius: '4px',
|
|
74
|
-
paddingLeft: '24px',
|
|
75
|
-
borderBottom: '1px solid #e1e1e1',
|
|
76
|
-
borderTop: '1px solid #e1e1e1'
|
|
77
|
-
},
|
|
78
|
-
paletteButton: {
|
|
79
|
-
width: '270px',
|
|
80
|
-
height: '40px',
|
|
81
|
-
backgroundColor: '#e1e1e1',
|
|
82
|
-
margin: '4px',
|
|
83
|
-
textAlign: 'center',
|
|
84
|
-
padding: '28px 0',
|
|
85
|
-
borderRadius: '4px',
|
|
86
|
-
cursor: 'grabbing'
|
|
87
|
-
},
|
|
88
|
-
paletteButtonSelected: {
|
|
89
|
-
'&:hover': {
|
|
90
|
-
backgroundColor: 'yellowgreen'
|
|
74
|
+
var DROP_ITEM_MARGIN = 32;
|
|
75
|
+
var types = [INITIAL_ITEM, SIGN_ITEM, TEXT_ITEM];
|
|
76
|
+
var useStyles = (0, _core.makeStyles)(function (theme) {
|
|
77
|
+
return {
|
|
78
|
+
button: {
|
|
79
|
+
margin: theme.spacing(1)
|
|
91
80
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
81
|
+
input: {
|
|
82
|
+
display: 'none'
|
|
83
|
+
},
|
|
84
|
+
errorMessageDisplay: {
|
|
85
|
+
color: 'red'
|
|
86
|
+
},
|
|
87
|
+
propertyWindow: {
|
|
88
|
+
height: '400px',
|
|
89
|
+
margin: '4px',
|
|
90
|
+
borderRadius: '4px',
|
|
91
|
+
paddingLeft: '24px',
|
|
92
|
+
borderBottom: '1px solid #e1e1e1',
|
|
93
|
+
borderTop: '1px solid #e1e1e1'
|
|
94
|
+
},
|
|
95
|
+
paletteButton: {
|
|
96
|
+
width: '270px',
|
|
97
|
+
height: '40px',
|
|
98
|
+
backgroundColor: '#e1e1e1',
|
|
99
|
+
margin: '4px',
|
|
100
|
+
textAlign: 'center',
|
|
101
|
+
padding: '28px 0',
|
|
102
|
+
borderRadius: '4px',
|
|
103
|
+
cursor: 'grabbing'
|
|
104
|
+
},
|
|
105
|
+
paletteButtonSelected: {
|
|
106
|
+
'&:hover': {
|
|
107
|
+
backgroundColor: 'yellowgreen'
|
|
108
|
+
},
|
|
109
|
+
width: '270px',
|
|
110
|
+
height: '40px',
|
|
111
|
+
backgroundColor: 'yellowgreen',
|
|
112
|
+
margin: '4px',
|
|
113
|
+
textAlign: 'center',
|
|
114
|
+
padding: '28px 0',
|
|
115
|
+
borderRadius: '4px',
|
|
116
|
+
cursor: 'grabbing'
|
|
117
|
+
},
|
|
118
|
+
palette: {
|
|
119
|
+
width: '280px',
|
|
120
|
+
borderRadius: '4px',
|
|
121
|
+
border: '1px solid #e1e1e1'
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
107
125
|
|
|
108
|
-
|
|
126
|
+
var status = function status(response) {
|
|
109
127
|
if (response.ok) {
|
|
110
128
|
return Promise.resolve(response);
|
|
111
129
|
} else {
|
|
112
|
-
|
|
130
|
+
var error = new Error(response.statusText);
|
|
113
131
|
error.code = response.status;
|
|
114
132
|
return Promise.reject(error);
|
|
115
133
|
}
|
|
116
134
|
};
|
|
117
135
|
|
|
118
|
-
|
|
136
|
+
var json = function json(response) {
|
|
119
137
|
return response.text();
|
|
120
138
|
};
|
|
121
139
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
140
|
+
var location = window.location.protocol + '//' + window.location.hostname;
|
|
141
|
+
var templateItemEventHandler = new _TemplateItemEventHandler.default();
|
|
142
|
+
var VALID_COLOR = 'green';
|
|
125
143
|
|
|
126
|
-
|
|
127
|
-
|
|
144
|
+
var SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
145
|
+
var _React$useState = _react.default.useState(null),
|
|
146
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
147
|
+
file = _React$useState2[0],
|
|
148
|
+
setFile = _React$useState2[1];
|
|
128
149
|
|
|
129
|
-
|
|
150
|
+
var _React$useState3 = _react.default.useState(null),
|
|
151
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
152
|
+
templateDoc = _React$useState4[0],
|
|
153
|
+
setTemplateDoc = _React$useState4[1];
|
|
130
154
|
|
|
131
|
-
|
|
155
|
+
var _React$useState5 = _react.default.useState(null),
|
|
156
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
157
|
+
paletteSelectionId = _React$useState6[0],
|
|
158
|
+
setPaletteSelectionId = _React$useState6[1];
|
|
132
159
|
|
|
133
|
-
|
|
160
|
+
var paletteSelection = _react.default.useRef(null);
|
|
134
161
|
|
|
135
|
-
|
|
162
|
+
var idCounter = _react.default.useRef(0);
|
|
136
163
|
|
|
137
|
-
|
|
164
|
+
var _React$useState7 = _react.default.useState(null),
|
|
165
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
166
|
+
value = _React$useState8[0],
|
|
167
|
+
setValue = _React$useState8[1];
|
|
138
168
|
|
|
139
|
-
|
|
169
|
+
var _React$useState9 = _react.default.useState(null),
|
|
170
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
171
|
+
selectedInputBoxValue = _React$useState10[0],
|
|
172
|
+
setSelectedInputBoxValue = _React$useState10[1];
|
|
140
173
|
|
|
141
|
-
|
|
174
|
+
var _React$useState11 = _react.default.useState([]),
|
|
175
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
176
|
+
inputBoxValues = _React$useState12[0],
|
|
177
|
+
setInputBoxValues = _React$useState12[1];
|
|
142
178
|
|
|
143
|
-
|
|
179
|
+
var classes = useStyles();
|
|
144
180
|
|
|
145
|
-
|
|
181
|
+
var _React$useState13 = _react.default.useState(_Utils.default.isNull(props.autoLoadData) || props.autoLoadData === true),
|
|
182
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
183
|
+
loading = _React$useState14[0],
|
|
184
|
+
setLoading = _React$useState14[1];
|
|
146
185
|
|
|
147
|
-
|
|
186
|
+
var documentName = _react.default.useRef(null);
|
|
148
187
|
|
|
149
|
-
|
|
188
|
+
var _React$useState15 = _react.default.useState(null),
|
|
189
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
190
|
+
grabbedItem = _React$useState16[0],
|
|
191
|
+
setGrabbedItem = _React$useState16[1];
|
|
150
192
|
|
|
151
|
-
_react.default.useEffect(()
|
|
193
|
+
_react.default.useEffect(function () {
|
|
152
194
|
props.handle.api = api();
|
|
153
195
|
});
|
|
154
196
|
|
|
155
|
-
_react.default.useEffect(()
|
|
156
|
-
|
|
197
|
+
_react.default.useEffect(function () {
|
|
198
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
157
199
|
|
|
158
200
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
159
201
|
|
|
160
202
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
161
203
|
}, []);
|
|
162
204
|
|
|
163
|
-
|
|
164
|
-
|
|
205
|
+
var setup = function setup() {
|
|
206
|
+
var container = document.getElementById('templateContainer');
|
|
165
207
|
|
|
166
208
|
if (!_Utils.default.isNull(templateDoc) && !_Utils.default.isNull(container)) {
|
|
167
|
-
templateItemEventHandler.initDragAndDrop(id
|
|
209
|
+
templateItemEventHandler.initDragAndDrop(function (id) {}, container);
|
|
168
210
|
}
|
|
169
211
|
};
|
|
170
212
|
|
|
171
|
-
_react.default.useEffect(()
|
|
213
|
+
_react.default.useEffect(function () {
|
|
172
214
|
setup();
|
|
173
215
|
}, []);
|
|
174
216
|
|
|
175
|
-
_react.default.useEffect(()
|
|
217
|
+
_react.default.useEffect(function () {
|
|
176
218
|
setup();
|
|
177
219
|
}, [templateDoc]);
|
|
178
220
|
|
|
179
|
-
_react.default.useEffect(()
|
|
221
|
+
_react.default.useEffect(function () {
|
|
180
222
|
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
181
223
|
props.valueChangeHandler(value);
|
|
182
224
|
}
|
|
183
225
|
}, [value]);
|
|
184
226
|
|
|
185
|
-
|
|
227
|
+
var api = function api() {
|
|
186
228
|
return {
|
|
187
229
|
get id() {
|
|
188
230
|
return props.config.id;
|
|
189
231
|
},
|
|
190
232
|
|
|
191
|
-
loadData: actionConfig
|
|
233
|
+
loadData: function loadData(actionConfig) {
|
|
192
234
|
setLoading(true);
|
|
193
|
-
|
|
235
|
+
var service = !_Utils.default.isNull(props.config.dataService) ? props.config.dataService : !_Utils.default.isNull(actionConfig) !== null ? actionConfig.dataService : null;
|
|
194
236
|
|
|
195
237
|
if (!_Utils.default.isNull(service)) {
|
|
196
238
|
if (service.type === 'rpc') {
|
|
197
|
-
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result
|
|
239
|
+
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, function (result) {
|
|
198
240
|
setLoading(false);
|
|
199
|
-
}, e
|
|
241
|
+
}, function (e) {
|
|
200
242
|
console.error(e);
|
|
201
243
|
|
|
202
244
|
_Utils.default.publishErrorMessage(e, props.viewId);
|
|
203
|
-
}, parameter
|
|
245
|
+
}, function (parameter) {
|
|
204
246
|
setLoading(false);
|
|
205
247
|
});
|
|
206
248
|
} else {
|
|
@@ -210,22 +252,23 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
210
252
|
|
|
211
253
|
actionConfig.service = service;
|
|
212
254
|
|
|
213
|
-
_ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, data
|
|
255
|
+
_ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, function (data) {
|
|
214
256
|
setTemplateDoc(data.template);
|
|
215
257
|
setLoading(false);
|
|
216
|
-
}, ()
|
|
258
|
+
}, function () {});
|
|
217
259
|
}
|
|
218
260
|
|
|
219
261
|
return true;
|
|
220
262
|
} else {
|
|
221
263
|
if (!_Utils.default.isNull(actionConfig) && !_Utils.default.isNull(actionConfig.value)) {
|
|
222
|
-
|
|
223
|
-
|
|
264
|
+
var _value = _ApplicationManager.default.isExpression(actionConfig.value) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.value) : actionConfig.value;
|
|
265
|
+
|
|
266
|
+
setValue(_value);
|
|
224
267
|
|
|
225
|
-
if (!_Utils.default.isNull(
|
|
226
|
-
setTemplateDoc(
|
|
227
|
-
setInputBoxValues(
|
|
228
|
-
idCounter.current =
|
|
268
|
+
if (!_Utils.default.isNull(_value)) {
|
|
269
|
+
setTemplateDoc(_value.htmlTemplate);
|
|
270
|
+
setInputBoxValues(_value.signatureInputs);
|
|
271
|
+
idCounter.current = _value.idCounter;
|
|
229
272
|
}
|
|
230
273
|
}
|
|
231
274
|
|
|
@@ -244,8 +287,8 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
244
287
|
};
|
|
245
288
|
};
|
|
246
289
|
|
|
247
|
-
|
|
248
|
-
|
|
290
|
+
var newItem = function newItem(id, width, height) {
|
|
291
|
+
var inputValue = {};
|
|
249
292
|
inputValue.id = id;
|
|
250
293
|
inputValue.height = height.replace('px', '');
|
|
251
294
|
inputValue.width = width.replace('px', '');
|
|
@@ -253,7 +296,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
253
296
|
return inputValue;
|
|
254
297
|
};
|
|
255
298
|
|
|
256
|
-
|
|
299
|
+
var mouseClickHandler = function mouseClickHandler(event) {
|
|
257
300
|
if (grabbedItem) {
|
|
258
301
|
setValue(null);
|
|
259
302
|
setSelectedInputBoxValue(null);
|
|
@@ -263,8 +306,8 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
263
306
|
height: grabbedItem.props.defaultHeightOnPageDrop,
|
|
264
307
|
description: grabbedItem.description,
|
|
265
308
|
type: grabbedItem.type
|
|
266
|
-
}, (id, node)
|
|
267
|
-
|
|
309
|
+
}, function (id, node) {
|
|
310
|
+
var inputValue = getInputValue(id);
|
|
268
311
|
|
|
269
312
|
if (!inputValue) {
|
|
270
313
|
inputValue = newItem(id, node.style.width, node.style.height);
|
|
@@ -280,80 +323,95 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
280
323
|
setGrabbedItem(null);
|
|
281
324
|
};
|
|
282
325
|
|
|
283
|
-
|
|
326
|
+
var grabPalleteItem = function grabPalleteItem(item) {
|
|
284
327
|
document.getElementsByTagName('body')[0].style.cursor = 'grabbing';
|
|
285
328
|
setPaletteSelectionId(item.type);
|
|
286
329
|
paletteSelection.current = item.type;
|
|
287
330
|
setGrabbedItem(item);
|
|
288
331
|
};
|
|
289
332
|
|
|
290
|
-
_react.default.useEffect(()
|
|
291
|
-
|
|
333
|
+
_react.default.useEffect(function () {
|
|
334
|
+
var event = new _Event.default(props.handle, props.viewId, value);
|
|
292
335
|
|
|
293
336
|
_Observable.default.fireEvent(_EventType.default.VALUE_CHANGE, event);
|
|
294
337
|
}, [value]);
|
|
295
338
|
|
|
296
|
-
|
|
297
|
-
|
|
339
|
+
var getInputValue = function getInputValue(id) {
|
|
340
|
+
var index = 0;
|
|
298
341
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
inputBoxValue.index = index;
|
|
302
|
-
return inputBoxValue;
|
|
303
|
-
}
|
|
342
|
+
var _iterator = _createForOfIteratorHelper(inputBoxValues),
|
|
343
|
+
_step;
|
|
304
344
|
|
|
305
|
-
|
|
345
|
+
try {
|
|
346
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
347
|
+
var inputBoxValue = _step.value;
|
|
348
|
+
|
|
349
|
+
if (inputBoxValue.id === id) {
|
|
350
|
+
inputBoxValue.index = index;
|
|
351
|
+
return inputBoxValue;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
index++;
|
|
355
|
+
}
|
|
356
|
+
} catch (err) {
|
|
357
|
+
_iterator.e(err);
|
|
358
|
+
} finally {
|
|
359
|
+
_iterator.f();
|
|
306
360
|
}
|
|
307
361
|
|
|
308
362
|
return null;
|
|
309
363
|
};
|
|
310
364
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
365
|
+
var handleSubmit = function handleSubmit() {
|
|
366
|
+
return function (event) {
|
|
367
|
+
setTemplateDoc('');
|
|
368
|
+
var accessToken = sessionStorage.getItem('accessToken');
|
|
369
|
+
var idToken = sessionStorage.getItem('idToken');
|
|
370
|
+
var data = new FormData();
|
|
371
|
+
data.append('sourceType', 'PDF');
|
|
372
|
+
data.append('targetType', 'HTML');
|
|
373
|
+
data.append('file', file);
|
|
374
|
+
var fetchConfig = {
|
|
375
|
+
method: 'POST',
|
|
376
|
+
headers: {
|
|
377
|
+
'Accept': 'application/json',
|
|
378
|
+
'Authorization': 'Bearer ' + accessToken,
|
|
379
|
+
'idToken': idToken
|
|
380
|
+
},
|
|
381
|
+
body: data
|
|
382
|
+
};
|
|
383
|
+
var url = location + _ApplicationManager.default.getContextRoot() + props.config.documentConverterUrl;
|
|
384
|
+
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(function (data) {
|
|
385
|
+
setTemplateDoc(data);
|
|
386
|
+
setFile(null);
|
|
387
|
+
}).catch(function (e) {
|
|
388
|
+
if (e.code === 401) {
|
|
389
|
+
_ApplicationManager.default.clear();
|
|
390
|
+
|
|
391
|
+
_ApplicationManager.default.getApplicationHistory().push('/login');
|
|
392
|
+
}
|
|
393
|
+
}));
|
|
327
394
|
};
|
|
328
|
-
let url = location + _ApplicationManager.default.getContextRoot() + props.config.documentConverterUrl;
|
|
329
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data => {
|
|
330
|
-
setTemplateDoc(data);
|
|
331
|
-
setFile(null);
|
|
332
|
-
}).catch(e => {
|
|
333
|
-
if (e.code === 401) {
|
|
334
|
-
_ApplicationManager.default.clear();
|
|
335
|
-
|
|
336
|
-
_ApplicationManager.default.getApplicationHistory().push('/login');
|
|
337
|
-
}
|
|
338
|
-
}));
|
|
339
395
|
};
|
|
340
396
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
397
|
+
var handleChange = function handleChange() {
|
|
398
|
+
return function (event) {
|
|
399
|
+
var files = event.target.files;
|
|
400
|
+
documentName.current = files[0].name;
|
|
401
|
+
setFile(files[0]);
|
|
402
|
+
};
|
|
345
403
|
};
|
|
346
404
|
|
|
347
|
-
|
|
348
|
-
|
|
405
|
+
var deleteInputItem = function deleteInputItem(id) {
|
|
406
|
+
var val = getInputValue(id);
|
|
349
407
|
inputBoxValues.splice(val.index, 1);
|
|
350
|
-
|
|
408
|
+
var element = document.getElementById(id);
|
|
351
409
|
element.remove();
|
|
352
410
|
saveValue();
|
|
353
411
|
};
|
|
354
412
|
|
|
355
|
-
|
|
356
|
-
|
|
413
|
+
var clear = function clear() {
|
|
414
|
+
var elements = document.getElementsByClassName('_draggable_');
|
|
357
415
|
|
|
358
416
|
while (elements.length > 0) {
|
|
359
417
|
elements[0].remove();
|
|
@@ -363,7 +421,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
363
421
|
setValue(null);
|
|
364
422
|
};
|
|
365
423
|
|
|
366
|
-
|
|
424
|
+
var getProps = function getProps(type) {
|
|
367
425
|
if (type === 'INITIAL_ITEM') {
|
|
368
426
|
return INITIAL_ITEM;
|
|
369
427
|
} else if (type === 'SIGN_ITEM') {
|
|
@@ -373,83 +431,116 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
373
431
|
return TEXT_ITEM;
|
|
374
432
|
};
|
|
375
433
|
|
|
376
|
-
|
|
434
|
+
var handleDuplicate = function handleDuplicate(id) {
|
|
377
435
|
// TODO : Fix this function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
436
|
+
var element = document.getElementById(id);
|
|
437
|
+
var pageElements = document.getElementsByClassName('dropTarget');
|
|
438
|
+
var elementPage = null;
|
|
439
|
+
var elementTop = 3 * parseFloat(element.style.top.replace('px', '').replace('pt', '')) / 4;
|
|
440
|
+
var pageElementTop = 0;
|
|
441
|
+
|
|
442
|
+
var _iterator2 = _createForOfIteratorHelper(pageElements),
|
|
443
|
+
_step2;
|
|
444
|
+
|
|
445
|
+
try {
|
|
446
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
447
|
+
var pageElement = _step2.value;
|
|
448
|
+
var pageElementHeight = parseFloat(pageElement.style.height.replace('px', '').replace('pt', ''));
|
|
449
|
+
|
|
450
|
+
if (elementTop >= pageElementTop && elementTop < pageElementTop + pageElementHeight) {
|
|
451
|
+
elementPage = pageElement;
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
391
454
|
|
|
392
|
-
|
|
455
|
+
pageElementTop += pageElementHeight;
|
|
456
|
+
}
|
|
457
|
+
} catch (err) {
|
|
458
|
+
_iterator2.e(err);
|
|
459
|
+
} finally {
|
|
460
|
+
_iterator2.f();
|
|
393
461
|
}
|
|
394
462
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
463
|
+
var offset = elementTop - pageElementTop;
|
|
464
|
+
var pageNumber = 0;
|
|
465
|
+
var elementData = getInputValue(id);
|
|
466
|
+
|
|
467
|
+
var _iterator3 = _createForOfIteratorHelper(pageElements),
|
|
468
|
+
_step3;
|
|
469
|
+
|
|
470
|
+
try {
|
|
471
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
472
|
+
var _pageElement = _step3.value;
|
|
473
|
+
|
|
474
|
+
var _pageElementHeight = parseFloat(_pageElement.style.height.replace('px', '').replace('pt', ''));
|
|
475
|
+
|
|
476
|
+
if (_pageElement !== elementPage) {
|
|
477
|
+
(function () {
|
|
478
|
+
var item = {
|
|
479
|
+
id: idCounter.current++,
|
|
480
|
+
description: elementData.description,
|
|
481
|
+
type: elementData.type,
|
|
482
|
+
props: getProps(elementData.type)
|
|
483
|
+
};
|
|
484
|
+
grabPalleteItem(item);
|
|
485
|
+
var event = {
|
|
486
|
+
target: _pageElement
|
|
487
|
+
};
|
|
488
|
+
templateItemEventHandler.handleGrabRelease(event, {
|
|
489
|
+
id: item.id,
|
|
490
|
+
top: pageNumber * _pageElementHeight + offset,
|
|
491
|
+
left: parseFloat(element.style.left.replace('px', '')),
|
|
492
|
+
width: parseFloat(element.style.width.replace('px', '')),
|
|
493
|
+
height: parseFloat(element.style.height.replace('px', '')),
|
|
494
|
+
description: item.description,
|
|
495
|
+
type: item.type
|
|
496
|
+
}, function (id, node) {
|
|
497
|
+
var inputValue = getInputValue(id);
|
|
498
|
+
|
|
499
|
+
if (!inputValue) {
|
|
500
|
+
inputValue = newItem(item.id, node.style.width, node.style.height);
|
|
501
|
+
inputBoxValues.push(inputValue);
|
|
502
|
+
setValue(null);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
setSelectedInputBoxValue(inputValue);
|
|
506
|
+
});
|
|
507
|
+
setGrabbedItem(null);
|
|
508
|
+
})();
|
|
509
|
+
}
|
|
429
510
|
|
|
430
|
-
|
|
431
|
-
});
|
|
432
|
-
setGrabbedItem(null);
|
|
511
|
+
pageNumber++;
|
|
433
512
|
}
|
|
434
|
-
|
|
435
|
-
|
|
513
|
+
} catch (err) {
|
|
514
|
+
_iterator3.e(err);
|
|
515
|
+
} finally {
|
|
516
|
+
_iterator3.f();
|
|
436
517
|
}
|
|
437
518
|
};
|
|
438
519
|
|
|
439
520
|
function saveValue() {
|
|
440
|
-
|
|
521
|
+
var allValid = true;
|
|
522
|
+
|
|
523
|
+
var _iterator4 = _createForOfIteratorHelper(inputBoxValues),
|
|
524
|
+
_step4;
|
|
441
525
|
|
|
442
|
-
|
|
443
|
-
|
|
526
|
+
try {
|
|
527
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
528
|
+
var inputBoxValue = _step4.value;
|
|
529
|
+
console.log('\n\n\n\nSIG VAL : ' + inputBoxValue.signatory);
|
|
444
530
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
531
|
+
if (_Utils.default.isNull(inputBoxValue.signatory)) {
|
|
532
|
+
allValid = false;
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
448
535
|
}
|
|
536
|
+
} catch (err) {
|
|
537
|
+
_iterator4.e(err);
|
|
538
|
+
} finally {
|
|
539
|
+
_iterator4.f();
|
|
449
540
|
}
|
|
450
541
|
|
|
451
542
|
if (allValid) {
|
|
452
|
-
|
|
543
|
+
var newValue = {};
|
|
453
544
|
newValue.htmlTemplate = document.getElementById('templateContainer').innerHTML.replace('2px dashed #a1a1a1', 'none').replace('2px dashed green', 'none').replace('div name="replaced_html"', 'html').replace('div name="replaced_body"', 'body');
|
|
454
545
|
newValue.htmlTemplateBase64 = Base64.encode(newValue.htmlTemplate);
|
|
455
546
|
newValue.signatureInputs = inputBoxValues;
|
|
@@ -461,13 +552,13 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
461
552
|
}
|
|
462
553
|
}
|
|
463
554
|
|
|
464
|
-
|
|
465
|
-
|
|
555
|
+
var saveProps = function saveProps(id, values) {
|
|
556
|
+
var val = getInputValue(id);
|
|
466
557
|
val.width = values.width;
|
|
467
558
|
val.height = values.height;
|
|
468
559
|
val.signatory = values.signatory;
|
|
469
560
|
val.type = values.type === 'TEXT INPUT' ? 'TEXT_INPUT' : values.type;
|
|
470
|
-
|
|
561
|
+
var element = document.getElementById(id);
|
|
471
562
|
element.style.width = values.width + 'px';
|
|
472
563
|
element.style.height = values.height + 'px';
|
|
473
564
|
element.style.borderColor = VALID_COLOR;
|
|
@@ -531,12 +622,14 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
531
622
|
variant: "contained",
|
|
532
623
|
component: "span",
|
|
533
624
|
className: paletteSelectionId === 'INITIAL_ITEM' ? classes.paletteButtonSelected : classes.paletteButton,
|
|
534
|
-
onClick: ()
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
625
|
+
onClick: function onClick() {
|
|
626
|
+
return grabPalleteItem({
|
|
627
|
+
id: idCounter.current++,
|
|
628
|
+
description: 'Initial',
|
|
629
|
+
type: 'INITIAL_ITEM',
|
|
630
|
+
props: INITIAL_ITEM
|
|
631
|
+
});
|
|
632
|
+
},
|
|
540
633
|
id: 'initialPaletteButton',
|
|
541
634
|
classes: {
|
|
542
635
|
'label': 'paletteButtonLabel'
|
|
@@ -545,12 +638,14 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
545
638
|
variant: "contained",
|
|
546
639
|
component: "span",
|
|
547
640
|
className: paletteSelectionId === 'SIGN_ITEM' ? classes.paletteButtonSelected : classes.paletteButton,
|
|
548
|
-
onClick: ()
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
641
|
+
onClick: function onClick() {
|
|
642
|
+
return grabPalleteItem({
|
|
643
|
+
id: idCounter.current++,
|
|
644
|
+
description: 'Signature',
|
|
645
|
+
type: 'SIGN_ITEM',
|
|
646
|
+
props: SIGN_ITEM
|
|
647
|
+
});
|
|
648
|
+
},
|
|
554
649
|
id: 'initialPaletteButton',
|
|
555
650
|
classes: {
|
|
556
651
|
'label': 'paletteButtonLabel'
|
|
@@ -559,12 +654,14 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
559
654
|
variant: "contained",
|
|
560
655
|
component: "span",
|
|
561
656
|
className: paletteSelectionId === 'TEXT_ITEM' ? classes.paletteButtonSelected : classes.paletteButton,
|
|
562
|
-
onClick: ()
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
657
|
+
onClick: function onClick() {
|
|
658
|
+
return grabPalleteItem({
|
|
659
|
+
id: idCounter.current++,
|
|
660
|
+
description: 'Text',
|
|
661
|
+
type: 'TEXT_ITEM',
|
|
662
|
+
props: TEXT_ITEM
|
|
663
|
+
});
|
|
664
|
+
},
|
|
568
665
|
id: 'initialPaletteButton',
|
|
569
666
|
classes: {
|
|
570
667
|
'label': 'paletteButtonLabel'
|
|
@@ -573,7 +670,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
573
670
|
variant: "contained",
|
|
574
671
|
component: "span",
|
|
575
672
|
className: classes.paletteButton,
|
|
576
|
-
onClick: ()
|
|
673
|
+
onClick: function onClick() {
|
|
577
674
|
clear();
|
|
578
675
|
},
|
|
579
676
|
id: 'clearButton',
|
|
@@ -586,9 +683,15 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
586
683
|
value: selectedInputBoxValue,
|
|
587
684
|
signatoryUrl: props.config.signatoryUrl,
|
|
588
685
|
signatoryService: props.config.signatoryService,
|
|
589
|
-
saveHandler: (id, values)
|
|
590
|
-
|
|
591
|
-
|
|
686
|
+
saveHandler: function saveHandler(id, values) {
|
|
687
|
+
return saveProps(id, values);
|
|
688
|
+
},
|
|
689
|
+
deleteHandler: function deleteHandler(id, values) {
|
|
690
|
+
return deleteInputItem(id, values);
|
|
691
|
+
},
|
|
692
|
+
dublicateHandler: function dublicateHandler(id) {
|
|
693
|
+
return handleDuplicate(id);
|
|
694
|
+
}
|
|
592
695
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
593
696
|
style: {
|
|
594
697
|
border: '1px solid #e1e1e1',
|
|
@@ -598,7 +701,9 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
598
701
|
width: 'calc(100% - 288px)'
|
|
599
702
|
},
|
|
600
703
|
className: 'col-*-*',
|
|
601
|
-
onClick:
|
|
704
|
+
onClick: function onClick(e) {
|
|
705
|
+
return mouseClickHandler(e);
|
|
706
|
+
}
|
|
602
707
|
}, templateDoc ? /*#__PURE__*/_react.default.createElement("div", {
|
|
603
708
|
style: {
|
|
604
709
|
maxHeight: 'calc(70vh - 80px)',
|