@adaptabletools/adaptable-cjs 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.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.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
|
}
|
|
@@ -6,17 +6,22 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
6
6
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
7
7
|
class SettingsPanelApiImpl extends ApiBase_1.ApiBase {
|
|
8
8
|
openSettingsPanel(moduleName) {
|
|
9
|
+
if (!moduleName) {
|
|
10
|
+
this.dispatchAction(PopupRedux.PopupShowScreen());
|
|
11
|
+
}
|
|
9
12
|
const moduleInfo = this.getAdaptableInternalApi()
|
|
10
13
|
.getModuleService()
|
|
11
14
|
.getModuleInfoByModule(moduleName);
|
|
12
15
|
if (!moduleInfo) {
|
|
13
|
-
this.
|
|
14
|
-
return;
|
|
16
|
+
this.logWarn(`${moduleName} module does not exist`);
|
|
15
17
|
}
|
|
16
|
-
this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo
|
|
18
|
+
this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo?.Popup));
|
|
17
19
|
}
|
|
18
20
|
openCustomSettingsPanel(name) {
|
|
19
21
|
this.dispatchAction(PopupRedux.PopupShowScreen(null, name));
|
|
20
22
|
}
|
|
23
|
+
closeSettingsPanel() {
|
|
24
|
+
this.dispatchAction(PopupRedux.PopupHideScreen());
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
exports.SettingsPanelApiImpl = SettingsPanelApiImpl;
|
|
@@ -10,16 +10,16 @@ class ChartingService {
|
|
|
10
10
|
}
|
|
11
11
|
onChartModelChange(models, eventType, params) {
|
|
12
12
|
const allChartDefinitions = this.api.chartingApi.getChartDefinitions();
|
|
13
|
-
const currentChartModel = models.find((model) => model
|
|
14
|
-
const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model
|
|
13
|
+
const currentChartModel = models.find((model) => model?.chartId === params.chartId);
|
|
14
|
+
const currentChartDefinition = allChartDefinitions.find((chartDefinition) => chartDefinition.Model?.chartId === params.chartId);
|
|
15
15
|
switch (eventType) {
|
|
16
16
|
case 'chartCreated':
|
|
17
17
|
const createParams = params;
|
|
18
|
-
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model
|
|
18
|
+
if (allChartDefinitions.some((chartDefinition) => chartDefinition.Model?.chartId === createParams.chartId)) {
|
|
19
19
|
// chart already exists
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
const chartModel = models.find((model) => model
|
|
22
|
+
const chartModel = models.find((model) => model?.chartId === createParams.chartId);
|
|
23
23
|
this.saveNewChart(chartModel);
|
|
24
24
|
}
|
|
25
25
|
break;
|
|
@@ -20,7 +20,7 @@ const useAgChartState = (chartDefinition) => {
|
|
|
20
20
|
}, [currentChartModels, chartDefinition]);
|
|
21
21
|
const closeAlreadyOpenedChartsInContainer = (element) => {
|
|
22
22
|
const chartModelAlreadyInChartContainer = currentChartModels.find((chartModel) => {
|
|
23
|
-
const chartRef = adaptable.api.chartingApi.getChartRef(chartModel
|
|
23
|
+
const chartRef = adaptable.api.chartingApi.getChartRef(chartModel?.chartId);
|
|
24
24
|
return chartRef && element.contains(chartRef.chartElement);
|
|
25
25
|
});
|
|
26
26
|
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;
|
|
@@ -1370,11 +1370,25 @@ You need to define at least one Layout!`);
|
|
|
1370
1370
|
];
|
|
1371
1371
|
const chartingModule = this.ModuleService.getModuleById('Charting');
|
|
1372
1372
|
if (chartingModule.isModuleAvailable()) {
|
|
1373
|
-
|
|
1374
|
-
|
|
1373
|
+
// We need to break the loop of charting changes for 'chartOptionsChanged', which is triggered by the subsequent agGridApi.updateChart(...)
|
|
1374
|
+
// see #ag_grid_update_chart_loop
|
|
1375
|
+
let lastChartOptionsChangePayload = '';
|
|
1376
|
+
this.listenerGlobalChartingChanges = (type, params) => {
|
|
1377
|
+
if (eventsThatTriggerChartingChanges.includes(type)) {
|
|
1378
|
+
if (type === 'chartOptionsChanged') {
|
|
1379
|
+
// Exclude api and context
|
|
1380
|
+
const { api, context, ...sanitizedParams } = params || {};
|
|
1381
|
+
const eventPayload = JSON.stringify(sanitizedParams);
|
|
1382
|
+
if (eventPayload === lastChartOptionsChangePayload) {
|
|
1383
|
+
// this is a loop, so we ignore it
|
|
1384
|
+
return;
|
|
1385
|
+
}
|
|
1386
|
+
lastChartOptionsChangePayload = eventPayload;
|
|
1387
|
+
}
|
|
1375
1388
|
this.ChartingService.onChartModelChange(this.getChartModels(), type, params);
|
|
1376
1389
|
}
|
|
1377
|
-
}
|
|
1390
|
+
};
|
|
1391
|
+
this.agGridAdapter.getAgGridApi().addGlobalListener(this.listenerGlobalChartingChanges);
|
|
1378
1392
|
}
|
|
1379
1393
|
/**
|
|
1380
1394
|
* Row and Cell listeners created in 2020
|
|
@@ -2631,6 +2645,10 @@ You need to define at least one Layout!`);
|
|
|
2631
2645
|
return chartRef;
|
|
2632
2646
|
}
|
|
2633
2647
|
updateChart(chart) {
|
|
2648
|
+
if (!chart.Model) {
|
|
2649
|
+
this.logger.consoleError(`Chart definition must have a Model property to be updated: ${chart.Name}`);
|
|
2650
|
+
return;
|
|
2651
|
+
}
|
|
2634
2652
|
const upgradableProperties = {
|
|
2635
2653
|
// Only Range charts are supported to be created at run time
|
|
2636
2654
|
// the other two are pivot & cross-filter
|
|
@@ -2640,6 +2658,7 @@ You need to define at least one Layout!`);
|
|
|
2640
2658
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
2641
2659
|
aggFunc: chart.Model.aggFunc,
|
|
2642
2660
|
};
|
|
2661
|
+
// see also #ag_grid_update_chart_loop
|
|
2643
2662
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
2644
2663
|
}
|
|
2645
2664
|
getChartModels() {
|
|
@@ -2852,6 +2871,9 @@ You need to define at least one Layout!`);
|
|
|
2852
2871
|
agGridApi.removeEventListener('cellSelectionChanged', this.listenerCellSelectionChanged);
|
|
2853
2872
|
agGridApi.removeEventListener('sortChanged', this.listenerSortChanged);
|
|
2854
2873
|
agGridApi.removeGlobalListener(this.listenerGlobalSetRowSelection);
|
|
2874
|
+
if (this.listenerGlobalChartingChanges) {
|
|
2875
|
+
this.agGridAdapter.getAgGridApi().removeGlobalListener(this.listenerGlobalChartingChanges);
|
|
2876
|
+
}
|
|
2855
2877
|
this.listenerFirstDataRendered = null;
|
|
2856
2878
|
this.listenerPivotChanged = null;
|
|
2857
2879
|
this.listenerCellEditingStarted = null;
|
|
@@ -2928,7 +2950,9 @@ You need to define at least one Layout!`);
|
|
|
2928
2950
|
}
|
|
2929
2951
|
this.DANGER_USE_GETTER_adaptableContainerElement = null;
|
|
2930
2952
|
this.DANGER_USE_GETTER_agGridContainerElement = null;
|
|
2953
|
+
this.debouncedSetSelectedCells?.cancel?.();
|
|
2931
2954
|
this.debouncedSetSelectedCells = null;
|
|
2955
|
+
this.debouncedSetSelectedRows?.cancel?.();
|
|
2932
2956
|
this.debouncedSetSelectedRows = null;
|
|
2933
2957
|
this.adaptableStore?.destroy();
|
|
2934
2958
|
this.adaptableStore = null;
|
|
@@ -6,7 +6,8 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const uuid_1 = require("../utils/uuid");
|
|
7
7
|
const setZIndexMap = {};
|
|
8
8
|
const zIndexMap = [];
|
|
9
|
-
|
|
9
|
+
// starts with 3000, to be above the default zIndex of the Modal component
|
|
10
|
+
const BASE_Z_INDEX = 3000;
|
|
10
11
|
/**
|
|
11
12
|
* Used to facilitate the stacking between multiple opened windows.
|
|
12
13
|
* When calling 'bringToFront' brings caller to top.
|
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: 1749648042668 || Date.now(),
|
|
6
|
+
VERSION: "20.1.11" || '--current-version--',
|
|
7
7
|
};
|