@sisense/sdk-ui 1.10.1 → 1.12.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 (133) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -1
  2. package/dist/ai/buttons/thumbs-down-button.d.ts +2 -1
  3. package/dist/ai/buttons/thumbs-up-button.d.ts +2 -1
  4. package/dist/ai/chat-config.d.ts +10 -0
  5. package/dist/ai/chat-dropup.d.ts +2 -1
  6. package/dist/ai/chat-input.d.ts +3 -1
  7. package/dist/ai/chatbot.d.ts +1 -1
  8. package/dist/ai/common/beta-label.d.ts +1 -0
  9. package/dist/ai/common/icon-button.d.ts +2 -3
  10. package/dist/ai/get-nlg-query-result.d.ts +1 -1
  11. package/dist/ai/icons/light-bulb-icon.d.ts +1 -3
  12. package/dist/ai/index.d.ts +1 -0
  13. package/dist/ai/messages/clickable-message.d.ts +2 -1
  14. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  15. package/dist/ai/messages/get-widget-options.d.ts +6 -1
  16. package/dist/ai/messages/text-message.d.ts +5 -0
  17. package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
  18. package/dist/ai/use-get-query-recommendations.d.ts +1 -1
  19. package/dist/ai/use-last-nlq-response.d.ts +19 -0
  20. package/dist/ai.cjs +454 -0
  21. package/dist/ai.js +1142 -1095
  22. package/dist/api/types/dashboard-dto.d.ts +5 -4
  23. package/dist/app/client-application.d.ts +1 -0
  24. package/dist/area-range-chart.d.ts +67 -0
  25. package/dist/areamap-chart.d.ts +0 -1
  26. package/dist/boxplot-chart.d.ts +0 -1
  27. package/dist/chart/chart.d.ts +0 -2
  28. package/dist/chart/helpers/should-skip-sisense-context-waiting.d.ts +3 -0
  29. package/dist/chart/helpers/use-chart-renderer-props.d.ts +28 -0
  30. package/dist/chart/regular-chart.d.ts +7 -0
  31. package/dist/chart/types.d.ts +21 -0
  32. package/dist/chart-data/range-data.d.ts +11 -0
  33. package/dist/chart-data/types.d.ts +15 -1
  34. package/dist/chart-data-options/translate-range-data-options.d.ts +2 -0
  35. package/dist/chart-data-options/types.d.ts +56 -4
  36. package/dist/chart-data-processor/data-table-date-period.d.ts +0 -1
  37. package/dist/chart-options-processor/chart-options-service.d.ts +5 -0
  38. package/dist/chart-options-processor/range-chart-options.d.ts +17 -0
  39. package/dist/chart-options-processor/translations/design-options.d.ts +55 -7
  40. package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +2 -1
  41. package/dist/chart-options-processor/translations/pie-plot-options.d.ts +2 -1
  42. package/dist/chart-options-processor/translations/range/tooltip-range.d.ts +4 -0
  43. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +3 -0
  44. package/dist/chart-options-processor/translations/types.d.ts +12 -6
  45. package/dist/charts/map-charts/areamap/areamap.d.ts +2 -3
  46. package/dist/charts/map-charts/scattermap/scattermap.d.ts +2 -1
  47. package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -0
  48. package/dist/charts/table/styles/style-constants.d.ts +1 -0
  49. package/dist/charts/table/types.d.ts +13 -4
  50. package/dist/common/components/loading-indicator.d.ts +17 -4
  51. package/dist/common/hooks/use-fetch.d.ts +1 -1
  52. package/dist/common/hooks/use-has-changed.d.ts +9 -0
  53. package/dist/common/hooks/use-should-load.d.ts +12 -0
  54. package/dist/dashboard/components/content-panel.d.ts +41 -0
  55. package/dist/dashboard/components/dashboard-container.d.ts +2 -0
  56. package/dist/dashboard/components/dashboard-header.d.ts +2 -0
  57. package/dist/dashboard/components/plugin-service.d.ts +21 -0
  58. package/dist/dashboard/constants.d.ts +2 -0
  59. package/dist/dashboard/dashboard-by-id.d.ts +7 -0
  60. package/dist/dashboard/dashboard.d.ts +8 -0
  61. package/dist/dashboard/types.d.ts +41 -0
  62. package/dist/dashboard/utils.d.ts +5 -0
  63. package/dist/dashboard-widget/translate-widget-filters.d.ts +664 -4
  64. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -1
  65. package/dist/dashboard-widget/utils.d.ts +2 -2
  66. package/dist/decorators/component-decorators/as-sisense-component.d.ts +6 -2
  67. package/dist/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +2 -1
  68. package/dist/decorators/component-decorators/with-tracking/with-tracking.d.ts +4 -1
  69. package/dist/dynamic-size-container/dynamic-size-container.d.ts +8 -0
  70. package/dist/filters/components/common/basic-input.d.ts +0 -1
  71. package/dist/filters/components/common/date-range-field-button.d.ts +3 -6
  72. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +15 -0
  73. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-display.d.ts +6 -0
  74. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +6 -0
  75. package/dist/filters/components/date-filter/date-range-filter-tile/editable-date-range-filter.d.ts +14 -0
  76. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +1 -2
  77. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -2
  78. package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +18 -0
  79. package/dist/filters/components/filters-panel/filters-panel.d.ts +18 -0
  80. package/dist/filters/components/filters-panel/index.d.ts +2 -0
  81. package/dist/filters/components/icons/arrow-icon.d.ts +6 -0
  82. package/dist/filters/components/icons/double-arrow-icon.d.ts +6 -0
  83. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +3 -1
  84. package/dist/filters/components/member-filter-tile/use-members.d.ts +1 -1
  85. package/dist/filters/index.d.ts +1 -0
  86. package/dist/highcharts-memorized.d.ts +1 -1
  87. package/dist/index.cjs +784 -0
  88. package/dist/index.d.ts +2 -0
  89. package/dist/index.js +17694 -18881
  90. package/dist/indicator-canvas.d.ts +2 -3
  91. package/dist/models/dashboard/dashboard-model.d.ts +62 -0
  92. package/dist/models/dashboard/get-dashboard-model.d.ts +10 -1
  93. package/dist/models/dashboard/get-dashboard-models.d.ts +2 -1
  94. package/dist/models/dashboard/index.d.ts +1 -1
  95. package/dist/models/dashboard/translate-dashboard-utils.d.ts +5 -0
  96. package/dist/models/dashboard/types.d.ts +2 -12
  97. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
  98. package/dist/models/dashboard/use-get-dashboard-models.d.ts +1 -1
  99. package/dist/models/widget/widget-model.d.ts +3 -3
  100. package/dist/pivot-table/formatters/header-cell-formatters/header-cell-highlight-formatter.d.ts +2 -0
  101. package/dist/pivot-table/formatters/types.d.ts +2 -2
  102. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +1 -0
  103. package/dist/pivot-table/pivot-table.d.ts +1 -1
  104. package/dist/pivot-table/use-get-pivot-table-query.d.ts +2 -1
  105. package/dist/props.d.ts +57 -2
  106. package/dist/query/date-formats/apply-date-format.d.ts +0 -1
  107. package/dist/query/query-result-date-formatting.d.ts +0 -1
  108. package/dist/query-execution/query-params-comparator.d.ts +1 -7
  109. package/dist/query-execution/types.d.ts +11 -1
  110. package/dist/query-execution/use-execute-pivot-query.d.ts +3 -6
  111. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +3 -4
  112. package/dist/scattermap-chart.d.ts +0 -1
  113. package/dist/sisense-chart/sisense-chart.d.ts +8 -5
  114. package/dist/table/table-component.d.ts +8 -0
  115. package/dist/table/table.d.ts +2 -2
  116. package/dist/table/translations/design-options.d.ts +3 -0
  117. package/dist/translation/resources/en.d.ts +12 -1
  118. package/dist/translation/resources/index.d.ts +24 -2
  119. package/dist/types.d.ts +103 -17
  120. package/dist/{debounce-CVvJ1016.js → useQuery-0UWck_2A.js} +33927 -33705
  121. package/dist/useQuery-DVHD0kJ-.cjs +603 -0
  122. package/dist/utils/check-and-notify-about-deprecated-prop.d.ts +1 -0
  123. package/dist/utils/create-cache.d.ts +0 -1
  124. package/dist/utils/utility-types.d.ts +1 -0
  125. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  126. package/dist/widgets/drilldown-widget.d.ts +2 -1
  127. package/package.json +13 -9
  128. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +0 -2
  129. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +0 -2
  130. package/dist/ai/messages/clear-history-success-message.d.ts +0 -1
  131. package/dist/filters/components/icons/arrow-right-icon.d.ts +0 -2
  132. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +0 -2
  133. package/dist/models/dashboard/translate-dashboard.d.ts +0 -4
