ywana-core8 0.0.926 → 0.0.928
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/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +10 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/DynamicForm.js +9 -7
- package/src/domain2/DynamicForm.test.js +1 -1
package/dist/index.umd.js
CHANGED
@@ -11361,7 +11361,10 @@
|
|
11361
11361
|
type = field.type,
|
11362
11362
|
format = field.format,
|
11363
11363
|
options = field.options,
|
11364
|
-
required = field.required
|
11364
|
+
required = field.required,
|
11365
|
+
_field$editable = field.editable,
|
11366
|
+
editable = _field$editable === void 0 ? true : _field$editable;
|
11367
|
+
var readOnly = field.readOnly || editable === false;
|
11365
11368
|
function change(id, value) {
|
11366
11369
|
if (onChange) onChange(id, value);
|
11367
11370
|
}
|
@@ -11373,7 +11376,8 @@
|
|
11373
11376
|
}
|
11374
11377
|
function renderByFormat() {
|
11375
11378
|
var label = required ? field.label + " *" : field.label;
|
11376
|
-
var
|
11379
|
+
var _field$position = field.position,
|
11380
|
+
position = _field$position === void 0 ? "bottom" : _field$position;
|
11377
11381
|
switch (format) {
|
11378
11382
|
case FORMATS.TEXT:
|
11379
11383
|
return /*#__PURE__*/React__default["default"].createElement(TextArea, {
|
@@ -11433,7 +11437,8 @@
|
|
11433
11437
|
onChange: change,
|
11434
11438
|
options: buildOptions(),
|
11435
11439
|
outlined: true,
|
11436
|
-
readOnly: readOnly
|
11440
|
+
readOnly: readOnly,
|
11441
|
+
position: position
|
11437
11442
|
}) : /*#__PURE__*/React__default["default"].createElement(TextField, {
|
11438
11443
|
id: id,
|
11439
11444
|
label: label,
|
@@ -11457,8 +11462,9 @@
|
|
11457
11462
|
return renderByFormat();
|
11458
11463
|
}
|
11459
11464
|
}
|
11465
|
+
var className = "dynamic-form-field " + (readOnly ? "readonly" : "");
|
11460
11466
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
11461
|
-
className:
|
11467
|
+
className: className
|
11462
11468
|
}, renderByType());
|
11463
11469
|
};
|
11464
11470
|
|