@genesislcap/blank-app-seed 3.30.0-prerelease.8 → 3.30.0-prerelease.80

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 (125) hide show
  1. package/.genx/configure.js +5 -0
  2. package/.genx/package.json +1 -1
  3. package/.genx/prompts/api.js +2 -9
  4. package/.genx/prompts/server.js +9 -0
  5. package/.genx/prompts.js +9 -2
  6. package/.genx/static.js +1 -1
  7. package/.genx/templates/angular/component/component.hbs +46 -3
  8. package/.genx/templates/angular/gridLayout.hbs +8 -8
  9. package/.genx/templates/react/chart.hbs +7 -3
  10. package/.genx/templates/react/component/component.column.defs.hbs +4 -2
  11. package/.genx/templates/react/component/component.create.form.hbs +2 -2
  12. package/.genx/templates/react/component/component.gridOptions.hbs +4 -2
  13. package/.genx/templates/react/component/component.hbs +101 -21
  14. package/.genx/templates/react/component/component.index.hbs +1 -1
  15. package/.genx/templates/react/component/component.update.form.hbs +1 -1
  16. package/.genx/templates/react/entityManager.hbs +62 -49
  17. package/.genx/templates/react/form.hbs +7 -3
  18. package/.genx/templates/react/grid.hbs +16 -10
  19. package/.genx/templates/react/gridLayout.hbs +8 -8
  20. package/.genx/templates/react/route.hbs +2 -2
  21. package/.genx/templates/react/tabsLayout.hbs +5 -5
  22. package/.genx/templates/web-components/component/component.hbs +55 -2
  23. package/.genx/templates/web-components/component/component.template.hbs +0 -3
  24. package/.genx/templates/web-components/entityManager.hbs +1 -1
  25. package/.genx/templates/web-components/gridLayout.hbs +8 -8
  26. package/.genx/templates/web-components/route.template.hbs +2 -2
  27. package/.genx/utils/deleteGradleWrappers.js +12 -0
  28. package/.genx/utils/formatRouteData.js +10 -0
  29. package/.genx/utils/generateRoute.js +2 -1
  30. package/.genx/utils/generateTile.js +2 -2
  31. package/.genx/utils/getTodosAndComments.js +28 -0
  32. package/.genx/utils/index.js +2 -0
  33. package/.genx/versions.json +3 -3
  34. package/.gitignore +3 -0
  35. package/CHANGELOG.md +681 -0
  36. package/README.md +7 -13
  37. package/client-tmp/angular/__mocks__/fileMock.js +1 -0
  38. package/client-tmp/angular/angular.json +0 -29
  39. package/client-tmp/angular/jest.config.js +20 -0
  40. package/client-tmp/angular/package.json +6 -6
  41. package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +2 -2
  42. package/client-tmp/angular/src/jest.setup.ts +46 -0
  43. package/client-tmp/angular/tsconfig.app.json +1 -2
  44. package/client-tmp/angular/tsconfig.json +1 -2
  45. package/client-tmp/angular/tsconfig.spec.json +13 -7
  46. package/client-tmp/react/.babelrc +2 -1
  47. package/client-tmp/react/.eslintrc.cjs +1 -0
  48. package/client-tmp/react/README.md +36 -24
  49. package/client-tmp/react/jest.config.ts +15 -0
  50. package/client-tmp/react/lint-css.ts +19 -0
  51. package/client-tmp/react/package.json +42 -24
  52. package/client-tmp/react/public/favicon.ico +0 -0
  53. package/client-tmp/react/public/index.html +13 -0
  54. package/client-tmp/react/src/App.tsx +95 -68
  55. package/client-tmp/react/src/components/ErrorMessage/{ErrorMessage.test.js → ErrorMessage.test.tsx} +18 -20
  56. package/client-tmp/react/src/components/ErrorMessage/{ErrorMessage.jsx → ErrorMessage.tsx} +9 -4
  57. package/client-tmp/react/src/config.ts +2 -16
  58. package/client-tmp/react/src/custom-elements.d.ts +21 -9
  59. package/client-tmp/react/src/environments/environment.prod.ts +8 -0
  60. package/client-tmp/react/src/environments/environment.ts +9 -0
  61. package/client-tmp/react/src/guards/ProtectedGuard.tsx +66 -0
  62. package/client-tmp/react/src/helpers/hasPermissionHelper.tsx +11 -0
  63. package/client-tmp/react/src/helpers/isAuthenticatedHelper.tsx +14 -0
  64. package/client-tmp/react/src/helpers/isConnectedHelper.tsx +16 -0
  65. package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +1 -1
  66. package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +26 -15
  67. package/client-tmp/react/src/main.tsx +21 -5
  68. package/client-tmp/react/src/pages/AuthPage/{AuthPage.test.js → AuthPage.test.tsx} +2 -2
  69. package/client-tmp/react/src/pages/AuthPage/{AuthPage.jsx → AuthPage.tsx} +3 -2
  70. package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.css +0 -0
  71. package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.tsx +14 -0
  72. package/client-tmp/react/src/pages/NotPermittedPage/{NotPermittedPage.test.js → NotPermittedPage.test.tsx} +3 -4
  73. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +14 -0
  74. package/client-tmp/react/src/pbc/README.md +7 -0
  75. package/client-tmp/react/src/pbc/container.tsx +44 -0
  76. package/client-tmp/react/src/pbc/elementsRenderer.tsx +40 -0
  77. package/client-tmp/react/src/pbc/utils.ts +121 -0
  78. package/client-tmp/react/src/services/store.service.ts +48 -0
  79. package/client-tmp/react/src/share/foundation-login.ts +13 -6
  80. package/client-tmp/react/src/share/genesis-components.ts +49 -23
  81. package/client-tmp/react/src/store/AuthContext.tsx +0 -2
  82. package/client-tmp/react/src/store/RoutesContext.tsx +74 -0
  83. package/client-tmp/react/src/types/LayoutName.ts +3 -0
  84. package/client-tmp/react/src/types/RouteLayouts.ts +3 -1
  85. package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +5 -0
  86. package/client-tmp/react/src/utils/history.ts +4 -2
  87. package/client-tmp/react/src/utils/index.ts +3 -1
  88. package/client-tmp/react/src/utils/layout.ts +11 -0
  89. package/client-tmp/react/test/e2e/fixture.ts +1 -1
  90. package/client-tmp/react/tsconfig.app.json +2 -26
  91. package/client-tmp/react/tsconfig.json +31 -8
  92. package/client-tmp/react/tsconfig.node.json +1 -1
  93. package/client-tmp/react/vite.config.ts +70 -0
  94. package/client-tmp/react/webpack.config.js +103 -0
  95. package/client-tmp/web-components/README.md +2 -2
  96. package/client-tmp/web-components/package.json +10 -8
  97. package/client-tmp/web-components/src/main/main.styles.ts +1 -1
  98. package/client-tmp/web-components/src/pbc/README.md +1 -1
  99. package/client-tmp/web-components/src/routes/config.ts +4 -1
  100. package/client-tmp/web-components/src/utils/index.ts +1 -0
  101. package/client-tmp/web-components/src/utils/layout.ts +11 -0
  102. package/client-tmp/web-components/test/README.md +1 -1
  103. package/client-tmp/web-components/tsconfig.json +1 -1
  104. package/package.json +1 -1
  105. package/server/README.md +1 -1
  106. package/server/build.gradle.kts +6 -3
  107. package/server/gradle.properties +2 -1
  108. package/server/settings.gradle.kts +6 -5
  109. package/server/{{appName}}-app/src/test/kotlin/global/genesis/EventHandlerTest.kt +1 -1
  110. package/settings.gradle.kts +7 -4
  111. package/testData/excel/.gitkeep +0 -0
  112. package/client-tmp/angular/karma.conf.js +0 -9
  113. package/client-tmp/angular/src/app/app.component.spec.ts +0 -23
  114. package/client-tmp/react/env.development.json +0 -3
  115. package/client-tmp/react/jest.config.js +0 -10
  116. package/client-tmp/react/lint-css.js +0 -18
  117. package/client-tmp/react/src/guards/AuthGuard.tsx +0 -32
  118. package/client-tmp/react/src/guards/PermissionsGuard.tsx +0 -37
  119. package/client-tmp/react/src/index.js +0 -17
  120. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.jsx +0 -13
  121. package/client-tmp/react/src/reportWebVitals.js +0 -13
  122. package/client-tmp/react/vite.config.js +0 -59
  123. /package/client-tmp/react/{jest.setup.js → jest.setup.ts} +0 -0
  124. /package/client-tmp/react/src/{setupTests.js → setupTests.ts} +0 -0
  125. /package/server/{{appName}}-app/src/main/genesis/scripts/{{{appName}}-data-pipelines.kts → {{appName}}-pipelines.kts} +0 -0
