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.cjs CHANGED
@@ -4460,7 +4460,7 @@ function _catch$1(body, recover) {
4460
4460
  return result;
4461
4461
  }
4462
4462
 
4463
- var http$1 = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4463
+ var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4464
4464
  /**
4465
4465
  * Collection Page
4466
4466
  */
@@ -4972,29 +4972,29 @@ var CollectionAPI = function CollectionAPI(url) {
4972
4972
  queryParams = queryParams.concat(filterQuery);
4973
4973
  }
4974
4974
 
4975
- return http$1.GET(url);
4975
+ return http.GET(url);
4976
4976
  },
4977
4977
  find: function find(id) {
4978
- return http$1.GET(url + "/" + id);
4978
+ return http.GET(url + "/" + id);
4979
4979
  },
4980
4980
  create: function create(form) {
4981
4981
  var body = JSON.stringify(form);
4982
- return http$1.POST(url, body);
4982
+ return http.POST(url, body);
4983
4983
  },
4984
4984
  update: function update(form) {
4985
4985
  var body = JSON.stringify(form);
4986
- return http$1.PUT(url + "/" + form.id, body);
4986
+ return http.PUT(url + "/" + form.id, body);
4987
4987
  },
4988
4988
  patch: function patch(id, form) {
4989
4989
  var body = JSON.stringify(form);
4990
- return http$1.PATCH(url + "/" + id, body);
4990
+ return http.PATCH(url + "/" + id, body);
4991
4991
  },
4992
4992
  updateProperty: function updateProperty(id, propertyName, form) {
4993
4993
  var body = JSON.stringify(form);
4994
- return http$1.PUT(url + "/" + id + "/" + propertyName, body);
4994
+ return http.PUT(url + "/" + id + "/" + propertyName, body);
4995
4995
  },
4996
4996
  remove: function remove(id) {
4997
- return http$1.DELETE(url + "/" + id);
4997
+ return http.DELETE(url + "/" + id);
4998
4998
  }
4999
4999
  };
5000
5000
  };
@@ -5083,6 +5083,10 @@ var EntityViewer = function EntityViewer(props) {
5083
5083
  })));
5084
5084
  };
5085
5085
 
5086
+ /**
5087
+ * Table Page
5088
+ */
5089
+
5086
5090
  function _catch(body, recover) {
5087
5091
  try {
5088
5092
  var result = body();
@@ -5096,12 +5100,11 @@ function _catch(body, recover) {
5096
5100
 
5097
5101
  return result;
5098
5102
  }
5099
-
5100
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
5101
5103
  /**
5102
- * Table Page
5104
+ * TableRowEditor
5103
5105
  */
5104
5106
 
5107
+
5105
5108
  var TablePage = function TablePage(props) {
5106
5109
  var playScenario = function playScenario() {
5107
5110
  try {
@@ -5161,6 +5164,7 @@ var TablePage = function TablePage(props) {
5161
5164
  schema = props.schema,
5162
5165
  url = props.url,
5163
5166
  field = props.field,
5167
+ host = props.host,
5164
5168
  _props$autosave = props.autosave,
5165
5169
  autosave = _props$autosave === void 0 ? true : _props$autosave,
5166
5170
  _props$delay = props.delay,
@@ -5215,7 +5219,7 @@ var TablePage = function TablePage(props) {
5215
5219
  }, [form]);
5216
5220
  React.useEffect(function () {
5217
5221
  try {
5218
- var context = TableContext(url, field);
5222
+ var context = TableContext(url, field, host);
5219
5223
  return Promise.resolve(context.load()).then(function () {
5220
5224
  setPageContext(context);
5221
5225
  });
@@ -5327,9 +5331,6 @@ var TablePage = function TablePage(props) {
5327
5331
  canDelete: canDelete
5328
5332
  })), renderAside());
5329
5333
  };
5330
- /**
5331
- * TableRowEditor
5332
- */
5333
5334
 
5334
5335
  var TableRowEditor = function TableRowEditor(props) {
5335
5336
  var name = props.name,
@@ -5711,8 +5712,8 @@ var TableEditor = function TableEditor(props) {
5711
5712
  * Table Context
5712
5713
  */
5713
5714
 
5714
- var TableContext = function TableContext(url, field) {
5715
- var API = TableAPI(url);
5715
+ var TableContext = function TableContext(url, field, host) {
5716
+ var API = TableAPI(url, host);
5716
5717
  return {
5717
5718
  all: [],
5718
5719
  checked: new Set([]),
@@ -5827,7 +5828,8 @@ var TableContext = function TableContext(url, field) {
5827
5828
  */
5828
5829
 
5829
5830
 
5830
- var TableAPI = function TableAPI(url) {
5831
+ var TableAPI = function TableAPI(url, host) {
5832
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
5831
5833
  return {
5832
5834
  all: function all(filters) {
5833
5835
  var queryParams = "?";