@sisense/sdk-ui 0.13.0 → 0.15.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 (121) hide show
  1. package/dist/ai/api/chat-api-context.d.ts +12 -0
  2. package/dist/ai/api/chat-rest-api.d.ts +28 -0
  3. package/dist/ai/api/hooks.d.ts +74 -0
  4. package/dist/ai/api/types.d.ts +139 -0
  5. package/dist/ai/chat-box.d.ts +6 -0
  6. package/dist/ai/chat-frame.d.ts +8 -0
  7. package/dist/ai/chat-home.d.ts +2 -0
  8. package/dist/ai/chat-input.d.ts +7 -0
  9. package/dist/ai/chatbot-context.d.ts +11 -0
  10. package/dist/ai/chatbot.d.ts +27 -0
  11. package/dist/ai/data-topics/data-topic-item.d.ts +8 -0
  12. package/dist/ai/data-topics/data-topic-list.d.ts +10 -0
  13. package/dist/ai/data-topics/index.d.ts +2 -0
  14. package/dist/ai/icons/arrow-left-icon.d.ts +2 -0
  15. package/dist/ai/icons/clear-chat-icon.d.ts +2 -0
  16. package/dist/ai/icons/close-dialog-icon.d.ts +2 -0
  17. package/dist/ai/icons/expand-icon.d.ts +2 -0
  18. package/dist/ai/icons/info-icon.d.ts +2 -0
  19. package/dist/ai/icons/light-bulb-icon.d.ts +2 -0
  20. package/dist/ai/icons/loading-dots-icon.d.ts +2 -0
  21. package/dist/ai/icons/magic-wand-icon.d.ts +2 -0
  22. package/dist/ai/icons/message-icon.d.ts +2 -0
  23. package/dist/ai/icons/refresh-icon.d.ts +2 -0
  24. package/dist/ai/icons/sisense-logo.d.ts +2 -0
  25. package/dist/ai/icons/three-dots-icon.d.ts +2 -0
  26. package/dist/ai/index.d.ts +4 -0
  27. package/dist/ai/magic-wand-dropdown.d.ts +7 -0
  28. package/dist/ai/messages/chart-message-toolbar.d.ts +8 -0
  29. package/dist/ai/messages/chart-message.d.ts +8 -0
  30. package/dist/ai/messages/clear-history-message.d.ts +6 -0
  31. package/dist/ai/messages/get-widget-options.d.ts +13 -0
  32. package/dist/ai/messages/insights-message.d.ts +10 -0
  33. package/dist/ai/messages/jaql-element.d.ts +25 -0
  34. package/dist/ai/messages/message-list-resolver.d.ts +7 -0
  35. package/dist/ai/messages/message-resolver.d.ts +11 -0
  36. package/dist/ai/messages/text-message.d.ts +8 -0
  37. package/dist/ai/nav-back-button.d.ts +6 -0
  38. package/dist/ai/nlg-query-result.d.ts +20 -0
  39. package/dist/ai/suggestions/index.d.ts +4 -0
  40. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +7 -0
  41. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +7 -0
  42. package/dist/ai/suggestions/suggestion-item.d.ts +7 -0
  43. package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +2 -0
  44. package/dist/ai/suggestions/suggestion-list.d.ts +7 -0
  45. package/dist/ai/suggestions/suggestions-with-intro.d.ts +8 -0
  46. package/dist/ai/toolbar.d.ts +8 -0
  47. package/dist/ai/use-chat-session.d.ts +22 -0
  48. package/dist/ai.d.ts +1 -0
  49. package/dist/ai.js +3390 -0
  50. package/dist/api/types/dashboard-dto.d.ts +13 -5
  51. package/dist/chart-data-options/types.d.ts +11 -5
  52. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
  53. package/dist/chart-options-processor/translations/scatter-series.d.ts +1 -0
  54. package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -1
  55. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +3 -2
  56. package/dist/charts/indicator/chart/indicator.d.ts +1 -1
  57. package/dist/charts/indicator/chart/ticker.d.ts +2 -2
  58. package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
  59. package/dist/charts/indicator/types.d.ts +47 -6
  60. package/dist/common/components/loading-indicator.d.ts +33 -0
  61. package/dist/common/icons/loading-icon.d.ts +6 -0
  62. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +13 -0
  63. package/dist/dashboard-widget/translate-panel-color-format.d.ts +3 -2
  64. package/dist/dashboard-widget/translate-widget-data-options.d.ts +2 -2
  65. package/dist/dashboard-widget/translate-widget-filters.d.ts +21 -2
  66. package/dist/dashboard-widget/types.d.ts +14 -52
  67. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +48 -0
  68. package/dist/dashboard-widget/utils.d.ts +3 -3
  69. package/dist/decorators/{with-tracking → component-decorators/with-tracking}/error-tracker.d.ts +1 -1
  70. package/dist/decorators/hook-decorators/index.d.ts +1 -0
  71. package/dist/decorators/hook-decorators/with-tracking.d.ts +2 -0
  72. package/dist/filters/components/common/basic-input.d.ts +8 -0
  73. package/dist/filters/components/common/index.d.ts +3 -0
  74. package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
  75. package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
  76. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +20 -0
  77. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +62 -0
  78. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +27 -0
  79. package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
  80. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
  81. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +12 -4
  82. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
  83. package/dist/filters/components/filter-tile.d.ts +5 -2
  84. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +2 -0
  85. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -2
  86. package/dist/filters/index.d.ts +1 -0
  87. package/dist/formulas/fetch-formula.d.ts +16 -0
  88. package/dist/formulas/index.d.ts +1 -0
  89. package/dist/formulas/use-get-shared-formula.d.ts +95 -0
  90. package/dist/funnel-chart.d.ts +1 -1
  91. package/dist/highcharts-memorized.d.ts +6 -0
  92. package/dist/index.d.ts +2 -1
  93. package/dist/index.js +8248 -71295
  94. package/dist/indicator-chart.d.ts +1 -1
  95. package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
  96. package/dist/models/dashboard/use-get-dashboard-model.d.ts +6 -1
  97. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -1
  98. package/dist/pie-chart.d.ts +1 -1
  99. package/dist/props.d.ts +66 -19
  100. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +18 -5
  101. package/dist/query-execution/use-execute-query.d.ts +10 -6
  102. package/dist/scatter-chart.d.ts +1 -1
  103. package/dist/table-widget-7b20ecf7.js +64167 -0
  104. package/dist/themes/colors.d.ts +86 -0
  105. package/dist/translation/resources/en.d.ts +25 -0
  106. package/dist/translation/resources/index.d.ts +50 -0
  107. package/dist/treemap-chart.d.ts +1 -2
  108. package/dist/types.d.ts +13 -3
  109. package/dist/widgets/chart-widget.d.ts +2 -2
  110. package/dist/widgets/common/drilldown.d.ts +1 -1
  111. package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
  112. package/dist/widgets/common/widget-header.d.ts +1 -1
  113. package/dist/widgets/table-widget.d.ts +1 -2
  114. package/package.json +18 -7
  115. /package/dist/decorators/{as-sisense-component.d.ts → component-decorators/as-sisense-component.d.ts} +0 -0
  116. /package/dist/decorators/{with-default-translations.d.ts → component-decorators/with-default-translations.d.ts} +0 -0
  117. /package/dist/decorators/{with-error-boundary.d.ts → component-decorators/with-error-boundary.d.ts} +0 -0
  118. /package/dist/decorators/{with-sisense-context-validation.d.ts → component-decorators/with-sisense-context-validation.d.ts} +0 -0
  119. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/index.d.ts +0 -0
  120. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/use-track-component-init.d.ts +0 -0
  121. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/with-tracking.d.ts +0 -0
