@genesislcap/blank-app-seed 3.30.0-prerelease.35 → 3.30.0-prerelease.37

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": "3.30.0-prerelease.35",
4
+ "version": "3.30.0-prerelease.37",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -2,13 +2,13 @@
2
2
  <rapid-layout-region type="vertical">
3
3
  {{#each route.tiles}}
4
4
  {{#ifEquals @index 0}}
5
- <rapid-layout-item title="{{../title}}">
6
- <app-{{kebabCase ../componentName}}></app-{{kebabCase ../componentName}}>
5
+ <rapid-layout-item title="{{this.title}}">
6
+ <app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
7
7
  </rapid-layout-item>
8
8
  {{/ifEquals}}
9
9
  {{#ifEquals @index 1}}
10
- <rapid-layout-item title="{{../title}}">
11
- <app-{{kebabCase ../componentName}}></app-{{kebabCase ../componentName}}>
10
+ <rapid-layout-item title="{{this.title}}">
11
+ <app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
12
12
  </rapid-layout-item>
13
13
  {{/ifEquals}}
14
14
  {{/each}}
@@ -16,13 +16,13 @@
16
16
  <rapid-layout-region type="vertical">
17
17
  {{#each route.tiles}}
18
18
  {{#ifEquals @index 2}}
19
- <rapid-layout-item title="{{../title}}">
20
- <app-{{kebabCase ../componentName}}></app-{{kebabCase ../componentName}}>
19
+ <rapid-layout-item title="{{this.title}}">
20
+ <app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
21
21
  </rapid-layout-item>
22
22
  {{/ifEquals}}
23
23
  {{#ifEquals @index 3}}
24
- <rapid-layout-item title="{{../title}}">
25
- <app-{{kebabCase ../componentName}}></app-{{kebabCase ../componentName}}>
24
+ <rapid-layout-item title="{{this.title}}">
25
+ <app-{{kebabCase this.componentName}}></app-{{kebabCase this.componentName}}>
26
26
  </rapid-layout-item>
27
27
  {{/ifEquals}}
28
28
  {{/each}}
@@ -2,13 +2,13 @@
2
2
  <rapid-layout-region type="vertical">
3
3
  {{#each route.tiles}}
4
4
  {{#ifEquals @index 0}}
5
- <rapid-layout-item title="{{../title}}">
6
- <{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
5
+ <rapid-layout-item title="{{this.title}}">
6
+ <{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
7
7
  </rapid-layout-item>
8
8
  {{/ifEquals}}
9
9
  {{#ifEquals @index 1}}
10
- <rapid-layout-item title="{{../title}}">
11
- <{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
10
+ <rapid-layout-item title="{{this.title}}">
11
+ <{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
12
12
  </rapid-layout-item>
13
13
  {{/ifEquals}}
14
14
  {{/each}}
@@ -16,13 +16,13 @@
16
16
  <rapid-layout-region type="vertical">
17
17
  {{#each route.tiles}}
18
18
  {{#ifEquals @index 2}}
19
- <rapid-layout-item title="{{../title}}">
20
- <{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
19
+ <rapid-layout-item title="{{this.title}}">
20
+ <{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
21
21
  </rapid-layout-item>
22
22
  {{/ifEquals}}
23
23
  {{#ifEquals @index 3}}
24
- <rapid-layout-item title="{{../title}}">
25
- <{{pascalCase ../componentName}}></{{pascalCase ../componentName}}>
24
+ <rapid-layout-item title="{{this.title}}">
25
+ <{{pascalCase this.componentName}}></{{pascalCase this.componentName}}>
26
26
  </rapid-layout-item>
27
27
  {{/ifEquals}}
28
28
  {{/each}}
@@ -2,13 +2,13 @@
2
2
  <rapid-layout-region type="vertical">
3
3
  {{#each route.tiles}}
4
4
  {{#ifEquals @index 0}}
5
- <rapid-layout-item title="{{../title}}">
6
- <{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
5
+ <rapid-layout-item title="{{this.title}}">
6
+ <{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
7
7
  </rapid-layout-item>
8
8
  {{/ifEquals}}
9
9
  {{#ifEquals @index 1}}
10
- <rapid-layout-item title="{{../title}}">
11
- <{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
10
+ <rapid-layout-item title="{{this.title}}">
11
+ <{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
12
12
  </rapid-layout-item>
13
13
  {{/ifEquals}}
14
14
  {{/each}}
@@ -16,13 +16,13 @@
16
16
  <rapid-layout-region type="vertical">
17
17
  {{#each route.tiles}}
18
18
  {{#ifEquals @index 2}}
19
- <rapid-layout-item title="{{../title}}">
20
- <{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
19
+ <rapid-layout-item title="{{this.title}}">
20
+ <{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
21
21
  </rapid-layout-item>
22
22
  {{/ifEquals}}
23
23
  {{#ifEquals @index 3}}
24
- <rapid-layout-item title="{{../title}}">
25
- <{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
24
+ <rapid-layout-item title="{{this.title}}">
25
+ <{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
26
26
  </rapid-layout-item>
27
27
  {{/ifEquals}}
28
28
  {{/each}}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.30.0-prerelease.37](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.36...v3.30.0-prerelease.37) (2024-11-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * references in grid layout template GENC-910 (#390) 64280fa
9
+
10
+ ## [3.30.0-prerelease.36](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.35...v3.30.0-prerelease.36) (2024-11-07)
11
+
12
+
13
+ ### Features
14
+
15
+ * support base path in react app GENC-892 (#381) 388a44d
16
+
3
17
  ## [3.30.0-prerelease.35](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.30.0-prerelease.34...v3.30.0-prerelease.35) (2024-11-06)
4
18
 
5
19
 
@@ -8,6 +8,6 @@
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
11
- <script src="/bundle.js"></script>
11
+ <script src="/bundle.js"/>
12
12
  </body>
13
13
  </html>
@@ -1,5 +1,6 @@
1
1
  import { useState, useEffect, ReactNode } from 'react';
2
2
  import { RouteObject } from 'react-router';
3
+ import { useNavigate } from 'react-router-dom';
3
4
  import isConnectedHelper from '@/helpers/isConnectedHelper';
4
5
  import isAuthenticatedHelper from '@/helpers/isAuthenticatedHelper';
5
6
  import hasPermissionHelper from '@/helpers/hasPermissionHelper';
@@ -30,13 +31,14 @@ const ProtectedGuard: React.FC<{ children: ReactNode }> = ({ children }: { child
30
31
  const isAuthenticated: boolean | null = null;
31
32
  const route = routes.find(({ path }) => path === location.pathname);
32
33
  const hasPermission = route?.data?.permissionCode ? hasPermissionHelper(route.data?.permissionCode) : true;
34
+ const navigate = useNavigate();
33
35
 
34
36
  useEffect(() => {
35
37
  isConnectedHelper().then((connectedState: boolean): void => {
36
38
  setIsConnected(connectedState);
37
39
  });
38
40
  }, []);
39
-
41
+
40
42
  useEffect((): void => {
41
43
  if (isConnected === null) {
42
44
  return;
@@ -51,10 +53,10 @@ const ProtectedGuard: React.FC<{ children: ReactNode }> = ({ children }: { child
51
53
  permissionState = PermissionState.UNKNOWN;
52
54
  } else if (hasPermission === false) {
53
55
  permissionState = PermissionState.DENIED;
54
- }
55
-
56
+ }
57
+
56
58
  if (permissionState) {
57
- window.location.href = `/${redirectUrlByPermissionState[permissionState]}`;
59
+ navigate(`/${redirectUrlByPermissionState[permissionState]}`);
58
60
  }
59
61
  }, [routes, isConnected, isAuthenticated, hasPermission]);
60
62
 
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.35",
4
+ "version": "3.30.0-prerelease.37",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"