@sumaris-net/ngx-components 2.6.13 → 2.6.15
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/esm2020/src/app/core/form/entity/editor.class.mjs +3 -2
- package/esm2020/src/app/core/form/entity/entity-editor.class.mjs +12 -6
- package/esm2020/src/app/social/message/message.modal.mjs +10 -8
- package/fesm2015/sumaris-net.ngx-components.mjs +20 -11
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +20 -11
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity/entity-editor.class.d.ts +10 -6
- package/src/assets/manifest.json +1 -1
|
@@ -30338,6 +30338,7 @@ class AppEditor {
|
|
|
30338
30338
|
this._subscription = new Subscription();
|
|
30339
30339
|
this._enabled = false;
|
|
30340
30340
|
this.destroySubject = new Subject();
|
|
30341
|
+
// TODO use RxState instead
|
|
30341
30342
|
this.readySubject = new BehaviorSubject(false);
|
|
30342
30343
|
this.dirtySubject = new BehaviorSubject(false);
|
|
30343
30344
|
this.loadingSubject = new BehaviorSubject(true);
|
|
@@ -32156,7 +32157,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
32156
32157
|
super(injector.get(ActivatedRoute), injector.get(Router), injector.get(NavController), injector.get(AlertController), injector.get(TranslateService), options);
|
|
32157
32158
|
this.dataType = dataType;
|
|
32158
32159
|
this.dataService = dataService;
|
|
32159
|
-
this
|
|
32160
|
+
this.titleSubject = new BehaviorSubject(undefined);
|
|
32160
32161
|
this.onUpdateView = new EventEmitter();
|
|
32161
32162
|
this.environment = injector.get(ENVIRONMENT);
|
|
32162
32163
|
options = {
|
|
@@ -32192,6 +32193,12 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
32192
32193
|
// FOR DEV ONLY ----
|
|
32193
32194
|
//this.debug = !environment.production;
|
|
32194
32195
|
}
|
|
32196
|
+
/**
|
|
32197
|
+
* @deprecated
|
|
32198
|
+
*/
|
|
32199
|
+
get $title() {
|
|
32200
|
+
return this.titleSubject;
|
|
32201
|
+
}
|
|
32195
32202
|
get usageMode() {
|
|
32196
32203
|
return this._usageMode;
|
|
32197
32204
|
}
|
|
@@ -32238,8 +32245,8 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
32238
32245
|
}
|
|
32239
32246
|
ngOnDestroy() {
|
|
32240
32247
|
super.ngOnDestroy();
|
|
32241
|
-
this
|
|
32242
|
-
this
|
|
32248
|
+
this.titleSubject.complete();
|
|
32249
|
+
this.titleSubject.unsubscribe();
|
|
32243
32250
|
this.onUpdateView.complete();
|
|
32244
32251
|
this.onUpdateView.unsubscribe();
|
|
32245
32252
|
this.savingSubject.unsubscribe();
|
|
@@ -32691,7 +32698,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
32691
32698
|
async updateTitle(data) {
|
|
32692
32699
|
data = data || this.data;
|
|
32693
32700
|
const title = await this.computeTitle(data);
|
|
32694
|
-
this
|
|
32701
|
+
this.titleSubject.next(title);
|
|
32695
32702
|
// If NOT data, then add to page history
|
|
32696
32703
|
if (!this.isNewData) {
|
|
32697
32704
|
const page = await this.computePageHistory(title);
|
|
@@ -35839,13 +35846,15 @@ class MessageModal {
|
|
|
35839
35846
|
this.canSelectType = toBoolean(this.canSelectType, this.accountService.isAdmin());
|
|
35840
35847
|
}
|
|
35841
35848
|
ngAfterViewInit() {
|
|
35842
|
-
|
|
35843
|
-
|
|
35844
|
-
|
|
35845
|
-
|
|
35846
|
-
|
|
35847
|
-
|
|
35848
|
-
|
|
35849
|
+
setTimeout(() => {
|
|
35850
|
+
this.form.markAsReady({ emitEvent: false });
|
|
35851
|
+
if (this.data) {
|
|
35852
|
+
this.data.type = this.data.type || MessageTypes.INBOX_MESSAGE;
|
|
35853
|
+
this.form.setValue(this.data);
|
|
35854
|
+
}
|
|
35855
|
+
this.form.markAsLoaded();
|
|
35856
|
+
this.form.enable();
|
|
35857
|
+
});
|
|
35849
35858
|
}
|
|
35850
35859
|
cancel(event) {
|
|
35851
35860
|
this.viewCtrl.dismiss();
|