@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.
@@ -1356,10 +1356,15 @@
1356
1356
  __extends(E031MoeLookup, _super);
1357
1357
  function E031MoeLookup(lookupService, translate) {
1358
1358
  var _this = _super.call(this, lookupService, translate, "e031moe", [
1359
+ {
1360
+ name: "codMoe",
1361
+ type: angularComponents.FieldType.String
1362
+ },
1359
1363
  {
1360
1364
  name: "sigMoe",
1361
1365
  type: angularComponents.FieldType.String
1362
- }, {
1366
+ },
1367
+ {
1363
1368
  name: "desMoe",
1364
1369
  type: angularComponents.FieldType.String
1365
1370
  }
@@ -7499,14 +7504,32 @@
7499
7504
  });
7500
7505
  };
7501
7506
  FiltersStorageService.prototype.removeEmptyValues = function (filters) {
7507
+ var _this = this;
7502
7508
  Object.keys(filters).forEach(function (field) {
7503
- if (Array.isArray(filters[field]) ? filters[field].length === 0 : !filters[field]) {
7509
+ if (_this.isInvalid(filters[field])) {
7504
7510
  delete filters[field];
7505
7511
  }
7506
7512
  });
7507
7513
  };
7514
+ FiltersStorageService.prototype.isInvalid = function (field) {
7515
+ if (field === null || field === undefined) {
7516
+ return true;
7517
+ }
7518
+ if (Array.isArray(field)) {
7519
+ return field.length === 0;
7520
+ }
7521
+ if (typeof field === "string") {
7522
+ return field.trim() === "";
7523
+ }
7524
+ if (typeof field === "object") {
7525
+ return Object.keys(field).length === 0;
7526
+ }
7527
+ return false;
7528
+ };
7508
7529
  FiltersStorageService.prototype.removeInvalidValues = function (values, fields) {
7509
- if (values === void 0) { values = {}; }
7530
+ if (!values) {
7531
+ return {};
7532
+ }
7510
7533
  Object.keys(values).forEach(function (fieldValue) {
7511
7534
  var field = fields.find(function (it) { return it.name == fieldValue; });
7512
7535
  if (field) {