@sisense/sdk-ui 1.7.2 → 1.8.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 (53) hide show
  1. package/dist/ai/ai-disclaimer.d.ts +2 -0
  2. package/dist/ai/chat-config.d.ts +6 -0
  3. package/dist/ai/messages/chat-welcome-message.d.ts +1 -1
  4. package/dist/ai/messages/clickable-message.d.ts +9 -0
  5. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  6. package/dist/ai/messages/insights-message.d.ts +5 -5
  7. package/dist/ai/messages/text-message.d.ts +1 -2
  8. package/dist/ai/translators/model-translator.d.ts +1 -0
  9. package/dist/ai/translators/query-translator.d.ts +16 -1
  10. package/dist/ai/translators/translate-filters-to-code.d.ts +2 -0
  11. package/dist/ai/translators/translate-props-to-code.d.ts +1 -1
  12. package/dist/ai/translators/utils.d.ts +10 -0
  13. package/dist/ai.js +1723 -1612
  14. package/dist/area-chart.d.ts +14 -18
  15. package/dist/areamap-chart.d.ts +13 -15
  16. package/dist/bar-chart.d.ts +13 -18
  17. package/dist/boxplot-chart.d.ts +11 -25
  18. package/dist/chart/chart.d.ts +8 -66
  19. package/dist/chart-data/cartesian-data.d.ts +1 -1
  20. package/dist/chart-data/chart-data-service.d.ts +1 -2
  21. package/dist/chart-data/data-coloring/types.d.ts +1 -7
  22. package/dist/chart-data-options/types.d.ts +5 -3
  23. package/dist/column-chart.d.ts +15 -18
  24. package/dist/dashboard-widget/dashboard-widget.d.ts +10 -7
  25. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  26. package/dist/dashboard-widget/translate-widget-filters.d.ts +22 -14
  27. package/dist/dashboard-widget/types.d.ts +2 -2
  28. package/dist/dashboard-widget/utils.d.ts +2 -2
  29. package/dist/formulas/use-get-shared-formula.d.ts +3 -3
  30. package/dist/funnel-chart.d.ts +9 -36
  31. package/dist/index.d.ts +0 -1
  32. package/dist/index.js +1619 -1620
  33. package/dist/indicator-chart.d.ts +0 -1
  34. package/dist/line-chart.d.ts +14 -17
  35. package/dist/models/widget/use-get-widget-model.d.ts +16 -21
  36. package/dist/pie-chart.d.ts +14 -16
  37. package/dist/pivot-table/pivot-table.d.ts +43 -3
  38. package/dist/polar-chart.d.ts +14 -17
  39. package/dist/props.d.ts +12 -12
  40. package/dist/query-execution/use-execute-pivot-query.d.ts +11 -29
  41. package/dist/query-execution/use-execute-query.d.ts +19 -26
  42. package/dist/scatter-chart.d.ts +11 -49
  43. package/dist/scattermap-chart.d.ts +9 -22
  44. package/dist/sunburst-chart.d.ts +10 -15
  45. package/dist/table/table.d.ts +7 -37
  46. package/dist/translation/resources/en.d.ts +1 -0
  47. package/dist/translation/resources/index.d.ts +2 -0
  48. package/dist/treemap-chart.d.ts +10 -21
  49. package/dist/types.d.ts +2 -3
  50. package/dist/{useQuery-76ecbd20.js → useQuery-cb11e76c.js} +18866 -18607
  51. package/dist/widgets/common/drilldown.d.ts +1 -20
  52. package/dist/widgets/drilldown-widget.d.ts +21 -33
  53. package/package.json +7 -7
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function AiDisclaimer(): JSX.Element;
@@ -27,6 +27,12 @@ export interface ChatConfig {
27
27
  chatMode?: ChatMode;
28
28
  /** The input prompt text to show in the chat input box */
29
29
  inputPromptText: string;
30
+ /**
31
+ * The welcome text to show at the top of a chat session.
32
+ *
33
+ * A value of `false` will hide the welcome text.
34
+ */
35
+ welcomeText?: string | false;
30
36
  }
31
37
  export declare const DEFAULTS: Readonly<ChatConfig>;
32
38
  export type ChatConfigProviderProps = {
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export default function ChatWelcomeMessage(): JSX.Element;
2
+ export default function ChatWelcomeMessage(): JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ children: string | JSX.Element;
4
+ align: 'left' | 'right';
5
+ onClick: () => void;
6
+ disabled?: boolean;
7
+ };
8
+ export default function ClickableMessage({ children, align, onClick, disabled }: Props): JSX.Element;
9
+ export {};
@@ -3,8 +3,8 @@ type FeedbackWrapperProps = {
3
3
  sourceId: string;
4
4
  data: object;
5
5
  type: string;
6
- rightFooter?: ReactNode;
6
+ visible?: boolean;
7
7
  children: ReactNode;
8
8
  };
