@genesislcap/pbc-reporting-ui 1.0.6 → 1.0.7
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/dist/dts/components/create-edit/create-edit.d.ts +2 -2
- package/dist/dts/components/create-edit/create-edit.d.ts.map +1 -1
- package/dist/dts/components/create-edit/create-edit.styles.d.ts.map +1 -1
- package/dist/dts/components/create-edit/create-edit.template.d.ts +2 -2
- package/dist/dts/components/create-edit/create-edit.template.d.ts.map +1 -1
- package/dist/dts/components/list/columns.d.ts.map +1 -1
- package/dist/dts/components/list/list.d.ts +6 -4
- package/dist/dts/components/list/list.d.ts.map +1 -1
- package/dist/dts/components/list/list.styles.d.ts.map +1 -1
- package/dist/dts/components/list/list.template.d.ts +2 -2
- package/dist/dts/components/list/list.template.d.ts.map +1 -1
- package/dist/dts/components/preview/preview.d.ts +6 -4
- package/dist/dts/components/preview/preview.d.ts.map +1 -1
- package/dist/dts/components/preview/preview.template.d.ts +2 -2
- package/dist/dts/components/preview/preview.template.d.ts.map +1 -1
- package/dist/dts/components/rapid-components.d.ts +5 -0
- package/dist/dts/components/rapid-components.d.ts.map +1 -0
- package/dist/dts/components/select-fields/select-fields.d.ts +7 -5
- package/dist/dts/components/select-fields/select-fields.d.ts.map +1 -1
- package/dist/dts/components/select-fields/select-fields.template.d.ts +1 -2
- package/dist/dts/components/select-fields/select-fields.template.d.ts.map +1 -1
- package/dist/dts/components/select-filters/select-filters.d.ts +7 -5
- package/dist/dts/components/select-filters/select-filters.d.ts.map +1 -1
- package/dist/dts/components/select-filters/select-filters.template.d.ts +1 -2
- package/dist/dts/components/select-filters/select-filters.template.d.ts.map +1 -1
- package/dist/dts/components/wizard/debug.d.ts +1 -2
- package/dist/dts/components/wizard/debug.d.ts.map +1 -1
- package/dist/dts/components/wizard/steps/filters.d.ts +1 -2
- package/dist/dts/components/wizard/steps/filters.d.ts.map +1 -1
- package/dist/dts/components/wizard/steps/name.d.ts +1 -2
- package/dist/dts/components/wizard/steps/name.d.ts.map +1 -1
- package/dist/dts/components/wizard/steps/run.d.ts +2 -2
- package/dist/dts/components/wizard/steps/run.d.ts.map +1 -1
- package/dist/dts/components/wizard/steps/select.d.ts +1 -2
- package/dist/dts/components/wizard/steps/select.d.ts.map +1 -1
- package/dist/dts/components/wizard/wizard.d.ts +4 -2
- package/dist/dts/components/wizard/wizard.d.ts.map +1 -1
- package/dist/dts/components/wizard/wizard.styles.d.ts.map +1 -1
- package/dist/dts/components/wizard/wizard.template.d.ts +1 -2
- package/dist/dts/components/wizard/wizard.template.d.ts.map +1 -1
- package/dist/dts/components/zero-components.d.ts +5 -0
- package/dist/dts/components/zero-components.d.ts.map +1 -0
- package/dist/dts/config/config.d.ts +47 -0
- package/dist/dts/config/config.d.ts.map +1 -0
- package/dist/dts/config/configure.d.ts +30 -0
- package/dist/dts/config/configure.d.ts.map +1 -0
- package/dist/dts/config/index.d.ts +3 -0
- package/dist/dts/config/index.d.ts.map +1 -0
- package/dist/dts/config/templates.d.ts +41 -0
- package/dist/dts/config/templates.d.ts.map +1 -0
- package/dist/dts/constants/grid-config.d.ts.map +1 -1
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/layouts/default.d.ts +2 -2
- package/dist/dts/layouts/default.d.ts.map +1 -1
- package/dist/dts/layouts/two-pane-horizontal.d.ts +2 -2
- package/dist/dts/layouts/two-pane-horizontal.d.ts.map +1 -1
- package/dist/dts/main/index.d.ts +1 -0
- package/dist/dts/main/index.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +110 -16
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +3 -5
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/main/types.d.ts +24 -0
- package/dist/dts/main/types.d.ts.map +1 -0
- package/dist/dts/styles/helpers.d.ts.map +1 -1
- package/dist/dts/styles/styles.d.ts.map +1 -1
- package/dist/dts/tags/index.d.ts +2 -0
- package/dist/dts/tags/index.d.ts.map +1 -0
- package/dist/dts/tags/tags.d.ts +64 -0
- package/dist/dts/tags/tags.d.ts.map +1 -0
- package/dist/esm/components/create-edit/create-edit.js +3 -3
- package/dist/esm/components/create-edit/create-edit.styles.js +2 -5
- package/dist/esm/components/create-edit/create-edit.template.js +1 -1
- package/dist/esm/components/list/columns.js +2 -3
- package/dist/esm/components/list/list.js +9 -6
- package/dist/esm/components/list/list.styles.js +1 -21
- package/dist/esm/components/list/list.template.js +4 -3
- package/dist/esm/components/preview/preview.js +6 -2
- package/dist/esm/components/preview/preview.styles.js +1 -1
- package/dist/esm/components/preview/preview.template.js +10 -9
- package/dist/esm/components/rapid-components.js +21 -0
- package/dist/esm/components/select-fields/select-fields.js +8 -4
- package/dist/esm/components/select-fields/select-fields.styles.js +4 -4
- package/dist/esm/components/select-fields/select-fields.template.js +13 -12
- package/dist/esm/components/select-filters/select-filters.js +9 -5
- package/dist/esm/components/select-filters/select-filters.styles.js +1 -1
- package/dist/esm/components/select-filters/select-filters.template.js +13 -12
- package/dist/esm/components/wizard/debug.js +1 -1
- package/dist/esm/components/wizard/steps/filters.js +1 -1
- package/dist/esm/components/wizard/steps/name.js +14 -13
- package/dist/esm/components/wizard/steps/run.js +1 -1
- package/dist/esm/components/wizard/steps/select.js +1 -1
- package/dist/esm/components/wizard/wizard.js +7 -3
- package/dist/esm/components/wizard/wizard.styles.js +57 -55
- package/dist/esm/components/wizard/wizard.template.js +13 -12
- package/dist/esm/components/zero-components.js +17 -0
- package/dist/esm/config/config.js +20 -0
- package/dist/esm/config/configure.js +58 -0
- package/dist/esm/config/index.js +2 -0
- package/dist/esm/config/templates.js +21 -0
- package/dist/esm/constants/grid-config.js +1 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/layouts/default.js +2 -3
- package/dist/esm/layouts/two-pane-horizontal.js +5 -6
- package/dist/esm/main/index.js +1 -0
- package/dist/esm/main/main.js +207 -53
- package/dist/esm/main/main.styles.js +59 -6
- package/dist/esm/main/main.template.js +95 -8
- package/dist/esm/styles/helpers.js +30 -29
- package/dist/esm/styles/normalize.js +2 -2
- package/dist/esm/styles/styles.js +2 -3
- package/dist/esm/tags/index.js +1 -0
- package/dist/esm/tags/tags.js +67 -0
- package/package.json +22 -5
- package/dist/dts/components/components.d.ts +0 -5
- package/dist/dts/components/components.d.ts.map +0 -1
- package/dist/dts/components/index.d.ts +0 -2
- package/dist/dts/components/index.d.ts.map +0 -1
- package/dist/dts/routes/config.d.ts +0 -25
- package/dist/dts/routes/config.d.ts.map +0 -1
- package/dist/dts/routes/index.d.ts +0 -2
- package/dist/dts/routes/index.d.ts.map +0 -1
- package/dist/dts/routes/not-found/not-found.d.ts +0 -4
- package/dist/dts/routes/not-found/not-found.d.ts.map +0 -1
- package/dist/dts/routes/protected/protected.d.ts +0 -8
- package/dist/dts/routes/protected/protected.d.ts.map +0 -1
- package/dist/dts/routes/protected/protected.styles.d.ts +0 -2
- package/dist/dts/routes/protected/protected.styles.d.ts.map +0 -1
- package/dist/dts/routes/protected/protected.template.d.ts +0 -3
- package/dist/dts/routes/protected/protected.template.d.ts.map +0 -1
- package/dist/dts/routes/reporting-home/reporting-home-styles.d.ts +0 -2
- package/dist/dts/routes/reporting-home/reporting-home-styles.d.ts.map +0 -1
- package/dist/dts/routes/reporting-home/reporting-home-template.d.ts +0 -4
- package/dist/dts/routes/reporting-home/reporting-home-template.d.ts.map +0 -1
- package/dist/dts/routes/reporting-home/reporting-home.d.ts +0 -26
- package/dist/dts/routes/reporting-home/reporting-home.d.ts.map +0 -1
- package/dist/dts/routes/reporting-home/types.d.ts +0 -13
- package/dist/dts/routes/reporting-home/types.d.ts.map +0 -1
- package/dist/esm/components/components.js +0 -51
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/routes/config.js +0 -84
- package/dist/esm/routes/index.js +0 -1
- package/dist/esm/routes/not-found/not-found.js +0 -29
- package/dist/esm/routes/protected/protected.js +0 -32
- package/dist/esm/routes/protected/protected.styles.js +0 -18
- package/dist/esm/routes/protected/protected.template.js +0 -7
- package/dist/esm/routes/reporting-home/reporting-home-styles.js +0 -74
- package/dist/esm/routes/reporting-home/reporting-home-template.js +0 -85
- package/dist/esm/routes/reporting-home/reporting-home.js +0 -103
- /package/dist/esm/{routes/reporting-home → main}/types.js +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
-
import {
|
|
4
|
-
import { customElement,
|
|
3
|
+
import { RapidAgSelectRenderer, RapidAgTextRenderer } from '@genesislcap/rapid-grid-pro';
|
|
4
|
+
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
5
5
|
import { filterObjectArray, getFiltersByFieldType } from '../../utils';
|
|
6
6
|
import { AVAILABLE_FIELDS_CONFIG, SELECTED_FILTERS_CONFIG } from './columns';
|
|
7
7
|
import { SelectFiltersStyles } from './select-filters.styles';
|
|
8
8
|
import { SelectFiltersTemplate } from './select-filters.template';
|
|
9
|
-
|
|
9
|
+
import { ReportingConfig } from '../../config/config';
|
|
10
|
+
let SelectFilters = class SelectFilters extends GenesisElement {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
12
13
|
this.filtersToRemove = [];
|
|
@@ -120,7 +121,7 @@ let SelectFilters = class SelectFilters extends FASTElement {
|
|
|
120
121
|
paddingLeft: 0,
|
|
121
122
|
paddingRight: 0,
|
|
122
123
|
},
|
|
123
|
-
cellRenderer:
|
|
124
|
+
cellRenderer: RapidAgSelectRenderer,
|
|
124
125
|
cellRendererParams: {
|
|
125
126
|
accessor: 'filter.conditional',
|
|
126
127
|
defaultValue: 'Select filter',
|
|
@@ -129,7 +130,7 @@ let SelectFilters = class SelectFilters extends FASTElement {
|
|
|
129
130
|
},
|
|
130
131
|
},
|
|
131
132
|
{
|
|
132
|
-
cellRenderer:
|
|
133
|
+
cellRenderer: RapidAgTextRenderer,
|
|
133
134
|
cellRendererParams: {
|
|
134
135
|
onChange: this.onFilterValueChange,
|
|
135
136
|
accessor: 'filter.value',
|
|
@@ -182,6 +183,9 @@ __decorate([
|
|
|
182
183
|
__decorate([
|
|
183
184
|
observable
|
|
184
185
|
], SelectFilters.prototype, "filterGridReady", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
ReportingConfig
|
|
188
|
+
], SelectFilters.prototype, "config", void 0);
|
|
185
189
|
SelectFilters = __decorate([
|
|
186
190
|
customElement({
|
|
187
191
|
name: 'reporting-select-filters',
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { html, ref } from '@
|
|
1
|
+
import { html, ref } from '@genesislcap/web-core';
|
|
2
|
+
import { buttonTag, cardTag, gridTag } from '../../tags';
|
|
2
3
|
const allFieldsTemplate = html `
|
|
3
4
|
<section class="all-fields" slot="left-section" data-test-id="all-fields-section">
|
|
4
5
|
<h3 class="mt-1 section-title dark-grey">Apply filters</h3>
|
|
5
|
-
|
|
6
|
+
<${cardTag} class="card">
|
|
6
7
|
<div class="flex space-between">
|
|
7
8
|
<h5 class="card-title">All fields</h5>
|
|
8
9
|
</div>
|
|
9
10
|
|
|
10
11
|
<div class="w-full h-90pc">
|
|
11
|
-
|
|
12
|
+
<${gridTag}
|
|
12
13
|
${ref('availableFieldsGrid')}
|
|
13
14
|
rowSelection="multiple"
|
|
14
15
|
suppressRowClickSelection
|
|
15
16
|
data-test-id="available-fields-grid"
|
|
16
|
-
|
|
17
|
+
></${gridTag}>
|
|
17
18
|
</div>
|
|
18
|
-
|
|
19
|
+
</${cardTag}>
|
|
19
20
|
</section>
|
|
20
21
|
`;
|
|
21
22
|
const selectedFiltersTemplate = html `
|
|
22
23
|
<section class="selected-filters" slot="right-section" data-test-id="selected-filters-section">
|
|
23
24
|
<div class="spacer-3"></div>
|
|
24
|
-
|
|
25
|
+
<${cardTag} class="card">
|
|
25
26
|
<div class="flex space-between">
|
|
26
27
|
<h5 class="card-title">Fields to Apply Filters</h5>
|
|
27
|
-
|
|
28
|
+
<${buttonTag}
|
|
28
29
|
@click=${(x) => x.removeSelectedFilters()}
|
|
29
30
|
?disabled=${(x) => !x.filtersToRemove.length}
|
|
30
|
-
appearance="
|
|
31
|
+
appearance="${(x) => x.config.buttonAppearance}"
|
|
31
32
|
data-test-id="remove-filters-button"
|
|
32
33
|
>
|
|
33
34
|
Remove filters
|
|
34
|
-
|
|
35
|
+
</${buttonTag}>
|
|
35
36
|
</div>
|
|
36
37
|
<div class="w-full h-90pc">
|
|
37
|
-
|
|
38
|
+
<${gridTag}
|
|
38
39
|
${ref('selectedFiltersGrid')}
|
|
39
40
|
rowSelection="multiple"
|
|
40
41
|
suppressRowClickSelection
|
|
41
42
|
data-test-id="selected-filters-grid"
|
|
42
|
-
|
|
43
|
+
></${gridTag}>
|
|
43
44
|
</div>
|
|
44
|
-
|
|
45
|
+
</${cardTag}>
|
|
45
46
|
</section>
|
|
46
47
|
`;
|
|
47
48
|
export const SelectFiltersTemplate = html `
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, repeat } from '@
|
|
2
|
+
import { html, repeat } from '@genesislcap/web-core';
|
|
3
|
+
import { cardTag, radioGroupTag, radioTag, textAreaTag, textFieldTag } from '../../../tags';
|
|
3
4
|
const reportDescriptionTemplate = html `
|
|
4
5
|
<section class="report-details" slot="left-section" data-test-id="report-details-section">
|
|
5
6
|
<h3 class="mt-1 section-title dark-grey" data-test-id="report-name-title">Name Report</h3>
|
|
6
|
-
|
|
7
|
+
<${cardTag} class="card">
|
|
7
8
|
<h5 class="card-title">Report Set up</h5>
|
|
8
|
-
|
|
9
|
+
<${textFieldTag}
|
|
9
10
|
:value=${sync((x) => x.reportName)}
|
|
10
11
|
class="w-full"
|
|
11
12
|
placeholder="Enter report name..."
|
|
12
13
|
data-test-id="report-name-input"
|
|
13
14
|
>
|
|
14
15
|
Report Name
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
</${textFieldTag}>
|
|
17
|
+
<${textAreaTag}
|
|
17
18
|
:value=${sync((x) => x.reportDescription)}
|
|
18
19
|
class="w-full mt-2"
|
|
19
20
|
placeholder="Enter report description..."
|
|
20
21
|
data-test-id="report-description-input"
|
|
21
22
|
>
|
|
22
23
|
Report Description
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
</${textAreaTag}>
|
|
25
|
+
</${cardTag}>
|
|
25
26
|
</section>
|
|
26
27
|
`;
|
|
27
28
|
const dataSourceTemplate = html `
|
|
@@ -29,14 +30,14 @@ const dataSourceTemplate = html `
|
|
|
29
30
|
<h3 class="mt-1 section-title dark-grey" data-test-id="select-datasource-title">
|
|
30
31
|
Select Datasource
|
|
31
32
|
</h3>
|
|
32
|
-
|
|
33
|
+
<${cardTag} class="card">
|
|
33
34
|
<h5 class="card-title">Data Sources</h5>
|
|
34
35
|
<div class="card-description">You have selected ${(x) => x.selectedDatasource}</div>
|
|
35
36
|
<div class="divider"></div>
|
|
36
37
|
<div class="radio-buttons" data-test-id="datasource-options">
|
|
37
|
-
|
|
38
|
+
<${radioGroupTag} :value=${(x) => x.selectedDatasource}>
|
|
38
39
|
${repeat((x) => x.datasourceOptions, html `
|
|
39
|
-
|
|
40
|
+
<${radioTag}
|
|
40
41
|
@click=${(x, c) => c.parent.onDatasourceChange(x.name)}
|
|
41
42
|
:checked=${(x, c) => c.parent.selectedDatasource === x.name}
|
|
42
43
|
:value=${(x) => x.name}
|
|
@@ -44,11 +45,11 @@ const dataSourceTemplate = html `
|
|
|
44
45
|
data-test-id=${(x) => `datasource-option-${x.name}`}
|
|
45
46
|
>
|
|
46
47
|
${(x) => x.name}
|
|
47
|
-
|
|
48
|
+
</${radioTag}>
|
|
48
49
|
`)}
|
|
49
|
-
|
|
50
|
+
</${radioGroupTag}>
|
|
50
51
|
</div>
|
|
51
|
-
|
|
52
|
+
</${cardTag}>
|
|
52
53
|
</section>
|
|
53
54
|
`;
|
|
54
55
|
export const NameStep = html `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from '@
|
|
1
|
+
import { html } from '@genesislcap/web-core';
|
|
2
2
|
export const RunStep = html `
|
|
3
3
|
<div class="step h-90pc mt-15px" data-test-id="run-report-step">
|
|
4
4
|
<h3 class="mt-1 section-title dark-grey" data-test-id="run-report-step-title">Run Report</h3>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __rest } from "tslib";
|
|
2
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
|
-
import { customElement,
|
|
4
|
-
import { ReportingEventListeners } from '../../
|
|
3
|
+
import { customElement, GenesisElement, observable, volatile } from '@genesislcap/web-core';
|
|
4
|
+
import { ReportingEventListeners } from '../../main/types';
|
|
5
5
|
import { FiltersStep, NameStep, RunStep, SelectStep } from './steps';
|
|
6
6
|
import { WizardStyles as styles } from './wizard.styles';
|
|
7
7
|
import { WizardTemplate as template } from './wizard.template';
|
|
8
8
|
import { WizardStep, } from './wizard.types';
|
|
9
|
+
import { ReportingConfig } from '../../config/config';
|
|
9
10
|
const name = 'reporting-wizard';
|
|
10
|
-
let Wizard = class Wizard extends
|
|
11
|
+
let Wizard = class Wizard extends GenesisElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
14
|
this.debug = false;
|
|
@@ -296,6 +297,9 @@ let Wizard = class Wizard extends FASTElement {
|
|
|
296
297
|
__decorate([
|
|
297
298
|
Connect
|
|
298
299
|
], Wizard.prototype, "connect", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
ReportingConfig
|
|
302
|
+
], Wizard.prototype, "config", void 0);
|
|
299
303
|
__decorate([
|
|
300
304
|
observable
|
|
301
305
|
], Wizard.prototype, "debug", void 0);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { css } from '@microsoft/fast-element';
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
3
2
|
import { helperStyles, normalizeStyles } from '../../styles';
|
|
4
|
-
import {
|
|
5
|
-
const { cyan, darkGreen, lightGreen, lightBlue1 } = ColorHEX;
|
|
3
|
+
import { radioGroupTag, radioTag, textAreaTag } from '../../tags';
|
|
6
4
|
export const WizardStyles = css `
|
|
7
5
|
${normalizeStyles}
|
|
8
6
|
${helperStyles}
|
|
@@ -12,33 +10,32 @@ export const WizardStyles = css `
|
|
|
12
10
|
|
|
13
11
|
.grid-container {
|
|
14
12
|
display: grid;
|
|
15
|
-
gap:
|
|
13
|
+
gap: calc(var(--design-unit) * 4px);
|
|
16
14
|
grid-template-columns: minmax(250px, 10%) 1fr;
|
|
17
15
|
grid-auto-rows: 1fr;
|
|
18
|
-
margin
|
|
19
|
-
margin-bottom: 1rem;
|
|
16
|
+
margin: calc(var(--design-unit) *4px) 0;
|
|
20
17
|
height: 95%;
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
.nav {
|
|
24
21
|
max-width: 248px;
|
|
25
|
-
background-color:
|
|
22
|
+
background-color: var(--neutral-layer-2);
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
.nav-item h5 {
|
|
29
26
|
position: relative;
|
|
30
|
-
padding:
|
|
31
|
-
margin-left: -
|
|
32
|
-
margin-right: -
|
|
27
|
+
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) *4px);
|
|
28
|
+
margin-left: calc(var(--design-unit) * -4px);
|
|
29
|
+
margin-right: calc(var(--design-unit) * -4px);
|
|
33
30
|
margin-bottom: 0;
|
|
34
31
|
vertical-align: middle;
|
|
35
|
-
color:
|
|
32
|
+
color: var(--neutral-foreground-hint);
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
.nav-item.active h5,
|
|
39
36
|
.nav-item h5:hover {
|
|
40
|
-
color:
|
|
41
|
-
background-color:
|
|
37
|
+
color: var(--neutral-foreground-rest);
|
|
38
|
+
background-color: var(--neutral-fill-stealth-rest);
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
.nav-item.active h5::after {
|
|
@@ -54,7 +51,7 @@ export const WizardStyles = css `
|
|
|
54
51
|
|
|
55
52
|
background-image: linear-gradient(
|
|
56
53
|
var(--primary-gradient-angle),
|
|
57
|
-
|
|
54
|
+
var(--accent-fill-rest) 0%,
|
|
58
55
|
rgb(101 77 249 / 97%) 100%
|
|
59
56
|
);
|
|
60
57
|
box-sizing: border-box;
|
|
@@ -62,103 +59,103 @@ export const WizardStyles = css `
|
|
|
62
59
|
|
|
63
60
|
.nav-item .step-number {
|
|
64
61
|
display: inline-block;
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
62
|
+
width: calc(var(--base-height-multiplier)* 2px);
|
|
63
|
+
height: calc(var(--base-height-multiplier) * 2px);
|
|
67
64
|
vertical-align: middle;
|
|
68
65
|
text-align: center;
|
|
69
|
-
font-family:
|
|
70
|
-
font-size:
|
|
71
|
-
line-height:
|
|
72
|
-
color:
|
|
66
|
+
font-family: var(--body-font);
|
|
67
|
+
font-size: var(--type-ramp-minus-2-font-size);
|
|
68
|
+
line-height: var(--type-ramp-minus-2-line-height);
|
|
69
|
+
color: var(--neutral-fill-stealth-hover);
|
|
73
70
|
border-radius: 50%;
|
|
74
|
-
border: 1px solid
|
|
71
|
+
border: calc(var(--stroke-width) * 1px) solid var(--neutral-foreground-hint);
|
|
75
72
|
}
|
|
76
73
|
|
|
77
74
|
.nav-item.active .step-number,
|
|
78
75
|
.nav-item h5:hover .step-number {
|
|
79
|
-
color:
|
|
80
|
-
border-color:
|
|
76
|
+
color: var(--neutral-foreground-hint);
|
|
77
|
+
border-color: var(--neutral-foreground-hint);
|
|
81
78
|
}
|
|
82
79
|
|
|
83
80
|
.nav-item .step-number.completed {
|
|
84
|
-
border-color:
|
|
85
|
-
background-color:
|
|
86
|
-
color: ${darkGreen};
|
|
81
|
+
border-color: var(--success-color);
|
|
82
|
+
background-color: var(--success-color);
|
|
87
83
|
}
|
|
88
84
|
|
|
89
85
|
.body {
|
|
90
|
-
background-color:
|
|
86
|
+
background-color: var(--neutral-layer-4);
|
|
91
87
|
padding-left: 0;
|
|
92
88
|
padding-top: 0;
|
|
89
|
+
box-shadow: none;
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
.description {
|
|
96
|
-
color:
|
|
97
|
-
font-size:
|
|
93
|
+
color: var(--neutral-foreground-hint);
|
|
94
|
+
font-size: var(--type-ramp-minus-2-font-size);
|
|
98
95
|
font-weight: 700;
|
|
99
96
|
line-height: normal;
|
|
100
|
-
margin-left:
|
|
97
|
+
margin-left: calc((var(--design-unit) + 1) * 6px);
|
|
101
98
|
}
|
|
102
99
|
|
|
103
100
|
.divider {
|
|
104
|
-
margin:
|
|
105
|
-
border: 1px solid
|
|
101
|
+
margin: calc(var(--design-unit) * 4px) 0;
|
|
102
|
+
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
106
103
|
}
|
|
107
104
|
|
|
108
105
|
.nav-line.completed {
|
|
109
|
-
margin:
|
|
110
|
-
border-left: 2px solid
|
|
106
|
+
margin: calc(var(--design-unit) * 1px) 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 2px);
|
|
107
|
+
border-left: calc(var(--stroke-width) * 2px) solid var(--success-color);
|
|
111
108
|
}
|
|
112
109
|
|
|
113
110
|
.context-container {
|
|
114
|
-
gap:
|
|
111
|
+
gap: calc(var(--design-unit) * 3px);
|
|
115
112
|
}
|
|
116
113
|
|
|
117
114
|
.completed .context-container {
|
|
118
|
-
padding:
|
|
115
|
+
padding: calc(var(--design-unit) * 2px) 0 calc(var(--design-unit) * 4px);
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
.context {
|
|
122
|
-
color:
|
|
123
|
-
font-size:
|
|
119
|
+
color: var(--neutral-foreground-hint);
|
|
120
|
+
font-size: calc(var(--type-ramp-minus-2-font-size) - 1px);
|
|
124
121
|
font-weight: 700;
|
|
125
|
-
line-height:
|
|
122
|
+
line-height: calc(var(--type-ramp-minus-2-line-height) - calc(var(--design-unit) * 1px));
|
|
126
123
|
max-height: 100px;
|
|
127
|
-
margin: 0 0 0
|
|
124
|
+
margin: 0 0 0 calc(var(--design-unit) * 5px);
|
|
128
125
|
overflow: auto;
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
.context b {
|
|
132
|
-
color:
|
|
129
|
+
color: var(--neutral-foreground-rest);
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
.label {
|
|
136
|
-
font-size:
|
|
137
|
-
color:
|
|
138
|
-
margin-bottom:
|
|
133
|
+
font-size: var(--type-ramp-minus-1-font-size);
|
|
134
|
+
color: var(--neutral-foreground-hint);
|
|
135
|
+
margin-bottom: calc(var(--design-unit) * 1px);
|
|
139
136
|
}
|
|
140
137
|
|
|
141
|
-
|
|
138
|
+
${radioGroupTag}::part(positioning-region) {
|
|
142
139
|
display: flex;
|
|
143
140
|
flex-direction: column;
|
|
144
|
-
gap:
|
|
141
|
+
gap: calc(var(--design-unit) * 2px);
|
|
145
142
|
width: 100%;
|
|
146
143
|
}
|
|
147
144
|
|
|
148
145
|
@media screen and (min-width: 1200px) {
|
|
149
|
-
|
|
146
|
+
${radioGroupTag}::part(positioning-region) {
|
|
150
147
|
display: grid;
|
|
151
148
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
152
149
|
}
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
.radio-button {
|
|
156
|
-
background-color:
|
|
157
|
-
border-radius:
|
|
153
|
+
background-color: var(--neutral-layer-2);
|
|
154
|
+
border-radius: calc((var(--control-corner-radius) - 2) * 1px);
|
|
158
155
|
cursor: pointer;
|
|
159
156
|
height: 42px;
|
|
160
157
|
margin: 0;
|
|
161
|
-
padding: 0
|
|
158
|
+
padding: 0 calc(var(--design-unit) * 2px);
|
|
162
159
|
}
|
|
163
160
|
|
|
164
161
|
.radio-button::part(label) {
|
|
@@ -170,11 +167,11 @@ export const WizardStyles = css `
|
|
|
170
167
|
|
|
171
168
|
.radio-button.active,
|
|
172
169
|
.radio-button:hover {
|
|
173
|
-
background-color:
|
|
170
|
+
background-color: var(--neutral-layer-1);
|
|
174
171
|
}
|
|
175
172
|
|
|
176
|
-
|
|
177
|
-
border: 1px solid
|
|
173
|
+
${radioTag}:hover::part(control) {
|
|
174
|
+
border: calc(var(--stroke-width) * 1px) solid var(--neutral-foreground-rest);
|
|
178
175
|
}
|
|
179
176
|
|
|
180
177
|
.arrow {
|
|
@@ -182,7 +179,7 @@ export const WizardStyles = css `
|
|
|
182
179
|
justify-self: center;
|
|
183
180
|
}
|
|
184
181
|
|
|
185
|
-
|
|
182
|
+
${textAreaTag}::part(control) {
|
|
186
183
|
min-height: 170px;
|
|
187
184
|
}
|
|
188
185
|
|
|
@@ -190,4 +187,9 @@ export const WizardStyles = css `
|
|
|
190
187
|
.data-sources {
|
|
191
188
|
height: 100%;
|
|
192
189
|
}
|
|
190
|
+
|
|
191
|
+
.radio-buttons {
|
|
192
|
+
max-height: 560px;
|
|
193
|
+
overflow: auto;
|
|
194
|
+
}
|
|
193
195
|
`;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { html, repeat, when } from '@
|
|
1
|
+
import { html, repeat, when } from '@genesislcap/web-core';
|
|
2
2
|
import { tickIcon } from '../../assets/images';
|
|
3
3
|
import { Debug } from './debug';
|
|
4
4
|
import { WizardStep } from './wizard.types';
|
|
5
|
+
import { buttonTag, cardTag, iconTag } from '../../tags';
|
|
5
6
|
const buttonLabel = (activeTab, content, isEdit) => {
|
|
6
7
|
if (activeTab === content.length - 1) {
|
|
7
8
|
return isEdit ? 'Update' : 'Save';
|
|
@@ -65,13 +66,13 @@ const TabOneContextTemplate = html `
|
|
|
65
66
|
const WizardNavigation = html `
|
|
66
67
|
<div class="nav-actions text-right" data-test-id="wizard-navigation">
|
|
67
68
|
${when((x) => x.activeTab > 0, html `
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
<${buttonTag} @click=${(x) => x.setActiveTab(x.activeTab - 1)} data-test-id="back-button">
|
|
70
|
+
<${iconTag} class="mr-5px" name="arrow-left"></${iconTag}>
|
|
70
71
|
Back
|
|
71
|
-
|
|
72
|
+
</${buttonTag}>
|
|
72
73
|
`)}
|
|
73
|
-
|
|
74
|
-
appearance="
|
|
74
|
+
<${buttonTag}
|
|
75
|
+
appearance="${(x) => x.config.buttonAppearance}"
|
|
75
76
|
?disabled=${(x) => x.isFormValid}
|
|
76
77
|
@click=${(x) => x.activeTab === x.content.length - 1
|
|
77
78
|
? x.saveReport(x.isEdit, x.getData())
|
|
@@ -79,18 +80,18 @@ const WizardNavigation = html `
|
|
|
79
80
|
data-test-id="next-button"
|
|
80
81
|
>
|
|
81
82
|
${(x) => buttonLabel(x.activeTab, x.content, x.isEdit)}
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
<${iconTag} class="ml-5px" name="arrow-right"></${iconTag}>
|
|
84
|
+
</${buttonTag}>
|
|
84
85
|
</div>
|
|
85
86
|
`;
|
|
86
87
|
const WizardContent = html `
|
|
87
|
-
|
|
88
|
+
<${cardTag} class="card body" design-unit="5" data-test-id="wizard-content">
|
|
88
89
|
${(x) => x.viewTemplate}
|
|
89
|
-
|
|
90
|
+
</${cardTag}>
|
|
90
91
|
`;
|
|
91
92
|
export const WizardTemplate = html `
|
|
92
93
|
<div class="wizard grid-container">
|
|
93
|
-
|
|
94
|
+
<${cardTag} class="card nav flex flex-column" data-test-id="wizard-navigation-card">
|
|
94
95
|
<h3 class="section-title light-grey">${(x) => (x.isEdit ? 'Edit' : 'Create')} Report</h3>
|
|
95
96
|
${repeat((x) => x.content, html `
|
|
96
97
|
<div
|
|
@@ -107,7 +108,7 @@ export const WizardTemplate = html `
|
|
|
107
108
|
</div>
|
|
108
109
|
`, { positioning: true, recycle: false })}
|
|
109
110
|
${WizardNavigation} ${(x) => (x.debug ? Debug : null)}
|
|
110
|
-
|
|
111
|
+
</${cardTag}>
|
|
111
112
|
${WizardContent}
|
|
112
113
|
</div>
|
|
113
114
|
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { provideDesignSystem, zeroIcon, zeroButton, zeroCard, zeroTabs, zeroTab, zeroTabPanel, zeroTextField, zeroTextArea, zeroRadioGroup, zeroRadio, zeroToast, zeroDesignSystemProvider, } from '@genesislcap/foundation-zero';
|
|
3
|
+
import { zeroGridComponents } from '@genesislcap/foundation-zero-grid-pro';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const registerCommonZeroComponents = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
/**
|
|
9
|
+
* Register the components the app is using with the system.
|
|
10
|
+
*/
|
|
11
|
+
provideDesignSystem()
|
|
12
|
+
.register(
|
|
13
|
+
/**
|
|
14
|
+
* Common across most routes, so batch register these lightweight components upfront.
|
|
15
|
+
*/
|
|
16
|
+
zeroIcon(), zeroButton(), zeroCard(), zeroTabs(), zeroTab(), zeroTabPanel(), zeroTextField(), zeroTextArea(), zeroRadioGroup(), zeroRadio(), zeroToast(), zeroDesignSystemProvider(), zeroGridComponents);
|
|
17
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DI } from '@genesislcap/web-core';
|
|
2
|
+
import { defaultTemplateOptions } from './templates';
|
|
3
|
+
/**
|
|
4
|
+
* Default ReportingConfig DI implementation.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const defaultReportingConfig = {
|
|
8
|
+
name: 'foundation-reporting',
|
|
9
|
+
templateOptions: defaultTemplateOptions,
|
|
10
|
+
designSystemPrefix: 'rapid',
|
|
11
|
+
buttonAppearance: 'primary',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* ReportingConfig DI key.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
* @privateRemarks
|
|
18
|
+
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
|
19
|
+
*/
|
|
20
|
+
export const ReportingConfig = DI.createInterface((x) => x.instance(defaultReportingConfig));
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { DI, GenesisElement, Registration } from '@genesislcap/web-core';
|
|
3
|
+
import { ReportingConfig, defaultReportingConfig } from './config';
|
|
4
|
+
/**
|
|
5
|
+
* configure.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Configure the reporting micro frontend for host app integration.
|
|
9
|
+
*
|
|
10
|
+
* @example Providing template options to align to your host application.
|
|
11
|
+
* ```ts
|
|
12
|
+
|
|
13
|
+
* const { configure } = await import('@genesislcap/pbc-reporting-ui/config');
|
|
14
|
+
* return configure({
|
|
15
|
+
* name: 'rapid-document-manager',
|
|
16
|
+
* templateOptions: {
|
|
17
|
+
* icon: 'rapid-icon',
|
|
18
|
+
* button: 'rapid-button',
|
|
19
|
+
* grid: 'rapid-grid-pro',
|
|
20
|
+
* },
|
|
21
|
+
* designSystemPrefix: 'rapid',
|
|
22
|
+
* });
|
|
23
|
+
* },
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* This is just an example, as there is a `RapidReporting` which you can import and use.
|
|
27
|
+
*
|
|
28
|
+
* @param config - A partial ReportingConfig.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export function configure(config) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
/**
|
|
34
|
+
* Merge the configs
|
|
35
|
+
*/
|
|
36
|
+
const value = Object.assign(Object.assign({}, defaultReportingConfig), config);
|
|
37
|
+
if (config.templateOptions) {
|
|
38
|
+
value.templateOptions = Object.assign(Object.assign(Object.assign({}, defaultReportingConfig.templateOptions), { designSystemProvider: 'template' }), config.templateOptions);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Register a new ReportingConfig
|
|
42
|
+
*/
|
|
43
|
+
DI.getOrCreateDOMContainer().register(Registration.instance(ReportingConfig, value));
|
|
44
|
+
/**
|
|
45
|
+
* Lazily reference and define the micro frontend element post config setting.
|
|
46
|
+
*/
|
|
47
|
+
const { Reporting, MainStyles, MainTemplate } = yield import('../main');
|
|
48
|
+
const { name, attributes, shadowOptions, elementOptions } = value;
|
|
49
|
+
return GenesisElement.define(Reporting, {
|
|
50
|
+
name,
|
|
51
|
+
template: MainTemplate,
|
|
52
|
+
styles: MainStyles,
|
|
53
|
+
attributes,
|
|
54
|
+
shadowOptions,
|
|
55
|
+
elementOptions,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* defaultTemplateOptions.
|
|
3
|
+
* @remarks
|
|
4
|
+
* The default template options this MF has been created with.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const defaultTemplateOptions = {
|
|
8
|
+
icon: 'rapid-icon',
|
|
9
|
+
button: 'rapid-button',
|
|
10
|
+
card: 'rapid-card',
|
|
11
|
+
tabs: 'rapid-tabs',
|
|
12
|
+
tab: 'rapid-tab',
|
|
13
|
+
tabPanel: 'rapid-tab-panel',
|
|
14
|
+
textField: 'rapid-text-field',
|
|
15
|
+
textArea: 'rapid-text-area',
|
|
16
|
+
radioGroup: 'rapid-radio-group',
|
|
17
|
+
radio: 'rapid-radio',
|
|
18
|
+
toast: 'rapid-toast',
|
|
19
|
+
designSystemProvider: 'rapid-design-system-provider',
|
|
20
|
+
grid: 'rapid-grid-pro',
|
|
21
|
+
};
|