ywana-core8 0.0.169 → 0.0.173
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 +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +22 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +17 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +17 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +2 -0
- package/src/html/textfield-outlined.css +6 -0
- package/src/html/textfield.css +14 -0
- package/src/html/textfield.js +8 -2
- package/src/html/tree.css +2 -2
package/dist/index.umd.js
CHANGED
@@ -860,6 +860,8 @@
|
|
860
860
|
outlined = props.outlined,
|
861
861
|
_props$readOnly = props.readOnly,
|
862
862
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
863
|
+
_props$canClear = props.canClear,
|
864
|
+
canClear = _props$canClear === void 0 ? true : _props$canClear,
|
863
865
|
onChange = props.onChange,
|
864
866
|
onEnter = props.onEnter,
|
865
867
|
onClick = props.onClick;
|
@@ -888,6 +890,10 @@
|
|
888
890
|
}
|
889
891
|
}
|
890
892
|
|
893
|
+
function clear() {
|
894
|
+
if (onChange) onChange(id, "");
|
895
|
+
}
|
896
|
+
|
891
897
|
var borderStyle = outlined ? "textfield-outlined" : "textfield";
|
892
898
|
var labelStyle = label ? "" : "no-label";
|
893
899
|
var style = labelStyle + " " + borderStyle;
|
@@ -905,7 +911,12 @@
|
|
905
911
|
onKeyDown: onKeyPress,
|
906
912
|
onFocus: focus,
|
907
913
|
readOnly: readOnly
|
908
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
914
|
+
}), canClear ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
915
|
+
icon: "close",
|
916
|
+
clickable: true,
|
917
|
+
size: "small",
|
918
|
+
action: clear
|
919
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement("span", {
|
909
920
|
className: "bar"
|
910
921
|
}), label ? /*#__PURE__*/React__default["default"].createElement("label", null, labelTxt) : null);
|
911
922
|
};
|
@@ -938,7 +949,10 @@
|
|
938
949
|
var option = options.find(function (option) {
|
939
950
|
return option.value === value;
|
940
951
|
});
|
941
|
-
|
952
|
+
|
953
|
+
var _label = option ? option.label : "";
|
954
|
+
|
955
|
+
setLabel(_label);
|
942
956
|
}
|
943
957
|
}, [value]);
|
944
958
|
|
@@ -2967,6 +2981,7 @@
|
|
2967
2981
|
return opts;
|
2968
2982
|
}
|
2969
2983
|
|
2984
|
+
console.log('StringEditor: ', label, value, content);
|
2970
2985
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
2971
2986
|
className: "field-editor string-editor"
|
2972
2987
|
}, format === FORMATS.DATE ? /*#__PURE__*/React__default["default"].createElement(TextField, {
|