ywana-core8 0.0.219 → 0.0.220

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
@@ -1338,7 +1338,9 @@
1338
1338
  item = _ref.item,
1339
1339
  sortable = _ref.sortable;
1340
1340
 
1341
- var _ref2 = type === TYPES.ENTITY ? [1, Object.keys(item).length] : [2, 1],
1341
+ var _ref2 = type === TYPES.ENTITY ? [1, Object.values(item).filter(function (v) {
1342
+ return v.column === true;
1343
+ }).length] : [2, 1],
1342
1344
  rowspan = _ref2[0],
1343
1345
  colspan = _ref2[1];
1344
1346
 
@@ -4100,7 +4102,28 @@
4100
4102
 
4101
4103
  var CollectionAPI = function CollectionAPI(url) {
4102
4104
  return {
4103
- all: function all() {
4105
+ all: function all(filters) {
4106
+ var queryParams = "?";
4107
+
4108
+ if (filters) {
4109
+ var filterQuery = Object.keys(filters).reduce(function (query, key) {
4110
+ var value = filters[key];
4111
+
4112
+ if (typeof value === 'boolean') {
4113
+ return query.concat(key + "=" + value + "&");
4114
+ } else if (Array.isArray(value)) {
4115
+ var param = value.length === 0 ? '' : value.reduce(function (param, item) {
4116
+ param = param.concat(key + "=" + item + "&");
4117
+ return param;
4118
+ }, "");
4119
+ return query.concat(param);
4120
+ } else {
4121
+ return query.concat(key + "=%" + filters[key] + "%&");
4122
+ }
4123
+ }, "");
4124
+ queryParams = queryParams.concat(filterQuery);
4125
+ }
4126
+
4104
4127
  return http$1.GET(url);
4105
4128
  },
4106
4129
  find: function find(id) {