@sisense/sdk-ui 1.7.2 → 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 (106) hide show
  1. package/dist/ai/ai-disclaimer.d.ts +5 -0
  2. package/dist/ai/chat-config.d.ts +26 -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/chat-welcome-message.d.ts +1 -1
  24. package/dist/ai/messages/clickable-message.d.ts +11 -0
  25. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  26. package/dist/ai/messages/insights-message.d.ts +3 -3
  27. package/dist/ai/messages/jaql-element.d.ts +5 -2
  28. package/dist/ai/messages/message-resolver.d.ts +2 -1
  29. package/dist/ai/messages/nlq-message-group.d.ts +6 -3
  30. package/dist/ai/messages/text-message.d.ts +4 -6
  31. package/dist/ai/nav-back-button.d.ts +6 -3
  32. package/dist/ai/translators/model-translator.d.ts +1 -0
  33. package/dist/ai/translators/query-translator.d.ts +16 -1
  34. package/dist/ai/translators/translate-filters-to-code.d.ts +2 -0
  35. package/dist/ai/translators/translate-props-to-code.d.ts +1 -1
  36. package/dist/ai/translators/utils.d.ts +10 -0
  37. package/dist/ai.js +2981 -2592
  38. package/dist/api/types/dashboard-dto.d.ts +16 -0
  39. package/dist/app/client-application.d.ts +6 -2
  40. package/dist/area-chart.d.ts +14 -18
  41. package/dist/areamap-chart.d.ts +13 -15
  42. package/dist/bar-chart.d.ts +13 -18
  43. package/dist/boxplot-chart.d.ts +11 -25
  44. package/dist/chart/chart.d.ts +8 -66
  45. package/dist/chart-data/cartesian-data.d.ts +1 -1
  46. package/dist/chart-data/chart-data-service.d.ts +1 -2
  47. package/dist/chart-data/data-coloring/types.d.ts +1 -7
  48. package/dist/chart-data-options/types.d.ts +5 -3
  49. package/dist/chart-data-options/utils.d.ts +10 -0
  50. package/dist/chart-options-processor/theme-option-service.d.ts +0 -8
  51. package/dist/column-chart.d.ts +15 -18
  52. package/dist/common/components/loading-indicator.d.ts +82 -0
  53. package/dist/dashboard-widget/dashboard-widget.d.ts +10 -7
  54. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  55. package/dist/dashboard-widget/translate-widget-filters.d.ts +22 -14
  56. package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
  57. package/dist/dashboard-widget/types.d.ts +24 -4
  58. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
  59. package/dist/dashboard-widget/utils.d.ts +4 -2
  60. package/dist/debounce-Cc9bQD5m.js +76199 -0
  61. package/dist/dynamic-size-container/default-size.d.ts +5 -1
  62. package/dist/dynamic-size-container/dynamic-size-container.d.ts +12 -3
  63. package/dist/filters/components/common/dropdown.d.ts +1 -1
  64. package/dist/filters/components/common/switch.d.ts +3 -1
  65. package/dist/formulas/use-get-shared-formula.d.ts +3 -3
  66. package/dist/funnel-chart.d.ts +9 -36
  67. package/dist/index.d.ts +1 -2
  68. package/dist/index.js +46556 -7127
  69. package/dist/indicator-chart.d.ts +0 -1
  70. package/dist/line-chart.d.ts +14 -17
  71. package/dist/models/dashboard/translate-dashboard.d.ts +3 -2
  72. package/dist/models/dashboard/types.d.ts +6 -8
  73. package/dist/models/widget/use-get-widget-model.d.ts +16 -21
  74. package/dist/models/widget/widget-model.d.ts +50 -6
  75. package/dist/pie-chart.d.ts +14 -16
  76. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
  77. package/dist/pivot-table/pivot-table.d.ts +43 -3
  78. package/dist/pivot-table/sorting-utils.d.ts +11 -55
  79. package/dist/pivot-table/use-get-pivot-table-query.d.ts +10 -2
  80. package/dist/pivot-table/use-pivot-table-data-options-internal.d.ts +15 -0
  81. package/dist/polar-chart.d.ts +14 -17
  82. package/dist/props.d.ts +72 -13
  83. package/dist/query-execution/use-execute-pivot-query.d.ts +11 -29
  84. package/dist/query-execution/use-execute-query.d.ts +19 -26
  85. package/dist/scatter-chart.d.ts +11 -49
  86. package/dist/scattermap-chart.d.ts +9 -22
  87. package/dist/sunburst-chart.d.ts +10 -15
  88. package/dist/table/table.d.ts +7 -37
  89. package/dist/theme-provider/default-theme-settings.d.ts +9 -0
  90. package/dist/theme-provider/types.d.ts +7 -0
  91. package/dist/translation/resources/en.d.ts +4 -1
  92. package/dist/translation/resources/index.d.ts +8 -2
  93. package/dist/treemap-chart.d.ts +10 -21
  94. package/dist/types.d.ts +172 -4
  95. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  96. package/dist/widgets/common/drilldown.d.ts +1 -20
  97. package/dist/widgets/common/widget-container.d.ts +15 -0
  98. package/dist/widgets/drilldown-widget.d.ts +21 -33
  99. package/dist/widgets/pivot-table-widget.d.ts +22 -0
  100. package/package.json +10 -9
  101. package/dist/ai/chat-style-provider.d.ts +0 -22
  102. package/dist/ai/icons/magic-wand-icon.d.ts +0 -2
  103. package/dist/ai/magic-wand-dropdown.d.ts +0 -7
  104. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +0 -7
  105. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +0 -7
  106. package/dist/useQuery-76ecbd20.js +0 -121360
