@acorex/platform-generator 19.4.8 → 19.4.9

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": "19.4.8",
3
+ "version": "19.4.9",
4
4
  "dependencies": {
5
5
  "@nx/devkit": "19.2.2",
6
6
  "tslib": "^2.3.0"
@@ -11,8 +11,7 @@ import { AXFormatModule } from '@acorex/core/format';
11
11
  import { AXValidationModule } from '@acorex/core/validation';
12
12
  import { AXPTranslationRootModule } from './modules/common/translation-root.module';
13
13
  import { AXPLayoutRootModule } from './modules/layout/layout-root.module';
14
- import { AXPGlobalSearchModule } from '@acorex/platform/layout/search';
15
- import { AXPSettingsModule } from '@acorex/platform/layout/setting';
14
+ import { AXMSettingsManagementModule } from '@acorex/modules/settings-management';
16
15
  import { <%= className %>AuthRootModule } from './modules/auth/auth-root.module';
17
16
  import { AXMPlatformManagementModule } from '@acorex/modules/platform-management';
18
17
  import { AXMNotificationManagementModule } from '@acorex/modules/notification-management';
@@ -39,7 +38,7 @@ import { AXPImageUrlLogoConfig } from '@acorex/platform/core';
39
38
 
40
39
  import { environment } from '../environments/environment';
41
40
  import { <%= className %>AppVersionProvider } from './app-version.provider';
42
- import { AXMCommonModule } from '@acorex/modules/common';
41
+ import { AXMCommonModule,AXPGlobalSearchModule } from '@acorex/modules/common';
43
42
 
44
43
 
45
44
  export const appConfig: ApplicationConfig = {
@@ -59,13 +58,23 @@ export const appConfig: ApplicationConfig = {
59
58
  provide: AXP_PLATFORM_CONFIG_TOKEN,
60
59
  useValue: configPlatform({
61
60
  logo: {
62
- light: new AXPImageUrlLogoConfig('assets/logos/acorex-logo-white.svg'),
63
- colored: new AXPImageUrlLogoConfig('assets/logos/acorex-logo.svg'),
61
+ icon: {
62
+ dark: new AXPImageUrlLogoConfig('assets/images/logos/icon-dark.svg', 160),
63
+ light: new AXPImageUrlLogoConfig('assets/images/logos/icon-light.svg', 160),
64
64
  },
65
- title: '<%= title %>',
65
+ text: {
66
+ dark: new AXPImageUrlLogoConfig('assets/images/logos/text-dark.svg', 80),
67
+ light: new AXPImageUrlLogoConfig('assets/images/logos/text-light.svg', 80),
68
+ },
69
+ full: {
70
+ dark: new AXPImageUrlLogoConfig('assets/images/logos/full-dark.svg', 160),
71
+ light: new AXPImageUrlLogoConfig('assets/images/logos/full-light.svg', 160),
72
+ },
73
+ },
74
+ title: 'Demo',
66
75
  copyright: '© 2024',
67
76
  }),
68
- },
77
+ },
69
78
  {
70
79
  provide: AXP_APP_VERSION_PROVIDER,
71
80
  useClass: <%= className %>AppVersionProvider,
@@ -81,7 +90,7 @@ export const appConfig: ApplicationConfig = {
81
90
  AXValidationModule.forRoot(),
82
91
  //
83
92
  AXPGlobalSearchModule,
84
- AXPSettingsModule,
93
+ AXMSettingsManagementModule,
85
94
  //
86
95
  AXMCommonModule,
87
96
  AXPHomePageModule,
@@ -1,3 +1,4 @@
1
+ import { AX_LOCALE_CONFIG, AXLocaleModule } from '@acorex/core/locale';
1
2
  import {
2
3
  AX_TRANSLATION_CONFIG,
3
4
  AX_TRANSLATION_LOADER,
@@ -10,33 +11,50 @@ import {
10
11
  import { HttpClient } from '@angular/common/http';
11
12
 
12
13
  import { Injectable, NgModule } from '@angular/core';
13
- import { Observable } from 'rxjs';
14
+ import { Observable, of } from 'rxjs';
14
15
 
15
16
  @Injectable()
16
17
  export class MyTranslationLoader implements AXTranslationLoader {
17
- constructor(private http: HttpClient) { }
18
+ constructor(private http: HttpClient) {}
18
19
 
19
- getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation> {
20
- return this.http.get<AXTranslation>(`/assets/i18n/${options.lang}/${options.scope}.json`).pipe();
20
+ load(options: AXTranslationLoaderOptions): Observable<AXTranslation> {
21
+ try {
22
+ return this.http.get<AXTranslation>(`/assets/i18n/${options.lang}/${options.scope}.json`);
23
+ } catch (error) {
24
+ console.error(error);
25
+ return of({});
26
+ }
21
27
  }
22
28
  }
23
29
 
24
30
  @NgModule({
25
31
  exports: [AXTranslationModule],
26
- imports: [],
32
+ imports: [AXTranslationModule, AXLocaleModule],
27
33
  providers: [
28
34
  {
29
35
  provide: AX_TRANSLATION_LOADER,
30
36
  useClass: MyTranslationLoader,
31
37
  },
38
+
32
39
  {
33
40
  provide: AX_TRANSLATION_CONFIG,
34
41
  useValue: translationConfig({
35
- preloadLangs: ['en-US'],
36
- preloadScopes: ['common', 'auth'],
37
- defaultLang: 'en-US',
42
+ preload: {
43
+ langs: ['en-US'],
44
+ scopes: ['common'],
45
+ },
46
+ defaults: {
47
+ lang: 'en-US',
48
+ scope: 'common',
49
+ },
38
50
  }),
39
51
  },
52
+ {
53
+ provide: AX_LOCALE_CONFIG,
54
+ useValue: {
55
+ default: 'en-US',
56
+ },
57
+ },
40
58
  ],
41
59
  })
42
- export class AXPTranslationRootModule { }
60
+ export class AXPTranslationRootModule {}
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  AXPCommonModule,
3
- AXPComponentSlotModule,
4
3
  AXPFooterTextSlotComponent,
5
4
  AXPNavBarSlotComponent,
6
5
  AXP_MENU_PROVIDER,
@@ -9,7 +8,10 @@ import {
9
8
  import { AXPLayoutBuilderModule, AXPWidgetsCatalog, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
10
9
  import { AXPEntityModule, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
11
10
  import { AXPDefaultThemeModule } from '@acorex/platform/themes/default';
12
- import { AXPThemeSlotComponent } from '@acorex/platform/themes/shared';
11
+ import { AXP_THEME_PALETTE_PROVIDER } from '@acorex/platform/themes/shared';
12
+ import { AXPComponentSlotModule } from '@acorex/platform/layout/components';
13
+
14
+
13
15
  import { NgModule, inject } from '@angular/core';
14
16
  import pkg from '../../../../../../package.json';
15
17
  import { AXPRootEntityLoader } from './entity.loader';
@@ -48,12 +50,6 @@ import { AXPRootMenuProvider } from './menu.provider';
48
50
  component: AXPNavBarSlotComponent,
49
51
  },
50
52
  ],
51
- 'root-header-end': [
52
- {
53
- name: 'theme',
54
- component: AXPThemeSlotComponent,
55
- },
56
- ],
57
53
  }),
58
54
  ],
59
55
  exports: [],
@@ -68,6 +64,13 @@ import { AXPRootMenuProvider } from './menu.provider';
68
64
  useClass: AXPRootEntityLoader,
69
65
  multi: true,
70
66
  },
67
+ {
68
+ provide: AXP_THEME_PALETTE_PROVIDER,
69
+ useFactory: async () => {
70
+ const provider = await import('./theme-palette.provider');
71
+ return new provider.AXPRootThemePaletteProvider();
72
+ },
73
+ },
71
74
  ],
72
75
  })
