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