@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.
- package/.genx/package.json +1 -1
- package/.genx/scripts/update-versions.js +45 -15
- package/.genx/templates/angular/entityManager.hbs +3 -0
- package/.genx/templates/angular/route.hbs +0 -1
- package/.genx/templates/react/chart.hbs +6 -2
- package/.genx/templates/react/component/component.gridOptions.hbs +1 -1
- package/.genx/templates/react/component/component.hbs +22 -14
- package/.genx/templates/react/component/component.index.hbs +1 -1
- package/.genx/templates/react/entityManager.hbs +16 -9
- package/.genx/templates/react/form.hbs +6 -2
- package/.genx/templates/react/grid.hbs +15 -5
- package/.genx/templates/react/gridLayout.hbs +28 -28
- package/.genx/templates/react/horizontalLayout.hbs +5 -5
- package/.genx/templates/react/route.hbs +4 -18
- package/.genx/templates/web-components/entityManager.hbs +3 -0
- package/.genx/utils/formatRouteData.js +1 -1
- package/.genx/utils/generateTile.js +1 -0
- package/.genx/versions.json +3 -3
- package/.github/pull_request_template.md +1 -1
- package/.github/workflows/build.yml +3 -2
- package/.github/workflows/slack.yml +1 -1
- package/.github/workflows/upgrade.yml +6 -1
- package/.github/workflows/upgrade_prerelease.yml +1 -0
- package/CHANGELOG.md +109 -4
- package/client-tmp/react/.eslintrc.cjs +3 -1
- package/client-tmp/react/env.development.json +3 -0
- package/client-tmp/react/index.html +1 -1
- package/client-tmp/react/lint-css.js +18 -0
- package/client-tmp/react/package.json +31 -5
- package/client-tmp/react/playwright.config.ts +17 -0
- package/client-tmp/react/src/App.tsx +33 -6
- package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.jsx +62 -0
- package/client-tmp/react/src/components/ErrorMessage.test.js +80 -0
- package/client-tmp/react/src/config.ts +2 -1
- package/client-tmp/react/src/custom-elements.d.ts +1 -1
- package/client-tmp/react/src/guards/PermissionsGuard.tsx +37 -0
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.css +0 -0
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.jsx +13 -0
- package/client-tmp/react/src/share/foundation-login.ts +1 -1
- package/client-tmp/react/src/svg-elements.d.ts +1 -1
- package/client-tmp/react/src/utils/fdc3.ts +32 -0
- package/client-tmp/react/src/utils/history.ts +1 -3
- package/client-tmp/react/src/utils/index.ts +4 -0
- package/client-tmp/react/src/utils/permissions.ts +7 -0
- package/client-tmp/react/src/utils/setApiHost.ts +9 -0
- package/client-tmp/react/test/e2e/fixture.ts +26 -0
- package/client-tmp/react/test/e2e/flows/001-protected.e2e.ts +6 -0
- package/client-tmp/react/test/e2e/index.ts +2 -0
- package/client-tmp/react/test/e2e/pages/index.ts +1 -0
- package/client-tmp/react/test/e2e/pages/protected.ts +16 -0
- package/client-tmp/react/tsconfig.node.json +1 -1
- package/client-tmp/react/vite.config.js +59 -0
- package/package.json +1 -1
- package/client-tmp/react/vite.config.ts +0 -14
- /package/client-tmp/react/src/pages/{auth → AuthPage}/AuthPage.css +0 -0
- /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 @@
|
|
|
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
|
+
}
|
|
@@ -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,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
|
-
});
|
|
File without changes
|
|
File without changes
|