@adaptabletools/adaptable 18.0.10 → 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",
|
|
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",
|
|
@@ -1789,7 +1789,9 @@ export class AdaptableAgGrid {
|
|
|
1789
1789
|
const agGridApi = gridApi || this.agGridAdapter.getAgGridApi();
|
|
1790
1790
|
let result;
|
|
1791
1791
|
if (!this.hasAutogeneratedPrimaryKey) {
|
|
1792
|
-
|
|
1792
|
+
// support both AG Grid pre & post v31.3.x
|
|
1793
|
+
// TODO remove this with the next major Adaptable version
|
|
1794
|
+
result = this.agGridAdapter._agGridApi_getValue(this.adaptableOptions.primaryKey, rowNode, agGridApi);
|
|
1793
1795
|
}
|
|
1794
1796
|
if (result == undefined && rowNode.data) {
|
|
1795
1797
|
result = rowNode.data[this.adaptableOptions.primaryKey];
|
|
@@ -1800,7 +1802,7 @@ export class AdaptableAgGrid {
|
|
|
1800
1802
|
if (rowNode == null) {
|
|
1801
1803
|
return undefined;
|
|
1802
1804
|
}
|
|
1803
|
-
return this.agGridAdapter.
|
|
1805
|
+
return this.agGridAdapter._agGridApi_getValue(columnId, rowNode);
|
|
1804
1806
|
}
|
|
1805
1807
|
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
1806
1808
|
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;
|
|
@@ -342,7 +342,7 @@ export class AgGridAdapter {
|
|
|
342
342
|
}
|
|
343
343
|
row = childNodes[0];
|
|
344
344
|
}
|
|
345
|
-
const value = this.
|
|
345
|
+
const value = this._agGridApi_getValue(column, row);
|
|
346
346
|
if (value instanceof Date) {
|
|
347
347
|
dataType = 'Date';
|
|
348
348
|
}
|
|
@@ -586,4 +586,13 @@ export class AgGridAdapter {
|
|
|
586
586
|
// for early init phase, gridApi might not be ready yet
|
|
587
587
|
return (_b = (_a = this.getAgGridApi(true)) === null || _a === void 0 ? void 0 : _a.getGridOption('defaultColDef')) !== null && _b !== void 0 ? _b : {};
|
|
588
588
|
}
|
|
589
|
+
_agGridApi_getValue(colKey, rowNode, gridApi) {
|
|
590
|
+
return _agGridApi_getValue(colKey, rowNode, gridApi || this.getAgGridApi());
|
|
591
|
+
}
|
|
589
592
|
}
|
|
593
|
+
// FIXME remove this once we support only AG Grid >=30.3.x
|
|
594
|
+
export const _agGridApi_getValue = (colKey, rowNode, gridApi) => {
|
|
595
|
+
return typeof gridApi.getCellValue === 'function'
|
|
596
|
+
? gridApi.getCellValue({ colKey, rowNode })
|
|
597
|
+
: gridApi.getValue(colKey, rowNode);
|
|
598
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import toNumber from 'lodash/toNumber';
|
|
2
|
+
import { _agGridApi_getValue } from './AgGridAdapter';
|
|
2
3
|
export const getNumericValue = (input) => {
|
|
3
4
|
if (typeof input === 'number') {
|
|
4
5
|
return input;
|
|
@@ -13,9 +14,9 @@ export const weightedAverage = (params, columnId, weightColumnId) => {
|
|
|
13
14
|
// TODO AFL: improve performance by using the intermediary aggregated values (for nested groups)
|
|
14
15
|
groupRowNode.allLeafChildren.forEach((rowNode) => {
|
|
15
16
|
// when editing values might be converted to strings
|
|
16
|
-
const rawColumnValue =
|
|
17
|
+
const rawColumnValue = _agGridApi_getValue(columnId, rowNode, gridApi);
|
|
17
18
|
const columnValue = getNumericValue(rawColumnValue);
|
|
18
|
-
const rawWeightedColumnValue =
|
|
19
|
+
const rawWeightedColumnValue = _agGridApi_getValue(weightColumnId, rowNode, gridApi);
|
|
19
20
|
const weightedColumnValue = getNumericValue(rawWeightedColumnValue);
|
|
20
21
|
if (weightedColumnValue !== null) {
|
|
21
22
|
weightedColumnValueSum += weightedColumnValue;
|
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.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1716379103965 || Date.now(),
|
|
4
|
+
VERSION: "18.0.12" || '--current-version--',
|
|
5
5
|
};
|