@sumaris-net/ngx-components 2.4.149 → 2.4.151
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/buttons/form-buttons-bar.component.mjs +1 -1
- package/esm2020/src/app/core/menu/menu.component.mjs +10 -6
- package/esm2020/src/app/core/menu/menu.service.mjs +7 -1
- package/esm2020/src/app/social/message/message.service.mjs +8 -6
- package/esm2020/src/app/social/user-event/user-event.module.mjs +6 -23
- package/fesm2015/sumaris-net.ngx-components.mjs +31 -32
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +27 -32
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/buttons/form-buttons-bar.component.d.ts +1 -1
- package/src/app/core/menu/menu.component.d.ts +6 -2
- package/src/app/core/menu/menu.service.d.ts +2 -0
- package/src/app/social/user-event/user-event.module.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -23537,6 +23537,12 @@ class MenuService extends StartableObservableService {
|
|
|
23537
23537
|
_markAsClosed() {
|
|
23538
23538
|
this._$opened.next(false);
|
|
23539
23539
|
}
|
|
23540
|
+
async close() {
|
|
23541
|
+
this._$opened.next(false);
|
|
23542
|
+
}
|
|
23543
|
+
async open() {
|
|
23544
|
+
this._$opened.next(true);
|
|
23545
|
+
}
|
|
23540
23546
|
async ngOnStart() {
|
|
23541
23547
|
console.info(`${this._logPrefix}Starting...`);
|
|
23542
23548
|
// Restore sub items from settings
|
|
@@ -23933,7 +23939,7 @@ class MenuComponent {
|
|
|
23933
23939
|
this._subscription.add(this.menuService.opened
|
|
23934
23940
|
// Avoid duplicated events
|
|
23935
23941
|
.pipe(distinctUntilChanged())
|
|
23936
|
-
.subscribe((value) => (value ? this.open() : this.close())));
|
|
23942
|
+
.subscribe((value) => (value ? this.open({ emitEvent: false }) : this.close({ emitEvent: false }))));
|
|
23937
23943
|
// TODO : Find a more reliable way to do this :
|
|
23938
23944
|
// Must be donne after menuService subscription :
|
|
23939
23945
|
// - In MenuService.ngOnStart accountChanges change will be emitted before the service is ready
|
|
@@ -23983,25 +23989,29 @@ class MenuComponent {
|
|
|
23983
23989
|
await this.close();
|
|
23984
23990
|
}
|
|
23985
23991
|
}
|
|
23986
|
-
async open() {
|
|
23992
|
+
async open(opts) {
|
|
23987
23993
|
console.debug('[menu] Checking open event...');
|
|
23988
23994
|
const opened = await this.menu.isOpen(this.menuId);
|
|
23989
23995
|
if (!opened) {
|
|
23990
23996
|
console.debug('[menu] Opening menu');
|
|
23991
23997
|
await this.menu.open(this.menuId);
|
|
23992
23998
|
// Propagate to service
|
|
23993
|
-
|
|
23999
|
+
if (!opts || opts.emitEvent !== false) {
|
|
24000
|
+
this.menuService._markAsOpened();
|
|
24001
|
+
}
|
|
23994
24002
|
}
|
|
23995
24003
|
return true;
|
|
23996
24004
|
}
|
|
23997
|
-
async close() {
|
|
24005
|
+
async close(opts) {
|
|
23998
24006
|
console.debug('[menu] Checking close event...');
|
|
23999
24007
|
const opened = await this.menu.isOpen(this.menuId);
|
|
24000
24008
|
if (opened) {
|
|
24001
24009
|
console.debug('[menu] Closing menu');
|
|
24002
24010
|
await this.menu.close(this.menuId);
|
|
24003
24011
|
// Propagate to service
|
|
24004
|
-
|
|
24012
|
+
if (!opts || opts.emitEvent !== false) {
|
|
24013
|
+
this.menuService._markAsClosed();
|
|
24014
|
+
}
|
|
24005
24015
|
}
|
|
24006
24016
|
return true;
|
|
24007
24017
|
}
|
|
@@ -34465,31 +34475,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
34465
34475
|
class UserEventModule {
|
|
34466
34476
|
}
|
|
34467
34477
|
UserEventModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34468
|
-
UserEventModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, declarations: [UserEventNotificationIcon,
|
|
34469
|
-
|
|
34470
|
-
SharedModule,
|
|
34471
|
-
AppIconModule,
|
|
34472
|
-
NgxJdenticonModule], exports: [UserEventNotificationIcon] });
|
|
34473
|
-
UserEventModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, imports: [CommonModule,
|
|
34474
|
-
SharedModule,
|
|
34475
|
-
AppIconModule,
|
|
34476
|
-
NgxJdenticonModule] });
|
|
34478
|
+
UserEventModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, declarations: [UserEventNotificationIcon, UserEventNotificationList], imports: [CommonModule, SharedModule, AppIconModule, NgxJdenticonModule], exports: [UserEventNotificationIcon, UserEventNotificationList] });
|
|
34479
|
+
UserEventModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, imports: [CommonModule, SharedModule, AppIconModule, NgxJdenticonModule] });
|
|
34477
34480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserEventModule, decorators: [{
|
|
34478
34481
|
type: NgModule,
|
|
34479
34482
|
args: [{
|
|
34480
|
-
imports: [
|
|
34481
|
-
|
|
34482
|
-
|
|
34483
|
-
AppIconModule,
|
|
34484
|
-
NgxJdenticonModule
|
|
34485
|
-
],
|
|
34486
|
-
declarations: [
|
|
34487
|
-
UserEventNotificationIcon,
|
|
34488
|
-
UserEventNotificationList
|
|
34489
|
-
],
|
|
34490
|
-
exports: [
|
|
34491
|
-
UserEventNotificationIcon
|
|
34492
|
-
]
|
|
34483
|
+
imports: [CommonModule, SharedModule, AppIconModule, NgxJdenticonModule],
|
|
34484
|
+
declarations: [UserEventNotificationIcon, UserEventNotificationList],
|
|
34485
|
+
exports: [UserEventNotificationIcon, UserEventNotificationList],
|
|
34493
34486
|
}]
|
|
34494
34487
|
}] });
|
|
34495
34488
|
|
|
@@ -35089,9 +35082,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
35089
35082
|
}] });
|
|
35090
35083
|
|
|
35091
35084
|
const Mutations = {
|
|
35092
|
-
send: gql `
|
|
35093
|
-
|
|
35094
|
-
|
|
35085
|
+
send: gql `
|
|
35086
|
+
mutation SendMessage($data: MessageVOInput) {
|
|
35087
|
+
done: sendMessage(message: $data)
|
|
35088
|
+
}
|
|
35089
|
+
`,
|
|
35095
35090
|
};
|
|
35096
35091
|
class MessageService extends BaseGraphqlService {
|
|
35097
35092
|
constructor(graphql, translate, modalCtrl, toastController, environment) {
|
|
@@ -35152,9 +35147,9 @@ class MessageService extends BaseGraphqlService {
|
|
|
35152
35147
|
// On dismiss
|
|
35153
35148
|
const { data } = await modal.onDidDismiss();
|
|
35154
35149
|
if (!data || !(data instanceof Message))
|
|
35155
|
-
return; // CANCELLED
|
|
35150
|
+
return true; // CANCELLED
|
|
35156
35151
|
// Send message
|
|
35157
|
-
await this.send(data, { showToast: options?.showToast });
|
|
35152
|
+
return await this.send(data, { showToast: options?.showToast });
|
|
35158
35153
|
}
|
|
35159
35154
|
/* -- protected methods -- */
|
|
35160
35155
|
async showToast(opts) {
|