@lightdash/common 0.1462.2 → 0.1464.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/compiler/exploreCompiler.d.ts +5 -2
- package/dist/compiler/exploreCompiler.js +9 -1
- package/dist/compiler/exploreCompiler.mock.js +40 -1
- package/dist/compiler/translator.d.ts +3 -2
- package/dist/compiler/translator.js +26 -6
- package/dist/compiler/translator.mock.js +27 -0
- package/dist/compiler/translator.test.js +19 -20
- package/dist/dbt/schemas/lightdashMetadata.json +1 -1
- package/dist/dbt/validation.d.ts +2 -1
- package/dist/index.d.ts +12 -7
- package/dist/index.js +8 -3
- package/dist/schemas/json/lightdash-dbt-2.0.json +63 -0
- package/dist/schemas/json/lightdash-project-config-1.0.json +17 -0
- package/dist/types/any.d.ts +7 -0
- package/dist/types/any.js +2 -0
- package/dist/types/api/errors.d.ts +2 -1
- package/dist/types/dbt.d.ts +21 -11
- package/dist/types/dbt.js +14 -3
- package/dist/types/errors.d.ts +18 -17
- package/dist/types/explore.d.ts +4 -0
- package/dist/types/field.d.ts +11 -6
- package/dist/types/field.js +3 -1
- package/dist/types/field.test.js +1 -0
- package/dist/types/filter.d.ts +4 -3
- package/dist/types/filterGrammar.d.ts +3 -2
- package/dist/types/lightdashProjectConfig.d.ts +8 -0
- package/dist/types/lightdashProjectConfig.js +6 -0
- package/dist/types/metricQuery.d.ts +8 -7
- package/dist/types/scheduler.d.ts +3 -2
- package/dist/types/user.d.ts +3 -2
- package/dist/types/warehouse.d.ts +5 -4
- package/dist/utils/filters.d.ts +6 -5
- package/dist/utils/formatting.js +2 -1
- package/dist/utils/formatting.test.js +5 -1
- package/dist/utils/item.d.ts +3 -0
- package/dist/utils/loadLightdashProjectConfig.d.ts +2 -0
- package/dist/utils/loadLightdashProjectConfig.js +26 -0
- package/dist/utils/metricsExplorer.d.ts +3 -2
- package/dist/utils/virtualView.js +1 -0
- package/dist/visualizations/CartesianChartDataModel.d.ts +4 -3
- package/dist/visualizations/PieChartDataModel.d.ts +2 -1
- package/dist/visualizations/TableDataModel.d.ts +2 -1
- package/package.json +4 -1
@@ -1,11 +1,12 @@
|
|
1
|
+
import { type AnyType } from './any';
|
1
2
|
import { FilterOperator, type MetricFilterRule } from './filter';
|
2
3
|
export type ParsedFilter = {
|
3
4
|
type: string;
|
4
|
-
values:
|
5
|
+
values: AnyType[];
|
5
6
|
is?: boolean;
|
6
7
|
date_interval?: string;
|
7
8
|
};
|
8
9
|
declare const filterGrammar: string;
|
9
10
|
export declare const parseOperator: (operator: string, isTrue: boolean) => FilterOperator;
|
10
|
-
export declare const parseFilters: (rawFilters: Record<string,
|
11
|
+
export declare const parseFilters: (rawFilters: Record<string, AnyType>[] | undefined) => MetricFilterRule[];
|
11
12
|
export default filterGrammar;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from './any';
|
1
2
|
import { type CompactOrAlias, type CompiledCustomDimension, type CompiledDimension, type CompiledMetric, type CompiledTableCalculation, type CustomDimension, type CustomFormat, type FieldId, type Format, type Metric, type MetricType, type TableCalculation } from './field';
|
2
3
|
import { type Filters, type MetricFilterRule } from './filter';
|
3
4
|
import { type DateGranularity } from './timeFrames';
|
@@ -19,8 +20,8 @@ export interface AdditionalMetric {
|
|
19
20
|
percentile?: number;
|
20
21
|
formatOptions?: CustomFormat;
|
21
22
|
}
|
22
|
-
export declare const isAdditionalMetric: (value:
|
23
|
-
export declare const hasFormatOptions: (value:
|
23
|
+
export declare const isAdditionalMetric: (value: AnyType) => value is AdditionalMetric;
|
24
|
+
export declare const hasFormatOptions: (value: AnyType) => value is {
|
24
25
|
formatOptions: CustomFormat;
|
25
26
|
};
|
26
27
|
export declare const getCustomMetricDimensionId: (metric: AdditionalMetric) => string;
|
@@ -55,10 +56,10 @@ export type SortField = {
|
|
55
56
|
export declare const getAdditionalMetricLabel: (item: AdditionalMetric) => string;
|
56
57
|
type FilterGroupResponse = {
|
57
58
|
id: string;
|
58
|
-
or:
|
59
|
+
or: AnyType[];
|
59
60
|
} | {
|
60
61
|
id: string;
|
61
|
-
and:
|
62
|
+
and: AnyType[];
|
62
63
|
};
|
63
64
|
export type FiltersResponse = {
|
64
65
|
dimensions?: FilterGroupResponse;
|
@@ -91,9 +92,9 @@ export type MetricQueryRequest = {
|
|
91
92
|
dimensions: FieldId[];
|
92
93
|
metrics: FieldId[];
|
93
94
|
filters: {
|
94
|
-
dimensions?:
|
95
|
-
metrics?:
|
96
|
-
tableCalculations?:
|
95
|
+
dimensions?: AnyType;
|
96
|
+
metrics?: AnyType;
|
97
|
+
tableCalculations?: AnyType;
|
97
98
|
};
|
98
99
|
sorts: SortField[];
|
99
100
|
limit: number;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from './any';
|
1
2
|
import { type Explore, type ExploreError } from './explore';
|
2
3
|
import { type DashboardFilterRule } from './filter';
|
3
4
|
import { type MetricQuery } from './metricQuery';
|
@@ -43,7 +44,7 @@ export type SchedulerLog = {
|
|
43
44
|
status: SchedulerJobStatus;
|
44
45
|
target?: string;
|
45
46
|
targetType?: 'email' | 'slack' | 'gsheets';
|
46
|
-
details?: Record<string,
|
47
|
+
details?: Record<string, AnyType>;
|
47
48
|
};
|
48
49
|
export type CreateSchedulerLog = Omit<SchedulerLog, 'createdAt'>;
|
49
50
|
export declare enum ThresholdOperator {
|
@@ -283,7 +284,7 @@ export type ApiJobStatusResponse = {
|
|
283
284
|
status: 'ok';
|
284
285
|
results: {
|
285
286
|
status: SchedulerJobStatus;
|
286
|
-
details: Record<string,
|
287
|
+
details: Record<string, AnyType> | null;
|
287
288
|
};
|
288
289
|
};
|
289
290
|
export type SchedulerCronUpdate = {
|
package/dist/types/user.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type AbilityBuilder } from '@casl/ability';
|
2
2
|
import { type MemberAbility } from '../authorization/types';
|
3
|
+
import { type AnyType } from './any';
|
3
4
|
import { type OpenIdIdentityIssuerType } from './openIdIdentity';
|
4
5
|
import { type OrganizationMemberRole } from './organizationMemberProfile';
|
5
6
|
export interface LightdashUser {
|
@@ -39,7 +40,7 @@ export interface UpdatedByUser {
|
|
39
40
|
firstName: string;
|
40
41
|
lastName: string;
|
41
42
|
}
|
42
|
-
export declare const isSessionUser: (user:
|
43
|
+
export declare const isSessionUser: (user: AnyType) => user is SessionUser;
|
43
44
|
export interface OpenIdUser {
|
44
45
|
openId: {
|
45
46
|
subject: string;
|
@@ -51,7 +52,7 @@ export interface OpenIdUser {
|
|
51
52
|
groups?: string[] | undefined;
|
52
53
|
};
|
53
54
|
}
|
54
|
-
export declare const isOpenIdUser: (user:
|
55
|
+
export declare const isOpenIdUser: (user: AnyType) => user is OpenIdUser;
|
55
56
|
export type UserAllowedOrganization = {
|
56
57
|
organizationUuid: string;
|
57
58
|
name: string;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type WeekDay } from '../utils/timeFrames';
|
2
|
+
import { type AnyType } from './any';
|
2
3
|
import { type SupportedDbtAdapter } from './dbt';
|
3
4
|
import { type DimensionType, type Metric } from './field';
|
4
5
|
import { type CreateWarehouseCredentials } from './projects';
|
@@ -31,7 +32,7 @@ export type WarehouseResults = {
|
|
31
32
|
fields: Record<string, {
|
32
33
|
type: DimensionType;
|
33
34
|
}>;
|
34
|
-
rows: Record<string,
|
35
|
+
rows: Record<string, AnyType>[];
|
35
36
|
};
|
36
37
|
export interface WarehouseClient {
|
37
38
|
credentials: CreateWarehouseCredentials;
|
@@ -41,7 +42,7 @@ export interface WarehouseClient {
|
|
41
42
|
table: string;
|
42
43
|
}[]) => Promise<WarehouseCatalog>;
|
43
44
|
streamQuery(query: string, streamCallback: (data: WarehouseResults) => void, options: {
|
44
|
-
values?:
|
45
|
+
values?: AnyType[];
|
45
46
|
tags: Record<string, string>;
|
46
47
|
timezone?: string;
|
47
48
|
}): Promise<void>;
|
@@ -53,7 +54,7 @@ export interface WarehouseClient {
|
|
53
54
|
* @param values
|
54
55
|
* @deprecated Use streamQuery() instead to avoid loading all results into memory
|
55
56
|
*/
|
56
|
-
runQuery(sql: string, tags: Record<string, string>, timezone?: string, values?:
|
57
|
+
runQuery(sql: string, tags: Record<string, string>, timezone?: string, values?: AnyType[]): Promise<WarehouseResults>;
|
57
58
|
test(): Promise<void>;
|
58
59
|
getStartOfWeek(): WeekDay | null | undefined;
|
59
60
|
getAdapterType(): SupportedDbtAdapter;
|
@@ -63,7 +64,7 @@ export interface WarehouseClient {
|
|
63
64
|
concatString(...args: string[]): string;
|
64
65
|
getAllTables(schema?: string, tags?: Record<string, string>): Promise<WarehouseTables>;
|
65
66
|
getFields(tableName: string, schema?: string, database?: string, tags?: Record<string, string>): Promise<WarehouseCatalog>;
|
66
|
-
parseWarehouseCatalog(rows: Record<string,
|
67
|
+
parseWarehouseCatalog(rows: Record<string, AnyType>[], mapFieldType: (type: string) => DimensionType): WarehouseCatalog;
|
67
68
|
parseError(error: Error): Error;
|
68
69
|
}
|
69
70
|
export type ApiWarehouseCatalog = {
|
package/dist/utils/filters.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from '../types/any';
|
1
2
|
import { type DashboardTile } from '../types/dashboard';
|
2
3
|
import { type Table } from '../types/explore';
|
3
4
|
import { type CompiledField, type CustomSqlDimension, type Dimension, type Field, type FilterableDimension, type FilterableField, type FilterableItem, type ItemsMap, type TableCalculation } from '../types/field';
|
@@ -12,13 +13,13 @@ export declare const getItemsFromFilterGroup: (filterGroup: FilterGroup | undefi
|
|
12
13
|
export declare const getFilterGroupItemsPropertyName: (filterGroup: FilterGroup | undefined) => 'and' | 'or';
|
13
14
|
export declare const getFilterTypeFromItem: (item: FilterableField) => FilterType;
|
14
15
|
export declare const timeframeToUnitOfTime: (timeframe: TimeFrames) => UnitOfTime | undefined;
|
15
|
-
export declare const getFilterRuleWithDefaultValue: <T extends FilterRule<FilterOperator, import("../types/filter").FieldTarget, any, any>>(field: FilterableField, filterRule: T, values?:
|
16
|
-
export declare const createFilterRuleFromField: (field: FilterableField, value?:
|
16
|
+
export declare const getFilterRuleWithDefaultValue: <T extends FilterRule<FilterOperator, import("../types/filter").FieldTarget, any, any>>(field: FilterableField, filterRule: T, values?: AnyType[] | null) => T;
|
17
|
+
export declare const createFilterRuleFromField: (field: FilterableField, value?: AnyType) => FilterRule;
|
17
18
|
export declare const matchFieldExact: (a: Field) => (b: Field) => boolean;
|
18
19
|
export declare const matchFieldByTypeAndName: (a: Field) => (b: Field) => boolean;
|
19
20
|
export declare const matchFieldByType: (a: Field) => (b: Field) => boolean;
|
20
21
|
export declare const isTileFilterable: (tile: DashboardTile) => boolean;
|
21
|
-
export declare const applyDefaultTileTargets: (filterRule: DashboardFilterRule<FilterOperator, DashboardFieldTarget,
|
22
|
+
export declare const applyDefaultTileTargets: (filterRule: DashboardFilterRule<FilterOperator, DashboardFieldTarget, AnyType, AnyType>, field: FilterableDimension, availableTileFilters: Record<string, FilterableDimension[] | undefined>) => DashboardFilterRule<FilterOperator, DashboardFieldTarget, any, any>;
|
22
23
|
export declare const createDashboardFilterRuleFromField: ({ field, availableTileFilters, isTemporary, value, }: {
|
23
24
|
field: Exclude<FilterableItem, TableCalculation | CustomSqlDimension> | CompiledField;
|
24
25
|
availableTileFilters: Record<string, FilterableDimension[] | undefined>;
|
@@ -28,7 +29,7 @@ export declare const createDashboardFilterRuleFromField: ({ field, availableTile
|
|
28
29
|
type AddFilterRuleArgs = {
|
29
30
|
filters: Filters;
|
30
31
|
field: FilterableField;
|
31
|
-
value?:
|
32
|
+
value?: AnyType;
|
32
33
|
};
|
33
34
|
export declare const addFilterRule: ({ filters, field, value, }: AddFilterRuleArgs) => Filters;
|
34
35
|
/**
|
@@ -37,7 +38,7 @@ export declare const addFilterRule: ({ filters, field, value, }: AddFilterRuleAr
|
|
37
38
|
* @param value - The value to check
|
38
39
|
* @returns True if the value is an invalid date, false otherwise
|
39
40
|
*/
|
40
|
-
export declare const isDimensionValueInvalidDate: (item: FilterableField, value:
|
41
|
+
export declare const isDimensionValueInvalidDate: (item: FilterableField, value: AnyType) => boolean;
|
41
42
|
/**
|
42
43
|
* Takes a filter group and build a filters object from it based on the field type
|
43
44
|
* @param filterGroup - The filter group to extract filters from
|
package/dist/utils/formatting.js
CHANGED
@@ -16,6 +16,7 @@ exports.currencies = [
|
|
16
16
|
'EUR',
|
17
17
|
'GBP',
|
18
18
|
'JPY',
|
19
|
+
'DKK',
|
19
20
|
'CHF',
|
20
21
|
'CAD',
|
21
22
|
'AUD',
|
@@ -25,7 +26,6 @@ exports.currencies = [
|
|
25
26
|
'CLP',
|
26
27
|
'COP',
|
27
28
|
'CZK',
|
28
|
-
'DKK',
|
29
29
|
'HKD',
|
30
30
|
'HUF',
|
31
31
|
'INR',
|
@@ -188,6 +188,7 @@ function getCustomFormatFromLegacy({ format, compact, round, }) {
|
|
188
188
|
case field_1.Format.GBP:
|
189
189
|
case field_1.Format.USD:
|
190
190
|
case field_1.Format.JPY:
|
191
|
+
case field_1.Format.DKK:
|
191
192
|
return {
|
192
193
|
type: field_1.CustomFormatType.CURRENCY,
|
193
194
|
currency: format.toUpperCase(),
|
@@ -67,6 +67,10 @@ describe('Formatting', () => {
|
|
67
67
|
type: field_1.CustomFormatType.CURRENCY,
|
68
68
|
currency: field_1.Format.JPY,
|
69
69
|
})).toEqual('¥5');
|
70
|
+
expect((0, formatting_1.applyCustomFormat)(5, {
|
71
|
+
type: field_1.CustomFormatType.CURRENCY,
|
72
|
+
currency: field_1.Format.DKK,
|
73
|
+
})).toEqual('DKK 5.00');
|
70
74
|
});
|
71
75
|
test('if Format is percent it should return the right format', () => {
|
72
76
|
const percentFormat = {
|
@@ -653,6 +657,7 @@ describe('Formatting', () => {
|
|
653
657
|
'€1.00',
|
654
658
|
'£1.00',
|
655
659
|
'¥1',
|
660
|
+
'DKK 1.00',
|
656
661
|
'CHF 1.00',
|
657
662
|
'CA$1.00',
|
658
663
|
'A$1.00',
|
@@ -662,7 +667,6 @@ describe('Formatting', () => {
|
|
662
667
|
'CLP 1',
|
663
668
|
'COP 1.00',
|
664
669
|
'CZK 1.00',
|
665
|
-
'DKK 1.00',
|
666
670
|
'HK$1.00',
|
667
671
|
'HUF 1.00',
|
668
672
|
'₹1.00',
|
package/dist/utils/item.d.ts
CHANGED
@@ -51,5 +51,8 @@ export declare const replaceDimensionInExplore: (explore: Explore, dimension: Co
|
|
51
51
|
ymlPath?: string | undefined;
|
52
52
|
sqlPath?: string | undefined;
|
53
53
|
type?: import("../types/explore").ExploreType | undefined;
|
54
|
+
spotlight?: {
|
55
|
+
visibility: "show" | "hide";
|
56
|
+
} | undefined;
|
54
57
|
};
|
55
58
|
export declare const canApplyFormattingToCustomMetric: (item: Dimension, customMetricType: MetricType) => boolean;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.loadLightdashProjectConfig = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const ajv_1 = tslib_1.__importDefault(require("ajv"));
|
6
|
+
const better_ajv_errors_1 = tslib_1.__importDefault(require("better-ajv-errors"));
|
7
|
+
const yaml = tslib_1.__importStar(require("js-yaml"));
|
8
|
+
const lightdash_project_config_1_0_json_1 = tslib_1.__importDefault(require("../schemas/json/lightdash-project-config-1.0.json"));
|
9
|
+
const errors_1 = require("../types/errors");
|
10
|
+
const lightdashProjectConfig_1 = require("../types/lightdashProjectConfig");
|
11
|
+
const loadLightdashProjectConfig = async (yamlFileContents) => {
|
12
|
+
if (yamlFileContents.trim() === '') {
|
13
|
+
return {
|
14
|
+
spotlight: lightdashProjectConfig_1.DEFAULT_SPOTLIGHT_CONFIG,
|
15
|
+
};
|
16
|
+
}
|
17
|
+
const configFile = yaml.load(yamlFileContents);
|
18
|
+
const ajv = new ajv_1.default({ coerceTypes: true });
|
19
|
+
const validate = ajv.compile(lightdash_project_config_1_0_json_1.default);
|
20
|
+
if (!validate(configFile)) {
|
21
|
+
const errors = (0, better_ajv_errors_1.default)(lightdash_project_config_1_0_json_1.default, configFile, validate.errors || [], { indent: 2 });
|
22
|
+
throw new errors_1.ParseError(`Invalid lightdash.config.yml with errors:\n${errors}`);
|
23
|
+
}
|
24
|
+
return configFile;
|
25
|
+
};
|
26
|
+
exports.loadLightdashProjectConfig = loadLightdashProjectConfig;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from '../types/any';
|
1
2
|
import type { MetricWithAssociatedTimeDimension } from '../types/catalog';
|
2
3
|
import { ConditionalOperator } from '../types/conditionalRule';
|
3
4
|
import { type CompiledTable } from '../types/explore';
|
@@ -21,11 +22,11 @@ export declare const getMetricsExplorerSegmentFilters: (segmentDimension: string
|
|
21
22
|
export declare const getMetricExplorerDateRangeFilters: (timeDimensionConfig: TimeDimensionConfig, dateRange: MetricExplorerDateRange) => DateFilter[];
|
22
23
|
export declare const parseMetricValue: (value: unknown) => number | null;
|
23
24
|
export declare const MAX_SEGMENT_DIMENSION_UNIQUE_VALUES = 10;
|
24
|
-
export declare const getMetricExplorerDataPoints: (dimension: Dimension, metric: MetricWithAssociatedTimeDimension, metricRows: Record<string,
|
25
|
+
export declare const getMetricExplorerDataPoints: (dimension: Dimension, metric: MetricWithAssociatedTimeDimension, metricRows: Record<string, AnyType>[], segmentDimensionId: string | null) => {
|
25
26
|
dataPoints: Array<MetricExploreDataPoint>;
|
26
27
|
isSegmentDimensionFiltered: boolean;
|
27
28
|
};
|
28
|
-
export declare const getMetricExplorerDataPointsWithCompare: (dimension: Dimension, compareDimension: Dimension, metric: MetricWithAssociatedTimeDimension, metricRows: Record<string,
|
29
|
+
export declare const getMetricExplorerDataPointsWithCompare: (dimension: Dimension, compareDimension: Dimension, metric: MetricWithAssociatedTimeDimension, metricRows: Record<string, AnyType>[], compareMetricRows: Record<string, AnyType>[], query: MetricExplorerQuery, timeFrame: TimeFrames) => {
|
29
30
|
dataPoints: Array<MetricExploreDataPoint>;
|
30
31
|
};
|
31
32
|
/**
|
@@ -42,6 +42,7 @@ const createVirtualView = (virtualViewName, sql, columns, warehouseClient, label
|
|
42
42
|
joinedTables: [],
|
43
43
|
tables: { [virtualViewName]: compiledTable },
|
44
44
|
targetDatabase: warehouseClient.getAdapterType(),
|
45
|
+
meta: {},
|
45
46
|
});
|
46
47
|
const virtualView = {
|
47
48
|
...explore,
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { type AnyType } from '../types/any';
|
1
2
|
import { Format } from '../types/field';
|
2
3
|
import { type Organization } from '../types/organization';
|
3
4
|
import { type RawResultRow } from '../types/results';
|
4
5
|
import { ChartKind, type CartesianSeriesType } from '../types/savedCharts';
|
5
6
|
import { type SemanticLayerQuery } from '../types/semanticLayer';
|
6
|
-
import { type AxisSide,
|
7
|
+
import { VizIndexType, type AxisSide, type PivotChartData, type PivotChartLayout, type VizCartesianChartConfig, type VizCartesianChartOptions } from './types';
|
7
8
|
import { type IResultsRunner } from './types/IResultsRunner';
|
8
9
|
type CartesianChartKind = Extract<ChartKind, ChartKind.LINE | ChartKind.VERTICAL_BAR>;
|
9
10
|
export declare class CartesianChartDataModel {
|
@@ -17,7 +18,7 @@ export declare class CartesianChartDataModel {
|
|
17
18
|
type?: CartesianChartKind;
|
18
19
|
});
|
19
20
|
static getTooltipFormatter(format: Format | undefined): ((value: number) => string) | undefined;
|
20
|
-
static getValueFormatter(format: Format | undefined): ((params:
|
21
|
+
static getValueFormatter(format: Format | undefined): ((params: AnyType) => string) | undefined;
|
21
22
|
mergeConfig(chartKind: CartesianChartKind, existingConfig: VizCartesianChartConfig | undefined): VizCartesianChartConfig;
|
22
23
|
getChartOptions(): VizCartesianChartOptions;
|
23
24
|
getDefaultLayout(): PivotChartLayout | undefined;
|
@@ -43,7 +44,7 @@ export declare class CartesianChartDataModel {
|
|
43
44
|
rows: RawResultRow[];
|
44
45
|
} | undefined;
|
45
46
|
getDataDownloadUrl(): string | undefined;
|
46
|
-
getSpec(display?: CartesianChartDisplay, colors?: Organization['chartColors']): Record<string,
|
47
|
+
getSpec(display?: CartesianChartDisplay, colors?: Organization['chartColors']): Record<string, AnyType>;
|
47
48
|
}
|
48
49
|
export declare enum ValueLabelPositionOptions {
|
49
50
|
HIDDEN = "hidden",
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from '../types/any';
|
1
2
|
import { type RawResultRow } from '../types/results';
|
2
3
|
import { type ChartKind } from '../types/savedCharts';
|
3
4
|
import { type SemanticLayerQuery } from '../types/semanticLayer';
|
@@ -36,5 +37,5 @@ export declare class PieChartDataModel {
|
|
36
37
|
rows: RawResultRow[];
|
37
38
|
} | undefined;
|
38
39
|
getDataDownloadUrl(): string | undefined;
|
39
|
-
getSpec(display?: VizPieChartDisplay): Record<string,
|
40
|
+
getSpec(display?: VizPieChartDisplay): Record<string, AnyType>;
|
40
41
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type AnyType } from '../types/any';
|
1
2
|
import { type RawResultRow } from '../types/results';
|
2
3
|
import { type ChartKind } from '../types/savedCharts';
|
3
4
|
import { type SemanticLayerQuery } from '../types/semanticLayer';
|
@@ -29,7 +30,7 @@ export declare class TableDataModel {
|
|
29
30
|
rows: RawResultRow[];
|
30
31
|
} | undefined;
|
31
32
|
getSpec(_display?: VizTableDisplay): {
|
32
|
-
spec: Record<string,
|
33
|
+
spec: Record<string, AnyType>;
|
33
34
|
tableData: {
|
34
35
|
columns: string[];
|
35
36
|
rows: RawResultRow[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lightdash/common",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.1464.0",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"files": [
|
@@ -8,6 +8,7 @@
|
|
8
8
|
],
|
9
9
|
"license": "MIT",
|
10
10
|
"devDependencies": {
|
11
|
+
"@types/js-yaml": "^4.0.9",
|
11
12
|
"@types/pegjs": "^0.10.3",
|
12
13
|
"@types/sanitize-html": "^2.11.0",
|
13
14
|
"@types/uuid": "^10.0.0",
|
@@ -18,9 +19,11 @@
|
|
18
19
|
"@types/lodash": "^4.14.202",
|
19
20
|
"ajv": "^8.3.0",
|
20
21
|
"ajv-formats": "^2.1.0",
|
22
|
+
"better-ajv-errors": "^1.2.0",
|
21
23
|
"cronstrue": "^2.23.0",
|
22
24
|
"dayjs": "^1.11.9",
|
23
25
|
"dependency-graph": "^0.11.0",
|
26
|
+
"js-yaml": "^4.1.0",
|
24
27
|
"liquidjs": "^10.0.0",
|
25
28
|
"lodash": "^4.17.21",
|
26
29
|
"moment": "^2.29.4",
|