@adaptabletools/adaptable 18.0.0-canary.22 → 18.0.0-canary.24
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 +2 -0
- package/base.css.map +1 -1
- package/index.css +4 -0
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/CommentOptions.d.ts +3 -3
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -15
- package/src/AdaptableOptions/StateOptions.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/CommentApi.d.ts +12 -13
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +7 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +3 -3
- package/src/Api/Implementation/CommentsApiImpl.js +5 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +3 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +3 -0
- package/src/Api/LayoutApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.js +9 -2
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -34
- package/src/Redux/Store/AdaptableStore.js +4 -4
- package/src/Strategy/ColumnFilterModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +0 -1
- package/src/Strategy/CommentModule.js +7 -7
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/StyledColumnModule.js +1 -1
- package/src/View/Comments/CommentsEditor.js +4 -6
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Note/NotePopup.js +2 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -10
- package/src/agGrid/AdaptableAgGrid.js +11 -41
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -58,7 +58,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
58
58
|
* once layouts are properly handled with the new aggrid methods & events
|
|
59
59
|
* we can remove this hack
|
|
60
60
|
*/
|
|
61
|
-
private
|
|
61
|
+
private previousAgGridLayoutState;
|
|
62
62
|
_rawAdaptableOptions: AdaptableOptions;
|
|
63
63
|
adaptableOptions: AdaptableOptions;
|
|
64
64
|
_isDetailGrid: boolean;
|
|
@@ -310,15 +310,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
310
310
|
getChartRef(chartId: string): ChartRef;
|
|
311
311
|
setLayout(layout?: Layout): void;
|
|
312
312
|
private getActiveAdaptableAggFuncForCol;
|
|
313
|
-
/**
|
|
314
|
-
* Setting layout works by modifing the column state.
|
|
315
|
-
* The column state is based on the current existing columns.
|
|
316
|
-
* At this point the column groups do not exist, and the widths from layout are not applied.
|
|
317
|
-
*
|
|
318
|
-
* After the col sate is applied and the column groups are created we need
|
|
319
|
-
* to apply the state again to update the widths of the group columns.
|
|
320
|
-
*/
|
|
321
|
-
private applyGroupColumnWidth;
|
|
322
313
|
private onRowDataChanged;
|
|
323
314
|
private onCellDataChanged;
|
|
324
315
|
private isUndoChange;
|
|
@@ -144,7 +144,7 @@ export class AdaptableAgGrid {
|
|
|
144
144
|
* once layouts are properly handled with the new aggrid methods & events
|
|
145
145
|
* we can remove this hack
|
|
146
146
|
*/
|
|
147
|
-
this.
|
|
147
|
+
this.previousAgGridLayoutState = '';
|
|
148
148
|
this.columnMinMaxValuesCache = {};
|
|
149
149
|
this.renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
150
150
|
/**
|
|
@@ -297,6 +297,7 @@ export class AdaptableAgGrid {
|
|
|
297
297
|
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
298
298
|
const perfLoadStore = this.logger.beginPerf(`loadStore()`);
|
|
299
299
|
this.adaptableStore = this.initAdaptableStore();
|
|
300
|
+
this.forPlugins((plugin) => plugin.afterInitStore(this));
|
|
300
301
|
await this.adaptableStore.loadStore({
|
|
301
302
|
adaptable: this,
|
|
302
303
|
adaptableStateKey: this.adaptableOptions.adaptableStateKey,
|
|
@@ -323,8 +324,7 @@ export class AdaptableAgGrid {
|
|
|
323
324
|
return Promise.reject('Adaptable was destroyed while loading the store.');
|
|
324
325
|
// FIXME AFL MIG: is this enough?! talk with the team
|
|
325
326
|
}
|
|
326
|
-
this.forPlugins((plugin) => plugin.
|
|
327
|
-
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
327
|
+
this.forPlugins((plugin) => plugin.afterInitialStateLoaded(this));
|
|
328
328
|
// do this now so it sets module entitlements
|
|
329
329
|
this.EntitlementService.setModulesEntitlements();
|
|
330
330
|
/**
|
|
@@ -2925,7 +2925,7 @@ export class AdaptableAgGrid {
|
|
|
2925
2925
|
else {
|
|
2926
2926
|
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2927
2927
|
}
|
|
2928
|
-
this.
|
|
2928
|
+
this.previousAgGridLayoutState = '';
|
|
2929
2929
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
2930
2930
|
if (gridContainerElement) {
|
|
2931
2931
|
gridContainerElement.removeEventListener('keydown', this.agGridListenerKeydown);
|
|
@@ -3315,14 +3315,13 @@ export class AdaptableAgGrid {
|
|
|
3315
3315
|
// as otherwise column order is not preserved properly when
|
|
3316
3316
|
// going from pivoted to unpivoted layout
|
|
3317
3317
|
if (shouldUpdatePivoted) {
|
|
3318
|
-
this.agGridAdapter.
|
|
3318
|
+
this.agGridAdapter.setGridOption('pivotMode', pivoted);
|
|
3319
3319
|
}
|
|
3320
3320
|
const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
|
|
3321
3321
|
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3322
3322
|
state: newColumnsState,
|
|
3323
3323
|
applyOrder: true,
|
|
3324
3324
|
});
|
|
3325
|
-
this.applyGroupColumnWidth(layout);
|
|
3326
3325
|
perfApplyColumnState.end();
|
|
3327
3326
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
3328
3327
|
this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
|
|
@@ -3379,38 +3378,6 @@ export class AdaptableAgGrid {
|
|
|
3379
3378
|
}
|
|
3380
3379
|
return null;
|
|
3381
3380
|
}
|
|
3382
|
-
/**
|
|
3383
|
-
* Setting layout works by modifing the column state.
|
|
3384
|
-
* The column state is based on the current existing columns.
|
|
3385
|
-
* At this point the column groups do not exist, and the widths from layout are not applied.
|
|
3386
|
-
*
|
|
3387
|
-
* After the col sate is applied and the column groups are created we need
|
|
3388
|
-
* to apply the state again to update the widths of the group columns.
|
|
3389
|
-
*/
|
|
3390
|
-
applyGroupColumnWidth(layout) {
|
|
3391
|
-
if (!layout.RowGroupedColumns || !layout.RowGroupedColumns.length) {
|
|
3392
|
-
return;
|
|
3393
|
-
}
|
|
3394
|
-
const groupColumnWithDifferentWidths = this.agGridAdapter
|
|
3395
|
-
.getAgGridApi()
|
|
3396
|
-
.getColumnState()
|
|
3397
|
-
.reduce((acc, col) => {
|
|
3398
|
-
var _a;
|
|
3399
|
-
if (this.api.columnApi.isAutoRowGroupColumn(col.colId)) {
|
|
3400
|
-
const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
|
|
3401
|
-
if (widthInLayout && widthInLayout !== col.width) {
|
|
3402
|
-
acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
|
|
3403
|
-
}
|
|
3404
|
-
}
|
|
3405
|
-
return acc;
|
|
3406
|
-
}, []);
|
|
3407
|
-
if (groupColumnWithDifferentWidths.length === 0) {
|
|
3408
|
-
return;
|
|
3409
|
-
}
|
|
3410
|
-
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3411
|
-
state: groupColumnWithDifferentWidths,
|
|
3412
|
-
});
|
|
3413
|
-
}
|
|
3414
3381
|
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
3415
3382
|
if (oldData == null || oldData == undefined) {
|
|
3416
3383
|
return;
|
|
@@ -3707,15 +3674,18 @@ export class AdaptableAgGrid {
|
|
|
3707
3674
|
var _a, _b;
|
|
3708
3675
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
3709
3676
|
const columnState = agGridApi.getColumnState();
|
|
3677
|
+
const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
|
|
3678
|
+
const currentLayoutState = { columnState, expandedState };
|
|
3710
3679
|
try {
|
|
3711
|
-
|
|
3712
|
-
|
|
3680
|
+
// TODO
|
|
3681
|
+
const stringifiedLayoutState = JSON.stringify(currentLayoutState);
|
|
3682
|
+
if (stringifiedLayoutState === this.previousAgGridLayoutState) {
|
|
3713
3683
|
// same grid column state as a previous,
|
|
3714
3684
|
// so no need to update, as the layout has already been updated
|
|
3715
3685
|
// for this grid column state
|
|
3716
3686
|
return;
|
|
3717
3687
|
}
|
|
3718
|
-
this.
|
|
3688
|
+
this.previousAgGridLayoutState = stringifiedLayoutState;
|
|
3719
3689
|
}
|
|
3720
3690
|
catch (ex) {
|
|
3721
3691
|
this.logger.consoleError('Error stringifying column state', ex);
|
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: 1712325818168 || Date.now(),
|
|
4
|
+
VERSION: "18.0.0-canary.24" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -1358,16 +1358,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1358
1358
|
kind: string;
|
|
1359
1359
|
desc: string;
|
|
1360
1360
|
};
|
|
1361
|
-
BalancedGroupsKeyContext: {
|
|
1362
|
-
name: string;
|
|
1363
|
-
kind: string;
|
|
1364
|
-
desc: string;
|
|
1365
|
-
props: {
|
|
1366
|
-
name: string;
|
|
1367
|
-
kind: string;
|
|
1368
|
-
desc: string;
|
|
1369
|
-
}[];
|
|
1370
|
-
};
|
|
1371
1361
|
BaseContext: {
|
|
1372
1362
|
name: string;
|
|
1373
1363
|
kind: string;
|