ywana-core8 0.0.690 → 0.0.692
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 +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +14 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +14 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +13 -4
- package/src/incubator/wizard.js +0 -1
package/dist/index.modern.js
CHANGED
@@ -5796,6 +5796,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
5796
5796
|
sorter = props.sorter,
|
5797
5797
|
namer = props.namer,
|
5798
5798
|
editor = props.editor,
|
5799
|
+
editorTitle = props.editorTitle,
|
5799
5800
|
editorActions = props.editorActions,
|
5800
5801
|
footer = props.footer,
|
5801
5802
|
children = props.children;
|
@@ -5894,7 +5895,8 @@ var CollectionPage = function CollectionPage(props) {
|
|
5894
5895
|
onReload: reloadSelection,
|
5895
5896
|
patch: patch,
|
5896
5897
|
onChange: onChange,
|
5897
|
-
actions: editorActions
|
5898
|
+
actions: editorActions,
|
5899
|
+
title: editorTitle
|
5898
5900
|
}), children ? /*#__PURE__*/React.createElement("article", null, children) : null, /*#__PURE__*/React.createElement("footer", null, footer)));
|
5899
5901
|
};
|
5900
5902
|
var CollectionFilters = function CollectionFilters(props) {
|
@@ -6262,6 +6264,7 @@ var CollectionEditor = function CollectionEditor(props) {
|
|
6262
6264
|
|
6263
6265
|
var selected = pageContext.selected;
|
6264
6266
|
var icon = props.icon,
|
6267
|
+
title = props.title,
|
6265
6268
|
schema = props.schema,
|
6266
6269
|
layout = props.layout,
|
6267
6270
|
_props$autosave2 = props.autosave,
|
@@ -6307,6 +6310,14 @@ var CollectionEditor = function CollectionEditor(props) {
|
|
6307
6310
|
return can;
|
6308
6311
|
}
|
6309
6312
|
|
6313
|
+
function renderTitle() {
|
6314
|
+
if (title) {
|
6315
|
+
return typeof title === 'function' ? title(form) : title;
|
6316
|
+
} else {
|
6317
|
+
return selected ? selected.name : "New";
|
6318
|
+
}
|
6319
|
+
}
|
6320
|
+
|
6310
6321
|
function renderEditor() {
|
6311
6322
|
var content = new Content(schema, form);
|
6312
6323
|
|
@@ -6336,7 +6347,7 @@ var CollectionEditor = function CollectionEditor(props) {
|
|
6336
6347
|
|
6337
6348
|
return selected && form ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
|
6338
6349
|
icon: icon,
|
6339
|
-
title:
|
6350
|
+
title: renderTitle()
|
6340
6351
|
}, /*#__PURE__*/React.createElement(Icon, {
|
6341
6352
|
icon: "close",
|
6342
6353
|
clickable: true,
|
@@ -9823,7 +9834,7 @@ var Wizard = function Wizard(props) {
|
|
9823
9834
|
form: form
|
9824
9835
|
}, /*#__PURE__*/React.createElement("div", {
|
9825
9836
|
className: "wizard"
|
9826
|
-
},
|
9837
|
+
}, /*#__PURE__*/React.createElement("div", {
|
9827
9838
|
className: "wizard-steps"
|
9828
9839
|
}, steps.map(function (step, index) {
|
9829
9840
|
var active = index === current;
|