ywana-core8 0.0.691 → 0.0.693
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 +26 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +26 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +26 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +24 -5
package/dist/index.umd.js
CHANGED
@@ -5798,6 +5798,7 @@
|
|
5798
5798
|
sorter = props.sorter,
|
5799
5799
|
namer = props.namer,
|
5800
5800
|
editor = props.editor,
|
5801
|
+
editorTitle = props.editorTitle,
|
5801
5802
|
editorActions = props.editorActions,
|
5802
5803
|
footer = props.footer,
|
5803
5804
|
children = props.children;
|
@@ -5896,7 +5897,8 @@
|
|
5896
5897
|
onReload: reloadSelection,
|
5897
5898
|
patch: patch,
|
5898
5899
|
onChange: onChange,
|
5899
|
-
actions: editorActions
|
5900
|
+
actions: editorActions,
|
5901
|
+
title: editorTitle
|
5900
5902
|
}), children ? /*#__PURE__*/React__default["default"].createElement("article", null, children) : null, /*#__PURE__*/React__default["default"].createElement("footer", null, footer)));
|
5901
5903
|
};
|
5902
5904
|
var CollectionFilters = function CollectionFilters(props) {
|
@@ -6264,6 +6266,7 @@
|
|
6264
6266
|
|
6265
6267
|
var selected = pageContext.selected;
|
6266
6268
|
var icon = props.icon,
|
6269
|
+
title = props.title,
|
6267
6270
|
schema = props.schema,
|
6268
6271
|
layout = props.layout,
|
6269
6272
|
_props$autosave2 = props.autosave,
|
@@ -6309,6 +6312,26 @@
|
|
6309
6312
|
return can;
|
6310
6313
|
}
|
6311
6314
|
|
6315
|
+
function renderTitle() {
|
6316
|
+
if (title) {
|
6317
|
+
return typeof title === 'function' ? title(form) : title;
|
6318
|
+
} else {
|
6319
|
+
return selected ? selected.name : "New";
|
6320
|
+
}
|
6321
|
+
}
|
6322
|
+
|
6323
|
+
function renderActions() {
|
6324
|
+
if (actions) {
|
6325
|
+
return actions.map(function (action) {
|
6326
|
+
// clone React action
|
6327
|
+
var action2 = React__default["default"].cloneElement(action, {
|
6328
|
+
form: form
|
6329
|
+
});
|
6330
|
+
return action2;
|
6331
|
+
});
|
6332
|
+
}
|
6333
|
+
}
|
6334
|
+
|
6312
6335
|
function renderEditor() {
|
6313
6336
|
var content = new Content(schema, form);
|
6314
6337
|
|
@@ -6338,7 +6361,7 @@
|
|
6338
6361
|
|
6339
6362
|
return selected && form ? /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Header, {
|
6340
6363
|
icon: icon,
|
6341
|
-
title:
|
6364
|
+
title: renderTitle()
|
6342
6365
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
6343
6366
|
icon: "close",
|
6344
6367
|
clickable: true,
|
@@ -6354,7 +6377,7 @@
|
|
6354
6377
|
raised: true,
|
6355
6378
|
disabled: !canSave(),
|
6356
6379
|
action: save
|
6357
|
-
}),
|
6380
|
+
}), renderActions()), renderEditor()) : null;
|
6358
6381
|
};
|
6359
6382
|
/**
|
6360
6383
|
* Collection Context
|