@senior-gestao-empresarial/angular-components 7.8.5 → 7.9.0

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.
@@ -1150,10 +1150,15 @@ var E031MoeLookup = /** @class */ (function (_super) {
1150
1150
  __extends(E031MoeLookup, _super);
1151
1151
  function E031MoeLookup(lookupService, translate) {
1152
1152
  var _this = _super.call(this, lookupService, translate, "e031moe", [
1153
+ {
1154
+ name: "codMoe",
1155
+ type: FieldType.String
1156
+ },
1153
1157
  {
1154
1158
  name: "sigMoe",
1155
1159
  type: FieldType.String
1156
- }, {
1160
+ },
1161
+ {
1157
1162
  name: "desMoe",
1158
1163
  type: FieldType.String
1159
1164
  }
@@ -7293,14 +7298,32 @@ var FiltersStorageService = /** @class */ (function (_super) {
7293
7298
  });
7294
7299
  };
7295
7300
  FiltersStorageService.prototype.removeEmptyValues = function (filters) {
7301
+ var _this = this;
7296
7302
  Object.keys(filters).forEach(function (field) {
7297
- if (Array.isArray(filters[field]) ? filters[field].length === 0 : !filters[field]) {
7303
+ if (_this.isInvalid(filters[field])) {
7298
7304
  delete filters[field];
7299
7305
  }
7300
7306
  });
7301
7307
  };
7308
+ FiltersStorageService.prototype.isInvalid = function (field) {
7309
+ if (field === null || field === undefined) {
7310
+ return true;
7311
+ }
7312
+ if (Array.isArray(field)) {
7313
+ return field.length === 0;
7314
+ }
7315
+ if (typeof field === "string") {
7316
+ return field.trim() === "";
7317
+ }
7318
+ if (typeof field === "object") {
7319
+ return Object.keys(field).length === 0;
7320
+ }
7321
+ return false;
7322
+ };
7302
7323
  FiltersStorageService.prototype.removeInvalidValues = function (values, fields) {
7303
- if (values === void 0) { values = {}; }
7324
+ if (!values) {
7325
+ return {};
7326
+ }
7304
7327
  Object.keys(values).forEach(function (fieldValue) {
7305
7328
  var field = fields.find(function (it) { return it.name == fieldValue; });
7306
7329
  if (field) {