@@ -1,5 +1,5 @@
1
1
  import { Column, DataTable } from '../../chart-data-processor/table-processor';
2
- import { TableDesignOptions } from '../../chart-options-processor/translations/design-options';
2
+ import { TableColorOptions, TableDesignOptions } from '../../chart-options-processor/translations/design-options';
3
3
  import { CompleteThemeSettings } from '../../types';
4
4
  import { TableDataOptionsInternal } from '../../chart-data-options/types';
5
5
  /**
@@ -56,9 +56,18 @@ export type TableCustomStyles = {
56
56
  sortIcon?: 'caret' | 'standard';
57
57
  headerHeight?: number;
58
58
  rowHeight?: number;
59
- headersColor?: boolean;
60
- alternatingRowsColor?: boolean;
61
- alternatingColumnsColor?: boolean;
59
+ paddingVertical?: number;
60
+ paddingHorizontal?: number;
61
+ header?: {
62
+ color?: TableColorOptions;
63
+ };
64
+ columns?: {
65
+ alternatingColor?: TableColorOptions;
66
+ width?: 'auto' | 'content';
67
+ };
68
+ rows?: {
69
+ alternatingColor?: TableColorOptions;
70
+ };
62
71
  };
63
72
  export type TableReducerState = {
64
73
  sortedDataTable: DataTable;
@@ -89,27 +89,40 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
89
89
  borderGradient: [string, string] | null;
90
90
  borderRadius: string;
91
91
  hover: {
92
- backgroundColor: string;
93
92
  textColor: string;
93
+ backgroundColor: string;
94
94
  };
95
95
  loadingGradient: [string, string];
96
96
  gap: string;
97
97
  };
98
98
  clickableMessages: {
99
- backgroundColor: string;
100
99
  textColor: string;
100
+ backgroundColor: string;
101
101
  border: string | false;
102
+ borderGradient: [string, string] | null;
102
103
  hover: {
103
104
  textColor: string;
104
105
  backgroundColor: string;
105
106
  };
106
107
  };
108
+ dataTopics: {
109
+ backgroundColor: string;
110
+ items: {
111
+ textColor: string;
112
+ backgroundColor: string;
113
+ };
114
+ };
107
115
  icons: {
108
116
  color: string;
109
- hover: {
110
- color: string;
117
+ feedbackIcons: {
118
+ hoverColor: string;
111
119
  };
112
120
  };
121
+ tooltips: {
122
+ backgroundColor: string;
123
+ textColor: string;
124
+ boxShadow: string;
125
+ };
113
126
  };
114
127
  } | undefined;
115
128
  onCancel?: (() => void) | undefined;
@@ -15,8 +15,8 @@ export type RequestConfig = {
15
15
  /**
16
16
  * The result of the `useFetch` hook.
17
17
  * Return value of the `useQuery` hook from `@tanstack/react-query`.
18
- * @link https://tanstack.com/query/v4/docs/framework/react/reference/useQuery
19
18
  *
19
+ * @link https://tanstack.com/query/v4/docs/framework/react/reference/useQuery
20
20
  * @template TData - The type of the data returned by the fetch request
21
21
  * @template TError - The type of the error returned by the fetch request
22
22
  */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Hook that returns if a value from the previous render has changed.
