@sumaris-net/ngx-components 2.4.150 → 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/menu/menu.component.mjs +10 -6
- package/fesm2015/sumaris-net.ngx-components.mjs +9 -5
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +9 -5
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/menu/menu.component.d.ts +6 -2
- package/src/assets/manifest.json +1 -1
|
@@ -23939,7 +23939,7 @@ class MenuComponent {
|
|
|
23939
23939
|
this._subscription.add(this.menuService.opened
|
|
23940
23940
|
// Avoid duplicated events
|
|
23941
23941
|
.pipe(distinctUntilChanged())
|
|
23942
|
-
.subscribe((value) => (value ? this.open() : this.close())));
|
|
23942
|
+
.subscribe((value) => (value ? this.open({ emitEvent: false }) : this.close({ emitEvent: false }))));
|
|
23943
23943
|
// TODO : Find a more reliable way to do this :
|
|
23944
23944
|
// Must be donne after menuService subscription :
|
|
23945
23945
|
// - In MenuService.ngOnStart accountChanges change will be emitted before the service is ready
|
|
@@ -23989,25 +23989,29 @@ class MenuComponent {
|
|
|
23989
23989
|
await this.close();
|
|
23990
23990
|
}
|
|
23991
23991
|
}
|
|
23992
|
-
async open() {
|
|
23992
|
+
async open(opts) {
|
|
23993
23993
|
console.debug('[menu] Checking open event...');
|
|
23994
23994
|
const opened = await this.menu.isOpen(this.menuId);
|
|
23995
23995
|
if (!opened) {
|
|
23996
23996
|
console.debug('[menu] Opening menu');
|
|
23997
23997
|
await this.menu.open(this.menuId);
|
|
23998
23998
|
// Propagate to service
|
|
23999
|
-
|
|
23999
|
+
if (!opts || opts.emitEvent !== false) {
|
|
24000
|
+
this.menuService._markAsOpened();
|
|
24001
|
+
}
|
|
24000
24002
|
}
|
|
24001
24003
|
return true;
|
|
24002
24004
|
}
|
|
24003
|
-
async close() {
|
|
24005
|
+
async close(opts) {
|
|
24004
24006
|
console.debug('[menu] Checking close event...');
|
|
24005
24007
|
const opened = await this.menu.isOpen(this.menuId);
|
|
24006
24008
|
if (opened) {
|
|
24007
24009
|
console.debug('[menu] Closing menu');
|
|
24008
24010
|
await this.menu.close(this.menuId);
|
|
24009
24011
|
// Propagate to service
|
|
24010
|
-
|
|
24012
|
+
if (!opts || opts.emitEvent !== false) {
|
|
24013
|
+
this.menuService._markAsClosed();
|
|
24014
|
+
}
|
|
24011
24015
|
}
|
|
24012
24016
|
return true;
|
|
24013
24017
|
}
|