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.cjs CHANGED
@@ -4446,6 +4446,10 @@ var CreateContentDialog = function CreateContentDialog(_ref) {
4446
4446
  }));
4447
4447
  };
4448
4448
 
4449
+ /**
4450
+ * Collection Page
4451
+ */
4452
+
4449
4453
  function _catch$1(body, recover) {
4450
4454
  try {
4451
4455
  var result = body();
@@ -4459,12 +4463,11 @@ function _catch$1(body, recover) {
4459
4463
 
4460
4464
  return result;
4461
4465
  }
4462
-
4463
- var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
4464
4466
  /**
4465
- * Collection Page
4467
+ * Collection List
4466
4468
  */
4467
4469
 
4470
+
4468
4471
  var CollectionPage = function CollectionPage(props) {
4469
4472
  var reload = function reload() {
4470
4473
  try {
@@ -4485,6 +4488,7 @@ var CollectionPage = function CollectionPage(props) {
4485
4488
  name = _props$name === void 0 ? "Collection 1" : _props$name,
4486
4489
  schema = props.schema,
4487
4490
  url = props.url,
4491
+ host = props.host,
4488
4492
  groupBy = props.groupBy,
4489
4493
  editor = props.editor,
4490
4494
  field = props.field,
@@ -4500,7 +4504,7 @@ var CollectionPage = function CollectionPage(props) {
4500
4504
  pageContext = _useContext[0],
4501
4505
  setPageContext = _useContext[1];
4502
4506
 
4503
- var context = CollectionContext(url, field);
4507
+ var context = CollectionContext(url, field, host);
4504
4508
  React.useEffect(function () {
4505
4509
  try {
4506
4510
  return Promise.resolve(context.load()).then(function () {
@@ -4574,9 +4578,6 @@ var CollectionPage = function CollectionPage(props) {
4574
4578
  delay: delay
4575
4579
  })));
4576
4580
  };
4577
- /**
4578
- * Collection List
4579
- */
4580
4581
 
4581
4582
  var CollectionList = function CollectionList(props) {
4582
4583
  var select = function select(id) {
@@ -4826,8 +4827,8 @@ var CollectionEditor = function CollectionEditor(props) {
4826
4827
  */
4827
4828
 
4828
4829
 
4829
- var CollectionContext = function CollectionContext(url, field) {
4830
- var API = CollectionAPI(url);
4830
+ var CollectionContext = function CollectionContext(url, field, host) {
4831
+ var API = CollectionAPI(url, host);
4831
4832
  return {
4832
4833
  all: [],
4833
4834
  selected: null,
@@ -4948,7 +4949,8 @@ var CollectionContext = function CollectionContext(url, field) {
4948
4949
  * Collection API
4949
4950
  */
4950
4951
 
4951
- var CollectionAPI = function CollectionAPI(url) {
4952
+ var CollectionAPI = function CollectionAPI(url, host) {
4953
+ var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
4952
4954
  return {
4953
4955
  all: function all(filters) {
4954
4956
  var queryParams = "?";