@acorex/platform-generator 18.0.6 → 18.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/platform-generator",
3
- "version": "18.0.6",
3
+ "version": "18.0.7",
4
4
  "dependencies": {
5
5
  "@nx/devkit": "19.2.2",
6
6
  "tslib": "^2.3.0"
@@ -2,25 +2,13 @@ import { AXPAdminLayoutComponent, AX_ADMIN_ROUTES } from '@acorex/platform/layou
2
2
  import { Route } from '@angular/router';
3
3
 
4
4
  export const appRoutes: Route[] = [
5
- {
5
+ {
6
+ path: '<%= name %>',
7
+ loadChildren: () => import('./modules/<%= name %>/<%= name %>-root.module').then((c) => c.<%= upperCase(name) %>RootModule),
8
+ },
9
+ {
6
10
  path: '',
7
11
  pathMatch: 'full',
8
- redirectTo: '<%= name %>'
12
+ redirectTo: '<%= name %>',
9
13
  },
10
- {
11
- path: '',
12
- component: AXPAdminLayoutComponent,
13
- children: [
14
- {
15
- path: '<%= name %>',
16
- loadChildren: () => import('./modules/<%= name %>/<%= name %>-root.module').then(c => c.<%= upperCase(name) %>RootModule)
17
- },
18
- {
19
- path: '',
20
- children: [
21
- ...AX_ADMIN_ROUTES
22
- ]
23
- }
24
- ]
25
- }
26
14
  ];
@@ -1,4 +1,4 @@
1
- import { AXPAuthStrategy, AXPBaseCredentials, AXPRefreshTokenResult, AXPSignInResult, AXPUser } from '@acorex/platform/auth';
1
+ import { AXPAuthStrategy, AXPBaseCredentials, AXPRefreshTokenResult, AXPSessionContext, AXPSignInResult, AXPUser } from '@acorex/platform/auth';
2
2
  import { AXPDataProvider } from '@acorex/platform/common';
3
3
  import { Injectable, Injector, inject } from '@angular/core';
4
4
 
@@ -77,7 +77,15 @@ export class <%= upperCase(name) %>Strategy implements AXPAuthStrategy {
77
77
  console.log('User signed out');
78
78
  }
79
79
 
80
- refreshToken(refreshToken: string): Promise<AXPRefreshTokenResult> {
81
- throw new Error('Method not implemented.');
80
+ async refreshToken(context: AXPSessionContext): Promise<AXPRefreshTokenResult> {
81
+ return {
82
+ succeed: true,
83
+ data: {
84
+ accessToken: 'access_token',
85
+ refreshToken: 'refresh_token',
86
+ application: context.application,
87
+ tenant: context.tenant,
88
+ }
89
+ }
82
90
  }
83
91
  }
@@ -1,11 +1,15 @@
1
1
  import {
2
2
  AXPAdminLayoutModule,
3
- AXPFooterTextSlotComponent,
4
3
  AXPLayoutModule,
4
+ } from '@acorex/platform/layouts';
5
+
6
+ import {
7
+ AXPFooterTextSlotComponent,
5
8
  AXPNavBarSlotComponent,
6
9
  AXPThemeSlotComponent,
7
10
  AXP_ENTITY_LOADER,
8
- } from '@acorex/platform/layouts';
11
+ AXPComponentSlotModule,
12
+ } from '@acorex/platform/common';
9
13
  import { NgModule, inject } from '@angular/core';
10
14
  import { AXPRootMenuLoader } from './menu.loader';
11
15
  import { AXPRootEntityLoader } from './entity.loader';
@@ -1,4 +1,5 @@
1
1
  import { AXPAuthGuard, AXPPermissionGuard } from '@acorex/platform/auth';
2
+ import { AXPRootLayoutComponent } from '@acorex/platform/themes/default';
2
3
  import { CommonModule } from '@angular/common';
3
4
  import { NgModule } from '@angular/core';
4
5
  import { RouterModule, Routes } from '@angular/router';
@@ -11,9 +12,10 @@ const routes: Routes = [
11
12
  },
12
13
  {
13
14
  path: '',
15
+ component: AXPRootLayoutComponent,
14
16
  children: [
15
17
  {
16
- //canActivate: [AXPAuthGuard],
18
+ canActivate: [AXPAuthGuard],
17
19
  path: 'home',
18
20
  loadComponent: () => import('./home/home.page').then((c) => c.<%= upperCase(name) %>HomePage),
19
21
  }
@@ -1,14 +1,13 @@
1
1
  import { AXDataSourceQuery } from '@acorex/components/common';
2
2
  import { applyFilterArray, applySortArray } from '@acorex/modules/backend';
3
3
  import {
4
- AXPEntityConfig,
5
- AXPEntityListDisplayColumnConfig,
6
- AXPEntityProperty,
7
- convertPropertiesToColumns,
8
- widgetSchemas,
9
- } from '@acorex/platform/layouts';
4
+ AXPEntityConfig,
5
+ AXPEntityListDisplayColumnConfig,
6
+ convertPropertiesToColumns,
7
+ AXPEntityPropertyConfig,
8
+ widgetSchemas,
9
+ } from '@acorex/platform/common';
10
10
  import { Injector } from '@angular/core';
11
- import { assign } from 'lodash-es';
12
11
 
13
12
  const properties: AXPEntityPropertyConfig[] = [
14
13
  {