@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
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface GetDashboardModelOptions {
|
|
|
41
41
|
* @param appSettings - Optional application settings
|
|
42
42
|
* @returns The dashboard model
|
|
43
43
|
*
|
|
44
|
-
* @internal
|
|
44
|
+
* @internal
|
|
45
|
+
* @sisenseInternal
|
|
45
46
|
*/
|
|
46
47
|
export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<DashboardModel>;
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-models.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
+
import { AppSettings } from '../../../infra/app/settings/settings';
|
|
3
|
+
import { CompleteThemeSettings } from '../../../types';
|
|
2
4
|
export interface GetDashboardModelsOptions {
|
|
3
5
|
/**
|
|
4
6
|
* Dashboard title to search by
|
|
@@ -12,4 +14,4 @@ export interface GetDashboardModelsOptions {
|
|
|
12
14
|
includeWidgets?: boolean;
|
|
13
15
|
}
|
|
14
16
|
/** @internal */
|
|
15
|
-
export declare function getDashboardModels(http: HttpClient, options?: GetDashboardModelsOptions): Promise<import('../../../domains/dashboarding/dashboard-model').DashboardModel[]>;
|
|
17
|
+
export declare function getDashboardModels(http: HttpClient, options?: GetDashboardModelsOptions, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<import('../../../domains/dashboarding/dashboard-model').DashboardModel[]>;
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Dimension, Filter, FilterRelations, FilterRelationsModel, FilterRelationsModelNode, Measure } from '@sisense/sdk-data';
|
|
2
|
-
import { JtdTarget, TriggerMethod } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
2
|
+
import { JtdTarget, JumpToDashboardConfig, JumpToDashboardConfigForPivot, TriggerMethod } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
3
3
|
import { TabbersConfig } from '../../../domains/dashboarding/hooks/use-tabber';
|
|
4
4
|
import { Panel, WidgetDto } from '../../../domains/widgets/components/widget-by-id/types';
|
|
5
5
|
import { RestApi } from '../../../infra/api/rest-api';
|
|
6
6
|
import { type CascadingFilterDto, DashboardDto, type FilterDto, type LayoutDto } from '../../../infra/api/types/dashboard-dto';
|
|
7
7
|
import type { SpecificWidgetOptions, WidgetsOptions, WidgetsPanelColumnLayout } from './types';
|
|
8
|
+
type WidgetJtdDtoSlice = Pick<WidgetDto, 'oid' | 'type' | 'metadata' | 'drillToDashboardConfig'>;
|
|
8
9
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
9
10
|
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>, filterRelationsModel?: FilterRelationsModel | FilterRelationsModelNode): Filter[] | FilterRelations;
|
|
10
|
-
export declare const getJtdNavigateType: (widget:
|
|
11
|
-
export declare const convertDimensionsToDimIndexes: (widget:
|
|
11
|
+
export declare const getJtdNavigateType: (widget: WidgetJtdDtoSlice) => TriggerMethod;
|
|
12
|
+
export declare const convertDimensionsToDimIndexes: (widget: WidgetJtdDtoSlice, dimensionIds: string[]) => string[];
|
|
12
13
|
/**
|
|
13
14
|
* Extract pivot targets configuration from widget DTO and build Map-based targets
|
|
14
15
|
*
|
|
@@ -16,10 +17,20 @@ export declare const convertDimensionsToDimIndexes: (widget: WidgetDto, dimensio
|
|
|
16
17
|
* @returns Map of dimensions/measures to their targets or undefined if no targets found
|
|
17
18
|
* @internal
|
|
18
19
|
*/
|
|
19
|
-
export declare function extractPivotTargetsConfigFromWidgetDto(widget:
|
|
20
|
+
export declare function extractPivotTargetsConfigFromWidgetDto(widget: WidgetJtdDtoSlice): Map<Dimension | {
|
|
20
21
|
dimension: Dimension;
|
|
21
22
|
location: 'row' | 'column' | 'value';
|
|
22
23
|
} | Measure, JtdTarget[]> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Converts a Fusion {@link WidgetDto}'s `drillToDashboardConfig` into Compose SDK JumpToDashboardConfig | JumpToDashboardConfigForPivot
|
|
26
|
+
* {@link JumpToDashboardConfig} {@link JumpToDashboardConfigForPivot} for use with {@link useJtdWidget}
|
|
27
|
+
*
|
|
28
|
+
* @param widget - Fusion widget DTO (or the subset of fields used for JTD translation)
|
|
29
|
+
* @returns JTD config, or `undefined` when there is no versioned JTD DTO or the widget type does not support JTD
|
|
30
|
+
*
|
|
31
|
+
* @group Dashboards
|
|
32
|
+
*/
|
|
33
|
+
export declare function jumpToDashboardConfigFromWidgetDto(widget: WidgetJtdDtoSlice): JumpToDashboardConfig | JumpToDashboardConfigForPivot | undefined;
|
|
23
34
|
export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
|
|
24
35
|
/**
|
|
25
36
|
* Applies {@link SpecificWidgetOptions} to a {@link WidgetDto}.
|
|
@@ -50,3 +61,4 @@ export declare function findDimensionByInstanceId(panels: Panel[], pivotDimensio
|
|
|
50
61
|
dimension: Dimension;
|
|
51
62
|
location: 'row' | 'column' | 'value';
|
|
52
63
|
} | undefined;
|
|
64
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonFiltersOptions } from '../../../domains/dashboarding/common-filters/types';
|
|
2
2
|
import type { JumpToDashboardConfig, JumpToDashboardConfigForPivot } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
3
|
+
import type { UnsupportedStyleOptions } from '../../../domains/widgets/components/widget-by-id/translate-widget-style-options/extract-unsupported-style-options.js';
|
|
3
4
|
import type { WidgetDto } from '../../../domains/widgets/components/widget-by-id/types';
|
|
4
5
|
import { ColorPaletteTheme } from '../../../types';
|
|
5
6
|
export type { CommonFiltersOptions, CommonFiltersApplyMode, FiltersIgnoringRules, } from '../../../domains/dashboarding/common-filters/types';
|
|
@@ -95,9 +96,16 @@ export type SpecificWidgetOptions = {
|
|
|
95
96
|
* Required to include all existing options/style when PATCHing a single field (e.g. previousScrollerLocation),
|
|
96
97
|
* because the server replaces the entire object rather than merging.
|
|
97
98
|
*
|
|
99
|
+
* `style` carries only the unsupported style fields not yet first-class translated by the
|
|
100
|
+
* CSDK widget model (extracted via `extractUnsupportedStyleOptions`); they are re-attached
|
|
101
|
+
* to the DTO during serialization with lower priority than rebuilt translation output.
|
|
102
|
+
*
|
|
98
103
|
* @internal
|
|
99
104
|
*/
|
|
100
|
-
partialDtoOptions?:
|
|
105
|
+
partialDtoOptions?: {
|
|
106
|
+
options?: WidgetDto['options'];
|
|
107
|
+
style?: UnsupportedStyleOptions;
|
|
108
|
+
};
|
|
101
109
|
};
|
|
102
110
|
/**
|
|
103
111
|
* Style options for the dashboard.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataSource } from '@sisense/sdk-data';
|
|
1
2
|
import { RestApi } from '../../../../../infra/api/rest-api';
|
|
2
3
|
import { AppSettings } from '../../../../../infra/app/settings/settings';
|
|
3
4
|
import { CompleteThemeSettings } from '../../../../../types';
|
|
@@ -15,6 +16,12 @@ export type PersistDashboardModelMiddlewareParams = {
|
|
|
15
16
|
appSettings: AppSettings;
|
|
16
17
|
/** Theme settings forwarded to {@link toWidgetDto} (used as defaults for widget design) */
|
|
17
18
|
themeSettings: CompleteThemeSettings;
|
|
19
|
+
/**
|
|
20
|
+
* Dashboard-level data source. Used as a fallback data source for widgets
|
|
21
|
+
* whose model does not carry one (e.g. text widgets), so the produced DTO
|
|
22
|
+
* still satisfies the server's datasource schema.
|
|
23
|
+
*/
|
|
24
|
+
dashboardDataSource?: DataSource;
|
|
18
25
|
};
|
|
19
26
|
/**
|
|
20
27
|
* Middleware that persists the dashboard model changes to the Sisense server.
|
|
@@ -22,4 +29,4 @@ export type PersistDashboardModelMiddlewareParams = {
|
|
|
22
29
|
* @returns Promise resolving to the action (possibly transformed, e.g. for ADD_WIDGET)
|
|
23
30
|
* @internal
|
|
24
31
|
*/
|
|
25
|
-
export declare function persistDashboardModelMiddleware({ dashboardOid, action, restApi, sharedMode, appSettings, themeSettings, }: PersistDashboardModelMiddlewareParams): Promise<UseDashboardModelInternalAction>;
|
|
32
|
+
export declare function persistDashboardModelMiddleware({ dashboardOid, action, restApi, sharedMode, appSettings, themeSettings, dashboardDataSource, }: PersistDashboardModelMiddlewareParams): Promise<UseDashboardModelInternalAction>;
|
|
@@ -23,5 +23,5 @@ export declare const useDrilldown: ({ initialDimension, initialDrilldownSelectio
|
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare function getSelectionTitleMenuItem(points: DataPoint[], drilldownDimension: Attribute): MenuItemSection;
|
|
25
25
|
/** @internal */
|
|
26
|
-
export declare function getDrilldownMenuItems(availableDrilldownPaths: (Attribute | Hierarchy)[], drilldownDimension: Attribute, selectFn: (nextDimension: Attribute, hierarchy?: Hierarchy) => void, translate: TFunction): MenuItemSection;
|
|
26
|
+
export declare function getDrilldownMenuItems(availableDrilldownPaths: (Attribute | Hierarchy)[], drilldownDimension: Attribute, selectFn: (nextDimension: Attribute, hierarchy?: Hierarchy) => void, translate: TFunction): MenuItemSection | null;
|
|
27
27
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attribute, DataSource } from '@sisense/sdk-data';
|
|
2
|
+
import { Hierarchy, HierarchyId } from '../hierarchy-model';
|
|
3
|
+
export interface GetHierarchiesParams {
|
|
4
|
+
/** The attribute/dimension for which to load hierarchies */
|
|
5
|
+
attribute: Attribute;
|
|
6
|
+
/** The data source from which to retrieve hierarchies */
|
|
7
|
+
dataSource?: DataSource;
|
|
8
|
+
/** The hierarchy IDs to load */
|
|
9
|
+
ids: HierarchyId[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Provides a `getHierarchies` function that loads hierarchy models from a Fusion instance by ID,
|
|
13
|
+
* including any hierarchies marked as `alwaysIncluded`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useHierarchiesLoader(): {
|
|
16
|
+
getHierarchies: (params: GetHierarchiesParams) => Promise<Hierarchy[]>;
|
|
17
|
+
};
|
|
@@ -5,7 +5,7 @@ import type { FilterTileConfig } from '../filter-tile/types.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for {@link CascadingFilterTile}
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @alpha
|
|
9
9
|
*/
|
|
10
10
|
export interface CascadingFilterTileProps {
|
|
11
11
|
/** Cascading filter object to initialize filter type and default values */
|
|
@@ -43,6 +43,6 @@ export interface CascadingFilterTileProps {
|
|
|
43
43
|
* @param props - Cascading filter tile props
|
|
44
44
|
* @returns Cascading filter tile component
|
|
45
45
|
* @group Filter Tiles
|
|
46
|
-
* @
|
|
46
|
+
* @alpha
|
|
47
47
|
*/
|
|
48
48
|
export declare const CascadingFilterTile: import("react").FunctionComponent<CascadingFilterTileProps>;
|
|
@@ -5,7 +5,7 @@ import { FilterTileDesignOptions } from './filter-tile-container';
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for {@link CustomFilterTile}
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @alpha
|
|
9
9
|
*/
|
|
10
10
|
export interface CustomFilterTileProps {
|
|
11
11
|
/** Custom filter. */
|
|
@@ -38,7 +38,6 @@ export interface CustomFilterTileProps {
|
|
|
38
38
|
/**
|
|
39
39
|
* UI component for a custom filter defined with JAQL.
|
|
40
40
|
*
|
|
41
|
-
* @internal
|
|
42
41
|
* @example
|
|
43
42
|
* ```tsx
|
|
44
43
|
* const filterJaql = { from: 10, to: 20000 };
|
|
@@ -59,5 +58,6 @@ export interface CustomFilterTileProps {
|
|
|
59
58
|
* @param props - Custom filter tile props
|
|
60
59
|
* @returns Custom filter tile component
|
|
61
60
|
* @group Filter Tiles
|
|
61
|
+
* @alpha
|
|
62
62
|
*/
|
|
63
63
|
export declare const CustomFilterTile: import("react").FunctionComponent<CustomFilterTileProps>;
|
|
@@ -10,10 +10,17 @@ export interface WidgetNarrativeOptions {
|
|
|
10
10
|
defaultDataSource?: DataSource;
|
|
11
11
|
/** The verbosity of the NLG summarization */
|
|
12
12
|
verbosity?: 'Low' | 'High';
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/**
|
|
14
|
+
* When `true`, attempts the unified AI narrative endpoint and falls back to the legacy endpoint
|
|
15
|
+
* on 404. When `false` or omitted, only the legacy endpoint is used.
|
|
16
|
+
*
|
|
17
|
+
* **Hook-based flows** (e.g. {@link useGetWidgetNarrative}): when omitted, the value is read
|
|
18
|
+
* from `app.settings.narrative.canGenerateNarrativeViaAI` via {@link useSisenseContext}.
|
|
19
|
+
*
|
|
20
|
+
* **Imperative helpers** (e.g. {@link getNlgInsightsFromWidget}): no context fallback is
|
|
21
|
+
* performed — omitting this option is equivalent to `false` (legacy endpoint only).
|
|
22
|
+
*/
|
|
23
|
+
canGenerateNarrativeViaAI?: boolean;
|
|
17
24
|
/**
|
|
18
25
|
* When `true`, trend and forecast companion measures are omitted from the narrative JAQL so
|
|
19
26
|
* requests stay compatible with backends that do not yet support them.
|
package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartWidgetProps } from '../../../domains/widgets/components/chart-widget/types';
|
|
3
3
|
import type { PivotTableWidgetProps } from '../../../domains/widgets/components/pivot-table-widget/types';
|
|
4
|
-
import type { WithCommonWidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
4
|
+
import type { WidgetProps, WithCommonWidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
5
5
|
import type { NarrativeRequest } from '../../../infra/api/narrative/narrative-api-types.js';
|
|
6
6
|
import type { NarrativeQueryParams } from './build-narrative-request.js';
|
|
7
7
|
/**
|
|
@@ -34,3 +34,53 @@ export declare function convertPivotWidgetPropsToNarrativeRequest(props: WithCom
|
|
|
34
34
|
* @deprecated Use {@link convertChartWidgetPropsToNarrativeParams}. Same function; kept for legacy `getNlgInsightsFromWidget`.
|
|
35
35
|
*/
|
|
36
36
|
export declare const convertChartWidgetPropsToUseGetNlgInsightsParams: typeof convertChartWidgetPropsToNarrativeParams;
|
|
37
|
+
/**
|
|
38
|
+
* Error message for imperative callers (e.g. {@link getNlgInsightsFromWidget}) when chart or pivot
|
|
39
|
+
* props omit `dataSource` and no `defaultDataSource` is passed.
|
|
40
|
+
*
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare const MISSING_DATASOURCE_NLG_ERROR = "dataSource is required. Provide it on the widget props or as defaultDataSource parameter.";
|
|
44
|
+
export type WidgetNarrativeRequestPair = {
|
|
45
|
+
supported: boolean;
|
|
46
|
+
narrativeRequest: NarrativeRequest | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Same request with trend/forecast stripped. `undefined` when `ignoreTrendAndForecast` is
|
|
49
|
+
* already `true` (primary already stripped), when the widget type is unsupported, or when
|
|
50
|
+
* the fallback conversion itself fails.
|
|
51
|
+
*/
|
|
52
|
+
narrativeFallbackRequest: NarrativeRequest | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* When `supported` is `false`, `true` means chart/pivot had no resolved data source (props and
|
|
55
|
+
* `defaultDataSource` were both unset); conversion was skipped.
|
|
56
|
+
*/
|
|
57
|
+
missingDataSource?: boolean;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Builds a primary narrative request and, when useful, a fallback request with trend/forecast
|
|
61
|
+
* stripped — both from the same widget props in a single call.
|
|
62
|
+
*
|
|
63
|
+
* @param props - Chart or pivot widget props
|
|
64
|
+
* @param defaultDataSource - Used when `props.dataSource` is undefined
|
|
65
|
+
* @param verbosity - Optional verbosity for narrative text
|
|
66
|
+
* @param ignoreTrendAndForecast - When `true`, the primary request already omits trend/forecast
|
|
67
|
+
* and no fallback is needed
|
|
68
|
+
* @returns `{ supported, narrativeRequest, narrativeFallbackRequest }`. `supported` is `false`
|
|
69
|
+
* when the widget type is unsupported, when no data source can be resolved for chart/pivot, or
|
|
70
|
+
* when the primary conversion fails.
|
|
71
|
+
* @example Chart or pivot widget props
|
|
72
|
+
* ```ts
|
|
73
|
+
* const { supported, narrativeRequest, narrativeFallbackRequest } =
|
|
74
|
+
* buildWidgetNarrativeRequests(
|
|
75
|
+
* widgetProps, // `WithCommonWidgetProps<ChartWidgetProps, 'chart'>` or pivot equivalent
|
|
76
|
+
* defaultDataSource,
|
|
77
|
+
* 'High',
|
|
78
|
+
* false,
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
* On success, `supported` is `true` and `narrativeRequest` / `narrativeFallbackRequest` hold the
|
|
82
|
+
* primary and trend-stripped NLG payloads; otherwise `supported` is `false` and requests are
|
|
83
|
+
* `undefined` (and `missingDataSource` may be set when no source could be resolved).
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare function buildWidgetNarrativeRequests(props: WidgetProps, defaultDataSource?: DataSource, verbosity?: 'Low' | 'High', ignoreTrendAndForecast?: boolean): WidgetNarrativeRequestPair;
|
|
@@ -5,9 +5,9 @@ import { type WidgetNarrativeQueryState } from './use-widget-narrative-state.js'
|
|
|
5
5
|
* Options for {@link useGetWidgetNarrative}.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Narration
|
|
9
|
-
*
|
|
10
|
-
* imperative `getNlgInsightsFromWidget` helper for per-call behavior.
|
|
8
|
+
* Narration endpoint selection defaults from `app.settings.narrative.canGenerateNarrativeViaAI`
|
|
9
|
+
* on {@link useSisenseContext} when `canGenerateNarrativeViaAI` is omitted. Optional overrides
|
|
10
|
+
* match the imperative `getNlgInsightsFromWidget` helper for per-call behavior.
|
|
11
11
|
* @sisenseInternal
|
|
12
12
|
*/
|
|
13
13
|
export type UseGetWidgetNarrativeOptions = WidgetNarrativeOptions & {
|
|
@@ -23,7 +23,7 @@ export type UseWidgetNarrativeStateResult = WidgetNarrativeQueryState & {
|
|
|
23
23
|
/**
|
|
24
24
|
* Mirrors the `enabled` param. When `false`, the narrative is opted out: `data` is cleared (no
|
|
25
25
|
* cached fallback), `narrativeRequest` is undefined, and loading/error flags reflect a disabled
|
|
26
|
-
* query rather than
|
|
26
|
+
* query rather than "no insights."
|
|
27
27
|
*/
|
|
28
28
|
enabled: boolean;
|
|
29
29
|
/** Present when `supported` and `enabled`; used by {@link WidgetNarrative} for feedback payload only. */
|
|
@@ -36,4 +36,4 @@ export type UseWidgetNarrativeStateResult = WidgetNarrativeQueryState & {
|
|
|
36
36
|
*
|
|
37
37
|
* @internal
|
|
38
38
|
*/
|
|
39
|
-
export declare function useWidgetNarrativeState({ widgetProps, defaultDataSource, verbosity, enabled, ignoreTrendAndForecast,
|
|
39
|
+
export declare function useWidgetNarrativeState({ widgetProps, defaultDataSource, verbosity, enabled, ignoreTrendAndForecast, canGenerateNarrativeViaAI: optionsCanGenerateNarrativeViaAI, }: UseWidgetNarrativeStateParams): UseWidgetNarrativeStateResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import leaflet, { type FitBoundsOptions } from 'leaflet';
|
|
2
|
-
import { CompleteThemeSettings } from '../../../../../../../
|
|
2
|
+
import { CompleteThemeSettings } from '../../../../../../../types.js';
|
|
3
3
|
type FitBoundsAnimationOptions = Pick<FitBoundsOptions, 'animate' | 'duration'>;
|
|
4
4
|
export declare function prepareFitBoundsAnimationOptions(themeSettings: CompleteThemeSettings): FitBoundsAnimationOptions;
|
|
5
5
|
export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[], options?: FitBoundsOptions): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AreamapChartDataOptionsInternal } from '../../../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
1
|
+
import { type AreamapChartDataOptionsInternal } from '../../../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
2
2
|
import { DataTable } from '../../../../../../../domains/visualizations/core/chart-data-processor/table-processor.js';
|
|
3
3
|
import { AreamapData } from '../types.js';
|
|
4
4
|
export declare const getAreamapData: (dataOptions: AreamapChartDataOptionsInternal, dataTable: DataTable) => AreamapData;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { DataSource } from '@sisense/sdk-data';
|
|
2
|
+
import { type ChartDataOptionsInternal } from '../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
2
3
|
import { ChartData } from '../../../../domains/visualizations/core/chart-data/types';
|
|
3
4
|
import { DesignOptions } from '../../../../domains/visualizations/core/chart-options-processor/translations/types';
|
|
4
|
-
import {
|
|
5
|
+
import { type ChartProps } from '../../../../props.js';
|
|
6
|
+
import { type ChartType } from '../../../../types.js';
|
|
5
7
|
/**
|
|
6
8
|
* Props object to be passed to the chart renderer.
|
|
7
9
|
*
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/sorting-utils.d.ts
CHANGED
|
@@ -9,4 +9,8 @@ export type PivotSortCriteria = {
|
|
|
9
9
|
rows: PivotRowsSortCriteria[];
|
|
10
10
|
};
|
|
11
11
|
export declare function normalizePivotSort(sortType: SortDirection | PivotRowsSort): PivotRowsSort;
|
|
12
|
+
/**
|
|
13
|
+
* Type guard for the complex pivot sort shape (as opposed to a bare `SortDirection` string).
|
|
14
|
+
*/
|
|
15
|
+
export declare function isPivotRowsSort(sort: unknown): sort is PivotRowsSort;
|
|
12
16
|
export declare function preparePivotRowsSortCriteriaList({ type, settings, sortDetails }: SortingSettingsChangePayload, dataOptionsInternal: PivotTableDataOptionsInternal): PivotRowsSortCriteria[];
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/table/hooks/use-table-data.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Attribute, Data, DataSource, Filter, FilterRelationsJaql, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { TableDataOptionsInternal } from '../../../core/chart-data-options/types';
|
|
3
|
+
import { DataColumnNamesMapping } from '../../../core/chart-data-options/validate-data-options';
|
|
3
4
|
type UseDataProps = {
|
|
4
5
|
dataSet: Data | DataSource | undefined;
|
|
5
6
|
dataOptions: TableDataOptionsInternal | null;
|
|
7
|
+
dataColumnNamesMapping: DataColumnNamesMapping;
|
|
6
8
|
filters: Filter[] | undefined;
|
|
7
9
|
filterRelations: FilterRelationsJaql | undefined;
|
|
8
10
|
count: number;
|
|
@@ -12,5 +14,5 @@ export declare const getTableAttributesAndMeasures: (dataOptions: TableDataOptio
|
|
|
12
14
|
attributes: Attribute[];
|
|
13
15
|
measures: Measure[];
|
|
14
16
|
};
|
|
15
|
-
export declare const useTableData: ({ dataSet, dataOptions: originalDataOptions, filters, filterRelations, count, offset, }: UseDataProps) => [Data | null, TableDataOptionsInternal | null];
|
|
17
|
+
export declare const useTableData: ({ dataSet, dataOptions: originalDataOptions, dataColumnNamesMapping: originalDataColumnNamesMapping, filters, filterRelations, count, offset, }: UseDataProps) => [Data | null, TableDataOptionsInternal | null, DataColumnNamesMapping];
|
|
16
18
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartType } from '../../../../types';
|
|
3
3
|
import { CategoricalChartDataOptions, CategoricalChartDataOptionsInternal, ChartDataOptions, ChartDataOptionsInternal, PivotTableDataOptions, PivotTableDataOptionsInternal, StyledColumn, StyledMeasureColumn, TableDataOptions, TableDataOptionsInternal } from './types';
|
|
4
|
+
import { DataColumnNamesMapping } from './validate-data-options';
|
|
4
5
|
export declare function translateChartDataOptions(chartType: ChartType, dataOptions: ChartDataOptions): ChartDataOptionsInternal;
|
|
5
6
|
export declare const translateCategoricalChartDataOptions: (categorical: CategoricalChartDataOptions) => CategoricalChartDataOptionsInternal;
|
|
6
7
|
/**
|
|
@@ -18,6 +19,18 @@ export declare function getStyledMeasureColumns(dataOptions: ChartDataOptionsInt
|
|
|
18
19
|
export declare function getAttributes(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Attribute[];
|
|
19
20
|
export declare function getMeasures(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Measure[];
|
|
20
21
|
export declare function translateTableDataOptions(dataOptions: TableDataOptions): TableDataOptionsInternal;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a shallow copy of the table data options whose measure columns carry
|
|
24
|
+
* unique alias names, paired with the unique-name -> original-name mapping.
|
|
25
|
+
*
|
|
26
|
+
* Pure: neither the input data options nor the user's measure refs are
|
|
27
|
+
* mutated. Each renamed column wraps a fresh measure clone whose prototype is
|
|
28
|
+
* the original measure (so methods like `jaql()` keep working).
|
|
29
|
+
*/
|
|
30
|
+
export declare function withUniqueMeasureNames(dataOptions: TableDataOptionsInternal): {
|
|
31
|
+
dataOptions: TableDataOptionsInternal;
|
|
32
|
+
mapping: DataColumnNamesMapping;
|
|
33
|
+
};
|
|
21
34
|
/**
|
|
22
35
|
* Translates pivot table data options to the internal structure.
|
|
23
36
|
*/
|
|
@@ -10,6 +10,15 @@ export type DataColumnNamesMapping = Record<string, string>;
|
|
|
10
10
|
* @returns - The mapping of unique names to original names.
|
|
11
11
|
*/
|
|
12
12
|
export declare const generateUniqueDataColumnsNames: (measures: Measure[]) => DataColumnNamesMapping;
|
|
13
|
+
/**
|
|
14
|
+
* Pure variant of {@link generateUniqueDataColumnsNames}: returns a fresh array of
|
|
15
|
+
* measure clones whose `name` is the unique alias, alongside the mapping. The
|
|
16
|
+
* input measures are not mutated.
|
|
17
|
+
*/
|
|
18
|
+
export declare const applyUniqueDataColumnsNames: (measures: Measure[]) => {
|
|
19
|
+
measures: Measure[];
|
|
20
|
+
mapping: DataColumnNamesMapping;
|
|
21
|
+
};
|
|
13
22
|
/**
|
|
14
23
|
* Applies default chart data options based on input chart type.
|
|
15
24
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Highcharts from '@sisense/sisense-charts';
|
|
2
2
|
import type { SeriesLegendItemClickCallbackFunction } from '@sisense/sisense-charts';
|
|
3
|
-
import { ChartDataOptionsInternal } from '
|
|
4
|
-
import { HighchartsPointerEvent, HighchartsSelectEvent } from '../../../../types';
|
|
3
|
+
import { ChartDataOptionsInternal } from '../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
4
|
+
import { HighchartsPointerEvent, HighchartsSelectEvent } from '../../../../types.js';
|
|
5
5
|
import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from '../../components/chart/components/sisense-chart/types';
|
|
6
6
|
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
7
7
|
type HighchartsChartWithCustomProperties = Highcharts.Chart & {
|
|
@@ -32,43 +32,7 @@ interface SeriesProcessingConfig {
|
|
|
32
32
|
/**
|
|
33
33
|
* Process and format series data for the chart
|
|
34
34
|
*/
|
|
35
|
-
export declare function processSeries(config: SeriesProcessingConfig):
|
|
36
|
-
borderRadius?: string | number | undefined;
|
|
37
|
-
groupPadding?: number | undefined;
|
|
38
|
-
pointPadding?: number | undefined;
|
|
39
|
-
shadow?: boolean | undefined;
|
|
40
|
-
linecap?: string | undefined;
|
|
41
|
-
dashStyle?: import("../../../../../../types").DashStyle | undefined;
|
|
42
|
-
lineWidth?: number | undefined;
|
|
43
|
-
dataLabels: {
|
|
44
|
-
formatter: (this: import("../../tooltip").HighchartsDataPointContext) => string;
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
rotation?: number | undefined;
|
|
47
|
-
inside?: boolean | undefined;
|
|
48
|
-
align?: "left" | "center" | "right" | undefined;
|
|
49
|
-
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
50
|
-
style?: import("../../translations/types").TextStyle | undefined;
|
|
51
|
-
backgroundColor?: string | import("../../../../../..").HighchartsGradientColorObject | undefined;
|
|
52
|
-
borderColor?: string | import("../../../../../..").HighchartsGradientColorObject | undefined;
|
|
53
|
-
borderRadius?: number | undefined;
|
|
54
|
-
borderWidth?: number | undefined;
|
|
55
|
-
padding?: number | undefined;
|
|
56
|
-
x?: number | undefined;
|
|
57
|
-
y?: number | undefined;
|
|
58
|
-
};
|
|
59
|
-
connectNulls: boolean;
|
|
60
|
-
marker: import("../../translations/marker-section").MarkerSettings;
|
|
61
|
-
type?: string | undefined;
|
|
62
|
-
showInNavigator: boolean;
|
|
63
|
-
stickyTracking: boolean;
|
|
64
|
-
boostThreshold: number;
|
|
65
|
-
turboThreshold: number;
|
|
66
|
-
color: string | undefined;
|
|
67
|
-
yAxis: number;
|
|
68
|
-
name: string;
|
|
69
|
-
data: import("../../translations/translations-to-highcharts").SeriesPointStructure[];
|
|
70
|
-
levels?: any;
|
|
71
|
-
}[];
|
|
35
|
+
export declare function processSeries(config: SeriesProcessingConfig): any[];
|
|
72
36
|
/**
|
|
73
37
|
* Apply additional series configuration based on chart type
|
|
74
38
|
*/
|
|
@@ -16,7 +16,7 @@ import { DataLabelsSettings } from './translations/value-label-section';
|
|
|
16
16
|
/**
|
|
17
17
|
* Highcharts options
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @alpha
|
|
20
20
|
*/
|
|
21
21
|
export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
22
22
|
/**
|
|
@@ -63,6 +63,7 @@ export type SeriesType = HighchartsSeriesValues & {
|
|
|
63
63
|
legendIndex?: number;
|
|
64
64
|
dashStyle?: string;
|
|
65
65
|
lineWidth?: number;
|
|
66
|
+
step?: boolean | 'left' | 'center' | 'right';
|
|
66
67
|
zIndex?: number;
|
|
67
68
|
keys?: string[];
|
|
68
69
|
nullColor?: string;
|
|
@@ -119,6 +120,7 @@ export type PlotOptions = {
|
|
|
119
120
|
softThreshold?: boolean;
|
|
120
121
|
fillOpacity?: number;
|
|
121
122
|
connectNulls?: boolean;
|
|
123
|
+
step?: boolean | 'left' | 'center' | 'right';
|
|
122
124
|
animation?: {
|
|
123
125
|
duration?: number;
|
|
124
126
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HighchartsGradientColorObject } from '../../../../shared/utils/gradient';
|
|
2
|
-
import { SeriesLabels, TextStyle } from '
|
|
2
|
+
import { SeriesLabels, TextStyle } from '../../../../types.js';
|
|
3
3
|
type DataLabelsOptions = {
|
|
4
4
|
enabled: boolean;
|
|
5
5
|
rotation?: number;
|
|
@@ -26,8 +26,8 @@ export declare function prepareSunburstLevels(chartData: CategoricalChartData, d
|
|
|
26
26
|
align?: "left" | "center" | "right" | undefined;
|
|
27
27
|
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
28
28
|
style?: import("../types").TextStyle | undefined;
|
|
29
|
-
backgroundColor?: string | import("
|
|
30
|
-
borderColor?: string | import("
|
|
29
|
+
backgroundColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
30
|
+
borderColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
31
31
|
borderRadius?: number | undefined;
|
|
32
32
|
borderWidth?: number | undefined;
|
|
33
33
|
padding?: number | undefined;
|
|
@@ -84,8 +84,8 @@ export declare function prepareSunburstSeries(chartData: CategoricalChartData, d
|
|
|
84
84
|
align?: "left" | "center" | "right" | undefined;
|
|
85
85
|
verticalAlign?: "top" | "middle" | "bottom" | undefined;
|
|
86
86
|
style?: import("../types").TextStyle | undefined;
|
|
87
|
-
backgroundColor?: string | import("
|
|
88
|
-
borderColor?: string | import("
|
|
87
|
+
backgroundColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
88
|
+
borderColor?: string | import("../../../../../../shared/utils/gradient").HighchartsGradientColorObject | undefined;
|
|
89
89
|
borderRadius?: number | undefined;
|
|
90
90
|
borderWidth?: number | undefined;
|
|
91
91
|
padding?: number | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared typography for the query-definition row, pill labels, and tooltip body.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const QUERY_DEFINITION_TEXT_STYLE: {
|
|
7
|
+
readonly fontSize: "13px";
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Pill label line height matches design spec on top of {@link QUERY_DEFINITION_TEXT_STYLE}.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const QUERY_PILL_LABEL_STYLE: {
|
|
15
|
+
readonly lineHeight: "17px";
|
|
16
|
+
readonly fontSize: "13px";
|
|
17
|
+
};
|
package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FunctionComponent } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ExecuteQueryParams } from '../../../../domains/query-execution/types';
|
|
3
3
|
import type { ChartProps } from '../../../../props';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the QueryDefinition component.
|
|
@@ -7,8 +7,8 @@ import type { ChartProps } from '../../../../props';
|
|
|
7
7
|
* @sisenseInternal
|
|
8
8
|
*/
|
|
9
9
|
export interface QueryDefinitionProps {
|
|
10
|
-
/** Either chart props (uses getTranslatedDataOptions internally) or
|
|
11
|
-
query:
|
|
10
|
+
/** Either chart props (uses getTranslatedDataOptions internally) or query params (same shape as {@link useExecuteQuery}) */
|
|
11
|
+
query: ExecuteQueryParams | ChartProps;
|
|
12
12
|
/** When true (default), pills show JSON tooltip on hover. */
|
|
13
13
|
showTooltip?: boolean;
|
|
14
14
|
/**
|
|
@@ -4,9 +4,9 @@ import type { QueryDefinitionViewModel } from './types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Builds the query definition view model from base query params.
|
|
6
6
|
* Order: Measures → "by" → Dimensions → "for"/"where" → Filters.
|
|
7
|
-
* Operators (comparison/sort) are not derived from
|
|
7
|
+
* Operators (comparison/sort) are not derived from base query fields in v1.
|
|
8
8
|
*
|
|
9
|
-
* @param params -
|
|
9
|
+
* @param params - Base query fields from chart or query; accepts {@link ExecuteQueryParams} (execution-only fields are ignored).
|
|
10
10
|
* @param t - Optional i18n translate function. When provided, date-level (`DimensionalLevelAttribute`)
|
|
11
11
|
* dimensions and filters use `attribute.datetimeName.*` strings (e.g. "Months in Date"). When omitted,
|
|
12
12
|
* labels match the previous behavior (`attr.name` only).
|
|
@@ -7,7 +7,6 @@ type UseWithPivotTableWidgetDrilldownParams = {
|
|
|
7
7
|
};
|
|
8
8
|
type UseWithPivotTableWidgetDrilldownResult = {
|
|
9
9
|
propsWithDrilldown: PivotTableWidgetProps;
|
|
10
|
-
isDrilldownEnabled: boolean;
|
|
11
10
|
breadcrumbs: JSX.Element;
|
|
12
11
|
};
|
|
13
12
|
export declare function useWithPivotTableWidgetDrilldown(params: UseWithPivotTableWidgetDrilldownParams): UseWithPivotTableWidgetDrilldownResult;
|
|
@@ -10,11 +10,6 @@ import { DataOptionLocation, DrilldownSelection } from '../../../../types';
|
|
|
10
10
|
* @returns The initial dimension location.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getInitialDimensionLocation(dataOptions: PivotTableDataOptions, drilldownTarget: Attribute | DataOptionLocation, drilldownSelections: DrilldownSelection[]): DataOptionLocation | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Checks if drilldown is applicable to a pivot table.
|
|
15
|
-
* Drilldown requires the pivot table to have at least one selectable attribute (row or column dimension).
|
|
16
|
-
*/
|
|
17
|
-
export declare function isDrilldownApplicableToPivot(dataOptions: PivotTableDataOptions): boolean;
|
|
18
13
|
/**
|
|
19
14
|
* Applies a drilldown dimension to pivot table data options.
|
|
20
15
|
* Replaces the target dimension (first row or column that doesn't match the drilldown dimension).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetStyle } from '../types.js';
|
|
2
|
+
import type { UnsupportedStyleOptions } from './extract-unsupported-style-options.js';
|
|
3
|
+
/**
|
|
4
|
+
* Layers `partialStyle` (the unsupported style fields snapshot from the original
|
|
5
|
+
* Fusion DTO, see {@link extractUnsupportedStyleOptions}) underneath the freshly
|
|
6
|
+
* `rebuiltStyle` produced by `to*WidgetStyle`.
|
|
7
|
+
*
|
|
8
|
+
* Priority (highest to lowest):
|
|
9
|
+
* 1. `rebuiltStyle` — values produced by the SDK → DTO translation.
|
|
10
|
+
* 2. `partialStyle` — values plucked from the original DTO.
|
|
11
|
+
*
|
|
12
|
+
* Implemented with `lodash-es/merge`, which performs a deep merge and skips
|
|
13
|
+
* `undefined` source values, so any field the rebuild does emit takes precedence
|
|
14
|
+
* while gap fields the rebuild leaves untouched are filled in from `partialStyle`.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyPartialDtoStyle<T extends WidgetStyle>(rebuiltStyle: T, partialStyle?: UnsupportedStyleOptions): T;
|