@sisense/sdk-ui 1.8.0 → 1.9.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 (80) hide show
  1. package/dist/ai/ai-disclaimer.d.ts +4 -1
  2. package/dist/ai/chat-config.d.ts +20 -0
  3. package/dist/ai/chat-dropup.d.ts +12 -0
  4. package/dist/ai/chat-frame.d.ts +7 -4
  5. package/dist/ai/chat-input.d.ts +4 -1
  6. package/dist/ai/chatbot.d.ts +0 -7
  7. package/dist/ai/common/dropup-section.d.ts +8 -0
  8. package/dist/ai/common/icon-button.d.ts +12 -0
  9. package/dist/ai/{toolbar.d.ts → common/toolbar.d.ts} +5 -0
  10. package/dist/ai/common/tooltip.d.ts +1 -1
  11. package/dist/ai/icons/arrow-left-icon.d.ts +5 -1
  12. package/dist/ai/icons/clear-chat-icon.d.ts +2 -1
  13. package/dist/ai/icons/expand-icon.d.ts +3 -1
  14. package/dist/ai/icons/info-icon.d.ts +3 -1
  15. package/dist/ai/icons/light-bulb-icon.d.ts +3 -1
  16. package/dist/ai/icons/message-icon.d.ts +2 -1
  17. package/dist/ai/icons/sisense-logo.d.ts +5 -1
  18. package/dist/ai/icons/three-dots-icon.d.ts +3 -1
  19. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -1
  20. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -1
  21. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -1
  22. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -1
  23. package/dist/ai/messages/clickable-message.d.ts +4 -2
  24. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  25. package/dist/ai/messages/insights-message.d.ts +2 -2
  26. package/dist/ai/messages/jaql-element.d.ts +5 -2
  27. package/dist/ai/messages/message-resolver.d.ts +2 -1
  28. package/dist/ai/messages/nlq-message-group.d.ts +6 -3
  29. package/dist/ai/messages/text-message.d.ts +4 -5
  30. package/dist/ai/nav-back-button.d.ts +6 -3
  31. package/dist/ai.js +2864 -2586
  32. package/dist/api/types/dashboard-dto.d.ts +16 -0
  33. package/dist/app/client-application.d.ts +6 -2
  34. package/dist/area-chart.d.ts +3 -3
  35. package/dist/bar-chart.d.ts +2 -2
  36. package/dist/chart-data-options/utils.d.ts +10 -0
  37. package/dist/chart-options-processor/theme-option-service.d.ts +0 -8
  38. package/dist/column-chart.d.ts +2 -2
  39. package/dist/common/components/loading-indicator.d.ts +82 -0
  40. package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
  41. package/dist/dashboard-widget/types.d.ts +22 -2
  42. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
  43. package/dist/dashboard-widget/utils.d.ts +2 -0
  44. package/dist/debounce-Cc9bQD5m.js +76199 -0
  45. package/dist/dynamic-size-container/default-size.d.ts +5 -1
  46. package/dist/dynamic-size-container/dynamic-size-container.d.ts +12 -3
  47. package/dist/filters/components/common/dropdown.d.ts +1 -1
  48. package/dist/filters/components/common/switch.d.ts +3 -1
  49. package/dist/index.d.ts +1 -1
  50. package/dist/index.js +46825 -7395
  51. package/dist/line-chart.d.ts +2 -2
  52. package/dist/models/dashboard/translate-dashboard.d.ts +3 -2
  53. package/dist/models/dashboard/types.d.ts +6 -8
  54. package/dist/models/widget/use-get-widget-model.d.ts +1 -1
  55. package/dist/models/widget/widget-model.d.ts +50 -6
  56. package/dist/pie-chart.d.ts +2 -2
  57. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
  58. package/dist/pivot-table/sorting-utils.d.ts +11 -55
  59. package/dist/pivot-table/use-get-pivot-table-query.d.ts +10 -2
  60. package/dist/pivot-table/use-pivot-table-data-options-internal.d.ts +15 -0
  61. package/dist/polar-chart.d.ts +2 -2
  62. package/dist/props.d.ts +60 -1
  63. package/dist/query-execution/use-execute-query.d.ts +1 -1
  64. package/dist/scatter-chart.d.ts +1 -1
  65. package/dist/theme-provider/default-theme-settings.d.ts +9 -0
  66. package/dist/theme-provider/types.d.ts +7 -0
  67. package/dist/translation/resources/en.d.ts +3 -1
  68. package/dist/translation/resources/index.d.ts +6 -2
  69. package/dist/types.d.ts +170 -1
  70. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  71. package/dist/widgets/common/widget-container.d.ts +15 -0
  72. package/dist/widgets/drilldown-widget.d.ts +1 -1
  73. package/dist/widgets/pivot-table-widget.d.ts +22 -0
  74. package/package.json +10 -9
  75. package/dist/ai/chat-style-provider.d.ts +0 -22
  76. package/dist/ai/icons/magic-wand-icon.d.ts +0 -2
  77. package/dist/ai/magic-wand-dropdown.d.ts +0 -7
  78. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +0 -7
  79. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +0 -7
  80. package/dist/useQuery-cb11e76c.js +0 -121619
