@sisense/sdk-ui 1.33.0 → 1.35.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.
Files changed (66) hide show
  1. package/dist/ai.cjs +8 -8
  2. package/dist/ai.js +151 -138
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +3 -3
  5. package/dist/{derive-chart-family-nTKwlMms.js → derive-chart-family-5CbFzbpu.js} +18669 -18745
  6. package/dist/{derive-chart-family-B4sA-ao-.cjs → derive-chart-family-C3FH49ux.cjs} +173 -173
  7. package/dist/index.cjs +20 -11
  8. package/dist/index.js +6484 -6356
  9. package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +4 -6
  10. package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +1 -0
  11. package/dist/packages/sdk-ui/src/ai/index.d.ts +2 -1
  12. package/dist/packages/sdk-ui/src/ai/use-final-nlq-response.d.ts +20 -0
  13. package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +1 -0
  14. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +1 -0
  15. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +3 -0
  16. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +17 -1
  17. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +3 -0
  18. package/dist/packages/sdk-ui/src/chart-data/table-data.d.ts +10 -0
  19. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +2 -0
  20. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +1 -0
  21. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +1 -0
  22. 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
  23. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +0 -1
  24. package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +1 -0
  25. package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +1 -0
  26. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +0 -1
  27. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +3 -1
  28. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +8 -1
  29. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +6 -1
  30. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +8 -0
  31. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
  32. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +3 -1
  33. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +1 -0
  34. package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +5 -1
  35. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +3 -1
  36. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +2 -1
  37. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +2 -1
  38. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +2 -1
  39. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +36 -6
  40. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +2 -0
  41. package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +1 -0
  42. package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +5 -3
  43. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +1 -1
  44. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +3 -1
  45. package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +3 -3
  46. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +0 -1
  47. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  48. package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -0
  49. package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +0 -1
  50. package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +4 -9
  51. package/dist/packages/sdk-ui/src/props.d.ts +2 -0
  52. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  53. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -1
  54. package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +2 -4
  55. package/dist/packages/sdk-ui/src/theme-provider/custom-theme-provider.d.ts +5 -8
  56. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +3 -0
  57. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +6 -0
  58. package/dist/packages/sdk-ui/src/types.d.ts +16 -3
  59. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +7 -0
  60. package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +1 -0
  61. package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +5 -0
  62. package/dist/{use-common-filters--WPkVexd.js → use-common-filters-CRL16HJ4.js} +3190 -3183
  63. package/dist/{use-common-filters-BNKt9a0z.cjs → use-common-filters-Dx4AeUoy.cjs} +48 -48
  64. package/dist/{widget-composer-CobNNZ1e.js → widget-composer-C5_iIuZN.js} +14 -14
  65. package/dist/{widget-composer-DPqi_qzU.cjs → widget-composer-D5_iKTui.cjs} +1 -1
  66. package/package.json +9 -8
