@sisense/sdk-ui 2.22.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 +19 -19
- package/dist/ai.js +59 -59
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +2440 -1253
- package/dist/analytics-composer.cjs +47 -47
- package/dist/analytics-composer.js +135 -131
- package/dist/dimensions-C1R5YRt-.js +204 -0
- package/dist/dimensions-C7yXAoZs.cjs +1 -0
- package/dist/execute-query-0Y9Fn9Pf.cjs +1 -0
- package/dist/execute-query-b9oy2Egy.js +5869 -0
- package/dist/{index-NyouhE_A.cjs → index-Ck-0gJC9.cjs} +1 -1
- package/dist/{index-kxX21arA.js → index-r66Tjiqj.js} +39 -2
- package/dist/index.cjs +633 -616
- package/dist/index.js +18198 -17875
- package/dist/index.umd.js +1006 -949
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/const.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/smart-pointer-sensor.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +24 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/use-dashboard-persistence.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +34 -0
- 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 +43 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-dashboard-theme.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/add-filter-popover/add-filter-data-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/dimensions-browser/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/domains/formulas/fetch-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/core/execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-query-cache/use-query-cache.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/get-load-data-function.d.ts +1 -1
- 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/visualizations/components/chart/restructured-charts/helpers/data-loading.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +73 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +12 -2
- 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/types.d.ts +12 -2
- 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-dashboard-filters.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-data-options.d.ts +1 -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/components/widget-by-id/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/domains/widgets/event-to-delta.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/header-menu-utils.d.ts +14 -4
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +1 -0
- 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-title-renaming.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-widget-header-management.d.ts +28 -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-container/widget-container.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/types.d.ts +31 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header.d.ts +3 -1
- 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/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/infra/api/types/dashboard-dto.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +5 -231
- package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +16 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/types/deployment-props.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +236 -0
- 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/contexts/sisense-context/sisense-context.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/theme-context.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/decorators/hook-decorators/with-tracking.d.ts +1 -1
- 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 +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +37 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +74 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlq-result.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/axis-type-detection.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/chart-type-schemas.d.ts +37 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/translate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/validate-chart-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-from-json.d.ts +42 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-to-json.d.ts +41 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-from-json.d.ts +11 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-from-json.d.ts → constructs/filters/translate-filters-from-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-to-json.d.ts → constructs/filters/translate-filters-to-json.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-measures-from-json.d.ts → constructs/measures/translate-measures-from-json.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +8 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/translate-data-options.d.ts +14 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/validate-pivot-table-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-from-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-to-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +8 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-from-json.d.ts → query/translate-query-from-json.d.ts} +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-jaql.d.ts → query/translate-query-to-jaql.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-json.d.ts → query/translate-query-to-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-from-json.d.ts +24 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-to-json.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/process-custom-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/validate-custom-formula.d.ts +25 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/execute-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-schemas.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/filter-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +41 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-arg.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-node.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/attribute-helpers.d.ts +50 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/fuzzy-match.d.ts +16 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +34 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +52 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/translation-helpers.d.ts +31 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +115 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/props.d.ts +20 -2
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +10 -6
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +2 -2
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +14 -5
- package/dist/packages/sdk-ui/src/shared/components/grouped-items-browser/types.d.ts +7 -1
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/inline-text-editor.d.ts +26 -0
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/use-blur-on-pointer-down-outside.d.ts +11 -0
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/const.d.ts +5 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-app-settings.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-notification.d.ts +4 -4
- package/dist/packages/sdk-ui/src/shared/hooks/use-should-load.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-with-change-detection.d.ts +5 -5
- 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/packages/sdk-ui/src/types.d.ts +3 -3
- package/dist/quota-notification-BqRYSJ7r.cjs +713 -0
- package/dist/{quota-notification-D6oMJal8.js → quota-notification-CeKnEyQG.js} +18423 -17044
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +40 -3
- 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 +40 -3
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +40 -3
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +40 -3
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +42 -5
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +42 -5
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +42 -5
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +42 -5
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +40 -3
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +42 -5
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +40 -3
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +42 -5
- package/dist/{types-CoY6F8Ma.cjs → types-C0QU2tsE.cjs} +1 -1
- package/dist/{types-ixSwJkxM.js → types-DJtC8_5_.js} +1 -1
- package/dist/{utils-BP-BglHE.js → utils-BCp2ISWh.js} +3745 -3773
- package/dist/{utils-C8YMrOdw.cjs → utils-D8O1_kl3.cjs} +33 -33
- package/dist/{widget-composer-DI4sHaNe.cjs → widget-composer-BkHZISs7.cjs} +1 -1
- package/dist/{widget-composer-CUUFoCb9.js → widget-composer-CDNL9_XF.js} +8 -8
- package/package.json +10 -8
- package/dist/dimensions-BiLyFpCg.js +0 -202
- package/dist/dimensions-X4_igtmO.cjs +0 -1
- package/dist/execute-query-BEeqqDl6.js +0 -5795
- package/dist/execute-query-DJDE0zRU.cjs +0 -1
- 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
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/common.d.ts +0 -84
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/parse-compose-code.d.ts +0 -15
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-from-json.d.ts +0 -12
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-to-json.d.ts +0 -13
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-to-json.d.ts +0 -13
- package/dist/quota-notification-z3dv2KoH.cjs +0 -672
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PointerEvent } from 'react';
|
|
2
|
+
import { PointerSensor } from '@dnd-kit/core';
|
|
3
|
+
import type { PointerSensorOptions } from '@dnd-kit/core';
|
|
4
|
+
/**
|
|
5
|
+
* PointerSensor that skips activation when the event originates from interactive
|
|
6
|
+
* elements (input, textarea, select, button, contenteditable) or elements
|
|
7
|
+
* explicitly marked with the `data-no-dnd` attribute.
|
|
8
|
+
* Prevents DnD from stealing focus and keyboard events from the widget title editor.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class SmartPointerSensor extends PointerSensor {
|
|
13
|
+
static activators: {
|
|
14
|
+
eventName: "onPointerDown";
|
|
15
|
+
handler: ({ nativeEvent: event }: PointerEvent, { onActivation }: PointerSensorOptions) => boolean;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface GetDashboardModelOptions {
|
|
|
40
40
|
* @param themeSettings - Optional theme settings
|
|
41
41
|
* @param appSettings - Optional application settings
|
|
42
42
|
* @returns The dashboard model
|
|
43
|
-
*
|
|
43
|
+
*
|
|
44
|
+
* @internal @sisenseInternal
|
|
44
45
|
*/
|
|
45
46
|
export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<DashboardModel>;
|
|
@@ -14,14 +14,24 @@ export declare enum UseDashboardModelActionTypeInternal {
|
|
|
14
14
|
/**
|
|
15
15
|
* Action types for the dashboard model state used in {@link useDashboardModel}.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @sisenseInternal
|
|
18
18
|
*/
|
|
19
19
|
export declare enum UseDashboardModelActionType {
|
|
20
20
|
FILTERS_UPDATE = "FILTERS.UPDATE",
|
|
21
21
|
ADD_WIDGET = "WIDGETS.ADD",
|
|
22
|
+
PATCH_WIDGET = "WIDGETS.PATCH",
|
|
22
23
|
WIDGETS_PANEL_LAYOUT_UPDATE = "WIDGETS_PANEL_LAYOUT.UPDATE",
|
|
23
24
|
WIDGETS_DELETE = "WIDGETS.DELETE"
|
|
24
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Fields that can be safely patched on a widget without full DTO reconstruction.
|
|
28
|
+
* Intentionally narrow — extend only when lossless roundtrip is guaranteed.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export type WidgetPatch = {
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
25
35
|
/**
|
|
26
36
|
* Internal actions for the dashboard model state used in {@link useDashboardModel}.
|
|
27
37
|
*
|
|
@@ -42,7 +52,7 @@ export type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
|
42
52
|
*
|
|
43
53
|
* @internal
|
|
44
54
|
*/
|
|
45
|
-
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
55
|
+
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelPatchWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
46
56
|
/**
|
|
47
57
|
* Filter update actions for the dashboard model state used in {@link useDashboardModel}.
|
|
48
58
|
*
|
|
@@ -72,6 +82,18 @@ export type UseDashboardModelAddWidgetAction = {
|
|
|
72
82
|
widgetOptions?: SpecificWidgetOptions;
|
|
73
83
|
};
|
|
74
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Patch widget action for the dashboard model state used in {@link useDashboardModel}.
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
export type UseDashboardModelPatchWidgetAction = {
|
|
91
|
+
type: UseDashboardModelActionType.PATCH_WIDGET;
|
|
92
|
+
payload: {
|
|
93
|
+
widgetOid: string;
|
|
94
|
+
patch: WidgetPatch;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
75
97
|
/**
|
|
76
98
|
* Layout update action for the dashboard model state used in {@link useDashboardModel}.
|
|
77
99
|
*
|
|
@@ -7,7 +7,8 @@ import { AddWidgetPayload } from './types.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @param filtersOrFilterRelations - The filters or filter relations to translate
|
|
9
9
|
* @returns The translated filters and relations DTOs for Fusion
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
|
+
* @sisenseInternal
|
|
11
12
|
*/
|
|
12
13
|
export declare function translateFiltersAndRelationsToDto(filtersOrFilterRelations: Filter[] | FilterRelations): {
|
|
13
14
|
filters: (import("../../../../../infra/api/types/dashboard-dto.js").FilterDto | import("../../../../../infra/api/types/dashboard-dto.js").CascadingFilterDto)[];
|
|
@@ -36,6 +36,7 @@ export interface UseDashboardPersistenceResult {
|
|
|
36
36
|
*
|
|
37
37
|
* @param params - Parameters for dashboard persistence
|
|
38
38
|
* @returns Dashboard persistence state and dispatch function
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* @sisenseInternal
|
|
40
41
|
*/
|
|
41
42
|
export declare function useDashboardPersistence({ dashboard, persist, sharedMode, }: UseDashboardPersistenceParams): UseDashboardPersistenceResult;
|
|
@@ -200,7 +200,7 @@ export interface JumpToDashboardConfigForPivot extends Omit<JumpToDashboardConfi
|
|
|
200
200
|
/**
|
|
201
201
|
* Map of target dashboards for different dimensions/measures
|
|
202
202
|
*
|
|
203
|
-
* @
|
|
203
|
+
* @beta
|
|
204
204
|
* @example
|
|
205
205
|
*
|
|
206
206
|
* const FormulaMeasure = dashboardProps.widgets[0].dataOptions.values[0];
|
package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
import type { DashboardPersistenceManager } from '../../types.js';
|
|
3
|
+
/** Options for the widget renaming middleware hook. */
|
|
4
|
+
export type UseWidgetRenamingParams = {
|
|
5
|
+
/** Current widgets. */
|
|
6
|
+
widgets: WidgetProps[];
|
|
7
|
+
/** When false, returns widgets unchanged (no config.header.title.editing.enabled, no persistence wrap). */
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/** When provided, persists widget renames to the server on title/changed. */
|
|
10
|
+
persistence?: Pick<DashboardPersistenceManager, 'patchWidget'>;
|
|
11
|
+
};
|
|
12
|
+
/** Output of the widget renaming middleware. */
|
|
13
|
+
export type WidgetRenamingOutput = {
|
|
14
|
+
widgets: WidgetProps[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Middleware hook that enables widget-level rename UI and optionally persists renames.
|
|
18
|
+
* Sets config.header.title.editing.enabled on each widget so ChartWidget/PivotTableWidget show rename UI.
|
|
19
|
+
* When persistence is set, wraps widget onChange to call patchWidget on title/changed
|
|
20
|
+
* before forwarding to the change-detection layer.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Options containing widgets, enabled flag, and optional persistence.
|
|
23
|
+
* @returns Widgets with config.header.title.editing.enabled and optionally wrapped onChange.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const { widgets: widgetsWithRename } = useWidgetRenaming({
|
|
28
|
+
* widgets: widgetsWithDuplicate,
|
|
29
|
+
* enabled: true,
|
|
30
|
+
* persistence,
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function useWidgetRenaming(params: UseWidgetRenamingParams): WidgetRenamingOutput;
|
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
-
import { DashboardStyleOptions, SpecificWidgetOptions, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { DashboardStyleOptions, SpecificWidgetOptions, WidgetPatch, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
4
4
|
import { TabbersConfig } from '../../domains/dashboarding/hooks/use-tabber';
|
|
5
5
|
import { FiltersPanelConfig } from '../../domains/filters/components/filters-panel/types';
|
|
6
6
|
import { WidgetProps } from '../../domains/widgets/components/widget/types';
|
|
@@ -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
|
|
@@ -234,6 +254,22 @@ export interface EditModeConfig {
|
|
|
234
254
|
*/
|
|
235
255
|
enabled: boolean;
|
|
236
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* Configuration for the widget renaming feature.
|
|
259
|
+
*
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
262
|
+
renameWidget?: {
|
|
263
|
+
/**
|
|
264
|
+
* When `true`, adds a "Rename widget" menu item to each widget header.
|
|
265
|
+
* On click, triggers inline title editing of the widget.
|
|
266
|
+
* Only has effect when edit mode is also enabled (`editMode.enabled`).
|
|
267
|
+
*
|
|
268
|
+
* If not specified, the default value is `false`.
|
|
269
|
+
* @internal
|
|
270
|
+
*/
|
|
271
|
+
enabled: boolean;
|
|
272
|
+
};
|
|
237
273
|
}
|
|
238
274
|
/**
|
|
239
275
|
* Dashboard configuration
|
|
@@ -314,6 +350,12 @@ export type DashboardPersistenceManager = {
|
|
|
314
350
|
widgetsPanelLayout: WidgetsPanelLayout;
|
|
315
351
|
widgetOptions?: SpecificWidgetOptions;
|
|
316
352
|
}>;
|
|
353
|
+
/**
|
|
354
|
+
* Patch a single field (e.g. title) on an existing widget.
|
|
355
|
+
*
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
patchWidget: (widgetOid: string, patch: WidgetPatch) => Promise<void>;
|
|
317
359
|
};
|
|
318
360
|
/**
|
|
319
361
|
* Props for the Dashboard component
|
|
@@ -34,8 +34,8 @@ export declare const useDashboardThemeInternal: ({ styleOptions }: DashboardThem
|
|
|
34
34
|
* React hook that returns dashboard theme settings
|
|
35
35
|
*
|
|
36
36
|
* @group Dashboards
|
|
37
|
+
*
|
|
37
38
|
* @alpha
|
|
38
|
-
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export declare const useDashboardTheme: (args_0: DashboardThemeParams) => {
|
|
41
41
|
themeSettings: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataSource } from '@sisense/sdk-data';
|
|
1
|
+
import { DataSource, DataSourceField, Dimension } from '@sisense/sdk-data';
|
|
2
2
|
import { AttributiveElement } from '../dimensions-browser/types.js';
|
|
3
3
|
type AddFilterDataBrowserProps = {
|
|
4
4
|
dataSources: DataSource[];
|
|
@@ -13,4 +13,5 @@ type AddFilterDataBrowserProps = {
|
|
|
13
13
|
* A component that allows users to select a data source and an attribute to create a filter.
|
|
14
14
|
*/
|
|
15
15
|
export declare const AddFilterDataBrowser: ({ initialDataSource, dataSources, disabledAttributes, onAttributeClick, }: AddFilterDataBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useGetDimensionsFromDataSourceFields: (dataSourceFields: DataSourceField[] | undefined, dataSource: DataSource) => Dimension[];
|
|
16
17
|
export {};
|
package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ type DataSchemaBrowserProps = {
|
|
|
8
8
|
*
|
|
9
9
|
* @param params DataSchemaBrowserProps
|
|
10
10
|
* @returns ReactElement
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* @sisenseInternal
|
|
12
13
|
*/
|
|
13
14
|
export declare const DataSchemaBrowser: ({ dimensions, collapseAll }: DataSchemaBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -54,6 +54,7 @@ export type AttributiveElement = Attribute | DateDimension;
|
|
|
54
54
|
*/
|
|
55
55
|
export type AttributeActionConfig = {
|
|
56
56
|
onClick(this: void, attribute: AttributiveElement): void;
|
|
57
|
+
getLabel?: (this: void, attribute: AttributiveElement) => string;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
60
|
* Config for secondary action to be performed on an attribute.
|
|
@@ -65,10 +66,17 @@ export type AttributeSecondaryActionConfig = {
|
|
|
65
66
|
SecondaryActionButtonIcon: React.ComponentType<{
|
|
66
67
|
attribute: AttributiveElement;
|
|
67
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* When true, the row keeps hover/focus style after the secondary action is clicked (e.g. while a menu is open).
|
|
71
|
+
* Call the `onSubmit` callback passed to `onClick` to clear the focus (e.g. when the menu closes).
|
|
72
|
+
*/
|
|
73
|
+
keepFocusedOnClick?: boolean;
|
|
68
74
|
/**
|
|
69
75
|
* Callback to be executed when the secondary action button is clicked.
|
|
76
|
+
* The optional event provides the click position for positioning menus.
|
|
77
|
+
* When keepFocusedOnClick is true, `onSubmit` is provided; call it to clear the focused state (e.g. in menu onClose).
|
|
70
78
|
*/
|
|
71
|
-
onClick(this: void, attribute: AttributiveElement): void;
|
|
79
|
+
onClick(this: void, attribute: AttributiveElement, event: React.MouseEvent, onSubmit: () => void): void;
|
|
72
80
|
};
|
|
73
81
|
/**
|
|
74
82
|
* Config for secondary action to be performed on a dimension.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSource, DimensionalCalculatedMeasure } from '@sisense/sdk-data';
|
|
2
|
-
import { ClientApplication } from '../../infra/app/
|
|
2
|
+
import { type ClientApplication } from '../../infra/app/types';
|
|
3
3
|
/**
|
|
4
4
|
* Fetch a formula by oid from the default Sisense instance
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Attribute, DataSource, Measure, PivotAttribute, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
2
2
|
import type { PivotQueryDescription as InternalPivotQueryDescription, QueryDescription as InternalQueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
3
3
|
import { CreateCacheKeyFn } from '../../../shared/utils/create-cache';
|
|
4
|
-
import { ClientApplication } from '../../../infra/app/
|
|
4
|
+
import { type ClientApplication } from '../../../infra/app/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* All the properties that fully describe a query you want to send.
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryResultData } from '@sisense/sdk-data';
|
|
2
|
-
import { ClientApplication } from '../../../../infra/app/
|
|
2
|
+
import { type ClientApplication } from '../../../../infra/app/types';
|
|
3
3
|
import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdQueryParams, QueryByWidgetIdState } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* React hook that executes a data query extracted from an existing widget in the Sisense instance.
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attribute, DataSource, Filter, FilterRelationsJaql, Measure, QueryResultData } from '@sisense/sdk-data';
|
|
2
|
-
import { ClientApplication } from '../../../../infra/app/
|
|
2
|
+
import { type ClientApplication } from '../../../../infra/app/types.js';
|
|
3
3
|
import { executeQuery as executeQueryFunction } from '../../../query-execution/core/execute-query.js';
|
|
4
4
|
import { BoxplotChartCustomDataOptions, BoxplotChartDataOptionsInternal } from '../../core/chart-data-options/types.js';
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryResultData } from '@sisense/sdk-data';
|
|
2
2
|
import { QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
3
3
|
import { QueryDescription } from '../../../../../domains/query-execution/core/execute-query';
|
|
4
|
-
import { ClientApplication } from '../../../../../infra/app/
|
|
4
|
+
import { type ClientApplication } from '../../../../../infra/app/types';
|
|
5
5
|
import { ChartType } from '../../../../../types';
|
|
6
6
|
import { ChartDataOptionsInternal } from '../../../core/chart-data-options/types';
|
|
7
7
|
export type LoadDataFunction = (options: {
|
|
@@ -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[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryResultData } from '@sisense/sdk-data';
|
|
2
2
|
import { QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
3
3
|
import { QueryDescription } from '../../../../../../domains/query-execution/core/execute-query';
|
|
4
|
-
import { ClientApplication } from '../../../../../../infra/app/
|
|
4
|
+
import { type ClientApplication } from '../../../../../../infra/app/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Load data by a regular single query execution.
|
|
7
7
|
*/
|
|
@@ -10,7 +10,7 @@ import { AreamapChartDataOptions, AreamapChartDataOptionsInternal, CalendarHeatm
|
|
|
10
10
|
import { DataTable } from '../../../../../domains/visualizations/core/chart-data-processor/table-processor';
|
|
11
11
|
import type { CartesianChartData, CategoricalChartData, ScattermapChartData } from '../../../../../domains/visualizations/core/chart-data/types';
|
|
12
12
|
import { DesignOptions } from '../../../../../domains/visualizations/core/chart-options-processor/translations/types';
|
|
13
|
-
import { ClientApplication } from '../../../../../infra/app/
|
|
13
|
+
import { type ClientApplication } from '../../../../../infra/app/types';
|
|
14
14
|
import type { AreamapStyleOptions, AreaStyleOptions, CalendarHeatmapStyleOptions, ChartDataOptions, ChartStyleOptions, FunnelStyleOptions, LineStyleOptions, PieStyleOptions, PolarStyleOptions, ScattermapStyleOptions, StackableStyleOptions, StreamgraphStyleOptions, SunburstStyleOptions, TreemapStyleOptions } from '../../../../../types';
|
|
15
15
|
import { AreamapData } from './areamap-chart/types';
|
|
16
16
|
import { CalendarHeatmapChartData } from './highchart-based-charts/calendar-heatmap-chart/data';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Attribute } from '@sisense/sdk-data';
|
|
2
|
+
import { DataOptionLocation, DrilldownSelection } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Event triggered when chart widget drilldown selections change.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* { type: 'drilldownSelections/changed', payload: [{ points: [...], nextDimension }] }
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export interface ChartWidgetDrilldownSelectionsChangedEvent {
|
|
12
|
+
/** Event type */
|
|
13
|
+
type: 'drilldownSelections/changed';
|
|
14
|
+
/** The new drilldown selections */
|
|
15
|
+
payload: DrilldownSelection[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Event triggered when widget title changes (e.g. inline rename).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* { type: 'title/changed', payload: { title: 'New Title' } }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export interface WidgetTitleChangedEvent {
|
|
26
|
+
/** Event type */
|
|
27
|
+
type: 'title/changed';
|
|
28
|
+
/** The new title */
|
|
29
|
+
payload: {
|
|
30
|
+
title: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Events that can be triggered by the ChartWidget component.
|
|
35
|
+
*/
|
|
36
|
+
export type ChartWidgetChangeEvent = ChartWidgetDrilldownSelectionsChangedEvent | WidgetTitleChangedEvent;
|
|
37
|
+
/**
|
|
38
|
+
* Event triggered when pivot table widget drilldown selections change.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* { type: 'drilldownSelections/changed', payload: { target, selections } }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export interface PivotTableWidgetDrilldownSelectionsChangedEvent {
|
|
46
|
+
/** Event type */
|
|
47
|
+
type: 'drilldownSelections/changed';
|
|
48
|
+
/** The drilldown target and new selections */
|
|
49
|
+
payload: {
|
|
50
|
+
target: Attribute | DataOptionLocation;
|
|
51
|
+
selections: DrilldownSelection[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Events that can be triggered by the PivotTableWidget component.
|
|
56
|
+
*/
|
|
57
|
+
export type PivotTableWidgetChangeEvent = PivotTableWidgetDrilldownSelectionsChangedEvent | WidgetTitleChangedEvent;
|
|
58
|
+
/**
|
|
59
|
+
* Events that can be triggered by widget components.
|
|
60
|
+
*
|
|
61
|
+
* Union of all widget-specific change events. Extensible for TextWidget, CustomWidget future events.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* ChartWidget onChange handler:
|
|
66
|
+
* onChange={(event) => {
|
|
67
|
+
* if (event.type === 'drilldownSelections/changed') {
|
|
68
|
+
* setDrilldownSelections(event.payload);
|
|
69
|
+
* }
|
|
70
|
+
* }}
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export type WidgetChangeEvent = ChartWidgetChangeEvent | PivotTableWidgetChangeEvent;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
import type { ChartWidgetChangeEvent, ChartWidgetDrilldownSelectionsChangedEvent } from '../../../../domains/widgets/change-events';
|
|
3
4
|
import type { ChartEventProps } from '../../../../props';
|
|
4
5
|
import { ChartDataOptions, ChartType, ChartWidgetStyleOptions, DrilldownOptions } from '../../../../types';
|
|
5
6
|
import { WidgetConfig } from '../widget/types';
|
|
7
|
+
export type { ChartWidgetChangeEvent, ChartWidgetDrilldownSelectionsChangedEvent };
|
|
6
8
|
/**
|
|
7
9
|
* Props for the {@link ChartWidget} component
|
|
8
10
|
*
|
|
@@ -95,6 +97,14 @@ export interface ChartWidgetProps extends ChartEventProps {
|
|
|
95
97
|
* @category Widget
|
|
96
98
|
*/
|
|
97
99
|
highlightSelectionDisabled?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Callback to receive widget change events.
|
|
102
|
+
*
|
|
103
|
+
* Invoked when the widget state changes (e.g. drilldown selections).
|
|
104
|
+
* See {@link ChartWidgetChangeEvent} for event types.
|
|
105
|
+
*
|
|
106
|
+
* @param event - The change event that occurred
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
onChange?: (event: ChartWidgetChangeEvent) => void;
|
|
100
110
|
}
|
|
@@ -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;
|
|
@@ -2,9 +2,11 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
3
|
import type { CustomDataCellFormatter, CustomHeaderCellFormatter } from '../../../../domains/visualizations/components/pivot-table/formatters/types';
|
|
4
4
|
import { PivotTableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types';
|
|
5
|
+
import type { PivotTableWidgetChangeEvent, PivotTableWidgetDrilldownSelectionsChangedEvent } from '../../../../domains/widgets/change-events';
|
|
5
6
|
import type { PivotTableDataPointEventHandler } from '../../../../props';
|
|
6
7
|
import { PivotTableDrilldownOptions, PivotTableWidgetStyleOptions } from '../../../../types';
|
|
7
8
|
import { WidgetConfig } from '../widget/types';
|
|
9
|
+
export type { PivotTableWidgetChangeEvent, PivotTableWidgetDrilldownSelectionsChangedEvent };
|
|
8
10
|
/**
|
|
9
11
|
* Props for the {@link PivotTableWidget} component
|
|
10
12
|
*/
|
|
@@ -136,6 +138,14 @@ export interface PivotTableWidgetProps {
|
|
|
136
138
|
* @internal
|
|
137
139
|
*/
|
|
138
140
|
onHeaderCellFormat?: CustomHeaderCellFormatter;
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Callback to receive widget change events.
|
|
143
|
+
*
|
|
144
|
+
* Invoked when the widget state changes (e.g. drilldown selections).
|
|
145
|
+
* See {@link PivotTableWidgetChangeEvent} for event types.
|
|
146
|
+
*
|
|
147
|
+
* @param event - The change event that occurred
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
onChange?: (event: PivotTableWidgetChangeEvent) => void;
|
|
141
151
|
}
|
|
@@ -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
|
}
|