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.
@@ -4079,6 +4079,8 @@ var TablePage = function TablePage(props) {
4079
4079
  _props$dev = props.dev,
4080
4080
  dev = _props$dev === void 0 ? false : _props$dev,
4081
4081
  tableActions = props.tableActions,
4082
+ _props$selectionActio = props.selectionActions,
4083
+ selectionActions = _props$selectionActio === void 0 ? [] : _props$selectionActio,
4082
4084
  editable = props.editable,
4083
4085
  _props$canFilter = props.canFilter,
4084
4086
  canFilter = _props$canFilter === void 0 ? false : _props$canFilter,
@@ -4180,7 +4182,7 @@ var TablePage = function TablePage(props) {
4180
4182
  onClose: closeAside
4181
4183
  }) : null, rowChecked ? /*#__PURE__*/React.createElement(TableSelector, {
4182
4184
  schema: schema,
4183
- onClose: closeAside
4185
+ actions: selectionActions
4184
4186
  }) : null);
4185
4187
  }
4186
4188
 
@@ -4264,7 +4266,6 @@ var TableSelector = function TableSelector(props) {
4264
4266
  var rows = all.filter(function (item) {
4265
4267
  return checked.has(item.id);
4266
4268
  });
4267
- console.log(count, rows);
4268
4269
  var table = {
4269
4270
  columns: [{
4270
4271
  id: "idMatricula",
@@ -4272,11 +4273,22 @@ var TableSelector = function TableSelector(props) {
4272
4273
  }],
4273
4274
  rows: rows || []
4274
4275
  };
4276
+ var buttons = actions.map(function (_ref) {
4277
+ var label = _ref.label,
4278
+ _action = _ref.action;
4279
+ return /*#__PURE__*/React.createElement(Button$1, {
4280
+ label: label,
4281
+ raised: true,
4282
+ action: function action() {
4283
+ return _action(rows);
4284
+ }
4285
+ });
4286
+ });
4275
4287
  return /*#__PURE__*/React.createElement("div", {
4276
4288
  className: "table-selector"
4277
4289
  }, /*#__PURE__*/React.createElement(Header, {
4278
4290
  title: "Selection"
4279
- }, count), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(DataTable, table)), /*#__PURE__*/React.createElement("footer", null, actions));
4291
+ }, count), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(DataTable, table)), /*#__PURE__*/React.createElement("footer", null, buttons));
4280
4292
  };
4281
4293
  /**
4282
4294
  * Table Queries
@@ -4477,20 +4489,20 @@ var TableEditor = function TableEditor(props) {
4477
4489
  }),
4478
4490
  rows: groups[groupName].map(function (item) {
4479
4491
  item.checked = pageContext.checked ? pageContext.checked.has(item.id) : false;
4480
- item.actions = actions ? actions.map(function (_action) {
4481
- return _action.filter ? _action.filter(item) ? /*#__PURE__*/React.createElement(Icon, {
4482
- icon: _action.icon,
4492
+ item.actions = actions ? actions.map(function (_action2) {
4493
+ return _action2.filter ? _action2.filter(item) ? /*#__PURE__*/React.createElement(Icon, {
4494
+ icon: _action2.icon,
4483
4495
  clickable: true,
4484
4496
  size: "small",
4485
4497
  action: function action() {
4486
- return run(_action, item);
4498
+ return run(_action2, item);
4487
4499
  }
4488
4500
  }) : null : /*#__PURE__*/React.createElement(Icon, {
4489
- icon: _action.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
  });
4496
4508
  }) : [];