@sisense/sdk-ui 0.13.0 → 0.15.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 (121) hide show
  1. package/dist/ai/api/chat-api-context.d.ts +12 -0
  2. package/dist/ai/api/chat-rest-api.d.ts +28 -0
  3. package/dist/ai/api/hooks.d.ts +74 -0
  4. package/dist/ai/api/types.d.ts +139 -0
  5. package/dist/ai/chat-box.d.ts +6 -0
  6. package/dist/ai/chat-frame.d.ts +8 -0
  7. package/dist/ai/chat-home.d.ts +2 -0
  8. package/dist/ai/chat-input.d.ts +7 -0
  9. package/dist/ai/chatbot-context.d.ts +11 -0
  10. package/dist/ai/chatbot.d.ts +27 -0
  11. package/dist/ai/data-topics/data-topic-item.d.ts +8 -0
  12. package/dist/ai/data-topics/data-topic-list.d.ts +10 -0
  13. package/dist/ai/data-topics/index.d.ts +2 -0
  14. package/dist/ai/icons/arrow-left-icon.d.ts +2 -0
  15. package/dist/ai/icons/clear-chat-icon.d.ts +2 -0
  16. package/dist/ai/icons/close-dialog-icon.d.ts +2 -0
  17. package/dist/ai/icons/expand-icon.d.ts +2 -0
  18. package/dist/ai/icons/info-icon.d.ts +2 -0
  19. package/dist/ai/icons/light-bulb-icon.d.ts +2 -0
  20. package/dist/ai/icons/loading-dots-icon.d.ts +2 -0
  21. package/dist/ai/icons/magic-wand-icon.d.ts +2 -0
  22. package/dist/ai/icons/message-icon.d.ts +2 -0
  23. package/dist/ai/icons/refresh-icon.d.ts +2 -0
  24. package/dist/ai/icons/sisense-logo.d.ts +2 -0
  25. package/dist/ai/icons/three-dots-icon.d.ts +2 -0
  26. package/dist/ai/index.d.ts +4 -0
  27. package/dist/ai/magic-wand-dropdown.d.ts +7 -0
  28. package/dist/ai/messages/chart-message-toolbar.d.ts +8 -0
  29. package/dist/ai/messages/chart-message.d.ts +8 -0
  30. package/dist/ai/messages/clear-history-message.d.ts +6 -0
  31. package/dist/ai/messages/get-widget-options.d.ts +13 -0
  32. package/dist/ai/messages/insights-message.d.ts +10 -0
  33. package/dist/ai/messages/jaql-element.d.ts +25 -0
  34. package/dist/ai/messages/message-list-resolver.d.ts +7 -0
  35. package/dist/ai/messages/message-resolver.d.ts +11 -0
  36. package/dist/ai/messages/text-message.d.ts +8 -0
  37. package/dist/ai/nav-back-button.d.ts +6 -0
  38. package/dist/ai/nlg-query-result.d.ts +20 -0
  39. package/dist/ai/suggestions/index.d.ts +4 -0
  40. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +7 -0
  41. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +7 -0
  42. package/dist/ai/suggestions/suggestion-item.d.ts +7 -0
  43. package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +2 -0
  44. package/dist/ai/suggestions/suggestion-list.d.ts +7 -0
  45. package/dist/ai/suggestions/suggestions-with-intro.d.ts +8 -0
  46. package/dist/ai/toolbar.d.ts +8 -0
  47. package/dist/ai/use-chat-session.d.ts +22 -0
  48. package/dist/ai.d.ts +1 -0
  49. package/dist/ai.js +3390 -0
  50. package/dist/api/types/dashboard-dto.d.ts +13 -5
  51. package/dist/chart-data-options/types.d.ts +11 -5
  52. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
  53. package/dist/chart-options-processor/translations/scatter-series.d.ts +1 -0
  54. package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -1
  55. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +3 -2
  56. package/dist/charts/indicator/chart/indicator.d.ts +1 -1
  57. package/dist/charts/indicator/chart/ticker.d.ts +2 -2
  58. package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
  59. package/dist/charts/indicator/types.d.ts +47 -6
  60. package/dist/common/components/loading-indicator.d.ts +33 -0
  61. package/dist/common/icons/loading-icon.d.ts +6 -0
  62. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +13 -0
  63. package/dist/dashboard-widget/translate-panel-color-format.d.ts +3 -2
  64. package/dist/dashboard-widget/translate-widget-data-options.d.ts +2 -2
  65. package/dist/dashboard-widget/translate-widget-filters.d.ts +21 -2
  66. package/dist/dashboard-widget/types.d.ts +14 -52
  67. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +48 -0
  68. package/dist/dashboard-widget/utils.d.ts +3 -3
  69. package/dist/decorators/{with-tracking → component-decorators/with-tracking}/error-tracker.d.ts +1 -1
  70. package/dist/decorators/hook-decorators/index.d.ts +1 -0
  71. package/dist/decorators/hook-decorators/with-tracking.d.ts +2 -0
  72. package/dist/filters/components/common/basic-input.d.ts +8 -0
  73. package/dist/filters/components/common/index.d.ts +3 -0
  74. package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
  75. package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
  76. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +20 -0
  77. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +62 -0
  78. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +27 -0
  79. package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
  80. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
  81. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +12 -4
  82. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
  83. package/dist/filters/components/filter-tile.d.ts +5 -2
  84. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +2 -0
  85. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -2
  86. package/dist/filters/index.d.ts +1 -0
  87. package/dist/formulas/fetch-formula.d.ts +16 -0
  88. package/dist/formulas/index.d.ts +1 -0
  89. package/dist/formulas/use-get-shared-formula.d.ts +95 -0
  90. package/dist/funnel-chart.d.ts +1 -1
  91. package/dist/highcharts-memorized.d.ts +6 -0
  92. package/dist/index.d.ts +2 -1
  93. package/dist/index.js +8248 -71295
  94. package/dist/indicator-chart.d.ts +1 -1
  95. package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
  96. package/dist/models/dashboard/use-get-dashboard-model.d.ts +6 -1
  97. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -1
  98. package/dist/pie-chart.d.ts +1 -1
  99. package/dist/props.d.ts +66 -19
  100. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +18 -5
  101. package/dist/query-execution/use-execute-query.d.ts +10 -6
  102. package/dist/scatter-chart.d.ts +1 -1
  103. package/dist/table-widget-7b20ecf7.js +64167 -0
  104. package/dist/themes/colors.d.ts +86 -0
  105. package/dist/translation/resources/en.d.ts +25 -0
  106. package/dist/translation/resources/index.d.ts +50 -0
  107. package/dist/treemap-chart.d.ts +1 -2
  108. package/dist/types.d.ts +13 -3
  109. package/dist/widgets/chart-widget.d.ts +2 -2
  110. package/dist/widgets/common/drilldown.d.ts +1 -1
  111. package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
  112. package/dist/widgets/common/widget-header.d.ts +1 -1
  113. package/dist/widgets/table-widget.d.ts +1 -2
  114. package/package.json +18 -7
  115. /package/dist/decorators/{as-sisense-component.d.ts → component-decorators/as-sisense-component.d.ts} +0 -0
  116. /package/dist/decorators/{with-default-translations.d.ts → component-decorators/with-default-translations.d.ts} +0 -0
  117. /package/dist/decorators/{with-error-boundary.d.ts → component-decorators/with-error-boundary.d.ts} +0 -0
  118. /package/dist/decorators/{with-sisense-context-validation.d.ts → component-decorators/with-sisense-context-validation.d.ts} +0 -0
  119. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/index.d.ts +0 -0
  120. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/use-track-component-init.d.ts +0 -0
  121. /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/with-tracking.d.ts +0 -0
