@sisense/sdk-ui 2.23.0 → 2.24.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.
- package/dist/ai.cjs +3 -3
- package/dist/ai.js +7 -7
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1172 -986
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{dimensions-C0BmtTH2.js → dimensions-C1R5YRt-.js} +1 -1
- package/dist/{dimensions-2t18RSZC.cjs → dimensions-C7yXAoZs.cjs} +1 -1
- package/dist/{execute-query-DmAyVFF5.cjs → execute-query-0Y9Fn9Pf.cjs} +1 -1
- package/dist/{execute-query-CHYTupEo.js → execute-query-b9oy2Egy.js} +7 -4
- package/dist/{index-Dx6wvLd3.cjs → index-Ck-0gJC9.cjs} +1 -1
- package/dist/{index-DCAC0mJe.js → index-r66Tjiqj.js} +21 -1
- package/dist/index.cjs +599 -595
- package/dist/index.js +14631 -14441
- package/dist/index.umd.js +951 -947
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-csv-download.d.ts +24 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +20 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-translated-data-options.d.ts +12 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-csv-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-csv-download.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-csv-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/tabber-buttons-widget/types.d.ts +8 -8
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +21 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +11 -2
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-csv-query-file-loader.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-with-csv-download-menu-item.d.ts +22 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/custom-widgets-provider-adapter.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +11 -4
- package/dist/packages/sdk-ui/src/infra/plugins/custom-plugin-context-provider.d.ts +18 -0
- package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +29 -0
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/plugin-provider.d.ts +4 -2
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/types.d.ts +12 -4
- package/dist/packages/sdk-ui/src/infra/plugins/use-widget-plugin-registry.d.ts +7 -0
- package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/validate-plugins.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +302 -0
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +33 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +40 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/custom-formula/validate-custom-formula.d.ts +15 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +22 -6
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +5 -2
- package/dist/packages/sdk-ui/src/props.d.ts +19 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +2 -0
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -0
- package/dist/packages/sdk-ui/src/shared/const.d.ts +5 -0
- package/dist/packages/sdk-ui/src/shared/types/menu-item.d.ts +5 -1
- package/dist/packages/sdk-ui/src/shared/utils/menu-item-converters.d.ts +12 -0
- package/dist/{quota-notification-RAaHp-eO.cjs → quota-notification-BqRYSJ7r.cjs} +137 -137
- package/dist/{quota-notification-CVl0isIV.js → quota-notification-CeKnEyQG.js} +11248 -11000
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +22 -2
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +1 -1
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +22 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +22 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +22 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +24 -4
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +24 -4
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +24 -4
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +24 -4
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +22 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +24 -4
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +22 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +24 -4
- package/dist/{types-DZ4vWh8j.cjs → types-C0QU2tsE.cjs} +1 -1
- package/dist/{types-B96nVbgX.js → types-DJtC8_5_.js} +1 -1
- package/dist/{utils-ChqSLRbz.js → utils-BCp2ISWh.js} +208 -204
- package/dist/{utils-CgV-jWWQ.cjs → utils-D8O1_kl3.cjs} +16 -16
- package/dist/{widget-composer-Blul90Zb.cjs → widget-composer-BkHZISs7.cjs} +1 -1
- package/dist/{widget-composer-Cf_CN3Ux.js → widget-composer-CDNL9_XF.js} +3 -3
- package/package.json +8 -8
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/index.d.ts +0 -5
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-context.d.ts +0 -15
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
export type UseWidgetCsvDownloadParams = {
|
|
3
|
+
widgets: WidgetProps[];
|
|
4
|
+
/**
|
|
5
|
+
* CSV download enabled value from `config.widgetsPanel.actions.downloadCsv.enabled`.
|
|
6
|
+
* Per-widget `config.actions.downloadCsv.enabled` overrides when explicitly set.
|
|
7
|
+
*/
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Applies dashboard-level CSV download settings to each widget's `config`.
|
|
12
|
+
*
|
|
13
|
+
* Reads `config.widgetsPanel.actions.downloadCsv.enabled` and merges it into
|
|
14
|
+
* `widget.config.actions.downloadCsv` for every widget.
|
|
15
|
+
* Widget-level `config.actions.downloadCsv.enabled` takes precedence when defined, so the dashboard-level config acts as a
|
|
16
|
+
* default rather than replacing explicit widget configuration.
|
|
17
|
+
*
|
|
18
|
+
* @param params - Widgets and panel-level CSV toggle
|
|
19
|
+
* @returns Widgets with resolved `config.actions.downloadCsv.enabled`
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function useWidgetCsvDownload({ widgets, enabled }: UseWidgetCsvDownloadParams): {
|
|
23
|
+
widgets: WidgetProps[];
|
|
24
|
+
};
|
|
@@ -161,6 +161,26 @@ export interface WidgetsPanelConfig {
|
|
|
161
161
|
* Edit mode configuration.
|
|
162
162
|
*/
|
|
163
163
|
editMode?: EditModeConfig;
|
|
164
|
+
/**
|
|
165
|
+
* Actions available for all widgets in the panel.
|
|
166
|
+
*
|
|
167
|
+
* @sisenseInternal
|
|
168
|
+
*/
|
|
169
|
+
actions?: {
|
|
170
|
+
/**
|
|
171
|
+
* Configuration for downloading a widget CSV.
|
|
172
|
+
*
|
|
173
|
+
* @sisenseInternal
|
|
174
|
+
*/
|
|
175
|
+
downloadCsv?: {
|
|
176
|
+
/**
|
|
177
|
+
* Determines whether the widgets possibility to download a CSV is enabled.
|
|
178
|
+
*
|
|
179
|
+
* If not specified, the default value is `false`.
|
|
180
|
+
*/
|
|
181
|
+
enabled?: boolean;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
164
184
|
}
|
|
165
185
|
/**
|
|
166
186
|
* Edit mode configuration
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { ChartDataOptions, ChartType } from '../../../../../types';
|
|
2
|
-
export declare const useTranslatedDataOptions: (chartDataOptions: ChartDataOptions, chartType: ChartType, isForecastOrTrendChart
|
|
2
|
+
export declare const useTranslatedDataOptions: (chartDataOptions: ChartDataOptions, chartType: ChartType, isForecastOrTrendChart?: boolean) => {
|
|
3
|
+
dataOptions: import("../../../core/chart-data-options/types.js").ChartDataOptionsInternal;
|
|
4
|
+
attributes: import("@sisense/sdk-data").Attribute[];
|
|
5
|
+
measures: import("@sisense/sdk-data").Measure[];
|
|
6
|
+
dataColumnNamesMapping: import('../../../../../domains/visualizations/core/chart-data-options/validate-data-options/index.js').DataColumnNamesMapping;
|
|
7
|
+
};
|
|
8
|
+
export declare function getTranslatedDataOptions(chartDataOptions: ChartDataOptions, chartType: ChartType, options?: {
|
|
9
|
+
/** Indicates if the chart is a forecast or trend chart for temporal routing between legacy and restructured charts processing */
|
|
10
|
+
isForecastOrTrendChart?: boolean;
|
|
11
|
+
/** Indicates if the data column names should be generated uniquely */
|
|
12
|
+
shouldHaveUniqueDataColumnNames?: boolean;
|
|
13
|
+
}): {
|
|
3
14
|
dataOptions: import("../../../core/chart-data-options/types.js").ChartDataOptionsInternal;
|
|
4
15
|
attributes: import("@sisense/sdk-data").Attribute[];
|
|
5
16
|
measures: import("@sisense/sdk-data").Measure[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetHeaderConfig } from '../../../../domains/widgets/shared/widget-header/types.js';
|
|
2
|
+
import type { ChartWidgetProps } from './types.js';
|
|
3
|
+
export type UseChartWidgetCsvDownloadParams = Pick<ChartWidgetProps, 'title' | 'dataOptions' | 'chartType' | 'filters' | 'highlights' | 'config' | 'dataSource'> & {
|
|
4
|
+
/** Base header config */
|
|
5
|
+
baseHeaderConfig: WidgetHeaderConfig;
|
|
6
|
+
};
|
|
7
|
+
export type UseChartWidgetCsvDownloadResult = {
|
|
8
|
+
headerConfig: WidgetHeaderConfig;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Enhances a chart widget's header with CSV download capabilities:
|
|
12
|
+
* - Adds the "Download > CSV File" header menu item.
|
|
13
|
+
* - Executes the CSV query and downloads the result as a CSV file.
|
|
14
|
+
*
|
|
15
|
+
* @param props - Chart widget props and base header config
|
|
16
|
+
* @returns Header config for {@link WidgetContainer}
|
|
17
|
+
*/
|
|
18
|
+
export declare function useChartWidgetCsvDownload(props: UseChartWidgetCsvDownloadParams): UseChartWidgetCsvDownloadResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WidgetHeaderConfig } from '../../../../domains/widgets/shared/widget-header/types.js';
|
|
2
|
+
import type { CustomWidgetProps } from './types.js';
|
|
3
|
+
export type UseCustomWidgetCsvDownloadParams = Pick<CustomWidgetProps, 'title' | 'dataOptions' | 'filters' | 'highlights' | 'config' | 'dataSource'>;
|
|
4
|
+
export type UseCustomWidgetCsvDownloadResult = {
|
|
5
|
+
headerConfig: WidgetHeaderConfig;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Enhances a custom widget's header with CSV download capabilities:
|
|
9
|
+
* - Adds the "Download > CSV File" header menu item.
|
|
10
|
+
* - Executes the CSV query and downloads the result as a CSV file.
|
|
11
|
+
*
|
|
12
|
+
* @param widgetProps - Custom widget props needed for CSV
|
|
13
|
+
* @returns Header config for {@link WidgetContainer}
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCustomWidgetCsvDownload(widgetProps: UseCustomWidgetCsvDownloadParams): UseCustomWidgetCsvDownloadResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetHeaderConfig } from '../../../../domains/widgets/shared/widget-header/types.js';
|
|
2
|
+
import type { PivotTableWidgetProps } from './types.js';
|
|
3
|
+
export type UsePivotWidgetCsvDownloadParams = Pick<PivotTableWidgetProps, 'title' | 'dataOptions' | 'filters' | 'highlights' | 'config' | 'dataSource'> & {
|
|
4
|
+
/** Header config from {@link useWidgetHeaderManagement} (rename menu, etc.). */
|
|
5
|
+
baseHeaderConfig: WidgetHeaderConfig;
|
|
6
|
+
};
|
|
7
|
+
export type UsePivotWidgetCsvDownloadResult = {
|
|
8
|
+
headerConfig: WidgetHeaderConfig;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Enhances a pivot table widget's header with CSV download capabilities:
|
|
12
|
+
* - Adds the "Download > CSV File" header menu item.
|
|
13
|
+
* - Executes the CSV query and downloads the result as a CSV file.
|
|
14
|
+
*
|
|
15
|
+
* @param props - Pivot widget props and base header config
|
|
16
|
+
* @returns Header config for {@link WidgetContainer}
|
|
17
|
+
*/
|
|
18
|
+
export declare function usePivotWidgetCsvDownload(props: UsePivotWidgetCsvDownloadParams): UsePivotWidgetCsvDownloadResult;
|
package/dist/packages/sdk-ui/src/domains/widgets/components/tabber-buttons-widget/types.d.ts
CHANGED
|
@@ -4,10 +4,6 @@ import { CustomWidgetProps } from '../../../../domains/widgets/components/custom
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
export type TabberButtonsWidgetStyleOptions = {
|
|
7
|
-
/**
|
|
8
|
-
* Color of the widget description text
|
|
9
|
-
*/
|
|
10
|
-
descriptionColor?: string;
|
|
11
7
|
/**
|
|
12
8
|
* Background color of the selected tab
|
|
13
9
|
*/
|
|
@@ -22,6 +18,14 @@ export type TabberButtonsWidgetStyleOptions = {
|
|
|
22
18
|
* @defaultValue true
|
|
23
19
|
*/
|
|
24
20
|
showDescription?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Description text displayed in the tabber widget (when showDescription is true)
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Color of the widget description text
|
|
27
|
+
*/
|
|
28
|
+
descriptionColor?: string;
|
|
25
29
|
/**
|
|
26
30
|
* Whether to show visual separators between tabs
|
|
27
31
|
*
|
|
@@ -120,8 +124,4 @@ export interface TabberButtonsWidgetProps extends CustomWidgetProps {
|
|
|
120
124
|
* Configuration for tabs including names and active tab index
|
|
121
125
|
*/
|
|
122
126
|
customOptions: TabberButtonsWidgetCustomOptions;
|
|
123
|
-
/**
|
|
124
|
-
* Description text displayed in the widget
|
|
125
|
-
*/
|
|
126
|
-
description?: string;
|
|
127
127
|
}
|
|
@@ -5,7 +5,7 @@ import type { CustomWidgetProps } from '../custom-widget/types';
|
|
|
5
5
|
import type { PivotTableWidgetProps } from '../pivot-table-widget/types';
|
|
6
6
|
import type { TextWidgetProps } from '../text-widget/types';
|
|
7
7
|
/**
|
|
8
|
-
* Generic widget configuration (e.g. header menu, toolbar).
|
|
8
|
+
* Generic widget configuration (e.g. header menu, toolbar, actions).
|
|
9
9
|
* Shared across chart, pivot, text, and custom widgets.
|
|
10
10
|
*/
|
|
11
11
|
export type WidgetConfig = {
|
|
@@ -13,6 +13,26 @@ export type WidgetConfig = {
|
|
|
13
13
|
* Configurations for the widget header (e.g. toolbar menu items)
|
|
14
14
|
*/
|
|
15
15
|
header?: WidgetHeaderConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Configuration for widget actions.
|
|
18
|
+
*
|
|
19
|
+
* @sisenseInternal
|
|
20
|
+
*/
|
|
21
|
+
actions?: {
|
|
22
|
+
/**
|
|
23
|
+
* Configuration for downloading a CSV file.
|
|
24
|
+
*
|
|
25
|
+
* @sisenseInternal
|
|
26
|
+
*/
|
|
27
|
+
downloadCsv?: {
|
|
28
|
+
/**
|
|
29
|
+
* Determines whether the possibility to download a CSV is enabled.
|
|
30
|
+
*
|
|
31
|
+
* If not specified, the default value is `false`.
|
|
32
|
+
*/
|
|
33
|
+
enabled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
16
36
|
};
|
|
17
37
|
/**
|
|
18
38
|
* Type of the widget component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AxisLabel, DataLimits, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, SeriesLabels } from '../../../../../types.js';
|
|
2
|
-
import type { AxisStyle, CartesianWidgetStyle } from '../types.js';
|
|
1
|
+
import type { AreaStyleOptions, AxisLabel, DataLimits, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, SeriesLabels } from '../../../../../types.js';
|
|
2
|
+
import type { AxisStyle, CartesianWidgetStyle, WidgetSubtype } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Maps SDK legend options to Fusion DTO legend style.
|
|
5
5
|
*
|
|
@@ -60,4 +60,13 @@ export declare function toDataLimitsStyle(dataLimits?: DataLimits): CartesianWid
|
|
|
60
60
|
* @internal
|
|
61
61
|
*/
|
|
62
62
|
export declare function toLineWidgetStyle(styleOptions: LineStyleOptions): CartesianWidgetStyle;
|
|
63
|
+
/**
|
|
64
|
+
* Converts area chart style options to Fusion CartesianWidgetStyle DTO.
|
|
65
|
+
* Used when serializing an area chart widget back to WidgetDto.
|
|
66
|
+
*
|
|
67
|
+
* @param styleOptions - Area style options from WidgetModel.styleOptions
|
|
68
|
+
* @param widgetSubtype - Resolved Fusion widget subtype (e.g. after `area/basic` default)
|
|
69
|
+
* @returns Fusion CartesianWidgetStyle for the widget DTO
|
|
70
|
+
*/
|
|
71
|
+
export declare function toAreaWidgetStyle(styleOptions: AreaStyleOptions, widgetSubtype: WidgetSubtype): CartesianWidgetStyle;
|
|
63
72
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ExecuteCsvQueryParams } from '../../../domains/query-execution/types.js';
|
|
2
|
+
export type CsvExecuteParams = Omit<ExecuteCsvQueryParams, 'enabled'> & {
|
|
3
|
+
/** Filename for the downloaded CSV file. Defaults to `data.csv`. */
|
|
4
|
+
filename?: string;
|
|
5
|
+
};
|
|
6
|
+
export type UseCsvQueryLoaderResult = {
|
|
7
|
+
/** Triggers CSV query execution and browser file download with the given params. */
|
|
8
|
+
execute: (params: CsvExecuteParams) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Hook that executes a CSV query on demand and triggers a browser file download.
|
|
12
|
+
* Call `execute` with query params to start the download; no params are needed at hook initialisation.
|
|
13
|
+
*
|
|
14
|
+
* @returns `execute` callback
|
|
15
|
+
*/
|
|
16
|
+
export declare function useCsvQueryFileLoader(): UseCsvQueryLoaderResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WidgetHeaderConfig } from '../../../domains/widgets/shared/widget-header/types.js';
|
|
2
|
+
export type UseWithCsvDownloadMenuParams = {
|
|
3
|
+
/** Base header config. */
|
|
4
|
+
baseHeaderConfig: WidgetHeaderConfig;
|
|
5
|
+
/** Whether the "Download CSV" menu item is enabled. */
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
/** Triggers CSV query execution and browser download. */
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Appends a "Download > CSV File" item to the widget header menu when enabled.
|
|
12
|
+
*
|
|
13
|
+
* If a "Download" group already exists in the menu, the "CSV File" item is added to its `items`.
|
|
14
|
+
* Otherwise a new "Download" group containing "CSV File" is appended.
|
|
15
|
+
*
|
|
16
|
+
* @param params.baseHeaderConfig - Base header config.
|
|
17
|
+
* @param params.enabled - Whether the "Download CSV" menu item is enabled.
|
|
18
|
+
* @param params.onClick - Click handler for the "CSV File" leaf item.
|
|
19
|
+
* @returns Header config to pass to {@link WidgetContainer}
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function useWithCsvDownloadMenuItem({ baseHeaderConfig, enabled, onClick, }: UseWithCsvDownloadMenuParams): WidgetHeaderConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SisenseContextProviderProps } from '../../index';
|
|
2
2
|
import { type ClientApplication } from './types';
|
|
3
|
-
type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth' | 'alternativeSsoHost' | 'disableFusionPalette'> & {
|
|
3
|
+
type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth' | 'alternativeSsoHost' | 'ssoMaxAuthRedirectAttempts' | 'ssoRedirectAttemptsTtlMs' | 'disableFusionPalette'> & {
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
packageName?: string;
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export declare const createClientApplication: ({ defaultDataSource, url: rawUrl, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, alternativeSsoHost, disableFusionPalette, packageName, }: ClientApplicationParams) => Promise<ClientApplication>;
|
|
10
|
+
export declare const createClientApplication: ({ defaultDataSource, url: rawUrl, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, alternativeSsoHost, ssoMaxAuthRedirectAttempts, ssoRedirectAttemptsTtlMs, disableFusionPalette, packageName, }: ClientApplicationParams) => Promise<ClientApplication>;
|
|
11
11
|
export {};
|
|
@@ -10,7 +10,8 @@ export type CustomWidgetsContextAdapter<T = CustomWidgetComponentProps> = {
|
|
|
10
10
|
/**
|
|
11
11
|
* Custom Widget Provider Adapter component that allows passing external custom widgets context.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Bridges pre-initialized custom widget data from an external wrapper to child React components.
|
|
14
|
+
* Syncs the widget registry with customWidgetsMap on updates and cleans up on unmount.
|
|
14
15
|
*
|
|
15
16
|
* @internal
|
|
16
17
|
*/
|
package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomWidgetComponent } from './types';
|
|
1
|
+
import { CustomWidgetComponent, CustomWidgetComponentProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Hook that provides API for configuring custom widgets.
|
|
4
4
|
*
|
|
@@ -18,8 +18,15 @@ import { CustomWidgetComponent } from './types';
|
|
|
18
18
|
*
|
|
19
19
|
* @group Dashboards
|
|
20
20
|
*/
|
|
21
|
-
export declare const useCustomWidgets: () =>
|
|
22
|
-
|
|
21
|
+
export declare const useCustomWidgets: () => UseCustomWidgetsResult;
|
|
22
|
+
/**
|
|
23
|
+
* Result of the `useCustomWidgets` hook.
|
|
24
|
+
*/
|
|
25
|
+
export type UseCustomWidgetsResult = {
|
|
26
|
+
/** Registers a custom widget. */
|
|
27
|
+
registerCustomWidget: <T = CustomWidgetComponentProps>(customWidgetType: string, customWidget: CustomWidgetComponent<T>) => void;
|
|
28
|
+
/** Checks if a custom widget is registered. */
|
|
23
29
|
hasCustomWidget: (customWidgetType: string) => boolean;
|
|
24
|
-
|
|
30
|
+
/** Gets a custom widget. */
|
|
31
|
+
getCustomWidget: (customWidgetType: string) => CustomWidgetComponent | undefined;
|
|
25
32
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import { CustomContextProviderProps } from '../../types';
|
|
3
|
+
import type { Plugin } from './types.js';
|
|
4
|
+
/** @internal */
|
|
5
|
+
export type CustomPluginContextProviderContext = {
|
|
6
|
+
plugins: Plugin[];
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type CustomPluginContextProviderProps = CustomContextProviderProps<CustomPluginContextProviderContext>;
|
|
10
|
+
/**
|
|
11
|
+
* Custom Plugin Context Provider component that allows passing external plugin context.
|
|
12
|
+
*
|
|
13
|
+
* Specifically designed to serve as a bridge for passing plugin context between an
|
|
14
|
+
* external framework wrapper and child React components.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const CustomPluginContextProvider: React.FC<PropsWithChildren<CustomPluginContextProviderProps>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WidgetPlugin } from './widget-plugins/types.js';
|
|
3
|
+
import type { WidgetPluginRegistry } from './widget-plugins/widget-plugin-registry.js';
|
|
4
|
+
/**
|
|
5
|
+
* Context for accessing registered plugins
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface PluginContextValue {
|
|
10
|
+
/**
|
|
11
|
+
* Validated widget plugin declarations (metadata)
|
|
12
|
+
*/
|
|
13
|
+
widgetPlugins: readonly WidgetPlugin[];
|
|
14
|
+
/**
|
|
15
|
+
* Central widget component registry (used for lookup and legacy bridge)
|
|
16
|
+
*/
|
|
17
|
+
widgetRegistry: WidgetPluginRegistry;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Error message when a plugin hook/component is used outside PluginProvider.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const PLUGIN_CONTEXT_MISSING_MESSAGE = "PluginContext is missing. Ensure PluginProvider (or a compatible provider) is an ancestor.";
|
|
24
|
+
/**
|
|
25
|
+
* React context for plugin management.
|
|
26
|
+
* Default is null to avoid a shared WidgetPluginRegistry at module load (cross-test/consumer pollution).
|
|
27
|
+
* PluginProvider supplies a real value; consumers must check for null and throw if missing.
|
|
28
|
+
*/
|
|
29
|
+
export declare const PluginContext: import("react").Context<PluginContextValue | null>;
|
package/dist/packages/sdk-ui/src/infra/{contexts/plugin-provider → plugins}/plugin-provider.d.ts
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { Plugin } from './types';
|
|
2
|
+
import { Plugin } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Props for PluginProvider component
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @sisenseInternal
|
|
7
7
|
*/
|
|
8
8
|
export interface PluginProviderProps {
|
|
9
9
|
/**
|
|
@@ -17,5 +17,7 @@ export interface PluginProviderProps {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Plugin Provider component that validates and provides access to plugins
|
|
20
|
+
*
|
|
21
|
+
* @sisenseInternal
|
|
20
22
|
*/
|
|
21
23
|
export declare const PluginProvider: React.FC<PluginProviderProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { WidgetPlugin } from './widget-plugins/types.js';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Base plugin information
|
|
3
4
|
*
|
|
4
|
-
* @
|
|
5
|
+
* @sisenseInternal
|
|
5
6
|
*/
|
|
6
|
-
export interface
|
|
7
|
+
export interface BasePluginInfo {
|
|
7
8
|
/**
|
|
8
9
|
* Unique name identifier for the plugin
|
|
9
10
|
*/
|
|
@@ -32,7 +33,7 @@ export interface Plugin {
|
|
|
32
33
|
/**
|
|
33
34
|
* Result of plugin validation
|
|
34
35
|
*
|
|
35
|
-
* @
|
|
36
|
+
* @sisenseInternal
|
|
36
37
|
*/
|
|
37
38
|
export interface PluginValidationResult {
|
|
38
39
|
/**
|
|
@@ -48,3 +49,10 @@ export interface PluginValidationResult {
|
|
|
48
49
|
*/
|
|
49
50
|
reason?: string;
|
|
50
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Plugin declaration.
|
|
54
|
+
* Currently only widget plugins are supported.
|
|
55
|
+
*
|
|
56
|
+
* @sisenseInternal
|
|
57
|
+
*/
|
|
58
|
+
export type Plugin = WidgetPlugin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for accessing the widget plugin registry.
|
|
3
|
+
* Used internally by the CustomWidget renderer to look up components.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const useWidgetPluginRegistry: () => import("./widget-plugins/widget-plugin-registry.js").WidgetPluginRegistry;
|