@@ -0,0 +1,86 @@
1
+ export declare const colors: {
2
+ row: {
3
+ hover: string;
4
+ };
5
+ secondary: {
6
+ default: string;
7
+ hover: string;
8
+ };
9
+ text: {
10
+ active: string;
11
+ content: string;
12
+ secondary: string;
13
+ disabled: string;
14
+ link: string;
15
+ accented: string;
16
+ linkButton: string;
17
+ primary: string;
18
+ };
19
+ UI: {
20
+ default: string;
21
+ additional: string;
22
+ guiding: string;
23
+ };
24
+ background: {
25
+ workspace: string;
26
+ supporting: string;
27
+ priority: string;
28
+ };
29
+ primary: {
30
+ primary: string;
31
+ default: string;
32
+ hover: string;
33
+ };
34
+ interaction: {
35
+ defaultHover: string;
36
+ guidingHover: string;
37
+ linkHovered: string;
38
+ primaryHovered: string;
39
+ };
40
+ semantic: {
41
+ info: string;
42
+ success: string;
43
+ warning: string;
44
+ error: string;
45
+ infoBG: string;
46
+ successBG: string;
47
+ warningBG: string;
48
+ errorBG: string;
49
+ };
50
+ sisenseDark: {
51
+ text: {
52
+ active: string;
53
+ content: string;
54
+ secondary: string;
55
+ disabled: string;
56
+ link: string;
57
+ accented: string;
58
+ };
59
+ ui: {
60
+ default: string;
61
+ additional: string;
62
+ guiding: string;
63
+ };
64
+ background: {
65
+ workspace: string;
66
+ supporting: string;
67
+ priority: string;
68
+ };
69
+ interaction: {
70
+ defaultHover: string;
71
+ guidingHover: string;
72
+ linkHovered: string;
73
+ primaryHovered: string;
74
+ };
75
+ semantic: {
76
+ info: string;
77
+ success: string;
78
+ warning: string;
79
+ error: string;
80
+ infoBG: string;
81
+ successBG: string;
82
+ warningBG: string;
83
+ errorBG: string;
84
+ };
85
+ };
86
+ };
@@ -21,8 +21,33 @@ export declare const translation: {
21
21
  unsupportedWidgetType: string;
22
22
  sisenseContextNotFound: string;
23
23
  dashboardInvalidIdentifier: string;
24
+ sharedFormula: {
25
+ identifierExpected: string;
26
+ failedToFetch: string;
27
+ };
24
28
  };