9
- export default function FeedbackWrapper({ sourceId, data, type, rightFooter, children, }: FeedbackWrapperProps): JSX.Element;
9
+ export default function FeedbackWrapper({ sourceId, data, type, visible, children, }: FeedbackWrapperProps): JSX.Element;
10
10
  export {};
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
- export declare function InsightsButton({ onClick, disabled, }: {
3
- onClick?: () => void;
2
+ import { GetNlgQueryResultRequest } from '../api/types';
3
+ export declare function InsightsButton({ onClick, disabled }: {
4
+ onClick: () => void;
4
5
  disabled?: boolean;
5
6
  }): JSX.Element;
6
7
  type InsightsMessageProps = {
7
- dataSource: string;
8
- metadata: object[];
8
+ nlgRequest: GetNlgQueryResultRequest;
9
9
  visible?: boolean;
10
10
  };
11
- export default function InsightsMessage({ dataSource, metadata, visible, }: InsightsMessageProps): JSX.Element | null;
11
+ export default function InsightsMessage({ nlgRequest, visible }: InsightsMessageProps): JSX.Element | null;
12
12
  export {};
@@ -2,7 +2,6 @@
2
2
  type Props = {
3
3
  children: string | JSX.Element;
4
4
  align: 'left' | 'right' | 'full';
5
- onClick?: () => void;
6
5
  };
7
- export default function TextMessage({ children, align, onClick }: Props): JSX.Element;
6
+ export default function TextMessage({ children, align }: Props): JSX.Element;
8
7
  export {};
@@ -18,6 +18,7 @@ export declare class ModelTranslator {
18
18
  * Gets filters from metadata.
19
19
  *
20
20
  * @param metadata - metadata items
21
+ * @return array of Filter objects
21
22
  */
22
23
  private getFilters;
23
24
  /**
@@ -12,7 +12,7 @@ import { ChartRecommendations } from '../../ai';
12
12
  */
13
13
  export declare class QueryTranslator {
14
14
  private readonly contextTitle;
15
- private indexedFields;
15
+ private readonly indexedFields;
16
16
  /**
17
17
  * Constructor for QueryTranslator.
18
18
  *
@@ -20,6 +20,7 @@ export declare class QueryTranslator {
20
20
  * @param fields - The data source fields
21
21
  */
22
22
  constructor(contextTitle: string, fields: DataSourceField[]);
23
+ private indexFields;
23
24
  /**
24
25
  * Concatenates Aggregation Types.
25
26
  */
@@ -40,6 +41,20 @@ export declare class QueryTranslator {
40
41
  * @returns The simplified MetadataItemJaql
41
42
  */
42
43
  simplifyMetadataItemJaql(item: MetadataItemJaql): MetadataItemJaql;
44
+ /**
45
+ * Simplify filter
46
+ *
47
+ * @param item - the MetadataItem
48
+ * @return the MetadataItem with simplified filter
49
+ */
50
+ simplifyMetadataItemFilter(item: MetadataItem): MetadataItem;
51
+ /**
52
+ * Simplify date and number format
53
+ *
54
+ * @param item - the MetadataItem
55
+ * @return the MetadataItem with simplified format
56
+ */
57
+ simplifyMetadataItemFormat(item: MetadataItem): MetadataItem;
43
58
  /**
44
59
  * Simplifies MetadataItem.
45
60
  *
@@ -0,0 +1,2 @@
1
+ import { Filter } from '@sisense/sdk-data';
2
+ export declare const stringifyFilterList: (filters: Filter[], indent?: number) => string;
@@ -5,4 +5,4 @@ export type FromNotEqualFilterJaql = {
5
5
  fromNotEqual: number;
6
6
  };
7
7
  export type FilterJaql = MembersFilterJaql | FromNotEqualFilterJaql;
8
- export declare const stringifyProps: (props: object, indent?: number, wrapInQuotes?: boolean) => string;
8
+ export declare const stringifyProps: (props: object | string, indent?: number, wrapInQuotes?: boolean) => string;
@@ -1,2 +1,12 @@
1
+ import { ExpandedQueryModel, SimpleQueryModel } from './types';
1
2
  export declare function toKebabCase(str: string): string;
2
3
  export declare function capitalizeFirstLetter(str: string): string;
4
+ /**
5
+ * Sanitize ID of a dimension
6
+ *
7
+ * @param str - input string
8
+ * @return sanitized ID
9
+ */
10
+ export declare function sanitizeDimensionId(str: string): string;
11
+ export declare function validateQueryModel(model: any): SimpleQueryModel;
12
+ export declare function isEmptyQueryModel(queryModel: ExpandedQueryModel | undefined | null): boolean;