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.cjs +25 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +25 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +25 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +19 -1
- package/src/html/table.js +1 -1
package/dist/index.modern.js
CHANGED
@@ -1334,7 +1334,9 @@ var DataTable = function DataTable(props) {
|
|
1334
1334
|
item = _ref.item,
|
1335
1335
|
sortable = _ref.sortable;
|
1336
1336
|
|
1337
|
-
var _ref2 = type === TYPES.ENTITY ? [1, Object.
|
1337
|
+
var _ref2 = type === TYPES.ENTITY ? [1, Object.values(item).filter(function (v) {
|
1338
|
+
return v.column === true;
|
1339
|
+
}).length] : [2, 1],
|
1338
1340
|
rowspan = _ref2[0],
|
1339
1341
|
colspan = _ref2[1];
|
1340
1342
|
|
@@ -4096,7 +4098,28 @@ var CollectionContext = function CollectionContext(url, field) {
|
|
4096
4098
|
|
4097
4099
|
var CollectionAPI = function CollectionAPI(url) {
|
4098
4100
|
return {
|
4099
|
-
all: function all() {
|
4101
|
+
all: function all(filters) {
|
4102
|
+
var queryParams = "?";
|
4103
|
+
|
4104
|
+
if (filters) {
|
4105
|
+
var filterQuery = Object.keys(filters).reduce(function (query, key) {
|
4106
|
+
var value = filters[key];
|
4107
|
+
|
4108
|
+
if (typeof value === 'boolean') {
|
4109
|
+
return query.concat(key + "=" + value + "&");
|
4110
|
+
} else if (Array.isArray(value)) {
|
4111
|
+
var param = value.length === 0 ? '' : value.reduce(function (param, item) {
|
4112
|
+
param = param.concat(key + "=" + item + "&");
|
4113
|
+
return param;
|
4114
|
+
}, "");
|
4115
|
+
return query.concat(param);
|
4116
|
+
} else {
|
4117
|
+
return query.concat(key + "=%" + filters[key] + "%&");
|
4118
|
+
}
|
4119
|
+
}, "");
|
4120
|
+
queryParams = queryParams.concat(filterQuery);
|
4121
|
+
}
|
4122
|
+
|
4100
4123
|
return http$1.GET(url);
|
4101
4124
|
},
|
4102
4125
|
find: function find(id) {
|