73
76
  export class AXPLayoutRootModule {}
@@ -0,0 +1,218 @@
1
+ import { AXPThemePalette, AXPThemePaletteProvider } from '@acorex/platform/themes/shared';
2
+
3
+ export class AXPRootThemePaletteProvider implements AXPThemePaletteProvider {
4
+ getList(): Promise<AXPThemePalette[]> {
5
+ return Promise.resolve([
6
+ {
7
+ name: 'cosmic-horizon',
8
+ title: 'Cosmic Horizon',
9
+ colors: {
10
+ primary: '#6247aa',
11
+ secondary: '#815ac0',
12
+ success: '#38b2ac',
13
+ warning: '#f6ad55',
14
+ danger: '#e53e3e',
15
+ accents: ['#38b2ac', '#d69e2e', '#3182ce'],
16
+ dark: '#171627',
17
+ light: '#ffffff',
18
+ },
19
+ },
20
+ {
21
+ name: 'ocean-depths',
22
+ title: 'Ocean Depths',
23
+ colors: {
24
+ primary: '#207884',
25
+ secondary: '#e67e22',
26
+ success: '#2ecc71',
27
+ warning: '#f1c40f',
28
+ danger: '#c0392b',
29
+ accents: ['#16616b', '#9b59b6', '#34495e'],
30
+ dark: '#151e22',
31
+ light: '#ffffff',
32
+ },
33
+ },
34
+ {
35
+ name: 'plum-elegance',
36
+ title: 'Plum Elegance',
37
+ colors: {
38
+ primary: '#a4487d',
39
+ secondary: '#e67a54',
40
+ success: '#4aaa7c',
41
+ warning: '#f3a534',
42
+ danger: '#b82d4f',
43
+ accents: ['#7c3661', '#3ba4a0', '#3d4168'],
44
+ dark: '#231f24',
45
+ light: '#ffffff',
46
+ },
47
+ },
48
+ {
49
+ name: 'default',
50
+ title: 'Default',
51
+ colors: {
52
+ primary: '#113b53',
53
+ secondary: '#1a6ab1',
54
+ success: '#2d9c67',
55
+ warning: '#e9a01b',
56
+ danger: '#c02f1d',
57
+ accents: ['#d6a7a6', '#a0897e', '#8bf4d9'],
58
+ dark: '#212427',
59
+ light: '#ffffff',
60
+ },
61
+ },
62
+ {
63
+ name: 'sunset-horizon',
64
+ title: 'Sunset Horizon',
65
+ colors: {
66
+ primary: '#ff6b35',
67
+ secondary: '#e86a58',
68
+ success: '#48a87c',
69
+ warning: '#f7b267',
70
+ danger: '#e94f64',
71
+ accents: ['#f26b5b', '#f7c267', '#de5b7b'],
72
+ dark: '#171219',
73
+ light: '#f2e8e5',
74
+ },
75
+ },
76
+ {
77
+ name: 'golden-dusk',
78
+ title: 'Golden Dusk',
79
+ colors: {
80
+ primary: '#b98e4b',
81
+ secondary: '#e6733d',
82
+ success: '#5eaa67',
83
+ warning: '#f2b100',
84
+ danger: '#a20e3f',
85
+ accents: ['#8e1c65', '#3db8a8', '#36416a'],
86
+ dark: '#303030',
87
+ light: '#ffffff',
88
+ },
89
+ },
90
+ {
91
+ name: 'ocean-breeze',
92
+ title: 'Ocean Breeze',
93
+ colors: {
94
+ primary: '#3498db',
95
+ secondary: '#00bfa5',
96
+ success: '#27ae60',
97
+ warning: '#f39c12',
98
+ danger: '#c0392b',
99
+ accents: ['#5dade2', '#16a085', '#48c9b0'],
100
+ dark: '#1f2b37',
101
+ light: '#ffffff',
102
+ },
103
+ },
104
+ {
105
+ name: 'emerald-forest',
106
+ title: 'Emerald Forest',
107
+ colors: {
108
+ primary: '#2a7d5f',
109
+ secondary: '#4b9e8f',
110
+ success: '#4caf50',
111
+ warning: '#ff9800',
112
+ danger: '#f44336',
113
+ accents: ['#2c3e50', '#8e44ad', '#f39c12'],
114
+ dark: '#131917',
115
+ light: '#f2f8f4',
116
+ },
117
+ },
118
+ {
119
+ name: 'nebula-dream',
120
+ title: 'Nebula Dream',
121
+ colors: {
122
+ primary: '#5e60ce',
123
+ secondary: '#4895ef',
124
+ success: '#06d6a0',
125
+ warning: '#ffd166',
126
+ danger: '#ef476f',
127
+ accents: ['#8338ec', '#ff006e', '#3a86ff'],
128
+ dark: '#161722',
129
+ light: '#ffffff',
130
+ },
131
+ },
132
+ {
133
+ name: 'solare-flare',
134
+ title: 'Solare Flare',
135
+ colors: {
136
+ primary: '#d81159',
137
+ secondary: '#ff6f61',
138
+ success: '#43b57f',
139
+ warning: '#f4a300',
140
+ danger: '#a20e3f',
141
+ accents: ['#8e1c65', '#2bc4b0', '#3a3a89'],
142
+ dark: '#171822',
143
+ light: '#ffffff',
144
+ },
145
+ },
146
+ {
147
+ name: 'safetyminder',
148
+ title: 'Safetyminder',
149
+ colors: {
150
+ primary: '#2196f3',
151
+ secondary: '#ff9800',
152
+ success: '#5cb85c',
153
+ warning: '#f0ad4e',
154
+ danger: '#d9534f',
155
+ accents: ['#b54b78', '#ca6797', '#49c4d3'],
156
+ dark: '#102a43',
157
+ light: '#fafafa',
158
+ },
159
+ },
160
+ {
161
+ name: 'black-carbon',
162
+ title: 'Black Carbon',
163
+ colors: {
164
+ primary: '#1b1a1b',
165
+ secondary: '#232323',
166
+ success: '#4da46e',
167
+ warning: '#d98a2d',
168
+ danger: '#d44747',
169
+ accents: ['#552a80', '#1f7984', '#d6a7a6'],
170
+ dark: '#1c171d',
171
+ light: '#ffffff',
172
+ },
173
+ },
174
+ {
175
+ name: 'coastal-twilight',
176
+ title: 'Coastal Twilight',
177
+ colors: {
178
+ primary: '#1f6c98',
179
+ secondary: '#4e9cc1',
180
+ success: '#2eb82e',
181
+ warning: '#f39c12',
182
+ danger: '#dc3545',
183
+ accents: ['#88c9e7', '#f1e3a2', '#f7aea1'],
184
+ dark: '#1f2b37',
185
+ light: '#f8f9fa',
186
+ },
187
+ },
188
+ {
189
+ name: 'arctic-aurora',
190
+ title: 'Arctic Aurora',
191
+ colors: {
192
+ primary: '#4b6cb7',
193
+ secondary: '#6a85b6',
194
+ success: '#26a69a',
195
+ warning: '#ffb74d',
196
+ danger: '#e57373',
197
+ accents: ['#9575cd', '#64b5f6', '#81c784'],
198
+ dark: '#232834',
199
+ light: '#ffffff',
200
+ },
201
+ },
202
+ {
203
+ name: 'twilight-orchid',
204
+ title: 'Twilight Orchid',
205
+ colors: {
206
+ primary: '#7b4b94',
207
+ secondary: '#9b6b9e',
208
+ success: '#4caf50',
209
+ warning: '#f39c12',
210
+ danger: '#e74c3c',
211
+ accents: ['#c17ecd', '#e8c2ca', '#b4aee8'],
212
+ dark: '#242030',
213
+ light: '#fafafa',
214
+ },
215
+ },
216
+ ]);
217
+ }
218
+ }