3
+ *
4
+ * @param value - Value for the current render.
5
+ * @param propNames - Names of keys to compare.
6
+ * @param [compare] - Optional comparison function
7
+ * @returns Has the value changed or not.
8
+ */
9
+ export declare function useHasChanged<T>(value: T, propNames: Array<keyof T>, compare?: (value: T, prev: T) => boolean): boolean;
@@ -0,0 +1,12 @@
1
+ import { ClientApplication } from '../../app/client-application.js';
2
+ /**
3
+ * Hook that generates a function for testing whether or not load
4
+ * should be performed for this render
5
+ *
6
+ * @param params - the component or hook params object
7
+ * @param isParamsChanged - have the params changed from previous invocation
8
+ * @returns generated render checking function
9
+ */
10
+ export declare function useShouldLoad<T extends {
11
+ enabled?: boolean;
12
+ }>({ enabled }: T, isParamsChanged: boolean): (app: ClientApplication | undefined, force?: boolean) => app is ClientApplication;
@@ -0,0 +1,41 @@
1
+ import { Layout, WidgetModel } from '../../models';
2
+ /**
3
+ * Props for the {@link ContentPanel} component.
4
+ *
5
+ * @internal
6
+ */
7
+ export interface ContentPanelProps {
8
+ /**
9
+ * An object defining how the widgets should be laid out.
10
+ */
11
+ layout: Layout;
12
+ /**
13
+ * A list of widget models to render.
14
+ */
15
+ widgets: WidgetModel[];
16
+ }
17
+ /**
18
+ * A React component used for rendering a layout of widgets.
19
+ *
20
+ * @example
21
+ * Example of using the component with the useGetDashboardModel hook:
22
+ * ```tsx
23
+ * const { dashboard, isLoading, isError } = useGetDashboardModel({
24
+ * dashboardOid: 'dashboard-oid',
25
+ * includeWidgets: true,
26
+ * });
27
+ *
28
+ * const { layout, widgets } = dashboard;
29
+ * if (!layout || !widgets) return null;
30
+ *
31
+ * return (
32
+ * <ContentPanel
33
+ * layout={layout}
34
+ * widgets={widgets}
35
+ * />
36
+ * );
37
+ * ```
38
+ * @param props - {@link ContentPanelProps}
39
+ * @internal
40
+ */
41
+ export declare const ContentPanel: ({ layout, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DashboardLayoutProps } from '../../dashboard/types';
2
+ export declare const DashboardContainer: ({ title, layout, widgets, filters, onFiltersChange, }: DashboardLayoutProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DashboardHeaderProps } from '../../dashboard/types';
2
+ export declare const DashboardHeader: ({ title }: DashboardHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { WidgetModel } from '../../models';
2
+ import { CompleteThemeSettings } from '../../types';
3
+ /**
4
+ * @internal
5
+ */
6
+ export type ReactWidgetPlugin<P = {}> = {
7
+ name: string;
8
+ Plugin: any;
9
+ createChartProps(w: WidgetModel, themeSettings: CompleteThemeSettings): P;
10
+ };
11
+ /**
12
+ * POC - singleton plugin store. A widget from a Fusion dashboard can use this
13
+ * store to look up and render a chart from a third-party plugin that matches its type.
14
+ *
15
+ * @internal
16
+ */
17
+ export declare class PluginService {
18
+ static pluginMap: Map<string, ReactWidgetPlugin<{}>>;
19
+ static get(pluginType: string): ReactWidgetPlugin | undefined;
20
+ static register(pluginType: string, plugin: ReactWidgetPlugin): void;
21
+ }
@@ -0,0 +1,2 @@
1
+ export declare const DASHBOARD_DIVIDER_COLOR = "#d5d5d5";
2
+ export declare const DASHBOARD_DIVIDER_WIDTH = 1;
@@ -0,0 +1,7 @@
1
+ import { DashboardByIdProps } from './types';
2
+ /**
3
+ * React component that renders a dashboard created in Sisense Fusion Embed
4
+ *
5
+ * @internal
6
+ */
7
+ export declare const DashboardById: ({ dashboardOid }: DashboardByIdProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { DashboardProps } from '../dashboard/types';
2
+ /**
3
+ * React component that renders a dashboard
4
+ * Include inside logic of applying common filters to widgets
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const Dashboard: ({ title, layout, widgets, filters }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { Layout, WidgetModel } from '../models';
2
+ import { Filter } from '@sisense/sdk-data';
3
+ /**
4
+ * Props for the DashboardById component
5
+ *
6
+ * @internal
7
+ */
8
+ export interface DashboardByIdProps {
9
+ dashboardOid: string;
10
+ }
11
+ /**
12
+ * Props for the DashboardLayout component
13
+ *
14
+ * @internal
15
+ */
16
+ export interface DashboardLayoutProps {
17
+ title: string;
18
+ layout: Layout;
19
+ widgets: WidgetModel[];
20
+ filters: Filter[];
21
+ onFiltersChange: (filters: Filter[]) => void;
22
+ }
23
+ /**
24
+ * Props for the Dashboard component
25
+ *
26
+ * @internal
27
+ */
28
+ export interface DashboardProps {
29
+ title: string;
30
+ layout: Layout;
31
+ widgets: WidgetModel[];
32
+ filters: Filter[];
33
+ }
34
+ /**
35
+ * Props for the Dashboard Header component
36
+ *
37
+ * @internal
38
+ */
39
+ export interface DashboardHeaderProps {
40
+ title: string;
41
+ }
@@ -0,0 +1,5 @@
1
+ import { Filter } from '@sisense/sdk-data';
2
+ import { WidgetModel } from '../models';
3
+ export declare function isSupportedWidgetTypeByDashboard(widgetType: string): boolean;
4
+ export declare function addFiltersToWidget(widget: WidgetModel, filters: Filter[]): WidgetModel;
5
+ export declare const getDividerStyle: (color: string, width: number) => string;