@agilemotion/oui-react-js 1.7.7 → 1.7.9
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 +9 -7
- package/dist/RestService.js +5 -1
- package/dist/RestUtils.js +5 -1
- package/dist/components/Button.js +2 -6
- package/dist/components/DataGrid.js +51 -17
- package/dist/components/DocumentTemplateDesignerComponent.js +0 -1
- package/dist/components/ElementResizeHandler.js +0 -3
- package/dist/components/TableCellContent.js +40 -85
- package/dist/components/form/BaseField.js +8 -0
- package/dist/components/form/Form.js +13 -6
- package/dist/components/form/GridField.js +4 -6
- package/dist/components/form/LookupField.js +3 -0
- package/dist/components/form/Section.js +5 -4
- package/dist/components/layout/Layout.js +4 -5
- package/dist/components/media/TrainingRoom.js +1 -1
- package/dist/components/menu/MenuButton.js +1 -1
- package/dist/components/menu/MenuItem.js +1 -1
- package/dist/components/signatures/ResponsiveTable.js +1 -4
- package/package.json +1 -1
|
@@ -336,7 +336,7 @@ class ApplicationManager {
|
|
|
336
336
|
if (!view.popUp && !view.window) {
|
|
337
337
|
let topView = this.getTopAnchorView();
|
|
338
338
|
if (topView) {
|
|
339
|
-
this.closeView(topView?.config.id);
|
|
339
|
+
this.closeView(topView?.config.id, forward);
|
|
340
340
|
}
|
|
341
341
|
} else {
|
|
342
342
|
if (view.popUp) {
|
|
@@ -345,7 +345,7 @@ class ApplicationManager {
|
|
|
345
345
|
if (view.window) {
|
|
346
346
|
let topView = this.getTopWindowView();
|
|
347
347
|
if (topView) {
|
|
348
|
-
this.closeView(topView?.config.id);
|
|
348
|
+
this.closeView(topView?.config.id, forward);
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -358,11 +358,13 @@ class ApplicationManager {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
if (forward || view.parent) {
|
|
362
|
+
let historyElement = {};
|
|
363
|
+
historyElement.viewId = view.config.id;
|
|
364
|
+
historyElement.parent = view.parent;
|
|
365
|
+
historyElement.path = path;
|
|
366
|
+
this.navHistory.push(historyElement);
|
|
367
|
+
}
|
|
366
368
|
this.views.push(view);
|
|
367
369
|
if (view.window) {
|
|
368
370
|
_Observable.default.emitContextChangeEvent(applicationContext, {
|
package/dist/RestService.js
CHANGED
|
@@ -68,7 +68,11 @@ class RestService {
|
|
|
68
68
|
}
|
|
69
69
|
if (httpParameterType === 'PATH_VARIABLE') {
|
|
70
70
|
if (!_Utils.default.isNull(parameterValue)) {
|
|
71
|
-
|
|
71
|
+
if (parameter.encode) {
|
|
72
|
+
pathParameters += '/' + (typeof parameterValue.value === 'object' ? encodeURIComponent(JSON.stringify(parameterValue.value)) : parameterValue.instanceType === 'TypedValue' ? encodeURIComponent(parameterValue.value) : encodeURIComponent(parameterValue));
|
|
73
|
+
} else {
|
|
74
|
+
pathParameters += '/' + (typeof parameterValue.value === 'object' ? JSON.stringify(parameterValue.value) : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue);
|
|
75
|
+
}
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
if (httpParameterType === 'HEADER') {
|
package/dist/RestUtils.js
CHANGED
|
@@ -69,7 +69,11 @@ class RestUtils {
|
|
|
69
69
|
}
|
|
70
70
|
if (httpParameterType === 'PATH_VARIABLE') {
|
|
71
71
|
if (!_Utils.default.isNull(parameterValue)) {
|
|
72
|
-
|
|
72
|
+
if (parameter.encode) {
|
|
73
|
+
pathParameters += '/' + (typeof parameterValue.value === 'object' ? encodeURIComponent(JSON.stringify(parameterValue.value)) : parameterValue.instanceType === 'TypedValue' ? encodeURIComponent(parameterValue.value) : encodeURIComponent(parameterValue));
|
|
74
|
+
} else {
|
|
75
|
+
pathParameters += '/' + (typeof parameterValue.value === 'object' ? JSON.stringify(parameterValue.value) : parameterValue.instanceType === 'TypedValue' ? parameterValue.value : parameterValue);
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
if (httpParameterType === 'HEADER') {
|
|
@@ -36,11 +36,6 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
36
36
|
_react.default.useEffect(() => {
|
|
37
37
|
props.handle.api = api();
|
|
38
38
|
});
|
|
39
|
-
_react.default.useEffect(() => {
|
|
40
|
-
return () => {
|
|
41
|
-
props.handle.api = null;
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
39
|
_react.default.useEffect(() => {
|
|
45
40
|
if (config) {
|
|
46
41
|
props.handle.api = api();
|
|
@@ -58,6 +53,7 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
58
53
|
} : props.config);
|
|
59
54
|
return () => {
|
|
60
55
|
_Observable.default.clearComponentEventListeners(props.handle);
|
|
56
|
+
props.handle.api = null;
|
|
61
57
|
};
|
|
62
58
|
}, []);
|
|
63
59
|
const handleClick = e => {
|
|
@@ -68,7 +64,7 @@ const Button = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
68
64
|
const api = () => {
|
|
69
65
|
return {
|
|
70
66
|
get id() {
|
|
71
|
-
return
|
|
67
|
+
return props.tableRow ? props.config.id + '_' + props.tableRow.id?.replaceAll('-', '') : props.config.id;
|
|
72
68
|
},
|
|
73
69
|
get tableRow() {
|
|
74
70
|
return props.tableRow;
|
|
@@ -127,7 +127,8 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
127
127
|
const [cells] = _react.default.useState([]);
|
|
128
128
|
const [headingHandle] = _react.default.useState({});
|
|
129
129
|
const [filterHandle] = _react.default.useState({});
|
|
130
|
-
const [columnLayoutHandles] = _react.default.useState(
|
|
130
|
+
const [columnLayoutHandles] = _react.default.useState({});
|
|
131
|
+
const [editorHandles] = _react.default.useState({});
|
|
131
132
|
const rowCount = _react.default.useRef(-1);
|
|
132
133
|
const rowsRef = _react.default.useRef([]);
|
|
133
134
|
let noteKey = 0;
|
|
@@ -185,6 +186,19 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
}
|
|
189
|
+
properties = Object.getOwnPropertyNames(editorHandles);
|
|
190
|
+
for (const property of properties) {
|
|
191
|
+
let editorHandle = editorHandles[property];
|
|
192
|
+
children.push(editorHandle);
|
|
193
|
+
if (!_Utils.default.isNull(editorHandle.api) && !_Utils.default.isNull(editorHandle.api.getChildren)) {
|
|
194
|
+
let moreChildren = editorHandle.api.getChildren();
|
|
195
|
+
if (!_Utils.default.isNull(moreChildren)) {
|
|
196
|
+
for (const child of moreChildren) {
|
|
197
|
+
children.push(child);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
188
202
|
return children;
|
|
189
203
|
},
|
|
190
204
|
loadData: actionConfig => {
|
|
@@ -249,6 +263,13 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
249
263
|
}
|
|
250
264
|
};
|
|
251
265
|
};
|
|
266
|
+
const formApi = () => {
|
|
267
|
+
return {
|
|
268
|
+
get id() {
|
|
269
|
+
return props.config.id + "_edit_form";
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
};
|
|
252
273
|
function updateScrollBarPadding() {
|
|
253
274
|
var tbody = document.getElementById('mainTableBody');
|
|
254
275
|
if (tbody !== null && typeof tbody !== 'undefined') {
|
|
@@ -345,15 +366,20 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
345
366
|
setPage(0);
|
|
346
367
|
}
|
|
347
368
|
const observeRow = row => {
|
|
348
|
-
let observableRow =
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
369
|
+
/*let observableRow = observable(row);
|
|
370
|
+
observe(
|
|
371
|
+
observableRow,
|
|
372
|
+
change => {
|
|
373
|
+
let newValue = change.newValue;
|
|
374
|
+
let oldValue = change.oldValue;
|
|
375
|
+
if (newValue !== oldValue) {
|
|
376
|
+
refreshCell(row.id, change.name);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
return observableRow;*/
|
|
381
|
+
|
|
382
|
+
return row;
|
|
357
383
|
};
|
|
358
384
|
function processData(data, conf) {
|
|
359
385
|
setTotalNumberOfRows(data.totalNumberOfRecords ? data.totalNumberOfRecords : data.records.length);
|
|
@@ -620,6 +646,14 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
620
646
|
}
|
|
621
647
|
return columnLayoutHandles[column.id + index];
|
|
622
648
|
}
|
|
649
|
+
function createCellEditorHandle(column) {
|
|
650
|
+
if (_Utils.default.isNull(editorHandles[column.id + "_editor"])) {
|
|
651
|
+
let handle = {};
|
|
652
|
+
editorHandles[column.id + "_editor"] = handle;
|
|
653
|
+
return handle;
|
|
654
|
+
}
|
|
655
|
+
return editorHandles[column.id + "_editor"];
|
|
656
|
+
}
|
|
623
657
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
624
658
|
ref: ref,
|
|
625
659
|
style: _Utils.default.isNull(props.hasBorder) || props.hasBorder === true ? _Utils.default.mergeStyles({
|
|
@@ -734,11 +768,12 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
734
768
|
},
|
|
735
769
|
align: "left",
|
|
736
770
|
className: isItemSelected && !_Utils.default.isNull(props.form) && !_Utils.default.isNull(column.editor) ? 'editCell' : null,
|
|
737
|
-
key: column.id
|
|
771
|
+
key: index + "_" + column.id
|
|
738
772
|
}, /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
|
|
739
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
740
773
|
handle: createColumnLayoutHandle(column, index),
|
|
741
|
-
|
|
774
|
+
key: index + "_" + column.id + "_layout",
|
|
775
|
+
tableRow: rows.find(r => r.id === row.id),
|
|
776
|
+
rowIndex: index,
|
|
742
777
|
config: JSON.parse(JSON.stringify(props.config.columns.find(col => col.id === column.id).layout)),
|
|
743
778
|
viewId: props.viewId,
|
|
744
779
|
parent: false
|
|
@@ -747,13 +782,12 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo( /*#__PURE_
|
|
|
747
782
|
width: column.attributes.width ? column.attributes.width : 100 / config.columns.length + '%'
|
|
748
783
|
},
|
|
749
784
|
align: "left",
|
|
750
|
-
className: isItemSelected && !_Utils.default.isNull(
|
|
751
|
-
key: column.id,
|
|
785
|
+
className: isItemSelected && !_Utils.default.isNull(column.editor) ? 'editCell' : null,
|
|
786
|
+
key: index + "_" + column.id,
|
|
752
787
|
onClick: event => handleCellClick(event, row.id, column)
|
|
753
788
|
}, /*#__PURE__*/_react.default.createElement(_TableCellContent.default, {
|
|
789
|
+
handle: createCellEditorHandle(column),
|
|
754
790
|
viewId: props.viewId,
|
|
755
|
-
form: props.form,
|
|
756
|
-
formValues: props.formValues,
|
|
757
791
|
editor: column.editor,
|
|
758
792
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
759
793
|
refCallback: createCell,
|
|
@@ -396,7 +396,6 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
396
396
|
toolbarItems: items,
|
|
397
397
|
toolbarClick: onToolbarClick,
|
|
398
398
|
contentChange: onContentChange,
|
|
399
|
-
enableTrackChanges: false,
|
|
400
399
|
serviceUrl: "https://services.syncfusion.com/react/production/api/documenteditor/",
|
|
401
400
|
enableToolbar: true
|
|
402
401
|
})));
|
|
@@ -32,16 +32,13 @@ class ElementResizeHandler {
|
|
|
32
32
|
this.ghostPane.style.opacity = 0;
|
|
33
33
|
};
|
|
34
34
|
onTouchDown = e => {
|
|
35
|
-
alert(1);
|
|
36
35
|
this.onDown(e.touches[0]);
|
|
37
36
|
e.preventDefault();
|
|
38
37
|
};
|
|
39
38
|
onTouchMove = e => {
|
|
40
|
-
alert(1);
|
|
41
39
|
this.onMove(e.touches[0]);
|
|
42
40
|
};
|
|
43
41
|
onTouchEnd = e => {
|
|
44
|
-
alert(1);
|
|
45
42
|
if (e.touches.length === 0) {
|
|
46
43
|
this.onUp(e.changedTouches[0]);
|
|
47
44
|
}
|
|
@@ -5,19 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _TextField = _interopRequireDefault(require("./form/TextField"));
|
|
9
|
-
var _DatePicker = _interopRequireDefault(require("./form/DatePicker"));
|
|
10
|
-
var _SelectItem = _interopRequireDefault(require("./form/SelectItem"));
|
|
11
8
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
12
|
-
var _LookupField = _interopRequireDefault(require("./form/LookupField"));
|
|
13
9
|
var _Error = _interopRequireDefault(require("@material-ui/icons/Error"));
|
|
14
10
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
15
|
-
var
|
|
16
|
-
var _AutoComplete = _interopRequireDefault(require("./form/AutoComplete"));
|
|
11
|
+
var _Form = _interopRequireDefault(require("./form/Form"));
|
|
17
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
13
|
const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
19
14
|
const [contentType] = _react.default.useState(props.contentType);
|
|
20
15
|
const [refresher, setRefresher] = _react.default.useState(true);
|
|
16
|
+
const editorValue = _react.default.useRef(null);
|
|
21
17
|
const validate = value => {
|
|
22
18
|
let validator = props.validator;
|
|
23
19
|
let errors = props.row.errors;
|
|
@@ -33,7 +29,9 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
33
29
|
let nullableExpression = validator.nullable.replace(/\[#i]/g, `[${props.row.index}]`);
|
|
34
30
|
required = !_Utils.default.evaluateBooleanExpression(nullableExpression, props.dataBinding);
|
|
35
31
|
}
|
|
36
|
-
let
|
|
32
|
+
let formValue = {};
|
|
33
|
+
formValue[props.editor.id] = value;
|
|
34
|
+
let validation = _Utils.default.validateField(props.dataBinding, required, formValue, value, validator);
|
|
37
35
|
if (!validation.valid) {
|
|
38
36
|
let error = {};
|
|
39
37
|
error.column = props.dataBinding;
|
|
@@ -59,6 +57,11 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
59
57
|
});
|
|
60
58
|
}
|
|
61
59
|
}, [ref.current]);
|
|
60
|
+
_react.default.useEffect(() => {
|
|
61
|
+
if (props.editor && props.row) {
|
|
62
|
+
editorValue.current = props.row[props.dataBinding];
|
|
63
|
+
}
|
|
64
|
+
}, [props.row, props.editor]);
|
|
62
65
|
_react.default.useEffect(() => {
|
|
63
66
|
if (!_Utils.default.isNull(props.editor)) {
|
|
64
67
|
props.editor.id = props.editor.id.replace('.', '_');
|
|
@@ -115,84 +118,36 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
115
118
|
return getStaticDisplayValue();
|
|
116
119
|
} else {
|
|
117
120
|
if (!_Utils.default.isNull(props.editor)) {
|
|
118
|
-
props.formValues[props.editor.id] = props.row[props.dataBinding];
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return /*#__PURE__*/_react.default.createElement(_SelectItem.default, {
|
|
149
|
-
valueChangeHandler: valueChangeHandler,
|
|
150
|
-
config: props.editor,
|
|
151
|
-
form: props.form,
|
|
152
|
-
handle: {},
|
|
153
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
154
|
-
bindValueToForm: false,
|
|
155
|
-
values: props.formValues,
|
|
156
|
-
value: objectReference,
|
|
157
|
-
viewId: props.viewId
|
|
158
|
-
});
|
|
159
|
-
} else if (props.editor.fieldType === 'LOOKUP') {
|
|
160
|
-
let data = props.row[props.dataBinding];
|
|
161
|
-
if (!_Utils.default.isNull(data)) {
|
|
162
|
-
data.toString = () => {
|
|
163
|
-
return data.label;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
return /*#__PURE__*/_react.default.createElement(_LookupField.default, {
|
|
167
|
-
valueChangeHandler: valueChangeHandler,
|
|
168
|
-
config: props.editor,
|
|
169
|
-
form: props.form,
|
|
170
|
-
handle: {},
|
|
171
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
172
|
-
bindValueToForm: false,
|
|
173
|
-
values: props.formValues,
|
|
174
|
-
value: data,
|
|
175
|
-
viewId: props.viewId
|
|
176
|
-
});
|
|
177
|
-
} else if (props.editor.fieldType === 'AUTO_COMPLETE') {
|
|
178
|
-
let data = props.row[props.dataBinding];
|
|
179
|
-
if (!_Utils.default.isNull(data)) {
|
|
180
|
-
data.toString = () => {
|
|
181
|
-
return "12345";
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
return /*#__PURE__*/_react.default.createElement(_AutoComplete.default, {
|
|
185
|
-
valueChangeHandler: valueChangeHandler,
|
|
186
|
-
config: props.editor,
|
|
187
|
-
form: props.form,
|
|
188
|
-
handle: {},
|
|
189
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
190
|
-
bindValueToForm: false,
|
|
191
|
-
values: props.formValues,
|
|
192
|
-
value: data,
|
|
193
|
-
viewId: props.viewId
|
|
194
|
-
});
|
|
195
|
-
}
|
|
121
|
+
//props.formValues[props.editor.id] = props.row[props.dataBinding];
|
|
122
|
+
|
|
123
|
+
let formValue = {};
|
|
124
|
+
formValue[props.editor.id] = editorValue.current;
|
|
125
|
+
let formConfig = {
|
|
126
|
+
type: "form",
|
|
127
|
+
id: props.editor.id + "_form",
|
|
128
|
+
sections: [{
|
|
129
|
+
type: "formSection",
|
|
130
|
+
components: [{
|
|
131
|
+
type: "fieldSet",
|
|
132
|
+
attributes: {
|
|
133
|
+
style: {
|
|
134
|
+
"width": "100%"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
fields: [props.editor]
|
|
138
|
+
}]
|
|
139
|
+
}]
|
|
140
|
+
};
|
|
141
|
+
return /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
142
|
+
config: formConfig,
|
|
143
|
+
handle: props.handle,
|
|
144
|
+
values: formValue,
|
|
145
|
+
valueChangeHandler: value => {
|
|
146
|
+
editorValue.current = value[props.editor.id];
|
|
147
|
+
valueChangeHandler(value[props.editor.id]);
|
|
148
|
+
},
|
|
149
|
+
viewId: props.viewId
|
|
150
|
+
});
|
|
196
151
|
} else {
|
|
197
152
|
return getStaticDisplayValue();
|
|
198
153
|
}
|
|
@@ -136,6 +136,14 @@ const BaseField = props => {
|
|
|
136
136
|
valueChanged = JSON.stringify(valueRef.current) !== JSON.stringify(newValue);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
+
if (props.config.fieldType === 'GRID' && valueObject[valueProperty]) {
|
|
140
|
+
valueObject[valueProperty].splice(0, valueObject[valueProperty].length);
|
|
141
|
+
for (const newValueElement of newValue) {
|
|
142
|
+
valueObject[valueProperty].push(newValueElement);
|
|
143
|
+
}
|
|
144
|
+
let id = props.config.dataBinding ? props.config.dataBinding : props.config.id;
|
|
145
|
+
props.form().handleChange(!_Utils.default.isNull(props.config.dataBinding) ? props.config.dataBinding : id, newValue);
|
|
146
|
+
}
|
|
139
147
|
if (valueChanged) {
|
|
140
148
|
let id = props.config.dataBinding ? props.config.dataBinding : props.config.id;
|
|
141
149
|
_ApplicationManager.default.enableFormMarkers(true);
|
|
@@ -113,11 +113,16 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
113
113
|
return values.current;
|
|
114
114
|
},
|
|
115
115
|
set model(model) {
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
if (_Utils.default.isNull(model)) {
|
|
117
|
+
parseValues({});
|
|
118
|
+
setMasterValues({});
|
|
119
|
+
} else {
|
|
120
|
+
parseValues(transformDataObject(model));
|
|
121
|
+
setMasterValues(model);
|
|
122
|
+
}
|
|
118
123
|
},
|
|
119
124
|
get value() {
|
|
120
|
-
if (loadingRef.current === false) {
|
|
125
|
+
if (loadingRef.current === false && values.current) {
|
|
121
126
|
let data = null;
|
|
122
127
|
let valid = true;
|
|
123
128
|
data = {};
|
|
@@ -222,8 +227,8 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
222
227
|
if (!_Utils.default.isNull(result)) {
|
|
223
228
|
parseValues(transformDataObject(result));
|
|
224
229
|
setMasterValues(result);
|
|
225
|
-
loadingRef.current = false;
|
|
226
230
|
}
|
|
231
|
+
loadingRef.current = false;
|
|
227
232
|
} catch (e) {
|
|
228
233
|
console.error(e);
|
|
229
234
|
}
|
|
@@ -241,8 +246,10 @@ const Form = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
241
246
|
eventConfig.service = service;
|
|
242
247
|
// TODO : Implement the invalid paramenter callback
|
|
243
248
|
_ServiceCallActionHandler.default.execute(eventConfig, null, null, props.viewId, data => {
|
|
244
|
-
|
|
245
|
-
|
|
249
|
+
if (data) {
|
|
250
|
+
parseValues(transformDataObject(data));
|
|
251
|
+
setMasterValues(data);
|
|
252
|
+
}
|
|
246
253
|
loadingRef.current = false;
|
|
247
254
|
}, () => {}, parameter => {
|
|
248
255
|
loadingRef.current = false;
|
|
@@ -130,7 +130,6 @@ const GridFieldWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
130
130
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
131
131
|
viewId: props.viewId,
|
|
132
132
|
rows: rows,
|
|
133
|
-
form: props.form,
|
|
134
133
|
formValues: props.values,
|
|
135
134
|
valueChangeHandler: rows => {
|
|
136
135
|
let value = null;
|
|
@@ -157,7 +156,7 @@ const GridFieldWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
157
156
|
const GridField = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
158
157
|
const [gridHandle] = _react.default.useState({});
|
|
159
158
|
const [toolHandle] = _react.default.useState(!_Utils.default.isNull(props.config.toolstrip) ? {} : null);
|
|
160
|
-
const
|
|
159
|
+
const initialValueSet = _react.default.useRef(false);
|
|
161
160
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
162
161
|
handle: props.handle,
|
|
163
162
|
getChildren: () => {
|
|
@@ -181,7 +180,6 @@ const GridField = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
181
180
|
let objectArray = value;
|
|
182
181
|
let val = [];
|
|
183
182
|
if (objectArray.length > 0) {
|
|
184
|
-
let type = objectArray[0].type;
|
|
185
183
|
let nullIdRecords = 1;
|
|
186
184
|
for (const objectArrayElement of objectArray) {
|
|
187
185
|
if (inbound && _Utils.default.isNull(objectArrayElement.id)) {
|
|
@@ -193,7 +191,7 @@ const GridField = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
193
191
|
val.push(objectArrayElement);
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
|
-
|
|
194
|
+
initialValueSet.current = false;
|
|
197
195
|
return val;
|
|
198
196
|
}
|
|
199
197
|
return value;
|
|
@@ -203,9 +201,9 @@ const GridField = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
203
201
|
ref: ref,
|
|
204
202
|
gridHandle: gridHandle,
|
|
205
203
|
toolstripHandle: toolHandle,
|
|
206
|
-
initialValueSet: initialValueSet,
|
|
204
|
+
initialValueSet: initialValueSet.current,
|
|
207
205
|
loadCallback: () => {
|
|
208
|
-
|
|
206
|
+
initialValueSet.current = true;
|
|
209
207
|
},
|
|
210
208
|
base: base
|
|
211
209
|
}, props)));
|
|
@@ -155,6 +155,9 @@ const LookupField = exports.LookupField = /*#__PURE__*/_react.default.memo( /*#_
|
|
|
155
155
|
},
|
|
156
156
|
valueParser: (value, inbound) => {
|
|
157
157
|
if (!value || !value.id) {
|
|
158
|
+
if (value) {
|
|
159
|
+
console.warn("LOOKUP VALUE WITH NO ID FOR : " + props.config.id, value);
|
|
160
|
+
}
|
|
158
161
|
return null;
|
|
159
162
|
}
|
|
160
163
|
if (!_Utils.default.isNull(value)) {
|
|
@@ -113,17 +113,18 @@ const Section = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
|
|
|
113
113
|
function render(section) {
|
|
114
114
|
let counter = 0;
|
|
115
115
|
return _Utils.default.isNull(section.components) || section.components.length === 0 ? /*#__PURE__*/_react.default.createElement("div", null, " Error: A form section must have components") : /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
style: {
|
|
116
|
+
style: _Utils.default.mergeStyles({
|
|
117
117
|
overflow: 'hidden'
|
|
118
|
-
}
|
|
118
|
+
}, props.config),
|
|
119
|
+
className: "oui-form-section"
|
|
119
120
|
}, fieldGrid.rows.map((row, index) => {
|
|
120
121
|
return /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
121
122
|
container: true,
|
|
122
|
-
style:
|
|
123
|
+
style: {
|
|
123
124
|
margin: '0',
|
|
124
125
|
textAlign: 'left',
|
|
125
126
|
width: '100%'
|
|
126
|
-
},
|
|
127
|
+
},
|
|
127
128
|
key: index
|
|
128
129
|
}, row.fields.map(field => {
|
|
129
130
|
if (_Utils.default.isNull(field.id)) {
|
|
@@ -31,7 +31,7 @@ var _ChatRoomWrapper = _interopRequireDefault(require("../media/chat/ChatRoomWra
|
|
|
31
31
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
32
32
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
33
33
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
34
|
-
const Layout =
|
|
34
|
+
const Layout = props => {
|
|
35
35
|
const [componentHandles] = _react.default.useState({});
|
|
36
36
|
const [loadedComponents] = _react.default.useState([]);
|
|
37
37
|
const [visible, setVisible] = _react.default.useState(true);
|
|
@@ -278,12 +278,10 @@ const Layout = exports.Layout = /*#__PURE__*/_react.default.forwardRef((props, r
|
|
|
278
278
|
setVisible(val);
|
|
279
279
|
},
|
|
280
280
|
getChildren: () => {
|
|
281
|
-
//console.log("\n\n\n\nGETTING LAYOUT KIDS : ", componentHandles);
|
|
282
281
|
let children = [];
|
|
283
282
|
let properties = Object.getOwnPropertyNames(componentHandles);
|
|
284
283
|
for (const property of properties) {
|
|
285
284
|
let componentHandle = componentHandles[property];
|
|
286
|
-
//console.log(property, componentHandle);
|
|
287
285
|
children.push(componentHandle);
|
|
288
286
|
if (!_Utils.default.isNull(componentHandle.api) && !_Utils.default.isNull(componentHandle.api.getChildren)) {
|
|
289
287
|
let moreChildren = componentHandle.api.getChildren();
|
|
@@ -364,9 +362,10 @@ const Layout = exports.Layout = /*#__PURE__*/_react.default.forwardRef((props, r
|
|
|
364
362
|
}, renderComponent(component, null));
|
|
365
363
|
}));
|
|
366
364
|
}
|
|
367
|
-
return
|
|
365
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
368
366
|
id: props.config.id,
|
|
369
367
|
style: getLayoutStyle(props.config, 'transparent'),
|
|
370
368
|
className: `${_Utils.default.getComponentAttribute(props.config, 'className', '') + (props.config.orientation === 'HORIZONTAL' ? ' row' : '')}`
|
|
371
369
|
}, render(props.config));
|
|
372
|
-
}
|
|
370
|
+
};
|
|
371
|
+
exports.Layout = Layout;
|
|
@@ -106,7 +106,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
|
|
|
106
106
|
break;
|
|
107
107
|
case _VCEventType.VCEventType.CONSUMER_TRANSPORT_FAILED:
|
|
108
108
|
hangUp();
|
|
109
|
-
|
|
109
|
+
console.log('Connection error - Please check your network connection and re-join the meeting');
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -78,7 +78,7 @@ const MenuButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
78
78
|
const api = () => {
|
|
79
79
|
return {
|
|
80
80
|
get id() {
|
|
81
|
-
return
|
|
81
|
+
return props.tableRow ? props.config.id + '_' + props.tableRow.id?.replaceAll('-', '') : props.config.id;
|
|
82
82
|
},
|
|
83
83
|
get tableRow() {
|
|
84
84
|
return props.tableRow;
|
|
@@ -46,7 +46,7 @@ const MenuItem = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
46
46
|
const api = () => {
|
|
47
47
|
return {
|
|
48
48
|
get id() {
|
|
49
|
-
return
|
|
49
|
+
return props.tableRow ? props.config.id + '_' + props.tableRow.id?.replaceAll('-', '') : props.config.id;
|
|
50
50
|
},
|
|
51
51
|
get tableRow() {
|
|
52
52
|
return props.tableRow;
|
|
@@ -191,7 +191,6 @@ function EnhancedTable(props) {
|
|
|
191
191
|
if (fetchEnabled && !utils.isNull(props.searchParameters) && !(utils.isNull(props.dataUrl) || utils.isNull(props.dataService))) {
|
|
192
192
|
setSearchParameters(props.searchParameters);
|
|
193
193
|
if (!utils.isNull(props.dataService)) {
|
|
194
|
-
alert(props.dataService);
|
|
195
194
|
(0, _RestUtils.invokeRpc)(props.dataService, null, "", result => {
|
|
196
195
|
setRows(result.data.records);
|
|
197
196
|
setTotalNumberOfRows(result.data.totalNumberOfRecords);
|
|
@@ -199,9 +198,7 @@ function EnhancedTable(props) {
|
|
|
199
198
|
props.onDataArrive(result.data);
|
|
200
199
|
}
|
|
201
200
|
updateScrollBarPadding();
|
|
202
|
-
}, e => {
|
|
203
|
-
alert(e.message);
|
|
204
|
-
});
|
|
201
|
+
}, e => {});
|
|
205
202
|
} else {
|
|
206
203
|
utils.invokeUrl(props.dataUrl, JSON.stringify(utils.getRequest(page + 1, rowsPerPage, props.searchParameters, props.paged)), data => {
|
|
207
204
|
var result;
|