@genesislcap/pbc-reporting-ui 1.0.381 → 1.0.382
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/new/main/generated-reports/generated-reports.d.ts +0 -1
- package/dist/dts/new/main/generated-reports/generated-reports.d.ts.map +1 -1
- package/dist/dts/new/utils/renderer.d.ts +2 -2
- package/dist/dts/new/utils/renderer.d.ts.map +1 -1
- package/dist/esm/new/main/generated-reports/generated-reports.js +15 -22
- package/dist/esm/new/utils/renderer.js +26 -25
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ export declare class GeneratedReports extends GenesisElement {
|
|
|
10
10
|
getStatusRenderer: (value: any) => string;
|
|
11
11
|
getColumnDefs(): ColDef<any>[];
|
|
12
12
|
getGridOptions(): GridOptionsConfig;
|
|
13
|
-
private actionsCellRenderer;
|
|
14
13
|
private downloadReport;
|
|
15
14
|
private deleteReport;
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-reports.d.ts","sourceRoot":"","sources":["../../../../../src/new/main/generated-reports/generated-reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA4C,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAU,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAiB,cAAc,
|
|
1
|
+
{"version":3,"file":"generated-reports.d.ts","sourceRoot":"","sources":["../../../../../src/new/main/generated-reports/generated-reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA4C,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAU,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAiB,cAAc,EAAQ,MAAM,uBAAuB,CAAC;AAQ5E,qBAKa,gBAAiB,SAAQ,cAAc;IACzC,OAAO,EAAE,OAAO,CAAC;IAC1B,0BAA0B,EAAE,wBAAwB,CAAC;IACrD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,QAAQ,qGAYN;IAEF,iBAAiB,yBAEf;IAEF,aAAa;IAkEb,cAAc;YA6BA,cAAc;YAkCd,YAAY;CAmC3B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
2
|
+
export declare const buttonCellRenderer: (title: any, clickHandler: any, contentTemplate: any) => ColDef;
|
|
3
3
|
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../src/new/utils/renderer.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../src/new/utils/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,2DAA2C,MA2BxE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Connect, logger } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { showNotificationToast } from '@genesislcap/foundation-notifications';
|
|
4
|
-
import { customElement, GenesisElement } from '@genesislcap/web-core';
|
|
4
|
+
import { customElement, GenesisElement, html } from '@genesislcap/web-core';
|
|
5
5
|
import { getFilterParams } from '../../utils/date-filter-params';
|
|
6
6
|
import { getEndpointUrl } from '../../utils/endpoint';
|
|
7
7
|
import { getFormattedDateTime } from '../../utils/formatters';
|
|
8
|
-
import {
|
|
8
|
+
import { buttonCellRenderer } from '../../utils/renderer';
|
|
9
9
|
import { GeneratedReportsStyles as styles } from './generated-reports.styles';
|
|
10
10
|
import { GeneratedReportsTemplate as template } from './generated-reports.template';
|
|
11
11
|
let GeneratedReports = class GeneratedReports extends GenesisElement {
|
|
@@ -64,21 +64,24 @@ let GeneratedReports = class GeneratedReports extends GenesisElement {
|
|
|
64
64
|
headerName: 'Created Date',
|
|
65
65
|
minWidth: 150,
|
|
66
66
|
flex: 1,
|
|
67
|
+
sortable: true,
|
|
68
|
+
sort: 'desc',
|
|
67
69
|
cellStyle: { display: 'flex' },
|
|
68
70
|
filter: 'agDateColumnFilter',
|
|
69
71
|
filterParams: getFilterParams(),
|
|
70
72
|
valueFormatter: (rowData) => getFormattedDateTime(rowData.data.LAST_UPDATED_AT),
|
|
71
73
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
buttonCellRenderer('Delete', (e) => this.deleteReport(e.GENERATED_REPORT_ID), html `
|
|
75
|
+
<rapid-icon
|
|
76
|
+
style="opacity: 0.5"
|
|
77
|
+
variant="regular"
|
|
78
|
+
name="trash-alt"
|
|
79
|
+
size="lg"
|
|
80
|
+
></rapid-icon>
|
|
81
|
+
`),
|
|
82
|
+
buttonCellRenderer('Download', (e) => this.downloadReport(e.REPORT_FILE_STORAGE_ID), html `
|
|
83
|
+
<rapid-icon style="opacity: 0.5" variant="solid" name="download" size="lg"></rapid-icon>
|
|
84
|
+
`),
|
|
82
85
|
];
|
|
83
86
|
return columnDefs;
|
|
84
87
|
}
|
|
@@ -88,7 +91,6 @@ let GeneratedReports = class GeneratedReports extends GenesisElement {
|
|
|
88
91
|
filter: true,
|
|
89
92
|
floatingFilter: false,
|
|
90
93
|
sortable: false,
|
|
91
|
-
sort: 'asc',
|
|
92
94
|
suppressMenu: false,
|
|
93
95
|
resizable: false,
|
|
94
96
|
},
|
|
@@ -110,15 +112,6 @@ let GeneratedReports = class GeneratedReports extends GenesisElement {
|
|
|
110
112
|
};
|
|
111
113
|
return gridOptions;
|
|
112
114
|
}
|
|
113
|
-
actionsCellRenderer(params) {
|
|
114
|
-
const deleteIcon = cellIconCreator('trash-alt');
|
|
115
|
-
const downloadIcon = cellIconCreator('download', 'solid');
|
|
116
|
-
downloadIcon.addEventListener('click', () => this.downloadReport(params.data.REPORT_FILE_STORAGE_ID));
|
|
117
|
-
deleteIcon.addEventListener('click', () => this.deleteReport(params.data.GENERATED_REPORT_ID));
|
|
118
|
-
const container = actionsContainerCell();
|
|
119
|
-
container.append(deleteIcon, downloadIcon);
|
|
120
|
-
return container;
|
|
121
|
-
}
|
|
122
115
|
async downloadReport(fileStorageId) {
|
|
123
116
|
const headers = new Headers();
|
|
124
117
|
headers.append('SESSION_AUTH_TOKEN', sessionStorage.getItem('authToken') || '');
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
export const buttonCellRenderer = (title, clickHandler, contentTemplate) => ({
|
|
2
|
+
colId: `action-${title}`,
|
|
3
|
+
width: 50,
|
|
4
|
+
pinned: 'right',
|
|
5
|
+
enableCellChangeFlash: false,
|
|
6
|
+
cellStyle: { padding: '0', lineHeight: '25px' },
|
|
7
|
+
filter: false,
|
|
8
|
+
suppressFiltersToolPanel: true,
|
|
9
|
+
suppressColumnsToolPanel: true,
|
|
10
|
+
headerName: '',
|
|
11
|
+
minWidth: 35,
|
|
12
|
+
maxWidth: 35,
|
|
13
|
+
resizable: false,
|
|
14
|
+
cellRendererSelector: (params) => params.node.group
|
|
15
|
+
? undefined
|
|
16
|
+
: {
|
|
17
|
+
component: 'action',
|
|
18
|
+
params: {
|
|
19
|
+
actionClick: clickHandler,
|
|
20
|
+
actionName: title,
|
|
21
|
+
contentTemplate,
|
|
22
|
+
appearance: 'neutral',
|
|
23
|
+
actionButtonStyle: 'width: 24px; height: 24px; min-width: 24px; border: none; background: var(--neutral-layer-2);',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
package/package.json
CHANGED