@sumaris-net/ngx-components 1.21.2 → 1.21.3

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.
@@ -28499,11 +28499,13 @@
28499
28499
  AppEditor.prototype.setError = function (value, opts) {
28500
28500
  if (this.errorSubject.value !== value) {
28501
28501
  this.errorSubject.next(value);
28502
- if (!opts || opts.emitEvent !== false) {
28502
+ if (!opts || opts.emitEvent !== false)
28503
28503
  this.markForCheck();
28504
- }
28505
28504
  }
28506
28505
  };
28506
+ AppEditor.prototype.resetError = function (opts) {
28507
+ this.setError(undefined, opts);
28508
+ };
28507
28509
  AppEditor.prototype.markForCheck = function () {
28508
28510
  // Should be override by subclasses, if change detection is Push
28509
28511
  };
@@ -29368,19 +29370,15 @@
29368
29370
  });
29369
29371
  };
29370
29372
  AppEntityEditor.prototype.resetError = function (opts) {
29371
- if (isNotNilOrBlank(this.error)) {
29372
- this.error = null;
29373
- if (!opts || opts.emitEvent !== false)
29374
- this.markForCheck();
29375
- }
29373
+ _super.prototype.resetError.call(this, opts);
29376
29374
  };
29377
29375
  AppEntityEditor.prototype.setError = function (err, opts) {
29378
29376
  if (!err) {
29379
- this.error = undefined;
29377
+ _super.prototype.setError.call(this, undefined, opts);
29380
29378
  }
29381
29379
  else if (typeof err === 'string') {
29382
29380
  console.error('[entity-editor] Error: ' + (err || ''));
29383
- this.error = err;
29381
+ _super.prototype.setError.call(this, err, opts);
29384
29382
  }
29385
29383
  else {
29386
29384
  console.error('[entity-editor] Error: ' + err.message || '', err);
@@ -29395,10 +29393,8 @@
29395
29393
  userMessage += detailMessage.length < 70 ? detailMessage : detailMessage.substring(0, 67) + '...';
29396
29394
  userMessage += '</small>';
29397
29395
  }
29398
- this.error = userMessage;
29396
+ _super.prototype.setError.call(this, userMessage, opts);
29399
29397
  }
29400
- if (!opts || opts.emitEvent !== false)
29401
- this.markForCheck();
29402
29398
  };
29403
29399
  /* -- protected methods -- */
29404
29400
  /**