@genesislcap/blank-app-seed 4.0.0-prerelease.9 → 4.0.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "4.0.0-prerelease.9",
4
+ "version": "4.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -1,5 +1,5 @@
1
1
  {
2
- "UI": "14.257.0",
3
- "GSF": "8.10.0-beta4",
4
- "Auth": "8.10.0-beta4"
2
+ "UI": "14.251.4",
3
+ "GSF": "8.10.1",
4
+ "Auth": "8.10.0"
5
5
  }
package/CHANGELOG.md CHANGED
@@ -1,194 +1,113 @@
1
1
  # Changelog
2
2
 
3
- ## [4.0.0-prerelease.9](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.8...v4.0.0-prerelease.9) (2025-03-28)
3
+ ## [4.0.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0...v4.0.1) (2025-04-07)
4
4
 
5
5
 
6
6
  ### Bug Fixes
7
7
 
8
- * correct path for login redirect d2f5be8
8
+ * use socket url that supports base path 7d349c0
9
+ * use socket url that supports base path (#446) 39cbcab
9
10
 
10
- ## [4.0.0-prerelease.8](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.7...v4.0.0-prerelease.8) (2025-03-27)
11
-
12
-
13
- ### Bug Fixes
14
-
15
- * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 7c83e14
16
-
17
- ## [4.0.0-prerelease.7](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.6...v4.0.0-prerelease.7) (2025-03-27)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 040de3f
23
-
24
- ## [4.0.0-prerelease.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.5...v4.0.0-prerelease.6) (2025-03-27)
25
-
26
-
27
- ### Bug Fixes
28
-
29
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#444) 4aee519
30
-
31
- ## [4.0.0-prerelease.5](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.4...v4.0.0-prerelease.5) (2025-03-27)
32
-
33
-
34
- ### Bug Fixes
35
-
36
- * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e012493
37
-
38
- ## [4.0.0-prerelease.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.3...v4.0.0-prerelease.4) (2025-03-27)
39
-
40
-
41
- ### Bug Fixes
42
-
43
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 2e81c63
44
-
45
- ## [4.0.0-prerelease.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.2...v4.0.0-prerelease.3) (2025-03-26)
46
-
47
-
48
- ### Bug Fixes
49
-
50
- * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 04c963c
51
-
52
- ## [4.0.0-prerelease.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.0-prerelease.1...v4.0.0-prerelease.2) (2025-03-26)
53
-
54
-
55
- ### Bug Fixes
56
-
57
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) ba72ef9
58
-
59
- ## [4.0.0-prerelease.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.18...v4.0.0-prerelease.1) (2025-03-25)
11
+ ## [4.0.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.41.3...v4.0.0) (2025-04-04)
60
12
 
61
13
 
62
14
  ### ⚠ BREAKING CHANGES
63
15
 
