@sisense/sdk-ui 1.11.0 → 1.13.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 (117) hide show
  1. package/dist/ai/api/chat-rest-api.d.ts +3 -4
  2. package/dist/ai/api/hooks.d.ts +2 -2
  3. package/dist/ai/api/types.d.ts +2 -16
  4. package/dist/ai/buttons/scroll-to-bottom-button.d.ts +3 -0
  5. package/dist/ai/buttons/thumbs-down-button.d.ts +2 -1
  6. package/dist/ai/buttons/thumbs-up-button.d.ts +2 -1
  7. package/dist/ai/chat-config.d.ts +18 -0
  8. package/dist/ai/chat-dropup.d.ts +2 -1
  9. package/dist/ai/chat-input.d.ts +3 -1
  10. package/dist/ai/common/constants.d.ts +1 -0
  11. package/dist/ai/common/icon-button.d.ts +2 -3
  12. package/dist/ai/common/tooltip.d.ts +2 -2
  13. package/dist/ai/data-topics/data-topic-list.d.ts +0 -1
  14. package/dist/ai/icons/light-bulb-icon.d.ts +1 -3
  15. package/dist/ai/icons/scroll-to-bottom-icon.d.ts +1 -0
  16. package/dist/ai/index.d.ts +1 -0
  17. package/dist/ai/messages/clickable-message.d.ts +2 -1
  18. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  19. package/dist/ai/messages/text-message.d.ts +5 -0
  20. package/dist/ai/scroll-to-bottom.d.ts +7 -0
  21. package/dist/ai/use-last-nlq-response.d.ts +19 -0
  22. package/dist/ai.cjs +471 -0
  23. package/dist/ai.js +1143 -1228
  24. package/dist/api/types/dashboard-dto.d.ts +2 -1
  25. package/dist/app/client-application.d.ts +1 -0
  26. package/dist/chart/helpers/use-chart-renderer-props.d.ts +1 -0
  27. package/dist/chart/helpers/use-synced-data.d.ts +1 -1
  28. package/dist/chart-options-processor/chart-options-service.d.ts +4 -0
  29. package/dist/chart-options-processor/subtype-to-design-options.d.ts +13 -1
  30. package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +2 -1
  31. package/dist/chart-options-processor/translations/pie-plot-options.d.ts +2 -1
  32. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +2 -0
  33. package/dist/common/components/loading-indicator.d.ts +17 -4
  34. package/dist/common/components/loading-overlay.d.ts +1 -0
  35. package/dist/common/hooks/use-fetch.d.ts +1 -1
  36. package/dist/common/hooks/use-has-changed.d.ts +9 -0
  37. package/dist/common/hooks/use-should-load.d.ts +12 -0
  38. package/dist/common-filters/common-filters-connector.d.ts +9 -0
  39. package/dist/common-filters/selection-utils.d.ts +11 -0
  40. package/dist/common-filters/types.d.ts +14 -0
  41. package/dist/common-filters/use-common-filters.d.ts +13 -0
  42. package/dist/common-filters/utils.d.ts +9 -0
  43. package/dist/common-filters/widget-header-clear-selection-button.d.ts +3 -0
  44. package/dist/dashboard/components/content-panel.d.ts +41 -0
  45. package/dist/dashboard/components/dashboard-container.d.ts +2 -0
  46. package/dist/dashboard/components/dashboard-header.d.ts +2 -0
  47. package/dist/dashboard/components/plugin-service.d.ts +21 -0
  48. package/dist/dashboard/constants.d.ts +2 -0
  49. package/dist/dashboard/dashboard-by-id.d.ts +7 -0
  50. package/dist/dashboard/dashboard.d.ts +8 -0
  51. package/dist/dashboard/types.d.ts +44 -0
  52. package/dist/dashboard/utils.d.ts +2 -0
  53. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +4772 -2
  54. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  55. package/dist/dashboard-widget/translate-widget-filters.d.ts +200 -37
  56. package/dist/dashboard-widget/types.d.ts +1 -0
  57. package/dist/dashboard-widget/utils.d.ts +3 -1
  58. package/dist/dynamic-size-container/dynamic-size-container.d.ts +8 -0
  59. package/dist/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +25 -0
  60. package/dist/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +21 -0
  61. package/dist/filters/components/cascading-filter-tile/index.d.ts +1 -0
  62. package/dist/filters/components/common/date-range-field-button.d.ts +3 -6
  63. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +2 -2
  64. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +6 -0
  65. package/dist/filters/components/custom-filter-tile.d.ts +43 -0
  66. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +15 -0
  67. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-display.d.ts +6 -0
  68. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +12 -0
  69. package/dist/filters/components/date-filter/date-range-filter-tile/editable-date-range-filter.d.ts +14 -0
  70. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +1 -2
  71. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +8 -2
  72. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +4 -4
  73. package/dist/filters/components/filter-tile.d.ts +21 -1
  74. package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +4 -2
  75. package/dist/filters/components/filters-panel/filters-panel.d.ts +4 -2
  76. package/dist/filters/components/icons/arrow-icon.d.ts +6 -0
  77. package/dist/filters/components/icons/double-arrow-icon.d.ts +6 -0
  78. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -1
  79. package/dist/filters/components/member-filter-tile/member-list.d.ts +1 -1
  80. package/dist/filters/hooks/use-synchronized-filter.d.ts +12 -0
  81. package/dist/filters/index.d.ts +2 -0
  82. package/dist/filters/utils.d.ts +7 -0
  83. package/dist/highcharts-memorized.d.ts +1 -1
  84. package/dist/index.cjs +830 -0
  85. package/dist/index.d.ts +2 -0
  86. package/dist/index.js +25012 -20426
  87. package/dist/models/dashboard/dashboard-model.d.ts +66 -0
  88. package/dist/models/dashboard/get-dashboard-model.d.ts +3 -1
  89. package/dist/models/dashboard/get-dashboard-models.d.ts +2 -1
  90. package/dist/models/dashboard/index.d.ts +1 -1
  91. package/dist/models/dashboard/translate-dashboard-utils.d.ts +7 -0
  92. package/dist/models/dashboard/types.d.ts +5 -14
  93. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
  94. package/dist/models/dashboard/use-get-dashboard-models.d.ts +1 -1
  95. package/dist/models/widget/get-widget-model.d.ts +2 -1
  96. package/dist/models/widget/translate-widget.d.ts +5 -2
  97. package/dist/models/widget/types.d.ts +9 -0
  98. package/dist/models/widget/widget-model.d.ts +31 -1
  99. package/dist/query/query-result-date-formatting.d.ts +1 -0
  100. package/dist/query-execution/query-params-comparator.d.ts +1 -7
  101. package/dist/query-execution/use-execute-pivot-query.d.ts +2 -5
  102. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +3 -4
  103. package/dist/translation/resources/en.d.ts +5 -0
  104. package/dist/translation/resources/index.d.ts +10 -0
  105. package/dist/types.d.ts +40 -13
  106. package/dist/useQuery-C8plkncQ.cjs +603 -0
  107. package/dist/{debounce-BbwkW3DX.js → useQuery-D5W0RM1R.js} +21443 -21103
  108. package/dist/utils/create-cache.d.ts +0 -1
  109. package/dist/utils/utility-types.d.ts +1 -0
  110. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  111. package/package.json +12 -8
  112. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +0 -2
  113. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +0 -2
  114. package/dist/ai/messages/clear-history-success-message.d.ts +0 -1
  115. package/dist/filters/components/icons/arrow-right-icon.d.ts +0 -2
  116. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +0 -2
  117. package/dist/models/dashboard/translate-dashboard.d.ts +0 -4
