@sisense/sdk-ui 2.16.1 → 2.18.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 (93) hide show
  1. package/dist/ai.cjs +55 -55
  2. package/dist/ai.js +780 -742
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +576 -484
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{derive-chart-family-DLwnWblo.js → derive-chart-family-BEjUaaLD.js} +707 -699
  8. package/dist/{derive-chart-family-d7eaC45K.cjs → derive-chart-family-C3PTAfzX.cjs} +13 -13
  9. package/dist/{dimensions-DvDgZ8RW.js → dimensions-CETtX6B1.js} +1 -1
  10. package/dist/{dimensions-BUWtZxix.cjs → dimensions-_D0C3KY2.cjs} +1 -1
  11. package/dist/{execute-query-CFK2R_1S.js → execute-query-CUf3Nz7H.js} +843 -842
  12. package/dist/execute-query-tRu-NooT.cjs +1 -0
  13. package/dist/index.cjs +991 -267
  14. package/dist/index.js +71497 -19352
  15. package/dist/index.umd.js +1270 -1268
  16. package/dist/packages/sdk-ui/src/ai/get-nlg-insights-from-widget.d.ts +46 -0
  17. package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -0
  18. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/common.d.ts +26 -3
  19. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/filter-processors.d.ts +0 -9
  20. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/types.d.ts +23 -11
  21. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +2 -2
  22. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/app/client-application.d.ts +5 -5
  24. package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +4 -4
  25. package/dist/packages/sdk-ui/src/common-filters/utils.d.ts +19 -0
  26. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/editable-layout-row.d.ts +11 -0
  27. package/dist/packages/sdk-ui/src/dashboard/hooks/index.d.ts +12 -0
  28. package/dist/packages/sdk-ui/src/dashboard/hooks/use-jtd.d.ts +1 -2
  29. package/dist/packages/sdk-ui/src/dashboard/utils.d.ts +15 -0
  30. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +78 -0
  31. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +23 -0
  32. package/dist/packages/sdk-ui/src/data-source-dimensional-model/index.d.ts +2 -0
  33. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/index.d.ts +0 -1
  34. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-list.d.ts +5 -0
  35. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/pill-section.d.ts +1 -2
  36. package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +6 -0
  37. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  38. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/widget-model-translator.d.ts +4 -1
  39. package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +2 -2
  40. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +2 -1
  41. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +2 -1
  42. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-totals-formatter.d.ts +1 -1
  43. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +2 -1
  44. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +1 -1
  45. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-get-pivot-table-query.d.ts +1 -1
  46. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-builder.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-client.d.ts +8 -0
  48. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-loading.d.ts +2 -1
  49. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-service.d.ts +2 -1
  50. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +1 -1
  51. package/dist/packages/sdk-ui/src/pivot-table/pivot-table.d.ts +32 -2
  52. package/dist/packages/sdk-ui/src/pivot-table/sorting-utils.d.ts +1 -1
  53. package/dist/packages/sdk-ui/src/props.d.ts +26 -7
  54. package/dist/packages/sdk-ui/src/query/date-formats/fiscal-date-format-replacers.d.ts +1 -0
  55. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +6 -0
  56. package/dist/packages/sdk-ui/src/query-execution/use-execute-pivot-query.d.ts +0 -1
  57. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +1 -1
  58. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +2 -2
  59. package/dist/packages/sdk-ui/src/types.d.ts +100 -31
  60. package/dist/packages/sdk-ui/src/utils/data-option-location/get-data-option-by-location.d.ts +43 -0
  61. package/dist/packages/sdk-ui/src/utils/data-option-location/get-data-option-location.d.ts +46 -0
  62. package/dist/packages/sdk-ui/src/utils/data-option-location/index.d.ts +3 -0
  63. package/dist/packages/sdk-ui/src/utils/data-option-location/set-data-option-at-location.d.ts +39 -0
  64. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-drilldown-options.d.ts +2 -2
  65. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/tabber.d.ts +3 -3
  66. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +34 -7
  67. package/dist/packages/sdk-ui/src/widgets/{chart-widget.d.ts → chart-widget/chart-widget.d.ts} +1 -1
  68. package/dist/packages/sdk-ui/src/widgets/chart-widget/index.d.ts +1 -0
  69. package/dist/packages/sdk-ui/src/widgets/{hooks/use-with-drilldown.d.ts → chart-widget/use-with-chart-widget-drilldown.d.ts} +4 -3
  70. package/dist/packages/sdk-ui/src/widgets/common/use-drilldown-core.d.ts +1 -1
  71. package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +4 -3
  72. package/dist/packages/sdk-ui/src/widgets/hooks/use-synced-drilldown-paths-manager.d.ts +113 -0
  73. package/dist/packages/sdk-ui/src/widgets/hooks/{use-synced-hierarchies.d.ts → use-synced-drilldown-paths.d.ts} +1 -1
  74. package/dist/packages/sdk-ui/src/widgets/pivot-table-widget/index.d.ts +1 -0
  75. package/dist/packages/sdk-ui/src/widgets/{pivot-table-widget.d.ts → pivot-table-widget/pivot-table-widget.d.ts} +20 -2
  76. package/dist/packages/sdk-ui/src/widgets/pivot-table-widget/use-with-pivot-table-widget-drilldown.d.ts +14 -0
  77. package/dist/packages/sdk-ui/src/widgets/pivot-table-widget/utils.d.ts +22 -0
  78. package/dist/packages/sdk-ui/src/widgets/tabber/tabber-buttons-widget.d.ts +19 -1
  79. package/dist/packages/sdk-ui/src/widgets/tabber/types.d.ts +22 -5
  80. package/dist/{types-Clbnx4mQ.cjs → types-BfWl5jz9.cjs} +1 -1
  81. package/dist/{types-D1mqt0Mg.js → types-CHqDjeeH.js} +1 -1
  82. package/dist/use-common-filters-BGLYpqmt.cjs +604 -0
  83. package/dist/use-common-filters-BhFFlOqU.js +56668 -0
  84. package/dist/{widget-composer-Dhl_nmhq.js → widget-composer-Cuky3UiC.js} +3 -3
  85. package/dist/{widget-composer-BaOTPn5w.cjs → widget-composer-DsBF8OC2.cjs} +1 -1
  86. package/package.json +8 -7
  87. package/dist/execute-query-CB4XfUng.cjs +0 -1
  88. package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +0 -17
  89. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +0 -56
  90. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +0 -14
  91. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-validate-members.d.ts +0 -8
  92. package/dist/use-common-filters-CCeRLdGB.js +0 -103405
  93. package/dist/use-common-filters-DOn2HdBv.cjs +0 -1325
