@adaptabletools/adaptable 20.1.7 → 20.1.9
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/package.json +1 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +9 -0
- package/src/Api/LayoutApi.d.ts +6 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +9 -7
- package/src/agGrid/AdaptableAgGrid.js +2 -6
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/AgGridExportAdapter.js +7 -3
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.9",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -17,6 +17,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
17
17
|
[key: string]: boolean;
|
|
18
18
|
};
|
|
19
19
|
getCurrentVisibleColumnIdsForTableLayout(): string[];
|
|
20
|
+
getCurrentVisibleColumnIdsForPivotLayout(): string[];
|
|
20
21
|
getCurrentRowGroupsColumnIds(): string[];
|
|
21
22
|
setLayout(layoutName: string): void;
|
|
22
23
|
getCurrentLayout(): Layout;
|
|
@@ -43,6 +43,15 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
43
43
|
}
|
|
44
44
|
return layout.TableColumns.filter((colId) => !layout.ColumnVisibility || layout.ColumnVisibility?.[colId] !== false);
|
|
45
45
|
}
|
|
46
|
+
getCurrentVisibleColumnIdsForPivotLayout() {
|
|
47
|
+
const layout = this.getCurrentLayout();
|
|
48
|
+
if (!isPivotLayout(layout)) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
return this.getAgGridApi()
|
|
52
|
+
.getAllDisplayedColumns()
|
|
53
|
+
.map((col) => col.getColId());
|
|
54
|
+
}
|
|
46
55
|
getCurrentRowGroupsColumnIds() {
|
|
47
56
|
const layout = this.getCurrentLayout();
|
|
48
57
|
if (isPivotLayout(layout)) {
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -29,15 +29,19 @@ export interface LayoutApi {
|
|
|
29
29
|
*/
|
|
30
30
|
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
31
31
|
/**
|
|
32
|
-
* Retrieves map with visible columns in current Layout
|
|
32
|
+
* Retrieves map with visible columns in current Table Layout
|
|
33
33
|
*/
|
|
34
34
|
getCurrentVisibleColumnIdsMapForTableLayout(): {
|
|
35
35
|
[key: string]: boolean;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
* Retrieves array of visible ColumnIds in current Layout
|
|
38
|
+
* Retrieves array of visible ColumnIds in current Table Layout
|
|
39
39
|
*/
|
|
40
40
|
getCurrentVisibleColumnIdsForTableLayout(): string[];
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves array of visible ColumnIds in current Pivot Layout
|
|
43
|
+
*/
|
|
44
|
+
getCurrentVisibleColumnIdsForPivotLayout(): string[];
|
|
41
45
|
/**
|
|
42
46
|
* Retrieves array of visible ColumnIds in current Layout
|
|
43
47
|
*/
|
|
@@ -195,14 +195,16 @@ export const ColumnsSection = (props) => {
|
|
|
195
195
|
const adaptable = useAdaptable();
|
|
196
196
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
197
197
|
const [searchInputValue, setSearchInputValue] = React.useState('');
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
const allColumns = adaptable.api.columnApi
|
|
199
|
+
.getUIAvailableColumns()
|
|
200
|
+
.filter((col) => {
|
|
201
|
+
// since the "Row Groups" section of the editor can determine a change
|
|
202
|
+
// which is not reflected into AG Grid until we hit finish
|
|
203
|
+
// so we only rely on non-generated columns, which are the same
|
|
204
204
|
return !col.isGeneratedRowGroupColumn;
|
|
205
|
-
})
|
|
205
|
+
})
|
|
206
|
+
// if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
|
|
207
|
+
.filter((col) => !col.isGeneratedPivotResultColumn);
|
|
206
208
|
// however, changes in RowGroupedColumns done in the previous step
|
|
207
209
|
// are reflected into the layout, so we use the latest layout.RowGroupedColumns
|
|
208
210
|
// to create new columns
|
|
@@ -1558,13 +1558,9 @@ You need to define at least one Layout!`);
|
|
|
1558
1558
|
const autoGroupColumns = gridApi
|
|
1559
1559
|
.getAllGridColumns()
|
|
1560
1560
|
.filter((column) => this.api.columnApi.isAutoRowGroupColumn(column.getColId()));
|
|
1561
|
-
|
|
1562
|
-
agGridCols = [...agGridCols, ...pivotResultColumns, ...autoGroupColumns];
|
|
1563
|
-
}
|
|
1561
|
+
agGridCols = [...autoGroupColumns, ...agGridCols, ...pivotResultColumns];
|
|
1564
1562
|
}
|
|
1565
|
-
const columnGroupChildren = gridApi
|
|
1566
|
-
// TODO AFL MIG: check why this assertion is here
|
|
1567
|
-
.getAllDisplayedColumnGroups();
|
|
1563
|
+
const columnGroupChildren = gridApi.getAllDisplayedColumnGroups();
|
|
1568
1564
|
const groupsCount = {};
|
|
1569
1565
|
const colsToGroups = (columnGroupChildren ?? []).reduce((acc, columnGroup) => {
|
|
1570
1566
|
if (!columnGroup.getProvidedColumnGroup?.()?.getColGroupDef()) {
|
|
@@ -343,8 +343,8 @@ export class AgGridColumnAdapter {
|
|
|
343
343
|
return userGetQuickFilterText;
|
|
344
344
|
}
|
|
345
345
|
return (params) => {
|
|
346
|
-
const
|
|
347
|
-
const isVisible =
|
|
346
|
+
const visibleColumnsMap = this.adaptableApi.layoutApi.getCurrentVisibleColumnIdsMapForTableLayout();
|
|
347
|
+
const isVisible = visibleColumnsMap[abColumn.columnId];
|
|
348
348
|
if (!isVisible) {
|
|
349
349
|
return '';
|
|
350
350
|
}
|
|
@@ -316,9 +316,13 @@ export class AgGridExportAdapter {
|
|
|
316
316
|
// we compute the exported column keys early, as we need them for other parts of the export process
|
|
317
317
|
const onlyExportableColumnIds = (columnId) => exportableColumnIdsSet.has(columnId);
|
|
318
318
|
const getVisibleColumnIds = () => {
|
|
319
|
-
return this.adaptableApi.layoutApi
|
|
320
|
-
.
|
|
321
|
-
|
|
319
|
+
return this.adaptableApi.layoutApi.isCurrentLayoutPivot()
|
|
320
|
+
? this.adaptableApi.layoutApi
|
|
321
|
+
.getCurrentVisibleColumnIdsForPivotLayout()
|
|
322
|
+
.filter(onlyExportableColumnIds)
|
|
323
|
+
: this.adaptableApi.layoutApi
|
|
324
|
+
.getCurrentVisibleColumnIdsForTableLayout()
|
|
325
|
+
.filter(onlyExportableColumnIds);
|
|
322
326
|
};
|
|
323
327
|
let exportedColumnIds = [];
|
|
324
328
|
switch (report.ReportColumnScope) {
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "20.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1749212715232 || Date.now(),
|
|
4
|
+
VERSION: "20.1.9" || '--current-version--',
|
|
5
5
|
};
|