@genesislcap/blank-app-seed 5.7.0-prerelease.3 → 5.7.0-prerelease.30

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 (81) 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 +16 -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 +24 -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 +229 -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 +1 -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 +16 -28
  47. package/client-tmp/react/public/index.html +3 -1
  48. package/client-tmp/react/src/App.tsx +12 -29
  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 +7 -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/share/foundation-login.ts +2 -2
  61. package/client-tmp/react/src/share/genesis-components.ts +12 -1
  62. package/client-tmp/react/src/store/RoutesContext.tsx +6 -6
  63. package/client-tmp/react/src/styles/design-tokens.json +1 -1
  64. package/client-tmp/react/src/styles/styles.css +15 -1
  65. package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +1 -1
  66. package/client-tmp/react/src/utils/goldenLayout.helper.ts +59 -0
  67. package/client-tmp/react/test/e2e/fixture.ts +1 -1
  68. package/client-tmp/web-components/package.json +4 -0
  69. package/client-tmp/web-components/src/components/components.ts +18 -9
  70. package/client-tmp/web-components/src/layouts/default.ts +12 -2
  71. package/client-tmp/web-components/src/main/main.css +12 -0
  72. package/client-tmp/web-components/src/main/main.template.ts +0 -1
  73. package/client-tmp/web-components/src/main/main.ts +1 -34
  74. package/client-tmp/web-components/src/styles/design-tokens.json +1 -1
  75. package/client-tmp/web-components/src/styles/typography.ts +6 -4
  76. package/package.json +1 -1
  77. package/client-tmp/angular/src/app/store/store.ts +0 -34
  78. package/client-tmp/react/lint-css.ts +0 -19
  79. package/client-tmp/react/src/services/store.service.ts +0 -48
  80. package/client-tmp/react/vite.config.ts +0 -70
  81. package/client-tmp/web-components/src/store/store.ts +0 -29
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode, useEffect, useRef } from 'react';
2
2
  import { configureDesignSystem } from '@genesislcap/foundation-ui';
3
3
  import styles from './BlankLayout.module.css';
4
- import * as designTokens from '@/styles/design-tokens.json';
4
+ import * as designTokens from '../../styles/design-tokens.json';
5
5
 
6
6
  interface BlankLayoutProps {
7
7
  children: ReactNode;
@@ -17,6 +17,14 @@
17
17
  border: none;
18
18
  }
19
19
 
