@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
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
export const defaultRowConfig = {
|
|
3
3
|
rowHeight: 52,
|
|
4
4
|
rowStyle: {
|
|
5
|
-
|
|
6
|
-
backgroundColor: 'RGB(34, 39, 44)',
|
|
5
|
+
backgroundColor: 'var(--neutral-layer-3)',
|
|
7
6
|
border: 'none',
|
|
8
7
|
borderRadius: '6px',
|
|
9
8
|
maxHeight: '42px',
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './config';
|
|
2
|
+
export * from './main';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { css, html } from '@
|
|
2
|
-
|
|
3
|
-
export const defaultLayout = new FASTElementLayout(html `
|
|
1
|
+
import { css, GenesisElementLayout, html } from '@genesislcap/web-core';
|
|
2
|
+
export const defaultLayout = new GenesisElementLayout(html `
|
|
4
3
|
<div class="container">
|
|
5
4
|
<div class="content">
|
|
6
5
|
<slot></slot>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, css, customElement,
|
|
3
|
-
import {
|
|
4
|
-
const { cyan } = ColorHEX;
|
|
2
|
+
import { attr, css, customElement, GenesisElement, html, when } from '@genesislcap/web-core';
|
|
3
|
+
import { iconTag } from '../tags';
|
|
5
4
|
var Divider;
|
|
6
5
|
(function (Divider) {
|
|
7
6
|
Divider["equal"] = "hyphen";
|
|
@@ -41,7 +40,7 @@ const styles = css `
|
|
|
41
40
|
right: -4rem;
|
|
42
41
|
top: 50%;
|
|
43
42
|
width: 4rem;
|
|
44
|
-
color:
|
|
43
|
+
color: var(--neutral-foreground-hint);
|
|
45
44
|
}
|
|
46
45
|
`;
|
|
47
46
|
const template = html `
|
|
@@ -52,7 +51,7 @@ const template = html `
|
|
|
52
51
|
${when((x) => !x.hideDivider, html `
|
|
53
52
|
<div class="divider" part="divider">
|
|
54
53
|
<slot name="divider">
|
|
55
|
-
|
|
54
|
+
<${iconTag} name="chevron-right"></${iconTag}>
|
|
56
55
|
</slot>
|
|
57
56
|
</div>
|
|
58
57
|
`)}
|
|
@@ -63,7 +62,7 @@ const template = html `
|
|
|
63
62
|
</section>
|
|
64
63
|
</div>
|
|
65
64
|
`;
|
|
66
|
-
let LayoutTwoPaneHorizontal = class LayoutTwoPaneHorizontal extends
|
|
65
|
+
let LayoutTwoPaneHorizontal = class LayoutTwoPaneHorizontal extends GenesisElement {
|
|
67
66
|
constructor() {
|
|
68
67
|
super(...arguments);
|
|
69
68
|
this.hideDivider = false;
|
package/dist/esm/main/index.js
CHANGED
package/dist/esm/main/main.js
CHANGED
|
@@ -1,80 +1,234 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import {
|
|
3
|
-
import { customElement,
|
|
4
|
-
import { Container, inject, Registration } from '@microsoft/fast-foundation';
|
|
5
|
-
import { DefaultRouteRecognizer } from '@microsoft/fast-router';
|
|
6
|
-
import * as Components from '../components';
|
|
7
|
-
import { MainRouterConfig } from '../routes';
|
|
8
|
-
import { logger } from '../utils';
|
|
2
|
+
import { Connect, DatasourceDefaults } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
9
4
|
import { MainStyles as styles } from './main.styles';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
import { MainTemplate as template } from './main.template';
|
|
6
|
+
import { ReportingEventListeners } from './types';
|
|
7
|
+
import { ReportingConfig } from '../config/config';
|
|
8
|
+
/**
|
|
9
|
+
* FoundationReporting.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Base MF export used by host application `configure` calls. It does not set up a design system or components. Both are
|
|
13
|
+
* expected to be registered in the host application, which should provide the details of which to the MF via
|
|
14
|
+
* TemplateOptions.
|
|
15
|
+
*
|
|
16
|
+
* See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
let FoundationReporting = class FoundationReporting extends GenesisElement {
|
|
13
21
|
constructor() {
|
|
14
22
|
super(...arguments);
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
23
|
+
this.fields = [];
|
|
24
|
+
this.selectedRows = [];
|
|
25
|
+
this.activeReport = {};
|
|
26
|
+
this.notifications = [];
|
|
27
|
+
}
|
|
28
|
+
enter(phase) {
|
|
29
|
+
var _a, _b, _c, _d;
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
this.datasourceSettings = {
|
|
32
|
+
maxRows: (_b = (_a = phase.route.settings) === null || _a === void 0 ? void 0 : _a.maxRows) !== null && _b !== void 0 ? _b : DatasourceDefaults.MAX_ROWS_250,
|
|
33
|
+
maxView: (_d = (_c = phase.route.settings) === null || _c === void 0 ? void 0 : _c.maxView) !== null && _d !== void 0 ? _d : DatasourceDefaults.MAX_VIEW_1000,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
17
36
|
}
|
|
18
37
|
connectedCallback() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this
|
|
23
|
-
|
|
38
|
+
const _super = Object.create(null, {
|
|
39
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
40
|
+
});
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
_super.connectedCallback.call(this);
|
|
43
|
+
console.log('reporting config', this.config);
|
|
44
|
+
this.reportsGrid.addEventListener('rowSelectionEvent', (e) => {
|
|
45
|
+
this.selectedRows = e.detail.selectedRows();
|
|
46
|
+
});
|
|
47
|
+
this.addEventListener(ReportingEventListeners.notify, (e) => {
|
|
48
|
+
this.notifications = [...this.notifications, e.detail];
|
|
49
|
+
});
|
|
50
|
+
this.addEventListener(ReportingEventListeners.listReports, (e) => {
|
|
51
|
+
this.setPageTab('list-reports');
|
|
52
|
+
this.activeReport = {};
|
|
53
|
+
});
|
|
54
|
+
this.reportsGrid.addEventListener(ReportingEventListeners.runReport, (e) => {
|
|
55
|
+
this.run(e.detail);
|
|
56
|
+
});
|
|
57
|
+
this.reportsGrid.addEventListener(ReportingEventListeners.editReport, (e) => {
|
|
58
|
+
this.edit(e.detail);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
24
61
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.session.setSessionStorageItem('ssoToken', ssoToken);
|
|
30
|
-
}
|
|
62
|
+
// TODO: use const for tab identifiers
|
|
63
|
+
create() {
|
|
64
|
+
this.activeReport = {};
|
|
65
|
+
this.setPageTab('create-edit-report');
|
|
31
66
|
}
|
|
32
|
-
|
|
67
|
+
edit(rowData) {
|
|
68
|
+
this.activeReport = Object.assign(Object.assign({}, rowData), { REPORT_COLUMNS: JSON.parse(rowData['REPORT_COLUMNS']) });
|
|
69
|
+
this.setPageTab('create-edit-report');
|
|
70
|
+
}
|
|
71
|
+
run(rowData) {
|
|
33
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
const remoteComponents = yield Components.loadRemotes({});
|
|
38
|
-
/**
|
|
39
|
-
* Simulate loading delay, TODO: Remove
|
|
40
|
-
*
|
|
41
|
-
* await new Promise(resolve => setTimeout(resolve, 3000));
|
|
42
|
-
*/
|
|
43
|
-
this.ready = true;
|
|
73
|
+
this.activeReport = Object.assign(Object.assign({}, rowData), { REPORT_COLUMNS: JSON.parse(rowData['REPORT_COLUMNS']) });
|
|
74
|
+
this.setPageTab('run-report');
|
|
44
75
|
});
|
|
45
76
|
}
|
|
46
|
-
|
|
47
|
-
|
|
77
|
+
setPageTab(tab) {
|
|
78
|
+
this.tabs.activeid = tab;
|
|
48
79
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
80
|
+
getFields(resourceName) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const temp = yield this.connect.getMetadata(resourceName);
|
|
83
|
+
for (let i = 0; i < temp.FIELD.length; i += 1) {
|
|
84
|
+
this.fields.push(temp.FIELD[i].NAME);
|
|
85
|
+
}
|
|
86
|
+
this.listBox.hidden = false;
|
|
87
|
+
});
|
|
53
88
|
}
|
|
54
89
|
};
|
|
55
90
|
__decorate([
|
|
56
|
-
|
|
57
|
-
],
|
|
91
|
+
Connect
|
|
92
|
+
], FoundationReporting.prototype, "connect", void 0);
|
|
58
93
|
__decorate([
|
|
59
|
-
|
|
60
|
-
],
|
|
94
|
+
observable
|
|
95
|
+
], FoundationReporting.prototype, "fields", void 0);
|
|
61
96
|
__decorate([
|
|
62
|
-
|
|
63
|
-
],
|
|
97
|
+
observable
|
|
98
|
+
], FoundationReporting.prototype, "selectedRows", void 0);
|
|
64
99
|
__decorate([
|
|
65
100
|
observable
|
|
66
|
-
],
|
|
101
|
+
], FoundationReporting.prototype, "activeReport", void 0);
|
|
67
102
|
__decorate([
|
|
68
103
|
observable
|
|
69
|
-
],
|
|
104
|
+
], FoundationReporting.prototype, "notifications", void 0);
|
|
70
105
|
__decorate([
|
|
71
106
|
observable
|
|
72
|
-
],
|
|
73
|
-
|
|
107
|
+
], FoundationReporting.prototype, "datasourceSettings", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
ReportingConfig
|
|
110
|
+
], FoundationReporting.prototype, "config", void 0);
|
|
111
|
+
FoundationReporting = __decorate([
|
|
112
|
+
customElement({
|
|
113
|
+
name: 'foundation-reporting',
|
|
114
|
+
template,
|
|
115
|
+
styles,
|
|
116
|
+
})
|
|
117
|
+
], FoundationReporting);
|
|
118
|
+
export { FoundationReporting };
|
|
119
|
+
/**
|
|
120
|
+
* RapidReporting.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* A rapid version that pre-registers rapid components and uses the rapid design system.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* import { RapidReporting } from '@genesislcap/pbc-reporting-ui';
|
|
128
|
+
* ...
|
|
129
|
+
* RapidReporting
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example Load the micro frontend on-demand
|
|
133
|
+
* ```ts
|
|
134
|
+
|
|
135
|
+
* const { RapidReporting } = await import('@genesislcap/pbc-reporting-ui');
|
|
136
|
+
* return RapidReporting;
|
|
137
|
+
* },
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
let RapidReporting = class RapidReporting extends FoundationReporting {
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
connectedCallback() {
|
|
147
|
+
const _super = Object.create(null, {
|
|
148
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
149
|
+
});
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
_super.connectedCallback.call(this);
|
|
152
|
+
yield this.loadRemotes();
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
loadRemotes() {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
const { registerCommonRapidComponents } = yield import('../components/rapid-components');
|
|
161
|
+
yield registerCommonRapidComponents();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
RapidReporting = __decorate([
|
|
166
|
+
customElement({
|
|
167
|
+
name: 'rapid-reporting',
|
|
168
|
+
template,
|
|
169
|
+
styles,
|
|
170
|
+
})
|
|
171
|
+
], RapidReporting);
|
|
172
|
+
export { RapidReporting };
|
|
173
|
+
/**
|
|
174
|
+
* ZeroReporting.
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* A zero version that pre-registers zero components and uses the zero design system.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* import { ZeroReporting } from '@genesislcap/pbc-reporting-ui';
|
|
182
|
+
* ...
|
|
183
|
+
* ZeroReporting
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* @example Load the micro frontend on-demand
|
|
187
|
+
* ```ts
|
|
188
|
+
|
|
189
|
+
* const { ZeroReporting } = await import('@genesislcap/pbc-reporting-ui');
|
|
190
|
+
* return ZeroReporting;
|
|
191
|
+
* },
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* @public
|
|
195
|
+
*/
|
|
196
|
+
let ZeroReporting = class ZeroReporting extends FoundationReporting {
|
|
197
|
+
/**
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
connectedCallback() {
|
|
201
|
+
const _super = Object.create(null, {
|
|
202
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
203
|
+
});
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
_super.connectedCallback.call(this);
|
|
206
|
+
yield this.loadRemotes();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @internal
|
|
211
|
+
*/
|
|
212
|
+
loadRemotes() {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
const { registerCommonZeroComponents } = yield import('../components/zero-components');
|
|
215
|
+
yield registerCommonZeroComponents();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
ZeroReporting = __decorate([
|
|
74
220
|
customElement({
|
|
75
|
-
name,
|
|
221
|
+
name: 'zero-reporting',
|
|
76
222
|
template,
|
|
77
223
|
styles,
|
|
78
224
|
})
|
|
79
|
-
],
|
|
80
|
-
export {
|
|
225
|
+
], ZeroReporting);
|
|
226
|
+
export { ZeroReporting };
|
|
227
|
+
/**
|
|
228
|
+
* @privateRemarks
|
|
229
|
+
* Keeps backwards compatability with original export.
|
|
230
|
+
*
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
export class Reporting extends ZeroReporting {
|
|
234
|
+
}
|
|
@@ -1,15 +1,68 @@
|
|
|
1
|
-
import { css } from '@
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
2
|
+
import { helperStyles } from '../styles';
|
|
3
|
+
import { designSystemProviderTag, tabPanelTag } from '../tags';
|
|
2
4
|
export const MainStyles = css `
|
|
5
|
+
${helperStyles}
|
|
3
6
|
:host {
|
|
4
|
-
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
overflow: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
${designSystemProviderTag} {
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.container {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.notification-container {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
position: absolute;
|
|
28
|
+
z-index: 10;
|
|
29
|
+
right: calc(var(--design-unit) * 10px);
|
|
30
|
+
bottom: calc(var(--design-unit) * 10px);
|
|
31
|
+
color: var(--neutral-foreground-rest);
|
|
5
32
|
}
|
|
6
33
|
|
|
7
|
-
|
|
8
|
-
zero-design-system-provider,
|
|
9
|
-
.dynamic-template,
|
|
10
|
-
fast-router {
|
|
34
|
+
.header {
|
|
11
35
|
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
padding: calc(var(--design-unit) * 4px) 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.title {
|
|
42
|
+
font-size: var(--type-ramp-plus-4-font-size);
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tabs {
|
|
12
47
|
width: 100%;
|
|
13
48
|
height: 100%;
|
|
49
|
+
background-color: var(--neutral-layer-4);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
::part(tablist),
|
|
53
|
+
.tabs .tablist {
|
|
54
|
+
height: 37;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
${tabPanelTag} {
|
|
58
|
+
background-color: var(--neutral-layer-4);
|
|
59
|
+
height: calc(100% - 110px);
|
|
60
|
+
padding: 0 calc(var(--design-unit) * 4px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.controls {
|
|
64
|
+
align-items: center;
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: calc(var(--design-unit) * 2px);
|
|
14
67
|
}
|
|
15
68
|
`;
|
|
@@ -1,12 +1,99 @@
|
|
|
1
|
-
import { html, ref } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { html, repeat, ref, when } from "@genesislcap/web-core";
|
|
2
|
+
import { List } from "../components/list";
|
|
3
|
+
import { Wizard } from "../components/wizard";
|
|
4
|
+
import { Preview } from "../components/preview";
|
|
5
|
+
import { SelectFields } from "../components/select-fields";
|
|
6
|
+
import { SelectFilters } from "../components/select-filters";
|
|
7
|
+
import { CreateEdit } from "../components/create-edit";
|
|
8
|
+
import { LayoutTwoPaneHorizontal } from "../layouts";
|
|
9
|
+
import { buttonTag, tabPanelTag, tabTag, tabsTag, toastTag, } from "../tags";
|
|
10
|
+
List;
|
|
11
|
+
Preview;
|
|
12
|
+
SelectFields;
|
|
13
|
+
SelectFilters;
|
|
14
|
+
Wizard;
|
|
15
|
+
CreateEdit;
|
|
16
|
+
LayoutTwoPaneHorizontal;
|
|
17
|
+
const notificationToast = html `
|
|
18
|
+
<div class="notification-container" data-test-id="notification-container">
|
|
19
|
+
${repeat((x) => x.notifications, html `
|
|
20
|
+
<${toastTag}
|
|
21
|
+
notify=${(notification) => notification.type}
|
|
22
|
+
auto-close=${(notification) => notification.autoClose}
|
|
23
|
+
data-test-id="toast"
|
|
24
|
+
>
|
|
25
|
+
<div slot="top" data-test-id="toast-title">${(notification) => notification.title}</div>
|
|
26
|
+
<p slot="content" data-test-id="toast-message">
|
|
27
|
+
${(notification) => notification.message}
|
|
28
|
+
</p>
|
|
29
|
+
</${toastTag}>
|
|
30
|
+
`)}
|
|
31
|
+
</div>
|
|
6
32
|
`;
|
|
7
|
-
|
|
8
|
-
<
|
|
33
|
+
const header = html `
|
|
34
|
+
<div class="header" data-test-id="header">
|
|
35
|
+
<h1 id="title" class="title" data-test-id="report-title">All Reports</h1>
|
|
36
|
+
<div class="controls" data-test-id="controls">
|
|
37
|
+
<${buttonTag}
|
|
38
|
+
appearance="neutral-grey"
|
|
39
|
+
class="button"
|
|
40
|
+
?disabled=${(x) => !x.selectedRows.length}
|
|
41
|
+
@click=${(x) => x.reportsGrid.batchDelete()}
|
|
42
|
+
data-test-id="delete-reports-button"
|
|
43
|
+
>
|
|
44
|
+
Delete Reports
|
|
45
|
+
</${buttonTag}>
|
|
46
|
+
|
|
47
|
+
<${buttonTag}
|
|
48
|
+
appearance="${(x) => x.config.buttonAppearance}"
|
|
49
|
+
class="button"
|
|
50
|
+
@click=${(x) => x.create()}
|
|
51
|
+
data-test-id="add-report-button"
|
|
52
|
+
>
|
|
53
|
+
Add new report
|
|
54
|
+
</${buttonTag}>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
9
57
|
`;
|
|
10
58
|
export const MainTemplate = html `
|
|
11
|
-
|
|
59
|
+
${when((x) => x.notifications.length, notificationToast)}
|
|
60
|
+
<div class="container" data-test-id="reporting-home">
|
|
61
|
+
|
|
62
|
+
<${tabsTag} ${ref("tabs")} class="tabs" data-test-id="tabs">
|
|
63
|
+
<span part="start" class="start" slot="start" data-test-id="reporting-tab">Reporting</span>
|
|
64
|
+
<${tabTag} id="list-reports" slot="tab" data-test-id="list-reports-tab">
|
|
65
|
+
All Reports
|
|
66
|
+
</${tabTag}>
|
|
67
|
+
<${tabTag} id="create-edit-report" slot="tab" data-test-id="create-edit-report-tab">
|
|
68
|
+
Create Report
|
|
69
|
+
</${tabTag}>
|
|
70
|
+
${when((x) => Object.keys(x.activeReport).length > 0, html `
|
|
71
|
+
<${tabTag} id="run-report" slot="tab" data-test-id="run-report-tab">Run Report</${tabTag}>
|
|
72
|
+
`)}
|
|
73
|
+
|
|
74
|
+
<${tabPanelTag} slot="tabpanel" class="tab-panel" data-test-id="list-reports-panel">
|
|
75
|
+
${header}
|
|
76
|
+
<reporting-list ${ref("reportsGrid")} data-test-id="report-list"></reporting-list>
|
|
77
|
+
</${tabPanelTag}>
|
|
78
|
+
|
|
79
|
+
<${tabPanelTag} slot="tabpanel" class="tab-panel" data-test-id="create-edit-report-panel">
|
|
80
|
+
<reporting-create-edit
|
|
81
|
+
:report=${(x) => x.activeReport}
|
|
82
|
+
:setPageTab=${(x) => x.setPageTab}
|
|
83
|
+
:datasourceSettings=${(x) => x.datasourceSettings}
|
|
84
|
+
data-test-id="create-edit-report-component"
|
|
85
|
+
/>
|
|
86
|
+
</${tabPanelTag}>
|
|
87
|
+
${when((x) => Object.keys(x.activeReport).length > 0, html `
|
|
88
|
+
<${tabPanelTag} slot="tabpanel" class="tab-panel" data-test-id="report-preview-panel">
|
|
89
|
+
<reporting-preview
|
|
90
|
+
:report=${(x) => x.activeReport}
|
|
91
|
+
:datasourceSettings=${(x) => x.datasourceSettings}
|
|
92
|
+
data-test-id="report-preview-component"
|
|
93
|
+
/>
|
|
94
|
+
</${tabPanelTag}>
|
|
95
|
+
`)}
|
|
96
|
+
</${tabsTag}>
|
|
97
|
+
|
|
98
|
+
</div>
|
|
12
99
|
`;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { css } from '@microsoft/fast-element';
|
|
3
|
-
import { ColorHEX } from './colors';
|
|
4
|
-
const { lightGrey, lightGrey1 } = ColorHEX;
|
|
1
|
+
import { css } from "@genesislcap/web-core";
|
|
5
2
|
/**
|
|
6
3
|
* Helper classes
|
|
7
4
|
*/
|
|
8
5
|
export const helperStyles = css `
|
|
6
|
+
::-webkit-scrollbar {
|
|
7
|
+
width: calc((var(--base-height-multiplier) + var(--design-unit)) * 1px);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::-webkit-scrollbar-track {
|
|
11
|
+
background: var(--neutral-layer-1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
::-webkit-scrollbar-thumb {
|
|
15
|
+
background: var(--neutral-fill-rest);
|
|
16
|
+
}
|
|
9
17
|
.text-center {
|
|
10
18
|
text-align: center;
|
|
11
19
|
}
|
|
@@ -19,8 +27,8 @@ export const helperStyles = css `
|
|
|
19
27
|
}
|
|
20
28
|
|
|
21
29
|
.my-20 {
|
|
22
|
-
margin-top:
|
|
23
|
-
margin-bottom:
|
|
30
|
+
margin-top: calc(var(--design-unit) * 5px);
|
|
31
|
+
margin-bottom: calc(var(--design-unit) * 5px);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
.h-full {
|
|
@@ -80,7 +88,7 @@ export const helperStyles = css `
|
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
.gap-1 {
|
|
83
|
-
gap:
|
|
91
|
+
gap: calc(var(--design-unit) * 4px);
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
.gap-2 {
|
|
@@ -96,11 +104,11 @@ export const helperStyles = css `
|
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
.mt-1 {
|
|
99
|
-
margin-top:
|
|
107
|
+
margin-top: calc(var(--design-unit) * 4px);
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
.mt-15px {
|
|
103
|
-
margin-top:
|
|
111
|
+
margin-top: calc(var(--design-unit) * 4px);
|
|
104
112
|
}
|
|
105
113
|
|
|
106
114
|
.mt-2 {
|
|
@@ -120,9 +128,10 @@ export const helperStyles = css `
|
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
.card {
|
|
123
|
-
padding:
|
|
131
|
+
padding: calc(var(--design-unit) * 4px);
|
|
124
132
|
width: 100%;
|
|
125
|
-
background-color:
|
|
133
|
+
background-color: var(--neutral-layer-3);
|
|
134
|
+
border: none;
|
|
126
135
|
}
|
|
127
136
|
|
|
128
137
|
.overflow-auto {
|
|
@@ -130,50 +139,42 @@ export const helperStyles = css `
|
|
|
130
139
|
}
|
|
131
140
|
|
|
132
141
|
.section-title {
|
|
133
|
-
font-size:
|
|
142
|
+
font-size: var(--type-ramp-plus-4-font-size);
|
|
134
143
|
font-weight: 700;
|
|
135
144
|
line-height: normal;
|
|
136
145
|
}
|
|
137
146
|
|
|
138
147
|
.card-title {
|
|
139
|
-
color:
|
|
140
|
-
font-size:
|
|
148
|
+
color: var(--neutral-foreground-rest);
|
|
149
|
+
font-size: var(--type-ramp-base-font-size);
|
|
141
150
|
font-weight: 700;
|
|
142
151
|
line-height: normal;
|
|
143
152
|
margin-top: 0;
|
|
144
|
-
text-align:
|
|
145
|
-
color: ${lightGrey1};
|
|
153
|
+
text-align: "left";
|
|
146
154
|
}
|
|
147
155
|
|
|
148
156
|
.step-title {
|
|
149
|
-
font-size:
|
|
157
|
+
font-size: var(--type-ramp-base-font-size);
|
|
150
158
|
line-height: 22px;
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
.card-description {
|
|
154
|
-
color:
|
|
162
|
+
color: var(--neutral-foreground-hint);
|
|
155
163
|
line-height: normal;
|
|
156
|
-
font-size:
|
|
164
|
+
font-size: var(--type-ramp-base-font-size);
|
|
157
165
|
font-weight: 700;
|
|
158
|
-
margin-top: -5px;
|
|
159
|
-
color: ${lightGrey};
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
.spacer-3 {
|
|
163
169
|
height: 1.3rem;
|
|
164
|
-
margin:
|
|
170
|
+
margin: calc(var(--design-unit) * 4px) 0 calc(var(--design-unit) * 4px);
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
.light-grey {
|
|
168
|
-
color:
|
|
174
|
+
color: var(--neutral-foreground-rest);
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
.dark-grey {
|
|
172
|
-
color:
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.button + .button,
|
|
176
|
-
zero-button + zero-button {
|
|
177
|
-
margin-left: 1rem;
|
|
178
|
+
color: var(--neutral-foreground-hint);
|
|
178
179
|
}
|
|
179
180
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from '@
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
2
2
|
/**
|
|
3
3
|
* Normalize styles
|
|
4
4
|
*/
|
|
@@ -8,6 +8,6 @@ export const normalizeStyles = css `
|
|
|
8
8
|
h3,
|
|
9
9
|
h4,
|
|
10
10
|
h5 {
|
|
11
|
-
margin: 0 0
|
|
11
|
+
margin: 0 0 calc(var(--design-unit) * 4px) 0;
|
|
12
12
|
}
|
|
13
13
|
`;
|