@cima-foundation/schematics 0.4.10 → 0.4.12

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 (14) hide show
  1. package/.idea/vcs.xml +6 -0
  2. package/package.json +1 -1
  3. package/src/new-library/files/__name@dasherize__/.github/distWorkflow/.github/workflows/tag.yml +26 -0
  4. package/src/new-library/files/__name@dasherize__/.github/workflows/build-and-release-app.yml +15 -0
  5. package/src/new-library/files/__name@dasherize__/.github/workflows/build-push-lib.yml +17 -0
  6. package/src/new-library/files/__name@dasherize__/angular.json +1 -1
  7. package/src/new-library/files/__name@dasherize__/package.json +4 -2
  8. package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/app-routing.module.ts +1 -12
  9. package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/credits-page/credits-page.component.html +3 -5
  10. package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/app/credits/credits-page/credits-page.component.ts +15 -6
  11. package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/environments/environment.prod.ts +10 -5
  12. package/src/new-library/files/__name@dasherize__/projects/__name@dasherize__-test-app/src/environments/environment.ts +3 -11
  13. package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/src/lib/components/__name@dasherize__-app-container/__name@dasherize__-app-container.component.html +1 -1
  14. package/src/new-library/files/__name@dasherize__/projects/cima/__name@dasherize__/src/lib/components/__name@dasherize__-app-container/__name@dasherize__-app-container.component.ts +6 -0
package/.idea/vcs.xml CHANGED
@@ -1,5 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
+ <component name="CommitMessageInspectionProfile">
4
+ <profile version="1.0">
5
+ <inspection_tool class="CommitFormat" enabled="true" level="WARNING" enabled_by_default="true" />
6
+ <inspection_tool class="CommitNamingConvention" enabled="true" level="WARNING" enabled_by_default="true" />
7
+ </profile>
8
+ </component>
3
9
  <component name="VcsDirectoryMappings">
4
10
  <mapping directory="" vcs="Git" />
5
11
  </component>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cima-foundation/schematics",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "A blank schematics",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -0,0 +1,26 @@
1
+ name: Tag and Release
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+
7
+ jobs:
8
+ release-on-push:
9
+ runs-on: ubuntu-latest
10
+ env:
11
+ GITHUB_TOKEN: ${{ secrets.CIMA_MACHINE_USER_API_TOKEN }}
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@main
15
+
16
+ - name: Extract version
17
+ id: extract_version
18
+ uses: Saionaro/extract-package-version@v1.2.1
19
+
20
+ - name: Print version
21
+ run: echo ${{ steps.extract_version.outputs.version }}
22
+
23
+ - name: tag-and-release
24
+ uses: avakar/tag-and-release@v1
25
+ with:
26
+ tag_name: v${{ steps.extract_version.outputs.version }}
@@ -0,0 +1,15 @@
1
+ name: Build and Release App
2
+ on:
3
+ push:
4
+ tags: [v*]
5
+
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ test-app-build:
10
+ uses: CIMAFoundation/deployments-manager/.github/workflows/ngx-cima-release-app.yaml@main
11
+ with:
12
+ application-name: <%= dasherize(name) %>
13
+ build-script: npm run build:prod
14
+ npm-install-command: install
15
+ secrets: inherit
@@ -0,0 +1,17 @@
1
+
2
+ name: Build and Release
3
+ on:
4
+ push:
5
+ #only on tag and push on branch commons
6
+ tags: [v*]
7
+
8
+ jobs:
9
+ ci-commons:
10
+ uses: CIMAFoundation/deployments-manager/.github/workflows/ngx-cima-release.yaml@main
11
+ with:
12
+ project-name: <%= dasherize(name) %>
13
+ release-repo: ngx-cima-<%= dasherize(name) %>
14
+ user-email: alessandro.casasola@cimafoundation.org
15
+ npm-install-command: install
16
+ secrets: inherit
17
+
@@ -89,7 +89,7 @@
89
89
  {
90
90
  "type": "initial",
91
91
  "maximumWarning": "750kb",
92
- "maximumError": "2mb"
92
+ "maximumError": "8mb"
93
93
  },
