@chill-sharp/create-app 1.1.12 → 1.1.15

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.
Files changed (40) hide show
  1. package/README.md +12 -12
  2. package/package.json +36 -36
  3. package/template/.agents/skills/chillsharp-current-user-preferences/SKILL.md +70 -70
  4. package/template/.agents/skills/chillsharp-ui-template/SKILL.md +18 -18
  5. package/template/.editorconfig +11 -11
  6. package/template/.github/workflows/ci.yml +33 -33
  7. package/template/.github/workflows/deploy.yml +36 -36
  8. package/template/angular.json +131 -131
  9. package/template/doc/CurrentUserPreferences.md +106 -106
  10. package/template/doc/it/CurrentUserPreferences.md +106 -106
  11. package/template/gitignore +6 -6
  12. package/template/package.json +43 -43
  13. package/template/public/env.js +15 -15
  14. package/template/public/runtime-config.js +10 -10
  15. package/template/public/sw.js +8 -8
  16. package/template/src/app/app.component.spec.ts +15 -15
  17. package/template/src/app/app.component.ts +10 -10
  18. package/template/src/app/app.config.ts +22 -22
  19. package/template/src/app/app.routes.ts +14 -14
  20. package/template/src/app/core/overrides/README.md +12 -12
  21. package/template/src/app/core/overrides/register-client-overrides.ts +5 -5
  22. package/template/src/app/core/plugins/README.md +17 -17
  23. package/template/src/app/core/plugins/hello-plugin/README.md +25 -25
  24. package/template/src/app/core/plugins/hello-plugin/hello-plugin.component.ts +28 -28
  25. package/template/src/app/core/plugins/register-client-plugins.ts +16 -16
  26. package/template/src/app/core/providers/client-template.providers.ts +8 -8
  27. package/template/src/app/pages/client-home/client-home.component.ts +41 -41
  28. package/template/src/assets/branding/logo.svg +7 -7
  29. package/template/src/config/app-config.ts +17 -17
  30. package/template/src/config/runtime-config.ts +13 -13
  31. package/template/src/environments/environment.prod.ts +4 -4
  32. package/template/src/environments/environment.ts +4 -4
  33. package/template/src/index.html +22 -22
  34. package/template/src/main.ts +6 -6
  35. package/template/src/runtime-config.d.ts +10 -10
  36. package/template/src/styles.scss +116 -116
  37. package/template/tsconfig.app.json +13 -13
  38. package/template/tsconfig.json +33 -33
  39. package/template/tsconfig.spec.json +13 -13
  40. package/bin/create-chill-sharp-app.mjs +0 -60
