@sisense/sdk-ui 2.30.0 → 2.31.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 +2 -2
- package/dist/ai.js +6 -6
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1841 -1321
- package/dist/analytics-composer.cjs +2 -2
- package/dist/analytics-composer.js +8 -8
- package/dist/apply-styled-options-to-query-BddNnNsW.js +7028 -0
- package/dist/apply-styled-options-to-query-BrP6xVFh.cjs +1 -0
- package/dist/index-BcggtLDg.js +847 -0
- package/dist/index-DhUTJSni.cjs +1 -0
- package/dist/index.cjs +443 -417
- package/dist/index.js +23357 -23604
- package/dist/index.umd.js +818 -716
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header/constants.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-config.d.ts → dashboard-header/dashboard-header-config.d.ts} +17 -22
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-targets.d.ts → dashboard-header/dashboard-header-targets.d.ts} +0 -4
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header-title.d.ts → dashboard-header/dashboard-header-title.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/{dashboard-header.d.ts → dashboard-header/dashboard-header.d.ts} +1 -4
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/toolbar/edit-toggle.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/toolbar/filter-toggle.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-helpers.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 +10 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-edit-mode-with-history.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-updates-persistence.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/update-types.d.ts +4 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +30 -13
- package/dist/packages/sdk-ui/src/domains/dashboarding/utils.d.ts +29 -6
- package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/filters-panel.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/narrative/core/get-widget-narrative-from-widget-props.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/narrative/core/{widget-narrative-options.d.ts → widget-narrative-config.d.ts} +12 -12
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +8 -8
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/shared/header/header-item-cell.d.ts +25 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/header-item-size.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/shared/header/header-items-renderer.d.ts +6 -2
- package/dist/packages/sdk-ui/src/domains/shared/header/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/helpers/calc-column-widths.d.ts +19 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/styles/style-constants.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/types.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +1 -1
- 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/chart-options-processor/translations/sunburst/sunburst-series.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +2 -10
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-excel-download.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +2 -9
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-excel-download.d.ts +1 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +25 -9
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/categorical-labels-style.d.ts +94 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/series-label-affix-style.d.ts +59 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +13 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/widget-narrative-style.d.ts +8 -8
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +72 -1
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +5 -6
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +11 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +1 -3
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +4 -5
- package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +8 -0
- package/dist/packages/sdk-ui/src/infra/modules/types.d.ts +24 -5
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +11 -5
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/custom-formula/validate-custom-formula.d.ts +11 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/datetime-filter-processors.d.ts +6 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/measure-processors.d.ts +16 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-member-validation.d.ts +2 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-range-validation.d.ts +2 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-relative-validation.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/datetime-validation-utils.d.ts +40 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/flatten-filters.d.ts +5 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/normalize-member-for-granularity.d.ts +5 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/validation/query-datetime-validation.d.ts +7 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +16 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/to-widget-code.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +1 -2
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -5
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +3 -1
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +4 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +0 -1
- package/dist/packages/sdk-ui/src/shared/components/alert/alert.d.ts +1 -50
- package/dist/packages/sdk-ui/src/shared/components/alert/index.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/components/no-results-overlay/images/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +3 -10
- package/dist/packages/sdk-ui/src/shared/components/radio.d.ts +1 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-synced-state.d.ts +6 -7
- package/dist/packages/sdk-ui/src/shared/icons/warning-icon.d.ts +2 -3
- package/dist/packages/sdk-ui/src/shared/icons/x-circle-icon.d.ts +2 -3
- package/dist/packages/sdk-ui/src/shared/utils/color/color-interpolation.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/utils/color/colorjs.d.ts +36 -0
- package/dist/packages/sdk-ui/src/shared/utils/gradient.d.ts +3 -2
- package/dist/packages/sdk-ui/src/types.d.ts +30 -19
- package/dist/{quota-notification-DqabeDbO.js → quota-notification-BMxiL8zu.js} +12530 -12922
- package/dist/quota-notification-CsGmQ05h.cjs +750 -0
- package/dist/{types-DecTaxy7.js → types-BB6n10Af.js} +1 -1
- package/dist/{types-DSNnndG6.cjs → types-CMUXHDie.cjs} +1 -1
- package/dist/{utils-L-HO2pCd.js → utils-C39pRlFD.js} +14643 -14371
- package/dist/utils-CL2eytnK.cjs +180 -0
- package/dist/{widget-composer-CyWQaInf.cjs → widget-composer-DDulWu8l.cjs} +85 -10
- package/dist/{widget-composer-u6NMLm1C.js → widget-composer-DrfnZQa0.js} +350 -259
- package/package.json +13 -16
- package/dist/apply-styled-options-to-query-BK1NnV4P.js +0 -6453
- package/dist/apply-styled-options-to-query-Dl8vVNxo.cjs +0 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-warning-dismissed.d.ts +0 -8
- package/dist/quota-notification-gYE6PTWA.cjs +0 -750
- package/dist/utils-Cpeyj9TN.cjs +0 -179
|
@@ -25,6 +25,7 @@ export declare const resolveHeaderItemSize: (size?: HeaderItemSize, defaultSize?
|
|
|
25
25
|
* `fill` is internal: it is set only on built-in items. External items never carry it, so they are
|
|
26
26
|
* always laid out at a fixed pixel width.
|
|
27
27
|
*
|
|
28
|
-
* `height` is applied as a fixed pixel height (provided or defaulted).
|
|
28
|
+
* `height` is applied as a fixed pixel height (provided or defaulted). Every cell uses
|
|
29
|
+
* `align-items: center`, so an item shorter than the cell is centered vertically;
|
|
29
30
|
*/
|
|
30
31
|
export declare const getHeaderItemStyle: (size: Required<HeaderItemSize>, fill?: HeaderItemFill) => CSSProperties;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ResolvedHeaderItem } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Props for {@link HeaderItemsRenderer}.
|
|
4
|
-
*
|
|
5
4
|
* @internal
|
|
6
5
|
*/
|
|
7
6
|
export interface HeaderItemsRendererProps {
|
|
@@ -12,8 +11,13 @@ export interface HeaderItemsRendererProps {
|
|
|
12
11
|
* default (the dashboard uses 28). Defaults to {@link DEFAULT_HEADER_ITEM_SIZE}.
|
|
13
12
|
*/
|
|
14
13
|
defaultSize?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Gap (px) rendered between adjacent header items. Defaults to `0` (no gap); the dashboard uses
|
|
16
|
+
* `10` to match Fusion's spacing.
|
|
17
|
+
*/
|
|
18
|
+
gap?: number;
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* Renders a resolved list of header items as a single horizontal flex row.
|
|
18
22
|
*/
|
|
19
|
-
export declare const HeaderItemsRenderer: ({ items, defaultSize }: HeaderItemsRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const HeaderItemsRenderer: ({ items, defaultSize, gap }: HeaderItemsRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,6 @@ export type { HeaderConfig, HeaderItem, HeaderItemComponent, HeaderItemComponent
|
|
|
2
2
|
export { resolveHeaderItems, type ResolveHeaderItemsOptions } from './resolve-header-items.js';
|
|
3
3
|
export { useResolvedHeaderItems } from './use-resolved-header-items.js';
|
|
4
4
|
export { HeaderItemsRenderer, type HeaderItemsRendererProps } from './header-items-renderer.js';
|
|
5
|
+
export { HeaderItemCell, type HeaderItemCellProps } from './header-item-cell.js';
|
|
5
6
|
export { getHeaderItemStyle, resolveHeaderItemSize, DEFAULT_HEADER_ITEM_SIZE, } from './header-item-size.js';
|
|
6
7
|
export { createHeaderSpacerItem } from './header-spacer-item.js';
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { DataTable } from '../../../../core/chart-data-processor/table-processor.js';
|
|
2
|
+
/** Optional settings for {@link calcColumnWidths}. */
|
|
3
|
+
export type CalcColumnWidthsOptions = {
|
|
4
|
+
/** Font family used to measure text widths. Defaults to `'Open Sans'`. */
|
|
5
|
+
fontFamily?: string;
|
|
6
|
+
/** Lower bound for a computed column width, in pixels. Defaults to {@link MIN_WIDTH}. */
|
|
7
|
+
minWidth?: number;
|
|
8
|
+
/** Upper bound for a computed column width, in pixels. Defaults to {@link MAX_WIDTH}. */
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Calculates each column's pixel width from its header text and widest cell value,
|
|
13
|
+
* clamped between `minWidth` and `maxWidth`.
|
|
14
|
+
* @param dataTable - Table data whose columns and rows are measured.
|
|
15
|
+
* @param isShowFieldTypeIcon - Whether the header reserves extra space for a field-type icon.
|
|
16
|
+
* @param columnsOptions - Per-column overrides, indexed the same as `dataTable.columns`.
|
|
17
|
+
* @param options - See {@link CalcColumnWidthsOptions}.
|
|
18
|
+
* @returns The computed width, in pixels, for each column in `dataTable.columns` order.
|
|
19
|
+
*/
|
|
2
20
|
export declare const calcColumnWidths: (dataTable: DataTable, isShowFieldTypeIcon: boolean, columnsOptions: {
|
|
3
21
|
isHtml: boolean;
|
|
4
22
|
width?: number;
|
|
5
|
-
}[], fontFamily?:
|
|
23
|
+
}[], { fontFamily, minWidth, maxWidth }?: CalcColumnWidthsOptions) => number[];
|
|
@@ -5,6 +5,6 @@ export declare const HEADER_PADDING = 36;
|
|
|
5
5
|
export declare const HEADER_TYPE_ICON_SPACING = 29;
|
|
6
6
|
export declare const DATA_PADDING = 24;
|
|
7
7
|
export declare const MAX_WIDTH = 350;
|
|
8
|
-
export declare const MIN_WIDTH =
|
|
8
|
+
export declare const MIN_WIDTH = 120;
|
|
9
9
|
export declare const HEADER_ELLIPSIZED_LENGTH = 38;
|
|
10
10
|
export declare const DATA_ELLIPSIZED_LENGTH = 55;
|
package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/types.d.ts
CHANGED
|
@@ -63,6 +63,11 @@ export type TableCustomStyles = {
|
|
|
63
63
|
columns?: {
|
|
64
64
|
alternatingColor?: TableColorOptions;
|
|
65
65
|
width?: 'auto' | 'content';
|
|
66
|
+
resizable?: boolean;
|
|
67
|
+
minWidth?: number;
|
|
68
|
+
maxWidth?: number;
|
|
69
|
+
widths?: number[];
|
|
70
|
+
onColumnsResize?: (widths: number[]) => void;
|
|
66
71
|
};
|
|
67
72
|
rows?: {
|
|
68
73
|
alternatingColor?: TableColorOptions;
|
|
@@ -172,6 +172,36 @@ export type TableDesignOptions = {
|
|
|
172
172
|
* 'content' - columns width will be based on content (default option)
|
|
173
173
|
*/
|
|
174
174
|
width?: 'auto' | 'content';
|
|
175
|
+
/**
|
|
176
|
+
* Enables interactive resizing of column widths by dragging the column border.
|
|
177
|
+
* Default value is `true`. Set to `false` to disable.
|
|
178
|
+
*/
|
|
179
|
+
resizable?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Minimum column width in pixels when resizing.
|
|
182
|
+
* Default value is 120.
|
|
183
|
+
*/
|
|
184
|
+
minWidth?: number;
|
|
185
|
+
/**
|
|
186
|
+
* Maximum column width in pixels when resizing.
|
|
187
|
+
* Default value is 350.
|
|
188
|
+
*/
|
|
189
|
+
maxWidth?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Current column pixel widths, in display order. Set by the dashboarding
|
|
192
|
+
* layer to make column widths controlled/persisted; not intended for
|
|
193
|
+
* direct use.
|
|
194
|
+
*
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
widths?: number[];
|
|
198
|
+
/**
|
|
199
|
+
* Fired with the full set of column widths (pixels, in display order)
|
|
200
|
+
* whenever a column resize completes.
|
|
201
|
+
*
|
|
202
|
+
* @internal
|
|
203
|
+
*/
|
|
204
|
+
onColumnsResize?: (widths: number[]) => void;
|
|
175
205
|
};
|
|
176
206
|
/**
|
|
177
207
|
* Rows options
|
|
@@ -27,7 +27,7 @@ export declare function prepareSunburstSeries(chartData: CategoricalChartData, d
|
|
|
27
27
|
levelsCount: number;
|
|
28
28
|
};
|
|
29
29
|
} | {
|
|
30
|
-
color:
|
|
30
|
+
color: string | undefined;
|
|
31
31
|
name?: string | undefined;
|
|
32
32
|
y?: number | null | undefined;
|
|
33
33
|
x?: number | null | undefined;
|
|
@@ -72,7 +72,7 @@ export declare function prepareSunburstSeries(chartData: CategoricalChartData, d
|
|
|
72
72
|
};
|
|
73
73
|
levelSize: {
|
|
74
74
|
unit: string;
|
|
75
|
-
value:
|
|
75
|
+
value: 60 | 50 | 80 | 70;
|
|
76
76
|
};
|
|
77
77
|
} | {
|
|
78
78
|
level: number;
|
|
@@ -10,7 +10,7 @@ export declare function prepareSunburstDataItems(chartData: CategoricalChartData
|
|
|
10
10
|
levelsCount: number;
|
|
11
11
|
};
|
|
12
12
|
} | {
|
|
13
|
-
color:
|
|
13
|
+
color: string | undefined;
|
|
14
14
|
name?: string | undefined;
|
|
15
15
|
y?: number | null | undefined;
|
|
16
16
|
x?: number | null | undefined;
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
3
|
import type { ChartWidgetChangeEvent, ChartWidgetDrilldownSelectionsChangedEvent } from '../../../../domains/widgets/change-events';
|
|
4
4
|
import type { ChartEventProps } from '../../../../props';
|
|
5
|
-
import { ChartDataOptions, ChartType, ChartWidgetStyleOptions, DrilldownOptions
|
|
5
|
+
import { ChartDataOptions, ChartType, ChartWidgetStyleOptions, DrilldownOptions } from '../../../../types';
|
|
6
6
|
import { WidgetConfig } from '../widget/types';
|
|
7
7
|
export type { ChartWidgetChangeEvent, ChartWidgetDrilldownSelectionsChangedEvent };
|
|
8
8
|
/**
|
|
@@ -48,13 +48,6 @@ export interface ChartWidgetProps extends ChartEventProps {
|
|
|
48
48
|
* @category Widget
|
|
49
49
|
*/
|
|
50
50
|
styleOptions?: ChartWidgetStyleOptions;
|
|
51
|
-
/**
|
|
52
|
-
* Configuration for AI-powered widget features such as automated narrative generation
|
|
53
|
-
*
|
|
54
|
-
* @category Widget
|
|
55
|
-
* @alpha
|
|
56
|
-
*/
|
|
57
|
-
aiOptions?: WidgetAiOptions;
|
|
58
51
|
/**
|
|
59
52
|
* List of categories to allow drilldowns on
|
|
60
53
|
*
|
|
@@ -62,10 +55,9 @@ export interface ChartWidgetProps extends ChartEventProps {
|
|
|
62
55
|
*/
|
|
63
56
|
drilldownOptions?: DrilldownOptions;
|
|
64
57
|
/**
|
|
65
|
-
*
|
|
58
|
+
* Configuration of the widget
|
|
66
59
|
*
|
|
67
60
|
* @category Widget
|
|
68
|
-
* @internal
|
|
69
61
|
*/
|
|
70
62
|
config?: WidgetConfig;
|
|
71
63
|
/**
|
|
@@ -8,8 +8,7 @@ export type UseChartWidgetExcelDownloadResult = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Enhances a chart widget header with Excel download menu items (placeholder).
|
|
11
|
-
* Excel menu is shown only when the widget/dashboard allows download
|
|
12
|
-
* the Sisense server feature **`exportingXlsxV2`** is active (`api/globals` → `features`).
|
|
11
|
+
* Excel menu is shown only when the widget/dashboard allows download.
|
|
13
12
|
* **Repeat rows** sets `mergeRows: false`; **Merge rows** sets `mergeRows: true`).
|
|
14
13
|
*
|
|
15
14
|
* @param props - Chart data/config plus `baseHeaderConfig`. `id` is optional; when present it is forwarded as `widgetId` without validation.
|
|
@@ -7,8 +7,8 @@ export type UseCustomWidgetExcelDownloadResult = {
|
|
|
7
7
|
headerConfig: WidgetHeaderConfig;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* Enhances a custom widget header with Excel download menu items when the
|
|
11
|
-
*
|
|
10
|
+
* Enhances a custom widget header with Excel download menu items when the widget/dashboard allows download.
|
|
11
|
+
* **Repeat rows** sets `mergeRows: false`; **Merge rows** sets `mergeRows: true`.
|
|
12
12
|
*
|
|
13
13
|
* @param props - Custom widget data plus `baseHeaderConfig` (typically from {@link useCustomWidgetCsvDownload}).
|
|
14
14
|
* @returns Header config for {@link WidgetContainer}
|
|
@@ -4,7 +4,7 @@ import type { CustomDataCellFormatter, CustomHeaderCellFormatter } from '../../.
|
|
|
4
4
|
import { PivotTableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types';
|
|
5
5
|
import type { PivotTableWidgetChangeEvent, PivotTableWidgetDrilldownSelectionsChangedEvent } from '../../../../domains/widgets/change-events';
|
|
6
6
|
import type { PivotTableDataPointEventHandler } from '../../../../props';
|
|
7
|
-
import { PivotTableDrilldownOptions, PivotTableWidgetStyleOptions
|
|
7
|
+
import { PivotTableDrilldownOptions, PivotTableWidgetStyleOptions } from '../../../../types';
|
|
8
8
|
import { WidgetConfig } from '../widget/types';
|
|
9
9
|
export type { PivotTableWidgetChangeEvent, PivotTableWidgetDrilldownSelectionsChangedEvent };
|
|
10
10
|
/**
|
|
@@ -44,16 +44,9 @@ export interface PivotTableWidgetProps {
|
|
|
44
44
|
*/
|
|
45
45
|
styleOptions?: PivotTableWidgetStyleOptions;
|
|
46
46
|
/**
|
|
47
|
-
* Configuration
|
|
48
|
-
* @alpha
|
|
49
|
-
* @category Widget
|
|
50
|
-
*/
|
|
51
|
-
aiOptions?: WidgetAiOptions;
|
|
52
|
-
/**
|
|
53
|
-
* Widget configuration (e.g. header toolbar menu)
|
|
47
|
+
* Configuration of the widget
|
|
54
48
|
*
|
|
55
49
|
* @category Widget
|
|
56
|
-
* @internal
|
|
57
50
|
*/
|
|
58
51
|
config?: WidgetConfig;
|
|
59
52
|
/**
|
|
@@ -8,8 +8,7 @@ export type UsePivotWidgetExcelDownloadResult = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Enhances a pivot table widget header with Excel download menu items.
|
|
11
|
-
* Excel menu is shown only when the widget/dashboard allows download
|
|
12
|
-
* the Sisense server feature **`exportingXlsxV2`** is active (`api/globals` → `features`).
|
|
11
|
+
* Excel menu is shown only when the widget/dashboard allows download.
|
|
13
12
|
* **Repeat rows** sets `mergeRows: false`; **Merge rows** sets `mergeRows: true`).
|
|
14
13
|
*
|
|
15
14
|
* @param props - Pivot data/config plus `baseHeaderConfig`. `id` is optional; when present it is forwarded as `widgetId` without validation.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WidgetNarrativeConfig } from '../../../../domains/narrative/core/widget-narrative-config';
|
|
1
2
|
import type { BeforeMenuOpenHandler } from '../../../../infra/contexts/menu-provider/types';
|
|
2
3
|
import type { WidgetHeaderConfig } from '../../shared/widget-header/types';
|
|
3
4
|
import type { ChartWidgetProps } from '../chart-widget/types';
|
|
@@ -5,30 +6,41 @@ import type { CustomWidgetProps } from '../custom-widget/types';
|
|
|
5
6
|
import type { PivotTableWidgetProps } from '../pivot-table-widget/types';
|
|
6
7
|
import type { TextWidgetProps } from '../text-widget/types';
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Shared across chart, pivot, text, and custom widgets.
|
|
9
|
+
* Configuration of the widget.
|
|
10
10
|
*/
|
|
11
11
|
export type WidgetConfig = {
|
|
12
12
|
/**
|
|
13
13
|
* Configurations for the widget header (e.g. toolbar menu items)
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
14
16
|
*/
|
|
15
17
|
header?: WidgetHeaderConfig;
|
|
16
18
|
/**
|
|
17
|
-
* Configuration for widget
|
|
18
|
-
*
|
|
19
|
-
* @sisenseInternal
|
|
19
|
+
* Configuration for actions available on the widget, such as
|
|
20
|
+
* downloading the widget's data.
|
|
20
21
|
*/
|
|
21
22
|
actions?: {
|
|
22
23
|
/**
|
|
23
|
-
* Configuration for
|
|
24
|
+
* Configuration for the "Download as CSV" action, which adds an item to the
|
|
25
|
+
* widget's header menu that exports the widget's underlying data as a CSV file.
|
|
24
26
|
*
|
|
25
|
-
* @
|
|
27
|
+
* @example
|
|
28
|
+
* Enable CSV download for a widget:
|
|
29
|
+
* ```ts
|
|
30
|
+
* const widgetConfig: WidgetConfig = {
|
|
31
|
+
* actions: {
|
|
32
|
+
* downloadCsv: {
|
|
33
|
+
* enabled: true,
|
|
34
|
+
* },
|
|
35
|
+
* },
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
26
38
|
*/
|
|
27
39
|
downloadCsv?: {
|
|
28
40
|
/**
|
|
29
|
-
*
|
|
41
|
+
* Whether the "Download as CSV" action is enabled for the widget.
|
|
30
42
|
*
|
|
31
|
-
*
|
|
43
|
+
* @default false
|
|
32
44
|
*/
|
|
33
45
|
enabled?: boolean;
|
|
34
46
|
};
|
|
@@ -46,6 +58,10 @@ export type WidgetConfig = {
|
|
|
46
58
|
enabled?: boolean;
|
|
47
59
|
};
|
|
48
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Configuration for widget narrative.
|
|
63
|
+
*/
|
|
64
|
+
narrative?: WidgetNarrativeConfig;
|
|
49
65
|
};
|
|
50
66
|
/**
|
|
51
67
|
* Type of the widget component.
|
|
@@ -4783,6 +4783,7 @@ export declare function getDashboardFilters(dashboardFilters: Array<FilterDto |
|
|
|
4783
4783
|
datasource?: import("@sisense/sdk-data").JaqlDataSource | undefined;
|
|
4784
4784
|
title: string;
|
|
4785
4785
|
level?: "years" | "quarters" | "months" | "weeks" | "days" | "minutes" | undefined;
|
|
4786
|
+
dateTimePart?: "years" | "quarters" | "months" | "weeks" | "days" | "minutes" | "hours" | "seconds" | undefined;
|
|
4786
4787
|
sort?: "desc" | "asc" | undefined;
|
|
4787
4788
|
in?: {
|
|
4788
4789
|
selected?: {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { FunnelSeriesLabels, PieSeriesLabels, SeriesLabelsBase } from '../../../../../types';
|
|
2
|
+
/** Fusion funnel/pie `style.labels` including value-label formatting fields. */
|
|
3
|
+
export type CategoricalFusionLabels = {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
categories: boolean;
|
|
6
|
+
percent: boolean;
|
|
7
|
+
value: boolean;
|
|
8
|
+
decimals: boolean;
|
|
9
|
+
rotation?: number;
|
|
10
|
+
customRotation?: number | null;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
backgroundColor?: string | null;
|
|
14
|
+
backgroundPadding?: number | null;
|
|
15
|
+
borderColor?: string | null;
|
|
16
|
+
borderWidth?: number | null;
|
|
17
|
+
borderRadius?: number | null;
|
|
18
|
+
xOffset?: number | null;
|
|
19
|
+
yOffset?: number | null;
|
|
20
|
+
};
|
|
21
|
+
export type CategoricalFusionLabelsDto = {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
categories: boolean;
|
|
24
|
+
percent: boolean;
|
|
25
|
+
value: boolean;
|
|
26
|
+
decimals: boolean;
|
|
27
|
+
rotation: number;
|
|
28
|
+
customRotation: number | null;
|
|
29
|
+
prefix: string;
|
|
30
|
+
suffix: string;
|
|
31
|
+
backgroundColor: string | null;
|
|
32
|
+
backgroundPadding: number;
|
|
33
|
+
borderColor: string | null;
|
|
34
|
+
borderWidth: number;
|
|
35
|
+
borderRadius: number;
|
|
36
|
+
xOffset: number;
|
|
37
|
+
yOffset: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Resolves effective label rotation from Fusion DTO (customRotation overrides preset).
|
|
41
|
+
*
|
|
42
|
+
* @param labels - Fusion categorical labels DTO fragment
|
|
43
|
+
* @returns Effective rotation in degrees
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function getFusionCategoricalLabelsRotation(labels: CategoricalFusionLabels): number;
|
|
47
|
+
/**
|
|
48
|
+
* Maps Fusion label formatting fields to CSDK seriesLabels styling props.
|
|
49
|
+
*
|
|
50
|
+
* @param labels - Fusion categorical labels DTO fragment
|
|
51
|
+
* @returns Partial series label styling props derived from Fusion formatting fields
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare function extractCategoricalLabelFormatting(labels: CategoricalFusionLabels): Pick<SeriesLabelsBase, 'rotation' | 'prefix' | 'suffix' | 'backgroundColor' | 'padding' | 'borderColor' | 'borderWidth' | 'borderRadius' | 'xOffset' | 'yOffset'>;
|
|
55
|
+
/**
|
|
56
|
+
* Builds CSDK pie series labels from Fusion funnel/pie `style.labels`.
|
|
57
|
+
*
|
|
58
|
+
* @param labels - Fusion categorical labels DTO
|
|
59
|
+
* @returns Pie series labels configuration
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildPieSeriesLabelsFromFusionLabels(labels: CategoricalFusionLabels): PieSeriesLabels;
|
|
63
|
+
/**
|
|
64
|
+
* Builds CSDK funnel series labels from Fusion funnel/pie `style.labels`.
|
|
65
|
+
*
|
|
66
|
+
* @param labels - Fusion categorical labels DTO
|
|
67
|
+
* @returns Funnel series labels configuration
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildFunnelSeriesLabelsFromFusionLabels(labels: CategoricalFusionLabels): FunnelSeriesLabels;
|
|
71
|
+
type CategoricalSeriesLabels = PieSeriesLabels | FunnelSeriesLabels;
|
|
72
|
+
export declare const DEFAULT_CATEGORICAL_FUSION_LABEL_FORMATTING: {
|
|
73
|
+
readonly rotation: 0;
|
|
74
|
+
readonly customRotation: null;
|
|
75
|
+
readonly prefix: "";
|
|
76
|
+
readonly suffix: "";
|
|
77
|
+
readonly backgroundColor: null;
|
|
78
|
+
readonly backgroundPadding: 2;
|
|
79
|
+
readonly borderColor: null;
|
|
80
|
+
readonly borderWidth: 1;
|
|
81
|
+
readonly borderRadius: 0;
|
|
82
|
+
readonly xOffset: 0;
|
|
83
|
+
readonly yOffset: 0;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Maps CSDK seriesLabels back to Fusion funnel/pie `style.labels` DTO.
|
|
87
|
+
*
|
|
88
|
+
* @param labels - Partial Fusion categorical labels DTO fragment, if any
|
|
89
|
+
* @param seriesLabels - CSDK pie or funnel series label options
|
|
90
|
+
* @returns Fusion categorical labels DTO with formatting defaults applied
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare function toFusionCategoricalLabelsFromSeriesLabels(labels: Partial<CategoricalFusionLabels> | undefined, seriesLabels: CategoricalSeriesLabels | undefined): CategoricalFusionLabelsDto;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { SeriesLabelsBase } from '../../../../../types';
|
|
2
|
+
/** Fusion widget `seriesLabels` / categorical `labels` affix formatting fields. */
|
|
3
|
+
export type FusionSeriesLabelAffix = {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
suffix?: string;
|
|
6
|
+
backgroundColor?: string | null;
|
|
7
|
+
backgroundPadding?: number | null;
|
|
8
|
+
borderColor?: string | null;
|
|
9
|
+
borderWidth?: number | null;
|
|
10
|
+
borderRadius?: number | null;
|
|
11
|
+
xOffset?: number | null;
|
|
12
|
+
yOffset?: number | null;
|
|
13
|
+
};
|
|
14
|
+
type PublicSeriesLabelAffix = Pick<SeriesLabelsBase, 'prefix' | 'suffix' | 'backgroundColor' | 'padding' | 'borderColor' | 'borderWidth' | 'borderRadius' | 'xOffset' | 'yOffset'>;
|
|
15
|
+
/**
|
|
16
|
+
* Clearable affix fields used during Fusion → StyleOptions translation.
|
|
17
|
+
* `null` means an explicit reset; normalized away before public StyleOptions.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export type InternalSeriesLabelAffix = {
|
|
22
|
+
[K in keyof PublicSeriesLabelAffix]?: PublicSeriesLabelAffix[K] | null;
|
|
23
|
+
};
|
|
24
|
+
type SeriesLabelColor = NonNullable<SeriesLabelsBase['backgroundColor']>;
|
|
25
|
+
/**
|
|
26
|
+
* Maps internal affix fields (which may carry explicit `null` clears) to public
|
|
27
|
+
* StyleOptions fields. Cleared values are omitted from the public shape.
|
|
28
|
+
*
|
|
29
|
+
* @param affix - Internal affix fragment, possibly containing explicit clears
|
|
30
|
+
* @returns Public series label affix fields safe for StyleOptions
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function toPublicSeriesLabelAffixFields(affix: Partial<InternalSeriesLabelAffix>): Partial<PublicSeriesLabelAffix>;
|
|
34
|
+
/**
|
|
35
|
+
* Maps CSDK series label color to Fusion string color; gradients and `auto` are not supported.
|
|
36
|
+
*
|
|
37
|
+
* @param color - CSDK series label color value
|
|
38
|
+
* @returns Fusion-compatible color string, or `undefined` when not representable
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare const toFusionSeriesLabelColor: (color: SeriesLabelColor | string | null | undefined) => string | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Maps Fusion series label affix fields to internal CSDK affix props.
|
|
44
|
+
* Each field is mapped independently so pie/funnel and cartesian charts share the same rules.
|
|
45
|
+
*
|
|
46
|
+
* @param labels - Fusion series label affix fragment
|
|
47
|
+
* @returns Partial internal affix props; may include explicit `null` clears
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function extractSeriesLabelAffixFromFusion(labels: FusionSeriesLabelAffix): Partial<InternalSeriesLabelAffix>;
|
|
51
|
+
/**
|
|
52
|
+
* Maps CSDK seriesLabels affix fields to a Fusion DTO fragment.
|
|
53
|
+
*
|
|
54
|
+
* @param seriesLabels - CSDK series label affix fields
|
|
55
|
+
* @returns Fusion series label affix fragment
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare function toFusionSeriesLabelAffixFromSdk(seriesLabels: Partial<PublicSeriesLabelAffix> | undefined): FusionSeriesLabelAffix;
|
|
59
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PivotGrandTotals } from '@sisense/sdk-data';
|
|
2
2
|
import type { BoxWhiskerType } from '../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
3
3
|
import { AppSettings } from '../../../../../infra/app/settings/settings.js';
|
|
4
|
-
import type { AreamapType, AreaStyleOptions, AxisLabel, BoxplotStyleOptions, CalendarHeatmapStyleOptions, CompleteThemeSettingsInternal, DataLimits, FunnelStyleOptions, IndicatorStyleOptions, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, ScattermapStyleOptions, ScatterStyleOptions, SeriesLabels, StackableStyleOptions, SunburstStyleOptions, TableStyleOptions, TreemapStyleOptions, WidgetStyleOptions } from '../../../../../types.js';
|
|
4
|
+
import type { AreamapType, AreaStyleOptions, AxisLabel, BoxplotStyleOptions, CalendarHeatmapStyleOptions, CompleteThemeSettingsInternal, DataLimits, FunnelStyleOptions, IndicatorStyleOptions, LegendOptions, LineOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, ScattermapStyleOptions, ScatterStyleOptions, SeriesLabels, StackableStyleOptions, SunburstStyleOptions, TableStyleOptions, TreemapStyleOptions, WidgetStyleOptions } from '../../../../../types.js';
|
|
5
5
|
import type { AxisStyle, BoxplotWidgetStyle, CalendarHeatmapWidgetStyle, CartesianWidgetStyle, FunnelWidgetStyle, PivotWidgetStyle, PolarWidgetStyle, ScattermapWidgetStyle, ScatterWidgetStyle, SunburstWidgetStyle, TableWidgetStyle, TreemapWidgetStyle, WidgetDesign, WidgetStyle, WidgetSubtype } from '../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Maps SDK legend options to Fusion DTO legend style.
|
|
@@ -42,6 +42,18 @@ export type LineWidthToken = (typeof LINE_WIDTH_TOKENS)[number];
|
|
|
42
42
|
export declare function toLineWidthStyle(lineWidth?: LineWidth | {
|
|
43
43
|
width?: string | number;
|
|
44
44
|
}): CartesianWidgetStyle['lineWidth'];
|
|
45
|
+
/**
|
|
46
|
+
* Maps CSDK line.width (px) to Fusion lineWidth.customWidth on DTO.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function toLineCustomWidthStyle(line?: LineOptions): number | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Maps SDK line dash options to Fusion DTO line style.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export declare function toLineDashStyle(line?: LineOptions): CartesianWidgetStyle['line'];
|
|
45
57
|
/**
|
|
46
58
|
* Maps SDK markers options to Fusion DTO markers style.
|
|
47
59
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { WidgetNarrativeConfig } from '../../../../../domains/narrative/core/widget-narrative-config';
|
|
1
2
|
import type { WidgetDtoNarration, WidgetStyle } from '../../../../../domains/widgets/components/widget-by-id/types.js';
|
|
2
|
-
import type { WidgetNarrativeOptions } from '../../../../../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Maps Fusion `style.narration` into SDK {@link
|
|
4
|
+
* Maps Fusion `style.narration` into SDK {@link WidgetNarrativeConfig},
|
|
5
5
|
* including `feedback` when present on the DTO.
|
|
6
6
|
*
|
|
7
7
|
* Reads boolean `autoShow`; legacy string `displayMode` (`onLoad` / `onClick`) is still accepted for
|
|
@@ -11,21 +11,21 @@ import type { WidgetNarrativeOptions } from '../../../../../types.js';
|
|
|
11
11
|
* @returns Partial narrative options, or `undefined` when absent or empty
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function extractWidgetNarrativeConfigFromDto(dto: WidgetDtoNarration | undefined): WidgetNarrativeConfig | undefined;
|
|
15
15
|
/**
|
|
16
|
-
* Builds Fusion `style.narration` from SDK {@link
|
|
16
|
+
* Builds Fusion `style.narration` from SDK {@link WidgetNarrativeConfig} only (typed fields).
|
|
17
17
|
*
|
|
18
|
-
* @param narrative - SDK narrative slice from {@link
|
|
18
|
+
* @param narrative - SDK narrative slice from {@link WidgetConfig.narrative}
|
|
19
19
|
* @returns Narration DTO, or `undefined` when nothing should be written
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function narrativeConfigToWidgetDtoNarration(narrative: WidgetNarrativeConfig | undefined): WidgetDtoNarration | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* Merges narrative options onto a Fusion widget `style` object for {@link toWidgetDto}.
|
|
25
25
|
*
|
|
26
26
|
* @param baseStyle - Chart or pivot style object without narration
|
|
27
|
-
* @param narrative - SDK narrative from {@link WidgetModel.
|
|
27
|
+
* @param narrative - SDK narrative from {@link WidgetModel.config}
|
|
28
28
|
* @returns `WidgetStyle` with narration merged, or base style unchanged when narrative is absent
|
|
29
29
|
* @internal
|
|
30
30
|
*/
|
|
31
|
-
export declare function mergeWidgetStyleWithNarrativeForDto(baseStyle: WidgetStyle, narrative:
|
|
31
|
+
export declare function mergeWidgetStyleWithNarrativeForDto(baseStyle: WidgetStyle, narrative: WidgetNarrativeConfig | undefined): WidgetStyle;
|