ywana-core8 0.0.133 → 0.0.137

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
@@ -4086,6 +4086,8 @@ var TablePage = function TablePage(props) {
4086
4086
  _props$dev = props.dev,
4087
4087
  dev = _props$dev === void 0 ? false : _props$dev,
4088
4088
  tableActions = props.tableActions,
4089
+ _props$selectionActio = props.selectionActions,
4090
+ selectionActions = _props$selectionActio === void 0 ? [] : _props$selectionActio,
4089
4091
  editable = props.editable,
4090
4092
  _props$canFilter = props.canFilter,
4091
4093
  canFilter = _props$canFilter === void 0 ? false : _props$canFilter,
@@ -4187,7 +4189,7 @@ var TablePage = function TablePage(props) {
4187
4189
  onClose: closeAside
4188
4190
  }) : null, rowChecked ? /*#__PURE__*/React__default["default"].createElement(TableSelector, {
4189
4191
  schema: schema,
4190
- onClose: closeAside
4192
+ actions: selectionActions
4191
4193
  }) : null);
4192
4194
  }
4193
4195
 
@@ -4271,7 +4273,6 @@ var TableSelector = function TableSelector(props) {
4271
4273
  var rows = all.filter(function (item) {
4272
4274
  return checked.has(item.id);
4273
4275
  });
4274
- console.log(count, rows);
4275
4276
  var table = {
4276
4277
  columns: [{
4277
4278
  id: "idMatricula",
@@ -4279,11 +4280,22 @@ var TableSelector = function TableSelector(props) {
4279
4280
  }],
4280
4281
  rows: rows || []
4281
4282
  };
4283
+ var buttons = actions.map(function (_ref) {
4284
+ var label = _ref.label,
4285
+ _action = _ref.action;
4286
+ return /*#__PURE__*/React__default["default"].createElement(Button$1, {
4287
+ label: label,
4288
+ raised: true,
4289
+ action: function action() {
4290
+ return _action(rows);
4291
+ }
4292
+ });
4293
+ });
4282
4294
  return /*#__PURE__*/React__default["default"].createElement("div", {
4283
4295
  className: "table-selector"
4284
4296
  }, /*#__PURE__*/React__default["default"].createElement(Header, {
4285
4297
  title: "Selection"
4286
- }, count), /*#__PURE__*/React__default["default"].createElement("main", null, /*#__PURE__*/React__default["default"].createElement(DataTable, table)), /*#__PURE__*/React__default["default"].createElement("footer", null, actions));
4298
+ }, count), /*#__PURE__*/React__default["default"].createElement("main", null, /*#__PURE__*/React__default["default"].createElement(DataTable, table)), /*#__PURE__*/React__default["default"].createElement("footer", null, buttons));
4287
4299
  };
4288
4300
  /**
4289
4301
  * Table Queries
@@ -4484,20 +4496,20 @@ var TableEditor = function TableEditor(props) {
4484
4496
  }),
4485
4497
  rows: groups[groupName].map(function (item) {
4486
4498
  item.checked = pageContext.checked ? pageContext.checked.has(item.id) : false;
4487
- item.actions = actions ? actions.map(function (_action) {
4488
- return _action.filter ? _action.filter(item) ? /*#__PURE__*/React__default["default"].createElement(Icon, {
4489
- icon: _action.icon,
4499
+ item.actions = actions ? actions.map(function (_action2) {
4500
+ return _action2.filter ? _action2.filter(item) ? /*#__PURE__*/React__default["default"].createElement(Icon, {
4501
+ icon: _action2.icon,
4490
4502
  clickable: true,
4491
4503
  size: "small",
4492
4504
  action: function action() {
4493
- return run(_action, item);
4505
+ return run(_action2, item);
4494
4506
  }
4495
4507
  }) : null : /*#__PURE__*/React__default["default"].createElement(Icon, {
4496
- icon: _action.icon,
4508
+ icon: _action2.icon,
4497
4509
  clickable: true,
4498
4510
  size: "small",
4499
4511
  action: function action() {
4500
- return run(_action, item);
4512
+ return run(_action2, item);
4501
4513
  }
4502
4514
  });
4503
4515
  }) : [];