ywana-core8 0.1.54 → 0.1.55

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.
@@ -9931,15 +9931,15 @@ var TableContext$2 = function TableContext(url, field, host, urlQuery, params) {
9931
9931
  return Promise.reject(e);
9932
9932
  }
9933
9933
  },
9934
- changeFilters: function changeFilters(filters) {
9935
- this.filters = filters;
9936
- },
9937
- loadQueries: function loadQueries(user) {
9934
+ removeChecked: function removeChecked() {
9938
9935
  try {
9939
9936
  var _this6 = this;
9940
9937
  var _temp8 = _catch$3(function () {
9941
- return Promise.resolve(API.queries(user, urlQuery)).then(function (_API$queries) {
9942
- _this6.queries = _API$queries;
9938
+ var promises = _this6.checked.map(function (id) {
9939
+ return API.remove(id);
9940
+ });
9941
+ return Promise.resolve(Promise.all(promises)).then(function () {
9942
+ return Promise.resolve(_this6.load()).then(function () {});
9943
9943
  });
9944
9944
  }, function (error) {
9945
9945
  console.log(error);
@@ -9949,12 +9949,15 @@ var TableContext$2 = function TableContext(url, field, host, urlQuery, params) {
9949
9949
  return Promise.reject(e);
9950
9950
  }
9951
9951
  },
9952
- createQuery: function createQuery(query, user) {
9952
+ removeAll: function removeAll() {
9953
9953
  try {
9954
9954
  var _this7 = this;
9955
9955
  var _temp9 = _catch$3(function () {
9956
- return Promise.resolve(API.createQuery(query, urlQuery)).then(function () {
9957
- return Promise.resolve(_this7.loadQueries(user)).then(function () {});
9956
+ var promises = _this7.all.map(function (item) {
9957
+ return API.remove(item.id);
9958
+ });
9959
+ return Promise.resolve(Promise.all(promises)).then(function () {
9960
+ return Promise.resolve(_this7.load()).then(function () {});
9958
9961
  });
9959
9962
  }, function (error) {
9960
9963
  console.log(error);
@@ -9964,12 +9967,15 @@ var TableContext$2 = function TableContext(url, field, host, urlQuery, params) {
9964
9967
  return Promise.reject(e);
9965
9968
  }
9966
9969
  },
9967
- removeQuery: function removeQuery(id, user) {
9970
+ changeFilters: function changeFilters(filters) {
9971
+ this.filters = filters;
9972
+ },
9973
+ loadQueries: function loadQueries(user) {
9968
9974
  try {
9969
9975
  var _this8 = this;
9970
9976
  var _temp10 = _catch$3(function () {
9971
- return Promise.resolve(API.removeQuery(id, urlQuery)).then(function () {
9972
- return Promise.resolve(_this8.loadQueries(user)).then(function () {});
9977
+ return Promise.resolve(API.queries(user, urlQuery)).then(function (_API$queries) {
9978
+ _this8.queries = _API$queries;
9973
9979
  });
9974
9980
  }, function (error) {
9975
9981
  console.log(error);
@@ -9978,6 +9984,36 @@ var TableContext$2 = function TableContext(url, field, host, urlQuery, params) {
9978
9984
  } catch (e) {
9979
9985
  return Promise.reject(e);
9980
9986
  }
9987
+ },
9988
+ createQuery: function createQuery(query, user) {
9989
+ try {
9990
+ var _this9 = this;
9991
+ var _temp11 = _catch$3(function () {
9992
+ return Promise.resolve(API.createQuery(query, urlQuery)).then(function () {
9993
+ return Promise.resolve(_this9.loadQueries(user)).then(function () {});
9994
+ });
9995
+ }, function (error) {
9996
+ console.log(error);
9997
+ });
9998
+ return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
9999
+ } catch (e) {
10000
+ return Promise.reject(e);
10001
+ }
10002
+ },
10003
+ removeQuery: function removeQuery(id, user) {
10004
+ try {
10005
+ var _this10 = this;
10006
+ var _temp12 = _catch$3(function () {
10007
+ return Promise.resolve(API.removeQuery(id, urlQuery)).then(function () {
10008
+ return Promise.resolve(_this10.loadQueries(user)).then(function () {});
10009
+ });
10010
+ }, function (error) {
10011
+ console.log(error);
10012
+ });
10013
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
10014
+ } catch (e) {
10015
+ return Promise.reject(e);
10016
+ }
9981
10017
  }
9982
10018
  };
9983
10019
  };