@@ -1,13 +1,21 @@
1
- import { WidgetDto, Datasource, FilterJaql } from '../../dashboard-widget/types';
2
- type Filter = {
1
+ import { WidgetDto, Datasource } from '../../dashboard-widget/types';
2
+ import { FilterJaql } from '@sisense/sdk-data';
3
+ export type Filter = {
4
+ isCascading?: false;
3
5
  jaql: FilterJaql;
4
- isCascading: boolean;
6
+ instanceid?: string;
7
+ disabled?: boolean;
8
+ };
9
+ export type CascadingFilter = {
10
+ isCascading: true;
11
+ levels: FilterJaql[];
12
+ instanceid?: string;
13
+ disabled?: boolean;
5
14
  };
6
15
  export type DashboardDto = {
7
16
  oid: string;
8
17
  title: string;
9
18
  datasource: Datasource;
10
19
  widgets?: WidgetDto[];
11
- filters?: Filter[];
20
+ filters?: Array<Filter | CascadingFilter>;
12
21
  };
13
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { DataColorOptions } from '../chart-data/series-data-color-service';
2
- import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap } from '../types';
2
+ import type { NumberFormatConfig, SeriesChartType, SortDirection, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
3
  import { Column, MeasureColumn, CalculatedMeasureColumn } from '@sisense/sdk-data';
4
4
  /**
5
5
  * Styles for a category/column when visualized in a chart
@@ -13,6 +13,9 @@ export interface CategoryStyle {
13
13
  * Date format.
14
14
  *
15
15
  * See [ECMAScript Date Time String Format](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-time-string-format)
16
+ *
17
+ * Note that 'YYYY' and 'DD' have been disabled since they often get confused with 'yyyy' and 'dd'
18
+ * and can produce unexpected results.
16
19
  */
17
20
  dateFormat?: string;
18
21
  /** Boolean flag to toggle continuous timeline on this date column. */
@@ -100,6 +103,8 @@ export type ValueStyle = {
100
103
  enabled?: boolean;
101
104
  /** Boolean flag whether null values are treated as zeros in the chart */
102
105
  treatNullDataAsZeros?: boolean;
106
+ /** Boolean flag whether to connect a graph line across null points or render a gap */
107
+ connectNulls?: boolean;
103
108
  };
104
109
  /**
105
110
  * Wrapped {@link @sisense/sdk-data!MeasureColumn | Measure Column} with styles
@@ -198,8 +203,9 @@ export interface CategoricalChartDataOptions {
198
203
  category: (Column | StyledColumn)[];
199
204
  /**
200
205
  * Optional mapping of each of the series to colors.
206
+ * ({@link MultiColumnValueToColorMap} used only for {@link SunburstChart})
201
207
  */
202
- seriesToColorMap?: ValueToColorMap;
208
+ seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
203
209
  }
