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.
@@ -8454,27 +8454,32 @@ var TabbedTablePage = function TabbedTablePage(props) {
8454
8454
 
8455
8455
  useEffect(function () {
8456
8456
  try {
8457
- var _field = Object.values(schema).find(function (field) {
8458
- return field.tab && field.tab === true;
8459
- });
8460
-
8461
- var _tabs = _field.options.map(function (option) {
8462
- return Object.assign({}, option, {
8463
- field: _field.id
8457
+ var _temp3 = function _temp3() {
8458
+ var field = Object.values(schema).find(function (field) {
8459
+ return field.tab && field.tab === true;
8464
8460
  });
8465
- });
8461
+ var tabs = field.options.map(function (option) {
8462
+ return Object.assign({}, option, {
8463
+ field: field.id
8464
+ });
8465
+ });
8466
+ setTabs(tabs);
8467
+ context.changeTab(tabs[0]);
8468
+ setPageContext(context);
8469
+ };
8466
8470
 
8467
- setTabs(_tabs);
8468
- context.changeTab(_tabs[0]);
8469
- setPageContext(context);
8470
- return Promise.resolve();
8471
+ var _temp4 = function () {
8472
+ if (canQuery) return Promise.resolve(context.loadQueries(user)).then(function () {});
8473
+ }();
8474
+
8475
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
8471
8476
  } catch (e) {
8472
8477
  return Promise.reject(e);
8473
8478
  }
8474
8479
  }, []);
8475
8480
  useEffect(function () {
8476
8481
  try {
8477
- var _temp2 = function () {
8482
+ var _temp6 = function () {
8478
8483
  if (tab) {
8479
8484
  var _filter;
8480
8485
 
@@ -8485,7 +8490,7 @@ var TabbedTablePage = function TabbedTablePage(props) {
8485
8490
  }
8486
8491
  }();
8487
8492
 
8488
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
8493
+ return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
8489
8494
  } catch (e) {
8490
8495
  return Promise.reject(e);
8491
8496
  }
@@ -8947,7 +8952,7 @@ var TableEditor = function TableEditor(props) {
8947
8952
  var remove = function remove(id) {
8948
8953
  try {
8949
8954
  return Promise.resolve(site.confirm("Are you sure ?")).then(function (confirm) {
8950
- var _temp3 = function () {
8955
+ var _temp7 = function () {
8951
8956
  if (confirm) {
8952
8957
  return Promise.resolve(pageContext.remove(id)).then(function () {
8953
8958
  pageContext.clear();
@@ -8956,7 +8961,7 @@ var TableEditor = function TableEditor(props) {
8956
8961
  }
8957
8962
  }();
8958
8963
 
8959
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
8964
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
8960
8965
  });
8961
8966
  } catch (e) {
8962
8967
  return Promise.reject(e);
@@ -9167,7 +9172,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9167
9172
  try {
9168
9173
  var _this2 = this;
9169
9174
 
9170
- var _temp5 = _catch(function () {
9175
+ var _temp9 = _catch(function () {
9171
9176
  var filters = filter ? Object.keys(filter).reduce(function (filters, key) {
9172
9177
  var field = filter[key];
9173
9178
 
@@ -9196,7 +9201,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9196
9201
  console.log(error);
9197
9202
  });
9198
9203
 
9199
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
9204
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
9200
9205
  } catch (e) {
9201
9206
  return Promise.reject(e);
9202
9207
  }
@@ -9234,7 +9239,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9234
9239
  try {
9235
9240
  var _this5 = this;
9236
9241
 
9237
- var _temp7 = _catch(function () {
9242
+ var _temp11 = _catch(function () {
9238
9243
  return Promise.resolve(API.create(form)).then(function () {
9239
9244
  return Promise.resolve(_this5.load({}, [])).then(function () {});
9240
9245
  });
@@ -9242,7 +9247,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9242
9247
  console.log(error);
9243
9248
  });
9244
9249
 
9245
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
9250
+ return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
9246
9251
  } catch (e) {
9247
9252
  return Promise.reject(e);
9248
9253
  }
@@ -9251,7 +9256,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9251
9256
  try {
9252
9257
  var _this7 = this;
9253
9258
 
9254
- var _temp9 = _catch(function () {
9259
+ var _temp13 = _catch(function () {
9255
9260
  return Promise.resolve(API.update(form)).then(function () {
9256
9261
  return Promise.resolve(_this7.load()).then(function () {});
9257
9262
  });
@@ -9259,7 +9264,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9259
9264
  console.log(error);
9260
9265
  });
9261
9266
 
9262
- return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
9267
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
9263
9268
  } catch (e) {
9264
9269
  return Promise.reject(e);
9265
9270
  }
@@ -9268,7 +9273,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9268
9273
  try {
9269
9274
  var _this9 = this;
9270
9275
 
9271
- var _temp11 = _catch(function () {
9276
+ var _temp15 = _catch(function () {
9272
9277
  return Promise.resolve(API.remove(id)).then(function () {
9273
9278
  return Promise.resolve(_this9.load()).then(function () {});
9274
9279
  });
@@ -9276,7 +9281,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9276
9281
  console.log(error);
9277
9282
  });
9278
9283
 
9279
- return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
9284
+ return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
9280
9285
  } catch (e) {
9281
9286
  return Promise.reject(e);
9282
9287
  }
@@ -9288,7 +9293,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9288
9293
  try {
9289
9294
  var _this11 = this;
9290
9295
 
9291
- var _temp13 = _catch(function () {
9296
+ var _temp17 = _catch(function () {
9292
9297
  return Promise.resolve(API.queries(user, urlQuery)).then(function (_API$queries) {
9293
9298
  _this11.queries = _API$queries;
9294
9299
  });
@@ -9296,7 +9301,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9296
9301
  console.log(error);
9297
9302
  });
9298
9303
 
9299
- return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
9304
+ return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
9300
9305
  } catch (e) {
9301
9306
  return Promise.reject(e);
9302
9307
  }
@@ -9305,7 +9310,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9305
9310
  try {
9306
9311
  var _this13 = this;
9307
9312
 
9308
- var _temp15 = _catch(function () {
9313
+ var _temp19 = _catch(function () {
9309
9314
  return Promise.resolve(API.createQuery(query, urlQuery)).then(function () {
9310
9315
  return Promise.resolve(_this13.loadQueries(user)).then(function () {});
9311
9316
  });
@@ -9313,7 +9318,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9313
9318
  console.log(error);
9314
9319
  });
9315
9320
 
9316
- return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(function () {}) : void 0);
9321
+ return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(function () {}) : void 0);
9317
9322
  } catch (e) {
9318
9323
  return Promise.reject(e);
9319
9324
  }
@@ -9322,7 +9327,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9322
9327
  try {
9323
9328
  var _this15 = this;
9324
9329
 
9325
- var _temp17 = _catch(function () {
9330
+ var _temp21 = _catch(function () {
9326
9331
  return Promise.resolve(API.removeQuery(id, urlQuery)).then(function () {
9327
9332
  return Promise.resolve(_this15.loadQueries(user)).then(function () {});
9328
9333
  });
@@ -9330,7 +9335,7 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
9330
9335
  console.log(error);
9331
9336
  });
9332
9337
 
9333
- return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
9338
+ return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(function () {}) : void 0);
9334
9339
  } catch (e) {
9335
9340
  return Promise.reject(e);
9336
9341
  }