@@ -5,7 +5,7 @@ import { AnyObject } from '../../utils/utility-types';
5
5
  export type Layout = {
6
6
  columns: {
7
7
  width: number;
8
- cells: {
8
+ cells?: {
9
9
  subcells: {
10
10
  width: number;
11
11
  elements: {
@@ -28,6 +28,7 @@ export type CascadingFilterDto = {
28
28
  instanceid?: string;
29
29
  disabled?: boolean;
30
30
  };
31
+ export declare const isCascadingFilterDto: (filter: FilterDto | CascadingFilterDto) => filter is CascadingFilterDto;
31
32
  export type DashboardDto = {
32
33
  oid: string;
33
34
  title: string;
@@ -43,6 +43,7 @@ export type AppConfig = {
43
43
  };
44
44
  /**
45
45
  * Query limit (max rows count that will be fetched in query)
46
+ *
46
47
  * @default 20000
47
48
  */
48
49
  queryLimit?: number;
@@ -19,6 +19,7 @@ type UnpreparedInternalChartProps = {
19
19
  };
20
20
  /**
21
21
  * Prepares the props for the chart renderer.
22
+ *
22
23
  * @param internalProps - unprepared internal chart props.
23
24
  * @returns Chart renderer props or null if the chart props is not ready yet
24
25
  * @internal
@@ -4,5 +4,5 @@ import { ChartDataOptionsInternal } from '../../chart-data-options/types';
4
4
  import { ChartType } from '../../types';
5
5
  import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
6
6
  type DataSet = DataSource | Data | undefined;
7
- export declare const useSyncedData: (dataSet: DataSet, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType, attributes: Attribute[], measures: Measure[], dataColumnNamesMapping: DataColumnNamesMapping, filters?: Filter[] | FilterRelations, highlights?: Filter[], refreshCounter?: number, setIsLoading?: Dispatch<SetStateAction<boolean>>) => Data | undefined;
7
+ export declare const useSyncedData: (dataSet: DataSet, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType, attributes: Attribute[], measures: Measure[], dataColumnNamesMapping: DataColumnNamesMapping, filters?: Filter[] | FilterRelations, highlights?: Filter[], refreshCounter?: number, setIsLoading?: Dispatch<SetStateAction<boolean>>) => [Data, ChartDataOptionsInternal];
8
8
  export {};
@@ -112,6 +112,7 @@ export type PlotOptions = {
112
112
  sunburst?: ChartPlotOptions;
113
113
  boxplot?: ChartPlotOptions;
114
114
  scatter?: ChartPlotOptions;
115
+ arearange?: ChartPlotOptions;
115
116
  };
116
117
  /**
117
118
  * Highcharts options internal
@@ -154,6 +155,9 @@ export type HighchartsOptionsInternal = {
154
155
  plotOptions?: PlotOptions;
155
156
  navigator?: Navigator | {
156
157
  enabled: boolean;
158
+ series?: {
159
+ type: ChartType;
160
+ };
157
161
  };
158
162
  tooltip?: TooltipSettings;
159
163
  boost?: {
@@ -29,6 +29,18 @@ export type LineSubtype = 'line/spline' | 'line/basic';
29
29
  *
30
30
  */
31
31
  export type AreaSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100';
32
+ /**
33
+ * Property of {@link AreaRangeStyleOptions}
34
+ *
35
+ * Subtype of AreaRangeChart
36
+ *
37
+ * **Values**
38
+ *
39
+ * - `arearange/spline` - curved line from point to point.
40
+ * - `arearange/basic` - straight line from point to point.
41
+ *
42
+ */
43
+ export type AreaRangeSubtype = 'arearange/spline' | 'arearange/basic';
32
44
  /**
33
45
  * Property of {@link StackableSubtype}
34
46
  *
@@ -92,7 +104,7 @@ export type SunburstSubtype = 'sunburst';
92
104
  export type BoxplotSubtype = 'boxplot/full' | 'boxplot/hollow';
93
105
  export type ScattermapSubtype = 'scattermap';
94
106
  export type AreamapSubtype = 'areamap/world' | 'areamap/usa';
95
- export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype;
107
+ export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype | AreaRangeSubtype;
96
108
  export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
97
109
  lineType?: LineType | undefined;
98
110
  stackType?: StackType | undefined;
@@ -1,5 +1,6 @@
1
1
  import { PlotOptions } from '../chart-options-service';
2
2
  import { ValueLabelSettings } from './value-label-section';
3
+ import { CompleteThemeSettings } from '../../types';
3
4
  import { FunnelChartDesignOptions } from './design-options';
4
5
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
5
6
  export declare const DefaultFunnelLabels: FunnelLabels;
@@ -50,4 +51,4 @@ export declare const DEFAULT_SHIFT = 50;
50
51
  export declare const funnelWidthPercentage: (renderTo: RenderTo | null) => number;
51
52
  export declare const funnelNeckWidth: (widthPercentage: number, funnelSize: FunnelSize) => number;
52
53
  export declare const funnelNeckHeight: (type: FunnelType) => number;
53
- export declare const getFunnelPlotOptions: (funnelDesignOptions: FunnelChartDesignOptions, chartDataOptions: ChartDataOptionsInternal) => PlotOptions;
54
+ export declare const getFunnelPlotOptions: (funnelDesignOptions: FunnelChartDesignOptions, chartDataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => PlotOptions;
@@ -1,6 +1,7 @@
1
1
  import { PlotOptions } from '../chart-options-service';
2
2
  import { ValueLabelSettings } from './value-label-section';
3
3
  import { ChartDataOptionsInternal } from '../../chart-data-options/types';
4
+ import { CompleteThemeSettings } from '../../types';
4
5
  export declare const DefaultPieLabels: PieLabels;
5
6
  export type PieLabels = {
6
7
  enabled: boolean;
@@ -25,5 +26,5 @@ export type PieOptions = {
25
26
  innerSize?: InnerSize;
26
27
  };
27
28
  type InnerSize = '0%' | '40%' | '80%';
28
- export declare const getPiePlotOptions: (pieType: "classic" | "donut" | "ring" | undefined, pieLabels: PieLabels | undefined, chartDataOptions: ChartDataOptionsInternal) => PlotOptions;
29
+ export declare const getPiePlotOptions: (pieType: "classic" | "donut" | "ring" | undefined, pieLabels: PieLabels | undefined, chartDataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings) => PlotOptions;
29
30
  export {};
@@ -43,6 +43,8 @@ export type InternalSeries = {
43
43
  xDisplayValue?: string;
44
44
  xValue?: (number | string)[];
45
45
  };
46
+ upperPointName?: string;
47
+ lowerPointName?: string;
46
48
  };
47
49
  percentage?: number;
48
50
  };
@@ -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;
@@ -6,6 +6,7 @@ import { CompleteThemeSettings } from '../../types';
6
6
  *
7
7
  * @param isVisible - visibility of the overlay.
8
8
  * @returns Child component wrapped in dynamic overlay.
9
+ * @internal
9
10
  */
10
11
  export declare const LoadingOverlay: ({ isVisible, themeSettings, children, }: {
11
12
  isVisible: boolean;
@@ -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,9 @@
1
+ import { type Filter } from '@sisense/sdk-data';
2
+ import { ChartDataOptions, ChartWidgetProps, PivotTableDataOptions, RenderToolbarHandler } from '../index.js';
3
+ import { CommonFiltersOptions } from './types.js';
4
+ import { WidgetTypeInternal } from '../models/widget/types';
5
+ type CommonFiltersToWidgetConnectProps = Pick<ChartWidgetProps, 'filters' | 'highlights' | 'onDataPointClick' | 'onDataPointsSelected'> & {
6
+ renderToolbar: RenderToolbarHandler;
7
+ };
8
+ export declare function prepareCommonFiltersToWidgetConnectProps(filters: Filter[], setFilters: (filters: Filter[]) => void, widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, options: CommonFiltersOptions): CommonFiltersToWidgetConnectProps;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Attribute, Filter } from '@sisense/sdk-data';
2
+ import { AreamapDataPoint, ChartDataOptions, DataPoint, PivotTableDataOptions, ScatterDataPoint, ScattermapDataPoint } from '../index.js';
3
+ import { WidgetTypeInternal } from '../models/widget/types.js';
4
+ type WidgetSelection = {
5
+ attribute: Attribute;
6
+ values: (string | number)[];
7
+ };
8
+ export declare function getWidgetSelections(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, points: Array<DataPoint | ScatterDataPoint | ScattermapDataPoint | AreamapDataPoint>, nativeEvent: MouseEvent | PointerEvent): WidgetSelection[];
9
+ export declare function getSelectableWidgetAttributes(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions): Attribute[];
10
+ export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], filters: Filter[]): Filter[];
11
+ export {};
@@ -0,0 +1,14 @@
1
+ /** @internal */
2
+ export declare enum CommonFiltersApplyMode {
3
+ HIGHLIGHT = "highlight",
4
+ FILTER = "filter"
5
+ }
6
+ /** @internal */
7
+ export type CommonFiltersOptions = {
8
+ applyMode?: `${CommonFiltersApplyMode}`;
9
+ shouldAffectFilters?: boolean;
10
+ ignoreFilters?: {
11
+ all?: boolean;
12
+ ids?: string[];
13
+ };
14
+ };
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { type Filter } from '@sisense/sdk-data';
3
+ import { WidgetModel } from '../index.js';
4
+ import { CommonFiltersOptions } from './types.js';
5
+ /** @internal */
6
+ export declare const useCommonFilters: ({ initialFilters, }?: {
7
+ initialFilters?: Filter[] | undefined;
8
+ }) => {
9
+ filters: Filter[];
10
+ setFilters: import("react").Dispatch<import("react").SetStateAction<Filter[]>>;
11
+ addFilter: (newFilter: Filter) => void;
12
+ connectToWidgetModel: (widget: WidgetModel, options?: CommonFiltersOptions) => WidgetModel;
13
+ };
@@ -0,0 +1,9 @@
1
+ import { Filter, Attribute } from '@sisense/sdk-data';
2
+ import { CommonFiltersOptions } from './types.js';
3
+ export declare function getAllowedFilters(filters: Filter[], ignoreFiltersOptions?: CommonFiltersOptions['ignoreFilters']): Filter[];
4
+ export declare function isSameAttribute(attributeA: Attribute, attributeB: Attribute): boolean;
5
+ export declare function getFilterByAttribute(filters: Filter[], attribute: Attribute): Filter | undefined;
6
+ export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
7
+ export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
8
+ export declare function isIncludeAllFilter(filter: Filter): boolean;
9
+ export declare function clearCommonFilter({ attribute, guid }: Filter): Filter;
@@ -0,0 +1,3 @@
1
+ export declare const WidgetHeaderClearSelectionButton: ({ onClick }: {
2
+ onClick: () => void;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -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, defaultDataSource, }: 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, defaultDataSource, widgetFilterOptions, }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { Layout, WidgetFilterOptions, WidgetModel } from '../models';
2
+ import { DataSource, 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
+ defaultDataSource?: DataSource;
23
+ }
24
+ /**
25
+ * Props for the Dashboard component
26
+ *
27
+ * @internal
28
+ */
29
+ export interface DashboardProps {
30
+ title: string;
31
+ layout: Layout;
32
+ widgets: WidgetModel[];
33
+ filters: Filter[];
34
+ defaultDataSource?: DataSource;
35
+ widgetFilterOptions?: WidgetFilterOptions;
36
+ }
37
+ /**
38
+ * Props for the Dashboard Header component
39
+ *
40
+ * @internal
41
+ */
42
+ export interface DashboardHeaderProps {
43
+ title: string;
44
+ }
@@ -0,0 +1,2 @@
1
+ export declare function isSupportedWidgetTypeByDashboard(widgetType: string): boolean;
2
+ export declare const getDividerStyle: (color: string, width: number) => string;