ywana-core8 0.0.800 → 0.0.802
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 +18 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +18 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +18 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +2 -2
- package/src/domain2/CollectionContext.js +9 -1
- package/src/domain2/CollectionList.css +15 -0
- package/src/domain2/CollectionList.js +3 -2
package/dist/index.cjs
CHANGED
@@ -5679,7 +5679,9 @@ var EntityEditor = function EntityEditor(_ref6) {
|
|
5679
5679
|
onChange = _ref6.onChange;
|
5680
5680
|
var id = field.id,
|
5681
5681
|
item = field.item,
|
5682
|
-
label = field.label
|
5682
|
+
label = field.label,
|
5683
|
+
_field$outlined = field.outlined,
|
5684
|
+
outlined = _field$outlined === void 0 ? false : _field$outlined;
|
5683
5685
|
var content = new Content(item, value);
|
5684
5686
|
|
5685
5687
|
function change(fid, value) {
|
@@ -5725,7 +5727,7 @@ var EntityEditor = function EntityEditor(_ref6) {
|
|
5725
5727
|
key: field.id,
|
5726
5728
|
field: field,
|
5727
5729
|
onChange: change,
|
5728
|
-
outlined:
|
5730
|
+
outlined: outlined,
|
5729
5731
|
content: content
|
5730
5732
|
});
|
5731
5733
|
}))) : null;
|
@@ -11022,9 +11024,11 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
11022
11024
|
return data
|
11023
11025
|
}
|
11024
11026
|
*/
|
11027
|
+
setLoading(true);
|
11025
11028
|
return Promise.resolve(_catch(function () {
|
11026
11029
|
return Promise.resolve(API.all(filters, likes, page)).then(function (response) {
|
11027
|
-
var next = field ? response[field] : response;
|
11030
|
+
var next = field ? response[field] : response;
|
11031
|
+
setLoading(false); //const data = runCustomFilters(next)
|
11028
11032
|
//return data
|
11029
11033
|
|
11030
11034
|
_exit2 = 1;
|
@@ -11032,6 +11036,7 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
11032
11036
|
});
|
11033
11037
|
}, function (error) {
|
11034
11038
|
console.log(error);
|
11039
|
+
setLoading(false);
|
11035
11040
|
}));
|
11036
11041
|
} catch (e) {
|
11037
11042
|
return Promise.reject(e);
|
@@ -11078,6 +11083,10 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
11078
11083
|
selected = _useState7[0],
|
11079
11084
|
setSelected = _useState7[1];
|
11080
11085
|
|
11086
|
+
var _useState8 = React.useState(false),
|
11087
|
+
loading = _useState8[0],
|
11088
|
+
setLoading = _useState8[1];
|
11089
|
+
|
11081
11090
|
React.useEffect(function () {
|
11082
11091
|
var mounted = true;
|
11083
11092
|
|
@@ -11093,7 +11102,6 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
11093
11102
|
};
|
11094
11103
|
}, [filters]);
|
11095
11104
|
React.useEffect(function () {
|
11096
|
-
console.log("Run custom filters", customFilters, all);
|
11097
11105
|
if (all.length > 0) runCustomFilters();
|
11098
11106
|
}, [all, customFilters]);
|
11099
11107
|
|
@@ -11111,6 +11119,7 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
11111
11119
|
|
11112
11120
|
var value = {
|
11113
11121
|
all: all,
|
11122
|
+
loading: loading,
|
11114
11123
|
load: load,
|
11115
11124
|
reload: reload,
|
11116
11125
|
selected: selected,
|
@@ -11407,7 +11416,8 @@ var CollectionList = function CollectionList(props) {
|
|
11407
11416
|
var context = React.useContext(CollectionContext);
|
11408
11417
|
var _context$filtered = context.filtered,
|
11409
11418
|
filtered = _context$filtered === void 0 ? [] : _context$filtered,
|
11410
|
-
selected = context.selected
|
11419
|
+
selected = context.selected,
|
11420
|
+
loading = context.loading;
|
11411
11421
|
|
11412
11422
|
var _useState = React.useState(''),
|
11413
11423
|
search = _useState[0],
|
@@ -11459,7 +11469,9 @@ var CollectionList = function CollectionList(props) {
|
|
11459
11469
|
}), /*#__PURE__*/React__default["default"].createElement(TextField, {
|
11460
11470
|
onChange: changeSearch,
|
11461
11471
|
outlined: true
|
11462
|
-
})) : null
|
11472
|
+
})) : null, loading ? /*#__PURE__*/React__default["default"].createElement("div", {
|
11473
|
+
className: "loading"
|
11474
|
+
}, /*#__PURE__*/React__default["default"].createElement(CircularProgress, null)) : null);
|
11463
11475
|
};
|
11464
11476
|
|
11465
11477
|
/**
|