94
94
  {
95
95
  "type": "anyComponentStyle",
@@ -6,6 +6,7 @@
6
6
  "start": "npm run clean:dist && ng serve --port=4201",
7
7
  "build": "ng build",
8
8
  "build:prod": "ng build --configuration production",
9
+ "release": "node ./node_modules/@cima/commons/scripts/tag-and-release.js",
9
10
  "clean:dist": "rimraf dist",
10
11
  "clean:package-lock": "rimraf package-lock.json",
11
12
  "clean:npm": "rimraf node_modules && npm cache verify",
@@ -32,8 +33,7 @@
32
33
  "@angular/platform-browser-dynamic": "~13.3.0",
33
34
  "@angular/router": "~13.3.0",
34
35
  "@angular/service-worker": "~13.3.0",
35
- "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.9.58",
36
- "@cima/dashboard": "git+https://github.com/CIMAFoundation/ngx-cima-dashboard.git#v0.4.4",
36
+ "@cima/commons": "git+https://github.com/CIMAFoundation/ngx-cima-commons.git#v0.13.6",
37
37
  "@fortawesome/fontawesome-free": "^6.3.0",
38
38
  "@kolkov/angular-editor": "2.0.0",
39
39
  "@ngneat/until-destroy": "^8.1.4",
@@ -45,6 +45,8 @@
45
45
  "flag-icons": "^6.2.0",
46
46
  "jwt-decode": "^3.1.2",
47
47
  "leaflet": "^1.8.0",
48
+ "@svgdotjs/svg.js": "^3.2.0",
49
+ "ngx-file-drop": "^13.0.0",
48
50
  "masonry-layout": "^4.2.2",
49
51
  "moment": "^2.29.1",
50
52
  "ngx-color-picker": "^12.0.1",
@@ -8,29 +8,18 @@ import {
8
8
  } from '@cima/commons';
9
9
 
10
10
  const routes: Routes = [
11
- {
12
- path: '',
13
- redirectTo: '<%= dasherize(name) %>',
14
- pathMatch: 'full',
15
- },
16
-
17
11
  {
18
12
  path: '',
19
13
  component: PortalContainerComponent,
20
14
  canActivate: [AuthGuard],
21
15
  children: [
22
- {
23
- path: 'dashboard',
24
- loadChildren: () =>
25
- import('@cima/dashboard').then((m) => m.DashboardModule),
26
- },
27
16
  {
28
17
  path: 'credits',
29
18
  loadChildren: () =>
30
19
  import('./credits/credits.module').then((m) => m.CreditsModule),
31
20
  },
32
21
  {
33
- path: '<%= dasherize(name) %>',
22
+ path: '',
34
23
  loadChildren: () =>
35
24
  import('@cima/<%= dasherize(name) %>').then((m) => m.Cima<%= classify(name) %>Module),
36
25
  },
@@ -1,5 +1,3 @@
1
- <cima-credits>
2
- <ng-container tor>
3
- <cima-tor></cima-tor>
4
- </ng-container>
5
- </cima-credits>
1
+ <cima-page-container style="background-color:unset">
2
+ <commons-credits [credits]="credits"></commons-credits>
3
+ </cima-page-container>
@@ -1,15 +1,24 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { Title } from '@angular/platform-browser';
1
+ import { Component, AfterViewInit } from '@angular/core';
2
+ import {CimaConfigService, FaviconService, PortalService} from '@cima/commons';
3
3
 
4
4
  @Component({
5
5
  selector: 'cima-credits-page',
6
6
  templateUrl: './credits-page.component.html',
7
7
  styleUrls: ['./credits-page.component.scss'],
8
8
  })
9
- export class CreditsPageComponent implements OnInit {
10
- constructor(private titleService: Title) {}
9
+ export class CreditsPageComponent implements AfterViewInit {
10
+ constructor(
11
+ private portalService: PortalService,
12
+ private faviconService: FaviconService,
13
+ private configService: CimaConfigService
14
+ ) {}
11
15
 
12
- ngOnInit(): void {
13
- this.titleService.setTitle($localize`Credits`);
16
+ credits: any[]
17
+ ngAfterViewInit(): void {
18
+ this.portalService.setTitle(`Credits`);
19
+ this.faviconService.setPortalFavicon();
20
+ this.configService.getStaticCredits().subscribe((credits) => {
21
+ this.credits = credits;
22
+ } );
14
23
  }
15
24
  }
@@ -1,12 +1,17 @@
1
+ const protocol = window.location.protocol;
2
+ const hostname = window.location.hostname;
3
+ let port = window.location.port ? `:${window.location.port}` : '';
4
+
5
+ const wsProtocol = protocol === 'https:' ? 'wss:' : 'ws:';
6
+
1
7
  export const environment = {
2
- title: '<%= classify(name) %> Test App',
8
+ title: '<%= classify(name) %>',
3
9
  production: true,
4
10
  fakeData: false,
5
11
  debug: true,
6
12
  server: {
7
- baseUrl: 'https://acroweb3-portal-backend-test.cimafoundation.org',
8
- configEndpoint: '/acroweb',
9
- wsEndpoint:
10
- 'ws://acroweb3-portal-backend-test.cimafoundation.org/ws/notifier/',
13
+ baseUrl: `${protocol}//${hostname}${port}/api`,
14
+ configEndpoint: `/acroweb`,
15
+ wsEndpoint: `${wsProtocol}//${hostname}${port}/ws/notifier/`,
11
16
  },
12
17
  };
@@ -3,23 +3,15 @@
3
3
  // The list of file replacements can be found in `angular.json`.
4
4
 
5
5
  export const environment = {
6
- title: '<%= classify(name) %> Test App',
6
+ title: '<%= classify(name) %>',
7
7
  production: false,
8
8
  fakeData: false,
9
9
  debug: true,
10
10
  server: {
11
- baseUrl: 'https://acroweb3-portal-backend-test.cimafoundation.org',
11
+ baseUrl: 'https://mydewetra3-staging.cimafoundation.org/api',
12
12
  configEndpoint: '/acroweb',
13
13
  wsEndpoint:
14
- 'ws://acroweb3-portal-backend-test.cimafoundation.org/ws/notifier/',
14
+ 'wss://mydewetra3-staging.cimafoundation.org/ws/notifier/',
15
15
  },
16
16
  };
17
17
 
18
- /*
19
- * For easier debugging in development mode, you can import the following file
20
- * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
21
- *
22
- * This import should be commented out in production mode because it will have a negative impact
23
- * on performance if an error is thrown.
24
- */
25
- // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
@@ -1,6 +1,6 @@
1
1
  <cima-app-container mode="side">
2
2
  <ng-container app-menu>
3
- <a [routerLink]="['/', '<%= dasherize(name) %>']">Home</a>
3
+ <a routerLink="'./<%= dasherize(name) %>'">Home</a>
4
4
  </ng-container>
5
5
 
6
6
  <app-sidenav-tab icon="list" i18-label label="Tab Label">
@@ -17,9 +17,15 @@ export class <%= classify(name) %>AppContainerComponent implements AfterViewIni
17
17
  private portalService: PortalService,
18
18
  public translate: TranslateService,
19
19
  ) {
20
+
21
+ let portal_current_language: string = this.translate.currentLang;
22
+ if(!portal_current_language) portal_current_language = this.translate.defaultLang;
23
+ this.portalService.getPortalLabels('mydewetra', '<%= dasherize(name) %>', portal_current_language);
24
+
20
25
  this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
21
26
  this.portalService.getPortalLabels('mydewetra', '<%= dasherize(name) %>', event.lang);
22
27
  });
28
+
23
29
  }
24
30
 
25
31
  ngAfterViewInit() {