ywana-core8 0.0.159 → 0.0.163

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.
@@ -2824,7 +2824,8 @@ var FieldEditor = function FieldEditor(_ref4) {
2824
2824
  item = field.item,
2825
2825
  label = field.label,
2826
2826
  options = field.options,
2827
- hidden = field.hidden;
2827
+ _field$hidden = field.hidden,
2828
+ hidden = _field$hidden === void 0 ? false : _field$hidden;
2828
2829
 
2829
2830
  function change(id, value) {
2830
2831
  if (onChange) onChange(id, value);
@@ -2832,8 +2833,9 @@ var FieldEditor = function FieldEditor(_ref4) {
2832
2833
 
2833
2834
  function renderField() {
2834
2835
  var value1 = field.value ? field.value : field["default"];
2836
+ var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
2835
2837
 
2836
- if (hidden(field, value1)) {
2838
+ if (isHidden) {
2837
2839
  return null;
2838
2840
  } else {
2839
2841
  switch (type) {
@@ -2948,7 +2950,9 @@ var StringEditor = function StringEditor(_ref6) {
2948
2950
  label = field.label,
2949
2951
  options = field.options,
2950
2952
  _field$editable = field.editable,
2951
- editable = _field$editable === void 0 ? true : _field$editable;
2953
+ editable = _field$editable === void 0 ? true : _field$editable,
2954
+ _field$predictive = field.predictive,
2955
+ predictive = _field$predictive === void 0 ? false : _field$predictive;
2952
2956
 
2953
2957
  function change(id, value) {
2954
2958
  if (onChange) onChange(id, value);
@@ -2977,7 +2981,7 @@ var StringEditor = function StringEditor(_ref6) {
2977
2981
  onChange: change,
2978
2982
  options: buildOptions(),
2979
2983
  readOnly: !editable,
2980
- canFilter: false
2984
+ canFilter: predictive
2981
2985
  }) : /*#__PURE__*/React.createElement(TextField, {
2982
2986
  outlined: outlined,
2983
2987
  id: id,
@@ -4114,7 +4118,8 @@ var TablePage = function TablePage(props) {
4114
4118
  schema = props.schema,
4115
4119
  url = props.url,
4116
4120
  field = props.field,
4117
- actions = props.actions,
4121
+ _props$actions = props.actions,
4122
+ actions = _props$actions === void 0 ? [] : _props$actions,
4118
4123
  _props$dev = props.dev,
4119
4124
  dev = _props$dev === void 0 ? false : _props$dev,
4120
4125
  tableActions = props.tableActions,
@@ -4229,6 +4234,17 @@ var TablePage = function TablePage(props) {
4229
4234
  return null;
4230
4235
  }
4231
4236
 
4237
+ function renderActions() {
4238
+ return actions.map(function (element) {
4239
+ var action = function action() {
4240
+ return element.props.action(pageContext);
4241
+ };
4242
+
4243
+ var clone = React.cloneElement(element, [action]);
4244
+ return clone;
4245
+ });
4246
+ }
4247
+
4232
4248
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
4233
4249
  className: "table-page",
4234
4250
  title: /*#__PURE__*/React.createElement(Text, null, title)
@@ -4242,7 +4258,7 @@ var TablePage = function TablePage(props) {
4242
4258
  }, /*#__PURE__*/React.createElement(MenuItem, {
4243
4259
  label: "Cargar Escenario 1",
4244
4260
  onSelect: playScenario
4245
- })) : null, actions), /*#__PURE__*/React.createElement("menu", {
4261
+ })) : null, actions, renderActions()), /*#__PURE__*/React.createElement("menu", {
4246
4262
  className: "table-page"
4247
4263
  }, canQuery ? /*#__PURE__*/React.createElement(TableQueries, {
4248
4264
  schema: schema
@@ -4294,8 +4310,8 @@ var TableRowEditor = function TableRowEditor(props) {
4294
4310
 
4295
4311
 
4296
4312
  var TableSelector = function TableSelector(props) {
4297
- var _props$actions = props.actions,
4298
- actions = _props$actions === void 0 ? [] : _props$actions;
4313
+ var _props$actions2 = props.actions,
4314
+ actions = _props$actions2 === void 0 ? [] : _props$actions2;
4299
4315
 
4300
4316
  var _useContext2 = useContext(PageContext),
4301
4317
  pageContext = _useContext2[0],