64
16
  * **deps:** update Gradle to version 8.10.2 (#443)
65
- * **deps:** update Gradle to version 8.10.2
66
17
 
67
- ### Build System
68
-
69
- * **deps:** update Gradle to version 8.10.2 d6db442
70
- * **deps:** update Gradle to version 8.10.2 (#443) d36be4d
18
+ ### Features
71
19
 
72
- ## [3.40.0-prerelease.18](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.17...v3.40.0-prerelease.18) (2025-03-24)
20
+ * release 8.10 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) bd080aa
21
+ * release 8.10 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#445) 702fa54
73
22
 
74
23
 
75
- ### Bug Fixes
24
+ ### Build System
76
25
 
77
- * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 4f91206
26
+ * **deps:** update Gradle to version 8.10.2 (#443) 3bfd4c8
78
27
 
79
- ## [3.40.0-prerelease.17](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.16...v3.40.0-prerelease.17) (2025-03-24)
28
+ ## [3.41.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.41.2...v3.41.3) (2025-03-21)
80
29
 
81
30
 
82
31
  ### Bug Fixes
83
32
 
84
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) df42df6
33
+ * react conflicting dependency ([FUI-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0)) (#442) f950451
34
+ * react dependency conflict 0e69189
85
35
 
86
- ## [3.40.0-prerelease.16](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.15...v3.40.0-prerelease.16) (2025-03-20)
36
+ ## [3.41.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.41.1...v3.41.2) (2025-03-20)
87
37
 
88
38
 
89
39
  ### Bug Fixes
90
40
 
91
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) e5e0be7
92
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9)  (#441) f5ef40a
41
+ * correct path for login redirect 4b06ecb
42
+ * fix angular router e92e502
43
+ * react and angular router fix (#439) 6c7a4da
44
+ * react router fixes 1fd1742
93
45
 
94
- ## [3.40.0-prerelease.15](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.14...v3.40.0-prerelease.15) (2025-03-19)
46
+ ## [3.41.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.41.0...v3.41.1) (2025-03-18)
95
47
 
96
48
 
97
49
  ### Bug Fixes
98
50
 
99
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) 915104f
100
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9)  (#440) b5d9c20
51
+ * revert changes e50c69a
52
+ * revert cookies (#438) 754f30a
101
53
 
102
- ## [3.40.0-prerelease.14](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.13...v3.40.0-prerelease.14) (2025-03-06)
54
+ ## [3.41.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.1...v3.41.0) (2025-03-06)
103
55
 
104
56
 
105
57
  ### Features
106
58
 
107
59
  * bump GSF to 8.9 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#436) 1295e2b
108
-
109
- ## [3.40.0-prerelease.13](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.12...v3.40.0-prerelease.13) (2025-03-04)
60
+ * release 8.9 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#437) 1172438
61
+ * use foundation-auth as default login [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) (#427) abd0c48
62
+ * use foundation-auth as default login [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) (#427) b8c1d13
63
+ * use public path for navigation when available [FUI-2071](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2071) (#410) 5e6c1af
110
64
 
111
65
 
112
66
  ### Bug Fixes
113
67
 
114
68
  * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) 7229060
115
-
116
- ## [3.40.0-prerelease.12](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.11...v3.40.0-prerelease.12) (2025-03-03)
117
-
118
-
119
- ### Bug Fixes
120
-
121
- * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e897283
122
-
123
- ## [3.40.0-prerelease.11](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.10...v3.40.0-prerelease.11) (2025-03-03)
124
-
125
-
126
- ### Bug Fixes
127
-
128
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 520e1bb
129
-
130
- ## [3.40.0-prerelease.10](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.9...v3.40.0-prerelease.10) (2025-03-03)
131
-
132
-
133
- ### Bug Fixes
134
-
69
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#414) bca5113
70
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#426) d3751d1
71
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#429) 7f512d2
72
+ * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#431) c2eb359
73
+ * customEvent tooltip update GENC-847 (#419) 80f5e8e
74
+ * include auth in config [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) 1c549d5
75
+ * revert changes 65040e4
76
+ * revert changes from 8.9 (#430) 4133d7e, closes FUI-2196 PSD-9
135
77
  * update versions build trigger f8783d3
136
-
137
- ## [3.40.0-prerelease.9](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.8...v3.40.0-prerelease.9) (2025-02-20)
138
-
139
-
140
- ### Bug Fixes
141
-
78
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e897283
142
79
  * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) d5fd0da
143
-
144
- ## [3.40.0-prerelease.8](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.7...v3.40.0-prerelease.8) (2025-02-20)
145
-
146
-
147
- ### Bug Fixes
148
-
149
- * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 0772186
150
-
151
- ## [3.40.0-prerelease.7](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.6...v3.40.0-prerelease.7) (2025-02-20)
152
-
153
-
154
- ### Bug Fixes
155
-
156
80
  * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) eb67c93
157
-
158
- ## [3.40.0-prerelease.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.5...v3.40.0-prerelease.6) (2025-02-20)
159
-
160
-
161
- ### Bug Fixes
162
-
81
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) d7d9ecb
82
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) c456aad
83
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e84d97f
84
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 761fc00
85
+ * updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 266dfd6
86
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 520e1bb
87
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 0772186
163
88
  * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) ff4366b
89
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 6f4446a
90
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) f4b429c
91
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 7dc3ae2
92
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e95345c
93
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) bcff53d
94
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 1992fef
95
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 9decda0
96
+ * updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) b63f98e
164
97
 
165
- ## [3.40.0-prerelease.5](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.4...v3.40.0-prerelease.5) (2025-02-14)
98
+ ## [3.40.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0...v3.40.1) (2025-02-17)
166
99
 
