ywana-core8 0.0.281 → 0.0.282

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.umd.js CHANGED
@@ -4455,7 +4455,7 @@
4455
4455
  return result;
4456
4456
  }
4457
4457
 
4458
- var http$1 = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4458
+ var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4459
4459
  /**
4460
4460
  * Collection Page
4461
4461
  */
@@ -4967,29 +4967,29 @@
4967
4967
  queryParams = queryParams.concat(filterQuery);
4968
4968
  }
4969
4969
 
4970
- return http$1.GET(url);
4970
+ return http.GET(url);
4971
4971
  },
4972
4972
  find: function find(id) {
4973
- return http$1.GET(url + "/" + id);
4973
+ return http.GET(url + "/" + id);
4974
4974
  },
4975
4975
  create: function create(form) {
4976
4976
  var body = JSON.stringify(form);
4977
- return http$1.POST(url, body);
4977
+ return http.POST(url, body);
4978
4978
  },
4979
4979
  update: function update(form) {
4980
4980
  var body = JSON.stringify(form);
4981
- return http$1.PUT(url + "/" + form.id, body);
4981
+ return http.PUT(url + "/" + form.id, body);
4982
4982
  },
4983
4983
  patch: function patch(id, form) {
4984
4984
  var body = JSON.stringify(form);
4985
- return http$1.PATCH(url + "/" + id, body);
4985
+ return http.PATCH(url + "/" + id, body);
4986
4986
  },
4987
4987
  updateProperty: function updateProperty(id, propertyName, form) {
4988
4988
  var body = JSON.stringify(form);
4989
- return http$1.PUT(url + "/" + id + "/" + propertyName, body);
4989
+ return http.PUT(url + "/" + id + "/" + propertyName, body);
4990
4990
  },
4991
4991
  remove: function remove(id) {
4992
- return http$1.DELETE(url + "/" + id);
4992
+ return http.DELETE(url + "/" + id);
4993
4993
  }
4994
4994
  };
4995
4995
  };
@@ -5078,6 +5078,10 @@
5078
5078
  })));
5079
5079
  };
5080
5080
 
5081
+ /**
5082
+ * Table Page
5083
+ */
5084
+
5081
5085
  function _catch(body, recover) {
5082
5086
  try {
5083
5087
  var result = body();
@@ -5091,12 +5095,11 @@
5091
5095
 
5092
5096
  return result;
5093
5097
  }
5094
-
5095
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
5096
5098
  /**
5097
- * Table Page
5099
+ * TableRowEditor
5098
5100
  */
5099
5101
 
5102
+
5100
5103
  var TablePage = function TablePage(props) {
5101
5104
  var playScenario = function playScenario() {
5102
5105
  try {
@@ -5156,6 +5159,7 @@
5156
5159
  schema = props.schema,
5157
5160
  url = props.url,
5158
5161
  field = props.field,
5162
+ host = props.host,
5159
5163
  _props$autosave = props.autosave,
5160
5164
  autosave = _props$autosave === void 0 ? true : _props$autosave,
5161
5165
  _props$delay = props.delay,
@@ -5210,7 +5214,7 @@
5210
5214
  }, [form]);
5211
5215
  React.useEffect(function () {
5212
5216
  try {
5213
- var context = TableContext(url, field);
5217
+ var context = TableContext(url, field, host);
5214
5218
  return Promise.resolve(context.load()).then(function () {
5215
5219
  setPageContext(context);
5216
5220
  });
@@ -5322,9 +5326,6 @@
5322
5326
  canDelete: canDelete
5323
5327
  })), renderAside());
5324
5328
  };
5325
- /**
5326
- * TableRowEditor
5327
- */
5328
5329
 
5329
5330
  var TableRowEditor = function TableRowEditor(props) {
5330
5331
  var name = props.name,
@@ -5706,8 +5707,8 @@
5706
5707
  * Table Context
5707
5708
  */
5708
5709
 
5709
- var TableContext = function TableContext(url, field) {
5710
- var API = TableAPI(url);
5710
+ var TableContext = function TableContext(url, field, host) {
5711
+ var API = TableAPI(url, host);
5711
5712
  return {
5712
5713
  all: [],
5713
5714
  checked: new Set([]),
@@ -5822,7 +5823,8 @@
5822
5823
  */
5823
5824
 
5824
5825
 
5825
- var TableAPI = function TableAPI(url) {
5826
+ var TableAPI = function TableAPI(url, host) {
5827
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
5826
5828
  return {
5827
5829
  all: function all(filters) {
5828
5830
  var queryParams = "?";