@agilemotion/oui-react-js 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApplicationManager.js +0 -4
- package/dist/RestUtils.js +10 -8
- package/dist/Utils.js +6 -2
- package/dist/components/DataGrid.js +9 -1
- package/dist/components/DataGridColumn.js +3 -1
- package/dist/components/DataGridFilter.js +26 -32
- package/dist/components/DataGridHeading.js +4 -9
- package/dist/components/DocumentTemplateDesigner.js +4 -0
- package/dist/components/DocumentTemplateDesignerComponent.js +4 -5
- package/dist/components/DocumentViewer.js +2 -2
- package/dist/components/TabPanel.js +0 -3
- package/dist/components/form/BaseField.js +7 -3
- package/dist/components/form/Form.css +7 -0
- package/dist/components/form/Form.js +9 -7
- package/dist/components/form/LookupField.js +2 -2
- package/dist/components/form/TransferList.js +1 -2
- package/dist/components/form/UploadField.js +2 -5
- package/dist/components/media/ToolbarButton.js +0 -1
- package/dist/components/signatures/SignatureInputProps.js +1 -1
- package/dist/components/signatures/SignatureTemplateDesigner.js +1 -1
- package/dist/event/Observable.js +0 -1
- package/package.json +1 -1
package/dist/RestUtils.js
CHANGED
|
@@ -192,17 +192,19 @@ class RestUtils {
|
|
|
192
192
|
}
|
|
193
193
|
this.doFetch(location + _ApplicationManager.default.getContextRoot() + '/' + module + '/api/v1/rpc/invoke', response => {
|
|
194
194
|
if (!_Utils.default.isNull(viewId) && !_Utils.default.isNull(component)) {
|
|
195
|
-
if (returnValueBinding) {
|
|
196
|
-
let path = _Utils.default.getPropertyChainPath(returnValueBinding);
|
|
197
|
-
if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
|
|
198
|
-
path.valueObject[path.property] = response;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
195
|
this.fireEvent(viewId, component, _EventType.default.SERVICE_CALL_SUCCESS, response);
|
|
202
|
-
|
|
203
|
-
|
|
196
|
+
} else {
|
|
197
|
+
console.warn("No view id or component specified while executing [" + module + "] rpc : ", rpcDetails);
|
|
198
|
+
}
|
|
199
|
+
if (returnValueBinding) {
|
|
200
|
+
let path = _Utils.default.getPropertyChainPath(returnValueBinding);
|
|
201
|
+
if (!_Utils.default.isNull(path.valueObject) && !_Utils.default.isNull(path.property)) {
|
|
202
|
+
path.valueObject[path.property] = response;
|
|
204
203
|
}
|
|
205
204
|
}
|
|
205
|
+
if (successCallback !== null) {
|
|
206
|
+
successCallback(response);
|
|
207
|
+
}
|
|
206
208
|
}, e => {
|
|
207
209
|
if (errorCallback !== null) {
|
|
208
210
|
errorCallback(e);
|
package/dist/Utils.js
CHANGED
|
@@ -313,11 +313,15 @@ class Utils {
|
|
|
313
313
|
return defaultStyle;
|
|
314
314
|
};
|
|
315
315
|
static mergeObjects(source, target) {
|
|
316
|
+
if (!target) {
|
|
317
|
+
return source;
|
|
318
|
+
}
|
|
316
319
|
let properties = Object.getOwnPropertyNames(source);
|
|
320
|
+
let result = JSON.parse(JSON.stringify(target));
|
|
317
321
|
for (const property of properties) {
|
|
318
|
-
|
|
322
|
+
result[property] = source[property];
|
|
319
323
|
}
|
|
320
|
-
return
|
|
324
|
+
return result;
|
|
321
325
|
}
|
|
322
326
|
static publishErrorMessage = async function (e, viewId) {
|
|
323
327
|
let component = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
@@ -686,6 +686,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
686
686
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
687
687
|
handle: filterHandle,
|
|
688
688
|
config: props.config,
|
|
689
|
+
viewId: props.viewId,
|
|
689
690
|
filterWrapperClass: props.filterWrapperClass,
|
|
690
691
|
scrollWidth: scrollWidth,
|
|
691
692
|
onFilterSubmit: search,
|
|
@@ -712,10 +713,17 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
712
713
|
style: {
|
|
713
714
|
width: '100%'
|
|
714
715
|
}
|
|
716
|
+
}, /*#__PURE__*/_react.default.createElement("thead", {
|
|
717
|
+
className: 'filterHead',
|
|
718
|
+
style: {
|
|
719
|
+
width: 'calc(100% - ' + props.scrollWidth + 'px)'
|
|
720
|
+
},
|
|
721
|
+
ref: ref
|
|
715
722
|
}, isFilterable() ? /*#__PURE__*/_react.default.createElement(_DataGridFilter.default, {
|
|
716
723
|
handle: filterHandle,
|
|
717
724
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
718
725
|
config: config,
|
|
726
|
+
viewId: props.viewId,
|
|
719
727
|
filterWrapperClass: props.filterWrapperClass,
|
|
720
728
|
scrollWidth: scrollWidth,
|
|
721
729
|
onFilterSubmit: search,
|
|
@@ -729,7 +737,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
729
737
|
onSelectAllClick: handleSelectAllClick,
|
|
730
738
|
onRequestSort: handleRequestSort,
|
|
731
739
|
rowCount: totalNumberOfRows
|
|
732
|
-
}), /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tbody, {
|
|
740
|
+
})), /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tbody, {
|
|
733
741
|
className: classes.tableBody,
|
|
734
742
|
style: {
|
|
735
743
|
maxHeight: _Utils.default.isNull(props.bodyMaxHeight) ? props.bodyMaxHeight : '42vh'
|
|
@@ -61,7 +61,9 @@ const DataGridColumn = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
61
61
|
padding: 'default',
|
|
62
62
|
className: config.cellFormat === 'MONEY' || config.cellFormat === 'NUMBER' ? classes.tableHeaderCellNumeric : classes.tableHeaderCell,
|
|
63
63
|
style: {
|
|
64
|
-
width: config.attributes.width
|
|
64
|
+
width: config.attributes.width,
|
|
65
|
+
display: 'flex',
|
|
66
|
+
alignItems: 'center'
|
|
65
67
|
}
|
|
66
68
|
}, /*#__PURE__*/_react.default.createElement(_TableSortLabel.default, {
|
|
67
69
|
active: config.attributes['sortable'] === true,
|
|
@@ -58,16 +58,16 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
58
58
|
}
|
|
59
59
|
editorConfig.className = 'columnFilterEditor';
|
|
60
60
|
editorConfig.attributes = !_Utils.default.isNull(attributes) ? attributes : {};
|
|
61
|
-
|
|
62
|
-
editorConfig.attributes.minWidth = 0;
|
|
63
|
-
}
|
|
64
|
-
if (!editorConfig.attributes.marginLeft) {
|
|
65
|
-
editorConfig.attributes.marginLeft = 0;
|
|
66
|
-
}
|
|
67
|
-
editorConfig.attributes.style = {
|
|
61
|
+
editorConfig.attributes.containerStyle = _Utils.default.mergeObjects({
|
|
68
62
|
minWidth: 0,
|
|
69
|
-
maxWidth: '98%'
|
|
70
|
-
|
|
63
|
+
maxWidth: '98%',
|
|
64
|
+
marginLeft: 0
|
|
65
|
+
}, editorConfig.attributes.containerStyle);
|
|
66
|
+
editorConfig.attributes.style = _Utils.default.mergeObjects({
|
|
67
|
+
minWidth: 0,
|
|
68
|
+
maxWidth: '98%',
|
|
69
|
+
marginLeft: 0
|
|
70
|
+
}, editorConfig.attributes.style);
|
|
71
71
|
editorConfig.dataBinding = columnId;
|
|
72
72
|
return editorConfig;
|
|
73
73
|
};
|
|
@@ -173,8 +173,9 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
173
173
|
let column = props.config.columns[i];
|
|
174
174
|
if (column.attributes['filterable'] === true) {
|
|
175
175
|
let param = {};
|
|
176
|
-
param.name = column.id;
|
|
177
|
-
|
|
176
|
+
param.name = column.dataBinding || column.id;
|
|
177
|
+
let val = model[column.id];
|
|
178
|
+
param.value = _Utils.default.isNull(val) || typeof val === 'string' && val.toString().trim().length === 0 ? null : val;
|
|
178
179
|
if (column.fieldType === 'DATE') {
|
|
179
180
|
if (param.value === null) {
|
|
180
181
|
param.value = new Date().getTime();
|
|
@@ -227,13 +228,7 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
227
228
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
228
229
|
"aria-label": "search",
|
|
229
230
|
onClick: submitFilter
|
|
230
|
-
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))) : !_Utils.default.isNull(numVisibleCols) ? /*#__PURE__*/_react.default.createElement(
|
|
231
|
-
className: 'filterHead',
|
|
232
|
-
style: {
|
|
233
|
-
width: 'calc(100% - ' + props.scrollWidth + 'px)'
|
|
234
|
-
},
|
|
235
|
-
ref: ref
|
|
236
|
-
}, /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))) : !_Utils.default.isNull(numVisibleCols) ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
237
232
|
style: {
|
|
238
233
|
display: 'flex',
|
|
239
234
|
flexWrap: 'wrap'
|
|
@@ -249,17 +244,14 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
249
244
|
width: column.width
|
|
250
245
|
}
|
|
251
246
|
}, !column.attributes['hidden'] ? column.attributes['filterable'] === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
252
|
-
className: !_Utils.default.isNull(props.filterWrapperClass) ? props.filterWrapperClass : 'filterWraper'
|
|
253
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
254
|
-
|
|
255
|
-
}, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
256
|
-
style: {
|
|
257
|
-
overflow: 'hidden !important'
|
|
258
|
-
}
|
|
247
|
+
className: (!_Utils.default.isNull(props.filterWrapperClass) ? props.filterWrapperClass : 'filterWraper') + ' row no-margin no-padding'
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
249
|
+
className: 'col no-margin no-padding'
|
|
259
250
|
}, /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
260
251
|
config: createFormConfig(column, column.id),
|
|
261
252
|
handle: createFormHandle(),
|
|
262
253
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
254
|
+
viewId: props.viewId,
|
|
263
255
|
keyHandler: e => {
|
|
264
256
|
if (e.key === 'Enter') {
|
|
265
257
|
submitFilter();
|
|
@@ -274,17 +266,19 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
274
266
|
fieldValidity[id] = false;
|
|
275
267
|
}
|
|
276
268
|
}
|
|
277
|
-
})), ++columnCounter === numVisibleCols
|
|
278
|
-
className: '
|
|
269
|
+
})), ++columnCounter === numVisibleCols && /*#__PURE__*/_react.default.createElement("div", {
|
|
270
|
+
className: 'col-*-*',
|
|
271
|
+
style: {
|
|
272
|
+
width: '52px',
|
|
273
|
+
marginTop: "4px"
|
|
274
|
+
}
|
|
279
275
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
280
|
-
"aria-label": "search",
|
|
281
276
|
onClick: submitFilter
|
|
282
|
-
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))
|
|
277
|
+
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
283
278
|
className: "filterWraperBlank"
|
|
284
|
-
}, ++columnCounter === numVisibleCols
|
|
285
|
-
"aria-label": "delete",
|
|
279
|
+
}, ++columnCounter === numVisibleCols && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
286
280
|
onClick: submitFilter
|
|
287
|
-
}, /*#__PURE__*/_react.default.createElement(_Search.default, null))
|
|
281
|
+
}, /*#__PURE__*/_react.default.createElement(_Search.default, null))) : null))) : null;
|
|
288
282
|
}));
|
|
289
283
|
function arePropsEqual(prev, next) {
|
|
290
284
|
return prev.config === next.config && prev.scrollWidth === next.scrollWidth;
|
|
@@ -56,16 +56,11 @@ const DataGridHeading = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.de
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
60
|
-
className: classes.tableHead,
|
|
61
|
-
style: {
|
|
62
|
-
width: "calc(100% - " + props.scrollWidth + "px)"
|
|
63
|
-
},
|
|
64
|
-
ref: ref
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
66
60
|
style: {
|
|
67
61
|
display: 'flex',
|
|
68
|
-
flexWrap: 'wrap'
|
|
62
|
+
flexWrap: 'wrap',
|
|
63
|
+
height: '56px'
|
|
69
64
|
}
|
|
70
65
|
}, props.config.selectionMode === 'MULTIPLE' ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
|
|
71
66
|
padding: "checkbox",
|
|
@@ -84,7 +79,7 @@ const DataGridHeading = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.de
|
|
|
84
79
|
handle: createColumnHandle(),
|
|
85
80
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
86
81
|
createSortHandler: createSortHandler
|
|
87
|
-
})))
|
|
82
|
+
})));
|
|
88
83
|
}));
|
|
89
84
|
DataGridHeading.propTypes = {
|
|
90
85
|
numSelected: _propTypes.default.number.isRequired,
|
|
@@ -23,6 +23,10 @@ const DocumentTemplateDesigner = /*#__PURE__*/_react.default.forwardRef((props,
|
|
|
23
23
|
_react.default.useEffect(() => {
|
|
24
24
|
props.handle.api = api();
|
|
25
25
|
});
|
|
26
|
+
_react.default.useEffect(() => {
|
|
27
|
+
let event = new _Event.default(props.handle, props.viewId, value);
|
|
28
|
+
_Observable.default.fireEvent(_EventType.default.VALUE_CHANGE, event);
|
|
29
|
+
}, [value]);
|
|
26
30
|
_react.default.useEffect(() => {
|
|
27
31
|
props.handle.api = api();
|
|
28
32
|
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
@@ -187,9 +187,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
187
187
|
for (const property of initialFormValue.properties) {
|
|
188
188
|
property.id = i++;
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
//console.log("\n\n\n\n\n\nINITITIAL VALUES : ", initialFormValue);
|
|
192
|
-
propertiesFormHandle.current.api.model = initialFormValue;
|
|
190
|
+
propertiesFormHandle.current.api.bindData(initialFormValue);
|
|
193
191
|
saveDoc().then(blob => {
|
|
194
192
|
const newFile = new File([blob], props.documentName, {
|
|
195
193
|
type: blob.type
|
|
@@ -199,10 +197,11 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
199
197
|
if (!initialFormValue) {
|
|
200
198
|
valueChangeHandler(null);
|
|
201
199
|
} else {
|
|
202
|
-
|
|
200
|
+
let newVal = validateProps(initialFormValue.properties) ? {
|
|
203
201
|
properties: initialFormValue.properties,
|
|
204
202
|
file: newFile
|
|
205
|
-
}
|
|
203
|
+
} : null;
|
|
204
|
+
valueChangeHandler(newVal);
|
|
206
205
|
}
|
|
207
206
|
}
|
|
208
207
|
contentState.changed = false;
|
|
@@ -113,10 +113,10 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
113
113
|
ref: ref,
|
|
114
114
|
style: _Utils.default.mergeStyles({}, props.config)
|
|
115
115
|
}, props.config.attributes?.label && /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
style: {
|
|
116
|
+
style: _Utils.default.mergeObjects({
|
|
117
117
|
fontSize: '20px',
|
|
118
118
|
color: '#1d253b'
|
|
119
|
-
}
|
|
119
|
+
}, props.config.attributes?.labelStyle)
|
|
120
120
|
}, label), loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
121
121
|
style: {
|
|
122
122
|
marginTop: '16px'
|
|
@@ -66,7 +66,6 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
66
66
|
key: index,
|
|
67
67
|
config: component,
|
|
68
68
|
handle: createComponentHandle(component),
|
|
69
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
70
69
|
form: props.form,
|
|
71
70
|
parentId: tabId,
|
|
72
71
|
viewId: props.viewId,
|
|
@@ -75,13 +74,11 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
75
74
|
config: component,
|
|
76
75
|
handle: createComponentHandle(component),
|
|
77
76
|
key: index,
|
|
78
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
79
77
|
viewId: props.viewId
|
|
80
78
|
}) : component.type === 'layout' ? /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
|
|
81
79
|
config: component,
|
|
82
80
|
handle: createComponentHandle(component),
|
|
83
81
|
key: index,
|
|
84
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
85
82
|
viewId: props.viewId
|
|
86
83
|
}) : /*#__PURE__*/_react.default.createElement("div", null, 'Unsupported component type ' + component.type);
|
|
87
84
|
}
|
|
@@ -85,6 +85,8 @@ const BaseField = props => {
|
|
|
85
85
|
setConfig(parsedConfig);
|
|
86
86
|
setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id, true));
|
|
87
87
|
setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id, false));
|
|
88
|
+
let event = new _Event.default(props.handle, props.viewId, null);
|
|
89
|
+
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
88
90
|
}
|
|
89
91
|
}, []);
|
|
90
92
|
_react.default.useEffect(() => {
|
|
@@ -138,8 +140,10 @@ const BaseField = props => {
|
|
|
138
140
|
}
|
|
139
141
|
if (props.config.fieldType === 'GRID' && valueObject[valueProperty]) {
|
|
140
142
|
valueObject[valueProperty].splice(0, valueObject[valueProperty].length);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
if (newValue) {
|
|
144
|
+
for (const newValueElement of newValue) {
|
|
145
|
+
valueObject[valueProperty].push(newValueElement);
|
|
146
|
+
}
|
|
143
147
|
}
|
|
144
148
|
let id = props.config.dataBinding ? props.config.dataBinding : props.config.id;
|
|
145
149
|
props.form().handleChange(!_Utils.default.isNull(props.config.dataBinding) ? props.config.dataBinding : id, newValue);
|
|
@@ -255,7 +259,7 @@ const BaseField = props => {
|
|
|
255
259
|
key: config.id,
|
|
256
260
|
style: {
|
|
257
261
|
textAlign: 'left',
|
|
258
|
-
marginLeft: props.config.attributes?.style?.marginLeft
|
|
262
|
+
marginLeft: !_Utils.default.isNull(props.config.attributes?.style?.marginLeft) ? props.config.attributes?.style?.marginLeft : '15px',
|
|
259
263
|
display: !visible || _Utils.default.getComponentAttribute(config, 'hidden', false) === true ? 'none' : 'block'
|
|
260
264
|
}
|
|
261
265
|
}, /*#__PURE__*/_react.default.createElement("span", null, props.children({
|
|
@@ -23,6 +23,13 @@
|
|
|
23
23
|
width: 100%;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
.lookup-field-input input {
|
|
27
|
+
width: calc(100% - 64px);
|
|
28
|
+
overflow: hidden !important;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
}
|
|
32
|
+
|
|
26
33
|
@media only screen and (max-width: 600px) {
|
|
27
34
|
.defaultForm {
|
|
28
35
|
width: 100%;
|
|
@@ -46,6 +46,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
46
46
|
const containerErrorCallback = _react.default.useRef();
|
|
47
47
|
const [sectionHandles] = _react.default.useState({});
|
|
48
48
|
const [fieldParentErrors] = _react.default.useState({});
|
|
49
|
+
const [visible, setVisible] = _react.default.useState(true);
|
|
49
50
|
const loadingRef = _react.default.useRef(true);
|
|
50
51
|
let sectionCounter = 0;
|
|
51
52
|
const api = () => {
|
|
@@ -183,6 +184,9 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
183
184
|
sectionHandle.api.refresh();
|
|
184
185
|
}
|
|
185
186
|
}
|
|
187
|
+
if (!_Utils.default.isNull(props.config.visible)) {
|
|
188
|
+
setVisible(_Utils.default.evaluateBooleanExpression(props.config.visible, props.config.id));
|
|
189
|
+
}
|
|
186
190
|
}
|
|
187
191
|
};
|
|
188
192
|
};
|
|
@@ -403,9 +407,6 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
403
407
|
}
|
|
404
408
|
function doBindData(data) {
|
|
405
409
|
if (!_Utils.default.isNull(data)) {
|
|
406
|
-
if (!_Utils.default.isNull(data.map)) {
|
|
407
|
-
data = data.map;
|
|
408
|
-
}
|
|
409
410
|
for (const key of Object.keys(data)) {
|
|
410
411
|
let field = getField(key);
|
|
411
412
|
if (!_Utils.default.isNull(field)) {
|
|
@@ -430,9 +431,10 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
430
431
|
if (!_Utils.default.isNull(props.dataArrivedHandler)) {
|
|
431
432
|
props.dataArrivedHandler(parsedValues);
|
|
432
433
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
|
|
435
|
+
//if (!Utils.isNull(props.valueChangeHandler)) {
|
|
436
|
+
//props.valueChangeHandler(parsedValues);
|
|
437
|
+
//}
|
|
436
438
|
}
|
|
437
439
|
_react.default.useEffect(() => {
|
|
438
440
|
if (!_Utils.default.isNull(props.values)) {
|
|
@@ -605,7 +607,7 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
605
607
|
}));
|
|
606
608
|
}));
|
|
607
609
|
}
|
|
608
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
610
|
+
return visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
609
611
|
className: props.className,
|
|
610
612
|
ref: ref,
|
|
611
613
|
style: props.className === 'defaultForm' ? _Utils.default.mergeStyles({
|
|
@@ -108,7 +108,7 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
|
|
|
108
108
|
disabled: true,
|
|
109
109
|
label: !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['label']) ? props.config.attributes['label'] : null,
|
|
110
110
|
value: base.value?.__oui_label || base.value?.dataRecordDescription || defaultValue,
|
|
111
|
-
className: props.className,
|
|
111
|
+
className: props.className || 'lookup-field-input',
|
|
112
112
|
error: base.hasError,
|
|
113
113
|
helperText: base.errorMessage,
|
|
114
114
|
size: "small",
|
|
@@ -135,7 +135,7 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
|
|
|
135
135
|
}
|
|
136
136
|
}, /*#__PURE__*/_react.default.createElement(_DialogTitle.default, {
|
|
137
137
|
id: "alert-dialog-title"
|
|
138
|
-
}, !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['
|
|
138
|
+
}, !_Utils.default.isNull(props.config.attributes) && !_Utils.default.isNull(props.config.attributes['pickerLabel']) ? props.config.attributes['pickerLabel'] : props.config.attributes['label']), /*#__PURE__*/_react.default.createElement("div", {
|
|
139
139
|
style: {
|
|
140
140
|
maxHeight: "calc(38vh - 52px)",
|
|
141
141
|
overflow: "auto",
|
|
@@ -55,8 +55,7 @@ const TransferListComponent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_re
|
|
|
55
55
|
if (!_Utils.default.isNull(data) && data[selectionDataBinding].records.length > 0) {
|
|
56
56
|
let initialValues = [];
|
|
57
57
|
for (const record of data[selectionDataBinding].records) {
|
|
58
|
-
let row =
|
|
59
|
-
row.id = record.id;
|
|
58
|
+
let row = JSON.parse(JSON.stringify(record));
|
|
60
59
|
initialValues.push(row);
|
|
61
60
|
}
|
|
62
61
|
updateValue(initialValues);
|
|
@@ -17,6 +17,7 @@ var _reactPromiseTracker = require("react-promise-tracker");
|
|
|
17
17
|
var _Event = _interopRequireDefault(require("../../event/Event"));
|
|
18
18
|
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
19
19
|
var _EventType = _interopRequireDefault(require("../../event/EventType"));
|
|
20
|
+
var _noimage = _interopRequireDefault(require("./noimage.png"));
|
|
20
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
22
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
22
23
|
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
@@ -206,10 +207,6 @@ const DocumentUpload = exports.DocumentUpload = /*#__PURE__*/_react.default.memo
|
|
|
206
207
|
};
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
|
-
let defaultImage = null;
|
|
210
|
-
if (props.style === 'IMAGE') {
|
|
211
|
-
defaultImage = props.config.attributes['defaultImage'];
|
|
212
|
-
}
|
|
213
210
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
214
211
|
accept: props.style === 'IMAGE' ? "image/jpeg,image/gif,image/png,image/x-eps" : "image/jpeg,image/gif,image/png,application/pdf,image/x-eps",
|
|
215
212
|
className: classes.input,
|
|
@@ -234,7 +231,7 @@ const DocumentUpload = exports.DocumentUpload = /*#__PURE__*/_react.default.memo
|
|
|
234
231
|
backgroundColor: 'transparent',
|
|
235
232
|
border: base.hasError ? "1px solid #f44336" : null,
|
|
236
233
|
color: base.hasError ? "#f44336" : null,
|
|
237
|
-
backgroundImage: !_Utils.default.isNull(viewerFile) ? `url(${viewerFile.base64})` : !_Utils.default.isNull(base.value) ? `url(${location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + base.value.documentRepositoryId + '?access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken")})` : `url(${
|
|
234
|
+
backgroundImage: !_Utils.default.isNull(viewerFile) ? `url(${viewerFile.base64})` : !_Utils.default.isNull(base.value) ? `url(${location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + base.value.documentRepositoryId + '?access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken")})` : `url(${_noimage.default})`
|
|
238
235
|
}
|
|
239
236
|
})), base.hasError ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
240
237
|
style: {
|
|
@@ -297,6 +297,6 @@ const SignatureInputProps = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
297
297
|
disabled: value === null,
|
|
298
298
|
onClick: () => handleDelete(),
|
|
299
299
|
id: "signPaletteButton"
|
|
300
|
-
}, "DELETE ITEM")));
|
|
300
|
+
}, "DELETE SELECTED ITEM")));
|
|
301
301
|
}));
|
|
302
302
|
var _default = exports.default = SignatureInputProps;
|
|
@@ -515,7 +515,7 @@ const SignatureTemplateDesigner = /*#__PURE__*/_react.default.memo( /*#__PURE__*
|
|
|
515
515
|
classes: {
|
|
516
516
|
'label': 'paletteButtonLabel'
|
|
517
517
|
}
|
|
518
|
-
}, "Clear"), /*#__PURE__*/_react.default.createElement("div", {
|
|
518
|
+
}, "Clear all"), /*#__PURE__*/_react.default.createElement("div", {
|
|
519
519
|
className: `${classes.propertyWindow}`
|
|
520
520
|
}, /*#__PURE__*/_react.default.createElement(_SignatureInputProps.default, {
|
|
521
521
|
value: selectedInputBoxValue,
|
package/dist/event/Observable.js
CHANGED
|
@@ -178,7 +178,6 @@ class Observable {
|
|
|
178
178
|
if (component && component.api && component.api.id) {
|
|
179
179
|
let index;
|
|
180
180
|
while ((index = this.subscriptions.findIndex(s => s.subscriber === component.api.id)) !== -1) {
|
|
181
|
-
console.log(index + " : ", this.subscriptions[index]);
|
|
182
181
|
this.subscriptions.splice(index, 1);
|
|
183
182
|
}
|
|
184
183
|
if (!_Utils.default.isNull(this.systemGeneratedSubscriptions)) {
|