@sisense/sdk-ui 2.24.0 → 2.26.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 +59 -59
- package/dist/ai.js +1097 -1171
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +587 -616
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{execute-query-b9oy2Egy.js → apply-styled-options-to-query-Bzt2GrgO.js} +1635 -1530
- package/dist/apply-styled-options-to-query-COD9fRYD.cjs +1 -0
- package/dist/{dimensions-C1R5YRt-.js → dimensions-Ce2zWFrs.js} +1 -1
- package/dist/dimensions-u3w5qNF0.cjs +1 -0
- package/dist/{index-Ck-0gJC9.cjs → index-BX9p-XrU.cjs} +1 -1
- package/dist/{index-r66Tjiqj.js → index-D7mHzfx0.js} +9 -0
- package/dist/index.cjs +467 -452
- package/dist/index.js +27214 -34168
- package/dist/index.umd.js +718 -706
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +12 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +17 -5
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +16 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/persistence-manager.d.ts +11 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +52 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +5 -28
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +6 -5
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-collapsible.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-top-slot-shell.d.ts +21 -0
- package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative-interactive.d.ts +11 -0
- package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +40 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/build-narrative-request.d.ts +36 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/get-narrative-dimensions-and-measures.d.ts +22 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +29 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +36 -0
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +62 -0
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +39 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/apply-styled-options-to-query.d.ts +87 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/translate-data-options.d.ts +13 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +32 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +26 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill-bubble-tooltip.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/types.d.ts +51 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +166 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +170 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/utils.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +13 -16
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-api-types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-constants.d.ts +6 -0
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +26 -0
- package/dist/packages/sdk-ui/src/infra/api/narrative/send-ai-feedback.d.ts +8 -0
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +10 -2
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
- package/dist/packages/sdk-ui/src/infra/contexts/emotion-cache-provider/emotion-cache-provider.d.ts +31 -3
- package/dist/packages/sdk-ui/src/infra/contexts/emotion-cache-provider/stylis-plugins/css-selector-prefix-plugin.d.ts +18 -0
- package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
- package/dist/packages/sdk-ui/src/modules/ai/api/types.d.ts +5 -18
- package/dist/packages/sdk-ui/src/modules/ai/chart/nlq-chart-widget.d.ts +2 -0
- package/dist/packages/sdk-ui/src/modules/ai/common/collapsible.d.ts +3 -0
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +5 -13
- package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlg-insights.d.ts +4 -26
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +3 -7
- package/dist/packages/sdk-ui/src/props.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +7 -1
- package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
- package/dist/packages/sdk-ui/src/types.d.ts +8 -8
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +10 -1
- 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 +10 -1
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +10 -1
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +10 -1
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +12 -3
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +12 -3
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +12 -3
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +12 -3
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +10 -1
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +12 -3
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +10 -1
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +12 -3
- package/dist/types-COBvZZm_.cjs +1 -0
- package/dist/{types-DJtC8_5_.js → types-D6jCGncV.js} +1 -1
- package/dist/{quota-notification-CeKnEyQG.js → use-hover-B1HPf4hF.js} +27827 -19390
- package/dist/use-hover-CaQrW_gv.cjs +721 -0
- package/dist/{utils-BCp2ISWh.js → utils-BQtueE3Z.js} +13632 -13251
- package/dist/utils-CAubp1g1.cjs +179 -0
- package/dist/{widget-composer-CDNL9_XF.js → widget-composer-BAJFWk3t.js} +3 -3
- package/dist/{widget-composer-BkHZISs7.cjs → widget-composer-C75b-E6W.cjs} +1 -1
- package/package.json +11 -10
- package/dist/dimensions-C7yXAoZs.cjs +0 -1
- package/dist/execute-query-0Y9Fn9Pf.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
- package/dist/packages/sdk-ui/src/infra/styled/index.d.ts +0 -4
- package/dist/packages/sdk-ui/src/infra/styled/with-css-selector-prefix.d.ts +0 -2
- package/dist/packages/sdk-ui/src/modules/ai/api/narration-endpoints.d.ts +0 -25
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +0 -8
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +0 -34
- package/dist/quota-notification-BqRYSJ7r.cjs +0 -713
- package/dist/types-C0QU2tsE.cjs +0 -1
- package/dist/utils-D8O1_kl3.cjs +0 -190
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
2
|
+
import type { WidgetNarrativeOptions } from '../core/widget-narrative-options.js';
|
|
3
|
+
import { type WidgetNarrativeQueryState } from './use-widget-narrative-state.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options for {@link useGetWidgetNarrative}.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Narration endpoints and flags default from `app.settings.narrative` on {@link useSisenseContext} when
|
|
9
|
+
* `isUnified` / `isSisenseAiEnabled` are omitted. Optional overrides match the
|
|
10
|
+
* imperative `getNlgInsightsFromWidget` helper for per-call behavior.
|
|
11
|
+
* @sisenseInternal
|
|
12
|
+
*/
|
|
13
|
+
export type UseGetWidgetNarrativeOptions = WidgetNarrativeOptions & {
|
|
14
|
+
/**
|
|
15
|
+
* When `false`, skips the narrative request.
|
|
16
|
+
*
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @sisenseInternal
|
|
23
|
+
*/
|
|
24
|
+
export type UseGetWidgetNarrativeParams = {
|
|
25
|
+
/** Widget configuration whose query drives the narrative (chart or pivot). */
|
|
26
|
+
widgetProps: WidgetProps;
|
|
27
|
+
} & UseGetWidgetNarrativeOptions;
|
|
28
|
+
/**
|
|
29
|
+
* @sisenseInternal
|
|
30
|
+
*/
|
|
31
|
+
export type UseGetWidgetNarrativeResult = WidgetNarrativeQueryState & {
|
|
32
|
+
/**
|
|
33
|
+
* `true` when `widgetProps` is a chart or pivot widget and narrative params could be built
|
|
34
|
+
* (including resolving `dataSource` via `defaultDataSource`).
|
|
35
|
+
*/
|
|
36
|
+
supported: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Mirrors {@link UseGetWidgetNarrativeOptions.enabled}. When `false`, narrative is opted out and
|
|
39
|
+
* `data` is not populated from cache.
|
|
40
|
+
*/
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Fetches natural-language narrative for a widget {@link WidgetProps} using the same conversion
|
|
45
|
+
* path as {@link getNlgInsightsFromWidget}.
|
|
46
|
+
*
|
|
47
|
+
* Requires `useSisenseContext` with `app.httpClient` and a TanStack `QueryClientProvider` ancestor
|
|
48
|
+
* (typically provided by `SisenseContextProvider` in full apps).
|
|
49
|
+
*
|
|
50
|
+
* Text and custom widgets are unsupported: `supported` is false and no request runs.
|
|
51
|
+
*
|
|
52
|
+
* @example Headless usage
|
|
53
|
+
* ```tsx
|
|
54
|
+
* const { data, isLoading, supported } = useGetWidgetNarrative({
|
|
55
|
+
* widgetProps,
|
|
56
|
+
* defaultDataSource: DM.DataSource,
|
|
57
|
+
* verbosity: 'Low',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
* @sisenseInternal
|
|
61
|
+
*/
|
|
62
|
+
export declare const useGetWidgetNarrative: (params: UseGetWidgetNarrativeParams) => UseGetWidgetNarrativeResult;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
2
|
+
import type { NarrativeRequest } from '../../../infra/api/narrative/narrative-api-types.js';
|
|
3
|
+
import type { WidgetNarrativeOptions } from '../core/widget-narrative-options.js';
|
|
4
|
+
/**
|
|
5
|
+
* Hook state aligned with legacy {@link UseGetNlgInsightsState}; used by {@link useGetWidgetNarrative}.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type WidgetNarrativeQueryState = {
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
isError: boolean;
|
|
12
|
+
isSuccess: boolean;
|
|
13
|
+
data: string | undefined;
|
|
14
|
+
error: unknown;
|
|
15
|
+
refetch: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type UseWidgetNarrativeStateParams = {
|
|
18
|
+
widgetProps: WidgetProps;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
} & WidgetNarrativeOptions;
|
|
21
|
+
export type UseWidgetNarrativeStateResult = WidgetNarrativeQueryState & {
|
|
22
|
+
supported: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Mirrors the `enabled` param. When `false`, the narrative is opted out: `data` is cleared (no
|
|
25
|
+
* cached fallback), `narrativeRequest` is undefined, and loading/error flags reflect a disabled
|
|
26
|
+
* query rather than “no insights.”
|
|
27
|
+
*/
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
/** Present when `supported` and `enabled`; used by {@link WidgetNarrative} for feedback payload only. */
|
|
30
|
+
narrativeRequest: NarrativeRequest | undefined;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Resolves chart or pivot widget props to a narration request and runs `getNarrative` via TanStack Query.
|
|
34
|
+
* Depends on {@link useSisenseContext} (`httpClient`, narration settings) and a `QueryClientProvider`.
|
|
35
|
+
* Not exported from `@sisenseInternal` public API.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function useWidgetNarrativeState({ widgetProps, defaultDataSource, verbosity, enabled, ignoreTrendAndForecast, isUnified: optionsUnified, isSisenseAiEnabled: optionsSisenseAi, }: UseWidgetNarrativeStateParams): UseWidgetNarrativeStateResult;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { DateFormat } from './apply-date-format.js';
|
|
2
2
|
export declare function newDateFormatWithUnicodeMillisecondsMasks(oldFormat: DateFormat): DateFormat;
|
|
3
3
|
export declare function newDateFormatWithExpandedAMPM(oldFormat: DateFormat, date: Date, timeZone: string): DateFormat;
|
|
4
|
+
/**
|
|
5
|
+
* Escapes Latin letter sequences that are not recognized Fusion date format tokens
|
|
6
|
+
* by wrapping them in single quotes so that `date-fns` treats them as literal text.
|
|
7
|
+
*
|
|
8
|
+
* Handles cases like `WEEK-ww` where `WEEK-` is a literal text prefix, but `W`, `E`,
|
|
9
|
+
* and `K` would otherwise be misinterpreted as `date-fns` format tokens, causing a
|
|
10
|
+
* RangeError.
|
|
11
|
+
*
|
|
12
|
+
* Adjacent non-token sequences (separated only by non-letter characters) are merged
|
|
13
|
+
* into a single quoted region to avoid `''` being interpreted as an escaped single
|
|
14
|
+
* quote by `date-fns`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function newDateFormatWithEscapedNonTokenChars(format: DateFormat): DateFormat;
|
|
4
17
|
export declare function newDateFormatWithExpandedTimezoneOffset(oldFormat: DateFormat, date: Date, timeZone: string, locale: Locale): DateFormat;
|
|
@@ -9,8 +9,8 @@ import { ExecutePivotQueryParams, PivotQueryState } from '../../types';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=queries%2Fuse-execute-pivot-query&mode=docs'
|
|
12
|
-
* width=800
|
|
13
|
-
* height=870
|
|
12
|
+
* width='800'
|
|
13
|
+
* height='870'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
|
@@ -10,8 +10,8 @@ import { ExecuteQueryParams, ExecuteQueryResult } from '../../types';
|
|
|
10
10
|
*
|
|
11
11
|
* <iframe
|
|
12
12
|
* src='https://csdk-playground.sisense.com/?example=queries%2Fuse-execute-query-sorting&mode=docs'
|
|
13
|
-
* width=800
|
|
14
|
-
* height=870
|
|
13
|
+
* width='800'
|
|
14
|
+
* height='870'
|
|
15
15
|
* style='border:none;'
|
|
16
16
|
* />
|
|
17
17
|
*
|
|
@@ -10,8 +10,8 @@ import { AreaChartProps } from '../../../props';
|
|
|
10
10
|
*
|
|
11
11
|
* <iframe
|
|
12
12
|
* src='https://csdk-playground.sisense.com/?example=charts%2Farea-chart&mode=docs'
|
|
13
|
-
* width=800
|
|
14
|
-
* height=870
|
|
13
|
+
* width='800'
|
|
14
|
+
* height='870'
|
|
15
15
|
* style='border:none;'
|
|
16
16
|
* />
|
|
17
17
|
*
|
|
@@ -11,8 +11,8 @@ import { AreamapChartProps } from '../../../props';
|
|
|
11
11
|
*
|
|
12
12
|
* <iframe
|
|
13
13
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fmap-area&mode=docs'
|
|
14
|
-
* width=800
|
|
15
|
-
* height=870
|
|
14
|
+
* width='800'
|
|
15
|
+
* height='870'
|
|
16
16
|
* style='border:none;'
|
|
17
17
|
* />
|
|
18
18
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ import { BoxplotChartProps } from '../../../../props';
|
|
|
10
10
|
*
|
|
11
11
|
* <iframe
|
|
12
12
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fboxplot-chart&mode=docs'
|
|
13
|
-
* width=800
|
|
14
|
-
* height=870
|
|
13
|
+
* width='800'
|
|
14
|
+
* height='870'
|
|
15
15
|
* style='border:none;'
|
|
16
16
|
* />
|
|
17
17
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { XAxisOrientation } from '../../../../../../../../../domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.js';
|
|
2
|
-
import { AxisSettings } from '../../../../../../../../../domains/visualizations/core/chart-options-processor/translations/axis-section.js';
|
|
2
|
+
import { type AxisSettings } from '../../../../../../../../../domains/visualizations/core/chart-options-processor/translations/axis-section.js';
|
|
3
3
|
import { BuildContext } from '../../../types.js';
|
|
4
4
|
import { CartesianChartTypes } from '../../types.js';
|
|
5
5
|
export declare const getCartesianXAxis: (ctx: BuildContext<CartesianChartTypes>, orientation: XAxisOrientation) => AxisSettings[];
|
|
@@ -12,8 +12,8 @@ import { ColumnChartProps } from '../../../props';
|
|
|
12
12
|
*
|
|
13
13
|
* <iframe
|
|
14
14
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fcolumn-chart&mode=docs'
|
|
15
|
-
* width=800
|
|
16
|
-
* height=870
|
|
15
|
+
* width='800'
|
|
16
|
+
* height='870'
|
|
17
17
|
* style='border:none;'
|
|
18
18
|
* />
|
|
19
19
|
*
|
|
@@ -9,8 +9,8 @@ import { FunnelChartProps } from '../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=charts%2Ffunnel-chart&mode=docs'
|
|
12
|
-
* width=800
|
|
13
|
-
* height=870
|
|
12
|
+
* width='800'
|
|
13
|
+
* height='870'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
|
@@ -10,8 +10,8 @@ import { PieChartProps } from '../../../../props';
|
|
|
10
10
|
*
|
|
11
11
|
* <iframe
|
|
12
12
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fpie-chart&mode=docs'
|
|
13
|
-
* width=800
|
|
14
|
-
* height=870
|
|
13
|
+
* width='800'
|
|
14
|
+
* height='870'
|
|
15
15
|
* style='border:none;'
|
|
16
16
|
* />
|
|
17
17
|
*
|
|
@@ -15,8 +15,8 @@ import { ScatterChartProps } from '../../../props';
|
|
|
15
15
|
*
|
|
16
16
|
* <iframe
|
|
17
17
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fscatter-chart&mode=docs'
|
|
18
|
-
* width=800
|
|
19
|
-
* height=870
|
|
18
|
+
* width='800'
|
|
19
|
+
* height='870'
|
|
20
20
|
* style='border:none;'
|
|
21
21
|
* />
|
|
22
22
|
*
|
|
@@ -9,8 +9,8 @@ import { ScattermapChartProps } from '../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fmap-scatter&mode=docs'
|
|
12
|
-
* width=1000
|
|
13
|
-
* height=900
|
|
12
|
+
* width='1000'
|
|
13
|
+
* height='900'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
|
@@ -11,8 +11,8 @@ import { SunburstChartProps } from '../../../../props';
|
|
|
11
11
|
*
|
|
12
12
|
* <iframe
|
|
13
13
|
* src='https://csdk-playground.sisense.com/?example=charts%2Fsunburst-chart&mode=docs'
|
|
14
|
-
* width=800
|
|
15
|
-
* height=870
|
|
14
|
+
* width='800'
|
|
15
|
+
* height='870'
|
|
16
16
|
* style='border:none;'
|
|
17
17
|
* />
|
|
18
18
|
*
|
|
@@ -9,8 +9,8 @@ import { TableProps } from '../../../../props';
|
|
|
9
9
|
*
|
|
10
10
|
* <iframe
|
|
11
11
|
* src='https://csdk-playground.sisense.com/?example=tables%2Faggregated-table&mode=docs'
|
|
12
|
-
* width=800
|
|
13
|
-
* height=870
|
|
12
|
+
* width='800'
|
|
13
|
+
* height='870'
|
|
14
14
|
* style='border:none;'
|
|
15
15
|
* />
|
|
16
16
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ import { TreemapChartProps } from '../../../../props';
|
|
|
11
11
|
*
|
|
12
12
|
* <iframe
|
|
13
13
|
* src='https://csdk-playground.sisense.com/?example=charts%2Ftreemap-chart&mode=docs'
|
|
14
|
-
* width=800
|
|
15
|
-
* height=870
|
|
14
|
+
* width='800'
|
|
15
|
+
* height='870'
|
|
16
16
|
* style='border:none;'
|
|
17
17
|
* />
|
|
18
18
|
*
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Attribute, CalculatedMeasureColumn, Column, Measure, MeasureColumn } from '@sisense/sdk-data';
|
|
2
|
+
import type { CategoryStyle, SeriesStyle, StyledColumn, StyledMeasureColumn, ValueStyle } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Name prefixes for trend and forecast measures in query payloads (aligned with NLQ JSON and chart).
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const TREND_PREFIX = "$trend";
|
|
9
|
+
export declare const FORECAST_PREFIX = "$forecast";
|
|
10
|
+
/**
|
|
11
|
+
* Dimension + optional category style for {@link adaptDimensionsForQuery}.
|
|
12
|
+
* Structurally matches NLQ `DimensionTranslationItem`.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export type DimensionQueryAdaptItem = {
|
|
17
|
+
attribute: Attribute;
|
|
18
|
+
style?: CategoryStyle;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Measure + optional value style for {@link adaptMeasuresForQuery}.
|
|
22
|
+
* Structurally matches NLQ `MeasureTranslationItem`.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export type MeasureQueryAdaptItem = {
|
|
27
|
+
measure: Measure;
|
|
28
|
+
style?: ValueStyle & SeriesStyle;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Dimensional {@link Attribute} instances expose JAQL sort APIs; plain {@link Column} does not.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function isDimensionalAttribute(column: Column): column is Attribute;
|
|
36
|
+
/**
|
|
37
|
+
* Narrative / NLQ query measures are dimensional {@link Measure} instances (e.g. from `measureFactory`).
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare function isDimensionalMeasure(column: MeasureColumn | CalculatedMeasureColumn): column is Measure;
|
|
42
|
+
/**
|
|
43
|
+
* Builds a dimension adapt item using `StyledColumn`’s own shape (no `splitColumn` merge).
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function toDimensionQueryAdaptItem(sc: StyledColumn): DimensionQueryAdaptItem;
|
|
48
|
+
/**
|
|
49
|
+
* Builds a measure adapt item using `StyledMeasureColumn`’s own shape (no `splitColumn` merge).
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare function toMeasureQueryAdaptItem(smc: StyledMeasureColumn): MeasureQueryAdaptItem;
|
|
54
|
+
/**
|
|
55
|
+
* Applies sort from styled dimensions to attributes (NLQ JSON → query semantics).
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export declare function adaptDimensionsForQuery(items: DimensionQueryAdaptItem[]): Attribute[];
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare function isTrendMeasure(measure: Measure): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare function isForecastMeasure(measure: Measure): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Options for {@link adaptMeasuresForQuery}.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export type AdaptMeasuresForQueryOptions = {
|
|
74
|
+
/**
|
|
75
|
+
* When `true`, trend and forecast companion measures are not appended (e.g. narrative when the
|
|
76
|
+
* backend does not yet support them).
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
ignoreTrendAndForecast?: boolean;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Applies sort, trend, and forecast companion measures (NLQ JSON → query semantics).
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export declare function adaptMeasuresForQuery(items: MeasureQueryAdaptItem[], options?: AdaptMeasuresForQueryOptions): Measure[];
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartType } from '../../../../types';
|
|
3
|
-
import { CategoricalChartDataOptions, CategoricalChartDataOptionsInternal, ChartDataOptions, ChartDataOptionsInternal, PivotTableDataOptions, PivotTableDataOptionsInternal, TableDataOptions, TableDataOptionsInternal } from './types';
|
|
3
|
+
import { CategoricalChartDataOptions, CategoricalChartDataOptionsInternal, ChartDataOptions, ChartDataOptionsInternal, PivotTableDataOptions, PivotTableDataOptionsInternal, StyledColumn, StyledMeasureColumn, TableDataOptions, TableDataOptionsInternal } from './types';
|
|
4
4
|
export declare function translateChartDataOptions(chartType: ChartType, dataOptions: ChartDataOptions): ChartDataOptionsInternal;
|
|
5
5
|
export declare const translateCategoricalChartDataOptions: (categorical: CategoricalChartDataOptions) => CategoricalChartDataOptionsInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Styled dimension columns used by charts for the same axes as {@link getAttributes}.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function getStyledDimensionColumns(dataOptions: ChartDataOptionsInternal, chartType: ChartType): StyledColumn[];
|
|
12
|
+
/**
|
|
13
|
+
* Styled measure columns used by charts for the same axes as {@link getMeasures}.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function getStyledMeasureColumns(dataOptions: ChartDataOptionsInternal, chartType: ChartType): StyledMeasureColumn[];
|
|
6
18
|
export declare function getAttributes(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Attribute[];
|
|
7
19
|
export declare function getMeasures(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Measure[];
|
|
8
20
|
export declare function translateTableDataOptions(dataOptions: TableDataOptions): TableDataOptionsInternal;
|
|
@@ -652,12 +652,12 @@ export type IndicatorChartDataOptionsInternal = {
|
|
|
652
652
|
/** @internal */
|
|
653
653
|
export interface BoxplotChartDataOptionsInternal {
|
|
654
654
|
category?: StyledColumn;
|
|
655
|
-
boxMin
|
|
656
|
-
boxMedian
|
|
657
|
-
boxMax
|
|
658
|
-
whiskerMin
|
|
659
|
-
whiskerMax
|
|
660
|
-
outliersCount
|
|
655
|
+
boxMin?: StyledMeasureColumn;
|
|
656
|
+
boxMedian?: StyledMeasureColumn;
|
|
657
|
+
boxMax?: StyledMeasureColumn;
|
|
658
|
+
whiskerMin?: StyledMeasureColumn;
|
|
659
|
+
whiskerMax?: StyledMeasureColumn;
|
|
660
|
+
outliersCount?: StyledMeasureColumn;
|
|
661
661
|
outliers?: StyledColumn;
|
|
662
662
|
valueTitle: string;
|
|
663
663
|
}
|
|
@@ -62,6 +62,11 @@ export interface YAxisSettingsResult {
|
|
|
62
62
|
* @returns true if continuous datetime X-axis should be used
|
|
63
63
|
*/
|
|
64
64
|
export declare const isContinuousDatetimeXAxis: (xDataOptions: CartesianChartDataOptionsInternal['x']) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Returns true when every X-axis dimension is a datetime column.
|
|
67
|
+
* Used to decide whether multi-granularity date charts can still show the navigator.
|
|
68
|
+
*/
|
|
69
|
+
export declare const areAllDatetimeXAxes: (xDataOptions: CartesianChartDataOptionsInternal['x']) => boolean;
|
|
65
70
|
/**
|
|
66
71
|
* Builds Y-axis metadata from chart data and options
|
|
67
72
|
*
|
|
@@ -87,7 +92,7 @@ export declare const getXAxisOrientation: (chartType: ChartType, yAxisChartTypes
|
|
|
87
92
|
* @param isContinuous - Whether X-axis is continuous
|
|
88
93
|
* @returns Categories metadata object
|
|
89
94
|
*/
|
|
90
|
-
export declare const buildCategoriesMeta: (chartData: CartesianChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, isContinuous: boolean) => CategoriesMeta;
|
|
95
|
+
export declare const buildCategoriesMeta: (chartData: CartesianChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: ChartDesignOptions, isContinuous: boolean, dateFormatter?: ((date: Date, format: string) => string) | undefined) => CategoriesMeta;
|
|
91
96
|
/**
|
|
92
97
|
* Builds X-axis settings based on whether it's continuous datetime or categorical
|
|
93
98
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const applyNumberFormatToPlotBands: (dataOptions: ChartDataOption
|
|
|
18
18
|
* @param dataOptions -
|
|
19
19
|
* @param designOptions -
|
|
20
20
|
* @param continuousDatetimeXAxis -
|
|
21
|
+
* @param dateFormatter - When set, formats datetime x1/x2 labels from raw values (dual categorical axes)
|
|
21
22
|
*/
|
|
22
|
-
export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: DesignOptions, continuousDatetimeXAxis: boolean) => CategoryIndexMapPlotBands;
|
|
23
|
+
export declare const getCategoriesIndexMapAndPlotBands: (data: ChartData, dataOptions: CartesianChartDataOptionsInternal, designOptions: DesignOptions, continuousDatetimeXAxis: boolean, dateFormatter?: ((date: Date, format: string) => string) | undefined) => CategoryIndexMapPlotBands;
|
|
23
24
|
export {};
|
|
@@ -23,6 +23,14 @@ export interface AxisLabelsFormatterContextObject {
|
|
|
23
23
|
categories: (string | number)[];
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Subset of the Highcharts axis `afterSetExtremes` event payload used for navigator scroll persistence.
|
|
28
|
+
*/
|
|
29
|
+
export type NavigatorAxisSetExtremesEvent = {
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
trigger?: string;
|
|
33
|
+
};
|
|
26
34
|
export type AxisSettings = {
|
|
27
35
|
type?: 'linear' | 'logarithmic';
|
|
28
36
|
title?: {
|
|
@@ -74,6 +82,9 @@ export type AxisSettings = {
|
|
|
74
82
|
description?: string;
|
|
75
83
|
rangeDescription?: string;
|
|
76
84
|
};
|
|
85
|
+
events?: {
|
|
86
|
+
afterSetExtremes?: (e: NavigatorAxisSetExtremesEvent) => void;
|
|
87
|
+
};
|
|
77
88
|
};
|
|
78
89
|
export type StackLabel = {
|
|
79
90
|
style?: TextStyle;
|
|
@@ -118,4 +129,21 @@ export type AxisPlotBand = {
|
|
|
118
129
|
};
|
|
119
130
|
};
|
|
120
131
|
export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
|
|
121
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Merges a navigator scroll callback into the primary X-axis `afterSetExtremes` handler.
|
|
134
|
+
* Preserves any existing `events` and prior `afterSetExtremes` implementation.
|
|
135
|
+
*
|
|
136
|
+
* @param axes - Axis settings (first entry is treated as the primary X-axis).
|
|
137
|
+
* @param onScrollerChange - Invoked only when extremes change due to the navigator scroller.
|
|
138
|
+
* @returns New axis settings array with the merged handler on the first axis.
|
|
139
|
+
*/
|
|
140
|
+
export declare const attachNavigatorScrollerToPrimaryXAxis: (axes: readonly AxisSettings[], onScrollerChange: (min: number, max: number) => void) => AxisSettings[];
|
|
141
|
+
/**
|
|
142
|
+
* Transformer that merges a navigator scroll callback into the primary X-axis `afterSetExtremes` handler.
|
|
143
|
+
* No-ops when no callback is provided.
|
|
144
|
+
*
|
|
145
|
+
* @param onScrollerChange - Optional callback invoked when the navigator scroller changes extremes.
|
|
146
|
+
* @returns Transformer function over an axis settings array.
|
|
147
|
+
*/
|
|
148
|
+
export declare const withScrollerEvent: (onScrollerChange?: ((min: number, max: number) => void) | undefined) => (axes: readonly AxisSettings[]) => AxisSettings[];
|
|
149
|
+
export declare const getDefaultDateFormat: (granularity?: string) => "yyyy" | "MM/yyyy" | "ww yyyy" | "HH:mm" | "HH:mm:ss" | "M/d/yy" | "HH" | "yyyy Q" | "M/d/yy HH" | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { QueryPillItem } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Structured tooltip model produced by {@link getQueryPillTooltipModel}.
|
|
4
|
+
*
|
|
5
|
+
* @sisenseInternal
|
|
6
|
+
*/
|
|
7
|
+
export type TooltipModel = {
|
|
8
|
+
layoutText: string;
|
|
9
|
+
typeLabel: 'Measure' | 'Dimension' | 'Filter';
|
|
10
|
+
/** Resolved field path or display fallback; may duplicate {@link TooltipModel.formula}. */
|
|
11
|
+
column: string;
|
|
12
|
+
formula: string;
|
|
13
|
+
/** When false, the UI omits the "Column:" row (empty/`-` or same as the pill display name). */
|
|
14
|
+
showColumnInTooltip: boolean;
|
|
15
|
+
/** When false, the UI omits the "Formula:" row (identical to Column, e.g. plain DM dimensions). */
|
|
16
|
+
showFormulaInTooltip: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Strips `measureFactory.`, `filterFactory.`, and `DM.` from compose code for tooltip display.
|
|
20
|
+
* Preserves the rest of the string (including quoted literals). Rare titles containing `DM.`
|
|
21
|
+
* inside quotes may be altered.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function simplifyComposeCodeForTooltip(composeCode: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Builds the structured tooltip model rendered by {@link QueryPill} from a {@link QueryPillItem}.
|
|
28
|
+
* Returns `null` when the item has no tooltip-eligible data (e.g. operator pills or pills without `tooltipData`).
|
|
29
|
+
*
|
|
30
|
+
* @sisenseInternal
|
|
31
|
+
*/
|
|
32
|
+
export declare function getQueryPillTooltipModel(item: QueryPillItem): TooltipModel | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { QueryDefinition } from './query-definition';
|
|
2
|
+
export type { QueryDefinitionProps } from './query-definition';
|
|
3
|
+
export { QueryPill } from './query-pill';
|
|
4
|
+
export type { QueryPillProps } from './query-pill';
|
|
5
|
+
export { baseQueryParamsToViewModel } from './query-params-to-view-model';
|
|
6
|
+
export { getQueryPillTooltipModel } from './compose-code-to-readable';
|
|
7
|
+
export type { TooltipModel } from './compose-code-to-readable';
|
|
8
|
+
export type { QueryPillCategory, QueryPillItem, ConnectorItem, QueryDefinitionViewModel, } from './types';
|
|
9
|
+
export { isConnectorItem, isPillItem } from './types';
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FunctionComponent } from 'react';
|
|
2
|
+
import type { BaseQueryParams } from '../../../../domains/query-execution/types';
|
|
3
|
+
import type { ChartProps } from '../../../../props';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the QueryDefinition component.
|
|
6
|
+
*
|
|
7
|
+
* @sisenseInternal
|
|
8
|
+
*/
|
|
9
|
+
export interface QueryDefinitionProps {
|
|
10
|
+
/** Either chart props (uses getTranslatedDataOptions internally) or base query params */
|
|
11
|
+
query: BaseQueryParams | ChartProps;
|
|
12
|
+
/** When true (default), pills show JSON tooltip on hover. */
|
|
13
|
+
showTooltip?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Optional DOM box to clamp tooltips (e.g. chart card). Omit for viewport-only — the component
|
|
16
|
+
* root is only one row tall and must not be used as boundary (breaks vertical placement).
|
|
17
|
+
*/
|
|
18
|
+
tooltipBoundaryElement?: HTMLElement | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Read-only query definition as colored pills above the widget.
|
|
22
|
+
* Order: Measures → Dimensions → Filters; collapsed to 4 pills with “Show N more” / “Show less”.
|
|
23
|
+
*
|
|
24
|
+
* @sisenseInternal
|
|
25
|
+
*/
|
|
26
|
+
export declare const QueryDefinition: FunctionComponent<QueryDefinitionProps>;
|