@sisense/sdk-ui 1.33.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +9 -9
- package/dist/ai.js +566 -578
- package/dist/analytics-composer.cjs +120 -119
- package/dist/analytics-composer.js +3235 -2506
- package/dist/{derive-chart-family-nTKwlMms.js → derive-chart-family-BLaI9-3r.js} +27266 -27205
- package/dist/derive-chart-family-CxqjTyNt.cjs +758 -0
- package/dist/dimensions-C-VKss5V.cjs +1 -0
- package/dist/dimensions-Cfq9FexH.js +200 -0
- package/dist/index.cjs +31 -18
- package/dist/index.js +6117 -6185
- package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +13 -6
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
- package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +17 -7
- package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +4 -6
- package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +0 -20
- package/dist/packages/sdk-ui/src/ai/index.d.ts +6 -4
- package/dist/packages/sdk-ui/src/ai/use-final-nlq-response.d.ts +20 -0
- package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +0 -12
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +1 -4
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +1 -4
- package/dist/packages/sdk-ui/src/analytics-composer/{common → code}/stringify-props.d.ts +10 -2
- package/dist/packages/sdk-ui/src/analytics-composer/common/custom-superjson.d.ts +16 -0
- package/dist/packages/sdk-ui/src/analytics-composer/dashboard/dashboard-composer.d.ts +8 -0
- package/dist/packages/sdk-ui/src/analytics-composer/dashboard/stringify-widgets.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/dashboard/to-dashboard-code.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/query/query-translator.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/query/simplify-metadata-item.d.ts +9 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +95 -5
- package/dist/packages/sdk-ui/src/analytics-composer/widget/chart-options/get-widget-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -1
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +3 -0
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -55
- package/dist/packages/sdk-ui/src/area-range-chart.d.ts +0 -1
- package/dist/packages/sdk-ui/src/chart-data/table-data.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/{utils/get-hook-state-result.d.ts → hooks/use-get-hook-state-result.d.ts} +3 -2
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +0 -12
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +9 -3
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -4
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +8 -1
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +6 -1
- package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +5 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +36 -6
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +5 -4
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +3 -3
- package/dist/packages/sdk-ui/src/index-typedoc.d.ts +4 -1
- package/dist/packages/sdk-ui/src/index.d.ts +4 -3
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +0 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +15 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +0 -1
- package/dist/packages/sdk-ui/src/models/widget/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +2 -12
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -125
- package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +4 -9
- package/dist/packages/sdk-ui/src/props.d.ts +27 -45
- package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/query-execution/types.d.ts +2 -4
- package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +2 -4
- package/dist/packages/sdk-ui/src/theme-provider/custom-theme-provider.d.ts +5 -8
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +5 -1
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +10 -2
- package/dist/packages/sdk-ui/src/types.d.ts +60 -40
- package/dist/packages/sdk-ui/src/utils/{utility-types.d.ts → utility-types/basic-utility-types.d.ts} +0 -34
- package/dist/packages/sdk-ui/src/utils/utility-types/distributive-omit.d.ts +24 -0
- package/dist/packages/sdk-ui/src/utils/utility-types/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/utils/utility-types/rest-api-hook-state.d.ts +35 -0
- package/dist/packages/sdk-ui/src/utils/utility-types/soft-union.d.ts +35 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-drilldown-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +23 -16
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +5 -0
- package/dist/packages/sdk-ui/src/widgets/widget.d.ts +0 -1
- package/dist/{use-common-filters-BNKt9a0z.cjs → use-common-filters-BGGGgJJ5.cjs} +48 -48
- package/dist/{use-common-filters--WPkVexd.js → use-common-filters-Cmyb86sc.js} +5339 -5351
- package/dist/widget-composer-BJURHrVD.cjs +428 -0
- package/dist/widget-composer-C4rwNt4P.js +959 -0
- package/package.json +14 -10
- package/dist/derive-chart-family-B4sA-ao-.cjs +0 -758
- package/dist/packages/sdk-ui/src/ai/common/beta-label.d.ts +0 -1
- package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-props.d.ts +0 -8
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +0 -7
- package/dist/packages/sdk-ui/src/utils/check-and-notify-about-deprecated-prop.d.ts +0 -1
- package/dist/packages/sdk-ui/src/widget-by-id/dashboard-widget.d.ts +0 -27
- package/dist/widget-composer-CobNNZ1e.js +0 -742
- package/dist/widget-composer-DPqi_qzU.cjs +0 -316
- /package/dist/packages/sdk-ui/src/analytics-composer/{widget → code}/stringify-filters.d.ts +0 -0
|
@@ -5,7 +5,7 @@ import { PivotClient } from '@sisense/sdk-pivot-client';
|
|
|
5
5
|
import { TrackingEventDetails } from '@sisense/sdk-tracking';
|
|
6
6
|
import { DateConfig } from '../query/date-formats';
|
|
7
7
|
import { AppSettings } from './settings/settings';
|
|
8
|
-
import {
|
|
8
|
+
import { TranslationConfig, LoadingIndicatorConfig } from '../types';
|
|
9
9
|
import { SisenseContextProviderProps } from '../props';
|
|
10
10
|
/**
|
|
11
11
|
* Application configuration
|
|
@@ -16,61 +16,9 @@ export type AppConfig = {
|
|
|
16
16
|
*/
|
|
17
17
|
locale?: Locale;
|
|
18
18
|
/**
|
|
19
|
-
* Translation
|
|
20
|
-
*
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
translationConfig?: {
|
|
24
|
-
/**
|
|
25
|
-
* Language code to be used for translations.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
language?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Additional translation resources to be loaded.
|
|
32
|
-
*
|
|
33
|
-
* You can find the list of available translation keys in the translation folder of every package.
|
|
34
|
-
*
|
|
35
|
-
* Translation keys that are not provided will default to the English translation.
|
|
36
|
-
* If translation is provided for a package other than sdk-ui, please specify the namespace property.
|
|
37
|
-
*
|
|
38
|
-
* Important: Do not translate parts in {{}} - these are placeholders for dynamic values and will be matched using provided variable names.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```typescript
|
|
42
|
-
* customTranslations: [
|
|
43
|
-
* {
|
|
44
|
-
* language: 'fr',
|
|
45
|
-
* resources: {
|
|
46
|
-
* errors: {
|
|
47
|
-
* invalidFilterType: 'Type de filtre invalide',
|
|
48
|
-
* },
|
|
49
|
-
* },
|
|
50
|
-
* },
|
|
51
|
-
* {
|
|
52
|
-
* language: 'es',
|
|
53
|
-
* namespace: 'sdkData'
|
|
54
|
-
* resources: {
|
|
55
|
-
* errors: {
|
|
56
|
-
* measure: {
|
|
57
|
-
* unsupportedType: 'Tipo de medida no compatible',
|
|
58
|
-
* },
|
|
59
|
-
* },
|
|
60
|
-
* },
|
|
61
|
-
* },
|
|
62
|
-
* ]
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
customTranslations?: CustomTranslationObject[];
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Language code to be used for translations
|
|
69
|
-
*
|
|
70
|
-
* @internal
|
|
71
|
-
* @deprecated Use `translationConfig.language` instead
|
|
19
|
+
* Translation Configuration
|
|
72
20
|
*/
|
|
73
|
-
|
|
21
|
+
translationConfig?: TranslationConfig;
|
|
74
22
|
/**
|
|
75
23
|
* Date Configurations
|
|
76
24
|
*/
|
|
@@ -62,6 +62,5 @@ import { AreaRangeChartProps } from './props';
|
|
|
62
62
|
* @param props - Area Range chart properties
|
|
63
63
|
* @returns Area Range Chart component
|
|
64
64
|
* @group Charts
|
|
65
|
-
* @beta
|
|
66
65
|
*/
|
|
67
66
|
export declare const AreaRangeChart: import("react").FunctionComponent<AreaRangeChartProps>;
|
|
@@ -2,5 +2,15 @@ import { Column as DataTableColumn, DataTable } from '../chart-data-processor/ta
|
|
|
2
2
|
import { StyledColumn, StyledMeasureColumn, TableDataOptionsInternal } from '../chart-data-options/types';
|
|
3
3
|
export declare const unifySortToDirection: ({ column, sortType, }: StyledColumn | StyledMeasureColumn) => number;
|
|
4
4
|
export declare const syncDataTableWithDataOptionsSort: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
|
|
5
|
+
/**
|
|
6
|
+
* Updates the sort type of a styled column for table
|
|
7
|
+
* This is needed because sorting for Table is done at the JAQL level (backend)
|
|
8
|
+
* while sorting for other charts is done on the client side in CSDK. I am working on a fix for this
|
|
9
|
+
*
|
|
10
|
+
* @param styledColumn - The styled column to update
|
|
11
|
+
* @returns The updated styled column
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const updateStyledColumnSortForTable: (styledColumn: StyledColumn | StyledMeasureColumn) => StyledColumn | StyledMeasureColumn;
|
|
5
15
|
export declare const updateInnerDataOptionsSort: (dataOptions: TableDataOptionsInternal, sortColumn: DataTableColumn) => TableDataOptionsInternal;
|
|
6
16
|
export declare const tableData: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AnyArray, RestApiHookState } from '../../../../../../utils/utility-types';
|
|
2
|
-
import { HookExecutionStatus, WithLoadMore } from '../../types';
|
|
3
|
-
export declare function
|
|
2
|
+
import { HookExecutionStatus, WithLoadMore } from '../../types.js';
|
|
3
|
+
export declare function useGetHookStateResult<DataKey extends string, SuccessDataType extends AnyArray>(options: {
|
|
4
4
|
status: HookExecutionStatus;
|
|
5
5
|
dataKey: DataKey;
|
|
6
6
|
data: SuccessDataType;
|
|
7
7
|
loadMore: () => void;
|
|
8
|
+
isDataReset: boolean;
|
|
8
9
|
error?: Error;
|
|
9
10
|
}): WithLoadMore<RestApiHookState<DataKey, SuccessDataType>>;
|
|
@@ -2,6 +2,7 @@ import type { DeepRequired } from 'ts-essentials';
|
|
|
2
2
|
import { AnyObject } from '../../utils/utility-types';
|
|
3
3
|
/**
|
|
4
4
|
* Merges the provided configuration with the default configuration.
|
|
5
|
+
*
|
|
5
6
|
* @param config - The configuration to merge with the default configuration.
|
|
6
7
|
* @param defaults - The default configuration.
|
|
7
8
|
* @returns The merged configuration.
|
|
@@ -71,18 +71,6 @@ export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[
|
|
|
71
71
|
* @returns A new dashboard instance with the specified filter replaced.
|
|
72
72
|
*/
|
|
73
73
|
export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace: Filter, newFilter: Filter) => DashboardProps;
|
|
74
|
-
/**
|
|
75
|
-
* Creates a new dashboard instance with a specific filter modified.
|
|
76
|
-
* Alias for `replaceFilter`.
|
|
77
|
-
*
|
|
78
|
-
* @deprecated Use {@link replaceFilter} instead
|
|
79
|
-
*
|
|
80
|
-
* @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
|
|
81
|
-
* @param filterToModify - The existing filter to be modified.
|
|
82
|
-
* @param newFilter - The new filter to replace the existing one.
|
|
83
|
-
* @returns A new dashboard instance with the specified filter modified.
|
|
84
|
-
*/
|
|
85
|
-
export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: Filter, newFilter: Filter) => DashboardProps;
|
|
86
74
|
/**
|
|
87
75
|
* Creates a new dashboard instance with a specific filter removed.
|
|
88
76
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DashboardById } from './dashboard-by-id';
|
|
2
2
|
export { Dashboard } from './dashboard';
|
|
3
|
-
export { useComposedDashboard, type ComposableDashboardProps, type UseComposedDashboardOptions, } from './use-composed-dashboard';
|
|
3
|
+
export { useComposedDashboard, useComposedDashboardInternal, type ComposableDashboardProps, type UseComposedDashboardOptions, } from './use-composed-dashboard';
|
|
4
4
|
export { useDashboardTheme, type DashboardThemeParams } from './use-dashboard-theme';
|
|
5
5
|
export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, DashboardByIdConfig, DashboardFiltersPanelConfig, } from './types';
|
|
@@ -100,8 +100,7 @@ export interface DashboardByIdConfig extends DashboardConfig {
|
|
|
100
100
|
*
|
|
101
101
|
* Limitations:
|
|
102
102
|
* - WAT authentication does not support persistence.
|
|
103
|
-
* -
|
|
104
|
-
* @alpha
|
|
103
|
+
* - Currently only changes to dashboard filters are persisted.
|
|
105
104
|
*/
|
|
106
105
|
persist?: boolean;
|
|
107
106
|
}
|
|
@@ -119,6 +118,12 @@ export interface DashboardLayoutOptions {
|
|
|
119
118
|
* Props for the Dashboard component
|
|
120
119
|
*/
|
|
121
120
|
export interface DashboardProps {
|
|
121
|
+
/**
|
|
122
|
+
* Optional identifer of the dashboard
|
|
123
|
+
*
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
id?: string;
|
|
122
127
|
/** The title of the dashboard */
|
|
123
128
|
title?: string;
|
|
124
129
|
/**
|
|
@@ -139,8 +144,9 @@ export interface DashboardProps {
|
|
|
139
144
|
widgetsOptions?: WidgetsOptions;
|
|
140
145
|
/**
|
|
141
146
|
* The Tabber widgets configurations as a single dashboard config
|
|
147
|
+
*
|
|
142
148
|
* @internal
|
|
143
|
-
|
|
149
|
+
*/
|
|
144
150
|
tabbersOptions?: TabbersOptions;
|
|
145
151
|
/** The style options for the dashboard */
|
|
146
152
|
styleOptions?: DashboardStyleOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DashboardProps } from './types.js';
|
|
2
2
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
3
|
import { WidgetsPanelLayout } from '../models';
|
|
4
4
|
export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | 'tabbersOptions'>;
|
|
@@ -18,18 +18,15 @@ export declare function useComposedDashboardInternal<D extends ComposableDashboa
|
|
|
18
18
|
dashboard: D;
|
|
19
19
|
setFilters: (filters: Filter[] | FilterRelations) => void;
|
|
20
20
|
setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
|
|
21
|
-
layoutOptions: DashboardLayoutOptions;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
24
23
|
* React hook that takes in separate dashboard elements and
|
|
25
24
|
* composes them into a coordinated dashboard with change detection, cross filtering, and drill down.
|
|
26
25
|
*
|
|
27
26
|
* @group Dashboards
|
|
28
|
-
* @alpha
|
|
29
27
|
*/
|
|
30
28
|
export declare const useComposedDashboard: <D extends DashboardProps | ComposableDashboardProps>(args_0: D, args_1?: UseComposedDashboardOptions | undefined) => {
|
|
31
29
|
dashboard: D;
|
|
32
30
|
setFilters: (filters: Filter[] | FilterRelations) => void;
|
|
33
31
|
setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
|
|
34
|
-
layoutOptions: DashboardLayoutOptions;
|
|
35
32
|
};
|
package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts
CHANGED
|
@@ -3,7 +3,14 @@ import { AttributiveElement } from '../dimensions-browser/types.js';
|
|
|
3
3
|
type AddFilterDataBrowserProps = {
|
|
4
4
|
dataSources: DataSource[];
|
|
5
5
|
initialDataSource: DataSource;
|
|
6
|
+
/**
|
|
7
|
+
* Optional. If provided, the user will not be able to see these attributes in the data browser.
|
|
8
|
+
*/
|
|
9
|
+
disabledAttributes?: AttributiveElement[];
|
|
6
10
|
onAttributeClick: (attribute: AttributiveElement) => void;
|
|
7
11
|
};
|
|
8
|
-
|
|
12
|
+
/**
|
|
13
|
+
* A component that allows users to select a data source and an attribute to create a filter.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AddFilterDataBrowser: ({ initialDataSource, dataSources, disabledAttributes, onAttributeClick, }: AddFilterDataBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
16
|
export {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
|
+
import { AttributiveElement } from '../dimensions-browser/types';
|
|
2
3
|
type AddFilterPopoverProps = {
|
|
3
4
|
anchorEl: HTMLElement;
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
onClose?: () => void;
|
|
6
7
|
dataSources: DataSource[];
|
|
7
8
|
initialDataSource: DataSource;
|
|
9
|
+
/**
|
|
10
|
+
* Optional. If provided, these attributes in the data browser will be disabled and can't be selected for filter creation.
|
|
11
|
+
*/
|
|
12
|
+
disabledAttributes?: AttributiveElement[];
|
|
8
13
|
onFilterCreated: (filter: Filter) => void;
|
|
9
14
|
};
|
|
10
15
|
/**
|
|
11
16
|
* A popover with "data browser" that allows users to select a data source and an attribute to create a filter.
|
|
12
17
|
*/
|
|
13
|
-
export declare const AddFilterPopover: ({ anchorEl, isOpen, onClose, dataSources, initialDataSource, onFilterCreated, }: AddFilterPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const AddFilterPopover: ({ anchorEl, isOpen, onClose, dataSources, initialDataSource, onFilterCreated, disabledAttributes, }: AddFilterPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
19
|
export {};
|
|
@@ -29,6 +29,14 @@ export type DimensionsBrowserProps = {
|
|
|
29
29
|
* If `true`, a loading spinner will be displayed.
|
|
30
30
|
*/
|
|
31
31
|
isLoading?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Config for attributes disabling.
|
|
34
|
+
* If provided, the specified attributes will be disabled and a tooltip will be shown on hover.
|
|
35
|
+
*/
|
|
36
|
+
disabledAttributesConfig?: {
|
|
37
|
+
disabledAttributes: AttributiveElement[];
|
|
38
|
+
getTooltip: (attribute: AttributiveElement) => string;
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
/**
|
|
34
42
|
* Attribute-like element.
|
package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export interface CascadingFilterTileProps {
|
|
|
21
21
|
onChange: (filter: Filter) => void;
|
|
22
22
|
/** Filter delete callback */
|
|
23
23
|
onDelete?: () => void;
|
|
24
|
+
/** Filter edit callback */
|
|
25
|
+
onEdit?: (levelIndex: number) => void;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* UI component representing group of cascading (dependent) filters.
|
|
@@ -16,6 +16,8 @@ export type CascadingLevelFilterTileProps = {
|
|
|
16
16
|
parentFilters: Filter[];
|
|
17
17
|
/** Callback to handle filter change */
|
|
18
18
|
onChange: (filter: Filter | null) => void;
|
|
19
|
+
/** Filter edit callback */
|
|
20
|
+
onEdit?: () => void;
|
|
19
21
|
/** Whether the filter is the last in the list */
|
|
20
22
|
isLast?: boolean;
|
|
21
23
|
};
|
|
@@ -24,4 +26,4 @@ export type CascadingLevelFilterTileProps = {
|
|
|
24
26
|
*
|
|
25
27
|
* @internal
|
|
26
28
|
*/
|
|
27
|
-
export declare const CascadingLevelFilterTile: ({ filter, dataSource, parentFilters, onChange, isLast, }: CascadingLevelFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const CascadingLevelFilterTile: ({ filter, dataSource, parentFilters, onChange, isLast, onEdit, }: CascadingLevelFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,5 +23,9 @@ export declare const DATE_OPS_MAP: {
|
|
|
23
23
|
readonly next: "dateFilter.next";
|
|
24
24
|
};
|
|
25
25
|
export declare const DATE_LEVELS_MAP: {
|
|
26
|
-
readonly
|
|
26
|
+
readonly Days: "dateFilter.days";
|
|
27
|
+
readonly Weeks: "dateFilter.weeks";
|
|
28
|
+
readonly Months: "dateFilter.months";
|
|
29
|
+
readonly Quarters: "dateFilter.quarters";
|
|
30
|
+
readonly Years: "dateFilter.years";
|
|
27
31
|
};
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DataSource } from '@sisense/sdk-data';
|
|
2
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
3
3
|
type FilterEditorContextValue = {
|
|
4
4
|
defaultDataSource: DataSource | null;
|
|
5
|
+
parentFilters: Filter[];
|
|
6
|
+
membersOnlyMode: boolean;
|
|
5
7
|
};
|
|
6
8
|
/** @internal */
|
|
7
9
|
export declare const useFilterEditorContext: () => FilterEditorContextValue;
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { FilterEditorConfig } from './types';
|
|
|
4
4
|
type FilterEditorPopoverPosition = Pick<PopoverAnchorPosition, 'anchorEl'>;
|
|
5
5
|
type FilterEditorPopoverProps = {
|
|
6
6
|
filter?: Filter | null;
|
|
7
|
+
parentFilters?: Filter[];
|
|
7
8
|
position?: FilterEditorPopoverPosition;
|
|
8
9
|
onChange?: (filter: Filter) => void;
|
|
9
10
|
onClose?: () => void;
|
|
@@ -12,5 +13,5 @@ type FilterEditorPopoverProps = {
|
|
|
12
13
|
config?: FilterEditorConfig;
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export declare const FilterEditorPopover: ({ filter, position, onChange, onClose, defaultDataSource, config, }: FilterEditorPopoverProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare const FilterEditorPopover: ({ filter, parentFilters, position, onChange, onClose, defaultDataSource, config, }: FilterEditorPopoverProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
17
|
export {};
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { DataSource, Filter } from '@sisense/sdk-data';
|
|
|
2
2
|
import { FilterEditorConfig } from './types';
|
|
3
3
|
type FilterEditorProps = {
|
|
4
4
|
filter: Filter;
|
|
5
|
+
parentFilters?: Filter[];
|
|
5
6
|
onChange?: (filter: Filter | null) => void;
|
|
6
7
|
/** Default data source used for filter attribute */
|
|
7
8
|
defaultDataSource?: DataSource;
|
|
8
9
|
config?: FilterEditorConfig;
|
|
9
10
|
};
|
|
10
11
|
/** @internal */
|
|
11
|
-
export declare const FilterEditor: ({ filter, config, onChange, defaultDataSource, }: FilterEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const FilterEditor: ({ filter, parentFilters, config, onChange, defaultDataSource, }: FilterEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Attribute, DataSource } from '@sisense/sdk-data';
|
|
1
|
+
import { Attribute, DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { HookEnableParam } from '../../../../common/hooks/types';
|
|
3
3
|
interface UseGetAttributeStatsParams extends HookEnableParam {
|
|
4
4
|
attribute: Attribute;
|
|
5
|
+
filters?: Filter[];
|
|
5
6
|
/** Default data source to use if attribute does not have one */
|
|
6
7
|
defaultDataSource?: DataSource;
|
|
7
8
|
}
|
|
@@ -1,8 +1,38 @@
|
|
|
1
|
-
export declare const dateLevelGranularities: {
|
|
2
|
-
value:
|
|
1
|
+
export declare const dateLevelGranularities: ({
|
|
2
|
+
value: "Years";
|
|
3
3
|
displayValue: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
value: string;
|
|
4
|
+
} | {
|
|
5
|
+
value: "Quarters";
|
|
7
6
|
displayValue: string;
|
|
8
|
-
}
|
|
7
|
+
} | {
|
|
8
|
+
value: "Months";
|
|
9
|
+
displayValue: string;
|
|
10
|
+
} | {
|
|
11
|
+
value: "Weeks";
|
|
12
|
+
displayValue: string;
|
|
13
|
+
} | {
|
|
14
|
+
value: "Days";
|
|
15
|
+
displayValue: string;
|
|
16
|
+
})[];
|
|
17
|
+
export declare const granularities: ({
|
|
18
|
+
value: "Years";
|
|
19
|
+
displayValue: string;
|
|
20
|
+
} | {
|
|
21
|
+
value: "Quarters";
|
|
22
|
+
displayValue: string;
|
|
23
|
+
} | {
|
|
24
|
+
value: "Months";
|
|
25
|
+
displayValue: string;
|
|
26
|
+
} | {
|
|
27
|
+
value: "Weeks";
|
|
28
|
+
displayValue: string;
|
|
29
|
+
} | {
|
|
30
|
+
value: "Days";
|
|
31
|
+
displayValue: string;
|
|
32
|
+
} | {
|
|
33
|
+
value: "AggHours";
|
|
34
|
+
displayValue: string;
|
|
35
|
+
} | {
|
|
36
|
+
value: "AggMinutesRoundTo15";
|
|
37
|
+
displayValue: string;
|
|
38
|
+
})[];
|
|
@@ -4,7 +4,7 @@ import { DataSource, Filter } from '@sisense/sdk-data';
|
|
|
4
4
|
* Props of the {@link FilterTile} component
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface FilterTileProps {
|
|
8
8
|
/** Filter to display */
|
|
9
9
|
filter: Filter;
|
|
10
10
|
/** Callback to handle filter change */
|
|
@@ -12,15 +12,16 @@ export type FilterTileProps = {
|
|
|
12
12
|
/** Filter delete callback */
|
|
13
13
|
onDelete?: () => void;
|
|
14
14
|
/** Filter edit callback */
|
|
15
|
-
onEdit?: (
|
|
15
|
+
onEdit?: (
|
|
16
|
+
/** Index of the filter level that triggers the onEdit action (in the case of a CascadingFilter) */
|
|
17
|
+
levelIndex?: number) => void;
|
|
16
18
|
/** Default data source used for filter tiles */
|
|
17
19
|
defaultDataSource?: DataSource;
|
|
18
|
-
}
|
|
20
|
+
}
|
|
19
21
|
/**
|
|
20
22
|
* Facade component that renders a filter tile based on filter type
|
|
21
23
|
*
|
|
22
24
|
* @group Filter Tiles
|
|
23
25
|
* @shortDescription Facade component rendering a filter tile based on filter type
|
|
24
|
-
* @beta
|
|
25
26
|
*/
|
|
26
27
|
export declare const FilterTile: React.FC<FilterTileProps>;
|
|
@@ -8,7 +8,7 @@ type UseExistingFilterEditingParams = {
|
|
|
8
8
|
};
|
|
9
9
|
type UseExistingFilterEditingReturn = {
|
|
10
10
|
ExistingFilterEditor: () => JSX.Element | null;
|
|
11
|
-
startEditingFilter: (anchorEl: HTMLElement, filter: Filter) => void;
|
|
11
|
+
startEditingFilter: (anchorEl: HTMLElement, filter: Filter, levelIndex?: number) => void;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Hook that keeps editing process of existing filters.
|
package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
3
3
|
import { UseNewFilterCreationConfig } from '../types';
|
|
4
|
+
import { AttributiveElement } from '../../../../data-browser/dimensions-browser/types';
|
|
4
5
|
type UseNewFilterCreationParams = {
|
|
5
6
|
defaultDataSource?: DataSource;
|
|
6
7
|
dataSources: DataSource[];
|
|
7
8
|
onFilterCreated: (filter: Filter) => void;
|
|
8
9
|
config?: UseNewFilterCreationConfig;
|
|
10
|
+
disabledAttributes?: AttributiveElement[];
|
|
9
11
|
};
|
|
10
12
|
type UseNewFilterCreationReturn = {
|
|
11
13
|
NewFilterCreator: () => JSX.Element | null;
|
|
@@ -15,5 +17,5 @@ type UseNewFilterCreationReturn = {
|
|
|
15
17
|
* Hook that keeps new filter creation process.
|
|
16
18
|
* Returns a function to start creation a new filter and a component that renders the filter creation popovers.
|
|
17
19
|
*/
|
|
18
|
-
export declare const useNewFilterCreation: ({ dataSources, onFilterCreated, defaultDataSource, config, }: UseNewFilterCreationParams) => UseNewFilterCreationReturn;
|
|
20
|
+
export declare const useNewFilterCreation: ({ dataSources, onFilterCreated, defaultDataSource, config, disabledAttributes, }: UseNewFilterCreationParams) => UseNewFilterCreationReturn;
|
|
19
21
|
export {};
|
|
@@ -27,7 +27,7 @@ export interface GetFilterMembersSuccess {
|
|
|
27
27
|
* Function to load more data rows
|
|
28
28
|
*
|
|
29
29
|
* @internal
|
|
30
|
-
|
|
30
|
+
*/
|
|
31
31
|
loadMore: (count: number) => void;
|
|
32
32
|
/** Whether the data fetching has failed */
|
|
33
33
|
isError: false;
|
|
@@ -55,7 +55,7 @@ export interface GetFilterMembersError {
|
|
|
55
55
|
* Function to load more data rows
|
|
56
56
|
*
|
|
57
57
|
* @internal
|
|
58
|
-
|
|
58
|
+
*/
|
|
59
59
|
loadMore: (count: number) => void;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -74,7 +74,7 @@ export declare const useGetFilterMembersInternal: ({ filter, defaultDataSource,
|
|
|
74
74
|
*
|
|
75
75
|
* Those members can be used to display a list of members in a third-party filter component such as Material UI Select.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
77
|
+
* ## Example
|
|
78
78
|
*
|
|
79
79
|
* Retrieve selected members from a Filter on Country of the Sample ECommerce data model.
|
|
80
80
|
*
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
* @groupDescription Fusion Assets
|
|
18
18
|
* React components, hooks, and utilities for working with Fusion dashboards, widgets, queries, and formulas
|
|
19
19
|
* @groupDescription Generative AI
|
|
20
|
-
* React components and hooks for
|
|
20
|
+
* React components and hooks for working with Generative AI features provided by Sisense Fusion
|
|
21
|
+
* ::: tip Note
|
|
22
|
+
* For more information on requirements for enabling Generative AI features, please refer to the [Generative AI documentation](https://docs.sisense.com/main/SisenseLinux/genai.htm)
|
|
23
|
+
* :::
|
|
21
24
|
* @groupDescription Interfaces
|
|
22
25
|
* TypeScript interfaces for components and hooks listed above
|
|
23
26
|
* @groupDescription Type Aliases
|
|
@@ -3,10 +3,9 @@ export * from './chart-data-options/types';
|
|
|
3
3
|
export { Chart } from './chart';
|
|
4
4
|
export { ThemeProvider } from './theme-provider';
|
|
5
5
|
export * from './dashboard';
|
|
6
|
-
export { DashboardWidget } from './widget-by-id/dashboard-widget';
|
|
7
6
|
export { WidgetById } from './widget-by-id/widget-by-id';
|
|
8
7
|
export { isChartWidgetProps, isPivotTableWidgetProps, isTextWidgetProps, isPluginWidgetProps, } from './widget-by-id/utils';
|
|
9
|
-
export { type
|
|
8
|
+
export { type CartesianWidgetType, type CategoricalWidgetType, type TabularWidgetType, type TextWidgetType, } from './widget-by-id/types';
|
|
10
9
|
export { getChartType } from './widget-by-id/utils';
|
|
11
10
|
export * from './query-execution';
|
|
12
11
|
export { executeQuery, executePivotQuery } from './query/execute-query';
|
|
@@ -45,7 +44,7 @@ export { usePlugins } from './plugins-provider/plugins-provider';
|
|
|
45
44
|
export { extractDimensionsAndMeasures, useExecutePluginQuery, } from './plugins-provider/use-execute-plugin-query';
|
|
46
45
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|
|
47
46
|
export { getDefaultThemeSettings } from './theme-provider/default-theme-settings';
|
|
48
|
-
export { useGetDashboardModel, useGetDashboardModels, useDashboardModel, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, translateToDashboardResponse, translateToDashboardsResponse, useGetHierarchyModels, getHierarchyModels, type DashboardModel, type GetDashboardModelParams, type GetDashboardModelsParams, type DashboardModelState, type DashboardModelLoadingState, type DashboardModelSuccessState, type DashboardModelErrorState, type DashboardModelsState, type DashboardModelsLoadingState, type DashboardModelsSuccessState, type DashboardModelsErrorState, type WidgetModel, type WidgetDataOptions, type WidgetModelState, type WidgetModelLoadingState, type WidgetModelErrorState, type WidgetModelSuccessState, type GetWidgetModelParams, type GetDashboardModelOptions, type GetDashboardModelsOptions, type WidgetsPanelColumnLayout, type WidgetsPanelLayout, type WidgetId, type WidgetsOptions, type CommonFiltersOptions, type CommonFiltersApplyMode, type FiltersIgnoringRules, type HierarchyModel, type Hierarchy, type HierarchyId, type GetHierarchyModelsParams, type HierarchyModelsState, type HierarchyModelsLoadingState, type HierarchyModelsErrorState, type HierarchyModelsSuccessState, UseDashboardModelActionType, } from './models';
|
|
47
|
+
export { useGetDashboardModel, useGetDashboardModels, useDashboardModel, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, translateToDashboardResponse, translateToDashboardsResponse, useGetHierarchyModels, getHierarchyModels, translateFiltersAndRelationsToDto, type DashboardModel, type GetDashboardModelParams, type GetDashboardModelsParams, type DashboardModelState, type DashboardModelLoadingState, type DashboardModelSuccessState, type DashboardModelErrorState, type DashboardModelsState, type DashboardModelsLoadingState, type DashboardModelsSuccessState, type DashboardModelsErrorState, type WidgetModel, type WidgetDataOptions, type WidgetModelState, type WidgetModelLoadingState, type WidgetModelErrorState, type WidgetModelSuccessState, type GetWidgetModelParams, type GetDashboardModelOptions, type GetDashboardModelsOptions, type WidgetsPanelColumnLayout, type WidgetsPanelLayout, type WidgetId, type WidgetsOptions, type CommonFiltersOptions, type CommonFiltersApplyMode, type FiltersIgnoringRules, type HierarchyModel, type Hierarchy, type HierarchyId, type GetHierarchyModelsParams, type HierarchyModelsState, type HierarchyModelsLoadingState, type HierarchyModelsErrorState, type HierarchyModelsSuccessState, UseDashboardModelActionType, } from './models';
|
|
49
48
|
/**
|
|
50
49
|
* Utility functions to translate a Fusion widget model from and to other widget data structures
|
|
51
50
|
*
|
|
@@ -74,6 +73,8 @@ export { boxWhiskerProcessResult } from './boxplot-utils';
|
|
|
74
73
|
export { queryStateReducer } from './query-execution/query-state-reducer';
|
|
75
74
|
export * from './props';
|
|
76
75
|
export * from './types';
|
|
76
|
+
export type { SoftUnion } from './utils/utility-types';
|
|
77
|
+
export type { BeforeMenuOpenHandler } from './common/components/menu/types';
|
|
77
78
|
export * from './filters';
|
|
78
79
|
export * from './formulas';
|
|
79
80
|
export { trackHook } from './decorators/hook-decorators';
|
|
@@ -9,6 +9,7 @@ export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsO
|
|
|
9
9
|
export declare function translateTabbersOptions(widgets?: WidgetDto[]): TabbersOptions;
|
|
10
10
|
/**
|
|
11
11
|
* Replace all shared formulas, which defined by id references, in the dashboard with their actual values.
|
|
12
|
+
*
|
|
12
13
|
* @param dashboard - The dashboard DTO to replace shared formulas in
|
|
13
14
|
* @param api - The REST API instance
|
|
14
15
|
* @returns The dashboard DTO with shared formulas, defined by id references, replaced
|
|
@@ -43,6 +43,7 @@ export type WidgetsOptions = Record<WidgetId, {
|
|
|
43
43
|
*
|
|
44
44
|
* This property actually moves responsibility on the layout management from the tabber widgets to the dashboard,
|
|
45
45
|
* storing all the tabbers configs in the single place
|
|
46
|
+
*
|
|
46
47
|
* @internal
|
|
47
48
|
*/
|
|
48
49
|
export type TabbersOptions = Record<WidgetId, TabberConfig>;
|