ywana-core8 0.0.48 → 0.0.52
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 +24 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +24 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +24 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +5 -4
- package/src/html/property.css +3 -0
- package/src/html/property.js +2 -2
- package/src/site/dialog.js +2 -2
package/dist/index.cjs
CHANGED
@@ -696,13 +696,14 @@ var LinearProgress = function LinearProgress(props) {
|
|
696
696
|
*/
|
697
697
|
|
698
698
|
var Property = function Property(props) {
|
699
|
-
var
|
699
|
+
var label = props.label,
|
700
|
+
name = props.name,
|
700
701
|
value = props.value;
|
701
702
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
702
703
|
className: "property"
|
703
704
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
704
705
|
className: "property-name"
|
705
|
-
}, name), /*#__PURE__*/React__default["default"].createElement("div", {
|
706
|
+
}, name || label), /*#__PURE__*/React__default["default"].createElement("div", {
|
706
707
|
className: "property-value"
|
707
708
|
}, value));
|
708
709
|
};
|
@@ -2110,7 +2111,8 @@ var Dialog = function Dialog(props) {
|
|
2110
2111
|
_props$title = props.title,
|
2111
2112
|
title = _props$title === void 0 ? "Dialog" : _props$title,
|
2112
2113
|
children = props.children,
|
2113
|
-
actions = props.actions
|
2114
|
+
actions = props.actions,
|
2115
|
+
className = props.className;
|
2114
2116
|
|
2115
2117
|
function close() {
|
2116
2118
|
site.closeDialog();
|
@@ -2124,7 +2126,7 @@ var Dialog = function Dialog(props) {
|
|
2124
2126
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
2125
2127
|
className: "overlay"
|
2126
2128
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
2127
|
-
className: "dialog",
|
2129
|
+
className: "dialog " + className,
|
2128
2130
|
onClick: close
|
2129
2131
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
2130
2132
|
className: "dialog-panel",
|
@@ -4006,7 +4008,8 @@ var TablePage = function TablePage(props) {
|
|
4006
4008
|
validator = props.validator,
|
4007
4009
|
scenario = props.scenario,
|
4008
4010
|
formFilter = props.formFilter,
|
4009
|
-
tableFilter = props.tableFilter
|
4011
|
+
tableFilter = props.tableFilter,
|
4012
|
+
tableActions = props.tableActions;
|
4010
4013
|
|
4011
4014
|
var _useContext = React.useContext(PageContext),
|
4012
4015
|
pageContext = _useContext[0],
|
@@ -4124,7 +4127,8 @@ var TablePage = function TablePage(props) {
|
|
4124
4127
|
delay: delay,
|
4125
4128
|
editable: editable,
|
4126
4129
|
groupBy: groupBy,
|
4127
|
-
filter: tableFilter
|
4130
|
+
filter: tableFilter,
|
4131
|
+
actions: tableActions
|
4128
4132
|
})), renderAside());
|
4129
4133
|
};
|
4130
4134
|
/**
|
@@ -4221,7 +4225,8 @@ var TableEditor = function TableEditor(props) {
|
|
4221
4225
|
title = props.title,
|
4222
4226
|
schema = props.schema,
|
4223
4227
|
editable = props.editable,
|
4224
|
-
filter = props.filter
|
4228
|
+
filter = props.filter,
|
4229
|
+
actions = props.actions;
|
4225
4230
|
|
4226
4231
|
var _useState3 = React.useState(props.groupBy),
|
4227
4232
|
groupBy = _useState3[0],
|
@@ -4277,14 +4282,24 @@ var TableEditor = function TableEditor(props) {
|
|
4277
4282
|
};
|
4278
4283
|
}),
|
4279
4284
|
rows: groups[groupName].map(function (item) {
|
4280
|
-
item.actions =
|
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);
|
4292
|
+
}
|
4293
|
+
});
|
4294
|
+
}) : [];
|
4295
|
+
item.actions.push( /*#__PURE__*/React__default["default"].createElement(Icon, {
|
4281
4296
|
icon: "delete",
|
4282
4297
|
size: "small",
|
4283
4298
|
clickable: true,
|
4284
4299
|
action: function action() {
|
4285
4300
|
return remove(item.id);
|
4286
4301
|
}
|
4287
|
-
})
|
4302
|
+
}));
|
4288
4303
|
return item;
|
4289
4304
|
})
|
4290
4305
|
};
|