@sisense/sdk-ui 1.34.0 → 2.1.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 (85) hide show
  1. package/dist/ai.cjs +9 -9
  2. package/dist/ai.js +556 -581
  3. package/dist/analytics-composer.cjs +120 -119
  4. package/dist/analytics-composer.js +3235 -2506
  5. package/dist/{derive-chart-family-5CbFzbpu.js → derive-chart-family-BNMFblR9.js} +33391 -32356
  6. package/dist/derive-chart-family-DjbiaKLQ.cjs +758 -0
  7. package/dist/dimensions-DcsEnPSY.cjs +1 -0
  8. package/dist/dimensions-DeTiL-EZ.js +200 -0
  9. package/dist/index.cjs +20 -16
  10. package/dist/index.js +7114 -6994
  11. package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +13 -6
  12. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
  13. package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +17 -7
  14. package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +0 -21
  15. package/dist/packages/sdk-ui/src/ai/index.d.ts +4 -3
  16. package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +0 -12
  17. package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +0 -4
  18. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +0 -4
  19. package/dist/packages/sdk-ui/src/analytics-composer/{common → code}/stringify-props.d.ts +10 -2
  20. package/dist/packages/sdk-ui/src/analytics-composer/common/custom-superjson.d.ts +16 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/dashboard-composer.d.ts +8 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/stringify-widgets.d.ts +3 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/to-dashboard-code.d.ts +3 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/query/query-translator.d.ts +1 -0
  27. package/dist/packages/sdk-ui/src/analytics-composer/query/simplify-metadata-item.d.ts +9 -0
  28. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +78 -4
  29. package/dist/packages/sdk-ui/src/analytics-composer/widget/chart-options/get-widget-options.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -1
  31. package/dist/packages/sdk-ui/src/app/client-application.d.ts +11 -62
  32. package/dist/packages/sdk-ui/src/area-range-chart.d.ts +0 -1
  33. package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +1 -0
  34. package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
  35. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +0 -11
  36. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  37. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +7 -3
  38. package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -4
  39. package/dist/packages/sdk-ui/src/emotion-cache-provider/emotion-cache-provider.d.ts +10 -0
  40. package/dist/packages/sdk-ui/src/emotion-cache-provider/index.d.ts +2 -0
  41. package/dist/packages/sdk-ui/src/emotion-cache-provider/utils.d.ts +4 -0
  42. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +0 -1
  43. package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +0 -1
  44. package/dist/packages/sdk-ui/src/index-typedoc.d.ts +4 -1
  45. package/dist/packages/sdk-ui/src/index.d.ts +4 -3
  46. package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +15 -1
  47. package/dist/packages/sdk-ui/src/models/widget/types.d.ts +1 -1
  48. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +2 -12
  49. package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -125
  50. package/dist/packages/sdk-ui/src/props.d.ts +31 -45
  51. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -3
  52. package/dist/packages/sdk-ui/src/query-execution/use-query-cache.d.ts +4 -2
  53. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +2 -1
  55. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +4 -2
  56. package/dist/packages/sdk-ui/src/types.d.ts +50 -41
  57. package/dist/packages/sdk-ui/src/utils/get-scrollbar-width.d.ts +1 -0
  58. package/dist/packages/sdk-ui/src/utils/{utility-types.d.ts → utility-types/basic-utility-types.d.ts} +0 -34
  59. package/dist/packages/sdk-ui/src/utils/utility-types/distributive-omit.d.ts +24 -0
  60. package/dist/packages/sdk-ui/src/utils/utility-types/index.d.ts +4 -0
  61. package/dist/packages/sdk-ui/src/utils/utility-types/rest-api-hook-state.d.ts +35 -0
  62. package/dist/packages/sdk-ui/src/utils/utility-types/soft-union.d.ts +35 -0
  63. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +0 -7
  64. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +2 -2
  65. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-drilldown-options.d.ts +2 -2
  66. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +2 -2
  67. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +2 -2
  68. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +23 -16
  69. package/dist/packages/sdk-ui/src/widgets/constants.d.ts +1 -0
  70. package/dist/packages/sdk-ui/src/widgets/widget.d.ts +0 -1
  71. package/dist/{use-common-filters-Bw15BNGn.js → use-common-filters-CJNwlbbh.js} +5944 -5617
  72. package/dist/use-common-filters-DcFu4qRs.cjs +271 -0
  73. package/dist/widget-composer-BEVCXjFv.js +959 -0
  74. package/dist/widget-composer-fYnr8SDo.cjs +428 -0
  75. package/package.json +13 -9
  76. package/dist/derive-chart-family-C3FH49ux.cjs +0 -758
  77. package/dist/packages/sdk-ui/src/ai/common/beta-label.d.ts +0 -1
  78. package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-props.d.ts +0 -8
  79. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +0 -8
  80. package/dist/packages/sdk-ui/src/utils/check-and-notify-about-deprecated-prop.d.ts +0 -1
  81. package/dist/packages/sdk-ui/src/widget-by-id/dashboard-widget.d.ts +0 -27
  82. package/dist/use-common-filters-CqGo6jp3.cjs +0 -271
  83. package/dist/widget-composer-C5_iIuZN.js +0 -742
  84. package/dist/widget-composer-D5_iKTui.cjs +0 -316
  85. /package/dist/packages/sdk-ui/src/analytics-composer/{widget → code}/stringify-filters.d.ts +0 -0
