@sumaris-net/ngx-components 1.19.25 → 1.19.29

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.
@@ -481,6 +481,9 @@
481
481
  }
482
482
  return value;
483
483
  }
484
+ function escapeRegExp(value) {
485
+ return value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
486
+ }
484
487
  function removeEnd(value, end) {
485
488
  return (value === null || value === void 0 ? void 0 : value.endsWith(end || '')) ? value.substr(0, value.length - end.length) : value;
486
489
  }
@@ -4809,8 +4812,9 @@
4809
4812
  this.value = undefined;
4810
4813
  this._lastControl = null;
4811
4814
  }
4812
- FormGetValuePipe.prototype.transform = function (form, path) {
4815
+ FormGetValuePipe.prototype.transform = function (form, path, opts) {
4813
4816
  var _this = this;
4817
+ if (opts === void 0) { opts = { listenStatusChanges: false }; }
4814
4818
  if (!form) {
4815
4819
  this._dispose();
4816
4820
  return undefined;
@@ -4831,8 +4835,18 @@
4831
4835
  // subscribe to valueChanges event, in case control value change
4832
4836
  if (!this._onControlValueChanges && control) {
4833
4837
  this._onControlValueChanges = control.valueChanges.subscribe(function (value) {
4834
- _this.value = value;
4835
- _this._ref.markForCheck();
4838
+ if (value !== _this.value) {
4839
+ _this.value = value;
4840
+ _this._ref.markForCheck();
4841
+ }
4842
+ });
4843
+ }
4844
+ if (opts.listenStatusChanges && !this._onControlStatusChanges && control) {
4845
+ this._onControlStatusChanges = control.statusChanges.subscribe(function (value) {
4846
+ if (value !== _this.value) {
4847
+ _this.value = value;
4848
+ _this._ref.markForCheck();
4849
+ }
4836
4850
  });
4837
4851
  }
4838
4852
  return this.value;
@@ -32298,6 +32312,7 @@
32298
32312
  exports.entityToString = entityToString;
32299
32313
  exports.equals = equals;
32300
32314
  exports.equalsOrNil = equalsOrNil;
32315
+ exports.escapeRegExp = escapeRegExp;
32301
32316
  exports.fadeInAnimation = fadeInAnimation;
32302
32317
  exports.fadeInOutAnimation = fadeInOutAnimation;
32303
32318
  exports.filterFalse = filterFalse;