@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.
Files changed (112) hide show
  1. package/dist/ai.cjs +9 -9
  2. package/dist/ai.js +566 -578
  3. package/dist/analytics-composer.cjs +120 -119
  4. package/dist/analytics-composer.js +3235 -2506
  5. package/dist/{derive-chart-family-nTKwlMms.js → derive-chart-family-BLaI9-3r.js} +27266 -27205
  6. package/dist/derive-chart-family-CxqjTyNt.cjs +758 -0
  7. package/dist/dimensions-C-VKss5V.cjs +1 -0
  8. package/dist/dimensions-Cfq9FexH.js +200 -0
  9. package/dist/index.cjs +31 -18
  10. package/dist/index.js +6117 -6185
  11. package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +13 -6
  12. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
  13. package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +17 -7
  14. package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +4 -6
  15. package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +0 -20
  16. package/dist/packages/sdk-ui/src/ai/index.d.ts +6 -4
  17. package/dist/packages/sdk-ui/src/ai/use-final-nlq-response.d.ts +20 -0
  18. package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +0 -12
  19. package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +1 -4
  20. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +1 -4
  21. package/dist/packages/sdk-ui/src/analytics-composer/{common → code}/stringify-props.d.ts +10 -2
  22. package/dist/packages/sdk-ui/src/analytics-composer/common/custom-superjson.d.ts +16 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/dashboard-composer.d.ts +8 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/stringify-widgets.d.ts +3 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/to-dashboard-code.d.ts +3 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +4 -0
  27. package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
  28. package/dist/packages/sdk-ui/src/analytics-composer/query/query-translator.d.ts +1 -0
  29. package/dist/packages/sdk-ui/src/analytics-composer/query/simplify-metadata-item.d.ts +9 -0
  30. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +95 -5
  31. package/dist/packages/sdk-ui/src/analytics-composer/widget/chart-options/get-widget-options.d.ts +1 -1
  32. package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -1
  33. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +3 -0
  34. package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -55
  35. package/dist/packages/sdk-ui/src/area-range-chart.d.ts +0 -1
  36. package/dist/packages/sdk-ui/src/chart-data/table-data.d.ts +10 -0
  37. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +2 -0
  38. package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
  39. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +1 -0
  40. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +1 -0
  41. 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
  42. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +0 -1
  43. package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +1 -0
  44. package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +0 -12
  46. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +9 -3
  48. package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -4
  49. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +8 -1
  50. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +6 -1
  51. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +8 -0
  52. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
  53. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +3 -1
  54. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +0 -1
  55. package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +5 -1
  56. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +3 -1
  57. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +2 -1
  58. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +2 -1
  59. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +2 -1
  60. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +36 -6
  61. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +2 -0
  62. package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +1 -0
  63. package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +5 -4
  64. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +1 -1
  65. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +3 -1
  66. package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +3 -3
  67. package/dist/packages/sdk-ui/src/index-typedoc.d.ts +4 -1
  68. package/dist/packages/sdk-ui/src/index.d.ts +4 -3
  69. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +0 -1
  70. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  71. package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -0
  72. package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +15 -1
  73. package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +0 -1
  74. package/dist/packages/sdk-ui/src/models/widget/types.d.ts +1 -1
  75. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +2 -12
  76. package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -125
  77. package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +4 -9
  78. package/dist/packages/sdk-ui/src/props.d.ts +27 -45
  79. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  80. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +2 -4
  81. package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +2 -4
  82. package/dist/packages/sdk-ui/src/theme-provider/custom-theme-provider.d.ts +5 -8
  83. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +5 -1
  84. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +10 -2
  85. package/dist/packages/sdk-ui/src/types.d.ts +60 -40
  86. package/dist/packages/sdk-ui/src/utils/{utility-types.d.ts → utility-types/basic-utility-types.d.ts} +0 -34
  87. package/dist/packages/sdk-ui/src/utils/utility-types/distributive-omit.d.ts +24 -0
  88. package/dist/packages/sdk-ui/src/utils/utility-types/index.d.ts +4 -0
  89. package/dist/packages/sdk-ui/src/utils/utility-types/rest-api-hook-state.d.ts +35 -0
  90. package/dist/packages/sdk-ui/src/utils/utility-types/soft-union.d.ts +35 -0
  91. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +2 -2
  92. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-drilldown-options.d.ts +2 -2
  93. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +2 -2
  94. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +2 -2
  95. package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +1 -0
  96. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +23 -16
  97. package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +5 -0
  98. package/dist/packages/sdk-ui/src/widgets/widget.d.ts +0 -1
  99. package/dist/{use-common-filters-BNKt9a0z.cjs → use-common-filters-BGGGgJJ5.cjs} +48 -48
  100. package/dist/{use-common-filters--WPkVexd.js → use-common-filters-Cmyb86sc.js} +5339 -5351
  101. package/dist/widget-composer-BJURHrVD.cjs +428 -0
  102. package/dist/widget-composer-C4rwNt4P.js +959 -0
  103. package/package.json +14 -10
  104. package/dist/derive-chart-family-B4sA-ao-.cjs +0 -758
  105. package/dist/packages/sdk-ui/src/ai/common/beta-label.d.ts +0 -1
  106. package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-props.d.ts +0 -8
  107. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +0 -7
  108. package/dist/packages/sdk-ui/src/utils/check-and-notify-about-deprecated-prop.d.ts +0 -1
  109. package/dist/packages/sdk-ui/src/widget-by-id/dashboard-widget.d.ts +0 -27
  110. package/dist/widget-composer-CobNNZ1e.js +0 -742
  111. package/dist/widget-composer-DPqi_qzU.cjs +0 -316
  112. /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 { CustomTranslationObject, LoadingIndicatorConfig } from '../types';
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 Configurations
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
- language?: string;
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;
@@ -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<{
@@ -4,5 +4,6 @@ export type MenuOptions = {
4
4
  itemSections: MenuItemSection[];
5
5
  onClose?: () => void;
6
6
  };
7
+ /** @internal */
7
8
  export type BeforeMenuOpenHandler = (options: MenuOptions) => MenuOptions | null;
8
9
  export type OpenMenuFn = (options: MenuOptions) => void;
@@ -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;
@@ -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
- * - As an alpha feature, currently only changes to dashboard filters are persisted.
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 { DashboardLayoutOptions, DashboardProps } from './types.js';
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
  };
@@ -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;
@@ -1,2 +1 @@
1
1
  export { CriteriaFilterTile, type CriteriaFilterTileProps } from './criteria-filter-tile';
2
- export type { CriteriaFilterType } from './types';
@@ -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,15 +12,16 @@ 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
  *
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.
@@ -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
- * * ## Example
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 creating experiences using generative AI
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 WidgetType, type CartesianWidgetType, type CategoricalWidgetType, type TabularWidgetType, type TextWidgetType, } from './widget-by-id/types';
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';
@@ -5,7 +5,6 @@ import { CascadingFilterDto, FilterDto } from '../../api/types/dashboard-dto';
5
5
  *
6
6
  * @param filter - The filter to translate.
7
7
  * @returns FilterDto
8
- *
9
8
  * @internal
10
9
  */
11
10
  export declare function filterToFilterDto(filter: Filter): FilterDto | CascadingFilterDto;
@@ -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>;