@acorex/platform 20.2.0-next.0 → 20.2.0-next.2
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/auth/index.d.ts +71 -17
- package/fesm2022/acorex-platform-auth.mjs +301 -102
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +2 -2
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DJdedfa_.mjs → acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs} +5 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DJdedfa_.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +29 -17
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +25 -12
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +11 -11
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/themes/default/index.d.ts +2 -1
- package/workflow/index.d.ts +2 -3
|
@@ -41,12 +41,12 @@ import { inject, computed, effect, ViewChild, Input, ChangeDetectionStrategy, Vi
|
|
|
41
41
|
import { FormsModule } from '@angular/forms';
|
|
42
42
|
import * as i1$3 from '@angular/router';
|
|
43
43
|
import { RouterModule, Router, NavigationEnd, RouteReuseStrategy, ROUTES } from '@angular/router';
|
|
44
|
-
import { Subject, takeUntil, filter } from 'rxjs';
|
|
44
|
+
import { Subject, takeUntil, filter, firstValueFrom } from 'rxjs';
|
|
45
45
|
import * as i1$2 from '@acorex/platform/layout/components';
|
|
46
46
|
import { AXPComponentSlotModule, AXPTaskBadgeService, AXPMenuBadgeHelper, AXPTaskBadgeDirective } from '@acorex/platform/layout/components';
|
|
47
47
|
import * as i2$2 from '@acorex/components/side-menu';
|
|
48
48
|
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
|
49
|
-
import { AXPPlatformScope, AXPBroadcastEventService } from '@acorex/platform/core';
|
|
49
|
+
import { AXPPlatformScope, AXPBroadcastEventService, AXPContextStore } from '@acorex/platform/core';
|
|
50
50
|
import { sortBy } from 'lodash-es';
|
|
51
51
|
import { AXAvatarModule } from '@acorex/components/avatar';
|
|
52
52
|
import { AXImageModule } from '@acorex/components/image';
|
|
@@ -104,7 +104,9 @@ class AXPEntityDetailListViewComponent {
|
|
|
104
104
|
.pipe(takeUntil(this.destroyed))
|
|
105
105
|
.subscribe((event) => {
|
|
106
106
|
console.log(event);
|
|
107
|
-
this.grid.refresh(
|
|
107
|
+
this.grid.refresh({
|
|
108
|
+
reset: false,
|
|
109
|
+
});
|
|
108
110
|
});
|
|
109
111
|
}
|
|
110
112
|
ngAfterViewInit() {
|
|
@@ -410,22 +412,32 @@ class AXPRootLayoutComponent {
|
|
|
410
412
|
this.sessionService = inject(AXPSessionService);
|
|
411
413
|
this.unsubscriber = inject(AXUnsubscriber);
|
|
412
414
|
this.workflowService = inject(AXPWorkflowService);
|
|
415
|
+
this.contextStore = inject(AXPContextStore);
|
|
413
416
|
}
|
|
414
417
|
ngOnInit() {
|
|
415
418
|
// Select the menu item based on the current route when the page loads
|
|
416
419
|
this.menuStore.selectMenuItemByRoute(this.router.url);
|
|
417
|
-
// Update the selected menu item whenever the route changes
|
|
418
420
|
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event) => {
|
|
421
|
+
// Update the selected menu item whenever the route changes
|
|
419
422
|
this.menuStore.selectMenuItemByRoute(event.urlAfterRedirects);
|
|
423
|
+
// Reset the context store
|
|
424
|
+
this.contextStore.reset();
|
|
420
425
|
});
|
|
421
426
|
this.eventService.listen(AXPSessionStatus.SignedOut).subscribe(() => {
|
|
422
427
|
console.log('signed out in root layout');
|
|
423
428
|
this.router.navigate(['/auth/login']);
|
|
424
429
|
});
|
|
425
430
|
//
|
|
426
|
-
this.sessionService.status$.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async (
|
|
427
|
-
|
|
428
|
-
|
|
431
|
+
this.sessionService.status$.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async (status) => {
|
|
432
|
+
// Don't redirect if still loading
|
|
433
|
+
const isLoading = await firstValueFrom(this.sessionService.isLoading$);
|
|
434
|
+
if (isLoading) {
|
|
435
|
+
console.log('Session is still loading, skipping redirect check');
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
const redirectKeys = [AXPSessionStatus.SignedOut, AXPSessionStatus.Unauthenticated, AXPSessionStatus.Expired];
|
|
439
|
+
if (redirectKeys.includes(status)) {
|
|
440
|
+
console.log('Redirecting to login due to status:', status);
|
|
429
441
|
this.router.navigate(['/auth/login']);
|
|
430
442
|
}
|
|
431
443
|
});
|
|
@@ -434,10 +446,10 @@ class AXPRootLayoutComponent {
|
|
|
434
446
|
}
|
|
435
447
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPRootLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
436
448
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPRootLayoutComponent, isStandalone: true, selector: "ng-component", providers: [AXUnsubscriber], ngImport: i0, template: `
|
|
437
|
-
@if
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
|
|
449
|
+
@if(layout.isMenuHorizontal()){
|
|
450
|
+
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
451
|
+
}@else{
|
|
452
|
+
<axp-root-vertical-layout></axp-root-vertical-layout>
|
|
441
453
|
}
|
|
442
454
|
`, isInline: true, dependencies: [{ kind: "component", type: AXPRootHorizontalLayoutComponent, selector: "axp-root-horizontal-layout" }, { kind: "component", type: AXPRootVerticalLayoutComponent, selector: "axp-root-vertical-layout" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
443
455
|
}
|
|
@@ -445,10 +457,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
445
457
|
type: Component,
|
|
446
458
|
args: [{
|
|
447
459
|
template: `
|
|
448
|
-
@if
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
460
|
+
@if(layout.isMenuHorizontal()){
|
|
461
|
+
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
462
|
+
}@else{
|
|
463
|
+
<axp-root-vertical-layout></axp-root-vertical-layout>
|
|
452
464
|
}
|
|
453
465
|
`,
|
|
454
466
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -984,7 +996,7 @@ class AXPDefaultThemeModule {
|
|
|
984
996
|
///
|
|
985
997
|
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-Cn-0fTWn.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
986
998
|
//
|
|
987
|
-
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-
|
|
999
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
988
1000
|
},
|
|
989
1001
|
},
|
|
990
1002
|
};
|
|
@@ -1023,7 +1035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1023
1035
|
///
|
|
1024
1036
|
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-Cn-0fTWn.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
1025
1037
|
//
|
|
1026
|
-
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-
|
|
1038
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
1027
1039
|
},
|
|
1028
1040
|
},
|
|
1029
1041
|
};
|