20
+ .default-layout foundation-header::part(logo) {
21
+ max-width: 50px;
22
+ max-height: 24px;
23
+ width: auto;
24
+ height: auto;
25
+ object-fit: contain;
26
+ }
27
+
20
28
  .routes-wrapper {
21
29
  display: flex;
22
30
  gap: calc(var(--design-unit) * 2px);
@@ -6,10 +6,10 @@ import {
6
6
  StandardLuminance,
7
7
  } from '@microsoft/fast-components';
8
8
  import styles from './DefaultLayout.module.css';
9
- import PBCElementsRenderer from '@/pbc/elementsRenderer';
10
- import * as designTokens from '@/styles/design-tokens.json';
11
- import { useRoutesContext } from '@/store/RoutesContext';
12
- import { AUTH_PATH } from '@/config';
9
+ import PBCElementsRenderer from '../../pbc/elementsRenderer';
10
+ import * as designTokens from '../../styles/design-tokens.json';
11
+ import { useRoutesContext } from '../../store/RoutesContext';
12
+ import { AUTH_PATH } from '../../config';
13
13
  import { LOGOUT_URL } from '@genesislcap/foundation-utils';
14
14
 
15
15
  interface DefaultLayoutProps {}
@@ -57,6 +57,9 @@ const DefaultLayout: React.FC<DefaultLayoutProps> = () => {
57
57
  <rapid-design-system-provider ref={designSystemProviderRef} class={className}>
58
58
  <PBCElementsRenderer target={['layout-start']} />
59
59
  <foundation-header
60
+ {{#if headerLogoSrc}}
61
+ logo-src="{{headerLogoSrc}}"
62
+ {{/if}}
60
63
  onluminance-icon-clicked={onLuminanceToggle}
61
64
  logout={async () => {
62
65
  await fetch(LOGOUT_URL);
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import ReactDOM from 'react-dom/client'
3
3
  import App from './App.tsx'
4
4
 
5
- import { registerPBCs } from '@/pbc/utils';
5
+ import { registerPBCs } from './pbc/utils';
6
6
  import { createLogger } from '@genesislcap/foundation-logger';
7
7
 
8
8
  import './styles/styles.css'
@@ -1,6 +1,6 @@
1
1
  import React, {useEffect} from 'react';
2
2
  import './AuthPage.css';
3
- import { configureFoundationLogin } from "@/share/foundation-login.ts";
3
+ import { configureFoundationLogin } from '../../share/foundation-login.ts';
4
4
  import { useNavigate, useLocation } from 'react-router-dom';
5
5
 
6
6
  const AuthPage: React.FC = () => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ErrorMessage from '@/components/ErrorMessage/ErrorMessage';
2
+ import ErrorMessage from '../../components/ErrorMessage/ErrorMessage';
3
3
  import './NotFoundPage.css';
4
4
 
5
5
  const NotFoundPage: React.FC = () => {
@@ -1,7 +1,7 @@
1
1
  import { render, screen } from '@testing-library/react';
2
2
  import NotPermittedPage from './NotPermittedPage';
3
3
 
4
- jest.mock('@/components/ErrorMessage/ErrorMessage', () => {
4
+ jest.mock('../../components/ErrorMessage/ErrorMessage', () => {
5
5
  return jest.fn((props: { message: string }) => <h1 data-testid="error-message">{props.message}</h1>);
6
6
  });
7
7
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ErrorMessage from '@/components/ErrorMessage/ErrorMessage';
2
+ import ErrorMessage from '../../components/ErrorMessage/ErrorMessage';
3
3
  import './NotPermittedPage.css';
4
4
 
5
5
  const NotPermittedPage: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { deriveElementTag } from './utils';
3
- import { useRoutesContext } from '@/store/RoutesContext';
3
+ import { useRoutesContext } from '../store/RoutesContext';
4
4
  import { useLocation, RouteObject } from 'react-router-dom';
5
5
 
6
6
  type ExtendedRouteObject = RouteObject & {
@@ -1,6 +1,6 @@
1
1
  import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
2
- import { AUTH_PATH } from '@/config';
3
- import { environment } from "@/environments/environment.ts";
2
+ import { AUTH_PATH } from '../config';
3
+ import { environment } from '../environments/environment.ts';
4
4
  import { Connect } from '@genesislcap/foundation-comms';
5
5
  import { DI } from '@genesislcap/web-core';
6
6
  import type { NavigateFunction, Location as RouterLocation } from 'react-router-dom';
@@ -4,8 +4,9 @@ import { foundationLayoutComponents } from '@genesislcap/foundation-layout';
4
4
  import { getApp } from '@genesislcap/foundation-shell/app';
5
5
  import { g2plotChartsComponents } from '@genesislcap/g2plot-chart';
6
6
  import * as rapidDesignSystem from '@genesislcap/rapid-design-system';
7
- import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
7
+ import { rapidGridComponents, rapidGridPro, rapidGridProStyles } from '@genesislcap/rapid-grid-pro';
8
8
  import { FoundationRouter } from '@genesislcap/foundation-ui';
9
+ import { css } from "@genesislcap/web-core";
9
10
 
10
11
  /**
11
12
  * Ensure tree shaking doesn't remove these.
@@ -32,6 +33,16 @@ export async function registerComponents() {
32
33
  .provideDesignSystem()
33
34
  .register(
34
35
  rapidDesignSystem.baseComponents,
36
+ rapidGridPro({
37
+ styles: css`
38
+ ${rapidGridProStyles}
39
+ .ag-theme-genesis-rapid,
40
+ .ag-theme-genesis-rapid-dark,
41
+ .ag-theme-genesis-rapid-light {
42
+ --ag-selected-row-background-color: var(--accent-fill-rest);
43
+ }
44
+ `,
45
+ }),
35
46
  rapidGridComponents,
36
47
  g2plotChartsComponents,
37
48
  foundationLayoutComponents,
@@ -1,14 +1,14 @@
1
1
  import React, { createContext, useContext, ReactNode } from 'react';
2
2
  import { RouteObject, Navigate } from 'react-router-dom';
3
3
  import { getApp } from '@genesislcap/foundation-shell/app';
4
- import AuthPage from '@/pages/AuthPage/AuthPage';
5
- import NotFoundPage from '@/pages/NotFoundPage/NotFoundPage';
6
- import NotPermittedPage from '@/pages/NotPermittedPage/NotPermittedPage';
4
+ import AuthPage from '../pages/AuthPage/AuthPage';
5
+ import NotFoundPage from '../pages/NotFoundPage/NotFoundPage';
6
+ import NotPermittedPage from '../pages/NotPermittedPage/NotPermittedPage';
7
7
  {{#each routes}}
8
- import {{pascalCase this.name}} from '@/pages/{{pascalCase this.name}}/{{pascalCase this.name}}';
8
+ import {{pascalCase this.name}} from '../pages/{{pascalCase this.name}}/{{pascalCase this.name}}';
9
9
  {{/each}}
10
- import PBCContainer from '@/pbc/container';
11
- import { AUTH_PATH, NOT_PERMITTED_PATH } from '@/config';
10
+ import PBCContainer from '../pbc/container';
11
+ import { AUTH_PATH, NOT_PERMITTED_PATH } from '../config';
12
12
 
13
13
  const routes = [
14
14
  {
@@ -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
  },
@@ -1,11 +1,25 @@
1
+ {{#if fontData}}
2
+ {{#each fontData}}
3
+ @font-face {
4
+ font-family: "{{../fontFamily}}";
5
+ src: url("../public/fonts/{{filename}}") format("{{format}}");
6
+ font-weight: {{weight}};
7
+ font-style: normal;
8
+ font-display: swap;
9
+ }
10
+ {{/each}}
11
+ {{/if}}
12
+
13
+ {{#unless fontFamily}}
1
14
  @font-face {
2
15
  font-family: Segoe UI;
3
16
  font-weight: 300;
4
17
  src: local("Segoe UI Semilight"), local("Segoe UI");
5
18
  }
19
+ {{/unless}}
6
20
 
7
21
  * {
8
- font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
22
+ font-family: {{#if fontFamily}}"{{fontFamily}}", {{/if}}"Segoe UI", "Helvetica Neue", Arial, sans-serif;
9
23
  font-style: normal;
10
24
  font-weight: normal;
11
25
  }
@@ -1,4 +1,4 @@
1
- import { routeLayouts } from '@/config';
1
+ import { routeLayouts } from '../config';
2
2
 
3
3
  export const getLayoutNameByRoute = (route: string) => {
4
4
  return routeLayouts[route] || 'default';
@@ -0,0 +1,59 @@
1
+ const ERROR_PREFIX = 'Golden layout helper - ';
2
+
3
+ export const setComponentItemsMap = (
4
+ layoutNativeElement: any,
5
+ componentMapInstance: Map<string, any>,
6
+ ): (() => void) => {
7
+ if (!layoutNativeElement || !layoutNativeElement.layout) {
8
+ throw new Error(`${ERROR_PREFIX} - layout is not defined`);
9
+ }
10
+
11
+ const componentSetter = ({ _target: componentItem }: any) => {
12
+ componentMapInstance.set(componentItem.componentName, componentItem);
13
+ };
14
+
15
+ layoutNativeElement.layout.on('componentCreated', componentSetter);
16
+
17
+ return () => layoutNativeElement.layout.off('componentCreated', componentSetter);
18
+ };
19
+
20
+ const getElementRoot = (componentInstance: any): any => {
21
+ if (componentInstance) {
22
+ const { _element } = componentInstance;
23
+ return _element;
24
+ }
25
+
26
+ throw new Error(`${ERROR_PREFIX} - component instance is not defined`);
27
+ };
28
+
29
+ export const getElementsBySelectorFromComponent = (
30
+ componentInstance: any,
31
+ selectorValue: string,
32
+ ): any => {
33
+ const element = getElementRoot(componentInstance);
34
+ return element.querySelectorAll(`[data-selector=${selectorValue}]`);
35
+ };
36
+
37
+ export const getElementBySelectorFromComponent = (
38
+ componentInstance: any,
39
+ selector: string,
40
+ ): any => {
41
+ return getElementsBySelectorFromComponent(componentInstance, selector)[0];
42
+ };
43
+
44
+ export const getElementsByTagFromComponent = (
45
+ componentInstance: any,
46
+ tag: string,
47
+ ): any => {
48
+ const element = getElementRoot(componentInstance);
49
+ return element.getElementsByTagName(tag);
50
+ };
51
+
52
+ export const getElementByTagFromComponent = (
53
+ componentInstance: any,
54
+ tag: string,
55
+ ): any => {
56
+ return getElementsByTagFromComponent(componentInstance, tag)[0];
57
+ };
58
+
59
+
@@ -1,6 +1,6 @@
1
1
  import { base, Page } from '@genesislcap/foundation-testing/e2e';
2
2
  import { ProtectedPage } from './pages';
3
- import { PORT } from '@/playwright.config';
3
+ import { PORT } from '../../playwright.config';
4
4
 
5
5
  export type FixtureConfig = {
6
6
  API_HOST: string;
@@ -91,6 +91,7 @@
91
91
  "dependencies": {
92
92
  "@genesislcap/foundation-auth": "{{versions.UI}}",
93
93
  "@genesislcap/foundation-comms": "{{versions.UI}}",
94
+ "@genesislcap/foundation-criteria": "{{versions.UI}}",
94
95
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
95
96
  "@genesislcap/foundation-events": "{{versions.UI}}",
96
97
  {{#if FDC3.includeDependencies}}
@@ -103,6 +104,7 @@
103
104
  "@genesislcap/foundation-notifications": "{{versions.UI}}",
104
105
  "@genesislcap/foundation-shell": "{{versions.UI}}",
105
106
  "@genesislcap/foundation-store": "{{versions.UI}}",
107
+ "@genesislcap/foundation-redux": "{{versions.UI}}",
106
108
  "@genesislcap/foundation-ui": "{{versions.UI}}",
107
109
  "@genesislcap/foundation-utils": "{{versions.UI}}",
108
110
  "@genesislcap/foundation-user": "{{versions.UI}}",
@@ -122,6 +124,7 @@
122
124
  "@analytics/core": "0.12.17",
123
125
  "@genesislcap/foundation-auth": "{{versions.UI}}",
124
126
  "@genesislcap/foundation-comms": "{{versions.UI}}",
127
+ "@genesislcap/foundation-criteria": "{{versions.UI}}",
125
128
  "@genesislcap/foundation-entity-management": "{{versions.UI}}",
126
129
  "@genesislcap/foundation-events": "{{versions.UI}}",
127
130
  {{#if FDC3.includeDependencies}}
@@ -134,6 +137,7 @@
134
137
  "@genesislcap/foundation-notifications": "{{versions.UI}}",
135
138
  "@genesislcap/foundation-shell": "{{versions.UI}}",
136
139
  "@genesislcap/foundation-store": "{{versions.UI}}",
140
+ "@genesislcap/foundation-redux": "{{versions.UI}}",
137
141
  "@genesislcap/foundation-ui": "{{versions.UI}}",
138
142
  "@genesislcap/foundation-utils": "{{versions.UI}}",
139
143
  "@genesislcap/foundation-user": "{{versions.UI}}",
@@ -6,7 +6,8 @@ import { FoundationRouter } from '@genesislcap/foundation-ui';
6
6
  import * as zeroDesignSystem from '@genesislcap/foundation-zero';
7
7
  import { g2plotChartsComponents } from '@genesislcap/g2plot-chart';
8
8
  import * as rapidDesignSystem from '@genesislcap/rapid-design-system';
9
- import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
9
+ import { rapidGridComponents, rapidGridPro, rapidGridProStyles } from '@genesislcap/rapid-grid-pro';
10
+ import { css } from '@genesislcap/web-core';
10
11
  import { NotPermittedComponent } from './not-permitted-component';
11
12
 
12
13
  /**
@@ -31,14 +32,22 @@ export async function registerComponents() {
31
32
  designSystem: rapidDesignSystem,
32
33
  });
33
34
 
34
- rapidDesignSystem
35
- .provideDesignSystem()
36
- .register(
37
- rapidDesignSystem.baseComponents,
38
- rapidGridComponents,
39
- g2plotChartsComponents,
40
- foundationLayoutComponents,
41
- );
35
+ rapidDesignSystem.provideDesignSystem().register(
36
+ rapidDesignSystem.baseComponents,
37
+ rapidGridPro({
38
+ styles: css`
39
+ ${rapidGridProStyles}
40
+ .ag-theme-genesis-rapid,
41
+ .ag-theme-genesis-rapid-dark,
42
+ .ag-theme-genesis-rapid-light {
43
+ --ag-selected-row-background-color: var(--accent-fill-rest);
44
+ }
45
+ `,
46
+ }),
47
+ rapidGridComponents,
48
+ g2plotChartsComponents,
49
+ foundationLayoutComponents,
50
+ );
42
51
 
43
52
  configureHeader({
44
53
  templateOptions: {
@@ -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
  }
@@ -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
  },
@@ -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.3",
4
+ "version": "5.7.0-prerelease.30",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -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,48 +0,0 @@
1
-
2
- import { CustomEventMap } from '@genesislcap/foundation-events';
3
- import { getApp } from '@genesislcap/foundation-shell/app';
4
- import {
5
- AbstractStoreRoot,
6
- registerStore,
7
- StoreRoot,
8
- StoreRootEventDetailMap,
9
- } from '@genesislcap/foundation-store';
10
- import { DI } from '@genesislcap/web-core';
11
-
12
- interface Store extends StoreRoot {}
13
- type StoreEventDetailMap = StoreRootEventDetailMap & Record<string, never>;
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
- const Store = registerStore(DefaultStore, 'Store');
31
-
32
- class StoreService {
33
- private store: any;
34
-
35
- constructor() {
36
- this.store = DI.getOrCreateDOMContainer().get(Store) as Store;
37
- }
38
-
39
- getStore() {
40
- return this.store;
41
- }
42
-
43
- onConnected(event?: CustomEvent) {
44
- this.store.onConnected(event);
45
- }
46
- }
47
-
48
- export const storeService = new StoreService();