@adaptabletools/adaptable-cjs 20.0.0-canary.3 → 20.0.0-canary.5

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.
Files changed (56) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  3. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  4. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  5. package/src/AdaptableOptions/DefaultAdaptableOptions.js +1 -1
  6. package/src/AdaptableOptions/EditOptions.d.ts +14 -3
  7. package/src/AdaptableOptions/ExportOptions.d.ts +4 -18
  8. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  9. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  10. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  11. package/src/Api/Implementation/ExportApiImpl.js +3 -2
  12. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  13. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  14. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  15. package/src/Api/Internal/EventInternalApi.js +6 -1
  16. package/src/Api/Internal/ExportInternalApi.js +1 -1
  17. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  18. package/src/Api/ThemeApi.d.ts +2 -0
  19. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  20. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  21. package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
  22. package/src/PredefinedConfig/ExportState.d.ts +3 -3
  23. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  24. package/src/PredefinedConfig/LayoutState.d.ts +16 -16
  25. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  26. package/src/Strategy/StyledColumnModule.js +6 -6
  27. package/src/Utilities/ObjectFactory.js +1 -0
  28. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  29. package/src/Utilities/Services/ThemeService.js +5 -5
  30. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  31. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  32. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  33. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  34. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  35. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  36. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  37. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  38. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  39. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  40. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  41. package/src/agGrid/AdaptableAgGrid.d.ts +3 -8
  42. package/src/agGrid/AdaptableAgGrid.js +34 -115
  43. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  44. package/src/agGrid/AgGridAdapter.js +4 -5
  45. package/src/agGrid/AgGridColumnAdapter.js +5 -7
  46. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  47. package/src/agGrid/AgGridThemeAdapter.js +126 -0
  48. package/src/components/ColorPicker/ColorPicker.js +2 -2
  49. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  50. package/src/env.js +2 -2
  51. package/src/metamodel/adaptable.metamodel.d.ts +16 -15
  52. package/src/metamodel/adaptable.metamodel.js +1 -1
  53. package/src/migration/VersionUpgrade20.d.ts +1 -0
  54. package/src/migration/VersionUpgrade20.js +69 -0
  55. package/src/types.d.ts +1 -1
  56. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -4,4 +4,5 @@ export declare class VersionUpgrade20 extends VersionUpgrade {
4
4
  migrateState(state: AdaptableState): AdaptableState;
5
5
  private migrateLayoutState;
6
6
  private migrateColTypeToDataType;
7
+ private migrateSparklineState;
7
8
  }
@@ -80,6 +80,7 @@ class VersionUpgrade20 extends VersionUpgrade_1.VersionUpgrade {
80
80
  migrateState(state) {
81
81
  this.migrateLayoutState(state);
82
82
  this.migrateColTypeToDataType(state);
83
+ this.migrateSparklineState(state);
83
84
  return state;
84
85
  }
85
86
  migrateLayoutState(state) {
@@ -130,5 +131,73 @@ class VersionUpgrade20 extends VersionUpgrade_1.VersionUpgrade {
130
131
  });
131
132
  }
132
133
  }
