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.
@@ -4001,7 +4001,8 @@ var TablePage = function TablePage(props) {
4001
4001
  validator = props.validator,
4002
4002
  scenario = props.scenario,
4003
4003
  formFilter = props.formFilter,
4004
- tableFilter = props.tableFilter;
4004
+ tableFilter = props.tableFilter,
4005
+ tableActions = props.tableActions;
4005
4006
 
4006
4007
  var _useContext = useContext(PageContext),
4007
4008
  pageContext = _useContext[0],
@@ -4119,7 +4120,8 @@ var TablePage = function TablePage(props) {
4119
4120
  delay: delay,
4120
4121
  editable: editable,
4121
4122
  groupBy: groupBy,
4122
- filter: tableFilter
4123
+ filter: tableFilter,
4124
+ actions: tableActions
4123
4125
  })), renderAside());
4124
4126
  };
4125
4127
  /**
@@ -4216,7 +4218,8 @@ var TableEditor = function TableEditor(props) {
4216
4218
  title = props.title,
4217
4219
  schema = props.schema,
4218
4220
  editable = props.editable,
4219
- filter = props.filter;
4221
+ filter = props.filter,
4222
+ actions = props.actions;
4220
4223
 
4221
4224
  var _useState3 = useState(props.groupBy),
4222
4225
  groupBy = _useState3[0],
@@ -4272,14 +4275,24 @@ var TableEditor = function TableEditor(props) {
4272
4275
  };
4273
4276
  }),
4274
4277
  rows: groups[groupName].map(function (item) {
4275
- item.actions = [/*#__PURE__*/React.createElement(Icon, {
4278
+ item.actions = actions ? actions.map(function (_action) {
4279
+ return /*#__PURE__*/React.createElement(Icon, {
4280
+ icon: _action.icon,
4281
+ clickable: true,
4282
+ size: "small",
4283
+ action: function action() {
4284
+ _action.action(item.id);
4285
+ }
4286
+ });
4287
+ }) : [];
4288
+ item.actions.push( /*#__PURE__*/React.createElement(Icon, {
4276
4289
  icon: "delete",
4277
4290
  size: "small",
4278
4291
  clickable: true,
4279
4292
  action: function action() {
4280
4293
  return remove(item.id);
4281
4294
  }
4282
- })];
4295
+ }));
4283
4296
  return item;
4284
4297
  })
4285
4298
  };