@genesislcap/pbc-reporting-ui 15.19.0 → 15.19.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/dist/custom-elements.json +4247 -5382
- package/dist/dts/react.d.ts +44 -44
- package/dist/react.cjs +65 -65
- package/dist/react.mjs +57 -57
- package/package.json +22 -23
- package/.env +0 -3
- package/api-extractor.json +0 -4
- package/dist/dts/new/main/edit-config/col-filters/col-filters-grid.helpers.test.d.ts +0 -2
- package/dist/dts/new/main/edit-config/col-filters/col-filters-grid.helpers.test.d.ts.map +0 -1
- package/dist/dts/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.test.d.ts +0 -2
- package/dist/dts/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.test.d.ts.map +0 -1
- package/dist/dts/new/main/edit-config/data-transforms-derived-fields/data-transforms.helpers.test.d.ts +0 -2
- package/dist/dts/new/main/edit-config/data-transforms-derived-fields/data-transforms.helpers.test.d.ts.map +0 -1
- package/dist/dts/new/main/edit-config/datasource-config/datasources-config-container.helpers.test.d.ts +0 -2
- package/dist/dts/new/main/edit-config/datasource-config/datasources-config-container.helpers.test.d.ts.map +0 -1
- package/dist/dts/new/main/edit-config/row-filters/row-filters.helpers.test.d.ts +0 -2
- package/dist/dts/new/main/edit-config/row-filters/row-filters.helpers.test.d.ts.map +0 -1
- package/dist/dts/new/main/edit-config/shared/datasource-data-base-component.test.d.ts +0 -5
- package/dist/dts/new/main/edit-config/shared/datasource-data-base-component.test.d.ts.map +0 -1
- package/dist/dts/new/utils/alias-generator.test.d.ts +0 -2
- package/dist/dts/new/utils/alias-generator.test.d.ts.map +0 -1
- package/dist/dts/new/utils/endpoint.test.d.ts +0 -2
- package/dist/dts/new/utils/endpoint.test.d.ts.map +0 -1
- package/dist/dts/new/utils/transformers.test.d.ts +0 -2
- package/dist/dts/new/utils/transformers.test.d.ts.map +0 -1
- package/dist/dts/new/utils/validators.test.d.ts +0 -2
- package/dist/dts/new/utils/validators.test.d.ts.map +0 -1
- package/dist/dts/old/main/main.test.d.ts +0 -2
- package/dist/dts/old/main/main.test.d.ts.map +0 -1
- package/dist/dts/old/utils/filterObjectArray.test.d.ts +0 -2
- package/dist/dts/old/utils/filterObjectArray.test.d.ts.map +0 -1
- package/dist/esm/new/main/edit-config/col-filters/col-filters-grid.helpers.test.js +0 -200
- package/dist/esm/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.test.js +0 -152
- package/dist/esm/new/main/edit-config/data-transforms-derived-fields/data-transforms.helpers.test.js +0 -629
- package/dist/esm/new/main/edit-config/datasource-config/datasources-config-container.helpers.test.js +0 -268
- package/dist/esm/new/main/edit-config/row-filters/row-filters.helpers.test.js +0 -1
- package/dist/esm/new/main/edit-config/shared/datasource-data-base-component.test.js +0 -426
- package/dist/esm/new/utils/alias-generator.test.js +0 -36
- package/dist/esm/new/utils/endpoint.test.js +0 -162
- package/dist/esm/new/utils/transformers.test.js +0 -469
- package/dist/esm/new/utils/validators.test.js +0 -139
- package/dist/esm/old/main/main.test.js +0 -5
- package/dist/esm/old/utils/filterObjectArray.test.js +0 -46
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/globals.d.ts +0 -7
- package/src/index.federated.ts +0 -1
- package/src/index.ts +0 -8
- package/src/new/components/clone-report-config-modal/clone-report-config-modal.styles.ts +0 -47
- package/src/new/components/clone-report-config-modal/clone-report-config-modal.template.ts +0 -55
- package/src/new/components/clone-report-config-modal/clone-report-config-modal.ts +0 -173
- package/src/new/components/components.ts +0 -118
- package/src/new/components/renderers/data-transform-renderer.ts +0 -111
- package/src/new/components/reporting-configurations/reporting-configurations.styles.ts +0 -42
- package/src/new/components/reporting-configurations/reporting-configurations.template.ts +0 -59
- package/src/new/components/reporting-configurations/reporting-configurations.ts +0 -366
- package/src/new/components/shared/file-template-picker.template.ts +0 -45
- package/src/new/lib/redux-store/README.md +0 -55
- package/src/new/lib/redux-store/index.ts +0 -2
- package/src/new/lib/redux-store/state-utils.ts +0 -1
- package/src/new/lib/redux-store/store.ts +0 -135
- package/src/new/main/edit-config/base-config/base-config.styles.ts +0 -26
- package/src/new/main/edit-config/base-config/base-config.template.ts +0 -71
- package/src/new/main/edit-config/base-config/base-config.ts +0 -116
- package/src/new/main/edit-config/col-filters/col-filters-grid.helpers.test.ts +0 -232
- package/src/new/main/edit-config/col-filters/col-filters-grid.helpers.ts +0 -35
- package/src/new/main/edit-config/col-filters/col-filters-grid.styles.ts +0 -22
- package/src/new/main/edit-config/col-filters/col-filters-grid.ts +0 -150
- package/src/new/main/edit-config/col-filters/col-filters-grid.types.ts +0 -7
- package/src/new/main/edit-config/col-filters/col-filters-tutorial.ts +0 -25
- package/src/new/main/edit-config/col-filters/col-fitlers-grid.template.ts +0 -15
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.test.ts +0 -187
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.ts +0 -89
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.styles.ts +0 -22
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.template.ts +0 -14
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.ts +0 -119
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.types.ts +0 -10
- package/src/new/main/edit-config/col-rename-alias/col-rename-alias-tutorial.ts +0 -33
- package/src/new/main/edit-config/config-journey-orchestrator.styles.ts +0 -120
- package/src/new/main/edit-config/config-journey-orchestrator.template.ts +0 -149
- package/src/new/main/edit-config/config-journey-orchestrator.ts +0 -92
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms-tutorial.ts +0 -127
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.helpers.test.ts +0 -799
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.helpers.ts +0 -371
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.styles.ts +0 -22
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.template.ts +0 -21
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.ts +0 -162
- package/src/new/main/edit-config/data-transforms-derived-fields/data-transforms.types.ts +0 -211
- package/src/new/main/edit-config/data-transforms-derived-fields/date-format-modal/date-format-modal.styles.ts +0 -79
- package/src/new/main/edit-config/data-transforms-derived-fields/date-format-modal/date-format-modal.template.ts +0 -217
- package/src/new/main/edit-config/data-transforms-derived-fields/date-format-modal/date-format-modal.ts +0 -280
- package/src/new/main/edit-config/data-transforms-derived-fields/date-format-modal/index.ts +0 -1
- package/src/new/main/edit-config/data-transforms-derived-fields/format-warning.ts +0 -43
- package/src/new/main/edit-config/data-transforms-derived-fields/number-format-modal/index.ts +0 -1
- package/src/new/main/edit-config/data-transforms-derived-fields/number-format-modal/number-format-modal.styles.ts +0 -68
- package/src/new/main/edit-config/data-transforms-derived-fields/number-format-modal/number-format-modal.template.ts +0 -93
- package/src/new/main/edit-config/data-transforms-derived-fields/number-format-modal/number-format-modal.ts +0 -152
- package/src/new/main/edit-config/datasource-config/datasource-config-container.styles.ts +0 -22
- package/src/new/main/edit-config/datasource-config/datasource-config-item.styles.ts +0 -76
- package/src/new/main/edit-config/datasource-config/datasource-config-item.template.ts +0 -141
- package/src/new/main/edit-config/datasource-config/datasource-config-item.ts +0 -212
- package/src/new/main/edit-config/datasource-config/datasources-config-container.helpers.test.ts +0 -341
- package/src/new/main/edit-config/datasource-config/datasources-config-container.helpers.ts +0 -99
- package/src/new/main/edit-config/datasource-config/datasources-config-container.template.ts +0 -68
- package/src/new/main/edit-config/datasource-config/datasources-config-container.ts +0 -55
- package/src/new/main/edit-config/datasource-config/types.ts +0 -6
- package/src/new/main/edit-config/outputs-config/outputs-config.style.ts +0 -11
- package/src/new/main/edit-config/outputs-config/outputs-config.template.ts +0 -66
- package/src/new/main/edit-config/outputs-config/outputs-config.ts +0 -66
- package/src/new/main/edit-config/row-filters/row-filters-tutorial.styles.ts +0 -16
- package/src/new/main/edit-config/row-filters/row-filters-tutorial.template.ts +0 -229
- package/src/new/main/edit-config/row-filters/row-filters-tutorial.ts +0 -15
- package/src/new/main/edit-config/row-filters/row-filters.helpers.test.ts +0 -2
- package/src/new/main/edit-config/row-filters/row-filters.helpers.ts +0 -53
- package/src/new/main/edit-config/row-filters/row-filters.styles.ts +0 -23
- package/src/new/main/edit-config/row-filters/row-filters.template.ts +0 -15
- package/src/new/main/edit-config/row-filters/row-filters.ts +0 -58
- package/src/new/main/edit-config/row-filters/row-filters.types.ts +0 -14
- package/src/new/main/edit-config/scheduling/scheduling.styles.ts +0 -59
- package/src/new/main/edit-config/scheduling/scheduling.template.ts +0 -80
- package/src/new/main/edit-config/scheduling/scheduling.ts +0 -101
- package/src/new/main/edit-config/shared/datasource-data-base-component.helpers.ts.ts +0 -250
- package/src/new/main/edit-config/shared/datasource-data-base-component.test.ts +0 -568
- package/src/new/main/edit-config/shared/datasource-data-base-component.ts +0 -65
- package/src/new/main/edit-config/shared/datasource-data-base-component.types.ts +0 -55
- package/src/new/main/edit-config/shared/index.ts +0 -3
- package/src/new/main/edit-config/tabbed-datasource-container/index.ts +0 -2
- package/src/new/main/edit-config/tabbed-datasource-container/tabbed-datasource-container.styles.ts +0 -12
- package/src/new/main/edit-config/tabbed-datasource-container/tabbed-datasource-container.template.ts +0 -29
- package/src/new/main/edit-config/tabbed-datasource-container/tabbed-datasource-container.ts +0 -69
- package/src/new/main/edit-config/tabbed-datasource-container/tabbed-datasource-container.types.ts +0 -7
- package/src/new/main/generated-reports/generated-reports.styles.ts +0 -15
- package/src/new/main/generated-reports/generated-reports.template.ts +0 -29
- package/src/new/main/generated-reports/generated-reports.ts +0 -270
- package/src/new/main/index.ts +0 -3
- package/src/new/main/main.styles.ts +0 -31
- package/src/new/main/main.template.ts +0 -92
- package/src/new/main/main.ts +0 -117
- package/src/new/main/report-destinations/report-destinations.template.ts +0 -39
- package/src/new/main/report-destinations/report-destinations.ts +0 -63
- package/src/new/store/index.ts +0 -3
- package/src/new/store/slices/base-config.ts +0 -50
- package/src/new/store/slices/datasources-config.ts +0 -297
- package/src/new/store/slices/index.ts +0 -3
- package/src/new/store/slices/types.ts +0 -90
- package/src/new/store/store.ts +0 -36
- package/src/new/store/types.ts +0 -10
- package/src/new/styles/constraints.styles.ts +0 -32
- package/src/new/styles/forms.styles.ts +0 -38
- package/src/new/styles/index.ts +0 -3
- package/src/new/styles/misc.styles.ts +0 -25
- package/src/new/types/display.ts +0 -4
- package/src/new/types/index.ts +0 -4
- package/src/new/types/misc.ts +0 -73
- package/src/new/types/redux.ts +0 -73
- package/src/new/types/rights.ts +0 -28
- package/src/new/utils/alias-generator.test.ts +0 -44
- package/src/new/utils/alias-generator.ts +0 -18
- package/src/new/utils/date-filter-params.ts +0 -28
- package/src/new/utils/endpoint.test.ts +0 -193
- package/src/new/utils/endpoint.ts +0 -62
- package/src/new/utils/event-map.ts +0 -11
- package/src/new/utils/format-utils.ts +0 -22
- package/src/new/utils/formatters.ts +0 -36
- package/src/new/utils/index.ts +0 -10
- package/src/new/utils/notifications.ts +0 -9
- package/src/new/utils/renderer.ts +0 -38
- package/src/new/utils/rights.ts +0 -66
- package/src/new/utils/sorter.ts +0 -19
- package/src/new/utils/tooltip.ts +0 -94
- package/src/new/utils/transformers.test.ts +0 -549
- package/src/new/utils/transformers.ts +0 -174
- package/src/new/utils/validators.test.ts +0 -165
- package/src/new/utils/validators.ts +0 -81
- package/src/old/assets/images/index.ts +0 -69
- package/src/old/components/create-edit/create-edit.styles.ts +0 -16
- package/src/old/components/create-edit/create-edit.template.ts +0 -15
- package/src/old/components/create-edit/create-edit.ts +0 -70
- package/src/old/components/create-edit/index.ts +0 -3
- package/src/old/components/list/columns.ts +0 -175
- package/src/old/components/list/index.ts +0 -3
- package/src/old/components/list/list.styles.ts +0 -9
- package/src/old/components/list/list.template.ts +0 -40
- package/src/old/components/list/list.ts +0 -109
- package/src/old/components/preview/columns.ts +0 -58
- package/src/old/components/preview/index.ts +0 -3
- package/src/old/components/preview/preview.styles.ts +0 -22
- package/src/old/components/preview/preview.template.ts +0 -33
- package/src/old/components/preview/preview.ts +0 -143
- package/src/old/components/rapid-components.ts +0 -64
- package/src/old/components/renderers/custom-header-component.ts +0 -92
- package/src/old/components/renderers/filter-value-renderer.ts +0 -237
- package/src/old/components/renderers/row-select.renderer.ts +0 -148
- package/src/old/components/select-fields/columns.ts +0 -83
- package/src/old/components/select-fields/data.ts +0 -218
- package/src/old/components/select-fields/index.ts +0 -3
- package/src/old/components/select-fields/select-fields.styles.ts +0 -22
- package/src/old/components/select-fields/select-fields.template.ts +0 -58
- package/src/old/components/select-fields/select-fields.ts +0 -218
- package/src/old/components/select-filters/columns.ts +0 -78
- package/src/old/components/select-filters/index.ts +0 -3
- package/src/old/components/select-filters/select-filters.styles.ts +0 -21
- package/src/old/components/select-filters/select-filters.template.ts +0 -58
- package/src/old/components/select-filters/select-filters.ts +0 -255
- package/src/old/components/wizard/debug.ts +0 -35
- package/src/old/components/wizard/index.ts +0 -2
- package/src/old/components/wizard/steps/filters.ts +0 -13
- package/src/old/components/wizard/steps/index.ts +0 -4
- package/src/old/components/wizard/steps/name.ts +0 -72
- package/src/old/components/wizard/steps/run.ts +0 -14
- package/src/old/components/wizard/steps/select.ts +0 -14
- package/src/old/components/wizard/wizard.styles.ts +0 -198
- package/src/old/components/wizard/wizard.template.ts +0 -147
- package/src/old/components/wizard/wizard.ts +0 -398
- package/src/old/components/wizard/wizard.types.ts +0 -43
- package/src/old/components/zero-components.ts +0 -61
- package/src/old/config/config.ts +0 -59
- package/src/old/config/configure.ts +0 -66
- package/src/old/config/index.ts +0 -2
- package/src/old/config/templates.ts +0 -59
- package/src/old/constants/grid-config.ts +0 -19
- package/src/old/layouts/default.ts +0 -30
- package/src/old/layouts/index.ts +0 -2
- package/src/old/layouts/two-pane-horizontal.ts +0 -81
- package/src/old/main/index.ts +0 -3
- package/src/old/main/main.styles.ts +0 -69
- package/src/old/main/main.template.ts +0 -127
- package/src/old/main/main.test.ts +0 -7
- package/src/old/main/main.ts +0 -250
- package/src/old/main/types.ts +0 -29
- package/src/old/styles/colors.ts +0 -16
- package/src/old/styles/helpers.ts +0 -181
- package/src/old/styles/index.ts +0 -4
- package/src/old/styles/normalize.ts +0 -14
- package/src/old/styles/styles.ts +0 -24
- package/src/old/tags/index.ts +0 -1
- package/src/old/tags/tags.ts +0 -79
- package/src/old/tsconfig.json +0 -10
- package/src/old/utils/filterObjectArray.test.ts +0 -110
- package/src/old/utils/filterObjectArray.ts +0 -23
- package/src/old/utils/getFiltersByType.ts +0 -92
- package/src/old/utils/getSelectedFields.ts +0 -16
- package/src/old/utils/index.ts +0 -4
- package/src/old/utils/logger.ts +0 -3
- package/src/sandbox.ts +0 -51
- package/src/tsconfig.base.json +0 -24
- package/src/typings.d.ts +0 -1
- package/tsconfig.json +0 -9
package/src/new/main/edit-config/tabbed-datasource-container/tabbed-datasource-container.template.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { html, ref, repeat } from '@genesislcap/web-core';
|
|
2
|
-
import { DatasourceConfig, DatasourceName, selectors } from '../../../store';
|
|
3
|
-
import type { TabbedDatasourceContainer } from './tabbed-datasource-container';
|
|
4
|
-
import { TABBED_DATASOURCE_HEADER_SLOT } from './tabbed-datasource-container.types';
|
|
5
|
-
|
|
6
|
-
export const template = html<TabbedDatasourceContainer>`
|
|
7
|
-
<template>
|
|
8
|
-
<slot name="${(_) => TABBED_DATASOURCE_HEADER_SLOT}"></slot>
|
|
9
|
-
<rapid-tabs ${ref('tabs')}>
|
|
10
|
-
${repeat(
|
|
11
|
-
(_) => Object.entries(selectors.datasourceConfig.getAllConfigSet()),
|
|
12
|
-
html<[DatasourceName, DatasourceConfig[DatasourceName]], TabbedDatasourceContainer>`
|
|
13
|
-
<rapid-tab @click=${(x, c) => c.parent.handleDatasourceChanged(x[0])}>
|
|
14
|
-
${(x) => x[1].KEY}
|
|
15
|
-
</rapid-tab>
|
|
16
|
-
`,
|
|
17
|
-
)}
|
|
18
|
-
<!-- rapid-tab-panel unused for content, only used to make the rapid-tabs work correctly -->
|
|
19
|
-
${repeat(
|
|
20
|
-
(_) => Object.entries(selectors.datasourceConfig.getAllConfigSet()),
|
|
21
|
-
html<[DatasourceName, DatasourceConfig[DatasourceName]], TabbedDatasourceContainer>`
|
|
22
|
-
<rapid-tab-panel></rapid-tab-panel>
|
|
23
|
-
`,
|
|
24
|
-
)}
|
|
25
|
-
</rapid-tabs>
|
|
26
|
-
<!-- real content goes into this slot -->
|
|
27
|
-
<div class="slot"><slot></slot></div>
|
|
28
|
-
</template>
|
|
29
|
-
`;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Tabs } from '@genesislcap/rapid-design-system';
|
|
2
|
-
import { customElement, DOM, GenesisElement, observable } from '@genesislcap/web-core';
|
|
3
|
-
import { DatasourceName, selectors } from '../../../store';
|
|
4
|
-
import { styles } from './tabbed-datasource-container.styles';
|
|
5
|
-
import { template } from './tabbed-datasource-container.template';
|
|
6
|
-
import { MultiDatasourceHandler } from './tabbed-datasource-container.types';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This is a container which wraps up content which should
|
|
10
|
-
* implement MultiDatasourceHandler interface, and this will
|
|
11
|
-
* handle passing in the relevant `datasourceName` to it.
|
|
12
|
-
*
|
|
13
|
-
* This uses rapid-tabs just for the tabs themselves, but
|
|
14
|
-
* performs virtual tabbing by just using one slotted component
|
|
15
|
-
* but changing the `datasourceName` attribute as you click through tabs
|
|
16
|
-
*
|
|
17
|
-
* This uses the IntersectionObserver to know when the instance is visible (on the stepper steps) and if it's not then it supplies `null` as the `datasourceName` for the slotted content
|
|
18
|
-
*/
|
|
19
|
-
@customElement({
|
|
20
|
-
name: 'tabbed-datasource-container',
|
|
21
|
-
template,
|
|
22
|
-
styles,
|
|
23
|
-
})
|
|
24
|
-
export class TabbedDatasourceContainer extends GenesisElement implements MultiDatasourceHandler {
|
|
25
|
-
@observable datasourceName: MultiDatasourceHandler['datasourceName'];
|
|
26
|
-
@observable isActive = false;
|
|
27
|
-
|
|
28
|
-
@observable tabs: Tabs;
|
|
29
|
-
|
|
30
|
-
isActiveChanged(_, active: boolean) {
|
|
31
|
-
const tabIndex = Math.min(
|
|
32
|
-
this.tabs?.currentTabIndex ?? 0,
|
|
33
|
-
Object.keys(selectors.datasourceConfig.getAllConfigSet()).length - 1,
|
|
34
|
-
);
|
|
35
|
-
const newVal: MultiDatasourceHandler['datasourceName'] = active
|
|
36
|
-
? (Object.keys(selectors.datasourceConfig.getAllConfigSet())[tabIndex] as DatasourceName)
|
|
37
|
-
: null;
|
|
38
|
-
DOM.queueUpdate(() => this.handleDatasourceChanged(newVal));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private observer: IntersectionObserver;
|
|
42
|
-
|
|
43
|
-
connectedCallback() {
|
|
44
|
-
super.connectedCallback();
|
|
45
|
-
this.observer = new IntersectionObserver(
|
|
46
|
-
(entries) => (this.isActive = Boolean(entries.find((entry) => entry.isIntersecting))),
|
|
47
|
-
);
|
|
48
|
-
this.observer.observe(this);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
disconnectedCallback(): void {
|
|
52
|
-
this.observer.unobserve(this);
|
|
53
|
-
super.disconnectedCallback();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
handleDatasourceChanged(key: MultiDatasourceHandler['datasourceName']) {
|
|
57
|
-
this.datasourceName = key;
|
|
58
|
-
const slot = this.shadowRoot?.querySelector('div.slot slot') as HTMLSlotElement;
|
|
59
|
-
if (!slot) throw new Error(`TabbedDatasourceContainer unable to find slot content`);
|
|
60
|
-
slot.assignedElements().forEach((c) => {
|
|
61
|
-
if (!('datasourceName' in c)) {
|
|
62
|
-
throw new Error(
|
|
63
|
-
`Incompatible element used as TabbedDatasourceContainer slot content - ${c.nodeName}`,
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
(c as unknown as MultiDatasourceHandler).datasourceName = this.datasourceName;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { css } from '@genesislcap/web-core';
|
|
2
|
-
|
|
3
|
-
export const GeneratedReportsStyles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.container {
|
|
12
|
-
padding: calc(var(--design-unit) * 4px);
|
|
13
|
-
width: 40%;
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { customEvent } from '@genesislcap/foundation-events';
|
|
2
|
-
import { html, ref } from '@genesislcap/web-core';
|
|
3
|
-
import { Permissions } from '../../types';
|
|
4
|
-
import { permissionTemplateGuard } from '../../utils';
|
|
5
|
-
import type { GeneratedReports } from './generated-reports';
|
|
6
|
-
|
|
7
|
-
const viewTemplate = html<GeneratedReports>`
|
|
8
|
-
<!-- <div class="container">
|
|
9
|
-
<rapid-search-bar
|
|
10
|
-
:options="${(x) => x.searchBarConfig}"
|
|
11
|
-
@selectionChange=${(x, ctx) => x.searchChanged(customEvent(ctx))}
|
|
12
|
-
></rapid-search-bar>
|
|
13
|
-
</div> -->
|
|
14
|
-
<rapid-grid-pro data-test-id="generated-reports-grid" only-template-col-defs>
|
|
15
|
-
<grid-pro-genesis-datasource
|
|
16
|
-
${ref('generatedReportsDatasource')}
|
|
17
|
-
resource-name="GENERATED_REPORTS"
|
|
18
|
-
reverse="true"
|
|
19
|
-
criteria="${(x) => x.gridCriteria}"
|
|
20
|
-
:deferredGridOptions=${(x) => x.getGridOptions()}
|
|
21
|
-
max-rows="500"
|
|
22
|
-
></grid-pro-genesis-datasource>
|
|
23
|
-
</rapid-grid-pro>
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const GeneratedReportsTemplate = html<GeneratedReports>`
|
|
27
|
-
${(x) =>
|
|
28
|
-
permissionTemplateGuard(x, [Permissions.ReportView, Permissions.ReportRun], viewTemplate)}
|
|
29
|
-
`;
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { ColDef, RowDataUpdatedEvent } from '@ag-grid-community/core';
|
|
2
|
-
import { Connect, logger } from '@genesislcap/foundation-comms';
|
|
3
|
-
import { getCriteriaBuilder, INPUT_MIN_LENGTH, SelectedOption } from '@genesislcap/foundation-ui';
|
|
4
|
-
import { User } from '@genesislcap/foundation-user';
|
|
5
|
-
import { GridOptionsConfig, GridProGenesisDatasource } from '@genesislcap/rapid-grid-pro';
|
|
6
|
-
import { customElement, GenesisElement, html, observable } from '@genesislcap/web-core';
|
|
7
|
-
import { Permissions } from '../../types';
|
|
8
|
-
import { permissionGuard, showNotificationToast } from '../../utils';
|
|
9
|
-
import { getFilterParams } from '../../utils/date-filter-params';
|
|
10
|
-
import { getEndpointUrl, tryReadFromSession } from '../../utils/endpoint';
|
|
11
|
-
import { getFormattedDateTime } from '../../utils/formatters';
|
|
12
|
-
import { buttonCellRenderer } from '../../utils/renderer';
|
|
13
|
-
import { GeneratedReportsStyles as styles } from './generated-reports.styles';
|
|
14
|
-
import { GeneratedReportsTemplate as template } from './generated-reports.template';
|
|
15
|
-
|
|
16
|
-
@customElement({
|
|
17
|
-
name: 'generated-reports',
|
|
18
|
-
template,
|
|
19
|
-
styles,
|
|
20
|
-
})
|
|
21
|
-
export class GeneratedReports extends GenesisElement {
|
|
22
|
-
@Connect connect: Connect;
|
|
23
|
-
generatedReportsDatasource: GridProGenesisDatasource;
|
|
24
|
-
generatedReportId: string | null;
|
|
25
|
-
@observable gridCriteria: string = '';
|
|
26
|
-
|
|
27
|
-
@User user!: User;
|
|
28
|
-
|
|
29
|
-
public searchBarConfig = [
|
|
30
|
-
{
|
|
31
|
-
field: 'NAME',
|
|
32
|
-
label: (searchTerm) => `${searchTerm} as NAME`,
|
|
33
|
-
createCriteria: getCriteriaBuilder,
|
|
34
|
-
isEnabled: (searchTerm, selectedOption) => {
|
|
35
|
-
return (
|
|
36
|
-
searchTerm.length >= INPUT_MIN_LENGTH && !selectedOption.some((e) => e.field === 'NAME')
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
field: 'FILE_NAME',
|
|
42
|
-
label: (searchTerm) => `${searchTerm} as FILE_NAME`,
|
|
43
|
-
createCriteria: getCriteriaBuilder,
|
|
44
|
-
isEnabled: (searchTerm, selectedOption) => {
|
|
45
|
-
return (
|
|
46
|
-
searchTerm.length >= INPUT_MIN_LENGTH &&
|
|
47
|
-
!selectedOption.some((e) => e.field === 'FILE_NAME')
|
|
48
|
-
);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
field: 'STATUS',
|
|
53
|
-
label: (searchTerm) => `${searchTerm} as STATUS`,
|
|
54
|
-
createCriteria: getCriteriaBuilder,
|
|
55
|
-
isEnabled: (searchTerm, selectedOption) => {
|
|
56
|
-
return (
|
|
57
|
-
searchTerm.length >= INPUT_MIN_LENGTH && !selectedOption.some((e) => e.field === 'STATUS')
|
|
58
|
-
);
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
getColor = (result: string) => {
|
|
64
|
-
switch (result) {
|
|
65
|
-
case 'Generated':
|
|
66
|
-
case 'Delivered':
|
|
67
|
-
return 'var(--success-color)';
|
|
68
|
-
case 'Pending':
|
|
69
|
-
return 'var(--warning-color)';
|
|
70
|
-
case 'Failed':
|
|
71
|
-
return 'var(--error-color)';
|
|
72
|
-
default:
|
|
73
|
-
return 'yellow';
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
getStatusRenderer = (value) => {
|
|
78
|
-
return `<div style="color: ${this.getColor(value)};">${value}</div>`;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
getColumnDefs() {
|
|
82
|
-
const columnDefs: ColDef[] = [
|
|
83
|
-
{
|
|
84
|
-
field: 'NAME',
|
|
85
|
-
headerName: 'Report Config',
|
|
86
|
-
minWidth: 180,
|
|
87
|
-
flex: 1,
|
|
88
|
-
cellStyle: { display: 'flex' },
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
field: 'FILE_NAME',
|
|
92
|
-
headerName: 'File',
|
|
93
|
-
minWidth: 150,
|
|
94
|
-
flex: 1,
|
|
95
|
-
cellStyle: { display: 'flex' },
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
field: 'STATUS',
|
|
99
|
-
headerName: 'Status',
|
|
100
|
-
minWidth: 150,
|
|
101
|
-
cellRenderer: (params) => this.getStatusRenderer(params.data.STATUS),
|
|
102
|
-
flex: 1,
|
|
103
|
-
cellStyle: { display: 'flex' },
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
field: 'CREATED_BY',
|
|
107
|
-
headerName: 'Created By',
|
|
108
|
-
minWidth: 150,
|
|
109
|
-
flex: 1,
|
|
110
|
-
cellStyle: { display: 'flex' },
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
field: 'LAST_UPDATED_AT',
|
|
114
|
-
headerName: 'Created Date',
|
|
115
|
-
minWidth: 150,
|
|
116
|
-
flex: 1,
|
|
117
|
-
sortable: true,
|
|
118
|
-
sort: 'desc',
|
|
119
|
-
cellStyle: { display: 'flex' },
|
|
120
|
-
filter: 'agDateColumnFilter',
|
|
121
|
-
filterParams: getFilterParams(),
|
|
122
|
-
valueFormatter: (rowData) => getFormattedDateTime(rowData.data.LAST_UPDATED_AT),
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
field: 'MESSAGE',
|
|
126
|
-
headerName: 'Failure Reason',
|
|
127
|
-
minWidth: 300,
|
|
128
|
-
flex: 1,
|
|
129
|
-
tooltipField: 'MESSAGE',
|
|
130
|
-
cellStyle: {
|
|
131
|
-
whiteSpace: 'nowrap',
|
|
132
|
-
overflow: 'hidden',
|
|
133
|
-
textOverflow: 'ellipsis',
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
permissionGuard(this, Permissions.ReportDelete)
|
|
137
|
-
? buttonCellRenderer(
|
|
138
|
-
'Delete',
|
|
139
|
-
(e) => this.deleteReport(e.GENERATED_REPORT_ID),
|
|
140
|
-
html`
|
|
141
|
-
<rapid-icon
|
|
142
|
-
style="opacity: 0.5"
|
|
143
|
-
variant="regular"
|
|
144
|
-
name="trash-alt"
|
|
145
|
-
size="lg"
|
|
146
|
-
></rapid-icon>
|
|
147
|
-
`,
|
|
148
|
-
)
|
|
149
|
-
: null,
|
|
150
|
-
buttonCellRenderer(
|
|
151
|
-
'Download',
|
|
152
|
-
(e) => this.downloadReport(e.REPORT_FILE_STORAGE_ID),
|
|
153
|
-
html`
|
|
154
|
-
<rapid-icon style="opacity: 0.5" variant="solid" name="download" size="lg"></rapid-icon>
|
|
155
|
-
`,
|
|
156
|
-
(e) => e.STATUS === 'Failed',
|
|
157
|
-
),
|
|
158
|
-
].filter(Boolean) as ColDef[];
|
|
159
|
-
return columnDefs;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
getGridOptions() {
|
|
163
|
-
const gridOptions: GridOptionsConfig = {
|
|
164
|
-
defaultColDef: {
|
|
165
|
-
filter: true,
|
|
166
|
-
floatingFilter: false,
|
|
167
|
-
sortable: false,
|
|
168
|
-
suppressMenu: false,
|
|
169
|
-
},
|
|
170
|
-
suppressRowClickSelection: true,
|
|
171
|
-
columnDefs: this.getColumnDefs(),
|
|
172
|
-
getRowId: (params) => params.data.GENERATED_REPORT_ID,
|
|
173
|
-
headerHeight: 30,
|
|
174
|
-
rowHeight: 32,
|
|
175
|
-
tooltipShowDelay: 0,
|
|
176
|
-
};
|
|
177
|
-
gridOptions.onRowDataUpdated = (params: RowDataUpdatedEvent) => {
|
|
178
|
-
if (this.generatedReportId) {
|
|
179
|
-
params.api.forEachNode((node) => {
|
|
180
|
-
if (node.data.GENERATED_REPORT_ID === this.generatedReportId) {
|
|
181
|
-
node.setSelected(true);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
return gridOptions;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
private async downloadReport(fileStorageId: string) {
|
|
191
|
-
const headers = new Headers();
|
|
192
|
-
headers.append('SESSION_AUTH_TOKEN', tryReadFromSession('authToken'));
|
|
193
|
-
const endpoint = getEndpointUrl(`file-server/download?fileStorageId=${fileStorageId}`);
|
|
194
|
-
try {
|
|
195
|
-
let filename;
|
|
196
|
-
fetch(endpoint, {
|
|
197
|
-
method: 'GET',
|
|
198
|
-
headers: headers,
|
|
199
|
-
})
|
|
200
|
-
.then((response) => {
|
|
201
|
-
const contentDispositionHeader = response.headers.get('Content-disposition');
|
|
202
|
-
filename = contentDispositionHeader
|
|
203
|
-
?.split(';')[1]
|
|
204
|
-
.split('filename')[1]
|
|
205
|
-
.split('=')[1]
|
|
206
|
-
.trim();
|
|
207
|
-
return response.blob();
|
|
208
|
-
})
|
|
209
|
-
.then((blob) => URL.createObjectURL(blob))
|
|
210
|
-
.then((url) => {
|
|
211
|
-
const a = document.createElement('a');
|
|
212
|
-
a.style.display = 'none';
|
|
213
|
-
a.href = url;
|
|
214
|
-
a.download = filename;
|
|
215
|
-
document.body.appendChild(a);
|
|
216
|
-
a.click();
|
|
217
|
-
window.URL.revokeObjectURL(url);
|
|
218
|
-
});
|
|
219
|
-
} catch (error) {
|
|
220
|
-
logger.error(error);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
private async deleteReport(generatedReportId) {
|
|
225
|
-
try {
|
|
226
|
-
const deleteResponse = await this.connect.commitEvent('EVENT_GENERATED_REPORT_DELETE', {
|
|
227
|
-
DETAILS: {
|
|
228
|
-
GENERATED_REPORT_ID: generatedReportId,
|
|
229
|
-
},
|
|
230
|
-
IGNORE_WARNINGS: true,
|
|
231
|
-
VALIDATE: false,
|
|
232
|
-
});
|
|
233
|
-
if (deleteResponse.MESSAGE_TYPE === 'EVENT_ACK') {
|
|
234
|
-
this.generatedReportsDatasource.deferredGridOptions = this.getGridOptions();
|
|
235
|
-
this.generatedReportsDatasource.restart();
|
|
236
|
-
showNotificationToast({
|
|
237
|
-
title: 'Delete Report',
|
|
238
|
-
body: `'${generatedReportId}' was deleted successfully`,
|
|
239
|
-
toast: { type: 'success' as any },
|
|
240
|
-
});
|
|
241
|
-
} else {
|
|
242
|
-
const error = deleteResponse?.ERROR?.length ? deleteResponse.ERROR[0].TEXT : '';
|
|
243
|
-
showNotificationToast({
|
|
244
|
-
title: 'Delete Report',
|
|
245
|
-
body: `'${generatedReportId}' was not deleted due to following error "${error}"`,
|
|
246
|
-
toast: { type: 'critical' as any },
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
} catch (err) {
|
|
250
|
-
logger.error(err);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
searchChanged(event: CustomEvent<Array<SelectedOption>>) {
|
|
255
|
-
const options = event.detail;
|
|
256
|
-
const criteriaBuilder = options
|
|
257
|
-
.map((option) => {
|
|
258
|
-
const { field, term, createCriteria } = option;
|
|
259
|
-
if (createCriteria) {
|
|
260
|
-
return createCriteria(field, term);
|
|
261
|
-
} else {
|
|
262
|
-
logger.debug('Cannot convert search option into criteria', option);
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
})
|
|
266
|
-
.filter((x) => x)
|
|
267
|
-
.join(' && ');
|
|
268
|
-
this.gridCriteria = criteriaBuilder;
|
|
269
|
-
}
|
|
270
|
-
}
|
package/src/new/main/index.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { css } from '@genesislcap/web-core';
|
|
2
|
-
|
|
3
|
-
export const MainStyles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: block;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
rapid-design-system-provider {
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
rapid-tabs {
|
|
16
|
-
--base-height-multiplier: 10;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
rapid-tabs::part(tablist) {
|
|
20
|
-
place-self: flex-start;
|
|
21
|
-
border-bottom: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
rapid-tabs::part(tabpanel) {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
flex: 1;
|
|
28
|
-
min-height: 0;
|
|
29
|
-
border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { avoidTreeShaking } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html, ref, when, whenElse } from '@genesislcap/web-core';
|
|
3
|
-
import { ReportingConfigurations } from '../components/reporting-configurations/reporting-configurations';
|
|
4
|
-
import { ConfigJourneyOrchestrator } from './edit-config/config-journey-orchestrator';
|
|
5
|
-
import { GeneratedReports } from './generated-reports/generated-reports';
|
|
6
|
-
import type { Reporting } from './main';
|
|
7
|
-
import { ReportDestinations } from './report-destinations/report-destinations';
|
|
8
|
-
|
|
9
|
-
avoidTreeShaking(
|
|
10
|
-
ReportingConfigurations,
|
|
11
|
-
ConfigJourneyOrchestrator,
|
|
12
|
-
ReportDestinations,
|
|
13
|
-
GeneratedReports,
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export enum ReportingTab {
|
|
17
|
-
REPORT_CONFIGURATIONS,
|
|
18
|
-
CREATE_REPORT,
|
|
19
|
-
REPORT_DESTINATIONS,
|
|
20
|
-
GENERATED_REPORTS,
|
|
21
|
-
}
|
|
22
|
-
export const MainTemplate = html<Reporting>`
|
|
23
|
-
${when(
|
|
24
|
-
(x) => x.ready,
|
|
25
|
-
html<Reporting>`
|
|
26
|
-
<rapid-tabs
|
|
27
|
-
${ref('tabs')}
|
|
28
|
-
appearance="secondary"
|
|
29
|
-
class="tabs"
|
|
30
|
-
data-test-id="tabs"
|
|
31
|
-
@change=${(x, c) => x.handleTabsChange(c.event as CustomEvent)}
|
|
32
|
-
>
|
|
33
|
-
<span part="start" class="start" slot="start" data-test-id="reporting-tab">Reporting</span>
|
|
34
|
-
<rapid-tab
|
|
35
|
-
appearance="secondary"
|
|
36
|
-
id=${ReportingTab.REPORT_CONFIGURATIONS}
|
|
37
|
-
slot="report-configurations-tab"
|
|
38
|
-
data-test-id="list-reports-tab"
|
|
39
|
-
>
|
|
40
|
-
Report Configuration
|
|
41
|
-
</rapid-tab>
|
|
42
|
-
<rapid-tab
|
|
43
|
-
appearance="secondary"
|
|
44
|
-
id=${ReportingTab.REPORT_DESTINATIONS}
|
|
45
|
-
slot="report-destinations-tab"
|
|
46
|
-
data-test-id="report-destinations-tab"
|
|
47
|
-
>
|
|
48
|
-
Report Destinations
|
|
49
|
-
</rapid-tab>
|
|
50
|
-
<rapid-tab
|
|
51
|
-
appearance="secondary"
|
|
52
|
-
id=${ReportingTab.GENERATED_REPORTS}
|
|
53
|
-
slot="generated-reports-tab"
|
|
54
|
-
data-test-id="generated-reports-tab"
|
|
55
|
-
>
|
|
56
|
-
Generated Reports
|
|
57
|
-
</rapid-tab>
|
|
58
|
-
|
|
59
|
-
<rapid-tab-panel
|
|
60
|
-
slot="report-configurations-tab"
|
|
61
|
-
class="tab-panel"
|
|
62
|
-
data-test-id="list-reports-panel"
|
|
63
|
-
>
|
|
64
|
-
${whenElse(
|
|
65
|
-
(x) => x.reportConfigMode === 'list',
|
|
66
|
-
html`
|
|
67
|
-
<reporting-configurations></reporting-configurations>
|
|
68
|
-
`,
|
|
69
|
-
html`
|
|
70
|
-
<config-journey-orchestrator></config-journey-orchestrator>
|
|
71
|
-
`,
|
|
72
|
-
)}
|
|
73
|
-
</rapid-tab-panel>
|
|
74
|
-
|
|
75
|
-
<rapid-tab-panel
|
|
76
|
-
slot="report-destinations-tab"
|
|
77
|
-
class="tab-panel"
|
|
78
|
-
data-test-id="report-destinations-tab-panel"
|
|
79
|
-
>
|
|
80
|
-
<report-destinations></report-destinations>
|
|
81
|
-
</rapid-tab-panel>
|
|
82
|
-
<rapid-tab-panel
|
|
83
|
-
slot="generated-reports-tab"
|
|
84
|
-
class="tab-panel"
|
|
85
|
-
data-test-id="generated-reports-tab-panel"
|
|
86
|
-
>
|
|
87
|
-
<generated-reports ${ref('generatedReportsComponent')}></generated-reports>
|
|
88
|
-
</rapid-tab-panel>
|
|
89
|
-
</rapid-tabs>
|
|
90
|
-
`,
|
|
91
|
-
)}
|
|
92
|
-
`;
|
package/src/new/main/main.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { Tabs } from '@genesislcap/rapid-design-system';
|
|
2
|
-
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
3
|
-
import { ReportingEventDetailMap, ReportingEvents } from '../utils/event-map';
|
|
4
|
-
import { GeneratedReports } from './generated-reports/generated-reports';
|
|
5
|
-
import { MainStyles as styles } from './main.styles';
|
|
6
|
-
import { ReportingTab, MainTemplate as template } from './main.template';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* FoundationReporting.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* Base MF export. It does not set up a design system or components.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
@customElement({
|
|
17
|
-
name: 'foundation-reporting',
|
|
18
|
-
template,
|
|
19
|
-
styles,
|
|
20
|
-
})
|
|
21
|
-
export class FoundationReporting extends GenesisElement {
|
|
22
|
-
public tabs: Tabs;
|
|
23
|
-
@observable ready: boolean = false;
|
|
24
|
-
@observable
|
|
25
|
-
reportConfigMode: ReportingEventDetailMap[ReportingEvents.setReportConfigDisplayMode] = 'list';
|
|
26
|
-
generatedReportsComponent: GeneratedReports;
|
|
27
|
-
|
|
28
|
-
async connectedCallback(): Promise<void> {
|
|
29
|
-
super.connectedCallback();
|
|
30
|
-
|
|
31
|
-
this.addEventListener(ReportingEvents.highlightGridRow, this.handleRunReportEvent);
|
|
32
|
-
this.addEventListener(
|
|
33
|
-
ReportingEvents.setReportConfigDisplayMode,
|
|
34
|
-
this.handleReportConfigDisplayMode,
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
this.ready = true;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
disconnectedCallback() {
|
|
41
|
-
this.removeEventListener(ReportingEvents.highlightGridRow, this.handleRunReportEvent);
|
|
42
|
-
this.removeEventListener(
|
|
43
|
-
ReportingEvents.setReportConfigDisplayMode,
|
|
44
|
-
this.handleReportConfigDisplayMode,
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** @internal */
|
|
49
|
-
// oxlint-disable-next-line no-empty-pattern -- unused event payload
|
|
50
|
-
handleTabsChange({}: CustomEvent) {}
|
|
51
|
-
|
|
52
|
-
handleRunReportEvent({ detail }: CustomEvent) {
|
|
53
|
-
this.generatedReportsComponent.generatedReportId = detail;
|
|
54
|
-
this.tabs.activeid = ReportingTab.GENERATED_REPORTS.toString();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
handleReportConfigDisplayMode({
|
|
58
|
-
detail,
|
|
59
|
-
}: CustomEvent<ReportingEventDetailMap[ReportingEvents.setReportConfigDisplayMode]>) {
|
|
60
|
-
this.reportConfigMode = detail;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* RapidReporting.
|
|
66
|
-
*
|
|
67
|
-
* @remarks
|
|
68
|
-
* A rapid version that pre-registers rapid components and uses the rapid design system.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* import { RapidReporting } from '@genesislcap/pbc-reporting-ui';
|
|
73
|
-
* ...
|
|
74
|
-
* RapidReporting
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @example Load the micro frontend on-demand
|
|
78
|
-
* ```ts
|
|
79
|
-
|
|
80
|
-
* const { RapidReporting } = await import('@genesislcap/pbc-reporting-ui');
|
|
81
|
-
* return RapidReporting;
|
|
82
|
-
* },
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
@customElement({
|
|
88
|
-
name: 'rapid-reporting',
|
|
89
|
-
template,
|
|
90
|
-
styles,
|
|
91
|
-
})
|
|
92
|
-
export class RapidReporting extends FoundationReporting {
|
|
93
|
-
/**
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
async connectedCallback() {
|
|
97
|
-
await this.loadRemotes();
|
|
98
|
-
await super.connectedCallback();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
protected async loadRemotes() {
|
|
105
|
-
const { registerCommonRapidComponents } = await import('../components/components');
|
|
106
|
-
await registerCommonRapidComponents();
|
|
107
|
-
// this.ready = true;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @privateRemarks
|
|
113
|
-
* Keeps backwards compatability with original export.
|
|
114
|
-
*
|
|
115
|
-
* @public
|
|
116
|
-
*/
|
|
117
|
-
export class Reporting extends RapidReporting {}
|