@genesislcap/pbc-reporting-ui 1.0.387 → 1.0.388
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/edit-config/shared/datasource-data-base-component.helpers.ts.d.ts +1 -1
- package/dist/dts/new/store/slices/datasources-config.d.ts +2 -2
- package/dist/dts/new/store/slices/datasources-config.d.ts.map +1 -1
- package/dist/dts/new/store/slices/types.d.ts +1 -1
- package/dist/dts/new/store/slices/types.d.ts.map +1 -1
- package/dist/dts/new/store/store.d.ts +14 -14
- package/dist/esm/new/main/edit-config/col-filters/col-filters-grid.helpers.js +4 -4
- package/dist/esm/new/main/edit-config/col-filters/col-filters-grid.js +3 -3
- package/dist/esm/new/main/edit-config/shared/datasource-data-base-component.helpers.ts.js +5 -5
- package/dist/esm/new/store/slices/datasources-config.js +7 -7
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare function configureDisabledColumns(data: Pick<GridRowData, GridCol
|
|
|
25
25
|
/**
|
|
26
26
|
* Checks if a column is filtered in the current configuration
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function lookupColumnIsIncluded(data: Pick<GridRowData, GridColumnNames.Datasource | GridColumnNames.ColumnName>): boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Converts display-formatted datasource name to internal key format
|
|
31
31
|
*/
|
|
@@ -26,10 +26,10 @@ export declare const datasourceSlice: import("@reduxjs/toolkit").Slice<Datasourc
|
|
|
26
26
|
/**
|
|
27
27
|
* Will also clean up data associated with this field, such as rename transformers
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
setColumnIncluded(state: DatasourceConfig, action: PayloadAction<{
|
|
30
30
|
key: DatasourceKey;
|
|
31
31
|
column: string;
|
|
32
|
-
|
|
32
|
+
included: boolean;
|
|
33
33
|
}>): void;
|
|
34
34
|
setRowFilter(state: DatasourceConfig, action: PayloadAction<{
|
|
35
35
|
key: DatasourceKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasources-config.d.ts","sourceRoot":"","sources":["../../../../../src/new/store/slices/datasources-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEjF,eAAO,MAAM,YAAY,EAAE,gBAAqB,CAAC;AAEjD,eAAO,MAAM,eAAe;uCAKf,gBAAgB,UACf,cAAc;QACpB,IAAI,EAAE,KAAK,gBAAgB,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC,CAAC;QAClE,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;gCAuBK,gBAAgB,UACf,cAAc;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;sCAKvD,gBAAgB,UACf,cAAc;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,qBAAqB,CAAA;KAAE,CAAC;4BAIvD,gBAAgB,UAAU,cAAc;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,CAAC;2BAI9E,gBAAgB,UACf,cAAc;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAcrF;;OAEG;
|
|
1
|
+
{"version":3,"file":"datasources-config.d.ts","sourceRoot":"","sources":["../../../../../src/new/store/slices/datasources-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEjF,eAAO,MA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AAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,oBAAoB,CAAC;QACjC,WAAW,EAAE,qBAAqB,CAAC;QACnC,yBAAyB,EAAE,iBAAiB,CAAC;KAC9C,CAAC;CACH,CAAC;AAIF,eAAO,MAAM,mBAAmB,iCAAkC,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,QAAQ,GAAG;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -90,11 +90,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
90
90
|
};
|
|
91
91
|
type: string;
|
|
92
92
|
}): void;
|
|
93
|
-
|
|
93
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
94
94
|
payload: {
|
|
95
95
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
96
96
|
column: string;
|
|
97
|
-
|
|
97
|
+
included: boolean;
|
|
98
98
|
};
|
|
99
99
|
type: string;
|
|
100
100
|
}): void;
|
|
@@ -251,11 +251,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
251
251
|
};
|
|
252
252
|
type: string;
|
|
253
253
|
}): void;
|
|
254
|
-
|
|
254
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
255
255
|
payload: {
|
|
256
256
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
257
257
|
column: string;
|
|
258
|
-
|
|
258
|
+
included: boolean;
|
|
259
259
|
};
|
|
260
260
|
type: string;
|
|
261
261
|
}): void;
|
|
@@ -415,11 +415,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
415
415
|
};
|
|
416
416
|
type: string;
|
|
417
417
|
}): void;
|
|
418
|
-
|
|
418
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
419
419
|
payload: {
|
|
420
420
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
421
421
|
column: string;
|
|
422
|
-
|
|
422
|
+
included: boolean;
|
|
423
423
|
};
|
|
424
424
|
type: string;
|
|
425
425
|
}): void;
|
|
@@ -576,11 +576,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
576
576
|
};
|
|
577
577
|
type: string;
|
|
578
578
|
}): void;
|
|
579
|
-
|
|
579
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
580
580
|
payload: {
|
|
581
581
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
582
582
|
column: string;
|
|
583
|
-
|
|
583
|
+
included: boolean;
|
|
584
584
|
};
|
|
585
585
|
type: string;
|
|
586
586
|
}): void;
|
|
@@ -737,11 +737,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
737
737
|
};
|
|
738
738
|
type: string;
|
|
739
739
|
}): void;
|
|
740
|
-
|
|
740
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
741
741
|
payload: {
|
|
742
742
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
743
743
|
column: string;
|
|
744
|
-
|
|
744
|
+
included: boolean;
|
|
745
745
|
};
|
|
746
746
|
type: string;
|
|
747
747
|
}): void;
|
|
@@ -898,11 +898,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
898
898
|
};
|
|
899
899
|
type: string;
|
|
900
900
|
}): void;
|
|
901
|
-
|
|
901
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
902
902
|
payload: {
|
|
903
903
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
904
904
|
column: string;
|
|
905
|
-
|
|
905
|
+
included: boolean;
|
|
906
906
|
};
|
|
907
907
|
type: string;
|
|
908
908
|
}): void;
|
|
@@ -1059,11 +1059,11 @@ export declare const store: import("../types").RootStateFromSlices<(import("@red
|
|
|
1059
1059
|
};
|
|
1060
1060
|
type: string;
|
|
1061
1061
|
}): void;
|
|
1062
|
-
|
|
1062
|
+
setColumnIncluded(state: import("./slices").DatasourceConfig, action: {
|
|
1063
1063
|
payload: {
|
|
1064
1064
|
key: `REQ_REP_${string}` | `DATA_PIPELINE_${string}`;
|
|
1065
1065
|
column: string;
|
|
1066
|
-
|
|
1066
|
+
included: boolean;
|
|
1067
1067
|
};
|
|
1068
1068
|
type: string;
|
|
1069
1069
|
}): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { actions } from '../../../store';
|
|
2
|
-
import { GridColumnNames, datasourceKeyFromDisplay,
|
|
2
|
+
import { GridColumnNames, datasourceKeyFromDisplay, lookupColumnIsIncluded, shouldDisableColumn, } from '../shared';
|
|
3
3
|
/**
|
|
4
4
|
* Handler for row selection changes in the grid
|
|
5
5
|
*/
|
|
@@ -10,14 +10,14 @@ export function rowSelectionChangedHandler(event) {
|
|
|
10
10
|
// gate event listener to only trigger if the data is actually changed by the user
|
|
11
11
|
// (return if setting the same value as in the store, e.g. when first loading
|
|
12
12
|
// the grid data)
|
|
13
|
-
if (
|
|
13
|
+
if (lookupColumnIsIncluded(event.data) === ((_a = event.node.isSelected()) !== null && _a !== void 0 ? _a : true))
|
|
14
14
|
return;
|
|
15
15
|
if (shouldDisableColumn(event.data))
|
|
16
16
|
return;
|
|
17
|
-
actions.datasourceConfig.
|
|
17
|
+
actions.datasourceConfig.setColumnIncluded({
|
|
18
18
|
key: datasourceKeyFromDisplay(event.data[GridColumnNames.Datasource]),
|
|
19
19
|
column: event.data[GridColumnNames.ColumnName],
|
|
20
|
-
|
|
20
|
+
included: (_b = event.node.isSelected()) !== null && _b !== void 0 ? _b : true,
|
|
21
21
|
});
|
|
22
22
|
event.api.redrawRows();
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement } from '@genesislcap/web-core';
|
|
3
3
|
import { RowSelectRenderer } from '../../../../old/components/renderers/row-select.renderer';
|
|
4
|
-
import { DatasourceDataBaseComponent, GridColumnNames, buildCellStyle, configureDisabledColumns,
|
|
4
|
+
import { DatasourceDataBaseComponent, GridColumnNames, buildCellStyle, configureDisabledColumns, lookupColumnIsIncluded, pathParameters, } from '../shared';
|
|
5
5
|
import { rowSelectionChangedHandler } from './col-filters-grid.helpers';
|
|
6
6
|
import { styles } from './col-filters-grid.styles';
|
|
7
7
|
import { template } from './col-fitlers-grid.template';
|
|
@@ -29,7 +29,7 @@ let ColFiltersGrid = class ColFiltersGrid extends DatasourceDataBaseComponent {
|
|
|
29
29
|
headerTooltip: 'Controls whether this column is added to the generated report.',
|
|
30
30
|
headerCheckboxSelection: true,
|
|
31
31
|
cellRenderer: 'row-select',
|
|
32
|
-
valueGetter: (params) =>
|
|
32
|
+
valueGetter: (params) => lookupColumnIsIncluded(params.data),
|
|
33
33
|
maxWidth: 60,
|
|
34
34
|
},
|
|
35
35
|
{
|
|
@@ -64,7 +64,7 @@ let ColFiltersGrid = class ColFiltersGrid extends DatasourceDataBaseComponent {
|
|
|
64
64
|
onRowSelected: rowSelectionChangedHandler,
|
|
65
65
|
onRowDataUpdated(params) {
|
|
66
66
|
params.api.forEachNode((node) => {
|
|
67
|
-
node.setSelected(
|
|
67
|
+
node.setSelected(lookupColumnIsIncluded(node.data));
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
70
|
};
|
|
@@ -29,10 +29,10 @@ export function shouldDisableColumn(data) {
|
|
|
29
29
|
export function configureDisabledColumns(data) {
|
|
30
30
|
const shouldDisable = shouldDisableColumn(data);
|
|
31
31
|
if (shouldDisable) {
|
|
32
|
-
actions.datasourceConfig.
|
|
32
|
+
actions.datasourceConfig.setColumnIncluded({
|
|
33
33
|
key: datasourceKeyFromDisplay(data[GridColumnNames.Datasource]),
|
|
34
34
|
column: data[GridColumnNames.ColumnName],
|
|
35
|
-
|
|
35
|
+
included: false,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
return data;
|
|
@@ -40,9 +40,9 @@ export function configureDisabledColumns(data) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Checks if a column is filtered in the current configuration
|
|
42
42
|
*/
|
|
43
|
-
export function
|
|
43
|
+
export function lookupColumnIsIncluded(data) {
|
|
44
44
|
var _a;
|
|
45
|
-
return ((_a = selectors.datasourceConfig.getDatasource(datasourceKeyFromDisplay(data[GridColumnNames.Datasource])).TRANSFORMER_CONFIGURATION.
|
|
45
|
+
return ((_a = selectors.datasourceConfig.getDatasource(datasourceKeyFromDisplay(data[GridColumnNames.Datasource])).TRANSFORMER_CONFIGURATION.INCLUDE_COLUMNS) !== null && _a !== void 0 ? _a : []).includes(data[GridColumnNames.ColumnName]);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Converts display-formatted datasource name to internal key format
|
|
@@ -67,7 +67,7 @@ export function datasourceKeyForDisplay(datasource, type) {
|
|
|
67
67
|
*/
|
|
68
68
|
export function buildCellStyle(rowDeselectedStyle, rowSelectedStyle = {}) {
|
|
69
69
|
return (params) => {
|
|
70
|
-
if (params.data &&
|
|
70
|
+
if (params.data && lookupColumnIsIncluded(params.data)) {
|
|
71
71
|
return rowSelectedStyle;
|
|
72
72
|
}
|
|
73
73
|
return rowDeselectedStyle;
|
|
@@ -47,22 +47,22 @@ export const datasourceSlice = createSlice({
|
|
|
47
47
|
/**
|
|
48
48
|
* Will also clean up data associated with this field, such as rename transformers
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
setColumnIncluded(state, action) {
|
|
51
51
|
var _a, _b;
|
|
52
|
-
const { key, column,
|
|
53
|
-
if (
|
|
54
|
-
state[key].TRANSFORMER_CONFIGURATION.
|
|
55
|
-
...((_a = state[key].TRANSFORMER_CONFIGURATION.
|
|
52
|
+
const { key, column, included } = action.payload;
|
|
53
|
+
if (included) {
|
|
54
|
+
state[key].TRANSFORMER_CONFIGURATION.INCLUDE_COLUMNS = [
|
|
55
|
+
...((_a = state[key].TRANSFORMER_CONFIGURATION.INCLUDE_COLUMNS) !== null && _a !== void 0 ? _a : []),
|
|
56
56
|
column,
|
|
57
57
|
];
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
|
-
state[key].TRANSFORMER_CONFIGURATION.
|
|
60
|
+
state[key].TRANSFORMER_CONFIGURATION.INCLUDE_COLUMNS = ((_b = state[key].TRANSFORMER_CONFIGURATION.INCLUDE_COLUMNS) !== null && _b !== void 0 ? _b : []).filter((col) => col !== column);
|
|
61
61
|
}
|
|
62
62
|
datasourceSlice.caseReducers.setColumnRename(state, Object.assign(Object.assign({}, action), { payload: {
|
|
63
63
|
key,
|
|
64
64
|
columnFrom: column,
|
|
65
|
-
columnTo:
|
|
65
|
+
columnTo: !included ? column : capitalCase(column),
|
|
66
66
|
} }));
|
|
67
67
|
},
|
|
68
68
|
setRowFilter(state, action) {
|
package/package.json
CHANGED