@sumaris-net/ngx-components 1.19.27 → 1.19.30
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/bundles/sumaris-net.ngx-components.umd.js +26 -10
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +5 -2
- package/esm2015/src/app/shared/functions.js +2 -2
- package/esm2015/src/app/shared/pipes/form.pipes.js +24 -9
- package/fesm2015/sumaris-net.ngx-components.js +25 -10
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/functions.d.ts +1 -1
- package/src/app/shared/pipes/form.pipes.d.ts +3 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
}
|
|
482
482
|
return value;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function escapeRegExp(value) {
|
|
485
485
|
return value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
486
486
|
}
|
|
487
487
|
function removeEnd(value, end) {
|
|
@@ -4712,8 +4712,8 @@
|
|
|
4712
4712
|
// if there is a subscription to onLangChange, clean it
|
|
4713
4713
|
this._dispose();
|
|
4714
4714
|
// subscribe to onTranslationChange event, in case the translations change
|
|
4715
|
-
if (!this.
|
|
4716
|
-
this.
|
|
4715
|
+
if (!this._onFormStatusChanges) {
|
|
4716
|
+
this._onFormStatusChanges = form.statusChanges.subscribe(function (status) {
|
|
4717
4717
|
_this._updateValue(form, opts, status);
|
|
4718
4718
|
});
|
|
4719
4719
|
}
|
|
@@ -4736,9 +4736,9 @@
|
|
|
4736
4736
|
* Clean any existing subscription to change events
|
|
4737
4737
|
*/
|
|
4738
4738
|
FormErrorTranslatePipe.prototype._dispose = function () {
|
|
4739
|
-
if (typeof this.
|
|
4740
|
-
this.
|
|
4741
|
-
this.
|
|
4739
|
+
if (typeof this._onFormStatusChanges !== 'undefined') {
|
|
4740
|
+
this._onFormStatusChanges.unsubscribe();
|
|
4741
|
+
this._onFormStatusChanges = undefined;
|
|
4742
4742
|
}
|
|
4743
4743
|
};
|
|
4744
4744
|
return FormErrorTranslatePipe;
|
|
@@ -4812,8 +4812,9 @@
|
|
|
4812
4812
|
this.value = undefined;
|
|
4813
4813
|
this._lastControl = null;
|
|
4814
4814
|
}
|
|
4815
|
-
FormGetValuePipe.prototype.transform = function (form, path) {
|
|
4815
|
+
FormGetValuePipe.prototype.transform = function (form, path, listenStatusChanges) {
|
|
4816
4816
|
var _this = this;
|
|
4817
|
+
if (listenStatusChanges === void 0) { listenStatusChanges = false; }
|
|
4817
4818
|
if (!form) {
|
|
4818
4819
|
this._dispose();
|
|
4819
4820
|
return undefined;
|
|
@@ -4834,8 +4835,19 @@
|
|
|
4834
4835
|
// subscribe to valueChanges event, in case control value change
|
|
4835
4836
|
if (!this._onControlValueChanges && control) {
|
|
4836
4837
|
this._onControlValueChanges = control.valueChanges.subscribe(function (value) {
|
|
4837
|
-
_this.value
|
|
4838
|
-
|
|
4838
|
+
if (value !== _this.value) {
|
|
4839
|
+
_this.value = value;
|
|
4840
|
+
_this._ref.markForCheck();
|
|
4841
|
+
}
|
|
4842
|
+
});
|
|
4843
|
+
}
|
|
4844
|
+
if (listenStatusChanges && !this._onControlStatusChanges && control) {
|
|
4845
|
+
this._onControlStatusChanges = control.statusChanges.subscribe(function (status) {
|
|
4846
|
+
var value = control.value;
|
|
4847
|
+
if (value !== _this.value) {
|
|
4848
|
+
_this.value = value;
|
|
4849
|
+
_this._ref.markForCheck();
|
|
4850
|
+
}
|
|
4839
4851
|
});
|
|
4840
4852
|
}
|
|
4841
4853
|
return this.value;
|
|
@@ -4851,6 +4863,10 @@
|
|
|
4851
4863
|
this._onControlValueChanges.unsubscribe();
|
|
4852
4864
|
this._onControlValueChanges = undefined;
|
|
4853
4865
|
}
|
|
4866
|
+
if (typeof this._onControlStatusChanges !== 'undefined') {
|
|
4867
|
+
this._onControlStatusChanges.unsubscribe();
|
|
4868
|
+
this._onControlStatusChanges = undefined;
|
|
4869
|
+
}
|
|
4854
4870
|
};
|
|
4855
4871
|
return FormGetValuePipe;
|
|
4856
4872
|
}());
|
|
@@ -32301,7 +32317,7 @@
|
|
|
32301
32317
|
exports.entityToString = entityToString;
|
|
32302
32318
|
exports.equals = equals;
|
|
32303
32319
|
exports.equalsOrNil = equalsOrNil;
|
|
32304
|
-
exports.
|
|
32320
|
+
exports.escapeRegExp = escapeRegExp;
|
|
32305
32321
|
exports.fadeInAnimation = fadeInAnimation;
|
|
32306
32322
|
exports.fadeInOutAnimation = fadeInOutAnimation;
|
|
32307
32323
|
exports.filterFalse = filterFalse;
|