ywana-core8 0.0.50 → 0.0.51

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
@@ -4007,7 +4007,8 @@ var TablePage = function TablePage(props) {
4007
4007
  validator = props.validator,
4008
4008
  scenario = props.scenario,
4009
4009
  formFilter = props.formFilter,
4010
- tableFilter = props.tableFilter;
4010
+ tableFilter = props.tableFilter,
4011
+ tableActions = props.tableActions;
4011
4012
 
4012
4013
  var _useContext = React.useContext(PageContext),
4013
4014
  pageContext = _useContext[0],
@@ -4125,7 +4126,8 @@ var TablePage = function TablePage(props) {
4125
4126
  delay: delay,
4126
4127
  editable: editable,
4127
4128
  groupBy: groupBy,
4128
- filter: tableFilter
4129
+ filter: tableFilter,
4130
+ actions: tableActions
4129
4131
  })), renderAside());
4130
4132
  };
4131
4133
  /**
@@ -4222,7 +4224,8 @@ var TableEditor = function TableEditor(props) {
4222
4224
  title = props.title,
4223
4225
  schema = props.schema,
4224
4226
  editable = props.editable,
4225
- filter = props.filter;
4227
+ filter = props.filter,
4228
+ actions = props.actions;
4226
4229
 
4227
4230
  var _useState3 = React.useState(props.groupBy),
4228
4231
  groupBy = _useState3[0],
@@ -4278,14 +4281,24 @@ var TableEditor = function TableEditor(props) {
4278
4281
  };
4279
4282
  }),
4280
4283
  rows: groups[groupName].map(function (item) {
4281
- item.actions = [/*#__PURE__*/React__default["default"].createElement(Icon, {
4284
+ item.actions = actions ? actions.map(function (_action) {
4285
+ return /*#__PURE__*/React__default["default"].createElement(Icon, {
4286
+ icon: _action.icon,
4287
+ clickable: true,
4288
+ size: "small",
4289
+ action: function action() {
4290
+ _action.action(item.id);
4291
+ }
4292
+ });
4293
+ }) : [];
4294
+ item.actions.push( /*#__PURE__*/React__default["default"].createElement(Icon, {
4282
4295
  icon: "delete",
4283
4296
  size: "small",
4284
4297
  clickable: true,
4285
4298
  action: function action() {
4286
4299
  return remove(item.id);
4287
4300
  }
4288
- })];
4301
+ }));
4289
4302
  return item;
4290
4303
  })
4291
4304
  };