204
210
  /**
205
211
  * Configuration for how to query aggregate data and assign data
@@ -281,13 +287,13 @@ export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn |
281
287
  * Configuration for how to query data and assign data to {@link Table}.
282
288
  *
283
289
  */
284
- export type TableDataOptions = {
290
+ export interface TableDataOptions {
285
291
  /**
286
292
  * Columns (or attributes) whose values represent data columns in table
287
293
  *
288
294
  */
289
295
  columns: (Column | StyledColumn | MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn)[];
290
- };
296
+ }
291
297
  /**
292
298
  * Configuration for querying aggregate data and assigning data to chart encodings.
293
299
  *
@@ -323,7 +329,7 @@ export interface CartesianChartDataOptionsInternal {
323
329
  export interface CategoricalChartDataOptionsInternal {
324
330
  y: Value[];
325
331
  breakBy: Category[];
326
- seriesToColorMap?: ValueToColorMap;
332
+ seriesToColorMap?: ValueToColorMap | MultiColumnValueToColorMap;
327
333
  }
328
334
  /** @internal */
329
335
  export interface ScatterChartDataOptionsInternal {
@@ -99,6 +99,7 @@ export type AxisPlotBand = {
99
99
  };
100
100
  };
101
101
  export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
102
+ export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
102
103
  export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
103
104
  export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
104
105
  export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => AxisSettings[];
@@ -18,6 +18,7 @@ export interface AxisComputedProperties {
18
18
  maskedBreakByColor?: string;
19
19
  maskedSize?: string;
20
20
  color?: string;
21
+ selected?: boolean;
21
22
  }
22
23
  export declare const handleNumberValue: (cell: ComparableData) => number | null;
23
24
  export declare const buildScatterSeries: (data: ScatterDataTable, categoriesMap: ScatterAxisCategoriesMap, dataOptions?: ScatterChartDataOptionsInternal, themeSettings?: CompleteThemeSettings, seriesCapacity?: number) => SeriesWithAlerts<SeriesType[]>;
@@ -10,7 +10,7 @@ export declare function prepareSunburstDataItems(chartData: CategoricalChartData
10
10
  levelsCount: number;
11
11
  };