@@ -14,26 +14,7 @@ export declare const useDrilldown: (dataOptions: ChartDataOptions, drilldownOpti
14
14
  drilldownFilters: MembersFilter[];
15
15
  drilldownFiltersDisplayValues: string[][];
16
16
  drilldownDimension: Attribute;
17
- dataOptionsWithDrilldown: {
18
- category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn | undefined)[];
19
- value: (import("@sisense/sdk-data").MeasureColumn | import("@sisense/sdk-data").CalculatedMeasureColumn | import("../../types").StyledMeasureColumn)[];
20
- breakBy: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn)[];
21
- seriesToColorMap?: import("../../types").ValueToColorMap | undefined;
22
- } | {
23
- category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn | undefined)[];
24
- value: (import("@sisense/sdk-data").MeasureColumn | import("@sisense/sdk-data").CalculatedMeasureColumn | import("../../types").StyledMeasureColumn)[];
25
- seriesToColorMap?: import("../../types").ValueToColorMap | import("../../types").MultiColumnValueToColorMap | undefined;
26
- } | {
27
- category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn | undefined)[];
28
- value: [import("@sisense/sdk-data").Column | import("../../types").StyledColumn];
29
- boxType: import("../..").BoxWhiskerType;
30
- outliersEnabled?: boolean | undefined;
31
- } | {
32
- category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn | undefined)[];
33
- value: (import("@sisense/sdk-data").Column | import("@sisense/sdk-data").MeasureColumn | import("@sisense/sdk-data").CalculatedMeasureColumn | import("../../types").StyledMeasureColumn | import("../../types").StyledColumn)[];
34
- outliers?: [import("@sisense/sdk-data").Column | import("../../types").StyledColumn] | undefined;
35
- valueTitle: string;
36
- };
17
+ dataOptionsWithDrilldown: ChartDataOptions;
37
18
  selectDrilldown: (points: DataPoint[], nextDimension: Attribute) => void;
38
19
  sliceDrilldownSelections: (i: number) => void;
