ywana-core8 0.0.54 → 0.0.58
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 +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +17 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +17 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +8 -2
- package/src/html/button.js +1 -1
- package/src/html/icon.js +1 -1
package/dist/index.cjs
CHANGED
@@ -156,7 +156,7 @@ var Icon = function Icon(_ref) {
|
|
156
156
|
function click(event) {
|
157
157
|
event.stopPropagation();
|
158
158
|
event.preventDefault();
|
159
|
-
if (action) action();
|
159
|
+
if (action) action(event);
|
160
160
|
}
|
161
161
|
|
162
162
|
var clicker = clickable ? "clickable" : "";
|
@@ -194,7 +194,9 @@ var Button$1 = function Button(_ref) {
|
|
194
194
|
onClick: click
|
195
195
|
}, icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
196
196
|
icon: icon,
|
197
|
-
size: "small"
|
197
|
+
size: "small",
|
198
|
+
clickable: true,
|
199
|
+
action: click
|
198
200
|
}) : null, /*#__PURE__*/React__default["default"].createElement("span", null, label));
|
199
201
|
};
|
200
202
|
|
@@ -4253,6 +4255,18 @@ var TableEditor = function TableEditor(props) {
|
|
4253
4255
|
setPageContext(Object.assign({}, pageContext));
|
4254
4256
|
}
|
4255
4257
|
|
4258
|
+
function run(action) {
|
4259
|
+
action.action(item.id, pageContext, function () {
|
4260
|
+
try {
|
4261
|
+
return Promise.resolve(pageContext.load()).then(function () {
|
4262
|
+
setPageContext(Object.assign({}, pageContext));
|
4263
|
+
});
|
4264
|
+
} catch (e) {
|
4265
|
+
return Promise.reject(e);
|
4266
|
+
}
|
4267
|
+
});
|
4268
|
+
}
|
4269
|
+
|
4256
4270
|
function renderGroups() {
|
4257
4271
|
var items = filter ? filter(all) : all;
|
4258
4272
|
var groups = items.reduce(function (groups, filter) {
|
@@ -4288,7 +4302,7 @@ var TableEditor = function TableEditor(props) {
|
|
4288
4302
|
clickable: true,
|
4289
4303
|
size: "small",
|
4290
4304
|
action: function action() {
|
4291
|
-
_action
|
4305
|
+
return run(_action);
|
4292
4306
|
}
|
4293
4307
|
});
|
4294
4308
|
}) : [];
|