ywana-core8 0.0.219 → 0.0.223
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 +28 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +49 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +28 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +28 -4
- 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 +1 -1
- package/src/site/layouts.css +8 -0
package/dist/index.cjs
CHANGED
@@ -1341,7 +1341,9 @@ var DataTable = function DataTable(props) {
|
|
1341
1341
|
item = _ref.item,
|
1342
1342
|
sortable = _ref.sortable;
|
1343
1343
|
|
1344
|
-
var _ref2 = type === TYPES.ENTITY ? [1, Object.
|
1344
|
+
var _ref2 = type === TYPES.ENTITY ? [1, Object.values(item).filter(function (v) {
|
1345
|
+
return v.column === true;
|
1346
|
+
}).length] : [2, 1],
|
1345
1347
|
rowspan = _ref2[0],
|
1346
1348
|
colspan = _ref2[1];
|
1347
1349
|
|
@@ -4103,7 +4105,28 @@ var CollectionContext = function CollectionContext(url, field) {
|
|
4103
4105
|
|
4104
4106
|
var CollectionAPI = function CollectionAPI(url) {
|
4105
4107
|
return {
|
4106
|
-
all: function all() {
|
4108
|
+
all: function all(filters) {
|
4109
|
+
var queryParams = "?";
|
4110
|
+
|
4111
|
+
if (filters) {
|
4112
|
+
var filterQuery = Object.keys(filters).reduce(function (query, key) {
|
4113
|
+
var value = filters[key];
|
4114
|
+
|
4115
|
+
if (typeof value === 'boolean') {
|
4116
|
+
return query.concat(key + "=" + value + "&");
|
4117
|
+
} else if (Array.isArray(value)) {
|
4118
|
+
var param = value.length === 0 ? '' : value.reduce(function (param, item) {
|
4119
|
+
param = param.concat(key + "=" + item + "&");
|
4120
|
+
return param;
|
4121
|
+
}, "");
|
4122
|
+
return query.concat(param);
|
4123
|
+
} else {
|
4124
|
+
return query.concat(key + "=%" + filters[key] + "%&");
|
4125
|
+
}
|
4126
|
+
}, "");
|
4127
|
+
queryParams = queryParams.concat(filterQuery);
|
4128
|
+
}
|
4129
|
+
|
4107
4130
|
return http$1.GET(url);
|
4108
4131
|
},
|
4109
4132
|
find: function find(id) {
|
@@ -4603,9 +4626,10 @@ var TableFilters = function TableFilters(props) {
|
|
4603
4626
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Header, {
|
4604
4627
|
className: "table-filters",
|
4605
4628
|
title: /*#__PURE__*/React__default["default"].createElement(Text, null, "Filters")
|
4606
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
4629
|
+
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
4607
4630
|
icon: "filter_list_off",
|
4608
|
-
|
4631
|
+
size: "small",
|
4632
|
+
clickable: true,
|
4609
4633
|
action: clear
|
4610
4634
|
})), /*#__PURE__*/React__default["default"].createElement("main", {
|
4611
4635
|
className: "table-filters"
|