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.cjs
CHANGED
@@ -11368,7 +11368,10 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11368
11368
|
type = field.type,
|
11369
11369
|
format = field.format,
|
11370
11370
|
options = field.options,
|
11371
|
-
required = field.required
|
11371
|
+
required = field.required,
|
11372
|
+
_field$editable = field.editable,
|
11373
|
+
editable = _field$editable === void 0 ? true : _field$editable;
|
11374
|
+
var readOnly = field.readOnly || editable === false;
|
11372
11375
|
function change(id, value) {
|
11373
11376
|
if (onChange) onChange(id, value);
|
11374
11377
|
}
|
@@ -11380,7 +11383,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11380
11383
|
}
|
11381
11384
|
function renderByFormat() {
|
11382
11385
|
var label = required ? field.label + " *" : field.label;
|
11383
|
-
var
|
11386
|
+
var _field$position = field.position,
|
11387
|
+
position = _field$position === void 0 ? "bottom" : _field$position;
|
11384
11388
|
switch (format) {
|
11385
11389
|
case FORMATS.TEXT:
|
11386
11390
|
return /*#__PURE__*/React__default["default"].createElement(TextArea, {
|
@@ -11440,7 +11444,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11440
11444
|
onChange: change,
|
11441
11445
|
options: buildOptions(),
|
11442
11446
|
outlined: true,
|
11443
|
-
readOnly: readOnly
|
11447
|
+
readOnly: readOnly,
|
11448
|
+
position: position
|
11444
11449
|
}) : /*#__PURE__*/React__default["default"].createElement(TextField, {
|
11445
11450
|
id: id,
|
11446
11451
|
label: label,
|
@@ -11464,8 +11469,9 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11464
11469
|
return renderByFormat();
|
11465
11470
|
}
|
11466
11471
|
}
|
11472
|
+
var className = "dynamic-form-field " + (readOnly ? "readonly" : "");
|
11467
11473
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
11468
|
-
className:
|
11474
|
+
className: className
|
11469
11475
|
}, renderByType());
|
11470
11476
|
};
|
11471
11477
|
|