@adaptabletools/adaptable 20.0.0-canary.1 → 20.0.0-canary.11

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 (93) hide show
  1. package/base.css +317 -866
  2. package/base.css.map +1 -1
  3. package/index.css +317 -866
  4. package/index.css.map +1 -1
  5. package/package.json +3 -3
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  8. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  10. package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
  11. package/src/AdaptableOptions/EditOptions.d.ts +14 -3
  12. package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
  13. package/src/AdaptableOptions/FilterOptions.d.ts +2 -2
  14. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  16. package/src/Api/ColumnScopeApi.d.ts +2 -2
  17. package/src/Api/ExportApi.d.ts +1 -6
  18. package/src/Api/Fdc3Api.d.ts +5 -3
  19. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  20. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnScopeApiImpl.js +1 -1
  22. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
  23. package/src/Api/Implementation/ExportApiImpl.js +17 -10
  24. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
  25. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  26. package/src/Api/Implementation/LayoutHelpers.js +8 -27
  27. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  28. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  29. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  30. package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
  31. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  32. package/src/Api/Internal/EventInternalApi.js +6 -1
  33. package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
  34. package/src/Api/Internal/ExportInternalApi.js +105 -136
  35. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  36. package/src/Api/ThemeApi.d.ts +2 -0
  37. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -5
  39. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  40. package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
  41. package/src/PredefinedConfig/Common/RowSummary.d.ts +1 -1
  42. package/src/PredefinedConfig/Common/RowSummary.js +2 -2
  43. package/src/PredefinedConfig/ExportState.d.ts +10 -17
  44. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  45. package/src/PredefinedConfig/LayoutState.d.ts +20 -16
  46. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  47. package/src/Redux/Store/AdaptableStore.js +1 -1
  48. package/src/Strategy/StyledColumnModule.js +6 -6
  49. package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
  50. package/src/Utilities/Helpers/AdaptableHelper.js +10 -0
  51. package/src/Utilities/ObjectFactory.js +1 -0
  52. package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
  53. package/src/Utilities/Services/Fdc3Service.js +7 -2
  54. package/src/Utilities/Services/RowSummaryService.js +2 -2
  55. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  56. package/src/Utilities/Services/ThemeService.js +5 -5
  57. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
  58. package/src/View/Components/ColumnFilter/utils.js +2 -2
  59. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  60. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  61. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  62. package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
  63. package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
  64. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  65. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  66. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  67. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  68. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  69. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  70. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  71. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  72. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  73. package/src/agGrid/AdaptableAgGrid.d.ts +3 -8
  74. package/src/agGrid/AdaptableAgGrid.js +41 -118
  75. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  76. package/src/agGrid/AgGridAdapter.js +7 -8
  77. package/src/agGrid/AgGridColumnAdapter.js +6 -11
  78. package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
  79. package/src/agGrid/AgGridExportAdapter.js +24 -25
  80. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  81. package/src/agGrid/AgGridThemeAdapter.js +122 -0
  82. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
  83. package/src/components/ColorPicker/ColorPicker.js +2 -2
  84. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  85. package/src/components/Select/Select.d.ts +1 -0
  86. package/src/components/Select/Select.js +29 -6
  87. package/src/env.js +2 -2
  88. package/src/metamodel/adaptable.metamodel.d.ts +26 -20
  89. package/src/metamodel/adaptable.metamodel.js +1 -1
  90. package/src/migration/VersionUpgrade20.d.ts +1 -0
  91. package/src/migration/VersionUpgrade20.js +106 -3
  92. package/src/types.d.ts +3 -3
  93. 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
  }
@@ -2,8 +2,8 @@ import { VersionUpgrade } from './VersionUpgrade';
2
2
  import { ALL_ADAPTABLE_DATA_TYPES } from '../agGrid/agGridDataTypeDefinitions';
