@sisense/sdk-ui 1.29.0 → 1.31.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.
Files changed (85) hide show
  1. package/dist/ai.cjs +53 -51
  2. package/dist/ai.js +1049 -1005
  3. package/dist/analytics-composer.cjs +37 -37
  4. package/dist/analytics-composer.js +460 -461
  5. package/dist/{derive-chart-family-Cy3hlluo.js → derive-chart-family-D3iN--j2.js} +2078 -2028
  6. package/dist/{derive-chart-family-DWCXp57c.cjs → derive-chart-family-Tt7cIUck.cjs} +46 -46
  7. package/dist/index.cjs +120 -97
  8. package/dist/index.js +8073 -7197
  9. package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +2 -1
  10. package/dist/packages/sdk-ui/src/ai/api/chat-api-provider.d.ts +2 -1
  11. package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +5 -3
  12. package/dist/packages/sdk-ui/src/ai/api/hooks.d.ts +2 -2
  13. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +11 -1
  14. package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +3 -2
  15. package/dist/packages/sdk-ui/src/ai/chat-box.d.ts +3 -1
  16. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -1
  17. package/dist/packages/sdk-ui/src/ai/chat-id-storage-provider.d.ts +12 -0
  18. package/dist/packages/sdk-ui/src/ai/use-chat-session.d.ts +4 -3
  19. package/dist/packages/sdk-ui/src/ai/use-get-chat.d.ts +6 -0
  20. package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +2 -0
  21. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +1 -1
  22. package/dist/packages/sdk-ui/src/ai/use-last-nlq-response.d.ts +4 -2
  23. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +13 -6
  24. package/dist/packages/sdk-ui/src/chart-data/chart-data-service.d.ts +1 -13
  25. package/dist/packages/sdk-ui/src/chart-data-options/coloring/range-coloring.d.ts +12 -0
  26. package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +5 -1
  27. package/dist/packages/sdk-ui/src/chart-options-processor/advanced-chart-options.d.ts +3 -4
  28. package/dist/packages/sdk-ui/src/common/components/popper.d.ts +9 -0
  29. package/dist/packages/sdk-ui/src/common/components/radio.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/common/hooks/use-debounced-value.d.ts +5 -0
  31. package/dist/packages/sdk-ui/src/common/hooks/use-was-modified.d.ts +5 -0
  32. package/dist/packages/sdk-ui/src/const.d.ts +3 -0
  33. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +23 -23
  34. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +4 -5
  35. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +2 -1
  36. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +7 -0
  37. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +9 -3
  38. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/scroll-wrapper.d.ts +13 -0
  39. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +7 -0
  40. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/multi-select-item.d.ts +2 -0
  41. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +5 -0
  42. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +5 -0
  43. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select-item.d.ts +2 -0
  44. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select.d.ts +2 -0
  45. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/types.d.ts +2 -0
  46. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/selectable-section.d.ts +2 -3
  47. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/small-loader.d.ts +1 -0
  48. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/constants.d.ts +2 -0
  49. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-container.d.ts +5 -0
  50. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-numerical.d.ts +8 -0
  51. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-textual.d.ts +8 -0
  52. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +28 -0
  53. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/members-section.d.ts +5 -1
  54. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/index.d.ts +1 -0
  55. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/numeric-condition-section.d.ts +15 -0
  56. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/types.d.ts +16 -0
  57. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/utils.d.ts +7 -0
  58. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-range-section.d.ts +11 -0
  59. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/text-condition-section.d.ts +6 -2
  60. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +4 -0
  61. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +1 -0
  62. package/dist/packages/sdk-ui/src/filters/components/icons/equal-icon.d.ts +2 -0
  63. package/dist/packages/sdk-ui/src/filters/components/icons/greater-than-icon.d.ts +2 -0
  64. package/dist/packages/sdk-ui/src/filters/components/icons/greater-than-or-equal-icon.d.ts +2 -0
  65. package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +6 -0
  66. package/dist/packages/sdk-ui/src/filters/components/icons/not-equal-icon.d.ts +2 -0
  67. package/dist/packages/sdk-ui/src/filters/components/icons/pencil-icon.d.ts +3 -1
  68. package/dist/packages/sdk-ui/src/filters/components/icons/smaller-than-icon.d.ts +2 -0
  69. package/dist/packages/sdk-ui/src/filters/components/icons/smaller-than-or-equal-icon.d.ts +2 -0
  70. package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +21 -1
  71. package/dist/packages/sdk-ui/src/index-typedoc.d.ts +28 -0
  72. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +4 -0
  73. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-builder.d.ts +7 -0
  74. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +10 -1
  75. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +15 -0
  76. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +30 -0
  77. package/dist/packages/sdk-ui/src/types.d.ts +10 -0
  78. package/dist/packages/sdk-ui/src/utils/is-numeric-string.d.ts +10 -0
  79. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +1 -0
  80. package/dist/{useQuery-CdtycPOg.js → use-common-filters-CHBXz5rL.js} +17543 -17520
  81. package/dist/{useQuery-CRu7WcYd.cjs → use-common-filters-Dd-gOMfB.cjs} +170 -170
  82. package/dist/widget-composer-BHf4pbvI.cjs +311 -0
  83. package/dist/{widget-composer-G4mPX-JO.js → widget-composer-BrQ6SrZ6.js} +221 -203
  84. package/package.json +8 -7
  85. package/dist/widget-composer-DyY3yi_b.cjs +0 -300
