@adaptabletools/adaptable 20.1.10 → 20.1.11
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/SettingsPanelApiImpl.d.ts +1 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +8 -3
- package/src/Api/SettingsPanelApi.d.ts +4 -0
- package/src/Utilities/Services/ChartingService.js +4 -4
- package/src/View/Charting/useAgChartState.js +1 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +27 -3
- package/src/components/WindowModal/useStacking.js +2 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- 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.11",
|
|
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",
|
|
@@ -4,4 +4,5 @@ import { AdaptableModule } from '../../../types';
|
|
|
4
4
|
export declare class SettingsPanelApiImpl extends ApiBase implements SettingsPanelApi {
|
|
5
5
|
openSettingsPanel(moduleName?: AdaptableModule): void;
|
|
6
6
|
openCustomSettingsPanel(name: string): void;
|
|
7
|
+
closeSettingsPanel(): void;
|
|
7
8
|
}
|
|
@@ -2,16 +2,21 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
3
3
|
export class SettingsPanelApiImpl extends ApiBase {
|
|
4
4
|
openSettingsPanel(moduleName) {
|
|
5
|
+
if (!moduleName) {
|
|
6
|
+
this.dispatchAction(PopupRedux.PopupShowScreen());
|
|
7
|
+
}
|
|
5
8
|
const moduleInfo = this.getAdaptableInternalApi()
|
|
6
9
|
.getModuleService()
|
|
7
10
|
.getModuleInfoByModule(moduleName);
|
|
8
11
|
if (!moduleInfo) {
|
|
9
|
-
this.
|
|
10
|
-
return;
|
|
12
|
+
this.logWarn(`${moduleName} module does not exist`);
|
|
11
13
|
}
|
|
12
|
-
this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo
|
|
14
|
+
this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo?.Popup));
|
|
13
15
|
}
|
|
14
16
|
openCustomSettingsPanel(name) {
|
|
15
17
|
this.dispatchAction(PopupRedux.PopupShowScreen(null, name));
|
|
16
18
|
}
|
|
19
|
+
closeSettingsPanel() {
|
|
20
|
+
this.dispatchAction(PopupRedux.PopupHideScreen());
|
|
21
|
+
}
|
|
17
22
|
}
|
|
@@ -6,16 +6,16 @@ export class ChartingService {
|
|
|
6
6
|
}
|
|
7
7
|
onChartModelChange(models, eventType, params) {
|
|
8
8
|
const allChartDefinitions = this.api.chartingApi.getChartDefinitions();
|
|
9
|
-
const currentChartModel = models.find((model) => model
|
|
10
|
-
const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model
|
|
9
|
+
const currentChartModel = models.find((model) => model?.chartId === params.chartId);
|
|
10
|
+
const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model?.chartId === params.chartId);
|
|
11
11
|
switch (eventType) {
|
|
12
12
|
case 'chartCreated':
|
|
13
13
|
const createParams = params;
|
|
14
|
-
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model
|
|
14
|
+
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model?.chartId === createParams.chartId)) {
|
|
15
15
|
// chart already exists
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
|
-
const chartModel = models.find((model) => model
|
|
18
|
+
const chartModel = models.find((model) => model?.chartId === createParams.chartId);
|
|
19
19
|
this.saveNewChart(chartModel);
|
|
20
20
|
}
|
|
21
21
|
break;
|
|
@@ -16,7 +16,7 @@ export const useAgChartState = (chartDefinition) => {
|
|
|
16
16
|
}, [currentChartModels, chartDefinition]);
|
|
17
17
|
const closeAlreadyOpenedChartsInContainer = (element) => {
|
|
18
18
|
const chartModelAlreadyInChartContainer = currentChartModels.find((chartModel) => {
|
|
19
|
-
const chartRef = adaptable.api.chartingApi.getChartRef(chartModel
|
|
19
|
+
const chartRef = adaptable.api.chartingApi.getChartRef(chartModel?.chartId);
|
|
20
20
|
return chartRef && element.contains(chartRef.chartElement);
|
|
21
21
|
});
|
|
22
22
|
if (chartModelAlreadyInChartContainer) {
|
|
@@ -18,7 +18,7 @@ export interface ModuleParams {
|
|
|
18
18
|
value?: any;
|
|
19
19
|
primaryKeyValues?: any[];
|
|
20
20
|
maxWidth?: number;
|
|
21
|
-
source: 'Toolbar' | 'ModuleMenu' | 'ColumnMenu' | 'ContextMenu' | 'ModuleButton' | 'Other';
|
|
21
|
+
source: 'Toolbar' | 'ModuleMenu' | 'ColumnMenu' | 'ContextMenu' | 'ModuleButton' | 'Other' | 'Api';
|
|
22
22
|
config?: {
|
|
23
23
|
[key: string]: any;
|
|
24
24
|
};
|
|
@@ -101,6 +101,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
101
101
|
private agGridListenerMouseEnter;
|
|
102
102
|
private agGridListenerMouseLeave;
|
|
103
103
|
private listenerGlobalSetRowSelection;
|
|
104
|
+
private listenerGlobalChartingChanges;
|
|
104
105
|
private listenerCellEditingStarted;
|
|
105
106
|
private listenerFirstDataRendered;
|
|
106
107
|
private listenerPivotChanged;
|
|
@@ -1366,11 +1366,25 @@ You need to define at least one Layout!`);
|
|
|
1366
1366
|
];
|
|
1367
1367
|
const chartingModule = this.ModuleService.getModuleById('Charting');
|
|
1368
1368
|
if (chartingModule.isModuleAvailable()) {
|
|
1369
|
-
|
|
1370
|
-
|
|
1369
|
+
// We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
|
|
1370
|
+
// see #ag_grid_update_chart_loop
|
|
1371
|
+
let lastChartOptionsChangePayload = '';
|
|
1372
|
+
this.listenerGlobalChartingChanges = (type, params) => {
|
|
1373
|
+
if (eventsThatTriggerChartingChanges.includes(type)) {
|
|
1374
|
+
if (type === 'chartOptionsChanged') {
|
|
1375
|
+
// Exclude api and context
|
|
1376
|
+
const { api, context, ...sanitizedParams } = params || {};
|
|
1377
|
+
const eventPayload = JSON.stringify(sanitizedParams);
|
|
1378
|
+
if (eventPayload === lastChartOptionsChangePayload) {
|
|
1379
|
+
// this is a loop, so we ignore it
|
|
1380
|
+
return;
|
|
1381
|
+
}
|
|
1382
|
+
lastChartOptionsChangePayload = eventPayload;
|
|
1383
|
+
}
|
|
1371
1384
|
this.ChartingService.onChartModelChange(this.getChartModels(), type, params);
|
|
1372
1385
|
}
|
|
1373
|
-
}
|
|
1386
|
+
};
|
|
1387
|
+
this.agGridAdapter.getAgGridApi().addGlobalListener(this.listenerGlobalChartingChanges);
|
|
1374
1388
|
}
|
|
1375
1389
|
/**
|
|
1376
1390
|
* Row and Cell listeners created in 2020
|
|
@@ -2627,6 +2641,10 @@ You need to define at least one Layout!`);
|
|
|
2627
2641
|
return chartRef;
|
|
2628
2642
|
}
|
|
2629
2643
|
updateChart(chart) {
|
|
2644
|
+
if (!chart.Model) {
|
|
2645
|
+
this.logger.consoleError(`Chart definition must have a Model property to be updated: ${chart.Name}`);
|
|
2646
|
+
return;
|
|
2647
|
+
}
|
|
2630
2648
|
const upgradableProperties = {
|
|
2631
2649
|
// Only Range charts are supported to be created at run time
|
|
2632
2650
|
// the other two are pivot & cross-filter
|
|
@@ -2636,6 +2654,7 @@ You need to define at least one Layout!`);
|
|
|
2636
2654
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
2637
2655
|
aggFunc: chart.Model.aggFunc,
|
|
2638
2656
|
};
|
|
2657
|
+
// see also #ag_grid_update_chart_loop
|
|
2639
2658
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
2640
2659
|
}
|
|
2641
2660
|
getChartModels() {
|
|
@@ -2848,6 +2867,9 @@ You need to define at least one Layout!`);
|
|
|
2848
2867
|
agGridApi.removeEventListener('cellSelectionChanged', this.listenerCellSelectionChanged);
|
|
2849
2868
|
agGridApi.removeEventListener('sortChanged', this.listenerSortChanged);
|
|
2850
2869
|
agGridApi.removeGlobalListener(this.listenerGlobalSetRowSelection);
|
|
2870
|
+
if (this.listenerGlobalChartingChanges) {
|
|
2871
|
+
this.agGridAdapter.getAgGridApi().removeGlobalListener(this.listenerGlobalChartingChanges);
|
|
2872
|
+
}
|
|
2851
2873
|
this.listenerFirstDataRendered = null;
|
|
2852
2874
|
this.listenerPivotChanged = null;
|
|
2853
2875
|
this.listenerCellEditingStarted = null;
|
|
@@ -2924,7 +2946,9 @@ You need to define at least one Layout!`);
|
|
|
2924
2946
|
}
|
|
2925
2947
|
this.DANGER_USE_GETTER_adaptableContainerElement = null;
|
|
2926
2948
|
this.DANGER_USE_GETTER_agGridContainerElement = null;
|
|
2949
|
+
this.debouncedSetSelectedCells?.cancel?.();
|
|
2927
2950
|
this.debouncedSetSelectedCells = null;
|
|
2951
|
+
this.debouncedSetSelectedRows?.cancel?.();
|
|
2928
2952
|
this.debouncedSetSelectedRows = null;
|
|
2929
2953
|
this.adaptableStore?.destroy();
|
|
2930
2954
|
this.adaptableStore = null;
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { createUuid } from '../utils/uuid';
|
|
3
3
|
const setZIndexMap = {};
|
|
4
4
|
const zIndexMap = [];
|
|
5
|
-
|
|
5
|
+
// starts with 3000, to be above the default zIndex of the Modal component
|
|
6
|
+
const BASE_Z_INDEX = 3000;
|
|
6
7
|
/**
|
|
7
8
|
* Used to facilitate the stacking between multiple opened windows.
|
|
8
9
|
* When calling 'bringToFront' brings caller to top.
|
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: 1749648014004 || Date.now(),
|
|
4
|
+
VERSION: "20.1.11" || '--current-version--',
|
|
5
5
|
};
|