@sisense/sdk-ui 1.32.0 → 1.33.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 (115) hide show
  1. package/dist/ai.cjs +10 -10
  2. package/dist/ai.js +556 -564
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +38 -38
  5. package/dist/{derive-chart-family-7Fxxf6Sy.cjs → derive-chart-family-B4sA-ao-.cjs} +136 -136
  6. package/dist/{derive-chart-family-CVwj-7u5.js → derive-chart-family-nTKwlMms.js} +9089 -8909
  7. package/dist/index.cjs +20 -17
  8. package/dist/index.js +10226 -7859
  9. package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +3 -2
  10. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +11 -3
  11. package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +2 -2
  12. package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +1 -1
  13. package/dist/packages/sdk-ui/src/ai/use-last-nlq-response-from-history.d.ts +8 -0
  14. package/dist/packages/sdk-ui/src/ai/use-last-nlq-response.d.ts +1 -2
  15. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +3 -2
  16. package/dist/packages/sdk-ui/src/area-chart.d.ts +2 -2
  17. package/dist/packages/sdk-ui/src/bar-chart.d.ts +2 -2
  18. package/dist/packages/sdk-ui/src/column-chart.d.ts +2 -2
  19. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group-header.d.ts +10 -0
  20. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group.d.ts +10 -0
  21. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/grouped-items-browser.d.ts +6 -0
  22. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/item-row.d.ts +15 -0
  23. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +40 -0
  24. package/dist/packages/sdk-ui/src/common/components/loading-dots.d.ts +1 -1
  25. package/dist/packages/sdk-ui/src/common/components/popover.d.ts +1 -0
  26. package/dist/packages/sdk-ui/src/common/components/radio.d.ts +1 -0
  27. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +4 -0
  28. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +7 -0
  29. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-get-load-more-function.d.ts +4 -0
  30. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-load-data-from-internal-hook.d.ts +16 -0
  31. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-manage-slice-to-load.d.ts +10 -0
  32. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/calculate-if-all-items-loaded.d.ts +2 -0
  33. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/get-hook-state-result.d.ts +9 -0
  34. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +2 -0
  35. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/index.d.ts +1 -0
  36. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/types.d.ts +27 -0
  37. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/with-lazy-loading.d.ts +7 -0
  38. package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +3 -0
  39. package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +9 -0
  40. package/dist/packages/sdk-ui/src/common/hooks/use-last-defined.d.ts +6 -0
  41. package/dist/packages/sdk-ui/src/common/icons/approval-icon.d.ts +1 -0
  42. package/dist/packages/sdk-ui/src/common/icons/arrow-icon.d.ts +3 -0
  43. package/dist/packages/sdk-ui/src/common/icons/breadcrumbs-arrows-arrow-icon.d.ts +3 -0
  44. package/dist/packages/sdk-ui/src/common/icons/close-icon.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/common/icons/date-attribute-icon.d.ts +1 -0
  46. package/dist/packages/sdk-ui/src/common/icons/elasticube-icon.d.ts +1 -0
  47. package/dist/packages/sdk-ui/src/common/icons/numeric-attribute-icon.d.ts +1 -0
  48. package/dist/packages/sdk-ui/src/common/icons/plus-icon.d.ts +1 -0
  49. package/dist/packages/sdk-ui/src/common/icons/table-icon.d.ts +1 -0
  50. package/dist/packages/sdk-ui/src/common/icons/text-attribute-icon.d.ts +1 -0
  51. package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +8 -1
  52. package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
  53. package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +4 -0
  54. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +6 -6
  55. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  56. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +61 -30
  57. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +9 -0
  58. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +14 -0
  59. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/index.d.ts +1 -0
  60. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/popover-header.d.ts +12 -0
  61. package/dist/packages/sdk-ui/src/data-browser/data-source-selector/data-source-selector.d.ts +7 -0
  62. package/dist/packages/sdk-ui/src/data-browser/data-source-selector/use-data-source-selection.d.ts +5 -0
  63. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/dimensions-browser.d.ts +6 -0
  64. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +74 -0
  65. package/dist/packages/sdk-ui/src/data-browser/search-input/search-input.d.ts +5 -0
  66. package/dist/packages/sdk-ui/src/filters/components/common/checkbox.d.ts +1 -0
  67. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +2 -1
  68. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +10 -6
  69. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/calendar-select.d.ts +1 -4
  70. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +1 -4
  71. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +4 -8
  72. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/selectable-section.d.ts +2 -1
  73. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-container.d.ts +2 -1
  74. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +13 -0
  75. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-datetime.d.ts +2 -1
  76. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-numerical.d.ts +2 -1
  77. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +6 -2
  78. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-textual.d.ts +2 -1
  79. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +6 -2
  80. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +3 -1
  81. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/not-supported-section.d.ts +6 -0
  82. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +5 -2
  83. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +5 -0
  84. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +1 -0
  85. package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +7 -0
  86. package/dist/packages/sdk-ui/src/filters/components/filters-panel/constants.d.ts +6 -0
  87. package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-header.d.ts +6 -0
  88. package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +5 -2
  89. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +19 -0
  90. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +19 -0
  91. package/dist/packages/sdk-ui/src/filters/components/filters-panel/index.d.ts +1 -0
  92. package/dist/packages/sdk-ui/src/filters/components/filters-panel/types.d.ts +60 -0
  93. package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +0 -1
  94. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  95. package/dist/packages/sdk-ui/src/line-chart.d.ts +2 -2
  96. package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model-translator.d.ts +0 -2
  97. package/dist/packages/sdk-ui/src/models/widget/use-get-widget-model.d.ts +1 -1
  98. package/dist/packages/sdk-ui/src/pie-chart.d.ts +2 -2
  99. package/dist/packages/sdk-ui/src/polar-chart.d.ts +2 -2
  100. package/dist/packages/sdk-ui/src/query-execution/use-execute-query.d.ts +1 -1
  101. package/dist/packages/sdk-ui/src/scatter-chart.d.ts +1 -1
  102. package/dist/packages/sdk-ui/src/theme-provider/use-theme-settings.d.ts +1 -1
  103. package/dist/packages/sdk-ui/src/theme-provider/utils.d.ts +5 -0
  104. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +7 -0
  105. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +14 -0
  106. package/dist/packages/sdk-ui/src/types.d.ts +151 -0
  107. package/dist/packages/sdk-ui/src/utils/data-sources-utils.d.ts +8 -0
  108. package/dist/packages/sdk-ui/src/utils/utility-types.d.ts +6 -2
  109. package/dist/packages/sdk-ui/src/widgets/drilldown-widget.d.ts +1 -1
  110. package/dist/{use-common-filters-BanIIIUW.js → use-common-filters--WPkVexd.js} +2938 -2888
  111. package/dist/{use-common-filters-BeKQ1bKU.cjs → use-common-filters-BNKt9a0z.cjs} +55 -55
  112. package/dist/{widget-composer-4bEKHitq.js → widget-composer-CobNNZ1e.js} +25 -25
  113. package/dist/{widget-composer-NDI4zssI.cjs → widget-composer-DPqi_qzU.cjs} +1 -1
  114. package/package.json +7 -7
  115. /package/dist/packages/sdk-ui/src/{filters/components → common}/icons/search-icon.d.ts +0 -0
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
- export type AiContextProviderProps = {
2
+ export interface AiContextProviderProps {
3
3
  children: ReactNode;
4
+ /** AI context volatile mode */
4
5
  volatile?: boolean;
5
- };
6
+ }
6
7
  /**
7
8
  * React component that wraps all generative AI components and hooks.
8
9
  *
@@ -65,13 +65,19 @@ interface ErrorResponse {
65
65
  responseType: 'error';
66
66
  }
67
67
  /**
68
- * Response data to NLQ request
68
+ * Response data for NLQ request
69
69
  */