134
+ migrateSparklineState(state) {
135
+ this.logger.info(`Migration of Sparkline State`);
136
+ const sparklineState = state.StyledColumn;
137
+ if (sparklineState && sparklineState.StyledColumns) {
138
+ sparklineState.StyledColumns.forEach((styledColumn) => {
139
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
140
+ if (styledColumn.SparkLineStyle == undefined) {
141
+ return;
142
+ }
143
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
144
+ // @ts-ignore
145
+ styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
146
+ // @ts-ignore
147
+ delete styledColumn.SparkLineStyle;
148
+ // @ts-ignore the previous type was "column"
149
+ if (styledColumn.SparklineStyle?.options?.type === 'column') {
150
+ // @ts-ignore the previous type was "column"
151
+ styledColumn.SparklineStyle.options.type = 'bar';
152
+ styledColumn.SparklineStyle.options.direction = 'vertical';
153
+ }
154
+ if (styledColumn.SparklineStyle?.options?.type === 'bar') {
155
+ styledColumn.SparklineStyle.options.direction = 'horizontal';
156
+ }
157
+ if (styledColumn.SparklineStyle?.options?.line) {
158
+ const previousLineOpts = (styledColumn.SparklineStyle?.options).line;
159
+ styledColumn.SparklineStyle.options.stroke = previousLineOpts.stroke;
160
+ styledColumn.SparklineStyle.options.strokeWidth = previousLineOpts.strokeWidth;
161
+ delete styledColumn.SparklineStyle.options.line;
162
+ }
163
+ if (styledColumn.SparklineStyle?.options?.axis &&
164
+ styledColumn.SparklineStyle?.options?.axis?.type == undefined) {
165
+ styledColumn.SparklineStyle.options.axis.type = 'category';
166
+ }
167
+ if (styledColumn.SparklineStyle?.options?.highlightStyle) {
168
+ const obsoleteKeys = ['fill', 'stroke', 'strokeWidth'];
169
+ obsoleteKeys.forEach((obsoleteKey) => {
170
+ if (
171
+ // @ts-ignore
172
+ styledColumn.SparklineStyle?.options?.highlightStyle?.[obsoleteKey] != undefined) {
173
+ const itemHighlightStyle = styledColumn.SparklineStyle.options.highlightStyle.item ?? {};
174
+ // @ts-ignore
175
+ itemHighlightStyle[obsoleteKey] = styledColumn.SparklineStyle?.options
176
+ ?.highlightStyle?.[obsoleteKey];
177
+ // @ts-ignore
178
+ delete styledColumn.SparklineStyle.options.highlightStyle[obsoleteKey];
179
+ }
180
+ });
181
+ }
182
+ if ((styledColumn.SparklineStyle?.options).paddingInner != undefined) {
183
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
184
+ type: 'category',
185
+ });
186
+ axisOpts.paddingInner = (styledColumn.SparklineStyle?.options).paddingInner;
187
+ delete (styledColumn.SparklineStyle?.options).paddingInner;
188
+ }
189
+ if ((styledColumn.SparklineStyle?.options).paddingOuter != undefined) {
190
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
191
+ type: 'category',
192
+ });
193
+ axisOpts.paddingOuter = (styledColumn.SparklineStyle?.options).paddingOuter;
194
+ delete (styledColumn.SparklineStyle?.options).paddingOuter;
195
+ }
196
+ if ((styledColumn.SparklineStyle?.options).marker != undefined) {
197
+ (styledColumn.SparklineStyle?.options).marker.enabled = true;
198
+ }
199
+ });
200
+ }
201
+ }
133
202
  }
134
203
  exports.VersionUpgrade20 = VersionUpgrade20;
package/src/types.d.ts CHANGED
@@ -20,7 +20,7 @@ export type { SetPrimaryKeyValueContext, RowFormOptions, RowFormContext, CreateR
20
20
  export type { AdaptableNumberCellEditorParams } from './agGrid/editors/AdaptableNumberEditor';
21
21
  export type { AdaptableDateEditorParams } from './agGrid/editors/AdaptableDateEditor';
22
22
  export type { AdaptablePercentageCellEditorParams } from './agGrid/editors/AdaptablePercentageEditor';
23
- export type { ExportOptions, SystemExportDestination, CustomDestination, ExternalReport, PreProcessExportContext, DataFormatType, ExportFormContext, ReportContext, ExportableColumnContext, ReportFileNameContext, DataFormatTypeContext, DataFormatDataType, ExportDestinationType, GetDetailRowsContext, BaseExportContext, ExportResultData, } from './AdaptableOptions/ExportOptions';
23
+ export type { ExportOptions, SystemExportDestination, CustomDestination, ExternalReport, PreProcessExportContext, DataFormatType, ExportFormContext, ReportContext, ReportFileNameContext, DataFormatDataType, ExportDestinationType, GetDetailRowsContext, BaseExportContext, ExportResultData, } from './AdaptableOptions/ExportOptions';
24
24
  export type { DataImportValidationError, DataImportOptions, DataImportFileHandler, HandleImportedDataContext, DataImportValidateContext, GetPrimaryKeyValueContext, PreprocessRowDataContext, HandleImportedDataResolution, } from './AdaptableOptions/DataImportOptions';
25
25
  export type { DataSetOptions, DataSet, DataSetFormContext, } from './AdaptableOptions/DataSetOptions';
26
26
  export type { CellSummaryOptions } from './AdaptableOptions/CellSummaryOptions';