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.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.keys(item).length] : [2, 1],
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
 
@@ -1592,7 +1594,10 @@
1592
1594
  return field.column === true;
1593
1595
  });
1594
1596
  return fields.map(function (field) {
1595
- return /*#__PURE__*/React__default["default"].createElement("td", null, value[field.id]);
1597
+ return /*#__PURE__*/React__default["default"].createElement("td", {
1598
+ key: field.id,
1599
+ className: "entity-cell " + field.id
1600
+ }, value[field.id]);
1596
1601
  });
1597
1602
  };
1598
1603
  /**
@@ -4097,7 +4102,28 @@
4097
4102
 
4098
4103
  var CollectionAPI = function CollectionAPI(url) {
4099
4104
  return {
4100
- 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
+
4101
4127
  return http$1.GET(url);
4102
4128
  },
4103
4129
  find: function find(id) {
@@ -4502,6 +4528,9 @@
4502
4528
  });
4503
4529
  var table = {
4504
4530
  columns: [{
4531
+ id: "id",
4532
+ label: "ID"
4533
+ }, {
4505
4534
  id: "idMatricula",
4506
4535
  label: "ID Matricula"
4507
4536
  }],