167
100
 
168
101
  ### Bug Fixes
169
102
 
170
- * automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#431) c2eb359
103
+ * navigate to correct route when logout PA-1578 (#435) 5912467
171
104
 
172
- ## [3.40.0-prerelease.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.3...v3.40.0-prerelease.4) (2025-02-14)
173
-
174
-
175
- ### Bug Fixes
176
-
177
- * include auth in config [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) 1c549d5
178
-
179
- ## [3.40.0-prerelease.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.2...v3.40.0-prerelease.3) (2025-02-14)
105
+ ## [3.40.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.39.4...v3.40.0) (2025-02-07)
180
106
 
181
107
 
182
108
  ### Features
183
109
 
184
- * use foundation-auth as default login [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) (#427) abd0c48
185
-
186
- ## [3.40.0-prerelease.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.1...v3.40.0-prerelease.2) (2025-02-07)
187
-
188
-
189
- ### Bug Fixes
190
-
191
- * revert changes 65040e4
110
+ * release 8.8 (#434) 70c3337, closes PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 FUI-2071 PSD-0 PSD-0 PSD-0 PSD-9 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-0 PSD-9 PSD-9
192
111
 
193
112
  ## [3.39.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.39.3...v3.39.4) (2025-01-16)
194
113
 
@@ -74,9 +74,6 @@
74
74
  },
75
75
  "serve": {
76
76
  "builder": "@angular-builders/custom-webpack:dev-server",
77
- "options": {
78
- "proxyConfig": "src/proxy.conf.json"
79
- },
80
77
  "configurations": {
81
78
  "production": {
82
79
  "buildTarget": "{{pkgName}}:build:production"
@@ -1,12 +1,11 @@
1
1
  import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { Router, NavigationEnd } from '@angular/router';
3
- import { Connect } from '@genesislcap/foundation-comms';
4
- import { customEventFactory, registerStylesTarget } from '../pbc/utils';
5
- import { configureFoundationAuth } from './share/foundation-auth';
3
+ import getLayoutNameByRoute from './utils/getLayoutNameByRoute';
4
+ import type { LayoutComponentName } from './types/layout';
5
+ import { configureFoundationLogin } from './share/foundation-login';
6
6
  import { registerComponents } from './share/genesis-components';
7
7
  import { getStore } from './store';
8
- import type { LayoutComponentName } from './types/layout';
9
- import getLayoutNameByRoute from './utils/getLayoutNameByRoute';
8
+ import { customEventFactory, registerStylesTarget } from '../pbc/utils';
10
9
  {{#if FDC3.channels.length}}
11
10
  import { listenToChannel, onFDC3Ready } from './utils';
12
11
  {{/if}}
@@ -21,17 +20,12 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewInit {
21
20
  title = '{{capitalCase appName}}';
22
21
  store = getStore();
23
22
 
24
- // @ts-ignore
25
- @Connect connect: Connect;
26
-
27
23
  constructor(
28
24
  private el: ElementRef,
29
25
  router: Router,
30
26
  ) {
31
- // @ts-ignore
32
- configureFoundationAuth({ router, connectService: this.connect });
33
-
34
-
27
+ configureFoundationLogin({ router });
28
+
35
29
  // Set layout componet based on route
36
30
  router.events.subscribe((event: any) => {
37
31
  if (event instanceof NavigationEnd) {
@@ -9,7 +9,7 @@ export class AuthGuard extends PermissionsGuard {
9
9
  override async canActivate(): Promise<boolean> {
10
10
  if (!this.user.isAuthenticated) {
11
11
  this.user.trackPath();
12
- await this.router.navigate([`/${AUTH_PATH}`]);
12
+ this.router.navigate([`/${AUTH_PATH}`]);
13
13
  return false;
14
14
  }
15
15
  return true;
@@ -5,7 +5,6 @@
5
5
  show-luminance-toggle-button
6
6
  show-misc-toggle-button
7
7
  (luminance-icon-clicked)="onLuminanceToogle()"
8
- (logout-clicked)="onLogout()"
9
8
  [navigateTo]="navigateAngular"
10
9
  [routeNavItems]="navItems"
11
10
  >
@@ -29,15 +29,11 @@ export class DefaultLayoutComponent extends BaseLayout implements AfterViewInit
29
29
  configureDesignSystem(this.designSystemProviderElement.nativeElement, designTokens);
30
30
  registerStylesTarget(this.el.nativeElement, 'layout');
31
31
  }
32
-
32
+
33
33
  navigateAngular = (path: string) => {
34
34
  this.router.navigate([path]);
35
35
  };
36
-
37
- onLogout = () => {
38
- this.router.navigate(['/login']);
39
- };
40
-
36
+
41
37
  onLuminanceToogle = (): void => {
42
38
  baseLayerLuminance.setValueFor(
43
39
  this.designSystemProviderElement.nativeElement,
@@ -39,7 +39,7 @@ export class RouteService {
39
39
  navItems: [
40
40
  {
41
41
  navId: 'header',
42
- title: '{{#if this.title}}{{capitalCase this.title}}{{else}}{{this.name}}{{/if}}',
42
+ title: '{{#if this.title}}{{this.title}}{{else}}{{this.name}}{{/if}}',
43
43
  icon: {
44
44
  name: '{{this.icon}}',
45
45
  variant: 'solid',
@@ -53,7 +53,7 @@ export class RouteService {
53
53
 
54
54
  /**
55
55
  * @privateRemarks
56
- * The shell has access to context, so it's possible for it to return a pre-mapped framework variant of routes.
56
+ * The shell has access to context, so it's possible for it to return a pre-mapped framework variant of routes.
57
57
  * In this iteration we're doing it inline, given the angular version may move and here we know the shape we need.
58
58
  */
59
59
  pbcRoutes(): Routes {
@@ -1,34 +1,20 @@
1
+ // import { configure } from '@genesislcap/foundation-auth/config';
1
2
  import type { Router } from '@angular/router';
2
- import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
3
- import type { Connect } from '@genesislcap/foundation-comms';
4
- import { getUser } from '@genesislcap/foundation-user';
5
- import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
6
- import { AUTH_PATH } from '../app.config';
7
3
 
8
4
  /**
9
5
  * Configure the micro frontend
10
6
  */
11
- export const configureFoundationAuth = ({ router, connectService,}: { router: Router; connectService: Connect; }) => {
12
- const baseElement = document.querySelector('base');
13
- const basePath = baseElement?.getAttribute('href') || '';
14
-
15
- configure({
16
- name: 'client-app-login',
17
- omitRoutes: ['request-account', 'forgot-password'],
18
- fields: {
19
- ...defaultAuthConfig.fields,
20
- username: {
21
- ...defaultAuthConfig.fields.username,
22
- },
23
- },
24
- hostPath: basePath + AUTH_PATH,
25
- postLoginRedirect: async () => {
26
- const url = GENESIS_SOCKET_URL;
27
- await connectService.connect(url);
28
-
29
- const lastPath = getUser().lastPath()?.replace(basePath, '');
30
-
31
- router.navigate([lastPath ?? '{{kebabCase routes.[0].name}}']);
32
- },
33
- });
34
- };
7
+ export const configureFoundationAuth = ({
8
+ router,
9
+ connectService,
10
+ }: {
11
+ router: Router;
12
+ connectService: any;
13
+ }) => null
14
+ // configure({
15
+ // omitRoutes: ['request-account'],
16
+ // postLoginRedirect: async () => {
17
+ // await connectService.init();
18
+ // router.navigate([`/${INTERNAL_URLS.homepage}`]);
19
+ // },
20
+ // });
@@ -0,0 +1,45 @@
1
+ import {configure, define} from '@genesislcap/foundation-login';
2
+ import type { Router } from '@angular/router';
3
+ import { getUser } from '@genesislcap/foundation-user';
4
+ import { css, DI } from '@genesislcap/web-core';
5
+ import { AUTH_PATH } from '../app.config';
6
+ import logo from '../../assets/logo.svg';
7
+
8
+ // eslint-disable-next-line
9
+ declare var ENABLE_SSO: boolean;
10
+
11
+ const ssoSettings =
12
+ typeof ENABLE_SSO !== 'undefined' && ENABLE_SSO === true
13
+ ? {
14
+ autoAuth: true,
15
+ sso: {
16
+ toggled: true,
17
+ identityProvidersPath: 'sso/list',
18
+ },
19
+ }
20
+ : {};
21
+
22
+ /**
23
+ * Configure the micro frontend
24
+ */
25
+ export const configureFoundationLogin = ({
26
+ router,
27
+ }: {
28
+ router: Router;
29
+ }) => {
30
+ configure(DI.getOrCreateDOMContainer(), {
31
+ autoConnect: true,
32
+ hostPath: AUTH_PATH,
33
+ redirectHandler: () => {
34
+ router.navigate(['{{kebabCase routes.[0].name}}'])
35
+ },
36
+ ...ssoSettings,
37
+ logo: css `
38
+ content: url("${logo}");
39
+ `,
40
+ });
41
+
42
+ return define({
43
+ name: `client-app-login`,
44
+ });
45
+ }
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "scripts": {
9
9
  "baseline": "npm run clean && npm run bootstrap",
10
- "bootstrap": "npm i --legacy-peer-deps",
10
+ "bootstrap": "npm i",
11
11
  "bootstrap:ci": "npm ci --no-fund --no-audit",
12
12
  "build": "webpack --mode production",
13
13
  "build:vite": "vite build",
@@ -79,7 +79,6 @@
79
79
  "@types/node": "^20.14.10",
80
80
  "@types/react": "^19.0.1",
81
81
  "@types/react-dom": "^19.0.2",
82
- "@typescript-eslint/eslint-plugin": "^7.13.1",
83
82
  "@typescript-eslint/parser": "^7.13.1",
84
83
  "@vitejs/plugin-react": "^4.3.1",
85
84
  "babel-loader": "^9.2.1",
@@ -9,8 +9,6 @@ import styles from './DefaultLayout.module.css';
9
9
  import PBCElementsRenderer from '@/pbc/elementsRenderer';
10
10
  import * as designTokens from '@/styles/design-tokens.json';
11
11
  import { useRoutesContext } from '@/store/RoutesContext';
12
- import { connectService } from '@/services/connect.service.ts';
13
- import { getUser } from '@genesislcap/foundation-user';
14
12
  import { AUTH_PATH } from '@/config';
15
13
 
16
14
  interface DefaultLayoutProps {
@@ -45,11 +43,6 @@ const DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {
45
43
  }
46
44
  };
47
45
 
48
- if (!connectService.isConnected()) {
49
- getUser().trackPath();
50
- navigate(`/${AUTH_PATH}`)
51
- }
52
-
53
46
  useEffect(() => {
54
47
  if (designSystemProviderRef.current) {
55
48
  configureDesignSystem(designSystemProviderRef.current, designTokens);
@@ -1,7 +1,7 @@
1
1
  import React, {useEffect} from 'react';
2
2
  import './AuthPage.css';
3
3
  import { configureFoundationLogin } from "@/share/foundation-login.ts";
4
- import { useNavigate } from "react-router";
4
+ import { useNavigate } from 'react-router';
5
5
 
6
6
  const AuthPage: React.FC = () => {
7
7
  const navigate = useNavigate();
@@ -1,37 +1,23 @@
1
- import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
2
- import { getUser } from '@genesislcap/foundation-user';
3
- import { AUTH_PATH } from '@/config';
4
- import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
5
- import { Connect } from '@genesislcap/foundation-comms';
1
+ import {configure, define} from '@genesislcap/foundation-login';
6
2
  import { DI } from '@genesislcap/web-core';
7
- import type { NavigateFunction } from 'react-router';
3
+ import { AUTH_PATH } from '@/config';
8
4
 
9
5
  /**
10
6
  * Configure the micro frontend
11
7
  */
12
- export const configureFoundationLogin = ({navigate}: { navigate: NavigateFunction}) => {
13
- const baseElement = document.querySelector('base');
14
- const basePath = baseElement?.getAttribute('href') || '';
15
- const connect = DI.getOrCreateDOMContainer().get(Connect);
16
-
17
-
18
- configure({
19
- name: 'client-app-login',
20
- omitRoutes: ['request-account', 'forgot-password'],
21
- fields: {
22
- ...defaultAuthConfig.fields,
23
- username: {
24
- ...defaultAuthConfig.fields.username,
25
- },
8
+ export const configureFoundationLogin = ({ navigate }:{ navigate: any }) => {
9
+ configure(DI.getOrCreateDOMContainer(), {
10
+ autoConnect: true,
11
+ autoAuth: true, // < Allow users to skip login
12
+ showConnectionIndicator: true,
13
+ hostPath: AUTH_PATH,
14
+ redirectHandler: () => {
15
+ const lastPath = '/{{kebabCase routes.[0].name}}';
16
+ navigate(lastPath);
26
17
  },
27
- hostPath: basePath + AUTH_PATH,
28
- postLoginRedirect: async () => {
29
- const url = GENESIS_SOCKET_URL;
30
- await connect.connect(url);
18
+ });
31
19
 
32
- const redirectUrl = '/{{kebabCase routes.[0].name}}';
33
- navigate(redirectUrl);
34
- },
35
- })
20
+ return define({
21
+ name: `client-app-login`,
22
+ });
36
23
  }
37
-
@@ -7,7 +7,7 @@ module.exports = (env, argv) => {
7
7
  const https = process.env.HTTPS === 'true';
8
8
  const open = !(process.env.NO_OPEN === 'true');
9
9
  const environmentFile = mode === 'production'
10
- ? 'environment.prod.ts'
10
+ ? 'environment.prod.ts'
11
11
  : 'environment.ts';
12
12
  const environmentPath = resolve(__dirname, 'src/environments', environmentFile);
13
13
 
@@ -76,20 +76,6 @@ module.exports = (env, argv) => {
76
76
  ],
77
77
  devServer: {
78
78
  server: https ? 'https' : 'http',
79
- proxy: [
80
- {
81
- context: "/sm",
82
- "target": "{{apiHost}}",
83
- "secure": false,
84
- "pathRewrite": {"^/sm": ""},
85
- },
86
- {
87
- context: "/gwf",
88
- "target": "{{apiHost}}",
89
- "secure": false,
90
- "ws": true
91
- }
92
- ],
93
79
  open,
94
80
  static: {
95
81
  directory: join(__dirname, 'public'),
@@ -89,7 +89,6 @@
89
89
  "lint-staged": "^12.4.1"
90
90
  },
91
91
  "dependencies": {
92
- "@genesislcap/foundation-auth": "{{versions.UI}}",
93
92
  "@genesislcap/foundation-comms": "{{versions.UI}}",
94
93
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
95
94
  "@genesislcap/foundation-events": "{{versions.UI}}",
@@ -118,7 +117,6 @@
118
117
  "tslib": "^2.3.1"
119
118
  },
120
119
  "overrides": {
121
- "@genesislcap/foundation-auth": "{{versions.UI}}",
122
120
  "@genesislcap/foundation-comms": "{{versions.UI}}",
123
121
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
124
122
  "@genesislcap/foundation-events": "{{versions.UI}}",
@@ -141,7 +139,6 @@
141
139
  "@genesislcap/g2plot-chart": "{{versions.UI}}",
142
140
  "@genesislcap/rapid-design-system": "{{versions.UI}}",
143
141
  "@genesislcap/rapid-grid-pro": "{{versions.UI}}",
144
- "@genesislcap/web-core": "{{versions.UI}}",
145
- "typescript": "5.6.3"
142
+ "@genesislcap/web-core": "{{versions.UI}}"
146
143
  }
147
144
  }
@@ -1,8 +1,14 @@
1
- import { Connect, ConnectConfig, defaultConnectConfig } from '@genesislcap/foundation-comms';
1
+ import {
2
+ Connect,
3
+ ConnectConfig,
4
+ defaultConnectConfig,
5
+ Session,
6
+ } from '@genesislcap/foundation-comms';
2
7
  import { EventEmitter } from '@genesislcap/foundation-events';
3
8
  import { App } from '@genesislcap/foundation-shell/app';
4
9
  import { importPBCAssets } from '@genesislcap/foundation-shell/pbc';
5
10
  import { configureDesignSystem } from '@genesislcap/foundation-ui';
11
+ import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
6
12
  import {
7
13
  baseLayerLuminance,
8
14
  customElement,
@@ -39,6 +45,7 @@ const name = '{{rootElement}}';
39
45
  export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisElement) {
40
46
  @App app: App;
41
47
  @Connect connect!: Connect;
48
+ @Session session!: Session;
42
49
  @Container container!: Container;
43
50
  @Store store: Store;
44
51
 
@@ -49,6 +56,8 @@ export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisEl
49
56
  @observable data: any = null;
50
57
 
51
58
  async connectedCallback() {
59
+ // TODO: remove when using cookie-based auth
60
+ this.session.setSessionStorageItem('hostUrl', GENESIS_SOCKET_URL);
52
61
  this.registerDIDependencies();
53
62
  super.connectedCallback();
54
63
  this.addEventListeners();
@@ -1,14 +1,16 @@
1
- import { getUser, navigateTo } from '@genesislcap/foundation-auth';
2
- import { Auth, Connect } from '@genesislcap/foundation-comms';
1
+ import { Auth, Session } from '@genesislcap/foundation-comms';
2
+ import { defaultLoginConfig, LoginConfig } from '@genesislcap/foundation-login';
3
3
  import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
4
- import { GENESIS_SOCKET_URL, PUBLIC_PATH } from '@genesislcap/foundation-utils';
4
+ import { PUBLIC_PATH } from '@genesislcap/foundation-utils';
5
+ import { NavigationPhase, optional, Route } from '@genesislcap/web-core';
5
6
  import { defaultLayout, loginLayout } from '../layouts';
6
- import { NotFound } from './not-found/not-found';
7
- import { defaultNotPermittedRoute, NotPermitted } from './not-permitted/not-permitted';
8
- import { LoginSettings } from './types';
7
+ import { logger } from '../utils';
9
8
  {{#each routes}}
10
9
  import { {{pascalCase this.name}} } from './{{kebabCase this.name}}/{{kebabCase this.name}}';
11
10
  {{/each}}
11
+ import { NotFound } from './not-found/not-found';
12
+ import { defaultNotPermittedRoute, NotPermitted } from './not-permitted/not-permitted';
13
+ import { LoginSettings } from './types';
12
14
 
13
15
  // eslint-disable-next-line
14
16
  declare var ENABLE_SSO: string;
@@ -19,7 +21,7 @@ const ssoSettings =
19
21
  autoAuth: true,
20
22
  sso: {
21
23
  toggled: true,
22
- identityProvidersPath: 'gwf/sso/list',
24
+ identityProvidersPath: 'sso/list',
23
25
  },
24
26
  }
25
27
  : {};
@@ -27,13 +29,17 @@ const ssoSettings =
27
29
  const publicPath = typeof PUBLIC_PATH !== 'undefined' ? PUBLIC_PATH : '';
28
30
 
29
31
  export class MainRouterConfig extends FoundationRouterConfiguration<LoginSettings> {
30
- @Connect private connect: Connect;
31
- @Auth private auth: Auth;
32
+ constructor(
33
+ @Auth private auth: Auth,
34
+ @Session private session: Session,
35
+ @optional(LoginConfig)
36
+ private loginConfig: LoginConfig = { ...defaultLoginConfig, autoAuth: true, autoConnect: true },
37
+ ) {
38
+ super();
39
+ }
32
40
 
33
41
  async configure() {
34
42
  this.configureAnalytics();
35
- this.configureRoutePermittedChecks();
36
- this.configureFallbackRouteDefinition();
37
43
  this.title = '{{capitalCase appName}}';
38
44
  this.defaultLayout = defaultLayout;
39
45
 
@@ -46,31 +52,22 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
46
52
  name: 'login',
47
53
  title: 'Login',
48
54
  element: async () => {
49
- const { configure, defaultAuthConfig } = await import(
50
- '@genesislcap/foundation-auth/config'
55
+ const { configure, define } = await import(
56
+ /* webpackChunkName: "foundation-login" */
57
+ '@genesislcap/foundation-login'
51
58
  );
52
- return configure({
53
- omitRoutes: ['request-account', 'forgot-password'],
54
- fields: {
55
- ...defaultAuthConfig.fields,
56
- username: {
57
- ...defaultAuthConfig.fields.username,
58
- pattern: '^[a-zA-Z0-9.@_:-]*$',
59
- },
60
- },
61
- hostPath: this.loginPath,
62
- postLoginRedirect: async () => {
63
- await this.connect.connect(GENESIS_SOCKET_URL);
64
- navigateTo(getUser().lastPath() ?? publicPath + '/{{kebabCase routes.[0].name}}');
65
- },
66
- postLogoutRedirect: () => {
67
- if (this.connect.isConnected) {
68
- this.connect.disconnect();
69
- }
70
- defaultAuthConfig.postLogoutRedirect();
71
- },
59
+ configure(this.container, {
60
+ hostPath: 'login',
61
+ autoConnect: true,
62
+ defaultRedirectUrl: publicPath + '/{{kebabCase routes.[0].name}}',
72
63
  ...ssoSettings,
73
64
  });
65
+ return define({
66
+ name: `{{rootElement}}-login`,
67
+ /**
68
+ * You can augment the template and styles here when needed.
69
+ */
70
+ });
74
71
  },
75
72
  layout: loginLayout,
76
73
  settings: { public: true },
@@ -106,22 +103,70 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
106
103
  {{/each}}
107
104
  );
108
105
 
106
+ /**
107
+ * Example of a FallbackRouteDefinition
108
+ */
109
+ this.routes.fallback(() =>
110
+ this.auth.isLoggedIn ? { redirect: 'not-found' } : { redirect: authPath },
111
+ );
112
+
113
+ /**
114
+ * Example of a NavigationContributor
115
+ */
109
116
  this.contributors.push({
110
117
  navigate: async (phase) => {
111
118
  const settings = phase.route.settings;
112
119
 
113
120
  /**
114
- * If the route is public or the user is authenticated don't block
121
+ * If public route don't block
115
122
  */
116
- if (settings?.public || this.user.isAuthenticated) {
123
+ if (settings && settings.public) {
117
124
  return;
118
125
  }
119
126
 
120
127
  /**
121
- * Otherwise route them to login
128
+ * If logged in don't block
122
129
  */
123
- this.navigationPhaseLoginRedirect(phase);
130
+ if (this.auth.isLoggedIn) {
131
+ this.redirectIfNotPermitted(settings, phase);
132
+ return;
133
+ }
134
+
135
+ /**
136
+ * If allowAutoAuth and session is valid try to connect+auto-login
137
+ */
138
+ if (this.loginConfig.autoAuth && (await this.reAuthFromSession(settings, phase))) {
139
+ return;
140
+ }
141
+
142
+ /**
143
+ * Otherwise route them somewhere, like to a login
144
+ */
145
+ phase.cancel(() => {
146
+ this.session.captureReturnUrl();
147
+ Route.name.replace(phase.router, authPath);
148
+ });
124
149
  },
125
150
  });
126
151
  }
152
+
153
+ private async reAuthFromSession(settings: LoginSettings, phase: NavigationPhase) {
154
+ return this.auth.reAuthFromSession().then((authenticated) => {
155
+ logger.info(`reAuthFromSession. authenticated: ${authenticated}`);
156
+ if (authenticated) {
157
+ this.redirectIfNotPermitted(settings, phase);
158
+ }
159
+ return authenticated;
160
+ });
161
+ }
162
+
163
+ private redirectIfNotPermitted(settings: LoginSettings, phase: NavigationPhase) {
164
+ const { path } = phase.route.endpoint;
165
+ if (settings?.isPermitted && !settings.isPermitted()) {
166
+ logger.warn(`Not permitted - Redirecting URL from ${path} to ${defaultNotPermittedRoute}.`);
167
+ phase.cancel(() => {
168
+ Route.name.replace(phase.router, defaultNotPermittedRoute);
169
+ });
170
+ }
171
+ }
127
172
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed",
3
3
  "description": "Genesis Blank App Seed",
4
- "version": "4.0.0-prerelease.9",
4
+ "version": "4.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -1,12 +0,0 @@
1
- {
2
- "/sm": {
3
- "target": "{{apiHost}}",
4
- "secure": false,
5
- "pathRewrite": { "^/sm": "" }
6
- },
7
- "/gwf": {
8
- "target": "{{apiHost}}",
9
- "secure": false,
10
- "ws": true
11
- }
12
- }
@@ -1,13 +0,0 @@
1
- package scripts
2
-
3
- router {
4
- webPort = 9064
5
- socketPort = 9065
6
-
7
- cookieAuthentication {
8
- enabled = true
9
- httpOnly = true
10
- secure = false
11
- sameSite = SameSite.Lax
12
- }
13
- }