@adaptabletools/adaptable 13.0.0-canary.15 → 13.0.0-canary.16
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 +123 -123
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +1 -1
- package/src/Api/FormatColumnApi.d.ts +1 -25
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +5 -5
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -6
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -52
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -1
- package/src/Api/Implementation/InternalApiImpl.js +0 -4
- package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +9 -3
- package/src/Api/Implementation/StyledColumnApiImpl.js +75 -16
- package/src/Api/InternalApi.d.ts +0 -1
- package/src/Api/ScopeApi.d.ts +1 -1
- package/src/Api/StyledColumnApi.d.ts +46 -22
- package/src/PredefinedConfig/FormatColumnState.d.ts +2 -87
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Strategy/ConditionalStyleModule.d.ts +0 -2
- package/src/Strategy/ConditionalStyleModule.js +0 -4
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +26 -207
- package/src/Strategy/StyledColumnModule.js +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +0 -1
- package/src/View/Components/RangesComponent.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -2
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +4 -3
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -7
- package/src/agGrid/Adaptable.d.ts +2 -8
- package/src/agGrid/Adaptable.js +30 -134
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/PercentBarRenderer.d.ts +1 -1
- package/src/agGrid/agGridHelper.d.ts +1 -1
- 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
|
@@ -23,7 +23,6 @@ const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
|
|
|
23
23
|
const StringExtensions_1 = require("../Utilities/Extensions/StringExtensions");
|
|
24
24
|
const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
|
|
25
25
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
|
|
26
|
-
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
27
26
|
const Helper_1 = require("../Utilities/Helpers/Helper");
|
|
28
27
|
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
29
28
|
const ObjectFactory_1 = require("../Utilities/ObjectFactory");
|
|
@@ -920,14 +919,11 @@ class Adaptable {
|
|
|
920
919
|
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
921
920
|
}
|
|
922
921
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
923
|
-
return this.getSpecialColumnStyle(styledColumn, abColumn, params);
|
|
924
|
-
}
|
|
925
|
-
getSpecialColumnStyle(columnStyle, abColumn, params) {
|
|
926
922
|
let style = {};
|
|
927
|
-
const gradientStyle =
|
|
923
|
+
const gradientStyle = styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.GradientStyle;
|
|
928
924
|
if (gradientStyle) {
|
|
929
|
-
const min = this.api.styledColumnApi.getNumericStyleMinValue(
|
|
930
|
-
const max = this.api.styledColumnApi.getNumericStyleMaxValue(
|
|
925
|
+
const min = this.api.styledColumnApi.getNumericStyleMinValue(styledColumn, abColumn, params.node, params.value);
|
|
926
|
+
const max = this.api.styledColumnApi.getNumericStyleMaxValue(styledColumn, abColumn, params.node, params.value);
|
|
931
927
|
const clampedValue = (0, clamp_1.default)(params.value, min, max);
|
|
932
928
|
let cellBackColor;
|
|
933
929
|
let reverseGradient = false;
|
|
@@ -951,16 +947,13 @@ class Adaptable {
|
|
|
951
947
|
const preparedColor = (0, StyleHelper_1.getVariableColor)(cellBackColor);
|
|
952
948
|
style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
|
|
953
949
|
}
|
|
954
|
-
if (
|
|
950
|
+
if (styledColumn.PercentBarStyle && styledColumn.PercentBarStyle.CellText) {
|
|
955
951
|
style.paddingTop = 0;
|
|
956
952
|
style.paddingBottom = 0;
|
|
957
953
|
}
|
|
958
954
|
return style;
|
|
959
955
|
}
|
|
960
|
-
|
|
961
|
-
return this.getSpecialColumnStyle(formatColumn.ColumnStyle, abColumn, params);
|
|
962
|
-
}
|
|
963
|
-
getFormatColumnColumnStyle(formatColumns) {
|
|
956
|
+
getFormatColumnAdaptableStyle(formatColumns) {
|
|
964
957
|
// first has more precedence, then they need to be applied in reverse order
|
|
965
958
|
return formatColumns.reduceRight((style, formatColumn) => {
|
|
966
959
|
const formatColumnStyle = this.convertAdaptableStyleToCSS(formatColumn.Style);
|
|
@@ -982,23 +975,14 @@ class Adaptable {
|
|
|
982
975
|
}
|
|
983
976
|
getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params) {
|
|
984
977
|
let style = {};
|
|
985
|
-
|
|
986
|
-
const columnStyle = formatColumn.ColumnStyle;
|
|
987
|
-
if (columnStyle) {
|
|
988
|
-
if (columnStyle &&
|
|
989
|
-
!this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params)) {
|
|
990
|
-
return style;
|
|
991
|
-
}
|
|
992
|
-
style = Object.assign(Object.assign({}, style), this.getFormatColumnSpecialColumnStyle(formatColumn, abColumn, params));
|
|
993
|
-
}
|
|
994
|
-
else if (formatColumn.Style) {
|
|
978
|
+
if (formatColumn.Style) {
|
|
995
979
|
const activeFormatColumnsWithStyle = formatColumnsWithStyle.filter((formatColumn) => {
|
|
996
980
|
return this.api.formatColumnApi.isFormatColumnActiveForColumn(formatColumn, abColumn, params);
|
|
997
981
|
});
|
|
998
982
|
if (!activeFormatColumnsWithStyle.length) {
|
|
999
983
|
return style;
|
|
1000
984
|
}
|
|
1001
|
-
style = Object.assign(Object.assign({}, style), this.
|
|
985
|
+
style = Object.assign(Object.assign({}, style), this.getFormatColumnAdaptableStyle(activeFormatColumnsWithStyle));
|
|
1002
986
|
}
|
|
1003
987
|
return style;
|
|
1004
988
|
}
|
|
@@ -1174,31 +1158,6 @@ class Adaptable {
|
|
|
1174
1158
|
}
|
|
1175
1159
|
return undefined;
|
|
1176
1160
|
}
|
|
1177
|
-
getConditionalStyleCellStyle(conditionalStyles = [], abColumn, params) {
|
|
1178
|
-
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
1179
|
-
const result = conditionalStyles.reduce((result, conditionalStyle) => {
|
|
1180
|
-
if (module.isConditionalStyleActiveForColumn(conditionalStyle, abColumn, params)) {
|
|
1181
|
-
return Object.assign(Object.assign({}, result), conditionalStyle.Style);
|
|
1182
|
-
}
|
|
1183
|
-
else {
|
|
1184
|
-
return result;
|
|
1185
|
-
}
|
|
1186
|
-
}, {});
|
|
1187
|
-
return this.convertAdaptableStyleToCSS(result);
|
|
1188
|
-
}
|
|
1189
|
-
getConditionalStyleCellClass(conditionalStyles = [], abColumn, params) {
|
|
1190
|
-
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
1191
|
-
let classNames = conditionalStyles
|
|
1192
|
-
.map((conditionalStyle) => {
|
|
1193
|
-
var _a, _b;
|
|
1194
|
-
if (((_a = conditionalStyle.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
1195
|
-
module.isConditionalStyleActiveForColumn(conditionalStyle, abColumn, params)) {
|
|
1196
|
-
return (_b = conditionalStyle.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
1197
|
-
}
|
|
1198
|
-
})
|
|
1199
|
-
.filter((x) => !!x);
|
|
1200
|
-
return classNames;
|
|
1201
|
-
}
|
|
1202
1161
|
getEditableCellClass(abColumn, params) {
|
|
1203
1162
|
const editableCellStyle = this.api.userInterfaceApi.getEditableCellStyle();
|
|
1204
1163
|
if (!(editableCellStyle === null || editableCellStyle === void 0 ? void 0 : editableCellStyle.ClassName)) {
|
|
@@ -1918,7 +1877,7 @@ class Adaptable {
|
|
|
1918
1877
|
if (colDef && colDef.cellRenderer != null) {
|
|
1919
1878
|
return true;
|
|
1920
1879
|
}
|
|
1921
|
-
if (this.api.columnApi.
|
|
1880
|
+
if (this.api.columnApi.isStyledNumericColumn(column)) {
|
|
1922
1881
|
return true;
|
|
1923
1882
|
}
|
|
1924
1883
|
if (this.api.columnApi.isBooleanColumn(column)) {
|
|
@@ -1973,7 +1932,7 @@ class Adaptable {
|
|
|
1973
1932
|
}
|
|
1974
1933
|
getDisplayValueFromRawValue(rowNode, columnId, rawValue) {
|
|
1975
1934
|
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1976
|
-
const isRenderedColumn = this.api.columnApi.
|
|
1935
|
+
const isRenderedColumn = this.api.columnApi.isStyledNumericColumn(abColumn);
|
|
1977
1936
|
if (isRenderedColumn) {
|
|
1978
1937
|
const colDef = this.gridOptions.api.getColumnDef(columnId);
|
|
1979
1938
|
if (typeof colDef.valueFormatter == 'function') {
|
|
@@ -3222,7 +3181,6 @@ class Adaptable {
|
|
|
3222
3181
|
if (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.IsSuspended) {
|
|
3223
3182
|
styledColumn = null;
|
|
3224
3183
|
}
|
|
3225
|
-
const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
|
|
3226
3184
|
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
3227
3185
|
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
3228
3186
|
const cellStyle = (params) => {
|
|
@@ -3230,8 +3188,7 @@ class Adaptable {
|
|
|
3230
3188
|
? this.getFormatColumnCellStyle(abColumn, formatColumn, formatColumnsWithStyle, params)
|
|
3231
3189
|
: undefined;
|
|
3232
3190
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
3233
|
-
const
|
|
3234
|
-
const result = Object.assign(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), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), conditionalStyleObj), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3191
|
+
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), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3235
3192
|
return result;
|
|
3236
3193
|
};
|
|
3237
3194
|
return cellStyle;
|
|
@@ -3240,10 +3197,6 @@ class Adaptable {
|
|
|
3240
3197
|
setupColumnCellClass({ col, colId, abColumn }) {
|
|
3241
3198
|
this.setColDefProperty(col, 'cellClass', (userCellClass) => {
|
|
3242
3199
|
const formatColumns = this.api.formatColumnApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
3243
|
-
const conditionalStyles = this.api.conditionalStyleApi
|
|
3244
|
-
.getConditionalStylesForColumn(abColumn)
|
|
3245
|
-
.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName));
|
|
3246
|
-
const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
|
|
3247
3200
|
const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
3248
3201
|
const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
3249
3202
|
const cellClass = (params) => {
|
|
@@ -3261,16 +3214,13 @@ class Adaptable {
|
|
|
3261
3214
|
!hasStyledColumn && formatColumns.length
|
|
3262
3215
|
? this.getFormatColumnCellClass(formatColumns, abColumn, params)
|
|
3263
3216
|
: null,
|
|
3264
|
-
hasConditionalStylesWithClassNames
|
|
3265
|
-
? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
|
|
3266
|
-
: null,
|
|
3267
3217
|
isQuickSearchActive ? quickSearchStyleClassName : null,
|
|
3268
3218
|
editableClassName,
|
|
3269
3219
|
readonlyClassName,
|
|
3270
3220
|
highlightAlertClassName,
|
|
3271
3221
|
flashingClassName,
|
|
3272
3222
|
]
|
|
3273
|
-
// we flatten the array because some rules ('userCellClass'
|
|
3223
|
+
// we flatten the array because some rules ('userCellClass' etc) might return a string[]
|
|
3274
3224
|
.flat()
|
|
3275
3225
|
.filter((x) => !!x);
|
|
3276
3226
|
const result = returnValue.length ? returnValue : undefined;
|
|
@@ -3292,9 +3242,8 @@ class Adaptable {
|
|
|
3292
3242
|
const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(adaptableColumn);
|
|
3293
3243
|
const hasRichSelectCellEditor = this.isAgGridModulePresent(core_1.ModuleNames.RichSelectModule);
|
|
3294
3244
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle)) {
|
|
3245
|
+
const styledColumn = this.api.styledColumnApi.getActiveStyledColumnForColumn(adaptableColumn);
|
|
3246
|
+
if (styledColumn && !(styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.IsSuspended) && styledColumn.CheckBoxStyle) {
|
|
3298
3247
|
return CheckboxRenderer_1.CheckboxEditor;
|
|
3299
3248
|
}
|
|
3300
3249
|
if (editLookUpItem) {
|
|
@@ -3330,43 +3279,23 @@ class Adaptable {
|
|
|
3330
3279
|
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
3331
3280
|
}
|
|
3332
3281
|
}
|
|
3333
|
-
const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
|
|
3334
|
-
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
|
|
3335
|
-
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
3336
|
-
return this.agGridHelper.createPercentBarRendererComp(formatColumn.ColumnStyle, abColumn);
|
|
3337
|
-
}
|
|
3338
|
-
if (formatColumn.ColumnStyle.CheckBoxStyle) {
|
|
3339
|
-
return this.agGridHelper.createCheckboxRendererComp(abColumn.columnId, abColumn.readOnly);
|
|
3340
|
-
}
|
|
3341
|
-
}
|
|
3342
3282
|
});
|
|
3343
3283
|
}
|
|
3344
3284
|
setupColumnTooltipValueGetter({ col, colId, abColumn }) {
|
|
3345
3285
|
this.setColDefProperty(col, 'tooltipValueGetter', () => {
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
formatColumn.ColumnStyle.PercentBarStyle.ToolTipText) {
|
|
3353
|
-
if ((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle) {
|
|
3286
|
+
const styledColumn = this.api.styledColumnApi.getStyledColumnByColumnId(colId);
|
|
3287
|
+
if (styledColumn &&
|
|
3288
|
+
!styledColumn.IsSuspended &&
|
|
3289
|
+
styledColumn.PercentBarStyle &&
|
|
3290
|
+
styledColumn.PercentBarStyle.ToolTipText) {
|
|
3291
|
+
if (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.PercentBarStyle) {
|
|
3354
3292
|
return (params) => {
|
|
3355
|
-
const min = this.api.styledColumnApi.getNumericStyleMinValue(
|
|
3356
|
-
const max = this.api.styledColumnApi.getNumericStyleMaxValue(
|
|
3357
|
-
const textOptions =
|
|
3293
|
+
const min = this.api.styledColumnApi.getNumericStyleMinValue(styledColumn, abColumn, params.node, params.value);
|
|
3294
|
+
const max = this.api.styledColumnApi.getNumericStyleMaxValue(styledColumn, abColumn, params.node, params.value);
|
|
3295
|
+
const textOptions = styledColumn.PercentBarStyle.ToolTipText;
|
|
3358
3296
|
let returnValue = '';
|
|
3359
3297
|
if (textOptions.includes('CellValue')) {
|
|
3360
|
-
|
|
3361
|
-
const options = formatColumn.DisplayFormat
|
|
3362
|
-
.Options;
|
|
3363
|
-
returnValue = options
|
|
3364
|
-
? FormatHelper_1.default.NumberFormatter(params.value, options)
|
|
3365
|
-
: params.value;
|
|
3366
|
-
}
|
|
3367
|
-
else {
|
|
3368
|
-
returnValue = params.value;
|
|
3369
|
-
}
|
|
3298
|
+
returnValue = params.value;
|
|
3370
3299
|
}
|
|
3371
3300
|
if (textOptions.includes('PercentageValue')) {
|
|
3372
3301
|
const clampedValue = Helper_1.Helper.clamp(params.value, min, max);
|
|
@@ -3761,7 +3690,7 @@ class Adaptable {
|
|
|
3761
3690
|
this.redrawRow(firstInfo.rowNode);
|
|
3762
3691
|
}
|
|
3763
3692
|
else {
|
|
3764
|
-
this.
|
|
3693
|
+
this.getStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos);
|
|
3765
3694
|
if (dataChangedScope.columnIds.size > 0) {
|
|
3766
3695
|
this.refreshCells([firstInfo.rowNode], Array.from(dataChangedScope.columnIds.values()), true);
|
|
3767
3696
|
}
|
|
@@ -3771,7 +3700,6 @@ class Adaptable {
|
|
|
3771
3700
|
}
|
|
3772
3701
|
getExpressionStylesChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3773
3702
|
const stylesWithExpression = [];
|
|
3774
|
-
stylesWithExpression.push(...this.api.conditionalStyleApi.getConditionalStylesWithExpression());
|
|
3775
3703
|
stylesWithExpression.push(...this.api.formatColumnApi.getFormatColumnsWithExpression());
|
|
3776
3704
|
if (ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(stylesWithExpression)) {
|
|
3777
3705
|
return;
|
|
@@ -3800,20 +3728,15 @@ class Adaptable {
|
|
|
3800
3728
|
}
|
|
3801
3729
|
});
|
|
3802
3730
|
}
|
|
3803
|
-
|
|
3804
|
-
this.api.
|
|
3805
|
-
let columnComparison = this.api.
|
|
3731
|
+
getStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3732
|
+
this.api.styledColumnApi.getAllStyledColumn().forEach((sc) => {
|
|
3733
|
+
let columnComparison = this.api.styledColumnApi.getColumnComparisonForStyledColumn(sc);
|
|
3806
3734
|
if (columnComparison) {
|
|
3807
|
-
let affectedColumnIds = this.api.
|
|
3735
|
+
let affectedColumnIds = this.api.styledColumnApi.getColumnIdsFromColumnComparison(columnComparison);
|
|
3808
3736
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(affectedColumnIds)) {
|
|
3809
3737
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3810
3738
|
if (affectedColumnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3811
|
-
|
|
3812
|
-
.getColumnsForScope(fc.Scope)
|
|
3813
|
-
.map((c) => c.columnId)
|
|
3814
|
-
.forEach((colId) => {
|
|
3815
|
-
dataChangedScope.columnIds.add(colId);
|
|
3816
|
-
});
|
|
3739
|
+
dataChangedScope.columnIds.add(sc.ColumnId);
|
|
3817
3740
|
}
|
|
3818
3741
|
});
|
|
3819
3742
|
}
|
|
@@ -4412,12 +4335,10 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4412
4335
|
}
|
|
4413
4336
|
}
|
|
4414
4337
|
setupRowStyling() {
|
|
4415
|
-
// first get the conditional style state
|
|
4416
|
-
const conditionalStyles = this.api.conditionalStyleApi.getRowConditionalStyles();
|
|
4417
4338
|
// Set any Row Styles (i.e. items without a classname)
|
|
4418
4339
|
this.setGridOptionsProperty('getRowStyle', (userGetRowStyle) => {
|
|
4419
4340
|
return (params) => {
|
|
4420
|
-
const result = Object.assign(Object.assign(Object.assign(
|
|
4341
|
+
const result = Object.assign(Object.assign(Object.assign({}, userGetRowStyle === null || userGetRowStyle === void 0 ? void 0 : userGetRowStyle(params)), this.getRowHighlightStyle(params)), this.getAlertRowStyle(params));
|
|
4421
4342
|
return result;
|
|
4422
4343
|
};
|
|
4423
4344
|
});
|
|
@@ -4430,7 +4351,6 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4430
4351
|
typeof userGetRowClass === 'function' ? userGetRowClass(params) : userGetRowClass,
|
|
4431
4352
|
highlightClassName,
|
|
4432
4353
|
alertHighlightClassName,
|
|
4433
|
-
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
4434
4354
|
]
|
|
4435
4355
|
// we flatten it because 'userGetRowClass' might return a string[]
|
|
4436
4356
|
.flat()
|
|
@@ -4449,30 +4369,6 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
|
4449
4369
|
const newValue = this.gridOptions.suppressAggFuncInHeader;
|
|
4450
4370
|
return previousValue !== newValue;
|
|
4451
4371
|
}
|
|
4452
|
-
getConditionalStyleRowClass(conditionalStyles, params) {
|
|
4453
|
-
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles)) {
|
|
4454
|
-
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
4455
|
-
let classNames = conditionalStyles
|
|
4456
|
-
.map((conditionalStyle) => {
|
|
4457
|
-
var _a;
|
|
4458
|
-
if (module.isConditionalStyleActiveForRow(conditionalStyle, params)) {
|
|
4459
|
-
return (_a = conditionalStyle.Style) === null || _a === void 0 ? void 0 : _a.ClassName;
|
|
4460
|
-
}
|
|
4461
|
-
})
|
|
4462
|
-
.filter((x) => !!x)
|
|
4463
|
-
.join(' ');
|
|
4464
|
-
return classNames;
|
|
4465
|
-
}
|
|
4466
|
-
}
|
|
4467
|
-
getConditionalStyleRowStyle(conditionalStyles, params) {
|
|
4468
|
-
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles)) {
|
|
4469
|
-
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
4470
|
-
const cs = conditionalStyles.find((cs) => module.isConditionalStyleActiveForRow(cs, params));
|
|
4471
|
-
if (cs) {
|
|
4472
|
-
return this.convertAdaptableStyleToCSS(cs.Style);
|
|
4473
|
-
}
|
|
4474
|
-
}
|
|
4475
|
-
}
|
|
4476
4372
|
getGridOptionsApi() {
|
|
4477
4373
|
if (!this.gridOptions.api) {
|
|
4478
4374
|
(0, LoggingHelper_1.ConsoleLogError)('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
|
|
@@ -30,7 +30,7 @@ const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
|
|
|
30
30
|
CheckboxRenderer.prototype.checkedHandler = function (e) {
|
|
31
31
|
let checked = e.target.checked;
|
|
32
32
|
this.params.node.setDataValue(columnId, checked);
|
|
33
|
-
api.
|
|
33
|
+
api.styledColumnApi.fireCheckboxColumnClickedEvent(columnId, this.params.node.data, api.gridApi.getPrimaryKeyValueForRowNode(this.params.node), checked);
|
|
34
34
|
};
|
|
35
35
|
CheckboxRenderer.prototype.suppressEditEvent = function (event) {
|
|
36
36
|
if (event.target === this.eGui) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GradientStyle, PercentBarStyle } from '../PredefinedConfig/
|
|
1
|
+
import { GradientStyle, PercentBarStyle } from '../PredefinedConfig/StyledColumnState';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
export declare const getPercentBarRendererForColumn: (columnStyle: {
|
|
@@ -5,7 +5,7 @@ import { AdaptableNodeComparerFunction } from '../PredefinedConfig/Common/Adapta
|
|
|
5
5
|
import { AdaptableColumnType, AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
6
6
|
import { IModule } from '../Strategy/Interface/IModule';
|
|
7
7
|
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
8
|
-
import { GradientStyle, PercentBarStyle } from '../PredefinedConfig/
|
|
8
|
+
import { GradientStyle, PercentBarStyle } from '../PredefinedConfig/StyledColumnState';
|
|
9
9
|
/**
|
|
10
10
|
* Adaptable AG Grid implementation is getting really big and unwieldy
|
|
11
11
|
* So lets put some of the more obvious 'Helper' functions here
|