@sumaris-net/ngx-components 1.21.4 → 1.21.5
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 +31 -39
- 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/esm2015/src/app/core/form/entity-editor-modal.class.js +19 -24
- package/fesm2015/sumaris-net.ngx-components.js +18 -23
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor-modal.class.d.ts +1 -1
|
@@ -29588,19 +29588,19 @@
|
|
|
29588
29588
|
{ type: AppEditorOptions, decorators: [{ type: i0.Optional }] }
|
|
29589
29589
|
]; };
|
|
29590
29590
|
|
|
29591
|
-
var AppEntityEditorModalOptions = /** @class */ (function (
|
|
29592
|
-
__extends(AppEntityEditorModalOptions,
|
|
29591
|
+
var AppEntityEditorModalOptions = /** @class */ (function (_super) {
|
|
29592
|
+
__extends(AppEntityEditorModalOptions, _super);
|
|
29593
29593
|
function AppEntityEditorModalOptions() {
|
|
29594
|
-
return
|
|
29594
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29595
29595
|
}
|
|
29596
29596
|
return AppEntityEditorModalOptions;
|
|
29597
29597
|
}(AppTabEditorOptions));
|
|
29598
29598
|
// @dynamic
|
|
29599
29599
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
29600
|
-
var AppEntityEditorModal = /** @class */ (function (
|
|
29601
|
-
__extends(AppEntityEditorModal,
|
|
29600
|
+
var AppEntityEditorModal = /** @class */ (function (_super) {
|
|
29601
|
+
__extends(AppEntityEditorModal, _super);
|
|
29602
29602
|
function AppEntityEditorModal(injector, dataType, options) {
|
|
29603
|
-
var _this =
|
|
29603
|
+
var _this = _super.call(this, null, injector.get(i3.Router), injector.get(i1$5.AlertController), injector.get(i1$2.TranslateService), options) || this;
|
|
29604
29604
|
_this.dataType = dataType;
|
|
29605
29605
|
_this.savingSubject = new rxjs.BehaviorSubject(false);
|
|
29606
29606
|
_this.$title = new rxjs.Subject();
|
|
@@ -29674,37 +29674,29 @@
|
|
|
29674
29674
|
}
|
|
29675
29675
|
};
|
|
29676
29676
|
AppEntityEditorModal.prototype.ngOnInit = function () {
|
|
29677
|
-
var
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
}
|
|
29695
|
-
|
|
29696
|
-
// Update title each time value changes
|
|
29697
|
-
this.registerSubscription(this.form.valueChanges
|
|
29698
|
-
.pipe(operators.debounceTime(250))
|
|
29699
|
-
.subscribe(function (json) { return _this.updateTitle(json); }));
|
|
29700
|
-
}
|
|
29701
|
-
return [2 /*return*/];
|
|
29702
|
-
});
|
|
29703
|
-
});
|
|
29677
|
+
var _this = this;
|
|
29678
|
+
// Default values
|
|
29679
|
+
this.mobile = isNotNil(this.mobile) ? this.mobile : this.settings.mobile;
|
|
29680
|
+
_super.prototype.ngOnInit.call(this);
|
|
29681
|
+
// Register forms
|
|
29682
|
+
this.registerForms();
|
|
29683
|
+
// Disable
|
|
29684
|
+
if (this.disabled)
|
|
29685
|
+
this.disable();
|
|
29686
|
+
if (this.isNewData) {
|
|
29687
|
+
// Update the title.
|
|
29688
|
+
this.updateTitle();
|
|
29689
|
+
}
|
|
29690
|
+
else {
|
|
29691
|
+
// Update title each time value changes
|
|
29692
|
+
this.registerSubscription(this.form.valueChanges
|
|
29693
|
+
.pipe(operators.debounceTime(250))
|
|
29694
|
+
.subscribe(function (json) { return _this.updateTitle(json); }));
|
|
29695
|
+
}
|
|
29704
29696
|
};
|
|
29705
29697
|
AppEntityEditorModal.prototype.ngAfterViewInit = function () {
|
|
29706
29698
|
var _this = this;
|
|
29707
|
-
|
|
29699
|
+
_super.prototype.ngAfterViewInit.call(this);
|
|
29708
29700
|
if (this.onAfterModalInit) {
|
|
29709
29701
|
Promise.resolve(this.onAfterModalInit(this))
|
|
29710
29702
|
.then(function () { return _this.load(); });
|
|
@@ -29714,7 +29706,7 @@
|
|
|
29714
29706
|
}
|
|
29715
29707
|
};
|
|
29716
29708
|
AppEntityEditorModal.prototype.ngOnDestroy = function () {
|
|
29717
|
-
|
|
29709
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
29718
29710
|
this.$title.complete();
|
|
29719
29711
|
this.$title.unsubscribe();
|
|
29720
29712
|
this.savingSubject.unsubscribe();
|
|
@@ -29723,7 +29715,7 @@
|
|
|
29723
29715
|
// Wait end of saving
|
|
29724
29716
|
if (this.saving)
|
|
29725
29717
|
return waitForFalse(this.savingSubject);
|
|
29726
|
-
return
|
|
29718
|
+
return _super.prototype.waitIdle.call(this, opts);
|
|
29727
29719
|
};
|
|
29728
29720
|
AppEntityEditorModal.prototype.load = function () {
|
|
29729
29721
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -30010,11 +30002,11 @@
|
|
|
30010
30002
|
};
|
|
30011
30003
|
AppEntityEditorModal.prototype.setError = function (err, opts) {
|
|
30012
30004
|
if (!err) {
|
|
30013
|
-
|
|
30005
|
+
_super.prototype.setError.call(this, undefined, opts);
|
|
30014
30006
|
}
|
|
30015
30007
|
else if (typeof err === 'string') {
|
|
30016
30008
|
console.error('[entity-editor] Error: ' + (err || ''));
|
|
30017
|
-
|
|
30009
|
+
_super.prototype.setError.call(this, err, opts);
|
|
30018
30010
|
}
|
|
30019
30011
|
else {
|
|
30020
30012
|
console.error('[entity-editor] Error: ' + err.message || '', err);
|
|
@@ -30029,7 +30021,7 @@
|
|
|
30029
30021
|
userMessage += detailMessage.length < 70 ? detailMessage : detailMessage.substring(0, 67) + '...';
|
|
30030
30022
|
userMessage += '</small>';
|
|
30031
30023
|
}
|
|
30032
|
-
|
|
30024
|
+
_super.prototype.setError.call(this, userMessage, opts);
|
|
30033
30025
|
}
|
|
30034
30026
|
};
|
|
30035
30027
|
/* -- protected methods -- */
|