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