ywana-core8 0.0.49 → 0.0.53

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.umd.js CHANGED
@@ -2111,7 +2111,8 @@
2111
2111
  _props$title = props.title,
2112
2112
  title = _props$title === void 0 ? "Dialog" : _props$title,
2113
2113
  children = props.children,
2114
- actions = props.actions;
2114
+ actions = props.actions,
2115
+ className = props.className;
2115
2116
 
2116
2117
  function close() {
2117
2118
  site.closeDialog();
@@ -2125,7 +2126,7 @@
2125
2126
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
2126
2127
  className: "overlay"
2127
2128
  }), /*#__PURE__*/React__default["default"].createElement("div", {
2128
- className: "dialog",
2129
+ className: "dialog " + className,
2129
2130
  onClick: close
2130
2131
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2131
2132
  className: "dialog-panel",
@@ -4007,7 +4008,8 @@
4007
4008
  validator = props.validator,
4008
4009
  scenario = props.scenario,
4009
4010
  formFilter = props.formFilter,
4010
- tableFilter = props.tableFilter;
4011
+ tableFilter = props.tableFilter,
4012
+ tableActions = props.tableActions;
4011
4013
 
4012
4014
  var _useContext = React.useContext(PageContext),
4013
4015
  pageContext = _useContext[0],
@@ -4125,7 +4127,8 @@
4125
4127
  delay: delay,
4126
4128
  editable: editable,
4127
4129
  groupBy: groupBy,
4128
- filter: tableFilter
4130
+ filter: tableFilter,
4131
+ actions: tableActions
4129
4132
  })), renderAside());
4130
4133
  };
4131
4134
  /**
@@ -4222,7 +4225,8 @@
4222
4225
  title = props.title,
4223
4226
  schema = props.schema,
4224
4227
  editable = props.editable,
4225
- filter = props.filter;
4228
+ filter = props.filter,
4229
+ actions = props.actions;
4226
4230
 
4227
4231
  var _useState3 = React.useState(props.groupBy),
4228
4232
  groupBy = _useState3[0],
@@ -4278,14 +4282,24 @@
4278
4282
  };
4279
4283
  }),
4280
4284
  rows: groups[groupName].map(function (item) {
4281
- item.actions = [/*#__PURE__*/React__default["default"].createElement(Icon, {
4285
+ item.actions = actions ? actions.map(function (_action) {
4286
+ return /*#__PURE__*/React__default["default"].createElement(Icon, {
4287
+ icon: _action.icon,
4288
+ clickable: true,
4289
+ size: "small",
4290
+ action: function action() {
4291
+ _action.action(item.id, pageContext);
4292
+ }
4293
+ });
4294
+ }) : [];
4295
+ item.actions.push( /*#__PURE__*/React__default["default"].createElement(Icon, {
4282
4296
  icon: "delete",
4283
4297
  size: "small",
4284
4298
  clickable: true,
4285
4299
  action: function action() {
4286
4300
  return remove(item.id);
4287
4301
  }
4288
- })];
4302
+ }));
4289
4303
  return item;
4290
4304
  })
4291
4305
  };