@adaptabletools/adaptable-cjs 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.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
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;
|
|
@@ -47,6 +47,15 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
}
|
|
48
48
|
return layout.TableColumns.filter((colId) => !layout.ColumnVisibility || layout.ColumnVisibility?.[colId] !== false);
|
|
49
49
|
}
|
|
50
|
+
getCurrentVisibleColumnIdsForPivotLayout() {
|
|
51
|
+
const layout = this.getCurrentLayout();
|
|
52
|
+
if (!(0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
return this.getAgGridApi()
|
|
56
|
+
.getAllDisplayedColumns()
|
|
57
|
+
.map((col) => col.getColId());
|
|
58
|
+
}
|
|
50
59
|
getCurrentRowGroupsColumnIds() {
|
|
51
60
|
const layout = this.getCurrentLayout();
|
|
52
61
|
if ((0, LayoutHelpers_1.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
|
*/
|
|
@@ -200,14 +200,16 @@ const ColumnsSection = (props) => {
|
|
|
200
200
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
201
201
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
202
202
|
const [searchInputValue, setSearchInputValue] = React.useState('');
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
const allColumns = adaptable.api.columnApi
|
|
204
|
+
.getUIAvailableColumns()
|
|
205
|
+
.filter((col) => {
|
|
206
|
+
// since the "Row Groups" section of the editor can determine a change
|
|
207
|
+
// which is not reflected into AG Grid until we hit finish
|
|
208
|
+
// so we only rely on non-generated columns, which are the same
|
|
209
209
|
return !col.isGeneratedRowGroupColumn;
|
|
210
|
-
})
|
|
210
|
+
})
|
|
211
|
+
// if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
|
|
212
|
+
.filter((col) => !col.isGeneratedPivotResultColumn);
|
|
211
213
|
// however, changes in RowGroupedColumns done in the previous step
|
|
212
214
|
// are reflected into the layout, so we use the latest layout.RowGroupedColumns
|
|
213
215
|
// to create new columns
|
|
@@ -1562,13 +1562,9 @@ You need to define at least one Layout!`);
|
|
|
1562
1562
|
const autoGroupColumns = gridApi
|
|
1563
1563
|
.getAllGridColumns()
|
|
1564
1564
|
.filter((column) => this.api.columnApi.isAutoRowGroupColumn(column.getColId()));
|
|
1565
|
-
|
|
1566
|
-
agGridCols = [...agGridCols, ...pivotResultColumns, ...autoGroupColumns];
|
|
1567
|
-
}
|
|
1565
|
+
agGridCols = [...autoGroupColumns, ...agGridCols, ...pivotResultColumns];
|
|
1568
1566
|
}
|
|
1569
|
-
const columnGroupChildren = gridApi
|
|
1570
|
-
// TODO AFL MIG: check why this assertion is here
|
|
1571
|
-
.getAllDisplayedColumnGroups();
|
|
1567
|
+
const columnGroupChildren = gridApi.getAllDisplayedColumnGroups();
|
|
1572
1568
|
const groupsCount = {};
|
|
1573
1569
|
const colsToGroups = (columnGroupChildren ?? []).reduce((acc, columnGroup) => {
|
|
1574
1570
|
if (!columnGroup.getProvidedColumnGroup?.()?.getColGroupDef()) {
|
|
@@ -348,8 +348,8 @@ class AgGridColumnAdapter {
|
|
|
348
348
|
return userGetQuickFilterText;
|
|
349
349
|
}
|
|
350
350
|
return (params) => {
|
|
351
|
-
const
|
|
352
|
-
const isVisible =
|
|
351
|
+
const visibleColumnsMap = this.adaptableApi.layoutApi.getCurrentVisibleColumnIdsMapForTableLayout();
|
|
352
|
+
const isVisible = visibleColumnsMap[abColumn.columnId];
|
|
353
353
|
if (!isVisible) {
|
|
354
354
|
return '';
|
|
355
355
|
}
|
|
@@ -320,9 +320,13 @@ class AgGridExportAdapter {
|
|
|
320
320
|
// we compute the exported column keys early, as we need them for other parts of the export process
|
|
321
321
|
const onlyExportableColumnIds = (columnId) => exportableColumnIdsSet.has(columnId);
|
|
322
322
|
const getVisibleColumnIds = () => {
|
|
323
|
-
return this.adaptableApi.layoutApi
|
|
324
|
-
.
|
|
325
|
-
|
|
323
|
+
return this.adaptableApi.layoutApi.isCurrentLayoutPivot()
|
|
324
|
+
? this.adaptableApi.layoutApi
|
|
325
|
+
.getCurrentVisibleColumnIdsForPivotLayout()
|
|
326
|
+
.filter(onlyExportableColumnIds)
|
|
327
|
+
: this.adaptableApi.layoutApi
|
|
328
|
+
.getCurrentVisibleColumnIdsForTableLayout()
|
|
329
|
+
.filter(onlyExportableColumnIds);
|
|
326
330
|
};
|
|
327
331
|
let exportedColumnIds = [];
|
|
328
332
|
switch (report.ReportColumnScope) {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1749212744534 || Date.now(),
|
|
6
|
+
VERSION: "20.1.9" || '--current-version--',
|
|
7
7
|
};
|