@sisense/sdk-ui 0.14.0 → 0.16.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 (128) 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 +5 -3
  51. package/dist/chart-data-options/coloring/consts.d.ts +3 -0
  52. package/dist/chart-data-options/coloring/utils.d.ts +6 -0
  53. package/dist/chart-data-options/get-translated-data-options.d.ts +6 -0
  54. package/dist/chart-options-processor/chart-options-service.d.ts +2 -74
  55. package/dist/chart-options-processor/translations/axis-section.d.ts +3 -1
  56. package/dist/chart-options-processor/translations/funnel-series.d.ts +1 -2
  57. package/dist/chart-options-processor/translations/legend-section.d.ts +2 -1
  58. package/dist/chart-options-processor/translations/pie-series.d.ts +1 -2
  59. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +6 -2
  60. package/dist/charts/indicator/chart/indicator.d.ts +1 -1
  61. package/dist/charts/indicator/chart/ticker.d.ts +2 -2
  62. package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
  63. package/dist/charts/indicator/types.d.ts +47 -6
  64. package/dist/common/components/loading-indicator.d.ts +33 -0
  65. package/dist/common/icons/loading-icon.d.ts +6 -0
  66. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +2 -2
  67. package/dist/dashboard-widget/translate-panel-color-format.d.ts +2 -2
  68. package/dist/dashboard-widget/translate-widget-data-options.d.ts +6 -6
  69. package/dist/dashboard-widget/translate-widget-filters.d.ts +4 -16
  70. package/dist/dashboard-widget/translate-widget-style-options.d.ts +1 -1
  71. package/dist/dashboard-widget/types.d.ts +21 -71
  72. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +7 -1
  73. package/dist/dashboard-widget/utils.d.ts +3 -3
  74. package/dist/filters/components/common/dropdown.d.ts +8 -0
  75. package/dist/filters/components/common/index.d.ts +4 -1
  76. package/dist/filters/components/common/radio.d.ts +7 -0
  77. package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
  78. package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
  79. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +22 -0
  80. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +76 -0
  81. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +44 -0
  82. package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
  83. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
  84. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +11 -3
  85. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
  86. package/dist/filters/components/filter-tile.d.ts +3 -0
  87. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +4 -0
  88. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +3 -1
  89. package/dist/filters/components/member-filter-tile/members-reducer.d.ts +9 -1
  90. package/dist/filters/components/member-filter-tile/pill-section.d.ts +0 -1
  91. package/dist/filters/index.d.ts +1 -0
  92. package/dist/formulas/fetch-formula.d.ts +16 -0
  93. package/dist/formulas/index.d.ts +1 -0
  94. package/dist/formulas/use-get-shared-formula.d.ts +95 -0
  95. package/dist/highcharts-memorized.d.ts +4 -3
  96. package/dist/index.d.ts +3 -1
  97. package/dist/index.js +8974 -71500
  98. package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
  99. package/dist/models/dashboard/types.d.ts +1 -1
  100. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
  101. package/dist/models/widget/get-widget-model.d.ts +4 -0
  102. package/dist/models/widget/index.d.ts +3 -1
  103. package/dist/models/widget/translate-widget.d.ts +1 -1
  104. package/dist/models/widget/use-get-widget-model.d.ts +102 -0
  105. package/dist/models/widget/widget-model.d.ts +122 -0
  106. package/dist/props.d.ts +30 -11
  107. package/dist/query/execute-query.d.ts +2 -0
  108. package/dist/query-execution/csv-query-state-reducer.d.ts +2 -0
  109. package/dist/query-execution/index.d.ts +4 -3
  110. package/dist/query-execution/query-state-reducer.d.ts +1 -58
  111. package/dist/query-execution/types.d.ts +190 -0
  112. package/dist/query-execution/use-execute-csv-query.d.ts +82 -0
  113. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -37
  114. package/dist/query-execution/use-execute-query.d.ts +8 -33
  115. package/dist/table/hooks/use-table-data.d.ts +5 -1
  116. package/dist/table/table.d.ts +3 -0
  117. package/dist/table-widget-5f3b1d03.js +64456 -0
  118. package/dist/themes/colors.d.ts +86 -0
  119. package/dist/translation/resources/en.d.ts +31 -0
  120. package/dist/translation/resources/index.d.ts +62 -0
  121. package/dist/types.d.ts +6 -0
  122. package/dist/utils/utility-types.d.ts +4 -0
  123. package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs-navigation.d.ts +8 -0
  124. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +11 -0
  125. package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
  126. package/dist/widgets/common/widget-header.d.ts +1 -1
  127. package/package.json +27 -8
  128. package/dist/models/widget/types.d.ts +0 -6