3
3
  function transition_pre_20(layout) {
4
4
  const l = layout;
5
- if (l.TableAggregationColumns && !Array.isArray(l.TableAggregationColumns)) {
6
- const oldAggs = l.TableAggregationColumns || {};
5
+ if (l.AggregationColumns && !Array.isArray(l.AggregationColumns)) {
6
+ const oldAggs = l.AggregationColumns || {};
7
7
  const newAggs = Object.entries(oldAggs).map(([colId, aggFunc]) => ({
8
8
  ColumnId: colId,
9
9
  AggFunc: aggFunc,
@@ -28,10 +28,44 @@ function transition_pre_20(layout) {
28
28
  }
29
29
  if (l.EnablePivot) {
30
30
  layout.PivotColumns = l.PivotColumns || [];
31
- if (l.TableAggregationColumns) {
31
+ if (l.AggregationColumns) {
32
32
  layout.PivotAggregationColumns = layout.TableAggregationColumns;
33
33
  }
34
34
  }
35
+ if (Array.isArray(l.ColumnFilters)) {
36
+ layout.ColumnFilters = l.ColumnFilters.map((columnFilter) => {
37
+ const filter = {
38
+ ...columnFilter,
39
+ };
40
+ // version 19 had a single predicate
41
+ // while version 20 has an array of predicates
42
+ // @ts-ignore
43
+ if (filter.Predicate) {
44
+ // @ts-ignore
45
+ filter.Predicates = [filter.Predicate];
46
+ // @ts-ignore
47
+ delete filter.Predicate;
48
+ }
49
+ if (!Array.isArray(filter.Predicates)) {
50
+ filter.Predicates = [];
51
+ }
52
+ filter.Predicates = filter.Predicates.map((p) => {
53
+ // the following predicate ids were renamed:
54
+ // Values -> In
55
+ if (p.PredicateId === 'Values') {
56
+ p = { ...p };
57
+ p.PredicateId = 'In';
58
+ }
59
+ // ExcludeValues -> NotIn
60
+ if (p.PredicateId === 'ExcludeValues') {
61
+ p = { ...p };
62
+ p.PredicateId = 'NotIn';
63
+ }
64
+ return p;
65
+ });
66
+ return filter;
67
+ });
68
+ }
35
69
  return layout;
36
70
  }
37
71
  function hasUpToDateDataType(dataType) {
@@ -77,6 +111,7 @@ export class VersionUpgrade20 extends VersionUpgrade {
77
111
  migrateState(state) {
78
112
  this.migrateLayoutState(state);
79
113
  this.migrateColTypeToDataType(state);
114
+ this.migrateSparklineState(state);
80
115
  return state;
81
116
  }
82
117
  migrateLayoutState(state) {
@@ -127,4 +162,72 @@ export class VersionUpgrade20 extends VersionUpgrade {
127
162
  });
128
163
  }
129
164
  }
165
+ migrateSparklineState(state) {
166
+ this.logger.info(`Migration of Sparkline State`);
167
+ const sparklineState = state.StyledColumn;
168
+ if (sparklineState && sparklineState.StyledColumns) {
169
+ sparklineState.StyledColumns.forEach((styledColumn) => {
170
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
171
+ if (styledColumn.SparkLineStyle == undefined) {
172
+ return;
173
+ }
174
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
175
+ // @ts-ignore
176
+ styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
177
+ // @ts-ignore
178
+ delete styledColumn.SparkLineStyle;
179
+ // @ts-ignore the previous type was "column"
180
+ if (styledColumn.SparklineStyle?.options?.type === 'column') {
181
+ // @ts-ignore the previous type was "column"
182
+ styledColumn.SparklineStyle.options.type = 'bar';
183
+ styledColumn.SparklineStyle.options.direction = 'vertical';
184
+ }
185
+ if (styledColumn.SparklineStyle?.options?.type === 'bar') {
186
+ styledColumn.SparklineStyle.options.direction = 'horizontal';
187
+ }
188
+ if (styledColumn.SparklineStyle?.options?.line) {
189
+ const previousLineOpts = (styledColumn.SparklineStyle?.options).line;
190
+ styledColumn.SparklineStyle.options.stroke = previousLineOpts.stroke;
191
+ styledColumn.SparklineStyle.options.strokeWidth = previousLineOpts.strokeWidth;
192
+ delete styledColumn.SparklineStyle.options.line;
193
+ }
194
+ if (styledColumn.SparklineStyle?.options?.axis &&
195
+ styledColumn.SparklineStyle?.options?.axis?.type == undefined) {
196
+ styledColumn.SparklineStyle.options.axis.type = 'category';
197
+ }
198
+ if (styledColumn.SparklineStyle?.options?.highlightStyle) {
199
+ const obsoleteKeys = ['fill', 'stroke', 'strokeWidth'];
200
+ obsoleteKeys.forEach((obsoleteKey) => {
201
+ if (
202
+ // @ts-ignore
203
+ styledColumn.SparklineStyle?.options?.highlightStyle?.[obsoleteKey] != undefined) {
204
+ const itemHighlightStyle = styledColumn.SparklineStyle.options.highlightStyle.item ?? {};
205
+ // @ts-ignore
206
+ itemHighlightStyle[obsoleteKey] = styledColumn.SparklineStyle?.options
207
+ ?.highlightStyle?.[obsoleteKey];
208
+ // @ts-ignore
209
+ delete styledColumn.SparklineStyle.options.highlightStyle[obsoleteKey];
210
+ }
211
+ });
212
+ }
213
+ if ((styledColumn.SparklineStyle?.options).paddingInner != undefined) {
214
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
215
+ type: 'category',
216
+ });
217
+ axisOpts.paddingInner = (styledColumn.SparklineStyle?.options).paddingInner;
218
+ delete (styledColumn.SparklineStyle?.options).paddingInner;
219
+ }
220
+ if ((styledColumn.SparklineStyle?.options).paddingOuter != undefined) {
221
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
222
+ type: 'category',
223
+ });
224
+ axisOpts.paddingOuter = (styledColumn.SparklineStyle?.options).paddingOuter;
225
+ delete (styledColumn.SparklineStyle?.options).paddingOuter;
226
+ }
227
+ if ((styledColumn.SparklineStyle?.options).marker != undefined) {
228
+ (styledColumn.SparklineStyle?.options).marker.enabled = true;
229
+ }
230
+ });
231
+ }
232
+ }
130
233
  }
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, } 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';
@@ -150,7 +150,7 @@ export type { CellSummmaryInfo, CustomCellSummaryOperation, CustomCellSummaryOpe
150
150
  export type { FlashingCellDefinition, FlashingCellState, SystemFlashingCellPredicateId, SystemFlashingCellPredicateIds, } from './PredefinedConfig/FlashingCellState';
151
151
  export type { AdaptableAlert, AdaptableAlertType, AdaptableGenericAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert, AdaptableAlertBase, } from './PredefinedConfig/Common/AdaptableAlert';
152
152
  export type { AdaptableFlashingCell } from './PredefinedConfig/Common/AdaptableFlashingCell';
153
- export type { AdaptableColumn, AdaptableColumnBase, AdaptableColumnType, AdaptableColumnDataType, AdaptableColumnGroup, } from './PredefinedConfig/Common/AdaptableColumn';
153
+ export type { AdaptableColumn, AdaptableColumnBase, AdaptableSpecialColumnType, AdaptableColumnDataType, AdaptableColumnGroup, } from './PredefinedConfig/Common/AdaptableColumn';
154
154
  export type { AdaptableField } from './PredefinedConfig/Common/AdaptableField';
155
155
  export type { AdaptableComparerFunction } from './PredefinedConfig/Common/AdaptableComparerFunction';
156
156
  export type { SystemStatusMessageInfo } from './PredefinedConfig/Common/SystemStatusMessageInfo';
@@ -185,7 +185,7 @@ export type { AdaptableModule, AdaptableToolPanel, AdaptableQLModule, AdaptableS
185
185
  export type { ChartDefinition, ChartingState, ChartingAggFunc, } from './PredefinedConfig/ChartingState';
186
186
  export type { CustomSort, CustomSortState } from './PredefinedConfig/CustomSortState';
187
187
  export type { DashboardState, DashboardTab, AdaptableCoordinate, } from './PredefinedConfig/DashboardState';
188
- export type { ExportState, Report, ReportData, ReportSchedule, SystemReportName, SystemReportNames, SystemReportFormat, ReportRowScope, ReportColumnScope, ReportNameType, ReportFormatType, } from './PredefinedConfig/ExportState';
188
+ export type { ExportState, Report, ReportData, ReportColumn, ReportSchedule, SystemReportName, SystemReportNames, SystemReportFormat, ReportRowScope, ReportColumnScope, ReportNameType, ReportFormatType, } from './PredefinedConfig/ExportState';
189
189
  export type { ColumnFilter, ColumnFilterPredicate, SystemFilterPredicateIds, SystemFilterPredicateId, } from './PredefinedConfig/Common/ColumnFilter';
190
190
  export type { GridFilter } from './PredefinedConfig/Common/GridFilter';
191
191
  export type { FormatColumn, FormatColumnState, FormatColumnRule, FormatColumnPredicate, SystemFormatColumnPredicateId, SystemFormatColumnPredicateIds, } from './PredefinedConfig/FormatColumnState';