ywana-core8 0.0.231 → 0.0.232

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.
@@ -3102,38 +3102,51 @@ var StringEditor = function StringEditor(_ref6) {
3102
3102
  return opts;
3103
3103
  }
3104
3104
 
3105
+ function renderFormat(format, options) {
3106
+ switch (format) {
3107
+ case FORMATS.HTML:
3108
+ return /*#__PURE__*/React.createElement(Editor, {
3109
+ id: id,
3110
+ value: value,
3111
+ onChange: change,
3112
+ content: content
3113
+ });
3114
+
3115
+ case FORMATS.DATE:
3116
+ return /*#__PURE__*/React.createElement(TextField, {
3117
+ outlined: outlined,
3118
+ id: id,
3119
+ type: "date",
3120
+ label: label,
3121
+ value: value,
3122
+ onChange: change,
3123
+ readOnly: !editable
3124
+ });
3125
+
3126
+ default:
3127
+ return options ? /*#__PURE__*/React.createElement(DropDown, {
3128
+ outlined: outlined,
3129
+ id: id,
3130
+ label: label,
3131
+ value: value,
3132
+ onChange: change,
3133
+ options: buildOptions(),
3134
+ readOnly: !editable,
3135
+ canFilter: predictive
3136
+ }) : /*#__PURE__*/React.createElement(TextField, {
3137
+ outlined: outlined,
3138
+ id: id,
3139
+ label: label,
3140
+ value: value,
3141
+ onChange: change,
3142
+ readOnly: !editable
3143
+ });
3144
+ }
3145
+ }
3146
+
3105
3147
  return /*#__PURE__*/React.createElement("div", {
3106
3148
  className: "field-editor string-editor"
3107
- }, format === FORMATS.HTML ? /*#__PURE__*/React.createElement(Editor, {
3108
- id: id,
3109
- value: value,
3110
- onChange: change,
3111
- content: content
3112
- }) : null, format === FORMATS.DATE ? /*#__PURE__*/React.createElement(TextField, {
3113
- outlined: outlined,
3114
- id: id,
3115
- type: "date",
3116
- label: label,
3117
- value: value,
3118
- onChange: change,
3119
- readOnly: !editable
3120
- }) : options ? /*#__PURE__*/React.createElement(DropDown, {
3121
- outlined: outlined,
3122
- id: id,
3123
- label: label,
3124
- value: value,
3125
- onChange: change,
3126
- options: buildOptions(),
3127
- readOnly: !editable,
3128
- canFilter: predictive
3129
- }) : /*#__PURE__*/React.createElement(TextField, {
3130
- outlined: outlined,
3131
- id: id,
3132
- label: label,
3133
- value: value,
3134
- onChange: change,
3135
- readOnly: !editable
3136
- }));
3149
+ }, renderFormat(format, options));
3137
3150
  };
3138
3151
  /**
3139
3152
  * Number Editor