25
29
  errorBoxText: string;
26
30
  chartNoData: string;
31
+ criteriaFilter: {
32
+ equals: string;
33
+ notEquals: string;
34
+ lessThan: string;
35
+ lessThanOrEqual: string;
36
+ greaterThan: string;
37
+ greaterThanOrEqual: string;
38
+ between: string;
39
+ notBetween: string;
40
+ top: string;
41
+ bottom: string;
42
+ is: string;
43
+ isNot: string;
44
+ contains: string;
45
+ notContains: string;
46
+ startsWith: string;
47
+ notStartsWith: string;
48
+ endsWith: string;
49
+ notEndsWith: string;
50
+ like: string;
51
+ };
27
52
  };
28
53
  export type TranslationDictionary = typeof translation;
@@ -25,9 +25,34 @@ export declare const resources: {
25
25
  unsupportedWidgetType: string;
26
26
  sisenseContextNotFound: string;
27
27
  dashboardInvalidIdentifier: string;
28
+ sharedFormula: {
29
+ identifierExpected: string;
30
+ failedToFetch: string;
31
+ };
28
32
  };
29
33
  errorBoxText: string;
30
34
  chartNoData: string;
35
+ criteriaFilter: {
36
+ equals: string;
37
+ notEquals: string;
38
+ lessThan: string;
39
+ lessThanOrEqual: string;
40
+ greaterThan: string;
41
+ greaterThanOrEqual: string;
42
+ between: string;
43
+ notBetween: string;
44
+ top: string;
45
+ bottom: string;
46
+ is: string;
47
+ isNot: string;
48
+ contains: string;
49
+ notContains: string;
50
+ startsWith: string;
51
+ notStartsWith: string;
52
+ endsWith: string;
53
+ notEndsWith: string;
54
+ like: string;
55
+ };
31
56
  };
