@adaptabletools/adaptable 20.0.0-canary.4 → 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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +1 -0
- package/src/AdaptableOptions/EditOptions.d.ts +13 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -1
- package/src/Api/Internal/RowFormInternalApi.js +1 -1
- package/src/Api/ThemeApi.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +2 -2
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +5 -5
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +11 -74
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +2 -6
- package/src/agGrid/AgGridColumnAdapter.js +0 -4
- package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
- package/src/agGrid/AgGridThemeAdapter.js +122 -0
- package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +16 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.js +49 -5
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -134,12 +134,14 @@ export class VersionUpgrade20 extends VersionUpgrade {
|
|
|
134
134
|
if (sparklineState && sparklineState.StyledColumns) {
|
|
135
135
|
sparklineState.StyledColumns.forEach((styledColumn) => {
|
|
136
136
|
// @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
|
|
137
|
-
if (styledColumn.SparkLineStyle
|
|
138
|
-
|
|
139
|
-
styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
|
|
140
|
-
// @ts-ignore
|
|
141
|
-
delete styledColumn.SparkLineStyle;
|
|
137
|
+
if (styledColumn.SparkLineStyle == undefined) {
|
|
138
|
+
return;
|
|
142
139
|
}
|
|
140
|
+
// @ts-ignore renamed 'SparkLineStyle' to 'SparklineStyle'
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
styledColumn.SparklineStyle = styledColumn.SparkLineStyle;
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
delete styledColumn.SparkLineStyle;
|
|
143
145
|
// @ts-ignore the previous type was "column"
|
|
144
146
|
if (styledColumn.SparklineStyle?.options?.type === 'column') {
|
|
145
147
|
// @ts-ignore the previous type was "column"
|
|
@@ -149,6 +151,48 @@ export class VersionUpgrade20 extends VersionUpgrade {
|
|
|
149
151
|
if (styledColumn.SparklineStyle?.options?.type === 'bar') {
|
|
150
152
|
styledColumn.SparklineStyle.options.direction = 'horizontal';
|
|
151
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
|
+
}
|
|
152
196
|
});
|
|
153
197
|
}
|
|
154
198
|
}
|