12
12
  } | {
13
- color: string;
13
+ color: any;
14
14
  name?: string | undefined;
15
15
  y?: number | null | undefined;
16
16
  x?: number | null | undefined;
@@ -22,6 +22,7 @@ export declare function prepareSunburstDataItems(chartData: CategoricalChartData
22
22
  lineWidth?: number | undefined;
23
23
  } | undefined;
24
24
  selected?: boolean | undefined;
25
+ sliced?: boolean | undefined;
25
26
  custom?: {
26
27
  [k: string]: unknown;
27
28
  number1?: number | undefined;
@@ -26,6 +26,7 @@ export type SeriesPointStructure = {
26
26
  lineWidth?: number;
27
27
  };
28
28
  selected?: boolean;
29
+ sliced?: boolean;
29
30
  custom?: {
30
31
  number1?: number;
31
32
  string1?: string;
@@ -61,7 +62,7 @@ export declare const addStackingIfSpecified: (chartType: ChartType, designOption
61
62
  * @param index -
62
63
  */
63
64
  export declare const indexMapWhenOnlyY: (categories: string[], index: number) => (0 | -1)[];
64
- export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number) => HighchartsSeriesValues;
65
+ export declare const formatSeriesContinuousXAxis: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, interval: number, maxCategories: number, dateFormatter: (time: number) => string) => HighchartsSeriesValues;
65
66
  export declare const formatSeries: (series: CategoricalSeriesValues, indexMap: number[], treatNullDataAsZeros: boolean, categories?: string[], categoryColors?: string[]) => HighchartsSeriesValues;
66
67
  export declare const adjustMinWhenColumnBar: (chartType: ChartType, autoMinMax: AxisMinMax) => {
67
68
  min: number;
@@ -71,5 +72,5 @@ export declare const autoCalculateYAxisMinMax: (chartType: ChartType, chartData:
71
72
  min: number;
72
73
  max: number;
73
74
  };
74
- export declare const determineYAxisOptions: (chartData: ChartData, dataOptions: ChartDataOptionsInternal) => [number[], (HighchartsType | undefined)[], boolean[]];
75
+ export declare const determineYAxisOptions: (chartData: ChartData, dataOptions: ChartDataOptionsInternal) => [number[], (HighchartsType | undefined)[], boolean[], boolean[]];
75
76
  export declare const getColorSetting: (dataOptions: CartesianChartDataOptionsInternal | CategoricalChartDataOptionsInternal, key: string) => string | undefined;
@@ -35,5 +35,5 @@ export declare class Indicator {
35
35
  * @param {object} options
36
36
  * @param {string} size
37
37
  */
38
- setTextOptions(options: LegacyIndicatorChartOptions, size: string): void;
38
+ setTextOptions(options: LegacyIndicatorChartOptions, size?: string): void;
39
39
  }
@@ -1,5 +1,5 @@
1
1
  import { IndicatorLegacyChartDataOptions } from '../indicator-legacy-chart-data-options';
2
- import { LegacyIndicatorChartOptions } from '../types';
2
+ import { LegacyIndicatorChartOptions, TickerOptions } from '../types';
3
3
  export declare class Ticker {
4
4
  /**
5
5
  * Renders indicator ticker widget.
@@ -9,7 +9,7 @@ export declare class Ticker {
9
9
  * @param {object} options
10
10
  * @param {HTMLElement} container
11
11
  */
12
- render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: LegacyIndicatorChartOptions | any, container: HTMLElement): void;
12
+ render(canvas: HTMLCanvasElement, data: IndicatorLegacyChartDataOptions, options: TickerOptions, container: HTMLElement): void;
13
13
  /**
14
14
  * Draws indicator ticker widget.
15
15
  *
@@ -1,4 +1,5 @@
1
- import { NumericSimpleOptions, NumericBarOptions, GaugeOptions } from '../types';
1
+ import { NumericSimpleOptions, NumericBarOptions, GaugeOptions, TickerOptions } from '../types';
2
2
  export declare const defaultNumericSimpleOptions: NumericSimpleOptions;
3
3
  export declare const defaultNumericBarOptions: NumericBarOptions;
4
4
  export declare const defaultGaugeOptions: GaugeOptions;
5
+ export declare const defaultTickerOptions: TickerOptions;
@@ -32,20 +32,21 @@ type CommonOptions = {
32
32
  fontFamily: string;
33
33
  title: {
34
34
  color: string;
35
- fontSizes: FontSizes;
35
+ fontSizes?: FontSizes;
36
36
  };
37
37
  value: {
38
38
  color?: string;
39
- fontSizes: FontSizes;
39
+ fontSizes?: FontSizes;
40
+ fontWeight?: number;
40
41
  };
41
42
  secondaryTitle: {
42
43
  color: string;
43
- fontSizes: FontSizes;
44
+ fontSizes?: FontSizes;
44
45
  };
45
46
  secondaryValue: {
46
- fontWeight: number;
47
+ fontWeight?: number;
47
48
  color: string;
48
- fontSizes: FontSizes;
49
+ fontSizes?: FontSizes;
49
50
  };
50
51
  textKeys: string[];
51
52
  backgroundColor: string;
@@ -114,5 +115,45 @@ export type GaugeOptions = CommonOptions & {
114
115
  gaugeHeights: BaseMeasure[];
115
116
  measureKeys: string[];
116
117
  };
117
- export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions;
118
+ export type TickerOptions = CommonOptions & {
119
+ fontSize: number;
120
+ dividerColor: string;
121
+ barHandleColor: string;
122
+ height: number;
123
+ horizontalMargin: number;
124
+ barWidth: number;
125
+ barHeight: number;
126
+ barOpacity: number;
127
+ tickerBarWidth: number;
128
+ tickerBarHeight: number;
129
+ horizontalPadding: number;
130
+ textPadding: number;
131
+ sectionMinWidth: number;
132
+ dividerWidth: number;
133
+ dividerHeight: number;
134
+ valueFont?: string;
135
+ titleFont?: string;
136
+ secondaryValueFont?: string;
137
+ secondaryTitleFont?: string;
138
+ offsetX?: number;
139
+ showTickerBar?: boolean;
140
+ fitValueMeasure?: {
141
+ string: string;
142
+ width: number;
143
+ };
144
+ fitSecValueMeasure?: {
145
+ string: string;
146
+ width: number;
147
+ };
148
+ fitSecTitleMeasure?: {
149
+ string: string;
150
+ width: number;
151
+ };
152
+ fitTitleMeasure?: {
153
+ string: string;
154
+ width: number;
155
+ };
156
+ width?: number;
157
+ };
158
+ export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions | TickerOptions;
118
159
  export {};
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { CompleteThemeSettings } from '../../types';
3
+ /**
4
+ * Component that displays a loading indicator.
5
+ *
6
+ * @param onCancel - Function to call when cancel is clicked.
7
+ * @returns A loading indicator with optional cancel.
8
+ */
9
+ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
10
+ themeSettings?: {
11
+ chart: {
12
+ textColor: string;
13
+ secondaryTextColor: string;
14
+ backgroundColor: string;
15
+ panelBackgroundColor: string;
16
+ };
17
+ palette: {
18
+ variantColors: import("../../types").Color[];
19
+ };
20
+ typography: {
21
+ fontFamily: string;
22
+ primaryTextColor: string;
23
+ secondaryTextColor: string;
24
+ };
25
+ general: {
26
+ brandColor: string;
27
+ backgroundColor: string;
28
+ primaryButtonTextColor: string;
29
+ primaryButtonHoverColor: string;
30
+ };
31
+ } | undefined;
32
+ onCancel?: (() => void) | undefined;
33
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type LoadingIconProps = {
3
+ spin?: boolean;
4
+ };
5
+ export default function LoadingIcon({ spin }: LoadingIconProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ import { DashboardDto } from '../api/types/dashboard-dto';
2
+ import { WidgetDto } from './types';
3
+ /**
4
+ * Extracts dashboard filters applicable to a widget.
5
+ *
6
+ * @param {DashboardDto} dashboard - The dashboard containing the filters.
7
+ * @param {WidgetDto} widget - The widget to extract filters from.
8
+ * @returns {Object} An object containing an array of filters and an array of highlights.
9
+ */
10
+ export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
11
+ filters: import("@sisense/sdk-data").Filter[];
12
+ highlights: import("@sisense/sdk-data").Filter[];
13
+ };
@@ -1,5 +1,6 @@
1
1
  import { DataColorOptions } from '../chart-data/series-data-color-service';
2
- import { CompleteThemeSettings, ValueToColorMap } from '../types';
3
- import { PanelColorFormat, PanelMembersFormat } from './types';
2
+ import { CompleteThemeSettings, ValueToColorMap, MultiColumnValueToColorMap } from '../types';
3
+ import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
4
4
  export declare const createValueColorOptions: (format?: PanelColorFormat, themeSettings?: CompleteThemeSettings) => DataColorOptions | undefined;
5
5
  export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
6
+ export declare const createValueToColorMultiColumnsMap: (items: PanelItem[]) => MultiColumnValueToColorMap;
@@ -1,6 +1,6 @@
1
- import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure } from '@sisense/sdk-data';
1
+ import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure, Jaql } from '@sisense/sdk-data';
2
2
  import { CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorDataOptions, StyledMeasureColumn, StyledColumn, CompleteThemeSettings } from '../types';
3
- import { Panel, PanelItem, Jaql, WidgetType } from './types';
3
+ import { Panel, PanelItem, WidgetType } from './types';
4
4
  import { TableDataOptions } from '../chart-data-options/types';
5
5
  export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
6
6
  export declare function createDataColumn(item: PanelItem, themeSettings?: CompleteThemeSettings): StyledMeasureColumn | StyledColumn;
@@ -1,5 +1,24 @@
1
- import { Filter } from '@sisense/sdk-data';
2
- import { FilterJaql, Panel } from './types';
1
+ import { Filter, FilterJaql } from '@sisense/sdk-data';
2
+ import { Panel } from './types';
3
+ /**
4
+ * Extracts filter model components from a FilterJaql object.
5
+ *
6
+ * @param {FilterJaql} jaql - The FilterJaql object.
7
+ * @returns {object} - An object containing the extracted filter model components, including filter, backgroundFilter, and turnOffMembersFilter.
8
+ */
9
+ export declare function extractFilterModelFromJaql(jaql: FilterJaql): {
10
+ filter: {
11
+ all: true;
12
+ } | {
13
+ members: string[];
14
+ } | {
15
+ exclude: {
16
+ members: string[];
17
+ };
18
+ };
19
+ backgroundFilter: import("@sisense/sdk-data").BackgroundFilter | import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
20
+ turnOffMembersFilter: import("@sisense/sdk-data").TurnOffMembersFilter | undefined;
21
+ };
3
22
  /**
4
23
  * Creates a Filter from a FilterJaql object.
5
24
  *
@@ -1,3 +1,4 @@
1
+ import { Jaql, SortDirection } from '@sisense/sdk-data';
1
2
  export declare const enum WidgetType {
2
3
  PieChart = "chart/pie",
3
4
  ColumnChart = "chart/column",
@@ -14,6 +15,10 @@ export declare const enum WidgetType {
14
15
  TableWithAggregation = "tablewidgetagg"
15
16
  }
16
17
  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';
18
+ export declare enum WidgetDashboardFilterMode {
19
+ FILTER = "filter",
20
+ SELECT = "select"
21
+ }
17
22
  export type Datasource = {
18
23
  title: string;
19
24
  id: string;
@@ -32,68 +37,25 @@ export interface WidgetDto {
32
37
  subtype: WidgetSubtype | string;
33
38
  datasource: Datasource;
34
39
  metadata: {
40
+ ignore?: FiltersIgnoringRules;
35
41
  panels: Panel[];
36
42
  };
37
43
  style: WidgetStyle;
38
44
  title: string;
39
45
  desc: string;
46
+ options?: {
47
+ dashboardFiltersMode: `${WidgetDashboardFilterMode}`;
48
+ };
40
49
  }
41
- export declare const enum DataType {
42
- TEXT = "text",
43
- NUMERIC = "numeric",
44
- DATETIME = "datetime"
45
- }
50
+ export type FiltersIgnoringRules = {
51
+ dimensions?: string[];
52
+ ids: string[];
53
+ all: boolean;
54
+ };
46
55
  export type Panel = {
47
56
  name: string;
48
57
  items: PanelItem[];
49
58
  };
50
- export declare enum SortDirection {
51
- ASC = "asc",
52
- DESC = "desc"
53
- }
54
- export type BaseJaql = {
55
- agg?: string;
56
- datatype: DataType;
57
- dim: string;
58
- table: string;
59
- column: string;
60
- title: string;
61
- level?: 'years' | 'quarters' | 'months' | 'weeks' | 'minutes' | 'days';
62
- sort?: SortDirection;
63
- };
64
- type FormulaID = string;
65
- type FormulaContext = BaseJaql | FilterJaql;
66
- export type FormulaJaql = {
67
- type?: 'measure';
68
- sort?: SortDirection;
69
- title: string;
70
- formula: string;
71
- context?: Record<FormulaID, FormulaContext>;
72
- };
73
- type IncludeAllFilter = {
74
- all: true;
75
- };
76
- export type IncludeMembersFilter = {
77
- members: string[];
78
- };
79
- type ExcludeMembersFilter = {
80
- exclude: {
81
- members: string[];
82
- };
83
- };
84
- export type MembersFilter = IncludeMembersFilter | ExcludeMembersFilter;
85
- type BaseFilter = IncludeAllFilter | MembersFilter;
86
- type BackgroundFilter = BaseFilter;
87
- type TurnOffMembersFilter = ExcludeMembersFilter & {
88
- turnedOff: boolean;
89
- };
90
- type Filter = BaseFilter & {
91
- filter?: BackgroundFilter | TurnOffMembersFilter;
92
- };
93
- export type FilterJaql = BaseJaql & {
94
- filter: Filter;
95
- };
96
- export type Jaql = BaseJaql | FormulaJaql | FilterJaql;
97
59
  type SeriesType = 'auto' | 'line' | 'spline' | 'areaspline' | 'bar' | 'area' | 'column';
98
60
  interface DecimalAbbreviations {
99
61
  k: boolean;
@@ -0,0 +1,48 @@
1
+ import { RestApi } from '../api/rest-api';
2
+ import { DashboardDto } from '../api/types/dashboard-dto';
3
+ import { WidgetDto } from './types';
4
+ /**
5
+ * Fetches a Widget DTO model and, optionally, a Dashboard DTO model.
6
+ *
7
+ * @internal
8
+ *
9
+ * @param {Object} options - The options for fetching the DTO models.
10
+ * @param {string} options.widgetOid - The OID of the widget to fetch.
11
+ * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
12
+ * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
13
+ * @param {RestApi} options.api - The RestApi instance to use for fetching.
14
+ * @returns {Promise<{widget: WidgetDto, dashboard?: DashboardDto}>} A promise that resolves to an object containing the Widget DTO and optionally the Dashboard DTO.
15
+ */
16
+ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDashboard, api, }: {
17
+ widgetOid: string;
18
+ dashboardOid: string;
19
+ includeDashboard?: boolean | undefined;
20
+ api: RestApi;
21
+ }) => Promise<{
22
+ widget: WidgetDto;
23
+ dashboard: DashboardDto | undefined;
24
+ }>;
25
+ /**
26
+ * Custom hook for fetching Widget DTO and Dashboard DTO models.
27
+ *
28
+ * @internal
29
+ *
30
+ * @param {Object} options - The options for fetching the DTO models.
31
+ * @param {string} options.widgetOid - The OID of the widget to fetch.
32
+ * @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
33
+ * @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
34
+ * @returns {{
35
+ * widget: WidgetDto,
36
+ * dashboard?: DashboardDto,
37
+ * error: Error
38
+ * }} An object containing the Widget DTO, optionally the Dashboard DTO, and an error if fetching fails.
39
+ */
40
+ export declare const useFetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDashboard, }: {
41
+ widgetOid: string;
42
+ dashboardOid: string;
43
+ includeDashboard?: boolean | undefined;
44
+ }) => {
45
+ error: Error | undefined;
46
+ widget?: WidgetDto | undefined;
47
+ dashboard?: DashboardDto | undefined;
48
+ };
@@ -1,7 +1,7 @@
1
- import { type Filter } from '@sisense/sdk-data';
1
+ import { type Filter, SortDirection as JaqlSortDirection } from '@sisense/sdk-data';
2
2
  import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options';
