@adaptabletools/adaptable-cjs 19.2.2-canary.0 → 19.2.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "19.2.2
|
|
3
|
+
"version": "19.2.2",
|
|
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",
|
|
@@ -125,6 +125,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
125
125
|
*/
|
|
126
126
|
private adaptableStatusPanelKeys;
|
|
127
127
|
_PRIVATE_adaptableJSXElement: JSX.Element;
|
|
128
|
+
private DANGER_updateGridOptionsMonkeyPatcher;
|
|
128
129
|
constructor();
|
|
129
130
|
static forEachAdaptable(fn: (adaptable: AdaptableAgGrid) => void): void;
|
|
130
131
|
private static collectInstance;
|
|
@@ -433,12 +433,13 @@ class AdaptableAgGrid {
|
|
|
433
433
|
this.lifecycleState = 'ready';
|
|
434
434
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
435
435
|
setTimeout(() => {
|
|
436
|
+
var _a, _b;
|
|
436
437
|
// without the setTimeout, calling autoSizeAllColumns immediately in the onAdaptableReady
|
|
437
438
|
// does not work. (I prefer setTimeout to rAF, as raf is not running when you switch tabs)
|
|
438
439
|
//
|
|
439
440
|
// it also makes it possible to listen to CALCULATED_COLUMN_READY, DASHBOARD_READY, etc.
|
|
440
441
|
// in onAdaptableReady - without this those event listeners are not triggered
|
|
441
|
-
this.api.eventApi.emit('AdaptableReady', {
|
|
442
|
+
(_b = (_a = this.api) === null || _a === void 0 ? void 0 : _a.eventApi) === null || _b === void 0 ? void 0 : _b.emit('AdaptableReady', {
|
|
442
443
|
adaptableApi: this.api,
|
|
443
444
|
agGridApi: this.agGridAdapter.getAgGridApi(),
|
|
444
445
|
});
|
|
@@ -1633,7 +1634,10 @@ class AdaptableAgGrid {
|
|
|
1633
1634
|
autoSizeLayoutIfNeeded() {
|
|
1634
1635
|
if (this.shouldAutoSizeLayout()) {
|
|
1635
1636
|
requestAnimationFrame(() => {
|
|
1636
|
-
|
|
1637
|
+
var _a;
|
|
1638
|
+
if (this.isAvailable) {
|
|
1639
|
+
(_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.autoSizeAllColumns();
|
|
1640
|
+
}
|
|
1637
1641
|
});
|
|
1638
1642
|
}
|
|
1639
1643
|
}
|
|
@@ -3078,14 +3082,15 @@ class AdaptableAgGrid {
|
|
|
3078
3082
|
}
|
|
3079
3083
|
}
|
|
3080
3084
|
DANGER_AG_GRID_BEANS_MAP[this._agGridId] = null;
|
|
3085
|
+
this.DANGER_updateGridOptionsMonkeyPatcher = null;
|
|
3081
3086
|
if ((config === null || config === void 0 ? void 0 : config.destroyApi) === true || (config === null || config === void 0 ? void 0 : config.destroyAgGrid) === true) {
|
|
3082
3087
|
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
3083
3088
|
}
|
|
3084
3089
|
this.previousAgGridLayoutState = '';
|
|
3085
3090
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
3086
3091
|
if (gridContainerElement) {
|
|
3087
|
-
gridContainerElement.removeEventListener('keydown', this.agGridListenerKeydown);
|
|
3088
|
-
gridContainerElement.removeEventListener('mouseenter', this.agGridListenerMouseEnter);
|
|
3092
|
+
gridContainerElement.removeEventListener('keydown', this.agGridListenerKeydown, true);
|
|
3093
|
+
gridContainerElement.removeEventListener('mouseenter', this.agGridListenerMouseEnter, true);
|
|
3089
3094
|
gridContainerElement.removeEventListener('mouseleave', this.agGridListenerMouseLeave);
|
|
3090
3095
|
this.agGridListenerKeydown = null;
|
|
3091
3096
|
this.agGridListenerMouseEnter = null;
|
|
@@ -3510,7 +3515,9 @@ class AdaptableAgGrid {
|
|
|
3510
3515
|
if (pivoted && ((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.layoutOptions) === null || _d === void 0 ? void 0 : _d.autoSizeColumnsInPivotLayout)) {
|
|
3511
3516
|
// when a pivoted layout loads, autosize all cols
|
|
3512
3517
|
requestAnimationFrame(() => {
|
|
3513
|
-
this.
|
|
3518
|
+
if (this.isAvailable) {
|
|
3519
|
+
this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
3520
|
+
}
|
|
3514
3521
|
});
|
|
3515
3522
|
// //but if it's also the first time the grid is loading
|
|
3516
3523
|
// //it's not timely enough the above call, so we keep trying... I know it's ugly, we need to find a better way
|
|
@@ -3525,7 +3532,9 @@ class AdaptableAgGrid {
|
|
|
3525
3532
|
if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
|
|
3526
3533
|
colsToAutoSizeArray.length) {
|
|
3527
3534
|
requestAnimationFrame(() => {
|
|
3528
|
-
this.
|
|
3535
|
+
if (this.isAvailable) {
|
|
3536
|
+
this.autoSizeColumns(colsToAutoSizeArray);
|
|
3537
|
+
}
|
|
3529
3538
|
});
|
|
3530
3539
|
}
|
|
3531
3540
|
}
|
|
@@ -4079,6 +4088,7 @@ class AdaptableAgGrid {
|
|
|
4079
4088
|
};
|
|
4080
4089
|
});
|
|
4081
4090
|
}
|
|
4091
|
+
// #gridOpts_monkey_patch
|
|
4082
4092
|
// we need to intercept some of the GridOptions updates and refresh the Adaptable state
|
|
4083
4093
|
monkeyPatchingGridOptionsUpdates(agGridApi) {
|
|
4084
4094
|
var _a;
|
|
@@ -4087,7 +4097,7 @@ class AdaptableAgGrid {
|
|
|
4087
4097
|
this.logger.consoleError('Could not get hold of GridOptionsService! This is a critical error and will prevent Adaptable from working correctly.');
|
|
4088
4098
|
}
|
|
4089
4099
|
const self = this;
|
|
4090
|
-
|
|
4100
|
+
this.DANGER_updateGridOptionsMonkeyPatcher = function ({ options, force, source = 'api', }) {
|
|
4091
4101
|
// `columnDefs`
|
|
4092
4102
|
const passedColumnDefs = options.columnDefs;
|
|
4093
4103
|
if (passedColumnDefs) {
|
|
@@ -4114,6 +4124,7 @@ class AdaptableAgGrid {
|
|
|
4114
4124
|
// we mutated the options array, so it's OK to use the 'arguments' object
|
|
4115
4125
|
GridOptionsService_updateGridOptions.apply(this, arguments);
|
|
4116
4126
|
};
|
|
4127
|
+
gridOptionsService.updateGridOptions = this.DANGER_updateGridOptionsMonkeyPatcher;
|
|
4117
4128
|
}
|
|
4118
4129
|
DANGER_getPrivateAgGridBeans() {
|
|
4119
4130
|
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
@@ -12,6 +12,7 @@ class AgGridOptionsService {
|
|
|
12
12
|
this.colDefPropertyCache.clear();
|
|
13
13
|
this.gridOptionsPropertyCache = null;
|
|
14
14
|
this.colDefPropertyCache = null;
|
|
15
|
+
this.adaptableInstance = null;
|
|
15
16
|
}
|
|
16
17
|
setGridOptionsProperty(gridOptions, propertyName, propertyGetter) {
|
|
17
18
|
if (this.adaptableInstance.lifecycleState === 'preDestroyed') {
|
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: "19.2.2
|
|
5
|
+
PUBLISH_TIMESTAMP: 1732896423270 || Date.now(),
|
|
6
|
+
VERSION: "19.2.2" || '--current-version--',
|
|
7
7
|
};
|