ywana-core8 0.0.218 → 0.0.222
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 +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +50 -1
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +30 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +30 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +19 -1
- package/src/domain/TablePage.css +42 -0
- package/src/domain/TablePage.js +1 -1
- package/src/html/table.js +2 -2
- package/src/site/layouts.css +9 -1
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.
|
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
|
|
@@ -1593,8 +1595,8 @@
|
|
1593
1595
|
});
|
1594
1596
|
return fields.map(function (field) {
|
1595
1597
|
return /*#__PURE__*/React__default["default"].createElement("td", {
|
1596
|
-
key:
|
1597
|
-
className: "entity-cell " +
|
1598
|
+
key: field.id,
|
1599
|
+
className: "entity-cell " + field.id
|
1598
1600
|
}, value[field.id]);
|
1599
1601
|
});
|
1600
1602
|
};
|
@@ -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) {
|
@@ -4600,9 +4623,10 @@
|
|
4600
4623
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Header, {
|
4601
4624
|
className: "table-filters",
|
4602
4625
|
title: /*#__PURE__*/React__default["default"].createElement(Text, null, "Filters")
|
4603
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
4626
|
+
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
4604
4627
|
icon: "filter_list_off",
|
4605
|
-
|
4628
|
+
size: "small",
|
4629
|
+
clickable: true,
|
4606
4630
|
action: clear
|
4607
4631
|
})), /*#__PURE__*/React__default["default"].createElement("main", {
|
4608
4632
|
className: "table-filters"
|