@@ -1,106 +1,106 @@
1
- # Preferenze Dell'Utente Corrente
2
-
3
- English version: [English](../CurrentUserPreferences.md)
4
-
5
- `ChillSharp.Auth` puo rendere disponibili agli hook del ciclo di vita delle entita le preferenze di visualizzazione dell'utente autenticato senza interrogare `AuthUser` a ogni salvataggio.
6
-
7
- Lo snapshot immutabile `ChillUserPreferences` contiene:
8
-
9
- - `DisplayCultureName`
10
- - `DisplayTimeZone`
11
- - `DisplayDateFormat`
12
- - `DisplayNumberFormat`
13
- - `PreferredTheme`
14
-
15
- ## Registrazione E Ciclo Di Vita Della Cache
16
-
17
- `AddChillAuthApi<TContext>()` registra il singleton `IChillAuthUserPreferencesCache` e lo scoped `IChillAuthUserPreferencesAccessor`.
18
-
19
- Quando l'utente esegue il login o rinnova un token, ChillSharp carica una volta l'`AuthUser` corrispondente e inizializza uno snapshot associato al suo `ExternalId`. L'accessor legge solo quello snapshot in memoria durante le richieste; non interroga la tabella utenti.
20
-
21
- `ChillAuthService` aggiorna lo snapshot in cache dopo la creazione o l'aggiornamento di un `AuthUser`. Invalida lo snapshot di un utente eliminato ed entrambe le chiavi, precedente e nuova, quando cambia `ExternalId`.
22
-
23
- La cache memorizza valori scalari delle preferenze, mai un'istanza EF Core tracciata di `AuthUser`.
24
-
25
- ## API delle preferenze dell'utente corrente
26
-
27
- I client autenticati possono recuperare lo stesso snapshot utilizzato dal codice server con:
28
-
29
- ```http
30
- GET /api/chill-auth/current-user-preferences
31
- Authorization: Bearer <access token>
32
- ```
33
-
34
- La risposta e un oggetto JSON `ChillUserPreferences`:
35
-
36
- ```json
37
- {
38
- "displayCultureName": "it-IT",
39
- "displayTimeZone": "Europe/Rome",
40
- "displayDateFormat": "dd/MM/yyyy",
41
- "displayNumberFormat": "N2",
42
- "preferredTheme": "cini"
43
- }
44
- ```
45
-
46
- Usa questo endpoint dopo il login e durante il ripristino di una sessione UI autenticata. E la fonte autorevole per lingua/cultura, fuso orario, formato data e formato numerico usati dal client API e dalla UI; non ricavare tali valori dal browser, dal sistema operativo, dalle claim del token o da un endpoint di gestione dell'autenticazione.
47
-
48
- Il client C# espone `GetCurrentUserPreferences()`. Il client Python espone `get_current_user_preferences()`, mentre il client TypeScript e il wrapper Angular espongono `getCurrentUserPreferences()`. I pacchetti Vue e React forniscono inoltre `useCurrentUserPreferences()`.
49
-
50
- Nel pacchetto Angular UI Core, inietta `ChillService` e usa il signal `userPreferences` oppure le singole proiezioni `displayCultureName`, `displayTimeZone`, `displayDateFormat`, `displayNumberFormat` e `preferredTheme`. `PreferredTheme` e una stringa opaca salvata dal server. UI Core usa `prefers-color-scheme` del browser prima del login; le app client aggiungono temi selezionabili con `provideChillSharpUiCore({ additionalThemes: ['cini'] })`.
51
-
52
- ## DbContext Host
53
-
54
- Per impostazione predefinita `IChillContext.GetCurrentUserPreferences()` restituisce `ChillUserPreferences.Empty`. In un contesto host personalizzato con auth abilitata, inietta `IChillAuthUserPreferencesAccessor` e delega a esso:
55
-
56
- ```csharp
57
- using ChillSharp;
58
- using ChillSharp.Auth.Services;
59
-
60
- public class AppDbContext : DbContext, IChillContext, IChillAuthDbContext
61
- {
62
- private readonly IChillAuthUserPreferencesAccessor? _userPreferencesAccessor;
63
-
64
- public AppDbContext(
65
- DbContextOptions<AppDbContext> options,
66
- IChillAuthUserPreferencesAccessor? userPreferencesAccessor = null)
67
- : base(options)
68
- {
69
- _userPreferencesAccessor = userPreferencesAccessor;
70
- }
71
-
72
- public ChillUserPreferences GetCurrentUserPreferences() =>
73
- _userPreferencesAccessor?.Current ?? ChillUserPreferences.Empty;
74
-
75
- public string GetDefaultUserCultureName()
76
- {
77
- var cultureName = GetCurrentUserPreferences().DisplayCultureName;
78
- return string.IsNullOrWhiteSpace(cultureName)
79
- ? GetPrimaryCultureName()
80
- : cultureName;
81
- }
82
- }
83
- ```
84
-
85
- Il parametro opzionale del costruttore mantiene compatibile la creazione a design-time e i test che costruiscono direttamente il contesto. Un contesto creato normalmente dalla dependency injection riceve l'accessor.
86
-
87
- `ChillAuthDbContext` implementa gia questo schema.
88
-
89
- ## Hook Del Ciclo Di Vita Delle Entita
90
-
91
- Usa lo snapshot direttamente dall'`IChillContext` fornito. Nell'hook non e necessario alcun accesso al database.
92
-
93
- ```csharp
94
- public override void OnUpdate(IChillContext context)
95
- {
96
- var preferences = context.GetCurrentUserPreferences();
97
- var timeZone = preferences.DisplayTimeZone;
98
-
99
- if (!string.IsNullOrWhiteSpace(timeZone))
100
- {
101
- // Applica il comportamento relativo al fuso orario dell'applicazione.
102
- }
103
- }
104
- ```
105
-
106
- Tutti i valori possono essere vuoti per job in background, chiamate non autenticate o un utente senza un `AuthUser` corrispondente. Considerali opzionali e scegli un fallback dell'applicazione. Valida `DisplayTimeZone` prima di usarlo come identificatore di fuso orario.
1
+ # Preferenze Dell'Utente Corrente
2
+
3
+ English version: [English](../CurrentUserPreferences.md)
4
+
5
+ `ChillSharp.Auth` puo rendere disponibili agli hook del ciclo di vita delle entita le preferenze di visualizzazione dell'utente autenticato senza interrogare `AuthUser` a ogni salvataggio.
6
+
7
+ Lo snapshot immutabile `ChillUserPreferences` contiene:
8
+
9
+ - `DisplayCultureName`
10
+ - `DisplayTimeZone`
11
+ - `DisplayDateFormat`
12
+ - `DisplayNumberFormat`
13
+ - `PreferredTheme`
14
+
15
+ ## Registrazione E Ciclo Di Vita Della Cache
16
+
17
+ `AddChillAuthApi<TContext>()` registra il singleton `IChillAuthUserPreferencesCache` e lo scoped `IChillAuthUserPreferencesAccessor`.
18
+
19
+ Quando l'utente esegue il login o rinnova un token, ChillSharp carica una volta l'`AuthUser` corrispondente e inizializza uno snapshot associato al suo `ExternalId`. L'accessor legge solo quello snapshot in memoria durante le richieste; non interroga la tabella utenti.
20
+
21
+ `ChillAuthService` aggiorna lo snapshot in cache dopo la creazione o l'aggiornamento di un `AuthUser`. Invalida lo snapshot di un utente eliminato ed entrambe le chiavi, precedente e nuova, quando cambia `ExternalId`.
22
+
23
+ La cache memorizza valori scalari delle preferenze, mai un'istanza EF Core tracciata di `AuthUser`.
24
+
25
+ ## API delle preferenze dell'utente corrente
26
+
27
+ I client autenticati possono recuperare lo stesso snapshot utilizzato dal codice server con:
28
+
29
+ ```http
30
+ GET /api/chill-auth/current-user-preferences
31
+ Authorization: Bearer <access token>
32
+ ```
33
+
34
+ La risposta e un oggetto JSON `ChillUserPreferences`:
35
+
36
+ ```json
37
+ {
38
+ "displayCultureName": "it-IT",
39
+ "displayTimeZone": "Europe/Rome",
40
+ "displayDateFormat": "dd/MM/yyyy",
41
+ "displayNumberFormat": "N2",
42
+ "preferredTheme": "cini"
43
+ }
44
+ ```
45
+
46
+ Usa questo endpoint dopo il login e durante il ripristino di una sessione UI autenticata. E la fonte autorevole per lingua/cultura, fuso orario, formato data e formato numerico usati dal client API e dalla UI; non ricavare tali valori dal browser, dal sistema operativo, dalle claim del token o da un endpoint di gestione dell'autenticazione.
47
+
48
+ Il client C# espone `GetCurrentUserPreferences()`. Il client Python espone `get_current_user_preferences()`, mentre il client TypeScript e il wrapper Angular espongono `getCurrentUserPreferences()`. I pacchetti Vue e React forniscono inoltre `useCurrentUserPreferences()`.
49
+
50
+ Nel pacchetto Angular UI Core, inietta `ChillService` e usa il signal `userPreferences` oppure le singole proiezioni `displayCultureName`, `displayTimeZone`, `displayDateFormat`, `displayNumberFormat` e `preferredTheme`. `PreferredTheme` e una stringa opaca salvata dal server. UI Core usa `prefers-color-scheme` del browser prima del login; le app client aggiungono temi selezionabili con `provideChillSharpUiCore({ additionalThemes: ['cini'] })`.
51
+
52
+ ## DbContext Host
53
+
54
+ Per impostazione predefinita `IChillContext.GetCurrentUserPreferences()` restituisce `ChillUserPreferences.Empty`. In un contesto host personalizzato con auth abilitata, inietta `IChillAuthUserPreferencesAccessor` e delega a esso:
55
+
56
+ ```csharp
57
+ using ChillSharp;
58
+ using ChillSharp.Auth.Services;
59
+
60
+ public class AppDbContext : DbContext, IChillContext, IChillAuthDbContext
61
+ {
62
+ private readonly IChillAuthUserPreferencesAccessor? _userPreferencesAccessor;
63
+
64
+ public AppDbContext(
65
+ DbContextOptions<AppDbContext> options,
66
+ IChillAuthUserPreferencesAccessor? userPreferencesAccessor = null)
67
+ : base(options)
68
+ {
69
+ _userPreferencesAccessor = userPreferencesAccessor;
70
+ }
71
+
72
+ public ChillUserPreferences GetCurrentUserPreferences() =>
73
+ _userPreferencesAccessor?.Current ?? ChillUserPreferences.Empty;
74
+
75
+ public string GetDefaultUserCultureName()
76
+ {
77
+ var cultureName = GetCurrentUserPreferences().DisplayCultureName;
78
+ return string.IsNullOrWhiteSpace(cultureName)
79
+ ? GetPrimaryCultureName()
80
+ : cultureName;
81
+ }
82
+ }
83
+ ```
84
+
85
+ Il parametro opzionale del costruttore mantiene compatibile la creazione a design-time e i test che costruiscono direttamente il contesto. Un contesto creato normalmente dalla dependency injection riceve l'accessor.
86
+
87
+ `ChillAuthDbContext` implementa gia questo schema.
88
+
89
+ ## Hook Del Ciclo Di Vita Delle Entita
90
+
91
+ Usa lo snapshot direttamente dall'`IChillContext` fornito. Nell'hook non e necessario alcun accesso al database.
92
+
93
+ ```csharp
94
+ public override void OnUpdate(IChillContext context)
95
+ {
96
+ var preferences = context.GetCurrentUserPreferences();
97
+ var timeZone = preferences.DisplayTimeZone;
98
+
99
+ if (!string.IsNullOrWhiteSpace(timeZone))
100
+ {
101
+ // Applica il comportamento relativo al fuso orario dell'applicazione.
102
+ }
103
+ }
104
+ ```
105
+
106
+ Tutti i valori possono essere vuoti per job in background, chiamate non autenticate o un utente senza un `AuthUser` corrispondente. Considerali opzionali e scegli un fallback dell'applicazione. Valida `DisplayTimeZone` prima di usarlo come identificatore di fuso orario.
@@ -1,6 +1,6 @@
1
- /dist
2
- /tmp
3
- /out-tsc
4
- /coverage
5
- /node_modules
6
- /.angular
1
+ /dist
2
+ /tmp
3
+ /out-tsc
4
+ /coverage
5
+ /node_modules
6
+ /.angular
@@ -1,43 +1,43 @@
1
- {
2
- "name": "chill-sharp-ui-template",
3
- "version": "1.1.6",
4
- "private": true,
5
- "description": "Template Angular shell for ChillSharp UI client applications.",
6
- "scripts": {
7
- "ng": "ng",
8
- "start": "ng serve",
9
- "build": "ng build",
10
- "watch": "ng build --watch --configuration development",
11
- "test": "ng test --watch=false",
12
- "lint": "tsc --noEmit -p tsconfig.app.json"
13
- },
14
- "dependencies": {
15
- "@angular/cdk": "^19.2.19",
16
- "@angular/common": "^19.2.0",
17
- "@angular/compiler": "^19.2.0",
18
- "@angular/core": "^19.2.0",
19
- "@angular/forms": "^19.2.0",
20
- "@angular/platform-browser": "^19.2.0",
21
- "@angular/platform-browser-dynamic": "^19.2.0",
22
- "@angular/router": "^19.2.0",
23
- "@chill-sharp/ng-client": "file:packages/chill-sharp-ng-client-1.1.6.tgz",
24
- "@chill-sharp/ts-client": "file:packages/chill-sharp-ts-client-1.1.6.tgz",
25
- "@chill-sharp/ui-core": "file:packages/chill-sharp-ui-core-1.1.6.tgz",
26
- "rxjs": "~7.8.0",
27
- "tslib": "^2.3.0",
28
- "zone.js": "~0.15.0"
29
- },
30
- "devDependencies": {
31
- "@angular-devkit/build-angular": "^19.2.20",
32
- "@angular/cli": "^19.2.20",
33
- "@angular/compiler-cli": "^19.2.20",
34
- "@types/jasmine": "~5.1.0",
35
- "jasmine-core": "~5.6.0",
36
- "karma": "~6.4.0",
37
- "karma-chrome-launcher": "~3.2.0",
38
- "karma-coverage": "~2.2.0",
39
- "karma-jasmine": "~5.1.0",
40
- "karma-jasmine-html-reporter": "~2.1.0",
41
- "typescript": "~5.7.2"
42
- }
43
- }
1
+ {
2
+ "name": "chill-sharp-ui-template",
3
+ "version": "1.1.6",
4
+ "private": true,
5
+ "description": "Template Angular shell for ChillSharp UI client applications.",
6
+ "scripts": {
7
+ "ng": "ng",
8
+ "start": "ng serve",
9
+ "build": "ng build",
10
+ "watch": "ng build --watch --configuration development",
11
+ "test": "ng test --watch=false",
12
+ "lint": "tsc --noEmit -p tsconfig.app.json"
13
+ },
14
+ "dependencies": {
15
+ "@angular/cdk": "^19.2.19",
16
+ "@angular/common": "^19.2.0",
17
+ "@angular/compiler": "^19.2.0",
18
+ "@angular/core": "^19.2.0",
19
+ "@angular/forms": "^19.2.0",
20
+ "@angular/platform-browser": "^19.2.0",
21
+ "@angular/platform-browser-dynamic": "^19.2.0",
22
+ "@angular/router": "^19.2.0",
23
+ "@chill-sharp/ng-client": "file:packages/chill-sharp-ng-client-1.1.6.tgz",
24
+ "@chill-sharp/ts-client": "file:packages/chill-sharp-ts-client-1.1.6.tgz",
25
+ "@chill-sharp/ui-core": "file:packages/chill-sharp-ui-core-1.1.6.tgz",
26
+ "rxjs": "~7.8.0",
27
+ "tslib": "^2.3.0",
28
+ "zone.js": "~0.15.0"
29
+ },
30
+ "devDependencies": {
31
+ "@angular-devkit/build-angular": "^19.2.20",
32
+ "@angular/cli": "^19.2.20",
33
+ "@angular/compiler-cli": "^19.2.20",
34
+ "@types/jasmine": "~5.1.0",
35
+ "jasmine-core": "~5.6.0",
36
+ "karma": "~6.4.0",
37
+ "karma-chrome-launcher": "~3.2.0",
38
+ "karma-coverage": "~2.2.0",
39
+ "karma-jasmine": "~5.1.0",
40
+ "karma-jasmine-html-reporter": "~2.1.0",
41
+ "typescript": "~5.7.2"
42
+ }
43
+ }
@@ -1,15 +1,15 @@
1
- (function () {
2
- const DEBUG_CHILLSHARP_ENV = {
3
- uiUrl: 'http://localhost:6202',
4
- apiUrl: 'https://localhost:6002/api'
5
- };
6
-
7
- function readEnvValue(value, fallback) {
8
- return value && !/^\$\{[^}]+\}$/.test(value)
9
- ? value
10
- : fallback;
11
- }
12
-
13
- globalThis.CHILLSHARP_UI_URL = readEnvValue('${CHILLSHARP_UI_URL}', DEBUG_CHILLSHARP_ENV.uiUrl);
14
- globalThis.CHILLSHARP_API_URL = readEnvValue('${CHILLSHARP_API_URL}', DEBUG_CHILLSHARP_ENV.apiUrl);
15
- }());
1
+ (function () {
2
+ const DEBUG_CHILLSHARP_ENV = {
3
+ uiUrl: 'http://localhost:6202',
4
+ apiUrl: 'https://localhost:6002/api'
5
+ };
6
+
7
+ function readEnvValue(value, fallback) {
8
+ return value && !/^\$\{[^}]+\}$/.test(value)
9
+ ? value
10
+ : fallback;
11
+ }
12
+
13
+ globalThis.CHILLSHARP_UI_URL = readEnvValue('${CHILLSHARP_UI_URL}', DEBUG_CHILLSHARP_ENV.uiUrl);
14
+ globalThis.CHILLSHARP_API_URL = readEnvValue('${CHILLSHARP_API_URL}', DEBUG_CHILLSHARP_ENV.apiUrl);
15
+ }());
@@ -1,10 +1,10 @@
1
- globalThis.__clientUiTemplateRuntimeConfig__ = globalThis.__clientUiTemplateRuntimeConfig__ ?? {
2
- tenantCode: 'template-client',
3
- featureFlags: {
4
- clientHomeEnabled: true
5
- }
6
- };
7
-
8
- globalThis.__chillSharpUiRuntimeConfig__ = globalThis.__chillSharpUiRuntimeConfig__ ?? {
9
- workspaceTaskSources: []
10
- };
1
+ globalThis.__clientUiTemplateRuntimeConfig__ = globalThis.__clientUiTemplateRuntimeConfig__ ?? {
2
+ tenantCode: 'template-client',
3
+ featureFlags: {
4
+ clientHomeEnabled: true
5
+ }
6
+ };
7
+
8
+ globalThis.__chillSharpUiRuntimeConfig__ = globalThis.__chillSharpUiRuntimeConfig__ ?? {
9
+ workspaceTaskSources: []
10
+ };
@@ -1,8 +1,8 @@
1
- // Shared cache behavior is upgraded with @chill-sharp/ui-core.
2
- self.CHILL_SHARP_SW_OPTIONS = {
3
- cachePrefix: 'chill-sharp-ui',
4
- cacheVersion: 'v2',
5
- cacheTimeoutMs: 10 * 60 * 1000,
6
- appShell: ['/', '/index.html']
7
- };
8
- importScripts('./chill-sharp-service-worker.js');
1
+ // Shared cache behavior is upgraded with @chill-sharp/ui-core.
2
+ self.CHILL_SHARP_SW_OPTIONS = {
3
+ cachePrefix: 'chill-sharp-ui',
4
+ cacheVersion: 'v2',
5
+ cacheTimeoutMs: 10 * 60 * 1000,
6
+ appShell: ['/', '/index.html']
7
+ };
8
+ importScripts('./chill-sharp-service-worker.js');
@@ -1,15 +1,15 @@
1
- import { TestBed } from '@angular/core/testing';
2
- import { AppComponent } from './app.component';
3
-
4
- describe('AppComponent', () => {
5
- beforeEach(async () => {
6
- await TestBed.configureTestingModule({
7
- imports: [AppComponent]
8
- }).compileComponents();
9
- });
10
-
11
- it('creates the shell component', () => {
12
- const fixture = TestBed.createComponent(AppComponent);
13
- expect(fixture.componentInstance).toBeTruthy();
14
- });
15
- });
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { AppComponent } from './app.component';
3
+
4
+ describe('AppComponent', () => {
5
+ beforeEach(async () => {
6
+ await TestBed.configureTestingModule({
7
+ imports: [AppComponent]
8
+ }).compileComponents();
9
+ });
10
+
11
+ it('creates the shell component', () => {
12
+ const fixture = TestBed.createComponent(AppComponent);
13
+ expect(fixture.componentInstance).toBeTruthy();
14
+ });
15
+ });
@@ -1,10 +1,10 @@
1
- import { Component } from '@angular/core';
2
- import { ChillSharpUiRootComponent } from '@chill-sharp/ui-core';
3
-
4
- @Component({
5
- selector: 'app-root',
6
- standalone: true,
7
- imports: [ChillSharpUiRootComponent],
8
- template: '<chill-sharp-ui-root />'
9
- })
10
- export class AppComponent {}
1
+ import { Component } from '@angular/core';
2
+ import { ChillSharpUiRootComponent } from '@chill-sharp/ui-core';
3
+
4
+ @Component({
5
+ selector: 'app-root',
6
+ standalone: true,
7
+ imports: [ChillSharpUiRootComponent],
8
+ template: '<chill-sharp-ui-root />'
9
+ })
10
+ export class AppComponent {}
@@ -1,22 +1,22 @@
1
- import { APP_INITIALIZER, ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
2
- import { provideRouter } from '@angular/router';
3
- import { provideChillSharpUiCore } from '@chill-sharp/ui-core';
4
- import { appRoutes } from './app.routes';
5
- import { CLIENT_APP_CONFIG } from '../config/app-config';
6
- import { provideClientTemplateProviders } from './core/providers/client-template.providers';
7
-
8
- export const appConfig: ApplicationConfig = {
9
- providers: [
10
- provideZoneChangeDetection({ eventCoalescing: true }),
11
- provideRouter(appRoutes),
12
- ...provideChillSharpUiCore(),
13
- ...provideClientTemplateProviders(),
14
- {
15
- provide: APP_INITIALIZER,
16
- multi: true,
17
- useFactory: () => () => {
18
- globalThis.document.title = CLIENT_APP_CONFIG.appName;
19
- }
20
- }
21
- ]
22
- };
1
+ import { APP_INITIALIZER, ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
2
+ import { provideRouter } from '@angular/router';
3
+ import { provideChillSharpUiCore } from '@chill-sharp/ui-core';
4
+ import { appRoutes } from './app.routes';
5
+ import { CLIENT_APP_CONFIG } from '../config/app-config';
6
+ import { provideClientTemplateProviders } from './core/providers/client-template.providers';
7
+
8
+ export const appConfig: ApplicationConfig = {
9
+ providers: [
10
+ provideZoneChangeDetection({ eventCoalescing: true }),
11
+ provideRouter(appRoutes),
12
+ ...provideChillSharpUiCore(),
13
+ ...provideClientTemplateProviders(),
14
+ {
15
+ provide: APP_INITIALIZER,
16
+ multi: true,
17
+ useFactory: () => () => {
18
+ globalThis.document.title = CLIENT_APP_CONFIG.appName;
19
+ }
20
+ }
21
+ ]
22
+ };
@@ -1,14 +1,14 @@
1
- import { Routes } from '@angular/router';
2
- import { CHILL_SHARP_UI_ROUTES } from '@chill-sharp/ui-core';
3
- import { getClientFeatureRoutes } from './core/plugins/register-client-plugins';
4
-
5
- const coreRoutes = CHILL_SHARP_UI_ROUTES.filter((route) => route.path !== '**');
6
-
7
- export const appRoutes: Routes = [
8
- ...getClientFeatureRoutes(),
9
- ...coreRoutes,
10
- {
11
- path: '**',
12
- redirectTo: 'login'
13
- }
14
- ];
1
+ import { Routes } from '@angular/router';
2
+ import { CHILL_SHARP_UI_ROUTES } from '@chill-sharp/ui-core';
3
+ import { getClientFeatureRoutes } from './core/plugins/register-client-plugins';
4
+
5
+ const coreRoutes = CHILL_SHARP_UI_ROUTES.filter((route) => route.path !== '**');
6
+
7
+ export const appRoutes: Routes = [
8
+ ...getClientFeatureRoutes(),
9
+ ...coreRoutes,
10
+ {
11
+ path: '**',
12
+ redirectTo: 'login'
13
+ }
14
+ ];
@@ -1,12 +1,12 @@
1
- # Client Overrides
2
-
3
- Use this folder for client-specific provider replacements and future override registrations exposed by `@chill-sharp/ui-core`.
4
-
5
- Typical examples:
6
-
7
- - branded header providers
8
- - custom page title strategy
9
- - specialized service implementations
10
- - feature-flag-driven replacements
11
-
12
- `register-client-overrides.ts` returns an empty provider array by default so each client repo can opt into overrides intentionally.
1
+ # Client Overrides
2
+
3
+ Use this folder for client-specific provider replacements and future override registrations exposed by `@chill-sharp/ui-core`.
4
+
5
+ Typical examples:
6
+
7
+ - branded header providers
8
+ - custom page title strategy
9
+ - specialized service implementations
10
+ - feature-flag-driven replacements
11
+
12
+ `register-client-overrides.ts` returns an empty provider array by default so each client repo can opt into overrides intentionally.
@@ -1,5 +1,5 @@
1
- import { Provider } from '@angular/core';
2
-
3
- export function getClientOverrideProviders(): Provider[] {
4
- return [];
5
- }
1
+ import { Provider } from '@angular/core';
2
+
3
+ export function getClientOverrideProviders(): Provider[] {
4
+ return [];
5
+ }
@@ -1,17 +1,17 @@
1
- # Client Plugins
2
-
3
- Use this folder for client-owned extension registration.
4
-
5
- Typical examples:
6
-
7
- - client-only routes
8
- - extra menu integration when the core exposes plugin hooks
9
- - additional providers required by local features
10
-
11
- `register-client-plugins.ts` currently demonstrates the simplest template-owned extension: a client route.
12
-
13
- Included examples:
14
-
15
- - [`hello-plugin`](hello-plugin/README.md): route plugin that renders `Hello {{name}}` from `hello-plugin/:name`
16
-
17
- For plugin README guidance, see [`../../../../../HOW_TO_CREATE_UI_CORE_PLUGIN_README.md`](../../../../../HOW_TO_CREATE_UI_CORE_PLUGIN_README.md).
1
+ # Client Plugins
2
+
3
+ Use this folder for client-owned extension registration.
4
+
5
+ Typical examples:
6
+
7
+ - client-only routes
8
+ - extra menu integration when the core exposes plugin hooks
9
+ - additional providers required by local features
10
+
11
+ `register-client-plugins.ts` currently demonstrates the simplest template-owned extension: a client route.
12
+
13
+ Included examples:
14
+
15
+ - [`hello-plugin`](hello-plugin/README.md): route plugin that renders `Hello {{name}}` from `hello-plugin/:name`
16
+
17
+ For plugin README guidance, see [`../../../../../HOW_TO_CREATE_UI_CORE_PLUGIN_README.md`](../../../../../HOW_TO_CREATE_UI_CORE_PLUGIN_README.md).
@@ -1,25 +1,25 @@
1
- # Hello Plugin
2
-
3
- ## Purpose
4
-
5
- This is a simple template-owned route plugin. It renders:
6
-
7
- ```text
8
- Hello {{name}}
9
- ```
10
-
11
- where `name` is read from the route parameter.
12
-
13
- ## Registration
14
-
15
- The plugin is registered by `src/app/core/plugins/register-client-plugins.ts` at:
16
-
17
- ```text
18
- hello-plugin/:name
19
- ```
20
-
21
- Example URL:
22
-
23
- ```text
24
- /hello-plugin/Manu
25
- ```
1
+ # Hello Plugin
2
+
3
+ ## Purpose
4
+
5
+ This is a simple template-owned route plugin. It renders:
6
+
7
+ ```text
8
+ Hello {{name}}
9
+ ```
10
+
11
+ where `name` is read from the route parameter.
12
+
13
+ ## Registration
14
+
15
+ The plugin is registered by `src/app/core/plugins/register-client-plugins.ts` at:
16
+
17
+ ```text
18
+ hello-plugin/:name
19
+ ```
20
+
21
+ Example URL:
22
+
23
+ ```text
24
+ /hello-plugin/Manu
25
+ ```