@adaptabletools/adaptable 12.1.1 → 12.1.4
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/bundle.cjs.js +80 -80
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/Events/SearchChanged.d.ts +1 -0
- package/src/Api/FormatColumnApi.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +14 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +40 -11
- package/src/PredefinedConfig/FormatColumnState.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +8 -0
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/LayoutModule.js +2 -2
- package/src/Utilities/Services/MetamodelService.js +2 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +6 -2
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +11 -4
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -3
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +3 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +12 -9
- package/src/agGrid/PercentBarRenderer.d.ts +2 -1
- package/src/agGrid/PercentBarRenderer.js +3 -3
- package/src/agGrid/agGridHelper.d.ts +1 -1
- package/src/agGrid/agGridHelper.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -893,7 +893,7 @@ class Adaptable {
|
|
|
893
893
|
this.gridOptions.api.setColumnDefs(colDefs);
|
|
894
894
|
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
895
895
|
}
|
|
896
|
-
getFormatColumnCellStyle(formatColumn, params) {
|
|
896
|
+
getFormatColumnCellStyle(abColumn, formatColumn, params) {
|
|
897
897
|
if (!formatColumn.IncludeGroupedRows && this.isGroupRowNode(params.node)) {
|
|
898
898
|
return;
|
|
899
899
|
}
|
|
@@ -906,8 +906,8 @@ class Adaptable {
|
|
|
906
906
|
if (columnStyle) {
|
|
907
907
|
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
908
908
|
if (gradientStyle) {
|
|
909
|
-
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, params.node, params.value);
|
|
910
|
-
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, params.node, params.value);
|
|
909
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, abColumn, params.node, params.value);
|
|
910
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, abColumn, params.node, params.value);
|
|
911
911
|
const clampedValue = clamp_1.default(params.value, min, max);
|
|
912
912
|
let cellBackColor;
|
|
913
913
|
let reverseGradient = false;
|
|
@@ -915,7 +915,8 @@ class Adaptable {
|
|
|
915
915
|
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
916
916
|
}
|
|
917
917
|
else {
|
|
918
|
-
const matchingRange = gradientStyle.CellRanges.find((r) => r.Min
|
|
918
|
+
const matchingRange = gradientStyle.CellRanges.find((r) => (r.Min == 'Col-Min' || r.Min <= clampedValue) &&
|
|
919
|
+
(r.Max == 'Col-Max' || r.Max >= clampedValue));
|
|
919
920
|
if (matchingRange) {
|
|
920
921
|
cellBackColor = matchingRange.Color;
|
|
921
922
|
reverseGradient = matchingRange.ReverseGradient;
|
|
@@ -2528,6 +2529,8 @@ class Adaptable {
|
|
|
2528
2529
|
this.listenerGlobalColumnEventsThatTriggerStateChange = null;
|
|
2529
2530
|
this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
|
|
2530
2531
|
this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = null;
|
|
2532
|
+
this.throttleFilterOnEditDataChange = null;
|
|
2533
|
+
this.throttleFilterOnTickingDataChange = null;
|
|
2531
2534
|
this.gridOptions.api.__adaptable = null;
|
|
2532
2535
|
this.gridOptions.api.setColumnDefs = GridApi_setColumnDefs;
|
|
2533
2536
|
this.gridOptions.getRowStyle = null;
|
|
@@ -3127,7 +3130,7 @@ class Adaptable {
|
|
|
3127
3130
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3128
3131
|
const cellStyle = (params) => {
|
|
3129
3132
|
const formatColumnCellStyle = formatColumn
|
|
3130
|
-
? this.getFormatColumnCellStyle(formatColumn, params)
|
|
3133
|
+
? this.getFormatColumnCellStyle(abColumn, formatColumn, params)
|
|
3131
3134
|
: undefined;
|
|
3132
3135
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3133
3136
|
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultCellStyle), this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), formatColumnCellStyle), this.getConditionalStyleCellStyle(conditionalStyles, abColumn, params)), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
@@ -3219,7 +3222,7 @@ class Adaptable {
|
|
|
3219
3222
|
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3220
3223
|
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
|
|
3221
3224
|
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
3222
|
-
return this.agGridHelper.createPercentBarRendererComp(formatColumn);
|
|
3225
|
+
return this.agGridHelper.createPercentBarRendererComp(formatColumn, abColumn);
|
|
3223
3226
|
}
|
|
3224
3227
|
if (formatColumn.ColumnStyle.CheckBoxStyle) {
|
|
3225
3228
|
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
@@ -3227,7 +3230,7 @@ class Adaptable {
|
|
|
3227
3230
|
}
|
|
3228
3231
|
});
|
|
3229
3232
|
}
|
|
3230
|
-
setupColumnTooltipValueGetter({ col, colId }) {
|
|
3233
|
+
setupColumnTooltipValueGetter({ col, colId, abColumn }) {
|
|
3231
3234
|
this.setColDefProperty(col, 'tooltipValueGetter', () => {
|
|
3232
3235
|
var _a;
|
|
3233
3236
|
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(colId);
|
|
@@ -3238,8 +3241,8 @@ class Adaptable {
|
|
|
3238
3241
|
formatColumn.ColumnStyle.PercentBarStyle.ToolTipText) {
|
|
3239
3242
|
if ((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle) {
|
|
3240
3243
|
return (params) => {
|
|
3241
|
-
const min = this.api.formatColumnApi.getNumericStyleMinValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
3242
|
-
const max = this.api.formatColumnApi.getNumericStyleMaxValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
3244
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
3245
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
3243
3246
|
const textOptions = formatColumn.ColumnStyle.PercentBarStyle.ToolTipText;
|
|
3244
3247
|
let returnValue = '';
|
|
3245
3248
|
if (textOptions.includes('CellValue')) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
-
|
|
3
|
+
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
export declare const getPercentBarRendererForColumn: (formatColumn: FormatColumn, abColumn: AdaptableColumn, api: AdaptableApi) => any;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
6
6
|
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
7
7
|
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
8
|
-
const getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
8
|
+
const getPercentBarRendererForColumn = (formatColumn, abColumn, api) => {
|
|
9
9
|
var _a;
|
|
10
10
|
if (!((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle)) {
|
|
11
11
|
return;
|
|
@@ -15,8 +15,8 @@ const getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
|
15
15
|
if (!formatColumn.IncludeGroupedRows && api.gridApi.isGroupRowNode(params.node)) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const min = api.formatColumnApi.getNumericStyleMinValue(formatColumn.ColumnStyle, params.node, params.value);
|
|
19
|
-
const max = api.formatColumnApi.getNumericStyleMaxValue(formatColumn.ColumnStyle, params.node, params.value);
|
|
18
|
+
const min = api.formatColumnApi.getNumericStyleMinValue(formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
19
|
+
const max = api.formatColumnApi.getNumericStyleMaxValue(formatColumn.ColumnStyle, abColumn, params.node, params.value);
|
|
20
20
|
let value = params.value;
|
|
21
21
|
if (Helper_1.default.objectNotExists(value)) {
|
|
22
22
|
value = 0;
|
|
@@ -21,7 +21,7 @@ export declare class agGridHelper {
|
|
|
21
21
|
setUpModules(): Map<AdaptableModule, IModule>;
|
|
22
22
|
TrySetUpNodeIds(hasAutogeneratedPrimaryKey: boolean): boolean;
|
|
23
23
|
createCheckboxRendererComp(columnId: string, isColumnReadOnly: boolean): ICellRendererFunc | undefined;
|
|
24
|
-
createPercentBarRendererComp(formatColumn: FormatColumn): ICellRendererFunc;
|
|
24
|
+
createPercentBarRendererComp(formatColumn: FormatColumn, abColumn: AdaptableColumn): ICellRendererFunc;
|
|
25
25
|
getCleanValue(value: string): string | undefined;
|
|
26
26
|
getRenderedValue(colDef: ColDef, valueToRender: any): any;
|
|
27
27
|
createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
|
|
@@ -148,8 +148,8 @@ class agGridHelper {
|
|
|
148
148
|
createCheckboxRendererComp(columnId, isColumnReadOnly) {
|
|
149
149
|
return CheckboxRenderer_1.getCheckboxRendererForColumn(columnId, isColumnReadOnly, this.adaptable.api);
|
|
150
150
|
}
|
|
151
|
-
createPercentBarRendererComp(formatColumn) {
|
|
152
|
-
return PercentBarRenderer_1.getPercentBarRendererForColumn(formatColumn, this.adaptable.api);
|
|
151
|
+
createPercentBarRendererComp(formatColumn, abColumn) {
|
|
152
|
+
return PercentBarRenderer_1.getPercentBarRendererForColumn(formatColumn, abColumn, this.adaptable.api);
|
|
153
153
|
}
|
|
154
154
|
getCleanValue(value) {
|
|
155
155
|
if (value == null || value == 'null' || value == undefined || value == 'undefined') {
|