ywana-core8 0.0.72 → 0.0.73

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 CHANGED
@@ -2741,7 +2741,6 @@ var FieldEditor = function FieldEditor(_ref4) {
2741
2741
  type = field.type,
2742
2742
  item = field.item,
2743
2743
  label = field.label,
2744
- editable = field.editable,
2745
2744
  options = field.options;
2746
2745
 
2747
2746
  function change(id, value) {
@@ -2777,17 +2776,6 @@ var FieldEditor = function FieldEditor(_ref4) {
2777
2776
  onChange: change
2778
2777
  });
2779
2778
 
2780
- case TYPES.DATE:
2781
- return /*#__PURE__*/React__default["default"].createElement(TextField, {
2782
- outlined: outlined,
2783
- id: id,
2784
- type: "date",
2785
- label: label,
2786
- value: value1,
2787
- onChange: change,
2788
- disabled: editable
2789
- });
2790
-
2791
2779
  case TYPES.NUMBER:
2792
2780
  return /*#__PURE__*/React__default["default"].createElement(NumberEditor, {
2793
2781
  outlined: outlined,
@@ -2869,6 +2857,7 @@ var StringEditor = function StringEditor(_ref6) {
2869
2857
  content = _ref6.content,
2870
2858
  outlined = _ref6.outlined;
2871
2859
  var id = field.id,
2860
+ format = field.format,
2872
2861
  label = field.label,
2873
2862
  options = field.options,
2874
2863
  _field$editable = field.editable,
@@ -2885,26 +2874,29 @@ var StringEditor = function StringEditor(_ref6) {
2885
2874
 
2886
2875
  return /*#__PURE__*/React__default["default"].createElement("div", {
2887
2876
  className: "field-editor string-editor"
2888
- }, editable ? options ? /*#__PURE__*/React__default["default"].createElement(DropDown, {
2877
+ }, format === FORMATS.DATE ? /*#__PURE__*/React__default["default"].createElement(TextField, {
2889
2878
  outlined: outlined,
2890
2879
  id: id,
2880
+ type: "date",
2891
2881
  label: label,
2892
2882
  value: value,
2893
2883
  onChange: change,
2894
- options: buildOptions()
2895
- }) : /*#__PURE__*/React__default["default"].createElement(TextField, {
2884
+ readOnly: !editable
2885
+ }) : options ? /*#__PURE__*/React__default["default"].createElement(DropDown, {
2896
2886
  outlined: outlined,
2897
2887
  id: id,
2898
2888
  label: label,
2899
2889
  value: value,
2900
- onChange: change
2890
+ onChange: change,
2891
+ options: buildOptions(),
2892
+ readOnly: !editable
2901
2893
  }) : /*#__PURE__*/React__default["default"].createElement(TextField, {
2902
2894
  outlined: outlined,
2903
2895
  id: id,
2904
2896
  label: label,
2905
2897
  value: value,
2906
2898
  onChange: change,
2907
- readOnly: true
2899
+ readOnly: !editable
2908
2900
  }));
2909
2901
  };
2910
2902
  /**