@adaptabletools/adaptable 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 +35 -116
  43. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  44. package/src/agGrid/AgGridAdapter.js +6 -7
  45. package/src/agGrid/AgGridColumnAdapter.js +5 -7
  46. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  47. package/src/agGrid/AgGridThemeAdapter.js +122 -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.esm.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
  }
@@ -77,6 +77,7 @@ export class VersionUpgrade20 extends VersionUpgrade {
77
77
  migrateState(state) {
78
78
  this.migrateLayoutState(state);
79
79
  this.migrateColTypeToDataType(state);
80
+ this.migrateSparklineState(state);
80
81
  return state;
81
82
  }
82
83
  migrateLayoutState(state) {
@@ -127,4 +128,72 @@ export class VersionUpgrade20 extends VersionUpgrade {
127
128
  });
128
129
  }
129
130
  }
131
+ migrateSparklineState(state) {
132
+ this.logger.info(`Migration of Sparkline State`);
133
+ const sparklineState = state.StyledColumn;
134
+ if (sparklineState && sparklineState.StyledColumns) {
135
+ sparklineState.StyledColumns.forEach((styledColumn) => {
136
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
137
+ if (styledColumn.SparkLineStyle == undefined) {
138
+ return;
139
+ }
140
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
141
+ // @ts-ignore
142
+ styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
143
+ // @ts-ignore
144
+ delete styledColumn.SparkLineStyle;
145
+ // @ts-ignore the previous type was "column"
146
+ if (styledColumn.SparklineStyle?.options?.type === 'column') {
147
+ // @ts-ignore the previous type was "column"
148
+ styledColumn.SparklineStyle.options.type = 'bar';
149
+ styledColumn.SparklineStyle.options.direction = 'vertical';
150
+ }
151
+ if (styledColumn.SparklineStyle?.options?.type === 'bar') {
152
+ styledColumn.SparklineStyle.options.direction = 'horizontal';
153
+ }
154
+ if (styledColumn.SparklineStyle?.options?.line) {
155
+ const previousLineOpts = (styledColumn.SparklineStyle?.options).line;
156
+ styledColumn.SparklineStyle.options.stroke = previousLineOpts.stroke;
157
+ styledColumn.SparklineStyle.options.strokeWidth = previousLineOpts.strokeWidth;
158
+ delete styledColumn.SparklineStyle.options.line;
159
+ }
160
+ if (styledColumn.SparklineStyle?.options?.axis &&
161
+ styledColumn.SparklineStyle?.options?.axis?.type == undefined) {
162
+ styledColumn.SparklineStyle.options.axis.type = 'category';
163
+ }
164
+ if (styledColumn.SparklineStyle?.options?.highlightStyle) {
165
+ const obsoleteKeys = ['fill', 'stroke', 'strokeWidth'];
166
+ obsoleteKeys.forEach((obsoleteKey) => {
167
+ if (
168
+ // @ts-ignore
169
+ styledColumn.SparklineStyle?.options?.highlightStyle?.[obsoleteKey] != undefined) {
170
+ const itemHighlightStyle = styledColumn.SparklineStyle.options.highlightStyle.item ?? {};
171
+ // @ts-ignore
172
+ itemHighlightStyle[obsoleteKey] = styledColumn.SparklineStyle?.options
173
+ ?.highlightStyle?.[obsoleteKey];
174
+ // @ts-ignore
175
+ delete styledColumn.SparklineStyle.options.highlightStyle[obsoleteKey];
176
+ }
177
+ });
178
+ }
179
+ if ((styledColumn.SparklineStyle?.options).paddingInner != undefined) {
180
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
181
+ type: 'category',
182
+ });
183
+ axisOpts.paddingInner = (styledColumn.SparklineStyle?.options).paddingInner;
184
+ delete (styledColumn.SparklineStyle?.options).paddingInner;
185
+ }
186
+ if ((styledColumn.SparklineStyle?.options).paddingOuter != undefined) {
187
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
188
+ type: 'category',
189
+ });
190
+ axisOpts.paddingOuter = (styledColumn.SparklineStyle?.options).paddingOuter;
191
+ delete (styledColumn.SparklineStyle?.options).paddingOuter;
192
+ }
193
+ if ((styledColumn.SparklineStyle?.options).marker != undefined) {
194
+ (styledColumn.SparklineStyle?.options).marker.enabled = true;
195
+ }
196
+ });
197
+ }
198
+ }
130
199
  }
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';