ywana-core8 0.0.807 → 0.0.808
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 +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +8 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +8 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +6 -5
package/dist/index.cjs
CHANGED
@@ -6766,6 +6766,7 @@ var CollectionPage$1 = function CollectionPage(props) {
|
|
6766
6766
|
editor = props.editor,
|
6767
6767
|
editorTitle = props.editorTitle,
|
6768
6768
|
editorActions = props.editorActions,
|
6769
|
+
editValidator = props.editValidator,
|
6769
6770
|
listItemRenderer = props.listItemRenderer,
|
6770
6771
|
filters = props.filters,
|
6771
6772
|
footer = props.footer,
|
@@ -6869,7 +6870,8 @@ var CollectionPage$1 = function CollectionPage(props) {
|
|
6869
6870
|
patch: patch,
|
6870
6871
|
onChange: onChange,
|
6871
6872
|
actions: editorActions,
|
6872
|
-
title: editorTitle
|
6873
|
+
title: editorTitle,
|
6874
|
+
validator: editValidator
|
6873
6875
|
}), children ? /*#__PURE__*/React__default["default"].createElement("article", null, children) : null, /*#__PURE__*/React__default["default"].createElement("footer", null, footer)));
|
6874
6876
|
};
|
6875
6877
|
var CollectionFilters$1 = function CollectionFilters(props) {
|
@@ -7274,7 +7276,8 @@ var CollectionEditor$1 = function CollectionEditor(props) {
|
|
7274
7276
|
onChange = props.onChange,
|
7275
7277
|
_props$patch2 = props.patch,
|
7276
7278
|
patch = _props$patch2 === void 0 ? false : _props$patch2,
|
7277
|
-
actions = props.actions
|
7279
|
+
actions = props.actions,
|
7280
|
+
validator = props.validator;
|
7278
7281
|
var timer = React.useRef(null);
|
7279
7282
|
|
7280
7283
|
var _useState5 = React.useState(selected),
|
@@ -7303,8 +7306,9 @@ var CollectionEditor$1 = function CollectionEditor(props) {
|
|
7303
7306
|
}
|
7304
7307
|
|
7305
7308
|
function canSave() {
|
7306
|
-
var
|
7307
|
-
|
7309
|
+
var hasChanged = !equal__default["default"](form, selected);
|
7310
|
+
var isValid = validator ? validator(form) : true;
|
7311
|
+
return hasChanged && isValid;
|
7308
7312
|
}
|
7309
7313
|
|
7310
7314
|
function renderTitle() {
|