ywana-core8 0.0.579 → 0.0.580

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
@@ -8462,27 +8462,32 @@ var TabbedTablePage = function TabbedTablePage(props) {
8462
8462
 
8463
8463
  React.useEffect(function () {
8464
8464
  try {
8465
- var _field = Object.values(schema).find(function (field) {
8466
- return field.tab && field.tab === true;
8467
- });
8468
-
8469
- var _tabs = _field.options.map(function (option) {
8470
- return Object.assign({}, option, {
8471
- field: _field.id
8465
+ var _temp3 = function _temp3() {
8466
+ var field = Object.values(schema).find(function (field) {
8467
+ return field.tab && field.tab === true;
8472
8468
  });
8473
- });
8469
+ var tabs = field.options.map(function (option) {
8470
+ return Object.assign({}, option, {
8471
+ field: field.id
8472
+ });
8473
+ });
8474
+ setTabs(tabs);
8475
+ context.changeTab(tabs[0]);
8476
+ setPageContext(context);
8477
+ };
8474
8478
 
8475
- setTabs(_tabs);
8476
- context.changeTab(_tabs[0]);
8477
- setPageContext(context);
8478
- return Promise.resolve();
8479
+ var _temp4 = function () {
8480
+ if (canQuery) return Promise.resolve(context.loadQueries(user)).then(function () {});
8481
+ }();
8482
+
8483
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
8479
8484
  } catch (e) {
8480
8485
  return Promise.reject(e);
8481
8486
  }
8482
8487
  }, []);
8483
8488
  React.useEffect(function () {
8484
8489
  try {
8485
- var _temp2 = function () {
8490
+ var _temp6 = function () {
8486
8491
  if (tab) {
8487
8492
  var _filter;
8488
8493
 
@@ -8493,7 +8498,7 @@ var TabbedTablePage = function TabbedTablePage(props) {
8493
8498
  }
8494
8499
  }();
8495
8500
 
8496
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
8501
+ return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
8497
8502
  } catch (e) {
8498
8503
  return Promise.reject(e);
8499
8504
  }
@@ -8955,7 +8960,7 @@ var TableEditor = function TableEditor(props) {
8955
8960
  var remove = function remove(id) {
8956
8961
  try {
8957
8962
  return Promise.resolve(site.confirm("Are you sure ?")).then(function (confirm) {
8958
- var _temp3 = function () {
8963
+ var _temp7 = function () {
8959
8964
  if (confirm) {
8960
8965
  return Promise.resolve(pageContext.remove(id)).then(function () {
8961
8966
  pageContext.clear();
@@ -8964,7 +8969,7 @@ var TableEditor = function TableEditor(props) {
8964
8969
  }
8965
8970
  }();
8966
8971
 
8967
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
8972
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
8968
8973
  });
8969
8974
  } catch (e) {
8970
8975
  return Promise.reject(e);
@@ -9175,7 +9180,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9175
9180
  try {
9176
9181
  var _this2 = this;
9177
9182
 
9178
- var _temp5 = _catch(function () {
9183
+ var _temp9 = _catch(function () {
9179
9184
  var filters = filter ? Object.keys(filter).reduce(function (filters, key) {
9180
9185
  var field = filter[key];
9181
9186
 
@@ -9204,7 +9209,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9204
9209
  console.log(error);
9205
9210
  });
9206
9211
 
9207
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
9212
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
9208
9213
  } catch (e) {
9209
9214
  return Promise.reject(e);
9210
9215
  }
@@ -9242,7 +9247,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9242
9247
  try {
9243
9248
  var _this5 = this;
9244
9249
 
9245
- var _temp7 = _catch(function () {
9250
+ var _temp11 = _catch(function () {
9246
9251
  return Promise.resolve(API.create(form)).then(function () {
9247
9252
  return Promise.resolve(_this5.load({}, [])).then(function () {});
9248
9253
  });
@@ -9250,7 +9255,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9250
9255
  console.log(error);
9251
9256
  });
9252
9257
 
9253
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
9258
+ return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
9254
9259
  } catch (e) {
9255
9260
  return Promise.reject(e);
9256
9261
  }
@@ -9259,7 +9264,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9259
9264
  try {
9260
9265
  var _this7 = this;
9261
9266
 
9262
- var _temp9 = _catch(function () {
9267
+ var _temp13 = _catch(function () {
9263
9268
  return Promise.resolve(API.update(form)).then(function () {
9264
9269
  return Promise.resolve(_this7.load()).then(function () {});
9265
9270
  });
@@ -9267,7 +9272,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9267
9272
  console.log(error);
9268
9273
  });
9269
9274
 
9270
- return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
9275
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
9271
9276
  } catch (e) {
9272
9277
  return Promise.reject(e);
9273
9278
  }
@@ -9276,7 +9281,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9276
9281
  try {
9277
9282
  var _this9 = this;
9278
9283
 
9279
- var _temp11 = _catch(function () {
9284
+ var _temp15 = _catch(function () {
9280
9285
  return Promise.resolve(API.remove(id)).then(function () {
9281
9286
  return Promise.resolve(_this9.load()).then(function () {});
9282
9287
  });
@@ -9284,7 +9289,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9284
9289
  console.log(error);
9285
9290
  });
9286
9291
 
9287
- return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
9292
+ return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
9288
9293
  } catch (e) {
9289
9294
  return Promise.reject(e);
9290
9295
  }
@@ -9296,7 +9301,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9296
9301
  try {
9297
9302
  var _this11 = this;
9298
9303
 
9299
- var _temp13 = _catch(function () {
9304
+ var _temp17 = _catch(function () {
9300
9305
  return Promise.resolve(API.queries(user, urlQuery)).then(function (_API$queries) {
9301
9306
  _this11.queries = _API$queries;
9302
9307
  });
@@ -9304,7 +9309,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9304
9309
  console.log(error);
9305
9310
  });
9306
9311
 
9307
- return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
9312
+ return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
9308
9313
  } catch (e) {
9309
9314
  return Promise.reject(e);
9310
9315
  }
@@ -9313,7 +9318,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9313
9318
  try {
9314
9319
  var _this13 = this;
9315
9320
 
9316
- var _temp15 = _catch(function () {
9321
+ var _temp19 = _catch(function () {
9317
9322
  return Promise.resolve(API.createQuery(query, urlQuery)).then(function () {
9318
9323
  return Promise.resolve(_this13.loadQueries(user)).then(function () {});
9319
9324
  });
@@ -9321,7 +9326,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9321
9326
  console.log(error);
9322
9327
  });
9323
9328
 
9324
- return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
9329
+ return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(function () {}) : void 0);
9325
9330
  } catch (e) {
9326
9331
  return Promise.reject(e);
9327
9332
  }
@@ -9330,7 +9335,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9330
9335
  try {
9331
9336
  var _this15 = this;
9332
9337
 
9333
- var _temp17 = _catch(function () {
9338
+ var _temp21 = _catch(function () {
9334
9339
  return Promise.resolve(API.removeQuery(id, urlQuery)).then(function () {
9335
9340
  return Promise.resolve(_this15.loadQueries(user)).then(function () {});
9336
9341
  });
@@ -9338,7 +9343,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9338
9343
  console.log(error);
9339
9344
  });
9340
9345
 
9341
- return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
9346
+ return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
9342
9347
  } catch (e) {
9343
9348
  return Promise.reject(e);
9344
9349
  }