@vizzly/dashboard 0.7.4 → 0.8.0-dev-abf3b03fb2a1d5440fb41168d77a801fe11f4f2a
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/shared-logic/src/Headline/headline.utils.d.ts +11 -0
- package/dist/shared-logic/src/Headline/upcast.d.ts +3 -0
- package/dist/shared-logic/src/Theme/types.d.ts +4 -0
- package/dist/shared-logic/src/Translations/translation.types.d.ts +14 -0
- package/dist/shared-ui/src/base/DateTime/DateRangePicker.d.ts +7 -21
- package/dist/shared-ui/src/base/Dropdown/Dropdown.d.ts +4 -0
- package/dist/shared-ui/src/base/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/shared-ui/src/base/Dropdown/DropdownTitle.d.ts +5 -0
- package/dist/shared-ui/src/base/Select/Select.types.d.ts +2 -0
- package/dist/shared-ui/src/components/HeadlineStats/HeadlineStats.d.ts +0 -9
- package/dist/shared-ui/src/components/SingleStat/DeltaPills.styles.d.ts +14 -2
- package/dist/shared-ui/src/components/useChartRenderHelper.d.ts +3 -1
- package/dist/shared-ui/src/library/DataPanel/transformDataSets.d.ts +4 -0
- package/dist/shared-ui/src/styles/global.styles.d.ts +4 -0
- package/dist/shared-ui/src/types.d.ts +21 -0
- package/package.json +1 -1
- /package/dist/shared-ui/src/{components/HeadlineStats/HeadlineStats.test.d.ts → library/DataPanel/SelectDataSet.test.d.ts} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataSet as DataSetType } from '../DataSet/types';
|
|
2
|
+
import { QueryAttributes } from '../QueryAttributes/types';
|
|
3
|
+
import { SupportedAggregates } from '../Aggregate';
|
|
4
|
+
import { Component, FormatType } from '../Component/types';
|
|
5
|
+
export declare function measureIsSuitableFunc(dataSet: DataSetType, item: QueryAttributes.Measure, supportedAggregates: SupportedAggregates, includes?: Component.HeadlineFunction): boolean;
|
|
6
|
+
export declare function defineMeasuresForSingleStat(measure: QueryAttributes.Measure[], supportedAggregates: SupportedAggregates, dataSet: DataSetType, func?: Component.HeadlineFunction): QueryAttributes.Measure[];
|
|
7
|
+
export declare function buildSingleStatProperties(measure: QueryAttributes.Measure[], value?: string | FormatType): {
|
|
8
|
+
[fieldIdAndAggregate: string]: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function canHaveHeadline(order: QueryAttributes.Order[], timeDimension?: QueryAttributes.TimeDimension | null): boolean;
|
|
11
|
+
export declare function headlineAvailable(order: QueryAttributes.Order[], headline?: Component.Headline, timeDimension?: QueryAttributes.TimeDimension | null): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Component } from '../Component/types';
|
|
2
|
+
import { QueryAttributes } from '../QueryAttributes/types';
|
|
3
|
+
export declare const upcastHeadline: (headline?: Component.Headline | undefined, timeDimension?: QueryAttributes.TimeDimension | null | undefined) => Component.Headline | undefined;
|
|
@@ -299,6 +299,7 @@ export declare namespace VizzlyTheming {
|
|
|
299
299
|
axis?: ChartAxis;
|
|
300
300
|
pie?: Pie;
|
|
301
301
|
barChart?: BarChart;
|
|
302
|
+
singleStat?: SingleStat;
|
|
302
303
|
};
|
|
303
304
|
interface ViewText extends FontStyle {
|
|
304
305
|
textAlign?: CSSProperties['textAlign'];
|
|
@@ -499,5 +500,8 @@ export declare namespace VizzlyTheming {
|
|
|
499
500
|
type BarChart = {
|
|
500
501
|
cornerRadius?: number;
|
|
501
502
|
};
|
|
503
|
+
type SingleStat = {
|
|
504
|
+
delteStyle?: 'pill' | 'text';
|
|
505
|
+
};
|
|
502
506
|
}
|
|
503
507
|
export declare type ThemeVersion = 1 | 2;
|
|
@@ -1846,6 +1846,20 @@ export declare type VizzlyTranslations = {
|
|
|
1846
1846
|
* String containing the translation.
|
|
1847
1847
|
*/
|
|
1848
1848
|
custom_metric_modal_title: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* @default 'Data'
|
|
1851
|
+
*
|
|
1852
|
+
* @returns
|
|
1853
|
+
* String containing the translation.
|
|
1854
|
+
*/
|
|
1855
|
+
'dataSets.data': string;
|
|
1856
|
+
/**
|
|
1857
|
+
* @default 'Defined views'
|
|
1858
|
+
*
|
|
1859
|
+
* @returns
|
|
1860
|
+
* String containing the translation.
|
|
1861
|
+
*/
|
|
1862
|
+
'dataSets.defined_views': string;
|
|
1849
1863
|
/**
|
|
1850
1864
|
* @default 'Date filter'
|
|
1851
1865
|
*
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextOverride } from '../../../../shared-logic/src/Translations/types';
|
|
2
2
|
import { DateRangeFormat } from './Input';
|
|
3
3
|
import { TimeRangeFormat } from './TimePickerCore';
|
|
4
|
-
import {
|
|
5
|
-
export declare type DatePickerChangeProps =
|
|
6
|
-
|
|
7
|
-
endDate: Date | null;
|
|
8
|
-
startTime?: string | null;
|
|
9
|
-
endTime?: string | null;
|
|
10
|
-
};
|
|
11
|
-
interface DateRangePickerProps {
|
|
4
|
+
import { VizzlyComponents } from '../../types';
|
|
5
|
+
export declare type DatePickerChangeProps = VizzlyComponents.ComponentOverrides.Props.DateTimeRangeInputChangeProps;
|
|
6
|
+
declare type DatePickerProps = {
|
|
12
7
|
id?: string | number;
|
|
13
|
-
startDate?: Date;
|
|
14
|
-
endDate?: Date;
|
|
15
|
-
startTime?: string | null;
|
|
16
|
-
endTime?: string | null;
|
|
17
|
-
prefix?: boolean;
|
|
18
8
|
dynamicWidth?: boolean;
|
|
19
|
-
onChange: ({ startDate, endDate, startTime, endTime }: DatePickerChangeProps) => void;
|
|
20
|
-
onClear: () => void;
|
|
21
|
-
label?: string;
|
|
22
9
|
dateFormat?: DateRangeFormat;
|
|
23
10
|
timeFormat?: TimeRangeFormat;
|
|
24
|
-
type?: 'date' | 'date_time';
|
|
25
11
|
textOverride?: TextOverride;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export
|
|
12
|
+
} & VizzlyComponents.ComponentOverrides.Props.DateTimeRangeInput;
|
|
13
|
+
declare const _default: (props: DatePickerProps) => JSX.Element;
|
|
14
|
+
export default _default;
|
|
@@ -13,6 +13,7 @@ export declare type DropdownContainerProps = {
|
|
|
13
13
|
export declare type DropdownOptionProps = {
|
|
14
14
|
onChange: (evt?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
15
15
|
label: string | number | Function;
|
|
16
|
+
description?: string;
|
|
16
17
|
selected?: boolean;
|
|
17
18
|
testId?: string;
|
|
18
19
|
subtext?: string;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { Component, FormatType } from '../../../../shared-logic/src/Component/types';
|
|
3
2
|
import { AreaChartProps } from '../AreaChart/types';
|
|
4
3
|
import { BarChartProps } from '../BarChart/types';
|
|
5
4
|
import { LineChartProps } from '../LineChart/types';
|
|
6
|
-
import { DataSet as DataSetType } from '../../../../shared-logic/src/DataSet/types';
|
|
7
|
-
import { QueryAttributes } from '../../../../shared-logic/src/QueryAttributes/types';
|
|
8
|
-
import { SupportedAggregates } from '../../../../shared-logic/src/Aggregate';
|
|
9
5
|
export declare type HeadlineStatsProps = LineChartProps | BarChartProps | AreaChartProps;
|
|
10
6
|
export declare const HeadlineStats: FunctionComponent<HeadlineStatsProps>;
|
|
11
|
-
export declare function defineMeasuresForSingleStat(measure: QueryAttributes.Measure[], supportedAggregates: SupportedAggregates, dataSet: DataSetType, func?: Component.HeadlineFunction): QueryAttributes.Measure[];
|
|
12
|
-
export declare function buildSingleStatProperties(measure: QueryAttributes.Measure[], value?: string | FormatType): {
|
|
13
|
-
[fieldIdAndAggregate: string]: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function headlineAvailable(headline?: Component.Headline): boolean;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
1
|
+
export declare const deltaStyles: (() => null) & {
|
|
2
|
+
deltaPill: {
|
|
3
|
+
(variantOptions: Object): string;
|
|
4
|
+
toString: any;
|
|
5
|
+
};
|
|
6
|
+
deltaText: {
|
|
7
|
+
(variantOptions: Object): string;
|
|
8
|
+
toString: any;
|
|
9
|
+
};
|
|
10
|
+
arrow: {
|
|
11
|
+
(variantOptions: Object): string;
|
|
12
|
+
toString: any;
|
|
13
|
+
};
|
|
14
|
+
delta: {
|
|
3
15
|
(variantOptions: Object): string;
|
|
4
16
|
toString: any;
|
|
5
17
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChartRef } from '../../../charts/src/utils/chartRendering';
|
|
3
|
-
|
|
3
|
+
import { Component } from '../../../shared-logic/src/Component/types';
|
|
4
|
+
export declare function useChartRenderHelper({ title, subject, headline, }: {
|
|
4
5
|
title: string;
|
|
5
6
|
subject: string;
|
|
7
|
+
headline?: Component.Headline;
|
|
6
8
|
}): import("react").RefObject<ChartRef>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
|
|
2
|
+
import { TextOverride } from '../../../../shared-logic/src/Translations/types';
|
|
3
|
+
import { SelectOption } from '../../base/Select/Select.types';
|
|
4
|
+
export declare function transformDataSets(dataSets: DataSet[], textOverride: TextOverride): SelectOption[];
|
|
@@ -37,6 +37,10 @@ export declare const css: (() => null) & {
|
|
|
37
37
|
(variantOptions: Object): string;
|
|
38
38
|
toString: any;
|
|
39
39
|
};
|
|
40
|
+
py: (value: CSSProperties['paddingTop']) => {
|
|
41
|
+
(variantOptions: Object): string;
|
|
42
|
+
toString: any;
|
|
43
|
+
};
|
|
40
44
|
p: (value: CSSProperties['padding']) => {
|
|
41
45
|
(variantOptions: Object): string;
|
|
42
46
|
toString: any;
|
|
@@ -72,11 +72,30 @@ export declare namespace VizzlyComponents {
|
|
|
72
72
|
rightAligned?: boolean;
|
|
73
73
|
id?: string;
|
|
74
74
|
};
|
|
75
|
+
type DateTimeRangeInputChangeProps = {
|
|
76
|
+
startDate: Date | null;
|
|
77
|
+
endDate: Date | null;
|
|
78
|
+
startTime?: string | null;
|
|
79
|
+
endTime?: string | null;
|
|
80
|
+
};
|
|
81
|
+
type DateTimeRangeInput = {
|
|
82
|
+
onChange: ({ startDate, endDate, startTime, endTime }: DateTimeRangeInputChangeProps) => void;
|
|
83
|
+
onClear: () => void;
|
|
84
|
+
type?: 'date' | 'date_time';
|
|
85
|
+
startDate?: Date;
|
|
86
|
+
endDate?: Date;
|
|
87
|
+
startTime?: string | null;
|
|
88
|
+
endTime?: string | null;
|
|
89
|
+
prefix?: boolean;
|
|
90
|
+
label?: string;
|
|
91
|
+
};
|
|
75
92
|
type SelectOptions = {
|
|
76
93
|
label: string | number | Function;
|
|
77
94
|
value: any;
|
|
95
|
+
subText?: string;
|
|
78
96
|
testId?: string;
|
|
79
97
|
icon?: JSX.Element;
|
|
98
|
+
title?: boolean;
|
|
80
99
|
};
|
|
81
100
|
type Button = PropsWithChildren<{
|
|
82
101
|
primary?: boolean;
|
|
@@ -134,6 +153,7 @@ export declare namespace VizzlyComponents {
|
|
|
134
153
|
type renderButtonComponent = (props: Props.Button) => JSX.Element;
|
|
135
154
|
type renderDateTimeInput = (props: Props.DateTimeInput) => JSX.Element;
|
|
136
155
|
type renderSelectComponent = (props: Props.Select) => JSX.Element;
|
|
156
|
+
type renderDateTimeRangeInput = (props: Props.DateTimeRangeInput) => JSX.Element;
|
|
137
157
|
type renderComponentOptions = (props: Props.ComponentOptions) => JSX.Element | null;
|
|
138
158
|
type renderLoading = (props: {}) => JSX.Element | null;
|
|
139
159
|
type renderUndoIcon = (props: {}) => JSX.Element;
|
|
@@ -213,6 +233,7 @@ export declare namespace VizzlyComponents {
|
|
|
213
233
|
renderSelectComponent: ComponentOverrides.renderSelectComponent | null;
|
|
214
234
|
renderButtonComponent: ComponentOverrides.renderButtonComponent | null;
|
|
215
235
|
renderDateTimeInput: ComponentOverrides.renderDateTimeInput | null;
|
|
236
|
+
renderDateTimeRangeInput: ComponentOverrides.renderDateTimeRangeInput | null;
|
|
216
237
|
/**
|
|
217
238
|
* @deprecated This property is being deprecated. You can now use the Theme API, for information see {@link https://docs.vizzly.co/dashboard/properties/theme}.
|
|
218
239
|
*/
|
package/package.json
CHANGED