@cima-foundation/schematics 18.0.1 → 20.0.0
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/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/package.json +1 -1
- package/src/new-library/files/__name@dasherize__/angular.json +51 -12
- package/src/new-library/files/__name@dasherize__/package.json +33 -39
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/ngsw-config.json +8 -1
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/app-routing.module.ts +5 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/app.component.ts +1 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/credits-page/credits-page.component.html +5 -3
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/credits-page/credits-page.component.scss +3 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/credits-page/credits-page.component.ts +45 -3
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/privacy/privacy.component.ts +4 -3
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/tor/tor.component.html +6 -6
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/tor/tor.component.ts +4 -3
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/dewiki/dewiki-page/dewiki-page.component.html +9 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/dewiki/dewiki-page/dewiki-page.component.scss +18 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/dewiki/dewiki-page/dewiki-page.component.ts +171 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/dewiki/dewiki-routing.module.ts +12 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/dewiki/dewiki.module.ts +15 -0
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/environments/environment.ts +2 -2
- package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/styles.scss +1 -1
- package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/package.json +3 -3
- package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/src/lib/components/__name@dasherize__-app-container/__name@dasherize__-app-container.component.ts +46 -1
- package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/src/lib/pages/home/home.component.ts +1 -0
- package/src/new-library/files/__name@dasherize__/tsconfig.json +2 -2
package/package.json
CHANGED
|
@@ -37,9 +37,12 @@
|
|
|
37
37
|
"prefix": "app",
|
|
38
38
|
"architect": {
|
|
39
39
|
"build": {
|
|
40
|
-
"builder": "@angular
|
|
40
|
+
"builder": "@angular/build:application",
|
|
41
41
|
"options": {
|
|
42
|
-
"outputPath":
|
|
42
|
+
"outputPath": {
|
|
43
|
+
"base": "dist/<%= dasherize(name) %>-test-app",
|
|
44
|
+
"browser": ""
|
|
45
|
+
},
|
|
43
46
|
"index": "projects/<%= dasherize(name) %>-test-app/src/index.html",
|
|
44
47
|
"main": "projects/<%= dasherize(name) %>-test-app/src/main.ts",
|
|
45
48
|
"polyfills": "projects/<%= dasherize(name) %>-test-app/src/polyfills.ts",
|
|
@@ -65,6 +68,11 @@
|
|
|
65
68
|
"glob": "**/*",
|
|
66
69
|
"input": "./projects/cima/<%= dasherize(name) %>/assets",
|
|
67
70
|
"output": "./assets/<%= dasherize(name) %>"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"glob": "package.json",
|
|
74
|
+
"input": "projects/cima/<%= dasherize(name) %>",
|
|
75
|
+
"output": "assets"
|
|
68
76
|
}
|
|
69
77
|
],
|
|
70
78
|
"styles": [
|
|
@@ -80,8 +88,8 @@
|
|
|
80
88
|
"includePaths": ["./node_modules/@cima/commons/src/styles"]
|
|
81
89
|
},
|
|
82
90
|
"scripts": [],
|
|
83
|
-
"serviceWorker":
|
|
84
|
-
"
|
|
91
|
+
"serviceWorker": "projects/<%= dasherize(name) %>-test-app/ngsw-config.json",
|
|
92
|
+
"browser": "projects/<%= dasherize(name) %>-test-app/src/main.ts"
|
|
85
93
|
},
|
|
86
94
|
"configurations": {
|
|
87
95
|
"production": {
|
|
@@ -106,18 +114,17 @@
|
|
|
106
114
|
"outputHashing": "all"
|
|
107
115
|
},
|
|
108
116
|
"development": {
|
|
109
|
-
"buildOptimizer": false,
|
|
110
117
|
"optimization": false,
|
|
111
|
-
"vendorChunk": true,
|
|
112
118
|
"extractLicenses": false,
|
|
113
119
|
"sourceMap": true,
|
|
114
|
-
"namedChunks": true
|
|
120
|
+
"namedChunks": true,
|
|
121
|
+
"outputHashing": "media"
|
|
115
122
|
}
|
|
116
123
|
},
|
|
117
124
|
"defaultConfiguration": "production"
|
|
118
125
|
},
|
|
119
126
|
"serve": {
|
|
120
|
-
"builder": "@angular
|
|
127
|
+
"builder": "@angular/build:dev-server",
|
|
121
128
|
"configurations": {
|
|
122
129
|
"production": {
|
|
123
130
|
"buildTarget": "<%= dasherize(name) %>-test-app:build:production"
|
|
@@ -129,13 +136,13 @@
|
|
|
129
136
|
"defaultConfiguration": "development"
|
|
130
137
|
},
|
|
131
138
|
"extract-i18n": {
|
|
132
|
-
"builder": "@angular
|
|
139
|
+
"builder": "@angular/build:extract-i18n",
|
|
133
140
|
"options": {
|
|
134
141
|
"buildTarget": "<%= dasherize(name) %>-test-app:build"
|
|
135
142
|
}
|
|
136
143
|
},
|
|
137
144
|
"test": {
|
|
138
|
-
"builder": "@angular
|
|
145
|
+
"builder": "@angular/build:karma",
|
|
139
146
|
"options": {
|
|
140
147
|
"main": "projects/<%= dasherize(name) %>-test-app/src/test.ts",
|
|
141
148
|
"polyfills": "projects/<%= dasherize(name) %>-test-app/src/polyfills.ts",
|
|
@@ -162,6 +169,12 @@
|
|
|
162
169
|
"glob": "**/*",
|
|
163
170
|
"input": "./projects/cima/<%= dasherize(name) %>/assets",
|
|
164
171
|
"output": "./assets/<%= dasherize(name) %>"
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
{
|
|
175
|
+
"glob": "package.json",
|
|
176
|
+
"input": "projects/cima/<%= dasherize(name) %>",
|
|
177
|
+
"output": "assets"
|
|
165
178
|
}
|
|
166
179
|
],
|
|
167
180
|
"styles": [
|
|
@@ -208,7 +221,7 @@
|
|
|
208
221
|
"prefix": "cima",
|
|
209
222
|
"architect": {
|
|
210
223
|
"build": {
|
|
211
|
-
"builder": "@angular
|
|
224
|
+
"builder": "@angular/build:ng-packagr",
|
|
212
225
|
"options": {
|
|
213
226
|
"project": "projects/cima/<%= dasherize(name) %>/ng-package.json"
|
|
214
227
|
},
|
|
@@ -223,7 +236,7 @@
|
|
|
223
236
|
"defaultConfiguration": "production"
|
|
224
237
|
},
|
|
225
238
|
"test": {
|
|
226
|
-
"builder": "@angular
|
|
239
|
+
"builder": "@angular/build:karma",
|
|
227
240
|
"options": {
|
|
228
241
|
"main": "projects/cima/<%= dasherize(name) %>/src/test.ts",
|
|
229
242
|
"tsConfig": "projects/cima/<%= dasherize(name) %>/tsconfig.spec.json",
|
|
@@ -232,5 +245,31 @@
|
|
|
232
245
|
}
|
|
233
246
|
}
|
|
234
247
|
}
|
|
248
|
+
},
|
|
249
|
+
"schematics": {
|
|
250
|
+
"@schematics/angular:component": {
|
|
251
|
+
"type": "component"
|
|
252
|
+
},
|
|
253
|
+
"@schematics/angular:directive": {
|
|
254
|
+
"type": "directive"
|
|
255
|
+
},
|
|
256
|
+
"@schematics/angular:service": {
|
|
257
|
+
"type": "service"
|
|
258
|
+
},
|
|
259
|
+
"@schematics/angular:guard": {
|
|
260
|
+
"typeSeparator": "."
|
|
261
|
+
},
|
|
262
|
+
"@schematics/angular:interceptor": {
|
|
263
|
+
"typeSeparator": "."
|
|
264
|
+
},
|
|
265
|
+
"@schematics/angular:module": {
|
|
266
|
+
"typeSeparator": "."
|
|
267
|
+
},
|
|
268
|
+
"@schematics/angular:pipe": {
|
|
269
|
+
"typeSeparator": "."
|
|
270
|
+
},
|
|
271
|
+
"@schematics/angular:resolver": {
|
|
272
|
+
"typeSeparator": "."
|
|
273
|
+
}
|
|
235
274
|
}
|
|
236
275
|
}
|
|
@@ -21,27 +21,25 @@
|
|
|
21
21
|
"private": true,
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"copyfiles": "^2.4.1",
|
|
24
|
-
"@
|
|
25
|
-
"@angular/
|
|
26
|
-
"@angular/
|
|
27
|
-
"@angular/
|
|
28
|
-
"@angular/
|
|
29
|
-
"@angular/
|
|
30
|
-
"@angular/
|
|
31
|
-
"@angular/
|
|
32
|
-
"@angular/platform-browser": "^
|
|
33
|
-
"@angular/
|
|
34
|
-
"@angular/
|
|
35
|
-
"@
|
|
24
|
+
"@angular/animations": "^20.2.4",
|
|
25
|
+
"@angular/cdk": "^20.2.2",
|
|
26
|
+
"@angular/common": "^20.2.4",
|
|
27
|
+
"@angular/compiler": "^20.2.4",
|
|
28
|
+
"@angular/core": "^20.2.4",
|
|
29
|
+
"@angular/forms": "^20.2.4",
|
|
30
|
+
"@angular/material": "^20.2.2",
|
|
31
|
+
"@angular/platform-browser": "^20.2.4",
|
|
32
|
+
"@angular/platform-browser-dynamic": "^20.2.4",
|
|
33
|
+
"@angular/router": "^20.2.4",
|
|
34
|
+
"@angular/service-worker": "^20.2.4",
|
|
35
|
+
"@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v20@latest",
|
|
36
36
|
"@fortawesome/fontawesome-free": "^6.3.0",
|
|
37
37
|
"@kolkov/angular-editor": "3.0.0-beta.0",
|
|
38
38
|
"@ngneat/until-destroy": "^10.0.0",
|
|
39
39
|
"@ngx-translate/core": "^15.0.0",
|
|
40
40
|
"@svgdotjs/svg.js": "^3.1.2",
|
|
41
41
|
"angular-animations": "^0.11.0",
|
|
42
|
-
"angular-gridster2": "^18.0.1",
|
|
43
42
|
"angular-oauth2-oidc": "^17.0.1",
|
|
44
|
-
"bootstrap": "^5.1.3",
|
|
45
43
|
"flag-icons": "^7.1.0",
|
|
46
44
|
"jwt-decode": "^4.0.0",
|
|
47
45
|
"leaflet": "1.9.4",
|
|
@@ -50,40 +48,36 @@
|
|
|
50
48
|
"ngx-color-picker": "^16.0.0",
|
|
51
49
|
"ngx-file-drop": "^16.0.0",
|
|
52
50
|
"ngx-masonry": "^14.0.1",
|
|
53
|
-
"ngx-order-pipe": "^
|
|
54
|
-
"rxjs": "^7.
|
|
51
|
+
"ngx-order-pipe": "^2.2.0",
|
|
52
|
+
"rxjs": "^7.4.0",
|
|
55
53
|
"swiper": "^7.3.3",
|
|
56
54
|
"tslib": "^2.3.0",
|
|
57
|
-
"zone.js": "~0.
|
|
55
|
+
"zone.js": "~0.15.1",
|
|
56
|
+
"bootstrap": "^5.3.3",
|
|
57
|
+
"angular-gridster2": "^20.2.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@angular
|
|
61
|
-
"@angular/
|
|
62
|
-
"@angular/compiler-cli": "^18.2.13",
|
|
63
|
-
"@angular/localize": "^18.2.13",
|
|
60
|
+
"@angular/compiler-cli": "^20.2.4",
|
|
61
|
+
"@angular/localize": "^20.2.4",
|
|
64
62
|
"@types/chance": "^1.1.3",
|
|
65
63
|
"@types/jasmine": "~5.1.4",
|
|
66
|
-
"@types/leaflet": "^1.7.
|
|
64
|
+
"@types/leaflet": "^1.7.10",
|
|
67
65
|
"@types/node": "^20.11.16",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"karma-coverage": "~2.0.3",
|
|
72
|
-
"karma-jasmine": "~4.0.0",
|
|
73
|
-
"karma-jasmine-html-reporter": "^1.5.0",
|
|
74
|
-
"ng-packagr": "^18.2.1",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "8.15.0",
|
|
67
|
+
"@typescript-eslint/parser": "8.15.0",
|
|
68
|
+
"ng-packagr": "^20.2.0",
|
|
75
69
|
"npm-run-all": "^4.1.5",
|
|
76
|
-
"rimraf": "^
|
|
77
|
-
"typescript": "~5.
|
|
70
|
+
"rimraf": "^6.0.1",
|
|
71
|
+
"typescript": "~5.9.2",
|
|
78
72
|
"wait-on": "^7.2.0",
|
|
79
73
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
80
|
-
"@angular-eslint/builder": "
|
|
81
|
-
"@angular-eslint/eslint-plugin": "
|
|
82
|
-
"@angular-eslint/eslint-plugin-template": "
|
|
83
|
-
"@angular-eslint/schematics": "
|
|
84
|
-
"@angular-eslint/template-parser": "
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
-
"eslint": "
|
|
74
|
+
"@angular-eslint/builder": "20.2.0",
|
|
75
|
+
"@angular-eslint/eslint-plugin": "20.2.0",
|
|
76
|
+
"@angular-eslint/eslint-plugin-template": "20.2.0",
|
|
77
|
+
"@angular-eslint/schematics": "20.2.0",
|
|
78
|
+
"@angular-eslint/template-parser": "20.2.0",
|
|
79
|
+
"@angular/build": "^20.2.1",
|
|
80
|
+
"@angular/cli": "^20.2.1",
|
|
81
|
+
"eslint": "9.34.0"
|
|
88
82
|
}
|
|
89
83
|
}
|
|
@@ -18,6 +18,11 @@ const routes: Routes = [
|
|
|
18
18
|
loadChildren: () =>
|
|
19
19
|
import('./credits/credits.module').then((m) => m.CreditsModule),
|
|
20
20
|
},
|
|
21
|
+
{
|
|
22
|
+
path: 'dewiki',
|
|
23
|
+
loadChildren: () =>
|
|
24
|
+
import('./dewiki/dewiki.module').then((m) => m.DewikiModule),
|
|
25
|
+
},
|
|
21
26
|
{
|
|
22
27
|
path: '',
|
|
23
28
|
loadChildren: () =>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
1
|
+
<div class="">
|
|
2
|
+
<cima-page-container style="background-color:unset">
|
|
3
|
+
<commons-credits [credits]="credits"></commons-credits>
|
|
4
|
+
</cima-page-container>
|
|
5
|
+
</div>
|
|
@@ -2,9 +2,10 @@ import { Component, AfterViewInit } from '@angular/core';
|
|
|
2
2
|
import {CimaConfigService, FaviconService, PortalService} from '@cima/commons';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
selector: 'cima-credits-page',
|
|
6
|
+
templateUrl: './credits-page.component.html',
|
|
7
|
+
styleUrls: ['./credits-page.component.scss'],
|
|
8
|
+
standalone: false
|
|
8
9
|
})
|
|
9
10
|
export class CreditsPageComponent implements AfterViewInit {
|
|
10
11
|
constructor(
|
|
@@ -17,5 +18,46 @@ export class CreditsPageComponent implements AfterViewInit {
|
|
|
17
18
|
ngAfterViewInit(): void {
|
|
18
19
|
this.portalService.setTitle(`Credits`);
|
|
19
20
|
this.faviconService.setPortalFavicon();
|
|
21
|
+
this.configService.getStaticCredits().subscribe((credits) => {
|
|
22
|
+
this.credits = credits;
|
|
23
|
+
} );
|
|
24
|
+
|
|
25
|
+
// set lang available for the app
|
|
26
|
+
this.portalService.availableLanguages = [
|
|
27
|
+
{
|
|
28
|
+
key: 'en',
|
|
29
|
+
flag: 'gb',
|
|
30
|
+
label: 'English',
|
|
31
|
+
direction: 'ltr',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: 'it',
|
|
35
|
+
flag: 'it',
|
|
36
|
+
label: 'Italiano',
|
|
37
|
+
direction: 'ltr',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: 'es',
|
|
41
|
+
flag: 'es',
|
|
42
|
+
label: 'Español',
|
|
43
|
+
direction: 'ltr',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'fr',
|
|
47
|
+
flag: 'fr',
|
|
48
|
+
label: 'Français',
|
|
49
|
+
direction: 'ltr',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'pt',
|
|
53
|
+
flag: 'pt',
|
|
54
|
+
label: 'Português',
|
|
55
|
+
direction: 'ltr',
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
// set current lang from local storage
|
|
60
|
+
this.portalService.setLangFromLocalStorage()
|
|
61
|
+
|
|
20
62
|
}
|
|
21
63
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Component, OnInit } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
selector: 'app-privacy',
|
|
5
|
+
templateUrl: './privacy.component.html',
|
|
6
|
+
styleUrls: ['./privacy.component.scss'],
|
|
7
|
+
standalone: false
|
|
7
8
|
})
|
|
8
9
|
export class PrivacyComponent implements OnInit {
|
|
9
10
|
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
</p>
|
|
45
45
|
<p>
|
|
46
46
|
- <strong><em>Propagator</em></strong
|
|
47
|
-
|
|
47
|
+
>: servizio applicativo messo a disposizione di alcuni Utenti a supporto
|
|
48
48
|
delle attività di lotta attiva agli incendi boschivi, customizzabile
|
|
49
49
|
per ciascun Utente.
|
|
50
50
|
</p>
|
|
51
51
|
<p>
|
|
52
52
|
- <strong><em>Bulletin</em></strong
|
|
53
|
-
|
|
53
|
+
>: servizio applicativo messo a disposizione di alcuni Utenti a supporto
|
|
54
54
|
delle attività di allertamento, customizzabile per ciascun Utente.
|
|
55
55
|
</p>
|
|
56
56
|
<h3><strong>Idoneità ed accesso</strong></h3>
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
"In caso di conflitto tra gli obblighi del licenziatario derivanti dalla
|
|
154
154
|
licenza EUPL, e quelli derivanti dalle licenze delle componenti integrate,
|
|
155
155
|
ai sensi della clausola di compatibilità “<em
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
>prevalgono gli obblighi prescritti dalla licenza compatibile</em
|
|
157
|
+
>".
|
|
158
158
|
</p>
|
|
159
159
|
<p>
|
|
160
160
|
<strong><em>Utilizzo del portale da parte dell’Utente</em></strong>
|
|
@@ -285,8 +285,8 @@
|
|
|
285
285
|
<li>
|
|
286
286
|
il soggetto richiedente deve darne preventiva comunicazione a DPC o a CIMA
|
|
287
287
|
inviando una e-mail all’indirizzo dewetra@protezionecivile.it<strong
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
>,</strong
|
|
289
|
+
>
|
|
290
290
|
indicando i propri dati identificativi ed il motivo della richiesta;
|
|
291
291
|
</li>
|
|
292
292
|
<li>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Component, OnInit } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
selector: 'cima-tor',
|
|
5
|
+
templateUrl: './tor.component.html',
|
|
6
|
+
styleUrls: ['./tor.component.scss'],
|
|
7
|
+
standalone: false
|
|
7
8
|
})
|
|
8
9
|
export class TorComponent implements OnInit {
|
|
9
10
|
constructor() {}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
import { ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { combineLatest, Subject } from 'rxjs';
|
|
5
|
+
import { startWith, takeUntil } from 'rxjs/operators';
|
|
6
|
+
|
|
7
|
+
import { FaviconService, PortalService } from '@cima/commons';
|
|
8
|
+
|
|
9
|
+
const DEFAULT_DEWIKI_BASE_URL = 'https://mydewiki.cimafoundation.org/';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/* GENERAL INFO*/
|
|
13
|
+
/*to open specific url in iframe pass url params in this way: ../dewiki?url=https://mydewiki.cimafoundation.org/it/myDW3/Accesso */
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'cima-dewiki-page',
|
|
18
|
+
templateUrl: './dewiki-page.component.html',
|
|
19
|
+
styleUrls: ['./dewiki-page.component.scss'],
|
|
20
|
+
standalone: false,
|
|
21
|
+
})
|
|
22
|
+
export class DewikiPageComponent
|
|
23
|
+
implements OnInit, AfterViewInit, OnDestroy
|
|
24
|
+
{
|
|
25
|
+
iframeSrc: SafeResourceUrl;
|
|
26
|
+
|
|
27
|
+
private readonly destroy$ = new Subject<void>();
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
private portalService: PortalService,
|
|
31
|
+
private faviconService: FaviconService,
|
|
32
|
+
private route: ActivatedRoute,
|
|
33
|
+
private sanitizer: DomSanitizer
|
|
34
|
+
) {
|
|
35
|
+
this.iframeSrc = this.toSafeUrl(this.getDefaultUrl());
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
ngOnInit(): void {
|
|
39
|
+
const queryParam$ = this.route.queryParamMap.pipe(
|
|
40
|
+
takeUntil(this.destroy$),
|
|
41
|
+
startWith(this.route.snapshot.queryParamMap)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const langChange$ = this.portalService.translate.onLangChange.pipe(
|
|
45
|
+
startWith(null)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
combineLatest([queryParam$, langChange$])
|
|
49
|
+
.pipe(takeUntil(this.destroy$))
|
|
50
|
+
.subscribe(([params]) => {
|
|
51
|
+
const queryUrl = params.get('url');
|
|
52
|
+
const fallbackParam = this.route.snapshot.paramMap.get('url');
|
|
53
|
+
const target = queryUrl ?? fallbackParam;
|
|
54
|
+
this.iframeSrc = this.toSafeUrl(this.resolveUrl(target));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ngAfterViewInit(): void {
|
|
59
|
+
this.portalService.setTitle('DeWiki');
|
|
60
|
+
this.faviconService.setPortalFavicon();
|
|
61
|
+
// set lang available for the app
|
|
62
|
+
this.portalService.availableLanguages = [
|
|
63
|
+
{
|
|
64
|
+
key: 'en',
|
|
65
|
+
flag: 'gb',
|
|
66
|
+
label: 'English',
|
|
67
|
+
direction: 'ltr',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: 'it',
|
|
71
|
+
flag: 'it',
|
|
72
|
+
label: 'Italiano',
|
|
73
|
+
direction: 'ltr',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: 'es',
|
|
77
|
+
flag: 'es',
|
|
78
|
+
label: 'Español',
|
|
79
|
+
direction: 'ltr',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: 'fr',
|
|
83
|
+
flag: 'fr',
|
|
84
|
+
label: 'Français',
|
|
85
|
+
direction: 'ltr',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: 'pt',
|
|
89
|
+
flag: 'pt',
|
|
90
|
+
label: 'Português',
|
|
91
|
+
direction: 'ltr',
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
// set current lang from local storage
|
|
96
|
+
this.portalService.setLangFromLocalStorage()
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
ngOnDestroy(): void {
|
|
101
|
+
this.destroy$.next();
|
|
102
|
+
this.destroy$.complete();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private resolveUrl(rawValue: string | null): string {
|
|
106
|
+
const baseUrl = this.getDefaultUrl();
|
|
107
|
+
|
|
108
|
+
if (!rawValue) {
|
|
109
|
+
return baseUrl;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const trimmedValue = rawValue.trim();
|
|
113
|
+
if (!trimmedValue) {
|
|
114
|
+
return baseUrl;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (/^https?:\/\//i.test(trimmedValue)) {
|
|
118
|
+
return trimmedValue;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
return new URL(trimmedValue, baseUrl).toString();
|
|
123
|
+
} catch {
|
|
124
|
+
return baseUrl;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private toSafeUrl(url: string): SafeResourceUrl {
|
|
129
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private getDefaultUrl(): string {
|
|
133
|
+
const base = DEFAULT_DEWIKI_BASE_URL.endsWith('/')
|
|
134
|
+
? DEFAULT_DEWIKI_BASE_URL
|
|
135
|
+
: `${DEFAULT_DEWIKI_BASE_URL}/`;
|
|
136
|
+
const language = this.getCurrentLanguageKey();
|
|
137
|
+
return `${base}${language}/`;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private getCurrentLanguageKey(): string {
|
|
141
|
+
const translateLang = this.normalizeLanguageKey(
|
|
142
|
+
this.portalService.translate.currentLang
|
|
143
|
+
);
|
|
144
|
+
if (translateLang) {
|
|
145
|
+
return translateLang;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const currentLang = this.normalizeLanguageKey(
|
|
149
|
+
this.portalService.currentLang?.key
|
|
150
|
+
);
|
|
151
|
+
if (currentLang) {
|
|
152
|
+
return currentLang;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return 'en';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
private normalizeLanguageKey(lang: string | undefined | null): string | null {
|
|
159
|
+
if (!lang) {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const cleaned = lang.trim().toLowerCase();
|
|
164
|
+
if (!cleaned) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const [primary] = cleaned.split(/[-_]/);
|
|
169
|
+
return primary || cleaned;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { DewikiPageComponent } from './dewiki-page/dewiki-page.component';
|
|
5
|
+
|
|
6
|
+
const routes: Routes = [{ path: '', component: DewikiPageComponent }];
|
|
7
|
+
|
|
8
|
+
@NgModule({
|
|
9
|
+
imports: [RouterModule.forChild(routes)],
|
|
10
|
+
exports: [RouterModule],
|
|
11
|
+
})
|
|
12
|
+
export class DewikiRoutingModule {}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { CimaCommonsModule } from '@cima/commons';
|
|
4
|
+
|
|
5
|
+
import { SharedModule } from '../shared/shared.module';
|
|
6
|
+
|
|
7
|
+
import { DewikiRoutingModule } from './dewiki-routing.module';
|
|
8
|
+
|
|
9
|
+
import { DewikiPageComponent } from './dewiki-page/dewiki-page.component';
|
|
10
|
+
|
|
11
|
+
@NgModule({
|
|
12
|
+
declarations: [DewikiPageComponent],
|
|
13
|
+
imports: [SharedModule, CimaCommonsModule, DewikiRoutingModule],
|
|
14
|
+
})
|
|
15
|
+
export class DewikiModule {}
|
|
@@ -7,10 +7,10 @@ export const environment = {
|
|
|
7
7
|
production: false,
|
|
8
8
|
fakeData: false,
|
|
9
9
|
debug: true,
|
|
10
|
-
devUser: '
|
|
10
|
+
devUser: '',
|
|
11
11
|
server: {
|
|
12
12
|
baseUrl: 'https://bricks-developers-access.cimafoundation.org/api',
|
|
13
13
|
configEndpoint: '/acroweb',
|
|
14
|
-
wsEndpoint: '
|
|
14
|
+
wsEndpoint: 'wss://bricks-developers-access.cimafoundation.org/api/ws/notifier/',
|
|
15
15
|
},
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "app";
|
package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cima/<%= dasherize(name) %>",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^20.0.0",
|
|
6
|
+
"@angular/core": "^20.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, Component, Inject } from '@angular/core';
|
|
2
2
|
|
|
3
|
-
import { AppConfig, APP_CONFIG, FaviconService, PortalService } from '@cima/commons';
|
|
3
|
+
import { AppConfig, APP_CONFIG, FaviconService, PortalService, VersionService } from '@cima/commons';
|
|
4
4
|
|
|
5
5
|
import {LangChangeEvent, TranslateService} from "@ngx-translate/core";
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ import {LangChangeEvent, TranslateService} from "@ngx-translate/core";
|
|
|
9
9
|
selector: '<%= dasherize(name) %>-app-container',
|
|
10
10
|
templateUrl: './<%= dasherize(name) %>-app-container.component.html',
|
|
11
11
|
styleUrls: ['./<%= dasherize(name) %>-app-container.component.scss'],
|
|
12
|
+
standalone: false
|
|
12
13
|
})
|
|
13
14
|
export class <%= classify(name) %>AppContainerComponent implements AfterViewInit{
|
|
14
15
|
constructor(
|
|
@@ -16,6 +17,7 @@ export class <%= classify(name) %>AppContainerComponent implements AfterViewIni
|
|
|
16
17
|
private faviconService: FaviconService,
|
|
17
18
|
private portalService: PortalService,
|
|
18
19
|
public translate: TranslateService,
|
|
20
|
+
private versionService: VersionService
|
|
19
21
|
) {
|
|
20
22
|
|
|
21
23
|
let portal_current_language: string = this.translate.currentLang;
|
|
@@ -31,5 +33,48 @@ export class <%= classify(name) %>AppContainerComponent implements AfterViewIni
|
|
|
31
33
|
ngAfterViewInit() {
|
|
32
34
|
this.faviconService.setAppFavicon(this.config.name);
|
|
33
35
|
this.portalService.setTitle(this.config.description);
|
|
36
|
+
|
|
37
|
+
// set lang available for the app
|
|
38
|
+
this.portalService.availableLanguages = [
|
|
39
|
+
{
|
|
40
|
+
key: 'en',
|
|
41
|
+
flag: 'gb',
|
|
42
|
+
label: 'English',
|
|
43
|
+
direction: 'rtl',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'it',
|
|
47
|
+
flag: 'it',
|
|
48
|
+
label: 'Italiano',
|
|
49
|
+
direction: 'rtl',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'es',
|
|
53
|
+
flag: 'es',
|
|
54
|
+
label: 'Español',
|
|
55
|
+
direction: 'rtl',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'fr',
|
|
59
|
+
flag: 'fr',
|
|
60
|
+
label: 'Français',
|
|
61
|
+
direction: 'rtl',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: 'pt',
|
|
65
|
+
flag: 'pt',
|
|
66
|
+
label: 'Português',
|
|
67
|
+
direction: 'rtl',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: 'us',
|
|
71
|
+
flag: 'us',
|
|
72
|
+
label: 'United States',
|
|
73
|
+
direction: 'rtl',
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
this.portalService.setLangFromLocalStorage()
|
|
77
|
+
|
|
78
|
+
this.versionService.checkRemoteVersion(this.config.version)
|
|
34
79
|
}
|
|
35
80
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"baseUrl": "./",
|
|
11
11
|
"outDir": "./dist/out-tsc",
|
|
12
|
+
"esModuleInterop": true,
|
|
12
13
|
"forceConsistentCasingInFileNames": true,
|
|
13
14
|
"strict": true,
|
|
14
15
|
"strictNullChecks": false,
|
|
@@ -16,9 +17,8 @@
|
|
|
16
17
|
"noFallthroughCasesInSwitch": true,
|
|
17
18
|
"sourceMap": true,
|
|
18
19
|
"declaration": false,
|
|
19
|
-
"downlevelIteration": true,
|
|
20
20
|
"experimentalDecorators": true,
|
|
21
|
-
"moduleResolution": "
|
|
21
|
+
"moduleResolution": "bundler",
|
|
22
22
|
"importHelpers": true,
|
|
23
23
|
"target": "ES2022",
|
|
24
24
|
"module": "es2020",
|