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