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 +12 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +12 -10
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +12 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +7 -8
package/dist/index.modern.js
CHANGED
@@ -4438,6 +4438,10 @@ var CreateContentDialog = function CreateContentDialog(_ref) {
|
|
4438
4438
|
}));
|
4439
4439
|
};
|
4440
4440
|
|
4441
|
+
/**
|
4442
|
+
* Collection Page
|
4443
|
+
*/
|
4444
|
+
|
4441
4445
|
function _catch$1(body, recover) {
|
4442
4446
|
try {
|
4443
4447
|
var result = body();
|
@@ -4451,12 +4455,11 @@ function _catch$1(body, recover) {
|
|
4451
4455
|
|
4452
4456
|
return result;
|
4453
4457
|
}
|
4454
|
-
|
4455
|
-
var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
|
4456
4458
|
/**
|
4457
|
-
* Collection
|
4459
|
+
* Collection List
|
4458
4460
|
*/
|
4459
4461
|
|
4462
|
+
|
4460
4463
|
var CollectionPage = function CollectionPage(props) {
|
4461
4464
|
var reload = function reload() {
|
4462
4465
|
try {
|
@@ -4477,6 +4480,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
4477
4480
|
name = _props$name === void 0 ? "Collection 1" : _props$name,
|
4478
4481
|
schema = props.schema,
|
4479
4482
|
url = props.url,
|
4483
|
+
host = props.host,
|
4480
4484
|
groupBy = props.groupBy,
|
4481
4485
|
editor = props.editor,
|
4482
4486
|
field = props.field,
|
@@ -4492,7 +4496,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
4492
4496
|
pageContext = _useContext[0],
|
4493
4497
|
setPageContext = _useContext[1];
|
4494
4498
|
|
4495
|
-
var context = CollectionContext(url, field);
|
4499
|
+
var context = CollectionContext(url, field, host);
|
4496
4500
|
useEffect(function () {
|
4497
4501
|
try {
|
4498
4502
|
return Promise.resolve(context.load()).then(function () {
|
@@ -4566,9 +4570,6 @@ var CollectionPage = function CollectionPage(props) {
|
|
4566
4570
|
delay: delay
|
4567
4571
|
})));
|
4568
4572
|
};
|
4569
|
-
/**
|
4570
|
-
* Collection List
|
4571
|
-
*/
|
4572
4573
|
|
4573
4574
|
var CollectionList = function CollectionList(props) {
|
4574
4575
|
var select = function select(id) {
|
@@ -4818,8 +4819,8 @@ var CollectionEditor = function CollectionEditor(props) {
|
|
4818
4819
|
*/
|
4819
4820
|
|
4820
4821
|
|
4821
|
-
var CollectionContext = function CollectionContext(url, field) {
|
4822
|
-
var API = CollectionAPI(url);
|
4822
|
+
var CollectionContext = function CollectionContext(url, field, host) {
|
4823
|
+
var API = CollectionAPI(url, host);
|
4823
4824
|
return {
|
4824
4825
|
all: [],
|
4825
4826
|
selected: null,
|
@@ -4940,7 +4941,8 @@ var CollectionContext = function CollectionContext(url, field) {
|
|
4940
4941
|
* Collection API
|
4941
4942
|
*/
|
4942
4943
|
|
4943
|
-
var CollectionAPI = function CollectionAPI(url) {
|
4944
|
+
var CollectionAPI = function CollectionAPI(url, host) {
|
4945
|
+
var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
|
4944
4946
|
return {
|
4945
4947
|
all: function all(filters) {
|
4946
4948
|
var queryParams = "?";
|