@genesislcap/blank-app-seed 3.29.2 → 3.30.0-prerelease.2

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 (56) hide show
  1. package/.genx/package.json +1 -1
  2. package/.genx/scripts/update-versions.js +45 -15
  3. package/.genx/templates/angular/entityManager.hbs +3 -0
  4. package/.genx/templates/angular/route.hbs +0 -1
  5. package/.genx/templates/react/chart.hbs +6 -2
  6. package/.genx/templates/react/component/component.gridOptions.hbs +1 -1
  7. package/.genx/templates/react/component/component.hbs +22 -14
  8. package/.genx/templates/react/component/component.index.hbs +1 -1
  9. package/.genx/templates/react/entityManager.hbs +16 -9
  10. package/.genx/templates/react/form.hbs +6 -2
  11. package/.genx/templates/react/grid.hbs +15 -5
  12. package/.genx/templates/react/gridLayout.hbs +28 -28
  13. package/.genx/templates/react/horizontalLayout.hbs +5 -5
  14. package/.genx/templates/react/route.hbs +4 -18
  15. package/.genx/templates/web-components/entityManager.hbs +3 -0
  16. package/.genx/utils/formatRouteData.js +1 -1
  17. package/.genx/utils/generateTile.js +1 -0
  18. package/.genx/versions.json +3 -3
  19. package/.github/pull_request_template.md +1 -1
  20. package/.github/workflows/build.yml +3 -2
  21. package/.github/workflows/slack.yml +1 -1
  22. package/.github/workflows/upgrade.yml +6 -1
  23. package/.github/workflows/upgrade_prerelease.yml +1 -0
  24. package/CHANGELOG.md +109 -4
  25. package/client-tmp/react/.eslintrc.cjs +3 -1
  26. package/client-tmp/react/env.development.json +3 -0
  27. package/client-tmp/react/index.html +1 -1
  28. package/client-tmp/react/lint-css.js +18 -0
  29. package/client-tmp/react/package.json +31 -5
  30. package/client-tmp/react/playwright.config.ts +17 -0
  31. package/client-tmp/react/src/App.tsx +33 -6
  32. package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.jsx +62 -0
  33. package/client-tmp/react/src/components/ErrorMessage.test.js +80 -0
  34. package/client-tmp/react/src/config.ts +2 -1
  35. package/client-tmp/react/src/custom-elements.d.ts +1 -1
  36. package/client-tmp/react/src/guards/PermissionsGuard.tsx +37 -0
  37. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.css +0 -0
  38. package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.jsx +13 -0
  39. package/client-tmp/react/src/share/foundation-login.ts +1 -1
  40. package/client-tmp/react/src/svg-elements.d.ts +1 -1
  41. package/client-tmp/react/src/utils/fdc3.ts +32 -0
  42. package/client-tmp/react/src/utils/history.ts +1 -3
  43. package/client-tmp/react/src/utils/index.ts +4 -0
  44. package/client-tmp/react/src/utils/permissions.ts +7 -0
  45. package/client-tmp/react/src/utils/setApiHost.ts +9 -0
  46. package/client-tmp/react/test/e2e/fixture.ts +26 -0
  47. package/client-tmp/react/test/e2e/flows/001-protected.e2e.ts +6 -0
  48. package/client-tmp/react/test/e2e/index.ts +2 -0
  49. package/client-tmp/react/test/e2e/pages/index.ts +1 -0
  50. package/client-tmp/react/test/e2e/pages/protected.ts +16 -0
  51. package/client-tmp/react/tsconfig.node.json +1 -1
  52. package/client-tmp/react/vite.config.js +59 -0
  53. package/package.json +1 -1
  54. package/client-tmp/react/vite.config.ts +0 -14
  55. /package/client-tmp/react/src/pages/{auth → AuthPage}/AuthPage.css +0 -0
  56. /package/client-tmp/react/src/pages/{auth → AuthPage}/AuthPage.jsx +0 -0
