@vizzly/services 0.7.3 → 0.7.4-dev-396503edb3f72dee2437663fb8b8398a998ed90b

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.
@@ -32,6 +32,7 @@ type BaseAdditionalFilter<T extends AdditionalFilterType> = {
32
32
  requiresValue: boolean;
33
33
  title?: string;
34
34
  optionsFilters?: OptionalFilters;
35
+ hidden?: boolean;
35
36
  };
36
37
  type FixedRangeValue = {
37
38
  type: 'fixedRange';
@@ -43,6 +43,7 @@ export declare const protectedFieldsDimension: (queryEngineConfig: QueryEngineCo
43
43
  export declare const parametersSchema: (queryEngineConfig: QueryEngineConfig, attributeSchemaOptions: ComponentInterfaceConfig['attributesSchemaOptions']) => Joi.ObjectSchema<any>;
44
44
  export declare const goalLineSchema: () => Joi.ObjectSchema<any>;
45
45
  export declare const goalLinesSchema: () => Joi.ArraySchema<any[]>;
46
+ export declare const headlineSchema: () => Joi.ObjectSchema<any>;
46
47
  export declare const axisTitleSchema: () => Joi.ObjectSchema<any>;
47
48
  export declare const sizingSchema: Joi.ObjectSchema<any>;
48
49
  export declare const conditionalFormattingRulesSchema: (queryEngineConfig: QueryEngineConfig) => Joi.ArraySchema<any[]>;
@@ -60,6 +60,7 @@ export declare namespace Component {
60
60
  parameters?: Parameters;
61
61
  goalLines?: Array<Component.GoalLine.Rule>;
62
62
  axisTitles?: AxisTitles;
63
+ headline?: Headline;
63
64
  };
64
65
  export type CustomComponentAttributes = BaseAttributes & {
65
66
  type: 'custom';
@@ -69,6 +70,10 @@ export declare namespace Component {
69
70
  x?: string;
70
71
  y?: string;
71
72
  };
73
+ export type HeadlineFunction = 'mean' | 'sum' | 'current' | null;
74
+ export type Headline = {
75
+ func?: HeadlineFunction;
76
+ };
72
77
  export type HorizontalBarChartAttributes = Omit<BarChartAttributes, 'type'> & {
73
78
  type: 'horizontalBarChart';
74
79
  conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
@@ -92,6 +97,7 @@ export declare namespace Component {
92
97
  goalLines?: Array<Component.GoalLine.Rule>;
93
98
  conditionalFormattingRules?: {
94
99
  bar?: Array<ConditionalFormatting.Rule>;
100
+ line?: Array<ConditionalFormatting.Rule>;
95
101
  };
96
102
  axisTitles?: AxisTitles;
97
103
  };
@@ -113,6 +119,7 @@ export declare namespace Component {
113
119
  parameters?: Parameters;
114
120
  goalLines?: Array<Component.GoalLine.Rule>;
115
121
  axisTitles?: AxisTitles;
122
+ headline?: Headline;
116
123
  };
117
124
  export type PieChartAttributes = BaseAttributes & BaseQueryAttributes & {
118
125
  type: 'pieChart';
@@ -140,6 +147,7 @@ export declare namespace Component {
140
147
  parameters?: Parameters;
141
148
  goalLines?: Array<Component.GoalLine.Rule>;
142
149
  axisTitles?: AxisTitles;
150
+ headline?: Headline;
143
151
  };
144
152
  export namespace ConditionalFormatting {
145
153
  type Rule = {
@@ -93,12 +93,14 @@ export interface FormatPanelNamespaces {
93
93
  };
94
94
  goal_line?: Section<'goalLine'>;
95
95
  map_colors?: Section<'mapColors'>;
96
+ headline?: Section<'headline'>;
96
97
  prefixes?: Section<'prefixes'>;
97
98
  conditional_formatting?: Section<'conditionalFormatting'> & {
98
99
  subSectionDefinition?: {
99
100
  bar: SubSection<'stacked'>;
101
+ line: SubSection<'stacked'>;
100
102
  };
101
103
  };
102
104
  }
103
- export type ComponentNamespace = 'pivot_table' | 'horizontal_bar_chart' | 'bar_chart' | 'area_chart' | 'line_chart' | 'scatter_chart' | 'pie_chart' | 'single_stat' | 'basic_table' | 'combo_chart' | 'mercator_map' | 'custom' | 'fields' | 'progress';
105
+ export type ComponentNamespace = 'pivot_table' | 'horizontal_bar_chart' | 'bar_chart' | 'area_chart' | 'line_chart' | 'scatter_chart' | 'pie_chart' | 'single_stat' | 'basic_table' | 'combo_chart' | 'mercator_map' | 'custom' | 'fields' | 'progress' | 'headline';
104
106
  export {};
@@ -4,6 +4,7 @@ export type VizzlyDashboard = {
4
4
  id: Dashboard['id'];
5
5
  parentDashboardId: Dashboard['parentDashboardId'] | undefined;
6
6
  display: Dashboard['display'];
7
+ globalFilters: Dashboard['globalFilters'];
7
8
  componentLibrary: Dashboard['componentLibrary'];
8
9
  createdAt: Dashboard['createdAt'];
9
10
  updatedAt: Dashboard['updatedAt'];
@@ -1,7 +1,7 @@
1
1
  import { DataSet } from './types';
2
2
  import { CustomField, SimpleMathField } from '../CustomField/types';
3
3
  import { DateTimeField, NonDateTimeField } from '../Field/types';
4
- import { Query } from '../Query/types';
4
+ import { PreAggregatedQuery, Query } from '../Query/types';
5
5
  import * as Field from '../Field/Field';
6
6
  import FieldNotFoundInDataSet from '../errors/FieldNotFoundInDataSet';
7
7
  import { QueryAttributes } from '../QueryAttributes/types';
@@ -42,6 +42,6 @@ export declare const findRemovedFieldsBetweenDataSets: (previousDataSets: DataSe
42
42
  export declare const findRemovedFields: (original: DataSet, latest: DataSet) => Array<DataSet.Field>;
43
43
  export declare const buildQueryAttributes: (dataSet: DataSet, queryEngineConfig: QueryEngineConfig, componentType: ComponentType) => QueryAttributes;
44
44
  export declare const buildDownloadQuery: (dataSet: DataSet, maxCSVDownloadLimit: number, viewFilters: QueryAttributes['filter']) => QueryAttributes;
45
- export declare const buildViewOnlyQuery: (dataSet: DataSet) => QueryAttributes;
45
+ export declare const buildViewOnlyQuery: (dataSet: DataSet) => PreAggregatedQuery;
46
46
  export declare const addCustomFields: (dataSets: Array<DataSet>, customFields: RawDashboard['definition']['customFields']) => Array<DataSet>;
47
47
  export declare const validId: (id: string, dataSet: DataSet[]) => boolean;
@@ -9,7 +9,7 @@ export type DataSet = {
9
9
  name: string;
10
10
  description?: string;
11
11
  fields: DataSet.Field[];
12
- preAggregated?: boolean;
12
+ preAggregated?: undefined | false | string[];
13
13
  };
14
14
  export type FieldFilterOptions = {
15
15
  removeSimplePercentage?: boolean;
@@ -26,11 +26,12 @@ export type AxisLabelsSection = Section<'axisLabels'> & {
26
26
  export type LabelsSection = Section<'statsLabels'> & LabelSection<'statsLabels'>;
27
27
  export type PrefixSection = Section<'prefixes'>;
28
28
  export type MapColorsSection = Section<'mapColors'>;
29
+ export type HeadlineSection = Section<'headline'>;
29
30
  export interface ConditionalFormattingSection extends Section<'conditionalFormatting'> {
30
31
  ruleType: FormattingRuleType;
31
32
  subSection?: {
32
33
  title: string;
33
- propKey: 'bar';
34
+ propKey: 'bar' | 'line';
34
35
  }[];
35
36
  }
36
37
  export interface GoalLineSection extends Section<'goalLine'> {
@@ -39,5 +40,5 @@ export interface ProgressTypeSection<T> extends Omit<Section<T>, 'type'> {
39
40
  progressType?: Omit<Section<T>, 'type'>;
40
41
  }
41
42
  export type ProgressTypesSection = Section<'progressType'> & ProgressTypeSection<'progressType'>;
42
- export type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection;
43
+ export type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection | HeadlineSection;
43
44
  export type FormatPanelConfig = Array<FormatPanelSection>;
@@ -18,6 +18,7 @@ export type DataAccessConfig = {
18
18
  secureFilters: {
19
19
  [dataSetId: string]: QueryAttributes.Filter[];
20
20
  };
21
+ parameters?: Object;
21
22
  expires: string;
22
23
  signature: string;
23
24
  };
@@ -1,4 +1,4 @@
1
- import { PreparedQuery, Query, SubQuery } from './types';
1
+ import { PreAggregatedQuery, PreparedQuery, Query, SubQuery } from './types';
2
2
  import { QueryAttributes } from '../QueryAttributes/types';
3
3
  import { QueryEngineConfig, SupportedFeature as SupportedFeatureType } from '../QueryEngineConfig/types';
4
4
  import { DataSet } from '../DataSet/types';
@@ -20,7 +20,11 @@ export declare const hasDimensions: (query: {
20
20
  group: Query['group'];
21
21
  }) => boolean;
22
22
  export declare const getMeasures: (query: Query) => Query['measure'];
23
- export declare const buildPreparedQuery: (dataSetId: string, dataSetField: DataSet['fields'][number], optionsFilters?: Query['filter']) => {
23
+ export declare const buildPreAggregatedPreparedQuery: (query: PreAggregatedQuery, dataSet: DataSet) => {
24
+ query: PreAggregatedQuery;
25
+ resultFields: Result.Field[];
26
+ };
27
+ export declare const buildUniqueArrayValuesPreparedQuery: (dataSetId: string, dataSetField: DataSet['fields'][number], optionsFilters?: Query['filter']) => {
24
28
  query: PreparedQuery;
25
29
  resultFields: Result.Field[];
26
30
  };
@@ -99,7 +99,13 @@ export type UniqueArrayValuesQuery = BasePreparedQuery<'uniqueArrayValues'> & {
99
99
  fieldId: string;
100
100
  filter: Query['filter'];
101
101
  };
102
- export type PreparedQuery = UniqueArrayValuesQuery;
102
+ export type PreAggregatedQuery = BasePreparedQuery<'preAggregated'> & {
103
+ dataSetId: string;
104
+ filter: {
105
+ [dataSetId: string]: Query['filter'];
106
+ };
107
+ };
108
+ export type PreparedQuery = UniqueArrayValuesQuery | PreAggregatedQuery;
103
109
  /** Most commonly used query format. */
104
110
  export type Query<SupportedFunction = string, ComparisonOperator = string, MathsOp = string> = {
105
111
  type: 'query';
@@ -2,7 +2,7 @@ import { SupportedAggregates } from '../Aggregate';
2
2
  import { SupportedTimeTruncFunctions } from '../TimeDimension/types';
3
3
  import { SupportedOperators } from '../QueryAttributes/types';
4
4
  import { SupportedTransformationFunctions } from '../Functions/types';
5
- export type SupportedFeature = 'subquery' | 'simpleMaths' | 'aggregateMaths' | 'switchField' | 'configManagerUi' | 'roundedNumbers' | 'sqlDefinedDataSet' | 'encryptedDashboards';
5
+ export type SupportedFeature = 'subquery' | 'simpleMaths' | 'aggregateMaths' | 'switchField' | 'configManagerUi' | 'roundedNumbers' | 'sqlDefinedDataSet' | 'encryptedDashboards' | 'sqlViews';
6
6
  export type QueryEngineConfig = {
7
7
  origin?: 'in-browser' | 'query-engine' | 'custom';
8
8
  supportedFeatures: SupportedFeature[];
@@ -297,6 +297,8 @@ export declare namespace VizzlyTheming {
297
297
  axisTitles?: ChartAxisTitle;
298
298
  grid?: ChartGrid;
299
299
  axis?: ChartAxis;
300
+ pie?: Pie;
301
+ barChart?: BarChart;
300
302
  };
301
303
  interface ViewText extends FontStyle {
302
304
  textAlign?: CSSProperties['textAlign'];
@@ -479,10 +481,23 @@ export declare namespace VizzlyTheming {
479
481
  };
480
482
  };
481
483
  type Icons = {
484
+ borderRadius?: CSSProperties['borderRadius'];
482
485
  color?: CSSProperties['color'];
486
+ padding?: CSSProperties['padding'];
487
+ width?: CSSProperties['width'];
488
+ height?: CSSProperties['height'];
483
489
  '&:hover'?: {
484
490
  color?: CSSProperties['color'];
491
+ background?: CSSProperties['background'];
485
492
  };
486
493
  };
494
+ type Pie = {
495
+ cornerRadius?: number;
496
+ gap?: boolean;
497
+ hole?: boolean;
498
+ };
499
+ type BarChart = {
500
+ cornerRadius?: number;
501
+ };
487
502
  }
488
503
  export type ThemeVersion = 1 | 2;
@@ -462,6 +462,48 @@ export type VizzlyTranslations = {
462
462
  * String containing the translation.
463
463
  */
464
464
  download: string;
465
+ /**
466
+ * @default 'Download dashboard to PDF'
467
+ *
468
+ * @returns
469
+ * String containing the translation.
470
+ */
471
+ download_dashboard_to_pdf: string;
472
+ /**
473
+ * @default 'Download the dashboard you see in this view.'
474
+ *
475
+ * @returns
476
+ * String containing the translation.
477
+ */
478
+ 'pdf_download.description': string;
479
+ /**
480
+ * @default 'Portrait'
481
+ *
482
+ * @returns
483
+ * String containing the translation.
484
+ */
485
+ 'pdf_download.page.orientation.portrait': string;
486
+ /**
487
+ * @default 'Landscape'
488
+ *
489
+ * @returns
490
+ * String containing the translation.
491
+ */
492
+ 'pdf_download.page.orientation.landscape': string;
493
+ /**
494
+ * @default 'Orientation'
495
+ *
496
+ * @returns
497
+ * String containing the translation.
498
+ */
499
+ 'pdf_download.page.orientation': string;
500
+ /**
501
+ * @default 'Download to PDF'
502
+ *
503
+ * @returns
504
+ * String containing the translation.
505
+ */
506
+ 'download_dashboard_to_pdf.button': string;
465
507
  /**
466
508
  * @default 'Add alternative group'
467
509
  *
@@ -539,6 +581,61 @@ export type VizzlyTranslations = {
539
581
  * String containing the translation.
540
582
  */
541
583
  format: string;
584
+ /**
585
+ * @default 'Current'
586
+ *
587
+ * @returns
588
+ * String containing the translation.
589
+ */
590
+ 'single_stat.current': string;
591
+ /**
592
+ * @default 'Previous'
593
+ *
594
+ * @returns
595
+ * String containing the translation.
596
+ */
597
+ 'single_stat.previous': string;
598
+ /**
599
+ * @default 'Show as value'
600
+ *
601
+ * @returns
602
+ * String containing the translation.
603
+ */
604
+ 'single_stat.show_as_value': string;
605
+ /**
606
+ * @default 'Show as percentage'
607
+ *
608
+ * @returns
609
+ * String containing the translation.
610
+ */
611
+ 'single_stat.show_as_percentage': string;
612
+ /**
613
+ * @default 'No data available for [[deltaTimeDimension]] comparison'
614
+ *
615
+ * @params
616
+ * Fixed Variables: [[deltaTimeDimension]]
617
+ *
618
+ * @returns
619
+ * String containing the translation.
620
+ */
621
+ 'single_stat.no_data_for_delta_description': string;
622
+ /**
623
+ * @default 'Comparing [[deltaTimeDimension]] over [[deltaTimeDimension]]'
624
+ *
625
+ * @params
626
+ * Fixed Variables: [[deltaTimeDimension]]
627
+ *
628
+ * @returns
629
+ * String containing the translation.
630
+ */
631
+ 'single_stat.delta_description': string;
632
+ /**
633
+ * @default 'No value'
634
+ *
635
+ * @returns
636
+ * String containing the translation.
637
+ */
638
+ 'single_stat.no_value': string;
542
639
  /**
543
640
  * @default 'Confirm Reset'
544
641
  *
@@ -1160,14 +1257,7 @@ export type VizzlyTranslations = {
1160
1257
  */
1161
1258
  dataset: string;
1162
1259
  /**
1163
- * @default 'Pre-aggregated data set'
1164
- *
1165
- * @returns
1166
- * String containing the translation.
1167
- */
1168
- 'pre-aggregated_data_set_title': string;
1169
- /**
1170
- * @default 'This data set has already been aggregated, therefore you will find some data properties have already been set.'
1260
+ * @default 'Please note; this data set is pre-aggregated, therefore customization options on the data panel are limited.'
1171
1261
  *
1172
1262
  * @returns
1173
1263
  * String containing the translation.
@@ -1492,26 +1582,26 @@ export type VizzlyTranslations = {
1492
1582
  */
1493
1583
  display_conditional_format_configuration: string;
1494
1584
  /**
1495
- * @default 'Error'
1585
+ * @default 'Add Condition'
1496
1586
  *
1497
1587
  * @returns
1498
1588
  * String containing the translation.
1499
1589
  */
1500
- error: string;
1590
+ add_condition: string;
1501
1591
  /**
1502
- * @default 'Invalid rule'
1592
+ * @default 'Error'
1503
1593
  *
1504
1594
  * @returns
1505
1595
  * String containing the translation.
1506
1596
  */
1507
- invalid_rule: string;
1597
+ error: string;
1508
1598
  /**
1509
- * @default 'Add Condition'
1599
+ * @default 'Invalid or broken rule'
1510
1600
  *
1511
1601
  * @returns
1512
1602
  * String containing the translation.
1513
1603
  */
1514
- add_condition: string;
1604
+ invalid_rule: string;
1515
1605
  /**
1516
1606
  * @default 'Add Goal Line'
1517
1607
  *
@@ -1529,6 +1619,27 @@ export type VizzlyTranslations = {
1529
1619
  * String containing the translation.
1530
1620
  */
1531
1621
  goal_line_configuration: string;
1622
+ /**
1623
+ * @default 'None'
1624
+ *
1625
+ * @returns
1626
+ * String containing the translation.
1627
+ */
1628
+ none: string;
1629
+ /**
1630
+ * @default 'Current'
1631
+ *
1632
+ * @returns
1633
+ * String containing the translation.
1634
+ */
1635
+ current: string;
1636
+ /**
1637
+ * @default 'Options'
1638
+ *
1639
+ * @returns
1640
+ * String containing the translation.
1641
+ */
1642
+ options: string;
1532
1643
  /**
1533
1644
  * @default 'Background'
1534
1645
  *
@@ -2141,6 +2252,13 @@ export type VizzlyTranslations = {
2141
2252
  * String containing the translation.
2142
2253
  */
2143
2254
  'bar_chart.format_panel.axis_labels.y.axis_title.title': string;
2255
+ /**
2256
+ * @default "Headline"
2257
+ *
2258
+ * @returns
2259
+ * String containing the translation.
2260
+ */
2261
+ 'bar_chart.format_panel.headline.title': string;
2144
2262
  /**
2145
2263
  * @default "Goal Lines"
2146
2264
  *
@@ -2428,6 +2546,20 @@ export type VizzlyTranslations = {
2428
2546
  * String containing the translation.
2429
2547
  */
2430
2548
  'area_chart.format_panel.axis_labels.y.axis_title.title': string;
2549
+ /**
2550
+ * @default "Conditional Formatting"
2551
+ *
2552
+ * @returns
2553
+ * String containing the translation.
2554
+ */
2555
+ 'area_chart.format_panel.conditional_formatting.title': string;
2556
+ /**
2557
+ * @default "Headline"
2558
+ *
2559
+ * @returns
2560
+ * String containing the translation.
2561
+ */
2562
+ 'area_chart.format_panel.headline.title': string;
2431
2563
  /**
2432
2564
  * @default "Goal Lines"
2433
2565
  *
@@ -2715,6 +2847,13 @@ export type VizzlyTranslations = {
2715
2847
  * String containing the translation.
2716
2848
  */
2717
2849
  'combo_chart.format_panel.conditional_formatting.bar.title': string;
2850
+ /**
2851
+ * @default "Line"
2852
+ *
2853
+ * @returns
2854
+ * String containing the translation.
2855
+ */
2856
+ 'combo_chart.format_panel.conditional_formatting.line.title': string;
2718
2857
  /**
2719
2858
  * @default "Basic table"
2720
2859
  *
@@ -3359,6 +3498,13 @@ export type VizzlyTranslations = {
3359
3498
  * String containing the translation.
3360
3499
  */
3361
3500
  'horizontal_bar_chart.format_panel.axis_labels.y.axis_title.title': string;
3501
+ /**
3502
+ * @default "Headline"
3503
+ *
3504
+ * @returns
3505
+ * String containing the translation.
3506
+ */
3507
+ 'horizontal_bar_chart.format_panel.headline.title': string;
3362
3508
  /**
3363
3509
  * @default "Conditional Formatting"
3364
3510
  *
@@ -3646,6 +3792,20 @@ export type VizzlyTranslations = {
3646
3792
  * String containing the translation.
3647
3793
  */
3648
3794
  'line_chart.format_panel.axis_labels.y.axis_title.title': string;
3795
+ /**
3796
+ * @default "Conditional Formatting"
3797
+ *
3798
+ * @returns
3799
+ * String containing the translation.
3800
+ */
3801
+ 'line_chart.format_panel.conditional_formatting.title': string;
3802
+ /**
3803
+ * @default "Headline"
3804
+ *
3805
+ * @returns
3806
+ * String containing the translation.
3807
+ */
3808
+ 'line_chart.format_panel.headline.title': string;
3649
3809
  /**
3650
3810
  * @default "Goal Lines"
3651
3811
  *
@@ -43,6 +43,7 @@ export declare const api: (config: ApiConfig) => {
43
43
  getProjectAccessToken: (projectId: string, appSessionAuthToken?: string | undefined, resourceFilters?: string[] | undefined) => Promise<string | undefined>;
44
44
  getProject: (projectId: string) => Promise<import("../Project/types").Project | null>;
45
45
  createQueryEngineUser: (projectId: string, email: string, password: string) => Promise<boolean>;
46
+ updateQueryEngineUser: (projectId: string, updateQueryEngineUser: string, password: string) => Promise<boolean>;
46
47
  getQueryEngineUser: (projectId: string, email: string) => Promise<{
47
48
  id: string;
48
49
  password: string | null;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const updateQueryEngineUser: (httpClient: HttpClient) => (projectId: string, updateQueryEngineUser: string, password: string) => Promise<boolean>;
package/package.json CHANGED
@@ -22,5 +22,5 @@
22
22
  "test": "jest",
23
23
  "prepare": "yarn build"
24
24
  },
25
- "version": "0.7.3"
25
+ "version": "0.7.4-dev-396503edb3f72dee2437663fb8b8398a998ed90b"
26
26
  }