39
20
  clearDrilldownSelections: () => void;
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from 'react';
2
+ import { WidgetStyleOptions } from '../../types';
3
+ interface WidgetContainerProps {
4
+ dataSetName?: string;
5
+ styleOptions?: WidgetStyleOptions;
6
+ title?: string;
7
+ description?: string;
8
+ topSlot?: ReactNode;
9
+ bottomSlot?: ReactNode;
10
+ children: ReactNode;
11
+ onRefresh?: () => void;
12
+ }
13
+ /** @internal */
14
+ export declare const WidgetContainer: React.FC<WidgetContainerProps>;
15
+ export {};
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { DrilldownWidgetProps } from '../props';
3
3
  /**
4
- * React component designed to add drilldown functionality to any type of chart
4
+ * React component designed to add drilldown functionality to any type of chart.
5
5
  *
6
- * It acts as a wrapper around a given chart component, enhancing it with drilldown capabilities
6
+ * This component acts as a wrapper around a given chart component, enhancing it with drilldown capabilities.
7
7
  *
8
8
  * The widget offers several features including:
9
9
  * - A context menu for initiating drilldown actions (can be provided as a custom component)
@@ -12,37 +12,25 @@ import { DrilldownWidgetProps } from '../props';
12
12
  * - Filters specifically created for drilldown operation
13
13
  * - An option to navigate to the next drilldown dimension
14
14
  *
15
- * When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its value,
16
- * even before any points on the chart are selected.
17
- * This allows for complete control over the chart's dimensions to be handed over to the DrilldownWidget
18
- *
19
- * @example
20
- * Example of using the `DrilldownWidget` component to
21
- * plot a custom React component that uses the `ExecuteQuery` component to
22
- * query the `Sample ECommerce` data source hosted in a Sisense instance.
23
- * ```tsx
24
- * <DrilldownWidget
25
- * drilldownDimensions={[DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition]}
26
- * initialDimension={DM.Category.Category}
27
- * >
28
- * {({ drilldownFilters, drilldownDimension, onDataPointsSelected, onContextMenu }) => (
29
- * <ExecuteQuery
30
- * dataSource={DM.DataSource}
31
- * dimensions={[drilldownDimension]}
32
- * measures={measureFactory.sum(DM.Commerce.Revenue)}
33
- * filters={drilldownFilters}
34
- * >
35
- * {({data}) => (
36
- * <MyCustomChart
37
- * rawData={data}
38
- * onContextMenu={onContextMenu}
39
- * onDataPointsSelected={onDataPointsSelected}
40
- * />
41
- * )}
42
- * </ExecuteQuery>
43
- * )}
44
- * </DrilldownWidget>
45
- * ```
15
+ * When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its
16
+ * value, even before any points on the chart are selected.
17
+ * This allows for complete control over the chart's dimensions to be handed over to the `DrilldownWidget`.
18
+ *
19
+ * ## Example
20
+ *
21
+ * A column chart displaying total revenue by category from the Sample ECommerce data model. The chart can be drilled down by age range, gender, and condition.
22
+ *
23
+ * <iframe
24
+ * src='https://csdk-playground.sisense.com/?example=use-cases%2Fdrilldown&mode=docs'
25
+ * width=800
26
+ * height=870
27
+ * style='border:none;'
28
+ * />
29
+ *
30
+ * Additional drilldown examples:
31
+ *
32
+ * - [Detached Breadcrumbs](https://www.sisense.com/platform/compose-sdk/playground/?example=use-cases%2Fdrilldown-detached-breadcrumbs)
33
+ *
46
34
  * @param props - DrilldownWidget properties
47
35
  * @returns DrilldownWidget wrapper component
48
36
  * @group Drilldown
@@ -0,0 +1,22 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { PivotTableWidgetProps } from '../props';
3
+ /**
4
+ * The PivotTableWidget component extending the PivotTable component to support widget style options.
5
+ *
6
+ * @example
7
+ * Example of using the `PivotTableWidget` component to
8
+ * plot a pivot table over the `Sample ECommerce` data source hosted in a Sisense instance.
9
+ * ```tsx
10
+ * <PivotTableWidget
11
+ * dataSource={DM.DataSource}
12
+ * dataOptions={{
13
+ * rows: [DM.Category.Category],
14
+ * values: [measureFactory.sum(DM.Commerce.Cost, 'Total Cost')]
15
+ * }}
16
+ * />
17
+ * ```
18
+ * @param props - Pivot Table Widget properties
19
+ * @returns Widget component representing a pivot table
20
+ * @internal
21
+ */
22
+ export declare const PivotTableWidget: FunctionComponent<PivotTableWidgetProps>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.7.2",
14
+ "version": "1.9.0",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -39,13 +39,14 @@
39
39
  "@emotion/react": "^11.10.5",
