@sisense/sdk-ui 1.12.0 → 1.13.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-rest-api.d.ts +3 -4
- 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 +8 -0
- 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/icons/scroll-to-bottom-icon.d.ts +1 -0
- package/dist/ai/scroll-to-bottom.d.ts +7 -0
- package/dist/ai.cjs +87 -70
- package/dist/ai.js +833 -917
- 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/tooltip-utils.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 +14 -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/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/utils.d.ts +3 -1
- package/dist/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +25 -0
- package/dist/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +21 -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 +6 -0
- package/dist/filters/components/custom-filter-tile.d.ts +43 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +6 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +8 -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 +21 -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/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 +213 -167
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23056 -18772
- 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/query/query-result-date-formatting.d.ts +1 -0
- package/dist/translation/resources/en.d.ts +4 -0
- package/dist/translation/resources/index.d.ts +8 -0
- package/dist/types.d.ts +9 -3
- package/dist/useQuery-C8plkncQ.cjs +603 -0
- package/dist/{useQuery-0UWck_2A.js → useQuery-D5W0RM1R.js} +20786 -20529
- package/package.json +10 -10
- package/dist/useQuery-DVHD0kJ-.cjs +0 -603
|
@@ -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;
|
|
@@ -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,14 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export declare enum CommonFiltersApplyMode {
|
|
3
|
+
HIGHLIGHT = "highlight",
|
|
4
|
+
FILTER = "filter"
|
|
5
|
+
}
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type CommonFiltersOptions = {
|
|
8
|
+
applyMode?: `${CommonFiltersApplyMode}`;
|
|
9
|
+
shouldAffectFilters?: boolean;
|
|
10
|
+
ignoreFilters?: {
|
|
11
|
+
all?: boolean;
|
|
12
|
+
ids?: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -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({ attribute, guid }: 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;
|