@adaptabletools/adaptable 18.0.0-canary.19 → 18.0.0-canary.20
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/base.css +8 -6
- package/base.css.map +1 -1
- package/index.css +8 -6
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +3 -0
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +16 -0
- package/src/Api/LayoutApi.d.ts +5 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +1 -3
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/LayoutModule.js +2 -2
- package/src/View/Comments/CommentsEditor.js +16 -4
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +5 -2
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -2
- package/src/agGrid/AdaptableAgGrid.js +48 -42
- package/src/agGrid/AgGridColumnAdapter.js +7 -0
- package/src/components/Select/Select.js +2 -0
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -254,6 +254,7 @@ export class AdaptableAgGrid {
|
|
|
254
254
|
async _initAdaptableAgGrid(config) {
|
|
255
255
|
var _a, _b;
|
|
256
256
|
// Phase 1: Preprocess Adaptable Options
|
|
257
|
+
this._isDetailGrid = config.isDetailGrid === true;
|
|
257
258
|
this.lifecycleState = 'preprocessOptions';
|
|
258
259
|
this._rawAdaptableOptions = config.adaptableOptions;
|
|
259
260
|
if (StringExtensions.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
@@ -458,15 +459,13 @@ export class AdaptableAgGrid {
|
|
|
458
459
|
}
|
|
459
460
|
refreshQuickFilter() {
|
|
460
461
|
const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
else {
|
|
469
|
-
this.api.columnFilterApi.hideQuickFilterBar();
|
|
462
|
+
if (this.isQuickFilterAvailable()) {
|
|
463
|
+
if (isQuickFilterVisible) {
|
|
464
|
+
this.api.columnFilterApi.showQuickFilterBar();
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
this.api.columnFilterApi.hideQuickFilterBar();
|
|
468
|
+
}
|
|
470
469
|
}
|
|
471
470
|
}
|
|
472
471
|
applyColumnFiltering() {
|
|
@@ -892,6 +891,17 @@ export class AdaptableAgGrid {
|
|
|
892
891
|
// we need this here just to register the original excelStyles in the service
|
|
893
892
|
return original_excelStyles;
|
|
894
893
|
});
|
|
894
|
+
/**
|
|
895
|
+
* `processPivotResultColDef`
|
|
896
|
+
*/
|
|
897
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
|
|
898
|
+
return (colDef) => {
|
|
899
|
+
if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
900
|
+
colDef.floatingFilter = false;
|
|
901
|
+
colDef.filter = false;
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
});
|
|
895
905
|
/**
|
|
896
906
|
* `columnTypes`
|
|
897
907
|
*/
|
|
@@ -954,6 +964,9 @@ export class AdaptableAgGrid {
|
|
|
954
964
|
return revertedDateTypeDefinitions;
|
|
955
965
|
});
|
|
956
966
|
}
|
|
967
|
+
isDetailGrid() {
|
|
968
|
+
return this._isDetailGrid;
|
|
969
|
+
}
|
|
957
970
|
/**
|
|
958
971
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
959
972
|
*/
|
|
@@ -1033,7 +1046,9 @@ export class AdaptableAgGrid {
|
|
|
1033
1046
|
else {
|
|
1034
1047
|
if (!isSpecialColDef(colDef)) {
|
|
1035
1048
|
// if it's not a special column, return it as is
|
|
1036
|
-
|
|
1049
|
+
// without a minWidth, columns in details grid are VERY wide
|
|
1050
|
+
// so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
|
|
1051
|
+
return Object.assign({ minWidth: 10 }, colDef);
|
|
1037
1052
|
}
|
|
1038
1053
|
const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1039
1054
|
if (newlyCreatedSpecialColDef) {
|
|
@@ -1041,7 +1056,9 @@ export class AdaptableAgGrid {
|
|
|
1041
1056
|
processedSpecialColDefIds.push(colDef.colId);
|
|
1042
1057
|
// merge the user defined colDef with the special col def
|
|
1043
1058
|
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
1044
|
-
const mergedColDef = Object.assign(Object.assign({
|
|
1059
|
+
const mergedColDef = Object.assign(Object.assign({
|
|
1060
|
+
// see above comment for minWidth
|
|
1061
|
+
minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
|
|
1045
1062
|
return mergedColDef;
|
|
1046
1063
|
}
|
|
1047
1064
|
else {
|
|
@@ -1349,6 +1366,7 @@ export class AdaptableAgGrid {
|
|
|
1349
1366
|
// ADD filter event
|
|
1350
1367
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1351
1368
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1369
|
+
this.logger.info('Column Event Triggering Auto Layout Save', type);
|
|
1352
1370
|
this.debouncedSaveGridLayout();
|
|
1353
1371
|
}
|
|
1354
1372
|
}));
|
|
@@ -1649,7 +1667,7 @@ export class AdaptableAgGrid {
|
|
|
1649
1667
|
// TODO AFL MIG: check why this assertion is here
|
|
1650
1668
|
.getAllDisplayedColumnGroups();
|
|
1651
1669
|
const groupsCount = {};
|
|
1652
|
-
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
1670
|
+
const colsToGroups = (columnGroupChildren !== null && columnGroupChildren !== void 0 ? columnGroupChildren : []).reduce((acc, columnGroup) => {
|
|
1653
1671
|
var _a, _b, _c;
|
|
1654
1672
|
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
1655
1673
|
return acc;
|
|
@@ -2181,8 +2199,9 @@ export class AdaptableAgGrid {
|
|
|
2181
2199
|
});
|
|
2182
2200
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2183
2201
|
}
|
|
2184
|
-
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState) {
|
|
2202
|
+
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState, isPivot) {
|
|
2185
2203
|
columnState = columnState || this.agGridAdapter.getAgGridApi().getColumnState();
|
|
2204
|
+
const pivotMode = isPivot !== null && isPivot !== void 0 ? isPivot : this.api.layoutApi.isCurrentLayoutPivot();
|
|
2186
2205
|
const NewVisibleColumnIdsMap = visibleColumnList.reduce((acc, colId, index) => {
|
|
2187
2206
|
acc[colId] = index;
|
|
2188
2207
|
return acc;
|
|
@@ -2201,6 +2220,19 @@ export class AdaptableAgGrid {
|
|
|
2201
2220
|
const colId2 = colState2.colId;
|
|
2202
2221
|
const originalIndex1 = columnsStateIndexes[colId1];
|
|
2203
2222
|
const originalIndex2 = columnsStateIndexes[colId2];
|
|
2223
|
+
if (pivotMode) {
|
|
2224
|
+
const isRowGroup1 = this.api.columnApi.isAutoRowGroupColumn(colId1);
|
|
2225
|
+
const isRowGroup2 = this.api.columnApi.isAutoRowGroupColumn(colId2);
|
|
2226
|
+
if (isRowGroup1 && isRowGroup2) {
|
|
2227
|
+
return 1;
|
|
2228
|
+
}
|
|
2229
|
+
if (isRowGroup1) {
|
|
2230
|
+
return -1;
|
|
2231
|
+
}
|
|
2232
|
+
if (isRowGroup2) {
|
|
2233
|
+
return 1;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2204
2236
|
if (newVisibleColumnsMap[colId1] != null && newVisibleColumnsMap[colId2] == null) {
|
|
2205
2237
|
return -1;
|
|
2206
2238
|
}
|
|
@@ -3117,7 +3149,8 @@ export class AdaptableAgGrid {
|
|
|
3117
3149
|
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
3118
3150
|
}
|
|
3119
3151
|
isQuickFilterAvailable() {
|
|
3120
|
-
if (this.api.layoutApi.
|
|
3152
|
+
if (this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
3153
|
+
this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
3121
3154
|
// hide completely the quick filter if pivot is enabled
|
|
3122
3155
|
return false;
|
|
3123
3156
|
}
|
|
@@ -3188,7 +3221,7 @@ export class AdaptableAgGrid {
|
|
|
3188
3221
|
.getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
3189
3222
|
let isChanged = false;
|
|
3190
3223
|
const colsToAutoSize = {};
|
|
3191
|
-
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
3224
|
+
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, !!layout.EnablePivot);
|
|
3192
3225
|
newColumnsState = newColumnsState
|
|
3193
3226
|
.map((colState) => {
|
|
3194
3227
|
var _a, _b, _c;
|
|
@@ -3927,31 +3960,4 @@ export class AdaptableAgGrid {
|
|
|
3927
3960
|
};
|
|
3928
3961
|
});
|
|
3929
3962
|
}
|
|
3930
|
-
setPinnedRows(pinnedRows, location) {
|
|
3931
|
-
const gridApi = this.agGridAdapter.getAgGridApi();
|
|
3932
|
-
switch (location) {
|
|
3933
|
-
case 'top':
|
|
3934
|
-
gridApi.setGridOption('pinnedTopRowData', pinnedRows);
|
|
3935
|
-
break;
|
|
3936
|
-
case 'bottom':
|
|
3937
|
-
gridApi.setGridOption('pinnedBottomRowData', pinnedRows);
|
|
3938
|
-
break;
|
|
3939
|
-
}
|
|
3940
|
-
}
|
|
3941
|
-
setupRowSummaries() {
|
|
3942
|
-
var _a;
|
|
3943
|
-
const rowSummaries = (_a = this.api.internalApi.getAdaptableState().System.RowSummary.rowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
3944
|
-
const { top, bottom } = rowSummaries.reduce((acc, summaryRow) => {
|
|
3945
|
-
const row = summaryRow.RowData;
|
|
3946
|
-
if (summaryRow.Position === 'Bottom' || !summaryRow.Position) {
|
|
3947
|
-
acc.bottom.push(row);
|
|
3948
|
-
}
|
|
3949
|
-
else {
|
|
3950
|
-
acc.top.push(row);
|
|
3951
|
-
}
|
|
3952
|
-
return acc;
|
|
3953
|
-
}, { top: [], bottom: [] });
|
|
3954
|
-
this.setPinnedRows(top, 'top');
|
|
3955
|
-
this.setPinnedRows(bottom, 'bottom');
|
|
3956
|
-
}
|
|
3957
3963
|
}
|
|
@@ -360,12 +360,19 @@ export class AgGridColumnAdapter {
|
|
|
360
360
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
361
361
|
const isFloatingFilterDisabled = !colDef.floatingFilter ||
|
|
362
362
|
!this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering;
|
|
363
|
+
this.adaptableOptions.columnFilterOptions.quickFilterOptions.showQuickFilter;
|
|
363
364
|
this.setColDefProperty(col, 'floatingFilterComponent', () => {
|
|
364
365
|
if (isFloatingFilterDisabled) {
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
368
|
return FloatingFilterWrapperFactory(this.adaptableInstance);
|
|
368
369
|
});
|
|
370
|
+
this.setColDefProperty(col, 'floatingFilter', (original_floatingFilter) => {
|
|
371
|
+
if (isFloatingFilterDisabled) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
return FloatingFilterWrapperFactory(this.adaptableInstance);
|
|
375
|
+
});
|
|
369
376
|
this.setColDefProperty(col, 'suppressFloatingFilterButton', () => {
|
|
370
377
|
return !isFloatingFilterDisabled;
|
|
371
378
|
});
|
|
@@ -9,6 +9,8 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
|
|
|
9
9
|
background: isDisabled
|
|
10
10
|
? 'var(--ab-cmp-input--disabled__background)'
|
|
11
11
|
: 'var(--ab-cmp-input__background)',
|
|
12
|
+
fontSize: 'var(--ab-cmp-select__font-size)',
|
|
13
|
+
fontFamily: 'var(--ab-cmp-select__font-family)',
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
export const Select = function (props) {
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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: "18.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1712070469439 || Date.now(),
|
|
4
|
+
VERSION: "18.0.0-canary.20" || '--current-version--',
|
|
5
5
|
};
|