@@ -9,5 +9,5 @@
9
9
  "strict": true,
10
10
  "noEmit": true
11
11
  },
12
- "include": ["vite.config.js"]
12
+ "include": ["vite.config.ts"]
13
13
  }
@@ -0,0 +1,70 @@
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
+ });
@@ -0,0 +1,103 @@
1
+ const { resolve, join } = require('path');
2
+ const webpack = require('webpack');
3
+ const Dotenv = require('dotenv-webpack');
4
+
5
+ module.exports = (env, argv) => {
6
+ const mode = argv.mode || 'development';
7
+ const https = process.env.HTTPS === 'true';
8
+ const open = !(process.env.NO_OPEN === 'true');
9
+ const environmentFile = mode === 'production'
10
+ ? 'environment.prod.ts'
11
+ : 'environment.ts';
12
+ const environmentPath = resolve(__dirname, 'src/environments', environmentFile);
13
+
14
+ return {
15
+ mode,
16
+ entry: './src/main.tsx',
17
+ output: {
18
+ path: resolve(__dirname, 'dist'),
19
+ filename: 'bundle.js',
20
+ },
21
+ resolve: {
22
+ extensions: ['.tsx', '.ts', '.js'],
23
+ alias: {
24
+ 'foundationZero/ZeroDesignSystem': resolve(__dirname, 'node_modules/@genesislcap/foundation-zero'),
25
+ '@': resolve(__dirname, 'src'),
26
+ '@environment': environmentPath,
27
+ 'pbc': resolve(__dirname, 'src/pbc'),
28
+ },
29
+ symlinks: true,
30
+ },
31
+ module: {
32
+ rules: [
33
+ {
34
+ test: /\.tsx?$/,
35
+ use: {
36
+ loader: 'ts-loader',
37
+ options: {
38
+ transpileOnly: true,
39
+ },
40
+ },
41
+ exclude: /node_modules/,
42
+ },
43
+ {
44
+ test: /\.jsx?$/,
45
+ exclude: /node_modules/,
46
+ use: {
47
+ loader: 'babel-loader',
48
+ options: {
49
+ presets: ['@babel/preset-env', '@babel/preset-react'],
50
+ },
51
+ },
52
+ },
53
+ {
54
+ test: /\.css$/,
55
+ use: ['style-loader', 'css-loader'],
56
+ },
57
+ {
58
+ test: /\.svg$/,
59
+ type: 'asset/resource',
60
+ },
61
+ {
62
+ test: /\.(png|jpe?g|gif)$/i,
63
+ use: [
64
+ {
65
+ loader: 'file-loader',
66
+ },
67
+ ],
68
+ },
69
+ ],
70
+ },
71
+ plugins: [
72
+ new Dotenv(),
73
+ new webpack.DefinePlugin({
74
+ BUILDER: JSON.stringify('webpack'),
75
+ }),
76
+ ],
77
+ devServer: {
78
+ server: https ? 'https' : 'http',
79
+ open,
80
+ static: {
81
+ directory: join(__dirname, 'public'),
82
+ },
83
+ client: {
84
+ overlay: {
85
+ errors: false,
86
+ warnings: false,
87
+ runtimeErrors: false,
88
+ },
89
+ },
90
+ compress: true,
91
+ port: 3000,
92
+ historyApiFallback: true,
93
+ },
94
+ stats: {
95
+ all: false,
96
+ errors: true,
97
+ warnings: true,
98
+ timings: true,
99
+ assets: true,
100
+ modules: false,
101
+ },
102
+ };
103
+ };
@@ -46,9 +46,9 @@ npm run baseline
46
46
 
