@agilemotion/oui-react-js 1.8.59 → 1.8.61
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.
|
@@ -28,7 +28,6 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
28
28
|
props.handle.api = api();
|
|
29
29
|
});
|
|
30
30
|
_react.default.useEffect(() => {
|
|
31
|
-
console.log('DATA GRID FILTER RENDERED');
|
|
32
31
|
if (!_Utils.default.isNull(props.config)) {
|
|
33
32
|
let visibleCols = 0;
|
|
34
33
|
for (const column of config.columns) {
|
|
@@ -230,54 +229,62 @@ const DataGridFilter = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
230
229
|
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))) : !_Utils.default.isNull(numVisibleCols) ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
231
230
|
style: {
|
|
232
231
|
display: 'flex',
|
|
233
|
-
flexWrap: 'wrap'
|
|
232
|
+
flexWrap: 'wrap',
|
|
233
|
+
borderBottom: '1px solid #e1e1e1'
|
|
234
234
|
}
|
|
235
235
|
}, props.config.selectionMode === 'MULTIPLE' ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
|
|
236
236
|
padding: "checkbox",
|
|
237
237
|
width: _DataGrid.MULTI_SELECT_CHECKBOX_COL_WIDTH + 'px',
|
|
238
238
|
className: "selectCell"
|
|
239
|
-
}) : null, props.config.columns.map(column =>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
className: (!_Utils.default.isNull(props.filterWrapperClass) ? props.filterWrapperClass : 'filterWraper') + ' row no-margin no-padding'
|
|
247
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
248
|
-
className: 'col no-margin no-padding'
|
|
249
|
-
}, /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
250
|
-
config: createFormConfig(column, column.id),
|
|
251
|
-
handle: createFormHandle(),
|
|
252
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
253
|
-
viewId: props.viewId,
|
|
254
|
-
keyHandler: e => {
|
|
255
|
-
if (e.key === 'Enter') {
|
|
256
|
-
submitFilter();
|
|
239
|
+
}) : null, props.config.columns.map(column => {
|
|
240
|
+
var _column$attributes;
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
|
|
242
|
+
key: column.id,
|
|
243
|
+
padding: 'default',
|
|
244
|
+
style: {
|
|
245
|
+
width: column === null || column === void 0 || (_column$attributes = column.attributes) === null || _column$attributes === void 0 ? void 0 : _column$attributes.width
|
|
257
246
|
}
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
model[id] = null;
|
|
265
|
-
fieldValidity[id] = false;
|
|
247
|
+
}, !_Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id) ? column.attributes['filterable'] === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
248
|
+
className: (!_Utils.default.isNull(props.filterWrapperClass) ? props.filterWrapperClass : 'filterWraper') + ' row no-margin no-padding'
|
|
249
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
250
|
+
className: 'col no-margin no-padding',
|
|
251
|
+
style: {
|
|
252
|
+
width: 'calc(100% - 52px)'
|
|
266
253
|
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
255
|
+
config: createFormConfig(column, column.id),
|
|
256
|
+
handle: createFormHandle(),
|
|
257
|
+
ref: /*#__PURE__*/_react.default.createRef(),
|
|
258
|
+
viewId: props.viewId,
|
|
259
|
+
keyHandler: e => {
|
|
260
|
+
if (e.key === 'Enter') {
|
|
261
|
+
submitFilter();
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
valueChangeHandler: (values, id, newValue) => {
|
|
265
|
+
if (!_Utils.default.isNull(values)) {
|
|
266
|
+
model[id] = newValue;
|
|
267
|
+
fieldValidity[id] = true;
|
|
268
|
+
} else {
|
|
269
|
+
model[id] = null;
|
|
270
|
+
fieldValidity[id] = false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
})), ++columnCounter === numVisibleCols && /*#__PURE__*/_react.default.createElement("div", {
|
|
274
|
+
className: 'col-*-*',
|
|
275
|
+
style: {
|
|
276
|
+
width: '52px',
|
|
277
|
+
marginTop: "4px",
|
|
278
|
+
border: '1px solid blue'
|
|
279
|
+
}
|
|
280
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
281
|
+
onClick: submitFilter
|
|
282
|
+
}, /*#__PURE__*/_react.default.createElement(_Search.default, null)))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
283
|
+
className: "filterWraperBlank"
|
|
284
|
+
}, ++columnCounter === numVisibleCols && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
285
|
+
onClick: submitFilter
|
|
286
|
+
}, /*#__PURE__*/_react.default.createElement(_Search.default, null))) : null);
|
|
287
|
+
})) : null;
|
|
281
288
|
}));
|
|
282
289
|
function arePropsEqual(prev, next) {
|
|
283
290
|
return prev.config === next.config && prev.scrollWidth === next.scrollWidth;
|
|
@@ -223,8 +223,8 @@ const WordDocumentViewer = props => {
|
|
|
223
223
|
};
|
|
224
224
|
function extractDocumentText(editor) {
|
|
225
225
|
if (currentText.current) return currentText.current;
|
|
226
|
-
const originalStart = selection.startOffset;
|
|
227
|
-
const originalEnd = selection.endOffset;
|
|
226
|
+
const originalStart = editor.selection.startOffset;
|
|
227
|
+
const originalEnd = editor.selection.endOffset;
|
|
228
228
|
editor.selection.selectAll();
|
|
229
229
|
const text = editor.selection.getText();
|
|
230
230
|
editor.selection.select(originalStart, originalEnd);
|
|
@@ -426,6 +426,9 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
426
426
|
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
427
427
|
props.valueChangeHandler({});
|
|
428
428
|
}
|
|
429
|
+
if (!_Utils.default.isNull(props.modelChangeHandler)) {
|
|
430
|
+
props.modelChangeHandler({});
|
|
431
|
+
}
|
|
429
432
|
_ApplicationManager.default.enableFormMarkers(true);
|
|
430
433
|
}
|
|
431
434
|
function doBindData(data) {
|
|
@@ -561,6 +564,9 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
561
564
|
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
562
565
|
props.valueChangeHandler(invalid ? null : values.current, id, value);
|
|
563
566
|
}
|
|
567
|
+
if (!_Utils.default.isNull(props.modelChangeHandler)) {
|
|
568
|
+
props.modelChangeHandler(values.current, id, value);
|
|
569
|
+
}
|
|
564
570
|
}
|
|
565
571
|
_ApplicationManager.default.enableFormMarkers(false);
|
|
566
572
|
_Observable.default.processSystemGeneratedSubscriptions(props.config.id);
|
|
@@ -609,6 +615,11 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
609
615
|
props.valueChangeHandler(_objectSpread(_objectSpread({}, values.current), {}, {
|
|
610
616
|
[name]: value
|
|
611
617
|
}));
|
|
618
|
+
if (props.modelChangeHandler) {
|
|
619
|
+
props.modelChangeHandler(_objectSpread(_objectSpread({}, values.current), {}, {
|
|
620
|
+
[name]: value
|
|
621
|
+
}));
|
|
622
|
+
}
|
|
612
623
|
};
|
|
613
624
|
function render(form) {
|
|
614
625
|
return _Utils.default.isNull(form.sections) || form.sections.length === 0 ? null : /*#__PURE__*/_react.default.createElement("div", null, form.sections.map(section => {
|
|
@@ -62,9 +62,11 @@ const SelectItemComponent = props => {
|
|
|
62
62
|
id: '_EMPTY_VALUE'
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
let
|
|
67
|
-
|
|
65
|
+
if (result && result.records) {
|
|
66
|
+
for (let i = 0; i < result.records.length; i++) {
|
|
67
|
+
let record = result.records[i];
|
|
68
|
+
options.push(record);
|
|
69
|
+
}
|
|
68
70
|
}
|
|
69
71
|
base.setSelectOptions(options);
|
|
70
72
|
}).catch(e => {
|
package/package.json
CHANGED