@gooddata/sdk-code-convertors 11.35.0-alpha.4 → 11.35.0-alpha.6
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 +22 -10
- package/esm/configs/areaChart.js +13 -5
- package/esm/configs/barChart.d.ts +22 -10
- package/esm/configs/barChart.js +13 -5
- package/esm/configs/bubbleChart.d.ts +22 -10
- package/esm/configs/bubbleChart.js +13 -5
- package/esm/configs/bulletChart.d.ts +22 -10
- package/esm/configs/bulletChart.js +13 -5
- package/esm/configs/columnChart.d.ts +22 -10
- package/esm/configs/columnChart.js +13 -5
- package/esm/configs/comboChart.d.ts +22 -10
- package/esm/configs/comboChart.js +13 -5
- package/esm/configs/dependencyWheelChart.d.ts +22 -10
- package/esm/configs/dependencyWheelChart.js +13 -5
- package/esm/configs/donutChart.d.ts +22 -10
- package/esm/configs/donutChart.js +13 -5
- package/esm/configs/funnelChart.d.ts +22 -10
- package/esm/configs/funnelChart.js +13 -5
- package/esm/configs/geoAreaChart.d.ts +22 -10
- package/esm/configs/geoAreaChart.js +13 -5
- package/esm/configs/geoChart.d.ts +22 -10
- package/esm/configs/geoChart.js +13 -5
- package/esm/configs/headlineChart.d.ts +22 -10
- package/esm/configs/headlineChart.js +13 -5
- package/esm/configs/heatmapChart.d.ts +22 -10
- package/esm/configs/heatmapChart.js +13 -5
- package/esm/configs/lineChart.d.ts +22 -10
- package/esm/configs/lineChart.js +13 -5
- package/esm/configs/pieChart.d.ts +22 -10
- package/esm/configs/pieChart.js +13 -5
- package/esm/configs/pyramidChart.d.ts +22 -10
- package/esm/configs/pyramidChart.js +13 -5
- package/esm/configs/repeaterChart.d.ts +25 -11
- package/esm/configs/repeaterChart.js +15 -6
- package/esm/configs/sankeyChart.d.ts +22 -10
- package/esm/configs/sankeyChart.js +13 -5
- package/esm/configs/scatterChart.d.ts +22 -10
- package/esm/configs/scatterChart.js +13 -5
- package/esm/configs/table.d.ts +22 -10
- package/esm/configs/table.js +13 -5
- package/esm/configs/treemapChart.d.ts +22 -10
- package/esm/configs/treemapChart.js +13 -5
- package/esm/configs/types.d.ts +28 -1
- package/esm/configs/types.js +0 -1
- package/esm/configs/utils.d.ts +1 -1
- package/esm/configs/utils.js +0 -1
- package/esm/configs/waterfallChart.d.ts +22 -10
- package/esm/configs/waterfallChart.js +13 -5
- package/esm/conts.d.ts +8 -1
- package/esm/conts.js +8 -1
- package/esm/execution/buildAfmExecution.d.ts +0 -1
- package/esm/execution/buildAfmExecution.js +0 -1
- package/esm/from/declarativeAttributeHierarchyToYaml.d.ts +0 -1
- package/esm/from/declarativeAttributeHierarchyToYaml.js +0 -1
- package/esm/from/declarativeDashboardToYaml.d.ts +9 -1
- package/esm/from/declarativeDashboardToYaml.js +7 -1
- package/esm/from/declarativeDatasetToYaml.d.ts +0 -1
- package/esm/from/declarativeDatasetToYaml.js +0 -1
- package/esm/from/declarativeDateInstanceToYaml.d.ts +0 -1
- package/esm/from/declarativeDateInstanceToYaml.js +0 -1
- package/esm/from/declarativeMetricToYaml.d.ts +0 -1
- package/esm/from/declarativeMetricToYaml.js +0 -1
- package/esm/from/declarativePluginToYaml.d.ts +0 -1
- package/esm/from/declarativePluginToYaml.js +0 -1
- package/esm/from/declarativeVisualisationToYaml.d.ts +47 -18
- package/esm/from/declarativeVisualisationToYaml.js +19 -1
- package/esm/index.d.ts +27 -28
- package/esm/index.js +23 -24
- package/esm/schemas/types.d.ts +0 -1
- package/esm/schemas/types.js +0 -1
- package/esm/sdk-code-convertors.d.ts +2107 -1647
- package/esm/to/yamlAttributeHierarchyToDeclarative.d.ts +0 -1
- package/esm/to/yamlAttributeHierarchyToDeclarative.js +0 -1
- package/esm/to/yamlDashboardToDeclarative.d.ts +18 -6
- package/esm/to/yamlDashboardToDeclarative.js +5 -1
- package/esm/to/yamlDatasetToDeclarative.d.ts +4 -1
- package/esm/to/yamlDatasetToDeclarative.js +4 -1
- package/esm/to/yamlDateDatasetToDeclarative.d.ts +0 -1
- package/esm/to/yamlDateDatasetToDeclarative.js +0 -1
- package/esm/to/yamlMetricToDeclarative.d.ts +0 -1
- package/esm/to/yamlMetricToDeclarative.js +0 -1
- package/esm/to/yamlPluginToDeclarative.d.ts +0 -1
- package/esm/to/yamlPluginToDeclarative.js +0 -1
- package/esm/to/yamlVisualisationToDeclarative.d.ts +7 -3
- package/esm/to/yamlVisualisationToDeclarative.js +5 -1
- package/esm/types.d.ts +0 -1
- package/esm/types.js +0 -1
- package/esm/utils/configUtils.d.ts +0 -1
- package/esm/utils/configUtils.js +0 -1
- package/esm/utils/convertBucketToTitle.d.ts +0 -1
- package/esm/utils/convertBucketToTitle.js +0 -1
- package/esm/utils/customUrl.d.ts +0 -1
- package/esm/utils/customUrl.js +0 -1
- package/esm/utils/dateUtils.d.ts +0 -1
- package/esm/utils/dateUtils.js +0 -1
- package/esm/utils/errors.d.ts +0 -1
- package/esm/utils/errors.js +0 -1
- package/esm/utils/filterUtils.d.ts +0 -1
- package/esm/utils/filterUtils.js +0 -1
- package/esm/utils/granularityUtils.d.ts +0 -1
- package/esm/utils/granularityUtils.js +0 -1
- package/esm/utils/locationUtils.d.ts +0 -1
- package/esm/utils/locationUtils.js +0 -1
- package/esm/utils/nameUtils.d.ts +0 -1
- package/esm/utils/nameUtils.js +0 -1
- package/esm/utils/permissionUtils.d.ts +0 -1
- package/esm/utils/permissionUtils.js +0 -1
- package/esm/utils/sharedUtils.d.ts +1 -1
- package/esm/utils/sharedUtils.js +0 -1
- package/esm/utils/texts.d.ts +0 -1
- package/esm/utils/texts.js +0 -1
- package/esm/utils/typeGuards.d.ts +0 -1
- package/esm/utils/typeGuards.js +0 -1
- package/esm/utils/yamlUtils.d.ts +0 -1
- package/esm/utils/yamlUtils.js +0 -1
- package/package.json +7 -7
- package/esm/configs/areaChart.d.ts.map +0 -1
- package/esm/configs/areaChart.js.map +0 -1
- package/esm/configs/barChart.d.ts.map +0 -1
- package/esm/configs/barChart.js.map +0 -1
- package/esm/configs/bubbleChart.d.ts.map +0 -1
- package/esm/configs/bubbleChart.js.map +0 -1
- package/esm/configs/bulletChart.d.ts.map +0 -1
- package/esm/configs/bulletChart.js.map +0 -1
- package/esm/configs/columnChart.d.ts.map +0 -1
- package/esm/configs/columnChart.js.map +0 -1
- package/esm/configs/comboChart.d.ts.map +0 -1
- package/esm/configs/comboChart.js.map +0 -1
- package/esm/configs/dependencyWheelChart.d.ts.map +0 -1
- package/esm/configs/dependencyWheelChart.js.map +0 -1
- package/esm/configs/donutChart.d.ts.map +0 -1
- package/esm/configs/donutChart.js.map +0 -1
- package/esm/configs/funnelChart.d.ts.map +0 -1
- package/esm/configs/funnelChart.js.map +0 -1
- package/esm/configs/geoAreaChart.d.ts.map +0 -1
- package/esm/configs/geoAreaChart.js.map +0 -1
- package/esm/configs/geoChart.d.ts.map +0 -1
- package/esm/configs/geoChart.js.map +0 -1
- package/esm/configs/headlineChart.d.ts.map +0 -1
- package/esm/configs/headlineChart.js.map +0 -1
- package/esm/configs/heatmapChart.d.ts.map +0 -1
- package/esm/configs/heatmapChart.js.map +0 -1
- package/esm/configs/lineChart.d.ts.map +0 -1
- package/esm/configs/lineChart.js.map +0 -1
- package/esm/configs/pieChart.d.ts.map +0 -1
- package/esm/configs/pieChart.js.map +0 -1
- package/esm/configs/pyramidChart.d.ts.map +0 -1
- package/esm/configs/pyramidChart.js.map +0 -1
- package/esm/configs/repeaterChart.d.ts.map +0 -1
- package/esm/configs/repeaterChart.js.map +0 -1
- package/esm/configs/sankeyChart.d.ts.map +0 -1
- package/esm/configs/sankeyChart.js.map +0 -1
- package/esm/configs/scatterChart.d.ts.map +0 -1
- package/esm/configs/scatterChart.js.map +0 -1
- package/esm/configs/table.d.ts.map +0 -1
- package/esm/configs/table.js.map +0 -1
- package/esm/configs/treemapChart.d.ts.map +0 -1
- package/esm/configs/treemapChart.js.map +0 -1
- package/esm/configs/types.d.ts.map +0 -1
- package/esm/configs/types.js.map +0 -1
- package/esm/configs/utils.d.ts.map +0 -1
- package/esm/configs/utils.js.map +0 -1
- package/esm/configs/waterfallChart.d.ts.map +0 -1
- package/esm/configs/waterfallChart.js.map +0 -1
- package/esm/conts.d.ts.map +0 -1
- package/esm/conts.js.map +0 -1
- package/esm/execution/buildAfmExecution.d.ts.map +0 -1
- package/esm/execution/buildAfmExecution.js.map +0 -1
- package/esm/from/declarativeAttributeHierarchyToYaml.d.ts.map +0 -1
- package/esm/from/declarativeAttributeHierarchyToYaml.js.map +0 -1
- package/esm/from/declarativeDashboardToYaml.d.ts.map +0 -1
- package/esm/from/declarativeDashboardToYaml.js.map +0 -1
- package/esm/from/declarativeDatasetToYaml.d.ts.map +0 -1
- package/esm/from/declarativeDatasetToYaml.js.map +0 -1
- package/esm/from/declarativeDateInstanceToYaml.d.ts.map +0 -1
- package/esm/from/declarativeDateInstanceToYaml.js.map +0 -1
- package/esm/from/declarativeMetricToYaml.d.ts.map +0 -1
- package/esm/from/declarativeMetricToYaml.js.map +0 -1
- package/esm/from/declarativePluginToYaml.d.ts.map +0 -1
- package/esm/from/declarativePluginToYaml.js.map +0 -1
- package/esm/from/declarativeVisualisationToYaml.d.ts.map +0 -1
- package/esm/from/declarativeVisualisationToYaml.js.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/schemas/types.d.ts.map +0 -1
- package/esm/schemas/types.js.map +0 -1
- package/esm/to/yamlAttributeHierarchyToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlAttributeHierarchyToDeclarative.js.map +0 -1
- package/esm/to/yamlDashboardToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlDashboardToDeclarative.js.map +0 -1
- package/esm/to/yamlDatasetToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlDatasetToDeclarative.js.map +0 -1
- package/esm/to/yamlDateDatasetToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlDateDatasetToDeclarative.js.map +0 -1
- package/esm/to/yamlMetricToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlMetricToDeclarative.js.map +0 -1
- package/esm/to/yamlPluginToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlPluginToDeclarative.js.map +0 -1
- package/esm/to/yamlVisualisationToDeclarative.d.ts.map +0 -1
- package/esm/to/yamlVisualisationToDeclarative.js.map +0 -1
- package/esm/types.d.ts.map +0 -1
- package/esm/types.js.map +0 -1
- package/esm/utils/configUtils.d.ts.map +0 -1
- package/esm/utils/configUtils.js.map +0 -1
- package/esm/utils/convertBucketToTitle.d.ts.map +0 -1
- package/esm/utils/convertBucketToTitle.js.map +0 -1
- package/esm/utils/customUrl.d.ts.map +0 -1
- package/esm/utils/customUrl.js.map +0 -1
- package/esm/utils/dateUtils.d.ts.map +0 -1
- package/esm/utils/dateUtils.js.map +0 -1
- package/esm/utils/errors.d.ts.map +0 -1
- package/esm/utils/errors.js.map +0 -1
- package/esm/utils/filterUtils.d.ts.map +0 -1
- package/esm/utils/filterUtils.js.map +0 -1
- package/esm/utils/granularityUtils.d.ts.map +0 -1
- package/esm/utils/granularityUtils.js.map +0 -1
- package/esm/utils/locationUtils.d.ts.map +0 -1
- package/esm/utils/locationUtils.js.map +0 -1
- package/esm/utils/nameUtils.d.ts.map +0 -1
- package/esm/utils/nameUtils.js.map +0 -1
- package/esm/utils/permissionUtils.d.ts.map +0 -1
- package/esm/utils/permissionUtils.js.map +0 -1
- package/esm/utils/sharedUtils.d.ts.map +0 -1
- package/esm/utils/sharedUtils.js.map +0 -1
- package/esm/utils/texts.d.ts.map +0 -1
- package/esm/utils/texts.js.map +0 -1
- package/esm/utils/typeGuards.d.ts.map +0 -1
- package/esm/utils/typeGuards.js.map +0 -1
- package/esm/utils/yamlUtils.d.ts.map +0 -1
- package/esm/utils/yamlUtils.js.map +0 -1
package/esm/configs/table.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
2
|
import { loadColumnsWidth, saveColumnWidths } from "../utils/configUtils.js";
|
|
3
3
|
import { getValueOrDefault, loadConfig, saveConfigObject, } from "./utils.js";
|
|
4
|
+
/** @internal */
|
|
4
5
|
const DEFAULTS = {
|
|
5
6
|
columnWidths: [],
|
|
6
7
|
measureGroupDimension: "columns",
|
|
@@ -77,7 +78,10 @@ function saveTextWrapping(value) {
|
|
|
77
78
|
})),
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const TABLE_DEFAULTS = DEFAULTS;
|
|
83
|
+
/** @internal */
|
|
84
|
+
export function tableLoad(props) {
|
|
81
85
|
return loadConfig(props, (key, value) => {
|
|
82
86
|
switch (key) {
|
|
83
87
|
case "columnWidths": {
|
|
@@ -142,7 +146,8 @@ function load(props) {
|
|
|
142
146
|
}
|
|
143
147
|
});
|
|
144
148
|
}
|
|
145
|
-
|
|
149
|
+
/** @internal */
|
|
150
|
+
export function tableSave(fields, config) {
|
|
146
151
|
if (!config) {
|
|
147
152
|
return undefined;
|
|
148
153
|
}
|
|
@@ -161,9 +166,12 @@ function save(fields, config) {
|
|
|
161
166
|
grandTotalsPosition: getValueOrDefault(config.grand_totals_position, DEFAULTS.grandTotalsPosition),
|
|
162
167
|
});
|
|
163
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
* @deprecated Use tableLoad and tableSave instead.
|
|
172
|
+
*/
|
|
164
173
|
export const table = {
|
|
165
|
-
load,
|
|
166
|
-
save,
|
|
174
|
+
load: tableLoad,
|
|
175
|
+
save: tableSave,
|
|
167
176
|
DEFAULTS,
|
|
168
177
|
};
|
|
169
|
-
//# sourceMappingURL=table.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Visualisation } from "@gooddata/sdk-code-schemas/v1";
|
|
2
2
|
import { type ChartFillType, type ColorMapping, type PatternFillName } from "./types.js";
|
|
3
3
|
import { type ConfigDefaults, type VisualisationConfig } from "./utils.js";
|
|
4
|
-
|
|
4
|
+
/** @internal */
|
|
5
|
+
export type TreemapChartConfigProperties = {
|
|
5
6
|
colorMapping: Array<ColorMapping>;
|
|
6
7
|
dataLabels: {
|
|
7
8
|
visible: boolean | "auto";
|
|
@@ -19,8 +20,12 @@ type DefaultProperties = {
|
|
|
19
20
|
disableAlerts: boolean;
|
|
20
21
|
disableScheduledExports: boolean;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
declare
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const TREEMAP_CHART_DEFAULTS: ConfigDefaults<TreemapChartConfigProperties>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare function treemapChartLoad(props: VisualisationConfig<TreemapChartConfigProperties>): import("yaml").Pair<import("yaml").Scalar<string>, any> | null;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare function treemapChartSave(_fields: Visualisation["query"]["fields"] | undefined, config: Visualisation["config"] | undefined): {
|
|
24
29
|
colorMapping: ColorMapping[] | undefined;
|
|
25
30
|
dataLabels: {
|
|
26
31
|
visible: "auto" | boolean | undefined;
|
|
@@ -38,10 +43,17 @@ declare function save(_fields: Visualisation["query"]["fields"] | undefined, con
|
|
|
38
43
|
disableAlerts: boolean | undefined;
|
|
39
44
|
disableScheduledExports: boolean | undefined;
|
|
40
45
|
} | undefined;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated Use treemapChartLoad and treemapChartSave instead.
|
|
49
|
+
*/
|
|
50
|
+
export interface ITreemapChartConfig {
|
|
51
|
+
load: typeof treemapChartLoad;
|
|
52
|
+
save: typeof treemapChartSave;
|
|
53
|
+
DEFAULTS: ConfigDefaults<TreemapChartConfigProperties>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated Use treemapChartLoad and treemapChartSave instead.
|
|
58
|
+
*/
|
|
59
|
+
export declare const treemapChart: ITreemapChartConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
2
|
import { loadChartFill, loadColorMapping, saveChartFill, saveColorMapping } from "../utils/configUtils.js";
|
|
3
3
|
import { getValueOrDefault, loadConfig, saveConfigObject, } from "./utils.js";
|
|
4
|
+
/** @internal */
|
|
4
5
|
const DEFAULTS = {
|
|
5
6
|
colorMapping: [],
|
|
6
7
|
dataLabels: {
|
|
@@ -18,7 +19,10 @@ const DEFAULTS = {
|
|
|
18
19
|
disableAlerts: false,
|
|
19
20
|
disableScheduledExports: false,
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const TREEMAP_CHART_DEFAULTS = DEFAULTS;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export function treemapChartLoad(props) {
|
|
22
26
|
return loadConfig(props, (key, value) => {
|
|
23
27
|
switch (key) {
|
|
24
28
|
case "colorMapping":
|
|
@@ -68,7 +72,8 @@ function load(props) {
|
|
|
68
72
|
}
|
|
69
73
|
});
|
|
70
74
|
}
|
|
71
|
-
|
|
75
|
+
/** @internal */
|
|
76
|
+
export function treemapChartSave(_fields, config) {
|
|
72
77
|
if (!config) {
|
|
73
78
|
return undefined;
|
|
74
79
|
}
|
|
@@ -88,9 +93,12 @@ function save(_fields, config) {
|
|
|
88
93
|
disableScheduledExports: getValueOrDefault(config.disable_scheduled_exports, DEFAULTS.disableScheduledExports, "bool"),
|
|
89
94
|
});
|
|
90
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
* @deprecated Use treemapChartLoad and treemapChartSave instead.
|
|
99
|
+
*/
|
|
91
100
|
export const treemapChart = {
|
|
92
|
-
load,
|
|
93
|
-
save,
|
|
101
|
+
load: treemapChartLoad,
|
|
102
|
+
save: treemapChartSave,
|
|
94
103
|
DEFAULTS,
|
|
95
104
|
};
|
|
96
|
-
//# sourceMappingURL=treemapChart.js.map
|
package/esm/configs/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @public */
|
|
1
2
|
export type ColorMapping = {
|
|
2
3
|
id: string;
|
|
3
4
|
color: {
|
|
@@ -12,82 +13,108 @@ export type ColorMapping = {
|
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
};
|
|
16
|
+
/** @internal */
|
|
15
17
|
export type PointShapeSymbol = "circle" | "square" | "diamond" | "triangle" | "triangle-down";
|
|
18
|
+
/** @internal */
|
|
16
19
|
export interface IChartFill {
|
|
17
20
|
type: ChartFillType;
|
|
18
21
|
measureToPatternName?: Record<string, PatternFillName>;
|
|
19
22
|
}
|
|
23
|
+
/** @internal */
|
|
20
24
|
export type ChartFillType = "solid" | "pattern" | "outline";
|
|
25
|
+
/** @internal */
|
|
21
26
|
export type PatternFillName = "diagonal_grid_small" | "vertical_lines_small" | "grid_small" | "horizontal_lines_small" | "circle_small" | "flag_small" | "waffle_small" | "dot_small" | "pyramid_small" | "needle_small" | "diamond_small" | "pizza_small" | "diagonal_grid_medium" | "vertical_lines_medium" | "grid_large" | "horizontal_lines_medium" | "circle_medium" | "flag_medium" | "waffle_medium" | "dot_medium" | "pyramid_medium" | "needle_medium" | "diamond_medium" | "pizza_medium";
|
|
27
|
+
/** @public */
|
|
22
28
|
export type ColumnLocator = IAttributeColumnLocator | IMeasureColumnLocator | ITotalColumnLocator;
|
|
29
|
+
/** @public */
|
|
23
30
|
export interface IAttributeColumnLocatorBody {
|
|
24
31
|
attributeIdentifier: string;
|
|
25
32
|
element?: string | null;
|
|
26
33
|
}
|
|
34
|
+
/** @public */
|
|
27
35
|
export interface ITotalColumnLocatorBody {
|
|
28
36
|
attributeIdentifier: string;
|
|
29
37
|
totalFunction: string;
|
|
30
38
|
}
|
|
39
|
+
/** @public */
|
|
31
40
|
export interface IAttributeColumnLocator {
|
|
32
41
|
attributeLocatorItem: IAttributeColumnLocatorBody;
|
|
33
42
|
}
|
|
43
|
+
/** @public */
|
|
34
44
|
export interface ITotalColumnLocator {
|
|
35
45
|
totalLocatorItem: ITotalColumnLocatorBody;
|
|
36
46
|
}
|
|
47
|
+
/** @public */
|
|
37
48
|
export interface IAttributeColumnWidthItem {
|
|
38
49
|
attributeColumnWidthItem: IAttributeColumnWidthItemBody;
|
|
39
50
|
}
|
|
51
|
+
/** @public */
|
|
40
52
|
export interface IAttributeColumnWidthItemBody {
|
|
41
53
|
width: IAbsoluteColumnWidth;
|
|
42
54
|
attributeIdentifier: string;
|
|
43
55
|
}
|
|
56
|
+
/** @public */
|
|
44
57
|
export interface IMeasureColumnWidthItemBody {
|
|
45
58
|
width: ColumnWidth;
|
|
46
59
|
locators: ColumnLocator[];
|
|
47
60
|
}
|
|
61
|
+
/** @public */
|
|
48
62
|
export interface IMeasureColumnWidthItem {
|
|
49
63
|
measureColumnWidthItem: IMeasureColumnWidthItemBody;
|
|
50
64
|
}
|
|
65
|
+
/** @public */
|
|
51
66
|
export interface ISliceMeasureColumnWidthItemBody {
|
|
52
67
|
width: ColumnWidth;
|
|
53
68
|
locators: IMeasureColumnLocator[];
|
|
54
69
|
}
|
|
70
|
+
/** @public */
|
|
55
71
|
export interface ISliceMeasureColumnWidthItem {
|
|
56
72
|
sliceMeasureColumnWidthItem: ISliceMeasureColumnWidthItemBody;
|
|
57
73
|
}
|
|
74
|
+
/** @public */
|
|
58
75
|
export interface IMixedValuesColumnWidthItemBody {
|
|
59
76
|
width: ColumnWidth;
|
|
60
77
|
locators: IMeasureColumnLocator[];
|
|
61
78
|
}
|
|
79
|
+
/** @public */
|
|
62
80
|
export interface IAbsoluteColumnWidth {
|
|
63
81
|
value: number;
|
|
64
82
|
allowGrowToFit?: boolean;
|
|
65
83
|
}
|
|
84
|
+
/** @public */
|
|
66
85
|
export type ColumnWidth = IAbsoluteColumnWidth | IAutoColumnWidth;
|
|
86
|
+
/** @public */
|
|
67
87
|
export interface IAutoColumnWidth {
|
|
68
88
|
value: "auto";
|
|
69
89
|
}
|
|
90
|
+
/** @public */
|
|
70
91
|
export interface IMixedValuesColumnWidthItem {
|
|
71
92
|
mixedValuesColumnWidthItem: IMixedValuesColumnWidthItemBody;
|
|
72
93
|
}
|
|
94
|
+
/** @public */
|
|
73
95
|
export interface IAllMeasureColumnWidthItemBody {
|
|
74
96
|
width: IAbsoluteColumnWidth;
|
|
75
97
|
}
|
|
98
|
+
/** @public */
|
|
76
99
|
export interface IAllMeasureColumnWidthItem {
|
|
77
100
|
measureColumnWidthItem: IAllMeasureColumnWidthItemBody;
|
|
78
101
|
}
|
|
102
|
+
/** @public */
|
|
79
103
|
export interface IWeakMeasureColumnWidthItemBody {
|
|
80
104
|
width: IAbsoluteColumnWidth;
|
|
81
105
|
locator: IMeasureColumnLocator;
|
|
82
106
|
}
|
|
107
|
+
/** @public */
|
|
83
108
|
export interface IWeakMeasureColumnWidthItem {
|
|
84
109
|
measureColumnWidthItem: IWeakMeasureColumnWidthItemBody;
|
|
85
110
|
}
|
|
111
|
+
/** @public */
|
|
86
112
|
export interface IMeasureColumnLocatorBody {
|
|
87
113
|
measureIdentifier: string;
|
|
88
114
|
}
|
|
115
|
+
/** @public */
|
|
89
116
|
export interface IMeasureColumnLocator {
|
|
90
117
|
measureLocatorItem: IMeasureColumnLocatorBody;
|
|
91
118
|
}
|
|
119
|
+
/** @public */
|
|
92
120
|
export type ColumnWidthItem = IAttributeColumnWidthItem | IMeasureColumnWidthItem | ISliceMeasureColumnWidthItem | IMixedValuesColumnWidthItem | IAllMeasureColumnWidthItem | IWeakMeasureColumnWidthItem;
|
|
93
|
-
//# sourceMappingURL=types.d.ts.map
|
package/esm/configs/types.js
CHANGED
package/esm/configs/utils.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Pair } from "yaml";
|
|
|
3
3
|
export type VisualisationConfig<T> = {
|
|
4
4
|
controls?: T;
|
|
5
5
|
};
|
|
6
|
+
/** @internal */
|
|
6
7
|
export type ConfigDefaults<T> = {
|
|
7
8
|
[key in keyof T]: T[key];
|
|
8
9
|
};
|
|
@@ -12,4 +13,3 @@ export type ValueType = "string" | "bool" | "number" | "bool_auto" | "array";
|
|
|
12
13
|
export declare function getValueOrDefault<T>(value: T, defaultValue: T, type?: ValueType, undefinedAsDefault?: boolean): T | undefined;
|
|
13
14
|
export declare function loadConfig<T>(props: VisualisationConfig<T>, loader: <K extends keyof T>(key: K, value: T[K]) => [string, any][]): Pair<import("yaml").Scalar<string>, any> | null;
|
|
14
15
|
export declare function saveConfigObject<T extends object>(obj: T | undefined): T | undefined;
|
|
15
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/esm/configs/utils.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Visualisation } from "@gooddata/sdk-code-schemas/v1";
|
|
2
2
|
import { type ChartFillType, type ColorMapping, type PatternFillName } from "./types.js";
|
|
3
3
|
import { type ConfigDefaults, type VisualisationConfig } from "./utils.js";
|
|
4
|
-
|
|
4
|
+
/** @internal */
|
|
5
|
+
export type WaterfallChartConfigProperties = {
|
|
5
6
|
colorMapping: Array<ColorMapping>;
|
|
6
7
|
dataLabels: {
|
|
7
8
|
visible: boolean | "auto";
|
|
@@ -50,8 +51,12 @@ type DefaultProperties = {
|
|
|
50
51
|
disableAlerts: boolean;
|
|
51
52
|
disableScheduledExports: boolean;
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
-
declare
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const WATERFALL_CHART_DEFAULTS: ConfigDefaults<WaterfallChartConfigProperties>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare function waterfallChartLoad(props: VisualisationConfig<WaterfallChartConfigProperties>): import("yaml").Pair<import("yaml").Scalar<string>, any> | null;
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare function waterfallChartSave(_fields: Visualisation["query"]["fields"] | undefined, config: Visualisation["config"] | undefined): {
|
|
55
60
|
colorMapping: ColorMapping[] | undefined;
|
|
56
61
|
dataLabels: {
|
|
57
62
|
visible: "auto" | boolean | undefined;
|
|
@@ -100,10 +105,17 @@ declare function save(_fields: Visualisation["query"]["fields"] | undefined, con
|
|
|
100
105
|
disableAlerts: boolean | undefined;
|
|
101
106
|
disableScheduledExports: boolean | undefined;
|
|
102
107
|
} | undefined;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
* @deprecated Use waterfallChartLoad and waterfallChartSave instead.
|
|
111
|
+
*/
|
|
112
|
+
export interface IWaterfallChartConfig {
|
|
113
|
+
load: typeof waterfallChartLoad;
|
|
114
|
+
save: typeof waterfallChartSave;
|
|
115
|
+
DEFAULTS: ConfigDefaults<WaterfallChartConfigProperties>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
* @deprecated Use waterfallChartLoad and waterfallChartSave instead.
|
|
120
|
+
*/
|
|
121
|
+
export declare const waterfallChart: IWaterfallChartConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
2
|
import { loadChartFill, loadColorDefinitions, saveChartFill, saveColorDefinitions, } from "../utils/configUtils.js";
|
|
3
3
|
import { getValueOrDefault, loadConfig, saveConfigObject, } from "./utils.js";
|
|
4
|
+
/** @internal */
|
|
4
5
|
const DEFAULTS = {
|
|
5
6
|
colorMapping: [],
|
|
6
7
|
dataLabels: {
|
|
@@ -49,7 +50,10 @@ const DEFAULTS = {
|
|
|
49
50
|
disableAlerts: false,
|
|
50
51
|
disableScheduledExports: false,
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const WATERFALL_CHART_DEFAULTS = DEFAULTS;
|
|
55
|
+
/** @internal */
|
|
56
|
+
export function waterfallChartLoad(props) {
|
|
53
57
|
return loadConfig(props, (key, value) => {
|
|
54
58
|
switch (key) {
|
|
55
59
|
case "colorMapping":
|
|
@@ -155,7 +159,8 @@ function load(props) {
|
|
|
155
159
|
}
|
|
156
160
|
});
|
|
157
161
|
}
|
|
158
|
-
|
|
162
|
+
/** @internal */
|
|
163
|
+
export function waterfallChartSave(_fields, config) {
|
|
159
164
|
if (!config) {
|
|
160
165
|
return undefined;
|
|
161
166
|
}
|
|
@@ -206,9 +211,12 @@ function save(_fields, config) {
|
|
|
206
211
|
disableScheduledExports: getValueOrDefault(config.disable_scheduled_exports, DEFAULTS.disableScheduledExports, "bool"),
|
|
207
212
|
});
|
|
208
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
* @deprecated Use waterfallChartLoad and waterfallChartSave instead.
|
|
217
|
+
*/
|
|
209
218
|
export const waterfallChart = {
|
|
210
|
-
load,
|
|
211
|
-
save,
|
|
219
|
+
load: waterfallChartLoad,
|
|
220
|
+
save: waterfallChartSave,
|
|
212
221
|
DEFAULTS,
|
|
213
222
|
};
|
|
214
|
-
//# sourceMappingURL=waterfallChart.js.map
|
package/esm/conts.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
/** @internal */
|
|
1
2
|
export declare const DatasetTypes: string[];
|
|
3
|
+
/** @internal */
|
|
2
4
|
export declare const DateDatasetTypes: string[];
|
|
5
|
+
/** @internal */
|
|
3
6
|
export declare const MetricTypes: string[];
|
|
7
|
+
/** @internal */
|
|
4
8
|
export declare const DashboardTypes: string[];
|
|
9
|
+
/** @internal */
|
|
5
10
|
export declare const PluginTypes: string[];
|
|
11
|
+
/** @internal */
|
|
6
12
|
export declare const AttributeHierarchyTypes: string[];
|
|
13
|
+
/** @internal */
|
|
7
14
|
export declare const VisualisationsTypes: string[];
|
|
15
|
+
/** @internal */
|
|
8
16
|
export declare const AllTypes: string[];
|
|
9
|
-
//# sourceMappingURL=conts.d.ts.map
|
package/esm/conts.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
|
+
/** @internal */
|
|
2
3
|
export const DatasetTypes = ["dataset"];
|
|
4
|
+
/** @internal */
|
|
3
5
|
export const DateDatasetTypes = ["date"];
|
|
6
|
+
/** @internal */
|
|
4
7
|
export const MetricTypes = ["metric"];
|
|
8
|
+
/** @internal */
|
|
5
9
|
export const DashboardTypes = ["dashboard"];
|
|
10
|
+
/** @internal */
|
|
6
11
|
export const PluginTypes = ["plugin"];
|
|
12
|
+
/** @internal */
|
|
7
13
|
export const AttributeHierarchyTypes = ["attribute_hierarchy"];
|
|
14
|
+
/** @internal */
|
|
8
15
|
export const VisualisationsTypes = [
|
|
9
16
|
"table",
|
|
10
17
|
"bar_chart",
|
|
@@ -29,6 +36,7 @@ export const VisualisationsTypes = [
|
|
|
29
36
|
"geo_area_chart",
|
|
30
37
|
"repeater_chart",
|
|
31
38
|
];
|
|
39
|
+
/** @internal */
|
|
32
40
|
export const AllTypes = [
|
|
33
41
|
...DatasetTypes,
|
|
34
42
|
...DateDatasetTypes,
|
|
@@ -38,4 +46,3 @@ export const AllTypes = [
|
|
|
38
46
|
...VisualisationsTypes,
|
|
39
47
|
...AttributeHierarchyTypes,
|
|
40
48
|
];
|
|
41
|
-
//# sourceMappingURL=conts.js.map
|
|
@@ -2,4 +2,3 @@ import type { Query } from "@gooddata/sdk-code-schemas/v1";
|
|
|
2
2
|
import { type ExportEntities, type ToExecutionResults } from "../types.js";
|
|
3
3
|
/** @public */
|
|
4
4
|
export declare function buildAfmExecution(entities: ExportEntities, query: Query): ToExecutionResults;
|
|
5
|
-
//# sourceMappingURL=buildAfmExecution.d.ts.map
|
|
@@ -4,6 +4,7 @@ import type { Dashboard } from "@gooddata/sdk-code-schemas/v1";
|
|
|
4
4
|
import { type IDashboardAttributeFilterConfig, type IDashboardDateFilterConfig, type IDashboardDateFilterConfigItem, type IDashboardDefinition, type IDashboardLayout, type IDashboardLayoutItem, type IDashboardLayoutWidget, type IDashboardMeasureValueFilterConfig, type IDashboardWidget, type IDrillDownIntersectionIgnoredAttributes, type IDrillDownReference, type IFilterContextDefinition, type IInsightWidget, type IRichTextWidget, type IVisualizationSwitcherWidget, type InsightDrillDefinition } from "@gooddata/sdk-model";
|
|
5
5
|
import { type DashboardTab, type FromEntities } from "../types.js";
|
|
6
6
|
import { type IErrorContext } from "../utils/errors.js";
|
|
7
|
+
/** @internal */
|
|
7
8
|
export type OverrideDashboardDefinition = Omit<IDashboardDefinition, "filterContext"> & {
|
|
8
9
|
filterContextRef?: AfmObjectIdentifier;
|
|
9
10
|
tabs?: DashboardTab[];
|
|
@@ -14,8 +15,11 @@ export declare function declarativeDashboardToYaml(entities: FromEntities, dashb
|
|
|
14
15
|
content: string;
|
|
15
16
|
json: Dashboard;
|
|
16
17
|
};
|
|
18
|
+
/** @internal */
|
|
17
19
|
export declare function declarativeTabsToYaml(tabs: DashboardTab[], filterContexts?: DeclarativeFilterContext[], entities?: FromEntities, errorContext?: IErrorContext): YAMLSeq | undefined;
|
|
20
|
+
/** @internal */
|
|
18
21
|
export declare function declarativeSectionsToYaml(layout?: IDashboardLayout, entities?: FromEntities, errorContext?: IErrorContext): YAMLSeq<unknown> | undefined;
|
|
22
|
+
/** @internal */
|
|
19
23
|
export declare function declarativeWidgetToYaml(widget?: IDashboardWidget | null, size?: IDashboardLayoutItem["size"], entities?: FromEntities, errorContext?: IErrorContext): YAMLMap<unknown, unknown> | undefined;
|
|
20
24
|
export declare function declarativeInsightWidgetToYaml(widget: IInsightWidget, size?: IDashboardLayoutItem["size"], entities?: FromEntities, errorContext?: IErrorContext): YAMLMap<unknown, unknown>;
|
|
21
25
|
export declare function declarativeIgnoreDrillDownHierarchyToYaml(hierarchy: IDrillDownReference, errorContext?: IErrorContext): {
|
|
@@ -42,19 +46,23 @@ export declare function declarativeDrillDownIntersectionIgnoredAttributesToYaml(
|
|
|
42
46
|
export declare function declarativeRichTextWidgetToYaml(widget: IRichTextWidget, size?: IDashboardLayoutItem["size"]): YAMLMap<unknown, unknown>;
|
|
43
47
|
export declare function declarativeVisualizationSwitcherWidgetToYaml(widget: IVisualizationSwitcherWidget, size?: IDashboardLayoutItem["size"], entities?: FromEntities, errorContext?: IErrorContext): YAMLMap<unknown, unknown>;
|
|
44
48
|
export declare function declarativeContainerWidgetToYaml(widget: IDashboardLayoutWidget, size?: IDashboardLayoutItem["size"], entities?: FromEntities, errorContext?: IErrorContext): YAMLMap<unknown, unknown>;
|
|
49
|
+
/** @internal */
|
|
45
50
|
export declare function declarativeDrillToYaml(drill: InsightDrillDefinition, entities?: FromEntities, sourceVisualizationId?: string, errorContext?: IErrorContext): YAMLMap<unknown, unknown>;
|
|
51
|
+
/** @internal */
|
|
46
52
|
export type FilterContextItem = {
|
|
47
53
|
yaml: YAMLMap;
|
|
48
54
|
filter: IFilterContextDefinition["filters"][number];
|
|
49
55
|
};
|
|
56
|
+
/** @internal */
|
|
50
57
|
export declare function declarativeFilterContextToYaml(dateFilterConfig?: IDashboardDateFilterConfig, filterContext?: DeclarativeFilterContext, errorContext?: IErrorContext): {
|
|
51
58
|
filters: YAMLMap<unknown, unknown>;
|
|
52
59
|
filtersMap: {
|
|
53
60
|
[key: string]: FilterContextItem;
|
|
54
61
|
};
|
|
55
62
|
};
|
|
63
|
+
/** @internal */
|
|
56
64
|
export declare function declarativeFiltersConfigToYaml(filtersMap: Record<string, FilterContextItem>, dateFilterConfig?: IDashboardDateFilterConfig, dateFilterConfigs?: IDashboardDateFilterConfigItem[], attributeFilterConfigs?: IDashboardAttributeFilterConfig[], measureValueFilterConfigs?: IDashboardMeasureValueFilterConfig[], errorContext?: IErrorContext): void;
|
|
57
65
|
export declare function declarativeFilterGroupsToYaml(filters: YAMLMap, filterGroupsConfig?: DashboardTab["filterGroupsConfig"]): YAMLMap;
|
|
66
|
+
/** @internal */
|
|
58
67
|
export declare function declarativePluginsToYaml(dashboard: IDashboardDefinition, errorContext?: IErrorContext): YAMLSeq<unknown> | undefined;
|
|
59
68
|
export declare function declarativePermissionsToYaml(doc: Document, dashboard: DeclarativeAnalyticalDashboard | DeclarativeAnalyticalDashboardExtension): YAMLMap<import("yaml").Scalar<string> | import("yaml").Scalar<number>, import("yaml").Scalar<undefined> | YAMLMap<import("yaml").Scalar<"all"> | import("yaml").Scalar<"user_groups"> | import("yaml").Scalar<"users">, import("yaml").Scalar<undefined> | import("yaml").Scalar<false> | import("yaml").Scalar<true> | YAMLSeq<import("yaml").Scalar<string>>>> | undefined;
|
|
60
|
-
//# sourceMappingURL=declarativeDashboardToYaml.d.ts.map
|
|
@@ -106,6 +106,7 @@ export function declarativeDashboardToYaml(entities, dashboard, filterContexts,
|
|
|
106
106
|
json: doc.toJSON(),
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
+
/** @internal */
|
|
109
110
|
export function declarativeTabsToYaml(tabs, filterContexts, entities, errorContext) {
|
|
110
111
|
// no tabs
|
|
111
112
|
if (!tabs || tabs.length === 0) {
|
|
@@ -146,6 +147,7 @@ export function declarativeTabsToYaml(tabs, filterContexts, entities, errorConte
|
|
|
146
147
|
});
|
|
147
148
|
return yamlTabs;
|
|
148
149
|
}
|
|
150
|
+
/** @internal */
|
|
149
151
|
export function declarativeSectionsToYaml(layout, entities, errorContext) {
|
|
150
152
|
//no sections at all
|
|
151
153
|
if (!layout?.sections?.length) {
|
|
@@ -175,6 +177,7 @@ export function declarativeSectionsToYaml(layout, entities, errorContext) {
|
|
|
175
177
|
});
|
|
176
178
|
return sections;
|
|
177
179
|
}
|
|
180
|
+
/** @internal */
|
|
178
181
|
export function declarativeWidgetToYaml(widget, size, entities, errorContext) {
|
|
179
182
|
if (!widget) {
|
|
180
183
|
return;
|
|
@@ -368,6 +371,7 @@ export function declarativeContainerWidgetToYaml(widget, size, entities, errorCo
|
|
|
368
371
|
}
|
|
369
372
|
return yamlWidget;
|
|
370
373
|
}
|
|
374
|
+
/** @internal */
|
|
371
375
|
export function declarativeDrillToYaml(drill, entities, sourceVisualizationId, errorContext) {
|
|
372
376
|
const drillYaml = new YAMLMap();
|
|
373
377
|
const originIdentifier = drill.origin.type === "drillFromMeasure" ? drill.origin.measure : drill.origin.attribute;
|
|
@@ -509,6 +513,7 @@ function getDateFilterEmptyValueHandling(filter) {
|
|
|
509
513
|
}
|
|
510
514
|
return undefined;
|
|
511
515
|
}
|
|
516
|
+
/** @internal */
|
|
512
517
|
export function declarativeFilterContextToYaml(dateFilterConfig, filterContext, errorContext) {
|
|
513
518
|
const filters = [];
|
|
514
519
|
const filtersMap = {};
|
|
@@ -757,6 +762,7 @@ function declarativeMeasureValueFilterToYaml(filter, errorContext) {
|
|
|
757
762
|
}
|
|
758
763
|
return measureValueFilter;
|
|
759
764
|
}
|
|
765
|
+
/** @internal */
|
|
760
766
|
export function declarativeFiltersConfigToYaml(filtersMap, dateFilterConfig, dateFilterConfigs, attributeFilterConfigs, measureValueFilterConfigs, errorContext) {
|
|
761
767
|
attributeFilterConfigs?.forEach((filterSettings, i) => {
|
|
762
768
|
const filter = filtersMap[filterSettings.localIdentifier];
|
|
@@ -877,6 +883,7 @@ function getFilterGroupIdBase({ title, localIdentifier }) {
|
|
|
877
883
|
.replace(/[^a-zA-Z0-9]/g, "_")
|
|
878
884
|
.toLowerCase();
|
|
879
885
|
}
|
|
886
|
+
/** @internal */
|
|
880
887
|
export function declarativePluginsToYaml(dashboard, errorContext) {
|
|
881
888
|
if (!dashboard.plugins?.length) {
|
|
882
889
|
return;
|
|
@@ -911,4 +918,3 @@ function parseParameters(params) {
|
|
|
911
918
|
return params;
|
|
912
919
|
}
|
|
913
920
|
}
|
|
914
|
-
//# sourceMappingURL=declarativeDashboardToYaml.js.map
|