@@ -1,2 +1,5 @@
1
1
  /// <reference types="react" />
2
- export default function AiDisclaimer(): JSX.Element;
2
+ import { CompleteThemeSettings } from '..';
3
+ export default function AiDisclaimer({ theme }: {
4
+ theme: CompleteThemeSettings;
5
+ }): JSX.Element;
@@ -13,6 +13,12 @@ export interface ChatConfig {
13
13
  * If not specified, the default value is `4`
14
14
  */
15
15
  numOfRecommendations: number;
16
+ /**
17
+ * Number of recent prompts that should be shown in a chat session
18
+ *
19
+ * If not specified, the default value is `5`
20
+ */
21
+ numOfRecentPrompts: number;
16
22
  /**
17
23
  * The default context (data model or perspective) title to use for a chat session
18
24
  *
@@ -33,6 +39,20 @@ export interface ChatConfig {
33
39
  * A value of `false` will hide the welcome text.
34
40
  */
35
41
  welcomeText?: string | false;
42
+ /**
43
+ * Boolean flag to show or hide the header in a chat session.
44
+ *
45
+ * @default true
46
+ * @internal
47
+ */
48
+ enableHeader?: boolean;
49
+ /**
50
+ * Boolean flag to show or hide the insights button in a chat session.
51
+ *
52
+ * @default true
53
+ * @internal
54
+ */
55
+ enableInsights?: boolean;
36
56
  }
37
57
  export declare const DEFAULTS: Readonly<ChatConfig>;
