@lightdash/common 3.264.0 → 3.265.1
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/composer/composerResultChart.d.ts.map +1 -1
- package/dist/cjs/composer/composerResultChart.js +26 -2
- package/dist/cjs/composer/composerResultChart.js.map +1 -1
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/cjs/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/cjs/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/cjs/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/cjs/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/cjs/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/cjs/types/contentAsCode/composerCharts.js +3 -0
- package/dist/cjs/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/cjs/types/contentAsCode/core.d.ts +1 -0
- package/dist/cjs/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/core.js +1 -0
- package/dist/cjs/types/contentAsCode/core.js.map +1 -1
- package/dist/cjs/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/cjs/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/index.d.ts +1 -0
- package/dist/cjs/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/cjs/types/contentAsCode/index.js +1 -0
- package/dist/cjs/types/contentAsCode/index.js.map +1 -1
- package/dist/cjs/types/dashboard.d.ts +1 -0
- package/dist/cjs/types/dashboard.d.ts.map +1 -1
- package/dist/cjs/types/dashboard.js.map +1 -1
- package/dist/cjs/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/cjs/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/cjs/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/cjs/utils/i18n/dashboardAsCode.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/composer/composerResultChart.d.ts.map +1 -1
- package/dist/esm/composer/composerResultChart.js +26 -2
- package/dist/esm/composer/composerResultChart.js.map +1 -1
- package/dist/esm/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +13 -13
- package/dist/esm/ee/AiAgent/utils.d.ts +12 -12
- package/dist/esm/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/esm/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/esm/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/esm/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/esm/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/esm/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/esm/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/esm/types/contentAsCode/composerCharts.js +2 -0
- package/dist/esm/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/esm/types/contentAsCode/core.d.ts +1 -0
- package/dist/esm/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/core.js +1 -0
- package/dist/esm/types/contentAsCode/core.js.map +1 -1
- package/dist/esm/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/esm/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/index.d.ts +1 -0
- package/dist/esm/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/esm/types/contentAsCode/index.js +1 -0
- package/dist/esm/types/contentAsCode/index.js.map +1 -1
- package/dist/esm/types/dashboard.d.ts +1 -0
- package/dist/esm/types/dashboard.d.ts.map +1 -1
- package/dist/esm/types/dashboard.js.map +1 -1
- package/dist/esm/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/esm/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/esm/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/esm/utils/i18n/dashboardAsCode.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/composer/composerResultChart.d.ts.map +1 -1
- package/dist/types/composer/composerResultChart.js +26 -2
- package/dist/types/composer/composerResultChart.js.map +1 -1
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +13 -13
- package/dist/types/ee/AiAgent/utils.d.ts +12 -12
- package/dist/types/schemas/chartAsCodeSchema.d.ts +1497 -63
- package/dist/types/schemas/chartAsCodeSchema.d.ts.map +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.js +27 -6
- package/dist/types/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/types/schemas/json/chart-as-code-1.0.json +803 -45
- package/dist/types/schemas/json/dashboard-as-code-1.0.json +84 -1
- package/dist/types/types/contentAsCode/composerCharts.d.ts +41 -0
- package/dist/types/types/contentAsCode/composerCharts.d.ts.map +1 -0
- package/dist/types/types/contentAsCode/composerCharts.js +2 -0
- package/dist/types/types/contentAsCode/composerCharts.js.map +1 -0
- package/dist/types/types/contentAsCode/core.d.ts +1 -0
- package/dist/types/types/contentAsCode/core.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/core.js +1 -0
- package/dist/types/types/contentAsCode/core.js.map +1 -1
- package/dist/types/types/contentAsCode/dashboards.d.ts +9 -2
- package/dist/types/types/contentAsCode/dashboards.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/index.d.ts +1 -0
- package/dist/types/types/contentAsCode/index.d.ts.map +1 -1
- package/dist/types/types/contentAsCode/index.js +1 -0
- package/dist/types/types/contentAsCode/index.js.map +1 -1
- package/dist/types/types/dashboard.d.ts +1 -0
- package/dist/types/types/dashboard.d.ts.map +1 -1
- package/dist/types/types/dashboard.js.map +1 -1
- package/dist/types/utils/i18n/dashboardAsCode.d.ts +20 -0
- package/dist/types/utils/i18n/dashboardAsCode.d.ts.map +1 -1
- package/dist/types/utils/i18n/dashboardAsCode.js +6 -0
- package/dist/types/utils/i18n/dashboardAsCode.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composerResultChart.d.ts","sourceRoot":"","sources":["../../../src/composer/composerResultChart.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"composerResultChart.d.ts","sourceRoot":"","sources":["../../../src/composer/composerResultChart.ts"],"names":[],"mappings":"AAEA,OAAO,EAMH,KAAK,QAAQ,EACb,KAAK,MAAM,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAGH,KAAK,WAAW,EACnB,MAAM,sBAAsB,CAAC;AAK9B,sFAAsF;AACtF,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D,eAAO,MAAM,wBAAwB,cAAe,MAAM,KAAG,MACC,CAAC;AAmC/D,eAAO,MAAM,sBAAsB,WAAY,YAAY,KAAG,MAI5D,CAAC;AAIH,mFAAmF;AACnF,qBAAa,qBAAqB;IAGlB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE;IAF5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA4B;IAExD,YAAqB,OAAO,EAAE,YAAY,EAAE,EAe3C;IAED,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAMnC;IAED,SAAS,CAAC,SAA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'../pivot/derivePivotConfigFromChart';
|
|
2
|
+
import { normalizeIndexColumns } from '../pivot/utils';
|
|
2
3
|
import { DimensionType, FieldType, friendlyName, MetricType, } from '../types/field';
|
|
3
4
|
import { QuerySourceType, } from '../types/querySources';
|
|
5
|
+
import { ChartType, isCartesianChartConfig, } from '../types/savedCharts';
|
|
4
6
|
import { TimeFrames } from '../types/timeFrames';
|
|
5
7
|
import { getItemId, RESULT_COLUMN_TABLE } from '../utils/item';
|
|
8
|
+
import { VizIndexType } from '../visualizations/types';
|
|
6
9
|
/** Synthetic explore of a composer node result; its fields are the result columns. */
|
|
7
10
|
export const COMPOSER_RESULT_EXPLORE_NAME = 'composer_result';
|
|
8
11
|
export const getComposerResultFieldId = (reference) => getItemId({ table: RESULT_COLUMN_TABLE, name: reference });
|
|
@@ -146,9 +149,22 @@ export const getComposerSplitStage = ({ chartConfig, pivotColumns, dimensions, m
|
|
|
146
149
|
? DimensionType.NUMBER
|
|
147
150
|
: DimensionType.STRING,
|
|
148
151
|
}))), dimensions.filter((reference) => !queryMetrics.includes(reference)), queryMetrics);
|
|
149
|
-
const
|
|
152
|
+
const pivotFieldIds = pivotColumns.map(fieldId);
|
|
153
|
+
const pivotConfiguration = derivePivotConfigurationFromChart({ chartConfig, pivotConfig: { columns: pivotFieldIds } }, { ...metricQuery, sorts: sorts.sorts }, fields);
|
|
150
154
|
if (!pivotConfiguration)
|
|
151
155
|
return null;
|
|
156
|
+
// The classic derivation leaves an x that is also a y out of the index;
|
|
157
|
+
// the split keeps it, or distinct x values collapse into one point.
|
|
158
|
+
const xField = chartConfig.type === ChartType.CARTESIAN &&
|
|
159
|
+
isCartesianChartConfig(chartConfig.config)
|
|
160
|
+
? chartConfig.config.layout.xField
|
|
161
|
+
: null;
|
|
162
|
+
const indexColumn = normalizeIndexColumns(pivotConfiguration.indexColumn);
|
|
163
|
+
const droppedX = xField &&
|
|
164
|
+
!pivotFieldIds.includes(xField) &&
|
|
165
|
+
!indexColumn.some(({ reference }) => reference === xField)
|
|
166
|
+
? xField
|
|
167
|
+
: null;
|
|
152
168
|
return {
|
|
153
169
|
sourceType: QuerySourceType.DUCKDB,
|
|
154
170
|
nodeId,
|
|
@@ -156,7 +172,15 @@ export const getComposerSplitStage = ({ chartConfig, pivotColumns, dimensions, m
|
|
|
156
172
|
.map((reference) => `${quoteIdentifier(reference)} AS ${quoteIdentifier(fieldId(reference))}`)
|
|
157
173
|
.join(', ')} FROM ${quoteIdentifier(PIVOT_STAGE_SOURCE_NAME)}`,
|
|
158
174
|
references: { [PIVOT_STAGE_SOURCE_NAME]: source },
|
|
159
|
-
pivotConfiguration
|
|
175
|
+
pivotConfiguration: droppedX === null
|
|
176
|
+
? pivotConfiguration
|
|
177
|
+
: {
|
|
178
|
+
...pivotConfiguration,
|
|
179
|
+
indexColumn: [
|
|
180
|
+
...indexColumn,
|
|
181
|
+
{ reference: droppedX, type: VizIndexType.CATEGORY },
|
|
182
|
+
],
|
|
183
|
+
},
|
|
160
184
|
};
|
|
161
185
|
};
|
|
162
186
|
//# sourceMappingURL=composerResultChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composerResultChart.js","sourceRoot":"","sources":["../../../src/composer/composerResultChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EACH,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,GAIb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,eAAe,GAIlB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"composerResultChart.js","sourceRoot":"","sources":["../../../src/composer/composerResultChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACH,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,GAIb,MAAM,gBAA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AAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,MAAM,CAAC;QACtD,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,IAAI,CAAC;IACf,OAAO;QACH,UAAU,EAAE,eAAe,CAAC,MAAM;QAClC,MAAM;QACN,GAAG,EAAE,UAAU,UAAU;aACpB,GAAG,CACA,CAAC,SAAS,EAAE,EAAE,CACV,GAAG,eAAe,CAAC,SAAS,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAChF;aACA,IAAI,CAAC,IAAI,CAAC,SAAS,eAAe,CAAC,uBAAuB,CAAC,EAAE;QAClE,UAAU,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE;QACjD,kBAAkB,EACd,QAAQ,KAAK,IAAI;YACb,CAAC,CAAC,kBAAkB;YACpB,CAAC,CAAC;gBACI,GAAG,kBAAkB;gBACrB,WAAW,EAAE;oBACT,GAAG,WAAW;oBACd,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC,QAAQ,EAAE;iBACvD;aACJ;KACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -25,18 +25,6 @@ export declare const getWebAiChartConfig: ({ vizConfig, metricQuery, maxQueryLim
|
|
|
25
25
|
parameters: Record<string, string | number | string[] | number[]> | null;
|
|
26
26
|
customMetrics: import("../..").TransformedCustomMetric[] | null;
|
|
27
27
|
tableCalculations: ({
|
|
28
|
-
name: string;
|
|
29
|
-
displayName: string;
|
|
30
|
-
type: "formula";
|
|
31
|
-
formula: string;
|
|
32
|
-
format: "number" | "percent" | null;
|
|
33
|
-
resultType: "boolean" | "date" | "number" | "string" | "timestamp" | null;
|
|
34
|
-
} | {
|
|
35
|
-
name: string;
|
|
36
|
-
displayName: string;
|
|
37
|
-
type: "rank_in_column";
|
|
38
|
-
fieldId: string;
|
|
39
|
-
} | {
|
|
40
28
|
name: string;
|
|
41
29
|
displayName: string;
|
|
42
30
|
type: "percent_change_from_previous";
|
|
@@ -46,6 +34,18 @@ export declare const getWebAiChartConfig: ({ vizConfig, metricQuery, maxQueryLim
|
|
|
46
34
|
order: "asc" | "desc" | null;
|
|
47
35
|
}[];
|
|
48
36
|
partitionBy: string[] | null;
|
|
37
|
+
} | {
|
|
38
|
+
name: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
type: "running_total";
|
|
41
|
+
fieldId: string;
|
|
42
|
+
} | {
|
|
43
|
+
name: string;
|
|
44
|
+
displayName: string;
|
|
45
|
+
type: "formula";
|
|
46
|
+
formula: string;
|
|
47
|
+
format: "number" | "percent" | null;
|
|
48
|
+
resultType: "boolean" | "date" | "number" | "string" | "timestamp" | null;
|
|
49
49
|
} | {
|
|
50
50
|
name: string;
|
|
51
51
|
displayName: string;
|
|
@@ -65,7 +65,7 @@ export declare const getWebAiChartConfig: ({ vizConfig, metricQuery, maxQueryLim
|
|
|
65
65
|
} | {
|
|
66
66
|
name: string;
|
|
67
67
|
displayName: string;
|
|
68
|
-
type: "
|
|
68
|
+
type: "rank_in_column";
|
|
69
69
|
fieldId: string;
|
|
70
70
|
} | {
|
|
71
71
|
name: string;
|
|
@@ -20,22 +20,17 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
|
20
20
|
parameters: Record<string, string | number | string[] | number[]> | null;
|
|
21
21
|
customMetrics: import("./schemas").TransformedCustomMetric[] | null;
|
|
22
22
|
tableCalculations: ({
|
|
23
|
-
name: string;
|
|
24
|
-
displayName: string;
|
|
25
|
-
type: "percent_of_previous_value";
|
|
26
|
-
fieldId: string;
|
|
27
|
-
orderBy: {
|
|
28
|
-
fieldId: string;
|
|
29
|
-
order: "asc" | "desc" | null;
|
|
30
|
-
}[];
|
|
31
|
-
partitionBy: string[] | null;
|
|
32
|
-
} | {
|
|
33
23
|
name: string;
|
|
34
24
|
displayName: string;
|
|
35
25
|
type: "formula";
|
|
36
26
|
formula: string;
|
|
37
27
|
format: "number" | "percent" | null;
|
|
38
28
|
resultType: "boolean" | "date" | "number" | "string" | "timestamp" | null;
|
|
29
|
+
} | {
|
|
30
|
+
name: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
type: "rank_in_column";
|
|
33
|
+
fieldId: string;
|
|
39
34
|
} | {
|
|
40
35
|
name: string;
|
|
41
36
|
displayName: string;
|
|
@@ -49,14 +44,19 @@ export declare const parseVizConfig: (vizConfigUnknown: object | null, maxLimit?
|
|
|
49
44
|
} | {
|
|
50
45
|
name: string;
|
|
51
46
|
displayName: string;
|
|
52
|
-
type: "
|
|
47
|
+
type: "percent_of_previous_value";
|
|
53
48
|
fieldId: string;
|
|
49
|
+
orderBy: {
|
|
50
|
+
fieldId: string;
|
|
51
|
+
order: "asc" | "desc" | null;
|
|
52
|
+
}[];
|
|
54
53
|
partitionBy: string[] | null;
|
|
55
54
|
} | {
|
|
56
55
|
name: string;
|
|
57
56
|
displayName: string;
|
|
58
|
-
type: "
|
|
57
|
+
type: "percent_of_column_total";
|
|
59
58
|
fieldId: string;
|
|
59
|
+
partitionBy: string[] | null;
|
|
60
60
|
} | {
|
|
61
61
|
name: string;
|
|
62
62
|
displayName: string;
|