@sisense/sdk-ui 1.28.0 → 1.30.0
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/ai.cjs +51 -51
- package/dist/ai.js +1177 -1122
- package/dist/analytics-composer.cjs +20 -20
- package/dist/analytics-composer.js +180 -182
- package/dist/{derive-chart-family-BYdyoe8O.js → derive-chart-family-B2J2kMs6.js} +15299 -15416
- package/dist/{derive-chart-family-BNu7PP-p.cjs → derive-chart-family-Bmg9hQGc.cjs} +102 -102
- package/dist/index.cjs +252 -121
- package/dist/index.js +12548 -10364
- package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +2 -1
- package/dist/packages/sdk-ui/src/ai/api/chat-api-provider.d.ts +2 -1
- package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +5 -3
- package/dist/packages/sdk-ui/src/ai/api/hooks.d.ts +4 -3
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +6 -1
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +10 -1
- package/dist/packages/sdk-ui/src/ai/chat-box.d.ts +3 -1
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -1
- package/dist/packages/sdk-ui/src/ai/chat-id-storage-provider.d.ts +12 -0
- package/dist/packages/sdk-ui/src/ai/use-chat-session.d.ts +4 -3
- package/dist/packages/sdk-ui/src/ai/use-get-chat.d.ts +6 -0
- package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +2 -0
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +3 -2
- package/dist/packages/sdk-ui/src/ai/use-last-nlq-response.d.ts +4 -2
- package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +0 -1
- package/dist/packages/sdk-ui/src/area-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/areamap-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/boxplot-utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-data-options/coloring/range-coloring.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +6 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/advanced-chart-options.d.ts +3 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/subtype-to-design-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +5 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -1
- package/dist/packages/sdk-ui/src/common/components/button.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/components/popover.d.ts +23 -0
- package/dist/packages/sdk-ui/src/common/components/radio.d.ts +8 -0
- package/dist/packages/sdk-ui/src/common/hooks/use-combined-menu.d.ts +3 -4
- package/dist/packages/sdk-ui/src/common/hooks/use-debounced-value.d.ts +5 -0
- package/dist/packages/sdk-ui/src/const.d.ts +3 -0
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +4 -4
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +4 -5
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +7 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/search-input.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +17 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/multi-select-item.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +14 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +14 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select-item.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select.d.ts +14 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/types.d.ts +7 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/utils.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/selectable-section.d.ts +10 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +12 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/multi-select-control.d.ts +7 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/include-all-section.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/members-section.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/text-condition-section.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/arrow-down-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/check-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/pencil-icon.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/search-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/helpers.d.ts +1 -122
- package/dist/packages/sdk-ui/src/filters/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-totals-formatter.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-builder.d.ts +7 -0
- package/dist/packages/sdk-ui/src/props.d.ts +15 -15
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +33 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +66 -0
- package/dist/packages/sdk-ui/src/types.d.ts +37 -2
- package/dist/packages/sdk-ui/src/utils/filter-relations.d.ts +30 -72
- package/dist/packages/sdk-ui/src/widget-by-id/dashboard-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +1 -2
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +15 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +2 -57
- package/dist/{useQuery-CwqhrvKr.js → useQuery-1ixYW8qO.js} +27765 -27713
- package/dist/useQuery-Ctzmd-JM.cjs +916 -0
- package/dist/{widget-composer-BvJFwTM1.cjs → widget-composer-CdxKUwZf.cjs} +18 -10
- package/dist/{widget-composer-CAmaQCTo.js → widget-composer-Ch2kYMok.js} +115 -105
- package/package.json +7 -7
- package/dist/useQuery-7UcSPq8U.cjs +0 -915
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type AiContextProviderProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
volatile?: boolean;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
6
7
|
* React component that wraps all generative AI components and hooks.
|
|
@@ -27,4 +28,4 @@ export type AiContextProviderProps = {
|
|
|
27
28
|
* @group Generative AI
|
|
28
29
|
* @beta
|
|
29
30
|
*/
|
|
30
|
-
export default function AiContextProvider({ children }: AiContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default function AiContextProvider({ children, volatile }: AiContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,7 @@ export declare const useChatApi: () => ChatRestApi | undefined;
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
export declare const ChatApiProvider: ({ children }: {
|
|
15
|
+
export declare const ChatApiProvider: ({ children, volatile, }: {
|
|
16
16
|
children: ReactNode;
|
|
17
|
+
volatile?: boolean | undefined;
|
|
17
18
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import type { Chat, ChatRequest, ChatResponse, ChatWithoutHistory, ChatContext, GetNlgInsightsRequest, GetNlgInsightsResponse, LlmConfig, QueryRecommendationConfig, QueryRecommendationResponse, SendFeedbackRequest, GetNlqResultRequest, NlqResult } from './types';
|
|
3
3
|
import { DataSourceField } from '@sisense/sdk-data';
|
|
4
|
+
import { ChatContextDetails } from '../../ai/api/types';
|
|
4
5
|
export declare class ChatRestApi {
|
|
6
|
+
private readonly volatile;
|
|
5
7
|
private httpClient;
|
|
6
|
-
constructor(httpClient: HttpClient);
|
|
8
|
+
constructor(httpClient: HttpClient, volatile?: boolean);
|
|
7
9
|
getChatContexts: () => Promise<ChatContext[]>;
|
|
8
10
|
private getNlgInsights;
|
|
9
11
|
private getQueryRecommendations;
|
|
@@ -24,9 +26,9 @@ export declare class ChatRestApi {
|
|
|
24
26
|
sendFeedback: (request: SendFeedbackRequest) => Promise<unknown>;
|
|
25
27
|
getDataSourceFields: (dataSource: string) => Promise<DataSourceField[] | undefined>;
|
|
26
28
|
chat: {
|
|
27
|
-
getAll: () => Promise<ChatWithoutHistory[] | undefined>;
|
|
29
|
+
getAll: () => Promise<never[] | ChatWithoutHistory[] | undefined>;
|
|
28
30
|
getById: (chatId: string) => Promise<Chat | undefined>;
|
|
29
|
-
create: (sourceId: string) => Promise<Chat | undefined>;
|
|
31
|
+
create: (sourceId: string, contextDetails?: ChatContextDetails) => Promise<Chat | undefined>;
|
|
30
32
|
post: (chatId: string, request: ChatRequest) => Promise<ChatResponse | undefined>;
|
|
31
33
|
clearHistory: (chatId: string) => Promise<void | undefined>;
|
|
32
34
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ChatResponse } from './types';
|
|
1
|
+
import type { ChatResponse, ChatContextDetails } from './types';
|
|
2
|
+
import { TranslatableError } from '../../translation/translatable-error';
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*/
|
|
@@ -17,8 +18,8 @@ export declare const useGetAllChats: () => {
|
|
|
17
18
|
/**
|
|
18
19
|
* @internal
|
|
19
20
|
*/
|
|
20
|
-
export declare const useMaybeCreateChat: (contextId: string | undefined, shouldCreate: boolean) => import("@tanstack/react-query").UseMutationResult<import("./types").Chat | undefined, unknown, void, unknown>;
|
|
21
|
+
export declare const useMaybeCreateChat: (contextId: string | undefined, shouldCreate: boolean, contextDetails?: ChatContextDetails) => import("@tanstack/react-query").UseMutationResult<import("./types").Chat | undefined, unknown, void, unknown>;
|
|
21
22
|
export declare const useSendChatMessage: (chatId: string | undefined, enableFollowupQuestions?: boolean) => {
|
|
22
|
-
mutate: import("@tanstack/react-query").UseMutateFunction<ChatResponse | undefined,
|
|
23
|
+
mutate: import("@tanstack/react-query").UseMutateFunction<ChatResponse | undefined, TranslatableError, string, void>;
|
|
23
24
|
isLoading: boolean;
|
|
24
25
|
};
|
|
@@ -4,6 +4,9 @@ export interface ChatContext {
|
|
|
4
4
|
title: string;
|
|
5
5
|
live: boolean;
|
|
6
6
|
}
|
|
7
|
+
export interface ChatContextDetails {
|
|
8
|
+
dashboardId?: string;
|
|
9
|
+
}
|
|
7
10
|
export interface TextMessage {
|
|
8
11
|
role: 'assistant';
|
|
9
12
|
content: string;
|
|
@@ -23,7 +26,8 @@ export interface Chat {
|
|
|
23
26
|
chatId: string;
|
|
24
27
|
contextId: string;
|
|
25
28
|
contextTitle: string;
|
|
26
|
-
|
|
29
|
+
contextDetails?: ChatContextDetails;
|
|
30
|
+
expireAt: string;
|
|
27
31
|
tenantId: string;
|
|
28
32
|
userId: string;
|
|
29
33
|
chatHistory: ChatMessage[];
|
|
@@ -78,6 +82,7 @@ export type QueryRecommendation = Omit<NlqResponseData, 'followupQuestions'>;
|
|
|
78
82
|
export type QueryRecommendationResponse = QueryRecommendation[];
|
|
79
83
|
export interface GetNlgInsightsRequest {
|
|
80
84
|
jaql: Pick<JaqlQueryPayload, 'datasource' | 'metadata' | 'filterRelations'>;
|
|
85
|
+
verbosity?: 'Low' | 'High';
|
|
81
86
|
}
|
|
82
87
|
export interface GetNlgInsightsResponse {
|
|
83
88
|
data?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Filter, Data } from '@sisense/sdk-data';
|
|
2
2
|
import type { NlqResponseData } from '../../ai';
|
|
3
|
+
import { NlqChartWidgetStyleOptions } from '../../types';
|
|
3
4
|
/**
|
|
4
5
|
* Props for {@link NlqChartWidget} component.
|
|
5
6
|
*
|
|
@@ -20,6 +21,14 @@ export interface NlqChartWidgetProps {
|
|
|
20
21
|
* Can be used to inject modification of queried data.
|
|
21
22
|
*/
|
|
22
23
|
onDataReady?: (data: Data) => Data;
|
|
24
|
+
/**
|
|
25
|
+
* Boolean flag to show or hide the widget header
|
|
26
|
+
*
|
|
27
|
+
* Note: set to 'false' to hide the widget header
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
styleOptions?: NlqChartWidgetStyleOptions;
|
|
23
32
|
}
|
|
24
33
|
/**
|
|
25
34
|
* React component that renders a chart widget based on NLQ response data.
|
|
@@ -43,4 +52,4 @@ export interface NlqChartWidgetProps {
|
|
|
43
52
|
* @group Generative AI
|
|
44
53
|
* @internal
|
|
45
54
|
*/
|
|
46
|
-
export declare const NlqChartWidget: ({ nlqResponse, onDataReady, filters }: NlqChartWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const NlqChartWidget: ({ nlqResponse, onDataReady, styleOptions, filters, }: NlqChartWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ChatContextDetails } from '../ai/api/types';
|
|
1
2
|
export type ChatBoxProps = {
|
|
2
3
|
contextTitle: string;
|
|
4
|
+
contextDetails?: ChatContextDetails;
|
|
3
5
|
onGoBack?: () => void;
|
|
4
6
|
};
|
|
5
|
-
export default function ChatBox({ contextTitle, onGoBack }: ChatBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function ChatBox({ contextTitle, onGoBack, contextDetails }: ChatBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ChatMode } from '../ai/api/types';
|
|
2
|
+
import { ChatMode, ChatContextDetails } from '../ai/api/types';
|
|
3
3
|
export interface ChatConfig {
|
|
4
4
|
/**
|
|
5
5
|
* Boolean flag to show or hide suggested questions following a chat response. Currently
|
|
@@ -74,6 +74,12 @@ export interface ChatConfig {
|
|
|
74
74
|
* @default false
|
|
75
75
|
*/
|
|
76
76
|
hideHistory?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Optional chat context details.
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
contextDetails?: ChatContextDetails;
|
|
77
83
|
}
|
|
78
84
|
export declare const DEFAULTS: Readonly<ChatConfig>;
|
|
79
85
|
export type ChatConfigProviderProps = {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ChatContextDetails } from '../ai/api/types';
|
|
3
|
+
export interface ChatIdMapProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ChatIdStorage {
|
|
7
|
+
saveChatId: (chatId: string, contextTitle: string, contextDetails?: ChatContextDetails) => void;
|
|
8
|
+
getChatId: (contextTitle: string, contextDetails?: ChatContextDetails) => string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const ChatIdStorageContext: import("react").Context<ChatIdStorage>;
|
|
11
|
+
export declare const useChatIdStorage: () => ChatIdStorage;
|
|
12
|
+
export declare const ChatIdStorageProvider: ({ children }: ChatIdMapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMessage, NlqMessage, NlqResponseData, TextMessage } from './api/types';
|
|
1
|
+
import { ChatMessage, NlqMessage, NlqResponseData, TextMessage, ChatContextDetails } from './api/types';
|
|
2
2
|
/**
|
|
3
3
|
* Result of the useChatSession hook.
|
|
4
4
|
*
|
|
@@ -24,7 +24,8 @@ export declare const isTextMessage: (message: ChatMessage | null | undefined) =>
|
|
|
24
24
|
*
|
|
25
25
|
* If a chat session does not already exist, then one is created.
|
|
26
26
|
*
|
|
27
|
-
* @param contextTitle - the title of the data model or perspective
|
|
27
|
+
* @param {string} contextTitle - the title of the data model or perspective
|
|
28
|
+
* @param {ChatContextDetails} [contextDetails] - optional chat context details
|
|
28
29
|
* @internal
|
|
29
30
|
*/
|
|
30
|
-
export declare const useChatSession: (contextTitle: string) => UseChatSessionResult;
|
|
31
|
+
export declare const useChatSession: (contextTitle: string, contextDetails?: ChatContextDetails) => UseChatSessionResult;
|
|
@@ -19,6 +19,8 @@ export interface UseGetNlgInsightsParams {
|
|
|
19
19
|
* If not specified, the default value is `true`
|
|
20
20
|
*/
|
|
21
21
|
enabled?: boolean;
|
|
22
|
+
/** The verbosity of the NLG summarization */
|
|
23
|
+
verbosity?: 'Low' | 'High';
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* State for {@link useGetNlgInsights} hook.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { QueryRecommendation } from './api/types';
|
|
2
|
+
import { HookEnableParam } from '../common/hooks/types';
|
|
2
3
|
/**
|
|
3
4
|
* Parameters for {@link useGetQueryRecommendations} hook.
|
|
4
5
|
*/
|
|
5
|
-
export interface UseGetQueryRecommendationsParams {
|
|
6
|
+
export interface UseGetQueryRecommendationsParams extends HookEnableParam {
|
|
6
7
|
/** Data model title or perspective title */
|
|
7
8
|
contextTitle: string;
|
|
8
9
|
/**
|
|
@@ -30,7 +31,7 @@ export interface UseGetQueryRecommendationsState {
|
|
|
30
31
|
/** Whether the data fetching has succeeded */
|
|
31
32
|
isSuccess: boolean;
|
|
32
33
|
/** The result data */
|
|
33
|
-
data: QueryRecommendation[];
|
|
34
|
+
data: QueryRecommendation[] | undefined;
|
|
34
35
|
/** The error if any occurred */
|
|
35
36
|
error: unknown;
|
|
36
37
|
/** Callback to trigger a refetch of the data */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NlqResponseData } from './api/types';
|
|
1
|
+
import type { NlqResponseData, ChatContextDetails } from './api/types';
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for the useLastNlqResponse hook.
|
|
4
4
|
*
|
|
@@ -7,6 +7,8 @@ import type { NlqResponseData } from './api/types';
|
|
|
7
7
|
interface UseLastNlqResponseParams {
|
|
8
8
|
/** The title of the data model or perspective */
|
|
9
9
|
contextTitle: string;
|
|
10
|
+
/** optional chat context details */
|
|
11
|
+
contextDetails?: ChatContextDetails;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* React hook that returns the last NLQ response for the chat that corresponds
|
|
@@ -15,5 +17,5 @@ interface UseLastNlqResponseParams {
|
|
|
15
17
|
* @param params - Parameters for the hook
|
|
16
18
|
* @internal
|
|
17
19
|
*/
|
|
18
|
-
export declare const useLastNlqResponse: ({ contextTitle, }: UseLastNlqResponseParams) => NlqResponseData | null;
|
|
20
|
+
export declare const useLastNlqResponse: ({ contextTitle, contextDetails, }: UseLastNlqResponseParams) => NlqResponseData | null;
|
|
19
21
|
export {};
|
|
@@ -13,7 +13,6 @@ export declare function capitalizeFirstLetter(str: string): string;
|
|
|
13
13
|
export declare function sanitizeDimensionId(str: string): string;
|
|
14
14
|
export declare function validateQueryModel(model: any): SimpleQueryModel;
|
|
15
15
|
export declare function isEmptyQueryModel(queryModel: ExpandedQueryModel | undefined | null): boolean;
|
|
16
|
-
export declare function escapeSingleQuotes(str?: string): string | undefined;
|
|
17
16
|
export declare function validateChartType(chartType: DynamicChartType | 'pivot' | 'pivot2'): void;
|
|
18
17
|
export declare function checkIfMeasuresExist(props: ChartWidgetProps | PivotTableWidgetProps | ExecuteQueryParams | ExecutePivotQueryParams): boolean;
|
|
19
18
|
export declare function isNonEmptyArray<T>(array: T[]): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AreaChartProps } from './props';
|
|
3
3
|
/**
|
|
4
|
-
* A React component similar to a {@link LineChart},
|
|
4
|
+
* A React component similar to a {@link @sisense/sdk-ui!LineChart | `LineChart`},
|
|
5
5
|
* but with filled in areas under each line and an option to display them as stacked.
|
|
6
6
|
*
|
|
7
7
|
* ## Example
|
|
@@ -3,7 +3,7 @@ import { AreamapChartProps } from './props';
|
|
|
3
3
|
/**
|
|
4
4
|
* A React component for visualizing geographical data as colored polygons on a map.
|
|
5
5
|
*
|
|
6
|
-
* For another way do display data on a map, see {@link ScattermapChart}.
|
|
6
|
+
* For another way do display data on a map, see {@link @sisense/sdk-ui!ScattermapChart | `ScattermapChart`}.
|
|
7
7
|
*
|
|
8
8
|
* ## Example
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Attribute, Measure, Filter, QueryResultData, DataSource } from '@sisense/sdk-data';
|
|
1
|
+
import { Attribute, Measure, Filter, QueryResultData, DataSource, FilterRelationsJaql } from '@sisense/sdk-data';
|
|
2
2
|
import { ClientApplication } from './app/client-application.js';
|
|
3
3
|
import { executeQuery as executeQueryFunction } from './query/execute-query.js';
|
|
4
4
|
import { BoxplotChartCustomDataOptions, BoxplotChartDataOptionsInternal } from './chart-data-options/types.js';
|
|
@@ -22,12 +22,13 @@ export declare const boxWhiskerProcessResultInternal: (boxWhiskerData: QueryResu
|
|
|
22
22
|
* @group Charts
|
|
23
23
|
*/
|
|
24
24
|
export declare function boxWhiskerProcessResult(boxWhiskerData: QueryResultData, outliersData: QueryResultData, dataOptions?: BoxplotChartCustomDataOptions): QueryResultData;
|
|
25
|
-
export declare const executeBoxplotQuery: ({ app, chartDataOptions, dataSource, attributes, measures, filters, highlights, }: {
|
|
25
|
+
export declare const executeBoxplotQuery: ({ app, chartDataOptions, dataSource, attributes, measures, filters, filterRelations, highlights, }: {
|
|
26
26
|
app: ClientApplication;
|
|
27
27
|
chartDataOptions: BoxplotChartDataOptionsInternal;
|
|
28
28
|
dataSource?: DataSource | undefined;
|
|
29
29
|
attributes: Attribute[];
|
|
30
30
|
measures: Measure[];
|
|
31
31
|
filters?: Filter[] | undefined;
|
|
32
|
+
filterRelations?: FilterRelationsJaql | undefined;
|
|
32
33
|
highlights?: Filter[] | undefined;
|
|
33
34
|
}, executeQuery: typeof executeQueryFunction) => Promise<QueryResultData>;
|
|
@@ -7,3 +7,15 @@ import { RangeDataColorOptions } from '../../types';
|
|
|
7
7
|
* @returns The relative coloring function.
|
|
8
8
|
*/
|
|
9
9
|
export declare function getRangeColoringFunction(colorOpts: RangeDataColorOptions): RelativeColoringFunction;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the interpolator function for range coloring.
|
|
12
|
+
*
|
|
13
|
+
* @param minColor - Color of the minimum.
|
|
14
|
+
* @param maxColor - Color of the maximum.
|
|
15
|
+
* @param minValue - The minimum value where minColor should be applied.
|
|
16
|
+
* @param midValue - Value of the gradient center.
|
|
17
|
+
* @param maxValue - The minimum value where maxColor should be applied.
|
|
18
|
+
* @param steps - The number of interpolation steps.
|
|
19
|
+
* @returns The interpolator function.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getInterpolatorFn: (minColor: string, maxColor: string, minValue: number, midValue: number, maxValue: number, steps?: number) => (value: number) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ConditionalDataColorOptions, DataColorOptions, UniformDataColorOptions } from '../chart-data/data-coloring';
|
|
2
2
|
import type { NumberFormatConfig, SeriesChartType, ValueToColorMap, MultiColumnValueToColorMap, LineWidth, Markers, SortDirection, PivotRowsSort } from '../types';
|
|
3
3
|
import { Column, MeasureColumn, CalculatedMeasureColumn, PivotGrandTotals, TotalsCalculation, ForecastFormulaOptions, TrendFormulaOptions } from '@sisense/sdk-data';
|
|
4
4
|
/**
|
|
@@ -23,7 +23,7 @@ export interface CategoryStyle {
|
|
|
23
23
|
/**
|
|
24
24
|
* Date granularity that works with continuous timeline.
|
|
25
25
|
*
|
|
26
|
-
* Values from {@link @sisense/sdk-data!DateLevels}.
|
|
26
|
+
* Values from {@link @sisense/sdk-data!DateLevels | `DateLevels`}.
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
granularity?: string;
|
|
@@ -135,6 +135,10 @@ export type ValueStyle = {
|
|
|
135
135
|
* Boolean flag whether to display data bars for this measure in the pivot table.
|
|
136
136
|
*/
|
|
137
137
|
dataBars?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Color options for data bars for this measure in the pivot table
|
|
140
|
+
*/
|
|
141
|
+
dataBarsColor?: string | UniformDataColorOptions | ConditionalDataColorOptions;
|
|
138
142
|
/**
|
|
139
143
|
* Options to add forecast to this measure
|
|
140
144
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Measure } from '@sisense/sdk-data';
|
|
2
1
|
import { SeriesType } from './chart-options-service';
|
|
3
2
|
import { AxisSettings } from './translations/axis-section';
|
|
4
|
-
import { CartesianChartDataOptions } from '..';
|
|
3
|
+
import { CartesianChartDataOptions, StyledMeasureColumn } from '..';
|
|
5
4
|
export declare const FORECAST_PREFIX = "$forecast";
|
|
6
5
|
export declare const TREND_PREFIX = "$trend";
|
|
7
6
|
export declare const isForecastSeries: (name: string) => boolean;
|
|
@@ -30,7 +29,7 @@ export declare const formatAdvancedAnalyticsSeries: (series: SeriesType[]) => vo
|
|
|
30
29
|
* @returns An array of trend measures.
|
|
31
30
|
* @internal
|
|
32
31
|
*/
|
|
33
|
-
export declare const extractTrendMeasures: (dataOptions: CartesianChartDataOptions) =>
|
|
32
|
+
export declare const extractTrendMeasures: (dataOptions: CartesianChartDataOptions) => StyledMeasureColumn[];
|
|
34
33
|
/**
|
|
35
34
|
* Extracts forecast measures from data options if applicable.
|
|
36
35
|
*
|
|
@@ -38,4 +37,4 @@ export declare const extractTrendMeasures: (dataOptions: CartesianChartDataOptio
|
|
|
38
37
|
* @returns An array of forecast measures.
|
|
39
38
|
* @internal
|
|
40
39
|
*/
|
|
41
|
-
export declare const extractForecastMeasures: (dataOptions: CartesianChartDataOptions) =>
|
|
40
|
+
export declare const extractForecastMeasures: (dataOptions: CartesianChartDataOptions) => StyledMeasureColumn[];
|
|
@@ -93,7 +93,7 @@ export type PolarSubtype = 'polar/column' | 'polar/area' | 'polar/line';
|
|
|
93
93
|
export type IndicatorSubtype = 'indicator/numeric' | 'indicator/gauge';
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
|
-
* Subtype of {@link TreemapChart}
|
|
96
|
+
* Subtype of {@link @sisense/sdk-ui!TreemapChart | `TreemapChart`}
|
|
97
97
|
*
|
|
98
98
|
* **Values**
|
|
99
99
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Stacking, Style } from '../chart-options-service';
|
|
2
2
|
import { ChartDataOptionsInternal, StyledColumn } from '../../chart-data-options/types';
|
|
3
|
-
import { ChartType } from '../../types';
|
|
3
|
+
import { ChartType, CompleteThemeSettings } from '../../types';
|
|
4
4
|
import { CategoricalXValues } from '../../chart-data/types';
|
|
5
5
|
import { AxisClipped } from './translations-to-highcharts';
|
|
6
6
|
export type Axis = {
|
|
@@ -78,6 +78,8 @@ export type StackLabel = {
|
|
|
78
78
|
enabled: boolean;
|
|
79
79
|
rotation: number;
|
|
80
80
|
labelrank: number;
|
|
81
|
+
x?: number;
|
|
82
|
+
y?: number;
|
|
81
83
|
};
|
|
82
84
|
export type PlotBand = {
|
|
83
85
|
text: string;
|
|
@@ -96,6 +98,7 @@ export type AxisPlotBand = {
|
|
|
96
98
|
color?: string;
|
|
97
99
|
label?: {
|
|
98
100
|
text: string;
|
|
101
|
+
x: number;
|
|
99
102
|
y: number;
|
|
100
103
|
style?: Style;
|
|
101
104
|
};
|
|
@@ -105,4 +108,4 @@ export declare const getDefaultDateFormat: (granularity?: string) => "HH:mm:ss"
|
|
|
105
108
|
export declare const getDateFormatter: (category: StyledColumn, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
|
|
106
109
|
export declare const getXAxisDatetimeSettings: (axis: Axis, category: StyledColumn, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
107
110
|
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, dataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
108
|
-
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, dataOptions: ChartDataOptionsInternal, stacking: Stacking | undefined) => [AxisSettings[], AxisClipped[]];
|
|
111
|
+
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, totalLabelRotation: number, dataOptions: ChartDataOptionsInternal, stacking: Stacking | undefined, themeSettings?: CompleteThemeSettings) => [AxisSettings[], AxisClipped[]];
|
|
@@ -35,6 +35,7 @@ export type CartesianChartDesignOptions = BaseDesignOptionsType & DesignPerSerie
|
|
|
35
35
|
export type StackableChartDesignOptions = CartesianChartDesignOptions & {
|
|
36
36
|
stackType: StackType;
|
|
37
37
|
showTotal?: boolean;
|
|
38
|
+
totalLabelRotation?: number;
|
|
38
39
|
} & DesignPerSeries;
|
|
39
40
|
export type LineChartDesignOptions = CartesianChartDesignOptions;
|
|
40
41
|
export type AreaChartDesignOptions = StackableChartDesignOptions;
|
package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { NumberFormatConfig } from '../../types';
|
|
|
7
7
|
export type ValueLabelOptions = {
|
|
8
8
|
enabled?: boolean;
|
|
9
9
|
rotation?: number;
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
showPercentage?: boolean;
|
|
10
12
|
};
|
|
11
13
|
export type RotationType = 'horizontal' | 'diagonal' | 'vertical';
|
|
12
14
|
export type ValueLabelSettings = {
|
|
@@ -28,7 +30,7 @@ export type ValueLabelSettings = {
|
|
|
28
30
|
};
|
|
29
31
|
formatter?: (this: InternalSeries, options?: DataLabelsOptions, valuePropName?: string) => string;
|
|
30
32
|
};
|
|
31
|
-
export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig) => (this: InternalSeries) => string;
|
|
33
|
+
export declare const createValueLabelFormatter: (numberFormatConfig?: NumberFormatConfig, options?: ValueLabelOptions) => (this: InternalSeries) => string;
|
|
32
34
|
export declare const getRotationType: (rotation: number) => RotationType;
|
|
33
35
|
export declare const getValueLabelSettings: (xAxisOrientation: AxisOrientation, valueLabel: ValueLabelOptions, inside?: boolean) => ValueLabelSettings;
|
|
34
36
|
export declare const getPolarValueLabelSettings: (valueLabel: ValueLabelOptions, polarType: PolarType) => ValueLabelSettings;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ButtonProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
type?: 'primary' | 'secondary';
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** @internal */
|
|
3
|
+
export type PopoverAnchorPosition = {
|
|
4
|
+
anchorEl: HTMLElement;
|
|
5
|
+
anchorOrigin: {
|
|
6
|
+
vertical: 'top' | 'center' | 'bottom';
|
|
7
|
+
horizontal: 'left' | 'center' | 'right';
|
|
8
|
+
};
|
|
9
|
+
contentOrigin: {
|
|
10
|
+
vertical: 'top' | 'center' | 'bottom';
|
|
11
|
+
horizontal: 'left' | 'center' | 'right';
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type PopoverPosition = PopoverAnchorPosition;
|
|
15
|
+
type PopoverProps = {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
open: boolean;
|
|
18
|
+
position?: PopoverPosition;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const Popover: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MenuOptions } from '../components/menu/types.js';
|
|
2
|
-
type IsTargetMenuFn = (menuOptions: MenuOptions) => boolean;
|
|
3
|
-
type CombineMenusFn = (currentMenuOptions: MenuOptions, capturedMenuOptions: MenuOptions) => MenuOptions;
|
|
4
|
-
interface CombinedMenuParams {
|
|
2
|
+
export type IsTargetMenuFn = (menuOptions: MenuOptions) => boolean;
|
|
3
|
+
export type CombineMenusFn = (currentMenuOptions: MenuOptions, capturedMenuOptions: MenuOptions) => MenuOptions;
|
|
4
|
+
export interface CombinedMenuParams {
|
|
5
5
|
/** Function to determine if the captured menu is the target menu */
|
|
6
6
|
isTargetMenu: IsTargetMenuFn;
|
|
7
7
|
/** Function to combine the current menu options with the captured menu options */
|
|
@@ -17,4 +17,3 @@ export declare const useCombinedMenu: ({ isTargetMenu, combineMenus }: CombinedM
|
|
|
17
17
|
openMenu: (options: MenuOptions) => void;
|
|
18
18
|
onBeforeMenuOpen: (options: MenuOptions) => MenuOptions | null;
|
|
19
19
|
};
|
|
20
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardContainerProps } from '../../dashboard/types';
|
|
2
|
-
export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange, enableFilterEditor, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,8 @@ export interface DashboardByIdProps {
|
|
|
22
22
|
* @alpha
|
|
23
23
|
*/
|
|
24
24
|
persist?: boolean;
|
|
25
|
+
/** @internal */
|
|
26
|
+
enableFilterEditor?: boolean;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Props for the DashboardContainer component
|
|
@@ -40,6 +42,8 @@ export interface DashboardContainerProps {
|
|
|
40
42
|
* @internal
|
|
41
43
|
*/
|
|
42
44
|
onChange?: (action: DashboardChangeAction) => void;
|
|
45
|
+
/** @internal */
|
|
46
|
+
enableFilterEditor?: boolean;
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* Dashboard configuration
|
|
@@ -108,6 +112,8 @@ export interface DashboardProps {
|
|
|
108
112
|
* @internal
|
|
109
113
|
*/
|
|
110
114
|
onChange?: (action: DashboardChangeAction) => void;
|
|
115
|
+
/** @internal */
|
|
116
|
+
enableFilterEditor?: boolean;
|
|
111
117
|
}
|
|
112
118
|
/**
|
|
113
119
|
* Props for the Dashboard Header component
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Filter, Measure } from '@sisense/sdk-data';
|
|
2
|
-
import {
|
|
2
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
3
3
|
/**
|
|
4
4
|
* Collection of filter options for the {@link CriteriaFilterMenu},
|
|
5
5
|
* to be provided to subcomponents as the `filterType` prop.
|
|
@@ -59,9 +59,9 @@ export declare const CRITERIA_FILTER_MAP: {
|
|
|
59
59
|
*
|
|
60
60
|
* @internal
|
|
61
61
|
*/
|
|
62
|
-
export declare const filterToOption: (filter:
|
|
62
|
+
export declare const filterToOption: (filter: Filter) => FilterOptionType;
|
|
63
63
|
export type CriteriaFilterValueType = string | number | Measure;
|
|
64
|
-
export declare const filterToDefaultValues: (filter:
|
|
64
|
+
export declare const filterToDefaultValues: (filter: Filter) => CriteriaFilterValueType[];
|
|
65
65
|
export declare const valuesToDisplayValues: (values: CriteriaFilterValueType[]) => (string | number)[];
|
|
66
|
-
export declare const translatedMsgNoVal: (message: string, t:
|
|
66
|
+
export declare const translatedMsgNoVal: (message: string, t: TFunction) => string;
|
|
67
67
|
export declare const filterTypeToInputType: (filterType: string) => string;
|
package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FilterTileDesignOptions } from '../filter-tile-container.js';
|
|
3
|
-
import {
|
|
3
|
+
import { Filter, Measure } from '@sisense/sdk-data';
|
|
4
4
|
import { FilterVariant } from '../common/filter-utils.js';
|
|
5
5
|
/**
|
|
6
6
|
* Props for {@link CriteriaFilterTile}
|
|
@@ -9,11 +9,11 @@ export interface CriteriaFilterTileProps {
|
|
|
9
9
|
/** Title for the filter tile, which is rendered into the header */
|
|
10
10
|
title: string;
|
|
11
11
|
/** Text or numeric filter object to initialize filter type and default values */
|
|
12
|
-
filter:
|
|
12
|
+
filter: Filter;
|
|
13
13
|
/** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
|
|
14
14
|
arrangement?: FilterVariant;
|
|
15
|
-
/** Callback returning filter object
|
|
16
|
-
onUpdate: (filter: Filter
|
|
15
|
+
/** Callback returning updated filter object*/
|
|
16
|
+
onUpdate: (filter: Filter) => void;
|
|
17
17
|
/** Filter delete callback */
|
|
18
18
|
onDelete?: () => void;
|
|
19
19
|
/** Filter edit callback */
|
|
@@ -27,7 +27,6 @@ export interface CriteriaFilterTileProps {
|
|
|
27
27
|
*/
|
|
28
28
|
tileDesignOptions?: FilterTileDesignOptions;
|
|
29
29
|
}
|
|
30
|
-
export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | ExcludeFilter;
|
|
31
30
|
/**
|
|
32
31
|
* UI component that allows the user to filter numeric or text attributes according to
|
|
33
32
|
* a number of built-in operations defined in the numeric filter, text filter, or ranking filter.
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { CriteriaFilterTile, type CriteriaFilterTileProps
|
|
1
|
+
export { CriteriaFilterTile, type CriteriaFilterTileProps } from './criteria-filter-tile';
|
|
2
|
+
export type { CriteriaFilterType } from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NumericFilter, TextFilter, RankingFilter, ExcludeFilter } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* Deprecated type for `filter` property of {@link CriteriaFilterTileProps}.
|
|
4
|
+
* Use regular {@link @sisense/sdk-data!Filter | Filter} instead.
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
7
|
+
export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | ExcludeFilter;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Input: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|