@genesislcap/blank-app-seed 5.0.0 → 5.1.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "5.0.0",
4
+ "version": "5.1.0",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.1.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v5.0.0...v5.1.0) (2025-05-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * release 8.11 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#459) e682fbe
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add missing files + remove webpack GENC-0 27c51f0
14
+ * add missing files + remove webpack GENC-0 (#458) 923e16c
15
+ * lint error GENC-0 c9612b8
16
+
17
+ ## [5.0.1-prerelease.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v5.0.0...v5.0.1-prerelease.1) (2025-05-13)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * add missing files + remove webpack GENC-0 27c51f0
23
+ * add missing files + remove webpack GENC-0 (#458) 923e16c
24
+ * lint error GENC-0 c9612b8
25
+
3
26
  ## [5.0.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v4.0.2...v5.0.0) (2025-05-12)
4
27
 
5
28
 
@@ -1,8 +1,9 @@
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';
3
4
  import getLayoutNameByRoute from './utils/getLayoutNameByRoute';
4
5
  import type { LayoutComponentName } from './types/layout';
5
- import { configureFoundationLogin } from './share/foundation-login';
6
+ import { configureFoundationAuth } from './share/foundation-auth';
6
7
  import { registerComponents } from './share/genesis-components';
7
8
  import { getStore } from './store';
8
9
  import { customEventFactory, registerStylesTarget } from '../pbc/utils';
@@ -20,11 +21,15 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewInit {
20
21
  title = '{{capitalCase appName}}';
21
22
  store = getStore();
22
23
 
24
+ // @ts-ignore
25
+ @Connect connect: Connect;
26
+
23
27
  constructor(
24
28
  private el: ElementRef,
25
29
  router: Router,
26
30
  ) {
27
- configureFoundationLogin({ router });
31
+ // @ts-ignore
32
+ configureFoundationAuth({ router, connectService: this.connect });
28
33
 
29
34
  // Set layout componet based on route
30
35
  router.events.subscribe((event: any) => {
@@ -5,6 +5,7 @@
5
5
  show-luminance-toggle-button
6
6
  show-misc-toggle-button
7
7
  (luminance-icon-clicked)="onLuminanceToogle()"
8
+ (logout-clicked)="onLogout()"
8
9
  [navigateTo]="navigateAngular"
9
10
  [routeNavItems]="navItems"
10
11
  >
@@ -33,6 +33,10 @@ export class DefaultLayoutComponent extends BaseLayout implements AfterViewInit
33
33
  navigateAngular = (path: string) => {
34
34
  this.router.navigate([path]);
35
35
  };
36
+
37
+ onLogout = () => {
38
+ this.router.navigate(['/login']);
39
+ };
36
40
 
37
41
  onLuminanceToogle = (): void => {
38
42
  baseLayerLuminance.setValueFor(
@@ -39,7 +39,7 @@ export class RouteService {
39
39
  navItems: [
40
40
  {
41
41
  navId: 'header',
42
- title: '{{#if this.title}}{{this.title}}{{else}}{{this.name}}{{/if}}',
42
+ title: '{{#if this.title}}{{sentenceCase this.title}}{{else}}{{sentenceCase this.name}}{{/if}}',
43
43
  icon: {
44
44
  name: '{{this.icon}}',
45
45
  variant: 'solid',
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "scripts": {
9
9
  "baseline": "npm run clean && npm run bootstrap",
10
- "bootstrap": "npm i",
10
+ "bootstrap": "npm i --legacy-peer-deps",
11
11
  "bootstrap:ci": "npm ci --no-fund --no-audit",
12
12
  "build": "webpack --mode production",
13
13
  "build:vite": "vite build",
@@ -1,5 +1,4 @@
1
1
  import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
2
- import { getUser } from '@genesislcap/foundation-user';
3
2
  import { AUTH_PATH } from '@/config';
4
3
  import { environment } from "@/environments/environment.ts";
5
4
  import { Connect } from '@genesislcap/foundation-comms';
@@ -36,7 +36,7 @@ const routes = [
36
36
  navItems: [
37
37
  {
38
38
  navId: 'header',
39
- title: '{{#if this.title}}{{this.title}}{{else}}{{this.name}}{{/if}}',
39
+ title: '{{#if this.title}}{{sentenceCase this.title}}{{else}}{{sentenceCase this.name}}{{/if}}',
40
40
  icon: {
41
41
  name: '{{this.icon}}',
42
42
  variant: 'solid',
@@ -86,8 +86,7 @@
86
86
  "@types/node": "20.11.5",
87
87
  "husky": "^7.0.4",
88
88
  "lint-prepush": "^2.2.1",
89
- "lint-staged": "^12.4.1",
90
- "webpack": "5.99.0"
89
+ "lint-staged": "^12.4.1"
91
90
  },
92
91
  "dependencies": {
93
92
  "@genesislcap/foundation-auth": "{{versions.UI}}",
@@ -1,14 +1,8 @@
1
- import {
2
- Connect,
3
- ConnectConfig,
4
- defaultConnectConfig,
5
- Session,
6
- } from '@genesislcap/foundation-comms';
1
+ import { Connect, ConnectConfig, defaultConnectConfig } from '@genesislcap/foundation-comms';
7
2
  import { EventEmitter } from '@genesislcap/foundation-events';
8
3
  import { App } from '@genesislcap/foundation-shell/app';
9
4
  import { importPBCAssets } from '@genesislcap/foundation-shell/pbc';
10
5
  import { configureDesignSystem } from '@genesislcap/foundation-ui';
11
- import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
12
6
  import {
13
7
  baseLayerLuminance,
14
8
  customElement,
@@ -45,7 +39,6 @@ const name = '{{rootElement}}';
45
39
  export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisElement) {
46
40
  @App app: App;
47
41
  @Connect connect!: Connect;
48
- @Session session!: Session;
49
42
  @Container container!: Container;
50
43
  @Store store: Store;
51
44
 
@@ -56,8 +49,6 @@ export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisEl
56
49
  @observable data: any = null;
57
50
 
58
51
  async connectedCallback() {
59
- // TODO: remove when using cookie-based auth
60
- this.session.setSessionStorageItem('hostUrl', GENESIS_SOCKET_URL);
61
52
  this.registerDIDependencies();
62
53
  super.connectedCallback();
63
54
  this.addEventListeners();
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": "5.0.0",
4
+ "version": "5.1.0",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -0,0 +1,13 @@
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
+ }
@@ -1,45 +0,0 @@
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
- }