@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,6 +1,21 @@
1
1
  import { WidgetDto, Datasource } from '../../dashboard-widget/types';
2
2
  import { FilterJaql, FilterRelationsModel } from '@sisense/sdk-data';
3
3
  import { AnyObject } from '../../utils/utility-types';
4
+ /** @internal */
5
+ export type Layout = {
6
+ columns: {
7
+ width: number;
8
+ cells: {
9
+ subcells: {
10
+ width: number;
11
+ elements: {
12
+ height: number | string;
13
+ widgetid: string;
14
+ }[];
15
+ }[];
16
+ }[];
17
+ }[];
18
+ };
4
19
  export type Filter = {
5
20
  isCascading?: false;
6
21
  jaql: FilterJaql & AnyObject;
@@ -22,4 +37,5 @@ export type DashboardDto = {
22
37
  filterRelations?: {
23
38
  filterRelations: FilterRelationsModel;
24
39
  }[];
40
+ layout?: Layout;
25
41
  } & AnyObject;
@@ -47,9 +47,13 @@ export type AppConfig = {
47
47
  */
48
48
  queryLimit?: number;
49
49
  /**
50
- * Accessibility configuration
50
+ * Accessibility configuration. Set the `accessibilityConfig.enabled` property to `true` to enable accessibility features for charts built with Highcharts.
51
51
  *
52
- * This feature is in alpha
52
+ * Once the accessibility configuration in enabled, you can use the default descriptions or choose to create custom configurations for the descriptions of a chart, its axes, its series, and values description formatting. To create custom configurations, use the `highchartsOptions` object that is passed to the {@link BeforeRenderHandler} of the chart's `onBeforeRender` callback. Modify the object using the accessibility options as described in the [Accessibility module documentation](https://www.highcharts.com/docs/accessibility/accessibility-module).
53
+ *
54
+ * Note that enabling accessibility also causes markers to appear in charts even if they are disabled using the chart's `styleOptions`.
55
+ *
56
+ * This feature is in alpha.
53
57
  */
54
58
  accessibilityConfig?: {
55
59
  /**
@@ -9,7 +9,7 @@ import { AreaChartProps } from './props';
9
9
  * Area chart displaying total revenue per quarter from the Sample ECommerce data model.
10
10
  *
11
11
  * <iframe
12
- * src='https://dhoavm6pu1cvg.cloudfront.net/?example=charts%2Farea-chart&mode=docs'
12
+ * src='https://csdk-playground.sisense.com/?example=charts%2Farea-chart&mode=docs'
13
13
  * width=800
14
14
  * height=870
15
15
  * style='border:none;'
@@ -17,8 +17,8 @@ import { AreaChartProps } from './props';
17
17
  *
18
18
  * Additional Area Chart examples:
19
19
  *
20
- * - [Stacked Area Chart](https://csdk-playground.sisense.com/?example=charts%2Farea-chart-stacked)
21
- * - [Stacked Percentage Area Chart](https://csdk-playground.sisense.com/?example=charts%2Farea-chart-stacked100)
20
+ * - [Stacked Area Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Farea-chart-stacked)
21
+ * - [Stacked Percentage Area Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Farea-chart-stacked100)
22
22
  *
23
23
  * @param props - Area chart properties
24
24
  * @returns Area Chart component
@@ -17,8 +17,8 @@ import { BarChartProps } from './props';
17
17
  *
18
18
  * Additional Bar Chart examples:
19
19
  *
20
- * - [Stacked Bar Chart](https://csdk-playground.sisense.com/?example=charts%2Fbar-chart-stacked)
21
- * - [Stacked Percentage Bar Chart](https://csdk-playground.sisense.com/?example=charts%2Fbar-chart-stacked100)
20
+ * - [Stacked Bar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fbar-chart-stacked)
21
+ * - [Stacked Percentage Bar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fbar-chart-stacked100)
22
22
  *
23
23
  * @param props - Bar chart properties
24
24
  * @returns Bar Chart component
@@ -1,5 +1,14 @@
1
1
  import { Attribute, CalculatedMeasureColumn, Column, Measure, MeasureColumn } from '@sisense/sdk-data';
2
2
  import { Category, Value, StyledColumn, StyledMeasureColumn, AnyColumn, CategoryStyle } from './types';
3
+ type AnyObject = Record<string, any>;
4
+ /**
5
+ * Combines two objects into a single one with saving prototype inheritance of "sourceWithInheritance" argument
6
+ *
7
+ * @param sourceWithInheritance - The object that has own and inherited properties.
8
+ * @param sourceToAbsorb - The object whose properties will be copied as own properties.
9
+ * @returns - A new object that combines the properties of the two input objects.
10
+ */
11
+ export declare const safeCombine: <T extends AnyObject>(sourceWithInheritance: T, sourceToAbsorb: AnyObject) => T;
3
12
  export declare const splitColumn: (c: StyledColumn | Column) => {
4
13
  column: Column;
5
14
  style: CategoryStyle | undefined;
@@ -14,3 +23,4 @@ export declare const translateCategoryToAttribute: (category: Category) => Attri
14
23
  export declare const getDataOptionTitle: (option: Category | Value) => string;
15
24
  export declare const translateColumnToAttribure: (c: StyledColumn | Column) => Attribute;
16
25
  export declare const translateColumnToMeasure: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Measure;
26
+ export {};
@@ -1,11 +1,3 @@
1
1
  import { CompleteThemeSettings } from '../types';
2
2
  import { HighchartsOptionsInternal } from './chart-options-service';
3
3
  export declare const applyThemeToChart: (chartOptions: HighchartsOptionsInternal, themeSettings?: CompleteThemeSettings) => HighchartsOptionsInternal;
4
- /**
5
- * Returns default theme settings, which can be used as base for custom theme options.
6
- *
7
- * @param isDarkMode - Boolean value whether to get theme settings for dark mode
8
- * @returns Theme settings object
9
- * @internal
10
- */
11
- export declare const getDefaultThemeSettings: (isDarkMode?: boolean) => CompleteThemeSettings;
@@ -20,8 +20,8 @@ import { ColumnChartProps } from './props';
20
20
  *
21
21
  * Additional Column Chart examples:
22
22
  *
23
- * - [Stacked Column Chart](https://csdk-playground.sisense.com/?example=charts%2Fcolumn-chart-stacked)
24
- * - [Stacked Percentage Column Chart](https://csdk-playground.sisense.com/?example=charts%2Fcolumn-chart-stacked100)
23
+ * - [Stacked Column Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fcolumn-chart-stacked)
24
+ * - [Stacked Percentage Column Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fcolumn-chart-stacked100)
25
25
  *
26
26
  * @param props - Column chart properties
27
27
  * @returns Column Chart component
@@ -30,6 +30,88 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
30
30
  primaryButtonTextColor: string;
31
31
  primaryButtonHoverColor: string;
32
32
  };
33
+ aiChat: {
34
+ backgroundColor: string;
35
+ primaryTextColor: string;
36
+ secondaryTextColor: string;
37
+ primaryFontSize: [fontSize: string, lineHeight: string];
38
+ border: string | false;
39
+ borderRadius: string | false;
40
+ body: {
41
+ paddingLeft: string;
42
+ paddingRight: string;
43
+ paddingTop: string;
44
+ paddingBottom: string;
45
+ gapBetweenMessages: string;
46
+ };
47
+ footer: {
48
+ paddingLeft: string;
49
+ paddingRight: string;
50
+ paddingTop: string;
51
+ paddingBottom: string;
52
+ };
53
+ userMessages: {
54
+ backgroundColor: string;
55
+ };
56
+ systemMessages: {
57
+ backgroundColor: string;
58
+ };
59
+ input: {
60
+ backgroundColor: string;
61
+ focus: {
62
+ outlineColor: string;
63
+ };
64
+ };
65
+ header: {
66
+ backgroundColor: string;
67
+ textColor: string;
68
+ };
69
+ dropup: {
70
+ backgroundColor: string;
71
+ boxShadow: string;
72
+ borderRadius: string;
73
+ headers: {
74
+ textColor: string;
75
+ hover: {
76
+ backgroundColor: string;
77
+ };
78
+ };
79
+ items: {
80
+ textColor: string;
81
+ hover: {
82
+ backgroundColor: string;
83
+ };
84
+ };
85
+ };
86
+ suggestions: {
87
+ textColor: string;
88
+ backgroundColor: string;
89
+ border: string;
90
+ borderGradient: [string, string] | null;
91
+ borderRadius: string;
92
+ hover: {
93
+ backgroundColor: string;
94
+ textColor: string;
95
+ };
96
+ loadingGradient: [string, string];
97
+ gap: string;
98
+ };
99
+ clickableMessages: {
100
+ backgroundColor: string;
101
+ textColor: string;
102
+ border: string | false;
103
+ hover: {
104
+ textColor: string;
105
+ backgroundColor: string;
106
+ };
107
+ };
108
+ icons: {
109
+ color: string;
110
+ hover: {
111
+ color: string;
112
+ };
113
+ };
114
+ };
33
115
  } | undefined;
34
116
  onCancel?: (() => void) | undefined;
35
117
  }) => JSX.Element;
@@ -1,5 +1,6 @@
1
- import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions } from '../types';
2
- import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
1
+ import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions } from '../types';
2
+ import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle } from './types';
3
3
  export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
