@cima-foundation/schematics 0.4.9 → 0.4.10

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/README.md CHANGED
@@ -22,7 +22,10 @@ To publish, simply do:
22
22
 
23
23
  ```bash
24
24
  npm run build
25
+ npm login
25
26
  npm publish
27
+ or
28
+ npm publish --access public
26
29
  ```
27
30
 
28
31
  That's it!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cima-foundation/schematics",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "description": "A blank schematics",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -51,6 +51,16 @@
51
51
  "projects/<%= dasherize(name) %>-test-app/src/web.config",
52
52
  "projects/<%= dasherize(name) %>-test-app/src/silent-refresh.html",
53
53
  "projects/<%= dasherize(name) %>-test-app/src/manifest.webmanifest",
54
+ {
55
+ "glob": "**/*",
56
+ "input": "./node_modules/@cima/commons/icons",
57
+ "output": "./assets/icons"
58
+ },
59
+ {
60
+ "glob": "**/*",
61
+ "input": "./node_modules/@cima/commons/img",
62
+ "output": "./assets/img"
63
+ },
54
64
  {
55
65
  "glob": "**/*",
56
66
  "input": "./projects/cima/<%= dasherize(name) %>/assets",
@@ -62,7 +72,8 @@
62
72
  "projects/<%= dasherize(name) %>-test-app/src/styles.scss",
63
73
  "node_modules/@fortawesome/fontawesome-free/css/all.css",
64
74
  "node_modules/bootstrap/scss/bootstrap-grid.scss",
65
- "node_modules/bootstrap/scss/bootstrap-utilities.scss"
75
+ "node_modules/bootstrap/scss/bootstrap-utilities.scss",
76
+ "node_modules/flag-icons/css/flag-icons.min.css"
66
77
  ],
67
78
  "allowedCommonJsDependencies": ["ngx-masonry"],
68
79
  "stylePreprocessorOptions": {
@@ -158,7 +169,8 @@
158
169
  "projects/<%= dasherize(name) %>-test-app/src/styles.scss",
159
170
  "node_modules/@fortawesome/fontawesome-free/css/all.css",
160
171
  "node_modules/bootstrap/scss/bootstrap-grid.scss",
161
- "node_modules/bootstrap/scss/bootstrap-utilities.scss"
172
+ "node_modules/bootstrap/scss/bootstrap-utilities.scss",
173
+ "node_modules/flag-icons/css/flag-icons.min.css"
162
174
  ],
163
175
  "scripts": []
164
176
  }
@@ -27,11 +27,12 @@
27
27
  "@angular/flex-layout": "^13.0.0-beta.36",
28
28
  "@angular/forms": "~13.3.0",
29
29
  "@angular/material": "^13.2.3",
30
+ "@ngx-translate/core": "^14.0.0",
30
31
  "@angular/platform-browser": "~13.3.0",
31
32
  "@angular/platform-browser-dynamic": "~13.3.0",
32
33
  "@angular/router": "~13.3.0",
33
34
  "@angular/service-worker": "~13.3.0",
34
- "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.9.55",
35
+ "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.9.58",
35
36
  "@cima/dashboard": "git+https://github.com/CIMAFoundation/ngx-cima-dashboard.git#v0.4.4",
36
37
  "@fortawesome/fontawesome-free": "^6.3.0",
37
38
  "@kolkov/angular-editor": "2.0.0",
@@ -1,5 +1,6 @@
1
1
  import { APP_INITIALIZER, LOCALE_ID, NgModule } from '@angular/core';
2
2
  import { ServiceWorkerModule } from '@angular/service-worker';
3
+ import {TranslateModule} from "@ngx-translate/core";
3
4
 
4
5
  import {
5
6
  CimaCommonsModule,
@@ -43,6 +44,9 @@ registerLocaleData(localeIt, 'it-IT', localeItExtra);
43
44
  // or after 30 seconds (whichever comes first).
44
45
  registrationStrategy: 'registerWhenStable:30000',
45
46
  }),
47
+ TranslateModule.forRoot({
48
+ defaultLanguage: 'en',
49
+ })
46
50
  ],
47
51
  providers: [
48
52
  AuthGuard,
@@ -2,6 +2,8 @@ import { AfterViewInit, Component, Inject } from '@angular/core';
2
2
 
3
3
  import { AppConfig, APP_CONFIG, FaviconService, PortalService } from '@cima/commons';
4
4
 
5
+ import {LangChangeEvent, TranslateService} from "@ngx-translate/core";
6
+
5
7
 
6
8
  @Component({
7
9
  selector: '<%= dasherize(name) %>-app-container',
@@ -12,8 +14,13 @@ export class <%= classify(name) %>AppContainerComponent implements AfterViewIni
12
14
  constructor(
13
15
  @Inject(APP_CONFIG) private config: AppConfig,
14
16
  private faviconService: FaviconService,
15
- private portalService: PortalService
16
- ) {}
17
+ private portalService: PortalService,
18
+ public translate: TranslateService,
19
+ ) {
20
+ this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
21
+ this.portalService.getPortalLabels('mydewetra', '<%= dasherize(name) %>', event.lang);
22
+ });
23
+ }
17
24
 
18
25
  ngAfterViewInit() {
19
26
  this.faviconService.setAppFavicon(this.config.name);
@@ -30,10 +30,11 @@
30
30
  "@angular/platform-browser-dynamic": "~13.3.0",
31
31
  "@angular/router": "~13.3.0",
32
32
  "@angular/service-worker": "~13.3.0",
33
- "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.9.55",
33
+ "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.9.58",
34
34
  "@cima/dashboard": "git+https://github.com/CIMAFoundation/ngx-cima-dashboard.git#v0.4.4",
35
35
  "@cima/kumale": "git+https://github.com/CIMAFoundation/ngx-cima-kumale.git#v0.1.18",
36
36
  "@cima/admin": "git+https://github.com/CIMAFoundation/ngx-cima-admin.git#v0.1.15",
37
+ "@ngx-translate/core": "^14.0.0",
37
38
  "@fortawesome/fontawesome-free": "^6.3.0",
38
39
  "@kolkov/angular-editor": "2.0.0",
39
40
  "@ngneat/until-destroy": "^8.1.4",
@@ -8,6 +8,8 @@ import { OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
8
8
  import localeIt from '@angular/common/locales/it';
9
9
  import localeItExtra from '@angular/common/locales/extra/it';
10
10
 
11
+ import {TranslateModule} from "@ngx-translate/core";
12
+
11
13
  registerLocaleData(localeIt, 'it-IT', localeItExtra);
12
14
 
13
15
  import {
@@ -45,6 +47,9 @@ import { AppComponent } from './app.component';
45
47
  // or after 30 seconds (whichever comes first).
46
48
  registrationStrategy: 'registerWhenStable:30000',
47
49
  }),
50
+ TranslateModule.forRoot({
51
+ defaultLanguage: 'en',
52
+ })
48
53
  ],
49
54
  providers: [
50
55
  AuthGuard,