@@ -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,39 @@ 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
+ };
28
+ widgetModel: {
29
+ tabularWidgetNotSupported: string;
30
+ onlyTabularWidgetsSupported: string;
31
+ };
24
32
  };
25
33
  errorBoxText: string;
26
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
+ byMeasure: string;
56
+ by: string;
57
+ };
27
58
  };
28
59
  export type TranslationDictionary = typeof translation;
@@ -25,9 +25,40 @@ 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
+ };
32
+ widgetModel: {
33
+ tabularWidgetNotSupported: string;
34
+ onlyTabularWidgetsSupported: string;
35
+ };
28
36
  };
29
37
  errorBoxText: string;
30
38
  chartNoData: string;
39
+ criteriaFilter: {
40
+ equals: string;
41
+ notEquals: string;
42
+ lessThan: string;
43
+ lessThanOrEqual: string;
44
+ greaterThan: string;
45
+ greaterThanOrEqual: string;
46
+ between: string;
47
+ notBetween: string;
48
+ top: string;
49
+ bottom: string;
50
+ is: string;
51
+ isNot: string;
52
+ contains: string;
53
+ notContains: string;
54
+ startsWith: string;
55
+ notStartsWith: string;
56
+ endsWith: string;
57
+ notEndsWith: string;
58
+ like: string;
59
+ byMeasure: string;
60
+ by: string;
61
+ };
31
62
  };
32
63
  uk: {
33
64
  errors: {
@@ -52,8 +83,39 @@ export declare const resources: {
52
83
  unsupportedWidgetType: string;
53
84
  sisenseContextNotFound: string;
54
85
  dashboardInvalidIdentifier: string;
86
+ sharedFormula: {
87
+ identifierExpected: string;
88
+ failedToFetch: string;
89
+ };
90
+ widgetModel: {
91
+ tabularWidgetNotSupported: string;
92
+ onlyTabularWidgetsSupported: string;
93
+ };
55
94
  };
56
95
  errorBoxText: string;
57
96
  chartNoData: string;
97
+ criteriaFilter: {
98
+ equals: string;
99
+ notEquals: string;
100
+ lessThan: string;
101
+ lessThanOrEqual: string;
102
+ greaterThan: string;
103
+ greaterThanOrEqual: string;
104
+ between: string;
105
+ notBetween: string;
106
+ top: string;
107
+ bottom: string;
108
+ is: string;
109
+ isNot: string;
110
+ contains: string;
111
+ notContains: string;
112
+ startsWith: string;
113
+ notStartsWith: string;
114
+ endsWith: string;
115
+ notEndsWith: string;
116
+ like: string;
117
+ byMeasure: string;
118
+ by: string;
119
+ };
58
120
  };
59
121
  };
package/dist/types.d.ts CHANGED
@@ -526,6 +526,12 @@ export interface WidgetStyleOptions {
526
526
  dividerLineColor?: string;
527
527
  /** Header background color */
528
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;
529
535
  };
530
536
  }
531
537
  /**
@@ -36,4 +36,8 @@ type AllKeys<T> = T extends any ? keyof T : never;
36
36
  type NonCommonKeys<T extends object> = Subtract<AllKeys<T>, CommonKeys<T>>;
37
37
  type Subtract<A, C> = A extends C ? never : A;
38
38
  type PickTypeOf<T, K extends string | number | symbol> = K extends AllKeys<T> ? PickType<T, K> : never;
39
+ /**
40
+ * Abstract object with any unknown values
41
+ */
42
+ export type AnyObject = Record<string, any>;
39
43
  export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Attribute } from '@sisense/sdk-data';