4
4
  export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
5
+ export declare function extractPivotTableStyleOptions(widgetStyle: PivotWidgetStyle): PivotTableStyleOptions;
5
6
  export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): ChartStyleOptions | TableStyleOptions;
@@ -10,7 +10,7 @@ export type CategoricalWidgetType = 'chart/pie' | 'chart/funnel' | 'treemap' | '
10
10
  /**
11
11
  * The type of a widget on a dashboard that is a variant of tabular widget.
12
12
  */
13
- export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg' | 'pivot2';
13
+ export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg' | 'pivot' | 'pivot2';
14
14
  /**
15
15
  * The type of a widget on a dashboard.
16
16
  */
@@ -102,6 +102,8 @@ export type PanelItem = {
102
102
  color?: PanelColorFormat;
103
103
  mask?: DatetimeMask | NumericMask;
104
104
  members?: PanelMembersFormat;
105
+ subtotal?: boolean;
106
+ databars?: boolean;
105
107
  };
106
108
  jaql: Jaql;
107
109
  disabled?: boolean;
@@ -112,6 +114,10 @@ export type PanelItem = {
112
114
  categoriesSorting?: JaqlSortDirection;
113
115
  isColored?: boolean;
114
116
  geoLevel?: 'country' | 'state' | 'city';
117
+ field?: {
118
+ id: string;
119
+ index: number;
120
+ };
115
121
  };
