@genesislcap/blank-app-seed 5.7.0-prerelease.4 → 5.7.0-prerelease.40

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 (84) hide show
  1. package/.genx/configure.js +114 -0
  2. package/.genx/package.json +5 -2
  3. package/.genx/prompts/api.js +25 -0
  4. package/.genx/prompts/ui.js +12 -0
  5. package/.genx/prompts.js +8 -2
  6. package/.genx/static.js +1 -0
  7. package/.genx/templates/angular/component/component.hbs +31 -3
  8. package/.genx/templates/angular/entityManager.hbs +17 -6
  9. package/.genx/templates/angular/grid.hbs +5 -2
  10. package/.genx/templates/angular/slices/eventing.slice.hbs +41 -0
  11. package/.genx/templates/angular/store.hbs +14 -0
  12. package/.genx/templates/angular/tabsLayout.hbs +1 -1
  13. package/.genx/templates/react/component/component.hbs +84 -15
  14. package/.genx/templates/react/entityManager.hbs +11 -17
  15. package/.genx/templates/react/grid.hbs +5 -9
  16. package/.genx/templates/react/gridLayout.hbs +4 -4
  17. package/.genx/templates/react/horizontalLayout.hbs +1 -1
  18. package/.genx/templates/react/route.hbs +12 -1
  19. package/.genx/templates/react/slices/eventing.slice.hbs +39 -0
  20. package/.genx/templates/react/store.hbs +22 -0
  21. package/.genx/templates/react/tabsLayout.hbs +2 -2
  22. package/.genx/templates/web-components/component/component.hbs +26 -0
  23. package/.genx/templates/web-components/entityManager.hbs +17 -9
  24. package/.genx/templates/web-components/grid.hbs +13 -5
  25. package/.genx/templates/web-components/slices/eventing.slice.hbs +44 -0
  26. package/.genx/templates/web-components/store.hbs +18 -0
  27. package/.genx/utils/fontUtils.js +75 -0
  28. package/.genx/utils/formatRouteData.js +5 -0
  29. package/.genx/utils/generateRoute.js +1 -1
  30. package/.genx/utils/generateStore.js +98 -0
  31. package/.genx/utils/index.js +4 -0
  32. package/.genx/versions.json +3 -3
  33. package/.github/CODEOWNERS +1 -1
  34. package/.github/pull_request_template.md +6 -0
  35. package/.github/workflows/upgrade.yml +0 -1
  36. package/CHANGELOG.md +299 -0
  37. package/client-tmp/angular/package.json +5 -0
  38. package/client-tmp/angular/src/app/app.component.ts +2 -31
  39. package/client-tmp/angular/src/app/app.module.ts +3 -0
  40. package/client-tmp/angular/src/app/layouts/default/default.layout.css +8 -0
  41. package/client-tmp/angular/src/app/layouts/default/default.layout.html +3 -0
  42. package/client-tmp/angular/src/app/share/genesis-components.ts +12 -1
  43. package/client-tmp/angular/src/styles/design-tokens.json +5 -1
  44. package/client-tmp/angular/src/styles/styles.css +15 -1
  45. package/client-tmp/react/index.html +0 -1
  46. package/client-tmp/react/package.json +17 -28
  47. package/client-tmp/react/public/index.html +3 -1
  48. package/client-tmp/react/src/App.tsx +40 -20
  49. package/client-tmp/react/src/components/routes/AppRoutes.tsx +4 -4
  50. package/client-tmp/react/src/config.ts +1 -1
  51. package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +1 -1
  52. package/client-tmp/react/src/layouts/default/DefaultLayout.module.css +8 -0
  53. package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +15 -4
  54. package/client-tmp/react/src/main.tsx +1 -1
  55. package/client-tmp/react/src/pages/AuthPage/AuthPage.tsx +1 -1
  56. package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.tsx +1 -1
  57. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.test.tsx +1 -1
  58. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +1 -1
  59. package/client-tmp/react/src/pbc/container.tsx +1 -1
  60. package/client-tmp/react/src/services/store.service.ts +20 -9
  61. package/client-tmp/react/src/share/foundation-login.ts +2 -2
  62. package/client-tmp/react/src/share/genesis-components.ts +12 -1
  63. package/client-tmp/react/src/store/RoutesContext.tsx +8 -7
  64. package/client-tmp/react/src/styles/design-tokens.json +5 -1
  65. package/client-tmp/react/src/styles/styles.css +15 -1
  66. package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +1 -1
  67. package/client-tmp/react/src/utils/goldenLayout.helper.ts +59 -0
  68. package/client-tmp/react/src/utils/useDocumentTitle.ts +46 -0
  69. package/client-tmp/react/test/e2e/fixture.ts +1 -1
  70. package/client-tmp/web-components/package.json +4 -0
  71. package/client-tmp/web-components/src/components/components.ts +18 -9
  72. package/client-tmp/web-components/src/layouts/default.ts +12 -2
  73. package/client-tmp/web-components/src/main/main.css +12 -0
  74. package/client-tmp/web-components/src/main/main.template.ts +0 -1
  75. package/client-tmp/web-components/src/main/main.ts +1 -34
  76. package/client-tmp/web-components/src/routes/config.ts +5 -6
  77. package/client-tmp/web-components/src/styles/design-tokens.json +5 -1
  78. package/client-tmp/web-components/src/styles/typography.ts +6 -4
  79. package/package.json +1 -1
  80. package/server/settings.gradle.kts +0 -3
  81. package/client-tmp/angular/src/app/store/store.ts +0 -34
  82. package/client-tmp/react/lint-css.ts +0 -19
  83. package/client-tmp/react/vite.config.ts +0 -70
  84. package/client-tmp/web-components/src/store/store.ts +0 -29
