ywana-core8 0.0.477 → 0.0.478
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 +27 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +27 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +27 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +30 -3
package/dist/index.modern.js
CHANGED
@@ -4666,7 +4666,7 @@ function _catch$2(body, recover) {
|
|
4666
4666
|
return result;
|
4667
4667
|
}
|
4668
4668
|
/**
|
4669
|
-
* Collection
|
4669
|
+
* Collection Filters
|
4670
4670
|
*/
|
4671
4671
|
|
4672
4672
|
|
@@ -4695,15 +4695,20 @@ var CollectionPage = function CollectionPage(props) {
|
|
4695
4695
|
page = props.page,
|
4696
4696
|
_props$fetching = props.fetching,
|
4697
4697
|
fetching = _props$fetching === void 0 ? false : _props$fetching,
|
4698
|
-
|
4699
|
-
|
4698
|
+
_props$actions = props.actions,
|
4699
|
+
actions = _props$actions === void 0 ? [] : _props$actions,
|
4700
|
+
onSelect = props.onSelect,
|
4701
|
+
_props$canFilter = props.canFilter,
|
4702
|
+
canFilter = _props$canFilter === void 0 ? false : _props$canFilter,
|
4703
|
+
_props$canAdd = props.canAdd,
|
4704
|
+
canAdd = _props$canAdd === void 0 ? false : _props$canAdd,
|
4700
4705
|
_props$autosave = props.autosave,
|
4701
4706
|
autosave = _props$autosave === void 0 ? false : _props$autosave,
|
4702
4707
|
_props$delay = props.delay,
|
4703
4708
|
delay = _props$delay === void 0 ? 1000 : _props$delay,
|
4704
|
-
|
4709
|
+
groupBy = props.groupBy,
|
4705
4710
|
levels = props.levels,
|
4706
|
-
|
4711
|
+
editor = props.editor,
|
4707
4712
|
children = props.children;
|
4708
4713
|
|
4709
4714
|
var _useContext = useContext(PageContext),
|
@@ -4755,11 +4760,11 @@ var CollectionPage = function CollectionPage(props) {
|
|
4755
4760
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
|
4756
4761
|
className: "collection-page",
|
4757
4762
|
title: /*#__PURE__*/React.createElement(Text, null, title)
|
4758
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
4763
|
+
}, canAdd ? /*#__PURE__*/React.createElement(Button, {
|
4759
4764
|
icon: "add",
|
4760
4765
|
label: "Add",
|
4761
4766
|
action: add
|
4762
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
4767
|
+
}) : false, "\xA0", /*#__PURE__*/React.createElement(Button, {
|
4763
4768
|
icon: "refresh",
|
4764
4769
|
label: "Reload",
|
4765
4770
|
action: reload
|
@@ -4767,7 +4772,9 @@ var CollectionPage = function CollectionPage(props) {
|
|
4767
4772
|
className: "collection-page"
|
4768
4773
|
}, /*#__PURE__*/React.createElement(Header, {
|
4769
4774
|
title: /*#__PURE__*/React.createElement(Text, null, "Lista de ", name)
|
4770
|
-
}),
|
4775
|
+
}), canFilter ? /*#__PURE__*/React.createElement(CollectionFilters, {
|
4776
|
+
schema: schema
|
4777
|
+
}) : null, levels ? /*#__PURE__*/React.createElement(CollectionTree, {
|
4771
4778
|
levels: levels,
|
4772
4779
|
onSelect: onSelect
|
4773
4780
|
}) : /*#__PURE__*/React.createElement(CollectionList, {
|
@@ -4785,6 +4792,16 @@ var CollectionPage = function CollectionPage(props) {
|
|
4785
4792
|
}), children ? /*#__PURE__*/React.createElement("article", null, children) : null));
|
4786
4793
|
};
|
4787
4794
|
|
4795
|
+
var CollectionFilters = function CollectionFilters(props) {
|
4796
|
+
return /*#__PURE__*/React.createElement("div", {
|
4797
|
+
className: "collection-filters"
|
4798
|
+
}, "TODO: filters");
|
4799
|
+
};
|
4800
|
+
/**
|
4801
|
+
* Collection List
|
4802
|
+
*/
|
4803
|
+
|
4804
|
+
|
4788
4805
|
var CollectionList = function CollectionList(props) {
|
4789
4806
|
var select = function select(id) {
|
4790
4807
|
try {
|
@@ -4816,7 +4833,8 @@ var CollectionList = function CollectionList(props) {
|
|
4816
4833
|
var items = all ? all.map(function (content) {
|
4817
4834
|
return {
|
4818
4835
|
id: content.id,
|
4819
|
-
line1: content.name,
|
4836
|
+
line1: content.name || content.centre,
|
4837
|
+
// centre: Signflow legacy
|
4820
4838
|
line2: content.description,
|
4821
4839
|
content: content
|
4822
4840
|
};
|