3
+ interface DrilldownBreadcrumbsNavigationProps {
4
+ currentDimension: Attribute;
5
+ children: JSX.Element;
6
+ }
7
+ export declare const DrilldownBreadcrumbsNavigation: React.FC<DrilldownBreadcrumbsNavigationProps>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledPrevButton: 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"> & {
3
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
4
+ }, "style" | "children" | "size" | "disabled" | "className" | "tabIndex" | "color" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
5
+ theme?: import("@emotion/react").Theme | undefined;
6
+ }, {}, {}>;
7
+ export declare const StyledNextButton: 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" | "size" | "disabled" | "className" | "tabIndex" | "color" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ }, {}, {}>;
@@ -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;
package/package.json CHANGED
@@ -1,23 +1,40 @@
1
1
  {
2
2
  "name": "@sisense/sdk-ui",
3
- "version": "0.14.0",
3
+ "version": "0.16.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",
18
+ "typesVersions": {
19
+ "*": {
20
+ "ai": [
21
+ "./dist/ai.d.ts"
22
+ ]
23
+ }
24
+ },
9
25
  "author": "Sisense",
10
26
  "license": "SEE LICENSE IN LICENSE.md",
11
27
  "dependencies": {
12
28
  "@emotion/react": "^11.10.5",
13
29
  "@emotion/styled": "^11.10.5",
14
30
  "@mui/material": "^5.11.6",
15
- "@sisense/sdk-common": "^0.14.0",
16
- "@sisense/sdk-data": "^0.14.0",
17
- "@sisense/sdk-query-client": "^0.14.0",
18
- "@sisense/sdk-rest-client": "^0.14.0",
19
- "@sisense/sdk-tracking": "^0.14.0",
31
+ "@sisense/sdk-common": "^0.16.0",
32
+ "@sisense/sdk-data": "^0.16.0",
33
+ "@sisense/sdk-query-client": "^0.16.0",
34
+ "@sisense/sdk-rest-client": "^0.16.0",
35
+ "@sisense/sdk-tracking": "^0.16.0",
20
36
  "@sisense/sisense-charts": "5.1.0-alpha-04052758.0",
37
+ "@tanstack/react-query": "4.36.1",
21
38
  "classnames": "^2.3.2",
22
39
  "colorjs.io": "^0.4.3",
23
40
  "date-fns": "^2.29.3",
@@ -30,9 +47,9 @@
30
47
  "lodash": "^4.17.21",
31
48
  "merge-deep": "^3.0.3",
32
49
  "react-datepicker": "^4.16.0",
50
+ "react-error-boundary": "^4.0.11",
33
51
  "react-i18next": "^13.2.2",
34
52
  "react-number-format": "^5.1.0",
35
- "react-query": "^3.39.3",
36
53
  "ts-deepmerge": "6.0.2",
37
54
  "ts-essentials": "^9.3.0",
38
55
  "whatwg-fetch": "^3.6.2"
@@ -83,6 +100,7 @@
83
100
  "@types/react-plotly.js": "^2.6.0",
84
101
  "@vitejs/plugin-react-swc": "^3.3.0",
85
102
  "autoprefixer": "^10.4.14",
103
+ "blob-polyfill": "^7.0.20220408",
86
104
  "canvas": "^2.11.2",
87
105
  "eslint": "^8.40.0",
88
106
  "jsdom": "^22.1.0",
@@ -91,6 +109,7 @@
91
109
  "prettier": "2.8.4",
92
110
  "react": "18.2.0",
93
111
  "react-dom": "^18.2.0",
112
+ "react-json-view": "^1.21.3",
94
113
  "react-plotly.js": "^2.6.0",
95
114
  "sass": "1.58.3",
96
115
  "storybook": "7.0.24",
@@ -1,6 +0,0 @@
1
- import { DataSource } from '@sisense/sdk-data';
2
- export type WidgetModel = {
3
- oid: string;
4
- title: string;
5
- dataSource: DataSource;
6
- };