@sisense/sdk-ui 1.3.0 → 1.4.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/ai-context-provider.d.ts +32 -0
- package/dist/ai/api/chat-api-provider.d.ts +17 -0
- package/dist/ai/api/chat-rest-api.d.ts +3 -1
- package/dist/ai/api/errors.d.ts +1 -0
- package/dist/ai/api/hooks.d.ts +10 -49
- package/dist/ai/api/types.d.ts +16 -27
- package/dist/ai/buttons/thumbs-down-button.d.ts +6 -0
- package/dist/ai/buttons/thumbs-up-button.d.ts +6 -0
- package/dist/ai/chat-box.d.ts +3 -3
- package/dist/ai/chat-config.d.ts +28 -0
- package/dist/ai/chat-home.d.ts +5 -1
- package/dist/ai/chat-router.d.ts +2 -0
- package/dist/ai/chatbot.d.ts +26 -4
- package/dist/ai/common/tooltip.d.ts +5 -0
- package/dist/ai/error-page.d.ts +10 -0
- package/dist/ai/get-nlg-query-result.d.ts +78 -0
- package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-down-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-up-icon.d.ts +2 -0
- package/dist/ai/index.d.ts +6 -3
- package/dist/ai/loading-page.d.ts +2 -0
- package/dist/ai/messages/clear-history-success-message.d.ts +2 -0
- package/dist/ai/messages/feedback-wrapper.d.ts +9 -0
- package/dist/ai/messages/get-widget-options.d.ts +2 -1
- package/dist/ai/messages/message-resolver.d.ts +1 -2
- package/dist/ai/messages/text-message.d.ts +1 -1
- package/dist/ai/toolbar.d.ts +2 -2
- package/dist/ai/use-chat-session.d.ts +1 -1
- package/dist/ai/use-get-nlg-query-result.d.ts +103 -0
- package/dist/ai/use-get-query-recommendations.d.ts +67 -0
- package/dist/ai.js +1866 -1518
- package/dist/{chart.d.ts → chart/chart.d.ts} +1 -1
- package/dist/chart/helpers/use-synced-data.d.ts +8 -0
- package/dist/chart/helpers/use-translated-data-options.d.ts +7 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart-data/types.d.ts +1 -0
- package/dist/chart-data-options/translate-data-options.d.ts +5 -1
- package/dist/chart-data-options/types.d.ts +107 -12
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/category-chart-options.d.ts +1 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +7 -0
- package/dist/chart-options-processor/plot-bands.d.ts +2 -2
- package/dist/chart-options-processor/scatter-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/style-to-design-options-translator/index.d.ts +1 -0
- package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/base-design-options.d.ts +3 -3
- package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/design-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/number-format-config.d.ts +10 -16
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +4 -4
- package/dist/chart-options-processor/translations/types.d.ts +18 -6
- package/dist/chart-options-processor/translations/value-label-section.d.ts +9 -4
- package/dist/charts/indicator/indicator-legacy-chart-options/prepare-ticker-options.d.ts +2 -0
- package/dist/charts/map-charts/areamap/areamap.d.ts +2 -2
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +9 -3
- package/dist/charts/map-charts/scattermap/utils/location.d.ts +3 -0
- package/dist/charts/table/helpers/calc-column-widths.d.ts +3 -1
- package/dist/common/hooks/data-load-state-reducer.d.ts +10 -0
- package/dist/common/hooks/use-hover.d.ts +8 -0
- package/dist/common/icons/yellow-exclamation-mark-icon.d.ts +2 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
- package/dist/decorators/hook-decorators/with-tracking.d.ts +11 -0
- package/dist/formulas/fetch-formula.d.ts +2 -0
- package/dist/formulas/index.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +5 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +34073 -10282
- package/dist/indicator-canvas.d.ts +2 -2
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +8 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -0
- package/dist/pivot-table/index.d.ts +1 -0
- package/dist/pivot-table/pivot-table.d.ts +42 -0
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +14 -0
- package/dist/props.d.ts +62 -4
- package/dist/sisense-chart/sisense-chart.d.ts +2 -2
- package/dist/types.d.ts +74 -9
- package/dist/utils/utility-types.d.ts +12 -0
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +1 -1
- package/dist/{table-widget-b467cc86.js → with-tracking-b583e949.js} +38407 -38268
- package/package.json +13 -13
- package/dist/ai/api/chat-api-context.d.ts +0 -12
- package/dist/ai/chatbot-context.d.ts +0 -11
- package/dist/ai/nlg-query-result.d.ts +0 -20
|
@@ -3,7 +3,7 @@ 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
5
|
import { ChartData } from './chart-data/types';
|
|
6
|
-
import {
|
|
6
|
+
import { DesignOptions } from './chart-options-processor/translations/types';
|
|
7
7
|
import { ThemeSettings } from './types';
|
|
8
8
|
interface Props {
|
|
9
9
|
chartData: IndicatorChartData;
|
|
@@ -17,5 +17,5 @@ interface Props {
|
|
|
17
17
|
export declare const IndicatorCanvas: FunctionComponent<Props>;
|
|
18
18
|
export declare const isIndicatorChartData: (chartData: ChartData) => chartData is IndicatorChartData;
|
|
19
19
|
export declare const isIndicatorChartDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is IndicatorChartDataOptionsInternal;
|
|
20
|
-
export declare const isIndicatorDesignOptions: (designOptions:
|
|
20
|
+
export declare const isIndicatorDesignOptions: (designOptions: DesignOptions) => designOptions is IndicatorChartDesignOptions;
|
|
21
21
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataState } from '../../common/hooks/data-load-state-reducer';
|
|
1
2
|
import { type DashboardModel } from './types';
|
|
2
3
|
import { GetDashboardModelOptions } from './get-dashboard-model';
|
|
3
4
|
import { HookEnableParam } from '../../common/hooks/types';
|
|
@@ -103,3 +104,10 @@ export declare const useGetDashboardModel: (params: GetDashboardModelParams) =>
|
|
|
103
104
|
* @internal
|
|
104
105
|
*/
|
|
105
106
|
export declare function useGetDashboardModelInternal(params: GetDashboardModelParams): DashboardModelState;
|
|
107
|
+
/**
|
|
108
|
+
* Translates the data state to the dashboard model state.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
* @param dataState - The data state to be translated
|
|
112
|
+
*/
|
|
113
|
+
export declare function translateToDashboardResponse(dataState: DataState<DashboardModel>): DashboardModelState;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataState } from '../../common/hooks/data-load-state-reducer.js';
|
|
1
2
|
import { type DashboardModel } from './types.js';
|
|
2
3
|
import { HookEnableParam } from '../../common/hooks/types.js';
|
|
3
4
|
import { GetDashboardModelsOptions } from './get-dashboard-models.js';
|
|
@@ -88,3 +89,8 @@ export declare const useGetDashboardModels: (params?: GetDashboardModelsParams |
|
|
|
88
89
|
* @internal
|
|
89
90
|
*/
|
|
90
91
|
export declare function useGetDashboardModelsInternal(params?: GetDashboardModelsParams): DashboardModelsState;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
* Translates the data state to a dashboard models state.
|
|
95
|
+
**/
|
|
96
|
+
export declare function translateToDashboardsResponse(dataState: DataState<DashboardModel[]>): DashboardModelsState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PivotTable } from './pivot-table';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PivotTableProps } from '../props';
|
|
3
|
+
/**
|
|
4
|
+
* Pivot Table with pagination.
|
|
5
|
+
*
|
|
6
|
+
* See [Pivot Tables](https://docs.sisense.com/main/SisenseLinux/pivot.htm) for more information.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* (1) Example of PivotTable from the `Sample ECommerce` data model:
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <PivotTable
|
|
13
|
+
* dataSet={DM.DataSource}
|
|
14
|
+
* dataOptions={{
|
|
15
|
+
* rows: [
|
|
16
|
+
* { column: DM.Category.Category, includeSubTotals: true },
|
|
17
|
+
* { column: DM.Commerce.AgeRange, includeSubTotals: true },
|
|
18
|
+
* DM.Commerce.Condition,
|
|
19
|
+
* ],
|
|
20
|
+
* columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
|
|
21
|
+
* values: [
|
|
22
|
+
* {
|
|
23
|
+
* column: measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
|
|
24
|
+
* dataBars: true,
|
|
25
|
+
* totalsCalculation: 'sum',
|
|
26
|
+
* },
|
|
27
|
+
* {
|
|
28
|
+
* column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
29
|
+
* totalsCalculation: 'sum',
|
|
30
|
+
* },
|
|
31
|
+
* ],
|
|
32
|
+
* grandTotals: { title: 'Grand Total', rows: true, columns: true },
|
|
33
|
+
* }}
|
|
34
|
+
* filters={[filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])]}
|
|
35
|
+
* styleOptions={{ width: 1000, height: 600, rowsPerPage: 50 }}
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
* @param props - Pivot Table properties
|
|
39
|
+
* @returns Pivot Table component
|
|
40
|
+
* @alpha
|
|
41
|
+
*/
|
|
42
|
+
export declare const PivotTable: React.FunctionComponent<PivotTableProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PivotTableProps } from '../props';
|
|
2
|
+
import { JaqlRequest } from '@sisense/sdk-pivot-client';
|
|
3
|
+
/**
|
|
4
|
+
* A hook that returns the JAQL request object from pivot table props.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const useGetPivotTableQuery: ({ dataSet, dataOptions, filters }: PivotTableProps) => {
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isSuccess: boolean;
|
|
11
|
+
isError: boolean;
|
|
12
|
+
error: Error | undefined;
|
|
13
|
+
jaql: JaqlRequest | null;
|
|
14
|
+
};
|
package/dist/props.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints } from './types';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions } from './types';
|
|
3
3
|
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
4
|
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
|
-
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions } from './chart-data-options/types';
|
|
5
|
+
import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions } from './chart-data-options/types';
|
|
6
6
|
import { AppConfig } from './app/client-application';
|
|
7
7
|
import { ExecuteQueryParams, QueryByWidgetIdState, QueryState } from './query-execution';
|
|
8
8
|
import { FiltersMergeStrategy } from './dashboard-widget/types';
|
|
@@ -199,6 +199,14 @@ export type AreamapDataPointEventHandler = (
|
|
|
199
199
|
point: AreamapDataPoint,
|
|
200
200
|
/** Native MouseEvent */
|
|
201
201
|
nativeEvent: MouseEvent) => void;
|
|
202
|
+
/**
|
|
203
|
+
* Click handler for when a data point on Scattermap is clicked.
|
|
204
|
+
*/
|
|
205
|
+
export type ScattermapDataPointEventHandler = (
|
|
206
|
+
/** Data point that was clicked */
|
|
207
|
+
point: ScattermapDataPoint,
|
|
208
|
+
/** Native MouseEvent */
|
|
209
|
+
nativeEvent: MouseEvent) => void;
|
|
202
210
|
/**
|
|
203
211
|
* Click handler for when a data point on Boxplot is clicked.
|
|
204
212
|
*/
|
|
@@ -278,6 +286,18 @@ interface AreamapChartEventProps {
|
|
|
278
286
|
*/
|
|
279
287
|
onDataPointClick?: AreamapDataPointEventHandler;
|
|
280
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Event props for Scattermap chart which uses ScattermapDataPoint type
|
|
291
|
+
* to describe data points for events.
|
|
292
|
+
*/
|
|
293
|
+
interface ScattermapChartEventProps {
|
|
294
|
+
/**
|
|
295
|
+
* Click handler callback for a data point
|
|
296
|
+
*
|
|
297
|
+
* @category Callbacks
|
|
298
|
+
*/
|
|
299
|
+
onDataPointClick?: ScattermapDataPointEventHandler;
|
|
300
|
+
}
|
|
281
301
|
/**
|
|
282
302
|
* Event props for Boxplot chart which uses BoxplotDataPoint type
|
|
283
303
|
* to describe data points for events.
|
|
@@ -352,7 +372,7 @@ interface ChartEventProps extends HighchartsBasedChartEventProps {
|
|
|
352
372
|
*
|
|
353
373
|
* @category Callbacks
|
|
354
374
|
*/
|
|
355
|
-
onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler;
|
|
375
|
+
onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler | ScattermapDataPointEventHandler;
|
|
356
376
|
/**
|
|
357
377
|
* Context menu handler callback for a data point
|
|
358
378
|
*
|
|
@@ -553,6 +573,44 @@ export interface TableProps {
|
|
|
553
573
|
*/
|
|
554
574
|
refreshCounter?: number;
|
|
555
575
|
}
|
|
576
|
+
/**
|
|
577
|
+
* Props of the {@link PivotTable} component.
|
|
578
|
+
*/
|
|
579
|
+
export interface PivotTableProps {
|
|
580
|
+
/**
|
|
581
|
+
* Data source name (as a `string`) - e.g. `Sample ECommerce`.
|
|
582
|
+
*
|
|
583
|
+
* If not specified, the component will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
584
|
+
*
|
|
585
|
+
* @category Data
|
|
586
|
+
*/
|
|
587
|
+
dataSet?: DataSource;
|
|
588
|
+
/**
|
|
589
|
+
* Configurations for how to interpret and present the data passed to the component
|
|
590
|
+
*
|
|
591
|
+
* @category Representation
|
|
592
|
+
*/
|
|
593
|
+
dataOptions: PivotTableDataOptions;
|
|
594
|
+
/**
|
|
595
|
+
* Filters that will slice query results
|
|
596
|
+
*
|
|
597
|
+
* @category Data
|
|
598
|
+
*/
|
|
599
|
+
filters?: Filter[] | FilterRelations;
|
|
600
|
+
/**
|
|
601
|
+
* Configurations that define functional style of the various table elements
|
|
602
|
+
*
|
|
603
|
+
* @category Representation
|
|
604
|
+
*/
|
|
605
|
+
styleOptions?: PivotTableStyleOptions;
|
|
606
|
+
/**
|
|
607
|
+
* Used to force a refresh of the table from outside the table component
|
|
608
|
+
* Since added to dependencies of useEffect, will trigger a query execution
|
|
609
|
+
*
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
612
|
+
refreshCounter?: number;
|
|
613
|
+
}
|
|
556
614
|
/**
|
|
557
615
|
* Props of the {@link ScatterChart} component.
|
|
558
616
|
*/
|
|
@@ -908,7 +966,7 @@ export interface BoxplotChartProps extends BaseChartProps, BoxplotChartEventProp
|
|
|
908
966
|
/**
|
|
909
967
|
* Props of the {@link ScattermapChart} component.
|
|
910
968
|
*/
|
|
911
|
-
export interface ScattermapChartProps extends BaseChartProps {
|
|
969
|
+
export interface ScattermapChartProps extends BaseChartProps, ScattermapChartEventProps {
|
|
912
970
|
/**
|
|
913
971
|
* Configurations for how to interpret and present the data passed to the chart
|
|
914
972
|
*
|
|
@@ -9,7 +9,7 @@ interface Props {
|
|
|
9
9
|
chartType: ChartType;
|
|
10
10
|
chartData: ChartData;
|
|
11
11
|
chartDataOptions: ChartDataOptionsInternal;
|
|
12
|
-
|
|
12
|
+
chartDesignOptions: ChartDesignOptions;
|
|
13
13
|
themeSettings?: CompleteThemeSettings;
|
|
14
14
|
onDataPointClick?: SisenseChartDataPointEventHandler;
|
|
15
15
|
onDataPointContextMenu?: SisenseChartDataPointEventHandler;
|
|
@@ -19,5 +19,5 @@ interface Props {
|
|
|
19
19
|
/**
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare const SisenseChart: ({ chartType, chartData, chartDataOptions,
|
|
22
|
+
export declare const SisenseChart: ({ chartType, chartData, chartDataOptions, chartDesignOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: Props) => JSX.Element | null;
|
|
23
23
|
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { CartesianChartType, ScatterChartType, CategoricalChartType, IndicatorCh
|
|
|
9
9
|
import { DataPointsEventHandler } from './props';
|
|
10
10
|
import { LegendPosition } from './chart-options-processor/translations/legend-section';
|
|
11
11
|
import { GeoDataElement, RawGeoDataElement } from './chart-data/types';
|
|
12
|
+
import { Coordinates } from './charts/map-charts/scattermap/types';
|
|
12
13
|
export type { AppConfig } from './app/client-application';
|
|
13
14
|
export type { DateConfig } from './query/date-formats';
|
|
14
15
|
export type { CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, StyledColumn, StyledMeasureColumn, } from './chart-data-options/types';
|
|
@@ -312,6 +313,49 @@ export interface TableStyleOptions {
|
|
|
312
313
|
*/
|
|
313
314
|
height?: number;
|
|
314
315
|
}
|
|
316
|
+
/** Configuration options that define functional style of the various elements of {@link PivotTable} */
|
|
317
|
+
export interface PivotTableStyleOptions {
|
|
318
|
+
/**
|
|
319
|
+
* Boolean flag whether to fill header cells with background color
|
|
320
|
+
*/
|
|
321
|
+
headersColor?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Boolean flag whether to apply background color to alternate rows.
|
|
324
|
+
*/
|
|
325
|
+
alternatingRowsColor?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Boolean flag whether to apply background color to alternate columns
|
|
328
|
+
*/
|
|
329
|
+
alternatingColumnsColor?: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Number of rows per page
|
|
332
|
+
*
|
|
333
|
+
* Default value is 25
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
rowsPerPage?: number;
|
|
337
|
+
/**
|
|
338
|
+
* Total width of the component, which is considered in the following order of priority:
|
|
339
|
+
*
|
|
340
|
+
* 1. Value passed to this property (in pixels)
|
|
341
|
+
* 2. Width of the container wrapping this component
|
|
342
|
+
* 3. Default value of 400px
|
|
343
|
+
*
|
|
344
|
+
*/
|
|
345
|
+
width?: number;
|
|
346
|
+
/**
|
|
347
|
+
* Total height of the component, which is considered in the following order of priority:
|
|
348
|
+
*
|
|
349
|
+
* 1. Value passed to this property (in pixels).
|
|
350
|
+
* 2. Height of the container wrapping this component
|
|
351
|
+
* 3. Default value of 500px (for component without header) or 525px (for component with header).
|
|
352
|
+
*/
|
|
353
|
+
height?: number;
|
|
354
|
+
/**
|
|
355
|
+
* Boolean flag whether the height of the component should be automatically adjusted to fit the content
|
|
356
|
+
*/
|
|
357
|
+
isAutoHeight?: boolean;
|
|
358
|
+
}
|
|
315
359
|
/**
|
|
316
360
|
* Common part of IndicatorStyleOptions for all types of indicator
|
|
317
361
|
*
|
|
@@ -447,37 +491,37 @@ export type NumberFormatConfig = {
|
|
|
447
491
|
/**
|
|
448
492
|
* Supported formats
|
|
449
493
|
*/
|
|
450
|
-
name
|
|
494
|
+
name?: 'Numbers' | 'Currency' | 'Percent';
|
|
451
495
|
/**
|
|
452
496
|
* The number of decimal places
|
|
453
497
|
*/
|
|
454
|
-
decimalScale
|
|
498
|
+
decimalScale?: DecimalScale;
|
|
455
499
|
/**
|
|
456
500
|
* Boolean flag whether to show an abbreviation
|
|
457
501
|
* for a number greater than or equal one trillion - e.g. 1T
|
|
458
502
|
*/
|
|
459
|
-
trillion
|
|
503
|
+
trillion?: boolean;
|
|
460
504
|
/**
|
|
461
505
|
* Boolean flag whether to show an abbreviation
|
|
462
506
|
* for a number greater than or equal one billion - e.g. 1B
|
|
463
507
|
*/
|
|
464
|
-
billion
|
|
508
|
+
billion?: boolean;
|
|
465
509
|
/**
|
|
466
510
|
* Boolean flag whether to show an abbreviation
|
|
467
511
|
* for a number greater than or equal one million - e.g. 1M
|
|
468
512
|
*/
|
|
469
|
-
million
|
|
513
|
+
million?: boolean;
|
|
470
514
|
/**
|
|
471
515
|
* Boolean flag whether to show an abbreviation
|
|
472
516
|
* for a number greater than or equal one thousand - e.g. 1K
|
|
473
517
|
*/
|
|
474
|
-
kilo
|
|
518
|
+
kilo?: boolean;
|
|
475
519
|
/**
|
|
476
520
|
* Boolean flag whether the thousand separator is shown
|
|
477
521
|
*
|
|
478
522
|
* If true, show the thousand separator, e.g. `1,000`. Otherwise, show `1000`
|
|
479
523
|
*/
|
|
480
|
-
thousandSeparator
|
|
524
|
+
thousandSeparator?: boolean;
|
|
481
525
|
/**
|
|
482
526
|
* Boolean flag whether `symbol` is shown in front of or after the number
|
|
483
527
|
*
|
|
@@ -485,12 +529,18 @@ export type NumberFormatConfig = {
|
|
|
485
529
|
*
|
|
486
530
|
* If false, append `symbol` after the number, e.g. show `1000¥` when `symbol` is `¥`.
|
|
487
531
|
*/
|
|
488
|
-
prefix
|
|
532
|
+
prefix?: boolean;
|
|
489
533
|
/**
|
|
490
534
|
* Symbol to show in front of or after the number depending on the value of `prefix`.
|
|
491
535
|
*/
|
|
492
|
-
symbol
|
|
536
|
+
symbol?: string;
|
|
493
537
|
};
|
|
538
|
+
/**
|
|
539
|
+
* {@link NumberFormatConfig} with all props required
|
|
540
|
+
*
|
|
541
|
+
* @internal
|
|
542
|
+
*/
|
|
543
|
+
export type CompleteNumberFormatConfig = Required<NumberFormatConfig>;
|
|
494
544
|
/** Identifier of a theme as defined in the Sisense instance. */
|
|
495
545
|
export type ThemeOid = string;
|
|
496
546
|
/** Theme settings defining the look and feel of components. */
|
|
@@ -642,11 +692,13 @@ export type ChartDataPoints = DataPoint[] | ScatterDataPoint[] | BoxplotDataPoin
|
|
|
642
692
|
export type ChartDataPoint = DataPoint | ScatterDataPoint | BoxplotDataPoint | AreamapDataPoint;
|
|
643
693
|
/**
|
|
644
694
|
* Abstract data point in a chart that based on Highcharts.
|
|
695
|
+
*
|
|
645
696
|
* @internal
|
|
646
697
|
*/
|
|
647
698
|
export type HighchartsBasedChartDataPoint = DataPoint | ScatterDataPoint | BoxplotDataPoint;
|
|
648
699
|
/**
|
|
649
700
|
* Abstract event handler for data point click event
|
|
701
|
+
*
|
|
650
702
|
* @internal
|
|
651
703
|
*/
|
|
652
704
|
export type ChartDataPointEventHandler = (point: ChartDataPoint, nativeEvent: PointerEvent | MouseEvent) => void;
|
|
@@ -690,6 +742,19 @@ export type BoxplotDataPoint = {
|
|
|
690
742
|
* Data point in an Areamap chart.
|
|
691
743
|
*/
|
|
692
744
|
export type AreamapDataPoint = GeoDataElement;
|
|
745
|
+
/**
|
|
746
|
+
* Data point in an Scattermap chart.
|
|
747
|
+
*/
|
|
748
|
+
export type ScattermapDataPoint = {
|
|
749
|
+
/** Location name displayed on marker */
|
|
750
|
+
displayName: string;
|
|
751
|
+
/** Array with categories strings used for location definition */
|
|
752
|
+
categories: string[];
|
|
753
|
+
/** Numeric measure value */
|
|
754
|
+
value: number;
|
|
755
|
+
/** Location coordinates */
|
|
756
|
+
coordinates: Coordinates;
|
|
757
|
+
};
|
|
693
758
|
/**
|
|
694
759
|
* This is the minimum definition of Highcharts
|
|
695
760
|
* events, Series, and Point that we require. As
|
|
@@ -40,4 +40,16 @@ type PickTypeOf<T, K extends string | number | symbol> = K extends AllKeys<T> ?
|
|
|
40
40
|
* Abstract object with any unknown values
|
|
41
41
|
*/
|
|
42
42
|
export type AnyObject = Record<string, any>;
|
|
43
|
+
/**
|
|
44
|
+
* Allows you to make a property of an object required.
|
|
45
|
+
* @example
|
|
46
|
+
* type T = {
|
|
47
|
+
* a: string;
|
|
48
|
+
* b?: number;
|
|
49
|
+
* c?: boolean;
|
|
50
|
+
* };
|
|
51
|
+
*
|
|
52
|
+
* type TRequiredB = WithRequiredProp<T, 'b'>; // { a: string; b: number; c?: boolean; }
|
|
53
|
+
*/
|
|
54
|
+
export type WithRequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
43
55
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledPrevButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
-
}, "style" | "children" | "
|
|
4
|
+
}, "style" | "children" | "disabled" | "size" | "className" | "tabIndex" | "color" | "action" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
|
|
5
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
6
|
}, {}, {}>;
|
|
7
7
|
export declare const StyledNextButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
8
8
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
9
|
-
}, "style" | "children" | "
|
|
9
|
+
}, "style" | "children" | "disabled" | "size" | "className" | "tabIndex" | "color" | "action" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
11
|
}, {}, {}>;
|
|
@@ -30,7 +30,7 @@ export declare const useDrilldown: (dataOptions: ChartDataOptions, drilldownOpti
|
|
|
30
30
|
outliersEnabled?: boolean | undefined;
|
|
31
31
|
} | {
|
|
32
32
|
category: (import("@sisense/sdk-data").Column | import("../../types").StyledColumn | undefined)[];
|
|
33
|
-
value: (import("@sisense/sdk-data").Column | import("
|
|
33
|
+
value: (import("@sisense/sdk-data").Column | import("@sisense/sdk-data").MeasureColumn | import("@sisense/sdk-data").CalculatedMeasureColumn | import("../../types").StyledMeasureColumn | import("../../types").StyledColumn)[];
|
|
34
34
|
outliers?: [import("@sisense/sdk-data").Column | import("../../types").StyledColumn] | undefined;
|
|
35
35
|
valueTitle: string;
|
|
36
36
|
};
|