@genesislcap/blank-app-seed 3.20.5 → 3.22.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/package.json +1 -1
- package/.genx/static.js +8 -0
- package/.genx/templates/angular/chart.hbs +21 -9
- package/.genx/templates/angular/entityManager.hbs +57 -45
- package/.genx/templates/angular/form.hbs +21 -8
- package/.genx/templates/angular/grid.hbs +30 -18
- package/.genx/templates/angular/route.hbs +8 -5
- package/.genx/templates/web-components/component/component.column.defs.hbs +6 -0
- package/.genx/templates/web-components/component/component.create.form.hbs +8 -0
- package/.genx/templates/web-components/component/component.gridOptions.hbs +6 -0
- package/.genx/templates/web-components/component/component.hbs +13 -0
- package/.genx/templates/web-components/component/component.index.hbs +1 -0
- package/.genx/templates/web-components/component/component.styles.hbs +7 -0
- package/.genx/templates/web-components/component/component.template.hbs +23 -0
- package/.genx/templates/web-components/component/component.update.form.hbs +5 -0
- package/.genx/templates/web-components/entityManager.hbs +5 -11
- package/.genx/templates/web-components/form.hbs +1 -3
- package/.genx/templates/web-components/grid.hbs +1 -3
- package/.genx/templates/web-components/gridLayout.hbs +30 -0
- package/.genx/templates/web-components/horizontalLayout.hbs +7 -0
- package/.genx/templates/web-components/route.template.hbs +8 -2
- package/.genx/templates/web-components/tabsLayout.hbs +7 -0
- package/.genx/utils/formatRouteData.js +5 -0
- package/.genx/utils/generateRoute.js +8 -0
- package/.genx/utils/generateTile.js +137 -0
- package/.genx/utils/gridSerializers.js +10 -10
- package/.genx/utils/registerPartials.js +4 -3
- package/CHANGELOG.md +14 -0
- package/client-tmp/angular/angular.json +21 -12
- package/client-tmp/angular/package.json +45 -20
- package/client-tmp/angular/src/app/app-routing.module.ts +10 -3
- package/client-tmp/angular/src/app/app.component.spec.ts +2 -8
- package/client-tmp/angular/src/app/app.component.ts +0 -1
- package/client-tmp/angular/src/app/app.config.ts +1 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.html +15 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.spec.ts +74 -0
- package/client-tmp/angular/src/app/components/error-message/error-message.component.ts +15 -0
- package/client-tmp/angular/src/app/guards/auth.guard.ts +3 -3
- package/client-tmp/angular/src/app/guards/permissions.guard.ts +24 -0
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.html +0 -1
- package/client-tmp/angular/src/app/layouts/blank/blank.layout.spec.ts +1 -1
- package/client-tmp/angular/src/app/layouts/default/default.layout.html +0 -1
- package/client-tmp/angular/src/app/layouts/default/default.layout.spec.ts +30 -15
- package/client-tmp/angular/src/app/pages/auth-login/auth-login.component.spec.ts +6 -6
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.html +4 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.scss +12 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.spec.ts +32 -0
- package/client-tmp/angular/src/app/pages/not-permitted/not-permitted.component.ts +13 -0
- package/client-tmp/angular/src/app/services/auth.service.ts +12 -4
- package/client-tmp/angular/src/app/share/foundation-login.ts +3 -0
- package/client-tmp/angular/src/app/utils/index.ts +1 -0
- package/client-tmp/angular/src/app/utils/permissions.ts +7 -0
- package/client-tmp/angular/src/styles/_mixins.scss +8 -0
- package/package.json +1 -1
- /package/.genx/templates/{gridLayout.hbs → angular/gridLayout.hbs} +0 -0
- /package/.genx/templates/{horizontalLayout.hbs → angular/horizontalLayout.hbs} +0 -0
- /package/.genx/templates/{tabsLayout.hbs → angular/tabsLayout.hbs} +0 -0
package/.genx/package.json
CHANGED
package/.genx/static.js
CHANGED
|
@@ -54,6 +54,13 @@ const DIR_TEMPLATE_BY_FRAMEWORK = {
|
|
|
54
54
|
[FRAMEWORK_ANGULAR_ALIAS]: DIRS_MAP.get(DIR_TEMPLATE_ANGULAR_ALIAS),
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
const COMPONENT_TYPE = {
|
|
58
|
+
'entity-manager': 'manager',
|
|
59
|
+
'grid-pro': 'grid',
|
|
60
|
+
'smart-form': 'form',
|
|
61
|
+
'chart': 'chart'
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
const TEXTS = {
|
|
58
65
|
INTRO_API_HOST:
|
|
59
66
|
'You can override the default Genesis server URL used during local developent.',
|
|
@@ -77,6 +84,7 @@ const TEXTS = {
|
|
|
77
84
|
};
|
|
78
85
|
|
|
79
86
|
module.exports = {
|
|
87
|
+
COMPONENT_TYPE,
|
|
80
88
|
FRAMEWORK_WEB_COMPONENTS_ALIAS,
|
|
81
89
|
FRAMEWORK_ANGULAR_ALIAS,
|
|
82
90
|
FRAMEWORK_REACT_ALIAS,
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<rapid-g2plot-chart
|
|
4
|
+
type="{{ config.type }}"
|
|
5
|
+
[config]="tile{{ config.index }}.chartConfig"
|
|
6
|
+
>
|
|
7
|
+
<chart-datasource
|
|
8
|
+
resourceName="{{ config.resourceName }}"
|
|
9
|
+
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
10
|
+
></chart-datasource>
|
|
11
|
+
</rapid-g2plot-chart>
|
|
12
|
+
</ng-container>
|
|
13
|
+
|
|
14
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
15
|
+
<app-error-message
|
|
16
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
17
|
+
elementType="h3"
|
|
18
|
+
message="You do not have access to view this component.">
|
|
19
|
+
</app-error-message>
|
|
20
|
+
</ng-template>
|
|
21
|
+
</section>
|
|
@@ -1,45 +1,57 @@
|
|
|
1
|
-
<
|
|
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
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<entity-management
|
|
4
|
+
design-system-prefix="rapid"
|
|
5
|
+
enable-row-flashing
|
|
6
|
+
enable-cell-flashing
|
|
7
|
+
{{#if config.title}}
|
|
8
|
+
title="{{ config.title }}"
|
|
9
|
+
{{/if}}
|
|
10
|
+
resourceName="{{ config.resourceName }}"
|
|
11
|
+
{{#if config.createEvent}}
|
|
12
|
+
[createEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.createEvent }}' : undefined"
|
|
13
|
+
{{#if config.createFormUiSchema}}
|
|
14
|
+
[createFormUiSchema]="tile{{ config.index }}.createFormUiSchema"
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if config.updateEvent}}
|
|
18
|
+
[updateEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.updateEvent }}' : undefined"
|
|
19
|
+
{{#if config.updateFormUiSchema}}
|
|
20
|
+
[updateFormUiSchema]="tile{{ config.index }}.updateFormUiSchema"
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{#if config.deleteEvent}}
|
|
24
|
+
[deleteEvent]="hasUserPermission('{{config.permissions.updateRight}}') ? '{{ config.deleteEvent }}' : undefined"
|
|
25
|
+
{{/if}}
|
|
26
|
+
{{#if config.gridOptions}}
|
|
27
|
+
[gridOptions]="{{ config.gridOptions }}"
|
|
28
|
+
{{/if}}
|
|
29
|
+
{{#if config.snapshot}}
|
|
30
|
+
[datasourceConfig]="{ isSnapshot: {{ config.snapshot }} }"
|
|
31
|
+
{{/if}}
|
|
32
|
+
{{#if config.reqrep}}
|
|
33
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{#if config.columns}}
|
|
36
|
+
[columns]="tile{{ config.index }}.columns"
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{#if config.modalPosition}}
|
|
39
|
+
modal-position="{{ config.modalPosition }}"
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{#if config.sizeColumnsToFit}}
|
|
42
|
+
size-columns-to-fit
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{#if config.enableSearchBar}}
|
|
45
|
+
enable-search-bar
|
|
46
|
+
{{/if}}
|
|
47
|
+
></entity-management>
|
|
48
|
+
</ng-container>
|
|
49
|
+
|
|
50
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
51
|
+
<app-error-message
|
|
52
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
53
|
+
elementType="h3"
|
|
54
|
+
message="You do not have access to view this component.">
|
|
55
|
+
</app-error-message>
|
|
56
|
+
</ng-template>
|
|
57
|
+
</section>
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.updateRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<foundation-form
|
|
4
|
+
design-system-prefix="rapid"
|
|
5
|
+
resourceName="{{config.resourceName}}"
|
|
6
|
+
{{#if config.uischema}}
|
|
7
|
+
[uischema]="tile{{ config.index }}.uischema"
|
|
8
|
+
{{/if}}
|
|
9
|
+
>
|
|
10
|
+
</foundation-form>
|
|
11
|
+
</ng-container>
|
|
12
|
+
|
|
13
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
14
|
+
<app-error-message
|
|
15
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
16
|
+
elementType="h3"
|
|
17
|
+
message="You do not have access to view this component.">
|
|
18
|
+
</app-error-message>
|
|
19
|
+
</ng-template>
|
|
20
|
+
</section>
|
|
21
|
+
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<section style="height: 100%; width: 100%;">
|
|
2
|
+
<ng-container *ngIf="hasUserPermission('{{config.permissions.viewRight}}'); else notPermitted{{ config.index }}">
|
|
3
|
+
<rapid-grid-pro
|
|
4
|
+
enable-row-flashing
|
|
5
|
+
enable-cell-flashing
|
|
6
|
+
>
|
|
7
|
+
<grid-pro-genesis-datasource
|
|
8
|
+
resource-name="{{config.resourceName}}"
|
|
9
|
+
{{#if config.snapshot}}
|
|
10
|
+
isSnapshot="{{config.snapshot}}"
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if config.reqrep}}
|
|
13
|
+
[datasourceConfig]="tile{{ config.index }}.reqrep"
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if config.gridOptions}}
|
|
16
|
+
[deferredGridOptions]="tile{{ config.index }}.gridOptions"
|
|
17
|
+
{{/if}}
|
|
18
|
+
>
|
|
19
|
+
</grid-pro-genesis-datasource>
|
|
20
|
+
</rapid-grid-pro>
|
|
21
|
+
</ng-container>
|
|
22
|
+
|
|
23
|
+
<ng-template #notPermitted{{ config.index }}>
|
|
24
|
+
<app-error-message
|
|
25
|
+
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"
|
|
26
|
+
elementType="h3"
|
|
27
|
+
message="You do not have access to view this component.">
|
|
28
|
+
</app-error-message>
|
|
29
|
+
</ng-template>
|
|
30
|
+
</section>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
|
2
|
-
import {CommonModule} from '@angular/common';
|
|
3
|
-
{
|
|
4
|
-
import { getDateFormatter, getNumberFormatter } from '../../utils';
|
|
5
|
-
{
|
|
1
|
+
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { User, getUser } from '@genesislcap/foundation-user';
|
|
4
|
+
import { getDateFormatter, getNumberFormatter, getViewUpdateRightComponent } from '../../utils';
|
|
5
|
+
import { ErrorMessageComponent } from '../../components/error-message/error-message.component';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-{{pascalCase route.name}}',
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [
|
|
11
|
+
ErrorMessageComponent,
|
|
11
12
|
CommonModule,
|
|
12
13
|
],
|
|
13
14
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
@@ -15,6 +16,8 @@ import { getDateFormatter, getNumberFormatter } from '../../utils';
|
|
|
15
16
|
styleUrls: ['./{{kebabCase route.name}}.component.css'],
|
|
16
17
|
})
|
|
17
18
|
export class {{pascalCase route.name}}Component {
|
|
19
|
+
hasUserPermission = (permissionCode: string) => getViewUpdateRightComponent(getUser(), permissionCode);
|
|
20
|
+
|
|
18
21
|
{{#each route.tiles}}
|
|
19
22
|
tile{{this.config.index}} = { {{#if this.config.createFormUiSchema}}
|
|
20
23
|
"createFormUiSchema": {{{ this.config.createFormUiSchema }}},{{/if}}{{#if this.config.updateFormUiSchema}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
2
|
+
import { getDateFormatter, getNumberFormatter{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../../utils';
|
|
3
|
+
|
|
4
|
+
{{#if tile.config.columns}}
|
|
5
|
+
export const columnDefs: ColDef[] = {{{ tile.config.columns }}}
|
|
6
|
+
{{/if}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UiSchema } from '@genesislcap/foundation-forms';
|
|
2
|
+
|
|
3
|
+
{{#if tile.config.createFormUiSchema}}
|
|
4
|
+
export const createFormSchema: UiSchema = {{{ tile.config.createFormUiSchema }}}
|
|
5
|
+
{{/if}}
|
|
6
|
+
{{#if tile.config.uischema}}
|
|
7
|
+
export const createFormSchema: UiSchema = {{{ tile.config.uischema }}}
|
|
8
|
+
{{/if}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GridOptionsConfig } from '@genesislcap/rapid-grid-pro';
|
|
2
|
+
import { getDateFormatter, getNumberFormatter{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../../utils';
|
|
3
|
+
|
|
4
|
+
{{#if tile.config.gridOptions}}
|
|
5
|
+
export const gridOptions: GridOptionsConfig = {{{ tile.config.gridOptions }}}
|
|
6
|
+
{{/if}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { User } from '@genesislcap/foundation-user';
|
|
2
|
+
import { customElement, GenesisElement } from '@genesislcap/web-core';
|
|
3
|
+
import { {{pascalCase tile.title}}Styles as styles } from './{{kebabCase tile.title}}.styles';
|
|
4
|
+
import { {{pascalCase tile.title}}Template as template } from './{{kebabCase tile.title}}.template';
|
|
5
|
+
|
|
6
|
+
@customElement({
|
|
7
|
+
name: '{{kebabCase tile.componentName}}',
|
|
8
|
+
template,
|
|
9
|
+
styles,
|
|
10
|
+
})
|
|
11
|
+
export class {{pascalCase tile.componentName}} extends GenesisElement {
|
|
12
|
+
@User user: User;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './{{kebabCase tile.title}}';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html, whenElse } from '@genesislcap/web-core';
|
|
2
|
+
import { getViewUpdateRightComponent } from '../../../utils';
|
|
3
|
+
import type { {{pascalCase tile.componentName}} } from './{{kebabCase tile.title}}';
|
|
4
|
+
{{#if tile.config.createFormUiSchema}}
|
|
5
|
+
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
6
|
+
{{/if}}
|
|
7
|
+
{{#if tile.config.uischema}}
|
|
8
|
+
import { createFormSchema } from './{{kebabCase tile.title}}.create.form.schema';
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#if tile.config.updateFormUiSchema}}
|
|
11
|
+
import { updateFormSchema } from './{{kebabCase tile.title}}.update.form.schema';
|
|
12
|
+
{{/if}}
|
|
13
|
+
{{#if tile.config.columns}}
|
|
14
|
+
import { columnDefs } from './{{kebabCase tile.title}}.column.defs';
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{#if tile.config.gridOptions}}
|
|
17
|
+
import { gridOptions } from './{{kebabCase tile.title}}.gridOptions';
|
|
18
|
+
{{/if}}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export const {{pascalCase tile.title}}Template = html<{{pascalCase tile.componentName}}>`
|
|
22
|
+
{{> (lookup tile 'type') tile}}
|
|
23
|
+
`;
|
|
@@ -12,26 +12,20 @@ ${whenElse(
|
|
|
12
12
|
{{#if config.createEvent}}
|
|
13
13
|
createEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.createEvent }}')}"
|
|
14
14
|
{{#if config.createFormUiSchema}}
|
|
15
|
-
:createFormUiSchema=${() =>
|
|
16
|
-
{{{ config.createFormUiSchema }}}
|
|
17
|
-
)}
|
|
15
|
+
:createFormUiSchema=${() => createFormSchema }
|
|
18
16
|
{{/if}}
|
|
19
17
|
{{/if}}
|
|
20
18
|
{{#if config.updateEvent}}
|
|
21
19
|
updateEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.updateEvent }}')}"
|
|
22
20
|
{{#if config.updateFormUiSchema}}
|
|
23
|
-
:updateFormUiSchema=${() =>
|
|
24
|
-
{{{ config.updateFormUiSchema }}}
|
|
25
|
-
)}
|
|
21
|
+
:updateFormUiSchema=${() => updateFormSchema}
|
|
26
22
|
{{/if}}
|
|
27
23
|
{{/if}}
|
|
28
24
|
{{#if config.deleteEvent}}
|
|
29
25
|
deleteEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.deleteEvent }}')}"
|
|
30
26
|
{{/if}}
|
|
31
27
|
{{#if config.gridOptions}}
|
|
32
|
-
:gridOptions=${() =>
|
|
33
|
-
{{{config.gridOptions}}}
|
|
34
|
-
)}
|
|
28
|
+
:gridOptions=${() => gridOptions }
|
|
35
29
|
{{/if}}
|
|
36
30
|
{{#if config.snapshot}}
|
|
37
31
|
:datasourceConfig=${() => ({isSnapshot: {{ config.snapshot }} })}
|
|
@@ -40,7 +34,7 @@ ${whenElse(
|
|
|
40
34
|
:datasourceConfig=${() => ({pollingInterval: 5000 })}
|
|
41
35
|
{{/if}}
|
|
42
36
|
{{#if config.columns}}
|
|
43
|
-
:columns=${() =>
|
|
37
|
+
:columns=${() => columnDefs }
|
|
44
38
|
{{/if}}
|
|
45
39
|
{{#if config.modalPosition}}
|
|
46
40
|
modal-position="{{ config.modalPosition }}"
|
|
@@ -54,6 +48,6 @@ ${whenElse(
|
|
|
54
48
|
></entity-management>
|
|
55
49
|
`,
|
|
56
50
|
html`
|
|
57
|
-
|
|
51
|
+
<not-permitted-component></not-permitted-component>
|
|
58
52
|
`,
|
|
59
53
|
)}
|
|
@@ -14,9 +14,7 @@ ${whenElse(
|
|
|
14
14
|
:datasourceConfig=${() => ({pollingInterval: 5000 })}
|
|
15
15
|
{{/if}}
|
|
16
16
|
{{#if config.gridOptions}}
|
|
17
|
-
:deferredGridOptions=${() =>
|
|
18
|
-
{{{config.gridOptions}}}
|
|
19
|
-
)}
|
|
17
|
+
:deferredGridOptions=${() => gridOptions}
|
|
20
18
|
{{/if}}
|
|
21
19
|
>
|
|
22
20
|
</grid-pro-genesis-datasource>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<rapid-layout-region type="horizontal">
|
|
2
|
+
<rapid-layout-region type="vertical">
|
|
3
|
+
{{#each route.tiles}}
|
|
4
|
+
{{#ifEquals @index 0}}
|
|
5
|
+
<rapid-layout-item title="{{../title}}">
|
|
6
|
+
<{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
|
|
7
|
+
</rapid-layout-item>
|
|
8
|
+
{{/ifEquals}}
|
|
9
|
+
{{#ifEquals @index 1}}
|
|
10
|
+
<rapid-layout-item title="{{../title}}">
|
|
11
|
+
<{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
|
|
12
|
+
</rapid-layout-item>
|
|
13
|
+
{{/ifEquals}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
</rapid-layout-region>
|
|
16
|
+
<rapid-layout-region type="vertical">
|
|
17
|
+
{{#each route.tiles}}
|
|
18
|
+
{{#ifEquals @index 2}}
|
|
19
|
+
<rapid-layout-item title="{{../title}}">
|
|
20
|
+
<{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
|
|
21
|
+
</rapid-layout-item>
|
|
22
|
+
{{/ifEquals}}
|
|
23
|
+
{{#ifEquals @index 3}}
|
|
24
|
+
<rapid-layout-item title="{{../title}}">
|
|
25
|
+
<{{kebabCase ../componentName}}></{{kebabCase ../componentName}}>
|
|
26
|
+
</rapid-layout-item>
|
|
27
|
+
{{/ifEquals}}
|
|
28
|
+
{{/each}}
|
|
29
|
+
</rapid-layout-region>
|
|
30
|
+
</rapid-layout-region>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { isDev } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html
|
|
3
|
-
import { getDateFormatter, getNumberFormatter, getViewUpdateRightComponent{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../utils';
|
|
2
|
+
import { html } from '@genesislcap/web-core';
|
|
4
3
|
import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
|
|
4
|
+
{{#each route.tiles}}
|
|
5
|
+
import { {{pascalCase this.componentName}} } from './{{kebabCase this.title}}-{{this.componentType}}';
|
|
6
|
+
{{/each}}
|
|
7
|
+
|
|
8
|
+
{{#each route.tiles}}
|
|
9
|
+
{{pascalCase this.componentName}};
|
|
10
|
+
{{/each}}
|
|
5
11
|
|
|
6
12
|
export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
|
|
7
13
|
{{#if route.tiles}}
|
|
@@ -4,6 +4,7 @@ const {
|
|
|
4
4
|
} = require('./gridSerializers');
|
|
5
5
|
const formatJSONValue = require('./formatJSONValue');
|
|
6
6
|
const getLayoutType = require('./getLayoutType');
|
|
7
|
+
const { COMPONENT_TYPE } = require('../static');
|
|
7
8
|
|
|
8
9
|
const formatRouteData = (route) => {
|
|
9
10
|
const layoutKey = route?.layoutKey || `${route.name}_${Date.now()}`;
|
|
@@ -15,6 +16,8 @@ const formatRouteData = (route) => {
|
|
|
15
16
|
);
|
|
16
17
|
const tiles = route.tiles?.map((tile, index) => {
|
|
17
18
|
const config = tile.config || {};
|
|
19
|
+
const componentType = COMPONENT_TYPE[tile.type];
|
|
20
|
+
const componentName = `${route.name}-${tile.title.replace(/[^0-9a-z]/gi, '')}-${componentType}`;
|
|
18
21
|
const {
|
|
19
22
|
gridOptions,
|
|
20
23
|
createFormUiSchema,
|
|
@@ -25,6 +28,8 @@ const formatRouteData = (route) => {
|
|
|
25
28
|
|
|
26
29
|
return {
|
|
27
30
|
...tile,
|
|
31
|
+
componentName,
|
|
32
|
+
componentType,
|
|
28
33
|
config: {
|
|
29
34
|
...config,
|
|
30
35
|
index,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { resolve } = require('node:path');
|
|
2
2
|
const makeDirectory = require('./makeDirectory');
|
|
3
|
+
const generateTile = require('./generateTile');
|
|
3
4
|
const {
|
|
4
5
|
FRAMEWORK_WEB_COMPONENTS_ALIAS,
|
|
5
6
|
FRAMEWORK_ANGULAR_ALIAS,
|
|
@@ -59,6 +60,13 @@ const generateRoute = (route, { changeCase, writeFileWithData }, framework) => {
|
|
|
59
60
|
resolve(__dirname, source),
|
|
60
61
|
);
|
|
61
62
|
});
|
|
63
|
+
|
|
64
|
+
// Remove condition after adding changes for angular
|
|
65
|
+
if (framework === FRAMEWORK_WEB_COMPONENTS_ALIAS && route?.tiles?.length) {
|
|
66
|
+
route.tiles.forEach((tile) => {
|
|
67
|
+
generateTile(tile, route, { changeCase, writeFileWithData }, framework);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
62
70
|
};
|
|
63
71
|
|
|
64
72
|
module.exports = generateRoute;
|