ywana-core8 0.0.280 → 0.0.283

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
@@ -3279,7 +3279,9 @@
3279
3279
  */
3280
3280
 
3281
3281
  var View = function View(props) {
3282
- var icon = props.icon,
3282
+ var id = props.id,
3283
+ className = props.className,
3284
+ icon = props.icon,
3283
3285
  title = props.title,
3284
3286
  toolbar = props.toolbar,
3285
3287
  menu = props.menu,
@@ -3302,7 +3304,8 @@
3302
3304
  }
3303
3305
 
3304
3306
  return /*#__PURE__*/React__default["default"].createElement("section", {
3305
- className: "view"
3307
+ id: id,
3308
+ className: "view " + className
3306
3309
  }, /*#__PURE__*/React__default["default"].createElement("header", null, canCollapse ? /*#__PURE__*/React__default["default"].createElement(Icon, {
3307
3310
  icon: "expand_more",
3308
3311
  size: "small",
@@ -4438,6 +4441,10 @@
4438
4441
  }));
4439
4442
  };
4440
4443
 
4444
+ /**
4445
+ * Collection Page
4446
+ */
4447
+
4441
4448
  function _catch$1(body, recover) {
4442
4449
  try {
4443
4450
  var result = body();
@@ -4451,12 +4458,11 @@
4451
4458
 
4452
4459
  return result;
4453
4460
  }
4454
-
4455
- var http$1 = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4456
4461
  /**
4457
- * Collection Page
4462
+ * Collection List
4458
4463
  */
4459
4464
 
4465
+
4460
4466
  var CollectionPage = function CollectionPage(props) {
4461
4467
  var reload = function reload() {
4462
4468
  try {
@@ -4566,9 +4572,6 @@
4566
4572
  delay: delay
4567
4573
  })));
4568
4574
  };
4569
- /**
4570
- * Collection List
4571
- */
4572
4575
 
4573
4576
  var CollectionList = function CollectionList(props) {
4574
4577
  var select = function select(id) {
@@ -4818,7 +4821,7 @@
4818
4821
  */
4819
4822
 
4820
4823
 
4821
- var CollectionContext = function CollectionContext(url, field) {
4824
+ var CollectionContext = function CollectionContext(url, field, host) {
4822
4825
  var API = CollectionAPI(url);
4823
4826
  return {
4824
4827
  all: [],
@@ -4941,6 +4944,7 @@
4941
4944
  */
4942
4945
 
4943
4946
  var CollectionAPI = function CollectionAPI(url) {
4947
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
4944
4948
  return {
4945
4949
  all: function all(filters) {
4946
4950
  var queryParams = "?";
@@ -4964,29 +4968,29 @@
4964
4968
  queryParams = queryParams.concat(filterQuery);
4965
4969
  }
4966
4970
 
4967
- return http$1.GET(url);
4971
+ return http.GET(url);
4968
4972
  },
4969
4973
  find: function find(id) {
4970
- return http$1.GET(url + "/" + id);
4974
+ return http.GET(url + "/" + id);
4971
4975
  },
4972
4976
  create: function create(form) {
4973
4977
  var body = JSON.stringify(form);
4974
- return http$1.POST(url, body);
4978
+ return http.POST(url, body);
4975
4979
  },
4976
4980
  update: function update(form) {
4977
4981
  var body = JSON.stringify(form);
4978
- return http$1.PUT(url + "/" + form.id, body);
4982
+ return http.PUT(url + "/" + form.id, body);
4979
4983
  },
4980
4984
  patch: function patch(id, form) {
4981
4985
  var body = JSON.stringify(form);
4982
- return http$1.PATCH(url + "/" + id, body);
4986
+ return http.PATCH(url + "/" + id, body);
4983
4987
  },
4984
4988
  updateProperty: function updateProperty(id, propertyName, form) {
4985
4989
  var body = JSON.stringify(form);
4986
- return http$1.PUT(url + "/" + id + "/" + propertyName, body);
4990
+ return http.PUT(url + "/" + id + "/" + propertyName, body);
4987
4991
  },
4988
4992
  remove: function remove(id) {
4989
- return http$1.DELETE(url + "/" + id);
4993
+ return http.DELETE(url + "/" + id);
4990
4994
  }
4991
4995
  };
4992
4996
  };
@@ -5075,6 +5079,10 @@
5075
5079
  })));
5076
5080
  };
5077
5081
 
5082
+ /**
5083
+ * Table Page
5084
+ */
5085
+
5078
5086
  function _catch(body, recover) {
5079
5087
  try {
5080
5088
  var result = body();
@@ -5088,12 +5096,11 @@
5088
5096
 
5089
5097
  return result;
5090
5098
  }
5091
-
5092
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
5093
5099
  /**
5094
- * Table Page
5100
+ * TableRowEditor
5095
5101
  */
5096
5102
 
5103
+
5097
5104
  var TablePage = function TablePage(props) {
5098
5105
  var playScenario = function playScenario() {
5099
5106
  try {
@@ -5153,6 +5160,7 @@
5153
5160
  schema = props.schema,
5154
5161
  url = props.url,
5155
5162
  field = props.field,
5163
+ host = props.host,
5156
5164
  _props$autosave = props.autosave,
5157
5165
  autosave = _props$autosave === void 0 ? true : _props$autosave,
5158
5166
  _props$delay = props.delay,
@@ -5207,7 +5215,7 @@
5207
5215
  }, [form]);
5208
5216
  React.useEffect(function () {
5209
5217
  try {
5210
- var context = TableContext(url, field);
5218
+ var context = TableContext(url, field, host);
5211
5219
  return Promise.resolve(context.load()).then(function () {
5212
5220
  setPageContext(context);
5213
5221
  });
@@ -5319,9 +5327,6 @@
5319
5327
  canDelete: canDelete
5320
5328
  })), renderAside());
5321
5329
  };
5322
- /**
5323
- * TableRowEditor
5324
- */
5325
5330
 
5326
5331
  var TableRowEditor = function TableRowEditor(props) {
5327
5332
  var name = props.name,
@@ -5703,8 +5708,8 @@
5703
5708
  * Table Context
5704
5709
  */
5705
5710
 
5706
- var TableContext = function TableContext(url, field) {
5707
- var API = TableAPI(url);
5711
+ var TableContext = function TableContext(url, field, host) {
5712
+ var API = TableAPI(url, host);
5708
5713
  return {
5709
5714
  all: [],
5710
5715
  checked: new Set([]),
@@ -5819,7 +5824,8 @@
5819
5824
  */
5820
5825
 
5821
5826
 
5822
- var TableAPI = function TableAPI(url) {
5827
+ var TableAPI = function TableAPI(url, host) {
5828
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
5823
5829
  return {
5824
5830
  all: function all(filters) {
5825
5831
  var queryParams = "?";