@adaptabletools/adaptable 15.0.1 → 15.0.2

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": "15.0.1",
3
+ "version": "15.0.2",
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",
@@ -1,2 +1,2 @@
1
- declare const _default: 1676907692180;
1
+ declare const _default: 1677769748348;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1676907692180;
3
+ exports.default = 1677769748348;
@@ -1,4 +1,5 @@
1
1
  import { AdaptableStyle } from '../../types';
2
+ export declare const AgGridCellStyleProperties: readonly ["backgroundColor", "color", "fontWeight", "fontStyle", "fontSize", "borderColor"];
2
3
  export declare const convertAdaptableStyleToCSS: (style: AdaptableStyle) => {
3
4
  [cssProperty: string]: string;
4
5
  };
@@ -1,7 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVariableColor = exports.toStyle = exports.convertCSSAbsoluteFontSizeToPt = exports.convertAdaptableStyleToCSS = void 0;
3
+ exports.getVariableColor = exports.toStyle = exports.convertCSSAbsoluteFontSizeToPt = exports.convertAdaptableStyleToCSS = exports.AgGridCellStyleProperties = void 0;
4
4
  const EnumExtensions_1 = require("../Extensions/EnumExtensions");
5
+ // required for hacky fix for https://github.com/AdaptableTools/adaptable/issues/2119
6
+ exports.AgGridCellStyleProperties = [
7
+ 'backgroundColor',
8
+ 'color',
9
+ 'fontWeight',
10
+ 'fontStyle',
11
+ 'fontSize',
12
+ 'borderColor',
13
+ ];
5
14
  const convertAdaptableStyleToCSS = (style) => {
6
15
  let result = {};
7
16
  if (style.BackColor !== undefined && style.BackColor !== null) {
@@ -1,4 +1,4 @@
1
- import { ChartRef, ColDef, ColGroupDef, Column, ColumnRowGroupChangedEvent, ExcelStyle, GridOptions, Module, ModuleNames, IRowNode } from '@ag-grid-community/core';
1
+ import { ChartRef, ColDef, ColGroupDef, Column, ColumnRowGroupChangedEvent, ExcelStyle, GridOptions, IRowNode, Module, ModuleNames } from '@ag-grid-community/core';
2
2
  import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
3
3
  import { AdaptableVariant, IAdaptable } from '../AdaptableInterfaces/IAdaptable';
4
4
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
@@ -3200,16 +3200,24 @@ class Adaptable {
3200
3200
  const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), (!styledColumn
3201
3201
  ? this.getFormatColumnCellStyle(abColumn, activeFormatColumnsWithStyle, params)
3202
3202
  : {})), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
3203
- // remove null values, AG Grid 29 fails, it asumes they are strings
3204
3203
  // TODO AFL: remove once AG-7903 and AG-7917 are fixed
3204
+ // this should happen with AG Grid v29.1.0
3205
3205
  Object.keys(result).forEach((key) => {
3206
+ // AG-7917
3206
3207
  if (result[key] === null || result[key] === undefined) {
3207
3208
  delete result[key];
3208
3209
  }
3210
+ // AG-7903
3209
3211
  if (typeof result[key] === 'number') {
3210
3212
  result[key] = String(result[key]);
3211
3213
  }
3212
3214
  });
3215
+ // see https://github.com/AdaptableTools/adaptable/issues/2119
3216
+ StyleHelper_1.AgGridCellStyleProperties.forEach((cellStylePropKey) => {
3217
+ if (result[cellStylePropKey] == null) {
3218
+ result[cellStylePropKey] = '';
3219
+ }
3220
+ });
3213
3221
  return result;
3214
3222
  };
3215
3223
  return cellStyle;
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "15.0.1";
1
+ declare const _default: "15.0.2";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '15.0.1'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '15.0.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version