ywana-core8 0.0.152 → 0.0.153

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
@@ -979,7 +979,8 @@ var DropDown = function DropDown(props) {
979
979
  var canShow = open == true && Array.isArray(options);
980
980
 
981
981
  if (canShow) {
982
- var filterActive = canFilter && label && label.length > 0;
982
+ var filterActive = canFilter === true && label && label.length > 0;
983
+ console.log('Dropdown filterActive', filterActive, canFilter, label);
983
984
  var items = filterActive ? options.filter(function (option) {
984
985
  return option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0;
985
986
  }) : options;
@@ -4435,18 +4436,18 @@ var TableEditor = function TableEditor(props) {
4435
4436
 
4436
4437
  var remove = function remove(id) {
4437
4438
  try {
4438
- var confirm = site.confirm("Are you sure ?");
4439
-
4440
- var _temp2 = function () {
4441
- if (confirm) {
4442
- return Promise.resolve(pageContext.remove(id)).then(function () {
4443
- pageContext.clear();
4444
- setPageContext(Object.assign({}, pageContext));
4445
- });
4446
- }
4447
- }();
4439
+ return Promise.resolve(site.confirm("Are you sure ?")).then(function (confirm) {
4440
+ var _temp = function () {
4441
+ if (confirm) {
4442
+ return Promise.resolve(pageContext.remove(id)).then(function () {
4443
+ pageContext.clear();
4444
+ setPageContext(Object.assign({}, pageContext));
4445
+ });
4446
+ }
4447
+ }();
4448
4448
 
4449
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
4449
+ if (_temp && _temp.then) return _temp.then(function () {});
4450
+ });
4450
4451
  } catch (e) {
4451
4452
  return Promise.reject(e);
4452
4453
  }
@@ -4623,7 +4624,7 @@ var TableContext = function TableContext(url, field) {
4623
4624
  try {
4624
4625
  var _this2 = this;
4625
4626
 
4626
- var _temp4 = _catch(function () {
4627
+ var _temp3 = _catch(function () {
4627
4628
  var filters = filter ? Object.keys(filter).reduce(function (filters, key) {
4628
4629
  var field = filter[key];
4629
4630
  if (field) filters[key] = field;
@@ -4636,7 +4637,7 @@ var TableContext = function TableContext(url, field) {
4636
4637
  console.log(error);
4637
4638
  });
4638
4639
 
4639
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
4640
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
4640
4641
  } catch (e) {
4641
4642
  return Promise.reject(e);
4642
4643
  }
@@ -4671,7 +4672,7 @@ var TableContext = function TableContext(url, field) {
4671
4672
  try {
4672
4673
  var _this5 = this;
4673
4674
 
4674
- var _temp6 = _catch(function () {
4675
+ var _temp5 = _catch(function () {
4675
4676
  return Promise.resolve(API.create(form)).then(function () {
4676
4677
  return Promise.resolve(_this5.load()).then(function () {});
4677
4678
  });
@@ -4679,7 +4680,7 @@ var TableContext = function TableContext(url, field) {
4679
4680
  console.log(error);
4680
4681
  });
4681
4682
 
4682
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
4683
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
4683
4684
  } catch (e) {
4684
4685
  return Promise.reject(e);
4685
4686
  }
@@ -4688,7 +4689,7 @@ var TableContext = function TableContext(url, field) {
4688
4689
  try {
4689
4690
  var _this7 = this;
4690
4691
 
4691
- var _temp8 = _catch(function () {
4692
+ var _temp7 = _catch(function () {
4692
4693
  return Promise.resolve(API.update(form)).then(function () {
4693
4694
  return Promise.resolve(_this7.load()).then(function () {});
4694
4695
  });
@@ -4696,7 +4697,7 @@ var TableContext = function TableContext(url, field) {
4696
4697
  console.log(error);
4697
4698
  });
4698
4699
 
4699
- return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
4700
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
4700
4701
  } catch (e) {
4701
4702
  return Promise.reject(e);
4702
4703
  }
@@ -4705,7 +4706,7 @@ var TableContext = function TableContext(url, field) {
4705
4706
  try {
4706
4707
  var _this9 = this;
4707
4708
 
4708
- var _temp10 = _catch(function () {
4709
+ var _temp9 = _catch(function () {
4709
4710
  return Promise.resolve(API.remove(id)).then(function () {
4710
4711
  return Promise.resolve(_this9.load()).then(function () {});
4711
4712
  });
@@ -4713,7 +4714,7 @@ var TableContext = function TableContext(url, field) {
4713
4714
  console.log(error);
4714
4715
  });
4715
4716
 
4716
- return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
4717
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
4717
4718
  } catch (e) {
4718
4719
  return Promise.reject(e);
4719
4720
  }