@adaptabletools/adaptable-cjs 18.0.11 → 18.0.12
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": "18.0.
|
|
3
|
+
"version": "18.0.12",
|
|
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",
|
|
@@ -1795,10 +1795,7 @@ class AdaptableAgGrid {
|
|
|
1795
1795
|
if (!this.hasAutogeneratedPrimaryKey) {
|
|
1796
1796
|
// support both AG Grid pre & post v31.3.x
|
|
1797
1797
|
// TODO remove this with the next major Adaptable version
|
|
1798
|
-
result =
|
|
1799
|
-
typeof agGridApi.getCellValue === 'function'
|
|
1800
|
-
? agGridApi.getCellValue({ colKey: this.adaptableOptions.primaryKey, rowNode })
|
|
1801
|
-
: agGridApi.getValue(this.adaptableOptions.primaryKey, rowNode);
|
|
1798
|
+
result = this.agGridAdapter._agGridApi_getValue(this.adaptableOptions.primaryKey, rowNode, agGridApi);
|
|
1802
1799
|
}
|
|
1803
1800
|
if (result == undefined && rowNode.data) {
|
|
1804
1801
|
result = rowNode.data[this.adaptableOptions.primaryKey];
|
|
@@ -1809,7 +1806,7 @@ class AdaptableAgGrid {
|
|
|
1809
1806
|
if (rowNode == null) {
|
|
1810
1807
|
return undefined;
|
|
1811
1808
|
}
|
|
1812
|
-
return this.agGridAdapter.
|
|
1809
|
+
return this.agGridAdapter._agGridApi_getValue(columnId, rowNode);
|
|
1813
1810
|
}
|
|
1814
1811
|
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
1815
1812
|
if (rowNode == null) {
|
|
@@ -61,4 +61,6 @@ export declare class AgGridAdapter {
|
|
|
61
61
|
*/
|
|
62
62
|
assignColumnIdsToColDefs(colDefs?: (ColDef | ColGroupDef)[]): void;
|
|
63
63
|
getDefaultColumnDefinition(): GridOptions['defaultColDef'];
|
|
64
|
+
_agGridApi_getValue(colKey: string | Column, rowNode: IRowNode, gridApi?: GridApi): any;
|
|
64
65
|
}
|
|
66
|
+
export declare const _agGridApi_getValue: (colKey: string | Column, rowNode: IRowNode, gridApi: GridApi) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgGridAdapter = void 0;
|
|
3
|
+
exports._agGridApi_getValue = exports.AgGridAdapter = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("ag-grid-community");
|
|
6
6
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
@@ -346,7 +346,7 @@ class AgGridAdapter {
|
|
|
346
346
|
}
|
|
347
347
|
row = childNodes[0];
|
|
348
348
|
}
|
|
349
|
-
const value = this.
|
|
349
|
+
const value = this._agGridApi_getValue(column, row);
|
|
350
350
|
if (value instanceof Date) {
|
|
351
351
|
dataType = 'Date';
|
|
352
352
|
}
|
|
@@ -590,5 +590,15 @@ class AgGridAdapter {
|
|
|
590
590
|
// for early init phase, gridApi might not be ready yet
|
|
591
591
|
return (_b = (_a = this.getAgGridApi(true)) === null || _a === void 0 ? void 0 : _a.getGridOption('defaultColDef')) !== null && _b !== void 0 ? _b : {};
|
|
592
592
|
}
|
|
593
|
+
_agGridApi_getValue(colKey, rowNode, gridApi) {
|
|
594
|
+
return (0, exports._agGridApi_getValue)(colKey, rowNode, gridApi || this.getAgGridApi());
|
|
595
|
+
}
|
|
593
596
|
}
|
|
594
597
|
exports.AgGridAdapter = AgGridAdapter;
|
|
598
|
+
// FIXME remove this once we support only AG Grid >=30.3.x
|
|
599
|
+
const _agGridApi_getValue = (colKey, rowNode, gridApi) => {
|
|
600
|
+
return typeof gridApi.getCellValue === 'function'
|
|
601
|
+
? gridApi.getCellValue({ colKey, rowNode })
|
|
602
|
+
: gridApi.getValue(colKey, rowNode);
|
|
603
|
+
};
|
|
604
|
+
exports._agGridApi_getValue = _agGridApi_getValue;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.weightedAverage = exports.getNumericValue = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
|
|
6
|
+
const AgGridAdapter_1 = require("./AgGridAdapter");
|
|
6
7
|
const getNumericValue = (input) => {
|
|
7
8
|
if (typeof input === 'number') {
|
|
8
9
|
return input;
|
|
@@ -18,9 +19,9 @@ const weightedAverage = (params, columnId, weightColumnId) => {
|
|
|
18
19
|
// TODO AFL: improve performance by using the intermediary aggregated values (for nested groups)
|
|
19
20
|
groupRowNode.allLeafChildren.forEach((rowNode) => {
|
|
20
21
|
// when editing values might be converted to strings
|
|
21
|
-
const rawColumnValue =
|
|
22
|
+
const rawColumnValue = (0, AgGridAdapter_1._agGridApi_getValue)(columnId, rowNode, gridApi);
|
|
22
23
|
const columnValue = (0, exports.getNumericValue)(rawColumnValue);
|
|
23
|
-
const rawWeightedColumnValue =
|
|
24
|
+
const rawWeightedColumnValue = (0, AgGridAdapter_1._agGridApi_getValue)(weightColumnId, rowNode, gridApi);
|
|
24
25
|
const weightedColumnValue = (0, exports.getNumericValue)(rawWeightedColumnValue);
|
|
25
26
|
if (weightedColumnValue !== null) {
|
|
26
27
|
weightedColumnValueSum += weightedColumnValue;
|
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.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1716379134351 || Date.now(),
|
|
6
|
+
VERSION: "18.0.12" || '--current-version--',
|
|
7
7
|
};
|