ywana-core8 0.0.217 → 0.0.221

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 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.keys(item).length] : [2, 1],
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
 
@@ -1596,8 +1598,8 @@ var EntityCellViewer = function EntityCellViewer(_ref5) {
1596
1598
  });
1597
1599
  return fields.map(function (field) {
1598
1600
  return /*#__PURE__*/React__default["default"].createElement("td", {
1599
- key: column.id,
1600
- className: "entity-cell " + column.id
1601
+ key: field.id,
1602
+ className: "entity-cell " + field.id
1601
1603
  }, value[field.id]);
1602
1604
  });
1603
1605
  };
@@ -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) {
@@ -4508,6 +4531,9 @@ var TableSelector = function TableSelector(props) {
4508
4531
  });
4509
4532
  var table = {
4510
4533
  columns: [{
4534
+ id: "id",
4535
+ label: "ID"
4536
+ }, {
4511
4537
  id: "idMatricula",
4512
4538
  label: "ID Matricula"
4513
4539
  }],