ywana-core8 0.0.84 → 0.0.88
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 +10 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +10 -11
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +19 -16
- package/src/html/list.js +2 -2
package/dist/index.modern.js
CHANGED
@@ -515,12 +515,12 @@ var GroupedList = function GroupedList(props) {
|
|
515
515
|
groupBy = props.groupBy;
|
516
516
|
var groups = items.reduce(function (groups, item) {
|
517
517
|
var group = groups.find(function (g) {
|
518
|
-
return g.name === item
|
518
|
+
return g.name === item[groupBy];
|
519
519
|
});
|
520
520
|
|
521
521
|
if (!group) {
|
522
522
|
group = {
|
523
|
-
name: item
|
523
|
+
name: item[groupBy],
|
524
524
|
items: []
|
525
525
|
};
|
526
526
|
groups.push(group);
|
@@ -2579,25 +2579,24 @@ var ContentEditor = function ContentEditor(_ref) {
|
|
2579
2579
|
var sections = content.sections();
|
2580
2580
|
return /*#__PURE__*/React.createElement("div", {
|
2581
2581
|
className: "content-editor"
|
2582
|
-
}, sections.
|
2583
|
-
return section.fields && 0 < section.fields.length;
|
2584
|
-
}).map(function (section) {
|
2582
|
+
}, sections.map(function (section) {
|
2585
2583
|
var title = section.title,
|
2586
2584
|
fields = section.fields;
|
2587
|
-
|
2588
|
-
key: title
|
2589
|
-
}, /*#__PURE__*/React.createElement("header", null, title), /*#__PURE__*/React.createElement("main", null, fields.filter(function (field) {
|
2585
|
+
var filtered = fields.filter(function (field) {
|
2590
2586
|
return field.id !== 'id';
|
2591
2587
|
}).filter(function (field) {
|
2592
2588
|
return filter ? filter(field, content) : true;
|
2593
|
-
})
|
2589
|
+
});
|
2590
|
+
return filtered.length > 0 ? /*#__PURE__*/React.createElement("section", {
|
2591
|
+
key: title
|
2592
|
+
}, /*#__PURE__*/React.createElement("header", null, title), /*#__PURE__*/React.createElement("main", null, filtered.map(function (field) {
|
2594
2593
|
return /*#__PURE__*/React.createElement(FieldEditor, {
|
2595
2594
|
key: field.id,
|
2596
2595
|
field: field,
|
2597
2596
|
onChange: change,
|
2598
2597
|
outlined: true
|
2599
2598
|
});
|
2600
|
-
})));
|
2599
|
+
}))) : null;
|
2601
2600
|
}));
|
2602
2601
|
};
|
2603
2602
|
/**
|
@@ -3185,7 +3184,7 @@ var CollectionAdder = function CollectionAdder(_ref11) {
|
|
3185
3184
|
editable: true
|
3186
3185
|
})) : /*#__PURE__*/React.createElement(Button$1, {
|
3187
3186
|
icon: "add",
|
3188
|
-
label: "
|
3187
|
+
label: "A\xF1adir",
|
3189
3188
|
action: toggle
|
3190
3189
|
}));
|
3191
3190
|
};
|