@@ -227,6 +227,7 @@ export type StatisticalModels = {
227
227
  export type PanelItem = {
228
228
  instanceid?: string;
229
229
  format?: {
230
+ continuous?: boolean;
230
231
  color?: PanelColorFormat;
231
232
  colorSecond?: PanelColorFormat;
232
233
  mask?: DatetimeMask | NumericMask;
@@ -574,15 +575,21 @@ export type TextWidgetDtoStyle = {
574
575
  textAlign: 'center';
575
576
  };
576
577
  };
578
+ export type TabberWidgetDtoTab = {
579
+ displayWidgetIds: string[];
580
+ hideWidgetIds: string[];
581
+ title: string;
582
+ };
583
+ export type TabberWidgetDto = WidgetDto & {
584
+ style: TabberWidgetDtoStyle;
585
+ } & {
586
+ tabs?: TabberWidgetDtoTab[];
587
+ };
577
588
  /**
578
589
  * The data transfer object (DTO) containing info of a tabber widget style.
579
590
  */
580
591
  export type TabberWidgetDtoStyle = {
581
- tabs: {
582
- displayWidgetIds: string[];
583
- hideWidgetIds: string[];
584
- title: string;
585
- }[];
592
+ tabs?: TabberWidgetDtoTab[];
586
593
  activeTab: string;
587
594
  descriptionColor: string;
588
595
  selectedBkgColor: string;
@@ -592,8 +599,28 @@ export type TabberWidgetDtoStyle = {
592
599
  showTitle: boolean;
593
600
  tabCornerRadius: 'SMALL' | 'MEDIUM' | 'LARGE' | 'NONE';
594
601
  tabsAlignment: 'LEFT' | 'CENTER' | 'RIGHT';
595
- tabsInterval: 'SMALL' | 'MEDIUM' | 'LARGE';
596
- tabsSize: 'SMALL' | 'MEDIUM' | 'LARGE';
602
+ /**
603
+ * The spacing interval between tabs.
604
+ * Can be a predefined size ('SMALL', 'MEDIUM', 'LARGE') or a number (treated as pixels).
605
+ *
606
+ * @example
607
+ * ```typescript
608
+ * tabsInterval: 'SMALL'
609
+ * tabsInterval: 16 // treated as 16px
610
+ * ```
611
+ */
612
+ tabsInterval: 'SMALL' | 'MEDIUM' | 'LARGE' | number;
613
+ /**
614
+ * The size of the tabs.
615
+ * Can be a predefined size ('SMALL', 'MEDIUM', 'LARGE') or a number (treated as pixels).
616
+ *
617
+ * @example
618
+ * ```typescript
619
+ * tabsSize: 'MEDIUM'
620
+ * tabsSize: 14 // treated as 14px
621
+ * ```
622
+ */
623
+ tabsSize: 'SMALL' | 'MEDIUM' | 'LARGE' | number;
597
624
  unselectedBkgColor: string;
598
625
  unselectedColor: string;
599
626
  useSelectedBkg: boolean;
@@ -1,5 +1,5 @@
1
1
  import { type FunctionComponent } from 'react';
2
- import { ChartWidgetProps } from '../props';
2
+ import { ChartWidgetProps } from '../../props';
3
3
  /**
4
4
  * The Chart Widget component extending the {@link Chart} component to support widget style options.
5
5
  * It can be used along with the {@link DrilldownWidget} component to support advanced data drilldown.
@@ -0,0 +1 @@
1
+ export * from './chart-widget';
@@ -1,12 +1,13 @@
1
1
  import { ChartWidgetProps } from '../../props.js';
2
2
  import { DrilldownSelection } from '../../types.js';
3
- type UseWithDrilldownParams = {
3
+ type UseWithChartWidgetDrilldownParams = {
4
4
  propsToExtend: ChartWidgetProps;
5
5
  onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
6
6
  };
7
- export declare const useWithDrilldown: ({ propsToExtend, onDrilldownSelectionsChange, }: UseWithDrilldownParams) => {
7
+ type UseWithChartWidgetDrilldownResult = {
8
8
  propsWithDrilldown: ChartWidgetProps;
9
9
  isDrilldownEnabled: boolean;
10
- breadcrumbs: import("react/jsx-runtime").JSX.Element;
10
+ breadcrumbs: JSX.Element;
11
11
  };
12
+ export declare const useWithChartWidgetDrilldown: ({ propsToExtend, onDrilldownSelectionsChange, }: UseWithChartWidgetDrilldownParams) => UseWithChartWidgetDrilldownResult;
12
13
  export {};
@@ -5,7 +5,7 @@ import { ChartDataPoint, DataPoint, DrilldownSelection, StyledColumn } from '../
5
5
  type UseDrilldownCoreParams = {
6
6
  drilldownPaths?: (Attribute | Hierarchy)[];
7
7
  initialDimension: Column | StyledColumn;
8
- drilldownSelections?: DrilldownSelection[];
8
+ initialDrilldownSelections?: DrilldownSelection[];
9
9
  onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
10
10
  };
11
11
  export declare const useDrilldownCore: (params: UseDrilldownCoreParams) => {
@@ -5,7 +5,7 @@ import { Hierarchy } from '../../models';
5
5
  import { DataPoint, DrilldownSelection, MenuItemSection, MenuPosition, StyledColumn } from '../../types.js';
6
6
  type UseDrilldownParams = {
7
7
  initialDimension: Column | StyledColumn;
8
- drilldownSelections?: DrilldownSelection[];
8
+ initialDrilldownSelections?: DrilldownSelection[];
9
9
  /**
10
10
  * todo: make it optional when we will have a public `MenuProvider`.
11
11
  * Without provided function, it should open internal menu with the help of `useMenu` hook
@@ -13,11 +13,12 @@ type UseDrilldownParams = {
13
13
  openMenu: OpenMenuFn;
14
14
  onDrilldownSelectionsChange?: (selections: DrilldownSelection[]) => void;
15
15
  };
16
- export declare const useDrilldown: ({ initialDimension, drilldownSelections, openMenu, onDrilldownSelectionsChange, }: UseDrilldownParams) => {
16
+ export declare const useDrilldown: ({ initialDimension, initialDrilldownSelections, openMenu, onDrilldownSelectionsChange, }: UseDrilldownParams) => {
17
17
  drilldownDimension: Attribute;
18
+ drilldownSelections: DrilldownSelection[];
18
19
  drilldownFilters: import("@sisense/sdk-data").MembersFilter[];
19
20
  breadcrumbs: import("react/jsx-runtime").JSX.Element;
20
- openDrilldownMenu: (position: MenuPosition, points: DataPoint[], availableDrilldownPaths?: (Attribute | Hierarchy)[]) => void;
21
+ openDrilldownMenu: (position: MenuPosition, points: DataPoint[], availableDrilldownPaths?: (Attribute | Hierarchy)[], onSelect?: ((nextDimension: Attribute, hierarchy?: Hierarchy) => void) | undefined) => void;
21
22
  };
22
23
  /** @internal */
23
24
  export declare function getSelectionTitleMenuItem(points: DataPoint[], drilldownDimension: Attribute): MenuItemSection;
@@ -0,0 +1,113 @@
1
+ import { Attribute, DataSource } from '@sisense/sdk-data';
2
+ import { Hierarchy, HierarchyId } from '../../models/hierarchy';
3
+ /**
4
+ * States of synced drilldown paths.
5
+ */
6
+ export type SyncedDrilldownPathsState = SyncedDrilldownPathsLoadingState | SyncedDrilldownPathsErrorState | SyncedDrilldownPathsSuccessState;
7
+ /**
8
+ * State of synced drilldown paths that is loading.
9
+ */
10
+ export type SyncedDrilldownPathsLoadingState = {
11
+ /** Whether the hierarchy models is loading */
12
+ isLoading: true;
13
+ /** Whether the hierarchy models load has failed */
14
+ isError: false;
15
+ /** Whether the hierarchy models load has succeeded */
16
+ isSuccess: false;
17
+ /** Error, if one occurred */
18
+ error: undefined;
19
+ /** Loading status */
20
+ status: 'loading';
21
+ /** Synced drilldown paths, if the load is in progress */
22
+ drilldownPaths: (Attribute | Hierarchy)[] | undefined;
23
+ };
24
+ /**
25
+ * State of a synced drilldown paths load that has failed.
26
+ */
27
+ export type SyncedDrilldownPathsErrorState = {
28
+ /** Whether the hierarchy models is loading */
29
+ isLoading: false;
30
+ /** Whether the hierarchy models load has failed */
31
+ isError: true;
32
+ /** Whether the hierarchy models load has succeeded */
33
+ isSuccess: false;
34
+ /** Error, if one occurred */
35
+ error: Error;
36
+ /** Loading status */
37
+ status: 'error';
38
+ /** Synced drilldown paths, if the load failed */
39
+ drilldownPaths: undefined;
40
+ };
41
+ /**
42
+ * State of a synced drilldown paths load that has succeeded.
43
+ */
44
+ export type SyncedDrilldownPathsSuccessState = {
45
+ /** Whether the hierarchy models is loading */
46
+ isLoading: false;
47
+ /** Whether the hierarchy models load has failed */
48
+ isError: false;
49
+ /** Whether the hierarchy models load has succeeded */
50
+ isSuccess: true;
51
+ /** Error, if one occurred */
52
+ error: undefined;
53
+ /** Loading status */
54
+ status: 'success';
55
+ /** Synced drilldown paths, if the load succeeded */
56
+ drilldownPaths: (Attribute | Hierarchy)[];
57
+ };
58
+ /**
59
+ * Parameters for synchronizing drilldown paths.
60
+ *
61
+ * @internal
62
+ */
63
+ export interface SynchronizeParams {
64
+ /** The attribute/dimension for which to synchronize hierarchies */
65
+ attribute: Attribute;
66
+ /** The data source from which to retrieve hierarchies */
67
+ dataSource?: DataSource;
68
+ /** The drilldown paths to synchronize (can include Attribute, Hierarchy objects, or HierarchyId strings) */
69
+ drilldownPaths?: (Attribute | Hierarchy | HierarchyId)[];
70
+ }
71
+ /**
72
+ * Result returned by {@link useSyncedDrilldownPathsManager}.
73
+ */
74
+ export type SyncedDrilldownPathsManagerResult = SyncedDrilldownPathsState & {
75
+ /**
76
+ * A function to synchronize drilldown paths that loads hierarchy IDs from the server
77
+ *
78
+ * @param params - Parameters for synchronization
79
+ * @returns Promise that resolves with the synchronized drilldown paths
80
+ */
81
+ synchronize: (params: SynchronizeParams) => Promise<(Attribute | Hierarchy)[]>;
82
+ };
83
+ /**
84
+ * Manages synchronization of drilldown paths with hierarchy data from a Fusion instance.
85
+ * It provides a `synchronize` function that can be called manually to trigger loading.
86
+ *
87
+ * It loads all hierarchies provided as hierarchy IDs, and optionally includes hierarchies
88
+ * that are marked as `alwaysIncluded` in a Fusion instance.
89
+ *
90
+ * @returns Synchronization function and loading state.
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * const { synchronize, isLoading, isError } = useSyncedDrilldownPathsManager();
95
+ *
96
+ * // Trigger synchronization manually
97
+ * const handleSync = async () => {
98
+ * try {
99
+ * const synchronizedPaths = await synchronize({
100
+ * attribute: DM.Commerce.AgeRange,
101
+ * drilldownPaths: ['hierarchy-id-1', 'hierarchy-id-2', DM.Commerce.Gender],
102
+ * alwaysIncluded: true,
103
+ * });
104
+ * console.log('Synchronized paths:', synchronizedPaths);
105
+ * } catch (error) {
106
+ * console.error('Synchronization failed:', error);
107
+ * }
108
+ * };
109
+ * ```
110
+ *
111
+ * @internal
112
+ */
113
+ export declare function useSyncedDrilldownPathsManager(): SyncedDrilldownPathsManagerResult;
@@ -7,7 +7,7 @@ import { Hierarchy, HierarchyId } from '../../models/hierarchy';
7
7
  *
8
8
  * @internal
9
9
  */
10
- export declare function useSyncedDrilldownPaths({ attribute, dataSource, drilldownPaths, enabled, }: {
10
+ export declare function useSyncedDrilldownPaths(params: {
11
11
  attribute: Attribute;
12
12
  dataSource?: DataSource;
13
13
  drilldownPaths?: (Attribute | Hierarchy | HierarchyId)[];
@@ -0,0 +1 @@
1
+ export * from './pivot-table-widget';
@@ -1,5 +1,5 @@
1
1
  import { type FunctionComponent } from 'react';
2
- import { PivotTableWidgetProps } from '../props';
2
+ import { PivotTableWidgetProps } from '../../props';
3
3
  /**
4
4
  * React component extending `PivotTable` to support widget style options.
5
5
  *
@@ -13,11 +13,29 @@ import { PivotTableWidgetProps } from '../props';
13
13
  * rows: [DM.Category.Category],
14
14
  * values: [measureFactory.sum(DM.Commerce.Cost, 'Total Cost')]
15
15
  * }}
16
+ * title="Pivot Table Widget Example"
17
+ * styleOptions={{
18
+ * spaceAround: 'Medium',
19
+ * cornerRadius: 'Large',
20
+ * shadow: 'Light',
21
+ * border: true,
22
+ * borderColor: '#e0e0e0',
23
+ * backgroundColor: '#ffffff',
24
+ * header: {
25
+ * hidden: false,
26
+ * titleTextColor: '#333333',
27
+ * titleAlignment: 'Center',
28
+ * dividerLine: true,
29
+ * dividerLineColor: '#e0e0e0',
30
+ * backgroundColor: '#f5f5f5'
31
+ * }
32
+ * }}
16
33
  * />
17
34
  * ```
35
+ * <img src="media://pivot-widget-example.png" width="800px" />
36
+ *
18
37
  * @param props - Pivot Table Widget properties
19
38
  * @returns Widget component representing a pivot table
20
39
  * @group Dashboards
21
- * @beta
22
40
  */
23
41
  export declare const PivotTableWidget: FunctionComponent<PivotTableWidgetProps>;
@@ -0,0 +1,14 @@
1
+ import { Attribute } from '@sisense/sdk-data';
2
+ import { PivotTableWidgetProps } from '../../props.js';
3
+ import { DataOptionLocation, DrilldownSelection } from '../../types.js';
4
+ type UseWithPivotTableWidgetDrilldownParams = {
5
+ propsToExtend: PivotTableWidgetProps;
6
+ onDrilldownSelectionsChange?: (target: Attribute | DataOptionLocation, selections: DrilldownSelection[]) => void;
7
+ };
8
+ type UseWithPivotTableWidgetDrilldownResult = {
9
+ propsWithDrilldown: PivotTableWidgetProps;
10
+ isDrilldownEnabled: boolean;
11
+ breadcrumbs: JSX.Element;
12
+ };
13
+ export declare function useWithPivotTableWidgetDrilldown(params: UseWithPivotTableWidgetDrilldownParams): UseWithPivotTableWidgetDrilldownResult;
14
+ export {};
@@ -0,0 +1,22 @@
1
+ import { Attribute, Column } from '@sisense/sdk-data';
2
+ import { PivotTableDataOptions } from '../../chart-data-options/types';
3
+ import { DataOptionLocation, DrilldownSelection } from '../..';
4
+ /**
5
+ * Gets the initial dimension location for pivot table drilldown.
6
+ *
7
+ * @param dataOptions - The data options of the pivot table.
8
+ * @param drilldownTarget - The target of the drilldown (Attribute or DataOptionLocation).
9
+ * @param drilldownSelections - The current drilldown selections.
10
+ * @returns The initial dimension location.
11
+ */
12
+ export declare function getInitialDimensionLocation(dataOptions: PivotTableDataOptions, drilldownTarget: Attribute | DataOptionLocation, drilldownSelections: DrilldownSelection[]): DataOptionLocation | undefined;
13
+ /**
14
+ * Checks if drilldown is applicable to a pivot table.
15
+ * Drilldown requires the pivot table to have at least one selectable attribute (row or column dimension).
16
+ */
17
+ export declare function isDrilldownApplicableToPivot(dataOptions: PivotTableDataOptions): boolean;
18
+ /**
19
+ * Applies a drilldown dimension to pivot table data options.
20
+ * Replaces the target dimension (first row or column that doesn't match the drilldown dimension).
21
+ */
22
+ export declare function applyDrilldownDimensionToPivot(dataOptions: PivotTableDataOptions, drilldownDimensionLocation: DataOptionLocation, drilldownDimension: Column): PivotTableDataOptions;
@@ -1,5 +1,23 @@
1
1
  import React from 'react';
2
- import { TabberButtonsWidgetProps } from './types';
2
+ import { TabberButtonsWidgetProps, TabberButtonsWidgetStyleOptions } from './types';
3
+ /**
4
+ * Converts tabsInterval value to CSS string.
5
+ * Pure function that handles predefined sizes and numbers (pixels).
6
+ *
7
+ * @param tabsInterval - The tabs interval value
8
+ * @returns CSS string representation of the interval
9
+ * @internal
10
+ */
11
+ export declare function tabsIntervalToCss(tabsInterval: TabberButtonsWidgetStyleOptions['tabsInterval']): string;
12
+ /**
13
+ * Converts tabsSize value to CSS string.
14
+ * Pure function that handles predefined sizes and numbers (pixels).
15
+ *
16
+ * @param tabsSize - The tabs size value
17
+ * @returns CSS string representation of the size
18
+ * @internal
19
+ */
20
+ export declare function tabsSizeToCss(tabsSize: TabberButtonsWidgetStyleOptions['tabsSize']): string;
3
21
  /**
4
22
  * Visual representation of a Fusion's widget with tabber buttons
5
23
  * @param props - Tabber buttons widget props
@@ -37,13 +37,30 @@ export type TabberButtonsWidgetStyleOptions = {
37
37
  */
38
38
  tabsAlignment?: 'left' | 'center' | 'right';
39
39
  /**
40
- * Spacing interval between tabs
40
+ * Spacing interval between tabs.
41
+ * Can be a predefined size ('small', 'medium', 'large') or a number (treated as pixels).
42
+ *
43
+ * @default 'medium'
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * tabsInterval: 'small'
48
+ * tabsInterval: 16 // treated as 16px
49
+ * ```
41
50
  */
42
- tabsInterval?: 'small' | 'medium' | 'large';
51
+ tabsInterval?: 'small' | 'medium' | 'large' | number;
43
52
  /**
44
- * Size of the tabs
45
- */
46
- tabsSize?: 'small' | 'medium' | 'large';
53
+ * Size of the tabs.
54
+ * Can be a predefined size ('small', 'medium', 'large') or a number (treated as pixels).
55
+ *
56
+ * @default 'medium'
57
+ * @example
58
+ * ```typescript
59
+ * tabsSize: 'medium'
60
+ * tabsSize: 14 // treated as 14px
61
+ * ```
62
+ */
63
+ tabsSize?: 'small' | 'medium' | 'large' | number;
47
64
  /**
48
65
  * Background color of unselected tabs
49
66
  */
@@ -1 +1 @@
1
- "use strict";const a=require("./execute-query-CB4XfUng.cjs");class s extends a.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.__serializable="JaqlElement",this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=a.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.metadataItem=this.metadataItem,e.type=this.type,e}}const l={text:a.MetadataTypes.TextAttribute,numeric:a.MetadataTypes.NumericAttribute,datetime:a.MetadataTypes.DateLevel},d=t=>t&&t.__serializable==="JaqlElement";function n(t){var e;return new s(t,(e=l[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function o(t){const{jaql:e}=t;if(e.formula)return a.createCalculatedMeasureHelper(e);const r=a.getGranularityFromJaql(e);return"agg"in e&&e.dim&&e.datatype?a.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?a.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):n(t)}const u={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},m={model:"",metadata:[],chart:{},queryTitle:""},c=t=>"widgetProps"in t,p=t=>"dashboardOid"in t&&"widgetOid"in t,g=t=>"dashboardProps"in t,y=t=>"dashboardOid"in t;exports.EMPTY_EXPANDED_QUERY_MODEL=u;exports.EMPTY_SIMPLE_QUERY_MODEL=m;exports.JaqlElement=s;exports.createDimensionalElementFromMetadataItem=o;exports.isByIdDashboardCodeParams=y;exports.isByIdWidgetCodeParams=p;exports.isClientSideDashboardCodeParams=g;exports.isClientSideWidgetCodeParams=c;exports.isJaqlElement=d;
1
+ "use strict";const a=require("./execute-query-tRu-NooT.cjs");class s extends a.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.__serializable="JaqlElement",this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=a.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.metadataItem=this.metadataItem,e.type=this.type,e}}const l={text:a.MetadataTypes.TextAttribute,numeric:a.MetadataTypes.NumericAttribute,datetime:a.MetadataTypes.DateLevel},d=t=>t&&t.__serializable==="JaqlElement";function n(t){var e;return new s(t,(e=l[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function o(t){const{jaql:e}=t;if(e.formula)return a.createCalculatedMeasureHelper(e);const r=a.getGranularityFromJaql(e);return"agg"in e&&e.dim&&e.datatype?a.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?a.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):n(t)}const u={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},m={model:"",metadata:[],chart:{},queryTitle:""},c=t=>"widgetProps"in t,p=t=>"dashboardOid"in t&&"widgetOid"in t,g=t=>"dashboardProps"in t,y=t=>"dashboardOid"in t;exports.EMPTY_EXPANDED_QUERY_MODEL=u;exports.EMPTY_SIMPLE_QUERY_MODEL=m;exports.JaqlElement=s;exports.createDimensionalElementFromMetadataItem=o;exports.isByIdDashboardCodeParams=y;exports.isByIdWidgetCodeParams=p;exports.isClientSideDashboardCodeParams=g;exports.isClientSideWidgetCodeParams=c;exports.isJaqlElement=d;
@@ -1,4 +1,4 @@
1
- import { f as i, g as l, h as n, i as o, D as d, k as u, M as s } from "./execute-query-CFK2R_1S.js";
1
+ import { f as i, g as l, h as n, i as o, D as d, k as u, M as s } from "./execute-query-CUf3Nz7H.js";
2
2
  class m extends d {
3
3
  constructor(e, t) {
4
4
  var r;