40
40
  "@emotion/styled": "^11.10.5",
41
41
  "@mui/material": "^5.11.6",
42
- "@sisense/sdk-common": "^1.7.2",
43
- "@sisense/sdk-data": "^1.7.2",
44
- "@sisense/sdk-pivot-client": "^1.7.2",
45
- "@sisense/sdk-query-client": "^1.7.2",
46
- "@sisense/sdk-rest-client": "^1.7.2",
47
- "@sisense/sdk-tracking": "^1.7.2",
48
- "@sisense/sisense-charts": "5.1.0-alpha-831b13b4.0",
42
+ "@mui/system": "^5.15.15",
43
+ "@sisense/sdk-common": "^1.9.0",
44
+ "@sisense/sdk-data": "^1.9.0",
45
+ "@sisense/sdk-pivot-client": "^1.9.0",
46
+ "@sisense/sdk-query-client": "^1.9.0",
47
+ "@sisense/sdk-rest-client": "^1.9.0",
48
+ "@sisense/sdk-tracking": "^1.9.0",
49
+ "@sisense/sisense-charts": "5.1.0-alpha-e8a83de6.0",
49
50
  "@tanstack/react-query": "4.36.1",
50
51
  "classnames": "^2.3.2",
51
52
  "colorjs.io": "^0.4.3",
@@ -138,7 +139,7 @@
138
139
  "storybook": "7.0.24",
139
140
  "tailwindcss": "^3.3.1",
140
141
  "typescript": "4.8.4",
141
- "vite": "4.1.4",
142
+ "vite": "5.2.10",
142
143
  "vite-plugin-checker": "^0.6.1",
143
144
  "vite-plugin-css-injected-by-js": "3.0.1",
144
145
  "vite-plugin-dts": "^2.3.0",
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface ChatStyle {
3
- backgroundColor?: string;
4
- primaryTextColor?: string;
5
- secondaryTextColor?: string;
6
- messageBackgroundColor?: string;
7
- inputBackgroundColor?: string;
8
- border?: false | string;
9
- suggestions?: {
10
- textColor?: string;
11
- border?: string;
12
- hoverBackgroundColor?: string;
13
- loadingGradient?: [string, string];
14
- };
15
- iconColor?: string;
16
- }
17
- export type ChatStyleProviderProps = {
18
- children: ReactNode;
19
- value: ChatStyle;
20
- };
21
- export declare const useChatStyle: () => ChatStyle;
22
- export declare const ChatStyleProvider: ({ children, value }: ChatStyleProviderProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export default function MagicWandIcon(): JSX.Element;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export default function MagicWandDropdown({ questions, onSelection, isLoading, anchorEl, }: {
3
- questions: string[];
4
- onSelection: (question: string) => void;
5
- isLoading: boolean;
6
- anchorEl: Element | null;
7
- }): JSX.Element;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- type SuggestionDropdownItemProps = {
3
- onClick: () => void;
4
- text: string;
5
- };
6
- export default function SuggestionDropdownItem(props: SuggestionDropdownItemProps): JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export interface SuggestionDropdownListProps {
3
- onSelect: (selection: string) => void;
4
- suggestions: string[];
5
- isLoading: boolean;
6
- }
7
- export default function SuggestionDropdownList(props: SuggestionDropdownListProps): JSX.Element;