ywana-core8 0.0.279 → 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
@@ -3284,7 +3284,9 @@ var Dialog = function Dialog(props) {
3284
3284
  */
3285
3285
 
3286
3286
  var View = function View(props) {
3287
- var icon = props.icon,
3287
+ var id = props.id,
3288
+ className = props.className,
3289
+ icon = props.icon,
3288
3290
  title = props.title,
3289
3291
  toolbar = props.toolbar,
3290
3292
  menu = props.menu,
@@ -3306,8 +3308,9 @@ var View = function View(props) {
3306
3308
  if (onClose) onClose();
3307
3309
  }
3308
3310
 
3309
- return /*#__PURE__*/React__default["default"].createElement("div", {
3310
- className: "view"
3311
+ return /*#__PURE__*/React__default["default"].createElement("section", {
3312
+ id: id,
3313
+ className: "view " + className
3311
3314
  }, /*#__PURE__*/React__default["default"].createElement("header", null, canCollapse ? /*#__PURE__*/React__default["default"].createElement(Icon, {
3312
3315
  icon: "expand_more",
3313
3316
  size: "small",
@@ -4457,7 +4460,7 @@ function _catch$1(body, recover) {
4457
4460
  return result;
4458
4461
  }
4459
4462
 
4460
- var http$1 = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4463
+ var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4461
4464
  /**
4462
4465
  * Collection Page
4463
4466
  */
@@ -4969,29 +4972,29 @@ var CollectionAPI = function CollectionAPI(url) {
4969
4972
  queryParams = queryParams.concat(filterQuery);
4970
4973
  }
4971
4974
 
4972
- return http$1.GET(url);
4975
+ return http.GET(url);
4973
4976
  },
4974
4977
  find: function find(id) {
4975
- return http$1.GET(url + "/" + id);
4978
+ return http.GET(url + "/" + id);
4976
4979
  },
4977
4980
  create: function create(form) {
4978
4981
  var body = JSON.stringify(form);
4979
- return http$1.POST(url, body);
4982
+ return http.POST(url, body);
4980
4983
  },
4981
4984
  update: function update(form) {
4982
4985
  var body = JSON.stringify(form);
4983
- return http$1.PUT(url + "/" + form.id, body);
4986
+ return http.PUT(url + "/" + form.id, body);
4984
4987
  },
4985
4988
  patch: function patch(id, form) {
4986
4989
  var body = JSON.stringify(form);
4987
- return http$1.PATCH(url + "/" + id, body);
4990
+ return http.PATCH(url + "/" + id, body);
4988
4991
  },
4989
4992
  updateProperty: function updateProperty(id, propertyName, form) {
4990
4993
  var body = JSON.stringify(form);
4991
- return http$1.PUT(url + "/" + id + "/" + propertyName, body);
4994
+ return http.PUT(url + "/" + id + "/" + propertyName, body);
4992
4995
  },
4993
4996
  remove: function remove(id) {
4994
- return http$1.DELETE(url + "/" + id);
4997
+ return http.DELETE(url + "/" + id);
4995
4998
  }
4996
4999
  };
4997
5000
  };
@@ -5080,6 +5083,10 @@ var EntityViewer = function EntityViewer(props) {
5080
5083
  })));
5081
5084
  };
5082
5085
 
5086
+ /**
5087
+ * Table Page
5088
+ */
5089
+
5083
5090
  function _catch(body, recover) {
5084
5091
  try {
5085
5092
  var result = body();
@@ -5093,12 +5100,11 @@ function _catch(body, recover) {
5093
5100
 
5094
5101
  return result;
5095
5102
  }
5096
-
5097
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
5098
5103
  /**
5099
- * Table Page
5104
+ * TableRowEditor
5100
5105
  */
5101
5106
 
5107
+
5102
5108
  var TablePage = function TablePage(props) {
5103
5109
  var playScenario = function playScenario() {
5104
5110
  try {
@@ -5158,6 +5164,7 @@ var TablePage = function TablePage(props) {
5158
5164
  schema = props.schema,
5159
5165
  url = props.url,
5160
5166
  field = props.field,
5167
+ host = props.host,
5161
5168
  _props$autosave = props.autosave,
5162
5169
  autosave = _props$autosave === void 0 ? true : _props$autosave,
5163
5170
  _props$delay = props.delay,
@@ -5212,7 +5219,7 @@ var TablePage = function TablePage(props) {
5212
5219
  }, [form]);
5213
5220
  React.useEffect(function () {
5214
5221
  try {
5215
- var context = TableContext(url, field);
5222
+ var context = TableContext(url, field, host);
5216
5223
  return Promise.resolve(context.load()).then(function () {
5217
5224
  setPageContext(context);
5218
5225
  });
@@ -5324,9 +5331,6 @@ var TablePage = function TablePage(props) {
5324
5331
  canDelete: canDelete
5325
5332
  })), renderAside());
5326
5333
  };
5327
- /**
5328
- * TableRowEditor
5329
- */
5330
5334
 
5331
5335
  var TableRowEditor = function TableRowEditor(props) {
5332
5336
  var name = props.name,
@@ -5708,8 +5712,8 @@ var TableEditor = function TableEditor(props) {
5708
5712
  * Table Context
5709
5713
  */
5710
5714
 
5711
- var TableContext = function TableContext(url, field) {
5712
- var API = TableAPI(url);
5715
+ var TableContext = function TableContext(url, field, host) {
5716
+ var API = TableAPI(url, host);
5713
5717
  return {
5714
5718
  all: [],
5715
5719
  checked: new Set([]),
@@ -5824,7 +5828,8 @@ var TableContext = function TableContext(url, field) {
5824
5828
  */
5825
5829
 
5826
5830
 
5827
- 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);
5828
5833
  return {
5829
5834
  all: function all(filters) {
5830
5835
  var queryParams = "?";