@sisense/sdk-ui 2.22.0 → 2.23.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 +17 -17
- package/dist/ai.js +57 -57
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +2177 -1176
- package/dist/analytics-composer.cjs +47 -47
- package/dist/analytics-composer.js +135 -131
- package/dist/dimensions-2t18RSZC.cjs +1 -0
- package/dist/dimensions-C0BmtTH2.js +204 -0
- package/dist/execute-query-CHYTupEo.js +5866 -0
- package/dist/execute-query-DmAyVFF5.cjs +1 -0
- package/dist/{index-kxX21arA.js → index-DCAC0mJe.js} +18 -1
- package/dist/{index-NyouhE_A.cjs → index-Dx6wvLd3.cjs} +1 -1
- package/dist/index.cjs +335 -322
- package/dist/index.js +15230 -15097
- package/dist/index.umd.js +687 -634
- 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/types.d.ts +23 -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/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/pivot-table-widget/types.d.ts +12 -2
- 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/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-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/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/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/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/translation/resources/__external__/de-de.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +34 -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 +13 -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 +25 -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/{parse-compose-code.d.ts → shared/utils/parse-compose-code.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +49 -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 +1 -1
- 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 +8 -6
- 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 +12 -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/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/types.d.ts +3 -3
- package/dist/{quota-notification-D6oMJal8.js → quota-notification-CVl0isIV.js} +17901 -16770
- package/dist/quota-notification-RAaHp-eO.cjs +713 -0
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +19 -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 +19 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +19 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +19 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +19 -2
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +19 -2
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +19 -2
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +19 -2
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +19 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +19 -2
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +19 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +19 -2
- package/dist/{types-ixSwJkxM.js → types-B96nVbgX.js} +1 -1
- package/dist/{types-CoY6F8Ma.cjs → types-DZ4vWh8j.cjs} +1 -1
- package/dist/{utils-C8YMrOdw.cjs → utils-CgV-jWWQ.cjs} +33 -33
- package/dist/{utils-BP-BglHE.js → utils-ChqSLRbz.js} +3742 -3774
- package/dist/{widget-composer-DI4sHaNe.cjs → widget-composer-Blul90Zb.cjs} +1 -1
- package/dist/{widget-composer-CUUFoCb9.js → widget-composer-Cf_CN3Ux.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/modules/analytics-composer/nlq-v3-translator/common.d.ts +0 -84
- 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;
|
|
@@ -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';
|
|
@@ -234,6 +234,22 @@ export interface EditModeConfig {
|
|
|
234
234
|
*/
|
|
235
235
|
enabled: boolean;
|
|
236
236
|
};
|
|
237
|
+
/**
|
|
238
|
+
* Configuration for the widget renaming feature.
|
|
239
|
+
*
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
242
|
+
renameWidget?: {
|
|
243
|
+
/**
|
|
244
|
+
* When `true`, adds a "Rename widget" menu item to each widget header.
|
|
245
|
+
* On click, triggers inline title editing of the widget.
|
|
246
|
+
* Only has effect when edit mode is also enabled (`editMode.enabled`).
|
|
247
|
+
*
|
|
248
|
+
* If not specified, the default value is `false`.
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
};
|
|
237
253
|
}
|
|
238
254
|
/**
|
|
239
255
|
* Dashboard configuration
|
|
@@ -314,6 +330,12 @@ export type DashboardPersistenceManager = {
|
|
|
314
330
|
widgetsPanelLayout: WidgetsPanelLayout;
|
|
315
331
|
widgetOptions?: SpecificWidgetOptions;
|
|
316
332
|
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Patch a single field (e.g. title) on an existing widget.
|
|
335
|
+
*
|
|
336
|
+
* @internal
|
|
337
|
+
*/
|
|
338
|
+
patchWidget: (widgetOid: string, patch: WidgetPatch) => Promise<void>;
|
|
317
339
|
};
|
|
318
340
|
/**
|
|
319
341
|
* 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,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
|
}
|
|
@@ -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
|
}
|
|
@@ -8,7 +8,8 @@ import { FiltersIgnoringRules, WidgetDto } from './types.js';
|
|
|
8
8
|
* @param dashboard - The dashboard containing the filters.
|
|
9
9
|
* @param widget - The widget containing the filters.
|
|
10
10
|
* @returns An object containing an array of filters and an array of highlights.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* @sisenseInternal
|
|
12
13
|
*/
|
|
13
14
|
export declare function extractCombinedFilters(dashboard: DashboardDto, widget: WidgetDto): {
|
|
14
15
|
filters: import("@sisense/sdk-data").Filter[];
|
|
@@ -4788,6 +4789,7 @@ export declare function getDashboardFilters(dashboardFilters: Array<FilterDto |
|
|
|
4788
4789
|
jaql: import("@sisense/sdk-data").FilterJaql;
|
|
4789
4790
|
} | undefined;
|
|
4790
4791
|
} | undefined;
|
|
4792
|
+
indexed?: boolean | undefined;
|
|
4791
4793
|
merged?: boolean | undefined;
|
|
4792
4794
|
panel?: "rows" | "columns" | undefined;
|
|
4793
4795
|
};
|
|
@@ -5,7 +5,7 @@ import { BoxplotWidgetStyle, FusionWidgetType, Panel, PanelItem, WidgetStyle } f
|
|
|
5
5
|
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledColumn | StyledMeasureColumn;
|
|
6
6
|
/** @internal */
|
|
7
7
|
export declare function createPanelItem(column: StyledColumn | StyledMeasureColumn): PanelItem;
|
|
8
|
-
/** @
|
|
8
|
+
/** @sisenseInternal */
|
|
9
9
|
export declare const createDataOptionsFromPanels: (panels: Panel[], variantColors: Color[]) => {
|
|
10
10
|
[key: string]: any[];
|
|
11
11
|
};
|
|
@@ -44,7 +44,7 @@ export declare enum WidgetDashboardFilterMode {
|
|
|
44
44
|
* This is the (not-comprehensive) structure of the response from the
|
|
45
45
|
* `/api/v1/dashboards/${dashboardOid}/widgets/${widgetOid}` endpoint.
|
|
46
46
|
*
|
|
47
|
-
* @
|
|
47
|
+
* @sisenseInternal
|
|
48
48
|
*/
|
|
49
49
|
export interface WidgetDto {
|
|
50
50
|
oid: string;
|
|
@@ -100,7 +100,8 @@ export declare function isTextWidgetProps(widgetProps: CommonWidgetProps): widge
|
|
|
100
100
|
*
|
|
101
101
|
* @param widgetProps - The widget props to check.
|
|
102
102
|
* @returns whether the widget props is for a pivot table widget
|
|
103
|
-
*
|
|
103
|
+
*
|
|
104
|
+
* @sisenseInternal
|
|
104
105
|
*/
|
|
105
106
|
export declare function isPivotTableWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>;
|
|
106
107
|
/**
|
|
@@ -116,7 +117,7 @@ export declare function isCustomWidgetProps(widgetProps: CommonWidgetProps): wid
|
|
|
116
117
|
*
|
|
117
118
|
* @param widgetProps - The widget props to check.
|
|
118
119
|
* @returns whether the widget props is for a chart widget
|
|
119
|
-
* @
|
|
120
|
+
* @sisenseInternal
|
|
120
121
|
*/
|
|
121
122
|
export declare function isChartWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<ChartWidgetProps, 'chart'>;
|
|
122
123
|
export declare function getInternalWidgetType(widgetProps: CommonWidgetProps): WidgetTypeInternal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WidgetChangeEvent } from './change-events';
|
|
2
|
+
import type { WidgetProps } from './components/widget/types';
|
|
3
|
+
/**
|
|
4
|
+
* Reduces a WidgetChangeEvent to a Partial<WidgetProps> delta for state merge.
|
|
5
|
+
*
|
|
6
|
+
* Pure, allocation-only; no mutation. Used by the composition layer (e.g. useComposedDashboard)
|
|
7
|
+
* to translate atomic events into prop updates.
|
|
8
|
+
*
|
|
9
|
+
* Validates that the event payload structure matches the widget type before applying.
|
|
10
|
+
* Returns empty delta when payload structure is incompatible (e.g. chart array payload
|
|
11
|
+
* for a pivot widget), avoiding silent corruption.
|
|
12
|
+
*
|
|
13
|
+
* @param event - The widget change event
|
|
14
|
+
* @param currentWidget - The current widget state
|
|
15
|
+
* @returns A partial props object to merge into the widget
|
|
16
|
+
*/
|
|
17
|
+
export declare function widgetChangeEventToDelta(event: WidgetChangeEvent, currentWidget: WidgetProps): Partial<WidgetProps>;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { MenuItem } from '../../../shared/types/menu-item';
|
|
2
|
-
import { WidgetProps } from '../components/widget/types';
|
|
1
|
+
import type { MenuItem } from '../../../shared/types/menu-item';
|
|
2
|
+
import type { WidgetProps } from '../components/widget/types';
|
|
3
|
+
import type { WidgetHeaderConfig } from '../shared/widget-header/types';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Transformer: adds a menu item to a header config (pure, non-mutating).
|
|
6
|
+
*
|
|
7
|
+
* @param menuItem - The menu item to append to toolbar.menu.items.
|
|
8
|
+
* @returns A transformer that maps WidgetHeaderConfig to WidgetHeaderConfig with the menu item appended.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function withMenuItemInHeaderConfig(menuItem: MenuItem): (headerConfig: WidgetHeaderConfig) => WidgetHeaderConfig;
|
|
12
|
+
/**
|
|
13
|
+
* Adds a menu item to the widget header (transforms full WidgetProps).
|
|
14
|
+
*
|
|
5
15
|
* @param menuItem - The menu item to add.
|
|
6
|
-
* @returns A
|
|
16
|
+
* @returns A transformer that maps WidgetProps to WidgetProps with the item in config.header.toolbar.menu.items.
|
|
7
17
|
* @internal
|
|
8
18
|
*/
|
|
9
19
|
export declare function withHeaderMenuItem(menuItem: MenuItem): (widget: WidgetProps) => WidgetProps;
|
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export declare const widgetHelpers: {
|
|
6
|
+
withMenuItemInHeaderConfig(menuItem: import("../../../shared/types/menu-item").MenuItem): (headerConfig: import("../shared/widget-header/types").WidgetHeaderConfig) => import("../shared/widget-header/types").WidgetHeaderConfig;
|
|
6
7
|
withHeaderMenuItem(menuItem: import("../../../shared/types/menu-item").MenuItem): (widget: import("../components/widget").WidgetProps) => import("../components/widget").WidgetProps;
|
|
7
8
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WidgetChangeEvent } from '../../../domains/widgets/change-events.js';
|
|
2
|
+
import type { TitleEditorConfig } from '../../../domains/widgets/shared/widget-header/types.js';
|
|
3
|
+
import type { MenuItem } from '../../../shared/types/menu-item.js';
|
|
4
|
+
/** Parameters for the title renaming hook. */
|
|
5
|
+
export type UseTitleRenamingParams = {
|
|
6
|
+
/** Whether inline title renaming is enabled. */
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
/** Handler called when the user commits a new title. */
|
|
9
|
+
onChange?: (event: WidgetChangeEvent) => void;
|
|
10
|
+
};
|
|
11
|
+
/** Result of the title renaming hook. */
|
|
12
|
+
export type UseTitleRenamingResult = {
|
|
13
|
+
/** "Rename" menu item to inject into the header toolbar; undefined when not enabled. */
|
|
14
|
+
renameMenuItem: MenuItem | undefined;
|
|
15
|
+
/** Config for the inline title editor; undefined when not enabled. */
|
|
16
|
+
titleEditorConfig: TitleEditorConfig | undefined;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Hook that manages inline title renaming state: isEditing, start/cancel/commit
|
|
20
|
+
* callbacks, titleEditorConfig for the title editor, and a prepared "Rename" menu item.
|
|
21
|
+
* Emits title/changed on commit.
|
|
22
|
+
*
|
|
23
|
+
* @param params - Hook parameters
|
|
24
|
+
* @returns renameMenuItem and titleEditorConfig
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function useTitleRenaming(params: UseTitleRenamingParams): UseTitleRenamingResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WidgetChangeEvent } from '../../../domains/widgets/change-events.js';
|
|
2
|
+
import type { TitleEditorConfig, WidgetHeaderConfig } from '../../../domains/widgets/shared/widget-header/types.js';
|
|
3
|
+
/** Parameters for the widget header management hook. */
|
|
4
|
+
export type UseWidgetHeaderManagementParams = {
|
|
5
|
+
/** Current title (from props). */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** onChange handler (from props). */
|
|
8
|
+
onChange?: (event: WidgetChangeEvent) => void;
|
|
9
|
+
/** Merged config.header from props (may already have toolbar.menu.items). */
|
|
10
|
+
headerConfig?: WidgetHeaderConfig;
|
|
11
|
+
};
|
|
12
|
+
/** Result of the widget header management hook. */
|
|
13
|
+
export type UseWidgetHeaderManagementResult = {
|
|
14
|
+
/** Merged header config (e.g. rename menu in toolbar). */
|
|
15
|
+
headerConfig: WidgetHeaderConfig;
|
|
16
|
+
/** Inline title editor config when rename is enabled. Pass to WidgetContainer as separate prop. */
|
|
17
|
+
titleEditor?: TitleEditorConfig;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Hook that manages widget header UI for rename: adds "Rename" menu item
|
|
21
|
+
* and delegates inline title editing to useTitleRenaming.
|
|
22
|
+
* Used by ChartWidget and PivotTableWidget when config.header.title.editing.enabled is true.
|
|
23
|
+
*
|
|
24
|
+
* @param params - Hook parameters
|
|
25
|
+
* @returns Merged header config to pass to WidgetContainer
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function useWidgetHeaderManagement(params: UseWidgetHeaderManagementParams): UseWidgetHeaderManagementResult;
|