ywana-core8 0.0.216 → 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 +32 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +32 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +32 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +19 -1
- package/src/domain/TablePage.js +2 -1
- package/src/html/table.js +2 -2
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
|
|
@@ -1595,7 +1597,10 @@ var EntityCellViewer = function EntityCellViewer(_ref5) {
|
|
1595
1597
|
return field.column === true;
|
1596
1598
|
});
|
1597
1599
|
return fields.map(function (field) {
|
1598
|
-
return /*#__PURE__*/React__default["default"].createElement("td",
|
1600
|
+
return /*#__PURE__*/React__default["default"].createElement("td", {
|
1601
|
+
key: field.id,
|
1602
|
+
className: "entity-cell " + field.id
|
1603
|
+
}, value[field.id]);
|
1599
1604
|
});
|
1600
1605
|
};
|
1601
1606
|
/**
|
@@ -4100,7 +4105,28 @@ var CollectionContext = function CollectionContext(url, field) {
|
|
4100
4105
|
|
4101
4106
|
var CollectionAPI = function CollectionAPI(url) {
|
4102
4107
|
return {
|
4103
|
-
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
|
+
|
4104
4130
|
return http$1.GET(url);
|
4105
4131
|
},
|
4106
4132
|
find: function find(id) {
|
@@ -4505,6 +4531,9 @@ var TableSelector = function TableSelector(props) {
|
|
4505
4531
|
});
|
4506
4532
|
var table = {
|
4507
4533
|
columns: [{
|
4534
|
+
id: "id",
|
4535
|
+
label: "ID"
|
4536
|
+
}, {
|
4508
4537
|
id: "idMatricula",
|
4509
4538
|
label: "ID Matricula"
|
4510
4539
|
}],
|