@@ -13,6 +13,7 @@ import { HighchartsOptionsInternal } from './chart-options-processor/chart-optio
13
13
  import { CSSProperties } from 'react';
14
14
  import { GeoDataElement, RawGeoDataElement } from './chart/restructured-charts/areamap-chart/types';
15
15
  import { TabCornerRadius, TabInterval, TabSize } from './widgets/tabber-widget';
16
+ import { SoftUnion } from './utils/utility-types';
16
17
  export type { SortDirection, PivotRowsSort } from '@sisense/sdk-data';
17
18
  export type { AppConfig } from './app/client-application';
18
19
  export type { DateConfig } from './query/date-formats';
@@ -320,24 +321,6 @@ export type IndicatorStyleOptions = (NumericSimpleIndicatorStyleOptions | Numeri
320
321
  };
321
322
  /** Configuration options that define functional style of the various elements of the Table Component */
322
323
  export interface TableStyleOptions {
323
- /**
324
- * Boolean flag whether to fill header cells with background color
325
- *
326
- * @deprecated Use {@link TableStyleOptions#header | TableStyleOptions.header.color} instead.
327
- */
328
- headersColor?: boolean;
329
- /**
330
- * Boolean flag whether to apply background color to alternate rows.
331
- *
332
- * @deprecated Use {@link TableStyleOptions#rows | TableStyleOptions.rows.alternatingColor} instead.
333
- */
334
- alternatingRowsColor?: boolean;
335
- /**
336
- * Boolean flag whether to apply background color to alternate columns
337
- *
338
- * @deprecated Use {@link TableStyleOptions#columns | TableStyleOptions.columns.alternatingColor} instead.
339
- */
340
- alternatingColumnsColor?: boolean;
341
324
  /**
342
325
  * Vertical padding around whole table
343
326
  * Default value is 20px
@@ -668,12 +651,6 @@ export interface ChartThemeSettings {
668
651
  secondaryTextColor?: string;
669
652
  /** Background color */
670
653
  backgroundColor?: string;
671
- /**
672
- * Toolbar Background color, can be used as a secondary background color
673
- *
674
- * @deprecated
675
- */
676
- panelBackgroundColor?: string;
677
654
  /** Animation options */
678
655
  animation?: {
679
656
  /** Chart initialization animation options */
@@ -948,6 +925,8 @@ export type WidgetThemeSettings = {
948
925
  titleTextColor?: string;
949
926
  /** Header title alignment */
950
927
  titleAlignment?: AlignmentTypes;
928
+ /** Header title font size */
929
+ titleFontSize?: number;
951
930
  /** Toggle of the divider line between widget header and chart */
952
931
  dividerLine?: boolean;
953
932
  /** Divider line color */
@@ -1229,13 +1208,6 @@ export interface WidgetByIdStyleOptions extends WidgetContainerStyleOptions {
1229
1208
  */
1230
1209
  height?: number;
1231
1210
  }
1232
- /**
1233
- * Style settings defining the look and feel of DashboardWidget
1234
- *
1235
- * @deprecated Use {@link WidgetByIdStyleOptions} instead
1236
- */
1237
- export interface DashboardWidgetStyleOptions extends WidgetByIdStyleOptions {
1238
- }
1239
1211
  /** Style settings defining the look and feel of ChartWidget */
1240
1212
  export type ChartWidgetStyleOptions = ChartStyleOptions & WidgetContainerStyleOptions;
1241
1213
  /**
@@ -1272,12 +1244,6 @@ export declare type ColorPaletteTheme = {
1272
1244
  };
1273
1245
  /** Configuration for the drilldown */
1274
1246
  export type DrilldownOptions = {
1275
- /**
1276
- * Dimensions that can be used for drilldown
1277
- *
1278
- * @deprecated Use {@link DrilldownOptions.drilldownPaths} instead
1279
- */
1280
- drilldownDimensions?: Attribute[];
1281
1247
  /**
1282
1248
  * Dimensions and hierarchies available for drilldown on.
1283
1249
  */
@@ -1653,6 +1619,51 @@ export type CustomTranslationObject = {
1653
1619
  */
1654
1620
  namespace?: string;
1655
1621
  };
1622
+ /**
1623
+ * Translation Configuration
1624
+ */
1625
+ export type TranslationConfig = {
1626
+ /**
1627
+ * Language code to be used for translations.
1628
+ */
1629
+ language?: string;
1630
+ /**
1631
+ * Additional translation resources to be loaded.
1632
+ *
1633
+ * You can find the list of available translation keys in the translation folder of every package.
1634
+ *
1635
+ * Translation keys that are not provided will default to the English translation.
1636
+ * If translation is provided for a package other than sdk-ui, please specify the namespace property.
1637
+ *
1638
+ * Important: Do not translate parts in {{}} - these are placeholders for dynamic values and will be matched using provided variable names.
1639
+ *
1640
+ * @example
1641
+ * ```ts
1642
+ * customTranslations: [
1643
+ * {
1644
+ * language: 'fr',
1645
+ * resources: {
1646
+ * errors: {
1647
+ * invalidFilterType: 'Type de filtre invalide',
1648
+ * },
1649
+ * },
1650
+ * },
1651
+ * {
1652
+ * language: 'es',
1653
+ * namespace: 'sdkData'
1654
+ * resources: {
1655
+ * errors: {
1656
+ * measure: {
1657
+ * unsupportedType: 'Tipo de medida no compatible',
1658
+ * },
1659
+ * },
1660
+ * },
1661
+ * },
1662
+ * ]
1663
+ * ```
1664
+ */
1665
+ customTranslations?: CustomTranslationObject[];
1666
+ };
1656
1667
  /**
1657
1668
  * Single Tabber Widget tab object without styling
1658
1669
  *
@@ -1707,10 +1718,8 @@ export type TabberConfig = {
1707
1718
  activeTab: number;
1708
1719
  };
1709
1720
  /** @internal */
1710
- export type CustomContextProviderProps<P> = {
1721
+ export type CustomContextProviderProps<P> = SoftUnion<{
1711
1722
  context: P;
1712
- error?: undefined;
1713
1723
  } | {
1714
- context?: undefined;
1715
1724
  error: Error;
1716
- };
1725
+ }>;
@@ -0,0 +1 @@
1
+ export declare const getScrollbarWidth: () => number;
@@ -61,38 +61,4 @@ export type AnyArray = any[];
61
61
  * type TRequiredB = WithRequiredProp<T, 'b'>; // { a: string; b: number; c?: boolean; }
62
62
  */
63
63
  export type WithRequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
64
- /**
65
- * Universal generic state for hooks that fetch data from the REST API.
66
- */
67
- export type RestApiHookState<DataKey extends string, SuccessDataType extends AnyObject | AnyArray> = RestApiHookSuccessState<DataKey, SuccessDataType> | RestApiHookErrorState<DataKey> | RestApiHookLoadingState<DataKey>;
68
- /** Success state of the REST API hook */
69
- export type RestApiHookSuccessState<DataKey extends string, SuccessDataType extends AnyObject | AnyArray> = {
70
- isLoading: false;
71
- isError: false;
72
- isSuccess: true;
73
- error: undefined;
74
- status: 'success';
75
- } & {
76
- [key in DataKey]: SuccessDataType;
77
- };
78
- /** Error state of the REST API hook */
79
- export type RestApiHookErrorState<DataKey extends string> = {
80
- isLoading: false;
81
- isError: true;
82
- isSuccess: false;
83
- error: Error;
84
- status: 'error';
85
- } & {
86
- [key in DataKey]: undefined;
87
- };
88
- /** Loading state of the REST API hook */
89
- export type RestApiHookLoadingState<DataKey extends string> = {
90
- isLoading: true;
91
- isError: false;
92
- isSuccess: false;
93
- error: undefined;
94
- status: 'loading';
95
- } & {
96
- [key in DataKey]: undefined;
97
- };
98
64
  export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Utility type that applies `Omit` distributively over a union of types.
3
+ *
4
+ * In TypeScript, applying `Omit` directly to a union type causes the keys to be removed
5
+ * from the union "as a whole", resulting in unintended behavior. This type fixes that by
6
+ * distributing `Omit` to each member of the union individually.
7
+ *
8
+ * @template T The union of types to apply the omit to.
9
+ * @template K The keys to omit from each type in the union.
10
+ *
11
+ * @example
12
+ * type A = { type: 'a'; foo: string };
13
+ * type B = { type: 'b'; bar: number };
14
+ * type U = A | B;
15
+ *
16
+ * // Without distributive omit:
17
+ * type Broken = Omit<U, 'type'>;
18
+ * // Result: { foo?: string; bar?: number } - not a union anymore
19
+ *
20
+ * // With distributive omit:
21
+ * type Fixed = DistributiveOmit<U, 'type'>;
22
+ * // Result: { foo: string } | { bar: number } - still a union
23
+ */
24
+ export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
@@ -0,0 +1,4 @@
1
+ export * from './basic-utility-types';
2
+ export * from './rest-api-hook-state';
3
+ export * from './soft-union';
4
+ export * from './distributive-omit';
@@ -0,0 +1,35 @@
1
+ import { AnyArray, AnyObject } from './basic-utility-types';
2
+ /**
3
+ * Universal generic state for hooks that fetch data from the REST API.
4
+ */
5
+ export type RestApiHookState<DataKey extends string, SuccessDataType extends AnyObject | AnyArray> = RestApiHookSuccessState<DataKey, SuccessDataType> | RestApiHookErrorState<DataKey> | RestApiHookLoadingState<DataKey>;
6
+ /** Success state of the REST API hook */
7
+ export type RestApiHookSuccessState<DataKey extends string, SuccessDataType extends AnyObject | AnyArray> = {
8
+ isLoading: false;
9
+ isError: false;
10
+ isSuccess: true;
11
+ error: undefined;
12
+ status: 'success';
13
+ } & {
14
+ [key in DataKey]: SuccessDataType;
15
+ };
16
+ /** Error state of the REST API hook */
17
+ export type RestApiHookErrorState<DataKey extends string> = {
18
+ isLoading: false;
19
+ isError: true;
20
+ isSuccess: false;
21
+ error: Error;
22
+ status: 'error';
23
+ } & {
24
+ [key in DataKey]: undefined;
25
+ };
26
+ /** Loading state of the REST API hook */
27
+ export type RestApiHookLoadingState<DataKey extends string> = {
28
+ isLoading: true;
29
+ isError: false;
30
+ isSuccess: false;
31
+ error: undefined;
32
+ status: 'loading';
33
+ } & {
34
+ [key in DataKey]: undefined;
35
+ };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Gets all unique keys from a union of object types.
3
+ *
4
+ * @template T - The union of object types.
5
+ * @returns A union of all keys present in the types in `T`.
6
+ *
7
+ * @example
8
+ * type Type1 = { a: number; b: string };
9
+ * type Type2 = { b: string; c?: boolean };
10
+ * type AllKeys = KeysOfUnion<Type1 | Type2>; // Evaluates to "a" | "b" | "c"
11
+ */
12
+ type KeysOfUnion<T> = T extends unknown ? keyof T : never;
13
+ /**
14
+ * Creates a "soft union" type from a union of object types. A soft union
15
+ * combines the properties of all types in the union, making properties
16
+ * optional with `undefined` if they are not present in a specific type
17
+ * within the union.
18
+ *
19
+ * @template T - The union of object types.
20
+ * @returns A type that represents the soft union of the types in `T`.
21
+ * Each constituent type in the union `T` is augmented with the missing
22
+ * properties from other types in `T`, typed as optional `undefined`.
23
+ *
24
+ * @example
25
+ * type Type1 = { bar: string };
26
+ * type Type2 = { agg: number };
27
+ * type SoftUnionType = SoftUnion<Type1 | Type2>;
28
+ * // Evaluates to:
29
+ * // | { bar: string; agg?: undefined }
30
+ * // | { bar?: undefined; agg: number; }
31
+ *
32
+ * @internal
33
+ */
34
+ export type SoftUnion<T, K extends PropertyKey = KeysOfUnion<T>> = T extends unknown ? T & Partial<Record<Exclude<K, keyof T>, undefined>> : never;
35
+ export {};
@@ -4785,13 +4785,6 @@ export declare function getDashboardFilters(dashboardFilters: Array<FilterDto |
4785
4785
  sort?: "desc" | "asc" | undefined;
4786
4786
  in?: {
4787
4787
  selected?: {
4788
- /**
4789
- * Checks if a highlight filter is applicable to a widget.
4790
- *
4791
- * @param {FilterDto} filter - The filter to be checked.
4792
- * @param {WidgetDto} widget - The widget that filters are applied to.
4793
- * @returns {boolean} `true` if the filter is applicable; otherwise, `false`.
4794
- */
4795
4788
  jaql: import("@sisense/sdk-data").FilterJaql;
4796
4789
  } | undefined;
4797
4790
  } | undefined;
@@ -1,6 +1,6 @@
1
1
  import { JaqlDataSource } from '@sisense/sdk-data';
2
2
  import { StyledMeasureColumn, StyledColumn, Color } from '../types.js';
3
- import { Panel, PanelItem, WidgetType, WidgetStyle, BoxplotWidgetStyle } from './types.js';
3
+ import { Panel, PanelItem, FusionWidgetType, WidgetStyle, BoxplotWidgetStyle } from './types.js';
4
4
  import { WidgetDataOptions } from '../models/index.js';
5
5
  /** @internal */
6
6
  export declare function applyStatisticalModels(dataOption: StyledMeasureColumn, statisticalModels?: {
@@ -38,4 +38,4 @@ export declare function extractBoxplotBoxType(style: BoxplotWidgetStyle): "iqr"
38
38
  * This is to support multi-source dashboards.
39
39
  */
40
40
  export declare function attachDataSourceToPanels(panels: Panel[], dataSource: JaqlDataSource): Panel[];
41
- export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], style: WidgetStyle, customPaletteColors?: Color[]): WidgetDataOptions;
41
+ export declare function extractDataOptions(fusionWidgetType: FusionWidgetType, panels: Panel[], style: WidgetStyle, customPaletteColors?: Color[]): WidgetDataOptions;
@@ -1,3 +1,3 @@
1
- import { Panel, PanelItem, WidgetType } from './types.js';
1
+ import { Panel, PanelItem, FusionWidgetType } from './types.js';
2
2
  import { DrilldownOptions } from '../types.js';
3
- export declare const extractDrilldownOptions: (widgetType: WidgetType, panels: Panel[], drillHistory?: PanelItem[], enableDrillToAnywhere?: boolean) => DrilldownOptions;
3
+ export declare const extractDrilldownOptions: (widgetType: FusionWidgetType, panels: Panel[], drillHistory?: PanelItem[], enableDrillToAnywhere?: boolean) => DrilldownOptions;
@@ -1,9 +1,9 @@
1
1
  import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions, PivotTableStyleOptions, SpaceSizes, RadiusSizes, ShadowsTypes, AlignmentTypes, WidgetStyleOptions, TextWidgetStyleOptions } from '../types';
2
- import { WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle, WidgetDesign, WidgetDto } from './types';
2
+ import { WidgetSubtype, FusionWidgetType, TableWidgetStyle, IndicatorWidgetStyle, PivotWidgetStyle, WidgetDesign, WidgetDto } from './types';
3
3
  export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
4
4
  export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
5
5
  export declare function extractPivotTableStyleOptions(widgetStyle: PivotWidgetStyle): PivotTableStyleOptions;
6
- export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widget: WidgetDto): ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions;
6
+ export declare function extractStyleOptions<WType extends FusionWidgetType>(widgetType: WType, widget: WidgetDto): ChartStyleOptions | TableStyleOptions | TextWidgetStyleOptions;
7
7
  export declare const getFlattenWidgetDesign: (widgetDesign: WidgetDesign) => {
8
8
  backgroundColor: string;
9
9
  spaceAround: SpaceSizes;
@@ -21,7 +21,7 @@ export type TextWidgetType = 'richtexteditor';
21
21
  /**
22
22
  * The type of a widget on a dashboard.
23
23
  */
24
- export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | TextWidgetType | 'plugin';
24
+ export type FusionWidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area' | TextWidgetType | 'plugin';
25
25
  export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter' | 'areamap/world' | 'areamap/usa' | 'richtexteditor';
26
26
  export declare enum WidgetDashboardFilterMode {
27
27
  FILTER = "filter",
@@ -37,7 +37,7 @@ export declare enum WidgetDashboardFilterMode {
37
37
  */
38
38
  export interface WidgetDto {
39
39
  oid: string;
40
- type: WidgetType | string;
40
+ type: FusionWidgetType;
41
41
  subtype: WidgetSubtype | string;
42
42
  datasource: JaqlDataSource;
43
43
  metadata: {
@@ -1,25 +1,32 @@
1
1
  import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options.js';
2
- import { ChartType } from '../types.js';
3
- import { Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype, WidgetType } from './types.js';
4
- import { ChartProps, ChartWidgetProps, PivotTableWidgetProps, PluginWidgetProps, RenderToolbarHandler, TextWidgetProps, CommonWidgetProps, WithWidgetType, WidgetProps } from '../index.js';
2
+ import { ChartType, RenderToolbarHandler } from '../types.js';
3
+ import { Panel, PanelItem, TextWidgetDtoStyle, WidgetStyle, WidgetSubtype, FusionWidgetType } from './types.js';
4
+ import { ChartProps, ChartWidgetProps, PivotTableWidgetProps, PluginWidgetProps, TextWidgetProps, CommonWidgetProps, WithCommonWidgetProps, WidgetProps, WidgetType } from '../props';
5
5
  import { WidgetTypeInternal } from '../models/widget/types';
6
+ import { WidgetModel } from '../models';
6
7
  export { mergeFilters, getFilterRelationsFromJaql, convertFilterRelationsModelToJaql, getFilterCompareId, } from '@sisense/sdk-data';
7
8
  /**
8
9
  * Returns the corresponding chart type for a given widget type
9
10
  *
10
11
  * @internal
11
12
  */
12
- export declare function getChartType(widgetType: WidgetType): ChartType;
13
- export declare function getWidgetTypeFromChartType(chartType: ChartType): WidgetType;
13
+ export declare function getChartType(fusionWidgetType: FusionWidgetType): ChartType;
14
+ export declare function getFusionWidgetTypeFromChartType(chartType: ChartType): FusionWidgetType;
15
+ export declare function getFusionWidgetType(widgetType: WidgetType, chartType?: ChartType): FusionWidgetType;
16
+ export declare function getWidgetType(fusionWidgetType: FusionWidgetType): WidgetType;
14
17
  export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
15
- type WidgetTypeOrString = string | WidgetType;
16
- export declare function isSupportedWidgetType(widgetType: WidgetTypeOrString): widgetType is WidgetType;
17
- export declare function isTableWidget(widgetType: WidgetTypeOrString): boolean;
18
- export declare function isPivotTableWidget(widgetType: WidgetTypeOrString): boolean;
19
- export declare function isTextWidget(widgetType: WidgetTypeOrString): boolean;
18
+ export declare function isSupportedWidgetType(fusionWidgetType: FusionWidgetType): fusionWidgetType is FusionWidgetType;
19
+ export declare function isTableFusionWidget(fusionWidgetType: FusionWidgetType): boolean;
20
+ export declare function isTableWidgetModel(widgetModel: WidgetModel): boolean;
21
+ export declare function isPivotTableFusionWidget(fusionWidgetType: FusionWidgetType): boolean;
22
+ export declare function isPivotWidget(widgetType: WidgetType): boolean;
23
+ export declare function isTextFusionWidget(fusionWidgetType: FusionWidgetType): boolean;
24
+ export declare function isTextWidget(widgetType: WidgetType): boolean;
20
25
  export declare function isTextWidgetDtoStyle(widgetStyle: WidgetStyle): widgetStyle is TextWidgetDtoStyle;
21
- export declare function isPluginWidget(widgetType: WidgetTypeOrString): boolean;
22
- export declare function isChartWidget(widgetType: WidgetTypeOrString): boolean;
26
+ export declare function isPluginFusionWidget(fusionWidgetType: FusionWidgetType): boolean;
27
+ export declare function isPluginWidget(widgetType: WidgetType): boolean;
28
+ export declare function isChartFusionWidget(fusionWidgetType: FusionWidgetType): boolean;
29
+ export declare function isChartWidget(widgetType: WidgetType): boolean;
23
30
  /**
24
31
  * Type guard for checking if the widget props is for a text widget.
25
32
  *
@@ -27,7 +34,7 @@ export declare function isChartWidget(widgetType: WidgetTypeOrString): boolean;
27
34
  * @returns whether the widget props is for a text widget
28
35
  * @internal
29
36
  */
30
- export declare function isTextWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithWidgetType<TextWidgetProps, 'text'>;
37
+ export declare function isTextWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<TextWidgetProps, 'text'>;
31
38
  /**
32
39
  * Type guard for checking if the widget props is for a pivot table widget.
33
40
  *
@@ -35,7 +42,7 @@ export declare function isTextWidgetProps(widgetProps: CommonWidgetProps): widge
35
42
  * @returns whether the widget props is for a pivot table widget
36
43
  * @internal
37
44
  */
38
- export declare function isPivotTableWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithWidgetType<PivotTableWidgetProps, 'pivot'>;
45
+ export declare function isPivotTableWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>;
39
46
  /**
40
47
  * Type guard for checking if the widget props is for a plugin widget
41
48
  *
@@ -43,7 +50,7 @@ export declare function isPivotTableWidgetProps(widgetProps: CommonWidgetProps):
43
50
  * @returns whether the widget props is for a plugin widget
44
51
  * @internal
45
52
  */
46
- export declare function isPluginWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithWidgetType<PluginWidgetProps, 'plugin'>;
53
+ export declare function isPluginWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<PluginWidgetProps, 'plugin'>;
47
54
  /**
48
55
  * Type guard for checking if the widget props is for a chart widget
49
56
  *
@@ -51,7 +58,7 @@ export declare function isPluginWidgetProps(widgetProps: CommonWidgetProps): wid
51
58
  * @returns whether the widget props is for a chart widget
52
59
  * @internal
53
60
  */
54
- export declare function isChartWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithWidgetType<ChartWidgetProps, 'chart'>;
61
+ export declare function isChartWidgetProps(widgetProps: CommonWidgetProps): widgetProps is WithCommonWidgetProps<ChartWidgetProps, 'chart'>;
55
62
  export declare function getInternalWidgetType(widgetProps: CommonWidgetProps): WidgetTypeInternal;
56
63
  /**
57
64
  * Registers new "onDataPointClick" handler for the Widget component
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_WIDGET_HEADER_HEIGHT = 32;
@@ -4,6 +4,5 @@ import { WidgetProps } from '..';
4
4
  * Facade component that renders a widget within a dashboard based on the widget type.
5
5
  *
6
6
  * @group Dashboards
7
- * @alpha
8
7
  */
9
8
  export declare const Widget: React.FC<WidgetProps>;