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.
package/dist/index.cjs CHANGED
@@ -2957,7 +2957,9 @@ var StringEditor = function StringEditor(_ref6) {
2957
2957
  label = field.label,
2958
2958
  options = field.options,
2959
2959
  _field$editable = field.editable,
2960
- editable = _field$editable === void 0 ? true : _field$editable;
2960
+ editable = _field$editable === void 0 ? true : _field$editable,
2961
+ _field$predictive = field.predictive,
2962
+ predictive = _field$predictive === void 0 ? false : _field$predictive;
2961
2963
 
2962
2964
  function change(id, value) {
2963
2965
  if (onChange) onChange(id, value);
@@ -2986,7 +2988,7 @@ var StringEditor = function StringEditor(_ref6) {
2986
2988
  onChange: change,
2987
2989
  options: buildOptions(),
2988
2990
  readOnly: !editable,
2989
- canFilter: false
2991
+ canFilter: predictive
2990
2992
  }) : /*#__PURE__*/React__default["default"].createElement(TextField, {
2991
2993
  outlined: outlined,
2992
2994
  id: id,
@@ -4123,7 +4125,8 @@ var TablePage = function TablePage(props) {
4123
4125
  schema = props.schema,
4124
4126
  url = props.url,
4125
4127
  field = props.field,
4126
- actions = props.actions,
4128
+ _props$actions = props.actions,
4129
+ actions = _props$actions === void 0 ? [] : _props$actions,
4127
4130
  _props$dev = props.dev,
4128
4131
  dev = _props$dev === void 0 ? false : _props$dev,
4129
4132
  tableActions = props.tableActions,
@@ -4238,6 +4241,17 @@ var TablePage = function TablePage(props) {
4238
4241
  return null;
4239
4242
  }
4240
4243
 
4244
+ function renderActions() {
4245
+ return actions.map(function (element) {
4246
+ var action = function action() {
4247
+ return element.props.action(pageContext);
4248
+ };
4249
+
4250
+ var clone = React__default["default"].cloneElement(element, [action]);
4251
+ return clone;
4252
+ });
4253
+ }
4254
+
4241
4255
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Header, {
4242
4256
  className: "table-page",
4243
4257
  title: /*#__PURE__*/React__default["default"].createElement(Text, null, title)
@@ -4251,7 +4265,7 @@ var TablePage = function TablePage(props) {
4251
4265
  }, /*#__PURE__*/React__default["default"].createElement(MenuItem, {
4252
4266
  label: "Cargar Escenario 1",
4253
4267
  onSelect: playScenario
4254
- })) : null, actions), /*#__PURE__*/React__default["default"].createElement("menu", {
4268
+ })) : null, actions, renderActions()), /*#__PURE__*/React__default["default"].createElement("menu", {
4255
4269
  className: "table-page"
4256
4270
  }, canQuery ? /*#__PURE__*/React__default["default"].createElement(TableQueries, {
4257
4271
  schema: schema
@@ -4303,8 +4317,8 @@ var TableRowEditor = function TableRowEditor(props) {
4303
4317
 
4304
4318
 
4305
4319
  var TableSelector = function TableSelector(props) {
4306
- var _props$actions = props.actions,
4307
- actions = _props$actions === void 0 ? [] : _props$actions;
4320
+ var _props$actions2 = props.actions,
4321
+ actions = _props$actions2 === void 0 ? [] : _props$actions2;
4308
4322
 
4309
4323
  var _useContext2 = React.useContext(PageContext),
4310
4324
  pageContext = _useContext2[0],