32
57
  uk: {
33
58
  errors: {
@@ -52,8 +77,33 @@ export declare const resources: {
52
77
  unsupportedWidgetType: string;
53
78
  sisenseContextNotFound: string;
54
79
  dashboardInvalidIdentifier: string;
80
+ sharedFormula: {
81
+ identifierExpected: string;
82
+ failedToFetch: string;
83
+ };
55
84
  };
56
85
  errorBoxText: string;
57
86
  chartNoData: string;
87
+ criteriaFilter: {
88
+ equals: string;
89
+ notEquals: string;
90
+ lessThan: string;
91
+ lessThanOrEqual: string;
92
+ greaterThan: string;
93
+ greaterThanOrEqual: string;
94
+ between: string;
95
+ notBetween: string;
96
+ top: string;
97
+ bottom: string;
98
+ is: string;
99
+ isNot: string;
100
+ contains: string;
101
+ notContains: string;
102
+ startsWith: string;
103
+ notStartsWith: string;
104
+ endsWith: string;
105
+ notEndsWith: string;
106
+ like: string;
107
+ };
58
108
  };
59
109
  };
@@ -2,8 +2,7 @@
2
2
  import { TreemapChartProps } from './props';
3
3
  /**
4
4
  * A React component displaying hierarchical data in the form of nested rectangles.
5
- * This type of chart can be used in different scenarios, for example,
6
- * instead of a column chart if you have to compare too many categories and sub-categories.
5
+ * This type of chart can be used instead of a column chart for comparing a large number of categories and sub-categories.
7
6
  * See [Treemap Chart](https://docs.sisense.com/main/SisenseLinux/treemap.htm) for more information.
8
7
  *
9
8
  * @example
package/dist/types.d.ts CHANGED
@@ -377,9 +377,13 @@ export interface SunburstStyleOptions extends BaseStyleOptions {
377
377
  */
378
378
  export type StyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions;
379
379
  /** Mapping of each of the chart value series to colors. */
380
- export type ValueToColorMap = Record<string, string>;
381
- /** Mapping of each of the chart value series to colors. */
382
- export type ValueToColorMultiColumnsMap = Record<string, Record<string, string>>;
380
+ export type ValueToColorMap = {
381
+ [value: string]: string;
382
+ };
383
+ /** Mapping of each of the chart columns with mapping of each value series to colors. */
384
+ export type MultiColumnValueToColorMap = {
385
+ [columnName: string]: ValueToColorMap;
386
+ };
383
387
  /**
384
388
  * Chart type of one of the supported chart families
385
389
  */
@@ -522,6 +526,12 @@ export interface WidgetStyleOptions {
522
526
  dividerLineColor?: string;
523
527
  /** Header background color */
524
528
  backgroundColor?: string;
529
+ /**
530
+ * Custom toolbar to render to the right of the title
531
+ *
532
+ * @internal
533
+ */
534
+ renderToolbar?: (onRefresh: () => void) => JSX.Element;
525
535
  };
526
536
  }
