@gooddata/sdk-code-convertors 11.61.0-alpha.0 → 11.61.0-alpha.2
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/esm/configs/areaChart.d.ts +3 -1
- package/esm/configs/areaChart.d.ts.map +1 -1
- package/esm/configs/areaChart.js +38 -48
- package/esm/configs/barChart.d.ts.map +1 -1
- package/esm/configs/barChart.js +28 -43
- package/esm/configs/bubbleChart.d.ts.map +1 -1
- package/esm/configs/bubbleChart.js +28 -36
- package/esm/configs/bulletChart.d.ts.map +1 -1
- package/esm/configs/bulletChart.js +21 -36
- package/esm/configs/columnChart.d.ts.map +1 -1
- package/esm/configs/columnChart.js +28 -43
- package/esm/configs/comboChart.d.ts.map +1 -1
- package/esm/configs/comboChart.js +51 -72
- package/esm/configs/dependencyWheelChart.d.ts.map +1 -1
- package/esm/configs/dependencyWheelChart.js +10 -15
- package/esm/configs/donutChart.d.ts.map +1 -1
- package/esm/configs/donutChart.js +12 -22
- package/esm/configs/funnelChart.d.ts.map +1 -1
- package/esm/configs/funnelChart.js +12 -22
- package/esm/configs/geoAreaChart.d.ts.map +1 -1
- package/esm/configs/geoAreaChart.js +13 -18
- package/esm/configs/geoChart.d.ts.map +1 -1
- package/esm/configs/geoChart.js +19 -24
- package/esm/configs/headlineChart.d.ts.map +1 -1
- package/esm/configs/headlineChart.js +16 -18
- package/esm/configs/heatmapChart.d.ts.map +1 -1
- package/esm/configs/heatmapChart.js +21 -28
- package/esm/configs/lineChart.d.ts.map +1 -1
- package/esm/configs/lineChart.js +41 -56
- package/esm/configs/pieChart.d.ts.map +1 -1
- package/esm/configs/pieChart.js +12 -22
- package/esm/configs/pyramidChart.d.ts.map +1 -1
- package/esm/configs/pyramidChart.js +12 -22
- package/esm/configs/radarChart.d.ts.map +1 -1
- package/esm/configs/radarChart.js +37 -61
- package/esm/configs/repeaterChart.d.ts.map +1 -1
- package/esm/configs/repeaterChart.js +6 -27
- package/esm/configs/sankeyChart.d.ts.map +1 -1
- package/esm/configs/sankeyChart.js +11 -16
- package/esm/configs/scatterChart.d.ts.map +1 -1
- package/esm/configs/scatterChart.js +29 -37
- package/esm/configs/table.d.ts.map +1 -1
- package/esm/configs/table.js +13 -26
- package/esm/configs/treemapChart.d.ts.map +1 -1
- package/esm/configs/treemapChart.js +12 -22
- package/esm/configs/utils.d.ts +18 -1
- package/esm/configs/utils.d.ts.map +1 -1
- package/esm/configs/utils.js +1 -17
- package/esm/configs/waterfallChart.d.ts.map +1 -1
- package/esm/configs/waterfallChart.js +29 -44
- package/esm/sdk-code-convertors.d.ts +2 -0
- package/package.json +6 -6
package/esm/configs/table.js
CHANGED
|
@@ -224,30 +224,21 @@ export function tableLoad(props) {
|
|
|
224
224
|
return [["widths", loadColumnsWidth(value)]];
|
|
225
225
|
}
|
|
226
226
|
case "columnHeadersPosition": {
|
|
227
|
-
|
|
228
|
-
return [["column_header", getValueOrDefault(val, DEFAULTS.columnHeadersPosition)]];
|
|
227
|
+
return [["column_header", getValueOrDefault(value, DEFAULTS.columnHeadersPosition)]];
|
|
229
228
|
}
|
|
230
229
|
case "measureGroupDimension": {
|
|
231
|
-
|
|
232
|
-
return [["metrics_in", getValueOrDefault(val, DEFAULTS.measureGroupDimension)]];
|
|
230
|
+
return [["metrics_in", getValueOrDefault(value, DEFAULTS.measureGroupDimension)]];
|
|
233
231
|
}
|
|
234
232
|
case "disableDrillDown":
|
|
235
|
-
return [
|
|
236
|
-
[
|
|
237
|
-
"disable_drill_down",
|
|
238
|
-
getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool"),
|
|
239
|
-
],
|
|
240
|
-
];
|
|
233
|
+
return [["disable_drill_down", getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool")]];
|
|
241
234
|
case "disableDrillIntoURL":
|
|
242
235
|
// Always serialise the explicit value when present. The platform default is
|
|
243
236
|
// org-specific (`enableDrillToUrlByDefault`), so omitting a value that matches
|
|
244
237
|
// a hardcoded default would lose the setting on round-trip in orgs whose default
|
|
245
238
|
// differs.
|
|
246
|
-
return [["disable_drill_into_url", value
|
|
239
|
+
return [["disable_drill_into_url", Boolean(value)]];
|
|
247
240
|
case "disableAlerts":
|
|
248
|
-
return [
|
|
249
|
-
["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")],
|
|
250
|
-
];
|
|
241
|
+
return [["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")]];
|
|
251
242
|
case "disableScheduledExports":
|
|
252
243
|
return [
|
|
253
244
|
[
|
|
@@ -258,31 +249,27 @@ export function tableLoad(props) {
|
|
|
258
249
|
case "disableKeyDriveAnalysisOn":
|
|
259
250
|
return [["disable_key_drive_analysis", loadDisableKda(value)]];
|
|
260
251
|
case "textWrapping": {
|
|
261
|
-
|
|
262
|
-
return [["text_wrapping", loadTextWrapping(val)]];
|
|
252
|
+
return [["text_wrapping", loadTextWrapping(value)]];
|
|
263
253
|
}
|
|
264
254
|
case "pagination": {
|
|
265
|
-
|
|
266
|
-
|
|
255
|
+
return [
|
|
256
|
+
["pagination", getValueOrDefault(value.enabled, DEFAULTS.pagination.enabled, "bool")],
|
|
257
|
+
];
|
|
267
258
|
}
|
|
268
259
|
case "pageSize":
|
|
269
260
|
return [["page_size", getValueOrDefault(value, DEFAULTS.pageSize, "number")]];
|
|
270
261
|
case "enableAccessibility":
|
|
271
262
|
return [
|
|
272
|
-
[
|
|
273
|
-
"enable_accessibility",
|
|
274
|
-
getValueOrDefault(value, DEFAULTS.enableAccessibility, "bool"),
|
|
275
|
-
],
|
|
263
|
+
["enable_accessibility", getValueOrDefault(value, DEFAULTS.enableAccessibility, "bool")],
|
|
276
264
|
];
|
|
277
265
|
case "grandTotalsPosition": {
|
|
278
|
-
|
|
279
|
-
return [["grand_totals_position", getValueOrDefault(val, DEFAULTS.grandTotalsPosition)]];
|
|
266
|
+
return [["grand_totals_position", getValueOrDefault(value, DEFAULTS.grandTotalsPosition)]];
|
|
280
267
|
}
|
|
281
268
|
case "conditionalFormatting": {
|
|
282
|
-
|
|
283
|
-
return [["conditional_formatting", loadConditionalFormatting(val)]];
|
|
269
|
+
return [["conditional_formatting", loadConditionalFormatting(value)]];
|
|
284
270
|
}
|
|
285
271
|
default:
|
|
272
|
+
key; // Check that no key is forgotten in the cases above
|
|
286
273
|
return [];
|
|
287
274
|
}
|
|
288
275
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treemapChart.d.ts","sourceRoot":"","sources":["../../src/configs/treemapChart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAanE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9G,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAI3B,MAAM,YAAY,CAAC;AAEpB,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GAAG;IACvC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAClC,UAAU,EAAE;QACR,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;QAC1B,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;KAC/B,CAAC;IACF,SAAS,EAAE;QACP,IAAI,EAAE,aAAa,CAAC;QACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;KAC1D,CAAC;IACF,MAAM,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;KAC1D,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,OAAO,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC,MA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c,CAAC;CACjC,CAAC;AAwBF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,8CAAW,CAAC;AAE/C,gBAAgB;AAChB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,kEA8CxF;AAED,gBAAgB;AAChB,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,SAAS,EACrD,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6B9C;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,OAAO,gBAAgB,CAAC;IAC9B,IAAI,EAAE,OAAO,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,cAAc,CAAC,4BAA4B,CAAC,CAAC;CAC1D;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,mBAI1B,CAAC"}
|
|
@@ -31,41 +31,30 @@ export function treemapChartLoad(props) {
|
|
|
31
31
|
case "colorMapping":
|
|
32
32
|
return [["colors", loadColorMapping(value)]];
|
|
33
33
|
case "dataLabels": {
|
|
34
|
-
const val = value;
|
|
35
|
-
return [
|
|
36
|
-
["data_labels", getValueOrDefault(val.visible, DEFAULTS.dataLabels.visible, "bool_auto")],
|
|
37
|
-
["data_labels_style", getValueOrDefault(val.style, DEFAULTS.dataLabels.style)],
|
|
38
|
-
];
|
|
39
|
-
}
|
|
40
|
-
case "chartFill": {
|
|
41
34
|
return [
|
|
42
35
|
[
|
|
43
|
-
"
|
|
44
|
-
|
|
36
|
+
"data_labels",
|
|
37
|
+
getValueOrDefault(value.visible, DEFAULTS.dataLabels.visible, "bool_auto"),
|
|
45
38
|
],
|
|
39
|
+
["data_labels_style", getValueOrDefault(value.style, DEFAULTS.dataLabels.style)],
|
|
46
40
|
];
|
|
47
41
|
}
|
|
42
|
+
case "chartFill": {
|
|
43
|
+
return [["chart_fill", loadChartFill(value, DEFAULTS.chartFill)]];
|
|
44
|
+
}
|
|
48
45
|
case "legend": {
|
|
49
|
-
const val = value;
|
|
50
46
|
return [
|
|
51
|
-
["legend_enabled", getValueOrDefault(
|
|
52
|
-
["legend_position", getValueOrDefault(
|
|
47
|
+
["legend_enabled", getValueOrDefault(value.enabled, DEFAULTS.legend.enabled, "bool")],
|
|
48
|
+
["legend_position", getValueOrDefault(value.position, DEFAULTS.legend.position)],
|
|
53
49
|
];
|
|
54
50
|
}
|
|
55
51
|
case "disableDrillDown":
|
|
56
|
-
return [
|
|
57
|
-
[
|
|
58
|
-
"disable_drill_down",
|
|
59
|
-
getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool"),
|
|
60
|
-
],
|
|
61
|
-
];
|
|
52
|
+
return [["disable_drill_down", getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool")]];
|
|
62
53
|
case "disableDrillIntoURL":
|
|
63
54
|
// Org-specific default (enableDrillToUrlByDefault); always serialise when set so it round-trips.
|
|
64
|
-
return [["disable_drill_into_url", value
|
|
55
|
+
return [["disable_drill_into_url", Boolean(value)]];
|
|
65
56
|
case "disableAlerts":
|
|
66
|
-
return [
|
|
67
|
-
["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")],
|
|
68
|
-
];
|
|
57
|
+
return [["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")]];
|
|
69
58
|
case "disableScheduledExports":
|
|
70
59
|
return [
|
|
71
60
|
[
|
|
@@ -78,6 +67,7 @@ export function treemapChartLoad(props) {
|
|
|
78
67
|
case "customTooltip":
|
|
79
68
|
return [["custom_tooltip", loadCustomTooltip(value)]];
|
|
80
69
|
default:
|
|
70
|
+
key; // Check that no key is forgotten in the cases above
|
|
81
71
|
return [];
|
|
82
72
|
}
|
|
83
73
|
});
|
package/esm/configs/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Pair } from "yaml";
|
|
2
|
+
import type { Visualisation } from "@gooddata/sdk-code-schemas/v1";
|
|
2
3
|
/** @public */
|
|
3
4
|
export type VisualisationConfig<T> = {
|
|
4
5
|
controls?: T;
|
|
@@ -11,6 +12,22 @@ export type ConfigDefaults<T> = {
|
|
|
11
12
|
export type ValueType = "string" | "bool" | "number" | "bool_auto" | "array";
|
|
12
13
|
/** @public */
|
|
13
14
|
export declare function getValueOrDefault<T>(value: T, defaultValue: T, type?: ValueType, undefinedAsDefault?: boolean): T | undefined;
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The following utility drops the `[key: string]: unknown` that are present in the generated AAC `config.json` schema
|
|
17
|
+
* It does so via `as string`. Another way to achieve this (without this type gymnastic) is to set an `additionalProperties: false`
|
|
18
|
+
* in the JSON schema, so that `[key: string]: unknown` is not present there. This could be a breaking change for some users though.
|
|
19
|
+
*/
|
|
20
|
+
type KnownKeys<T> = {
|
|
21
|
+
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
22
|
+
};
|
|
23
|
+
type YamlConfig = KnownKeys<NonNullable<Visualisation["config"]>>;
|
|
24
|
+
type ConfigEntry = {
|
|
25
|
+
[K in keyof YamlConfig]-?: [key: K, value: unknown];
|
|
26
|
+
}[keyof YamlConfig];
|
|
27
|
+
type LoaderArgs<T> = {
|
|
28
|
+
[K in keyof T]: [key: K, value: T[K]];
|
|
29
|
+
}[keyof T];
|
|
30
|
+
export declare function loadConfig<T>(props: VisualisationConfig<T>, loader: (...args: LoaderArgs<T>) => ConfigEntry[]): Pair<import("yaml").Scalar<string>, any> | null;
|
|
15
31
|
export declare function saveConfigObject<T extends object>(obj: T | undefined): T | undefined;
|
|
32
|
+
export {};
|
|
16
33
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/configs/utils.ts"],"names":[],"mappings":"AAEA,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,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AAExE,wBAAgB,UAAU,CAAC,CAAC,EACxB,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC7B,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE,mDAyBpD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAUpF"}
|
package/esm/configs/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ export function loadConfig(props, loader) {
|
|
|
37
37
|
const data = loader(key, properties[key]);
|
|
38
38
|
data.forEach(([newKey, newValue]) => {
|
|
39
39
|
if (newValue !== undefined) {
|
|
40
|
-
|
|
40
|
+
config.add(new Pair(newKey, newValue));
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -58,19 +58,3 @@ export function saveConfigObject(obj) {
|
|
|
58
58
|
}
|
|
59
59
|
return obj;
|
|
60
60
|
}
|
|
61
|
-
function addInPath(base, path, newValue) {
|
|
62
|
-
let current = base;
|
|
63
|
-
path.forEach((key, index) => {
|
|
64
|
-
if (index === path.length - 1) {
|
|
65
|
-
current.add(new Pair(key, newValue));
|
|
66
|
-
}
|
|
67
|
-
else if (current.has(key)) {
|
|
68
|
-
current = current.get(key);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
const map = new YAMLMap();
|
|
72
|
-
current.add(new Pair(key, map));
|
|
73
|
-
current = map;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waterfallChart.d.ts","sourceRoot":"","sources":["../../src/configs/waterfallChart.ts"],"names":[],"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,OAAO,CAAC;KACpB,CAAC;IACF,IAAI,EAAE;QACF,OAAO,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,OAAO,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,aAAa,EAAE,cAAc,CAAC;CACjC,CAAC;AAuDF,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,gDAAW,CAAC;AAEjD,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,CAAC,8BAA8B,CAAC,kEAiG5F;AAED,gBAAgB;AAChB,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,SAAS,EACrD,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4D9C;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,QAAQ,EAAE,cAAc,CAAC,8BAA8B,CAAC,CAAC;CAC5D;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,qBAI5B,CAAC"}
|
|
@@ -62,97 +62,81 @@ export function waterfallChartLoad(props) {
|
|
|
62
62
|
case "colorMapping":
|
|
63
63
|
return [["color", loadColorDefinitions(value)]];
|
|
64
64
|
case "dataLabels": {
|
|
65
|
-
const val = value;
|
|
66
|
-
return [
|
|
67
|
-
["data_labels", getValueOrDefault(val.visible, DEFAULTS.dataLabels.visible, "bool_auto")],
|
|
68
|
-
["data_labels_style", getValueOrDefault(val.style, DEFAULTS.dataLabels.style)],
|
|
69
|
-
];
|
|
70
|
-
}
|
|
71
|
-
case "chartFill": {
|
|
72
65
|
return [
|
|
73
66
|
[
|
|
74
|
-
"
|
|
75
|
-
|
|
67
|
+
"data_labels",
|
|
68
|
+
getValueOrDefault(value.visible, DEFAULTS.dataLabels.visible, "bool_auto"),
|
|
76
69
|
],
|
|
70
|
+
["data_labels_style", getValueOrDefault(value.style, DEFAULTS.dataLabels.style)],
|
|
77
71
|
];
|
|
78
72
|
}
|
|
73
|
+
case "chartFill": {
|
|
74
|
+
return [["chart_fill", loadChartFill(value, DEFAULTS.chartFill)]];
|
|
75
|
+
}
|
|
79
76
|
case "orientation": {
|
|
80
|
-
|
|
81
|
-
return [["orientation", getValueOrDefault(val.position, DEFAULTS.orientation.position)]];
|
|
77
|
+
return [["orientation", getValueOrDefault(value.position, DEFAULTS.orientation.position)]];
|
|
82
78
|
}
|
|
83
79
|
case "total": {
|
|
84
|
-
const val = value;
|
|
85
80
|
return [
|
|
86
|
-
["total_enabled", getValueOrDefault(
|
|
87
|
-
["total_name", getValueOrDefault(
|
|
81
|
+
["total_enabled", getValueOrDefault(value.enabled, DEFAULTS.total.enabled, "bool")],
|
|
82
|
+
["total_name", getValueOrDefault(value.name, DEFAULTS.total.name)],
|
|
88
83
|
];
|
|
89
84
|
}
|
|
90
85
|
case "legend": {
|
|
91
|
-
const val = value;
|
|
92
86
|
return [
|
|
93
|
-
["legend_enabled", getValueOrDefault(
|
|
94
|
-
["legend_position", getValueOrDefault(
|
|
87
|
+
["legend_enabled", getValueOrDefault(value.enabled, DEFAULTS.legend.enabled, "bool")],
|
|
88
|
+
["legend_position", getValueOrDefault(value.position, DEFAULTS.legend.position)],
|
|
95
89
|
];
|
|
96
90
|
}
|
|
97
91
|
case "xaxis": {
|
|
98
|
-
const val = value;
|
|
99
92
|
return [
|
|
100
|
-
["xaxis_format", getValueOrDefault(
|
|
101
|
-
["xaxis_max", getValueOrDefault(
|
|
102
|
-
["xaxis_min", getValueOrDefault(
|
|
93
|
+
["xaxis_format", getValueOrDefault(value.format, DEFAULTS.xaxis.format)],
|
|
94
|
+
["xaxis_max", getValueOrDefault(value.max, DEFAULTS.xaxis.max, "number")],
|
|
95
|
+
["xaxis_min", getValueOrDefault(value.min, DEFAULTS.xaxis.min, "number")],
|
|
103
96
|
[
|
|
104
97
|
"xaxis_name_position",
|
|
105
|
-
getValueOrDefault(
|
|
98
|
+
getValueOrDefault(value.name?.position, DEFAULTS.xaxis.name.position),
|
|
106
99
|
],
|
|
107
100
|
[
|
|
108
101
|
"xaxis_name_visible",
|
|
109
|
-
getValueOrDefault(
|
|
102
|
+
getValueOrDefault(value.name?.visible, DEFAULTS.xaxis.name.visible, "bool"),
|
|
110
103
|
],
|
|
111
|
-
["xaxis_rotation", getValueOrDefault(
|
|
112
|
-
["xaxis_visible", getValueOrDefault(
|
|
104
|
+
["xaxis_rotation", getValueOrDefault(value.rotation, DEFAULTS.xaxis.rotation)],
|
|
105
|
+
["xaxis_visible", getValueOrDefault(value.visible, DEFAULTS.xaxis.visible, "bool")],
|
|
113
106
|
[
|
|
114
107
|
"xaxis_labels",
|
|
115
|
-
getValueOrDefault(
|
|
108
|
+
getValueOrDefault(value.labelsEnabled, DEFAULTS.xaxis.labelsEnabled, "bool"),
|
|
116
109
|
],
|
|
117
110
|
];
|
|
118
111
|
}
|
|
119
112
|
case "yaxis": {
|
|
120
|
-
const val = value;
|
|
121
113
|
return [
|
|
122
114
|
[
|
|
123
115
|
"yaxis_name_position",
|
|
124
|
-
getValueOrDefault(
|
|
116
|
+
getValueOrDefault(value.name?.position, DEFAULTS.yaxis.name.position),
|
|
125
117
|
],
|
|
126
118
|
[
|
|
127
119
|
"yaxis_name_visible",
|
|
128
|
-
getValueOrDefault(
|
|
120
|
+
getValueOrDefault(value.name?.visible, DEFAULTS.yaxis.name.visible, "bool"),
|
|
129
121
|
],
|
|
130
122
|
[
|
|
131
123
|
"yaxis_labels",
|
|
132
|
-
getValueOrDefault(
|
|
124
|
+
getValueOrDefault(value.labelsEnabled, DEFAULTS.yaxis.labelsEnabled, "bool"),
|
|
133
125
|
],
|
|
134
|
-
["yaxis_rotation", getValueOrDefault(
|
|
135
|
-
["yaxis_visible", getValueOrDefault(
|
|
126
|
+
["yaxis_rotation", getValueOrDefault(value.rotation, DEFAULTS.yaxis.rotation)],
|
|
127
|
+
["yaxis_visible", getValueOrDefault(value.visible, DEFAULTS.yaxis.visible, "bool")],
|
|
136
128
|
];
|
|
137
129
|
}
|
|
138
130
|
case "grid": {
|
|
139
|
-
|
|
140
|
-
return [["grid_enabled", getValueOrDefault(val.enabled, DEFAULTS.grid.enabled, "bool")]];
|
|
131
|
+
return [["grid_enabled", getValueOrDefault(value.enabled, DEFAULTS.grid.enabled, "bool")]];
|
|
141
132
|
}
|
|
142
133
|
case "disableDrillDown":
|
|
143
|
-
return [
|
|
144
|
-
[
|
|
145
|
-
"disable_drill_down",
|
|
146
|
-
getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool"),
|
|
147
|
-
],
|
|
148
|
-
];
|
|
134
|
+
return [["disable_drill_down", getValueOrDefault(value, DEFAULTS.disableDrillDown, "bool")]];
|
|
149
135
|
case "disableDrillIntoURL":
|
|
150
136
|
// Org-specific default (enableDrillToUrlByDefault); always serialise when set so it round-trips.
|
|
151
|
-
return [["disable_drill_into_url", value
|
|
137
|
+
return [["disable_drill_into_url", Boolean(value)]];
|
|
152
138
|
case "disableAlerts":
|
|
153
|
-
return [
|
|
154
|
-
["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")],
|
|
155
|
-
];
|
|
139
|
+
return [["disable_alerts", getValueOrDefault(value, DEFAULTS.disableAlerts, "bool")]];
|
|
156
140
|
case "disableScheduledExports":
|
|
157
141
|
return [
|
|
158
142
|
[
|
|
@@ -165,6 +149,7 @@ export function waterfallChartLoad(props) {
|
|
|
165
149
|
case "customTooltip":
|
|
166
150
|
return [["custom_tooltip", loadCustomTooltip(value)]];
|
|
167
151
|
default:
|
|
152
|
+
key; // Check that no key is forgotten in the cases above
|
|
168
153
|
return [];
|
|
169
154
|
}
|
|
170
155
|
});
|
|
@@ -230,6 +230,7 @@ export declare type AreaChartConfigProperties = {
|
|
|
230
230
|
disableScheduledExports: boolean;
|
|
231
231
|
disableKeyDriveAnalysisOn: Record<string, boolean>;
|
|
232
232
|
customTooltip: CustomTooltip;
|
|
233
|
+
lineStyleMapping: Array<LineStyleMapping>;
|
|
233
234
|
};
|
|
234
235
|
|
|
235
236
|
/** @internal */
|
|
@@ -335,6 +336,7 @@ export declare function areaChartSave(_fields: Visualisation["query"]["fields"]
|
|
|
335
336
|
[k: string]: boolean;
|
|
336
337
|
} | undefined;
|
|
337
338
|
customTooltip: CustomTooltip | undefined;
|
|
339
|
+
lineStyleMapping: LineStyleMapping[] | undefined;
|
|
338
340
|
} | undefined;
|
|
339
341
|
|
|
340
342
|
/** @public */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-code-convertors",
|
|
3
|
-
"version": "11.61.0-alpha.
|
|
3
|
+
"version": "11.61.0-alpha.2",
|
|
4
4
|
"description": "GoodData AAC declarative converters",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"uuid": "11.1.1",
|
|
28
28
|
"yaml": "2.8.3",
|
|
29
|
-
"@gooddata/api-client-tiger": "11.61.0-alpha.
|
|
30
|
-
"@gooddata/sdk-
|
|
31
|
-
"@gooddata/sdk-
|
|
29
|
+
"@gooddata/api-client-tiger": "11.61.0-alpha.2",
|
|
30
|
+
"@gooddata/sdk-model": "11.61.0-alpha.2",
|
|
31
|
+
"@gooddata/sdk-code-schemas": "11.61.0-alpha.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-extractor": "7.59.2",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"oxlint-tsgolint": "7.0.2001",
|
|
49
49
|
"typescript": "7.0.2",
|
|
50
50
|
"vitest": "4.1.11",
|
|
51
|
-
"@gooddata/
|
|
52
|
-
"@gooddata/
|
|
51
|
+
"@gooddata/eslint-config": "11.61.0-alpha.2",
|
|
52
|
+
"@gooddata/oxlint-config": "11.61.0-alpha.2"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"_phase:build": "npm run build",
|