3
3
  import { ChartType, SortDirection } from '../types';
4
- import { FiltersMergeStrategy, Panel, PanelItem, SortDirection as JaqlSortDirection, WidgetSubtype, WidgetType } from './types';
4
+ import { FiltersMergeStrategy, Panel, PanelItem, WidgetSubtype, WidgetType } from './types';
5
5
  export declare function getChartType(widgetType: WidgetType): ChartType;
6
6
  export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
7
7
  type WidgetTypeOrString = string | WidgetType;
@@ -12,7 +12,7 @@ export declare function getRootPanelItem(item: PanelItem): PanelItem;
12
12
  export declare function getSortType(jaqlSort: JaqlSortDirection | undefined): SortDirection;
13
13
  /**
14
14
  * Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
15
- * and removes duplicates based on filter attribute expression (dim)
15
+ * and removes duplicates based on filter compare id
16
16
  *
17
17
  * @param {Filter[]} [sourceFilters=[]] - The source array of filter objects.
18
18
  * @param {Filter[]} [targetFilters=[]] - The target array of filter objects.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { Component, ReactNode } from 'react';
3
- import { SisenseContextPayload } from '../../sisense-context/sisense-context';
3
+ import { SisenseContextPayload } from '../../../sisense-context/sisense-context';
4
4
  type ErrorTrackerProps = {
5
5
  children: ReactNode;
6
6
  componentName: string;
@@ -0,0 +1 @@
1
+ export * from './with-tracking';
@@ -0,0 +1,2 @@
1
+ export type HookDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <HookArgs extends any[], HookResult>(hook: (...args: HookArgs) => HookResult) => (...args: HookArgs) => HookResult;
2
+ export declare const withTracking: HookDecorator<string>;
@@ -0,0 +1,8 @@
1
+ import { type FunctionComponent, type InputHTMLAttributes } from 'react';
2
+ type BasicInputProps = {
3
+ variant?: 'white' | 'grey';
4
+ label: string;
5
+ callback: (value: string) => void;
6
+ } & InputHTMLAttributes<HTMLInputElement>;
7
+ export declare const BasicInput: FunctionComponent<BasicInputProps>;
8
+ export {};
@@ -1,5 +1,8 @@
1
1
  export { LinkButton, PrimaryButton, SecondaryButton } from './buttons';
2
2
  export { Checkbox } from './checkbox';
3
+ export { BasicInput } from './basic-input';
3
4
  export { Input } from './input';
4
5
  export { Radio } from './radio';
5
6
  export { SisenseSwitchButton } from './switch';
7
+ export { TriangleIndicator } from './triangle-indicator';
8
+ export { DateRangeFieldButton } from './date-range-field-button';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TriangleIndicator: () => JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { FilterOptionType } from './criteria-filter-operations.js';
3
+ /**
4
+ * Props for {@link CriteriaFilterDisplay}
5
+ */
6
+ export interface CriteriaFilterDisplayProps {
7
+ filterType: FilterOptionType;
8
+ values?: (number | string)[];
9
+ }
10
+ /**
11
+ * UI component that provides a static, uneditable display of the criteria filter values, to be shown when vertically aligned filter tiles are collapsed.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * return (
16
+ * <CriteriaFilterDisplay
17
+ * filterType={FilterOption.BETWEEN}
18
+ * values={[0, 100]}
19
+ * />
20
+ * );
21
+ * ```
22
+ * @param props - Criteria filter menu props
23
+ * @returns Criteria filter menu component
24
+ */
25
+ export declare const CriteriaFilterDisplay: FunctionComponent<CriteriaFilterDisplayProps>;
@@ -0,0 +1,20 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { FilterOptionType, FilterVariant } from './criteria-filter-operations';
3
+ /**
4
+ * Props for {@link CriteriaFilterMenu}
5
+ *
6
+ * @internal
7
+ */
8
+ export interface CriteriaFilterMenuProps {
9
+ filterType: FilterOptionType;
10
+ arrangement?: FilterVariant;
11
+ defaultValues?: (number | string)[];
12
+ onUpdate?: (values: (number | string)[]) => void;
13
+ disabled?: boolean;
14
+ }
15
+ /**
16
+ * UI component that provides field(s) for the user to enter values for a numeric filter.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare const CriteriaFilterMenu: FunctionComponent<CriteriaFilterMenuProps>;