@sisense/sdk-ui 2.26.0 → 2.27.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 +35 -35
- package/dist/ai.js +792 -800
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +4 -4
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{apply-styled-options-to-query-Bzt2GrgO.js → apply-styled-options-to-query-BzMAmDnD.js} +1029 -1024
- package/dist/apply-styled-options-to-query-k10gkPCG.cjs +1 -0
- package/dist/{dimensions-Ce2zWFrs.js → dimensions-C3WSSE5j.js} +1 -1
- package/dist/{dimensions-u3w5qNF0.cjs → dimensions-huCJK0y6.cjs} +1 -1
- package/dist/index.cjs +406 -406
- package/dist/index.js +17237 -16963
- package/dist/index.umd.js +610 -610
- 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/get-dashboard-models.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +16 -4
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-drilldown.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-hierarchies-loader.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/filters/components/custom-filter-tile.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +11 -4
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +51 -1
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/scattermap/utils/map.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/types.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/sorting-utils.d.ts +4 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/hooks/use-table-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/translate-data-options.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/validate-data-options/validate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/apply-event-handlers.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/series-processor.d.ts +1 -37
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/series-labels.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition-style-constants.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-with-pivot-table-widget-drilldown.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/utils.d.ts +0 -5
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/apply-partial-dto-style.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/extract-unsupported-style-options.d.ts +31 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/index.d.ts +2 -0
- 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 +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +37 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +12 -0
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +13 -7
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +43 -4
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +2 -0
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +0 -1
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +16 -11
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-from-json.d.ts +5 -5
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-jaql.d.ts +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-json.d.ts +5 -5
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +4 -4
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +5 -0
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +12 -1
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +22 -20
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/components/menu/context-menu/menu.d.ts +1 -1
- package/dist/packages/sdk-ui/src/types.d.ts +3 -3
- package/dist/{types-COBvZZm_.cjs → types-Cq47e5cy.cjs} +1 -1
- package/dist/{types-D6jCGncV.js → types-CzqDZ83C.js} +1 -1
- package/dist/{use-hover-B1HPf4hF.js → use-hover-CkmV6eu9.js} +9682 -9604
- package/dist/{use-hover-CaQrW_gv.cjs → use-hover-D_mBUhp9.cjs} +111 -111
- package/dist/{utils-CAubp1g1.cjs → utils-DM5vp1gw.cjs} +23 -23
- package/dist/{utils-BQtueE3Z.js → utils-Db3U6oHa.js} +2409 -2438
- package/dist/{widget-composer-BAJFWk3t.js → widget-composer-BiGVKN49.js} +108 -108
- package/dist/{widget-composer-C75b-E6W.cjs → widget-composer-CZ0_bPXK.cjs} +7 -7
- package/package.json +9 -8
- package/dist/apply-styled-options-to-query-COD9fRYD.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/drilldown/hooks/use-synced-drilldown-paths-manager.d.ts +0 -113
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WidgetDto, WidgetStyle } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Loose record of unsupported style fields preserved from the original
|
|
4
|
+
* Fusion DTO. Returned by {@link extractUnsupportedStyleOptions}.
|
|
5
|
+
*
|
|
6
|
+
* Typed as `Record<string, unknown>` because the keys and shapes go beyond
|
|
7
|
+
* what `WidgetStyle` declares — e.g. `'center/value'` on sunburst, or
|
|
8
|
+
* `'borders/grid'` on table widgets. Stored on
|
|
9
|
+
* `SpecificWidgetOptions.partialDtoOptions.style` and re-attached when
|
|
10
|
+
* serializing back to a DTO via `applyPartialDtoStyle` so values survive
|
|
11
|
+
* Fusion → CSDK → Fusion round-trips.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export type UnsupportedStyleOptions = Record<string, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Extracts the style fields that the CSDK widget model does not currently
|
|
18
|
+
* translate to first-class `WidgetStyleOptions` for the given widget type.
|
|
19
|
+
*
|
|
20
|
+
* The result is stored on `SpecificWidgetOptions.partialDtoOptions.style` and
|
|
21
|
+
* re-attached during CSDK → Fusion serialization (see `applyPartialDtoStyle`).
|
|
22
|
+
* Returns an empty object for widget types that have no known unsupported
|
|
23
|
+
* style fields, or for unknown / plugin types whose raw style is opaque to
|
|
24
|
+
* the CSDK.
|
|
25
|
+
*
|
|
26
|
+
* @param widgetType - Fusion widget type from `WidgetDto.type`
|
|
27
|
+
* @param style - Raw `WidgetDto.style` from the server
|
|
28
|
+
* @returns A partial style containing only known-unsupported fields
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function extractUnsupportedStyleOptions(widgetType: WidgetDto['type'], style: WidgetStyle | undefined): UnsupportedStyleOptions;
|
|
@@ -32,7 +32,7 @@ export type CsdkPluginWidgetType = 'tabber-buttons';
|
|
|
32
32
|
/**
|
|
33
33
|
* The type of a widget on a dashboard.
|
|
34
34
|
*/
|
|
35
|
-
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | FusionPluginWidgetType |
|
|
35
|
+
export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | 'heatmap' | TextWidgetType | FusionPluginWidgetType | string;
|
|
36
36
|
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter' | 'areamap/world' | 'areamap/usa' | 'richtexteditor';
|
|
37
37
|
export declare enum WidgetDashboardFilterMode {
|
|
38
38
|
FILTER = "filter",
|
|
@@ -27,7 +27,7 @@ export declare function isMeasurePanelItem(item: PanelItem): boolean;
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function getChartType(fusionWidgetType: FusionWidgetType): ChartType | undefined;
|
|
29
29
|
export declare function getFusionWidgetTypeFromChartType(chartType: ChartType): FusionWidgetType;
|
|
30
|
-
export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType): FusionWidgetType;
|
|
30
|
+
export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType, customWidgetType?: string): FusionWidgetType;
|
|
31
31
|
export declare function getWidgetType(fusionWidgetType: FusionWidgetType): WidgetType;
|
|
32
32
|
export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
|
|
33
33
|
export declare function isSupportedWidgetType(fusionWidgetType: string): fusionWidgetType is FusionWidgetType;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AreamapChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, IndicatorChartDataOptions, PivotTableDataOptions, ScatterChartDataOptions, ScattermapChartDataOptions, TableDataOptionsInternal } from '../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
2
2
|
import { Panel } from '../../../../domains/widgets/components/widget-by-id/types.js';
|
|
3
|
+
import type { GenericDataOptions } from '../../../../types.js';
|
|
3
4
|
import { ScattermapStyleOptions } from '../../../../types.js';
|
|
4
5
|
/**
|
|
5
6
|
* Builds DTO panels for a line chart widget. The category panel is named `x-axis`,
|
|
@@ -168,3 +169,15 @@ export declare function toScattermapPanels(dataOptions: ScattermapChartDataOptio
|
|
|
168
169
|
* @internal
|
|
169
170
|
*/
|
|
170
171
|
export declare function toAreamapPanels(dataOptions: AreamapChartDataOptions): Panel[];
|
|
172
|
+
/**
|
|
173
|
+
* Builds DTO panels for a plugin / custom widget. Each key in {@link GenericDataOptions}
|
|
174
|
+
* becomes one panel; every Column is normalised then converted to a JAQL panel item via
|
|
175
|
+
* the same helper chart widgets use, so the DTO round-trips through `fromWidgetDto`
|
|
176
|
+
* without further translation. The `filters` key is reserved by the DTO schema and
|
|
177
|
+
* emitted separately from `widgetModel.filters`, so it is skipped here.
|
|
178
|
+
*
|
|
179
|
+
* @param dataOptions - Generic data options keyed by the plugin's input names
|
|
180
|
+
* @returns One Fusion panel per declared input
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export declare function toCustomWidgetPanels(dataOptions: GenericDataOptions | undefined): Panel[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JaqlDataSourceForDto } from '@sisense/sdk-data';
|
|
2
|
+
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../../../domains/dashboarding/hooks/jtd/jtd-types.js';
|
|
2
3
|
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
3
4
|
import { ChartWidgetProps } from '../../../../domains/widgets/components/chart-widget/types';
|
|
4
5
|
import { CommonWidgetProps } from '../../../../domains/widgets/components/common-widget/types';
|
|
@@ -130,6 +131,26 @@ export declare function toCommonWidgetProps(widgetModel: WidgetModel): CommonWid
|
|
|
130
131
|
* ```
|
|
131
132
|
*/
|
|
132
133
|
export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
|
|
134
|
+
/**
|
|
135
|
+
* Returns Jump to Dashboard configuration for a {@link WidgetModel} that was built from
|
|
136
|
+
* Fusion via {@link fromWidgetDto}.
|
|
137
|
+
*
|
|
138
|
+
* @param widgetModel - The {@link WidgetModel} built from Fusion via {@link fromWidgetDto};
|
|
139
|
+
*
|
|
140
|
+
* @returns `JumpToDashboardConfig`, `JumpToDashboardConfigForPivot`, or `null` when the model is not
|
|
141
|
+
* Fusion-sourced, or the widget has no versioned JTD.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* const widgetProps = widgetModelTranslator.toWidgetProps(widgetModel);
|
|
146
|
+
* const jtdConfig = widgetModelTranslator.toJtdConfig(widgetModel);
|
|
147
|
+
* // When jtdConfig is non-null, pass widgetProps and jtdConfig to useJtdWidget; otherwise render the widget with widgetProps alone.
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @sisenseInternal
|
|
151
|
+
* @alpha
|
|
152
|
+
*/
|
|
153
|
+
export declare function toJtdConfig(widgetModel: WidgetModel): JumpToDashboardConfig | JumpToDashboardConfigForPivot | null;
|
|
133
154
|
/**
|
|
134
155
|
* Creates a {@link WidgetModel} from a widget DTO.
|
|
135
156
|
*
|
|
@@ -156,6 +177,22 @@ export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps)
|
|
|
156
177
|
* @internal
|
|
157
178
|
*/
|
|
158
179
|
export declare function fromPivotTableWidgetProps(pivotTableWidgetProps: PivotTableWidgetProps): WidgetModel;
|
|
180
|
+
/**
|
|
181
|
+
* Creates a {@link WidgetModel} from a {@link TextWidgetProps}.
|
|
182
|
+
*
|
|
183
|
+
* @param textWidgetProps - The TextWidgetProps to be converted to a widget model
|
|
184
|
+
* @returns WidgetModel
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
export declare function fromTextWidgetProps(textWidgetProps: TextWidgetProps): WidgetModel;
|
|
188
|
+
/**
|
|
189
|
+
* Creates a {@link WidgetModel} from a {@link CustomWidgetProps}.
|
|
190
|
+
*
|
|
191
|
+
* @param customWidgetProps - The CustomWidgetProps to be converted to a widget model
|
|
192
|
+
* @returns WidgetModel
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
|
+
export declare function fromCustomWidgetProps(customWidgetProps: CustomWidgetProps): WidgetModel;
|
|
159
196
|
/**
|
|
160
197
|
* Creates a {@link WidgetModel} from a {@link WidgetProps}.
|
|
161
198
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { EmptyObject } from '@sisense/sdk-query-client/src/helpers/utility-types';
|
|
3
|
+
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
3
4
|
import { ChartDataOptions, PivotTableDataOptions } from '../../../domains/visualizations/core/chart-data-options/types';
|
|
4
5
|
import { ChartType, DrilldownOptions, PivotTableDrilldownOptions, WidgetStyleOptions } from '../../../types';
|
|
5
6
|
import type { WidgetType } from '../components/widget/types';
|
|
@@ -70,5 +71,16 @@ export interface WidgetModel {
|
|
|
70
71
|
* Widget drilldown options.
|
|
71
72
|
*/
|
|
72
73
|
drilldownOptions: DrilldownOptions | PivotTableDrilldownOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Jump to Dashboard configuration for this widget, when the model was built from a Fusion
|
|
76
|
+
* `WidgetDto` via `fromWidgetDto`. Populated with the same translation as dashboard
|
|
77
|
+
* `fromDashboardDto` uses for `widgetsOptions` (via `translateWidgetsOptions` →
|
|
78
|
+
* `jumpToDashboardConfigFromWidgetDto`). Omitted or `undefined` when the model is not
|
|
79
|
+
* Fusion-sourced (e.g. from widget props) or the widget has no versioned JTD.
|
|
80
|
+
*
|
|
81
|
+
* @see {@link widgetModelTranslator.toJtdConfig}
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
jtdConfig?: JumpToDashboardConfig | JumpToDashboardConfigForPivot;
|
|
73
85
|
}
|
|
74
86
|
export declare const isWidgetModel: (widget: any) => widget is WidgetModel;
|
|
@@ -10,17 +10,23 @@ export declare const LEGACY_NARRATIVE_ENDPOINT = "api/v2/ai/nlg/queryResult";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export type GetNarrativeOptions = {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
canGenerateNarrativeViaAI?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When provided and the primary request returns a 400, the request is retried once with this
|
|
16
|
+
* fallback payload. Intended for trend/forecast stripping when the backend cannot handle them.
|
|
17
|
+
*/
|
|
18
|
+
fallbackRequestOn400?: NarrativeRequest;
|
|
15
19
|
};
|
|
16
20
|
/**
|
|
17
|
-
* Fetches Narrative. Single place for endpoint logic:
|
|
18
|
-
*
|
|
21
|
+
* Fetches Narrative. Single place for endpoint logic: when `canGenerateNarrativeViaAI` is truthy,
|
|
22
|
+
* try the unified endpoint first and fall back to legacy on 404; otherwise hit legacy directly.
|
|
23
|
+
* When `fallbackRequestOn400` is provided and the primary request returns a 400, the request is
|
|
24
|
+
* retried once with the fallback payload.
|
|
19
25
|
*
|
|
20
26
|
* @param httpClient - HttpClient instance
|
|
21
27
|
* @param request - Narration request payload
|
|
22
|
-
* @param options - Optional; `
|
|
23
|
-
* @returns Promise with narration
|
|
28
|
+
* @param options - Optional; `canGenerateNarrativeViaAI` (typically from `app.settings.narrative`)
|
|
29
|
+
* @returns Promise that resolves with narration JSON or `undefined` (same semantics as `HttpClient.post`)
|
|
24
30
|
* @internal
|
|
25
31
|
*/
|
|
26
|
-
export declare function getNarrative(httpClient: HttpClient, request: NarrativeRequest, options?: GetNarrativeOptions): Promise<NarrativeResponse>;
|
|
32
|
+
export declare function getNarrative(httpClient: HttpClient, request: NarrativeRequest, options?: GetNarrativeOptions): Promise<NarrativeResponse | undefined>;
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import { AppConfig, ThemeSettings } from '../../../types';
|
|
3
|
+
import { LegacyDesignSettings } from '../../themes/legacy-design-settings.js';
|
|
3
4
|
import { FeatureMap } from './types/features.js';
|
|
5
|
+
/**
|
|
6
|
+
* AI-related slice derived from globals (`serverFeatures` + deployment props),
|
|
7
|
+
* aligned with admin UI paths such as `ai.featureFlags.*`, `ai.featureModelType`,
|
|
8
|
+
* `ai.quotaNotification`, and `ai.aiStudio.*`.
|
|
9
|
+
*/
|
|
10
|
+
type AiSettingsSlice = {
|
|
11
|
+
featureFlags: {
|
|
12
|
+
completionV2: boolean;
|
|
13
|
+
naturalResponseEnabled: boolean;
|
|
14
|
+
nlqV3Enabled: boolean;
|
|
15
|
+
queryDefinition: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Only when `serverFeatures.aiAssistant` exists.
|
|
19
|
+
* If the block is present but omits this field, defaults to `customer_byok`.
|
|
20
|
+
* When the AI Assistant feature is absent from globals, this stays unset (`undefined`).
|
|
21
|
+
*/
|
|
22
|
+
featureModelType?: string;
|
|
23
|
+
quotaNotification: boolean;
|
|
24
|
+
aiStudio: {
|
|
25
|
+
realtime: boolean;
|
|
26
|
+
usageDisplay: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
4
29
|
/**
|
|
5
30
|
* Application settings
|
|
6
31
|
*
|
|
@@ -64,13 +89,12 @@ type ServerSettings = {
|
|
|
64
89
|
serverLanguage: string;
|
|
65
90
|
serverVersion: string;
|
|
66
91
|
serverFeatures: FeatureMap;
|
|
92
|
+
ai: AiSettingsSlice;
|
|
67
93
|
narrative: {
|
|
68
94
|
/** From `api/v2/settings/ai` narration.enabled */
|
|
69
95
|
isEnabled: boolean;
|
|
70
|
-
/**
|
|
71
|
-
|
|
72
|
-
/** Computed: unlimited (API sisenseAIEnabled or props) or credit-based narratives */
|
|
73
|
-
isSisenseAiEnabled: boolean;
|
|
96
|
+
/** Computed from `narrationUnified` and the unlimited or credit-based narrative entitlements. */
|
|
97
|
+
canGenerateNarrativeViaAI: boolean;
|
|
74
98
|
};
|
|
75
99
|
user: {
|
|
76
100
|
tenant: {
|
|
@@ -82,6 +106,21 @@ type ServerSettings = {
|
|
|
82
106
|
* @internal
|
|
83
107
|
*/
|
|
84
108
|
permissions: RoleManifest;
|
|
109
|
+
/** From `api/globals` `user.firstName` — for embedded UIs (e.g. assistant greeting). */
|
|
110
|
+
firstName?: string;
|
|
111
|
+
/** From `api/globals` `user.lastName`. */
|
|
112
|
+
lastName?: string;
|
|
113
|
+
/** From `api/globals` `user.email`. */
|
|
114
|
+
email?: string;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Raw Fusion `designSettings` from `api/globals` (before palette / theme conversion).
|
|
118
|
+
* Use for CSS variable derivation that mirrors the main Fusion app; see also {@link ServerSettings.serverThemeSettings}.
|
|
119
|
+
*/
|
|
120
|
+
fusionDesignSettings: LegacyDesignSettings;
|
|
121
|
+
/** Subset of `globals.brand` needed by embedded chrome (e.g. documentation link). */
|
|
122
|
+
fusionBrand: {
|
|
123
|
+
documentationUrl: string | null;
|
|
85
124
|
};
|
|
86
125
|
};
|
|
87
126
|
/**
|
|
@@ -125,6 +125,8 @@ type AiAssistantFeature = Feature<'aiAssistant', {
|
|
|
125
125
|
nlqV3Enabled?: boolean;
|
|
126
126
|
isNlqV3Enabled?: boolean;
|
|
127
127
|
naturalResponseEnabled?: boolean;
|
|
128
|
+
queryDefinition?: boolean;
|
|
129
|
+
completionV2?: boolean;
|
|
128
130
|
sharedFormulasEnabled?: boolean;
|
|
129
131
|
aiAccessControl?: string;
|
|
130
132
|
quotaNotification?: boolean;
|
|
@@ -137,7 +137,6 @@ export type AppConfig = {
|
|
|
137
137
|
* Widgets that are configured using an older version of Jump To Dashboard, or via scripts, are not supported.
|
|
138
138
|
*
|
|
139
139
|
* Known limitations:
|
|
140
|
-
* - Jump To Dashboard is not currently supported for Pivot widgets.
|
|
141
140
|
* - Target dashboards are always opened in a popup window, options to open in new tab and new window are not supported.
|
|
142
141
|
* - Show 'Header' and 'Dashboards panel' options are not supported (only relevant to Fusion).
|
|
143
142
|
* - 'Reset filters after JTD' is not supported, since changes are never saved to the target dashboard using Compose SDK.
|
|
@@ -8,7 +8,7 @@ import type { BasePluginInfo } from '../types';
|
|
|
8
8
|
*
|
|
9
9
|
* @sisenseInternal
|
|
10
10
|
*/
|
|
11
|
-
export interface WidgetPlugin<Props
|
|
11
|
+
export interface WidgetPlugin<Props extends CustomVisualizationProps = CustomVisualizationProps> extends BasePluginInfo {
|
|
12
12
|
/**
|
|
13
13
|
* The type of plugin
|
|
14
14
|
*/
|
|
@@ -56,8 +56,17 @@ export interface WidgetPlugin<Props = CustomVisualizationProps, StyleOptions = C
|
|
|
56
56
|
* Definition of the design panel for the custom widget
|
|
57
57
|
*/
|
|
58
58
|
designPanel?: {
|
|
59
|
-
Component?: DesignPanel<
|
|
59
|
+
Component?: DesignPanel<NonNullable<Props['styleOptions']>>;
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* The icon of the custom widget to be displayed in the widget selector
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* const MyWidgetIcon = () => <PieChartIcon />;
|
|
66
|
+
* ```
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
icon?: () => ReactNode;
|
|
61
70
|
/**
|
|
62
71
|
* Definition of the data panel for the custom widget
|
|
63
72
|
*/
|
|
@@ -118,16 +127,12 @@ export interface WidgetPlugin<Props = CustomVisualizationProps, StyleOptions = C
|
|
|
118
127
|
* Whether the items can be formatted
|
|
119
128
|
*/
|
|
120
129
|
canFormat?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the items can be colored
|
|
132
|
+
*/
|
|
133
|
+
canColor?: boolean;
|
|
121
134
|
}[];
|
|
122
135
|
};
|
|
123
|
-
/**
|
|
124
|
-
* The icon of the custom widget to be displayed in the widget selector
|
|
125
|
-
* @example
|
|
126
|
-
* ```tsx
|
|
127
|
-
* const MyWidgetIcon = () => <PieChartIcon />;
|
|
128
|
-
* ```
|
|
129
|
-
*/
|
|
130
|
-
icon?: () => ReactNode;
|
|
131
136
|
};
|
|
132
137
|
};
|
|
133
138
|
}
|
|
@@ -139,7 +144,7 @@ export interface WidgetPlugin<Props = CustomVisualizationProps, StyleOptions = C
|
|
|
139
144
|
*
|
|
140
145
|
* @sisenseInternal
|
|
141
146
|
*/
|
|
142
|
-
export type AnyWidgetPlugin = WidgetPlugin<any
|
|
147
|
+
export type AnyWidgetPlugin = WidgetPlugin<any>;
|
|
143
148
|
/**
|
|
144
149
|
* Props passed to a user-defined custom visualization component.
|
|
145
150
|
*
|
|
@@ -4,7 +4,7 @@ export type { TranslationDictionary };
|
|
|
4
4
|
* A reference to the namespace of the translation resources.
|
|
5
5
|
* This namespace is used to access the translation resources in the i18next instance.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @alpha
|
|
8
8
|
*/
|
|
9
9
|
export declare const PACKAGE_NAMESPACE: "sdkUi";
|
|
10
10
|
export declare const resources: {
|
|
@@ -19,7 +19,7 @@ export declare class ChatRestApi {
|
|
|
19
19
|
private deleteChatHistory;
|
|
20
20
|
private sendFeedback;
|
|
21
21
|
ai: {
|
|
22
|
-
getNlgInsights: (request: GetNlgInsightsRequest, options?: GetNarrativeOptions) => Promise<import("../../../infra/api/narrative/narrative-api-types").NarrativeResponse>;
|
|
22
|
+
getNlgInsights: (request: GetNlgInsightsRequest, options?: GetNarrativeOptions) => Promise<import("../../../infra/api/narrative/narrative-api-types").NarrativeResponse | undefined>;
|
|
23
23
|
getNlqResult: (contextTitle: string, request: GetNlqResultRequest) => Promise<NlqResult | undefined>;
|
|
24
24
|
getQueryRecommendations: (contextTitle: string, config: QueryRecommendationConfig) => Promise<QueryRecommendationResponse | undefined>;
|
|
25
25
|
setLlmConfig: (config: LlmConfig) => Promise<unknown>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
2
|
import { NlqTranslationResult } from '../../types.js';
|
|
3
3
|
import { QueryInput } from '../../types.js';
|
|
4
4
|
/**
|
|
5
|
-
* Translates NLQ JSON format to CSDK
|
|
5
|
+
* Translates NLQ JSON format to CSDK ExecuteQueryParams object.
|
|
6
6
|
* Direction: JSON → CSDK
|
|
7
7
|
*
|
|
8
|
-
* Translate Query JSON generated by the new NLQ API to
|
|
8
|
+
* Translate Query JSON generated by the new NLQ API to ExecuteQueryParams object.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* {
|
|
@@ -219,7 +219,7 @@ import { QueryInput } from '../../types.js';
|
|
|
219
219
|
],
|
|
220
220
|
}}
|
|
221
221
|
* @param input - QueryInput object
|
|
222
|
-
* @returns NlqTranslationResult<
|
|
222
|
+
* @returns NlqTranslationResult<ExecuteQueryParams>
|
|
223
223
|
* @internal
|
|
224
224
|
*/
|
|
225
|
-
export declare const translateQueryFromJSON: (input: QueryInput) => NlqTranslationResult<
|
|
225
|
+
export declare const translateQueryFromJSON: (input: QueryInput) => NlqTranslationResult<ExecuteQueryParams>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { type DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import type { JaqlQueryPayload } from '@sisense/sdk-query-client';
|
|
3
|
-
import {
|
|
3
|
+
import type { ExecuteQueryParams } from '../../../../domains/query-execution/types.js';
|
|
4
4
|
/**
|
|
5
|
-
* Converts
|
|
5
|
+
* Converts ExecuteQueryParams to JAQL payload
|
|
6
6
|
*
|
|
7
7
|
* This is a pure TypeScript function that works in Node.js environments
|
|
8
8
|
* and converts query parameters to JAQL without requiring React hooks or browser APIs.
|
|
9
9
|
*
|
|
10
10
|
* Reuses the existing query preparation logic from executeQuery to avoid duplication.
|
|
11
11
|
*
|
|
12
|
-
* @param queryParams -
|
|
12
|
+
* @param queryParams - Query parameters (execution-only fields are not reflected in JAQL beyond prepareQueryParams)
|
|
13
13
|
* @param defaultDataSource - Default data source if not specified in queryParams
|
|
14
14
|
* @param shouldSkipHighlightsWithoutAttributes - Whether to skip highlights without corresponding attributes
|
|
15
15
|
* @returns The JAQL query payload
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
export declare function translateQueryToJaql(queryParams:
|
|
18
|
+
export declare function translateQueryToJaql(queryParams: ExecuteQueryParams, defaultDataSource?: DataSource, shouldSkipHighlightsWithoutAttributes?: boolean): JaqlQueryPayload;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
2
|
import { NlqResponseJSON, NlqTranslationResult } from '../../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Translates CSDK
|
|
4
|
+
* Translates CSDK ExecuteQueryParams to NLQ JSON format.
|
|
5
5
|
* Direction: CSDK → JSON
|
|
6
6
|
*
|
|
7
7
|
* Converts CSDK objects (Attribute[], Measure[], Filter[], FilterRelations) to NLQ FunctionCall format.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```typescript
|
|
11
|
-
* const query:
|
|
11
|
+
* const query: ExecuteQueryParams = {
|
|
12
12
|
* dimensions: [DM.Category.Category, DM.Brand.Brand],
|
|
13
13
|
* measures: [
|
|
14
14
|
* measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
@@ -49,8 +49,8 @@ import { NlqResponseJSON, NlqTranslationResult } from '../../types.js';
|
|
|
49
49
|
* });
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
|
-
* @param query -
|
|
52
|
+
* @param query - ExecuteQueryParams object with CSDK objects
|
|
53
53
|
* @returns NlqTranslationResult<NlqResponseJSON> with FunctionCall format or structured errors
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
56
|
-
export declare function translateQueryToJSON(query:
|
|
56
|
+
export declare function translateQueryToJSON(query: ExecuteQueryParams): NlqTranslationResult<NlqResponseJSON>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Arg, type ArgValue, Attribute, Filter, FilterRelations, type FunctionCall, JaqlDataSourceForDto, JSONArray, Measure, PivotGrandTotals } from '@sisense/sdk-data';
|
|
2
|
-
import { CategoryStyle, SeriesStyle, ValueStyle } from '../../../
|
|
2
|
+
import { CategoryStyle, SeriesStyle, ValueStyle } from '../../../domains/visualizations/core/chart-data-options/types.js';
|
|
3
3
|
import type { PivotTableStyleOptions } from '../../../types.js';
|
|
4
4
|
import { DataSchemaContext, NlqTranslationInput } from '../types.js';
|
|
5
5
|
import type { SchemaIndex } from './shared/utils/schema-index.js';
|
|
@@ -138,7 +138,7 @@ export interface SisenseContextProviderProps {
|
|
|
138
138
|
*/
|
|
139
139
|
ssoMaxAuthRedirectAttempts?: number;
|
|
140
140
|
/**
|
|
141
|
-
* Milliseconds after the latest redirect timestamp before the counter resets. Use `0` to disable expiry (counter only resets on successful auth). Default is `
|
|
141
|
+
* Milliseconds after the latest redirect timestamp before the counter resets. Use `0` to disable expiry (counter only resets on successful auth). Default is `10000` (10 seconds).
|
|
142
142
|
*
|
|
143
143
|
* @category Sisense Authentication
|
|
144
144
|
* @alpha
|
|
@@ -249,7 +249,7 @@ highchartsOptions: HighchartsOptions) => HighchartsOptions;
|
|
|
249
249
|
*
|
|
250
250
|
* @param renderOptions - The render options to check
|
|
251
251
|
* @returns whether the render options are of type HighchartsOptions
|
|
252
|
-
* @
|
|
252
|
+
* @alpha
|
|
253
253
|
*/
|
|
254
254
|
export declare const isHighchartsOptions: (renderOptions: any) => renderOptions is HighchartsOptions;
|
|
255
255
|
/**
|
|
@@ -257,7 +257,7 @@ export declare const isHighchartsOptions: (renderOptions: any) => renderOptions
|
|
|
257
257
|
*
|
|
258
258
|
* @param renderOptions - The render options to check
|
|
259
259
|
* @returns whether the render options are of type IndicatorRenderOptions
|
|
260
|
-
* @
|
|
260
|
+
* @alpha
|
|
261
261
|
*/
|
|
262
262
|
export declare const isIndicatorRenderOptions: (renderOptions: any) => renderOptions is IndicatorRenderOptions;
|
|
263
263
|
/**
|
|
@@ -522,7 +522,7 @@ interface IndicatorChartEventProps extends BaseChartEventProps {
|
|
|
522
522
|
* Event props for CalendarHeatmap chart which uses CalendarHeatmapDataPoint type
|
|
523
523
|
* to describe data points for events.
|
|
524
524
|
*
|
|
525
|
-
* @
|
|
525
|
+
* @alpha
|
|
526
526
|
*/
|
|
527
527
|
export interface CalendarHeatmapChartEventProps extends BaseChartEventProps, HighchartsBasedChartEventProps {
|
|
528
528
|
/**
|
|
@@ -5,3 +5,8 @@
|
|
|
5
5
|
* Not recommended for production use.
|
|
6
6
|
*/
|
|
7
7
|
export { useDashboardTheme } from '../domains/dashboarding/use-dashboard-theme.js';
|
|
8
|
+
export type { ThemeConfig } from '../types';
|
|
9
|
+
export { type TranslationDictionary, PACKAGE_NAMESPACE as translationNamespace, } from '../infra/translation/resources';
|
|
10
|
+
export { CascadingFilterTile, type CascadingFilterTileProps, } from '../domains/filters/components/cascading-filter-tile';
|
|
11
|
+
export { CustomFilterTile, type CustomFilterTileProps, } from '../domains/filters/components/custom-filter-tile';
|
|
12
|
+
export { isIndicatorRenderOptions, isHighchartsOptions, type HighchartsOptions, type CalendarHeatmapChartEventProps, } from '../props';
|
|
@@ -14,13 +14,22 @@ export { getWidgetModel } from '../domains/widgets/widget-model';
|
|
|
14
14
|
export { getHierarchyModels } from '../domains/drilldown/hierarchy-model';
|
|
15
15
|
export { getThemeSettingsByOid } from '../infra/themes/theme-loader';
|
|
16
16
|
export { getDefaultThemeSettings } from '../infra/contexts/theme-provider/default-theme-settings';
|
|
17
|
+
export { type CompleteThemeSettings } from '../types';
|
|
17
18
|
export { updateDrilldownSelections } from '../domains/drilldown/hooks/use-drilldown-core';
|
|
18
19
|
export { getSelectionTitleMenuItem, getDrilldownMenuItems, } from '../domains/drilldown/hooks/use-drilldown';
|
|
19
20
|
export { processDrilldownSelections } from '../domains/drilldown/hooks/use-drilldown-core';
|
|
20
21
|
export { CommonWidget, type CommonWidgetProps } from '../domains/widgets/components/common-widget';
|
|
22
|
+
export { type TextWidgetDataPointEventHandler } from '../props';
|
|
23
|
+
export { TabberButtonsWidget } from '../domains/widgets/components/tabber-buttons-widget';
|
|
24
|
+
export type { TextWidgetDataPoint } from '../types';
|
|
25
|
+
export { widgetHelpers } from '../domains/widgets/helpers';
|
|
21
26
|
export { CustomWidgetsProviderAdapter, type CustomWidgetsContextAdapter, type CustomWidgetsProviderAdapterProps, } from '../infra/contexts/custom-widgets-provider/custom-widgets-provider-adapter';
|
|
27
|
+
export type { CustomContextProviderProps } from '../types';
|
|
28
|
+
export { type CustomSisenseContext, type CustomSisenseContextProviderProps, CustomSisenseContextProvider, } from '../infra/contexts/sisense-context/custom-sisense-context-provider';
|
|
29
|
+
export { type CustomThemeProviderProps, CustomThemeProvider, } from '../infra/contexts/theme-provider/custom-theme-provider';
|
|
22
30
|
export { CustomPluginContextProvider } from '../infra/plugins/custom-plugin-context-provider.js';
|
|
23
31
|
export type { CustomPluginContextProviderProps, CustomPluginContextProviderContext, } from '../infra/plugins/custom-plugin-context-provider.js';
|
|
32
|
+
export { DateFilter, type DateRangeFilterProps, type DateFilterRange, } from '../domains/filters/components/date-filter/date-filter/date-filter';
|
|
24
33
|
export { useGetSharedFormulaInternal } from '../domains/formulas/use-get-shared-formula';
|
|
25
34
|
export { useGetDataSourceDimensionsInternal } from '../domains/data-browser/data-source-dimensional-model';
|
|
26
35
|
export { translateColumnToAttribute } from '../domains/visualizations/core/chart-data-options/utils';
|
|
@@ -31,4 +40,6 @@ export type { SoftUnion } from '../shared/utils/utility-types';
|
|
|
31
40
|
export type { BeforeMenuOpenHandler } from '../infra/contexts/menu-provider/types';
|
|
32
41
|
export { type DataState, type DataLoadingState, type DataErrorState, type DataSuccessState, dataLoadStateReducer, } from '../shared/hooks/data-load-state-reducer';
|
|
33
42
|
export { trackHook } from '../infra/decorators/hook-decorators/with-tracking';
|
|
34
|
-
export {
|
|
43
|
+
export { useComposedDashboardInternal } from '../domains/dashboarding/use-composed-dashboard';
|
|
44
|
+
export { useExecuteCustomWidgetQueryInternal } from '../infra/contexts/custom-widgets-provider';
|
|
45
|
+
export { useGetDataSourceFields } from '../domains/data-browser/data-source-dimensional-model';
|