@genesislcap/blank-app-seed 5.22.1 → 5.23.0
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/configure.js +11 -1
- package/.genx/package.json +1 -1
- package/.genx/scripts/generate-test-apps.sh +124 -0
- package/.genx/templates/angular/chart.hbs +19 -7
- package/.genx/templates/angular/component/component.column.defs.hbs +16 -4
- package/.genx/templates/angular/component/component.create.form.hbs +10 -2
- package/.genx/templates/angular/component/component.events.config.hbs +31 -6
- package/.genx/templates/angular/component/component.filter.form.hbs +1 -2
- package/.genx/templates/angular/component/component.gridOptions.hbs +15 -3
- package/.genx/templates/angular/component/component.hbs +77 -46
- package/.genx/templates/angular/component/component.index.hbs +1 -1
- package/.genx/templates/angular/component/component.update.form.hbs +1 -1
- package/.genx/templates/angular/entityManager.hbs +6 -6
- package/{client-tmp/angular/src/app/utils/fdc3.ts → .genx/templates/angular/fdc3.ts.hbs} +6 -8
- package/.genx/templates/angular/form.hbs +9 -12
- package/.genx/templates/angular/grid.hbs +43 -40
- package/.genx/templates/angular/route.hbs +8 -2
- package/.genx/templates/angular/route.template.hbs +7 -7
- package/.genx/templates/angular/slices/eventing.slice.hbs +21 -10
- package/.genx/templates/angular/store.hbs +1 -5
- package/.genx/templates/angular/tabsPanel.hbs +2 -2
- package/.genx/templates/react/chart.hbs +6 -15
- package/.genx/templates/react/component/component.column.defs.hbs +16 -10
- package/.genx/templates/react/component/component.create.form.hbs +2 -2
- package/.genx/templates/react/component/component.events.config.hbs +32 -5
- package/.genx/templates/react/component/component.filter.form.hbs +1 -2
- package/.genx/templates/react/component/component.gridOptions.hbs +17 -11
- package/.genx/templates/react/component/component.hbs +84 -42
- package/.genx/templates/react/component/component.update.form.hbs +1 -1
- package/.genx/templates/react/entityManager.hbs +8 -16
- package/{client-tmp/react/src/utils/fdc3.ts → .genx/templates/react/fdc3.ts.hbs} +7 -8
- package/.genx/templates/react/form.hbs +1 -15
- package/.genx/templates/react/grid.hbs +11 -11
- package/.genx/templates/react/gridLayout.hbs +44 -4
- package/.genx/templates/react/horizontalLayout.hbs +10 -1
- package/.genx/templates/react/route.hbs +21 -14
- package/.genx/templates/react/slices/eventing.slice.hbs +19 -8
- package/.genx/templates/react/store.hbs +1 -5
- package/.genx/templates/react/tabsLayout.hbs +5 -1
- package/.genx/templates/web-components/chart.hbs +25 -25
- package/.genx/templates/web-components/component/component.column.defs.hbs +11 -3
- package/.genx/templates/web-components/component/component.create.form.hbs +11 -4
- package/.genx/templates/web-components/component/component.events.config.hbs +33 -6
- package/.genx/templates/web-components/component/component.filter.form.hbs +1 -2
- package/.genx/templates/web-components/component/component.gridOptions.hbs +12 -3
- package/.genx/templates/web-components/component/component.hbs +19 -20
- package/.genx/templates/web-components/component/component.index.hbs +1 -1
- package/.genx/templates/web-components/component/component.template.hbs +9 -13
- package/.genx/templates/web-components/component/component.update.form.hbs +1 -1
- package/.genx/templates/web-components/entityManager.hbs +92 -73
- package/{client-tmp/web-components/src/utils/fdc3.ts → .genx/templates/web-components/fdc3.ts.hbs} +6 -7
- package/.genx/templates/web-components/form.hbs +16 -15
- package/.genx/templates/web-components/grid.hbs +49 -41
- package/.genx/templates/web-components/gridLayout.hbs +32 -28
- package/.genx/templates/web-components/horizontalLayout.hbs +5 -5
- package/.genx/templates/web-components/route.template.hbs +4 -6
- package/.genx/templates/web-components/slices/eventing.slice.hbs +23 -15
- package/.genx/templates/web-components/store.hbs +1 -9
- package/.genx/templates/web-components/tabsLayout.hbs +5 -5
- package/.genx/tests/fixtures/routes-full.json +299 -0
- package/.genx/tests/fixtures/testapp/client/src/pages/Home/Home.tsx +12 -0
- package/.genx/utils/formatJSONValue.js +38 -2
- package/.genx/utils/formatRouteData.js +67 -18
- package/.genx/utils/generateTile.js +10 -1
- package/.genx/utils/gridSerializers.js +63 -23
- package/.genx/utils/registerPartials.js +15 -12
- package/.genx/utils/toJsStringLiteral.js +37 -0
- package/.github/workflows/build.yml +22 -1
- package/.github/workflows/release.yaml +96 -0
- package/.husky/pre-commit +8 -0
- package/.releaserc +1 -1
- package/CHANGELOG.md +23 -0
- package/client-tmp/angular/.oxfmtrc.json +32 -0
- package/client-tmp/angular/.oxlintrc.json +4 -0
- package/client-tmp/angular/README.md +4 -4
- package/client-tmp/angular/jest.config.js +1 -1
- package/client-tmp/angular/lint-css.js +24 -3
- package/client-tmp/angular/oxlint-staged.js +45 -0
- package/client-tmp/angular/package.json +19 -9
- package/client-tmp/angular/playwright.config.ts +12 -11
- package/client-tmp/angular/src/app/app.component.html +0 -1
- package/client-tmp/angular/src/app/app.component.ts +8 -9
- package/client-tmp/angular/src/app/app.config.ts +2 -2
- package/client-tmp/angular/src/app/app.module.ts +6 -5
- package/client-tmp/angular/src/app/components/error-message/error-message.component.html +29 -15
- package/client-tmp/angular/src/app/components/error-message/error-message.component.spec.ts +2 -2
- package/client-tmp/angular/src/app/components/error-message/error-message.component.ts +3 -5
- package/client-tmp/angular/src/app/directive/app-lazy-load.directive.ts +1 -0
- package/client-tmp/angular/src/app/guards/chained.guard.ts +19 -19
- package/client-tmp/angular/src/app/guards/connection.guard.ts +12 -12
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.spec.ts +1 -1
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.ts +1 -5
- package/client-tmp/angular/src/app/layouts/default/default.layout.html +3 -4
- package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +4 -4
- package/client-tmp/angular/src/app/layouts/default/default.layout.ts +1 -1
- package/client-tmp/angular/src/app/pages/auth-login/auth-login.component.ts +1 -2
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.html +3 -3
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.scss +1 -1
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.spec.ts +5 -5
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.ts +3 -4
- package/client-tmp/angular/src/app/services/route.service.ts +79 -74
- package/client-tmp/angular/src/app/share/foundation-auth.ts +7 -1
- package/client-tmp/angular/src/app/share/genesis-components.ts +66 -68
- package/client-tmp/angular/src/app/utils/index.ts +3 -1
- package/client-tmp/angular/src/app/utils/permissions.ts +7 -7
- package/client-tmp/angular/src/declaration.d.ts +1 -1
- package/client-tmp/angular/src/environments/environment.ts +1 -1
- package/client-tmp/angular/src/jest.setup.ts +8 -0
- package/client-tmp/angular/src/main.ts +2 -2
- package/client-tmp/angular/src/pbc/container.ts +28 -26
- package/client-tmp/angular/src/pbc/elementsRenderer.ts +49 -39
- package/client-tmp/angular/src/pbc/utils.ts +61 -60
- package/client-tmp/angular/src/styles/_mixins.scss +7 -8
- package/client-tmp/angular/src/styles/styles.css +6 -6
- package/client-tmp/angular/test/e2e/fixture.ts +2 -2
- package/client-tmp/angular/test/e2e/flows/001-protected.e2e.ts +1 -1
- package/client-tmp/angular/tsconfig.app.json +2 -8
- package/client-tmp/angular/tsconfig.json +1 -4
- package/client-tmp/angular/tsconfig.spec.json +4 -11
- package/client-tmp/angular/webpack.dev.config.js +3 -4
- package/client-tmp/angular/webpack.prod.config.js +3 -4
- package/client-tmp/angular/webpack.shared.config.js +20 -24
- package/client-tmp/react/.oxfmtrc.json +30 -0
- package/client-tmp/react/.oxlintrc.json +4 -0
- package/client-tmp/react/README.md +4 -4
- package/client-tmp/react/jest.config.ts +8 -4
- package/client-tmp/react/jest.setup.ts +85 -1
- package/client-tmp/react/oxlint-staged.js +45 -0
- package/client-tmp/react/package.json +24 -9
- package/client-tmp/react/playwright.config.ts +11 -10
- package/client-tmp/react/src/App.tsx +27 -29
- package/client-tmp/react/src/__mocks__/fileMock.js +1 -0
- package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.test.tsx +16 -4
- package/client-tmp/react/src/components/ErrorMessage/ErrorMessage.tsx +32 -29
- package/client-tmp/react/src/components/error-boundary/ErrorBoundary.tsx +15 -6
- package/client-tmp/react/src/components/routes/AppRoutes.tsx +1 -1
- package/client-tmp/react/src/components/single-component/registry.ts +4 -0
- package/client-tmp/react/src/custom-elements.d.ts +4 -2
- package/client-tmp/react/src/helpers/hasPermissionHelper.tsx +1 -1
- package/client-tmp/react/src/helpers/isAuthenticatedHelper.tsx +1 -1
- package/client-tmp/react/src/helpers/isConnectedHelper.tsx +3 -3
- package/client-tmp/react/src/layouts/blank/BlankLayout.tsx +7 -11
- package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +8 -8
- package/client-tmp/react/src/main.tsx +11 -11
- package/client-tmp/react/src/pages/AuthPage/AuthPage.test.tsx +13 -2
- package/client-tmp/react/src/pages/AuthPage/AuthPage.tsx +14 -13
- package/client-tmp/react/src/pages/NotFoundPage/NotFoundPage.tsx +2 -7
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.test.tsx +8 -4
- package/client-tmp/react/src/pages/NotPermittedPage/NotPermittedPage.tsx +1 -1
- package/client-tmp/react/src/pbc/container.tsx +9 -4
- package/client-tmp/react/src/pbc/elementsRenderer.tsx +13 -7
- package/client-tmp/react/src/pbc/utils.ts +60 -59
- package/client-tmp/react/src/services/auth.service.ts +1 -1
- package/client-tmp/react/src/services/store.service.ts +5 -3
- package/client-tmp/react/src/share/foundation-login.ts +2 -2
- package/client-tmp/react/src/share/genesis-components.ts +46 -47
- package/client-tmp/react/src/store/AuthContext.tsx +2 -10
- package/client-tmp/react/src/store/RoutesContext.test.tsx +99 -0
- package/client-tmp/react/src/store/RoutesContext.tsx +25 -5
- package/client-tmp/react/src/styles/styles.css +7 -7
- package/client-tmp/react/src/types/LayoutName.ts +1 -1
- package/client-tmp/react/src/utils/getLayoutNameByRoute.ts +1 -1
- package/client-tmp/react/src/utils/index.ts +2 -0
- package/client-tmp/react/src/utils/layout.ts +8 -1
- package/client-tmp/react/src/utils/permissions.ts +7 -7
- package/client-tmp/react/src/utils/useDocumentTitle.ts +5 -6
- package/client-tmp/react/test/e2e/fixture.ts +5 -2
- package/client-tmp/react/test/e2e/flows/001-protected.e2e.ts +3 -1
- package/client-tmp/react/tsconfig.app.json +1 -1
- package/client-tmp/react/tsconfig.json +1 -5
- package/client-tmp/web-components/.oxfmtrc.json +30 -0
- package/client-tmp/web-components/.oxlintrc.json +4 -0
- package/client-tmp/web-components/oxlint-staged.js +45 -0
- package/client-tmp/web-components/package.json +14 -22
- package/client-tmp/web-components/src/components/components.ts +9 -7
- package/client-tmp/web-components/src/main/main.css +1 -2
- package/client-tmp/web-components/src/main/main.ts +1 -1
- package/client-tmp/web-components/src/routes/config.ts +4 -0
- package/client-tmp/web-components/src/utils/index.ts +2 -0
- package/client-tmp/web-components/tsconfig.json +1 -4
- package/package.json +1 -1
- package/.genx/templates/angular/gridLayout.hbs +0 -30
- package/.genx/templates/angular/horizontalLayout.hbs +0 -7
- package/.genx/templates/angular/tabsLayout.hbs +0 -7
- package/.genx/tests/fixtures/testapp/client/src/routes/home/home.template.ts +0 -6
- package/.github/workflows/release.yml +0 -50
- package/client-tmp/react/.babelrc +0 -10
- package/client-tmp/react/.eslintrc.cjs +0 -21
- package/client-tmp/react/git +0 -0
- package/client-tmp/react/webpack.config.js +0 -121
- package/client-tmp/web-components/.prettierignore +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './{{kebabCase tile.title}}';
|
|
1
|
+
export * from './{{kebabCase tile.title}}';
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import { html, whenElse, repeat } from '@genesislcap/web-core';
|
|
1
|
+
import { html, whenElse{{#ifEquals tile.componentType "grid"}}{{#if tile.config.gridOptions}}, repeat{{/if}}{{/ifEquals}} } from '@genesislcap/web-core';
|
|
2
2
|
import { getViewUpdateRightComponent } from '../../../utils';
|
|
3
3
|
import type { {{pascalCase tile.componentName}} } from './{{kebabCase tile.title}}';
|
|
4
|
-
{{#
|
|
4
|
+
{{#ifAny tile.config.createFormUiSchema tile.config.uischema}}
|
|
5
5
|
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
6
|
-
{{/
|
|
7
|
-
{{#if tile.config.
|
|
8
|
-
import {
|
|
9
|
-
{{/if}}
|
|
10
|
-
{{#if tile.config.updateFormUiSchema}}
|
|
11
|
-
import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
|
|
6
|
+
{{/ifAny}}
|
|
7
|
+
{{#if tile.config.customEvents}}
|
|
8
|
+
import { customActions } from './{{kebabCase tile.title}}.events.config';
|
|
12
9
|
{{/if}}
|
|
13
10
|
{{#if tile.config.filterFormUiSchema}}
|
|
14
11
|
import { filterFormSchema } from './{{kebabCase tile.title}}.filter.form.schema';
|
|
15
12
|
{{/if}}
|
|
16
|
-
{{#if tile.config.customEvents}}
|
|
17
|
-
import { customActions } from './{{kebabCase tile.title}}.events.config';
|
|
18
|
-
{{/if}}
|
|
19
13
|
{{#if tile.config.gridOptions}}
|
|
20
14
|
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
21
15
|
{{/if}}
|
|
22
|
-
|
|
16
|
+
{{#if tile.config.updateFormUiSchema}}
|
|
17
|
+
import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
|
|
18
|
+
{{/if}}
|
|
23
19
|
|
|
24
20
|
export const {{pascalCase tile.title}}Template = html<{{pascalCase tile.componentName}}>`
|
|
25
|
-
|
|
21
|
+
{{> (lookup tile 'type') tile}}
|
|
26
22
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UiSchema } from '@genesislcap/foundation-forms';
|
|
2
2
|
|
|
3
3
|
{{#if tile.config.updateFormUiSchema}}
|
|
4
|
-
export const updateFormSchema: UiSchema = {{{ tile.config.updateFormUiSchema }}}
|
|
4
|
+
export const updateFormSchema: UiSchema = {{{ tile.config.updateFormUiSchema }}};
|
|
5
5
|
{{/if}}
|
|
@@ -1,75 +1,94 @@
|
|
|
1
1
|
${whenElse(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html<{{pascalCase componentName}}>`
|
|
4
|
+
<entity-management
|
|
5
|
+
design-system-prefix="rapid"
|
|
6
|
+
header-case-type="capitalCase"
|
|
7
|
+
enable-row-flashing
|
|
8
|
+
enable-cell-flashing
|
|
9
|
+
{{#if config.title}}
|
|
10
|
+
title="{{ config.title }}"
|
|
11
|
+
{{/if}}
|
|
12
|
+
resourceName="{{ config.resourceName }}"
|
|
13
|
+
{{#if config.createEvent}}
|
|
14
|
+
{{#if config.permissions.updateRight}}
|
|
15
|
+
createEvent="${(x) =>
|
|
16
|
+
getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.createEvent }}')}"
|
|
17
|
+
{{else}}
|
|
18
|
+
createEvent="{{ config.createEvent }}"
|
|
19
|
+
{{/if}}
|
|
20
|
+
{{#if config.createFormUiSchema}}
|
|
21
|
+
:createFormUiSchema=${() => createFormSchema}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#if config.updateEvent}}
|
|
25
|
+
{{#if config.permissions.updateRight}}
|
|
26
|
+
updateEvent="${(x) =>
|
|
27
|
+
getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.updateEvent }}')}"
|
|
28
|
+
{{else}}
|
|
29
|
+
updateEvent="{{ config.updateEvent }}"
|
|
30
|
+
{{/if}}
|
|
31
|
+
{{#if config.updateFormUiSchema}}
|
|
32
|
+
:updateFormUiSchema=${() => updateFormSchema}
|
|
33
|
+
{{/if}}
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{#if config.deleteEvent}}
|
|
36
|
+
{{#if config.permissions.updateRight}}
|
|
37
|
+
deleteEvent="${(x) =>
|
|
38
|
+
getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.deleteEvent }}')}"
|
|
39
|
+
{{else}}
|
|
40
|
+
deleteEvent="{{ config.deleteEvent }}"
|
|
41
|
+
{{/if}}
|
|
42
|
+
{{/if}}
|
|
43
|
+
{{#ifAny config.gridOptions config.eventing.publishEventName}}
|
|
44
|
+
:gridOptions=${(x) => ({
|
|
45
|
+
{{#if config.gridOptions}}
|
|
46
|
+
...gridOptions,
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{#if config.eventing.publishEventName}}
|
|
49
|
+
onSelectionChanged: x.handleRowSelection,
|
|
50
|
+
{{/if}}
|
|
51
|
+
})}
|
|
52
|
+
{{/ifAny}}
|
|
53
|
+
{{#ifAny config.reqrep config.eventing.listener}}
|
|
54
|
+
:datasourceConfig=${(x) => ({
|
|
55
|
+
{{#if config.reqrep}}
|
|
56
|
+
pollingInterval: 5000,
|
|
57
|
+
requestAutoSetup: false,
|
|
58
|
+
{{/if}}
|
|
59
|
+
{{#if config.eventing.listener}}
|
|
60
|
+
criteria: x.getCriteria(),
|
|
61
|
+
{{/if}}
|
|
62
|
+
})}
|
|
63
|
+
{{/ifAny}}
|
|
64
|
+
{{#if config.entityName}}
|
|
65
|
+
entityLabel="{{ config.entityName }}"
|
|
66
|
+
{{/if}}
|
|
67
|
+
{{#if config.columns}}
|
|
68
|
+
:columns=${(x) => x.columns}
|
|
69
|
+
{{/if}}
|
|
70
|
+
{{#if config.modalPosition}}
|
|
71
|
+
modal-position="{{ config.modalPosition }}"
|
|
72
|
+
{{/if}}
|
|
73
|
+
{{#if config.sizeColumnsToFit}}
|
|
74
|
+
size-columns-to-fit
|
|
75
|
+
size-columns-to-content
|
|
76
|
+
{{/if}}
|
|
77
|
+
{{#if config.enableSearchBar}}
|
|
78
|
+
enable-search-bar
|
|
79
|
+
{{/if}}
|
|
80
|
+
{{#if config.enableFilters}}
|
|
81
|
+
enable-filters
|
|
82
|
+
{{#if config.filterFormUiSchema}}
|
|
83
|
+
:filtersUiSchema=${() => filterFormSchema}
|
|
84
|
+
{{/if}}
|
|
85
|
+
{{/if}}
|
|
86
|
+
{{#if config.customEvents}}
|
|
87
|
+
:customActions=${() => customActions}
|
|
88
|
+
{{/if}}
|
|
89
|
+
></entity-management>
|
|
90
|
+
`,
|
|
91
|
+
html`
|
|
92
|
+
<not-permitted-component></not-permitted-component>
|
|
93
|
+
`,
|
|
75
94
|
)}
|
package/{client-tmp/web-components/src/utils/fdc3.ts → .genx/templates/web-components/fdc3.ts.hbs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{{#if FDC3.includeDependencies}}
|
|
2
1
|
import { DefaultFDC3 } from '@genesislcap/foundation-fdc3';
|
|
3
|
-
|
|
2
|
+
|
|
4
3
|
export const isFDC3 = (): boolean => !!(window as any).fdc3;
|
|
5
|
-
{{#if FDC3.includeDependencies}}
|
|
6
4
|
const fdc3Service = new DefaultFDC3();
|
|
7
5
|
|
|
8
6
|
export const onFDC3Ready = async (FDC3ReadyCb: () => any): Promise<void> => {
|
|
9
|
-
isFDC3()
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
if (isFDC3()) {
|
|
8
|
+
await FDC3ReadyCb();
|
|
9
|
+
} else {
|
|
10
|
+
window.addEventListener('fdc3Ready', async () => {
|
|
12
11
|
await FDC3ReadyCb();
|
|
13
12
|
});
|
|
13
|
+
}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const listenToChannel = async (
|
|
@@ -28,4 +28,3 @@ export const sendEventOnChannel = (channelName: string, type: string) => {
|
|
|
28
28
|
await fdc3Service.broadcastOnChannel(channelName, type, payload);
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
{{/if}}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
${whenElse(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
{{#if config.uischema}}
|
|
5
|
+
<foundation-form
|
|
6
|
+
design-system-prefix="rapid"
|
|
7
|
+
resourceName="{{config.resourceName}}"
|
|
8
|
+
:uischema=${() => createFormSchema}
|
|
9
|
+
></foundation-form>
|
|
10
|
+
{{else}}
|
|
11
|
+
<foundation-form design-system-prefix="rapid" resourceName="{{config.resourceName}}"></foundation-form>
|
|
12
|
+
{{/if}}
|
|
13
|
+
`,
|
|
14
|
+
html`
|
|
15
|
+
<not-permitted-component></not-permitted-component>
|
|
16
|
+
`,
|
|
17
|
+
)}
|
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
${whenElse(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
{{#if config.useOnlyTemplateCols}}
|
|
5
|
+
<rapid-grid-pro
|
|
6
|
+
header-case-type="capitalCase"
|
|
7
|
+
only-template-col-defs
|
|
8
|
+
enable-row-flashing
|
|
9
|
+
enable-cell-flashing
|
|
10
|
+
>
|
|
11
|
+
{{else}}
|
|
12
|
+
<rapid-grid-pro header-case-type="capitalCase" enable-row-flashing enable-cell-flashing>
|
|
13
|
+
{{/if}}
|
|
14
|
+
{{#ifAny config.reqrep config.eventing.listener config.gridOptions config.eventing.publishEventName}}
|
|
15
|
+
<grid-pro-genesis-datasource
|
|
16
|
+
resource-name="{{config.resourceName}}"
|
|
17
|
+
{{#if config.reqrep}}
|
|
18
|
+
request-auto-setup="false"
|
|
19
|
+
polling-interval="5000"
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#if config.eventing.listener}}
|
|
22
|
+
criteria=${(x) => x.getCriteria()}
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#ifAny config.gridOptions config.eventing.publishEventName}}
|
|
25
|
+
:deferredGridOptions=${(x) => ({
|
|
26
|
+
{{#if config.gridOptions}}
|
|
27
|
+
onRowClicked: gridOptions?.onRowClicked,
|
|
15
28
|
{{/if}}
|
|
16
|
-
{{#if config.eventing.
|
|
17
|
-
|
|
29
|
+
{{#if config.eventing.publishEventName}}
|
|
30
|
+
onSelectionChanged: x.handleRowSelection,
|
|
31
|
+
rowSelection: 'single',
|
|
18
32
|
{{/if}}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</rapid-grid-pro>
|
|
40
|
-
`,
|
|
41
|
-
html`
|
|
42
|
-
<not-permitted-component></not-permitted-component>
|
|
43
|
-
`,
|
|
44
|
-
)}
|
|
33
|
+
})}
|
|
34
|
+
{{/ifAny}}
|
|
35
|
+
></grid-pro-genesis-datasource>
|
|
36
|
+
{{else}}
|
|
37
|
+
<grid-pro-genesis-datasource resource-name="{{config.resourceName}}"></grid-pro-genesis-datasource>
|
|
38
|
+
{{/ifAny}}
|
|
39
|
+
{{#if config.gridOptions}}
|
|
40
|
+
${repeat(
|
|
41
|
+
(x) => gridOptions?.columnDefs,
|
|
42
|
+
html`
|
|
43
|
+
<grid-pro-column :definition=${(x) => x}></grid-pro-column>
|
|
44
|
+
`,
|
|
45
|
+
)}
|
|
46
|
+
{{/if}}
|
|
47
|
+
</rapid-grid-pro>
|
|
48
|
+
`,
|
|
49
|
+
html`
|
|
50
|
+
<not-permitted-component></not-permitted-component>
|
|
51
|
+
`,
|
|
52
|
+
)}
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
<rapid-layout-region type="horizontal">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{{/
|
|
29
|
-
|
|
2
|
+
<rapid-layout-region type="vertical">
|
|
3
|
+
{{#each route.tiles}}
|
|
4
|
+
{{#ifEquals @index 0}}
|
|
5
|
+
<rapid-layout-item title="{{this.title}}">
|
|
6
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
7
|
+
</rapid-layout-item>
|
|
8
|
+
{{/ifEquals}}
|
|
9
|
+
{{#ifEquals @index 1}}
|
|
10
|
+
<rapid-layout-item title="{{this.title}}">
|
|
11
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
12
|
+
</rapid-layout-item>
|
|
13
|
+
{{/ifEquals}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
</rapid-layout-region>
|
|
16
|
+
{{#if route.tiles.[2]}}
|
|
17
|
+
<rapid-layout-region type="vertical">
|
|
18
|
+
{{#each route.tiles}}
|
|
19
|
+
{{#ifEquals @index 2}}
|
|
20
|
+
<rapid-layout-item title="{{this.title}}">
|
|
21
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
22
|
+
</rapid-layout-item>
|
|
23
|
+
{{/ifEquals}}
|
|
24
|
+
{{#ifEquals @index 3}}
|
|
25
|
+
<rapid-layout-item title="{{this.title}}">
|
|
26
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
27
|
+
</rapid-layout-item>
|
|
28
|
+
{{/ifEquals}}
|
|
29
|
+
{{/each}}
|
|
30
|
+
</rapid-layout-region>
|
|
31
|
+
{{else}}
|
|
32
|
+
<rapid-layout-region type="vertical"></rapid-layout-region>
|
|
33
|
+
{{/if}}
|
|
30
34
|
</rapid-layout-region>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<rapid-layout-region>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
<rapid-layout-item title="{{this.title}}">
|
|
4
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
5
|
+
</rapid-layout-item>
|
|
6
|
+
{{/each}}
|
|
7
7
|
</rapid-layout-region>
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { html } from '@genesislcap/web-core';
|
|
2
|
+
{{#if route.tiles}}
|
|
2
3
|
import { persistLayout } from '../../utils';
|
|
4
|
+
{{/if}}
|
|
3
5
|
import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
|
|
4
6
|
{{#each route.tiles}}
|
|
5
|
-
import
|
|
6
|
-
{{/each}}
|
|
7
|
-
|
|
8
|
-
{{#each route.tiles}}
|
|
9
|
-
{{pascalCase this.componentName}};
|
|
7
|
+
import './{{kebabCase this.title}}-{{this.componentType}}';
|
|
10
8
|
{{/each}}
|
|
11
9
|
|
|
12
10
|
export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
|
|
13
11
|
{{#if route.tiles}}
|
|
14
12
|
<rapid-layout auto-save-key="${() => persistLayout('{{route.layoutKey}}')}">
|
|
15
|
-
|
|
13
|
+
{{> (lookup ./route 'layoutType') }}
|
|
16
14
|
</rapid-layout>
|
|
17
15
|
{{else}}
|
|
18
16
|
<!-- insert template code here -->
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
+
{{#if listeners.length}}
|
|
1
2
|
import { CriteriaBuilder, ExpressionBuilder, Serialisers } from '@genesislcap/foundation-criteria';
|
|
3
|
+
{{/if}}
|
|
2
4
|
import { createSlice } from '@genesislcap/foundation-redux';
|
|
3
5
|
|
|
4
6
|
export const eventingSlice = createSlice({
|
|
5
7
|
name: 'eventing',
|
|
6
|
-
|
|
7
|
-
initialState: {
|
|
8
|
+
{{#if events.length}}
|
|
9
|
+
initialState: {
|
|
8
10
|
{{#each events}}
|
|
9
|
-
{{this}}: null
|
|
10
|
-
{{/each}}
|
|
11
|
+
{{this}}: null as Record<string, any> | null,
|
|
12
|
+
{{/each}}
|
|
13
|
+
},
|
|
11
14
|
reducers: {
|
|
12
15
|
{{#each events}}
|
|
13
16
|
publish{{pascalCase this}}: (state, action) => {
|
|
14
17
|
state.{{this}} = action.payload;
|
|
15
|
-
}
|
|
18
|
+
},
|
|
16
19
|
{{/each}}
|
|
17
20
|
},
|
|
21
|
+
{{else}}
|
|
22
|
+
initialState: {},
|
|
23
|
+
reducers: {},
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{#if listeners.length}}
|
|
18
26
|
selectors: {
|
|
19
27
|
{{#each listeners}}
|
|
20
28
|
getCriteriaFor{{pascalCase tileName}}: (state) => {
|
|
@@ -24,21 +32,21 @@ export const eventingSlice = createSlice({
|
|
|
24
32
|
|
|
25
33
|
{{#each mappings}}
|
|
26
34
|
if (data.{{sourceField}}) {
|
|
27
|
-
criteriaBuilder.And(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
criteriaBuilder.And(
|
|
36
|
+
new ExpressionBuilder()
|
|
37
|
+
.withField('{{targetField}}')
|
|
38
|
+
.withValue(data.{{sourceField}})
|
|
39
|
+
.withSerialiser(Serialisers.EQ)
|
|
40
|
+
.build(),
|
|
41
|
+
);
|
|
32
42
|
}
|
|
33
43
|
{{/each}}
|
|
34
44
|
|
|
35
45
|
return criteriaBuilder.build();
|
|
36
|
-
}
|
|
46
|
+
},
|
|
37
47
|
{{/each}}
|
|
38
48
|
},
|
|
39
|
-
|
|
40
|
-
initialState: {},
|
|
41
|
-
reducers: {},
|
|
49
|
+
{{else}}
|
|
42
50
|
selectors: {},
|
|
43
|
-
|
|
51
|
+
{{/if}}
|
|
44
52
|
});
|
|
@@ -2,15 +2,7 @@ import { createStore } from '@genesislcap/foundation-redux';
|
|
|
2
2
|
import { eventingSlice } from './slices/eventing.slice';
|
|
3
3
|
|
|
4
4
|
export const { store, actions, selectors } = createStore([eventingSlice], {
|
|
5
|
-
|
|
6
|
-
eventing: {
|
|
7
|
-
{{#each events}}
|
|
8
|
-
{{this}}: null{{#unless @last}},{{/unless}}
|
|
9
|
-
{{/each}}
|
|
10
|
-
},
|
|
11
|
-
{{else}}
|
|
12
|
-
eventing: {},
|
|
13
|
-
{{/if}}
|
|
5
|
+
eventing: eventingSlice.getInitialState(),
|
|
14
6
|
});
|
|
15
7
|
|
|
16
8
|
export type Store = typeof store;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<rapid-layout-region type="tabs">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
{{#each route.tiles}}
|
|
3
|
+
<rapid-layout-item title="{{this.title}}">
|
|
4
|
+
<{{kebabCase this.componentName}}></{{kebabCase this.componentName}}>
|
|
5
|
+
</rapid-layout-item>
|
|
6
|
+
{{/each}}
|
|
7
7
|
</rapid-layout-region>
|