47
47
  ## Styling
48
48
 
49
- Genesis components are registered with a [Design System](https://learn.genesis.global/docs/web/design-systems/introduction/),
49
+ Genesis components are registered with a Design System,
50
50
  and the default system is named `rapid`. Design systems are highly configurable. You can configure them by importing and
51
- modifying the tokens directly, or by using our [Design System Configuration](https://learn.genesis.global/docs/web/design-systems/preview/)
51
+ modifying the tokens directly, or by using our [Design System Configuration](https://learn.genesis.global/docs/develop/client-capabilities/styling/direct-customization-genesis-components/styling-direct-dsc/)
52
52
  tool in the context of your application.
53
53
 
54
54
  Simply run the application, configure the design system, select Save Changes, and hit Save on popup, then restart your application.
@@ -7,7 +7,8 @@
7
7
  "config": {
8
8
  "API_HOST": "{{apiHost}}",
9
9
  "PORT": 6060,
10
- "ENABLE_SSO": {{enableSSO}}
10
+ "ENABLE_SSO": {{enableSSO}},
11
+ "PERSIST_LAYOUT_IN_DEV": false
11
12
  },
12
13
  "genx": {
13
14
  "app": {
@@ -88,12 +89,12 @@
88
89
  "lint-staged": "^12.4.1"
89
90
  },
90
91
  "dependencies": {
91
- {{#if FDC3.includeDependencies}}
92
- "@genesislcap/foundation-fdc3": "{{versions.UI}}",
93
- {{/if}}
94
92
  "@genesislcap/foundation-comms": "{{versions.UI}}",
95
93
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
96
94
  "@genesislcap/foundation-events": "{{versions.UI}}",
95
+ {{#if FDC3.includeDependencies}}
96
+ "@genesislcap/foundation-fdc3": "{{versions.UI}}",
97
+ {{/if}}
97
98
  "@genesislcap/foundation-forms": "{{versions.UI}}",
98
99
  "@genesislcap/foundation-header": "{{versions.UI}}",
99
100
  "@genesislcap/foundation-inbox": "{{versions.UI}}",
@@ -119,6 +120,10 @@
119
120
  "@genesislcap/foundation-comms": "{{versions.UI}}",
120
121
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
121
122
  "@genesislcap/foundation-events": "{{versions.UI}}",
123
+ {{#if FDC3.includeDependencies}}
124
+ "@genesislcap/foundation-fdc3": "{{versions.UI}}",
125
+ {{/if}}
126
+ "@genesislcap/foundation-forms": "{{versions.UI}}",
122
127
  "@genesislcap/foundation-header": "{{versions.UI}}",
123
128
  "@genesislcap/foundation-inbox": "{{versions.UI}}",
124
129
  "@genesislcap/foundation-layout": "{{versions.UI}}",
@@ -134,9 +139,6 @@
134
139
  "@genesislcap/g2plot-chart": "{{versions.UI}}",
135
140
  "@genesislcap/rapid-design-system": "{{versions.UI}}",
136
141
  "@genesislcap/rapid-grid-pro": "{{versions.UI}}",
137
- "@genesislcap/web-core": "{{versions.UI}}",
138
- "@genesislcap/foundation-forms": {
139
- "ajv": "8.14.0"
140
- }
142
+ "@genesislcap/web-core": "{{versions.UI}}"
141
143
  }
142
144
  }
@@ -8,7 +8,7 @@ export const MainStyles = css`
8
8
  :host {
9
9
  contain: content;
10
10
 
11
- --nav-height: 39px;
11
+ --nav-height: 48px;
12
12
  }
13
13
 
14
14
  :host,
@@ -5,4 +5,4 @@ a new changeset for you and your team to review and merge. You may choose to tai
5
5
  `genx add` for fine grain control, but be aware that doing so makes it more difficult to automate future PBC upgrades.
6
6
  You may need to re-add a PBC that you have previously edited and re-merge any changes to it yourself.
7
7
 
8
- See the app README.md in `@genesislcap/foundation-shell/app` or visit https://learn.genesis.global/docs/web/ to learn more.
8
+ See the app README.md in `@genesislcap/foundation-shell/app` or visit https://docs.genesis.global/docs/develop/client-capabilities/ to learn more.
@@ -1,6 +1,7 @@
1
1
  import { Auth, Session } from '@genesislcap/foundation-comms';
2
2
  import { defaultLoginConfig, LoginConfig } from '@genesislcap/foundation-login';
3
3
  import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
4
+ import { PUBLIC_PATH } from '@genesislcap/foundation-utils';
4
5
  import { NavigationPhase, optional, Route } from '@genesislcap/web-core';
5
6
  import { defaultLayout, loginLayout } from '../layouts';
6
7
  import { logger } from '../utils';
@@ -25,6 +26,8 @@ const ssoSettings =
25
26
  }
26
27
  : {};
27
28
 
29
+ const publicPath = typeof PUBLIC_PATH !== 'undefined' ? PUBLIC_PATH : '';
30
+
28
31
  export class MainRouterConfig extends FoundationRouterConfiguration<LoginSettings> {
29
32
  constructor(
30
33
  @Auth private auth: Auth,
@@ -56,7 +59,7 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
56
59
  configure(this.container, {
57
60
  hostPath: 'login',
58
61
  autoConnect: true,
59
- defaultRedirectUrl: '{{kebabCase routes.[0].name}}',
62
+ defaultRedirectUrl: publicPath + '{{kebabCase routes.[0].name}}',
60
63
  ...ssoSettings,
61
64
  });
62
65
  return define({
@@ -1,3 +1,4 @@
1
1
  export * from './fdc3';
2
+ export * from './layout';
2
3
  export * from './logger';
3
4
  export * from './permissions';
@@ -0,0 +1,11 @@
1
+ import { isDev } from '@genesislcap/foundation-utils';
2
+ import pkg from '../../package.json';
3
+
4
+ // returning null disables caching
5
+ // returning an id (as long as it's not null) enables caching
6
+ export const persistLayout = (id: string) => {
7
+ if (isDev() && (pkg as any)?.config.PERSIST_LAYOUT_IN_DEV !== true) {
8
+ return null;
9
+ }
10
+ return id;
11
+ };
@@ -1,3 +1,3 @@
1
1
  # Test
2
2
 
3
- See [@genesislcap/foundation-testing](https://learn.genesis.global/docs/web/testing/foundation-testing/) for more information.
3
+ See [@genesislcap/foundation-testing](https://docs.genesis.global/docs/develop/client-capabilities/testing/) for more information.
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "declarationDir": "./dist/dts",
20
20
  "outDir": "./dist/esm",
21
- "rootDir": "./src",
21
+ "rootDir": ".",
22
22
  "allowJs": true,
23
23
  "allowSyntheticDefaultImports": true,
24
24
  "declaration": true,
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": "3.30.0-prerelease.8",
4
+ "version": "3.30.0-prerelease.80",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
package/server/README.md CHANGED
@@ -10,4 +10,4 @@ By default, the main module will be detected by a module ending with -app.
10
10
  You can use the Genesis Gradle Settings plugin property `mainModuleName` to specify a custom name.
11
11
  The Genesis Settings plugin is configured in server/settings.gradle.kts with the `genesis` extension.
12
12
 
13
- For more details on project structures, see the [docs](https://learn.genesis.global/docs/operations/project-structure/introduction/).
13
+ For more details on project structures, see the [docs](https://docs.genesis.global/docs/build-deploy-operate/build/project-structure/).
@@ -1,7 +1,10 @@
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
  ext.set("localDaogenVersion", "{{localGenId}}")
2
4
 
3
5
  plugins {
4
6
  `maven-publish`
7
+ id("global.genesis.genesis-start-gui")
5
8
  }
6
9
 
7
10
  subprojects {
@@ -13,9 +16,9 @@ subprojects {
13
16
  }
14
17
  tasks {
15
18
  withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
16
- kotlinOptions {
17
- freeCompilerArgs = listOf("-Xjsr305=strict", "-Xjvm-default=all")
18
- jvmTarget = "17"
19
+ compilerOptions {
20
+ freeCompilerArgs.addAll("-Xjsr305=strict", "-Xjvm-default=all", "-Xlambdas=indy")
21
+ jvmTarget = JvmTarget.JVM_17
19
22
  }
20
23
  }
21
24
  }
@@ -6,6 +6,7 @@ dockerCompactProcesses=true
6
6
  version={{applicationVersion}}
7
7
  genesisVersion={{ versions.GSF }}
8
8
  authVersion={{ versions.Auth }}
9
+ startVersion=0.1.6
9
10
 
10
11
  # Default ssh config for the docker dev environment
11
12
  genesis-home=/app/run
@@ -16,4 +17,4 @@ ssh-port=1337
16
17
 
17
18
  enableDockerContainerTasks=true
18
19
 
19
- compactProcessesStrategy=DEV
20
+ compactProcessesStrategy=DEV
@@ -1,10 +1,10 @@
1
1
  pluginManagement {
2
- pluginManagement {
3
- val genesisVersion: String by settings
2
+ val genesisVersion: String by settings
3
+ val startVersion: String by settings
4
4
 
5
- plugins {
6
- id("global.genesis.settings") version genesisVersion
7
- }
5
+ plugins {
6
+ id("global.genesis.settings") version genesisVersion
7
+ id("global.genesis.genesis-start-gui") version startVersion
8
8
  }
9
9
 
10
10
  repositories {
@@ -28,6 +28,7 @@ pluginManagement {
28
28
  excludeGroup("org.agrona")
29
29
  }
30
30
  }
31
+ google()
31
32
  }
32
33
  }
33
34
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Full documentation on event handler tests may be found here >> https://learn.genesis.global/docs/server/event-handler/testing/#simple-test
2
+ * Full documentation on event handler tests may be found here >> https://docs.genesis.global/docs/develop/server-capabilities/core-business-logic-event-handler/#testing
3
3
  */
4
4
 
5
5
  import global.genesis.db.rx.entity.multi.AsyncEntityDb
@@ -1,5 +1,8 @@
1
- // servers
2
- includeBuild("server")
1
+ val gradleFolder: File = rootProject.projectDir.resolve("gradle")
2
+ if (gradleFolder.exists()) {
3
+ // servers
4
+ includeBuild("server")
3
5
 
4
- // clients
5
- includeBuild("client")
6
+ // clients
7
+ includeBuild("client")
8
+ }
File without changes
@@ -1,9 +0,0 @@
1
- module.exports = function(config) {
2
- config.set({
3
- browsers: ['Chrome'],
4
- browserDisconnectTimeout: 60000,
5
- browserDisconnectTolerance: 3,
6
- browserNoActivityTimeout: 60000,
7
- captureTimeout: 120000,
8
- });
9
- };
@@ -1,23 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
- import { AppComponent } from './app.component';
3
-
4
- describe('AppComponent', () => {
5
- beforeEach(async () => {
6
- await TestBed.configureTestingModule({
7
- declarations: [AppComponent],
8
- }).compileComponents();
9
- });
10
-
11
- it('should create the app', () => {
12
- const fixture = TestBed.createComponent(AppComponent);
13
- const app = fixture.componentInstance;
14
- expect(app).toBeTruthy();
15
- });
16
-
17
- it(`should have the '{{capitalCase appName}}' title`, () => {
18
- const fixture = TestBed.createComponent(AppComponent);
19
- const app = fixture.componentInstance;
20
- expect(app.title).toEqual('{{capitalCase appName}}');
21
- });
22
- });
23
-
@@ -1,3 +0,0 @@
1
- {
2
- "VITE_API_HOST": "{{apiHost}}"
3
- }
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- testEnvironment: 'jsdom',
3
- moduleFileExtensions: ['js', 'jsx'],
4
- transform: {
5
- '^.+\\.jsx?$': 'babel-jest',
6
- },
7
- setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
8
- testMatch: ["**/?(*.)+(test).[jt]s?(x)"],
9
- watchPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/dist/"],
10
- };
@@ -1,18 +0,0 @@
1
- const { execSync } = require('child_process');
2
- const glob = require('glob');
3
- const path = require('path');
4
- const cssFiles = glob.sync(path.join(__dirname, '**/*.css'));
5
-
6
- if (cssFiles.length === 0) {
7
- console.log('No CSS files found.');
8
- process.exit(0);
9
- }
10
-
11
- const command = `genx lint -l stylelint ${cssFiles.join(' ')}`;
12
-
13
- try {
14
- execSync(command, { stdio: 'inherit' });
15
- } catch (error) {
16
- console.error('Error running stylelint:', error);
17
- process.exit(1);
18
- }
@@ -1,32 +0,0 @@
1
- import { useEffect, useState, ReactNode } from 'react';
2
- import { useAuth } from '../store/AuthContext';
3
- import { Navigate } from 'react-router-dom';
4
- import { AUTH_PATH } from '../config';
5
- interface AuthGuardProps {
6
- children: ReactNode;
7
- }
8
- const AuthGuard: React.FC<AuthGuardProps> = ({ children }: AuthGuardProps) => {
9
- const { user, checkAuthStatus } = useAuth();
10
- const [isLoading, setIsLoading] = useState(true);
11
-
12
- useEffect(() => {
13
- const verifyAuth = async () => {
14
- await checkAuthStatus();
15
- setIsLoading(false);
16
- };
17
-
18
- verifyAuth();
19
- }, []);
20
-
21
- if (isLoading) {
22
- return <div>Loading...</div>; // Or some loading component
23
- }
24
-
25
- if (!user) {
26
- return <Navigate to={`/${AUTH_PATH}`} />;
27
- }
28
-
29
- return <>{children}</>;
30
- };
31
-
32
- export default AuthGuard;
@@ -1,37 +0,0 @@
1
- import { useEffect, useState, ReactNode } from 'react';
2
- import { useNavigate } from 'react-router-dom';
3
- import { getUser } from '@genesislcap/foundation-user';
4
- import { NOT_PERMITTED_PATH } from '../config';
5
-
6
- interface PermissionsGuardProps {
7
- children: ReactNode;
8
- permissionCode?: string;
9
- }
10
-
11
- const PermissionsGuard: React.FC<PermissionsGuardProps> = ({ children, permissionCode }: PermissionsGuardProps) => {
12
- const navigate = useNavigate();
13
- const [isAuthorized, setIsAuthorized] = useState(false);
14
- const [isLoading, setIsLoading] = useState(true);
15
-
16
- useEffect(() => {
17
- const checkPermission = async () => {
18
- const user = getUser();
19
- if (permissionCode && !user.hasPermission(permissionCode)) {
20
- navigate(`/${NOT_PERMITTED_PATH}`);
21
- } else {
22
- setIsAuthorized(true);
23
- }
24
- setIsLoading(false);
25
- };
26
-
27
- checkPermission();
28
- }, [navigate, permissionCode]);
29
-
30
- if (isLoading) {
31
- return <div>Loading...</div>; // Or some loading component
32
- }
33
-
34
- return isAuthorized ? <>{children}</> : null;
35
- };
36
-
37
- export default PermissionsGuard;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import './styles/styles.css';
4
- import App from './App';
5
- import reportWebVitals from './reportWebVitals';
6
-
7
- const root = ReactDOM.createRoot(document.getElementById('root'));
8
- root.render(
9
- <React.StrictMode>
10
- <App />
11
- </React.StrictMode>,
12
- );
13
-
14
- // If you want to start measuring performance in your app, pass a function
15
- // to log results (for example: reportWebVitals(console.log))
16
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17
- reportWebVitals();
@@ -1,13 +0,0 @@
1
- import ErrorMessage from '../../components/ErrorMessage/ErrorMessage';
2
- import './NotPermittedPage.css';
3
-
4
- const NotPermittedPage = () => {
5
- return (
6
- <ErrorMessage
7
- elementType="h1"
8
- message="You do not have permission to access this part of the application, please contact your administrator."
9
- ></ErrorMessage>
10
- );
11
- };
12
-
13
- export default NotPermittedPage;
@@ -1,13 +0,0 @@
1
- const reportWebVitals = (onPerfEntry) => {
2
- if (onPerfEntry && onPerfEntry instanceof Function) {
3
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4
- getCLS(onPerfEntry);
5
- getFID(onPerfEntry);
6
- getFCP(onPerfEntry);
7
- getLCP(onPerfEntry);
8
- getTTFB(onPerfEntry);
9
- });
10
- }
11
- };
12
-
13
- export default reportWebVitals;