@genesislcap/blank-app-seed 3.13.1 → 3.14.1
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/templates/chart.hbs +26 -18
- package/.genx/templates/entityManager.hbs +59 -51
- package/.genx/templates/form.hbs +18 -10
- package/.genx/templates/grid.hbs +28 -20
- package/.genx/templates/route.hbs +3 -0
- package/.genx/templates/route.template.hbs +4 -3
- package/CHANGELOG.md +14 -0
- package/client/package.json +2 -0
- package/client/src/components/components.ts +2 -0
- package/client/src/components/not-permitted-component/index.ts +1 -0
- package/client/src/components/not-permitted-component/not-permitted-component.styles.ts +13 -0
- package/client/src/components/not-permitted-component/not-permitted-component.template.ts +6 -0
- package/client/src/components/not-permitted-component/not-permitted-component.ts +14 -0
- package/client/src/routes/not-found/not-found.styles.ts +3 -5
- package/client/src/routes/not-found/not-found.template.ts +1 -1
- package/client/src/routes/not-permitted/not-permitted.styles.ts +3 -6
- package/client/src/routes/not-permitted/not-permitted.template.ts +1 -1
- package/client/src/styles/styles.ts +17 -1
- package/client/src/utils/index.ts +1 -0
- package/client/src/utils/permissions.ts +7 -0
- package/package.json +1 -1
package/.genx/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
${whenElse(
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
<rapid-g2plot-chart
|
|
5
|
+
type="{{ config.type }}"
|
|
6
|
+
:config="${(x) => ({
|
|
7
|
+
{{#ifEquals config.type "pie"}}
|
|
8
|
+
radius: 0.75,
|
|
9
|
+
angleField: 'value',
|
|
10
|
+
colorField: 'groupBy',
|
|
11
|
+
{{else}}
|
|
12
|
+
xField: 'groupBy',
|
|
13
|
+
yField: 'value',
|
|
14
|
+
{{/ifEquals}}
|
|
15
|
+
})}"
|
|
16
|
+
>
|
|
17
|
+
<chart-datasource
|
|
18
|
+
resourceName="{{ config.resourceName }}"
|
|
19
|
+
server-fields="{{ config.xField }} {{ config.yField }}"
|
|
20
|
+
></chart-datasource>
|
|
21
|
+
</rapid-g2plot-chart>
|
|
22
|
+
`,
|
|
23
|
+
html`
|
|
24
|
+
<not-permitted-component></not-permitted-component>
|
|
25
|
+
`,
|
|
26
|
+
)}
|
|
@@ -1,51 +1,59 @@
|
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
${whenElse(
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
<entity-management
|
|
5
|
+
design-system-prefix="rapid"
|
|
6
|
+
enable-row-flashing
|
|
7
|
+
enable-cell-flashing
|
|
8
|
+
{{#if config.title}}
|
|
9
|
+
title="{{ config.title }}"
|
|
10
|
+
{{/if}}
|
|
11
|
+
resourceName="{{ config.resourceName }}"
|
|
12
|
+
{{#if config.createEvent}}
|
|
13
|
+
createEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.createEvent }}')}"
|
|
14
|
+
{{#if config.createFormUiSchema}}
|
|
15
|
+
:createFormUiSchema=${() => (
|
|
16
|
+
{{{ config.createFormUiSchema }}}
|
|
17
|
+
)}
|
|
18
|
+
{{/if}}
|
|
19
|
+
{{/if}}
|
|
20
|
+
{{#if config.updateEvent}}
|
|
21
|
+
updateEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.updateEvent }}')}"
|
|
22
|
+
{{#if config.updateFormUiSchema}}
|
|
23
|
+
:updateFormUiSchema=${() => (
|
|
24
|
+
{{{ config.updateFormUiSchema }}}
|
|
25
|
+
)}
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
{{#if config.deleteEvent}}
|
|
29
|
+
deleteEvent="${(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.updateRight}}', '{{ config.deleteEvent }}')}"
|
|
30
|
+
{{/if}}
|
|
31
|
+
{{#if config.gridOptions}}
|
|
32
|
+
:gridOptions=${() => (
|
|
33
|
+
{{{config.gridOptions}}}
|
|
34
|
+
)}
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{#if config.snapshot}}
|
|
37
|
+
:datasourceConfig=${() => ({isSnapshot: {{ config.snapshot }} })}
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if config.reqrep}}
|
|
40
|
+
:datasourceConfig=${() => ({pollingInterval: 5000 })}
|
|
41
|
+
{{/if}}
|
|
42
|
+
{{#if config.columns}}
|
|
43
|
+
:columns=${() => {{{ config.columns }}} }
|
|
44
|
+
{{/if}}
|
|
45
|
+
{{#if config.modalPosition}}
|
|
46
|
+
modal-position="{{ config.modalPosition }}"
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{#if config.sizeColumnsToFit}}
|
|
49
|
+
size-columns-to-fit
|
|
50
|
+
{{/if}}
|
|
51
|
+
{{#if config.enableSearchBar}}
|
|
52
|
+
enable-search-bar
|
|
53
|
+
{{/if}}
|
|
54
|
+
></entity-management>
|
|
55
|
+
`,
|
|
56
|
+
html`
|
|
57
|
+
<not-permitted-component></not-permitted-component>
|
|
58
|
+
`,
|
|
59
|
+
)}
|
package/.genx/templates/form.hbs
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
${whenElse(
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
<foundation-form
|
|
5
|
+
design-system-prefix="rapid"
|
|
6
|
+
resourceName="{{config.resourceName}}"
|
|
7
|
+
{{#if config.uischema}}
|
|
8
|
+
:uischema=${() => (
|
|
9
|
+
{{{config.uischema}}}
|
|
10
|
+
)}
|
|
11
|
+
{{/if}}
|
|
12
|
+
>
|
|
13
|
+
</foundation-form>
|
|
14
|
+
`,
|
|
15
|
+
html`
|
|
16
|
+
<not-permitted-component></not-permitted-component>
|
|
17
|
+
`,
|
|
18
|
+
)}
|
package/.genx/templates/grid.hbs
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
${whenElse(
|
|
2
|
+
(x) => getViewUpdateRightComponent(x.user, '{{config.permissions.viewRight}}'),
|
|
3
|
+
html`
|
|
4
|
+
<rapid-grid-pro
|
|
5
|
+
enable-row-flashing
|
|
6
|
+
enable-cell-flashing
|
|
7
|
+
>
|
|
8
|
+
<grid-pro-genesis-datasource
|
|
9
|
+
resource-name="{{config.resourceName}}"
|
|
10
|
+
{{#if config.snapshot}}
|
|
11
|
+
isSnapshot="{{config.snapshot}}"
|
|
12
|
+
{{/if}}
|
|
13
|
+
{{#if config.reqrep}}
|
|
14
|
+
:datasourceConfig=${() => ({pollingInterval: 5000 })}
|
|
15
|
+
{{/if}}
|
|
16
|
+
{{#if config.gridOptions}}
|
|
17
|
+
:deferredGridOptions=${() => (
|
|
18
|
+
{{{config.gridOptions}}}
|
|
19
|
+
)}
|
|
20
|
+
{{/if}}
|
|
21
|
+
>
|
|
22
|
+
</grid-pro-genesis-datasource>
|
|
23
|
+
</rapid-grid-pro>
|
|
24
|
+
`,
|
|
25
|
+
html`
|
|
26
|
+
<not-permitted-component></not-permitted-component>
|
|
27
|
+
`,
|
|
28
|
+
)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { User } from '@genesislcap/foundation-user';
|
|
1
2
|
import { customElement, GenesisElement } from '@genesislcap/web-core';
|
|
2
3
|
import { {{pascalCase route.name}}Styles as styles } from './{{kebabCase route.name}}.styles';
|
|
3
4
|
import { {{pascalCase route.name}}Template as template } from './{{kebabCase route.name}}.template';
|
|
@@ -8,6 +9,8 @@ import { {{pascalCase route.name}}Template as template } from './{{kebabCase rou
|
|
|
8
9
|
styles,
|
|
9
10
|
})
|
|
10
11
|
export class {{pascalCase route.name}} extends GenesisElement {
|
|
12
|
+
@User user: User;
|
|
13
|
+
|
|
11
14
|
constructor() {
|
|
12
15
|
super();
|
|
13
16
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isDev } from '@genesislcap/foundation-utils';
|
|
2
|
+
import { html, whenElse } from '@genesislcap/web-core';
|
|
3
|
+
import { getDateFormatter, getNumberFormatter, getViewUpdateRightComponent{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../utils';
|
|
3
4
|
import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
|
|
4
5
|
|
|
5
6
|
export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
|
|
6
7
|
{{#if route.tiles}}
|
|
7
|
-
<rapid-layout auto-save-key="{{route.layoutKey}}">
|
|
8
|
+
<rapid-layout auto-save-key="${() => (isDev() ? null : '{{route.layoutKey}}')}">
|
|
8
9
|
{{> (lookup ./route 'layoutType') }}
|
|
9
10
|
</rapid-layout>
|
|
10
11
|
{{else}}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.14.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.14.0...v3.14.1) (2024-06-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* do not use foundation layout autosave during dev GENC-528 (#258) ac4b2fd
|
|
9
|
+
|
|
10
|
+
## [3.14.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.13.1...v3.14.0) (2024-06-17)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* handle component view/update permissions GENC-470 (#257) 7c3c3b6
|
|
16
|
+
|
|
3
17
|
## [3.13.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.13.0...v3.13.1) (2024-06-17)
|
|
4
18
|
|
|
5
19
|
|
package/client/package.json
CHANGED
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"@genesislcap/foundation-store": "{{versions.UI}}",
|
|
106
106
|
"@genesislcap/foundation-ui": "{{versions.UI}}",
|
|
107
107
|
"@genesislcap/foundation-utils": "{{versions.UI}}",
|
|
108
|
+
"@genesislcap/foundation-user": "{{versions.UI}}",
|
|
108
109
|
"@genesislcap/foundation-zero": "{{versions.UI}}",
|
|
109
110
|
"@genesislcap/foundation-zero-grid-pro": "{{versions.UI}}",
|
|
110
111
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
@@ -129,6 +130,7 @@
|
|
|
129
130
|
"@genesislcap/foundation-store": "{{versions.UI}}",
|
|
130
131
|
"@genesislcap/foundation-ui": "{{versions.UI}}",
|
|
131
132
|
"@genesislcap/foundation-utils": "{{versions.UI}}",
|
|
133
|
+
"@genesislcap/foundation-user": "{{versions.UI}}",
|
|
132
134
|
"@genesislcap/foundation-zero": "{{versions.UI}}",
|
|
133
135
|
"@genesislcap/foundation-zero-grid-pro": "{{versions.UI}}",
|
|
134
136
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
@@ -8,6 +8,7 @@ import { zeroGridComponents } from '@genesislcap/foundation-zero-grid-pro';
|
|
|
8
8
|
import { g2plotChartsComponents } from '@genesislcap/g2plot-chart';
|
|
9
9
|
import * as rapidDesignSystem from '@genesislcap/rapid-design-system';
|
|
10
10
|
import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
|
|
11
|
+
import { NotPermittedComponent } from './not-permitted-component';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Ensure tree shaking doesn't remove these.
|
|
@@ -15,6 +16,7 @@ import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
|
|
|
15
16
|
FoundationRouter;
|
|
16
17
|
EntityManagement;
|
|
17
18
|
Form;
|
|
19
|
+
NotPermittedComponent;
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* registerComponents.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './not-permitted-component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
2
|
+
import { errorMessageStyles, mixinScreen } from '../../styles';
|
|
3
|
+
|
|
4
|
+
export const notPermittedComponentStyles = css`
|
|
5
|
+
${errorMessageStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
${mixinScreen('flex')}
|
|
9
|
+
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { html } from '@genesislcap/web-core';
|
|
2
|
+
import type { NotPermittedComponent } from './not-permitted-component';
|
|
3
|
+
|
|
4
|
+
export const notPermittedComponentTemplate = html<NotPermittedComponent>`
|
|
5
|
+
<h3 class="error-message">You do not have access to view this component.</h3>
|
|
6
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { customElement, GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
import { notPermittedComponentStyles as styles } from './not-permitted-component.styles';
|
|
3
|
+
import { notPermittedComponentTemplate as template } from './not-permitted-component.template';
|
|
4
|
+
|
|
5
|
+
@customElement({
|
|
6
|
+
name: 'not-permitted-component',
|
|
7
|
+
template,
|
|
8
|
+
styles,
|
|
9
|
+
})
|
|
10
|
+
export class NotPermittedComponent extends GenesisElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { css } from '@genesislcap/web-core';
|
|
2
|
-
import { mixinScreen } from '../../styles';
|
|
2
|
+
import { errorMessageStyles, mixinScreen } from '../../styles';
|
|
3
3
|
|
|
4
4
|
export const NotFoundStyles = css`
|
|
5
|
+
${errorMessageStyles}
|
|
6
|
+
|
|
5
7
|
:host {
|
|
6
8
|
${mixinScreen('flex')}
|
|
7
9
|
|
|
8
10
|
align-items: center;
|
|
9
11
|
justify-content: center;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
h1 {
|
|
13
|
-
color: var(--neutral-foreground-rest);
|
|
14
|
-
}
|
|
15
13
|
`;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { css } from '@genesislcap/web-core';
|
|
2
|
-
import { mixinScreen } from '../../styles';
|
|
2
|
+
import { errorMessageStyles, mixinScreen } from '../../styles';
|
|
3
3
|
|
|
4
4
|
export const NotPermittedStyles = css`
|
|
5
|
+
${errorMessageStyles}
|
|
6
|
+
|
|
5
7
|
:host {
|
|
6
8
|
${mixinScreen('flex')}
|
|
7
9
|
|
|
8
10
|
align-items: center;
|
|
9
11
|
justify-content: center;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
h1 {
|
|
13
|
-
text-align: center;
|
|
14
|
-
color: var(--neutral-foreground-rest);
|
|
15
|
-
}
|
|
16
13
|
`;
|
|
@@ -2,7 +2,7 @@ import { html } from '@genesislcap/web-core';
|
|
|
2
2
|
import type { NotPermitted } from './not-permitted';
|
|
3
3
|
|
|
4
4
|
export const NotPermittedTemplate = html<NotPermitted>`
|
|
5
|
-
<h1>
|
|
5
|
+
<h1 class="error-message">
|
|
6
6
|
You do not have permission to access this part of the application, please contact your
|
|
7
7
|
administrator.
|
|
8
8
|
</h1>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { errorColor } from '@genesislcap/rapid-design-system';
|
|
2
|
+
import { css, neutralLayer4 } from '@genesislcap/web-core';
|
|
2
3
|
import { mixinCardTitle } from './typography';
|
|
3
4
|
|
|
4
5
|
export const stylesCardHeading = css`
|
|
@@ -7,6 +8,21 @@ export const stylesCardHeading = css`
|
|
|
7
8
|
}
|
|
8
9
|
`;
|
|
9
10
|
|
|
11
|
+
export const errorMessageStyles = css`
|
|
12
|
+
.error-message {
|
|
13
|
+
color: var(--neutral-foreground-rest);
|
|
14
|
+
background-color: ${neutralLayer4};
|
|
15
|
+
border-color: ${errorColor};
|
|
16
|
+
border-radius: 7px;
|
|
17
|
+
border-style: solid;
|
|
18
|
+
border-width: 4px;
|
|
19
|
+
padding: 5px;
|
|
20
|
+
margin: 15px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
width: fit-content;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
10
26
|
export const mixinScreen = (display: string = 'block') => `
|
|
11
27
|
contain: content;
|
|
12
28
|
display: ${display};
|