ywana-core8 0.0.160 → 0.0.164

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.
@@ -2950,7 +2950,9 @@ var StringEditor = function StringEditor(_ref6) {
2950
2950
  label = field.label,
2951
2951
  options = field.options,
2952
2952
  _field$editable = field.editable,
2953
- 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;
2954
2956
 
2955
2957
  function change(id, value) {
2956
2958
  if (onChange) onChange(id, value);
@@ -2979,7 +2981,7 @@ var StringEditor = function StringEditor(_ref6) {
2979
2981
  onChange: change,
2980
2982
  options: buildOptions(),
2981
2983
  readOnly: !editable,
2982
- canFilter: false
2984
+ canFilter: predictive
2983
2985
  }) : /*#__PURE__*/React.createElement(TextField, {
2984
2986
  outlined: outlined,
2985
2987
  id: id,
@@ -4116,7 +4118,8 @@ var TablePage = function TablePage(props) {
4116
4118
  schema = props.schema,
4117
4119
  url = props.url,
4118
4120
  field = props.field,
4119
- actions = props.actions,
4121
+ _props$actions = props.actions,
4122
+ actions = _props$actions === void 0 ? [] : _props$actions,
4120
4123
  _props$dev = props.dev,
4121
4124
  dev = _props$dev === void 0 ? false : _props$dev,
4122
4125
  tableActions = props.tableActions,
@@ -4231,6 +4234,17 @@ var TablePage = function TablePage(props) {
4231
4234
  return null;
4232
4235
  }
4233
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
+
4234
4248
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
4235
4249
  className: "table-page",
4236
4250
  title: /*#__PURE__*/React.createElement(Text, null, title)
@@ -4244,7 +4258,7 @@ var TablePage = function TablePage(props) {
4244
4258
  }, /*#__PURE__*/React.createElement(MenuItem, {
4245
4259
  label: "Cargar Escenario 1",
4246
4260
  onSelect: playScenario
4247
- })) : null, actions), /*#__PURE__*/React.createElement("menu", {
4261
+ })) : null, actions, renderActions()), /*#__PURE__*/React.createElement("menu", {
4248
4262
  className: "table-page"
4249
4263
  }, canQuery ? /*#__PURE__*/React.createElement(TableQueries, {
4250
4264
  schema: schema
@@ -4296,8 +4310,8 @@ var TableRowEditor = function TableRowEditor(props) {
4296
4310
 
4297
4311
 
4298
4312
  var TableSelector = function TableSelector(props) {
4299
- var _props$actions = props.actions,
4300
- actions = _props$actions === void 0 ? [] : _props$actions;
4313
+ var _props$actions2 = props.actions,
4314
+ actions = _props$actions2 === void 0 ? [] : _props$actions2;
4301
4315
 
4302
4316
  var _useContext2 = useContext(PageContext),
4303
4317
  pageContext = _useContext2[0],