@decaf-ts/for-angular 0.0.64 → 0.0.65
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.
|
@@ -191,6 +191,7 @@ const ComponentEventNames = {
|
|
|
191
191
|
FIELDSET_REMOVE_GROUP: 'fieldsetRemoveGroupEvent',
|
|
192
192
|
THEME_CHANGE: 'themeChangeEvent',
|
|
193
193
|
FORM_GROUP_LOADED: 'formGroupLoadedEvent',
|
|
194
|
+
DISABLE_MENU: 'disableMenuEvent',
|
|
194
195
|
// FIELDSET_GROUP_VALIDATION: 'fieldsetGroupValidationEvent'
|
|
195
196
|
};
|
|
196
197
|
/**
|
|
@@ -10099,12 +10100,10 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
|
|
|
10099
10100
|
if (typeof this.item?.['tag'] === 'boolean' && this.item?.['tag'] === true)
|
|
10100
10101
|
this.item['tag'] = ComponentsTagNames.LIST_ITEM;
|
|
10101
10102
|
this.empty = Object.assign({}, DefaultListEmptyOptions, this.empty);
|
|
10102
|
-
await this.refresh();
|
|
10103
10103
|
if (!this.initialized)
|
|
10104
10104
|
this.parseProps(this);
|
|
10105
|
-
if (this.isModalChild)
|
|
10106
|
-
this.changeDetectorRef.detectChanges();
|
|
10107
10105
|
this.initialized = true;
|
|
10106
|
+
await this.refresh();
|
|
10108
10107
|
}
|
|
10109
10108
|
/**
|
|
10110
10109
|
* @description Cleans up resources when the component is destroyed.
|
|
@@ -12494,7 +12493,7 @@ class NgxPageDirective extends NgxComponentDirective {
|
|
|
12494
12493
|
return this.currentRoute?.charAt(0).toUpperCase() + this.currentRoute?.slice(1) || 'Decaf For Angular';
|
|
12495
12494
|
return "";
|
|
12496
12495
|
}
|
|
12497
|
-
ngOnInit() {
|
|
12496
|
+
async ngOnInit() {
|
|
12498
12497
|
// connect component to media service for color scheme toggling
|
|
12499
12498
|
this.mediaService.colorSchemeObserver(this.component);
|
|
12500
12499
|
this.currentRoute = this.router.url.replace('/', '');
|
|
@@ -12510,16 +12509,21 @@ class NgxPageDirective extends NgxComponentDirective {
|
|
|
12510
12509
|
* @memberOf module:lib/engine/NgxPageDirective
|
|
12511
12510
|
*/
|
|
12512
12511
|
async ngAfterViewInit() {
|
|
12513
|
-
this.router.events.subscribe(async (event) => {
|
|
12512
|
+
this.router.events.pipe(takeUntil$1(this.destroySubscriptions$), shareReplay$1(1)).subscribe(async (event) => {
|
|
12514
12513
|
if (event instanceof NavigationEnd) {
|
|
12515
12514
|
const url = (event?.url || "").replace('/', '');
|
|
12516
|
-
this.hasMenu = url !== "login" && url !== "";
|
|
12517
12515
|
this.currentRoute = url;
|
|
12516
|
+
if (this.hasMenu)
|
|
12517
|
+
this.hasMenu = url !== "login" && url !== "";
|
|
12518
12518
|
this.setPageTitle(this.currentRoute);
|
|
12519
12519
|
this.title = this.pageTitle;
|
|
12520
12520
|
}
|
|
12521
|
-
if (event instanceof NavigationStart)
|
|
12521
|
+
if (event instanceof NavigationStart) {
|
|
12522
|
+
const url = (event?.url || "").replace('/', '');
|
|
12523
|
+
if (this.hasMenu)
|
|
12524
|
+
this.hasMenu = url !== "login" && url !== "";
|
|
12522
12525
|
removeFocusTrap();
|
|
12526
|
+
}
|
|
12523
12527
|
});
|
|
12524
12528
|
await this.menuController.enable(this.hasMenu);
|
|
12525
12529
|
}
|