@sisense/sdk-ui 1.32.0 → 1.34.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 (143) hide show
  1. package/dist/ai.cjs +10 -10
  2. package/dist/ai.js +565 -560
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +38 -38
  5. package/dist/{derive-chart-family-CVwj-7u5.js → derive-chart-family-5CbFzbpu.js} +23428 -23324
  6. package/dist/{derive-chart-family-7Fxxf6Sy.cjs → derive-chart-family-C3FH49ux.cjs} +186 -186
  7. package/dist/index.cjs +29 -17
  8. package/dist/index.js +10583 -8088
  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 +5 -7
  13. package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +1 -0
  14. package/dist/packages/sdk-ui/src/ai/index.d.ts +2 -1
  15. package/dist/packages/sdk-ui/src/ai/use-final-nlq-response.d.ts +20 -0
  16. package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +1 -0
  17. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +1 -0
  18. package/dist/packages/sdk-ui/src/ai/use-last-nlq-response-from-history.d.ts +8 -0
  19. package/dist/packages/sdk-ui/src/ai/use-last-nlq-response.d.ts +1 -2
  20. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +3 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +17 -1
  22. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +6 -2
  23. package/dist/packages/sdk-ui/src/area-chart.d.ts +2 -2
  24. package/dist/packages/sdk-ui/src/bar-chart.d.ts +2 -2
  25. package/dist/packages/sdk-ui/src/chart-data/table-data.d.ts +10 -0
  26. package/dist/packages/sdk-ui/src/column-chart.d.ts +2 -2
  27. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group-header.d.ts +10 -0
  28. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group.d.ts +10 -0
  29. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/grouped-items-browser.d.ts +6 -0
  30. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/item-row.d.ts +15 -0
  31. package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +42 -0
  32. package/dist/packages/sdk-ui/src/common/components/loading-dots.d.ts +1 -1
  33. package/dist/packages/sdk-ui/src/common/components/popover.d.ts +1 -0
  34. package/dist/packages/sdk-ui/src/common/components/radio.d.ts +1 -0
  35. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +5 -0
  36. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +8 -0
  37. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-get-hook-state-result.d.ts +10 -0
  38. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-get-load-more-function.d.ts +4 -0
  39. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-load-data-from-internal-hook.d.ts +16 -0
  40. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-manage-slice-to-load.d.ts +10 -0
  41. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/calculate-if-all-items-loaded.d.ts +2 -0
  42. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +1 -0
  43. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/index.d.ts +1 -0
  44. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/types.d.ts +27 -0
  45. package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/with-lazy-loading.d.ts +7 -0
  46. package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +3 -0
  47. package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +10 -0
  48. package/dist/packages/sdk-ui/src/common/hooks/use-last-defined.d.ts +6 -0
  49. package/dist/packages/sdk-ui/src/common/icons/approval-icon.d.ts +1 -0
  50. package/dist/packages/sdk-ui/src/common/icons/arrow-icon.d.ts +3 -0
  51. package/dist/packages/sdk-ui/src/common/icons/breadcrumbs-arrows-arrow-icon.d.ts +3 -0
  52. package/dist/packages/sdk-ui/src/common/icons/close-icon.d.ts +1 -0
  53. package/dist/packages/sdk-ui/src/common/icons/date-attribute-icon.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/common/icons/elasticube-icon.d.ts +1 -0
  55. package/dist/packages/sdk-ui/src/common/icons/numeric-attribute-icon.d.ts +1 -0
  56. package/dist/packages/sdk-ui/src/common/icons/plus-icon.d.ts +1 -0
  57. package/dist/packages/sdk-ui/src/common/icons/table-icon.d.ts +1 -0
  58. package/dist/packages/sdk-ui/src/common/icons/text-attribute-icon.d.ts +1 -0
  59. package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +9 -1
  60. package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
  61. package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +4 -0
  62. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +6 -7
  63. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  64. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +64 -31
  65. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +16 -0
  66. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +19 -0
  67. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/index.d.ts +1 -0
  68. package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/popover-header.d.ts +12 -0
  69. package/dist/packages/sdk-ui/src/data-browser/data-source-selector/data-source-selector.d.ts +7 -0
  70. package/dist/packages/sdk-ui/src/data-browser/data-source-selector/use-data-source-selection.d.ts +5 -0
  71. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/dimensions-browser.d.ts +6 -0
  72. package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +82 -0
  73. package/dist/packages/sdk-ui/src/data-browser/search-input/search-input.d.ts +5 -0
  74. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
  75. package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +3 -1
  76. package/dist/packages/sdk-ui/src/filters/components/common/checkbox.d.ts +1 -0
  77. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +1 -0
  78. package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +5 -1
  79. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +2 -1
  80. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +10 -6
  81. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/calendar-select.d.ts +1 -4
  82. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +1 -4
  83. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +4 -8
  84. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/selectable-section.d.ts +2 -1
  85. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-container.d.ts +2 -1
  86. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +15 -0
  87. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-datetime.d.ts +2 -1
  88. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-numerical.d.ts +2 -1
  89. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +7 -2
  90. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-textual.d.ts +2 -1
  91. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +7 -2
  92. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +4 -1
  93. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +36 -6
  94. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/not-supported-section.d.ts +6 -0
  95. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +5 -2
  96. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +7 -0
  97. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +1 -0
  98. package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +8 -0
  99. package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +5 -3
  100. package/dist/packages/sdk-ui/src/filters/components/filters-panel/constants.d.ts +6 -0
  101. package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-header.d.ts +6 -0
  102. package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +5 -2
  103. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +19 -0
  104. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +21 -0
  105. package/dist/packages/sdk-ui/src/filters/components/filters-panel/index.d.ts +1 -0
  106. package/dist/packages/sdk-ui/src/filters/components/filters-panel/types.d.ts +60 -0
  107. package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +0 -1
  108. package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +3 -3
  109. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  110. package/dist/packages/sdk-ui/src/line-chart.d.ts +2 -2
  111. package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model-translator.d.ts +0 -2
  112. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +0 -1
  113. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  114. package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -0
  115. package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +0 -1
  116. package/dist/packages/sdk-ui/src/models/widget/use-get-widget-model.d.ts +1 -1
  117. package/dist/packages/sdk-ui/src/pie-chart.d.ts +2 -2
  118. package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +4 -9
  119. package/dist/packages/sdk-ui/src/polar-chart.d.ts +2 -2
  120. package/dist/packages/sdk-ui/src/props.d.ts +2 -0
  121. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  122. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -1
  123. package/dist/packages/sdk-ui/src/query-execution/use-execute-query.d.ts +1 -1
  124. package/dist/packages/sdk-ui/src/scatter-chart.d.ts +1 -1
  125. package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +2 -4
  126. package/dist/packages/sdk-ui/src/theme-provider/custom-theme-provider.d.ts +5 -8
  127. package/dist/packages/sdk-ui/src/theme-provider/use-theme-settings.d.ts +1 -1
  128. package/dist/packages/sdk-ui/src/theme-provider/utils.d.ts +5 -0
  129. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +10 -0
  130. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +20 -0
  131. package/dist/packages/sdk-ui/src/types.d.ts +167 -3
  132. package/dist/packages/sdk-ui/src/utils/data-sources-utils.d.ts +8 -0
  133. package/dist/packages/sdk-ui/src/utils/utility-types.d.ts +6 -2
  134. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +7 -0
  135. package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +1 -0
  136. package/dist/packages/sdk-ui/src/widgets/drilldown-widget.d.ts +1 -1
  137. package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +5 -0
  138. package/dist/{use-common-filters-BanIIIUW.js → use-common-filters-Bw15BNGn.js} +5013 -4956
  139. package/dist/{use-common-filters-BeKQ1bKU.cjs → use-common-filters-CqGo6jp3.cjs} +55 -55
  140. package/dist/{widget-composer-4bEKHitq.js → widget-composer-C5_iIuZN.js} +26 -26
  141. package/dist/{widget-composer-NDI4zssI.cjs → widget-composer-D5_iKTui.cjs} +1 -1
  142. package/package.json +9 -8
  143. /package/dist/packages/sdk-ui/src/{filters/components → common}/icons/search-icon.d.ts +0 -0
