@vizzly/dashboard 0.7.0-dev.1 → 0.7.1-dev-08483fa16723f74be9fe469b259ba89d05efa8de
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/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +30 -48
- package/dist/dashboard/src/contexts/useDashboardStrategy.d.ts +1 -1
- package/dist/dashboard/src/types.d.ts +4 -9
- package/dist/index.js +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/SingleStat/toQueries.d.ts +1 -1
- package/dist/results-driver/src/index.d.ts +6 -5
- package/dist/shared-logic/src/AI/types.d.ts +12 -0
- package/dist/shared-logic/src/AreaChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/BarChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/BasicTable/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/ComboChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/Component/Component.d.ts +1 -3
- package/dist/shared-logic/src/Component/attributesSchema.d.ts +2 -2
- package/dist/shared-logic/src/Component/constants.d.ts +4 -0
- package/dist/shared-logic/src/Component/setAttributes.d.ts +2 -2
- package/dist/shared-logic/src/Component/sharedSchemas.d.ts +8 -7
- package/dist/shared-logic/src/Component/types.d.ts +30 -2
- package/dist/shared-logic/src/ComponentInterface/types.d.ts +3 -1
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI.d.ts +1 -1
- package/dist/shared-logic/src/DashboardAPI/dataSets.d.ts +17 -0
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +8 -1
- package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
- package/dist/shared-logic/src/DataTable/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/DataTable/types.d.ts +1 -0
- package/dist/shared-logic/src/Documentation/index.d.ts +1 -0
- package/dist/shared-logic/src/Documentation/joiToDocumentation.d.ts +1 -1
- package/dist/shared-logic/src/Documentation/joiToSchemaDefinition.d.ts +2 -0
- package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +5 -1
- package/dist/shared-logic/src/LineChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/MercatorMap/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/PieChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/Progress/attributesSchema.d.ts +3 -0
- package/dist/shared-logic/src/Progress/index.d.ts +5 -0
- package/dist/shared-logic/src/Progress/types.d.ts +2 -0
- package/dist/shared-logic/src/Progress/utils.d.ts +2 -0
- package/dist/shared-logic/src/Query/validate.d.ts +6 -6
- package/dist/shared-logic/src/QueryEngine/types.d.ts +1 -0
- package/dist/shared-logic/src/ScatterChart/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/SingleStat/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/SingleStat/upcastSingleValueAttributes.d.ts +4 -0
- package/dist/shared-logic/src/Table/attributesSchema.d.ts +1 -1
- package/dist/shared-logic/src/Theme/types.d.ts +7 -0
- package/dist/shared-logic/src/VizzlyConfig/constants.d.ts +1 -0
- package/dist/shared-logic/src/VizzlyConfig/validate.d.ts +1 -1
- package/dist/shared-logic/src/api/httpClient.d.ts +1 -0
- package/dist/shared-logic/src/api/index.d.ts +9 -1
- package/dist/shared-logic/src/api/types.d.ts +1 -0
- package/dist/shared-logic/src/api/vizzly/askAi/types.d.ts +2 -5
- package/dist/shared-logic/src/api/vizzly/askAi/validateAndUpcast.d.ts +2 -3
- package/dist/shared-logic/src/api/vizzly/askAi.d.ts +9 -2
- package/dist/shared-logic/src/errors/CorruptedView.d.ts +1 -1
- package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
- package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
- package/dist/shared-ui/src/base/Label/Label.d.ts +1 -0
- package/dist/shared-ui/src/base/ListView/OptionIcon.d.ts +1 -0
- package/dist/shared-ui/src/base/Progress/Circular.d.ts +6 -0
- package/dist/shared-ui/src/base/Progress/Linear.d.ts +5 -0
- package/dist/shared-ui/src/base/Progress/Progress.d.ts +39 -0
- package/dist/shared-ui/src/base/Progress/shared.d.ts +2 -0
- package/dist/shared-ui/src/base/Table/Table.d.ts +2 -0
- package/dist/shared-ui/src/base/Table/Table.styles.d.ts +1 -1
- package/dist/shared-ui/src/base/Table/TableComponents.d.ts +2 -0
- package/dist/shared-ui/src/base/ValuesContainer/ValuesContainer.d.ts +18 -0
- package/dist/shared-ui/src/base/ValuesContainer/buildSingleValue.d.ts +10 -0
- package/dist/shared-ui/src/components/ChartHelper.d.ts +1 -4
- package/dist/shared-ui/src/components/ComboChart/ComboChartView.d.ts +1 -4
- package/dist/shared-ui/src/components/Component.d.ts +1 -0
- package/dist/shared-ui/src/components/DataTable/DataTableRow.d.ts +4 -1
- package/dist/shared-ui/src/components/DataTable/TableHeader.d.ts +2 -0
- package/dist/shared-ui/src/components/DataTable/buildTableRepresentation.d.ts +3 -2
- package/dist/shared-ui/src/components/DataTable/headerFormatting.d.ts +10 -0
- package/dist/shared-ui/src/components/Progress/Progress.d.ts +20 -0
- package/dist/shared-ui/src/components/Progress/ProgressView.d.ts +13 -0
- package/dist/shared-ui/src/components/Progress/index.d.ts +2 -0
- package/dist/shared-ui/src/components/SingleStat/SingleStatView.d.ts +1 -1
- package/dist/shared-ui/src/components/Studio/StudioApp/Cell.d.ts +1 -0
- package/dist/shared-ui/src/contexts/DashboardBehaviour/numberFormatOptions.d.ts +1 -4
- package/dist/shared-ui/src/contexts/DashboardBehaviour/types.d.ts +7 -2
- package/dist/shared-ui/src/hooks/useAi.d.ts +14 -0
- package/dist/shared-ui/src/library/ComponentIcons.d.ts +1 -0
- package/dist/shared-ui/src/library/DataPanel/MeasuresInput.d.ts +1 -0
- package/dist/shared-ui/src/library/DataPanel/Progress/ProgressInput.d.ts +14 -0
- package/dist/shared-ui/src/library/DataPanel/Progress/ProgressInput.test.d.ts +1 -0
- package/dist/shared-ui/src/library/DataPanel/Progress/ProgressModal.d.ts +9 -0
- package/dist/shared-ui/src/library/DataPanel/ProgressGoalsSection.d.ts +6 -0
- package/dist/shared-ui/src/library/ResizableRowCell.d.ts +1 -0
- package/dist/shared-ui/src/library/StylePanel/ProgressTypeSection.d.ts +6 -0
- package/dist/shared-ui/src/library/VizzlyAI.d.ts +1 -1
- package/dist/shared-ui/src/library/useHeight.d.ts +2 -0
- package/dist/shared-ui/src/styles/global.styles.d.ts +4 -0
- package/dist/shared-ui/src/withArgumentValidation.d.ts +1 -1
- package/package.json +5 -4
- package/dist/dashboard/src/properties/dataSets.d.ts +0 -5
- package/dist/shared-logic/src/SingleStat/upcastSingleStatAttributes.d.ts +0 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { Linear } from './Linear';
|
|
3
|
+
import { Circular } from './Circular';
|
|
4
|
+
import { ProgressType } from '../../../../shared-logic/src/Component/types';
|
|
5
|
+
export declare type BaseProgressProps = {
|
|
6
|
+
title: string;
|
|
7
|
+
valueMin?: number;
|
|
8
|
+
valueNow: number;
|
|
9
|
+
displayValueNow?: string;
|
|
10
|
+
valueMax: number;
|
|
11
|
+
color: Color;
|
|
12
|
+
showValue?: boolean;
|
|
13
|
+
showTitle?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare type LinearProgressProps = BaseProgressProps & {
|
|
16
|
+
type: ProgressType.Linear;
|
|
17
|
+
};
|
|
18
|
+
export declare type CircularProgressProps = BaseProgressProps & {
|
|
19
|
+
type: ProgressType.Circular;
|
|
20
|
+
radius?: number;
|
|
21
|
+
stroke?: number;
|
|
22
|
+
};
|
|
23
|
+
export declare type ProgressProps = LinearProgressProps | CircularProgressProps;
|
|
24
|
+
export declare type Color = CSSProperties['color'] | CSSProperties['color'][];
|
|
25
|
+
export declare const Progress: React.FunctionComponent<ProgressProps> & {
|
|
26
|
+
View: React.FunctionComponent<ProgressProps>;
|
|
27
|
+
Circular: React.FunctionComponent<BaseProgressProps & {
|
|
28
|
+
type: ProgressType.Circular;
|
|
29
|
+
radius?: number | undefined;
|
|
30
|
+
stroke?: number | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
percentage: number;
|
|
33
|
+
}>;
|
|
34
|
+
Linear: React.FunctionComponent<BaseProgressProps & {
|
|
35
|
+
type: ProgressType.Linear;
|
|
36
|
+
} & {
|
|
37
|
+
percentage: number;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
@@ -44,6 +44,8 @@ export declare const Table: import("react").ForwardRefExoticComponent<{
|
|
|
44
44
|
dragSettings?: import("./TableColumnResizer").TableColumnResizerProps | undefined;
|
|
45
45
|
expand?: import("./ArrowButton").ArrowButtonProps | undefined;
|
|
46
46
|
level?: number | undefined;
|
|
47
|
+
lastGroupColumn?: boolean | undefined;
|
|
48
|
+
firstGroupColumn?: boolean | undefined;
|
|
47
49
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
48
50
|
THLabel: import("react").FunctionComponent<{
|
|
49
51
|
children?: import("react").ReactNode;
|
|
@@ -46,7 +46,7 @@ export declare const tableStyles: (() => null) & {
|
|
|
46
46
|
(variantOptions: Object): string;
|
|
47
47
|
toString: any;
|
|
48
48
|
};
|
|
49
|
-
thGroupColumn: (themedStyles?: VizzlyTheming.TableTH | undefined) => {
|
|
49
|
+
thGroupColumn: (themedStyles?: VizzlyTheming.TableTH | undefined, deadSpace?: boolean | undefined) => {
|
|
50
50
|
(variantOptions: Object): string;
|
|
51
51
|
toString: any;
|
|
52
52
|
};
|
|
@@ -45,6 +45,8 @@ export declare const TableComponents: (() => null) & {
|
|
|
45
45
|
dragSettings?: TableColumnResizerProps | undefined;
|
|
46
46
|
expand?: ArrowButtonProps | undefined;
|
|
47
47
|
level?: number | undefined;
|
|
48
|
+
lastGroupColumn?: boolean | undefined;
|
|
49
|
+
firstGroupColumn?: boolean | undefined;
|
|
48
50
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
49
51
|
THButton: React.ForwardRefExoticComponent<{
|
|
50
52
|
onSort?: (() => void) | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { ProgressType } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
export declare const Single: (props: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
export declare const ValuesContainer: FunctionComponent<{
|
|
7
|
+
noOfValues: number;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
view: ProgressType;
|
|
10
|
+
onWidthChange: (width: number) => void;
|
|
11
|
+
}> & {
|
|
12
|
+
Individual: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Single: (props: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
2
|
+
import { NumberFormatter } from '../../contexts/DashboardBehaviour/types';
|
|
3
|
+
export declare function buildSingleValue(formatter: Component.SingleStatAttributes['formatter'], prefixes: Component.SingleStatAttributes['prefixes'], postfixes: Component.SingleStatAttributes['postfixes'], measure: Component.SingleStatAttributes['measure'][number], value: number, numberFormatOptions: {
|
|
4
|
+
[id: string]: NumberFormatter;
|
|
5
|
+
}): {
|
|
6
|
+
formattedValue: string;
|
|
7
|
+
prefix: string;
|
|
8
|
+
postfix: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const displaySingleValue: (formattedValue: string, prefix?: string | undefined, postfix?: string | undefined) => string;
|
|
@@ -25,10 +25,7 @@ export declare const formatXAxisLabel: (timeDimension: QueryAttributesType.TimeD
|
|
|
25
25
|
export declare const formatYAxisLabel: (axisLabelConfig?: AxisLabelConfig | undefined) => (value: any) => string;
|
|
26
26
|
export declare const formatSeriesName: (result: ResultType | null | undefined) => (key: string) => string | undefined;
|
|
27
27
|
export declare const convertValueToFormat: (value: any, numberFormatOptions?: {
|
|
28
|
-
[id: string]:
|
|
29
|
-
formatter: (number: number | null | undefined, noValueReplacement?: string | undefined) => string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
28
|
+
[id: string]: import("../contexts/DashboardBehaviour/types").NumberFormatter;
|
|
32
29
|
} | undefined, format?: string | null | undefined) => any;
|
|
33
30
|
export declare function getGradientAdjustedColor(rule: ConditionalFormattingBoundary, matchedHexValue: string, actualValue: number): string;
|
|
34
31
|
export {};
|
|
@@ -16,10 +16,7 @@ declare const _default: React.MemoExoticComponent<(props: Pick<VizzlyComponents.
|
|
|
16
16
|
dashboard?: Dashboard | undefined;
|
|
17
17
|
library?: boolean | undefined;
|
|
18
18
|
numberFormatOptions: {
|
|
19
|
-
[id: string]:
|
|
20
|
-
formatter: (number: number | null | undefined, noValueReplacement?: string | undefined) => string;
|
|
21
|
-
description: string;
|
|
22
|
-
};
|
|
19
|
+
[id: string]: import("../../contexts/DashboardBehaviour/types").NumberFormatter;
|
|
23
20
|
};
|
|
24
21
|
dateTimeFormatOptions: {
|
|
25
22
|
[id: string]: {
|
|
@@ -14,5 +14,6 @@ export declare type ComponentProps = {
|
|
|
14
14
|
editor?: boolean;
|
|
15
15
|
setLocalFilters: (localFilters: AdditionalFilter[]) => void;
|
|
16
16
|
setParameterUpdate: (payload: UpdatedMetrics) => void;
|
|
17
|
+
height?: number;
|
|
17
18
|
};
|
|
18
19
|
export declare const Component: (props: ComponentProps) => JSX.Element | null;
|
|
@@ -59,4 +59,7 @@ export declare function buildParentAdjustedRows(parentFields: TableFields[], tab
|
|
|
59
59
|
export declare type SelectedRow = Array<{
|
|
60
60
|
[id: string]: string;
|
|
61
61
|
}>;
|
|
62
|
-
export declare function buildDrilldownAttributes(attributes: Component.DataTableAttributes, subsetDimension: QueryAttributes.Dimension, dimension: QueryAttributes.Dimension[], selectedRow: SelectedRow): Component.DataTableAttributes
|
|
62
|
+
export declare function buildDrilldownAttributes(attributes: Component.DataTableAttributes, subsetDimension: QueryAttributes.Dimension, dimension: QueryAttributes.Dimension[], selectedRow: SelectedRow): Component.DataTableAttributes & {
|
|
63
|
+
xMeasure?: QueryAttributes.Measure | null | undefined;
|
|
64
|
+
yMeasure?: QueryAttributes.Measure;
|
|
65
|
+
};
|
|
@@ -22,5 +22,7 @@ export declare type TableColumnTypes = {
|
|
|
22
22
|
last: boolean;
|
|
23
23
|
scope?: 'row' | 'column';
|
|
24
24
|
onResizedColumn: (options: TableColResizerType) => void;
|
|
25
|
+
isLastGroupColumn: boolean;
|
|
26
|
+
isFirstGroupColumn: boolean;
|
|
25
27
|
};
|
|
26
28
|
export declare const TableHeader: (props: TableColumnTypes) => JSX.Element;
|
|
@@ -3,8 +3,9 @@ import { DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
|
|
|
3
3
|
import { TableRepresentation } from '../../../../shared-logic/src/DataTable/types';
|
|
4
4
|
import { DataTableViewProps } from './DataTableView';
|
|
5
5
|
import { DataType } from '../../../../shared-logic/src/Field/types';
|
|
6
|
-
import {
|
|
7
|
-
export
|
|
6
|
+
import { QueryAttributes } from '../../../../shared-logic/src/QueryAttributes/types';
|
|
7
|
+
export * from './headerFormatting';
|
|
8
|
+
export declare const buildTableRepresentation: (type: string, result: ResultType | null | undefined, exportNames: DataTableViewProps['exportNames'] | undefined, prefixes: DataTableViewProps['prefixes'] | undefined, dateTimeFormat: DataTableViewProps['dateTimeFormat'] | undefined, dateTimeFormatOptions: DataTableViewProps['dateTimeFormatOptions'], numberFormat: DataTableViewProps['numberFormat'] | undefined, numberFormatOptions: DataTableViewProps['numberFormatOptions'], supportedAggregates: DashboardBehaviour['queryEngineConfig']['supportedAggregates'], supportedTimeTruncFunctions: DashboardBehaviour['queryEngineConfig']['supportedTimeTruncFunctions'], nullReplacement?: string | undefined, measure?: QueryAttributes.Measure[] | undefined, xMeasure?: QueryAttributes.Measure | null | undefined, yMeasure?: QueryAttributes.Measure | undefined, dimension?: QueryAttributes.Dimension[] | undefined) => TableRepresentation | null;
|
|
8
9
|
export declare const formatTableContent: (fields: Array<{
|
|
9
10
|
id: string;
|
|
10
11
|
dataType: DataType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableFields, TableRepresentation } from '../../../../shared-logic/src/DataTable/types';
|
|
2
|
+
import { QueryAttributes } from '../../../../shared-logic/src/QueryAttributes/types';
|
|
3
|
+
import { SupportedAggregates } from '../../../../shared-logic/src/Aggregate';
|
|
4
|
+
import { SupportedTimeTruncFunctions } from '../../../../shared-logic/src/TimeDimension/types';
|
|
5
|
+
export declare function getLastPivotColumn(tableRepresentation: TableRepresentation, dimension: QueryAttributes.Dimension[], supportedAggregates: SupportedAggregates, supportedTimeTruncFunctions: SupportedTimeTruncFunctions): import("../../../../shared-logic/src/Component/types").FormatType;
|
|
6
|
+
export declare function getFirstAndLastGroupColumns(tableRepresentation: TableRepresentation, field: TableFields): {
|
|
7
|
+
isLastGroupColumn: boolean;
|
|
8
|
+
isFirstGroupColumn: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function lastColumnGroupEmptySpace(tableRepresentation: TableRepresentation): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VizzlyComponents } from '../../types';
|
|
2
|
+
import { Component as ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { DataSet as DataSetType } from '../../../../shared-logic/src/DataSet/types';
|
|
4
|
+
import { Result } from '../../../../shared-logic/src/Result/types';
|
|
5
|
+
import { DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
|
|
6
|
+
import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
|
|
7
|
+
export declare type ProgressProps = {
|
|
8
|
+
runQueriesCallback: VizzlyComponents.runQueriesCallbackInternal;
|
|
9
|
+
component: ComponentType<ComponentType.ProgressAttributes>;
|
|
10
|
+
setResults: (results: (Result | null)[]) => void;
|
|
11
|
+
setLocalFilters: (localFilters: ComponentType['localFilters']) => void;
|
|
12
|
+
setParameterUpdate: (payload: ComponentType['updatesFromParameters']) => void;
|
|
13
|
+
globalFilters: AdditionalFilter[];
|
|
14
|
+
dataSet: DataSetType;
|
|
15
|
+
id: string;
|
|
16
|
+
dashboardBehaviour: DashboardBehaviour;
|
|
17
|
+
library?: boolean;
|
|
18
|
+
height?: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const Progress: (props: ProgressProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VizzlyComponents } from '../../types';
|
|
2
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { Result as ResultType } from '../../../../shared-logic/src/Result/types';
|
|
4
|
+
export declare type ProgressViewProps = Omit<VizzlyComponents.ViewProps<Component.ProgressAttributes>, 'result'> & {
|
|
5
|
+
results: Array<ResultType | null | undefined>;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const defaultProps: Omit<Component.ProgressAttributes, 'dataSetId'>;
|
|
9
|
+
declare const ProgressView: {
|
|
10
|
+
(props: ProgressViewProps): JSX.Element;
|
|
11
|
+
defaultProps: Pick<Component.ProgressAttributes, "filter" | "offset" | "measure" | "limit" | "type" | "viewId" | "displayTitle" | "displaySubject" | "protectedByOrganisation" | "conditionalFormattingRules" | "parameters" | "prefixes" | "progressType" | "formatter" | "postfixes" | "goals">;
|
|
12
|
+
};
|
|
13
|
+
export default ProgressView;
|
|
@@ -18,6 +18,6 @@ export declare const SingleStatValue: FunctionComponent<SingleStateValueProps &
|
|
|
18
18
|
export declare const defaultProps: Omit<Component.SingleStatAttributes, 'dataSetId'>;
|
|
19
19
|
declare const SingleStatView: {
|
|
20
20
|
(props: SingleStatViewProps): JSX.Element;
|
|
21
|
-
defaultProps: Pick<Component.SingleStatAttributes, "filter" | "fontSize" | "offset" | "measure" | "limit" | "type" | "viewId" | "displayTitle" | "displaySubject" | "protectedByOrganisation" | "conditionalFormattingRules" | "parameters" | "prefixes" | "
|
|
21
|
+
defaultProps: Pick<Component.SingleStatAttributes, "filter" | "fontSize" | "offset" | "measure" | "limit" | "type" | "viewId" | "displayTitle" | "displaySubject" | "protectedByOrganisation" | "conditionalFormattingRules" | "parameters" | "prefixes" | "formatter" | "postfixes" | "deltaTimeDimension">;
|
|
22
22
|
};
|
|
23
23
|
export default SingleStatView;
|
|
@@ -2,8 +2,5 @@ import { DashboardBehaviour } from './types';
|
|
|
2
2
|
export declare const defaultNumberFormatOptions: DashboardBehaviour['numberFormatOptions'];
|
|
3
3
|
export declare const DEFAULT_NUMBER_FORMAT_KEY = "default";
|
|
4
4
|
export declare const insertDefaultFormatting: (numberFormatOptions?: {
|
|
5
|
-
[id: string]:
|
|
6
|
-
formatter: (number: number | null | undefined, noValueReplacement?: string | undefined) => string;
|
|
7
|
-
description: string;
|
|
8
|
-
};
|
|
5
|
+
[id: string]: import("./types").NumberFormatter;
|
|
9
6
|
} | undefined) => DashboardBehaviour['numberFormatOptions'];
|
|
@@ -9,6 +9,7 @@ import { Component } from '../../../../shared-logic/src/Component/types';
|
|
|
9
9
|
import { Dashboard, SaveableDashboardDefinition } from '../../../../shared-logic/src/Dashboard/types';
|
|
10
10
|
import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
|
|
11
11
|
import { DateTimeFilterOptions } from '../../../../shared-logic/src/DateTime/types';
|
|
12
|
+
import { ConversationState } from '../../../../shared-logic/src/AI/types';
|
|
12
13
|
declare type OverrideDeveloperInfo = {
|
|
13
14
|
overrideKey: string;
|
|
14
15
|
componentProps: any;
|
|
@@ -18,7 +19,7 @@ declare type DateTimeFormatter = {
|
|
|
18
19
|
formatter: (date: Date) => string;
|
|
19
20
|
description: string;
|
|
20
21
|
};
|
|
21
|
-
declare type NumberFormatter = {
|
|
22
|
+
export declare type NumberFormatter = {
|
|
22
23
|
formatter: (number: number | undefined | null, noValueReplacement?: string) => string;
|
|
23
24
|
description: string;
|
|
24
25
|
};
|
|
@@ -74,7 +75,11 @@ export declare type DashboardBehaviour = {
|
|
|
74
75
|
type: ComponentType;
|
|
75
76
|
}) => Array<FormatPanelSection | ((sectionProps: VizzlyComponents.EditorSectionProps<Component.Attributes>) => JSX.Element)>;
|
|
76
77
|
onError?: VizzlyComponents.OnError;
|
|
77
|
-
onAskAI?: (question: string,
|
|
78
|
+
onAskAI?: (question: string, conversationId: string | undefined, currentAttributes: Component.Attributes) => Promise<{
|
|
79
|
+
conversationId: ConversationState['conversationId'];
|
|
80
|
+
attributes: Component.Attributes;
|
|
81
|
+
messageHistory: ConversationState['messageHistory'];
|
|
82
|
+
}>;
|
|
78
83
|
parentDashboard?: (dataSets: DataSet[]) => Promise<Array<Partial<SaveableDashboardDefinition>>>;
|
|
79
84
|
onReset: () => Promise<Dashboard | null>;
|
|
80
85
|
onScheduledReportChange: (reportId: string, newCron: string | null) => Promise<'saved' | 'deleted' | null>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DashboardBehaviour } from '../contexts/DashboardBehaviour/types';
|
|
2
|
+
import { Component } from '../../../shared-logic/src/Component/types';
|
|
3
|
+
export declare const useAi: (attributes: Component.Attributes, onAskAI: DashboardBehaviour['onAskAI'], queryEngineConfig: DashboardBehaviour['queryEngineConfig'], setAttributes: (attributes: Component.Attributes) => void) => {
|
|
4
|
+
message: string;
|
|
5
|
+
conversationId: string | undefined;
|
|
6
|
+
messageState: "thinking" | "waitingForMessage";
|
|
7
|
+
messageHistory: {
|
|
8
|
+
content: string;
|
|
9
|
+
sender_type: "user" | "ai";
|
|
10
|
+
status: "active";
|
|
11
|
+
}[];
|
|
12
|
+
send: () => Promise<void>;
|
|
13
|
+
setMessage: (newMessage: string) => void;
|
|
14
|
+
};
|
|
@@ -11,3 +11,4 @@ export declare const SelectFilter: (props: any) => JSX.Element;
|
|
|
11
11
|
export declare const SingleStat: (props: any) => JSX.Element;
|
|
12
12
|
export declare const ComboChart: (props: any) => JSX.Element;
|
|
13
13
|
export declare const MercatorMap: (props: any) => JSX.Element;
|
|
14
|
+
export declare const ProgressIcon: () => JSX.Element;
|
|
@@ -20,6 +20,7 @@ declare type Props = VizzlyComponents.ManagePartialAttributes<{
|
|
|
20
20
|
filterOptions?: (options: ListViewItem<any>[]) => ListViewItem<any>[];
|
|
21
21
|
onNewMeasureFilterAggregate?: (field: DataSetType.Field) => SupportedAggregates;
|
|
22
22
|
label?: string;
|
|
23
|
+
disableRemove?: boolean;
|
|
23
24
|
};
|
|
24
25
|
export declare const MeasuresInput: (inputProps: Props) => JSX.Element;
|
|
25
26
|
export declare const isMeasureInProtectedFields: (fieldToCheck: QueryAttributes.Measure, arrayToSearch?: QueryAttributes.Measure[] | undefined) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { QueryAttributes } from '../../../../../shared-logic/src/QueryAttributes/types';
|
|
3
|
+
import { VizzlyComponents } from '../../../types';
|
|
4
|
+
import { ProgressGoalsSection as ProgressGoalsSectionType } from '../../../../../shared-logic/src/DataPanelConfig/types';
|
|
5
|
+
import { ProgressGoal, ProgressTypes } from '../../../../../shared-logic/src/Component/types';
|
|
6
|
+
declare type Props = VizzlyComponents.ComponentOverrides.Props.SectionProps<ProgressGoalsSectionType> & VizzlyComponents.EditorSectionProps<any>;
|
|
7
|
+
export declare type ProgressMetric = {
|
|
8
|
+
measure: QueryAttributes.Measure;
|
|
9
|
+
goal: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const ProgressInput: FunctionComponent<Props>;
|
|
12
|
+
export declare function buildUpdateProgressTypes(progressType: ProgressTypes[], field: string): ProgressTypes[];
|
|
13
|
+
export declare function buildUpdatedGoals(goals: ProgressGoal[], field: string, payload: ProgressMetric): ProgressGoal[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { DataSet as DataSetType } from '../../../../../shared-logic/src/DataSet/types';
|
|
3
|
+
import { ProgressMetric } from './ProgressInput';
|
|
4
|
+
export declare const ProgressModal: FunctionComponent<{
|
|
5
|
+
show: boolean;
|
|
6
|
+
onClose: (payload?: ProgressMetric) => void;
|
|
7
|
+
progressMetric?: ProgressMetric;
|
|
8
|
+
dataSet: DataSetType;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { VizzlyComponents } from '../../types';
|
|
3
|
+
import { ProgressGoalsSection as ProgressGoalsSectionType } from '../../../../shared-logic/src/DataPanelConfig/types';
|
|
4
|
+
declare type Props = VizzlyComponents.ComponentOverrides.Props.SectionProps<ProgressGoalsSectionType> & VizzlyComponents.EditorSectionProps<any>;
|
|
5
|
+
export declare const ProgressGoalsSection: FunctionComponent<Props>;
|
|
6
|
+
export {};
|
|
@@ -14,5 +14,6 @@ export declare type ResizableRowCellProps = {
|
|
|
14
14
|
onPickFromLibrary: (rowIndex: number, cellIndex: number) => void;
|
|
15
15
|
maxCSVDownloadLimit: number;
|
|
16
16
|
isBeingSizeAdjusted: boolean;
|
|
17
|
+
height?: number;
|
|
17
18
|
};
|
|
18
19
|
export declare const ResizableRowCell: (props: ResizableRowCellProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { VizzlyComponents } from '../../types';
|
|
3
|
+
import { ProgressTypesSection as ProgressTypesSectionType } from '../../../../shared-logic/src/FormatPanelConfig/types';
|
|
4
|
+
declare type Props = VizzlyComponents.ComponentOverrides.Props.SectionProps<ProgressTypesSectionType> & VizzlyComponents.EditorSectionProps<any>;
|
|
5
|
+
export declare const ProgressTypeSection: FunctionComponent<Props>;
|
|
6
|
+
export {};
|
|
@@ -6,7 +6,7 @@ declare type Props = {
|
|
|
6
6
|
dataSet: DataSet;
|
|
7
7
|
attributes: Component.Attributes;
|
|
8
8
|
queryEngineConfig: QueryEngineConfig;
|
|
9
|
-
|
|
9
|
+
setAttributes: (attributes: Component.Attributes) => void;
|
|
10
10
|
onAskAI: DashboardBehaviour['onAskAI'];
|
|
11
11
|
};
|
|
12
12
|
export declare const VizzlyAI: (props: Props) => JSX.Element;
|
|
@@ -77,6 +77,10 @@ export declare const css: (() => null) & {
|
|
|
77
77
|
(variantOptions: Object): string;
|
|
78
78
|
toString: any;
|
|
79
79
|
};
|
|
80
|
+
align: (textAlign: CSSProperties['textAlign']) => {
|
|
81
|
+
(variantOptions: Object): string;
|
|
82
|
+
toString: any;
|
|
83
|
+
};
|
|
80
84
|
};
|
|
81
85
|
export declare const coreCSS: (() => null) & {
|
|
82
86
|
button: CSSObject;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.1-dev-08483fa16723f74be9fe469b259ba89d05efa8de",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "rm -rf ./dist && tsdx build && yarn fix-type-alias",
|
|
21
21
|
"validate-ts": "tsc --noEmit",
|
|
22
22
|
"prepare": "yarn build",
|
|
23
|
-
"publish:canary": "yarn publish --access public --tag
|
|
23
|
+
"publish:canary": "yarn publish --access public --tag canary",
|
|
24
24
|
"test": "LANG=en_US.UTF-8 jest --config ./jest.config.js"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"file-saver": "^2.0.5",
|
|
42
42
|
"fuse.js": "^6.6.2",
|
|
43
43
|
"isomorphic-fetch": "^3.0.0",
|
|
44
|
-
"joi": "^17.7.0",
|
|
44
|
+
"@vizzly/joi": "^17.7.0",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
46
|
"lodash-es": "^4.17.21",
|
|
47
47
|
"react-dates-17": "22.0.4",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"react-visibility-sensor": "^5.1.1",
|
|
52
52
|
"topojson-client": "^3.1.0",
|
|
53
53
|
"twin.macro": "^3.0.0-rc.3",
|
|
54
|
-
"uuid": "^9.0.0"
|
|
54
|
+
"uuid": "^9.0.0",
|
|
55
|
+
"joi-to-json": "^4.0.1"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@babel/core": "^7.19.3",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DashboardProps, Property } from '../types';
|
|
2
|
-
import { loadDataSetsCallback } from '../../../shared-logic/src/Callbacks/types';
|
|
3
|
-
declare const dataSets: Property;
|
|
4
|
-
export default dataSets;
|
|
5
|
-
export declare const withReturnValidation: (props: DashboardProps) => loadDataSetsCallback;
|