@vizzly/services 0.15.0-dev-3d764e5c2346be462bbcf7327369903e64b96b40 → 0.15.1-dev-7c85efb9d70a7b5e5367d265c0b48faf46ecac6e
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/index.js +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/AdditionalFilter/toQueries.d.ts +3 -7
- package/dist/results-driver/src/driver/VizzlyQuery/AreaChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/BarChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/BasicTable/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/FunnelChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/LineChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/LineChartV2/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/PieChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/PivotTable/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/RadarChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/RichText/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/SunburstChart/toQueries.d.ts +2 -2
- package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +3 -9
- package/dist/results-driver/src/driver/VizzlyQuery/buildVizzlyQuery.d.ts +5 -5
- package/dist/results-driver/src/driver/VizzlyQuery/commonToQueries.d.ts +1 -1
- package/dist/results-driver/src/types.d.ts +0 -2
- package/dist/services/src/VizzlyLoader.d.ts +1 -3
- package/dist/services/src/index.d.ts +0 -5
- package/dist/shared-logic/src/AdditionalFilter/AdditionalFilter.d.ts +7 -9
- package/dist/shared-logic/src/AdditionalFilter/FilterConfig.d.ts +3 -14
- package/dist/shared-logic/src/AdditionalFilter/toQueryAttributesFilter.d.ts +2 -2
- package/dist/shared-logic/src/AdditionalFilter/types.d.ts +2 -6
- package/dist/shared-logic/src/Component/sharedSchemas.d.ts +0 -2
- package/dist/shared-logic/src/Component/types.d.ts +7 -44
- package/dist/shared-logic/src/ComponentInterface/constants.d.ts +1 -1
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +15 -17
- package/dist/shared-logic/src/CustomField/AggregateMath/index.d.ts +1 -2
- package/dist/shared-logic/src/CustomField/Conditional/index.d.ts +2 -2
- package/dist/shared-logic/src/CustomField/CustomField.d.ts +1 -2
- package/dist/shared-logic/src/CustomField/CustomMetric/build.d.ts +1 -1
- package/dist/shared-logic/src/CustomField/DateCalculation/index.d.ts +1 -2
- package/dist/shared-logic/src/CustomField/Percentage/index.d.ts +5 -6
- package/dist/shared-logic/src/CustomField/RoundedNumber/index.d.ts +1 -2
- package/dist/shared-logic/src/CustomField/Rules/index.d.ts +2 -2
- package/dist/shared-logic/src/CustomField/SimpleMath/index.d.ts +1 -1
- package/dist/shared-logic/src/CustomField/types.d.ts +1 -6
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
- package/dist/shared-logic/src/Filter/Filter.d.ts +4 -43
- package/dist/shared-logic/src/Filter/Where.d.ts +6 -0
- package/dist/shared-logic/src/Filter/combineFilters.d.ts +1 -0
- package/dist/shared-logic/src/Filter/types.d.ts +4 -2
- package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +1 -3
- package/dist/shared-logic/src/JSQueryEngine/types.d.ts +8 -2
- package/dist/shared-logic/src/Query/Query.d.ts +3 -3
- package/dist/shared-logic/src/Query/buildFromQueryAttributes.d.ts +3 -3
- package/dist/shared-logic/src/Query/types.d.ts +109 -6
- package/dist/shared-logic/src/api/queryEngine/getRunQueriesCallback.d.ts +1 -2
- package/dist/shared-logic/src/getComponentInterface.d.ts +1 -1
- package/dist/shared-logic/src/utils/feedback.d.ts +2 -2
- package/package.json +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChartV2/toQueries.d.ts +0 -4
- package/dist/shared-logic/src/AliasFields/types.d.ts +0 -5
- package/dist/shared-logic/src/CustomField/AliasField/index.d.ts +0 -7
- package/dist/shared-logic/src/CustomField/constants.d.ts +0 -15
- package/dist/shared-logic/src/HorizontalBarChartV2/attributesSchema.d.ts +0 -3
- package/dist/shared-logic/src/HorizontalBarChartV2/constants.d.ts +0 -3
- package/dist/shared-logic/src/HorizontalBarChartV2/index.d.ts +0 -4
- package/dist/shared-logic/src/HorizontalBarChartV2/setAttributes.d.ts +0 -4
|
@@ -8,11 +8,10 @@ import { TableFieldsV2 } from '../DataTable/types';
|
|
|
8
8
|
import { Dictionary } from 'lodash';
|
|
9
9
|
import { MovingAverage, TrendType } from '../Trends/types';
|
|
10
10
|
import { DataSet } from '../DataSet/types';
|
|
11
|
-
import { RulesField } from '../CustomField/types';
|
|
12
11
|
export declare type getNumberFormatter = (formatterId: string | undefined | null) => (number: number) => string;
|
|
13
12
|
export declare type FormatType = string | null;
|
|
14
13
|
export declare type ApproxAxisLabelCount = 'auto' | number;
|
|
15
|
-
export declare type ComponentType = 'areaChart' | 'areaChartV2' | 'barChart' | 'barChartV2' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | '
|
|
14
|
+
export declare type ComponentType = 'areaChart' | 'areaChartV2' | 'barChart' | 'barChartV2' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'mercatorMap' | 'pieChart' | 'progress' | 'radarChart' | 'richText' | 'scatterChart' | 'singleStat' | 'sunburstChart' | 'waterfallChart';
|
|
16
15
|
export declare const componentTypes: string[];
|
|
17
16
|
export declare namespace Component {
|
|
18
17
|
export type LineCurve = 'natural' | 'straight' | 'step' | 'stepBefore' | 'stepAfter' | 'dotted';
|
|
@@ -88,7 +87,6 @@ export declare namespace Component {
|
|
|
88
87
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
89
88
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
90
89
|
legend: boolean;
|
|
91
|
-
labels?: boolean;
|
|
92
90
|
protectedFields?: ProtectedFields;
|
|
93
91
|
parameters?: Parameters;
|
|
94
92
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
@@ -164,7 +162,6 @@ export declare namespace Component {
|
|
|
164
162
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
165
163
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
166
164
|
legend: boolean;
|
|
167
|
-
labels?: boolean;
|
|
168
165
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
169
166
|
conditionalFormattingRules?: {
|
|
170
167
|
bar?: Array<ConditionalFormatting.Rule>;
|
|
@@ -208,7 +205,6 @@ export declare namespace Component {
|
|
|
208
205
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
209
206
|
drilldown: QueryAttributes.Dimension[];
|
|
210
207
|
legend: boolean;
|
|
211
|
-
labels?: boolean;
|
|
212
208
|
parameters?: Parameters;
|
|
213
209
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
214
210
|
axisTitles?: AxisTitles;
|
|
@@ -229,7 +225,6 @@ export declare namespace Component {
|
|
|
229
225
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
230
226
|
drilldown: QueryAttributes.Dimension[];
|
|
231
227
|
legend: boolean;
|
|
232
|
-
labels?: boolean;
|
|
233
228
|
parameters?: Parameters;
|
|
234
229
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
235
230
|
axisTitles?: AxisTitles;
|
|
@@ -239,7 +234,7 @@ export declare namespace Component {
|
|
|
239
234
|
};
|
|
240
235
|
export type BarChartV2Attributes = BaseAttributes & BaseQueryAttributes & {
|
|
241
236
|
type: 'barChartV2';
|
|
242
|
-
stacked?: boolean
|
|
237
|
+
stacked?: boolean;
|
|
243
238
|
xAxisPrefix: string;
|
|
244
239
|
yAxisPrefix: string;
|
|
245
240
|
xAxisPostfix: string;
|
|
@@ -249,12 +244,13 @@ export declare namespace Component {
|
|
|
249
244
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
250
245
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
251
246
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
247
|
+
drilldown: QueryAttributes.Dimension[];
|
|
252
248
|
legend: boolean;
|
|
253
|
-
labels?: boolean;
|
|
254
249
|
parameters?: Parameters;
|
|
255
250
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
256
251
|
axisTitles?: AxisTitles;
|
|
257
252
|
headline?: Headline;
|
|
253
|
+
drilldownOptions: Array<DrilldownOptions> | undefined;
|
|
258
254
|
};
|
|
259
255
|
export type PieChartAttributes = BaseAttributes & BaseQueryAttributes & {
|
|
260
256
|
type: 'pieChart';
|
|
@@ -295,25 +291,6 @@ export declare namespace Component {
|
|
|
295
291
|
axisTitles?: AxisTitles;
|
|
296
292
|
headline?: Headline;
|
|
297
293
|
};
|
|
298
|
-
export type HorizontalBarChartV2Attributes = BaseAttributes & BaseQueryAttributes & {
|
|
299
|
-
type: 'horizontalBarChartV2';
|
|
300
|
-
stacked?: boolean | '100%';
|
|
301
|
-
xAxisPrefix: string;
|
|
302
|
-
yAxisPrefix: string;
|
|
303
|
-
xAxisPostfix: string;
|
|
304
|
-
yAxisPostfix: string;
|
|
305
|
-
xAxisFormat: FormatType;
|
|
306
|
-
yAxisFormat: FormatType;
|
|
307
|
-
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
308
|
-
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
309
|
-
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
310
|
-
legend: boolean;
|
|
311
|
-
labels?: boolean;
|
|
312
|
-
parameters?: Parameters;
|
|
313
|
-
goalLines?: Array<Component.GoalLine.Rule>;
|
|
314
|
-
axisTitles?: AxisTitles;
|
|
315
|
-
headline?: Headline;
|
|
316
|
-
};
|
|
317
294
|
export namespace ConditionalFormatting {
|
|
318
295
|
type Rule = {
|
|
319
296
|
filters: QueryAttributes['filter'];
|
|
@@ -335,17 +312,6 @@ export declare namespace Component {
|
|
|
335
312
|
label?: boolean;
|
|
336
313
|
};
|
|
337
314
|
}
|
|
338
|
-
export namespace Quadrant {
|
|
339
|
-
type Rule = {
|
|
340
|
-
enabled: boolean;
|
|
341
|
-
labels: {
|
|
342
|
-
quadrantOne?: string;
|
|
343
|
-
quadrantTwo?: string;
|
|
344
|
-
quadrantThree?: string;
|
|
345
|
-
quadrantFour?: string;
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
315
|
export type ExportNames = {
|
|
350
316
|
[resultFieldId: string]: string | undefined;
|
|
351
317
|
};
|
|
@@ -438,7 +404,6 @@ export declare namespace Component {
|
|
|
438
404
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
439
405
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
440
406
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
441
|
-
quadrants?: Component.Quadrant.Rule;
|
|
442
407
|
axisTitles?: AxisTitles;
|
|
443
408
|
};
|
|
444
409
|
export type BubbleChartAttributes = BaseAttributes & Omit<BaseQueryAttributes, 'measure'> & {
|
|
@@ -480,7 +445,6 @@ export declare namespace Component {
|
|
|
480
445
|
axisTitles?: AxisTitles;
|
|
481
446
|
headline?: Headline;
|
|
482
447
|
trends?: Array<Trends>;
|
|
483
|
-
quadrants?: Component.Quadrant.Rule;
|
|
484
448
|
};
|
|
485
449
|
export type RadarChartAttributes = BaseAttributes & BaseQueryAttributes & {
|
|
486
450
|
type: 'radarChart';
|
|
@@ -505,16 +469,14 @@ export declare namespace Component {
|
|
|
505
469
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
506
470
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
507
471
|
legend: boolean;
|
|
508
|
-
labels?: boolean;
|
|
509
472
|
parameters?: Parameters;
|
|
510
473
|
axisTitles?: AxisTitles;
|
|
511
474
|
headline?: Headline;
|
|
512
475
|
increaseColor: string;
|
|
513
476
|
decreaseColor: string;
|
|
514
|
-
comparison: RulesField | null;
|
|
515
477
|
};
|
|
516
|
-
export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'areaChartV2' | 'barChartV2' | 'mercatorMap' | 'pieChart' | 'sunburstChart' | 'progress' | 'richText' | 'scatterChart' | 'singleStat' | 'waterfallChart' | 'radarChart'
|
|
517
|
-
export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | BubbleChartAttributes | BubbleChartV2Attributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | LineChartV2Attributes | BarChartV2Attributes | AreaChartV2Attributes | MercatorMapAttributes | PieChartAttributes | SunburstChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | SingleStatAttributes | WaterfallChartAttributes | RadarChartAttributes | ComboChartV2Attributes
|
|
478
|
+
export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'areaChartV2' | 'barChartV2' | 'mercatorMap' | 'pieChart' | 'sunburstChart' | 'progress' | 'richText' | 'scatterChart' | 'singleStat' | 'waterfallChart' | 'radarChart';
|
|
479
|
+
export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | BubbleChartAttributes | BubbleChartV2Attributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | LineChartV2Attributes | BarChartV2Attributes | AreaChartV2Attributes | MercatorMapAttributes | PieChartAttributes | SunburstChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | SingleStatAttributes | WaterfallChartAttributes | RadarChartAttributes | ComboChartV2Attributes;
|
|
518
480
|
export interface RenderTableCell {
|
|
519
481
|
viewId: string;
|
|
520
482
|
type: 'basicTable' | 'dataTable';
|
|
@@ -624,6 +586,7 @@ export declare type MaybeOldComponent<Attrs = Component.Attributes> = Omit<Compo
|
|
|
624
586
|
export declare type Component<Attrs = Component.Attributes> = {
|
|
625
587
|
attributes: Attrs;
|
|
626
588
|
localFilters: Array<AdditionalFilter>;
|
|
589
|
+
results: (Result | null)[];
|
|
627
590
|
colSpan: number;
|
|
628
591
|
/** @deprecated Moved to dashboard level. */
|
|
629
592
|
reports: Array<Report>;
|
|
@@ -44,7 +44,7 @@ export declare function axisLabelsConstants(constants: ViewConstants): {
|
|
|
44
44
|
namespace?: string | undefined;
|
|
45
45
|
};
|
|
46
46
|
export declare function chartStylesConstant(constants: ViewConstants, line: boolean, bar: boolean): {
|
|
47
|
-
subSection: (Section<"
|
|
47
|
+
subSection: (Section<"curve"> | Section<"legend">)[];
|
|
48
48
|
type?: "chartStyles" | undefined;
|
|
49
49
|
title: string;
|
|
50
50
|
description?: string | undefined;
|
|
@@ -25,30 +25,29 @@ export declare type Pagination = {
|
|
|
25
25
|
options: number[];
|
|
26
26
|
};
|
|
27
27
|
export interface DataPanelNamespaces {
|
|
28
|
-
combo_chart_dimension?: Section<'comboChartDimension'>;
|
|
29
|
-
comparison?: Section<'comparison'>;
|
|
30
|
-
custom_metrics?: Section<'customMetrics'>;
|
|
31
28
|
data_set: Section<'dataSet'>;
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
views: Section<'views'>;
|
|
30
|
+
fields?: Section<'fields'>;
|
|
31
|
+
field_y_axis?: Section<'fieldCollector'>;
|
|
32
|
+
field_z_axis?: Section<'fieldCollector'>;
|
|
33
|
+
field_rows?: Section<'fieldCollector'>;
|
|
34
34
|
field_columns?: Section<'fieldCollector'>;
|
|
35
|
-
field_country?: Section<'fieldCollector'>;
|
|
36
|
-
field_grouping?: Section<'fieldCollector'>;
|
|
37
35
|
field_metrics?: Section<'fieldCollector'>;
|
|
38
|
-
|
|
36
|
+
field_grouping?: Section<'fieldCollector'>;
|
|
37
|
+
progress_goals?: Section<'progressGoals'>;
|
|
38
|
+
drilldown?: Section<'drilldown'>;
|
|
39
39
|
field_x_axis?: Section<'fieldCollector'>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fields?: Section<'fields'>;
|
|
40
|
+
field_country?: Section<'fieldCollector'>;
|
|
41
|
+
sort?: Section<'sort'>;
|
|
43
42
|
filter?: Section<'filter'>;
|
|
43
|
+
custom_metrics?: Section<'customMetrics'>;
|
|
44
|
+
limit?: Section<'limit'>;
|
|
45
|
+
pagination?: Section<'pagination'>;
|
|
46
|
+
combo_chart_dimension?: Section<'comboChartDimension'>;
|
|
47
|
+
comparison?: Section<'comparison'>;
|
|
44
48
|
labelled_metrics?: Section<'labelledMetrics'> & {
|
|
45
49
|
subSectionDefinition: SubSectionDef;
|
|
46
50
|
};
|
|
47
|
-
limit?: Section<'limit'>;
|
|
48
|
-
pagination?: Section<'pagination'>;
|
|
49
|
-
progress_goals?: Section<'progressGoals'>;
|
|
50
|
-
sort?: Section<'sort'>;
|
|
51
|
-
views: Section<'views'>;
|
|
52
51
|
}
|
|
53
52
|
export declare type Namespace = keyof FormatPanelNamespaces | keyof DataPanelNamespaces;
|
|
54
53
|
export interface FormatPanelNamespaces {
|
|
@@ -118,7 +117,6 @@ export interface FormatPanelNamespaces {
|
|
|
118
117
|
line: SubSection<'stacked'>;
|
|
119
118
|
};
|
|
120
119
|
};
|
|
121
|
-
quadrants?: Section<'quadrants'>;
|
|
122
120
|
}
|
|
123
121
|
export declare type ComponentNamespace = 'area_chart' | 'bar_chart' | 'basic_table' | 'bubble_chart' | 'combo_chart' | 'custom' | 'fields' | 'funnel_chart' | 'headline' | 'horizontal_bar_chart' | 'line_chart' | 'mercator_map' | 'pie_chart' | 'sunburst_chart' | 'pivot_table' | 'progress' | 'rich_text' | 'scatter_chart' | 'single_stat' | 'waterfall_chart' | 'radar_chart';
|
|
124
122
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AggregateMathField, AggregateNested } from '../../CustomField/types';
|
|
2
2
|
import { Query } from '../../Query/types';
|
|
3
3
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
4
|
-
import { VariableList } from '../../Variables/types';
|
|
5
4
|
import { MathOperator } from '../types';
|
|
6
5
|
export declare const init: (publicName: string, leftFieldId: string, leftFunction: string, operator: MathOperator, rightFieldId: string, rightFunction: string, queryEngineConfig: QueryEngineConfig, leftNested: AggregateNested | undefined, rightNested: AggregateNested | undefined) => AggregateMathField;
|
|
7
|
-
export declare const build: (customField: AggregateMathField
|
|
6
|
+
export declare const build: (customField: AggregateMathField) => Query['measure'][number];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Params } from '../../../../results-driver/src/types';
|
|
2
1
|
import { DataSet } from '../../DataSet/types';
|
|
3
|
-
import * as Filter from '../../Filter';
|
|
4
2
|
import { Query } from '../../Query/types';
|
|
5
3
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
6
4
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
7
5
|
import { ConditionalField } from '../types';
|
|
6
|
+
import * as Filter from '../../Filter';
|
|
7
|
+
import { Params } from '../../../../results-driver/src/types';
|
|
8
8
|
export declare const init: (publicName: string, fieldId: string, func: string, rule: QueryAttributes.Filter[][], queryEngineConfig: QueryEngineConfig) => ConditionalField;
|
|
9
9
|
export declare const build: (field: ConditionalField, queryEngineConfig: QueryEngineConfig, dataSet: DataSet, params: Params) => Query['measure'][number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSet as DataSetType } from '../DataSet/types';
|
|
2
|
-
import { AggregateMathField,
|
|
2
|
+
import { AggregateMathField, ConditionalField, CustomField, DateCalculationField, MetricField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
|
|
3
3
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
4
4
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
5
|
import { Query } from '../Query/types';
|
|
@@ -12,7 +12,6 @@ export declare const isPercentageField: (field: DataSetType.Field) => field is P
|
|
|
12
12
|
export declare const isRules: (field: DataSetType.Field) => field is RulesField;
|
|
13
13
|
export declare const isConditional: (field: DataSetType.Field) => field is ConditionalField;
|
|
14
14
|
export declare const isCustomBuildMetric: (field: DataSetType.Field) => field is MetricField;
|
|
15
|
-
export declare const isAliasField: (field: DataSetType.Field) => field is AliasFieldType;
|
|
16
15
|
export declare const isDateCalculation: (field: DataSetType.Field) => field is DateCalculationField;
|
|
17
16
|
export declare const getCustomFieldCategory: (field: CustomField) => CustomFieldCategory;
|
|
18
17
|
export declare const isCustomField: (field: DataSetType.Field) => field is CustomField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Params } from '../../../../results-driver/src/types';
|
|
2
1
|
import { DataSet } from '../../DataSet/types';
|
|
3
2
|
import { Query } from '../../Query/types';
|
|
4
3
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
4
|
+
import { Params } from '../../../../results-driver/src/types';
|
|
5
5
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
6
6
|
import { MetricField } from '../types';
|
|
7
7
|
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: MetricField, dataSet: DataSet, queryEngineConfig: QueryEngineConfig, params: Params) => Query['measure'][number];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Query } from '../../Query/types';
|
|
2
2
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
3
3
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
4
|
-
import { VariableList } from '../../Variables/types';
|
|
5
4
|
import { DateCalculationField } from '../types';
|
|
6
5
|
export declare const init: (publicName: string, leftFieldId: string, dateCalculationFunction: DateCalculationField['dateCalculationFunction'], rightFieldId: string, queryEngineConfig: QueryEngineConfig) => DateCalculationField;
|
|
7
|
-
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: DateCalculationField
|
|
6
|
+
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: DateCalculationField) => Query['measure'][number];
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { Params } from '../../../../results-driver/src/types';
|
|
2
1
|
import { DataSet } from '../../DataSet/types';
|
|
2
|
+
import { PercentageField } from '../types';
|
|
3
3
|
import { Query } from '../../Query/types';
|
|
4
4
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
5
5
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
6
|
-
import {
|
|
7
|
-
import { PercentageField } from '../types';
|
|
6
|
+
import { Params } from '../../../../results-driver/src/types';
|
|
8
7
|
/**
|
|
9
8
|
* Creates a new custom percentage field.
|
|
10
9
|
*/
|
|
11
10
|
export declare const init: (publicName: string, denominatorFieldId: string, denominatorAggregate: string, numeratorFieldId: string | null, numeratorAggregate: string | null, numeratorFilter: QueryAttributes['filter'], denominatorFilter: QueryAttributes['filter'], queryEngineConfig: QueryEngineConfig, denominatorScope?: PercentageField['denominatorScope']) => PercentageField;
|
|
12
11
|
export declare const build: (customField: PercentageField, queryEngineConfig: QueryEngineConfig, dataSet: DataSet, _queryHasDimension: boolean, params: Params) => Query['measure'][number];
|
|
13
|
-
export declare function buildPercentageFilters(
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export declare function buildPercentageFilters(filters: QueryAttributes.Filter[][] | undefined, customField: PercentageField): {
|
|
13
|
+
combinedNominatorFilters: QueryAttributes.Filter[][];
|
|
14
|
+
combinedDenominatorFilters: QueryAttributes.Filter[][];
|
|
16
15
|
};
|
|
@@ -2,6 +2,5 @@ import { RoundedNumberField } from '../../CustomField/types';
|
|
|
2
2
|
import { Query } from '../../Query/types';
|
|
3
3
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
4
4
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
5
|
-
import { VariableList } from '../../Variables/types';
|
|
6
5
|
export declare const init: (publicName: string, fieldId: string, roundToDecimalPlaces: 0 | 2, queryEngineConfig: QueryEngineConfig) => RoundedNumberField;
|
|
7
|
-
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: RoundedNumberField
|
|
6
|
+
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: RoundedNumberField) => Query['measure'][number];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Params } from '../../../../results-driver/src/types';
|
|
2
|
-
import { RulesField } from '../../CustomField/types';
|
|
3
1
|
import { DataSet } from '../../DataSet/types';
|
|
2
|
+
import { RulesField } from '../../CustomField/types';
|
|
4
3
|
import { Query, QueryNameSpace } from '../../Query/types';
|
|
5
4
|
import { QueryAttributes } from '../../QueryAttributes/types';
|
|
6
5
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
7
6
|
import { Rules } from './types';
|
|
7
|
+
import { Params } from '../../../../results-driver/src/types';
|
|
8
8
|
export declare const init: (publicName: string, rules: Rules[], queryEngineConfig: QueryEngineConfig) => RulesField;
|
|
9
9
|
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: RulesField, queryEngineConfig: QueryEngineConfig, dataSet: DataSet, params: Params) => Query['measure'][number];
|
|
10
10
|
export declare const convertToCases: (rules: Rules[], queryEngineConfig: QueryEngineConfig, dataSet: DataSet, params: Params) => QueryNameSpace.Cases[];
|
|
@@ -8,4 +8,4 @@ import { Params } from '../../../../results-driver/src/types';
|
|
|
8
8
|
import { VariableList } from '../../Variables/types';
|
|
9
9
|
export declare const init: (publicName: string, leftFieldId: string, operator: MathOperator, rightFieldId: string, queryEngineConfig: QueryEngineConfig) => SimpleMathField;
|
|
10
10
|
export declare const build: (measureAttribute: QueryAttributes.Measure, customField: SimpleMathField, dataSet: DataSet, params: Params) => Query['measure'][number];
|
|
11
|
-
export declare const buildSide: (value: string, dataSet: DataSet, variables: VariableList) => QueryNameSpace.FieldDefinition
|
|
11
|
+
export declare const buildSide: (value: string, dataSet: DataSet, variables: VariableList) => QueryNameSpace.FieldDefinition<string, string, string>;
|
|
@@ -58,11 +58,6 @@ export declare type RoundedNumberField = BaseCustomField & RoundedNumber;
|
|
|
58
58
|
export declare type DateCalculationField = BaseCustomField & DateCalculation;
|
|
59
59
|
export declare type AggregateMathField = BaseCustomField & AggregateMath;
|
|
60
60
|
export declare type ConditionalField = BaseCustomField & Conditional;
|
|
61
|
-
export declare type AliasFieldType = BaseCustomField & {
|
|
62
|
-
allowedFields: Array<{
|
|
63
|
-
id: string;
|
|
64
|
-
}>;
|
|
65
|
-
};
|
|
66
61
|
export declare type MetricField = BaseCustomField & {
|
|
67
62
|
metric: Metric;
|
|
68
63
|
};
|
|
@@ -77,7 +72,7 @@ export declare type CustomBuildMetricField = BaseField & {
|
|
|
77
72
|
metricAttributes: Metric;
|
|
78
73
|
dataType: 'number';
|
|
79
74
|
};
|
|
80
|
-
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | CustomBuildMetricField
|
|
75
|
+
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | CustomBuildMetricField;
|
|
81
76
|
export declare type MathOperator = '*' | '-' | '/' | '+';
|
|
82
77
|
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional' | 'customBuildMetric';
|
|
83
78
|
export declare enum AcceptedTypes {
|
|
@@ -40,6 +40,6 @@ export interface ProgressGoalSection<T> extends Omit<Section<T>, 'type'> {
|
|
|
40
40
|
}
|
|
41
41
|
export declare type ProgressGoalsSection = Section<'progressGoals'> & ProgressGoalSection<'progressGoals'>;
|
|
42
42
|
export declare type PaginationSection = Section<'pagination'> & Pagination;
|
|
43
|
-
export declare type DataPanelSection =
|
|
43
|
+
export declare type DataPanelSection = Section<'dataSet'> | MetricsSection | FieldCollectorSection | LabelledMetricSection | Section<'customMetrics'> | DimensionSection | Section<'drilldown'> | Section<'comparison'> | Section<'comboChartDimension'> | Section<'timeDimension'> | Section<'xAxis'> | Section<'views'> | Section<'sort'> | Section<'filter'> | Section<'limit'> | PaginationSection | Section<'fields'> | Section<'country'> | ProgressGoalsSection;
|
|
44
44
|
export declare type DataPanelConfig = Array<DataPanelSection>;
|
|
45
45
|
export {};
|
|
@@ -1,49 +1,10 @@
|
|
|
1
|
-
import { Params } from '../../../results-driver/src/types';
|
|
2
|
-
import { DataSet } from '../DataSet/types';
|
|
3
1
|
import { Query } from '../Query/types';
|
|
4
2
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
5
3
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
/**
|
|
11
|
-
* Iterates through a query filter and, for each custom metric field, builds a custom metric.
|
|
12
|
-
*/
|
|
13
|
-
export declare function buildQueryCustomMetrics(filter: Query['filter'], dataSet: DataSet, queryEngineConfig: QueryEngineConfig, params: Params): Query['filter'];
|
|
14
|
-
export declare function getFieldFromFilter(filter: Query['filter']): {
|
|
15
|
-
type: "number";
|
|
16
|
-
value: number;
|
|
17
|
-
as?: string | undefined;
|
|
18
|
-
} | {
|
|
19
|
-
type: "string";
|
|
20
|
-
value: string;
|
|
21
|
-
as?: string | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
type: "boolean";
|
|
24
|
-
value: boolean | null;
|
|
25
|
-
as?: string | undefined;
|
|
26
|
-
} | {
|
|
27
|
-
type: "field";
|
|
28
|
-
value: string;
|
|
29
|
-
function: string;
|
|
30
|
-
as?: string | undefined;
|
|
31
|
-
} | {
|
|
32
|
-
type: "switchField";
|
|
33
|
-
value: {
|
|
34
|
-
cases: import("@vizzly/sqlbuilder-public/dist/Query/types").QueryNameSpace.Cases<string>[];
|
|
35
|
-
};
|
|
36
|
-
as?: string | undefined;
|
|
37
|
-
} | {
|
|
38
|
-
type: "subquery";
|
|
39
|
-
value: import("@vizzly/sqlbuilder-public").SubQuery<string, string, "/" | "*" | "-" | "+", import("@vizzly/sqlbuilder-public").RecursiveFilter>;
|
|
40
|
-
as?: string | undefined;
|
|
41
|
-
} | {
|
|
42
|
-
type: "function";
|
|
43
|
-
function: string;
|
|
44
|
-
value: import("@vizzly/sqlbuilder-public/dist/Query/types").QueryNameSpace.FieldDefinition<string, string, "/" | "*" | "-" | "+", import("@vizzly/sqlbuilder-public").RecursiveFilter>;
|
|
45
|
-
as?: string | undefined;
|
|
46
|
-
} | null;
|
|
4
|
+
import { DataSet } from '../DataSet/types';
|
|
5
|
+
import { Params } from '../../../results-driver/src/types';
|
|
6
|
+
export declare const addAndFilters: (filter: QueryAttributes['filter'], filterToAddToAll: QueryAttributes.Filter[]) => QueryAttributes['filter'];
|
|
7
|
+
export declare const filterAttributeToQueryFilter: (filters: QueryAttributes.Filter[][], queryEngineConfig: QueryEngineConfig, dataSet: DataSet, params: Params) => Query['filter'];
|
|
47
8
|
export declare const takeUsedFields: (filter: QueryAttributes['filter']) => string[];
|
|
48
9
|
export declare const isAvailable: (filter?: QueryAttributes['filter']) => boolean | undefined;
|
|
49
10
|
export declare const isAdditionalFilter: (value: any) => boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DataSet } from '../DataSet/types';
|
|
2
|
+
import { WhereClause } from './types';
|
|
3
|
+
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
4
|
+
import { Params } from '../../../results-driver/src/types';
|
|
5
|
+
export declare const filterConfigToWhere: (dataSet: DataSet, queryEngineConfig: QueryEngineConfig, params: Params) => WhereClause | undefined;
|
|
6
|
+
export declare const isWhereClause: (thing: any) => thing is WhereClause;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
2
2
|
export declare const combineFilters: (array1: QueryAttributes.Filter[][], array2: QueryAttributes.Filter[][]) => QueryAttributes.Filter[][];
|
|
3
|
+
export declare function combineForCustomMetricFilters(filters: QueryAttributes.Filter[][] | undefined, customFilters: QueryAttributes.Filter[][] | undefined): QueryAttributes.Filter[][];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Query } from '@vizzly/sqlbuilder-public';
|
|
2
1
|
export declare enum Clause {
|
|
3
2
|
AND_WHERE = "andWhere",
|
|
4
3
|
OR_WHERE = "orWhere",
|
|
5
4
|
WHERE = "where"
|
|
6
5
|
}
|
|
7
|
-
export declare type WhereClause =
|
|
6
|
+
export declare type WhereClause = {
|
|
7
|
+
type: Clause;
|
|
8
|
+
value: any;
|
|
9
|
+
};
|
|
@@ -29,8 +29,6 @@ export declare type MapColorsSection = Section<'mapColors'>;
|
|
|
29
29
|
export declare type WaterfallColorsSection = Section<'waterfallColors'>;
|
|
30
30
|
export declare type HeadlineSection = Section<'headline'>;
|
|
31
31
|
export declare type RichTextFormatSection = Section<'richText'>;
|
|
32
|
-
export interface QuadrantsSection extends Section<'quadrants'> {
|
|
33
|
-
}
|
|
34
32
|
export interface ConditionalFormattingSection extends Section<'conditionalFormatting'> {
|
|
35
33
|
ruleType: FormattingRuleType;
|
|
36
34
|
subSection?: {
|
|
@@ -44,5 +42,5 @@ export interface ProgressTypeSection<T> extends Omit<Section<T>, 'type'> {
|
|
|
44
42
|
progressType?: Omit<Section<T>, 'type'>;
|
|
45
43
|
}
|
|
46
44
|
export declare type ProgressTypesSection = Section<'progressType'> & ProgressTypeSection<'progressType'>;
|
|
47
|
-
export declare type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | WaterfallColorsSection |
|
|
45
|
+
export declare type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | WaterfallColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection | HeadlineSection | RichTextFormatSection | Section<'trends'>;
|
|
48
46
|
export declare type FormatPanelConfig = Array<FormatPanelSection>;
|
|
@@ -2,5 +2,11 @@ import { Query, SubQuery } from '../Query/types';
|
|
|
2
2
|
export declare type DataMap = {
|
|
3
3
|
[key: string]: string | boolean | number | Date | null | string[];
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
export declare type
|
|
5
|
+
declare type JSQueryEngineOperator = '>' | '<' | '=' | '!=' | '>=' | '<=' | 'is_one_of' | 'is_not_one_of' | 'starts_with' | 'ends_with' | 'contains_substring' | 'does_not_contain_substring';
|
|
6
|
+
export declare type JSQueryEngineTimeFunction = 'month' | 'year' | 'quarter' | 'week' | 'day' | 'hour' | 'minute' | 'second';
|
|
7
|
+
export declare type JSQueryEngineAggregateFunction = 'countDistinct' | 'count' | 'mean' | 'sum' | 'min' | 'max' | 'none';
|
|
8
|
+
export declare type JSQueryEngineFunction = JSQueryEngineTimeFunction | JSQueryEngineAggregateFunction;
|
|
9
|
+
export declare type JSQueryEngineMathsOp = '*' | '-' | '/' | '+';
|
|
10
|
+
export declare type JSQueryEngineSubQuery = SubQuery<JSQueryEngineFunction, JSQueryEngineOperator, JSQueryEngineMathsOp>;
|
|
11
|
+
export declare type JSQueryEngineQuery = Query<JSQueryEngineFunction, JSQueryEngineOperator, JSQueryEngineMathsOp>;
|
|
12
|
+
export {};
|
|
@@ -3,8 +3,8 @@ import { QueryAttributes } from '../QueryAttributes/types';
|
|
|
3
3
|
import { QueryEngineConfig, SupportedFeature as SupportedFeatureType } from '../QueryEngineConfig/types';
|
|
4
4
|
import { DataSet } from '../DataSet/types';
|
|
5
5
|
import { Result } from '../Result/types';
|
|
6
|
-
export declare const build: (dataSet: DataSet<DataSet.Field>, measureAttr: QueryAttributes.Measure[],
|
|
7
|
-
query: Query
|
|
6
|
+
export declare const build: (dataSet: DataSet<DataSet.Field>, measureAttr: QueryAttributes.Measure[], orderAttr: QueryAttributes.Order[], dimensionAttr: QueryAttributes.Dimension[], timeDimensionAttr: QueryAttributes.TimeDimension | null, limitAttr: number | undefined, offsetAttr: number | undefined, queryEngineConfig: import("@vizzly/semantic-layer-public/dist/types").QueryEngineConfig, params: import("../../../results-driver/src/types").Params, prebuiltFilters?: QueryAttributes.Filter[][] | undefined) => {
|
|
7
|
+
query: Query<string, string, string>;
|
|
8
8
|
measureDescription: import("./types").MeasureDescription[];
|
|
9
9
|
};
|
|
10
10
|
export declare const hasDimensions: (query: {
|
|
@@ -18,5 +18,5 @@ export declare const buildUniqueArrayValuesPreparedQuery: (dataSetId: string, da
|
|
|
18
18
|
query: PreparedQuery;
|
|
19
19
|
resultFields: Result.Field[];
|
|
20
20
|
};
|
|
21
|
-
export declare const buildFilterQuery: (dataSet: DataSet, fieldId: string, optionsFilters?: QueryAttributes.Filter[]
|
|
21
|
+
export declare const buildFilterQuery: (dataSet: DataSet, fieldId: string, optionsFilters?: QueryAttributes.Filter[], optionsOrders?: QueryAttributes.Order[]) => QueryAttributes;
|
|
22
22
|
export declare const supportsFeature: (queryEngineConfig: QueryEngineConfig, feature: SupportedFeatureType) => boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Params } from '../../../results-driver/src/types';
|
|
2
|
-
import { DataSet } from '../DataSet/types';
|
|
3
1
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
4
2
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
3
|
import { MeasureDescription, Query } from './types';
|
|
6
|
-
|
|
4
|
+
import { DataSet } from '../DataSet/types';
|
|
5
|
+
import { Params } from '../../../results-driver/src/types';
|
|
6
|
+
export declare const buildFromQueryAttributes: (dataSet: DataSet, measureAttr: QueryAttributes.Measure[], orderAttr: QueryAttributes.Order[], dimensionAttr: QueryAttributes.Dimension[], timeDimensionAttr: QueryAttributes.TimeDimension | null, limitAttr: QueryAttributes.Limit | undefined, offsetAttr: QueryAttributes.Offset | undefined, queryEngineConfig: QueryEngineConfig, params: Params, prebuiltFilters?: QueryAttributes.Filter[][]) => {
|
|
7
7
|
query: Query;
|
|
8
8
|
measureDescription: Array<MeasureDescription>;
|
|
9
9
|
};
|