@@ -0,0 +1,10 @@
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
+ *
6
+ * @param config - The configuration to merge with the default configuration.
7
+ * @param defaults - The default configuration.
8
+ * @returns The merged configuration.
9
+ */
10
+ 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,14 @@ 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
+ *
18
+ * @internal
19
+ */
20
+ responsive?: boolean;
13
21
  /**
14
22
  * A list of widget props to render.
15
23
  */
@@ -21,4 +29,4 @@ export interface ContentPanelProps {
21
29
  * @param props - {@link ContentPanelProps}
22
30
  * @internal
23
31
  */
24
- export declare const ContentPanel: ({ layout, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
32
+ 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.
@@ -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.
@@ -94,7 +93,7 @@ export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: F
94
93
  * ```ts
95
94
  * const existingDashboard: DashboardProps = {...};
96
95
  * const filterToRemove: Filter = {...};
97
- * const updatedDashboard = removeFilter(existingDashboard, filterToRemove);
96
+ * const updatedDashboard = dashboardHelpers.removeFilter(existingDashboard, filterToRemove);
98
97
  * ```
99
98
  * @param dashboard - The original dashboard (`DashboardProps`) from which to remove the filter.
100
99
  * @param filterToRemove - The filter to be removed.
@@ -112,7 +111,7 @@ export declare const removeFilter: (dashboard: DashboardProps, filterToRemove: F
112
111
  * ```ts
113
112
  * const existingDashboard: DashboardProps = {...};
114
113
  * const filtersToRemove: Filter[] = [{...}, {...}, ...];
115
- * const updatedDashboard = removeFilters(existingDashboard, filtersToRemove);
114
+ * const updatedDashboard = dashboardHelpers.removeFilters(existingDashboard, filtersToRemove);
116
115
  * ```
117
116
  * @param dashboard - The original dashboard (`DashboardProps`) from which the specified filters are removed.
118
117
  * @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';
@@ -2,6 +2,7 @@ import { DashboardStyleOptions, TabbersOptions, WidgetsOptions, WidgetsPanelLayo
2
2
  import { WidgetProps } from '../props';
3
3
  import { DashboardChangeAction } from '../dashboard/dashboard';
4
4
  import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
5
+ import { FiltersPanelConfig } from '../filters/components/filters-panel/types';
5
6
  export type { DashboardStyleOptions, WidgetsPanelColumnLayout } from '../models';
6
7
  /**
7
8
  * Props of the {@link DashboardById} component.
@@ -12,18 +13,9 @@ export interface DashboardByIdProps {
12
13
  */
13
14
  dashboardOid: string;
14
15
  /**
15
- * Boolean flag indicating whether changes to the embedded dashboard should be saved to the dashboard in Fusion.
16
- *
17
- * If not specified, the default value is `false`.
18
- *
19
- * Limitations:
20
- * - WAT authentication does not support persistence.
21
- * - As an alpha feature, currently only changes to dashboard filters are persisted.
22
- * @alpha
16
+ * The configuration for the dashboard
23
17
  */
24
- persist?: boolean;
25
- /** @internal */
26
- enableFilterEditor?: boolean;
18
+ config?: DashboardByIdConfig;
27
19
  }
28
20
  /**
29
21
  * Props for the DashboardContainer component
@@ -42,34 +34,78 @@ export interface DashboardContainerProps {
42
34
  * @internal
43
35
  */
44
36
  onChange?: (action: DashboardChangeAction) => void;
45
- /** @internal */
46
- enableFilterEditor?: boolean;
37
+ }
38
+ /**
39
+ * Dashboard filters panel configuration
40
+ */
41
+ export interface DashboardFiltersPanelConfig extends FiltersPanelConfig {
42
+ /**
43
+ * Determines whether the filters panel is visible.
44
+ *
45
+ * If not specified, the default value is `true`.
46
+ */
47
+ visible?: boolean;
48
+ /**
49
+ * Boolean flag that controls the initial "collapsed" state of the filters panel.
50
+ *
51
+ * If not specified, the default value is `false`.
52
+ */
53
+ collapsedInitially?: boolean;
54
+ /**
55
+ * Setting this to `true` will use the isCollapsed state from local storage, if available, and store any changes to local storage.
56
+ * This state is shared across all dashboards.
57
+ * This state has a higher priority than `collapsedInitially` when enabled.
58
+ */
59
+ persistCollapsedStateToLocalStorage?: boolean;
47
60
  }
48
61
  /**
49
62
  * Dashboard configuration
50
- *
51
- * @internal
52
63
  */
53
64
  export interface DashboardConfig {
54
- filtersPanel?: {
55
- isVisible?: boolean;
65
+ /**
66
+ * Configuration for the filters panel
67
+ */
68
+ filtersPanel?: DashboardFiltersPanelConfig;
69
+ /**
70
+ * Configuration for the toolbar
71
+ */
72
+ toolbar?: {
56
73
  /**
57
- * Boolean flag that controls the initial "collapsed" state of the filters panel.
74
+ * Determines whether the toolbar is visible.
58
75
  *
59
76
  * If not specified, the default value is `false`.
60
77
  */
61
- isCollapsedInitially?: boolean;
78
+ visible: boolean;
79
+ };
80
+ /**
81
+ * Configuration for the widgets panel
82
+ */
83
+ widgetsPanel?: {
62
84
  /**
63
- * Setting this to true will use the isCollapsed state from local storage, if available, and store any changes to local storage.
64
- * This state is shared across all dashboards.
65
- * This state has a higher priority than "initialIsCollapsed" when enabled.
85
+ * If true adjust layout based on available width of widgets panel.
86
+ *
87
+ * If not specified, the default value is `false`.
66
88
  */
67
- persistCollapsedStateToLocalStorage?: boolean;
68
- };
69
- toolbar?: {
70
- isVisible: boolean;
89
+ responsive?: boolean;
71
90
  };
72
91
  }
92
+ /**
93
+ * Dashboard configuration
94
+ */
95
+ export interface DashboardByIdConfig extends DashboardConfig {
96
+ /**
97
+ * Boolean flag indicating whether changes to the embedded dashboard should be saved to the dashboard in Fusion.
98
+ *
99
+ * If not specified, the default value is `false`.
100
+ *
101
+ * Limitations:
102
+ * - WAT authentication does not support persistence.
103
+ * - As an alpha feature, currently only changes to dashboard filters are persisted.
104
+ *
105
+ * @alpha
106
+ */
107
+ persist?: boolean;
108
+ }
73
109
  /**
74
110
  * Dashboard layout options
75
111
  */
@@ -92,8 +128,6 @@ export interface DashboardProps {
92
128
  layoutOptions?: DashboardLayoutOptions;
93
129
  /**
94
130
  * The configuration for the dashboard
95
- *
96
- * @internal
97
131
  */
98
132
  config?: DashboardConfig;
99
133
  /** The widgets to render in the dashboard */
@@ -106,8 +140,9 @@ export interface DashboardProps {
106
140
  widgetsOptions?: WidgetsOptions;
107
141
  /**
108
142
  * The Tabber widgets configurations as a single dashboard config
143
+ *
109
144
  * @internal
110
- * */
145
+ */
111
146
  tabbersOptions?: TabbersOptions;
112
147
  /** The style options for the dashboard */
113
148
  styleOptions?: DashboardStyleOptions;
@@ -117,8 +152,6 @@ export interface DashboardProps {
117
152
  * @internal
118
153
  */
119
154
  onChange?: (action: DashboardChangeAction) => void;
120
- /** @internal */
121
- enableFilterEditor?: boolean;
122
155
  }
123
156
  /**
124
157
  * Props for the Dashboard Header component
@@ -0,0 +1,16 @@
1
+ import { DataSource } from '@sisense/sdk-data';
2
+ import { AttributiveElement } from '../dimensions-browser/types.js';
3
+ type AddFilterDataBrowserProps = {
4
+ dataSources: DataSource[];
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[];
10
+ onAttributeClick: (attribute: AttributiveElement) => void;
11
+ };
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;
16
+ export {};
@@ -0,0 +1,19 @@
1
+ import { DataSource, Filter } from '@sisense/sdk-data';
2
+ import { AttributiveElement } from '../dimensions-browser/types';
3
+ type AddFilterPopoverProps = {
4
+ anchorEl: HTMLElement;
5
+ isOpen: boolean;
6
+ onClose?: () => void;
7
+ dataSources: DataSource[];
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[];
13
+ onFilterCreated: (filter: Filter) => void;
14
+ };
15
+ /**
16
+ * A popover with "data browser" that allows users to select a data source and an attribute to create a filter.
17
+ */
18
+ export declare const AddFilterPopover: ({ anchorEl, isOpen, onClose, dataSources, initialDataSource, onFilterCreated, disabledAttributes, }: AddFilterPopoverProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from './add-filter-popover';
@@ -0,0 +1,12 @@
1
+ /** A header for the popover with a title and a flow path. */
2
+ export declare const PopoverHeader: (props: PopoverHeaderProps) => import("react/jsx-runtime").JSX.Element;
3
+ type PopoverHeaderProps = {
4
+ title: string;
5
+ flowPath: FlowStep[];
6
+ onClose?: () => void;
7
+ };
8
+ type FlowStep = {
9
+ title: string;
10
+ isCurrentStep: boolean;
11
+ };
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DataSource } from '@sisense/sdk-data';
2
+ export type DataSourceSelectorProps = {
3
+ dataSources: DataSource[];
4
+ selectedDataSource: DataSource;
5
+ onChange: (dataSource: DataSource) => void;
6
+ };
7
+ export declare function DataSourceSelector({ dataSources, selectedDataSource, onChange, }: DataSourceSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { DataSource } from '@sisense/sdk-data';
2
+ export declare const useDataSourceSelection: (initialDataSource: DataSource) => {
3
+ selectedDataSource: DataSource;
4
+ selectDataSource: (dataSource: DataSource) => void;
5
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { DimensionsBrowserProps } from './types.js';
3
+ /**
4
+ * A component that displays a list of dimensions and their attributes.
5
+ */
6
+ export declare const DimensionsBrowser: React.FC<DimensionsBrowserProps>;
@@ -0,0 +1,82 @@
1
+ /// <reference types="react" />
2
+ import { Attribute, DateDimension, Dimension } from '@sisense/sdk-data';
3
+ /**
4
+ * Properties for the `DimensionsBrowser` component.
5
+ */
6
+ export type DimensionsBrowserProps = {
7
+ /**
8
+ * List of dimensions to be displayed.
9
+ */
10
+ dimensions: Dimension[];
11
+ /**
12
+ * Action to be performed when an attribute is clicked.
13
+ */
14
+ attributeActionConfig?: AttributeActionConfig;
15
+ /**
16
+ * Config for secondary action to be performed on an attribute.
17
+ */
18
+ attributeSecondaryActionConfig?: AttributeSecondaryActionConfig;
19
+ /**
20
+ * Config for secondary action to be performed on a dimension.
21
+ */
22
+ dimensionSecondaryActionConfig?: DimensionSecondaryActionConfig;
23
+ /**
24
+ * Callback to be executed when the user scrolls to the bottom of the list.
25
+ */
26
+ onScrolledToBottom?: () => void;
27
+ /**
28
+ * Flag indicating whether the component is in a loading state.
29
+ * If `true`, a loading spinner will be displayed.
30
+ */
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
+ };
40
+ };
41
+ /**
42
+ * Attribute-like element.
43
+ * In the context of the `DimensionsBrowser`, both `Attribute` and inner `DateDimension`
44
+ * of the parent `Dimension` mean the same level of item.
45
+ */
46
+ export type AttributiveElement = Attribute | DateDimension;
47
+ /**
48
+ * Config for an action to be performed when an attribute is clicked.
49
+ */
50
+ export type AttributeActionConfig = {
51
+ onClick(this: void, attribute: AttributiveElement): void;
52
+ };
53
+ /**
54
+ * Config for secondary action to be performed on an attribute.
55
+ */
56
+ export type AttributeSecondaryActionConfig = {
57
+ /**
58
+ * Icon (or any UI component) to be displayed on the secondary action button.
59
+ */
60
+ SecondaryActionButtonIcon: React.ComponentType<{
61
+ attribute: AttributiveElement;
62
+ }>;
63
+ /**
64
+ * Callback to be executed when the secondary action button is clicked.
65
+ */
66
+ onClick(this: void, attribute: AttributiveElement): void;
67
+ };
68
+ /**
69
+ * Config for secondary action to be performed on a dimension.
70
+ */
71
+ export type DimensionSecondaryActionConfig = {
72
+ /**
73
+ * Icon (or any UI component) to be displayed on the secondary action button.
74
+ */
75
+ SecondaryActionButtonIcon: React.ComponentType<{
76
+ dimension: Dimension;
77
+ }>;
78
+ /**
79
+ * Callback to be executed when the secondary action button is clicked.
80
+ */
81
+ onClick(this: void, dimension: Dimension): void;
82
+ };
@@ -0,0 +1,5 @@
1
+ export type SearchInputProps = {
2
+ onChange: (value: string) => void;
3
+ initialValue?: string;
4
+ };
5
+ export declare const SearchInput: (props: SearchInputProps) => import("react/jsx-runtime").JSX.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;
@@ -4,6 +4,7 @@ type CheckboxProps = {
4
4
  isLabelInactive?: boolean;
5
5
  wrapperClassName?: string;
6
6
  indeterminate?: boolean;
7
+ labelProps?: React.HTMLProps<HTMLLabelElement>;
7
8
  } & InputHTMLAttributes<HTMLInputElement>;
8
9
  export declare const Checkbox: FunctionComponent<CheckboxProps>;
9
10
  export {};
@@ -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,8 +1,9 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ import { Themable } from '../../../../theme-provider/types';
2
3
  export declare const BaseInput: import("@emotion/styled").StyledComponent<{
3
4
  theme?: import("@emotion/react").Theme | undefined;
4
5
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
- }, DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
6
+ } & Themable, DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
6
7
  type InputProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
7
8
  error?: boolean | string;
8
9
  wrapperStyle?: React.CSSProperties;
@@ -1,20 +1,24 @@
1
1
  /// <reference types="react" />
2
2
  import { Focusable } from './types';
3
+ import { Themable } from '../../../../../theme-provider/types';
3
4
  export declare const SelectField: import("@emotion/styled").StyledComponent<{
4
5
  theme?: import("@emotion/react").Theme | undefined;
5
6
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
- } & Focusable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ } & Focusable & Themable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
8
  export declare const SelectItemContainer: import("@emotion/styled").StyledComponent<{
8
9
  theme?: import("@emotion/react").Theme | undefined;
9
10
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
10
- } & {
11
- background?: string | undefined;
12
- color?: string | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
+ } & Themable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
12
  export declare const SelectLabel: import("@emotion/styled").StyledComponent<{
15
13
  theme?: import("@emotion/react").Theme | undefined;
16
14
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
15
+ } & Themable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
16
+ export declare const DropdownSelectLabel: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ } & Themable & import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
20
+ theme?: import("@emotion/react").Theme | undefined;
21
+ }, {}, {}>;
18
22
  export declare const SelectIconContainer: import("@emotion/styled").StyledComponent<{
19
23
  theme?: import("@emotion/react").Theme | undefined;
20
24
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,11 +1,8 @@
1
- import { CSSProperties } from 'react';
2
1
  import { CalendarRangeValue, CalendarSelectLimits, CalendarSelectTypes } from './types';
3
2
  type BaseCalendarSelectProps = {
4
3
  limits?: CalendarSelectLimits;
5
- style?: CSSProperties;
6
4
  placeholder?: string;
7
- primaryColor?: string;
8
- primaryBackgroundColor?: string;
5
+ width?: number | string;
9
6
  };
10
7
  type CalendarSingleSelectProps = BaseCalendarSelectProps & {
11
8
  type: CalendarSelectTypes.SINGLE_SELECT;
@@ -1,14 +1,11 @@
1
- import { CSSProperties } from 'react';
2
1
  import { SelectItem } from './types';
3
2
  import { ScrollWrapperOnScrollEvent } from '../../../../../filters/components/filter-editor-popover/common/scroll-wrapper';
4
3
  type SearchableMultiSelectProps<Value> = {
5
4
  values?: Value[];
6
5
  items: SelectItem<Value>[];
7
- style?: CSSProperties;
6
+ width?: number | string;
8
7
  placeholder?: string;
9
8
  onChange?: (values: Value[]) => void;
10
- primaryColor?: string;
11
- primaryBackgroundColor?: string;
12
9
  onListScroll?: (event: ScrollWrapperOnScrollEvent) => void;
13
10
  showListLoader?: boolean;
14
11
  showSearch?: boolean;
@@ -1,14 +1,13 @@
1
- import React, { CSSProperties } from 'react';
1
+ import React from 'react';
2
2
  import { SelectItem } from './types';
3
3
  import { ScrollWrapperOnScrollEvent } from '../../../../../filters/components/filter-editor-popover/common/scroll-wrapper';
4
+ import { Themable } from '../../../../../theme-provider/types';
4
5
  type SearchableSingleSelectProps<Value> = {
5
6
  value?: Value;
6
7
  items: SelectItem<Value>[];
7
- style?: CSSProperties;
8
+ width?: number | string;
8
9
  placeholder?: string;
9
10
  onChange?: (value: Value) => void;
10
- primaryColor?: string;
11
- primaryBackgroundColor?: string;
12
11
  onListScroll?: (event: ScrollWrapperOnScrollEvent) => void;
13
12
  showListLoader?: boolean;
14
13
  showSearch?: boolean;
@@ -25,10 +24,7 @@ export declare const StyledSearchInput: import("@emotion/styled").StyledComponen
25
24
  className?: string | undefined;
26
25
  } & {
27
26
  theme?: import("@emotion/react").Theme | undefined;
28
- } & {
29
- backgroundColor?: string | undefined;
30
- color?: string | undefined;
31
- }, {}, {}>;
27
+ } & Themable, {}, {}>;
32
28
  /** @internal */
33
29
  export declare function SearchableSingleSelect<Value = unknown>(props: SearchableSingleSelectProps<Value>): import("react/jsx-runtime").JSX.Element;
34
30
  export {};