@adaptabletools/adaptable-cjs 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 +3 -3
- package/src/Redux/Store/AdaptableStore.js +1 -3
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/LayoutModule.js +1 -1
- 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.cjs.tsbuildinfo +1 -1
|
@@ -258,6 +258,7 @@ class AdaptableAgGrid {
|
|
|
258
258
|
async _initAdaptableAgGrid(config) {
|
|
259
259
|
var _a, _b;
|
|
260
260
|
// Phase 1: Preprocess Adaptable Options
|
|
261
|
+
this._isDetailGrid = config.isDetailGrid === true;
|
|
261
262
|
this.lifecycleState = 'preprocessOptions';
|
|
262
263
|
this._rawAdaptableOptions = config.adaptableOptions;
|
|
263
264
|
if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
@@ -462,15 +463,13 @@ class AdaptableAgGrid {
|
|
|
462
463
|
}
|
|
463
464
|
refreshQuickFilter() {
|
|
464
465
|
const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
else {
|
|
473
|
-
this.api.columnFilterApi.hideQuickFilterBar();
|
|
466
|
+
if (this.isQuickFilterAvailable()) {
|
|
467
|
+
if (isQuickFilterVisible) {
|
|
468
|
+
this.api.columnFilterApi.showQuickFilterBar();
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
this.api.columnFilterApi.hideQuickFilterBar();
|
|
472
|
+
}
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
475
|
applyColumnFiltering() {
|
|
@@ -896,6 +895,17 @@ class AdaptableAgGrid {
|
|
|
896
895
|
// we need this here just to register the original excelStyles in the service
|
|
897
896
|
return original_excelStyles;
|
|
898
897
|
});
|
|
898
|
+
/**
|
|
899
|
+
* `processPivotResultColDef`
|
|
900
|
+
*/
|
|
901
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
|
|
902
|
+
return (colDef) => {
|
|
903
|
+
if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
904
|
+
colDef.floatingFilter = false;
|
|
905
|
+
colDef.filter = false;
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
});
|
|
899
909
|
/**
|
|
900
910
|
* `columnTypes`
|
|
901
911
|
*/
|
|
@@ -958,6 +968,9 @@ class AdaptableAgGrid {
|
|
|
958
968
|
return revertedDateTypeDefinitions;
|
|
959
969
|
});
|
|
960
970
|
}
|
|
971
|
+
isDetailGrid() {
|
|
972
|
+
return this._isDetailGrid;
|
|
973
|
+
}
|
|
961
974
|
/**
|
|
962
975
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
963
976
|
*/
|
|
@@ -1037,7 +1050,9 @@ class AdaptableAgGrid {
|
|
|
1037
1050
|
else {
|
|
1038
1051
|
if (!isSpecialColDef(colDef)) {
|
|
1039
1052
|
// if it's not a special column, return it as is
|
|
1040
|
-
|
|
1053
|
+
// without a minWidth, columns in details grid are VERY wide
|
|
1054
|
+
// so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
|
|
1055
|
+
return Object.assign({ minWidth: 10 }, colDef);
|
|
1041
1056
|
}
|
|
1042
1057
|
const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1043
1058
|
if (newlyCreatedSpecialColDef) {
|
|
@@ -1045,7 +1060,9 @@ class AdaptableAgGrid {
|
|
|
1045
1060
|
processedSpecialColDefIds.push(colDef.colId);
|
|
1046
1061
|
// merge the user defined colDef with the special col def
|
|
1047
1062
|
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
1048
|
-
const mergedColDef = Object.assign(Object.assign({
|
|
1063
|
+
const mergedColDef = Object.assign(Object.assign({
|
|
1064
|
+
// see above comment for minWidth
|
|
1065
|
+
minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
|
|
1049
1066
|
return mergedColDef;
|
|
1050
1067
|
}
|
|
1051
1068
|
else {
|
|
@@ -1353,6 +1370,7 @@ class AdaptableAgGrid {
|
|
|
1353
1370
|
// ADD filter event
|
|
1354
1371
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1355
1372
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1373
|
+
this.logger.info('Column Event Triggering Auto Layout Save', type);
|
|
1356
1374
|
this.debouncedSaveGridLayout();
|
|
1357
1375
|
}
|
|
1358
1376
|
}));
|
|
@@ -1653,7 +1671,7 @@ class AdaptableAgGrid {
|
|
|
1653
1671
|
// TODO AFL MIG: check why this assertion is here
|
|
1654
1672
|
.getAllDisplayedColumnGroups();
|
|
1655
1673
|
const groupsCount = {};
|
|
1656
|
-
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
1674
|
+
const colsToGroups = (columnGroupChildren !== null && columnGroupChildren !== void 0 ? columnGroupChildren : []).reduce((acc, columnGroup) => {
|
|
1657
1675
|
var _a, _b, _c;
|
|
1658
1676
|
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
1659
1677
|
return acc;
|
|
@@ -2185,8 +2203,9 @@ class AdaptableAgGrid {
|
|
|
2185
2203
|
});
|
|
2186
2204
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2187
2205
|
}
|
|
2188
|
-
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState) {
|
|
2206
|
+
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState, isPivot) {
|
|
2189
2207
|
columnState = columnState || this.agGridAdapter.getAgGridApi().getColumnState();
|
|
2208
|
+
const pivotMode = isPivot !== null && isPivot !== void 0 ? isPivot : this.api.layoutApi.isCurrentLayoutPivot();
|
|
2190
2209
|
const NewVisibleColumnIdsMap = visibleColumnList.reduce((acc, colId, index) => {
|
|
2191
2210
|
acc[colId] = index;
|
|
2192
2211
|
return acc;
|
|
@@ -2205,6 +2224,19 @@ class AdaptableAgGrid {
|
|
|
2205
2224
|
const colId2 = colState2.colId;
|
|
2206
2225
|
const originalIndex1 = columnsStateIndexes[colId1];
|
|
2207
2226
|
const originalIndex2 = columnsStateIndexes[colId2];
|
|
2227
|
+
if (pivotMode) {
|
|
2228
|
+
const isRowGroup1 = this.api.columnApi.isAutoRowGroupColumn(colId1);
|
|
2229
|
+
const isRowGroup2 = this.api.columnApi.isAutoRowGroupColumn(colId2);
|
|
2230
|
+
if (isRowGroup1 && isRowGroup2) {
|
|
2231
|
+
return 1;
|
|
2232
|
+
}
|
|
2233
|
+
if (isRowGroup1) {
|
|
2234
|
+
return -1;
|
|
2235
|
+
}
|
|
2236
|
+
if (isRowGroup2) {
|
|
2237
|
+
return 1;
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2208
2240
|
if (newVisibleColumnsMap[colId1] != null && newVisibleColumnsMap[colId2] == null) {
|
|
2209
2241
|
return -1;
|
|
2210
2242
|
}
|
|
@@ -3121,7 +3153,8 @@ class AdaptableAgGrid {
|
|
|
3121
3153
|
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
3122
3154
|
}
|
|
3123
3155
|
isQuickFilterAvailable() {
|
|
3124
|
-
if (this.api.layoutApi.
|
|
3156
|
+
if (this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
3157
|
+
this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
3125
3158
|
// hide completely the quick filter if pivot is enabled
|
|
3126
3159
|
return false;
|
|
3127
3160
|
}
|
|
@@ -3192,7 +3225,7 @@ class AdaptableAgGrid {
|
|
|
3192
3225
|
.getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
3193
3226
|
let isChanged = false;
|
|
3194
3227
|
const colsToAutoSize = {};
|
|
3195
|
-
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
3228
|
+
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, !!layout.EnablePivot);
|
|
3196
3229
|
newColumnsState = newColumnsState
|
|
3197
3230
|
.map((colState) => {
|
|
3198
3231
|
var _a, _b, _c;
|
|
@@ -3931,32 +3964,5 @@ class AdaptableAgGrid {
|
|
|
3931
3964
|
};
|
|
3932
3965
|
});
|
|
3933
3966
|
}
|
|
3934
|
-
setPinnedRows(pinnedRows, location) {
|
|
3935
|
-
const gridApi = this.agGridAdapter.getAgGridApi();
|
|
3936
|
-
switch (location) {
|
|
3937
|
-
case 'top':
|
|
3938
|
-
gridApi.setGridOption('pinnedTopRowData', pinnedRows);
|
|
3939
|
-
break;
|
|
3940
|
-
case 'bottom':
|
|
3941
|
-
gridApi.setGridOption('pinnedBottomRowData', pinnedRows);
|
|
3942
|
-
break;
|
|
3943
|
-
}
|
|
3944
|
-
}
|
|
3945
|
-
setupRowSummaries() {
|
|
3946
|
-
var _a;
|
|
3947
|
-
const rowSummaries = (_a = this.api.internalApi.getAdaptableState().System.RowSummary.rowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
3948
|
-
const { top, bottom } = rowSummaries.reduce((acc, summaryRow) => {
|
|
3949
|
-
const row = summaryRow.RowData;
|
|
3950
|
-
if (summaryRow.Position === 'Bottom' || !summaryRow.Position) {
|
|
3951
|
-
acc.bottom.push(row);
|
|
3952
|
-
}
|
|
3953
|
-
else {
|
|
3954
|
-
acc.top.push(row);
|
|
3955
|
-
}
|
|
3956
|
-
return acc;
|
|
3957
|
-
}, { top: [], bottom: [] });
|
|
3958
|
-
this.setPinnedRows(top, 'top');
|
|
3959
|
-
this.setPinnedRows(bottom, 'bottom');
|
|
3960
|
-
}
|
|
3961
3967
|
}
|
|
3962
3968
|
exports.AdaptableAgGrid = AdaptableAgGrid;
|
|
@@ -364,12 +364,19 @@ class AgGridColumnAdapter {
|
|
|
364
364
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
365
365
|
const isFloatingFilterDisabled = !colDef.floatingFilter ||
|
|
366
366
|
!this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering;
|
|
367
|
+
this.adaptableOptions.columnFilterOptions.quickFilterOptions.showQuickFilter;
|
|
367
368
|
this.setColDefProperty(col, 'floatingFilterComponent', () => {
|
|
368
369
|
if (isFloatingFilterDisabled) {
|
|
369
370
|
return;
|
|
370
371
|
}
|
|
371
372
|
return (0, FloatingFilterWrapper_1.FloatingFilterWrapperFactory)(this.adaptableInstance);
|
|
372
373
|
});
|
|
374
|
+
this.setColDefProperty(col, 'floatingFilter', (original_floatingFilter) => {
|
|
375
|
+
if (isFloatingFilterDisabled) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
return (0, FloatingFilterWrapper_1.FloatingFilterWrapperFactory)(this.adaptableInstance);
|
|
379
|
+
});
|
|
373
380
|
this.setColDefProperty(col, 'suppressFloatingFilterButton', () => {
|
|
374
381
|
return !isFloatingFilterDisabled;
|
|
375
382
|
});
|
|
@@ -13,6 +13,8 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
|
|
|
13
13
|
background: isDisabled
|
|
14
14
|
? 'var(--ab-cmp-input--disabled__background)'
|
|
15
15
|
: 'var(--ab-cmp-input__background)',
|
|
16
|
+
fontSize: 'var(--ab-cmp-select__font-size)',
|
|
17
|
+
fontFamily: 'var(--ab-cmp-select__font-family)',
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
const Select = function (props) {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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: "18.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1712070501504 || Date.now(),
|
|
6
|
+
VERSION: "18.0.0-canary.20" || '--current-version--',
|
|
7
7
|
};
|