ywana-core8 0.0.231 → 0.0.235

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
@@ -4811,13 +4824,28 @@ var TableEditor = function TableEditor(props) {
4811
4824
  });
4812
4825
  }
4813
4826
 
4827
+ function renderGroupLabel(groupName) {
4828
+ var grouper = schema[groupBy];
4829
+
4830
+ if (grouper.options) {
4831
+ var options = CHECK['isFunction'](grouper.options) ? grouper.options() : grouper.options;
4832
+ var option = options.find(function (option) {
4833
+ return option.value === groupName;
4834
+ });
4835
+ console.log(grouperName, options, option);
4836
+ return option.label ? option.label : groupName + "LABEL NOT FOUND ";
4837
+ } else {
4838
+ return groupName;
4839
+ }
4840
+ }
4841
+
4814
4842
  function renderGroups() {
4815
4843
  var items = filter ? filter(all) : all;
4816
- var groups = items.reduce(function (groups, filter) {
4817
- var groupName = filter[groupBy];
4844
+ var groups = items.reduce(function (groups, item) {
4845
+ var groupName = item[groupBy];
4818
4846
  var group = groups[groupName];
4819
4847
  if (!group) groups[groupName] = [];
4820
- groups[groupName].push(filter);
4848
+ groups[groupName].push(item);
4821
4849
  return groups;
4822
4850
  }, {});
4823
4851
  return Object.keys(groups).map(function (groupName) {
@@ -4881,7 +4909,7 @@ var TableEditor = function TableEditor(props) {
4881
4909
  key: groupName
4882
4910
  }, /*#__PURE__*/React.createElement(Header, {
4883
4911
  title: groupName
4884
- }, /*#__PURE__*/React.createElement("span", {
4912
+ }, renderGroupLabel(groupName), /*#__PURE__*/React.createElement("span", {
4885
4913
  className: "size"
4886
4914
  }, groupSize)), /*#__PURE__*/React.createElement(DataTable, _extends({}, table, {
4887
4915
  onRowSelection: select,