@@ -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,4 @@
1
- import type { ChatResponse } from './types';
1
+ import type { ChatResponse, ChatContextDetails } from './types';
2
2
  import { TranslatableError } from '../../translation/translatable-error';
3
3
  /**
4
4
  * @internal
@@ -18,7 +18,7 @@ export declare const useGetAllChats: () => {
18
18
  /**
19
19
  * @internal
20
20
  */
21
- 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>;
22
22
  export declare const useSendChatMessage: (chatId: string | undefined, enableFollowupQuestions?: boolean) => {
23
23
  mutate: import("@tanstack/react-query").UseMutateFunction<ChatResponse | undefined, TranslatableError, string, void>;
24
24
  isLoading: boolean;
@@ -1,9 +1,13 @@
1
1
  import { JaqlQueryPayload } from '@sisense/sdk-query-client';
2
2
  import { ExpandedQueryModel } from '../../analytics-composer';
3
+ import { WidgetProps } from '../../props';
3
4
  export interface ChatContext {
4
5
  title: string;
5
6
  live: boolean;
6
7
  }
8
+ export interface ChatContextDetails {
9
+ dashboardId?: string;
10
+ }
7
11
  export interface TextMessage {
8
12
  role: 'assistant';
9
13
  content: string;
@@ -23,7 +27,8 @@ export interface Chat {
23
27
  chatId: string;
24
28
  contextId: string;
25
29
  contextTitle: string;
26
- lastUpdate: string;
30
+ contextDetails?: ChatContextDetails;
31
+ expireAt: string;
27
32
  tenantId: string;
28
33
  userId: string;
29
34
  chatHistory: ChatMessage[];
@@ -59,10 +64,14 @@ interface ErrorResponse {
59
64
  };
60
65
  responseType: 'error';
61
66
  }
67
+ /**
68
+ * Response data to NLQ request
69
+ */
62
70
  export interface NlqResponseData extends ExpandedQueryModel {
63
71
  detailedDescription: string;
64
72
  followupQuestions: string[];
65
73
  nlqPrompt: string;
74
+ widgetProps?: WidgetProps | undefined;
66
75
  }
67
76
  export interface NlqResponse {
68
77
  data: NlqResponseData;
@@ -78,6 +87,7 @@ export type QueryRecommendation = Omit<NlqResponseData, 'followupQuestions'>;
78
87
  export type QueryRecommendationResponse = QueryRecommendation[];
79
88
  export interface GetNlgInsightsRequest {
80
89
  jaql: Pick<JaqlQueryPayload, 'datasource' | 'metadata' | 'filterRelations'>;
90
+ verbosity?: 'Low' | 'High';
81
91
  }
82
92
  export interface GetNlgInsightsResponse {
83
93
  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
  *
@@ -27,7 +28,7 @@ export interface NlqChartWidgetProps {
27
28
  *
28
29
  * @default true
29
30
  */
30
- enableHeader?: boolean;
31
+ styleOptions?: NlqChartWidgetStyleOptions;
31
32
  }
32
33
  /**
33
34
  * React component that renders a chart widget based on NLQ response data.
@@ -51,4 +52,4 @@ export interface NlqChartWidgetProps {
51
52
  * @group Generative AI
52
53
  * @internal
53
54
  */
54
- export declare const NlqChartWidget: ({ nlqResponse, onDataReady, filters, enableHeader, }: 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;
@@ -0,0 +1,6 @@
1
+ import { ChatContextDetails } from '../ai/api/types';
2
+ export declare const useGetChat: (contextTitle: string, contextDetails?: ChatContextDetails, createIfNotExist?: boolean) => {
3
+ chatId: string | undefined;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ };
@@ -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.
@@ -69,7 +69,7 @@ export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRec
69
69
  * </ul>
70
70
  * );
71
71
  * ```
72
- * @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`, as well as other variants of this information such as JAQL + chartMappings
72
+ * @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`
73
73
  * @group Generative AI
74
74
  * @beta
75
75
  */
@@ -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 {};
@@ -1,8 +1,9 @@
1
1
  import { WidgetProps, ChartWidgetProps, PivotTableWidgetProps } from '../props';
2
- import { ChartDataOptions } from '../types';
2
+ import { ChartDataOptions, ChartStyleOptions } from '../types';
3
3
  import { ExecuteQueryParams, ExecutePivotQueryParams } from '../query-execution';
4
4
  import { MetadataItem } from '@sisense/sdk-data';
5
5
  import { DynamicChartType } from '../chart-options-processor/translations/types.js';
6
+ import { AnyColumn } from '../chart-data-options/types.js';
6
7
  type Stringify<T> = {
7
8
  [K in keyof T as `${K & string}String`]: string;
8
9
  };
@@ -10,17 +11,20 @@ type ExtraCodeProps = {
10
11
  componentString: string;
11
12
  extraImportsString: string;
12
13
  };
14
+ /** @internal */
13
15
  export type KeysOfUnion<T> = T extends T ? keyof T : never;
16
+ /** @internal */
14
17
  export type AllPossibleChartOptionKeys = KeysOfUnion<ChartDataOptions>;
18
+ /** @internal */
15
19
  export type AxesMappingKey = Exclude<AllPossibleChartOptionKeys, 'seriesToColorMap'>;
16
- export type AxesMapping = Partial<Record<AxesMappingKey, Array<{
17
- name: string;
18
- type?: string;
19
- }>>>;
20
+ /** @internal */
21
+ export type AxesMapping = Partial<Record<AxesMappingKey, Array<AnyColumn>>>;
22
+ /** @internal */
20
23
  export interface ChartRecommendations {
21
24
  chartFamily: string;
22
25
  chartType: string;
23
26
  axesMapping: AxesMapping;
27
+ styleOptions?: ChartStyleOptions;
24
28
  }
25
29
  /**
26
30
  * Expanded Query Model that is based on NlqResponseData.
@@ -28,7 +32,9 @@ export interface ChartRecommendations {
28
32
  * @internal
29
33
  */
30
34
  export interface ExpandedQueryModel {
35
+ /** @internal */
31
36
  chartRecommendations: ChartRecommendations | {};
37
+ /** @internal */
32
38
  jaql: {
33
39
  datasource: {
34
40
  id?: string;
@@ -37,7 +43,7 @@ export interface ExpandedQueryModel {
37
43
  };
38
44
  metadata: MetadataItem[];
39
45
  };
40
- widgetProps?: WidgetProps | undefined;
46
+ /** @internal */
41
47
  queryTitle: string;
42
48
  }
43
49
  /**
@@ -54,6 +60,7 @@ export declare const EMPTY_EXPANDED_QUERY_MODEL: ExpandedQueryModel;
54
60
  export interface SimpleChartRecommendations {
55
61
  chartType: string;
56
62
  dataOptions: AxesMapping;
63
+ styleOptions: ChartStyleOptions;
57
64
  }
58
65
  /**
59
66
  * Simple Query Model that is a simplified version of ExpandedQueryModel.
@@ -1,17 +1,5 @@
1
1
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
2
2
  import { DataTable } from '../chart-data-processor/table-processor';
3
- import type { ChartType, NumberFormatConfig, SeriesChartType, SortDirection } from '../types';
3
+ import type { ChartType } from '../types';
4
4
  import { ChartData } from './types';
5
5
  export declare const chartDataService: (chartType: ChartType, chartDataOptions: ChartDataOptionsInternal, dataTable: DataTable) => ChartData;
6
- export type ValueColumn = {
7
- column: string;
8
- agg: string;
9
- columnTitle: string;
10
- enabled: boolean;
11
- sort: SortDirection;
12
- showOnRightAxis?: boolean;
13
- numberFormatConfig?: NumberFormatConfig;
14
- chartType?: SeriesChartType;
15
- color?: string;
16
- legacyInstanceId?: string;
17
- };
@@ -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 type { DataColorOptions } from '../chart-data/data-coloring';
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
  /**
@@ -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) => Measure[];
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) => Measure[];
40
+ export declare const extractForecastMeasures: (dataOptions: CartesianChartDataOptions) => StyledMeasureColumn[];
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type PopperProps = {
3
+ children: React.ReactNode;
4
+ open: boolean;
5
+ anchorEl: HTMLElement | null;
6
+ style?: React.CSSProperties;
7
+ };
8
+ export declare const Popper: ({ children, open, anchorEl, style }: PopperProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -4,5 +4,5 @@ type ButtonProps = {
4
4
  onChange?: (checked: boolean) => void;
5
5
  };
6
6
  /** @internal */
7
- export declare const Radio: ({ checked, value, onChange }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Radio: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A hook that returns a debounced version of the given value.
3
+ * The value is updated only after the specified delay (`wait`), preventing frequent updates.
4
+ */
5
+ export declare function useDebouncedValue<T>(value: T, wait: number): T;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Custom hook to track if a value was modified at any point,
3
+ * even if it returns to its initial state.
4
+ */
5
+ export declare const useWasModified: <T>(value: T, initialValue: T) => boolean;
@@ -1,2 +1,5 @@
1
1
  export declare const QUERY_DEFAULT_LIMIT = 20000;
2
2
  export declare const SYSTEM_TENANT_NAME = "system";
3
+ export declare const DEFAULT_TEXT_COLOR = "#5B6372";
4
+ export declare const DEFAULT_BACKGROUND_COLOR = "#F4F4F8";
5
+ export declare const ERROR_COLOR = "#FA5656";
@@ -1,5 +1,5 @@
1
1
  import { Filter, Measure } from '@sisense/sdk-data';
2
- import { CriteriaFilterType } from './criteria-filter-tile';
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.
@@ -7,25 +7,25 @@ import { CriteriaFilterType } from './criteria-filter-tile';
7
7
  * @internal
8
8
  */
9
9
  export declare const FilterOption: {
10
- NOT_BETWEEN: string;
11
- TOP: string;
12
- BOTTOM: string;
13
- BETWEEN: string;
14
- EQUALS_NUMERIC: string;
15
- NOT_EQUALS_NUMERIC: string;
16
- LESS_THAN: string;
17
- LESS_THAN_OR_EQUAL: string;
18
- GREATER_THAN: string;
19
- GREATER_THAN_OR_EQUAL: string;
20
- EQUALS_TEXT: string;
21
- NOT_EQUALS_TEXT: string;
22
- CONTAINS: string;
23
- NOT_CONTAIN: string;
24
- STARTS_WITH: string;
25
- NOT_STARTS_WITH: string;
26
- ENDS_WITH: string;
27
- NOT_ENDS_WITH: string;
28
- LIKE: string;
10
+ readonly NOT_BETWEEN: "excludefromto";
11
+ readonly TOP: "rankingtop";
12
+ readonly BOTTOM: "rankingbottom";
13
+ readonly BETWEEN: "numericfromto";
14
+ readonly EQUALS_NUMERIC: "numericequals";
15
+ readonly NOT_EQUALS_NUMERIC: "numericdoesntEqual";
16
+ readonly LESS_THAN: "numerictoNotEqual";
17
+ readonly LESS_THAN_OR_EQUAL: "numericto";
18
+ readonly GREATER_THAN: "numericfromNotEqual";
19
+ readonly GREATER_THAN_OR_EQUAL: "numericfrom";
20
+ readonly EQUALS_TEXT: "textequals";
21
+ readonly NOT_EQUALS_TEXT: "textdoesntEqual";
22
+ readonly CONTAINS: "textcontains";
23
+ readonly NOT_CONTAIN: "textdoesntContain";
24
+ readonly STARTS_WITH: "textstartsWith";
25
+ readonly NOT_STARTS_WITH: "textdoesntStartWith";
26
+ readonly ENDS_WITH: "textendsWith";
27
+ readonly NOT_ENDS_WITH: "textdoesntEndWith";
28
+ readonly LIKE: "textlike";
29
29
  };
30
30
  export type FilterOptionType = keyof typeof FilterOption;
31
31
  /**
@@ -59,9 +59,9 @@ export declare const CRITERIA_FILTER_MAP: {
59
59
  *
60
60
  * @internal
61
61
  */
62
- export declare const filterToOption: (filter: CriteriaFilterType) => FilterOptionType;
62
+ export declare const filterToOption: (filter: Filter) => FilterOptionType;
63
63
  export type CriteriaFilterValueType = string | number | Measure;
64
- export declare const filterToDefaultValues: (filter: CriteriaFilterType) => CriteriaFilterValueType[];
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: Function) => any;
66
+ export declare const translatedMsgNoVal: (message: string, t: TFunction) => string;
67
67
  export declare const filterTypeToInputType: (filterType: string) => string;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FilterTileDesignOptions } from '../filter-tile-container.js';
3
- import { ExcludeFilter, Filter, Measure, NumericFilter, RankingFilter, TextFilter } from '@sisense/sdk-data';
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: CriteriaFilterType;
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, or null for failure */
16
- onUpdate: (filter: Filter | null) => void;
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, type CriteriaFilterType, } from './criteria-filter-tile';
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;
@@ -1,5 +1,11 @@
1
- /// <reference types="react" />
2
- export declare const Input: import("@emotion/styled").StyledComponent<{
1
+ import type { DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ export declare const BaseInput: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
5
+ }, DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
6
+ type InputProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
7
+ error?: boolean | string;
8
+ };
9
+ /** @internal */
10
+ export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type ScrollWrapperOnScrollEvent = {
3
+ top: number;
4
+ direction: 'down' | 'up';
5
+ };
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare const ScrollWrapper: (props: {
10
+ onScroll?: ((event: ScrollWrapperOnScrollEvent) => void) | undefined;
11
+ style?: CSSProperties | undefined;
12
+ children: ReactNode;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -7,8 +7,15 @@ export declare const SelectContainer: import("@emotion/styled").StyledComponent<
7
7
  export declare const SelectItemContainer: import("@emotion/styled").StyledComponent<{
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
10
+ } & {
11
+ background?: string | undefined;
12
+ color?: string | undefined;
10
13
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
14
  export declare const SelectLabel: import("@emotion/styled").StyledComponent<{
12
15
  theme?: import("@emotion/react").Theme | undefined;
13
16
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
14
17
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
18
+ export declare const SelectIconContainer: import("@emotion/styled").StyledComponent<{
19
+ theme?: import("@emotion/react").Theme | undefined;
20
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
21
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,7 +1,9 @@
1
1
  import { SelectItem } from './types';
2
+ import { CSSProperties } from 'react';
2
3
  type MultiSelectItemProps<Value> = SelectItem<Value> & {
3
4
  selected: boolean;
4
5
  onSelect?: (value: Value) => void;
6
+ style?: CSSProperties;
5
7
  };
6
8
  export declare function MultiSelectItem<Value = unknown>(props: MultiSelectItemProps<Value>): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -1,11 +1,16 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { SelectItem } from './types';
3
+ import { ScrollWrapperOnScrollEvent } from '../../../../../filters/components/filter-editor-popover/common/scroll-wrapper';
3
4
  type SearchableMultiSelectProps<Value> = {
4
5
  values?: Value[];
5
6
  items: SelectItem<Value>[];
6
7
  style?: CSSProperties;
7
8
  placeholder?: string;
8
9
  onChange?: (values: Value[]) => void;
10
+ primaryColor?: string;
11
+ primaryBackgroundColor?: string;
12
+ onListScroll?: (event: ScrollWrapperOnScrollEvent) => void;
13
+ showListLoader?: boolean;
9
14
  };
10
15
  /** @internal */
11
16
  export declare function SearchableMultiSelect<Value = unknown>(props: SearchableMultiSelectProps<Value>): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,16 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { SelectItem } from './types';
3
+ import { ScrollWrapperOnScrollEvent } from '../../../../../filters/components/filter-editor-popover/common/scroll-wrapper';
3
4
  type SearchableSingleSelectProps<Value> = {
4
5
  value?: Value;
5
6
  items: SelectItem<Value>[];
6
7
  style?: CSSProperties;
7
8
  placeholder?: string;
8
9
  onChange?: (value: Value) => void;
10
+ primaryColor?: string;
11
+ primaryBackgroundColor?: string;
12
+ onListScroll?: (event: ScrollWrapperOnScrollEvent) => void;
13
+ showListLoader?: boolean;
9
14
  };
10
15
  /** @internal */
11
16
  export declare function SearchableSingleSelect<Value = unknown>(props: SearchableSingleSelectProps<Value>): import("react/jsx-runtime").JSX.Element;