@sisense/sdk-ui 1.25.0 → 1.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 +53 -52
- package/dist/ai.js +893 -747
- package/dist/analytics-composer.cjs +38 -38
- package/dist/analytics-composer.js +475 -464
- package/dist/{derive-chart-family-C_c2ZQQd.cjs → derive-chart-family-BXkBWhAA.cjs} +48 -48
- package/dist/{derive-chart-family-BlFbAr2V.js → derive-chart-family-DRBbYXus.js} +4205 -4121
- package/dist/index.cjs +103 -60
- package/dist/index.js +5289 -5041
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +6 -1
- package/dist/packages/sdk-ui/src/ai/icons/close-dialog-icon.d.ts +3 -1
- package/dist/packages/sdk-ui/src/ai/icons/sisense-logo.d.ts +2 -4
- package/dist/packages/sdk-ui/src/ai/use-chat-session.d.ts +2 -1
- package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/execute-query-composer.d.ts +8 -1
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/to-execute-query-code.d.ts +2 -1
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +8 -2
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +13 -1
- package/dist/packages/sdk-ui/src/chart/helpers/use-synced-data.d.ts +14 -1
- package/dist/packages/sdk-ui/src/charts/indicator/indicator-legacy-chart-options/override-with-theme-settings.d.ts +2 -2
- package/dist/packages/sdk-ui/src/charts/indicator/indicator-render-options.d.ts +52 -0
- package/dist/packages/sdk-ui/src/common/icons/edit-pencil-icon.d.ts +3 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-by-id.d.ts +1 -2
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +1 -2
- package/dist/packages/sdk-ui/src/filters/components/common/filter-content-display.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/common/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/custom-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filter-relations-tile/filter-relations-tile.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filter-relations-tile/filter-relations-tooltip.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filter-relations-tile/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filter-relations-tile/tooltip-utils.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/cube-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/unsupported-filter-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/indicator-canvas.d.ts +6 -0
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +9 -1
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-models.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +47 -3
- package/dist/packages/sdk-ui/src/theme-provider/fonts-loader/use-fonts-loader.d.ts +4 -1
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +21 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +42 -0
- package/dist/packages/sdk-ui/src/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/utils/filter-relations.d.ts +22 -1
- package/dist/packages/sdk-ui/src/utils/filters-comparator.d.ts +1 -1
- package/dist/packages/sdk-ui/src/utils/measures-comparator.d.ts +5 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +444 -444
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-filters.d.ts +53 -53
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +14 -2
- package/dist/{useQuery-P9b5LtGq.js → useQuery-BWxPQevB.js} +21386 -20636
- package/dist/useQuery-DHk01evX.cjs +882 -0
- package/dist/{widget-composer-DXM5t9rq.js → widget-composer-BBhoRRAJ.js} +229 -150
- package/dist/widget-composer-Dwta0nDD.cjs +298 -0
- package/package.json +7 -7
- package/dist/useQuery-BYxzPyc5.cjs +0 -870
- package/dist/widget-composer-DPsDPrFM.cjs +0 -237
- /package/dist/packages/sdk-ui/src/{charts/indicator/indicator-legacy-chart-options/utils → utils}/override-with-custom-settings.d.ts +0 -0
|
@@ -4,6 +4,11 @@ export interface ChatContext {
|
|
|
4
4
|
title: string;
|
|
5
5
|
live: boolean;
|
|
6
6
|
}
|
|
7
|
+
export interface TextMessage {
|
|
8
|
+
role: 'assistant';
|
|
9
|
+
content: string;
|
|
10
|
+
type: 'text';
|
|
11
|
+
}
|
|
7
12
|
export interface NlqMessage {
|
|
8
13
|
role: 'assistant';
|
|
9
14
|
content: string;
|
|
@@ -13,7 +18,7 @@ interface RegularMessage {
|
|
|
13
18
|
role: 'user' | 'assistant';
|
|
14
19
|
content: string;
|
|
15
20
|
}
|
|
16
|
-
export type ChatMessage = RegularMessage | NlqMessage;
|
|
21
|
+
export type ChatMessage = RegularMessage | NlqMessage | TextMessage;
|
|
17
22
|
export interface Chat {
|
|
18
23
|
chatId: string;
|
|
19
24
|
contextId: string;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
colorSchema: ColorSchema;
|
|
1
|
+
export default function SisenseLogo({ isDarkBackground }: {
|
|
2
|
+
isDarkBackground: boolean;
|
|
4
3
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChatMessage, NlqMessage, NlqResponseData, TextMessage } from './api/types';
|
|
2
2
|
/**
|
|
3
3
|
* Result of the useChatSession hook.
|
|
4
4
|
*
|
|
@@ -14,6 +14,7 @@ export interface UseChatSessionResult {
|
|
|
14
14
|
lastError: Error | null;
|
|
15
15
|
}
|
|
16
16
|
export declare const isNlqMessage: (message: ChatMessage | null | undefined) => message is NlqMessage;
|
|
17
|
+
export declare const isTextMessage: (message: ChatMessage | null | undefined) => message is TextMessage;
|
|
17
18
|
/**
|
|
18
19
|
* React hook that returns a chat session object for the given data model or
|
|
19
20
|
* perspective.
|
|
@@ -12,4 +12,4 @@ export declare function sanitizeDimensionId(str: string): string;
|
|
|
12
12
|
export declare function validateQueryModel(model: any): SimpleQueryModel;
|
|
13
13
|
export declare function isEmptyQueryModel(queryModel: ExpandedQueryModel | undefined | null): boolean;
|
|
14
14
|
export declare function escapeSingleQuotes(str?: string): string | undefined;
|
|
15
|
-
export declare function validateChartType(chartType: DynamicChartType): void;
|
|
15
|
+
export declare function validateChartType(chartType: DynamicChartType | 'pivot' | 'pivot2'): void;
|
package/dist/packages/sdk-ui/src/analytics-composer/execute-query/execute-query-composer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecuteQueryCodeParams } from '../types.js';
|
|
1
|
+
import { ExecuteQueryCodeParams, ExecutePivotQueryCodeParams } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Converts query params to CSDK code.
|
|
4
4
|
*
|
|
@@ -6,3 +6,10 @@ import { ExecuteQueryCodeParams } from '../types.js';
|
|
|
6
6
|
* @returns CSDK code string
|
|
7
7
|
*/
|
|
8
8
|
export declare const toExecuteQueryCode: (executeQueryCodeParams: ExecuteQueryCodeParams) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts pivot query params to CSDK code.
|
|
11
|
+
*
|
|
12
|
+
* @param executePivotQueryCodeParams - pivotQuery params
|
|
13
|
+
* @returns CSDK code string
|
|
14
|
+
*/
|
|
15
|
+
export declare const toExecutePivotQueryCode: (executePivotQueryCodeParams: ExecutePivotQueryCodeParams) => string;
|
package/dist/packages/sdk-ui/src/analytics-composer/execute-query/to-execute-query-code.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ExecuteQueryCodeParams } from '../types.js';
|
|
1
|
+
import { ExecuteQueryCodeParams, ExecutePivotQueryCodeParams } from '../types.js';
|
|
2
2
|
export declare const toExecuteQueryCode: ({ queryParams, uiFramework, }: ExecuteQueryCodeParams) => string;
|
|
3
|
+
export declare const toExecutePivotQueryCode: ({ pivotQueryParams, uiFramework, }: ExecutePivotQueryCodeParams) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WidgetProps } from '../props';
|
|
2
2
|
import { ChartDataOptions } from '../types';
|
|
3
|
-
import { ExecuteQueryParams } from '../query-execution';
|
|
3
|
+
import { ExecuteQueryParams, ExecutePivotQueryParams } from '../query-execution';
|
|
4
4
|
import { MetadataItem } from '@sisense/sdk-data';
|
|
5
5
|
import { DynamicChartType } from '../chart-options-processor/translations/types.js';
|
|
6
6
|
export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
@@ -86,7 +86,7 @@ export type UiFramework = 'react' | 'vue' | 'angular';
|
|
|
86
86
|
* Code Template Key
|
|
87
87
|
* @internal
|
|
88
88
|
*/
|
|
89
|
-
export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'widgetByIdTmpl' | 'executeQueryByWidgetIdTmpl' | 'executeQueryTmpl';
|
|
89
|
+
export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'widgetByIdTmpl' | 'executeQueryByWidgetIdTmpl' | 'executeQueryTmpl' | 'executePivotQueryTmpl' | 'pivotTableWidgetTmpl';
|
|
90
90
|
/**
|
|
91
91
|
* Code Templates
|
|
92
92
|
* @internal
|
|
@@ -158,3 +158,9 @@ export type WidgetPropsConfig = {
|
|
|
158
158
|
export type ExecuteQueryCodeParams = BaseCodeConfig & {
|
|
159
159
|
queryParams: ExecuteQueryParams;
|
|
160
160
|
};
|
|
161
|
+
/**
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
export type ExecutePivotQueryCodeParams = BaseCodeConfig & {
|
|
165
|
+
pivotQueryParams: ExecutePivotQueryParams;
|
|
166
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
3
3
|
import { type DataSource } from '@sisense/sdk-data';
|
|
4
|
-
import { HierarchyDto, WidgetDto } from '../widget-by-id/types';
|
|
4
|
+
import { HierarchyDto, SharedFormulaDto, WidgetDto } from '../widget-by-id/types';
|
|
5
5
|
import type { DashboardDto } from './types/dashboard-dto';
|
|
6
6
|
import { TranslatableError } from '../translation/translatable-error';
|
|
7
7
|
import { PaletteDto } from '../api/types/palette-dto';
|
|
@@ -70,6 +70,18 @@ export declare class RestApi {
|
|
|
70
70
|
* Add widget to a dashboard
|
|
71
71
|
*/
|
|
72
72
|
addWidgetToDashboard: (dashboardOid: string, widgetDto: WidgetDto) => Promise<WidgetDto | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* Get shared formulas by ids
|
|
75
|
+
* @param sharedFormulasIds - An array of shared formulas ids
|
|
76
|
+
* @returns A dictionary of shared formulas
|
|
77
|
+
*/
|
|
78
|
+
getSharedFormulas: (sharedFormulasIds: string[]) => Promise<Record<string, SharedFormulaDto>>;
|
|
79
|
+
/**
|
|
80
|
+
* Get a shared formula by id
|
|
81
|
+
* @param sharedFormulaId - A shared formula id
|
|
82
|
+
* @returns A shared formula
|
|
83
|
+
*/
|
|
84
|
+
getSharedFormula: (sharedFormulaId: string) => Promise<SharedFormulaDto | undefined>;
|
|
73
85
|
}
|
|
74
86
|
export declare const useRestApi: () => {
|
|
75
87
|
restApi: RestApi | undefined;
|
|
@@ -4,5 +4,18 @@ import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
|
4
4
|
import { ChartType } from '../../types';
|
|
5
5
|
import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
|
|
6
6
|
type DataSet = DataSource | Data | undefined;
|
|
7
|
-
|
|
7
|
+
type UseSyncedDataProps = {
|
|
8
|
+
dataSet: DataSet;
|
|
9
|
+
chartDataOptions: ChartDataOptionsInternal;
|
|
10
|
+
chartType: ChartType;
|
|
11
|
+
attributes: Attribute[];
|
|
12
|
+
measures: Measure[];
|
|
13
|
+
dataColumnNamesMapping: DataColumnNamesMapping;
|
|
14
|
+
filters?: Filter[] | FilterRelations;
|
|
15
|
+
highlights?: Filter[];
|
|
16
|
+
refreshCounter?: number;
|
|
17
|
+
setIsLoading?: Dispatch<SetStateAction<boolean>>;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const useSyncedData: ({ dataSet, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, filters, highlights, refreshCounter, setIsLoading, enabled, }: UseSyncedDataProps) => [Data, ChartDataOptionsInternal];
|
|
8
21
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ThemeSettings } from '../../../types
|
|
2
|
-
import { LegacyIndicatorChartOptions } from '../types
|
|
1
|
+
import { ThemeSettings } from '../../../types';
|
|
2
|
+
import { LegacyIndicatorChartOptions } from '../types';
|
|
3
3
|
export declare function overrideWithThemeSettings(themeSettings: ThemeSettings, legacyOptionsToThemeSettingsDictionary: Record<string, string>, legacyChartOptions: LegacyIndicatorChartOptions): LegacyIndicatorChartOptions;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IndicatorLegacyChartDataOptions } from './indicator-legacy-chart-data-options';
|
|
2
|
+
import { IndicatorLegacyChartOptions } from '../../indicator-canvas';
|
|
3
|
+
/**
|
|
4
|
+
* Indicator render options.
|
|
5
|
+
*/
|
|
6
|
+
export type IndicatorRenderOptions = {
|
|
7
|
+
/** The primary value options. */
|
|
8
|
+
value: {
|
|
9
|
+
/** The primary value data. */
|
|
10
|
+
data: number;
|
|
11
|
+
/** The primary value text. */
|
|
12
|
+
text: string;
|
|
13
|
+
/** The primary value color. */
|
|
14
|
+
color: string;
|
|
15
|
+
};
|
|
16
|
+
/** The secondary value options. */
|
|
17
|
+
secondary: {
|
|
18
|
+
/** The secondary value data. */
|
|
19
|
+
data: number;
|
|
20
|
+
/** The secondary value text. */
|
|
21
|
+
text: string;
|
|
22
|
+
/** The secondary value color. */
|
|
23
|
+
color: string;
|
|
24
|
+
/** The secondary value font weight. */
|
|
25
|
+
fontWeight: string;
|
|
26
|
+
};
|
|
27
|
+
/** The title options. */
|
|
28
|
+
title: {
|
|
29
|
+
/** The title text. */
|
|
30
|
+
text: string;
|
|
31
|
+
/** The title color. */
|
|
32
|
+
color: string;
|
|
33
|
+
};
|
|
34
|
+
/** The secondary title options. */
|
|
35
|
+
secondaryTitle: {
|
|
36
|
+
/** The secondary title text. */
|
|
37
|
+
text: string;
|
|
38
|
+
/** The secondary title color. */
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Builds the render options from the legacy data and chart options.
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildRenderOptionsFromLegacyOptions(legacyDataOptions: IndicatorLegacyChartDataOptions, legacyChartOptions: IndicatorLegacyChartOptions): IndicatorRenderOptions;
|
|
46
|
+
/**
|
|
47
|
+
* Applies the indicator render options to the legacy data and chart options.
|
|
48
|
+
*/
|
|
49
|
+
export declare const applyIndicatorRenderOptions: (indicatorRenderOptions: IndicatorRenderOptions, legacyDataOptions: IndicatorLegacyChartDataOptions, legacyChartOptions: IndicatorLegacyChartOptions) => {
|
|
50
|
+
legacyDataOptions: IndicatorLegacyChartDataOptions;
|
|
51
|
+
legacyChartOptions: IndicatorLegacyChartOptions;
|
|
52
|
+
};
|
|
@@ -3,7 +3,7 @@ import { DashboardByIdProps } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* React component that renders a dashboard created in Sisense Fusion by its ID.
|
|
5
5
|
*
|
|
6
|
-
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
6
|
+
* **Note:** Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
*
|
|
@@ -27,6 +27,5 @@ import { DashboardByIdProps } from './types';
|
|
|
27
27
|
* see [Embedded Dashboards](/guides/sdk/guides/dashboards/index.html).
|
|
28
28
|
* @group Fusion Assets
|
|
29
29
|
* @fusionEmbed
|
|
30
|
-
* @beta
|
|
31
30
|
*/
|
|
32
31
|
export declare const DashboardById: import("react").FunctionComponent<DashboardByIdProps>;
|
|
@@ -17,7 +17,7 @@ export type DashboardChangeAction = {
|
|
|
17
17
|
/**
|
|
18
18
|
* React component that renders a dashboard whose elements are customizable. It includes internal logic of applying common filters to widgets.
|
|
19
19
|
*
|
|
20
|
-
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
20
|
+
* **Note:** Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
*
|
|
@@ -48,6 +48,5 @@ export default CodeExample;
|
|
|
48
48
|
* To learn more about this and related dashboard components,
|
|
49
49
|
* see [Embedded Dashboards](/guides/sdk/guides/dashboards/index.html).
|
|
50
50
|
* @group Dashboards
|
|
51
|
-
* @beta
|
|
52
51
|
*/
|
|
53
52
|
export declare const Dashboard: import("react").FunctionComponent<DashboardProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const FilterContentDisplay: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -8,3 +8,4 @@ export { TriangleIndicator } from './triangle-indicator';
|
|
|
8
8
|
export { DateRangeFieldButton } from './date-range-field-button';
|
|
9
9
|
export { Dropdown } from './dropdown';
|
|
10
10
|
export { type FilterVariant } from './filter-utils';
|
|
11
|
+
export { FilterContentDisplay } from './filter-content-display';
|
package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface CriteriaFilterTileProps {
|
|
|
16
16
|
onUpdate: (filter: Filter | null) => void;
|
|
17
17
|
/** Filter delete callback */
|
|
18
18
|
onDelete?: () => void;
|
|
19
|
+
/** Filter edit callback */
|
|
20
|
+
onEdit?: () => void;
|
|
19
21
|
/** List of available measures to rank by. Required only for ranking filters. */
|
|
20
22
|
measures?: Measure[];
|
|
21
23
|
/**
|
|
@@ -17,6 +17,8 @@ export interface CustomFilterTileProps {
|
|
|
17
17
|
onUpdate: (filter: Filter | null) => void;
|
|
18
18
|
/** Filter delete callback */
|
|
19
19
|
onDelete?: () => void;
|
|
20
|
+
/** Filter edit callback */
|
|
21
|
+
onEdit?: () => void;
|
|
20
22
|
/** Design options for the tile @internal */
|
|
21
23
|
tileDesignOptions?: FilterTileDesignOptions;
|
|
22
24
|
}
|
|
@@ -20,6 +20,8 @@ export interface RelativeDateFilterTileProps {
|
|
|
20
20
|
onUpdate: (filter: Filter) => void;
|
|
21
21
|
/** Filter delete callback */
|
|
22
22
|
onDelete?: () => void;
|
|
23
|
+
/** Filter edit callback */
|
|
24
|
+
onEdit?: () => void;
|
|
23
25
|
/**
|
|
24
26
|
* Limit of the date range that can be selected.
|
|
25
27
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterRelationsRules } from '../../../../utils/filter-relations';
|
|
2
|
+
import { Filter } from '@sisense/sdk-data';
|
|
3
|
+
/**
|
|
4
|
+
* Filter relations tile component.
|
|
5
|
+
*/
|
|
6
|
+
export declare function FilterRelationsTile({ relations, filters, }: {
|
|
7
|
+
relations: FilterRelationsRules;
|
|
8
|
+
filters: Filter[];
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterRelationsRules } from '../../../../utils/filter-relations';
|
|
3
|
+
import { Filter } from '@sisense/sdk-data';
|
|
4
|
+
export declare function FilterRelationsTooltip({ relations, filters, children, }: {
|
|
5
|
+
relations: FilterRelationsRules;
|
|
6
|
+
filters: Filter[];
|
|
7
|
+
children: React.ReactElement;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/packages/sdk-ui/src/filters/components/filters-panel/filter-relations-tile/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './filter-relations-tile';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterRelationsDescription } from '../../../../utils/filter-relations';
|
|
2
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
export declare function generateTooltipLines(filterRelationsDescription: FilterRelationsDescription, t: TFunction): ReactNode[];
|
|
5
|
+
/**
|
|
6
|
+
* Recursively removes unnecessary "outermost" parentheses from the filter relations description.
|
|
7
|
+
*
|
|
8
|
+
* "Unnecessary" means a matching pair of open/close brackets that fully wraps
|
|
9
|
+
* the entire expression, with no leftover operators or attributes outside.
|
|
10
|
+
*/
|
|
11
|
+
export declare function trimUnnecessaryBrackets(filterRelationsDescription: FilterRelationsDescription): FilterRelationsDescription;
|
|
@@ -11,6 +11,8 @@ export type FiltersPanelTileProps = {
|
|
|
11
11
|
onChange: (filter: Filter | null) => void;
|
|
12
12
|
/** Filter delete callback */
|
|
13
13
|
onDelete?: () => void;
|
|
14
|
+
/** Filter edit callback */
|
|
15
|
+
onEdit?: () => void;
|
|
14
16
|
/** Default data source used for filter tiles */
|
|
15
17
|
defaultDataSource?: DataSource;
|
|
16
18
|
};
|
|
@@ -19,4 +21,4 @@ export type FiltersPanelTileProps = {
|
|
|
19
21
|
*
|
|
20
22
|
* @internal
|
|
21
23
|
*/
|
|
22
|
-
export declare const FiltersPanelTile: ({ filter, onChange, onDelete, defaultDataSource, }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const FiltersPanelTile: ({ filter, onChange, onDelete, onEdit, defaultDataSource, }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export interface MemberFilterTileProps {
|
|
|
21
21
|
onChange: (filter: Filter | null) => void;
|
|
22
22
|
/** Filter delete callback */
|
|
23
23
|
onDelete?: () => void;
|
|
24
|
+
/** Filter edit callback */
|
|
25
|
+
onEdit?: () => void;
|
|
24
26
|
/** List of filters this filter is dependent on */
|
|
25
27
|
parentFilters?: Filter[];
|
|
26
28
|
/** Design options for the tile @internal */
|
|
@@ -5,10 +5,12 @@ export type UnsupportedFilterTileProps = {
|
|
|
5
5
|
design?: FilterTileDesignOptions;
|
|
6
6
|
/** Filter delete callback */
|
|
7
7
|
onDelete?: () => void;
|
|
8
|
+
/** Filter edit callback */
|
|
9
|
+
onEdit?: () => void;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Filter tile component that renders an unsupported filter (which is not recognized by the JAQL to Filter translation)
|
|
11
13
|
*
|
|
12
14
|
* @internal
|
|
13
15
|
*/
|
|
14
|
-
export declare const UnsupportedFilterTile: ({ filter, design, onDelete }: UnsupportedFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const UnsupportedFilterTile: ({ filter, design, onDelete, onEdit, }: UnsupportedFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,14 +2,20 @@ import { IndicatorChartDataOptionsInternal } from './chart-data-options/types';
|
|
|
2
2
|
import { type FunctionComponent } from 'react';
|
|
3
3
|
import { IndicatorChartData } from './chart-data/types';
|
|
4
4
|
import { IndicatorChartDesignOptions } from './chart-options-processor/translations/design-options';
|
|
5
|
+
import { createIndicatorLegacyChartOptions } from './charts/indicator/indicator-legacy-chart-options';
|
|
5
6
|
import { ChartRendererProps } from './chart/types';
|
|
7
|
+
import { IndicatorRenderOptions } from './charts/indicator/indicator-render-options';
|
|
8
|
+
export type IndicatorLegacyChartOptions = ReturnType<typeof createIndicatorLegacyChartOptions>;
|
|
9
|
+
type IndicatorOnBeforeRender = (options: IndicatorRenderOptions) => IndicatorRenderOptions;
|
|
6
10
|
export interface IndicatorCanvasProps {
|
|
7
11
|
chartData: IndicatorChartData;
|
|
8
12
|
dataOptions: IndicatorChartDataOptionsInternal;
|
|
9
13
|
designOptions: IndicatorChartDesignOptions;
|
|
14
|
+
onBeforeRender?: IndicatorOnBeforeRender;
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
17
|
* @internal
|
|
13
18
|
*/
|
|
14
19
|
export declare const IndicatorCanvas: FunctionComponent<IndicatorCanvasProps>;
|
|
15
20
|
export declare const isIndicatorCanvasProps: (props: ChartRendererProps) => props is IndicatorCanvasProps;
|
|
21
|
+
export {};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { type LayoutDto, type FilterDto, type CascadingFilterDto } from '../../api/types/dashboard-dto';
|
|
1
|
+
import { type LayoutDto, type FilterDto, type CascadingFilterDto, DashboardDto } from '../../api/types/dashboard-dto';
|
|
2
2
|
import type { WidgetsPanelColumnLayout, WidgetsOptions } from './types';
|
|
3
3
|
import { Filter, FilterRelations, FilterRelationsModel, FilterRelationsModelNode } from '@sisense/sdk-data';
|
|
4
4
|
import { WidgetDto } from '../../widget-by-id/types';
|
|
5
|
+
import { RestApi } from '../../api/rest-api';
|
|
5
6
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
6
7
|
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>, filterRelationsModel?: FilterRelationsModel | FilterRelationsModelNode): Filter[] | FilterRelations;
|
|
7
8
|
export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
|
|
9
|
+
/**
|
|
10
|
+
* Replace all shared formulas, which defined by id references, in the dashboard with their actual values.
|
|
11
|
+
* @param dashboard - The dashboard DTO to replace shared formulas in
|
|
12
|
+
* @param api - The REST API instance
|
|
13
|
+
* @returns The dashboard DTO with shared formulas, defined by id references, replaced
|
|
14
|
+
*/
|
|
15
|
+
export declare function withSharedFormulas(dashboard: DashboardDto, api: RestApi): Promise<DashboardDto>;
|
|
@@ -69,7 +69,7 @@ export type DashboardModelSuccessState = {
|
|
|
69
69
|
/**
|
|
70
70
|
* React hook that retrieves an existing dashboard model from the Sisense instance.
|
|
71
71
|
*
|
|
72
|
-
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
72
|
+
* **Note:** Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
75
|
* An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `WidgetById`:
|
|
@@ -65,7 +65,7 @@ export type DashboardModelsSuccessState = {
|
|
|
65
65
|
/**
|
|
66
66
|
* React hook that retrieves existing dashboards that the user can access to from the Sisense instance.
|
|
67
67
|
*
|
|
68
|
-
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
68
|
+
* **Note:** Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
```tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
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, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, WidgetByIdStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions, DrilldownSelection, TextWidgetStyleOptions, GenericDataOptions, DashboardWidgetStyleOptions } from './types';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, WidgetByIdStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions, RegularChartType, RegularChartStyleOptions, TabularChartStyleOptions, TableStyleOptions, AreaRangeStyleOptions, DrilldownSelection, TextWidgetStyleOptions, GenericDataOptions, DashboardWidgetStyleOptions, IndicatorRenderOptions } from './types';
|
|
3
3
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
5
|
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions, RegularChartDataOptions, TabularChartDataOptions, RangeChartDataOptions } from './chart-data-options/types';
|
|
@@ -188,6 +188,33 @@ export type ThemeProviderProps = PropsWithChildren<{
|
|
|
188
188
|
export type BeforeRenderHandler = (
|
|
189
189
|
/** Highcharts options */
|
|
190
190
|
highchartsOptions: HighchartsOptions) => HighchartsOptions;
|
|
191
|
+
/**
|
|
192
|
+
* Type guard for checking if the render options are of type HighchartsOptions
|
|
193
|
+
*
|
|
194
|
+
* @param renderOptions - The render options to check
|
|
195
|
+
* @returns whether the render options are of type HighchartsOptions
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
export declare const isHighchartsOptions: (renderOptions: any) => renderOptions is HighchartsOptions;
|
|
199
|
+
/**
|
|
200
|
+
* Type guard for checking if the render options are of type IndicatorRenderOptions
|
|
201
|
+
*
|
|
202
|
+
* @param renderOptions - The render options to check
|
|
203
|
+
* @returns whether the render options are of type IndicatorRenderOptions
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
export declare const isIndicatorRenderOptions: (renderOptions: any) => renderOptions is IndicatorRenderOptions;
|
|
207
|
+
/**
|
|
208
|
+
* A handler function that allows you to customize the underlying chart element before it is
|
|
209
|
+
* rendered. Use the {@link IndicatorRenderOptions} object that is passed to the callback to change
|
|
210
|
+
* and then return the modified options object.
|
|
211
|
+
* The returned options are then used when rendering the chart.
|
|
212
|
+
*
|
|
213
|
+
* This callback is supported only for Indicator Chart.
|
|
214
|
+
*/
|
|
215
|
+
export type IndicatorBeforeRenderHandler = (
|
|
216
|
+
/** Indicator render options */
|
|
217
|
+
renderOptions: IndicatorRenderOptions) => IndicatorRenderOptions;
|
|
191
218
|
/**
|
|
192
219
|
* Click handler for when an abstract data point (data point of any chart) is clicked
|
|
193
220
|
*/
|
|
@@ -378,6 +405,15 @@ interface BoxplotChartEventProps extends BaseChartEventProps, HighchartsBasedCha
|
|
|
378
405
|
*/
|
|
379
406
|
onDataPointsSelected?: DataPointsEventHandler;
|
|
380
407
|
}
|
|
408
|
+
interface IndicatorChartEventProps extends BaseChartEventProps {
|
|
409
|
+
/**
|
|
410
|
+
* A callback that allows you to customize the underlying indicator chart element before it is rendered.
|
|
411
|
+
* The returned options are then used when rendering the chart.
|
|
412
|
+
*
|
|
413
|
+
* @category Callbacks
|
|
414
|
+
*/
|
|
415
|
+
onBeforeRender?: IndicatorBeforeRenderHandler;
|
|
416
|
+
}
|
|
381
417
|
/**
|
|
382
418
|
* Base Chart Props to be extended by {@link ChartProps}
|
|
383
419
|
*
|
|
@@ -479,7 +515,7 @@ export interface BaseChartProps extends BaseChartEventProps {
|
|
|
479
515
|
/**
|
|
480
516
|
* Chart props to be able to react on chart events.
|
|
481
517
|
*/
|
|
482
|
-
interface ChartEventProps extends BaseChartEventProps
|
|
518
|
+
interface ChartEventProps extends BaseChartEventProps {
|
|
483
519
|
/**
|
|
484
520
|
* Click handler callback for a data point
|
|
485
521
|
*
|
|
@@ -498,6 +534,14 @@ interface ChartEventProps extends BaseChartEventProps, HighchartsBasedChartEvent
|
|
|
498
534
|
* @category Callbacks
|
|
499
535
|
*/
|
|
500
536
|
onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
|
|
537
|
+
/**
|
|
538
|
+
* A callback that allows you to customize the underlying chart element before it is rendered. The returned options are then used when rendering the chart.
|
|
539
|
+
*
|
|
540
|
+
* This callback is not supported for Areamap Chart, Scattermap Chart, Table, and PivotTable.
|
|
541
|
+
*
|
|
542
|
+
* @category Callbacks
|
|
543
|
+
*/
|
|
544
|
+
onBeforeRender?: HighchartsBasedChartEventProps['onBeforeRender'] | IndicatorChartEventProps['onBeforeRender'];
|
|
501
545
|
}
|
|
502
546
|
/**
|
|
503
547
|
* Props shared across {@link Chart} components.
|
|
@@ -692,7 +736,7 @@ export interface PolarChartProps extends BaseChartProps, HighchartsBasedChartEve
|
|
|
692
736
|
/**
|
|
693
737
|
* Props of the {@link IndicatorChart} component.
|
|
694
738
|
*/
|
|
695
|
-
export interface IndicatorChartProps extends BaseChartProps {
|
|
739
|
+
export interface IndicatorChartProps extends BaseChartProps, IndicatorChartEventProps {
|
|
696
740
|
/**
|
|
697
741
|
* Configurations for how to interpret and present the data passed to the chart
|
|
698
742
|
*
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { ThemeSettingsFont } from '../../types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function useFontsLoader(fonts: ThemeSettingsFont[], prevLoadedFonts: string[]): {
|
|
3
|
+
loadedFonts: string[];
|
|
4
|
+
areAllFontsLoaded: boolean;
|
|
5
|
+
};
|
|
@@ -81,6 +81,16 @@ export declare const translation: {
|
|
|
81
81
|
widgetDetails: string;
|
|
82
82
|
cancel: string;
|
|
83
83
|
includeAll: string;
|
|
84
|
+
formatting: {
|
|
85
|
+
number: {
|
|
86
|
+
abbreviations: {
|
|
87
|
+
thousand: string;
|
|
88
|
+
million: string;
|
|
89
|
+
billion: string;
|
|
90
|
+
trillion: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
84
94
|
criteriaFilter: {
|
|
85
95
|
displayModePrefix: string;
|
|
86
96
|
equals: string;
|
|
@@ -175,6 +185,11 @@ export declare const translation: {
|
|
|
175
185
|
unselectMenuItem: string;
|
|
176
186
|
};
|
|
177
187
|
customFilterTileMessage: string;
|
|
188
|
+
filterRelations: {
|
|
189
|
+
and: string;
|
|
190
|
+
or: string;
|
|
191
|
+
andOrFormulaApplied: string;
|
|
192
|
+
};
|
|
178
193
|
drilldown: {
|
|
179
194
|
drillMenuItem: string;
|
|
180
195
|
breadcrumbsAllSuffix: string;
|
|
@@ -236,6 +251,12 @@ export declare const translation: {
|
|
|
236
251
|
noAvailableDataTopics: string;
|
|
237
252
|
};
|
|
238
253
|
};
|
|
254
|
+
filterEditor: {
|
|
255
|
+
buttons: {
|
|
256
|
+
apply: string;
|
|
257
|
+
cancel: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
239
260
|
};
|
|
240
261
|
/**
|
|
241
262
|
* A reference type containing all currently used translation keys.
|