ywana-core8 0.0.282 → 0.0.285

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
@@ -4441,6 +4441,10 @@
4441
4441
  }));
4442
4442
  };
4443
4443
 
4444
+ /**
4445
+ * Collection Page
4446
+ */
4447
+
4444
4448
  function _catch$1(body, recover) {
4445
4449
  try {
4446
4450
  var result = body();
@@ -4454,12 +4458,11 @@
4454
4458
 
4455
4459
  return result;
4456
4460
  }
4457
-
4458
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4459
4461
  /**
4460
- * Collection Page
4462
+ * Collection List
4461
4463
  */
4462
4464
 
4465
+
4463
4466
  var CollectionPage = function CollectionPage(props) {
4464
4467
  var reload = function reload() {
4465
4468
  try {
@@ -4480,6 +4483,7 @@
4480
4483
  name = _props$name === void 0 ? "Collection 1" : _props$name,
4481
4484
  schema = props.schema,
4482
4485
  url = props.url,
4486
+ host = props.host,
4483
4487
  groupBy = props.groupBy,
4484
4488
  editor = props.editor,
4485
4489
  field = props.field,
@@ -4495,7 +4499,7 @@
4495
4499
  pageContext = _useContext[0],
4496
4500
  setPageContext = _useContext[1];
4497
4501
 
4498
- var context = CollectionContext(url, field);
4502
+ var context = CollectionContext(url, field, host);
4499
4503
  React.useEffect(function () {
4500
4504
  try {
4501
4505
  return Promise.resolve(context.load()).then(function () {
@@ -4569,9 +4573,6 @@
4569
4573
  delay: delay
4570
4574
  })));
4571
4575
  };
4572
- /**
4573
- * Collection List
4574
- */
4575
4576
 
4576
4577
  var CollectionList = function CollectionList(props) {
4577
4578
  var select = function select(id) {
@@ -4821,8 +4822,8 @@
4821
4822
  */
4822
4823
 
4823
4824
 
4824
- var CollectionContext = function CollectionContext(url, field) {
4825
- var API = CollectionAPI(url);
4825
+ var CollectionContext = function CollectionContext(url, field, host) {
4826
+ var API = CollectionAPI(url, host);
4826
4827
  return {
4827
4828
  all: [],
4828
4829
  selected: null,
@@ -4943,7 +4944,8 @@
4943
4944
  * Collection API
4944
4945
  */
4945
4946
 
4946
- var CollectionAPI = function CollectionAPI(url) {
4947
+ var CollectionAPI = function CollectionAPI(url, host) {
4948
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
4947
4949
  return {
4948
4950
  all: function all(filters) {
4949
4951
  var queryParams = "?";