@adaptabletools/adaptable-cjs 18.0.0-canary.16 → 18.0.0-canary.18
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/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -3
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -3
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +6 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +98 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +17 -1
- package/src/Redux/Store/AdaptableStore.js +11 -6
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -5
- package/src/Strategy/AdaptableModuleBase.js +9 -8
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +7 -6
- package/src/Strategy/CellSummaryModule.js +37 -12
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +43 -39
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/CommentModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -1
- package/src/Strategy/DashboardModule.js +8 -7
- package/src/Strategy/DataImportModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/LayoutModule.js +31 -22
- package/src/Strategy/NoteModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.js +26 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +125 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +25 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +29 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +7 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Datepicker/index.js +3 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -15
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -21
|
@@ -99,7 +99,6 @@ const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
|
|
|
99
99
|
const Modal_1 = require("../components/Modal");
|
|
100
100
|
const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
|
|
101
101
|
const react_1 = require("react");
|
|
102
|
-
const SummaryService_1 = require("../Utilities/Services/SummaryService");
|
|
103
102
|
const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
|
|
104
103
|
const RowNodeProto = core_1.RowNode.prototype;
|
|
105
104
|
const RowNode_dispatchLocalEvent = RowNodeProto.dispatchLocalEvent;
|
|
@@ -902,7 +901,7 @@ class AdaptableAgGrid {
|
|
|
902
901
|
*/
|
|
903
902
|
// this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
904
903
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
|
|
905
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
904
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
906
905
|
const providedColumnTypes = original_columnTypes || {};
|
|
907
906
|
const gridOptionsColumnTypes = gridOptions.columnTypes || {};
|
|
908
907
|
const patchedColumnTypes = Object.assign(providedColumnTypes, {
|
|
@@ -919,6 +918,12 @@ class AdaptableAgGrid {
|
|
|
919
918
|
abColDefTupleNumberArray: (_j = gridOptionsColumnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
|
|
920
919
|
abColDefObjectNumberArray: (_k = gridOptionsColumnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
|
|
921
920
|
});
|
|
921
|
+
const customColumnTypes = (_l = this.api.columnApi.getColumnTypes()) !== null && _l !== void 0 ? _l : [];
|
|
922
|
+
for (const customColumnType of customColumnTypes) {
|
|
923
|
+
if (!patchedColumnTypes[customColumnType]) {
|
|
924
|
+
patchedColumnTypes[customColumnType] = {};
|
|
925
|
+
}
|
|
926
|
+
}
|
|
922
927
|
if (patchedColumnTypes.abColDefNumber.cellEditor == undefined) {
|
|
923
928
|
patchedColumnTypes.abColDefNumber.cellEditor =
|
|
924
929
|
this.variant === 'react' ? AdaptableNumberEditor_1.ReactAdaptableNumberEditor : AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
@@ -1573,7 +1578,6 @@ class AdaptableAgGrid {
|
|
|
1573
1578
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
1574
1579
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
1575
1580
|
this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
|
|
1576
|
-
this.SummaryService = new SummaryService_1.SummaryService(this.api);
|
|
1577
1581
|
this.CellPopupService = new CellPopupService_1.CellPopupService(this.api);
|
|
1578
1582
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
1579
1583
|
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core';
|
|
3
3
|
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
4
4
|
export declare const ReactAdaptableDateEditor: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & {
|
|
5
5
|
showClearButton?: boolean;
|
|
@@ -6,8 +6,8 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
7
7
|
const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
|
|
8
8
|
const core_1 = require("ag-grid-community");
|
|
9
|
-
const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
10
9
|
const react_1 = require("react");
|
|
10
|
+
const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
11
11
|
function shouldClearExistingValue(params) {
|
|
12
12
|
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
13
13
|
}
|
|
@@ -6,12 +6,12 @@ import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core';
|
|
|
6
6
|
interface AdaptableNumberCellEditorParams extends ICellEditorParams {
|
|
7
7
|
/**
|
|
8
8
|
* Whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
|
|
9
|
-
* @
|
|
9
|
+
* @defaultValue true
|
|
10
10
|
*/
|
|
11
11
|
showClearButton: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Value to set for the cell, when the clear button is pressed
|
|
14
|
-
* @
|
|
14
|
+
* @defaultValue '' (empty string)
|
|
15
15
|
*/
|
|
16
16
|
emptyValue: string;
|
|
17
17
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IAggFuncParams } from '@ag-grid-community/core';
|
|
2
|
-
import { CellSummaryOperationContext } from '../types';
|
|
3
2
|
export declare const getNumericValue: (input: unknown) => number | null;
|
|
4
3
|
export declare const weightedAverage: (params: IAggFuncParams, columnId: string, weightColumnId: string) => {
|
|
5
4
|
[x: string]: number | (() => number | "");
|
|
6
5
|
toString: () => number | "";
|
|
7
6
|
valueOf: () => number;
|
|
8
7
|
};
|
|
9
|
-
export declare const cellSummaryWeightedAverage: ({ numericColumns, selectedCellInfo, adaptableApi, }: CellSummaryOperationContext) => any;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.weightedAverage = exports.getNumericValue = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
6
5
|
const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
|
|
7
6
|
const getNumericValue = (input) => {
|
|
8
7
|
if (typeof input === 'number') {
|
|
@@ -52,57 +51,3 @@ const weightedAverage = (params, columnId, weightColumnId) => {
|
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
53
|
exports.weightedAverage = weightedAverage;
|
|
55
|
-
const cellSummaryWeightedAverage = ({ numericColumns, selectedCellInfo, adaptableApi, }) => {
|
|
56
|
-
if ((numericColumns === null || numericColumns === void 0 ? void 0 : numericColumns.length) != 1) {
|
|
57
|
-
return '';
|
|
58
|
-
}
|
|
59
|
-
const columnId = numericColumns[0];
|
|
60
|
-
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
61
|
-
const selectedColumnAgg = currentLayout.AggregationColumns[columnId];
|
|
62
|
-
if (!selectedColumnAgg ||
|
|
63
|
-
typeof selectedColumnAgg !== 'object' ||
|
|
64
|
-
selectedColumnAgg.type !== 'weightedAverage') {
|
|
65
|
-
return '';
|
|
66
|
-
}
|
|
67
|
-
const weightedColumnId = selectedColumnAgg.weightedColumnId;
|
|
68
|
-
if (weightedColumnId) {
|
|
69
|
-
let sumWeightedValue = 0;
|
|
70
|
-
let sumPrimaryValues = 0;
|
|
71
|
-
let isValid = true;
|
|
72
|
-
selectedCellInfo.gridCells.forEach((gridCell) => {
|
|
73
|
-
if (adaptableApi.gridApi.isGroupRowNode(gridCell.rowNode)) {
|
|
74
|
-
isValid = false;
|
|
75
|
-
}
|
|
76
|
-
if (isValid) {
|
|
77
|
-
const weightedGridCell = adaptableApi.gridApi.getGridCellFromRowNode(gridCell.rowNode, weightedColumnId);
|
|
78
|
-
sumWeightedValue += weightedGridCell.rawValue;
|
|
79
|
-
sumPrimaryValues += weightedGridCell.rawValue * gridCell.normalisedValue;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
if (!isValid) {
|
|
83
|
-
return '';
|
|
84
|
-
}
|
|
85
|
-
const abColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
86
|
-
if (!abColumn) {
|
|
87
|
-
return '';
|
|
88
|
-
}
|
|
89
|
-
const activeFormatColumnsWithDisplayFormat = adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
90
|
-
if (activeFormatColumnsWithDisplayFormat.length === 1 &&
|
|
91
|
-
activeFormatColumnsWithDisplayFormat[0].DisplayFormat.Formatter === 'NumberFormatter') {
|
|
92
|
-
// there only one FormatColumn on this column, so we will use it to format the aggregated value
|
|
93
|
-
const [singleActiveFormatColumnsWithDisplayFormat] = activeFormatColumnsWithDisplayFormat;
|
|
94
|
-
const options = singleActiveFormatColumnsWithDisplayFormat
|
|
95
|
-
.DisplayFormat.Options;
|
|
96
|
-
if (options) {
|
|
97
|
-
return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
// there are multiple (possibly conflicting) FormatColumns for this column, we cannot know which to use
|
|
102
|
-
return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, {
|
|
103
|
-
FractionDigits: 2,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
exports.cellSummaryWeightedAverage = cellSummaryWeightedAverage;
|
|
@@ -103,7 +103,9 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
103
103
|
setVisible(true);
|
|
104
104
|
}
|
|
105
105
|
} }),
|
|
106
|
-
React.createElement(AdaptableDateInlineInput_1.AdaptableDateInlineInput, { ref: ref, value: inputValue,
|
|
106
|
+
React.createElement(AdaptableDateInlineInput_1.AdaptableDateInlineInput, { ref: ref, value: inputValue,
|
|
107
|
+
// We do not want to show the format when the date-picker is visible
|
|
108
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : '', onChange: (value) => {
|
|
107
109
|
const date = new Date(value);
|
|
108
110
|
if ((0, date_fns_1.isValid)(date)) {
|
|
109
111
|
updateValue(date);
|
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.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1711631076312 || Date.now(),
|
|
6
|
+
VERSION: "18.0.0-canary.18" || '--current-version--',
|
|
7
7
|
};
|