527
537
  /**
@@ -1,8 +1,8 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
  import { ChartWidgetProps } from '../props';
3
3
  /**
4
- * The Chart Widget component extending the {@link Chart} component to support advanced BI
5
- * capabilities such as drilldown.
4
+ * The Chart Widget component extending the {@link Chart} component to support widget style options.
5
+ * It can be used along with the {@link DrilldownWidget} component to support advanced data drilldown.
6
6
  *
7
7
  * @example
8
8
  * Example of using the `ChartWidget` component to
@@ -22,7 +22,7 @@ export declare const useDrilldown: (dataOptions: ChartDataOptions, drilldownOpti
22
22
  } | {
23
23
  category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn)[];
24
24
  value: (import("@sisense/sdk-data").MeasureColumn | import("@sisense/sdk-data").CalculatedMeasureColumn | import("../../types").StyledMeasureColumn)[];
25
- seriesToColorMap?: import("../../types").ValueToColorMap | undefined;
25
+ seriesToColorMap?: import("../../types").ValueToColorMap | import("../../types").MultiColumnValueToColorMap | undefined;
26
26
  };
27
27
  selectDrilldown: (points: DataPoint[], nextDimension: Attribute) => void;
28
28
  sliceDrilldownSelections: (i: number) => void;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { WidgetStyleOptions } from '../../types';
3
+ export default function WidgetHeaderInfoButton({ title, description, styleOptions, onRefresh, }: {
4
+ title?: string;
5
+ description?: string;
6
+ styleOptions?: WidgetStyleOptions['header'];
7
+ onRefresh: () => void;
8
+ }): JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { WidgetStyleOptions } from '../../types';
3
3
  interface WidgetHeaderProps {
4
4
  onRefresh: () => void;
@@ -1,8 +1,7 @@
1
1
  import { type FunctionComponent } from 'react';
2
2
  import { TableWidgetProps } from '../props';
3
3
  /**
4
- * The TableWidget component extending the {@link Table} component to support advanced BI
5
- * capabilities such as header.
4
+ * The TableWidget component extending the {@link Table} component to support widget style options.
6
5
  *
7
6
  * @example
8
7
  * Example of using the `Widget` component to
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@sisense/sdk-ui",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
- "exports": "./dist/index.js",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist/index.js",
8
+ "types": "./dist/index.d.ts"
9
+ },
10
+ "./ai": {
11
+ "import": "./dist/ai.js",
12
+ "types": "./dist/ai.d.ts"
13
+ }
14
+ },
6
15
  "main": "./dist/index.js",
7
16
  "module": "./dist/index.js",
8
17
  "types": "./dist/index.d.ts",
@@ -12,11 +21,13 @@
12
21
  "@emotion/react": "^11.10.5",
13
22
  "@emotion/styled": "^11.10.5",
14
23
  "@mui/material": "^5.11.6",
15
- "@sisense/sdk-common": "^0.13.0",
16
- "@sisense/sdk-data": "^0.13.0",
17
- "@sisense/sdk-query-client": "^0.13.0",
18
- "@sisense/sdk-rest-client": "^0.13.0",
24
+ "@sisense/sdk-common": "^0.15.0",
25
+ "@sisense/sdk-data": "^0.15.0",
26
+ "@sisense/sdk-query-client": "^0.15.0",
27
+ "@sisense/sdk-rest-client": "^0.15.0",
28
+ "@sisense/sdk-tracking": "^0.15.0",
19
29
  "@sisense/sisense-charts": "5.1.0-alpha-04052758.0",
30
+ "@tanstack/react-query": "4.36.1",
20
31
  "classnames": "^2.3.2",
21
32
  "colorjs.io": "^0.4.3",
22
33
  "date-fns": "^2.29.3",
@@ -29,6 +40,7 @@
29
40
  "lodash": "^4.17.21",
30
41
  "merge-deep": "^3.0.3",
31
42
  "react-datepicker": "^4.16.0",
43
+ "react-error-boundary": "^4.0.11",
32
44
  "react-i18next": "^13.2.2",
33
45
  "react-number-format": "^5.1.0",
34
46
  "ts-deepmerge": "6.0.2",
@@ -60,7 +72,6 @@
60
72
  "@babel/preset-env": "^7.20.2",
61
73
  "@mui/icons-material": "^5.14.9",
62
74
  "@mui/x-data-grid": "^6.16.0",
63
- "@mui/x-data-grid-generator": "^6.16.0",
64
75
  "@mui/x-data-grid-pro": "^6.16.0",
65
76
  "@storybook/addon-actions": "7.0.24",
66
77
  "@storybook/addon-docs": "7.0.24",