@@ -1,13 +1,11 @@
1
- import { ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  import { type ChatRestApi } from './api/chat-rest-api';
3
+ import { CustomContextProviderProps } from '../types';
3
4
  /** @internal */
4
5
  export type CustomAiContext = {
5
6
  api?: ChatRestApi;
6
7
  };
7
8
  /** @internal */
8
- export type CustomAiContextProviderProps = {
9
- context?: CustomAiContext;
10
- children: ReactNode;
11
- };
9
+ export type CustomAiContextProviderProps = CustomContextProviderProps<CustomAiContext>;
12
10
  /** @internal */
13
- export declare function CustomAiContextProvider({ children, context }: CustomAiContextProviderProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function CustomAiContextProvider({ children, context, }: PropsWithChildren<CustomAiContextProviderProps>): import("react/jsx-runtime").JSX.Element;
@@ -30,6 +30,7 @@ declare const _default: import("react").FunctionComponent<GetNlgInsightsProps>;
30
30
  export default _default;
31
31
  /**
32
32
  * Props for {@link GetNlgQueryResult} component.
33
+ *
33
34
  * @deprecated Use {@link GetNlgInsightsProps} instead
34
35
  * @internal
35
36
  */
@@ -5,11 +5,12 @@ export { useGetNlqResult, prepareGetNlqResultPayload, type UseGetNlqResultParams
5
5
  export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type GetQueryRecommendationsParams, type UseGetQueryRecommendationsState, DEFAULT_RECOMMENDATIONS_COUNT, } from './use-get-query-recommendations';
6
6
  export { useChatSession, type UseChatSessionResult } from './use-chat-session';
7
7
  export { useLastNlqResponse } from './use-last-nlq-response';
8
+ export { useFinalNlqResponse } from './use-final-nlq-response';
8
9
  export type { GetNlgInsightsRequest, GetNlgInsightsResponse, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, NlqResult, NLQ_RESULT_CHART_TYPES, NlqResultChartType, } from './api/types';
9
10
  export { Chatbot, type ChatbotProps } from './chatbot';
10
11
  export { default as GetNlgInsights, type GetNlgInsightsProps, GetNlgQueryResult, type GetNlgQueryResultProps, } from './get-nlg-insights';
11
12
  export { NlqChartWidget, type NlqChartWidgetProps } from './chart/nlq-chart-widget';
12
13
  export { ChatRestApi } from './api/chat-rest-api';
13
- export { CustomAiContextProvider, type CustomAiContext } from './custom-ai-context-provider';
14
+ export { CustomAiContextProvider, type CustomAiContext, type CustomAiContextProviderProps, } from './custom-ai-context-provider';
14
15
  export { prepareGetNlgInsightsPayload } from './use-get-nlg-insights';
15
16
  export { widgetComposer } from '../analytics-composer';
@@ -0,0 +1,20 @@
1
+ import type { NlqResponseData, ChatContextDetails } from './api/types';
2
+ /**
3
+ * Parameters for the useFinalNlqResponse hook.
4
+ *
5
+ * @internal
6
+ */
7
+ export interface UseFinalNlqResponseParams {
8
+ /** The title of the data model or perspective */
9
+ contextTitle: string;
10
+ /** optional chat context details */
11
+ contextDetails?: ChatContextDetails;
12
+ }
13
+ /**
14
+ * React hook that returns the final NLQ response for the chat that corresponds
15
+ * to the given data model or perspective.
16
+ *
17
+ * @param params - Parameters for the hook
18
+ * @internal
19
+ */
20
+ export declare const useFinalNlqResponse: ({ contextTitle, contextDetails, }: UseFinalNlqResponseParams) => NlqResponseData | null;
@@ -13,6 +13,7 @@ export interface GetNlqResultParams {
13
13
  * Enable suggested axis titles in generated widget
14
14
  *
15
15
  * If not specified, the default value is `false`
16
+ *
16
17
  * @internal
17
18
  */
18
19
  enableAxisTitlesInWidgetProps?: boolean;
@@ -15,6 +15,7 @@ export interface GetQueryRecommendationsParams {
15
15
  * Enable suggested axis titles in generated widget
16
16
  *
17
17
  * If not specified, the default value is `false`
18
+ *
18
19
  * @internal
19
20
  */
20
21
  enableAxisTitlesInWidgetProps?: boolean;
@@ -2,16 +2,19 @@ export * from './types';
2
2
  export * from './query';
3
3
  /**
4
4
  * Utility functions to compose props and code for widgets.
5
+ *
5
6
  * @internal
6
7
  */
7
8
  export * as widgetComposer from './widget/widget-composer';
8
9
  /**
9
10
  * Utility functions to compose props and code for dashboards.
11
+ *
10
12
  * @internal
11
13
  */
12
14
  export * as dashboardComposer from './dashboard/dashboard-composer';
13
15
  /**
14
16
  * Utility functions to compose props and code for executing queries.
17
+ *
15
18
  * @internal
16
19
  */
17
20
  export * as executeQueryComposer from './execute-query/execute-query-composer';
@@ -29,6 +29,7 @@ export interface ChartRecommendations {
29
29
  /**
30
30
  * Expanded Query Model that is based on NlqResponseData.
31
31
  * It contains expanded JAQL and chart recommendations returned from the chat response.
32
+ *
32
33
  * @internal
33
34
  */
34
35
  export interface ExpandedQueryModel {
@@ -50,11 +51,13 @@ export interface ExpandedQueryModel {
50
51
  * Empty Expanded Query Model
51
52
  *
52
53
  * Used as a default value for ExpandedQueryModel
54
+ *
53
55
  * @internal
54
56
  */
55
57
  export declare const EMPTY_EXPANDED_QUERY_MODEL: ExpandedQueryModel;
56
58
  /**
57
59
  * Simple Chart Recommendations
60
+ *
58
61
  * @internal
59
62
  */
60
63
  export interface SimpleChartRecommendations {
@@ -71,6 +74,7 @@ export interface SimpleChartRecommendations {
71
74
  * Users manipulates this model via the query in YAML format.
72
75
  *
73
76
  * QueryTranslator is responsible for translating this query model to ExpandedWidgetModel.
77
+ *
74
78
  * @internal
75
79
  */
76
80
  export interface SimpleQueryModel {
@@ -89,21 +93,25 @@ export interface SimpleQueryModel {
89
93
  * Empty Simple Query Model
90
94
  *
91
95
  * Used as a default value for SimpleQueryModel
96
+ *
92
97
  * @internal
93
98
  */
94
99
  export declare const EMPTY_SIMPLE_QUERY_MODEL: SimpleQueryModel;
95
100
  /**
96
101
  * UI Framework
102
+ *
97
103
  * @internal
98
104
  */
99
105
  export type UiFramework = 'react' | 'vue' | 'angular';
100
106
  /**
101
107
  * Code Template Key
108
+ *
102
109
  * @internal
103
110
  */
104
111
  export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'widgetByIdTmpl' | 'executeQueryByWidgetIdTmpl' | 'executeQueryTmpl' | 'executePivotQueryTmpl' | 'pivotTableWidgetTmpl';
105
112
  /**
106
113
  * Code Templates
114
+ *
107
115
  * @internal
108
116
  */
109
117
  export type CodeTemplates = {
@@ -113,11 +121,13 @@ export type CodeTemplates = {
113
121
  };
114
122
  /**
115
123
  * Code Placeholder Map
124
+ *
116
125
  * @internal
117
126
  */
118
127
  export type CodePlaceholderMap = Record<string, string>;
119
128
  /**
120
129
  * Base Code Config
130
+ *
121
131
  * @internal
122
132
  */
123
133
  export type BaseCodeConfig = {
@@ -125,6 +135,7 @@ export type BaseCodeConfig = {
125
135
  };
126
136
  /**
127
137
  * Widget Code Config
138
+ *
128
139
  * @internal
129
140
  */
130
141
  export type WidgetCodeConfig = BaseCodeConfig & {
@@ -132,6 +143,7 @@ export type WidgetCodeConfig = BaseCodeConfig & {
132
143
  };
133
144
  /**
134
145
  * Client-side Widget Code Params
146
+ *
135
147
  * @internal
136
148
  */
137
149
  export type ClientSideWidgetCodeParams = BaseCodeConfig & {
@@ -139,6 +151,7 @@ export type ClientSideWidgetCodeParams = BaseCodeConfig & {
139
151
  };
140
152
  /**
141
153
  * By ID Widget Code Params
154
+ *
142
155
  * @internal
143
156
  */
144
157
  export type ByIdWidgetCodeParams = WidgetCodeConfig & {
@@ -148,22 +161,25 @@ export type ByIdWidgetCodeParams = WidgetCodeConfig & {
148
161
  };
149
162
  /**
150
163
  * Widget Code Params
164
+ *
151
165
  * @internal
152
166
  */
153
167
  export type WidgetCodeParams = ClientSideWidgetCodeParams | ByIdWidgetCodeParams;
154
168
  /**
155
169
  * Check if widget code params is for client-side code
170
+ *
156
171
  * @internal
157
172
  */
158
173
  export declare const isClientSideWidgetCodeParams: (params: WidgetCodeParams) => params is ClientSideWidgetCodeParams;
159
174
  /**
160
175
  * Check if widget code params is for by ID code
176
+ *
161
177
  * @internal
162
178
  */
163
179
  export declare const isByIdWidgetCodeParams: (params: WidgetCodeParams) => params is ByIdWidgetCodeParams;
164
180
  /**
165
181
  * @internal
166
- **/
182
+ */
167
183
  export type WidgetPropsConfig = {
168
184
  useCustomizedStyleOptions?: boolean;
169
185
  };
@@ -72,18 +72,21 @@ export declare class RestApi {
72
72
  addWidgetToDashboard: (dashboardOid: string, widgetDto: WidgetDto) => Promise<WidgetDto | undefined>;
73
73
  /**
74
74
  * Get shared formulas by ids
75
+ *
75
76
  * @param sharedFormulasIds - An array of shared formulas ids
76
77
  * @returns A dictionary of shared formulas
77
78
  */
78
79
  getSharedFormulas: (sharedFormulasIds: string[]) => Promise<Record<string, SharedFormulaDto>>;
79
80
  /**
80
81
  * Get a shared formula by id
82
+ *
81
83
  * @param sharedFormulaId - A shared formula id
82
84
  * @returns A shared formula
83
85
  */
84
86
  getSharedFormula: (sharedFormulaId: string) => Promise<SharedFormulaDto | undefined>;
85
87
  /**
86
88
  * Get datasource fields
89
+ *
87
90
  * @param dataSource - A datasource name
88
91
  * @param options - An object with offset and count
89
92
  * @returns A list of datasource fields
@@ -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;
@@ -22,6 +22,8 @@ export type Item = {
22
22
  id: string;
23
23
  title: string;
24
24
  Icon?: React.ComponentType;
25
+ isDisabled?: boolean;
26
+ hoverTooltip?: string;
25
27
  };
26
28
  export type GroupSecondaryActionConfig = {
27
29
  SecondaryActionButtonIcon: React.ComponentType<{
@@ -2,3 +2,4 @@ export * from './use-data-accumulation';
2
2
  export * from './use-get-load-more-function';
3
3
  export * from './use-load-data-from-internal-hook';
4
4
  export * from './use-manage-slice-to-load';
5
+ export * from './use-get-hook-state-result';
@@ -4,4 +4,5 @@ export declare function useDataAccumulation({ shouldBeReset }: {
4
4
  }): {
5
5
  accumulatedData: DataChunk[];
6
6
  addData: (dataChunk: DataChunk | null) => void;
7
+ isDataReset: boolean;
7
8
  };
@@ -1,9 +1,10 @@
1
1
  import { AnyArray, RestApiHookState } from '../../../../../../utils/utility-types';
2
- import { HookExecutionStatus, WithLoadMore } from '../../types';
3
- export declare function getHookStateResult<DataKey extends string, SuccessDataType extends AnyArray>(options: {
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>>;
@@ -1,2 +1 @@
1
1
  export * from './calculate-if-all-items-loaded';
2
- export * from './get-hook-state-result';
@@ -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.
@@ -14,6 +14,7 @@ export interface ContentPanelProps {
14
14
  * If true adjust layout based on available width of content panel.
15
15
  *
16
16
  * If not specified, the default value is `false`.
17
+ *
17
18
  * @internal
18
19
  */
19
20
  responsive?: boolean;
@@ -76,7 +76,6 @@ export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace:
76
76
  * Alias for `replaceFilter`.
77
77
  *
78
78
  * @deprecated Use {@link replaceFilter} instead
79
- *
80
79
  * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
81
80
  * @param filterToModify - The existing filter to be modified.
82
81
  * @param newFilter - The new filter to replace the existing one.
@@ -101,6 +101,7 @@ export interface DashboardByIdConfig extends DashboardConfig {
101
101
  * Limitations:
102
102
  * - WAT authentication does not support persistence.
103
103
  * - As an alpha feature, currently only changes to dashboard filters are persisted.
104
+ *
104
105
  * @alpha
105
106
  */
106
107
  persist?: boolean;
@@ -139,8 +140,9 @@ export interface DashboardProps {
139
140
  widgetsOptions?: WidgetsOptions;
140
141
  /**
141
142
  * The Tabber widgets configurations as a single dashboard config
143
+ *
142
144
  * @internal
143
- * */
145
+ */
144
146
  tabbersOptions?: TabbersOptions;
145
147
  /** The style options for the dashboard */
146
148
  styleOptions?: DashboardStyleOptions;
@@ -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
- export declare const AddFilterDataBrowser: (props: AddFilterDataBrowserProps) => import("react/jsx-runtime").JSX.Element;
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.
@@ -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;
@@ -2,6 +2,7 @@ import { NumericFilter, TextFilter, RankingFilter, ExcludeFilter } from '@sisens
2
2
  /**
3
3
  * Deprecated type for `filter` property of {@link CriteriaFilterTileProps}.
4
4
  * Use regular {@link @sisense/sdk-data!Filter | Filter} instead.
5
+ *
5
6
  * @deprecated
6
7
  */
7
8
  export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | ExcludeFilter;
@@ -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 [x: string]: "dateFilter.days" | "dateFilter.weeks" | "dateFilter.months" | "dateFilter.quarters" | "dateFilter.years";
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
  };
@@ -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;
@@ -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 {};
@@ -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: string;
1
+ export declare const dateLevelGranularities: ({
2
+ value: "Years";
3
3
  displayValue: string;
4
- }[];
5
- export declare const granularities: {
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
+ })[];
@@ -2,4 +2,6 @@ export type FilterEditorConfig = {
2
2
  multiSelect?: {
3
3
  visible?: boolean;
4
4
  };
5
+ /** @internal **/
6
+ membersOnlyMode?: boolean;
5
7
  };
@@ -19,6 +19,7 @@ export interface FilterTileDesignOptions {
19
19
  isCollapsible?: boolean;
20
20
  hasBorder?: boolean;
21
21
  hasBackgroundFilterIcon?: boolean;
22
+ disableGroupHover?: boolean;
22
23
  };
23
24
  border?: {
24
25
  shouldBeShown?: boolean;
@@ -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 type FilterTileProps = {
7
+ export interface FilterTileProps {
8
8
  /** Filter to display */
9
9
  filter: Filter;
10
10
  /** Callback to handle filter change */
@@ -12,10 +12,12 @@ export type FilterTileProps = {
12
12
  /** Filter delete callback */
13
13
  onDelete?: () => void;
14
14
  /** Filter edit callback */
15
- onEdit?: () => void;
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
  *
@@ -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.
@@ -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 {};