@vizzly/dashboard 0.7.1 → 0.7.2-dev-dba36cbd0af6b3bcb07804673072c6fb5fb27a1f
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 +6 -12
- package/dist/dashboard/src/contexts/SessionContext/useSessionContext.d.ts +2 -0
- package/dist/dashboard/src/contexts/useDashboardAPI.d.ts +2 -1
- package/dist/dashboard/src/contexts/useDataConfigurationAndIdentity.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/shared-logic/src/AI/types.d.ts +25 -6
- package/dist/shared-logic/src/AdditionalFilter/AdditionalFilter.d.ts +4 -3
- package/dist/shared-logic/src/Aggregate/constants.d.ts +26 -0
- package/dist/shared-logic/src/AreaChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/BarChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/BasicTable/constants.d.ts +3 -0
- package/dist/shared-logic/src/ComboChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/Component/allViewConstants.d.ts +1 -0
- package/dist/shared-logic/src/Component/sharedSchemas.d.ts +6 -5
- package/dist/shared-logic/src/ComponentInterface/constants.d.ts +63 -0
- package/dist/shared-logic/src/ComponentInterface/namespaces.d.ts +3 -0
- package/dist/shared-logic/src/ComponentInterface/types/ComponentInterfaceConfig.d.ts +18 -0
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +104 -0
- package/dist/shared-logic/src/ComponentInterface/types.d.ts +4 -4
- package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +2 -1
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/creating.d.ts +2 -1
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/updating.d.ts +2 -1
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI.d.ts +1 -1
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +4 -5
- package/dist/shared-logic/src/DataSet/DataSet.d.ts +5 -0
- package/dist/shared-logic/src/DataSet/types.d.ts +1 -0
- package/dist/shared-logic/src/DataTable/constants.d.ts +3 -0
- package/dist/shared-logic/src/DateTime/DateTimeFilterOptions.d.ts +84 -4
- package/dist/shared-logic/src/Display/Display.d.ts +2 -2
- package/dist/shared-logic/src/Display/upcast.d.ts +2 -1
- package/dist/shared-logic/src/Documentation/index.d.ts +1 -0
- package/dist/shared-logic/src/Documentation/joiToAiDefinition.d.ts +5 -0
- package/dist/shared-logic/src/Dumpable.d.ts +2 -1
- package/dist/shared-logic/src/Field/Field.d.ts +6 -3
- package/dist/shared-logic/src/Field/types.d.ts +1 -0
- package/dist/shared-logic/src/HorizontalBarChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/JSQueryEngine/getMeasuresForPostAggregateMaths.d.ts +3 -0
- package/dist/shared-logic/src/LineChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/MercatorMap/constants.d.ts +3 -0
- package/dist/shared-logic/src/PieChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/Progress/constants.d.ts +3 -0
- package/dist/shared-logic/src/QueryAttributes/QueryAttributes.d.ts +2 -1
- package/dist/shared-logic/src/QueryAttributes/constants.d.ts +54 -0
- package/dist/shared-logic/src/QueryEngine/types.d.ts +1 -1
- package/dist/shared-logic/src/QueryEngineConfig/supportedConstants.d.ts +121 -0
- package/dist/shared-logic/src/ScatterChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/SingleStat/constants.d.ts +3 -0
- package/dist/shared-logic/src/Theme/types.d.ts +27 -0
- package/dist/shared-logic/src/TimeDimension/constants.d.ts +34 -0
- package/dist/shared-logic/src/Translations/extract/buildJsonFile.d.ts +2 -0
- package/dist/shared-logic/src/Translations/extract/buildTypes.d.ts +1 -0
- package/dist/shared-logic/src/Translations/extract/extractPanelConfig.d.ts +3 -0
- package/dist/shared-logic/src/Translations/extract/extractSupportedConstant.d.ts +6 -0
- package/dist/shared-logic/src/Translations/extract/func.d.ts +5 -0
- package/dist/shared-logic/src/Translations/extract/index.d.ts +4 -0
- package/dist/shared-logic/src/Translations/extract/shared.d.ts +10 -0
- package/dist/shared-logic/src/Translations/textOverrideComponent.d.ts +30 -0
- package/dist/shared-logic/src/Translations/translateQueryEngineConfig.d.ts +3 -0
- package/dist/shared-logic/src/Translations/translation.schema.d.ts +2 -0
- package/dist/shared-logic/src/Translations/translation.types.d.ts +4748 -0
- package/dist/shared-logic/src/Translations/translations.d.ts +9 -0
- package/dist/shared-logic/src/Translations/types.d.ts +13 -0
- package/dist/shared-logic/src/Translations/validation.d.ts +1 -0
- package/dist/shared-logic/src/api/index.d.ts +3 -9
- package/dist/shared-logic/src/api/vizzly/aiActions.d.ts +18 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/buildAIResponse.d.ts +5 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/buildDataSets.d.ts +4 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/checkAiResponseStatus.d.ts +3 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/types.d.ts +23 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/validateAndUpcastAIAttributes.d.ts +4 -0
- package/dist/shared-logic/src/api/vizzly/aiHelpers/view.d.ts +10 -0
- package/dist/shared-logic/src/api/vizzly/askAi.d.ts +2 -8
- package/dist/shared-logic/src/api/vizzly/askAiForQuestionSuggestions.d.ts +4 -0
- package/dist/shared-logic/src/errors/AIAborted.d.ts +4 -0
- package/dist/shared-logic/src/errors/AIContainsErrors.d.ts +4 -0
- package/dist/shared-logic/src/errors/AIFailedToFetch.d.ts +4 -0
- package/dist/shared-logic/src/errors/AIUsageLimitReached.d.ts +1 -1
- package/dist/shared-logic/src/errors/index.d.ts +5 -0
- package/dist/shared-logic/src/utils/stringHelper.d.ts +2 -1
- package/dist/shared-ui/src/base/Button/Button.d.ts +1 -0
- package/dist/shared-ui/src/base/ButtonGroup.d.ts +1 -1
- package/dist/shared-ui/src/base/Color/Swatch.d.ts +6 -0
- package/dist/shared-ui/src/base/CopyToClipboard/CopyButton.d.ts +4 -0
- package/dist/shared-ui/src/base/DateTime/DateOptionsPopup.d.ts +2 -0
- package/dist/shared-ui/src/base/DateTime/DateRangePicker.d.ts +2 -0
- package/dist/shared-ui/src/base/DateTime/DateTimeFilter.d.ts +3 -1
- package/dist/shared-ui/src/base/DateTime/DateTimeSelect.d.ts +5 -0
- package/dist/shared-ui/src/base/Dragging/useDropZone.d.ts +1 -1
- package/dist/shared-ui/src/base/Dropdown/Dropdown.styles.d.ts +1 -1
- package/dist/shared-ui/src/base/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/shared-ui/src/base/EmptyState/EmptyState.d.ts +1 -0
- package/dist/shared-ui/src/base/Icons/SVGs.d.ts +44 -1
- package/dist/shared-ui/src/base/Icons.d.ts +11 -0
- package/dist/shared-ui/src/base/InputWithAction.d.ts +30 -0
- package/dist/shared-ui/src/base/MultiSelect.d.ts +2 -0
- package/dist/shared-ui/src/base/Select/Control.d.ts +3 -0
- package/dist/shared-ui/src/base/Select/Control.styles.d.ts +3 -3
- package/dist/shared-ui/src/base/Select/Wrapper.d.ts +4 -0
- package/dist/shared-ui/src/base/Select.d.ts +4 -0
- package/dist/shared-ui/src/base/Table/Table.d.ts +2 -0
- package/dist/shared-ui/src/base/Table/TableComponents.d.ts +2 -0
- package/dist/shared-ui/src/base/classNames.d.ts +1 -0
- package/dist/shared-ui/src/base/layout/Grid.styles.d.ts +2 -0
- package/dist/shared-ui/src/base/layout/View.d.ts +2 -1
- package/dist/shared-ui/src/base/layout/View.styles.d.ts +1 -0
- package/dist/shared-ui/src/base/shared/ClearIcon.d.ts +2 -0
- package/dist/shared-ui/src/components/AI/AIEditor.d.ts +12 -0
- package/dist/shared-ui/src/components/AI/AIPrompts.d.ts +4 -0
- package/dist/shared-ui/src/components/AI/AIWindow.d.ts +12 -0
- package/dist/shared-ui/src/components/AI/Conversation.d.ts +23 -0
- package/dist/shared-ui/src/components/AI/ConversationOptions.d.ts +11 -0
- package/dist/shared-ui/src/components/AI/Typewriter.d.ts +14 -0
- package/dist/shared-ui/src/components/AdditionalFilter/labelWidth.d.ts +7 -0
- package/dist/shared-ui/src/components/ChartHelper.d.ts +3 -2
- package/dist/shared-ui/src/{library → components/Icons}/ComponentIcons.d.ts +3 -1
- package/dist/shared-ui/src/components/Icons/icons.func.d.ts +1 -0
- package/dist/shared-ui/src/components/Modals/DeleteModal.d.ts +1 -0
- package/dist/shared-ui/src/components/Studio/StudioContexts.d.ts +2 -0
- package/dist/shared-ui/src/components/Table/PrefixModal.d.ts +1 -1
- package/dist/shared-ui/src/contexts/AIProvider/context.d.ts +13 -0
- package/dist/shared-ui/src/contexts/AIProvider/types.d.ts +15 -0
- package/dist/shared-ui/src/contexts/DashboardBehaviour/context.d.ts +2 -1
- package/dist/shared-ui/src/contexts/DashboardBehaviour/logic.d.ts +2 -2
- package/dist/shared-ui/src/contexts/DashboardBehaviour/numberFormatOptions.d.ts +3 -3
- package/dist/shared-ui/src/contexts/DashboardBehaviour/types.d.ts +13 -8
- package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +1 -0
- package/dist/shared-ui/src/examples/component-overrides/components.d.ts +3 -0
- package/dist/shared-ui/src/headlessui/hooks/use-disposables.d.ts +1 -1
- package/dist/shared-ui/src/headlessui/utils/disposables.d.ts +1 -1
- package/dist/shared-ui/src/hooks/useAIAction.d.ts +9 -0
- package/dist/shared-ui/src/hooks/useAiWindow.d.ts +21 -0
- package/dist/shared-ui/src/library/ComboBox.d.ts +4 -0
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/MathModal/AggregateMath.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/buildInitOptions.d.ts +2 -1
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/customMetricText.d.ts +13 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput/AttributesToFields.d.ts +3 -2
- package/dist/shared-ui/src/library/DataPanel/FilterInput/FilterInputForm.d.ts +3 -1
- package/dist/shared-ui/src/library/DataPanel/FilterInput/IndividualFilter.d.ts +2 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput.d.ts +2 -0
- package/dist/shared-ui/src/library/DataPanel/SortInput/buildInitValues.d.ts +2 -1
- package/dist/shared-ui/src/library/DisplayStatusReport.d.ts +5 -0
- package/dist/shared-ui/src/library/Editor/useEditor.d.ts +2 -2
- package/dist/shared-ui/src/library/Editor.d.ts +0 -1
- package/dist/shared-ui/src/library/StylePanel/ConditionalFormatting/logic.d.ts +2 -1
- package/dist/shared-ui/src/library/effectHooks/useAutoScroll.d.ts +2 -0
- package/dist/shared-ui/src/library/effectHooks/useInitialAttributes.d.ts +2 -0
- package/dist/shared-ui/src/types.d.ts +59 -0
- package/package.json +2 -2
- package/dist/shared-logic/src/api/vizzly/askAi/types.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/askAi/validateAndUpcast.d.ts +0 -5
- package/dist/shared-ui/src/hooks/useAi.d.ts +0 -14
- package/dist/shared-ui/src/library/VizzlyAI.d.ts +0 -13
- package/dist/shared-ui/src/library/VizzlyAI.styles.d.ts +0 -6
- /package/dist/shared-ui/src/library/{useHeight.d.ts → effectHooks/useHeight.d.ts} +0 -0
- /package/dist/shared-ui/src/library/{useWidth.d.ts → effectHooks/useWidth.d.ts} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
|
|
4
|
+
import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
|
|
5
|
+
export declare const AIEditor: FunctionComponent<{
|
|
6
|
+
closeAI?: () => void;
|
|
7
|
+
setAttributes: (attributes: Component.Attributes) => void;
|
|
8
|
+
attributes: Component.Attributes;
|
|
9
|
+
dataSet: DataSet;
|
|
10
|
+
queryEngineConfig: QueryEngineConfig;
|
|
11
|
+
closed?: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
|
|
4
|
+
import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
|
|
5
|
+
export declare const AIWindow: FunctionComponent<{
|
|
6
|
+
closeAI?: () => void;
|
|
7
|
+
setAttributes: (attributes: Component.Attributes) => void;
|
|
8
|
+
attributes: Component.Attributes;
|
|
9
|
+
dataSet: DataSet;
|
|
10
|
+
queryEngineConfig: QueryEngineConfig;
|
|
11
|
+
closed?: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ReplyOptionsProps } from './ConversationOptions';
|
|
3
|
+
import { Message } from '../../../../shared-logic/src/AI/types';
|
|
4
|
+
export declare const Conversation: {
|
|
5
|
+
Replies: React.FunctionComponent<Message & {
|
|
6
|
+
onTypingEnd?: (() => void) | undefined;
|
|
7
|
+
options?: ReplyOptionsProps | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
Loading: () => JSX.Element;
|
|
10
|
+
Reply: (props: {
|
|
11
|
+
message?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
onTypingEnd?: (() => void) | undefined;
|
|
15
|
+
options?: ReplyOptionsProps;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
id: string;
|
|
18
|
+
}) => JSX.Element;
|
|
19
|
+
You: (props: {
|
|
20
|
+
message: string;
|
|
21
|
+
id: string;
|
|
22
|
+
}) => JSX.Element;
|
|
23
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export declare type ReplyOptionsProps = {
|
|
3
|
+
onReload?: () => void;
|
|
4
|
+
onThumbsUp?: () => void;
|
|
5
|
+
thumbsUp?: boolean;
|
|
6
|
+
onThumbsDown?: () => void;
|
|
7
|
+
thumbsDown?: boolean;
|
|
8
|
+
onSelect?: () => void;
|
|
9
|
+
['data-id']: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const ReplyOptions: FunctionComponent<ReplyOptionsProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
declare type TypewriterProps = {
|
|
3
|
+
message: string;
|
|
4
|
+
onTypingEnd?: () => void;
|
|
5
|
+
typingSpeed?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const Typewriter: FunctionComponent<TypewriterProps>;
|
|
8
|
+
declare type UseTypewriterProps = {
|
|
9
|
+
message: string;
|
|
10
|
+
typingSpeed?: number;
|
|
11
|
+
onTypingEnd?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const useTypewriter: ({ message, typingSpeed, onTypingEnd }: UseTypewriterProps) => string;
|
|
14
|
+
export {};
|
|
@@ -7,6 +7,7 @@ import { DashboardBehaviour } from '../contexts/DashboardBehaviour/types';
|
|
|
7
7
|
import { ConditionalFormattingOption } from '../../../charts/src/Legend/Legend';
|
|
8
8
|
import * as Dimension from '../../../shared-logic/src/Dimension';
|
|
9
9
|
import { ConditionalFormattingBoundary } from './DataTable/buildConditionalFormattingBoundaries';
|
|
10
|
+
import { TextOverride } from '../../../shared-logic/src/Translations/types';
|
|
10
11
|
declare type AxisLabelConfig = {
|
|
11
12
|
prefix?: string;
|
|
12
13
|
postfix?: string;
|
|
@@ -22,8 +23,8 @@ declare type Datum = {
|
|
|
22
23
|
export declare const getExplanationsOfConditionFormattingRulesThatApplyToSeries: (dimensions: QueryAttributesType.Dimension[], conditionalFormattingRules: ActualComponent.ConditionalFormatting.Rule[], seriesKey: string, supportedAggregates: DashboardBehaviour['queryEngineConfig']['supportedAggregates'], dataSet: DataSetType) => Array<ConditionalFormattingOption>;
|
|
23
24
|
export declare const applyConditionFormattingRules: (dimensions: QueryAttributesType.Dimension[], conditionalFormattingRules: ConditionalFormattingBoundary[], datum: Datum | undefined, key: string, dataSet: DataSetType) => ActualComponent.ConditionalFormatting.DisplayRule | undefined;
|
|
24
25
|
export declare const formatXAxisLabel: (timeDimension: QueryAttributesType.TimeDimension | null, supportedTimeTruncFunctions: QueryEngineConfig['supportedTimeTruncFunctions'], axisLabelConfig: AxisLabelConfig) => (value: any) => string;
|
|
25
|
-
export declare const formatYAxisLabel: (axisLabelConfig?: AxisLabelConfig | undefined) => (value: any) => string;
|
|
26
|
-
export declare const formatSeriesName: (result: ResultType | null | undefined) => (key: string) => string | undefined;
|
|
26
|
+
export declare const formatYAxisLabel: (textOverride: TextOverride, axisLabelConfig?: AxisLabelConfig | undefined) => (value: any) => string;
|
|
27
|
+
export declare const formatSeriesName: (result: ResultType | null | undefined, textOverride: TextOverride) => (key: string) => string | undefined;
|
|
27
28
|
export declare const convertValueToFormat: (value: any, numberFormatOptions?: {
|
|
28
29
|
[id: string]: import("../contexts/DashboardBehaviour/types").NumberFormatter;
|
|
29
30
|
} | undefined, format?: string | null | undefined) => any;
|
|
@@ -11,4 +11,6 @@ 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: (
|
|
14
|
+
export declare const ProgressIcon: (props?: {
|
|
15
|
+
color?: string | undefined;
|
|
16
|
+
} | undefined) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentTypeToIconMapping: any;
|
|
@@ -5,6 +5,7 @@ import { DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
|
|
|
5
5
|
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
|
|
6
6
|
import { IdentityConfig } from '../../../../shared-logic/src/IdentityConfig/types';
|
|
7
7
|
import { StudioState } from '../../contexts/DashboardContext/types';
|
|
8
|
+
import { AIFunctions } from '../../contexts/AIProvider/types';
|
|
8
9
|
export declare type StudioProps = {
|
|
9
10
|
vizzlyApiConfig?: VizzlyComponents.ApiConfig;
|
|
10
11
|
runQueriesCallback: VizzlyComponents.runQueriesCallback;
|
|
@@ -14,6 +15,7 @@ export declare type StudioProps = {
|
|
|
14
15
|
scope: DashboardBehaviour['scope'];
|
|
15
16
|
featureToggles?: Partial<DashboardBehaviour['featureToggles']>;
|
|
16
17
|
};
|
|
18
|
+
ai: AIFunctions;
|
|
17
19
|
includeComponents?: ComponentType[];
|
|
18
20
|
excludeComponents?: ComponentType[];
|
|
19
21
|
implementationMeta: VizzlyComponents.ImplementationMeta;
|
|
@@ -9,5 +9,5 @@ declare type Props = {
|
|
|
9
9
|
measures: QueryAttributes.Measure[];
|
|
10
10
|
onSave: (prefix: Component.DataTableAttributes['prefixes'][number]) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare function PrefixModal({ dataSet, isOpen, onClose, measures, onSave
|
|
12
|
+
export declare function PrefixModal({ dataSet, isOpen, onClose, measures, onSave }: Props): JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { AIFunctions, AISuggestions } from './types';
|
|
3
|
+
export declare const BACKUP_SUGGESTIONS: string[];
|
|
4
|
+
declare type AIProviderProps = AIFunctions;
|
|
5
|
+
declare type AIProvidedValues = AIFunctions & {
|
|
6
|
+
suggestions: AISuggestions;
|
|
7
|
+
};
|
|
8
|
+
export declare const AIContext: import("react").Context<{}>;
|
|
9
|
+
export declare const AIContextProvider: FunctionComponent<AIProviderProps & {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const useAIBehaviour: () => AIProvidedValues;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConversationState } from '../../../../shared-logic/src/AI/types';
|
|
2
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { AIActionReponse, AIOptions } from '../../../../shared-logic/src/api/vizzly/aiActions';
|
|
4
|
+
export declare type AIFunctions = {
|
|
5
|
+
onAsk: (question: string, conversationId: string | undefined, currentAttributes: Component.Attributes, abortSignal: AbortSignal) => Promise<OnAskAI>;
|
|
6
|
+
onAction: (conversationId: string, messageId: string, options: AIOptions) => Promise<OnAIAction>;
|
|
7
|
+
fetchSuggestions: () => Promise<AISuggestions>;
|
|
8
|
+
};
|
|
9
|
+
export declare type OnAskAI = {
|
|
10
|
+
conversationId: ConversationState['conversationId'];
|
|
11
|
+
attributes: Component.Attributes;
|
|
12
|
+
messageHistory: ConversationState['messageHistory'];
|
|
13
|
+
};
|
|
14
|
+
export declare type AISuggestions = string[];
|
|
15
|
+
export declare type OnAIAction = AIActionReponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DashboardBehaviour as DashboardBehaviourType } from './types';
|
|
2
|
+
import { DashboardBehaviour as DashboardBehaviourType, TextOverride } from './types';
|
|
3
3
|
import { Component, ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
4
4
|
import { VizzlyComponents } from '../../types';
|
|
5
5
|
import { Dashboard } from '../../../../shared-logic/src/Dashboard';
|
|
@@ -17,6 +17,7 @@ export interface DashboardBehaviourProps {
|
|
|
17
17
|
disableToolbar?: boolean;
|
|
18
18
|
cascadeFilterSelection?: boolean;
|
|
19
19
|
onReset: () => Promise<Dashboard | null>;
|
|
20
|
+
textOverride?: TextOverride;
|
|
20
21
|
}
|
|
21
22
|
declare type ProvidedValues = DashboardBehaviourType & {
|
|
22
23
|
setOverrideDeveloperInfo: (developerInfo: DashboardBehaviourType['overrideDeveloperInfo']) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DashboardBehaviour } from './types';
|
|
1
|
+
import { DashboardBehaviour, TextOverride } from './types';
|
|
2
2
|
import { FeatureToggles } from '../../../../shared-logic/src/FeatureToggle/types';
|
|
3
3
|
import { ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
4
4
|
export declare const DEFAULT_MAX_CSV_DOWNLOAD_SIZE = 10000;
|
|
5
5
|
export declare const base: DashboardBehaviour;
|
|
6
6
|
export declare const init: (overrides: Partial<Omit<DashboardBehaviour, 'featureToggles'> & {
|
|
7
7
|
featureToggles: Partial<FeatureToggles>;
|
|
8
|
-
}>, includeComponentTypes: ComponentType[] | undefined, excludeComponentTypes: ComponentType[] | undefined) => DashboardBehaviour;
|
|
8
|
+
}>, includeComponentTypes: ComponentType[] | undefined, excludeComponentTypes: ComponentType[] | undefined, textOverride: TextOverride) => DashboardBehaviour;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DashboardBehaviour } from './types';
|
|
2
|
-
export declare const defaultNumberFormatOptions: DashboardBehaviour['numberFormatOptions'];
|
|
1
|
+
import { DashboardBehaviour, TextOverride } from './types';
|
|
2
|
+
export declare const defaultNumberFormatOptions: (textOverride: TextOverride) => DashboardBehaviour['numberFormatOptions'];
|
|
3
3
|
export declare const DEFAULT_NUMBER_FORMAT_KEY = "default";
|
|
4
|
-
export declare const insertDefaultFormatting: (numberFormatOptions?: {
|
|
4
|
+
export declare const insertDefaultFormatting: (textOverride: TextOverride, numberFormatOptions?: {
|
|
5
5
|
[id: string]: import("./types").NumberFormatter;
|
|
6
6
|
} | undefined) => DashboardBehaviour['numberFormatOptions'];
|
|
@@ -9,7 +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 {
|
|
12
|
+
import { VizzlyTranslations } from '../../../../shared-logic/src/Translations/translation.types';
|
|
13
13
|
declare type OverrideDeveloperInfo = {
|
|
14
14
|
overrideKey: string;
|
|
15
15
|
componentProps: any;
|
|
@@ -26,6 +26,7 @@ export declare type NumberFormatter = {
|
|
|
26
26
|
export declare type DeveloperTools = {
|
|
27
27
|
theme?: boolean;
|
|
28
28
|
componentOverride?: boolean;
|
|
29
|
+
translationKeys?: boolean;
|
|
29
30
|
};
|
|
30
31
|
export declare type Scope = 'read' | 'read_write';
|
|
31
32
|
export declare type DashboardFilter = Omit<AdditionalFilter, 'managedByConfiguration'>;
|
|
@@ -55,11 +56,10 @@ export declare type DashboardBehaviour = {
|
|
|
55
56
|
dateFilterOptions: DateTimeFilterOptions;
|
|
56
57
|
overrideDeveloperInfo: OverrideDeveloperInfo | null;
|
|
57
58
|
maxCSVDownloadLimit: number;
|
|
58
|
-
textOverrides: Partial<{
|
|
59
|
+
textOverrides: Partial<VizzlyTranslations & {
|
|
59
60
|
'view.data-set-changed': string;
|
|
60
61
|
'view.resizing': string;
|
|
61
62
|
'view.failed-to-fetch-results': string;
|
|
62
|
-
'dashboard-filters.call-to-action': string;
|
|
63
63
|
'dashboard-filters.custom-range': string;
|
|
64
64
|
'editor.tab.heading.data': string;
|
|
65
65
|
'editor.tab.heading.format': string;
|
|
@@ -75,11 +75,6 @@ export declare type DashboardBehaviour = {
|
|
|
75
75
|
type: ComponentType;
|
|
76
76
|
}) => Array<FormatPanelSection | ((sectionProps: VizzlyComponents.EditorSectionProps<Component.Attributes>) => JSX.Element)>;
|
|
77
77
|
onError?: VizzlyComponents.OnError;
|
|
78
|
-
onAskAI?: (question: string, conversationId: string | undefined, currentAttributes: Component.Attributes) => Promise<{
|
|
79
|
-
conversationId: ConversationState['conversationId'];
|
|
80
|
-
attributes: Component.Attributes;
|
|
81
|
-
messageHistory: ConversationState['messageHistory'];
|
|
82
|
-
}>;
|
|
83
78
|
parentDashboard?: (dataSets: DataSet[]) => Promise<Array<Partial<SaveableDashboardDefinition>>>;
|
|
84
79
|
onReset: () => Promise<Dashboard | null>;
|
|
85
80
|
onScheduledReportChange: (reportId: string, newCron: string | null) => Promise<'saved' | 'deleted' | null>;
|
|
@@ -91,5 +86,15 @@ export declare type DashboardBehaviour = {
|
|
|
91
86
|
onViewClick?: (data: Component.OnViewClick) => void;
|
|
92
87
|
disableToolbar?: boolean;
|
|
93
88
|
cascadeFilterSelection?: boolean;
|
|
89
|
+
textOverride: TextOverride;
|
|
90
|
+
};
|
|
91
|
+
export declare type TextOverride = (key: string, defaultValue: string, options?: TranslationOptions) => string;
|
|
92
|
+
export declare type TranslationOptions = {
|
|
93
|
+
[key: string]: string | number | Pluralised;
|
|
94
|
+
};
|
|
95
|
+
export declare type Pluralised = {
|
|
96
|
+
count: number;
|
|
97
|
+
singular: string;
|
|
98
|
+
plural: string;
|
|
94
99
|
};
|
|
95
100
|
export {};
|
|
@@ -7,9 +7,12 @@ export declare const ConvertToVizzly: (() => null) & {
|
|
|
7
7
|
secondary?: boolean | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
onClick?: (() => void | Promise<boolean>) | undefined;
|
|
10
|
+
onMouseEnter?: (() => boolean | void | Promise<boolean>) | undefined;
|
|
10
11
|
error?: boolean | undefined;
|
|
11
12
|
isLoading?: boolean | undefined;
|
|
12
13
|
success?: boolean | undefined;
|
|
14
|
+
suppressed?: boolean | undefined;
|
|
13
15
|
type?: "button" | "submit" | undefined;
|
|
16
|
+
icon?: VizzlyComponents.ComponentOverrides.Props.ButtonIcon | undefined;
|
|
14
17
|
}>>;
|
|
15
18
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function useDisposables(): {
|
|
2
2
|
enqueue(fn: Function): void;
|
|
3
|
-
addEventListener<TEventName extends "resize" | "scroll" | "progress" | "reset" | "drag" | "submit" | "select" | "input" | "error" | "mousedown" | "readystatechange" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "
|
|
3
|
+
addEventListener<TEventName extends "resize" | "scroll" | "progress" | "reset" | "drag" | "submit" | "select" | "input" | "error" | "cancel" | "close" | "mousedown" | "readystatechange" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "canplay" | "canplaythrough" | "change" | "click" | "contextmenu" | "cuechange" | "dblclick" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "ratechange" | "securitypolicyviolation" | "seeked" | "seeking" | "selectionchange" | "selectstart" | "stalled" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "afterprint" | "beforeprint" | "beforeunload" | "compassneedscalibration" | "devicelight" | "devicemotion" | "deviceorientation" | "deviceorientationabsolute" | "hashchange" | "message" | "mousewheel" | "MSGestureChange" | "MSGestureDoubleTap" | "MSGestureEnd" | "MSGestureHold" | "MSGestureStart" | "MSGestureTap" | "MSInertiaStart" | "MSPointerCancel" | "MSPointerDown" | "MSPointerEnter" | "MSPointerLeave" | "MSPointerMove" | "MSPointerOut" | "MSPointerOver" | "MSPointerUp" | "offline" | "online" | "orientationchange" | "pagehide" | "pageshow" | "popstate" | "storage" | "unload" | "vrdisplayactivate" | "vrdisplayblur" | "vrdisplayconnect" | "vrdisplaydeactivate" | "vrdisplaydisconnect" | "vrdisplayfocus" | "vrdisplaypointerrestricted" | "vrdisplaypointerunrestricted" | "vrdisplaypresentchange" | "languagechange" | "messageerror" | "rejectionhandled" | "unhandledrejection">(element: Document | HTMLElement, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions | undefined): () => void;
|
|
4
4
|
requestAnimationFrame(callback: FrameRequestCallback): () => void;
|
|
5
5
|
nextFrame(callback: FrameRequestCallback): () => void;
|
|
6
6
|
setTimeout(callback: (args: void) => void, ms?: number | undefined): () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function disposables(): {
|
|
2
2
|
enqueue(fn: Function): void;
|
|
3
|
-
addEventListener<TEventName extends "resize" | "scroll" | "progress" | "reset" | "drag" | "submit" | "select" | "input" | "error" | "mousedown" | "readystatechange" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "
|
|
3
|
+
addEventListener<TEventName extends "resize" | "scroll" | "progress" | "reset" | "drag" | "submit" | "select" | "input" | "error" | "cancel" | "close" | "mousedown" | "readystatechange" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "canplay" | "canplaythrough" | "change" | "click" | "contextmenu" | "cuechange" | "dblclick" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "ratechange" | "securitypolicyviolation" | "seeked" | "seeking" | "selectionchange" | "selectstart" | "stalled" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "afterprint" | "beforeprint" | "beforeunload" | "compassneedscalibration" | "devicelight" | "devicemotion" | "deviceorientation" | "deviceorientationabsolute" | "hashchange" | "message" | "mousewheel" | "MSGestureChange" | "MSGestureDoubleTap" | "MSGestureEnd" | "MSGestureHold" | "MSGestureStart" | "MSGestureTap" | "MSInertiaStart" | "MSPointerCancel" | "MSPointerDown" | "MSPointerEnter" | "MSPointerLeave" | "MSPointerMove" | "MSPointerOut" | "MSPointerOver" | "MSPointerUp" | "offline" | "online" | "orientationchange" | "pagehide" | "pageshow" | "popstate" | "storage" | "unload" | "vrdisplayactivate" | "vrdisplayblur" | "vrdisplayconnect" | "vrdisplaydeactivate" | "vrdisplaydisconnect" | "vrdisplayfocus" | "vrdisplaypointerrestricted" | "vrdisplaypointerunrestricted" | "vrdisplaypresentchange" | "languagechange" | "messageerror" | "rejectionhandled" | "unhandledrejection">(element: HTMLElement | Document, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions | undefined): () => void;
|
|
4
4
|
requestAnimationFrame(callback: FrameRequestCallback): () => void;
|
|
5
5
|
nextFrame(callback: FrameRequestCallback): () => void;
|
|
6
6
|
setTimeout(callback: (args: void) => void, ms?: number | undefined): () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AIReaction } from '../../../shared-logic/src/AI/types';
|
|
2
|
+
import { AIFunctions } from '../contexts/AIProvider/types';
|
|
3
|
+
export declare const useAIAction: (onAction: AIFunctions['onAction'], conversationId?: string | undefined) => {
|
|
4
|
+
reactions?: {
|
|
5
|
+
messageId: string;
|
|
6
|
+
reaction: AIReaction;
|
|
7
|
+
}[] | undefined;
|
|
8
|
+
sendReaction: (messageId: string, reaction: AIReaction) => Promise<void>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DashboardBehaviour } from '../contexts/DashboardBehaviour/types';
|
|
2
|
+
import { Component } from '../../../shared-logic/src/Component/types';
|
|
3
|
+
import { AIFeedback, MessageState } from '../../../shared-logic/src/AI/types';
|
|
4
|
+
import { AIFunctions } from '../contexts/AIProvider/types';
|
|
5
|
+
export declare const useAiWindow: (attributes: Component.Attributes, onAskAI: AIFunctions['onAsk'], queryEngineConfig: DashboardBehaviour['queryEngineConfig'], setAttributes: (attributes: Component.Attributes) => void) => {
|
|
6
|
+
feedback: {
|
|
7
|
+
error: AIFeedback;
|
|
8
|
+
message?: string | undefined;
|
|
9
|
+
} | undefined;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
message: string;
|
|
12
|
+
conversationId: string | undefined;
|
|
13
|
+
messageState: MessageState;
|
|
14
|
+
messageHistory: import("../../../shared-logic/src/AI/types").Message[];
|
|
15
|
+
send: (options?: {
|
|
16
|
+
message?: string | undefined;
|
|
17
|
+
} | undefined) => Promise<{
|
|
18
|
+
status: string;
|
|
19
|
+
}>;
|
|
20
|
+
setMessage: (newMessage: string) => void;
|
|
21
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SelectOption } from '../base/Select/Select.types';
|
|
2
2
|
import { AsyncSelectOptions } from '../base/Select/types';
|
|
3
|
+
import { TextOverride } from '../../../shared-logic/src/Translations/types';
|
|
3
4
|
declare type Props = {
|
|
4
5
|
currentValue: string | number | null;
|
|
5
6
|
options: SelectOption[] | AsyncSelectOptions;
|
|
@@ -8,6 +9,9 @@ declare type Props = {
|
|
|
8
9
|
maintainOptionOrder?: boolean;
|
|
9
10
|
anchorLeft?: boolean;
|
|
10
11
|
showClearBtn?: boolean;
|
|
12
|
+
textOverride?: TextOverride;
|
|
13
|
+
id?: string;
|
|
14
|
+
labelWidth?: number;
|
|
11
15
|
};
|
|
12
16
|
export declare const Combobox: (props: Props) => JSX.Element;
|
|
13
17
|
export {};
|
|
@@ -2,7 +2,7 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { WipMathField } from './types';
|
|
3
3
|
import { DataSet as DataSetType } from '../../../../../../shared-logic/src/DataSet/types';
|
|
4
4
|
export declare const AddRemoveButton: FunctionComponent<{
|
|
5
|
-
state: '
|
|
5
|
+
state: 'add' | 'remove';
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
}>;
|
|
8
8
|
export declare const CalculationReview: FunctionComponent<Omit<WipMathField, 'publicName' | 'mathType'> & {
|
|
@@ -3,5 +3,6 @@ import { InitValue } from '../../../base/ListView/ListView';
|
|
|
3
3
|
import { FeatureToggles } from '../../../../../shared-logic/src/FeatureToggle/types';
|
|
4
4
|
import { ComponentType } from '../../../../../shared-logic/src/Component/types';
|
|
5
5
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
|
-
|
|
6
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
7
|
+
declare const buildInitOptions: (featureToggles: FeatureToggles, componentType: ComponentType, queryEngineConfig: QueryEngineConfig, textOverride: TextOverride) => InitValue<CustomFieldCategory>[];
|
|
7
8
|
export default buildInitOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
2
|
+
interface TextOverrideKeys {
|
|
3
|
+
math: string;
|
|
4
|
+
'rules-based_groups': string;
|
|
5
|
+
percentage: string;
|
|
6
|
+
number_formatting: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function customMetricText<K extends keyof TextOverrideKeys>(key: K, textOverride: TextOverride): {
|
|
9
|
+
title: string;
|
|
10
|
+
subtext: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function buildCustomMetricTitle<K extends keyof TextOverrideKeys>(key: K, textOverride: TextOverride): string;
|
|
13
|
+
export {};
|
|
@@ -2,7 +2,8 @@ import { DataSet as DataSetType } from '../../../../../shared-logic/src/DataSet/
|
|
|
2
2
|
import * as Measure from '../../../../../shared-logic/src/Measure';
|
|
3
3
|
import { QueryAttributes as QueryAttributesType } from '../../../../../shared-logic/src/QueryAttributes/types';
|
|
4
4
|
import { FilterFieldType } from './types';
|
|
5
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
5
6
|
export declare const dimensionToFields: (dataSet: DataSetType, dimension: QueryAttributesType.Dimension[]) => FilterFieldType[];
|
|
6
|
-
export declare const measuresToFields: (dataSet: DataSetType, measures: QueryAttributesType.Measure[], enableChangeToNumber: boolean) => FilterFieldType[];
|
|
7
|
-
export declare const attributesToFields: (dataSet: DataSetType, dimension: QueryAttributesType.Dimension[], measures: QueryAttributesType.Measure[], enableChangeToNumber: boolean) => FilterFieldType[];
|
|
7
|
+
export declare const measuresToFields: (dataSet: DataSetType, measures: QueryAttributesType.Measure[], enableChangeToNumber: boolean, textOverride: TextOverride) => FilterFieldType[];
|
|
8
|
+
export declare const attributesToFields: (dataSet: DataSetType, dimension: QueryAttributesType.Dimension[], measures: QueryAttributesType.Measure[], enableChangeToNumber: boolean, textOverride: TextOverride) => FilterFieldType[];
|
|
8
9
|
export declare function adjustFieldForCountAndUnique(dataSetField: DataSetType.Field, fieldFunction: string, enableChangeToNumber?: boolean): DataSetType.Field;
|
|
@@ -3,8 +3,9 @@ import { DataSet as DataSetType } from '../../../../../shared-logic/src/DataSet/
|
|
|
3
3
|
import { FilterFieldType, WipFilter } from './types';
|
|
4
4
|
import 'twin.macro';
|
|
5
5
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
6
7
|
export declare const FilterInputForm: (props: {
|
|
7
|
-
fieldHeadingOverride?:
|
|
8
|
+
fieldHeadingOverride?: string | undefined;
|
|
8
9
|
wipFilters: WipFilter[][];
|
|
9
10
|
completedFilters: QueryAttributes.Filter[][];
|
|
10
11
|
dataSet: DataSetType;
|
|
@@ -13,4 +14,5 @@ export declare const FilterInputForm: (props: {
|
|
|
13
14
|
queryEngineConfig: QueryEngineConfig;
|
|
14
15
|
overrideFieldOptions?: FilterFieldType[] | undefined;
|
|
15
16
|
maxOrFilters?: number | undefined;
|
|
17
|
+
textOverride: TextOverride;
|
|
16
18
|
}) => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DataSet } from '../../../../../shared-logic/src/DataSet/types';
|
|
2
2
|
import { FilterFieldType, WipFilter } from './types';
|
|
3
3
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
4
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
4
5
|
export declare const IndividualFilter: (props: {
|
|
5
6
|
onChange: (filter: WipFilter) => void;
|
|
6
7
|
onDelete: () => void;
|
|
@@ -12,4 +13,5 @@ export declare const IndividualFilter: (props: {
|
|
|
12
13
|
removeDisabled?: boolean | undefined;
|
|
13
14
|
overrideFieldOptions?: FilterFieldType[] | undefined;
|
|
14
15
|
hideRemove?: boolean | undefined;
|
|
16
|
+
textOverride: TextOverride;
|
|
15
17
|
}) => JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { VizzlyComponents } from '../../types';
|
|
2
2
|
import 'twin.macro';
|
|
3
3
|
import { QueryAttributes } from '../../../../shared-logic/src/QueryAttributes/types';
|
|
4
|
+
import { TextOverride } from '../../../../shared-logic/src/Translations/types';
|
|
4
5
|
declare type ManagedProps = {
|
|
5
6
|
filter: QueryAttributes.Filter[][];
|
|
6
7
|
};
|
|
7
8
|
export declare type Props = VizzlyComponents.ManagePartialAttributes<ManagedProps> & {
|
|
8
9
|
defaultOpen?: boolean;
|
|
10
|
+
textOverride: TextOverride;
|
|
9
11
|
};
|
|
10
12
|
export declare const FilterInput: (inputProps: Props) => JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryAttributes as QueryAttributesType } from '../../../../../shared-logic/src/QueryAttributes/types';
|
|
2
2
|
import { InitValue } from '../../../base/ListView/ListView';
|
|
3
3
|
import { DataSet as DataSetType } from '../../../../../shared-logic/src/DataSet/types';
|
|
4
|
-
|
|
4
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
5
|
+
declare const _default: (dataSet: DataSetType, timeDimension: QueryAttributesType['timeDimension'], measure: QueryAttributesType['measure'], dimension: QueryAttributesType['dimension'], createNewSort: (fieldId: string, func: string) => void, textOverride: TextOverride) => Array<InitValue<any>>;
|
|
5
6
|
export default _default;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import 'twin.macro';
|
|
2
2
|
import { QueryEngineStatusReport } from '../../../shared-logic/src/QueryEngine/types';
|
|
3
|
+
export declare const STRATEGY_TO_TITLE: {
|
|
4
|
+
dynamic: string;
|
|
5
|
+
vizzlyApiStore: string;
|
|
6
|
+
static: string;
|
|
7
|
+
};
|
|
3
8
|
export declare const DisplayStatusReport: (props: {
|
|
4
9
|
statusReport: QueryEngineStatusReport;
|
|
5
10
|
}) => JSX.Element;
|
|
@@ -5,7 +5,7 @@ export declare type Origin = 'dashboard' | 'library';
|
|
|
5
5
|
import { Component, Component as ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
6
6
|
import { DataSet as DataSetType } from '../../../../shared-logic/src/DataSet/types';
|
|
7
7
|
import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
|
|
8
|
-
import { DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
|
|
8
|
+
import { DashboardBehaviour, TextOverride } from '../../contexts/DashboardBehaviour/types';
|
|
9
9
|
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
|
|
10
10
|
import { Result } from '../../../../shared-logic/src/Result/types';
|
|
11
11
|
import { StudioAction, StudioState } from '../../contexts/DashboardContext/types';
|
|
@@ -22,7 +22,6 @@ declare type ProvidedValues = {
|
|
|
22
22
|
viewOptions: DashboardBehaviour['onlyViewTypes'];
|
|
23
23
|
onSelectViewType: (viewType: ComponentType['attributes']['type']) => void;
|
|
24
24
|
numberFormatOptions: DashboardBehaviour['numberFormatOptions'];
|
|
25
|
-
onAskAI: DashboardBehaviour['onAskAI'];
|
|
26
25
|
setAttributes: (attributes: ComponentType.Attributes) => void;
|
|
27
26
|
setLocalFilters: (localFilters: Component['localFilters']) => void;
|
|
28
27
|
setParameterUpdate: (localFilters: Component['updatesFromParameters']) => void;
|
|
@@ -35,6 +34,7 @@ declare type ProvidedValues = {
|
|
|
35
34
|
broadcastEvent: VizzlyComponents.onEventCallback;
|
|
36
35
|
runQueriesCallback: VizzlyComponents.runQueriesCallbackInternal;
|
|
37
36
|
dispatch: React.Dispatch<StudioAction>;
|
|
37
|
+
textOverride: TextOverride;
|
|
38
38
|
};
|
|
39
39
|
declare const useEditor: () => ProvidedValues | null;
|
|
40
40
|
export default useEditor;
|
|
@@ -4,7 +4,8 @@ import { QueryAttributes as QueryAttributesType } from '../../../../../shared-lo
|
|
|
4
4
|
import { SelectOption } from '../../../base/Select/Select.types';
|
|
5
5
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
6
|
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
7
|
-
|
|
7
|
+
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
8
|
+
export declare const measuresToOptions: (dataSet: DataSetType, measures: QueryAttributesType.Measure[], textOverride: TextOverride) => SelectOption[];
|
|
8
9
|
export declare const dimensionToOptions: (dataSet: DataSetType, dimension: QueryAttributesType.Dimension[]) => SelectOption[];
|
|
9
10
|
export declare const resultFieldDataType: (dataSet: DataSetType, fieldId: string, queryEngineConfig: QueryEngineConfig) => DataType;
|
|
10
11
|
export declare const operatorOptions: (dataSet: DataSetType, fieldId: string | undefined, queryEngineConfig: QueryEngineConfig) => SelectOption[];
|