@@ -0,0 +1,26 @@
1
+ import { base, Page } from '@genesislcap/foundation-testing/e2e';
2
+ import { ProtectedPage } from './pages';
3
+ import { PORT } from '../../playwright.config';
4
+
5
+ export type FixtureConfig = {
6
+ API_HOST: string;
7
+ DEFAULT_USER: string;
8
+ DEFAULT_PASSWORD: string;
9
+ PORT: number;
10
+ };
11
+
12
+ export type Fixture = {
13
+ config: FixtureConfig;
14
+ protectedPage: ProtectedPage;
15
+ };
16
+
17
+ const API_HOST = process.env['API_HOST'] || 'localhost';
18
+
19
+ export const test = base.extend<Fixture>({
20
+ config: [{ PORT, API_HOST, DEFAULT_PASSWORD: '', DEFAULT_USER: '' }, { option: true }],
21
+ protectedPage: async ({ config, page }: { config: FixtureConfig, page: Page }, use: (page: ProtectedPage) => Promise<unknown>) => {
22
+ const protectedPage = new ProtectedPage(config, page);
23
+ await protectedPage.goto();
24
+ await use(protectedPage);
25
+ },
26
+ });
@@ -0,0 +1,6 @@
1
+ import { expect } from '@genesislcap/foundation-testing/e2e';
2
+ import { test } from '../fixture';
3
+
4
+ test('expected page title', async ({ page }: { page: any }) => {
5
+ await expect(page).toHaveTitle(/{{capitalCase appName}}/);
6
+ });
@@ -0,0 +1,2 @@
1
+ export * from './fixture';
2
+ export * from './pages';
@@ -0,0 +1 @@
1
+ export * from './protected';
@@ -0,0 +1,16 @@
1
+ import type { Page } from '@genesislcap/foundation-testing/e2e';
2
+ import type { FixtureConfig } from '../fixture';
3
+
4
+ export class ProtectedPage {
5
+ config: FixtureConfig;
6
+ page: Page;
7
+
8
+ constructor(config: FixtureConfig, page: Page) {
9
+ this.config = config;
10
+ this.page = page;
11
+ }
12
+
13
+ async goto() {
14
+ await this.page.goto('/');
15
+ }
16
+ }
@@ -9,5 +9,5 @@
9
9
  "strict": true,
10
10
  "noEmit": true
11
11
  },
12
- "include": ["vite.config.ts"]
12
+ "include": ["vite.config.js"]
13
13
  }
@@ -0,0 +1,59 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ import { resolve, dirname } from 'path';
3
+ import { defineConfig } from 'vite';
4
+ import fs from 'fs';
5
+ import react from '@vitejs/plugin-react';
6
+ import visualizer from 'rollup-plugin-visualizer';
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+
10
+ export default defineConfig(({ mode }) => {
11
+ const https = process.env.HTTPS === 'true';
12
+ const open = !(process.env.NO_OPEN === 'true');
13
+ const jsonFilePath = resolve(process.cwd(), `env.${mode}.json`);
14
+ const envConfig = {};
15
+
16
+ if (fs.existsSync(jsonFilePath)) {
17
+ const jsonContent = fs.readFileSync(jsonFilePath, 'utf-8');
18
+ const parsedConfig = JSON.parse(jsonContent);
19
+
20
+ for (const key in parsedConfig) {
21
+ envConfig[`import.meta.env.${key}`] = JSON.stringify(parsedConfig[key]);
22
+ }
23
+ }
24
+
25
+ const config = {
26
+ define: envConfig,
27
+ server: {
28
+ https,
29
+ open,
30
+ },
31
+ plugins: [
32
+ react(),
33
+ ],
34
+ build: {
35
+ rollupOptions: {
36
+ plugins: []
37
+ }
38
+ },
39
+ resolve: {
40
+ alias: {
41
+ 'foundationZero/ZeroDesignSystem': resolve(__dirname, 'node_modules/@genesislcap/foundation-zero'),
42
+ },
43
+ },
44
+ };
45
+
46
+ if (mode === 'stats') {
47
+ config.build.rollupOptions.plugins.push(
48
+ visualizer({
49
+ template: 'raw-data',
50
+ filename: 'stats.json',
51
+ open: true,
52
+ gzipSize: true,
53
+ brotliSize: true,
54
+ })
55
+ );
56
+ }
57
+
58
+ return config;
59
+ });
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.29.2",
4
+ "version": "3.30.0-prerelease.2",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -1,14 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
- import { resolve } from 'path';
4
-
5
- export default defineConfig({
6
- plugins: [
7
- react(),
8
- ],
9
- resolve: {
10
- alias: {
11
- 'foundationZero/ZeroDesignSystem': resolve(__dirname, 'node_modules/@genesislcap/foundation-zero'),
12
- },
13
- },
14
- });