@sisense/sdk-ui 2.7.0 → 2.9.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 +29 -29
- package/dist/ai.js +175 -193
- package/dist/analytics-composer/node.cjs +1 -0
- package/dist/analytics-composer/node.d.ts +1 -0
- package/dist/analytics-composer/node.js +897 -0
- package/dist/analytics-composer.cjs +118 -118
- package/dist/analytics-composer.js +2244 -2951
- package/dist/{derive-chart-family-DvYmrG1k.js → derive-chart-family-BLG1sO1D.js} +41019 -47803
- package/dist/derive-chart-family-QPmz5DJ3.cjs +656 -0
- package/dist/{dimensions-WmjaZcrG.js → dimensions-B2jz151s.js} +2 -3
- package/dist/dimensions-CVJeJ8mi.cjs +1 -0
- package/dist/execute-query-Cp3se7Yb.cjs +1 -0
- package/dist/execute-query-agpyzZz6.js +6406 -0
- package/dist/index.cjs +25 -25
- package/dist/index.js +6612 -6353
- package/dist/index.umd.js +355 -389
- package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
- package/dist/packages/sdk-ui/src/analytics-composer/index-node.d.ts +9 -0
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +26 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +44 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +30 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query-to-jaql.d.ts +18 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query.d.ts +224 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +28 -1
- package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/helpers/use-translated-data-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/y-axis.d.ts +28 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/helpers/design-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/line-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data/index.d.ts +10 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data-options/index.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/design-options/index.d.ts +18 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/polar-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/area-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/helpers/design-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/labels-spacing.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/labels-spacing.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/axes.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/labels-spacing.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/helpers/highchart-options/stacking.d.ts +21 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +9 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +7 -7
- package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart-data/data-coloring/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +155 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +39 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +45 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/date-utils.d.ts +27 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +33 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +0 -10
- package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/defaults/cartesian.d.ts +4 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +5 -12
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +2 -2
- package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
- package/dist/packages/sdk-ui/src/const.d.ts +2 -0
- package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
- package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
- package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +23 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +45 -2
- package/dist/packages/sdk-ui/src/pivot-table/formatters/utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/use-apply-pivot-table-cell-events.d.ts +18 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +6 -3
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
- package/dist/packages/sdk-ui/src/props.d.ts +122 -1
- package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +7 -6
- package/dist/packages/sdk-ui/src/query/date-formats/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query/execute-query.d.ts +3 -1
- package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
- package/dist/packages/sdk-ui/src/types.d.ts +57 -3
- package/dist/packages/sdk-ui/src/utils/__development-utils__/highcharts-options-builder-collector.d.ts +61 -0
- package/dist/packages/sdk-ui/src/utils/__development-utils__/input-output-collector.d.ts +125 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-panel-color-format.d.ts +9 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-statistical-models.d.ts +10 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +0 -14
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +6 -4
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
- package/dist/types-BYUVZb6u.js +80 -0
- package/dist/types-QUSMO7gF.cjs +1 -0
- package/dist/use-common-filters-DmdADAhl.cjs +350 -0
- package/dist/{use-common-filters-CVgB69Xe.js → use-common-filters-wo5IRF5u.js} +6326 -6441
- package/dist/{widget-composer-B4eAv2pf.js → widget-composer-BG4HonVl.js} +159 -239
- package/dist/{widget-composer-D0FZj1tX.cjs → widget-composer-CGp5yOny.cjs} +9 -9
- package/package.json +27 -17
- package/dist/derive-chart-family-BCY-GLVZ.cjs +0 -672
- package/dist/dimensions-DAISVpEZ.cjs +0 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +0 -41
- package/dist/use-common-filters-CRrL9rOQ.cjs +0 -350
package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataLabelsOptions } from '@sisense/sisense-charts';
|
|
2
|
-
import {
|
|
2
|
+
import { TextStyle } from './types';
|
|
3
3
|
import { AxisOrientation } from './axis-section';
|
|
4
4
|
import { HighchartsDataPointContext } from './tooltip-utils';
|
|
5
5
|
import { PolarType } from './design-options';
|
|
@@ -18,7 +18,7 @@ export type ValueLabelSettings = {
|
|
|
18
18
|
rotation?: number;
|
|
19
19
|
y?: number;
|
|
20
20
|
x?: number;
|
|
21
|
-
style?:
|
|
21
|
+
style?: TextStyle;
|
|
22
22
|
overflow?: string;
|
|
23
23
|
allowOverlap?: boolean;
|
|
24
24
|
verticalAlign?: 'bottom' | 'middle' | 'top';
|
|
@@ -3,3 +3,5 @@ export declare const SYSTEM_TENANT_NAME = "system";
|
|
|
3
3
|
export declare const DEFAULT_TEXT_COLOR = "#5B6372";
|
|
4
4
|
export declare const DEFAULT_BACKGROUND_COLOR = "#F4F4F8";
|
|
5
5
|
export declare const ERROR_COLOR = "#FA5656";
|
|
6
|
+
export declare const NOT_AVAILABLE_DATA_VALUE = "N\\A";
|
|
7
|
+
export declare const NOT_AVAILABLE_TEXT = "N/A";
|
|
@@ -7,7 +7,16 @@ import { GenericDataOptions } from '../types';
|
|
|
7
7
|
export interface CustomWidgetComponentProps<DataOptions = GenericDataOptions, StyleOptions = any> {
|
|
8
8
|
dataSource?: DataSource;
|
|
9
9
|
dataOptions: DataOptions;
|
|
10
|
-
styleOptions: StyleOptions
|
|
10
|
+
styleOptions: StyleOptions & {
|
|
11
|
+
/**
|
|
12
|
+
* The width of the custom widget component.
|
|
13
|
+
*/
|
|
14
|
+
width?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The height of the custom widget component.
|
|
17
|
+
*/
|
|
18
|
+
height?: number;
|
|
19
|
+
};
|
|
11
20
|
filters?: Filter[] | FilterRelations;
|
|
12
21
|
highlights?: Filter[];
|
|
13
22
|
description?: string;
|
package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts
CHANGED
|
@@ -14,11 +14,15 @@ type DraggableLineProps = {
|
|
|
14
14
|
* The orientation of the draggable line
|
|
15
15
|
*/
|
|
16
16
|
orientation?: DraggableLineOrientation;
|
|
17
|
+
/**
|
|
18
|
+
* The aria-label of the draggable line
|
|
19
|
+
*/
|
|
20
|
+
ariaLabel?: string;
|
|
17
21
|
};
|
|
18
22
|
/**
|
|
19
23
|
* Renders a draggable line component that can be used to resize columns or rows
|
|
20
24
|
*
|
|
21
25
|
* @internal
|
|
22
26
|
*/
|
|
23
|
-
export declare const DraggableLine: ({ id, orientation }: DraggableLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const DraggableLine: ({ id, orientation, ariaLabel, }: DraggableLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
28
|
export {};
|
|
@@ -23,6 +23,8 @@ export declare const useDashboardThemeInternal: ({ styleOptions }: DashboardThem
|
|
|
23
23
|
primaryTextColor: string;
|
|
24
24
|
secondaryTextColor: string;
|
|
25
25
|
backgroundColor: string;
|
|
26
|
+
dividerLineColor: string;
|
|
27
|
+
dividerLineWidth: number;
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
30
|
palette?: import("..").ColorPaletteTheme | undefined;
|
|
@@ -47,6 +49,8 @@ export declare const useDashboardTheme: (args_0: DashboardThemeParams) => {
|
|
|
47
49
|
primaryTextColor: string;
|
|
48
50
|
secondaryTextColor: string;
|
|
49
51
|
backgroundColor: string;
|
|
52
|
+
dividerLineColor: string;
|
|
53
|
+
dividerLineWidth: number;
|
|
50
54
|
};
|
|
51
55
|
};
|
|
52
56
|
palette?: import("..").ColorPaletteTheme | undefined;
|
|
@@ -36,6 +36,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
36
36
|
};
|
|
37
37
|
componentDidCatch(error: Error): void;
|
|
38
38
|
componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
|
|
39
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
39
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
40
40
|
}
|
|
41
41
|
export {};
|
|
@@ -9,6 +9,6 @@ interface Props {
|
|
|
9
9
|
export declare const useMembers: ({ initialMembers, initialSelectedMembers, onUpdateSelectedMembers, disabled, }: Props) => {
|
|
10
10
|
members: Member[];
|
|
11
11
|
selectedMembers: import("./members-reducer").SelectedMember[];
|
|
12
|
-
dispatch: import("react").
|
|
12
|
+
dispatch: import("react").ActionDispatch<[action: import("./members-reducer").MembersAction]>;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CustomDataCellFormatter, CustomHeaderCellFormatter, CellFormattingResult } from './types.js';
|
|
2
|
+
import type { JaqlPanel, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
|
|
3
|
+
import type { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
|
|
4
|
+
/**
|
|
5
|
+
* Applies a formatting result to a data cell, mutating the cell object
|
|
6
|
+
* @param cell - The cell to apply formatting to
|
|
7
|
+
* @param result - The formatting result to apply
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyCellFormattingResult(cell: PivotDataNode | PivotTreeNode, result: CellFormattingResult): void;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a unified formatter that handles functional formatters by applying their results
|
|
12
|
+
*
|
|
13
|
+
* @param formatter - A functional formatter that returns formatting information
|
|
14
|
+
* @returns A function that applies the formatter result to the cell
|
|
15
|
+
*/
|
|
16
|
+
export declare function createUnifiedDataCellFormatter(formatter: CustomDataCellFormatter, dataOptions: PivotTableDataOptionsInternal): (cell: PivotDataNode, rowItem: PivotTreeNode, columnItem: PivotTreeNode, jaqlPanelItem: JaqlPanel) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a unified header cell formatter that handles functional formatters by applying their results
|
|
19
|
+
*
|
|
20
|
+
* @param formatter - A functional header formatter that returns formatting information
|
|
21
|
+
* @returns A function that applies the formatter result to the header cell
|
|
22
|
+
*/
|
|
23
|
+
export declare function createUnifiedHeaderCellFormatter(formatter: CustomHeaderCellFormatter, dataOptions: PivotTableDataOptionsInternal): (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel | undefined) => void;
|
|
@@ -1,4 +1,47 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { JaqlPanel, JaqlRequest, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import { AnyColumn } from '../../chart-data-options/types';
|
|
4
|
+
/**
|
|
5
|
+
* Formatting result that can be applied to a header cell
|
|
6
|
+
*/
|
|
7
|
+
export interface CellFormattingResult {
|
|
8
|
+
/** Text content to display in the cell */
|
|
9
|
+
content?: string;
|
|
10
|
+
/** Inline styles to apply to the cell */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Data cell formatter that returns formatting information instead of mutating parameters
|
|
15
|
+
*/
|
|
16
|
+
export type DataCellFormatter = (cell: PivotDataNode, rowItem: PivotTreeNode, columnItem: PivotTreeNode, jaqlPanelItem: JaqlPanel) => CellFormattingResult | void;
|
|
17
|
+
/**
|
|
18
|
+
* Applies custom formatting to pivot table data cells.
|
|
19
|
+
*
|
|
20
|
+
* This function is called for each data cell in the pivot table and can return
|
|
21
|
+
* formatting information to customize the cell's appearance and behavior.
|
|
22
|
+
*
|
|
23
|
+
* @param cell - The pivot data cell being formatted
|
|
24
|
+
* @param jaqlPanelItem - JAQL panel metadata for the cell
|
|
25
|
+
* @param dataOption - The data option configuration for this cell
|
|
26
|
+
* @param id - Unique identifier for the data option
|
|
27
|
+
* @returns Formatting result object or void to skip formatting
|
|
28
|
+
*/
|
|
29
|
+
export type CustomDataCellFormatter = (cell: PivotDataNode, jaqlPanelItem: JaqlPanel, dataOption: AnyColumn, id: string) => CellFormattingResult | void;
|
|
30
|
+
/**
|
|
31
|
+
* Header cell formatter that returns formatting information instead of mutating parameters
|
|
32
|
+
*/
|
|
33
|
+
export type HeaderCellFormatter = (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel, jaql: JaqlRequest) => CellFormattingResult | void;
|
|
34
|
+
/**
|
|
35
|
+
* Applies custom formatting to pivot table header cells.
|
|
36
|
+
*
|
|
37
|
+
* This function is called for each row and column header cell in the pivot table
|
|
38
|
+
* and can return formatting information to customize the header's appearance and behavior.
|
|
39
|
+
*
|
|
40
|
+
* @param cell - The pivot header cell being formatted
|
|
41
|
+
* @param jaqlPanelItem - JAQL panel metadata for the cell (may be undefined for certain header types)
|
|
42
|
+
* @param dataOption - The data option configuration for this cell (optional)
|
|
43
|
+
* @param id - Unique identifier for the data option (optional)
|
|
44
|
+
* @returns Formatting result object or void to skip formatting
|
|
45
|
+
*/
|
|
46
|
+
export type CustomHeaderCellFormatter = (cell: PivotTreeNode, jaqlPanelItem: JaqlPanel | undefined, dataOption?: AnyColumn, id?: string) => CellFormattingResult | void;
|
|
4
47
|
export type DateFormatter = (date: Date, format: string) => string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Column } from '@sisense/sdk-data';
|
|
2
2
|
import { type PivotTableDataOptions, type StyledColumn, type AnyColumn } from '../../chart-data-options/types';
|
|
3
3
|
export declare const getPivotDataOptionByJaqlIndex: (dataOptions: PivotTableDataOptions, dataOptionIndex?: number) => AnyColumn | undefined;
|
|
4
|
+
export declare const getPivotDataOptionIdByJaqlIndex: (dataOptions: PivotTableDataOptions, dataOptionIndex?: number) => string | undefined;
|
|
4
5
|
export declare const getNumberFormatConfig: (dataOption?: AnyColumn) => Required<import("../..").NumberFormatConfig>;
|
|
5
6
|
export declare const getDateFormatConfig: (dataOption: Column | StyledColumn) => string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PivotTableDataOptionsInternal } from '../../../chart-data-options/types';
|
|
2
|
+
import { PivotTableDataPoint } from '../../../types';
|
|
3
|
+
import { PivotTableCellPayload } from './types';
|
|
4
|
+
export declare const getPivotTableDataPoint: (cellPayload: PivotTableCellPayload, dataOptions: PivotTableDataOptionsInternal) => PivotTableDataPoint;
|
package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useApplyPivotTableCellEvents } from './use-apply-pivot-table-cell-events';
|
package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type AbstractDataTreeNode = {
|
|
2
|
+
value: string;
|
|
3
|
+
content: string;
|
|
4
|
+
level: number;
|
|
5
|
+
metadataType: string;
|
|
6
|
+
userType: string;
|
|
7
|
+
parent: AbstractDataTreeNode | undefined;
|
|
8
|
+
};
|
|
9
|
+
export type ValueDataNode = AbstractDataTreeNode & {
|
|
10
|
+
index: number;
|
|
11
|
+
metadataType: 'measures';
|
|
12
|
+
userType: 'measureBottom' | 'measureTop';
|
|
13
|
+
};
|
|
14
|
+
export type RowDataNode = AbstractDataTreeNode & {
|
|
15
|
+
index: number;
|
|
16
|
+
metadataType: 'rows';
|
|
17
|
+
userType: 'corner' | 'subTotal' | 'grandTotal';
|
|
18
|
+
};
|
|
19
|
+
export type ColumnDataNode = AbstractDataTreeNode & {
|
|
20
|
+
index: number;
|
|
21
|
+
metadataType: 'columns';
|
|
22
|
+
userType: 'subTotal' | 'grandTotal';
|
|
23
|
+
};
|
|
24
|
+
export type PivotTableCellPayload = {
|
|
25
|
+
dataNode: ValueDataNode | RowDataNode | ColumnDataNode;
|
|
26
|
+
rowTreeNode?: RowDataNode;
|
|
27
|
+
columnTreeNode?: ColumnDataNode;
|
|
28
|
+
measureTreeNode?: ValueDataNode;
|
|
29
|
+
isDataCell: boolean;
|
|
30
|
+
event: MouseEvent;
|
|
31
|
+
};
|
|
32
|
+
export type { AbstractDataTreeNode };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PivotTableDataOptionsInternal } from '../../../chart-data-options/types';
|
|
2
|
+
import { PivotTableDataPointEventHandler } from '../../../index-typedoc';
|
|
3
|
+
import { PivotTableCellPayload } from './types';
|
|
4
|
+
type UseApplyPivotTableCellEventsProps = {
|
|
5
|
+
dataOptions: PivotTableDataOptionsInternal;
|
|
6
|
+
onDataPointClick?: PivotTableDataPointEventHandler;
|
|
7
|
+
onDataPointContextMenu?: PivotTableDataPointEventHandler;
|
|
8
|
+
};
|
|
9
|
+
type UseApplyPivotTableCellEventsResult = {
|
|
10
|
+
handlePivotTableCellClick: (payload: PivotTableCellPayload) => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A hook that applies pivot table cell events.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const useApplyPivotTableCellEvents: ({ dataOptions, onDataPointClick, onDataPointContextMenu, }: UseApplyPivotTableCellEventsProps) => UseApplyPivotTableCellEventsResult;
|
|
18
|
+
export {};
|
package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractDataTreeNode } from './types';
|
|
2
|
+
export declare function getTreeNodeByLevel(node: AbstractDataTreeNode, level: number): AbstractDataTreeNode;
|
|
3
|
+
export declare function isSubTotalTreeNode(node: AbstractDataTreeNode, type: 'rows' | 'columns'): boolean;
|
|
4
|
+
export declare function isGrandTotalTreeNode(node: AbstractDataTreeNode, type: 'rows' | 'columns'): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Safely performs modulo operation, returning 0 if divisor is null/undefined or 0
|
|
7
|
+
* @param dividend - The dividend number (defaults to 0 if not provided)
|
|
8
|
+
* @param divisor - The divisor number (optional)
|
|
9
|
+
* @returns The result of dividend % divisor, or 0 if divisor is invalid
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeModulo(dividend?: number, divisor?: number): number;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type DataService } from '@sisense/sdk-pivot-client';
|
|
2
|
-
import { type
|
|
2
|
+
import { type PivotTableDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
|
+
import { type CustomDataCellFormatter, type CustomHeaderCellFormatter } from '../../pivot-table/formatters/types';
|
|
3
4
|
/**
|
|
4
5
|
* A hook that applies formatting over pivot table cells.
|
|
5
6
|
*
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
8
|
-
export declare const useApplyPivotTableFormatting: ({ dataService, dataOptions, }: {
|
|
9
|
+
export declare const useApplyPivotTableFormatting: ({ dataService, dataOptions, onDataCellFormat, onHeaderCellFormat, }: {
|
|
9
10
|
dataService: DataService;
|
|
10
|
-
dataOptions:
|
|
11
|
+
dataOptions: PivotTableDataOptionsInternal;
|
|
12
|
+
onDataCellFormat?: CustomDataCellFormatter | undefined;
|
|
13
|
+
onHeaderCellFormat?: CustomHeaderCellFormatter | undefined;
|
|
11
14
|
}) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type PivotBuilder } from '@sisense/sdk-pivot-client';
|
|
3
2
|
import type { CompleteThemeSettings, PivotTableStyleOptions } from '../../types';
|
|
4
|
-
import type {
|
|
3
|
+
import type { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
|
|
5
4
|
import type { ContainerSize } from '../../dynamic-size-container/dynamic-size-container';
|
|
5
|
+
import { PivotTableDataPointEventHandler } from '../../index-typedoc';
|
|
6
6
|
type PivotRenderOptions = {
|
|
7
7
|
/** The pivot builder instance. */
|
|
8
8
|
pivotBuilder: PivotBuilder;
|
|
9
9
|
/** The pivot table data options. */
|
|
10
|
-
dataOptions:
|
|
10
|
+
dataOptions: PivotTableDataOptionsInternal;
|
|
11
11
|
/** The pivot table style options. */
|
|
12
12
|
styleOptions: PivotTableStyleOptions;
|
|
13
13
|
/** The theme settings. */
|
|
@@ -16,11 +16,15 @@ type PivotRenderOptions = {
|
|
|
16
16
|
size: ContainerSize | null;
|
|
17
17
|
/** Callback to handle total height change. */
|
|
18
18
|
onTotalHeightChange?: (totalHeight: number) => void;
|
|
19
|
+
/** Callback to handle data point click. */
|
|
20
|
+
onDataPointClick?: PivotTableDataPointEventHandler;
|
|
21
|
+
/** Callback to handle data point context menu. */
|
|
22
|
+
onDataPointContextMenu?: PivotTableDataPointEventHandler;
|
|
19
23
|
};
|
|
20
24
|
/**
|
|
21
25
|
* A hook that renders the pivot table.
|
|
22
26
|
*/
|
|
23
|
-
export declare function useRenderPivot({ pivotBuilder, dataOptions, styleOptions, themeSettings, size, onTotalHeightChange, }: PivotRenderOptions): {
|
|
27
|
+
export declare function useRenderPivot({ pivotBuilder, dataOptions, styleOptions, themeSettings, size, onTotalHeightChange, onDataPointClick, onDataPointContextMenu, }: PivotRenderOptions): {
|
|
24
28
|
pivotElement: JSX.Element | null;
|
|
25
29
|
};
|
|
26
30
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuAlignment, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, WidgetByIdStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions, DrilldownSelection, TextWidgetStyleOptions, GenericDataOptions, IndicatorRenderOptions, TabberStyleProps, IndicatorDataPoint, TextWidgetDataPoint, CustomWidgetStyleOptions } from './types';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuAlignment, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, WidgetByIdStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions, DrilldownSelection, TextWidgetStyleOptions, GenericDataOptions, IndicatorRenderOptions, TabberStyleProps, IndicatorDataPoint, TextWidgetDataPoint, CustomWidgetStyleOptions, PivotTableDataPoint } from './types';
|
|
3
|
+
import { type CustomDataCellFormatter, type CustomHeaderCellFormatter } from './pivot-table/formatters/types';
|
|
3
4
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
5
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
6
|
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions, RegularChartDataOptions, TabularChartDataOptions, RangeChartDataOptions } from './chart-data-options/types';
|
|
@@ -306,6 +307,14 @@ export type TextWidgetDataPointEventHandler = (
|
|
|
306
307
|
point: TextWidgetDataPoint,
|
|
307
308
|
/** Native MouseEvent */
|
|
308
309
|
nativeEvent: MouseEvent) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Click handler for when a pivot table cell is clicked.
|
|
312
|
+
*/
|
|
313
|
+
export type PivotTableDataPointEventHandler = (
|
|
314
|
+
/** Data point that was clicked */
|
|
315
|
+
point: PivotTableDataPoint,
|
|
316
|
+
/** Native MouseEvent */
|
|
317
|
+
nativeEvent: MouseEvent) => void;
|
|
309
318
|
interface HighchartsBasedChartEventProps {
|
|
310
319
|
/**
|
|
311
320
|
* A callback that allows you to customize the underlying chart element before it is rendered.
|
|
@@ -871,6 +880,62 @@ export interface PivotTableProps {
|
|
|
871
880
|
* @internal
|
|
872
881
|
*/
|
|
873
882
|
onHeightChange?: (height: number) => void;
|
|
883
|
+
/**
|
|
884
|
+
* Callback function that is called when the pivot table cell is clicked
|
|
885
|
+
*
|
|
886
|
+
* @internal
|
|
887
|
+
*/
|
|
888
|
+
onDataPointClick?: PivotTableDataPointEventHandler;
|
|
889
|
+
/**
|
|
890
|
+
* Callback function that is called when the pivot table cell is right-clicked
|
|
891
|
+
*
|
|
892
|
+
* @internal
|
|
893
|
+
*/
|
|
894
|
+
onDataPointContextMenu?: PivotTableDataPointEventHandler;
|
|
895
|
+
/**
|
|
896
|
+
* Applies custom styling and behavior to pivot table data cells.
|
|
897
|
+
*
|
|
898
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
899
|
+
* following functional programming principles. Use this single callback to combine
|
|
900
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
901
|
+
*
|
|
902
|
+
* @example
|
|
903
|
+
* ```typescript
|
|
904
|
+
* const customDataFormatter: CustomDataCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
905
|
+
* if (cell.value > 1000) {
|
|
906
|
+
* return {
|
|
907
|
+
* style: { backgroundColor: 'lightgreen' },
|
|
908
|
+
* content: `${cell.value} (High)`
|
|
909
|
+
* };
|
|
910
|
+
* }
|
|
911
|
+
* };
|
|
912
|
+
* ```
|
|
913
|
+
*
|
|
914
|
+
* @internal
|
|
915
|
+
*/
|
|
916
|
+
onDataCellFormat?: CustomDataCellFormatter;
|
|
917
|
+
/**
|
|
918
|
+
* Applies custom styling and behavior to pivot table row and column headers.
|
|
919
|
+
*
|
|
920
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
921
|
+
* following functional programming principles. Use this single callback to combine
|
|
922
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
923
|
+
*
|
|
924
|
+
* @example
|
|
925
|
+
* ```typescript
|
|
926
|
+
* const customHeaderFormatter: CustomHeaderCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
927
|
+
* if (cell.content === 'Total') {
|
|
928
|
+
* return {
|
|
929
|
+
* style: { fontWeight: 'bold', color: 'blue' },
|
|
930
|
+
* className: 'total-header'
|
|
931
|
+
* };
|
|
932
|
+
* }
|
|
933
|
+
* };
|
|
934
|
+
* ```
|
|
935
|
+
*
|
|
936
|
+
* @internal
|
|
937
|
+
*/
|
|
938
|
+
onHeaderCellFormat?: CustomHeaderCellFormatter;
|
|
874
939
|
}
|
|
875
940
|
/**
|
|
876
941
|
* Props of the {@link ScatterChart} component.
|
|
@@ -1182,6 +1247,62 @@ export interface PivotTableWidgetProps {
|
|
|
1182
1247
|
* @category Widget
|
|
1183
1248
|
*/
|
|
1184
1249
|
description?: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Callback function that is called when the pivot table cell is clicked
|
|
1252
|
+
*
|
|
1253
|
+
* @internal
|
|
1254
|
+
*/
|
|
1255
|
+
onDataPointClick?: PivotTableDataPointEventHandler;
|
|
1256
|
+
/**
|
|
1257
|
+
* Callback function that is called when the pivot table cell is right-clicked
|
|
1258
|
+
*
|
|
1259
|
+
* @internal
|
|
1260
|
+
*/
|
|
1261
|
+
onDataPointContextMenu?: PivotTableDataPointEventHandler;
|
|
1262
|
+
/**
|
|
1263
|
+
* Applies custom styling and behavior to pivot table data cells.
|
|
1264
|
+
*
|
|
1265
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
1266
|
+
* following functional programming principles. Use this single callback to combine
|
|
1267
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
1268
|
+
*
|
|
1269
|
+
* @example
|
|
1270
|
+
* ```typescript
|
|
1271
|
+
* const customDataFormatter: CustomDataCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
1272
|
+
* if (cell.value > 1000) {
|
|
1273
|
+
* return {
|
|
1274
|
+
* style: { backgroundColor: 'lightgreen' },
|
|
1275
|
+
* content: `${cell.value} (High)`
|
|
1276
|
+
* };
|
|
1277
|
+
* }
|
|
1278
|
+
* };
|
|
1279
|
+
* ```
|
|
1280
|
+
*
|
|
1281
|
+
* @internal
|
|
1282
|
+
*/
|
|
1283
|
+
onDataCellFormat?: CustomDataCellFormatter;
|
|
1284
|
+
/**
|
|
1285
|
+
* Applies custom styling and behavior to pivot table row and column headers.
|
|
1286
|
+
*
|
|
1287
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
1288
|
+
* following functional programming principles. Use this single callback to combine
|
|
1289
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
1290
|
+
*
|
|
1291
|
+
* @example
|
|
1292
|
+
* ```typescript
|
|
1293
|
+
* const customHeaderFormatter: CustomHeaderCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
1294
|
+
* if (cell.content === 'Total') {
|
|
1295
|
+
* return {
|
|
1296
|
+
* style: { fontWeight: 'bold', color: 'blue' },
|
|
1297
|
+
* className: 'total-header'
|
|
1298
|
+
* };
|
|
1299
|
+
* }
|
|
1300
|
+
* };
|
|
1301
|
+
* ```
|
|
1302
|
+
*
|
|
1303
|
+
* @internal
|
|
1304
|
+
*/
|
|
1305
|
+
onHeaderCellFormat?: CustomHeaderCellFormatter;
|
|
1185
1306
|
}
|
|
1186
1307
|
/**
|
|
1187
1308
|
* Props for the `TextWidget` component.
|
|
@@ -53,13 +53,14 @@ export type DateConfig = {
|
|
|
53
53
|
};
|
|
54
54
|
export declare const defaultDateConfig: DateConfig;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Safely formats a date value, handling special cases like 'N\A'
|
|
57
57
|
*
|
|
58
|
-
* @param date
|
|
59
|
-
* @param format -
|
|
60
|
-
* @param locale -
|
|
61
|
-
* @param cfg -
|
|
58
|
+
* @param value - The date value to format, can be a Date object, ISO string, or special value like 'N\A'
|
|
59
|
+
* @param format - The date format to apply
|
|
60
|
+
* @param locale - Optional locale for formatting
|
|
61
|
+
* @param cfg - Optional date configuration
|
|
62
|
+
* @returns Formatted date string or the original value for special cases
|
|
62
63
|
*/
|
|
63
|
-
export declare function
|
|
64
|
+
export declare function formatDateValue(value: Date | string, format: DateFormat, locale?: Locale, cfg?: DateConfig): string;
|
|
64
65
|
export declare function getDefaultDateMask(granularity?: string): "HH:mm:ss" | "yyyy" | "MM/yyyy" | "ww yyyy" | "HH:mm" | "Q yyyy" | "shortDate" | "fullDate";
|
|
65
66
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { DateFormat, DateConfig } from './apply-date-format';
|
|
2
|
-
export {
|
|
2
|
+
export { formatDateValue, defaultDateConfig } from './apply-date-format';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateCacheKeyFn } from '../utils/create-cache';
|
|
2
|
-
import { Attribute, Measure, PivotAttribute, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
2
|
+
import { Attribute, DataSource, Measure, PivotAttribute, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
3
3
|
import type { QueryDescription as InternalQueryDescription, PivotQueryDescription as InternalPivotQueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
4
4
|
import { ClientApplication } from '../app/client-application';
|
|
5
5
|
/**
|
|
@@ -26,6 +26,8 @@ export type PivotQueryDescription = Partial<Omit<InternalPivotQueryDescription,
|
|
|
26
26
|
values?: (Measure | PivotMeasure)[];
|
|
27
27
|
};
|
|
28
28
|
/** @internal */
|
|
29
|
+
export declare const prepareQueryParams: (queryDescription: QueryDescription, defaultDataSource?: DataSource) => InternalQueryDescription;
|
|
30
|
+
/** @internal */
|
|
29
31
|
export declare function executeQuery(queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig): Promise<QueryResultData>;
|
|
30
32
|
/** @internal */
|
|
31
33
|
export declare const executeCsvQuery: (queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<Blob>;
|
|
@@ -5,4 +5,4 @@ export { ExecuteQueryByWidgetId } from './execute-query-by-widget-id';
|
|
|
5
5
|
export { useExecuteQueryByWidgetId, executeQueryByWidgetId, } from './use-execute-query-by-widget-id';
|
|
6
6
|
export { useExecutePivotQuery } from './use-execute-pivot-query';
|
|
7
7
|
export { useQueryCache } from './use-query-cache';
|
|
8
|
-
export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, PivotQueryState, PivotQueryLoadingState, PivotQuerySuccessState, PivotQueryErrorState, ExecuteQueryParams, ExecuteQueryResult, ExecuteCsvQueryParams, ExecuteCSVQueryConfig, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, QueryByWidgetIdQueryParams, ExecutePivotQueryParams, } from './types';
|
|
8
|
+
export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, CsvQueryState, CsvQueryLoadingState, CsvQuerySuccessState, CsvQueryErrorState, PivotQueryState, PivotQueryLoadingState, PivotQuerySuccessState, PivotQueryErrorState, BaseQueryParams, ExecuteQueryParams, ExecuteQueryResult, ExecuteCsvQueryParams, ExecuteCSVQueryConfig, ExecuteQueryByWidgetIdParams, QueryByWidgetIdState, QueryByWidgetIdQueryParams, ExecutePivotQueryParams, } from './types';
|
|
@@ -171,9 +171,11 @@ export type QueryByWidgetIdQueryParams = {
|
|
|
171
171
|
*/
|
|
172
172
|
export type QueryByWidgetIdState = QueryState & QueryByWidgetIdQueryParams;
|
|
173
173
|
/**
|
|
174
|
-
*
|
|
174
|
+
* Base query parameters
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
175
177
|
*/
|
|
176
|
-
export interface
|
|
178
|
+
export interface BaseQueryParams {
|
|
177
179
|
/**
|
|
178
180
|
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
179
181
|
*
|
|
@@ -188,6 +190,11 @@ export interface ExecuteQueryParams {
|
|
|
188
190
|
filters?: Filter[] | FilterRelations;
|
|
189
191
|
/** Highlight filters that will highlight results that pass filter criteria */
|
|
190
192
|
highlights?: Filter[];
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Parameters for {@link useExecuteQuery} hook.
|
|
196
|
+
*/
|
|
197
|
+
export interface ExecuteQueryParams extends BaseQueryParams {
|
|
191
198
|
/**
|
|
192
199
|
* Number of rows to return in the query result
|
|
193
200
|
*
|
|
@@ -3,7 +3,12 @@ export declare const DEFAULT_DIVIDER_COLOR = "#F2F2F2";
|
|
|
3
3
|
export declare const DEFAULT_DIVIDER_WIDTH = 4;
|
|
4
4
|
export declare const DEFAULT_DASHBOARD_BORDER_COLOR = "#D5D5D5";
|
|
5
5
|
export declare const DEFAULT_DASHBOARD_BORDER_WIDTH = 1;
|
|
6
|
+
export declare const DEFAULT_DASHBOARD_TOOLBAR_DIVIDER_LINE_COLOR = "#D5D5D5";
|
|
7
|
+
export declare const DEFAULT_DASHBOARD_TOOLBAR_DIVIDER_LINE_WIDTH = 1;
|
|
8
|
+
export declare const DEFAULT_FILTER_PANEL_DIVIDER_LINE_COLOR = "#DADADA";
|
|
9
|
+
export declare const DEFAULT_FILTER_PANEL_DIVIDER_LINE_WIDTH = 1;
|
|
6
10
|
export declare const DEFAULT_FILTER_PANEL_BORDER_COLOR = "#DADADA";
|
|
11
|
+
export declare const DEFAULT_FILTER_PANEL_BORDER_WIDTH = 1;
|
|
7
12
|
export declare const DEFAULT_TITLE_FONT_SIZE = 15;
|
|
8
13
|
/**
|
|
9
14
|
* Returns default theme settings, which can be used as base for custom theme options.
|