@sisense/sdk-ui 1.12.0 → 1.14.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 +1 -1
- package/dist/ai/api/chat-rest-api.d.ts +10 -11
- package/dist/ai/api/hooks.d.ts +2 -2
- package/dist/ai/api/types.d.ts +2 -16
- package/dist/ai/buttons/scroll-to-bottom-button.d.ts +3 -0
- package/dist/ai/chat-config.d.ts +12 -3
- package/dist/ai/chat-home.d.ts +2 -1
- package/dist/ai/chatbot.d.ts +1 -1
- package/dist/ai/common/constants.d.ts +1 -0
- package/dist/ai/common/tooltip.d.ts +2 -2
- package/dist/ai/data-topics/data-topic-list.d.ts +0 -1
- package/dist/ai/get-nlg-query-result.d.ts +1 -1
- package/dist/ai/icons/scroll-to-bottom-icon.d.ts +1 -0
- package/dist/ai/scroll-to-bottom.d.ts +7 -0
- package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
- package/dist/ai/use-get-query-recommendations.d.ts +1 -1
- package/dist/ai.cjs +89 -80
- package/dist/ai.js +828 -933
- package/dist/api/rest-api.d.ts +7 -7
- package/dist/api/types/dashboard-dto.d.ts +2 -0
- package/dist/chart/helpers/use-synced-data.d.ts +1 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +4 -0
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +13 -1
- package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +2 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +2 -0
- package/dist/common/components/loading-overlay.d.ts +1 -0
- package/dist/common-filters/common-filters-connector.d.ts +9 -0
- package/dist/common-filters/selection-utils.d.ts +11 -0
- package/dist/common-filters/types.d.ts +18 -0
- package/dist/common-filters/use-common-filters.d.ts +13 -0
- package/dist/common-filters/utils.d.ts +9 -0
- package/dist/common-filters/widget-header-clear-selection-button.d.ts +3 -0
- package/dist/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/dashboard/dashboard.d.ts +1 -1
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/types.d.ts +5 -2
- package/dist/dashboard/utils.d.ts +0 -3
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +4772 -2
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-filters.d.ts +200 -37
- package/dist/dashboard-widget/types.d.ts +1 -0
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -12
- package/dist/dashboard-widget/utils.d.ts +3 -1
- package/dist/decorators/hook-decorators/with-tracking.d.ts +1 -2
- package/dist/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +31 -0
- package/dist/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +27 -0
- package/dist/filters/components/cascading-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +2 -2
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +7 -0
- package/dist/filters/components/custom-filter-tile.d.ts +46 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +8 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +9 -2
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -2
- package/dist/filters/components/filter-tile.d.ts +24 -1
- package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +4 -2
- package/dist/filters/components/filters-panel/filters-panel.d.ts +4 -2
- package/dist/filters/components/icons/background-filter-icon.d.ts +5 -0
- package/dist/filters/components/icons/index.d.ts +1 -0
- package/dist/filters/components/icons/lock-icon.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -1
- package/dist/filters/components/member-filter-tile/member-list.d.ts +1 -1
- package/dist/filters/hooks/use-synchronized-filter.d.ts +12 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/filters/utils.d.ts +7 -0
- package/dist/index.cjs +261 -167
- package/dist/index.d.ts +3 -2
- package/dist/index.js +23372 -18888
- package/dist/models/dashboard/dashboard-model.d.ts +12 -8
- package/dist/models/dashboard/get-dashboard-model.d.ts +2 -1
- package/dist/models/dashboard/translate-dashboard-utils.d.ts +3 -1
- package/dist/models/dashboard/types.d.ts +3 -0
- package/dist/models/widget/get-widget-model.d.ts +2 -1
- package/dist/models/widget/translate-widget.d.ts +5 -2
- package/dist/models/widget/types.d.ts +9 -0
- package/dist/models/widget/widget-model.d.ts +31 -1
- package/dist/pivot-table/formatters/utils.d.ts +1 -1
- package/dist/props.d.ts +12 -12
- package/dist/table/hooks/use-table-data.d.ts +1 -1
- package/dist/table/table-component.d.ts +4 -4
- package/dist/theme-provider/theme-provider.d.ts +2 -0
- package/dist/translation/resources/en.d.ts +5 -0
- package/dist/translation/resources/index.d.ts +10 -0
- package/dist/types.d.ts +204 -186
- package/dist/{useQuery-0UWck_2A.js → useQuery-Cxcx_l05.js} +13983 -13662
- package/dist/{useQuery-DVHD0kJ-.cjs → useQuery-_biaqvma.cjs} +119 -119
- package/dist/utils/color/color-interpolation.d.ts +1 -0
- package/package.json +10 -10
package/dist/api/rest-api.d.ts
CHANGED
|
@@ -12,31 +12,31 @@ type GetDashboardOptions = {
|
|
|
12
12
|
};
|
|
13
13
|
export declare class RestApi {
|
|
14
14
|
private httpClient;
|
|
15
|
-
constructor(httpClient: HttpClient);
|
|
15
|
+
constructor(httpClient: HttpClient | undefined);
|
|
16
16
|
/**
|
|
17
17
|
* Get all dashboards
|
|
18
18
|
*/
|
|
19
|
-
getDashboards: (options?: GetDashboardsOptions) => Promise<DashboardDto[]>;
|
|
19
|
+
getDashboards: (options?: GetDashboardsOptions) => Promise<DashboardDto[] | undefined>;
|
|
20
20
|
/**
|
|
21
21
|
* Get a specific dashboard
|
|
22
22
|
*/
|
|
23
|
-
getDashboard: (dashboardOid: string, options?: GetDashboardOptions) => Promise<DashboardDto>;
|
|
23
|
+
getDashboard: (dashboardOid: string, options?: GetDashboardOptions) => Promise<DashboardDto | undefined>;
|
|
24
24
|
/**
|
|
25
25
|
* Get all widgets of a specific dashboard
|
|
26
26
|
*/
|
|
27
|
-
getDashboardWidgets: (dashboardOid: string) => Promise<WidgetDto[]>;
|
|
27
|
+
getDashboardWidgets: (dashboardOid: string) => Promise<WidgetDto[] | undefined>;
|
|
28
28
|
/**
|
|
29
29
|
* Get a specific widget from a dashboard
|
|
30
30
|
*/
|
|
31
|
-
getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto>;
|
|
31
|
+
getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto | undefined>;
|
|
32
32
|
/**
|
|
33
33
|
* Get a GeoJSON data for all countries
|
|
34
34
|
*/
|
|
35
|
-
getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection>;
|
|
35
|
+
getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | undefined>;
|
|
36
36
|
/**
|
|
37
37
|
* Get a GeoJSON data for all USA states
|
|
38
38
|
*/
|
|
39
|
-
getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection>;
|
|
39
|
+
getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | undefined>;
|
|
40
40
|
}
|
|
41
41
|
export declare const useGetApi: () => RestApi;
|
|
42
42
|
export {};
|
|
@@ -21,12 +21,14 @@ export type FilterDto = {
|
|
|
21
21
|
jaql: FilterJaql & AnyObject;
|
|
22
22
|
instanceid?: string;
|
|
23
23
|
disabled?: boolean;
|
|
24
|
+
locked?: boolean;
|
|
24
25
|
};
|
|
25
26
|
export type CascadingFilterDto = {
|
|
26
27
|
isCascading: true;
|
|
27
28
|
levels: FilterJaql[];
|
|
28
29
|
instanceid?: string;
|
|
29
30
|
disabled?: boolean;
|
|
31
|
+
locked?: boolean;
|
|
30
32
|
};
|
|
31
33
|
export declare const isCascadingFilterDto: (filter: FilterDto | CascadingFilterDto) => filter is CascadingFilterDto;
|
|
32
34
|
export type DashboardDto = {
|
|
@@ -4,5 +4,5 @@ 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
|
-
export declare const useSyncedData: (dataSet: DataSet, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType, attributes: Attribute[], measures: Measure[], dataColumnNamesMapping: DataColumnNamesMapping, filters?: Filter[] | FilterRelations, highlights?: Filter[], refreshCounter?: number, setIsLoading?: Dispatch<SetStateAction<boolean>>) => Data
|
|
7
|
+
export declare const useSyncedData: (dataSet: DataSet, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType, attributes: Attribute[], measures: Measure[], dataColumnNamesMapping: DataColumnNamesMapping, filters?: Filter[] | FilterRelations, highlights?: Filter[], refreshCounter?: number, setIsLoading?: Dispatch<SetStateAction<boolean>>) => [Data, ChartDataOptionsInternal];
|
|
8
8
|
export {};
|
|
@@ -112,6 +112,7 @@ export type PlotOptions = {
|
|
|
112
112
|
sunburst?: ChartPlotOptions;
|
|
113
113
|
boxplot?: ChartPlotOptions;
|
|
114
114
|
scatter?: ChartPlotOptions;
|
|
115
|
+
arearange?: ChartPlotOptions;
|
|
115
116
|
};
|
|
116
117
|
/**
|
|
117
118
|
* Highcharts options internal
|
|
@@ -154,6 +155,9 @@ export type HighchartsOptionsInternal = {
|
|
|
154
155
|
plotOptions?: PlotOptions;
|
|
155
156
|
navigator?: Navigator | {
|
|
156
157
|
enabled: boolean;
|
|
158
|
+
series?: {
|
|
159
|
+
type: ChartType;
|
|
160
|
+
};
|
|
157
161
|
};
|
|
158
162
|
tooltip?: TooltipSettings;
|
|
159
163
|
boost?: {
|
|
@@ -29,6 +29,18 @@ export type LineSubtype = 'line/spline' | 'line/basic';
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
export type AreaSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100';
|
|
32
|
+
/**
|
|
33
|
+
* Property of {@link AreaRangeStyleOptions}
|
|
34
|
+
*
|
|
35
|
+
* Subtype of AreaRangeChart
|
|
36
|
+
*
|
|
37
|
+
* **Values**
|
|
38
|
+
*
|
|
39
|
+
* - `arearange/spline` - curved line from point to point.
|
|
40
|
+
* - `arearange/basic` - straight line from point to point.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export type AreaRangeSubtype = 'arearange/spline' | 'arearange/basic';
|
|
32
44
|
/**
|
|
33
45
|
* Property of {@link StackableSubtype}
|
|
34
46
|
*
|
|
@@ -92,7 +104,7 @@ export type SunburstSubtype = 'sunburst';
|
|
|
92
104
|
export type BoxplotSubtype = 'boxplot/full' | 'boxplot/hollow';
|
|
93
105
|
export type ScattermapSubtype = 'scattermap';
|
|
94
106
|
export type AreamapSubtype = 'areamap/world' | 'areamap/usa';
|
|
95
|
-
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype;
|
|
107
|
+
export type ChartSubtype = LineSubtype | AreaSubtype | StackableSubtype | PieSubtype | PolarSubtype | IndicatorSubtype | TreemapSubtype | SunburstSubtype | BoxplotSubtype | ScattermapSubtype | AreamapSubtype | AreaRangeSubtype;
|
|
96
108
|
export declare const chartSubtypeToDesignOptions: Readonly<Record<ChartSubtype, {
|
|
97
109
|
lineType?: LineType | undefined;
|
|
98
110
|
stackType?: StackType | undefined;
|
|
@@ -101,6 +101,7 @@ export type AxisPlotBand = {
|
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
|
|
104
|
+
export declare const getDefaultDateFormat: (granularity?: string) => "HH:mm:ss" | "yyyy" | "yyyy Q" | "MM/yyyy" | "ww yyyy" | "M/d/yy" | "HH" | "M/d/yy HH" | "HH:mm" | undefined;
|
|
104
105
|
export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
|
|
105
106
|
export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
106
107
|
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
@@ -6,6 +6,7 @@ import { CompleteThemeSettings } from '../../types';
|
|
|
6
6
|
*
|
|
7
7
|
* @param isVisible - visibility of the overlay.
|
|
8
8
|
* @returns Child component wrapped in dynamic overlay.
|
|
9
|
+
* @internal
|
|
9
10
|
*/
|
|
10
11
|
export declare const LoadingOverlay: ({ isVisible, themeSettings, children, }: {
|
|
11
12
|
isVisible: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Filter } from '@sisense/sdk-data';
|
|
2
|
+
import { ChartDataOptions, ChartWidgetProps, PivotTableDataOptions, RenderToolbarHandler } from '../index.js';
|
|
3
|
+
import { CommonFiltersOptions } from './types.js';
|
|
4
|
+
import { WidgetTypeInternal } from '../models/widget/types';
|
|
5
|
+
type CommonFiltersToWidgetConnectProps = Pick<ChartWidgetProps, 'filters' | 'highlights' | 'onDataPointClick' | 'onDataPointsSelected'> & {
|
|
6
|
+
renderToolbar: RenderToolbarHandler;
|
|
7
|
+
};
|
|
8
|
+
export declare function prepareCommonFiltersToWidgetConnectProps(filters: Filter[], setFilters: (filters: Filter[]) => void, widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, options: CommonFiltersOptions): CommonFiltersToWidgetConnectProps;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Attribute, Filter } from '@sisense/sdk-data';
|
|
2
|
+
import { AreamapDataPoint, ChartDataOptions, DataPoint, PivotTableDataOptions, ScatterDataPoint, ScattermapDataPoint } from '../index.js';
|
|
3
|
+
import { WidgetTypeInternal } from '../models/widget/types.js';
|
|
4
|
+
type WidgetSelection = {
|
|
5
|
+
attribute: Attribute;
|
|
6
|
+
values: (string | number)[];
|
|
7
|
+
};
|
|
8
|
+
export declare function getWidgetSelections(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, points: Array<DataPoint | ScatterDataPoint | ScattermapDataPoint | AreamapDataPoint>, nativeEvent: MouseEvent | PointerEvent): WidgetSelection[];
|
|
9
|
+
export declare function getSelectableWidgetAttributes(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions): Attribute[];
|
|
10
|
+
export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], filters: Filter[]): Filter[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DeepRequired } from 'ts-essentials';
|
|
2
|
+
/** @internal */
|
|
3
|
+
export declare enum CommonFiltersApplyMode {
|
|
4
|
+
HIGHLIGHT = "highlight",
|
|
5
|
+
FILTER = "filter"
|
|
6
|
+
}
|
|
7
|
+
/** @internal */
|
|
8
|
+
export type CommonFiltersOptions = {
|
|
9
|
+
applyMode?: `${CommonFiltersApplyMode}`;
|
|
10
|
+
shouldAffectFilters?: boolean;
|
|
11
|
+
ignoreFilters?: {
|
|
12
|
+
all?: boolean;
|
|
13
|
+
ids?: string[];
|
|
14
|
+
};
|
|
15
|
+
forceApplyBackgroundFilters?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type CompleteCommonFiltersOptions = DeepRequired<CommonFiltersOptions>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Filter } from '@sisense/sdk-data';
|
|
3
|
+
import { WidgetModel } from '../index.js';
|
|
4
|
+
import { CommonFiltersOptions } from './types.js';
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const useCommonFilters: ({ initialFilters, }?: {
|
|
7
|
+
initialFilters?: Filter[] | undefined;
|
|
8
|
+
}) => {
|
|
9
|
+
filters: Filter[];
|
|
10
|
+
setFilters: import("react").Dispatch<import("react").SetStateAction<Filter[]>>;
|
|
11
|
+
addFilter: (newFilter: Filter) => void;
|
|
12
|
+
connectToWidgetModel: (widget: WidgetModel, options?: CommonFiltersOptions) => WidgetModel;
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Filter, Attribute } from '@sisense/sdk-data';
|
|
2
|
+
import { CommonFiltersOptions } from './types.js';
|
|
3
|
+
export declare function getAllowedFilters(filters: Filter[], ignoreFiltersOptions?: CommonFiltersOptions['ignoreFilters']): Filter[];
|
|
4
|
+
export declare function isSameAttribute(attributeA: Attribute, attributeB: Attribute): boolean;
|
|
5
|
+
export declare function getFilterByAttribute(filters: Filter[], attribute: Attribute): Filter | undefined;
|
|
6
|
+
export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
|
|
7
|
+
export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
|
|
8
|
+
export declare function isIncludeAllFilter(filter: Filter): boolean;
|
|
9
|
+
export declare function clearCommonFilter(filter: Filter): Filter;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardLayoutProps } from '../../dashboard/types';
|
|
2
|
-
export declare const DashboardContainer: ({ title, layout, widgets, filters, onFiltersChange, }: DashboardLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DashboardContainer: ({ title, layout, widgets, filters, onFiltersChange, defaultDataSource, }: DashboardLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,4 +5,4 @@ import { DashboardProps } from '../dashboard/types';
|
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare const Dashboard: ({ title, layout, widgets, filters }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Dashboard: ({ title, layout, widgets, filters, defaultDataSource, widgetFilterOptions, }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Layout, WidgetModel } from '../models';
|
|
2
|
-
import { Filter } from '@sisense/sdk-data';
|
|
1
|
+
import { Layout, WidgetFilterOptions, WidgetModel } from '../models';
|
|
2
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
3
3
|
/**
|
|
4
4
|
* Props for the DashboardById component
|
|
5
5
|
*
|
|
@@ -19,6 +19,7 @@ export interface DashboardLayoutProps {
|
|
|
19
19
|
widgets: WidgetModel[];
|
|
20
20
|
filters: Filter[];
|
|
21
21
|
onFiltersChange: (filters: Filter[]) => void;
|
|
22
|
+
defaultDataSource?: DataSource;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Props for the Dashboard component
|
|
@@ -30,6 +31,8 @@ export interface DashboardProps {
|
|
|
30
31
|
layout: Layout;
|
|
31
32
|
widgets: WidgetModel[];
|
|
32
33
|
filters: Filter[];
|
|
34
|
+
defaultDataSource?: DataSource;
|
|
35
|
+
widgetFilterOptions?: WidgetFilterOptions;
|
|
33
36
|
}
|
|
34
37
|
/**
|
|
35
38
|
* Props for the Dashboard Header component
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import { Filter } from '@sisense/sdk-data';
|
|
2
|
-
import { WidgetModel } from '../models';
|
|
3
1
|
export declare function isSupportedWidgetTypeByDashboard(widgetType: string): boolean;
|
|
4
|
-
export declare function addFiltersToWidget(widget: WidgetModel, filters: Filter[]): WidgetModel;
|
|
5
2
|
export declare const getDividerStyle: (color: string, width: number) => string;
|