38
58
  export type ChatConfigProviderProps = {
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export declare const isCommand: (text: string) => boolean;
3
+ interface ChatDropupProps {
4
+ recentPrompts: string[];
5
+ suggestions: string[];
6
+ isLoading: boolean;
7
+ onSelection: (q: string) => void;
8
+ anchorEl: HTMLElement | null;
9
+ text: string;
10
+ }
11
+ export default function ChatDropup({ recentPrompts, suggestions, isLoading, onSelection, anchorEl, text, }: ChatDropupProps): JSX.Element;
12
+ export {};
@@ -1,8 +1,11 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- type ChatFrameProps = {
1
+ import { Themable } from '../theme-provider/types';
2
+ import { CSSProperties } from 'react';
3
+ type Sizable = {
3
4
  width?: CSSProperties['width'];
4
5
  height?: CSSProperties['height'];
5
- children: ReactNode;
6
6
  };
7
- export default function ChatFrame({ width, height, children, }: ChatFrameProps): JSX.Element;
7
+ export declare const ChatFrame: import("@emotion/styled").StyledComponent<{
8
+ theme?: import("@emotion/react").Theme | undefined;
9
+ as?: import("react").ElementType<any> | undefined;
10
+ } & Themable & Sizable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
11
  export {};
@@ -3,5 +3,8 @@ export type ChatInputProps = {
3
3
  onSendMessage: (message: string) => void;
4
4
  onClearHistoryClick?: () => void;
5
5
  disabled?: boolean;
6
+ recentPrompts: string[];
7
+ suggestions: string[];
8
+ isLoading: boolean;
6
9
  };
7
- export default function ChatInput({ onSendMessage, onClearHistoryClick, disabled, }: ChatInputProps): JSX.Element;
10
+ export default function ChatInput({ onSendMessage, onClearHistoryClick, disabled, recentPrompts, suggestions, isLoading, }: ChatInputProps): JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { ChatConfig } from './chat-config';
3
- import { ChatStyle } from './chat-style-provider';
4
3
  /**
5
4
  * Props for {@link Chatbot} component.
6
5
  */
@@ -17,12 +16,6 @@ export type ChatbotProps = {
17
16
  * If not specified, a default height of `900px` will be used.
18
17
  */
19
18
  height?: CSSProperties['height'];
20
- /**
21
- * Style settings for the chatbot
22
- *
23
- * @internal
24
- */
25
- style?: ChatStyle;
26
19
  /**
27
20
  * Various configuration options for the chatbot
28
21
  */
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface DropupSectionProps {
3
+ title: string;
4
+ items: string[];
5
+ onSelect: (selection: string) => void;
6
+ alwaysExpanded?: boolean;
7
+ }
8
+ export default function DropupSection({ title, items, onSelect, alwaysExpanded, }: DropupSectionProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { type IconButtonProps as MuiIconButtonProps } from '@mui/material/IconButton';
3
+ import { CompleteThemeSettings } from '../../types';
4
+ interface IconButtonProps extends MuiIconButtonProps {
5
+ $themeSettings?: CompleteThemeSettings;
6
+ }
7
+ declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
9
+ }, "style" | "children" | "disabled" | "size" | "className" | "tabIndex" | "color" | "action" | "classes" | "sx" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ } & IconButtonProps, {}, {}>;
12
+ export default IconButton;
@@ -1,8 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
+ type ToolbarStyle = {
3
+ textColor: string;
4
+ backgroundColor: string;
5
+ };
2
6
  export interface Props {
3
7
  title: string;
4
8
  leftNav: ReactNode;
5
9
  rightNav?: JSX.Element;
10
+ style: ToolbarStyle;
6
11
  }
7
12
  declare const _default: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
8
13
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type TooltipProps as MuiTooltipProps } from '@mui/material';
2
+ import { type TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
3
3
  type TooltipProps = Pick<MuiTooltipProps, 'title' | 'children'>;
4
4
  export default function Tooltip({ title, children }: TooltipProps): JSX.Element;
5
5
  export {};
@@ -1,2 +1,6 @@
1
1
  /// <reference types="react" />
2
- export default function ArrowLeftIcon(): JSX.Element;
2
+ type Colorable = {
3
+ color: string;
4
+ };
5
+ export default function ArrowLeftIcon({ color }: Colorable): JSX.Element;
6
+ export {};
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function ClearChatIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function ClearChatIcon({ theme }: Themable): JSX.Element;
@@ -1,2 +1,4 @@
1
1
  /// <reference types="react" />
2
- export default function ExpandIcon(): JSX.Element;
2
+ export default function ExpandIcon({ fill }: {
3
+ fill?: string;
4
+ }): JSX.Element;
@@ -1,2 +1,4 @@
1
1
  /// <reference types="react" />
2
- export default function InfoIcon(): JSX.Element;
2
+ export default function InfoIcon({ fill }: {
3
+ fill?: string;
4
+ }): JSX.Element;
@@ -1,2 +1,4 @@
1
1
  /// <reference types="react" />
2
- export default function LightBulbIcon(): JSX.Element;
2
+ export default function LightBulbIcon({ hover }: {
3
+ hover?: boolean;
4
+ }): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function MessageIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function MessageIcon({ theme }: Themable): JSX.Element;
@@ -1,2 +1,6 @@
1
1
  /// <reference types="react" />
2
- export default function SisenseLogo(): JSX.Element;
2
+ type ColorSchema = 'yellow-white' | 'yellow-black';
3
+ export default function SisenseLogo({ colorSchema }: {
4
+ colorSchema: ColorSchema;
5
+ }): JSX.Element;
6
+ export {};
@@ -1,2 +1,4 @@
1
1
  /// <reference types="react" />
2
- export default function ThreeDotsIcon(): JSX.Element;
2
+ export default function ThreeDotsIcon({ fill }: {
3
+ fill?: string;
4
+ }): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function ThumbsDownHoveredIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function ThumbsDownHoveredIcon({ theme }: Themable): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function ThumbsDownIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function ThumbsDownIcon({ theme }: Themable): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function ThumbsUpHoveredIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function ThumbsUpHoveredIcon({ theme }: Themable): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  /// <reference types="react" />
2
- export default function ThumbsUpIcon(): JSX.Element;
2
+ import { Themable } from '../../theme-provider/types';
3
+ export default function ThumbsUpIcon({ theme }: Themable): JSX.Element;
@@ -2,8 +2,10 @@
2
2
  type Props = {
3
3
  children: string | JSX.Element;
4
4
  align: 'left' | 'right';
5
- onClick: () => void;
5
+ onClick?: () => void;
6
6
  disabled?: boolean;
7
+ onMouseEnter?: () => void;
8
+ onMouseLeave?: () => void;
7
9
  };
8
- export default function ClickableMessage({ children, align, onClick, disabled }: Props): JSX.Element;
10
+ export default function ClickableMessage({ children, align, onClick, disabled, onMouseEnter, onMouseLeave, }: Props): JSX.Element;
9
11
  export {};
@@ -3,8 +3,8 @@ type FeedbackWrapperProps = {
3
3
  sourceId: string;
4
4
  data: object;
5
5
  type: string;
6
- visible?: boolean;
6
+ buttonVisibility?: 'onHover' | 'always' | 'never';
7
7
  children: ReactNode;
8
8
  };
9
- export default function FeedbackWrapper({ sourceId, data, type, visible, children, }: FeedbackWrapperProps): JSX.Element;
9
+ export default function FeedbackWrapper({ sourceId, data, type, buttonVisibility, children, }: FeedbackWrapperProps): JSX.Element;
10
10
  export {};
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { GetNlgQueryResultRequest } from '../api/types';
3
- export declare function InsightsButton({ onClick, disabled }: {
4
- onClick: () => void;
3
+ export declare function InsightsButton({ onClick, disabled, }: {
4
+ onClick?: () => void;
5
5
  disabled?: boolean;
6
6
  }): JSX.Element;
7
7
  type InsightsMessageProps = {
@@ -1,4 +1,4 @@
1
- import { DimensionalElement } from '@sisense/sdk-data';
1
+ import { DimensionalElement, SortDirection } from '@sisense/sdk-data';
2
2
  import { MetadataItem } from '@sisense/sdk-query-client';
3
3
  /**
4
4
  * This implementation wraps metadata for a JAQL query. The metadata could be
@@ -15,9 +15,12 @@ import { MetadataItem } from '@sisense/sdk-query-client';
15
15
  * @internal
16
16
  */
17
17
  export declare class JaqlElement extends DimensionalElement {
18
- private metadataItem;
18
+ private readonly metadataItem;
19
19
  expression: string;
20
20
  skipValidation: boolean;
21
+ aggregation?: string;
22
+ formula?: string;
23
+ sortType?: SortDirection;
21
24
  constructor(item: MetadataItem, type: string);
22
25
  get id(): string;
23
26
  jaql(): MetadataItem;
@@ -2,7 +2,8 @@
2
2
  import { ChatMessage } from '../api/types';
3
3
  type MessageResolverProps = {
4
4
  message: ChatMessage;
5
+ isLastMessage?: boolean;
5
6
  };
6
- declare function MessageResolver({ message }: MessageResolverProps): JSX.Element;
7
+ declare function MessageResolver({ message, isLastMessage }: MessageResolverProps): JSX.Element;
7
8
  declare const _default: import("react").MemoExoticComponent<typeof MessageResolver>;
8
9
  export default _default;
@@ -1,10 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { NlqResponseData } from '../api/types';
3
+ interface NlqMessageGroupProps {
4
+ data: NlqResponseData;
5
+ alwaysShowFeedback?: boolean;
6
+ }
3
7
  /**
4
8
  * Renders a NLQ response as a series of chat messages/buttons.
5
9
  *
6
10
  * @internal
7
11
  */
8
- export default function NlqMessageGroup({ data }: {
9
- data: NlqResponseData;
10
- }): JSX.Element;
12
+ export default function NlqMessageGroup({ data, alwaysShowFeedback }: NlqMessageGroupProps): JSX.Element;
13
+ export {};
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- type Props = {
3
- children: string | JSX.Element;
1
+ import { FC, PropsWithChildren } from 'react';
2
+ type Alignable = {
4
3
  align: 'left' | 'right' | 'full';
5
4
  };
6
- export default function TextMessage({ children, align }: Props): JSX.Element;
7
- export {};
5
+ declare const TextMessage: FC<PropsWithChildren<Alignable>>;
6
+ export default TextMessage;
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
- interface Props {
2
+ type Colorable = {
3
+ color: string;
4
+ };
5
+ type Clickable = {
3
6
  onClick: () => void;
4
- }
5
- export default function NavBackButton({ onClick }: Props): JSX.Element;
7
+ };
8
+ export default function NavBackButton({ onClick, color }: Clickable & Colorable): JSX.Element;
6
9
  export {};