@adaptabletools/adaptable 18.0.2-canary.0 → 18.0.3

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.2-canary.0",
3
+ "version": "18.0.3",
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",
@@ -114,6 +114,11 @@ export declare class AdaptableAgGrid implements IAdaptable {
114
114
  renderReactRoot: RenderReactRootFn;
115
115
  private unmountReactRoot?;
116
116
  private unmountLoadingScreen?;
117
+ /**
118
+ * do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
119
+ */
120
+ private DANGER_excelStyles;
121
+ private originalExcelStyles;
117
122
  /**
118
123
  * Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
119
124
  */
@@ -147,6 +147,11 @@ export class AdaptableAgGrid {
147
147
  this.previousAgGridLayoutState = '';
148
148
  this.columnMinMaxValuesCache = {};
149
149
  this.renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
150
+ /**
151
+ * do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
152
+ */
153
+ this.DANGER_excelStyles = [];
154
+ this.originalExcelStyles = [];
150
155
  /**
151
156
  * Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
152
157
  */
@@ -902,8 +907,10 @@ export class AdaptableAgGrid {
902
907
  * `excelStyles`
903
908
  */
904
909
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
905
- // we need this here just to register the original excelStyles in the service
906
- return original_excelStyles;
910
+ this.originalExcelStyles = original_excelStyles !== null && original_excelStyles !== void 0 ? original_excelStyles : [];
911
+ this.DANGER_excelStyles = this.originalExcelStyles;
912
+ // this array reference will be used for the entire AG Grid session
913
+ return this.DANGER_excelStyles;
907
914
  });
908
915
  /**
909
916
  * `processPivotResultColDef`
@@ -3058,7 +3065,9 @@ export class AdaptableAgGrid {
3058
3065
  exportVisualDataToExcel() {
3059
3066
  try {
3060
3067
  const exportExcelStyles = this.ReportService.buildExcelStylesForVisualReports();
3061
- this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
3068
+ // set DANGER_excelStyles without changing the array reference
3069
+ this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...exportExcelStyles);
3070
+ // this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
3062
3071
  this.agGridAdapter.getAgGridApi().exportDataAsExcel({
3063
3072
  sheetName: 'Sheet 1',
3064
3073
  fileName: this.ReportService.getReportFileName(this.adaptableOptions.adaptableId, 'Excel'),
@@ -3096,7 +3105,7 @@ export class AdaptableAgGrid {
3096
3105
  return summary;
3097
3106
  },
3098
3107
  });
3099
- this.agGridOptionsService.revertGridOptionsPropertyToUserValue('excelStyles');
3108
+ this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...this.originalExcelStyles);
3100
3109
  }
3101
3110
  catch (error) {
3102
3111
  this.logger.consoleError('Error exporting visual data to Excel', error);
@@ -9,7 +9,6 @@ export declare class AgGridOptionsService {
9
9
  setGridOptionsProperty<T extends keyof GridOptions>(gridOptions: GridOptions, propertyName: T, propertyGetter: (userPropertyValue: GridOptions[T]) => GridOptions[T] | undefined): GridOptions;
10
10
  getUserGridOptionsProperty<T extends keyof GridOptions>(propertyName: T): GridOptions[T];
11
11
  revertGridOptionsPropertyToUserValue(propertyName: ManagedGridOptionKey): void;
12
- CAREFUL_patchGridOptionsProperty<T extends keyof GridOptions>(propertyName: T, value: GridOptions[T]): void;
13
12
  revertGridOptionsPropertiesToUserValue<T extends keyof GridOptions>(gridOptions: GridOptions, propertyNames: T[]): void;
14
13
  private get agGridAdapter();
15
14
  }
@@ -49,19 +49,6 @@ export class AgGridOptionsService {
49
49
  const userValue = this.gridOptionsPropertyCache.get(userKey);
50
50
  this.agGridAdapter.setGridOption(propertyName, userValue);
51
51
  }
52
- CAREFUL_patchGridOptionsProperty(propertyName, value) {
53
- var _a;
54
- // @ts-ignore this is required to set gridOptions peroperties which are marked as initial (writable once, before grid is initialised)
55
- const gos = (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.gos;
56
- if (gos) {
57
- gos.updateGridOptions({
58
- options: {
59
- [propertyName]: value,
60
- },
61
- source: 'api',
62
- });
63
- }
64
- }
65
52
  revertGridOptionsPropertiesToUserValue(gridOptions, propertyNames) {
66
53
  for (const propertyName of propertyNames) {
67
54
  // see this.setGridOptionsProperty(...)
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: 1713452220124 || Date.now(),
4
- VERSION: "18.0.2-canary.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1713539968514 || Date.now(),
4
+ VERSION: "18.0.3" || '--current-version--',
5
5
  };