70
70
  export interface NlqResponseData extends ExpandedQueryModel {
71
+ /** Detailed description of the response */
71
72
  detailedDescription: string;
72
- followupQuestions: string[];
73
+ /** An array of suggested followup questions */
74
+ followupQuestions?: string[];
75
+ /** NLQ prompt used in the request */
73
76
  nlqPrompt: string;
77
+ /** Suggested widget props*/
74
78
  widgetProps?: WidgetProps | undefined;
79
+ /** The response message for the chat */
80
+ userMsg: string;
75
81
  }
76
82
  export interface NlqResponse {
77
83
  data: NlqResponseData;
@@ -83,7 +89,9 @@ export interface QueryRecommendationConfig {
83
89
  numOfRecommendations: number;
84
90
  }
85
91
  export type NlqResult = Omit<NlqResponseData, 'followupQuestions'>;
86
- export type QueryRecommendation = Omit<NlqResponseData, 'followupQuestions'>;
92
+ /** AI-generated recommended query you can run on your data model */
93
+ export interface QueryRecommendation extends Omit<NlqResponseData, 'followupQuestions'> {
94
+ }
87
95
  export type QueryRecommendationResponse = QueryRecommendation[];
88
96
  export interface GetNlgInsightsRequest {
89
97
  jaql: Pick<JaqlQueryPayload, 'datasource' | 'metadata' | 'filterRelations'>;
@@ -1,4 +1,4 @@
1
- import { Filter, Data } from '@sisense/sdk-data';
1
+ import { Filter, Data, FilterRelations } from '@sisense/sdk-data';
2
2
  import type { NlqResponseData } from '../../ai';
3
3
  import { NlqChartWidgetStyleOptions } from '../../types';
4
4
  /**
@@ -15,7 +15,7 @@ export interface NlqChartWidgetProps {
15
15
  /**
16
16
  * The dashboard filters to be applied to the chart
17
17
  */
18
- filters?: Filter[];
18
+ filters?: Filter[] | FilterRelations;
19
19
  /**
20
20
  * A callback that allows to modify data immediately after it has been retrieved.
21
21
  * Can be used to inject modification of queried data.
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { type ChatRestApi } from './api/chat-rest-api';
3
3
  /** @internal */
4
4
  export type CustomAiContext = {
5
- api: ChatRestApi;
5
+ api?: ChatRestApi;
6
6
  };
7
7
  /** @internal */
8
8
  export type CustomAiContextProviderProps = {
@@ -0,0 +1,8 @@
1
+ import type { NlqResponseData, ChatMessage } from './api/types';
2
+ /**
3
+ * React hook that returns the last NLQ response from chat history
4
+ *
5
+ * @chatHistory [ChatMessage[]] - Parameters for the hook
6
+ * @internal
7
+ */
8
+ export declare const useLastNlqResponseFromHistory: (chatHistory?: ChatMessage[]) => NlqResponseData | null;
@@ -4,7 +4,7 @@ import type { NlqResponseData, ChatContextDetails } from './api/types';
4
4
  *
5
5
  * @internal
6
6
  */
7
- interface UseLastNlqResponseParams {
7
+ export interface UseLastNlqResponseParams {
8
8
  /** The title of the data model or perspective */
9
9
  contextTitle: string;
10
10
  /** optional chat context details */
@@ -18,4 +18,3 @@ interface UseLastNlqResponseParams {
18
18
  * @internal
19
19
  */
20
20
  export declare const useLastNlqResponse: ({ contextTitle, contextDetails, }: UseLastNlqResponseParams) => NlqResponseData | null;
21
- export {};
@@ -89,8 +89,9 @@ export declare class RestApi {
89
89
  * @returns A list of datasource fields
90
90
  */
91
91
  getDataSourceFields: (dataSource: string, options?: {
92
- offset: number;
93
- count: number;
92
+ offset?: number;
93
+ count?: number;
94
+ searchValue?: string;
94
95
  }) => Promise<DataSourceField[] | undefined>;
95
96
  }
96
97
  export declare const useRestApi: () => {
@@ -17,8 +17,8 @@ import { AreaChartProps } from './props';
17
17
  *
18
18
  * Additional Area Chart examples:
19
19
  *
20
- * - [Stacked Area Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Farea-chart-stacked)
21
- * - [Stacked Percentage Area Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Farea-chart-stacked100)
20
+ * - [Stacked Area Chart](https://www.sisense.com/developers/playground/?example=charts%2Farea-chart-stacked)
21
+ * - [Stacked Percentage Area Chart](https://www.sisense.com/developers/playground/?example=charts%2Farea-chart-stacked100)
22
22
  *
23
23
  * @param props - Area chart properties
24
24
  * @returns Area Chart component
@@ -17,8 +17,8 @@ import { BarChartProps } from './props';
17
17
  *
18
18
  * Additional Bar Chart examples:
19
19
  *
20
- * - [Stacked Bar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fbar-chart-stacked)
21
- * - [Stacked Percentage Bar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fbar-chart-stacked100)
20
+ * - [Stacked Bar Chart](https://www.sisense.com/developers/playground/?example=charts%2Fbar-chart-stacked)
21
+ * - [Stacked Percentage Bar Chart](https://www.sisense.com/developers/playground/?example=charts%2Fbar-chart-stacked100)
22
22
  *
23
23
  * @param props - Bar chart properties
24
24
  * @returns Bar Chart component
@@ -20,8 +20,8 @@ import { ColumnChartProps } from './props';
20
20
  *
21
21
  * Additional Column Chart examples:
22
22
  *
23
- * - [Stacked Column Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fcolumn-chart-stacked)
24
- * - [Stacked Percentage Column Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fcolumn-chart-stacked100)
23
+ * - [Stacked Column Chart](https://www.sisense.com/developers/playground/?example=charts%2Fcolumn-chart-stacked)
24
+ * - [Stacked Percentage Column Chart](https://www.sisense.com/developers/playground/?example=charts%2Fcolumn-chart-stacked100)
25
25
  *
26
26
  * @param props - Column chart properties
27
27
  * @returns Column Chart component
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ItemsGroup, GroupSecondaryActionConfig } from './types';
3
+ type GroupHeaderProps = {
4
+ isOpen: boolean;
5
+ group: ItemsGroup;
6
+ secondaryAction?: GroupSecondaryActionConfig;
7
+ onOpenStateChange?: (open: boolean) => void;
8
+ };
9
+ export declare const GroupHeader: React.FC<GroupHeaderProps>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ItemsGroup, GroupSecondaryActionConfig, ItemActionConfig, ItemSecondaryActionConfig } from './types';
3
+ type GroupProps = {
4
+ group: ItemsGroup;
5
+ groupSecondaryActionConfig?: GroupSecondaryActionConfig;
6
+ itemActionConfig?: ItemActionConfig;
7
+ itemSecondaryActionConfig?: ItemSecondaryActionConfig;
8
+ };
9
+ export declare const Group: React.FC<GroupProps>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { GroupedItemsBrowserProps } from './types';
3
+ /**
4
+ * A generic component that displays a list of grouped items.
5
+ */
6
+ export declare const GroupedItemsBrowser: React.FC<GroupedItemsBrowserProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Item, ItemActionConfig, ItemSecondaryActionConfig } from './types';
3
+ /**
4
+ * Props for the item row component.
5
+ */
6
+ type ItemRowProps = {
7
+ /** The item to display. */
8
+ item: Item;
9
+ /** The action to perform when the item is clicked. */
10
+ itemActionConfig?: ItemActionConfig;
11
+ /** The secondary action of the item. */
12
+ itemSecondaryActionConfig?: ItemSecondaryActionConfig;
13
+ };
14
+ export declare const ItemRow: React.FC<ItemRowProps>;
15
+ export {};
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ export type GroupedItemsBrowserProps = {
3
+ groupedItems: ItemsGroup[];
4
+ groupSecondaryActionConfig?: GroupSecondaryActionConfig;
5
+ itemActionConfig?: ItemActionConfig;
6
+ itemSecondaryActionConfig?: ItemSecondaryActionConfig;
7
+ onScrolledToBottom?: () => void;
8
+ };
9
+ /**
10
+ * A group of items.
11
+ */
12
+ export type ItemsGroup = {
13
+ title: string;
14
+ id: string;
15
+ items: Item[];
16
+ Icon?: React.ComponentType;
17
+ };
18
+ /**
19
+ * An item in the list of grouped items.
20
+ */
21
+ export type Item = {
22
+ id: string;
23
+ title: string;
24
+ Icon?: React.ComponentType;
25
+ };
26
+ export type GroupSecondaryActionConfig = {
27
+ SecondaryActionButtonIcon: React.ComponentType<{
28
+ group: ItemsGroup;
29
+ }>;
30
+ onClick(this: void, group: ItemsGroup): void;
31
+ };
32
+ export type ItemActionConfig = {
33
+ onClick(this: void, item: Item): void;
34
+ };
35
+ export type ItemSecondaryActionConfig = {
36
+ SecondaryActionButtonIcon: React.ComponentType<{
37
+ item: Item;
38
+ }>;
39
+ onClick(this: void, item: Item): void;
40
+ };
@@ -1,3 +1,3 @@
1
1
  export declare const LoadingDots: ({ color }: {
2
- color: string | undefined;
2
+ color?: string | undefined;
3
3
  }) => import("react/jsx-runtime").JSX.Element;
@@ -15,6 +15,7 @@ type PopoverPosition = PopoverAnchorPosition;
15
15
  type PopoverProps = {
16
16
  children: ReactNode;
17
17
  open: boolean;
18
+ id?: string;
18
19
  position?: PopoverPosition;
19
20
  onClose?: () => void;
20
21
  };
@@ -2,6 +2,7 @@ type ButtonProps = {
2
2
  checked?: boolean;
3
3
  value?: string;
4
4
  onChange?: (checked: boolean) => void;
5
+ disabled?: boolean;
5
6
  };
6
7
  /** @internal */
7
8
  export declare const Radio: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export * from './use-data-accumulation';
2
+ export * from './use-get-load-more-function';
3
+ export * from './use-load-data-from-internal-hook';
4
+ export * from './use-manage-slice-to-load';
@@ -0,0 +1,7 @@
1
+ import { DataChunk } from '../../types';
2
+ export declare function useDataAccumulation({ shouldBeReset }: {
3
+ shouldBeReset: boolean;
4
+ }): {
5
+ accumulatedData: DataChunk[];
6
+ addData: (dataChunk: DataChunk | null) => void;
7
+ };
@@ -0,0 +1,4 @@
1
+ export declare function useGetLoadMoreFunction({ increaseSliceToLoad, isLoadMoreRequestsForbidden, }: {
2
+ increaseSliceToLoad: () => void;
3
+ isLoadMoreRequestsForbidden: boolean;
4
+ }): () => void;
@@ -0,0 +1,16 @@
1
+ import { AnyArray, RestApiHookState } from '../../../../../../utils/utility-types';
2
+ import { RestApiHookParams, SliceableRestApiHook, UnsliceableParams, Slice, DataChunk, HookExecutionStatus } from '../../types';
3
+ type UseLoadDataFromInternalHookOptions<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>> = {
4
+ hook: Hook;
5
+ params: UnsliceableParams<HookParams>;
6
+ sliceToLoad: Slice;
7
+ dataKey: DataKey;
8
+ };
9
+ type UseLoadDataFromInternalHookResult<DataKey extends string, SuccessDataType extends AnyArray> = {
10
+ dataChunk: DataChunk | null;
11
+ hookExecutionStatus: HookExecutionStatus;
12
+ dataLoadingError: Error | undefined;
13
+ hookResultState: RestApiHookState<DataKey, SuccessDataType>;
14
+ };
15
+ export declare function useLoadDataFromInternalHook<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>>(options: UseLoadDataFromInternalHookOptions<HookParams, DataKey, SuccessDataType, Hook>): UseLoadDataFromInternalHookResult<DataKey, SuccessDataType>;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ import { DataChunk, Slice } from '../../types';
2
+ export declare function useManageSliceToLoad({ initialCount, chunkSize, accumulatedData, shouldBeReset, }: {
3
+ initialCount: number;
4
+ chunkSize: number;
5
+ accumulatedData: DataChunk[];
6
+ shouldBeReset: boolean;
7
+ }): {
8
+ sliceToLoad: Slice;
9
+ increaseSliceToLoad: () => void;
10
+ };
@@ -0,0 +1,2 @@
1
+ import { DataChunk } from '../../types';
2
+ export declare const calculateIfAllItemsLoaded: (dataChunk: DataChunk | null) => boolean;
@@ -0,0 +1,9 @@
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: {
4
+ status: HookExecutionStatus;
5
+ dataKey: DataKey;
6
+ data: SuccessDataType;
7
+ loadMore: () => void;
8
+ error?: Error;
9
+ }): WithLoadMore<RestApiHookState<DataKey, SuccessDataType>>;
@@ -0,0 +1,2 @@
1
+ export * from './calculate-if-all-items-loaded';
2
+ export * from './get-hook-state-result';
@@ -0,0 +1 @@
1
+ export { withLazyLoading } from './with-lazy-loading';
@@ -0,0 +1,27 @@
1
+ import { AnyArray, AnyObject, RestApiHookState } from '../../../../utils/utility-types';
2
+ export type Slice = {
3
+ count: number;
4
+ offset: number;
5
+ };
6
+ type Sliceable = Partial<Slice>;
7
+ type Enableable = {
8
+ enabled?: boolean;
9
+ };
10
+ export type RestApiHookParams = Sliceable & Enableable & AnyObject;
11
+ export type UnsliceableParams<Params extends RestApiHookParams> = Omit<Params, keyof Slice>;
12
+ export type LazyLoadingConfig = {
13
+ initialCount: number;
14
+ chunkSize: number;
15
+ dataKey: string;
16
+ };
17
+ export type SliceableRestApiHook<Params extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray> = (params: Params) => RestApiHookState<DataKey, SuccessDataType>;
18
+ export type WithLoadMore<ReturnObject> = ReturnObject & {
19
+ loadMore: () => void;
20
+ };
21
+ export type HookWithLazyLoading<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>> = (params: UnsliceableParams<HookParams>) => WithLoadMore<ReturnType<Hook>>;
22
+ export type DataChunk = {
23
+ slice: Slice;
24
+ data: AnyArray;
25
+ };
26
+ export type HookExecutionStatus = 'success' | 'error' | 'loading';
27
+ export {};
@@ -0,0 +1,7 @@
1
+ import { AnyArray } from '../../../../utils/utility-types';
2
+ import { LazyLoadingConfig, SliceableRestApiHook, HookWithLazyLoading, RestApiHookParams } from './types';
3
+ /**
4
+ * A decorator that adds lazy loading functionality to a hook.
5
+ *
6
+ */
7
+ export declare const withLazyLoading: (config: LazyLoadingConfig) => <HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray>(hook: SliceableRestApiHook<HookParams, DataKey, SuccessDataType>) => HookWithLazyLoading<HookParams, DataKey, SuccessDataType, SliceableRestApiHook<HookParams, DataKey, SuccessDataType>>;
@@ -9,6 +9,9 @@ import { DataSource, DataSourceField } from '@sisense/sdk-data';
9
9
  export declare const useGetDataSourceFields: (params: {
10
10
  dataSource: DataSource | undefined;
11
11
  enabled?: boolean;
12
+ count?: number;
13
+ offset?: number;
14
+ searchValue?: string;
12
15
  }) => DataSourceFieldsState;
13
16
  type DataSourceFieldsState = RestApiHookState<'dataSourceFields', DataSourceField[]>;
14
17
  export {};
@@ -0,0 +1,9 @@
1
+ import type { DeepRequired } from 'ts-essentials';
2
+ import { AnyObject } from '../../utils/utility-types';
3
+ /**
4
+ * Merges the provided configuration with the default configuration.
5
+ * @param config - The configuration to merge with the default configuration.
6
+ * @param defaults - The default configuration.
7
+ * @returns The merged configuration.
8
+ */
9
+ export declare const useDefaults: <Config extends AnyObject>(config: Config | undefined, defaults: DeepRequired<Config>) => DeepRequired<Config>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook that returns the last defined value.
3
+ *
4
+ * @param value - last defined value to return.
5
+ */
6
+ export declare function useLastDefined<T>(value: T | null | undefined): T;
@@ -0,0 +1 @@
1
+ export declare const ApprovalIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const ArrowIcon: (props: {
2
+ direction: 'left' | 'right' | 'up' | 'down';
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const BreadcrumbsArrowsIcon: ({ direction, }: {
2
+ direction?: "left" | "right" | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CloseIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const DateAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ElasticubeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const NumericAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PlusIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TableIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TextAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,13 @@ export interface ContentPanelProps {
10
10
  * An object defining how the widgets should be laid out.
11
11
  */
12
12
  layout?: WidgetsPanelLayout;
13
+ /**
14
+ * If true adjust layout based on available width of content panel.
15
+ *
16
+ * If not specified, the default value is `false`.
17
+ * @internal
18
+ */
19
+ responsive?: boolean;
13
20
  /**
14
21
  * A list of widget props to render.
15
22
  */
@@ -21,4 +28,4 @@ export interface ContentPanelProps {
21
28
  * @param props - {@link ContentPanelProps}
22
29
  * @internal
23
30
  */
24
- export declare const ContentPanel: ({ layout, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const ContentPanel: ({ layout, responsive, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DashboardContainerProps } from '../../dashboard/types';
2
- export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange, enableFilterEditor, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,6 @@
1
+ import type { DeepRequired } from 'ts-essentials';
2
+ import { DashboardByIdConfig, DashboardConfig } from './types';
1
3
  export declare const DASHBOARD_DIVIDER_COLOR = "#d5d5d5";
2
4
  export declare const DASHBOARD_DIVIDER_WIDTH = 1;
5
+ export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<DashboardConfig>;
6
+ export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<DashboardByIdConfig>;
@@ -10,7 +10,7 @@ import { Filter, FilterRelations } from '@sisense/sdk-data';
10
10
  * ```ts
11
11
  * const existingDashboard: DashboardProps = {...}
12
12
  * const newFilters: Filter[] = [{...}, {...}, ...];
13
- * const updatedDashboard = replaceFilters(existingDashboard, newFilters);
13
+ * const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
14
14
  * ```
15
15
  * @param dashboard - The original dashboard (`DashboardProps`) whose filters are to be replaced.
16
16
  * @param newFilters - An array of new filters or filter relations to set on the dashboard.
@@ -27,7 +27,7 @@ export declare const replaceFilters: (dashboard: DashboardProps, newFilters: Fil
27
27
  * ```ts
28
28
  * const existingDashboard: DashboardProps = {...};
29
29
  * const newFilter: Filter = {...};
30
- * const updatedDashboard = addFilter(existingDashboard, newFilter);
30
+ * const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
31
31
  * ```
32
32
  * @param dashboard - The original dashboard (`DashboardProps`) to which the filter will be added.
33
33
  * @param newFilter - The filter to add to the dashboard.
@@ -44,7 +44,7 @@ export declare const addFilter: (dashboard: DashboardProps, newFilter: Filter) =
44
44
  * ```ts
45
45
  * const existingDashboard: DashboardProps = {...};
46
46
  * const newFilters: Filter[] = [{...}, {...}, ...];
47
- * const updatedDashboard = addFilters(existingDashboard, newFilters);
47
+ * const updatedDashboard = dashboardHelpers.addFilters(existingDashboard, newFilters);
48
48
  * ```
49
49
  * @param dashboard - The original dashboard (`DashboardProps`) to which the filters will be added.
50
50
  * @param newFilters - An array of filters to add to the dashboard.
@@ -63,7 +63,7 @@ export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[
63
63
  * const existingDashboard: DashboardProps = {...};
64
64
  * const filterToReplace: Filter = {...};
65
65
  * const newFilter: Filter = {...};
66
- * const updatedDashboard = replaceFilter(existingDashboard, filterToReplace, newFilter);
66
+ * const updatedDashboard = dashboardHelpers.replaceFilter(existingDashboard, filterToReplace, newFilter);
67
67
  * ```
68
68
  * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to be replaced.
69
69
  * @param filterToReplace - The existing filter to be replaced.
@@ -94,7 +94,7 @@ export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: F
94
94
  * ```ts
95
95
  * const existingDashboard: DashboardProps = {...};
96
96
  * const filterToRemove: Filter = {...};
97
- * const updatedDashboard = removeFilter(existingDashboard, filterToRemove);
97
+ * const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
98
98
  * ```
99
99
  * @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
100
100
  * @param filterToRemove - The filter to be removed.
@@ -112,7 +112,7 @@ export declare const removeFilter: (dashboard: DashboardProps, filterToRemove: F
112
112
  * ```ts
113
113
  * const existingDashboard: DashboardProps = {...};
114
114
  * const filtersToRemove: Filter[] = [{...}, {...}, ...];
115
- * const updatedDashboard = removeFilters(existingDashboard, filtersToRemove);
115
+ * const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
116
116
  * ```
117
117
  * @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
118
118
  * @param filtersToRemove - An array of filters to remove.
@@ -2,4 +2,4 @@ export { DashboardById } from './dashboard-by-id';
2
2
  export { Dashboard } from './dashboard';
3
3
  export { useComposedDashboard, type ComposableDashboardProps, type UseComposedDashboardOptions, } from './use-composed-dashboard';
4
4
  export { useDashboardTheme, type DashboardThemeParams } from './use-dashboard-theme';
5
- export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, } from './types';
5
+ export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, DashboardByIdConfig, DashboardFiltersPanelConfig, } from './types';