@sisense/sdk-ui 2.24.0 → 2.25.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 +919 -980
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +856 -1030
- 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-BsBTwL6W.js} +1518 -1446
- package/dist/apply-styled-options-to-query-mFJvsssw.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 +25112 -32394
- package/dist/index.umd.js +708 -685
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +1 -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 +4 -1
- 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/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 +4 -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 +28 -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/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/query-definition/compose-code-to-readable.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +6 -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 +12 -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 +13 -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 +50 -2
- 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 +5 -2
- 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/{modules/ai/api/narration-endpoints.d.ts → infra/api/narrative/narrative-endpoints.d.ts} +8 -7
- package/dist/packages/sdk-ui/src/infra/api/narrative/send-ai-feedback.d.ts +8 -0
- 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/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 +1 -1
- 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 +1 -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/sisense-internal.d.ts +7 -1
- package/dist/packages/sdk-ui/src/types.d.ts +1 -1
- package/dist/parse-compose-code-DfZskSng.js +352 -0
- package/dist/parse-compose-code-v4J9BrUg.cjs +1 -0
- 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-DJtC8_5_.js → types-BBp2sp_s.js} +1 -1
- package/dist/types-GFLaiax5.cjs +1 -0
- package/dist/use-hover-DsnmY-p_.cjs +721 -0
- package/dist/{quota-notification-CeKnEyQG.js → use-hover-mptQLQ4S.js} +27603 -19263
- package/dist/{utils-D8O1_kl3.cjs → utils-BlNqPAG8.cjs} +45 -45
- package/dist/{utils-BCp2ISWh.js → utils-DTUC-wtI.js} +7724 -7512
- package/dist/{widget-composer-BkHZISs7.cjs → widget-composer-CDb2iOoS.cjs} +1 -1
- package/dist/{widget-composer-CDNL9_XF.js → widget-composer-D0BZrLna.js} +3 -3
- package/package.json +11 -10
- package/dist/dimensions-C1R5YRt-.js +0 -204
- package/dist/dimensions-C7yXAoZs.cjs +0 -1
- package/dist/execute-query-0Y9Fn9Pf.cjs +0 -1
- 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/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
|
@@ -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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FunctionCall } from '@sisense/sdk-data';
|
|
2
|
+
import type { QueryPillItem } from './types';
|
|
3
|
+
export type TooltipModel = {
|
|
4
|
+
layoutText: string;
|
|
5
|
+
typeLabel: 'Measure' | 'Dimension' | 'Filter';
|
|
6
|
+
column: string;
|
|
7
|
+
formula: string;
|
|
8
|
+
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare function functionCallToString(functionCall: FunctionCall, ignoreArgs?: string[]): string;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare function getQueryPillTooltipModel(item: QueryPillItem): TooltipModel | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 type { QueryPillCategory, QueryPillItem, ConnectorItem, QueryDefinitionViewModel, } from './types';
|
|
6
|
+
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>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BaseQueryParams } from '../../../../domains/query-execution/types';
|
|
2
|
+
import type { QueryDefinitionViewModel } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the query definition view model from base query params.
|
|
5
|
+
* Order: Measures → "by" → Dimensions → "for"/"where" → Filters.
|
|
6
|
+
* Operators (comparison/sort) are not derived from BaseQueryParams in v1.
|
|
7
|
+
*
|
|
8
|
+
* @param params - BaseQueryParams from chart or query
|
|
9
|
+
* @returns QueryDefinitionViewModel (pills and connectors)
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function baseQueryParamsToViewModel(params: BaseQueryParams): QueryDefinitionViewModel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
+
export interface QueryPillBubbleTooltipProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
/** false = prefer above pill (default); true = prefer below (>3 lines of JSON). */
|
|
8
|
+
preferBelow?: boolean;
|
|
9
|
+
/** Tooltip stays inside this box (e.g. widget / story panel); intersects with viewport. */
|
|
10
|
+
boundaryElement?: HTMLElement | null;
|
|
11
|
+
}
|
|
12
|
+
export declare const QueryPillBubbleTooltip: FunctionComponent<QueryPillBubbleTooltipProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { QueryPillItem } from './types';
|
|
3
|
+
export interface QueryPillProps {
|
|
4
|
+
item: QueryPillItem;
|
|
5
|
+
showTooltip?: boolean;
|
|
6
|
+
tooltipBoundaryElement?: HTMLElement | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Read-only query-definition pill; JSON tooltip is a portal bubble with a real triangle.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const QueryPill: FunctionComponent<QueryPillProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Attribute, Filter, FilterRelations, Measure } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* Category of a query pill for styling (color).
|
|
4
|
+
*
|
|
5
|
+
* @sisenseInternal
|
|
6
|
+
*/
|
|
7
|
+
export type QueryPillCategory = 'measure' | 'dimension' | 'filter' | 'operator';
|
|
8
|
+
/**
|
|
9
|
+
* A single pill item in the query definition (measure, dimension, filter, or operator).
|
|
10
|
+
*
|
|
11
|
+
* @sisenseInternal
|
|
12
|
+
*/
|
|
13
|
+
export interface QueryPillItem {
|
|
14
|
+
type: 'pill';
|
|
15
|
+
/** Display label (friendly name) */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Category for pill color */
|
|
18
|
+
category: QueryPillCategory;
|
|
19
|
+
/** Optional stable id for keys */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Source entity for debug/tooltip JSON (measure, dimension attribute, filter, etc.) */
|
|
22
|
+
tooltipData?: Attribute | Measure | Filter | FilterRelations;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Connector between pill groups (plain text, no pill styling).
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export interface ConnectorItem {
|
|
30
|
+
type: 'connector';
|
|
31
|
+
label: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* View model for the QueryDefinition component: ordered list of pills and connectors.
|
|
35
|
+
* Order: Measures → "by" → Dimensions → "for"/"where" → Filters → Operators.
|
|
36
|
+
*
|
|
37
|
+
* @sisenseInternal
|
|
38
|
+
*/
|
|
39
|
+
export type QueryDefinitionViewModel = (QueryPillItem | ConnectorItem)[];
|
|
40
|
+
/**
|
|
41
|
+
* Type guard for connector items.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare function isConnectorItem(item: QueryPillItem | ConnectorItem): item is ConnectorItem;
|
|
46
|
+
/**
|
|
47
|
+
* Type guard for pill items.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare function isPillItem(item: QueryPillItem | ConnectorItem): item is QueryPillItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { AppSettings } from '../../../../../infra/app/settings/settings.js';
|
|
2
|
+
import type { AreaStyleOptions, AxisLabel, CompleteThemeSettings, DataLimits, IndicatorStyleOptions, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, SeriesLabels, WidgetStyleOptions } from '../../../../../types.js';
|
|
3
|
+
import type { AxisStyle, CartesianWidgetStyle, WidgetDesign, WidgetStyle, WidgetSubtype } from '../types.js';
|
|
3
4
|
/**
|
|
4
5
|
* Maps SDK legend options to Fusion DTO legend style.
|
|
5
6
|
*
|
|
@@ -51,6 +52,53 @@ export declare function toMarkersStyle(markers?: Markers): CartesianWidgetStyle[
|
|
|
51
52
|
* @internal
|
|
52
53
|
*/
|
|
53
54
|
export declare function toDataLimitsStyle(dataLimits?: DataLimits): CartesianWidgetStyle['dataLimits'];
|
|
55
|
+
/**
|
|
56
|
+
* Returns true when {@link WidgetModel.styleOptions} carries any widget container / design
|
|
57
|
+
* field that was produced by {@link getFlattenWidgetDesign} (and should be written back).
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare function hasWidgetContainerStyleFields(styleOptions: WidgetStyleOptions): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Rebuilds Fusion `style.widgetDesign` from flattened container options (inverse of
|
|
64
|
+
* {@link getFlattenWidgetDesign}).
|
|
65
|
+
*
|
|
66
|
+
* Missing fields default to the corresponding values from `themeSettings.widget` so that
|
|
67
|
+
* the resulting {@link WidgetDesign} is always fully populated which is critical for the widget design feature in Fusion.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare function toWidgetDesign(styleOptions: WidgetStyleOptions, widgetTheme: CompleteThemeSettings['widget']): WidgetDesign | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Attaches `style.widgetDesign` built from widget container fields in `styleOptions`.
|
|
74
|
+
* When the feature flag is off, or when `styleOptions` carries no container fields, the
|
|
75
|
+
* base style is returned unchanged.
|
|
76
|
+
*
|
|
77
|
+
* @param baseStyle - The base style to be attached with the widget design
|
|
78
|
+
* @param styleOptions - The style options to be used for the widget design
|
|
79
|
+
* @param themeSettings - The theme settings to be used for the widget design
|
|
80
|
+
* @param appSettings - The application settings to be used for the widget design
|
|
81
|
+
* @returns The widget style with the widget design
|
|
82
|
+
*/
|
|
83
|
+
export declare function withWidgetDesign(baseStyle: WidgetStyle, styleOptions: WidgetStyleOptions, themeSettings: CompleteThemeSettings, appSettings?: AppSettings): WidgetStyle;
|
|
84
|
+
/**
|
|
85
|
+
* Maps SDK pie chart style options to Fusion PieWidgetStyle (DTO).
|
|
86
|
+
* Inverse of {@link extractPieChartStyleOptions}.
|
|
87
|
+
*
|
|
88
|
+
* @param styleOptions - Pie style options from WidgetModel.styleOptions
|
|
89
|
+
* @returns Fusion PieWidgetStyle for the widget DTO
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
export declare function toPieWidgetStyle(styleOptions: PieStyleOptions): WidgetStyle;
|
|
93
|
+
/**
|
|
94
|
+
* Maps SDK indicator style options to Fusion IndicatorWidgetStyle (DTO).
|
|
95
|
+
* Inverse of {@link extractIndicatorChartStyleOptions}.
|
|
96
|
+
*
|
|
97
|
+
* @param styleOptions - Indicator style options from WidgetModel.styleOptions
|
|
98
|
+
* @returns Fusion IndicatorWidgetStyle for the widget DTO
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export declare function toIndicatorWidgetStyle(styleOptions: IndicatorStyleOptions): WidgetStyle;
|
|
54
102
|
/**
|
|
55
103
|
* Maps SDK line chart style options to Fusion CartesianWidgetStyle (DTO).
|
|
56
104
|
* Used when serializing a line chart widget back to WidgetDto.
|
package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/utils.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppSettings } from '../../../../infra/app/settings/settings.js';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if widget design style is enabled.
|
|
4
|
+
* Pure function with default fallback.
|
|
5
|
+
*
|
|
6
|
+
* @param appSettings - Optional application settings
|
|
7
|
+
* @returns True if widget design is enabled
|
|
8
|
+
*/
|
|
9
|
+
export declare const isWidgetDesignEnabled: (appSettings?: AppSettings) => boolean;
|
|
@@ -175,7 +175,10 @@ export declare function fromWidgetProps(widgetProps: WidgetProps): WidgetModel;
|
|
|
175
175
|
*
|
|
176
176
|
* @param widgetModel - The WidgetModel to be converted to a widgetDto
|
|
177
177
|
* @param dataSource - The full datasource details
|
|
178
|
+
* @param themeSettings - The theme settings to be used for the widget design
|
|
179
|
+
* @param appSettings - The application settings to be used for the widget design
|
|
178
180
|
* @returns WidgetDto
|
|
179
|
-
*
|
|
181
|
+
*
|
|
182
|
+
* @sisenseInternal
|
|
180
183
|
*/
|
|
181
|
-
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForDto): WidgetDto;
|
|
184
|
+
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): WidgetDto;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { JaqlQueryPayload } from '@sisense/sdk-query-client';
|
|
2
|
+
export interface GetNlgInsightsRequest {
|
|
3
|
+
/**
|
|
4
|
+
* @privateRemarks
|
|
5
|
+
* JAQL sent with narrative requests. Chart narratives omit pivot-only fields; pivot narratives
|
|
6
|
+
* include full `JaqlQueryPayload` fields (`format`, `grandTotals`, `queryGuid`, etc.).
|
|
7
|
+
* The SDK sets the payload `by` field to `ComposeSDK` when calling the narrative API.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
jaql: Partial<JaqlQueryPayload> & Pick<JaqlQueryPayload, 'datasource' | 'metadata'>;
|
|
11
|
+
verbosity?: 'Low' | 'High';
|
|
12
|
+
}
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type NarrativeRequest = GetNlgInsightsRequest;
|
|
15
|
+
export interface NarrativeResponse {
|
|
16
|
+
data?: {
|
|
17
|
+
answer: string;
|
|
18
|
+
};
|
|
19
|
+
responseType: 'Text';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Payload for `api/v2/ai/feedback`.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export interface SendAiFeedbackRequest {
|
|
27
|
+
type: string;
|
|
28
|
+
data: object;
|
|
29
|
+
sourceId: string;
|
|
30
|
+
rating: -1 | 1;
|
|
31
|
+
}
|
|
32
|
+
export type GetNlgInsightsResponse = NarrativeResponse;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NarrativeRequest, NarrativeResponse } from './narrative-api-types.js';
|
|
3
3
|
/** Unified narrative endpoint. Try first; fall back to legacy on 404. */
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const UNIFIED_NARRATIVE_ENDPOINT = "api/v2/ai/narrative";
|
|
5
5
|
/** Legacy endpoint (used when unified narrative returns 404). */
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const LEGACY_NARRATIVE_ENDPOINT = "api/v2/ai/nlg/queryResult";
|
|
7
7
|
/**
|
|
8
|
-
* Options for
|
|
8
|
+
* Options for getNarrative. All endpoint choice logic lives in this module.
|
|
9
|
+
*
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
11
|
-
export type
|
|
12
|
+
export type GetNarrativeOptions = {
|
|
12
13
|
isUnifiedNarrationEnabled?: boolean;
|
|
13
14
|
isSisenseAiEnabled?: boolean;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
|
-
* Fetches
|
|
17
|
+
* Fetches Narrative. Single place for endpoint logic: isUnifiedNarrationEnabled === false → legacy only;
|
|
17
18
|
* otherwise try unified endpoint first, fall back to legacy on 404.
|
|
18
19
|
*
|
|
19
20
|
* @param httpClient - HttpClient instance
|
|
@@ -22,4 +23,4 @@ export type GetNarrationsOptions = {
|
|
|
22
23
|
* @returns Promise with narration response
|
|
23
24
|
* @internal
|
|
24
25
|
*/
|
|
25
|
-
export declare function
|
|
26
|
+
export declare function getNarrative(httpClient: HttpClient, request: NarrativeRequest, options?: GetNarrativeOptions): Promise<NarrativeResponse>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
+
import type { SendAiFeedbackRequest } from './narrative-api-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Posts AI / chart insight feedback (thumbs).
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function sendAiFeedback(httpClient: HttpClient, request: SendAiFeedbackRequest): Promise<unknown>;
|
package/dist/packages/sdk-ui/src/infra/contexts/emotion-cache-provider/emotion-cache-provider.d.ts
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface EmotionCacheProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* An ancestor CSS selector (e.g. `'#sdk-scope'`) to prepend to every Emotion
|
|
6
|
+
* CSS rule to increase specificity.
|
|
7
|
+
*
|
|
8
|
+
* When omitted (`undefined`), no prefix logic is applied.
|
|
9
|
+
*/
|
|
10
|
+
cssSelectorPrefix?: string;
|
|
4
11
|
}
|
|
5
12
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
13
|
+
* Provides an Emotion cache to the component tree. Handles two concerns:
|
|
14
|
+
*
|
|
15
|
+
* 1. **CSP nonce** — when a `<meta property="csp-nonce">` tag is present, a
|
|
16
|
+
* cache carrying that nonce is created so Emotion's `<style>` tags comply
|
|
17
|
+
* with Content Security Policy.
|
|
18
|
+
*
|
|
19
|
+
* 2. **CSS selector prefix** — when `cssSelectorPrefix` is provided, a Stylis
|
|
20
|
+
* plugin is installed that prepends the selector to every compiled CSS rule,
|
|
21
|
+
* increasing specificity so CSDK styles win over host-app overrides.
|
|
22
|
+
*
|
|
23
|
+
* The component is designed to be used at two levels:
|
|
24
|
+
*
|
|
25
|
+
* - **Top-level** (in `SisenseContextProvider`, no `cssSelectorPrefix` prop) —
|
|
26
|
+
* creates a nonce-only cache if needed and establishes the internal context
|
|
27
|
+
* so nested instances can detect they are not the first provider.
|
|
28
|
+
*
|
|
29
|
+
* - **Nested** (in `ThemeProvider`, with `cssSelectorPrefix` prop) — compares
|
|
30
|
+
* the requested prefix against the ancestor's value via `EmotionCacheContext`.
|
|
31
|
+
* A new cache is created only when the prefix has actually changed; otherwise
|
|
32
|
+
* children are rendered as-is, reusing the ancestor's cache.
|
|
33
|
+
*
|
|
34
|
+
* When a nested provider creates a cache (nonce is always included when present),
|
|
35
|
+
* it also updates `EmotionCacheContext` so that further nested providers can
|
|
36
|
+
* detect the new prefix value and avoid creating duplicate caches.
|
|
9
37
|
*/
|
|
10
38
|
export declare const EmotionCacheProvider: React.FC<EmotionCacheProviderProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Middleware } from 'stylis';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a Stylis plugin that prepends a CSS selector prefix to every rule.
|
|
4
|
+
*
|
|
5
|
+
* Given configured prefix, for example "#sdk-root", a compiled rule like ".css-abc { color: red }"
|
|
6
|
+
* becomes "#sdk-root .css-abc { color: red }", increasing its specificity so
|
|
7
|
+
* that library styles win over same-specificity rules from the host application.
|
|
8
|
+
*
|
|
9
|
+
* Operating at the Stylis (CSS compilation) layer means all CSS is covered —
|
|
10
|
+
* template strings, interpolation functions, object styles, and keyframe
|
|
11
|
+
* declarations — without any changes to the styled-component call sites.
|
|
12
|
+
*
|
|
13
|
+
* @param prefix - An ancestor CSS selector, e.g. `'#sdk-scope'` or `'.my-app'`.
|
|
14
|
+
* Must match an element that wraps all library components in the DOM.
|
|
15
|
+
* @returns A Stylis v4 middleware function compatible with `@emotion/cache`'s
|
|
16
|
+
* `stylisPlugins` option.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createCssSelectorPrefixPlugin(prefix: string): Middleware;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -428,6 +428,15 @@ declare const _default: {
|
|
|
428
428
|
loadingOverlay: {
|
|
429
429
|
label: string;
|
|
430
430
|
};
|
|
431
|
+
queryDefinition: {
|
|
432
|
+
showMorePills: string;
|
|
433
|
+
showLess: string;
|
|
434
|
+
connectorBy: string;
|
|
435
|
+
connectorWhere: string;
|
|
436
|
+
tooltipType: string;
|
|
437
|
+
tooltipColumn: string;
|
|
438
|
+
tooltipFormula: string;
|
|
439
|
+
};
|
|
431
440
|
measures: {
|
|
432
441
|
countShort: string;
|
|
433
442
|
countDistinct: string;
|
|
@@ -425,6 +425,15 @@ export declare const translation: {
|
|
|
425
425
|
loadingOverlay: {
|
|
426
426
|
label: string;
|
|
427
427
|
};
|
|
428
|
+
queryDefinition: {
|
|
429
|
+
showMorePills: string;
|
|
430
|
+
showLess: string;
|
|
431
|
+
connectorBy: string;
|
|
432
|
+
connectorWhere: string;
|
|
433
|
+
tooltipType: string;
|
|
434
|
+
tooltipColumn: string;
|
|
435
|
+
tooltipFormula: string;
|
|
436
|
+
};
|
|
428
437
|
measures: {
|
|
429
438
|
countShort: string;
|
|
430
439
|
countDistinct: string;
|