@sisense/sdk-ui 0.14.0 → 0.16.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/api/chat-api-context.d.ts +12 -0
- package/dist/ai/api/chat-rest-api.d.ts +28 -0
- package/dist/ai/api/hooks.d.ts +74 -0
- package/dist/ai/api/types.d.ts +139 -0
- package/dist/ai/chat-box.d.ts +6 -0
- package/dist/ai/chat-frame.d.ts +8 -0
- package/dist/ai/chat-home.d.ts +2 -0
- package/dist/ai/chat-input.d.ts +7 -0
- package/dist/ai/chatbot-context.d.ts +11 -0
- package/dist/ai/chatbot.d.ts +27 -0
- package/dist/ai/data-topics/data-topic-item.d.ts +8 -0
- package/dist/ai/data-topics/data-topic-list.d.ts +10 -0
- package/dist/ai/data-topics/index.d.ts +2 -0
- package/dist/ai/icons/arrow-left-icon.d.ts +2 -0
- package/dist/ai/icons/clear-chat-icon.d.ts +2 -0
- package/dist/ai/icons/close-dialog-icon.d.ts +2 -0
- package/dist/ai/icons/expand-icon.d.ts +2 -0
- package/dist/ai/icons/info-icon.d.ts +2 -0
- package/dist/ai/icons/light-bulb-icon.d.ts +2 -0
- package/dist/ai/icons/loading-dots-icon.d.ts +2 -0
- package/dist/ai/icons/magic-wand-icon.d.ts +2 -0
- package/dist/ai/icons/message-icon.d.ts +2 -0
- package/dist/ai/icons/refresh-icon.d.ts +2 -0
- package/dist/ai/icons/sisense-logo.d.ts +2 -0
- package/dist/ai/icons/three-dots-icon.d.ts +2 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/magic-wand-dropdown.d.ts +7 -0
- package/dist/ai/messages/chart-message-toolbar.d.ts +8 -0
- package/dist/ai/messages/chart-message.d.ts +8 -0
- package/dist/ai/messages/clear-history-message.d.ts +6 -0
- package/dist/ai/messages/get-widget-options.d.ts +13 -0
- package/dist/ai/messages/insights-message.d.ts +10 -0
- package/dist/ai/messages/jaql-element.d.ts +25 -0
- package/dist/ai/messages/message-list-resolver.d.ts +7 -0
- package/dist/ai/messages/message-resolver.d.ts +11 -0
- package/dist/ai/messages/text-message.d.ts +8 -0
- package/dist/ai/nav-back-button.d.ts +6 -0
- package/dist/ai/nlg-query-result.d.ts +20 -0
- package/dist/ai/suggestions/index.d.ts +4 -0
- package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-item.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +2 -0
- package/dist/ai/suggestions/suggestion-list.d.ts +7 -0
- package/dist/ai/suggestions/suggestions-with-intro.d.ts +8 -0
- package/dist/ai/toolbar.d.ts +8 -0
- package/dist/ai/use-chat-session.d.ts +22 -0
- package/dist/ai.d.ts +1 -0
- package/dist/ai.js +3390 -0
- package/dist/api/types/dashboard-dto.d.ts +5 -3
- package/dist/chart-data-options/coloring/consts.d.ts +3 -0
- package/dist/chart-data-options/coloring/utils.d.ts +6 -0
- package/dist/chart-data-options/get-translated-data-options.d.ts +6 -0
- package/dist/chart-options-processor/chart-options-service.d.ts +2 -74
- package/dist/chart-options-processor/translations/axis-section.d.ts +3 -1
- package/dist/chart-options-processor/translations/funnel-series.d.ts +1 -2
- package/dist/chart-options-processor/translations/legend-section.d.ts +2 -1
- package/dist/chart-options-processor/translations/pie-series.d.ts +1 -2
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +6 -2
- package/dist/charts/indicator/chart/indicator.d.ts +1 -1
- package/dist/charts/indicator/chart/ticker.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
- package/dist/charts/indicator/types.d.ts +47 -6
- package/dist/common/components/loading-indicator.d.ts +33 -0
- package/dist/common/icons/loading-icon.d.ts +6 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +2 -2
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +2 -2
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +6 -6
- package/dist/dashboard-widget/translate-widget-filters.d.ts +4 -16
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +1 -1
- package/dist/dashboard-widget/types.d.ts +21 -71
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +7 -1
- package/dist/dashboard-widget/utils.d.ts +3 -3
- package/dist/filters/components/common/dropdown.d.ts +8 -0
- package/dist/filters/components/common/index.d.ts +4 -1
- package/dist/filters/components/common/radio.d.ts +7 -0
- package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +22 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +76 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +44 -0
- package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
- package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +11 -3
- package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
- package/dist/filters/components/filter-tile.d.ts +3 -0
- package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +4 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +3 -1
- package/dist/filters/components/member-filter-tile/members-reducer.d.ts +9 -1
- package/dist/filters/components/member-filter-tile/pill-section.d.ts +0 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/formulas/fetch-formula.d.ts +16 -0
- package/dist/formulas/index.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +95 -0
- package/dist/highcharts-memorized.d.ts +4 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8974 -71500
- package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
- package/dist/models/dashboard/types.d.ts +1 -1
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
- package/dist/models/widget/get-widget-model.d.ts +4 -0
- package/dist/models/widget/index.d.ts +3 -1
- package/dist/models/widget/translate-widget.d.ts +1 -1
- package/dist/models/widget/use-get-widget-model.d.ts +102 -0
- package/dist/models/widget/widget-model.d.ts +122 -0
- package/dist/props.d.ts +30 -11
- package/dist/query/execute-query.d.ts +2 -0
- package/dist/query-execution/csv-query-state-reducer.d.ts +2 -0
- package/dist/query-execution/index.d.ts +4 -3
- package/dist/query-execution/query-state-reducer.d.ts +1 -58
- package/dist/query-execution/types.d.ts +190 -0
- package/dist/query-execution/use-execute-csv-query.d.ts +82 -0
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +2 -37
- package/dist/query-execution/use-execute-query.d.ts +8 -33
- package/dist/table/hooks/use-table-data.d.ts +5 -1
- package/dist/table/table.d.ts +3 -0
- package/dist/table-widget-5f3b1d03.js +64456 -0
- package/dist/themes/colors.d.ts +86 -0
- package/dist/translation/resources/en.d.ts +31 -0
- package/dist/translation/resources/index.d.ts +62 -0
- package/dist/types.d.ts +6 -0
- package/dist/utils/utility-types.d.ts +4 -0
- package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs-navigation.d.ts +8 -0
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +11 -0
- package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
- package/dist/widgets/common/widget-header.d.ts +1 -1
- package/package.json +27 -8
- package/dist/models/widget/types.d.ts +0 -6
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { WidgetDto, Datasource
|
|
1
|
+
import { WidgetDto, Datasource } from '../../dashboard-widget/types';
|
|
2
|
+
import { FilterJaql } from '@sisense/sdk-data';
|
|
3
|
+
import { AnyObject } from '../../utils/utility-types';
|
|
2
4
|
export type Filter = {
|
|
3
5
|
isCascading?: false;
|
|
4
|
-
jaql: FilterJaql;
|
|
6
|
+
jaql: FilterJaql & AnyObject;
|
|
5
7
|
instanceid?: string;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
};
|
|
@@ -17,4 +19,4 @@ export type DashboardDto = {
|
|
|
17
19
|
datasource: Datasource;
|
|
18
20
|
widgets?: WidgetDto[];
|
|
19
21
|
filters?: Array<Filter | CascadingFilter>;
|
|
20
|
-
};
|
|
22
|
+
} & AnyObject;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Color } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a color from the given palette colors array based on index.
|
|
4
|
+
* If no custom palette supplied, returns a color from the default palette.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getPaletteColor: (customPaletteColors: Color[] | undefined, index: number) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartDataOptions, ChartType } from '../types';
|
|
2
|
+
export declare function getTranslatedDataOptions(dataOptions: ChartDataOptions, chartType: ChartType): {
|
|
3
|
+
chartDataOptions: import("./types").ChartDataOptionsInternal;
|
|
4
|
+
attributes: import("packages/sdk-data/dist").Attribute[];
|
|
5
|
+
measures: import("packages/sdk-data/dist").Measure[];
|
|
6
|
+
};
|
|
@@ -9,7 +9,7 @@ import { HighchartsType, HighchartsSeriesValues } from './translations/translati
|
|
|
9
9
|
import { TooltipSettings } from './tooltip';
|
|
10
10
|
import { PieOptions } from './translations/pie-plot-options';
|
|
11
11
|
import { FunnelOptions } from './translations/funnel-plot-options';
|
|
12
|
-
import { ChartType, OptionsWithAlerts, CompleteThemeSettings } from '../types';
|
|
12
|
+
import { ChartType, OptionsWithAlerts, CompleteThemeSettings, StyleOptions } from '../types';
|
|
13
13
|
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
14
14
|
import { ScatterBubbleOptions } from './translations/scatter-plot-options';
|
|
15
15
|
/**
|
|
@@ -30,9 +30,6 @@ export type HighchartsOptions = Pick<Options, keyof Options>;
|
|
|
30
30
|
* @param dateFormatter
|
|
31
31
|
*/
|
|
32
32
|
export declare const highchartsOptionsService: (chartData: ChartData, chartType: ChartType, chartDesignOptions: ChartDesignOptions, dataOptions: ChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, dateFormatter?: ((date: Date, format: string) => string) | undefined) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
33
|
-
export declare const colorChineseSilver = "#CCCCCC";
|
|
34
|
-
export declare const colorWhite = "#FFFFFF";
|
|
35
|
-
export declare const DEFAULT_SERIES_COLORS: string[];
|
|
36
33
|
export type SeriesType = HighchartsSeriesValues & {
|
|
37
34
|
index?: number;
|
|
38
35
|
animation?: boolean;
|
|
@@ -178,76 +175,7 @@ type Navigator = {
|
|
|
178
175
|
right: string;
|
|
179
176
|
};
|
|
180
177
|
};
|
|
181
|
-
declare const DEFAULT_STYLE_OPTIONS:
|
|
182
|
-
readonly legend: {
|
|
183
|
-
readonly enabled: true;
|
|
184
|
-
readonly position: "bottom";
|
|
185
|
-
};
|
|
186
|
-
readonly navigator: {
|
|
187
|
-
readonly enabled: true;
|
|
188
|
-
};
|
|
189
|
-
readonly markers: {
|
|
190
|
-
readonly enabled: true;
|
|
191
|
-
readonly fill: "hollow";
|
|
192
|
-
readonly size: "small";
|
|
193
|
-
};
|
|
194
|
-
readonly seriesLabels: {
|
|
195
|
-
readonly enabled: false;
|
|
196
|
-
readonly rotation: 0;
|
|
197
|
-
};
|
|
198
|
-
readonly xAxis: {
|
|
199
|
-
readonly enabled: true;
|
|
200
|
-
readonly gridLines: true;
|
|
201
|
-
readonly isIntervalEnabled: false;
|
|
202
|
-
readonly labels: {
|
|
203
|
-
readonly enabled: true;
|
|
204
|
-
};
|
|
205
|
-
readonly logarithmic: false;
|
|
206
|
-
readonly title: {
|
|
207
|
-
readonly enabled: false;
|
|
208
|
-
readonly text: "X Axis title";
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
readonly yAxis: {
|
|
212
|
-
readonly enabled: true;
|
|
213
|
-
readonly gridLines: true;
|
|
214
|
-
readonly isIntervalEnabled: false;
|
|
215
|
-
readonly labels: {
|
|
216
|
-
readonly enabled: true;
|
|
217
|
-
};
|
|
218
|
-
readonly logarithmic: false;
|
|
219
|
-
readonly title: {
|
|
220
|
-
readonly enabled: false;
|
|
221
|
-
readonly text: "Y Axis title";
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
readonly y2Axis: {
|
|
225
|
-
readonly enabled: true;
|
|
226
|
-
readonly gridLines: true;
|
|
227
|
-
readonly isIntervalEnabled: false;
|
|
228
|
-
readonly labels: {
|
|
229
|
-
readonly enabled: true;
|
|
230
|
-
};
|
|
231
|
-
readonly logarithmic: false;
|
|
232
|
-
readonly title: {
|
|
233
|
-
readonly enabled: false;
|
|
234
|
-
readonly text: "Y2 Axis title";
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
readonly convolution: {
|
|
238
|
-
readonly enabled: false;
|
|
239
|
-
readonly selectedConvolutionType: "byPercentage";
|
|
240
|
-
readonly minimalIndependentSlicePercentage: 3;
|
|
241
|
-
readonly independentSlicesCount: 7;
|
|
242
|
-
};
|
|
243
|
-
readonly labels: {
|
|
244
|
-
readonly categories: true;
|
|
245
|
-
readonly enabled: true;
|
|
246
|
-
readonly percent: true;
|
|
247
|
-
readonly decimals: false;
|
|
248
|
-
readonly value: false;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
178
|
+
declare const DEFAULT_STYLE_OPTIONS: StyleOptions;
|
|
251
179
|
/**
|
|
252
180
|
* Returns default style options, which can be used as base for custom style options.
|
|
253
181
|
*
|
|
@@ -2,6 +2,7 @@ import { Style } from '../chart-options-service';
|
|
|
2
2
|
import { ChartDataOptionsInternal, Category } from '../../chart-data-options/types';
|
|
3
3
|
import { ChartType } from '../../types';
|
|
4
4
|
import { CategoricalXValues } from '../../chart-data/types';
|
|
5
|
+
import { AxisClipped } from './translations-to-highcharts';
|
|
5
6
|
export type Axis = {
|
|
6
7
|
enabled?: boolean;
|
|
7
8
|
titleEnabled?: boolean;
|
|
@@ -68,6 +69,7 @@ export type AxisSettings = {
|
|
|
68
69
|
minorGridLineDashStyle?: string;
|
|
69
70
|
stackLabels?: StackLabel;
|
|
70
71
|
showLastLabel?: boolean;
|
|
72
|
+
visible?: boolean;
|
|
71
73
|
};
|
|
72
74
|
export type StackLabel = {
|
|
73
75
|
style: Style;
|
|
@@ -102,5 +104,5 @@ export declare const getCategoricalCompareValue: (value: CategoricalXValues) =>
|
|
|
102
104
|
export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
|
|
103
105
|
export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
104
106
|
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
105
|
-
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => AxisSettings[];
|
|
107
|
+
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => [AxisSettings[], AxisClipped[]];
|
|
106
108
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SeriesWithAlerts, CompleteThemeSettings } from '../../types';
|
|
2
2
|
import { SeriesType } from '../chart-options-service';
|
|
3
3
|
import { FunnelChartDesignOptions } from './design-options';
|
|
4
4
|
import { CategoricalChartData } from '../../chart-data/types';
|
|
5
5
|
import { CategoricalChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
6
|
-
export declare const getAPaletteColor: (colors: Color[] | undefined, index: number) => string;
|
|
7
6
|
/**
|
|
8
7
|
* Convert categorical chart data into renderable highcharts funnel series. *
|
|
9
8
|
*
|
|
@@ -11,7 +11,7 @@ export type LegendSettings = {
|
|
|
11
11
|
symbolRadius?: number;
|
|
12
12
|
symbolHeight?: number;
|
|
13
13
|
symbolWidth?: number;
|
|
14
|
-
borderWidth?:
|
|
14
|
+
borderWidth?: number;
|
|
15
15
|
borderColor?: string;
|
|
16
16
|
backgroundColor?: string;
|
|
17
17
|
title?: {
|
|
@@ -20,4 +20,5 @@ export type LegendSettings = {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
export declare const legendItemStyleDefault: LegendSettings['itemStyle'];
|
|
23
24
|
export declare const getLegendSettings: (position: LegendPosition) => LegendSettings;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SeriesWithAlerts, CompleteThemeSettings } from '../../types';
|
|
2
2
|
import { CategoricalChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
3
|
import { SeriesType } from '../chart-options-service';
|
|
4
4
|
import { PieChartDesignOptions } from './design-options';
|
|
5
5
|
import { CategoricalChartData } from '../../chart-data/types';
|
|
6
|
-
export declare const getAPaletteColor: (colors: Color[] | undefined, index: number) => string;
|
|
7
6
|
type FormattedPieChartData = SeriesWithAlerts<SeriesType[]> & {
|
|
8
7
|
convolutionSeries: SeriesType[];
|
|
9
8
|
};
|
|
@@ -2,7 +2,7 @@ import { ChartType } from '../../types';
|
|
|
2
2
|
import { ChartDataOptionsInternal, CategoricalChartDataOptionsInternal, CartesianChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
3
|
import { CategoricalSeriesValues, ChartData, CartesianChartData } from '../../chart-data/types';
|
|
4
4
|
import { StackableChartDesignOptions } from './design-options';
|
|
5
|
-
import { AxisMinMax } from './axis-section';
|
|
5
|
+
import { AxisMinMax, AxisSettings } from './axis-section';
|
|
6
6
|
import { Stacking } from '../chart-options-service';
|
|
7
7
|
import { ChartDesignOptions } from './types';
|
|
8
8
|
export type LineType = 'straight' | 'smooth';
|
|
@@ -40,6 +40,10 @@ export type SeriesPointStructure = {
|
|
|
40
40
|
drilldown?: string;
|
|
41
41
|
parent?: string;
|
|
42
42
|
};
|
|
43
|
+
export type AxisClipped = {
|
|
44
|
+
minClipped: boolean;
|
|
45
|
+
maxClipped: boolean;
|
|
46
|
+
};
|
|
43
47
|
/**
|
|
44
48
|
* Translate public-facing chart type and chart design options to internal highcharts chart type
|
|
45
49
|
*
|
|
@@ -62,7 +66,7 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
|
|
|
62
66
|
* @param index -
|
|
63
67
|
*/
|
|
64
68
|
export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (0 | -1)[];
|
|
65
|
-
export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string) => HighchartsSeriesValues;
|
|
69
|
+
export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string, yAxisSettings: AxisSettings, axisClipped: AxisClipped) => HighchartsSeriesValues;
|
|
66
70
|
export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
|
|
67
71
|
export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
|
|
68
72
|
min: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options';
|
|
2
|
-
import { LegacyIndicatorChartOptions } from '../types';
|
|
2
|
+
import { LegacyIndicatorChartOptions, TickerOptions } from '../types';
|
|
3
3
|
export declare class Ticker {
|
|
4
4
|
/**
|
|
5
5
|
* Renders indicator ticker widget.
|
|
@@ -9,7 +9,7 @@ export declare class Ticker {
|
|
|
9
9
|
* @param {object} options
|
|
10
10
|
* @param {HTMLElement} container
|
|
11
11
|
*/
|
|
12
|
-
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options:
|
|
12
|
+
render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: TickerOptions, container: HTMLElement): void;
|
|
13
13
|
/**
|
|
14
14
|
* Draws indicator ticker widget.
|
|
15
15
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NumericSimpleOptions, NumericBarOptions, GaugeOptions } from '../types';
|
|
1
|
+
import { NumericSimpleOptions, NumericBarOptions, GaugeOptions, TickerOptions } from '../types';
|
|
2
2
|
export declare const defaultNumericSimpleOptions: NumericSimpleOptions;
|
|
3
3
|
export declare const defaultNumericBarOptions: NumericBarOptions;
|
|
4
4
|
export declare const defaultGaugeOptions: GaugeOptions;
|
|
5
|
+
export declare const defaultTickerOptions: TickerOptions;
|
|
@@ -32,20 +32,21 @@ type CommonOptions = {
|
|
|
32
32
|
fontFamily: string;
|
|
33
33
|
title: {
|
|
34
34
|
color: string;
|
|
35
|
-
fontSizes
|
|
35
|
+
fontSizes?: FontSizes;
|
|
36
36
|
};
|
|
37
37
|
value: {
|
|
38
38
|
color?: string;
|
|
39
|
-
fontSizes
|
|
39
|
+
fontSizes?: FontSizes;
|
|
40
|
+
fontWeight?: number;
|
|
40
41
|
};
|
|
41
42
|
secondaryTitle: {
|
|
42
43
|
color: string;
|
|
43
|
-
fontSizes
|
|
44
|
+
fontSizes?: FontSizes;
|
|
44
45
|
};
|
|
45
46
|
secondaryValue: {
|
|
46
|
-
fontWeight
|
|
47
|
+
fontWeight?: number;
|
|
47
48
|
color: string;
|
|
48
|
-
fontSizes
|
|
49
|
+
fontSizes?: FontSizes;
|
|
49
50
|
};
|
|
50
51
|
textKeys: string[];
|
|
51
52
|
backgroundColor: string;
|
|
@@ -114,5 +115,45 @@ export type GaugeOptions = CommonOptions & {
|
|
|
114
115
|
gaugeHeights: BaseMeasure[];
|
|
115
116
|
measureKeys: string[];
|
|
116
117
|
};
|
|
117
|
-
export type
|
|
118
|
+
export type TickerOptions = CommonOptions & {
|
|
119
|
+
fontSize: number;
|
|
120
|
+
dividerColor: string;
|
|
121
|
+
barHandleColor: string;
|
|
122
|
+
height: number;
|
|
123
|
+
horizontalMargin: number;
|
|
124
|
+
barWidth: number;
|
|
125
|
+
barHeight: number;
|
|
126
|
+
barOpacity: number;
|
|
127
|
+
tickerBarWidth: number;
|
|
128
|
+
tickerBarHeight: number;
|
|
129
|
+
horizontalPadding: number;
|
|
130
|
+
textPadding: number;
|
|
131
|
+
sectionMinWidth: number;
|
|
132
|
+
dividerWidth: number;
|
|
133
|
+
dividerHeight: number;
|
|
134
|
+
valueFont?: string;
|
|
135
|
+
titleFont?: string;
|
|
136
|
+
secondaryValueFont?: string;
|
|
137
|
+
secondaryTitleFont?: string;
|
|
138
|
+
offsetX?: number;
|
|
139
|
+
showTickerBar?: boolean;
|
|
140
|
+
fitValueMeasure?: {
|
|
141
|
+
string: string;
|
|
142
|
+
width: number;
|
|
143
|
+
};
|
|
144
|
+
fitSecValueMeasure?: {
|
|
145
|
+
string: string;
|
|
146
|
+
width: number;
|
|
147
|
+
};
|
|
148
|
+
fitSecTitleMeasure?: {
|
|
149
|
+
string: string;
|
|
150
|
+
width: number;
|
|
151
|
+
};
|
|
152
|
+
fitTitleMeasure?: {
|
|
153
|
+
string: string;
|
|
154
|
+
width: number;
|
|
155
|
+
};
|
|
156
|
+
width?: number;
|
|
157
|
+
};
|
|
158
|
+
export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions | TickerOptions;
|
|
118
159
|
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CompleteThemeSettings } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Component that displays a loading indicator.
|
|
5
|
+
*
|
|
6
|
+
* @param onCancel - Function to call when cancel is clicked.
|
|
7
|
+
* @returns A loading indicator with optional cancel.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
|
|
10
|
+
themeSettings?: {
|
|
11
|
+
chart: {
|
|
12
|
+
textColor: string;
|
|
13
|
+
secondaryTextColor: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
panelBackgroundColor: string;
|
|
16
|
+
};
|
|
17
|
+
palette: {
|
|
18
|
+
variantColors: import("../../types").Color[];
|
|
19
|
+
};
|
|
20
|
+
typography: {
|
|
21
|
+
fontFamily: string;
|
|
22
|
+
primaryTextColor: string;
|
|
23
|
+
secondaryTextColor: string;
|
|
24
|
+
};
|
|
25
|
+
general: {
|
|
26
|
+
brandColor: string;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
primaryButtonTextColor: string;
|
|
29
|
+
primaryButtonHoverColor: string;
|
|
30
|
+
};
|
|
31
|
+
} | undefined;
|
|
32
|
+
onCancel?: (() => void) | undefined;
|
|
33
|
+
}) => JSX.Element;
|
|
@@ -8,6 +8,6 @@ import { WidgetDto } from './types';
|
|
|
8
8
|
* @returns {Object} An object containing an array of filters and an array of highlights.
|
|
9
9
|
*/
|
|
10
10
|
export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
|
|
11
|
-
filters: import("
|
|
12
|
-
highlights: import("
|
|
11
|
+
filters: import("@sisense/sdk-data").Filter[];
|
|
12
|
+
highlights: import("@sisense/sdk-data").Filter[];
|
|
13
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataColorOptions } from '../chart-data/series-data-color-service';
|
|
2
|
-
import {
|
|
2
|
+
import { ValueToColorMap, MultiColumnValueToColorMap, Color } from '../types';
|
|
3
3
|
import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
|
|
4
|
-
export declare const createValueColorOptions: (format?: PanelColorFormat,
|
|
4
|
+
export declare const createValueColorOptions: (format?: PanelColorFormat, customPaletteColors?: Color[]) => DataColorOptions | undefined;
|
|
5
5
|
export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
|
|
6
6
|
export declare const createValueToColorMultiColumnsMap: (items: PanelItem[]) => MultiColumnValueToColorMap;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure } from '@sisense/sdk-data';
|
|
2
|
-
import {
|
|
3
|
-
import { Panel, PanelItem,
|
|
4
|
-
import {
|
|
1
|
+
import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure, Jaql } from '@sisense/sdk-data';
|
|
2
|
+
import { StyledMeasureColumn, StyledColumn, Color } from '../types';
|
|
3
|
+
import { Panel, PanelItem, WidgetType } from './types';
|
|
4
|
+
import { WidgetDataOptions } from '../models';
|
|
5
5
|
export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
|
|
6
|
-
export declare function createDataColumn(item: PanelItem,
|
|
7
|
-
export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[],
|
|
6
|
+
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledMeasureColumn | StyledColumn;
|
|
7
|
+
export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], customPaletteColors?: Color[]): WidgetDataOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Filter } from '@sisense/sdk-data';
|
|
2
|
-
import {
|
|
1
|
+
import { Filter, FilterJaql } from '@sisense/sdk-data';
|
|
2
|
+
import { Panel } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Extracts filter model components from a FilterJaql object.
|
|
5
5
|
*
|
|
@@ -16,20 +16,8 @@ export declare function extractFilterModelFromJaql(jaql: FilterJaql): {
|
|
|
16
16
|
members: string[];
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
backgroundFilter: import("
|
|
20
|
-
|
|
21
|
-
members: string[];
|
|
22
|
-
};
|
|
23
|
-
} & {
|
|
24
|
-
turnedOff: boolean;
|
|
25
|
-
}) | undefined;
|
|
26
|
-
turnOffMembersFilter: ({
|
|
27
|
-
exclude: {
|
|
28
|
-
members: string[];
|
|
29
|
-
};
|
|
30
|
-
} & {
|
|
31
|
-
turnedOff: boolean;
|
|
32
|
-
}) | undefined;
|
|
19
|
+
backgroundFilter: import("@sisense/sdk-data").BackgroundFilter | import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
|
|
20
|
+
turnOffMembersFilter: import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
|
|
33
21
|
};
|
|
34
22
|
/**
|
|
35
23
|
* Creates a Filter from a FilterJaql object.
|
|
@@ -2,4 +2,4 @@ import { StyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, Numer
|
|
|
2
2
|
import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
|
|
3
3
|
export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
|
|
4
4
|
export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
|
|
5
|
-
export declare function extractStyleOptions(widgetType:
|
|
5
|
+
export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): StyleOptions | TableStyleOptions;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Jaql, SortDirection } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* The type of a widget on a dashboard that is a variant of Cartesian widget.
|
|
4
|
+
*/
|
|
5
|
+
export type CartesianWidgetType = 'chart/line' | 'chart/area' | 'chart/bar' | 'chart/column' | 'chart/polar';
|
|
6
|
+
/**
|
|
7
|
+
* The type of a widget on a dashboard that is a variant of Categorical widget.
|
|
8
|
+
*/
|
|
9
|
+
export type CategoricalWidgetType = 'chart/pie' | 'chart/funnel' | 'treemap' | 'sunburst';
|
|
10
|
+
/**
|
|
11
|
+
* The type of a widget on a dashboard that is a variant of tabular widget.
|
|
12
|
+
*/
|
|
13
|
+
export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg';
|
|
14
|
+
/**
|
|
15
|
+
* The type of a widget on a dashboard.
|
|
16
|
+
*/
|
|
17
|
+
export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType;
|
|
16
18
|
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst';
|
|
17
19
|
export declare enum WidgetDashboardFilterMode {
|
|
18
20
|
FILTER = "filter",
|
|
@@ -22,7 +24,9 @@ export type Datasource = {
|
|
|
22
24
|
title: string;
|
|
23
25
|
id: string;
|
|
24
26
|
fullname?: string;
|
|
25
|
-
live
|
|
27
|
+
live?: boolean;
|
|
28
|
+
address?: string;
|
|
29
|
+
database?: string;
|
|
26
30
|
};
|
|
27
31
|
/**
|
|
28
32
|
* The data transfer object (DTO) containing info of a widget on a dashboard.
|
|
@@ -41,7 +45,7 @@ export interface WidgetDto {
|
|
|
41
45
|
};
|
|
42
46
|
style: WidgetStyle;
|
|
43
47
|
title: string;
|
|
44
|
-
desc: string;
|
|
48
|
+
desc: string | null;
|
|
45
49
|
options?: {
|
|
46
50
|
dashboardFiltersMode: `${WidgetDashboardFilterMode}`;
|
|
47
51
|
};
|
|
@@ -51,64 +55,10 @@ export type FiltersIgnoringRules = {
|
|
|
51
55
|
ids: string[];
|
|
52
56
|
all: boolean;
|
|
53
57
|
};
|
|
54
|
-
export declare const enum DataType {
|
|
55
|
-
TEXT = "text",
|
|
56
|
-
NUMERIC = "numeric",
|
|
57
|
-
DATETIME = "datetime"
|
|
58
|
-
}
|
|
59
58
|
export type Panel = {
|
|
60
59
|
name: string;
|
|
61
60
|
items: PanelItem[];
|
|
62
61
|
};
|
|
63
|
-
export declare enum SortDirection {
|
|
64
|
-
ASC = "asc",
|
|
65
|
-
DESC = "desc"
|
|
66
|
-
}
|
|
67
|
-
export type BaseJaql = {
|
|
68
|
-
agg?: string;
|
|
69
|
-
datatype: DataType;
|
|
70
|
-
dim: string;
|
|
71
|
-
table: string;
|
|
72
|
-
column: string;
|
|
73
|
-
title: string;
|
|
74
|
-
level?: 'years' | 'quarters' | 'months' | 'weeks' | 'minutes' | 'days';
|
|
75
|
-
sort?: SortDirection;
|
|
76
|
-
};
|
|
77
|
-
type FormulaID = string;
|
|
78
|
-
type FormulaContext = BaseJaql | FilterJaql;
|
|
79
|
-
export type FormulaJaql = {
|
|
80
|
-
type?: 'measure';
|
|
81
|
-
sort?: SortDirection;
|
|
82
|
-
title: string;
|
|
83
|
-
formula: string;
|
|
84
|
-
context?: Record<FormulaID, FormulaContext>;
|
|
85
|
-
};
|
|
86
|
-
export type IncludeAllFilter = {
|
|
87
|
-
all: true;
|
|
88
|
-
};
|
|
89
|
-
export type IncludeMembersFilter = {
|
|
90
|
-
members: string[];
|
|
91
|
-
};
|
|
92
|
-
type ExcludeMembersFilter = {
|
|
93
|
-
exclude: {
|
|
94
|
-
members: string[];
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
export type MembersFilter = IncludeMembersFilter | ExcludeMembersFilter;
|
|
98
|
-
type BaseFilter = IncludeAllFilter | MembersFilter;
|
|
99
|
-
export type BackgroundFilter = BaseFilter & {
|
|
100
|
-
level?: 'string';
|
|
101
|
-
};
|
|
102
|
-
type TurnOffMembersFilter = ExcludeMembersFilter & {
|
|
103
|
-
turnedOff: boolean;
|
|
104
|
-
};
|
|
105
|
-
type Filter = BaseFilter & {
|
|
106
|
-
filter?: BackgroundFilter | TurnOffMembersFilter;
|
|
107
|
-
};
|
|
108
|
-
export type FilterJaql = BaseJaql & {
|
|
109
|
-
filter: Filter;
|
|
110
|
-
};
|
|
111
|
-
export type Jaql = BaseJaql | FormulaJaql | FilterJaql;
|
|
112
62
|
type SeriesType = 'auto' | 'line' | 'spline' | 'areaspline' | 'bar' | 'area' | 'column';
|
|
113
63
|
interface DecimalAbbreviations {
|
|
114
64
|
k: boolean;
|
|
@@ -20,7 +20,13 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
|
|
|
20
20
|
api: RestApi;
|
|
21
21
|
}) => Promise<{
|
|
22
22
|
widget: WidgetDto;
|
|
23
|
-
dashboard:
|
|
23
|
+
dashboard: ({
|
|
24
|
+
oid: string;
|
|
25
|
+
title: string;
|
|
26
|
+
datasource: import("./types").Datasource;
|
|
27
|
+
widgets?: WidgetDto[] | undefined;
|
|
28
|
+
filters?: (import("../api/types/dashboard-dto").Filter | import("../api/types/dashboard-dto").CascadingFilter)[] | undefined;
|
|
29
|
+
} & import("../utils/utility-types").AnyObject) | undefined;
|
|
24
30
|
}>;
|
|
25
31
|
/**
|
|
26
32
|
* Custom hook for fetching Widget DTO and Dashboard DTO models.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type Filter } from '@sisense/sdk-data';
|
|
1
|
+
import { type Filter, SortDirection as JaqlSortDirection } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options';
|
|
3
3
|
import { ChartType, SortDirection } from '../types';
|
|
4
|
-
import { FiltersMergeStrategy, Panel, PanelItem,
|
|
4
|
+
import { FiltersMergeStrategy, Panel, PanelItem, WidgetSubtype, WidgetType } from './types';
|
|
5
5
|
export declare function getChartType(widgetType: WidgetType): ChartType;
|
|
6
6
|
export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
|
|
7
7
|
type WidgetTypeOrString = string | WidgetType;
|
|
8
8
|
export declare function isSupportedWidgetType(widgetType: WidgetTypeOrString): widgetType is WidgetType;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function isTabularWidget(widgetType: WidgetTypeOrString): boolean;
|
|
10
10
|
export declare function getEnabledPanelItems(panels: Panel[], panelName: string): PanelItem[];
|
|
11
11
|
export declare function getRootPanelItem(item: PanelItem): PanelItem;
|
|
12
12
|
export declare function getSortType(jaqlSort: JaqlSortDirection | undefined): SortDirection;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FunctionComponent } from 'react';
|
|
2
|
+
import { MenuList } from '@mui/material';
|
|
3
|
+
export type DropdownProps = {
|
|
4
|
+
elements: JSX.Element[];
|
|
5
|
+
icon?: JSX.Element;
|
|
6
|
+
selectedIdx?: number;
|
|
7
|
+
} & React.ComponentProps<typeof MenuList>;
|
|
8
|
+
export declare const Dropdown: FunctionComponent<DropdownProps>;
|
|
@@ -2,5 +2,8 @@ export { LinkButton, PrimaryButton, SecondaryButton } from './buttons';
|
|
|
2
2
|
export { Checkbox } from './checkbox';
|
|
3
3
|
export { BasicInput } from './basic-input';
|
|
4
4
|
export { Input } from './input';
|
|
5
|
-
export { Radio } from './radio';
|
|
5
|
+
export { Radio, RadioGroup, type RadioGroupProps } from './radio';
|
|
6
6
|
export { SisenseSwitchButton } from './switch';
|
|
7
|
+
export { TriangleIndicator } from './triangle-indicator';
|
|
8
|
+
export { DateRangeFieldButton } from './date-range-field-button';
|
|
9
|
+
export { Dropdown } from './dropdown';
|
|
@@ -3,4 +3,11 @@ type RadioProps = {
|
|
|
3
3
|
label?: string;
|
|
4
4
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
5
5
|
export declare const Radio: FunctionComponent<RadioProps>;
|
|
6
|
+
export type RadioGroupProps = {
|
|
7
|
+
items: string[];
|
|
8
|
+
currentSelection?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
12
|
+
export declare const RadioGroup: FunctionComponent<RadioGroupProps>;
|
|
6
13
|
export {};
|