116
122
  export type PanelColorFormat = PanelColorFormatSingle | PanelColorFormatRange | PanelColorFormatConditional;
117
123
  export type PanelMembersFormat = Record<string, {
@@ -326,11 +332,25 @@ export type ScattermapWidgetStyle = {
326
332
  };
327
333
  /** Currently, WidgetStyle for areamap is an empty object */
328
334
  export type AreamapWidgetStyle = {};
329
- export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle;
335
+ export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle | PivotWidgetStyle;
330
336
  export declare enum FiltersMergeStrategyEnum {
331
337
  WIDGET_FIRST = "widgetFirst",
332
338
  CODE_FIRST = "codeFirst",
333
339
  CODE_ONLY = "codeOnly"
334
340
  }
335
341
  export type FiltersMergeStrategy = `${FiltersMergeStrategyEnum}`;
342
+ export type PivotWidgetStyle = {
343
+ rowsGrandTotal?: boolean;
344
+ columnsGrandTotal?: boolean;
345
+ colors?: {
346
+ rows?: boolean;
347
+ columns?: boolean;
348
+ headers?: boolean;
349
+ members?: boolean;
350
+ totals?: boolean;
351
+ };
352
+ pageSize?: number | string;
353
+ rowHeight?: number;
354
+ automaticHeight?: boolean;
355
+ };
336
356
  export {};
@@ -28,6 +28,7 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
28
28
  filterRelations?: {
29
29
  filterRelations: import("@sisense/sdk-data").FilterRelationsModel;
30
30
  }[] | undefined;
31
+ layout?: import("../api/types/dashboard-dto").Layout | undefined;
31
32
  } & import("../utils/utility-types").AnyObject) | undefined;
32
33
  }>;
33
34
  /**
@@ -6,6 +6,8 @@ export declare function getChartType(widgetType: WidgetType): ChartType;
6
6
  export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
7
7
  type WidgetTypeOrString = string | WidgetType;
8
8
  export declare function isSupportedWidgetType(widgetType: WidgetTypeOrString): widgetType is WidgetType;
9
+ export declare function isTableWidget(widgetType: WidgetTypeOrString): boolean;
10
+ export declare function isPivotWidget(widgetType: WidgetTypeOrString): boolean;
9
11
  export declare function isTabularWidget(widgetType: WidgetTypeOrString): boolean;
10
12
  export declare function getEnabledPanelItems(panels: Panel[], panelName: string): PanelItem[];
11
13
  export declare function getRootPanelItem(item: PanelItem): PanelItem;