@@ -1,9 +1,8 @@
1
1
  import { getApp } from '@genesislcap/foundation-shell/app';
2
2
  import type { FoundationRouter } from '@genesislcap/foundation-ui';
3
3
  import { css, GenesisElementLayout, html } from '@genesislcap/web-core';
4
- import type { Store } from '../store';
5
4
 
6
- type ClientAppRouter = FoundationRouter & { store: Store };
5
+ type ClientAppRouter = FoundationRouter;
7
6
 
8
7
  const app = getApp();
9
8
 
@@ -40,6 +39,9 @@ export const defaultLayout = new GenesisElementLayout(
40
39
  <div class="container">
41
40
  ${app.registerElementsTarget('layout-start')}
42
41
  <foundation-header
42
+ {{#if headerLogoSrc}}
43
+ logo-src="{{headerLogoSrc}}"
44
+ {{/if}}
43
45
  show-luminance-toggle-button
44
46
  show-misc-toggle-button
45
47
  :routeNavItems=${(x) => x.config.getNavItems()}
@@ -92,5 +94,13 @@ export const defaultLayout = new GenesisElementLayout(
92
94
  rapid-flyout::part(content) {
93
95
  height: 100%;
94
96
  }
97
+
98
+ foundation-header::part(logo) {
99
+ max-width: 50px;
100
+ max-height: 24px;
101
+ width: auto;
102
+ height: auto;
103
+ object-fit: contain;
104
+ }
95
105
  `.withBehaviors(app.registerStylesTarget('layout')),
96
106
  );
@@ -15,3 +15,15 @@ foundation-router {
15
15
  :not(:defined) {
16
16
  visibility: hidden;
17
17
  }
18
+
19
+ {{#if fontData}}
20
+ {{#each fontData}}
21
+ @font-face {
22
+ font-family: "{{../fontFamily}}";
23
+ src: url("../../public/fonts/{{filename}}") format("{{format}}");
24
+ font-weight: {{weight}};
25
+ font-style: normal;
26
+ font-display: swap;
27
+ }
28
+ {{/each}}
29
+ {{/if}}
@@ -18,6 +18,5 @@ export const MainTemplate: ViewTemplate<MainApplication> = html`
18
18
  <foundation-router
19
19
  @luminance-icon-clicked=${(x) => x.onDarkModeToggle()}
20
20
  :config=${(x) => x.config}
21
- :store=${(x) => x.store}
22
21
  ></foundation-router>
23
22
  `;
@@ -1,5 +1,4 @@
1
1
  import { Connect, ConnectConfig, defaultConnectConfig } from '@genesislcap/foundation-comms';
2
- import { EventEmitter } from '@genesislcap/foundation-events';
3
2
  import { App } from '@genesislcap/foundation-shell/app';
4
3
  import { importPBCAssets } from '@genesislcap/foundation-shell/pbc';
5
4
  import { configureDesignSystem } from '@genesislcap/foundation-ui';
@@ -17,7 +16,6 @@ import {
17
16
  } from '@genesislcap/web-core';
18
17
  import * as Components from '../components';
19
18
  import { MainRouterConfig } from '../routes';
20
- import { Store, StoreEventDetailMap } from '../store';
21
19
  import designTokens from '../styles/design-tokens.json';
22
20
  {{#if FDC3.channels.length}}
23
21
  import { listenToChannel, onFDC3Ready } from '../utils';
@@ -27,20 +25,15 @@ import { DynamicTemplate as template, LoadingTemplate, MainTemplate } from './ma
27
25
 
28
26
  const name = '{{rootElement}}';
29
27
 
30
- /**
31
- * @fires store-connected - Fired when the store is connected.
32
- * @fires store-ready - Fired when the store is ready.
33
- */
34
28
  @customElement({
35
29
  name,
36
30
  template,
37
31
  styles,
38
32
  })
39
- export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisElement) {
33
+ export class MainApplication extends GenesisElement {
40
34
  @App app: App;
41
35
  @Connect connect!: Connect;
42
36
  @Container container!: Container;
43
- @Store store: Store;
44
37
 
45
38
  @inject(MainRouterConfig) config!: MainRouterConfig;
46
39
 
@@ -51,8 +44,6 @@ export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisEl
51
44
  async connectedCallback() {
52
45
  this.registerDIDependencies();
53
46
  super.connectedCallback();
54
- this.addEventListeners();
55
- this.readyStore();
56
47
  await this.loadPBCs();
57
48
  await this.loadRemotes();
58
49
  {{#if FDC3.channels.length}}
@@ -63,12 +54,6 @@ export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisEl
63
54
  });
64
55
  }
65
56
 
66
- disconnectedCallback() {
67
- super.disconnectedCallback();
68
- this.removeEventListeners();
69
- this.disconnectStore();
70
- }
71
-
72
57
  onDarkModeToggle() {
73
58
  baseLayerLuminance.setValueFor(
74
59
  this.provider,
@@ -145,22 +130,4 @@ export class MainApplication extends EventEmitter<StoreEventDetailMap>(GenesisEl
145
130
  */
146
131
  );
147
132
  }
148
-
149
- protected addEventListeners() {
150
- this.addEventListener('store-connected', this.store.onConnected);
151
- }
152
-
153
- protected removeEventListeners() {
154
- this.removeEventListener('store-connected', this.store.onConnected);
155
- }
156
-
157
- protected readyStore() {
158
- // @ts-ignore
159
- this.$emit('store-connected', this);
160
- this.$emit('store-ready', true);
161
- }
162
-
163
- protected disconnectStore() {
164
- this.$emit('store-disconnected');
165
- }
166
133
  }
@@ -3,12 +3,12 @@ import { Auth, Connect } from '@genesislcap/foundation-comms';
3
3
  import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
4
4
  import { GENESIS_SOCKET_URL, PUBLIC_PATH } from '@genesislcap/foundation-utils';
5
5
  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';
9
6
  {{#each routes}}
10
7
  import { {{pascalCase this.name}} } from './{{kebabCase this.name}}/{{kebabCase this.name}}';
11
8
  {{/each}}
9
+ import { NotFound } from './not-found/not-found';
10
+ import { defaultNotPermittedRoute, NotPermitted } from './not-permitted/not-permitted';
11
+ import { LoginSettings } from './types';
12
12
 
13
13
  // eslint-disable-next-line
14
14
  declare var ENABLE_SSO: string;
@@ -46,9 +46,8 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
46
46
  name: 'login',
47
47
  title: 'Login',
48
48
  element: async () => {
49
- const { configure, defaultAuthConfig } = await import(
50
- '@genesislcap/foundation-auth/config'
51
- );
49
+ const { configure, defaultAuthConfig } =
50
+ await import('@genesislcap/foundation-auth/config');
52
51
  return configure({
53
52
  omitRoutes: ['request-account', 'forgot-password'],
54
53
  fields: {
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "fontFamily": {
14
14
  "bodyFont": {
15
- "$value": "Roboto, \"Segoe UI\", Arial, Helvetica, sans-serif",
15
+ "$value": "{{#if fontFamily}}{{fontFamily}}, {{/if}}Roboto, \"Segoe UI\", Arial, Helvetica, sans-serif",
16
16
  "$type": "fontFamily"
17
17
  }
18
18
  },
@@ -37,6 +37,10 @@
37
37
  "$value": 0,
38
38
  "$type": "number"
39
39
  },
40
+ "baseHeightMultiplier": {
41
+ "$value": 10,
42
+ "$type": "number"
43
+ },
40
44
  "borderRadius": {
41
45
  "$value": 4,
42
46
  "$type": "number"
@@ -1,22 +1,24 @@
1
- const mixinSegoeUI = (style = 'normal', weight = 'normal') => `
2
- font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
1
+ const mixinFont = (style = 'normal', weight = 'normal') => `
2
+ font-family: {{#if fontFamily}}"{{fontFamily}}", {{/if}}"Segoe UI", "Helvetica Neue", Arial, sans-serif;
3
3
  font-style: ${style};
4
4
  font-weight: ${weight};
5
5
  `;
6
6
 
7
7
  export const stylesFontFaces = `
8
+ {{#unless fontFamily}}
8
9
  @font-face {
9
10
  font-family: Segoe UI;
10
11
  font-weight: 300;
11
12
  src: local("Segoe UI Semilight"), local("Segoe UI");
12
13
  }
14
+ {{/unless}}
13
15
 
14
16
  * {
15
- ${mixinSegoeUI()}
17
+ ${mixinFont()}
16
18
  }
17
19
  `;
18
20
 
19
- export const mixinCardTitle = mixinSegoeUI('normal', 'bold');
21
+ export const mixinCardTitle = mixinFont('normal', 'bold');
20
22
 
21
23
  export const stylesHeaders = `
22
24
  h1, h2, h3, h4, h5, h6 {
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.7.0-prerelease.4",
4
+ "version": "5.7.0-prerelease.40",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -48,10 +48,7 @@ genesis {
48
48
  plugins {
49
49
  genesisDeploy.enabled = true
50
50
  }
51
-
52
51
  }
53
52
 
54
-
55
53
  include("{{appName}}-app")
56
54
  includeBuild("../client")
57
-
@@ -1,34 +0,0 @@
1
- import { CustomEventMap } from '@genesislcap/foundation-events';
2
- import { getApp } from '@genesislcap/foundation-shell/app';
3
- import {
4
- AbstractStoreRoot,
5
- registerStore,
6
- StoreRoot,
7
- StoreRootEventDetailMap,
8
- } from '@genesislcap/foundation-store';
9
- import { DI } from '@genesislcap/web-core';
10
-
11
- export interface Store extends StoreRoot {}
12
-
13
- export type StoreEventDetailMap = StoreRootEventDetailMap & {};
14
-
15
- declare global {
16
- interface HTMLElementEventMap extends CustomEventMap<StoreEventDetailMap> {}
17
- }
18
-
19
- class DefaultStore extends AbstractStoreRoot<Store, StoreEventDetailMap> implements Store {
20
- constructor() {
21
- super();
22
-
23
- /**
24
- * Register the store root
25
- */
26
- getApp().registerStoreRoot(this);
27
- }
28
- }
29
-
30
- export const Store = registerStore(DefaultStore, 'Store');
31
-
32
- export function getStore(): Store {
33
- return DI.getOrCreateDOMContainer().get(Store) as Store;
34
- }
@@ -1,19 +0,0 @@
1
- import { execSync } from 'child_process';
2
- import glob from 'glob';
3
- import path from 'path';
4
-
5
- const cssFiles: string[] = glob.sync(path.join(__dirname, '**/*.css'));
6
-
7
- if (cssFiles.length === 0) {
8
- console.log('No CSS files found.');
9
- process.exit(0);
10
- }
11
-
12
- const command: string = `genx lint -l stylelint ${cssFiles.join(' ')}`;
13
-
14
- try {
15
- execSync(command, { stdio: 'inherit' });
16
- } catch (error) {
17
- console.error('Error running stylelint:', error);
18
- process.exit(1);
19
- }
@@ -1,70 +0,0 @@
1
- import { fileURLToPath } from 'node:url';
2
- import { resolve, dirname } from 'path';
3
- import { defineConfig, UserConfig } from 'vite';
4
- import react from '@vitejs/plugin-react';
5
- import visualizer from 'rollup-plugin-visualizer';
6
- import tsconfigPaths from 'vite-plugin-tsconfig-paths';
7
-
8
- const __dirname = dirname(fileURLToPath(import.meta.url));
9
-
10
- export default defineConfig(({ mode }: { mode: string }): UserConfig => {
11
- const https: boolean = process.env.HTTPS === 'true';
12
- const open: boolean = !(process.env.NO_OPEN === 'true');
13
- const environmentFile = mode === 'production'
14
- ? 'environment.prod.ts'
15
- : 'environment.ts';
16
- const environmentPath = resolve(__dirname, 'src/environments', environmentFile);
17
-
18
- const config: UserConfig = {
19
- define: {
20
- BUILDER: JSON.stringify('vite'),
21
- },
22
- server: {
23
- https,
24
- open,
25
- fs: {
26
- strict: false,
27
- }
28
- },
29
- plugins: [
30
- react(),
31
- tsconfigPaths(),
32
- ],
33
- build: {
34
- rollupOptions: {
35
- plugins: [],
36
- treeshake: false,
37
- },
38
- },
39
- resolve: {
40
- alias: {
41
- 'foundationZero/ZeroDesignSystem': resolve(__dirname, 'node_modules/@genesislcap/foundation-zero'),
42
- '@': resolve(__dirname, 'src'),
43
- '@environment': environmentPath,
44
- 'pbc': resolve(__dirname, 'src/pbc'),
45
- },
46
- preserveSymlinks: true,
47
- },
48
- esbuild: {
49
- tsconfigRaw: {
50
- compilerOptions: {
51
- experimentalDecorators: true,
52
- },
53
- },
54
- },
55
- };
56
-
57
- if (mode === 'stats') {
58
- config.build.rollupOptions.plugins.push(
59
- visualizer({
60
- template: 'raw-data',
61
- filename: 'stats.json',
62
- open: true,
63
- gzipSize: true,
64
- brotliSize: true,
65
- })
66
- );
67
- }
68
-
69
- return config;
70
- });
@@ -1,29 +0,0 @@
1
- import { CustomEventMap } from '@genesislcap/foundation-events';
2
- import { getApp } from '@genesislcap/foundation-shell/app';
3
- import {
4
- AbstractStoreRoot,
5
- registerStore,
6
- StoreRoot,
7
- StoreRootEventDetailMap,
8
- } from '@genesislcap/foundation-store';
9
-
10
- export interface Store extends StoreRoot {}
11
-
12
- export type StoreEventDetailMap = StoreRootEventDetailMap & {};
13
-
14
- declare global {
15
- interface HTMLElementEventMap extends CustomEventMap<StoreEventDetailMap> {}
16
- }
17
-
18
- class DefaultStore extends AbstractStoreRoot<Store, StoreEventDetailMap> implements Store {
19
- constructor() {
20
- super();
21
-
22
- /**
23
- * Register the store root
24
- */
25
- getApp().registerStoreRoot(this);
26
- }
27
- }
28
-
29
- export const Store = registerStore(DefaultStore, 'Store');