@adaptabletools/adaptable-cjs 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 +3 -3
  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 +12 -1
  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 +1 -1
  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 +1 -1
  63. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  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 +40 -117
  75. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  76. package/src/agGrid/AgGridAdapter.js +5 -6
  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 +126 -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.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
  }
@@ -5,8 +5,8 @@ const VersionUpgrade_1 = require("./VersionUpgrade");
5
5
  const agGridDataTypeDefinitions_1 = require("../agGrid/agGridDataTypeDefinitions");
6
6
  function transition_pre_20(layout) {
7
7
  const l = layout;
8
- if (l.TableAggregationColumns && !Array.isArray(l.TableAggregationColumns)) {
9
- const oldAggs = l.TableAggregationColumns || {};
8
+ if (l.AggregationColumns && !Array.isArray(l.AggregationColumns)) {
9
+ const oldAggs = l.AggregationColumns || {};
10
10
  const newAggs = Object.entries(oldAggs).map(([colId, aggFunc]) => ({
11
11
  ColumnId: colId,
12
12
  AggFunc: aggFunc,
@@ -31,10 +31,44 @@ function transition_pre_20(layout) {
31
31
  }
32
32
  if (l.EnablePivot) {
33
33
  layout.PivotColumns = l.PivotColumns || [];
34
- if (l.TableAggregationColumns) {
34
+ if (l.AggregationColumns) {
35
35
  layout.PivotAggregationColumns = layout.TableAggregationColumns;
36
36
  }
37
37
  }
38
+ if (Array.isArray(l.ColumnFilters)) {
39
+ layout.ColumnFilters = l.ColumnFilters.map((columnFilter) => {
40
+ const filter = {
41
+ ...columnFilter,
42
+ };
43
+ // version 19 had a single predicate
44
+ // while version 20 has an array of predicates
45
+ // @ts-ignore
46
+ if (filter.Predicate) {
47
+ // @ts-ignore
48
+ filter.Predicates = [filter.Predicate];
49
+ // @ts-ignore
50
+ delete filter.Predicate;
51
+ }
52
+ if (!Array.isArray(filter.Predicates)) {
53
+ filter.Predicates = [];
54
+ }
55
+ filter.Predicates = filter.Predicates.map((p) => {
56
+ // the following predicate ids were renamed:
57
+ // Values -> In
58
+ if (p.PredicateId === 'Values') {
59
+ p = { ...p };
60
+ p.PredicateId = 'In';
61
+ }
62
+ // ExcludeValues -> NotIn
63
+ if (p.PredicateId === 'ExcludeValues') {
64
+ p = { ...p };
65
+ p.PredicateId = 'NotIn';
66
+ }
67
+ return p;
68
+ });
69
+ return filter;
70
+ });
71
+ }
38
72
  return layout;
39
73
  }
40
74
  function hasUpToDateDataType(dataType) {
@@ -80,6 +114,7 @@ class VersionUpgrade20 extends VersionUpgrade_1.VersionUpgrade {
80
114
  migrateState(state) {
81
115
  this.migrateLayoutState(state);
82
116
  this.migrateColTypeToDataType(state);
117
+ this.migrateSparklineState(state);
83
118
  return state;
84
119
  }
85
120
  migrateLayoutState(state) {
@@ -130,5 +165,73 @@ class VersionUpgrade20 extends VersionUpgrade_1.VersionUpgrade {
130
165
  });
131
166
  }
132
167
  }
168
+ migrateSparklineState(state) {
169
+ this.logger.info(`Migration of Sparkline State`);
170
+ const sparklineState = state.StyledColumn;
171
+ if (sparklineState && sparklineState.StyledColumns) {
172
+ sparklineState.StyledColumns.forEach((styledColumn) => {
173
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
174
+ if (styledColumn.SparkLineStyle == undefined) {
175
+ return;
176
+ }
177
+ // @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
178
+ // @ts-ignore
179
+ styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
180
+ // @ts-ignore
181
+ delete styledColumn.SparkLineStyle;
182
+ // @ts-ignore the previous type was "column"
183
+ if (styledColumn.SparklineStyle?.options?.type === 'column') {
184
+ // @ts-ignore the previous type was "column"
185
+ styledColumn.SparklineStyle.options.type = 'bar';
186
+ styledColumn.SparklineStyle.options.direction = 'vertical';
187
+ }
188
+ if (styledColumn.SparklineStyle?.options?.type === 'bar') {
189
+ styledColumn.SparklineStyle.options.direction = 'horizontal';
190
+ }
191
+ if (styledColumn.SparklineStyle?.options?.line) {
192
+ const previousLineOpts = (styledColumn.SparklineStyle?.options).line;
193
+ styledColumn.SparklineStyle.options.stroke = previousLineOpts.stroke;
194
+ styledColumn.SparklineStyle.options.strokeWidth = previousLineOpts.strokeWidth;
195
+ delete styledColumn.SparklineStyle.options.line;
196
+ }
197
+ if (styledColumn.SparklineStyle?.options?.axis &&
198
+ styledColumn.SparklineStyle?.options?.axis?.type == undefined) {
199
+ styledColumn.SparklineStyle.options.axis.type = 'category';
200
+ }
201
+ if (styledColumn.SparklineStyle?.options?.highlightStyle) {
202
+ const obsoleteKeys = ['fill', 'stroke', 'strokeWidth'];
203
+ obsoleteKeys.forEach((obsoleteKey) => {
204
+ if (
205
+ // @ts-ignore
206
+ styledColumn.SparklineStyle?.options?.highlightStyle?.[obsoleteKey] != undefined) {
207
+ const itemHighlightStyle = styledColumn.SparklineStyle.options.highlightStyle.item ?? {};
208
+ // @ts-ignore
209
+ itemHighlightStyle[obsoleteKey] = styledColumn.SparklineStyle?.options
210
+ ?.highlightStyle?.[obsoleteKey];
211
+ // @ts-ignore
212
+ delete styledColumn.SparklineStyle.options.highlightStyle[obsoleteKey];
213
+ }
214
+ });
215
+ }
216
+ if ((styledColumn.SparklineStyle?.options).paddingInner != undefined) {
217
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
218
+ type: 'category',
219
+ });
220
+ axisOpts.paddingInner = (styledColumn.SparklineStyle?.options).paddingInner;
221
+ delete (styledColumn.SparklineStyle?.options).paddingInner;
222
+ }
223
+ if ((styledColumn.SparklineStyle?.options).paddingOuter != undefined) {
224
+ const axisOpts = (styledColumn.SparklineStyle.options.axis ?? {
225
+ type: 'category',
226
+ });
227
+ axisOpts.paddingOuter = (styledColumn.SparklineStyle?.options).paddingOuter;
228
+ delete (styledColumn.SparklineStyle?.options).paddingOuter;
229
+ }
230
+ if ((styledColumn.SparklineStyle?.options).marker != undefined) {
231
+ (styledColumn.SparklineStyle?.options).marker.enabled = true;
232
+ }
233
+ });
234
+ }
235
+ }
133
236
  }
134
237
  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, } 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';