ywana-core8 0.0.562 → 0.0.563
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 +32 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +32 -11
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +32 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +17 -7
package/dist/index.cjs
CHANGED
@@ -5264,6 +5264,16 @@ function _catch$2(body, recover) {
|
|
5264
5264
|
|
5265
5265
|
|
5266
5266
|
var CollectionPage = function CollectionPage(props) {
|
5267
|
+
var reloadSelection = function reloadSelection() {
|
5268
|
+
try {
|
5269
|
+
return Promise.resolve(pageContext.reloadSelection()).then(function () {
|
5270
|
+
setPageContext(Object.assign({}, pageContext));
|
5271
|
+
});
|
5272
|
+
} catch (e) {
|
5273
|
+
return Promise.reject(e);
|
5274
|
+
}
|
5275
|
+
};
|
5276
|
+
|
5267
5277
|
var reload = function reload() {
|
5268
5278
|
try {
|
5269
5279
|
return Promise.resolve(pageContext.load()).then(function () {
|
@@ -5395,7 +5405,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
5395
5405
|
delay: delay,
|
5396
5406
|
canDelete: canDelete,
|
5397
5407
|
canEdit: canEdit,
|
5398
|
-
onReload:
|
5408
|
+
onReload: reloadSelection
|
5399
5409
|
}), children ? /*#__PURE__*/React__default["default"].createElement("article", null, children) : null));
|
5400
5410
|
};
|
5401
5411
|
var CollectionFilters = function CollectionFilters(props) {
|
@@ -5826,6 +5836,17 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5826
5836
|
return Promise.reject(e);
|
5827
5837
|
}
|
5828
5838
|
},
|
5839
|
+
reloadSelection: function reloadSelection() {
|
5840
|
+
try {
|
5841
|
+
var _this6 = this;
|
5842
|
+
|
5843
|
+
return Promise.resolve(_this6.fetch(selected.id)).then(function (result) {
|
5844
|
+
_this6.selected = result;
|
5845
|
+
});
|
5846
|
+
} catch (e) {
|
5847
|
+
return Promise.reject(e);
|
5848
|
+
}
|
5849
|
+
},
|
5829
5850
|
fetch: function fetch(id) {
|
5830
5851
|
try {
|
5831
5852
|
return Promise.resolve(_catch$2(function () {
|
@@ -5842,11 +5863,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5842
5863
|
},
|
5843
5864
|
create: function create(form) {
|
5844
5865
|
try {
|
5845
|
-
var
|
5866
|
+
var _this8 = this;
|
5846
5867
|
|
5847
5868
|
var _temp6 = _catch$2(function () {
|
5848
5869
|
return Promise.resolve(API.create(form)).then(function () {
|
5849
|
-
return Promise.resolve(
|
5870
|
+
return Promise.resolve(_this8.load()).then(function () {});
|
5850
5871
|
});
|
5851
5872
|
}, function (error) {
|
5852
5873
|
console.log(error);
|
@@ -5859,11 +5880,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5859
5880
|
},
|
5860
5881
|
update: function update(form) {
|
5861
5882
|
try {
|
5862
|
-
var
|
5883
|
+
var _this10 = this;
|
5863
5884
|
|
5864
5885
|
var _temp8 = _catch$2(function () {
|
5865
5886
|
return Promise.resolve(API.update(form)).then(function () {
|
5866
|
-
return Promise.resolve(
|
5887
|
+
return Promise.resolve(_this10.load()).then(function () {});
|
5867
5888
|
});
|
5868
5889
|
}, function (error) {
|
5869
5890
|
console.log(error);
|
@@ -5876,11 +5897,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5876
5897
|
},
|
5877
5898
|
patch: function patch(id, form) {
|
5878
5899
|
try {
|
5879
|
-
var
|
5900
|
+
var _this12 = this;
|
5880
5901
|
|
5881
5902
|
var _temp10 = _catch$2(function () {
|
5882
5903
|
return Promise.resolve(API.patch(id, form)).then(function () {
|
5883
|
-
return Promise.resolve(
|
5904
|
+
return Promise.resolve(_this12.load()).then(function () {});
|
5884
5905
|
});
|
5885
5906
|
}, function (error) {
|
5886
5907
|
console.log(error);
|
@@ -5893,11 +5914,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5893
5914
|
},
|
5894
5915
|
updateProperty: function updateProperty(id, propertyName, form) {
|
5895
5916
|
try {
|
5896
|
-
var
|
5917
|
+
var _this14 = this;
|
5897
5918
|
|
5898
5919
|
var _temp12 = _catch$2(function () {
|
5899
5920
|
return Promise.resolve(API.updateProperty(id, propertyName, form)).then(function () {
|
5900
|
-
return Promise.resolve(
|
5921
|
+
return Promise.resolve(_this14.load()).then(function () {});
|
5901
5922
|
});
|
5902
5923
|
}, function (error) {
|
5903
5924
|
console.log(error);
|
@@ -5910,11 +5931,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
|
|
5910
5931
|
},
|
5911
5932
|
remove: function remove(id) {
|
5912
5933
|
try {
|
5913
|
-
var
|
5934
|
+
var _this16 = this;
|
5914
5935
|
|
5915
5936
|
var _temp14 = _catch$2(function () {
|
5916
5937
|
return Promise.resolve(API.remove(id)).then(function () {
|
5917
|
-
return Promise.resolve(
|
5938
|
+
return Promise.resolve(_this16.load()).then(function () {});
|
5918
5939
|
});
|
5919
5940
|
}, function (error) {
|
5920
5941
|
console.log(error);
|