ywana-core8 0.0.925 → 0.0.927
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 +21 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +21 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +21 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/DynamicForm.js +8 -7
- package/src/domain2/DynamicForm.test.js +2 -2
- package/src/html/switch.js +7 -1
- package/src/html/textfield.css +5 -0
- package/src/html/textfield.js +2 -2
- package/src/html/textfield.test.js +1 -1
package/dist/index.cjs
CHANGED
@@ -1500,7 +1500,9 @@ var DropDown = function DropDown(props) {
|
|
1500
1500
|
verbose = _props$verbose === void 0 ? true : _props$verbose,
|
1501
1501
|
_props$editable = props.editable,
|
1502
1502
|
editable = _props$editable === void 0 ? false : _props$editable,
|
1503
|
-
onBlur = props.onBlur
|
1503
|
+
onBlur = props.onBlur,
|
1504
|
+
_props$position = props.position,
|
1505
|
+
position = _props$position === void 0 ? "bottom" : _props$position;
|
1504
1506
|
var _useState = React.useState(false),
|
1505
1507
|
open = _useState[0],
|
1506
1508
|
setOpen = _useState[1];
|
@@ -1574,7 +1576,9 @@ var DropDown = function DropDown(props) {
|
|
1574
1576
|
size: "small"
|
1575
1577
|
}) : '', /*#__PURE__*/React__default["default"].createElement(Text, null, option.label));
|
1576
1578
|
});
|
1577
|
-
return /*#__PURE__*/React__default["default"].createElement("menu",
|
1579
|
+
return /*#__PURE__*/React__default["default"].createElement("menu", {
|
1580
|
+
className: position
|
1581
|
+
}, /*#__PURE__*/React__default["default"].createElement("ul", null, lis));
|
1578
1582
|
} else {
|
1579
1583
|
return null;
|
1580
1584
|
}
|
@@ -11376,6 +11380,9 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11376
11380
|
}
|
11377
11381
|
function renderByFormat() {
|
11378
11382
|
var label = required ? field.label + " *" : field.label;
|
11383
|
+
var readOnly = field.readOnly || field.editable === false;
|
11384
|
+
var _field$position = field.position,
|
11385
|
+
position = _field$position === void 0 ? "bottom" : _field$position;
|
11379
11386
|
switch (format) {
|
11380
11387
|
case FORMATS.TEXT:
|
11381
11388
|
return /*#__PURE__*/React__default["default"].createElement(TextArea, {
|
@@ -11383,7 +11390,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11383
11390
|
label: label,
|
11384
11391
|
value: value,
|
11385
11392
|
onChange: change,
|
11386
|
-
outlined: true
|
11393
|
+
outlined: true,
|
11394
|
+
readOnly: readOnly
|
11387
11395
|
});
|
11388
11396
|
case FORMATS.DATE:
|
11389
11397
|
return /*#__PURE__*/React__default["default"].createElement(TextField, {
|
@@ -11392,7 +11400,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11392
11400
|
type: "date",
|
11393
11401
|
value: value,
|
11394
11402
|
onChange: change,
|
11395
|
-
outlined: true
|
11403
|
+
outlined: true,
|
11404
|
+
readOnly: readOnly
|
11396
11405
|
});
|
11397
11406
|
case FORMATS.TIME:
|
11398
11407
|
return /*#__PURE__*/React__default["default"].createElement(TextField, {
|
@@ -11401,7 +11410,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11401
11410
|
type: "time",
|
11402
11411
|
value: value,
|
11403
11412
|
onChange: change,
|
11404
|
-
outlined: true
|
11413
|
+
outlined: true,
|
11414
|
+
readOnly: readOnly
|
11405
11415
|
});
|
11406
11416
|
case FORMATS.DATERANGE:
|
11407
11417
|
return /*#__PURE__*/React__default["default"].createElement(DateRange, {
|
@@ -11431,13 +11441,16 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11431
11441
|
value: value,
|
11432
11442
|
onChange: change,
|
11433
11443
|
options: buildOptions(),
|
11434
|
-
outlined: true
|
11444
|
+
outlined: true,
|
11445
|
+
readOnly: readOnly,
|
11446
|
+
position: position
|
11435
11447
|
}) : /*#__PURE__*/React__default["default"].createElement(TextField, {
|
11436
11448
|
id: id,
|
11437
11449
|
label: label,
|
11438
11450
|
value: value,
|
11439
11451
|
onChange: change,
|
11440
|
-
outlined: true
|
11452
|
+
outlined: true,
|
11453
|
+
readOnly: readOnly
|
11441
11454
|
});
|
11442
11455
|
}
|
11443
11456
|
}
|
@@ -11454,9 +11467,8 @@ var DynamicFormField = function DynamicFormField(props) {
|
|
11454
11467
|
return renderByFormat();
|
11455
11468
|
}
|
11456
11469
|
}
|
11457
|
-
var className = "dynamic-form-field " + id;
|
11458
11470
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
11459
|
-
className:
|
11471
|
+
className: "dynamic-form-field"
|
11460
11472
|
}, renderByType());
|
11461
11473
|
};
|
11462
11474
|
|