@agilemotion/oui-react-js 1.3.2 → 1.3.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/ApplicationContext.js +90 -41
- package/dist/BasicAppHome.js +16 -10
- package/dist/BusinessPortalApp.js +25 -50
- package/dist/BusinessPortalAppHome.js +102 -109
- package/dist/RestUtils.js +64 -35
- package/dist/Utils.js +47 -1
- package/dist/components/AlertBar.js +40 -11
- package/dist/components/ConfirmationDialog.js +54 -8
- package/dist/components/DataGrid.css +3 -1
- package/dist/components/DataGrid.js +149 -82
- package/dist/components/DataGridFilter.js +85 -8
- package/dist/components/Dialog.js +258 -0
- package/dist/components/HtmlPanel.js +103 -4
- package/dist/components/Icon.js +52 -0
- package/dist/components/PopupView.js +55 -6
- package/dist/components/SignaturePanel.js +40 -11
- package/dist/components/StepperTitleBar.bck.css +85 -0
- package/dist/components/StepperTitleBar.css +53 -54
- package/dist/components/StepperTitleBar.js +39 -28
- package/dist/components/TabPanel.js +10 -11
- package/dist/components/TableCellContent.js +6 -3
- package/dist/components/TemplateDesigner.css +13 -0
- package/dist/components/TemplateDesigner.js +494 -0
- package/dist/components/TemplateItemEventHandler.js +440 -0
- package/dist/components/TemplateTable.js +222 -0
- package/dist/components/TitleBar.js +21 -14
- package/dist/components/Toolbar.js +7 -5
- package/dist/components/Tree.js +5 -2
- package/dist/components/dashboard/BasicBusinessAppDashboard.js +14 -10
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +79 -34
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.css +6 -6
- package/dist/components/form/AddressSearch.js +140 -0
- package/dist/components/form/BaseField.js +31 -6
- package/dist/components/form/Checkbox.js +3 -0
- package/dist/components/form/DatePicker.js +12 -7
- package/dist/components/form/FieldSet.js +246 -71
- package/dist/components/form/Form.js +153 -122
- package/dist/components/form/GridField.js +3 -2
- package/dist/components/form/ImageEditor.js +461 -0
- package/dist/components/form/LabelField.js +2 -2
- package/dist/components/form/LookupField.js +16 -4
- package/dist/components/form/RadioGroup.js +107 -0
- package/dist/components/form/Section.js +58 -19
- package/dist/components/form/SelectItem.js +5 -3
- package/dist/components/form/SignatureTemplateDesignerField.js +46 -0
- package/dist/components/form/TextField.js +5 -9
- package/dist/components/form/TransferList.js +7 -7
- package/dist/components/form/UploadField.js +93 -42
- package/dist/components/form/noimage-person.png +0 -0
- package/dist/components/form/noimage.png +0 -0
- package/dist/components/form/transparent.jpeg +0 -0
- package/dist/components/layout/CollapsiblePanel.js +0 -6
- package/dist/components/layout/Layout.js +41 -20
- package/dist/components/layout/View.css +43 -0
- package/dist/components/layout/View.js +76 -156
- package/dist/components/layout/ViewPort.js +29 -47
- package/dist/components/navbars/HomeNavbar.js +31 -6
- package/dist/components/navbars/PortalNavbar.css +2 -2
- package/dist/components/navbars/PortalNavbar.js +125 -36
- package/dist/components/signatures/AgilitySignaturePanel.js +312 -0
- package/dist/components/signatures/DocumentContainer.css +33 -0
- package/dist/components/signatures/DocumentContainer.js +206 -0
- package/dist/components/signatures/ImageSignatureInput.js +265 -0
- package/dist/components/signatures/ResponsiveTable.js +1 -3
- package/dist/components/signatures/SignatureInput.js +303 -0
- package/dist/components/signatures/SignatureInputProps.js +17 -11
- package/dist/components/signatures/SignatureTemplateDesigner.js +186 -77
- package/dist/components/signatures/transparent.jpeg +0 -0
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +1 -1
- package/dist/event/RouteActionHandler.js +17 -4
- package/dist/event/ServiceCallActionHandler.js +7 -3
- package/dist/js/Addresses.js +16 -9
- package/dist/view/Dashboard.js +10 -6
- package/dist/view/security/LoginBusinessPortal.js +1 -0
- package/package.json +4 -1
|
@@ -29,6 +29,10 @@ var _EventType = _interopRequireDefault(require("../../event/EventType"));
|
|
|
29
29
|
|
|
30
30
|
var Base64 = _interopRequireWildcard(require("js-base64"));
|
|
31
31
|
|
|
32
|
+
var _RestUtils = require("../../RestUtils");
|
|
33
|
+
|
|
34
|
+
var _ServiceCallActionHandler = _interopRequireDefault(require("../../event/ServiceCallActionHandler"));
|
|
35
|
+
|
|
32
36
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
33
37
|
|
|
34
38
|
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; }
|
|
@@ -67,6 +71,7 @@ const TEXT_ITEM = {
|
|
|
67
71
|
defaultWidthOnPageDrop: "200px",
|
|
68
72
|
defaultHeightOnPageDrop: "80px"
|
|
69
73
|
};
|
|
74
|
+
const DROP_ITEM_MARGIN = 32;
|
|
70
75
|
const types = [INITIAL_ITEM, SIGN_ITEM, TEXT_ITEM];
|
|
71
76
|
const useStyles = (0, _core.makeStyles)(theme => ({
|
|
72
77
|
button: {
|
|
@@ -79,14 +84,15 @@ const useStyles = (0, _core.makeStyles)(theme => ({
|
|
|
79
84
|
color: 'red'
|
|
80
85
|
},
|
|
81
86
|
propertyWindow: {
|
|
82
|
-
width: "320px",
|
|
83
87
|
height: "400px",
|
|
84
|
-
border: "1px solid #e1e1e1",
|
|
85
88
|
margin: "4px",
|
|
86
|
-
borderRadius: "4px"
|
|
89
|
+
borderRadius: "4px",
|
|
90
|
+
paddingLeft: "24px",
|
|
91
|
+
borderBottom: "1px solid #e1e1e1",
|
|
92
|
+
borderTop: "1px solid #e1e1e1"
|
|
87
93
|
},
|
|
88
94
|
paletteButton: {
|
|
89
|
-
width: "
|
|
95
|
+
width: "270px",
|
|
90
96
|
height: "40px",
|
|
91
97
|
backgroundColor: "#e1e1e1",
|
|
92
98
|
margin: "4px",
|
|
@@ -98,7 +104,7 @@ const useStyles = (0, _core.makeStyles)(theme => ({
|
|
|
98
104
|
'&:hover': {
|
|
99
105
|
backgroundColor: "yellowgreen"
|
|
100
106
|
},
|
|
101
|
-
width: "
|
|
107
|
+
width: "270px",
|
|
102
108
|
height: "40px",
|
|
103
109
|
backgroundColor: "yellowgreen",
|
|
104
110
|
margin: "4px",
|
|
@@ -107,7 +113,7 @@ const useStyles = (0, _core.makeStyles)(theme => ({
|
|
|
107
113
|
borderRadius: "4px"
|
|
108
114
|
},
|
|
109
115
|
palette: {
|
|
110
|
-
width: "
|
|
116
|
+
width: "280px",
|
|
111
117
|
borderRadius: "4px",
|
|
112
118
|
border: "1px solid #e1e1e1"
|
|
113
119
|
}
|
|
@@ -179,6 +185,8 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
179
185
|
loading = _React$useState16[0],
|
|
180
186
|
setLoading = _React$useState16[1];
|
|
181
187
|
|
|
188
|
+
const documentName = _react.default.useRef(null);
|
|
189
|
+
|
|
182
190
|
_react.default.useEffect(() => {
|
|
183
191
|
props.handle.api = api();
|
|
184
192
|
|
|
@@ -197,6 +205,12 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
197
205
|
}
|
|
198
206
|
});
|
|
199
207
|
|
|
208
|
+
_react.default.useEffect(() => {
|
|
209
|
+
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
210
|
+
props.valueChangeHandler(value);
|
|
211
|
+
}
|
|
212
|
+
}, [value]);
|
|
213
|
+
|
|
200
214
|
const api = () => {
|
|
201
215
|
return {
|
|
202
216
|
get id() {
|
|
@@ -205,19 +219,47 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
205
219
|
|
|
206
220
|
loadData: actionConfig => {
|
|
207
221
|
setLoading(true);
|
|
222
|
+
let service = !_Utils.default.isNull(props.config.dataService) ? props.config.dataService : !_Utils.default.isNull(actionConfig) !== null ? actionConfig.dataService : null;
|
|
223
|
+
|
|
224
|
+
if (!_Utils.default.isNull(service)) {
|
|
225
|
+
if (service.type === 'remoteObjectProxy') {
|
|
226
|
+
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result => {
|
|
227
|
+
setLoading(false);
|
|
228
|
+
}, e => {
|
|
229
|
+
console.error(e);
|
|
230
|
+
|
|
231
|
+
_Utils.default.publishSystemErrorMessage(props.viewId);
|
|
232
|
+
}, parameter => {
|
|
233
|
+
setLoading(false);
|
|
234
|
+
});
|
|
235
|
+
} else {
|
|
236
|
+
if (_Utils.default.isNull(actionConfig)) {
|
|
237
|
+
actionConfig = {};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
actionConfig.service = service;
|
|
241
|
+
|
|
242
|
+
_ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, data => {
|
|
243
|
+
setHtmlTemplate(data.template);
|
|
244
|
+
setLoading(false);
|
|
245
|
+
}, () => {});
|
|
246
|
+
}
|
|
208
247
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
248
|
+
return true;
|
|
249
|
+
} else {
|
|
250
|
+
if (!_Utils.default.isNull(actionConfig) && !_Utils.default.isNull(actionConfig.value)) {
|
|
251
|
+
let value = _ApplicationContext.default.isExpression(actionConfig.value) ? _ApplicationContext.default.resolveExpressionValue(actionConfig.value) : actionConfig.value;
|
|
213
252
|
setValue(value);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
253
|
+
|
|
254
|
+
if (!_Utils.default.isNull(value)) {
|
|
255
|
+
setHtmlTemplate(value.htmlTemplate);
|
|
256
|
+
setInputBoxValues(value.signatureInputs);
|
|
257
|
+
idCounter.current = value.idCounter;
|
|
258
|
+
}
|
|
217
259
|
}
|
|
218
|
-
}
|
|
219
260
|
|
|
220
|
-
|
|
261
|
+
setLoading(false);
|
|
262
|
+
}
|
|
221
263
|
},
|
|
222
264
|
|
|
223
265
|
get model() {
|
|
@@ -319,9 +361,9 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
319
361
|
left = parseFloat(element.style.left.replace('px', '')) + 4;
|
|
320
362
|
}
|
|
321
363
|
|
|
322
|
-
if (parseFloat(element.style.top.replace('
|
|
364
|
+
if (parseFloat(element.style.top.replace('px', '')) === top) {
|
|
323
365
|
topOffset += 4;
|
|
324
|
-
top = parseFloat(element.style.top.replace('
|
|
366
|
+
top = parseFloat(element.style.top.replace('px', ''));
|
|
325
367
|
}
|
|
326
368
|
}
|
|
327
369
|
} catch (err) {
|
|
@@ -369,13 +411,13 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
369
411
|
|
|
370
412
|
if (event.target.className.includes("page")) {
|
|
371
413
|
let top = !_Utils.default.isNull(event.target.style.top) && event.target.style.top.trim().length > 0 ? event.target.style.top.replaceAll('pt', '') : '0';
|
|
372
|
-
let topPos = parseFloat(top) + parseFloat(event.target.style.height.replace('pt', '')) - 75;
|
|
373
|
-
let pageDropOffset = getPageDropOffset(
|
|
414
|
+
let topPos = parseFloat(top) + parseFloat(event.target.style.height.replace('pt', '')) - parseFloat(paletteSelection.current.defaultHeightOnPageDrop.replace('px', '')) * .75 - DROP_ITEM_MARGIN;
|
|
415
|
+
let pageDropOffset = getPageDropOffset(DROP_ITEM_MARGIN, parseFloat(convertToPixels(topPos + "pt").replace('px', '')));
|
|
374
416
|
node.style.top = convertToPixels(topPos - pageDropOffset.topOffset + 'pt');
|
|
375
417
|
node.style.width = paletteSelection.current.defaultWidthOnPageDrop;
|
|
376
418
|
node.style.height = paletteSelection.current.defaultHeightOnPageDrop;
|
|
377
419
|
node.style.padding = '8px';
|
|
378
|
-
node.style.left =
|
|
420
|
+
node.style.left = DROP_ITEM_MARGIN + pageDropOffset.leftOffset + 'px';
|
|
379
421
|
event.target.appendChild(node);
|
|
380
422
|
} else {
|
|
381
423
|
let lineHeight = event.target.style.lineHeight;
|
|
@@ -426,27 +468,29 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
426
468
|
}, [value]);
|
|
427
469
|
|
|
428
470
|
const initDragAndDrop = className => {
|
|
429
|
-
|
|
471
|
+
setTimeout(() => {
|
|
472
|
+
let elements = document.getElementsByClassName(className);
|
|
430
473
|
|
|
431
|
-
|
|
432
|
-
|
|
474
|
+
var _iterator5 = _createForOfIteratorHelper(elements),
|
|
475
|
+
_step5;
|
|
433
476
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
477
|
+
try {
|
|
478
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
479
|
+
const element = _step5.value;
|
|
437
480
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
481
|
+
if (className !== "page") {
|
|
482
|
+
element.addEventListener("dragstart", dragStart, false);
|
|
483
|
+
}
|
|
441
484
|
|
|
442
|
-
|
|
443
|
-
|
|
485
|
+
element.addEventListener("dragover", dragOver, false);
|
|
486
|
+
element.addEventListener("drop", drop, false);
|
|
487
|
+
}
|
|
488
|
+
} catch (err) {
|
|
489
|
+
_iterator5.e(err);
|
|
490
|
+
} finally {
|
|
491
|
+
_iterator5.f();
|
|
444
492
|
}
|
|
445
|
-
}
|
|
446
|
-
_iterator5.e(err);
|
|
447
|
-
} finally {
|
|
448
|
-
_iterator5.f();
|
|
449
|
-
}
|
|
493
|
+
}, 2000);
|
|
450
494
|
};
|
|
451
495
|
|
|
452
496
|
const destroyEvents = () => {
|
|
@@ -513,12 +557,75 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
513
557
|
setPaletteSelectionId(null);
|
|
514
558
|
}, [htmlTemplate]);
|
|
515
559
|
|
|
560
|
+
function getElementPage(elementId) {
|
|
561
|
+
let pages = document.getElementsByClassName("page");
|
|
562
|
+
|
|
563
|
+
var _iterator9 = _createForOfIteratorHelper(pages),
|
|
564
|
+
_step9;
|
|
565
|
+
|
|
566
|
+
try {
|
|
567
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
568
|
+
const page = _step9.value;
|
|
569
|
+
let elements = page.getElementsByClassName("__agm_wf_signatureInput__");
|
|
570
|
+
|
|
571
|
+
var _iterator10 = _createForOfIteratorHelper(elements),
|
|
572
|
+
_step10;
|
|
573
|
+
|
|
574
|
+
try {
|
|
575
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
576
|
+
const element = _step10.value;
|
|
577
|
+
|
|
578
|
+
if (element.id === elementId) {
|
|
579
|
+
return page;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
} catch (err) {
|
|
583
|
+
_iterator10.e(err);
|
|
584
|
+
} finally {
|
|
585
|
+
_iterator10.f();
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
} catch (err) {
|
|
589
|
+
_iterator9.e(err);
|
|
590
|
+
} finally {
|
|
591
|
+
_iterator9.f();
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
return null;
|
|
595
|
+
}
|
|
596
|
+
|
|
516
597
|
function handleDragDrop(event) {
|
|
517
598
|
let offset;
|
|
518
599
|
offset = dragAndDropData.offset.split(',');
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
600
|
+
let dm = document.getElementById(dragAndDropData.id);
|
|
601
|
+
let page = getElementPage(dm.id);
|
|
602
|
+
let itemLeft = event.clientX + parseInt(offset[0], 10);
|
|
603
|
+
let itemTop = event.clientY + parseInt(offset[1], 10);
|
|
604
|
+
let itemWidth = parseFloat(convertToPixels(dm.style.width).replace('px', ''));
|
|
605
|
+
let itemHeight = parseFloat(convertToPixels(dm.style.height).replace('px', ''));
|
|
606
|
+
dm.style.left = itemLeft + 'px';
|
|
607
|
+
dm.style.top = itemTop + 'px';
|
|
608
|
+
let itemRight = itemLeft + itemWidth;
|
|
609
|
+
let itemBottom = itemTop + itemHeight;
|
|
610
|
+
let pageRight = parseFloat(convertToPixels(page.style.width).replace('px', ''));
|
|
611
|
+
let pageBottom = parseFloat(convertToPixels(page.style.height).replace('px', ''));
|
|
612
|
+
|
|
613
|
+
if (itemLeft < DROP_ITEM_MARGIN) {
|
|
614
|
+
dm.style.left = DROP_ITEM_MARGIN + 'px';
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if (itemRight > pageRight - DROP_ITEM_MARGIN) {
|
|
618
|
+
dm.style.left = pageRight - DROP_ITEM_MARGIN - itemWidth + 'px';
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
if (itemTop < DROP_ITEM_MARGIN) {
|
|
622
|
+
dm.style.top = DROP_ITEM_MARGIN + 'px';
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (itemBottom > pageBottom - DROP_ITEM_MARGIN) {
|
|
626
|
+
dm.style.top = pageBottom - DROP_ITEM_MARGIN - itemHeight + 'px';
|
|
627
|
+
}
|
|
628
|
+
|
|
522
629
|
event.preventDefault();
|
|
523
630
|
return false;
|
|
524
631
|
}
|
|
@@ -527,7 +634,6 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
527
634
|
document.body.style.cursor = "move";
|
|
528
635
|
let style = window.getComputedStyle(event.target, null);
|
|
529
636
|
dragAndDropData.offset = parseInt(style.getPropertyValue("left"), 10) - event.clientX + ',' + (parseInt(style.getPropertyValue("top"), 10) - event.clientY);
|
|
530
|
-
console.log("\n\n\nDRAG START " + event.target.id);
|
|
531
637
|
dragAndDropData.id = event.target.id;
|
|
532
638
|
}
|
|
533
639
|
|
|
@@ -544,12 +650,12 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
544
650
|
const getInputValue = id => {
|
|
545
651
|
let index = 0;
|
|
546
652
|
|
|
547
|
-
var
|
|
548
|
-
|
|
653
|
+
var _iterator11 = _createForOfIteratorHelper(inputBoxValues),
|
|
654
|
+
_step11;
|
|
549
655
|
|
|
550
656
|
try {
|
|
551
|
-
for (
|
|
552
|
-
const inputBoxValue =
|
|
657
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
|
658
|
+
const inputBoxValue = _step11.value;
|
|
553
659
|
|
|
554
660
|
if (inputBoxValue.id === id) {
|
|
555
661
|
inputBoxValue.index = index;
|
|
@@ -559,9 +665,9 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
559
665
|
index++;
|
|
560
666
|
}
|
|
561
667
|
} catch (err) {
|
|
562
|
-
|
|
668
|
+
_iterator11.e(err);
|
|
563
669
|
} finally {
|
|
564
|
-
|
|
670
|
+
_iterator11.f();
|
|
565
671
|
}
|
|
566
672
|
|
|
567
673
|
return null;
|
|
@@ -599,6 +705,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
599
705
|
|
|
600
706
|
const handleChange = () => event => {
|
|
601
707
|
let files = event.target.files;
|
|
708
|
+
documentName.current = files[0].name;
|
|
602
709
|
setFile(files[0]);
|
|
603
710
|
};
|
|
604
711
|
|
|
@@ -611,18 +718,18 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
611
718
|
};
|
|
612
719
|
|
|
613
720
|
const clear = () => {
|
|
614
|
-
var
|
|
615
|
-
|
|
721
|
+
var _iterator12 = _createForOfIteratorHelper(inputBoxValues),
|
|
722
|
+
_step12;
|
|
616
723
|
|
|
617
724
|
try {
|
|
618
|
-
for (
|
|
619
|
-
const inputBoxValue =
|
|
725
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
726
|
+
const inputBoxValue = _step12.value;
|
|
620
727
|
document.getElementById(inputBoxValue.id).remove();
|
|
621
728
|
}
|
|
622
729
|
} catch (err) {
|
|
623
|
-
|
|
730
|
+
_iterator12.e(err);
|
|
624
731
|
} finally {
|
|
625
|
-
|
|
732
|
+
_iterator12.f();
|
|
626
733
|
}
|
|
627
734
|
|
|
628
735
|
inputBoxValues.splice(0, inputBoxValues.length);
|
|
@@ -637,12 +744,12 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
637
744
|
let elementTop = 3 * parseFloat(element.style.top.replace("px", '').replace('pt', '')) / 4;
|
|
638
745
|
let pageElementTop = 0;
|
|
639
746
|
|
|
640
|
-
var
|
|
641
|
-
|
|
747
|
+
var _iterator13 = _createForOfIteratorHelper(pageElements),
|
|
748
|
+
_step13;
|
|
642
749
|
|
|
643
750
|
try {
|
|
644
|
-
for (
|
|
645
|
-
const pageElement =
|
|
751
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
|
752
|
+
const pageElement = _step13.value;
|
|
646
753
|
let pageElementHeight = parseFloat(pageElement.style.height.replace("px", '').replace('pt', ''));
|
|
647
754
|
|
|
648
755
|
if (elementTop >= pageElementTop && elementTop < pageElementTop + pageElementHeight) {
|
|
@@ -653,21 +760,21 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
653
760
|
pageElementTop += pageElementHeight;
|
|
654
761
|
}
|
|
655
762
|
} catch (err) {
|
|
656
|
-
|
|
763
|
+
_iterator13.e(err);
|
|
657
764
|
} finally {
|
|
658
|
-
|
|
765
|
+
_iterator13.f();
|
|
659
766
|
}
|
|
660
767
|
|
|
661
768
|
let offset = elementTop - pageElementTop;
|
|
662
769
|
let pageNumber = 0;
|
|
663
770
|
let elementData = getInputValue(id);
|
|
664
771
|
|
|
665
|
-
var
|
|
666
|
-
|
|
772
|
+
var _iterator14 = _createForOfIteratorHelper(pageElements),
|
|
773
|
+
_step14;
|
|
667
774
|
|
|
668
775
|
try {
|
|
669
|
-
for (
|
|
670
|
-
const pageElement =
|
|
776
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
|
777
|
+
const pageElement = _step14.value;
|
|
671
778
|
let pageElementHeight = parseFloat(pageElement.style.height.replace("px", '').replace('pt', ''));
|
|
672
779
|
|
|
673
780
|
if (pageElement !== elementPage) {
|
|
@@ -700,21 +807,21 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
700
807
|
}
|
|
701
808
|
}
|
|
702
809
|
} catch (err) {
|
|
703
|
-
|
|
810
|
+
_iterator14.e(err);
|
|
704
811
|
} finally {
|
|
705
|
-
|
|
812
|
+
_iterator14.f();
|
|
706
813
|
}
|
|
707
814
|
};
|
|
708
815
|
|
|
709
816
|
function saveValue() {
|
|
710
817
|
let allValid = true;
|
|
711
818
|
|
|
712
|
-
var
|
|
713
|
-
|
|
819
|
+
var _iterator15 = _createForOfIteratorHelper(inputBoxValues),
|
|
820
|
+
_step15;
|
|
714
821
|
|
|
715
822
|
try {
|
|
716
|
-
for (
|
|
717
|
-
const inputBoxValue =
|
|
823
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
824
|
+
const inputBoxValue = _step15.value;
|
|
718
825
|
|
|
719
826
|
if (_Utils.default.isNull(inputBoxValue.signatory)) {
|
|
720
827
|
allValid = false;
|
|
@@ -722,17 +829,18 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
722
829
|
}
|
|
723
830
|
}
|
|
724
831
|
} catch (err) {
|
|
725
|
-
|
|
832
|
+
_iterator15.e(err);
|
|
726
833
|
} finally {
|
|
727
|
-
|
|
834
|
+
_iterator15.f();
|
|
728
835
|
}
|
|
729
836
|
|
|
730
837
|
if (allValid) {
|
|
731
838
|
let newValue = {};
|
|
732
|
-
newValue.htmlTemplate = document.getElementById("templateContainer").innerHTML;
|
|
733
|
-
newValue.htmlTemplateBase64 = Base64.encode(
|
|
839
|
+
newValue.htmlTemplate = document.getElementById("templateContainer").innerHTML.replace("div name=\"replaced_html\"", "html").replace("div name=\"replaced_body\"", "body");
|
|
840
|
+
newValue.htmlTemplateBase64 = Base64.encode(newValue.htmlTemplate);
|
|
734
841
|
newValue.signatureInputs = inputBoxValues;
|
|
735
842
|
newValue.idCounter = idCounter.current;
|
|
843
|
+
newValue.documentName = documentName.current;
|
|
736
844
|
setValue(newValue);
|
|
737
845
|
} else {
|
|
738
846
|
setValue(null);
|
|
@@ -764,7 +872,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
764
872
|
width: "100%",
|
|
765
873
|
maxHeight: "70vh"
|
|
766
874
|
}
|
|
767
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
875
|
+
}, _Utils.default.isNull(props.showToolbar) || props.showToolbar === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
768
876
|
style: {
|
|
769
877
|
marginBottom: "32px"
|
|
770
878
|
}
|
|
@@ -792,7 +900,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
792
900
|
disabled: _Utils.default.isNull(file),
|
|
793
901
|
className: classes.button,
|
|
794
902
|
onClick: handleSubmit()
|
|
795
|
-
}, "Generate Template"))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
903
|
+
}, "Generate Template"))))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
796
904
|
style: {
|
|
797
905
|
height: "auto"
|
|
798
906
|
}
|
|
@@ -863,7 +971,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
863
971
|
"label": "paletteButtonLabel"
|
|
864
972
|
}
|
|
865
973
|
}, "Clear")), /*#__PURE__*/_react.default.createElement("div", {
|
|
866
|
-
className: "".concat(classes.propertyWindow
|
|
974
|
+
className: "".concat(classes.propertyWindow)
|
|
867
975
|
}, /*#__PURE__*/_react.default.createElement(_SignatureInputProps.default, {
|
|
868
976
|
value: selectedInputBoxValue,
|
|
869
977
|
signatoryUrl: location + _ApplicationContext.default.getBaseApiUrl() + props.config.signatoryUrl,
|
|
@@ -873,7 +981,8 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
873
981
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
874
982
|
style: {
|
|
875
983
|
maxHeight: "calc(70vh - 80px)",
|
|
876
|
-
overflow: "auto"
|
|
984
|
+
overflow: "auto",
|
|
985
|
+
width: "60%"
|
|
877
986
|
},
|
|
878
987
|
className: 'col-*-*',
|
|
879
988
|
id: "signaturePanel",
|
|
@@ -882,7 +991,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
882
991
|
onMouseOut: e => mouseOutHandler(e),
|
|
883
992
|
id: "templateContainer"
|
|
884
993
|
}, /*#__PURE__*/_react.default.createElement(_reactHtmlRenderer.default, {
|
|
885
|
-
html: htmlTemplate
|
|
994
|
+
html: htmlTemplate.replace('<html', "<div name=\"replaced_html\"").replace('</html>', '</div>').replace('<body', "<div name=\"replaced_body\"").replace('</body>', '</div>')
|
|
886
995
|
}))) : null)) : /*#__PURE__*/_react.default.createElement("div", null, "Loading..."));
|
|
887
996
|
}));
|
|
888
997
|
|
|
Binary file
|
package/dist/event/Observable.js
CHANGED
|
@@ -221,7 +221,7 @@ class Observable {
|
|
|
221
221
|
// This happens on async events such as RPC_CALL. If there is no view masking,
|
|
222
222
|
// the REST call may return while the component has been destroyed, and the source's current could be null
|
|
223
223
|
// Proper masking when doing REST CALL should prevent this from happening. The null check provides the sort of defence
|
|
224
|
-
if (!_Utils.default.isNull(be.getSource())) {
|
|
224
|
+
if (!_Utils.default.isNull(be.getSource()) && !_Utils.default.isNull(be.getSource().api)) {
|
|
225
225
|
sourceId = be.getSource().api.id;
|
|
226
226
|
viewId = be.viewId;
|
|
227
227
|
|
|
@@ -15,6 +15,12 @@ var _Utils = _interopRequireDefault(require("../Utils"));
|
|
|
15
15
|
|
|
16
16
|
var _DynamicJS = _interopRequireDefault(require("../DynamicJS"));
|
|
17
17
|
|
|
18
|
+
var _Observable = _interopRequireDefault(require("../event/Observable"));
|
|
19
|
+
|
|
20
|
+
var _EventType = _interopRequireDefault(require("./EventType"));
|
|
21
|
+
|
|
22
|
+
var _Event = _interopRequireDefault(require("./Event"));
|
|
23
|
+
|
|
18
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
25
|
|
|
20
26
|
const location = window.location.protocol + "//" + window.location.hostname;
|
|
@@ -43,9 +49,9 @@ class RouteActionHandler {
|
|
|
43
49
|
if (!_Utils.default.isNull(actionConfig.pathEvaluator)) {
|
|
44
50
|
path = _DynamicJS.default.executeScriptObject(currentViewId + 'ViewEvaluator_' + event.source.id, actionConfig.pathEvaluator);
|
|
45
51
|
} else {
|
|
46
|
-
path = actionConfig.path
|
|
52
|
+
path = _ApplicationContext.default.isExpression(actionConfig.path) ? _ApplicationContext.default.resolveExpressionValue(actionConfig.path, event.data) : actionConfig.path;
|
|
47
53
|
|
|
48
|
-
if ("@#{history.back}" === path) {
|
|
54
|
+
if ("@#{history.back}" === actionConfig.path) {
|
|
49
55
|
let historyElement = _ApplicationContext.default.getPreviousHistoryElement();
|
|
50
56
|
|
|
51
57
|
if (historyElement === null) {
|
|
@@ -64,7 +70,7 @@ class RouteActionHandler {
|
|
|
64
70
|
for (let i = 0; i < actionConfig.parameters.length; i++) {
|
|
65
71
|
let parameter = actionConfig.parameters[i];
|
|
66
72
|
|
|
67
|
-
let parameterValue = _ApplicationContext.default.resolveParameterValue(parameter);
|
|
73
|
+
let parameterValue = _ApplicationContext.default.resolveParameterValue(parameter, event.data);
|
|
68
74
|
|
|
69
75
|
let validator = parameter.validator;
|
|
70
76
|
|
|
@@ -109,7 +115,14 @@ class RouteActionHandler {
|
|
|
109
115
|
} else {
|
|
110
116
|
_ApplicationContext.default.closeCurrentView(false);
|
|
111
117
|
|
|
112
|
-
_ApplicationContext.default.getCurrentView()
|
|
118
|
+
currentView = _ApplicationContext.default.getCurrentView();
|
|
119
|
+
|
|
120
|
+
if (currentView) {
|
|
121
|
+
currentView.handle.api.updateModel(parameterValues);
|
|
122
|
+
let event = new _Event.default(currentView.handle, currentView.config.id, null);
|
|
123
|
+
|
|
124
|
+
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
125
|
+
}
|
|
113
126
|
}
|
|
114
127
|
} else if (data.type === 'graph') {
|
|
115
128
|
_ApplicationContext.default.loadGraph(isParent, isPopup, data, parameterValues);
|
|
@@ -24,7 +24,7 @@ class ServiceCallActionHandler {
|
|
|
24
24
|
return ServiceCallActionHandler.instance;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
execute(actionConfig, event, component, currentViewId, successCallback, errorCallback) {
|
|
27
|
+
execute(actionConfig, event, component, currentViewId, successCallback, errorCallback, invalidParameterCallback) {
|
|
28
28
|
let method = actionConfig.service.type === 'remoteObjectProxy' ? _RestUtils.invokeRpc : _RestUtils.invokeRest;
|
|
29
29
|
method(actionConfig.service, component, currentViewId, result => {
|
|
30
30
|
let handle = !_Utils.default.isNull(component) && !_Utils.default.isNull(component.current) ? component.current : component;
|
|
@@ -44,12 +44,16 @@ class ServiceCallActionHandler {
|
|
|
44
44
|
successCallback(result);
|
|
45
45
|
}
|
|
46
46
|
}, e => {
|
|
47
|
-
_Utils.default.publishSystemErrorMessage(currentViewId);
|
|
47
|
+
_Utils.default.publishSystemErrorMessage(currentViewId, component);
|
|
48
48
|
|
|
49
49
|
if (!_Utils.default.isNull(errorCallback)) {
|
|
50
50
|
errorCallback(e);
|
|
51
51
|
}
|
|
52
|
-
},
|
|
52
|
+
}, () => {
|
|
53
|
+
if (invalidParameterCallback) {
|
|
54
|
+
invalidParameterCallback();
|
|
55
|
+
}
|
|
56
|
+
}, actionConfig.returnValueBinding, actionConfig.successMessage);
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
}
|
package/dist/js/Addresses.js
CHANGED
|
@@ -12,15 +12,22 @@ class Addresses {
|
|
|
12
12
|
|
|
13
13
|
copy(from, to, checked) {
|
|
14
14
|
if (checked) {
|
|
15
|
-
let
|
|
16
|
-
let
|
|
17
|
-
let
|
|
18
|
-
let
|
|
19
|
-
let
|
|
20
|
-
this.resolver.resolveComponentApi(
|
|
21
|
-
this.resolver.resolveComponentApi(
|
|
22
|
-
this.resolver.resolveComponentApi(
|
|
23
|
-
this.resolver.resolveComponentApi(to + '.
|
|
15
|
+
let street = this.resolver.resolveComponentApi(from + '.street').value;
|
|
16
|
+
let suburb = this.resolver.resolveComponentApi(from + '.suburb').value;
|
|
17
|
+
let city = this.resolver.resolveComponentApi(from + '.city').value;
|
|
18
|
+
let municipality = this.resolver.resolveComponentApi(from + '.municipality').value;
|
|
19
|
+
let province = this.resolver.resolveComponentApi(from + '.province').value;
|
|
20
|
+
let country = this.resolver.resolveComponentApi(from + '.country').value;
|
|
21
|
+
let code = this.resolver.resolveComponentApi(from + '.code').value;
|
|
22
|
+
let building = this.resolver.resolveComponentApi(from + '.building').value;
|
|
23
|
+
this.resolver.resolveComponentApi(to + '.street').value = street;
|
|
24
|
+
this.resolver.resolveComponentApi(to + '.suburb').value = suburb;
|
|
25
|
+
this.resolver.resolveComponentApi(to + '.city').value = city;
|
|
26
|
+
this.resolver.resolveComponentApi(to + '.municipality').value = municipality;
|
|
27
|
+
this.resolver.resolveComponentApi(to + '.province').value = province;
|
|
28
|
+
this.resolver.resolveComponentApi(to + '.country').value = country;
|
|
29
|
+
this.resolver.resolveComponentApi(to + '.code').value = code;
|
|
30
|
+
this.resolver.resolveComponentApi(to + '.building').value = building;
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
|