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.
@@ -5256,6 +5256,16 @@ function _catch$2(body, recover) {
5256
5256
 
5257
5257
 
5258
5258
  var CollectionPage = function CollectionPage(props) {
5259
+ var reloadSelection = function reloadSelection() {
5260
+ try {
5261
+ return Promise.resolve(pageContext.reloadSelection()).then(function () {
5262
+ setPageContext(Object.assign({}, pageContext));
5263
+ });
5264
+ } catch (e) {
5265
+ return Promise.reject(e);
5266
+ }
5267
+ };
5268
+
5259
5269
  var reload = function reload() {
5260
5270
  try {
5261
5271
  return Promise.resolve(pageContext.load()).then(function () {
@@ -5387,7 +5397,7 @@ var CollectionPage = function CollectionPage(props) {
5387
5397
  delay: delay,
5388
5398
  canDelete: canDelete,
5389
5399
  canEdit: canEdit,
5390
- onReload: reload
5400
+ onReload: reloadSelection
5391
5401
  }), children ? /*#__PURE__*/React.createElement("article", null, children) : null));
5392
5402
  };
5393
5403
  var CollectionFilters = function CollectionFilters(props) {
@@ -5818,6 +5828,17 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5818
5828
  return Promise.reject(e);
5819
5829
  }
5820
5830
  },
5831
+ reloadSelection: function reloadSelection() {
5832
+ try {
5833
+ var _this6 = this;
5834
+
5835
+ return Promise.resolve(_this6.fetch(selected.id)).then(function (result) {
5836
+ _this6.selected = result;
5837
+ });
5838
+ } catch (e) {
5839
+ return Promise.reject(e);
5840
+ }
5841
+ },
5821
5842
  fetch: function fetch(id) {
5822
5843
  try {
5823
5844
  return Promise.resolve(_catch$2(function () {
@@ -5834,11 +5855,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5834
5855
  },
5835
5856
  create: function create(form) {
5836
5857
  try {
5837
- var _this6 = this;
5858
+ var _this8 = this;
5838
5859
 
5839
5860
  var _temp6 = _catch$2(function () {
5840
5861
  return Promise.resolve(API.create(form)).then(function () {
5841
- return Promise.resolve(_this6.load()).then(function () {});
5862
+ return Promise.resolve(_this8.load()).then(function () {});
5842
5863
  });
5843
5864
  }, function (error) {
5844
5865
  console.log(error);
@@ -5851,11 +5872,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5851
5872
  },
5852
5873
  update: function update(form) {
5853
5874
  try {
5854
- var _this8 = this;
5875
+ var _this10 = this;
5855
5876
 
5856
5877
  var _temp8 = _catch$2(function () {
5857
5878
  return Promise.resolve(API.update(form)).then(function () {
5858
- return Promise.resolve(_this8.load()).then(function () {});
5879
+ return Promise.resolve(_this10.load()).then(function () {});
5859
5880
  });
5860
5881
  }, function (error) {
5861
5882
  console.log(error);
@@ -5868,11 +5889,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5868
5889
  },
5869
5890
  patch: function patch(id, form) {
5870
5891
  try {
5871
- var _this10 = this;
5892
+ var _this12 = this;
5872
5893
 
5873
5894
  var _temp10 = _catch$2(function () {
5874
5895
  return Promise.resolve(API.patch(id, form)).then(function () {
5875
- return Promise.resolve(_this10.load()).then(function () {});
5896
+ return Promise.resolve(_this12.load()).then(function () {});
5876
5897
  });
5877
5898
  }, function (error) {
5878
5899
  console.log(error);
@@ -5885,11 +5906,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5885
5906
  },
5886
5907
  updateProperty: function updateProperty(id, propertyName, form) {
5887
5908
  try {
5888
- var _this12 = this;
5909
+ var _this14 = this;
5889
5910
 
5890
5911
  var _temp12 = _catch$2(function () {
5891
5912
  return Promise.resolve(API.updateProperty(id, propertyName, form)).then(function () {
5892
- return Promise.resolve(_this12.load()).then(function () {});
5913
+ return Promise.resolve(_this14.load()).then(function () {});
5893
5914
  });
5894
5915
  }, function (error) {
5895
5916
  console.log(error);
@@ -5902,11 +5923,11 @@ var CollectionContext = function CollectionContext(url, field, host, page, fetch
5902
5923
  },
5903
5924
  remove: function remove(id) {
5904
5925
  try {
5905
- var _this14 = this;
5926
+ var _this16 = this;
5906
5927
 
5907
5928
  var _temp14 = _catch$2(function () {
5908
5929
  return Promise.resolve(API.remove(id)).then(function () {
5909
- return Promise.resolve(_this14.load()).then(function () {});
5930
+ return Promise.resolve(_this16.load()).then(function () {});
5910
5931
  });
5911
5932
  }, function (error) {
5912
5933
  console.log(error);