@sisense/sdk-ui 2.31.1 → 2.32.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 (149) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +9 -9
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +5 -5
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/apply-styled-options-to-query-CE3WQwRs.cjs +1 -0
  8. package/dist/{apply-styled-options-to-query-lFlufwrB.js → apply-styled-options-to-query-TW3CqofD.js} +209 -207
  9. package/dist/{flow-DHowZLKN.cjs → const-BLmTd3gM.cjs} +1 -1
  10. package/dist/{flow-Cs53Uv2Y.js → const-vJfedJf9.js} +15 -15
  11. package/dist/execute-query-CZOWu-Fh.cjs +1 -0
  12. package/dist/{execute-query-4_76L7Ax.js → execute-query-D-gXk-LI.js} +908 -906
  13. package/dist/index-Boixy7N4.cjs +1 -0
  14. package/dist/{index-C2A2EHoh.cjs → index-C6ytYe3A.cjs} +1 -1
  15. package/dist/{index-eIOG6LP6.js → index-Ct7mA7YB.js} +1 -1
  16. package/dist/{index-CyVSfJ-B.js → index-D3DsBxkp.js} +22 -22
  17. package/dist/{index-DCYw3JUB.js → index-DrI_xqvr.js} +14 -0
  18. package/dist/{index-DTvxJdqZ.cjs → index-UssOwVVX.cjs} +1 -1
  19. package/dist/index.cjs +340 -340
  20. package/dist/index.js +12477 -12340
  21. package/dist/index.umd.js +805 -690
  22. package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/utils.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +22 -6
  24. package/dist/packages/sdk-ui/src/domains/query-execution/types.d.ts +2 -0
  25. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/regular-chart/has-no-results.d.ts +12 -0
  26. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/sisense-chart/sisense-chart.d.ts +1 -1
  27. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/sisense-chart/types.d.ts +8 -0
  28. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-chart-on-ready.d.ts +38 -0
  29. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/use-chart-renderer-props.d.ts +1 -0
  30. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +8 -0
  31. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/helpers/on-ready-state.d.ts +17 -0
  32. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-chart-builder.d.ts +8 -1
  33. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/comparison.d.ts +22 -0
  34. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/data.d.ts +17 -0
  35. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/index.d.ts +4 -0
  36. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/load-data.d.ts +64 -0
  37. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data/value-colors.d.ts +27 -0
  38. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data-options/data-options.d.ts +30 -0
  39. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/data-options/index.d.ts +1 -0
  40. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/design-options/design-options.d.ts +31 -0
  41. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/design-options/index.d.ts +1 -0
  42. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/kpi-chart-builder.d.ts +9 -0
  43. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/helpers.d.ts +139 -0
  44. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/index.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-card-styles.d.ts +154 -0
  46. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-card.d.ts +41 -0
  47. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-chart-renderer.d.ts +46 -0
  48. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-comparison.d.ts +60 -0
  49. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-sparkline.d.ts +23 -0
  50. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-title.d.ts +28 -0
  51. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/kpi-value.d.ts +55 -0
  52. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/on-color.d.ts +70 -0
  53. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/sparkline-options.d.ts +51 -0
  54. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-auto-fit-font-size.d.ts +98 -0
  55. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-element-size.d.ts +26 -0
  56. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/renderer/use-size-tier.d.ts +19 -0
  57. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/kpi-chart/types.d.ts +62 -0
  58. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +47 -9
  59. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/types.d.ts +9 -0
  60. package/dist/packages/sdk-ui/src/domains/visualizations/components/kpi-chart.d.ts +23 -0
  61. package/dist/packages/sdk-ui/src/domains/visualizations/core/apply-on-ready-to-highcharts-options.d.ts +11 -0
  62. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/types.d.ts +2 -1
  63. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +108 -2
  64. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +1 -0
  65. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +41 -1
  66. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/types.d.ts +17 -3
  67. package/dist/packages/sdk-ui/src/domains/visualizations/core/highcharts-renderer.d.ts +7 -1
  68. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition-style-constants.d.ts +1 -1
  69. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +1 -2
  70. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -1
  71. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +1 -2
  72. package/dist/packages/sdk-ui/src/domains/widgets/components/filter-widget/filter-widget-dropdown.d.ts +16 -0
  73. package/dist/packages/sdk-ui/src/domains/widgets/components/filter-widget/types.d.ts +17 -23
  74. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +1 -2
  75. package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +18 -4
  76. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +447 -447
  77. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-panel-color-format.d.ts +8 -0
  78. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-filters.d.ts +56 -56
  79. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/categorical-labels-style.d.ts +3 -3
  80. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/series-label-affix-style.d.ts +1 -1
  81. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +11 -2
  82. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +28 -5
  83. package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-fire-on-ready.d.ts +14 -0
  84. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +11 -1
  85. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +9 -2
  86. package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +23 -2
  87. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +6 -3
  88. package/dist/packages/sdk-ui/src/infra/app/types.d.ts +14 -1
  89. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +14 -0
  90. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +14 -0
  91. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +14 -0
  92. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +14 -0
  93. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +14 -0
  94. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +14 -0
  95. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +14 -0
  96. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +14 -0
  97. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +14 -0
  98. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +14 -0
  99. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +14 -0
  100. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +14 -0
  101. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +14 -0
  102. package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +14 -0
  103. package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +28 -0
  104. package/dist/packages/sdk-ui/src/props.d.ts +77 -5
  105. package/dist/packages/sdk-ui/src/public-api/beta.d.ts +4 -0
  106. package/dist/packages/sdk-ui/src/types.d.ts +296 -5
  107. package/dist/query.cjs +1 -1
  108. package/dist/query.js +3 -3
  109. package/dist/quota-notification-CdcItYEO.cjs +665 -0
  110. package/dist/{quota-notification-mCXOSF0U.js → quota-notification-DJPs09UQ.js} +17392 -15866
  111. package/dist/translations/de-de.cjs +1 -1
  112. package/dist/translations/de-de.js +15 -1
  113. package/dist/translations/en-us.cjs +1 -1
  114. package/dist/translations/en-us.js +1 -1
  115. package/dist/translations/es-ar.cjs +1 -1
  116. package/dist/translations/es-ar.js +15 -1
  117. package/dist/translations/es-es.cjs +1 -1
  118. package/dist/translations/es-es.js +15 -1
  119. package/dist/translations/fr-fr.cjs +1 -1
  120. package/dist/translations/fr-fr.js +17 -3
  121. package/dist/translations/it-it.cjs +1 -1
  122. package/dist/translations/it-it.js +15 -1
  123. package/dist/translations/ja-jp.cjs +1 -1
  124. package/dist/translations/ja-jp.js +15 -1
  125. package/dist/translations/ko-kr.cjs +1 -1
  126. package/dist/translations/ko-kr.js +15 -1
  127. package/dist/translations/nl-nl.cjs +1 -1
  128. package/dist/translations/nl-nl.js +15 -1
  129. package/dist/translations/pt-br.cjs +1 -1
  130. package/dist/translations/pt-br.js +15 -1
  131. package/dist/translations/ru-ru.cjs +1 -1
  132. package/dist/translations/ru-ru.js +15 -1
  133. package/dist/translations/tr-tr.cjs +1 -1
  134. package/dist/translations/tr-tr.js +15 -1
  135. package/dist/translations/zh-cn.cjs +1 -1
  136. package/dist/translations/zh-cn.js +15 -1
  137. package/dist/{types-CzQiy3kx.js → types-B60QjE1r.js} +1 -1
  138. package/dist/{types-pkCiWY_S.cjs → types-BAIldf5u.cjs} +1 -1
  139. package/dist/{use-execute-csv-query-DnTVUxCj.cjs → use-execute-csv-query-DAJqBzR5.cjs} +2 -2
  140. package/dist/{use-execute-csv-query-LtQrd2A4.js → use-execute-csv-query-tLJmsnwg.js} +6 -6
  141. package/dist/{utils-Bqaxp0gq.cjs → utils-BIAAcoFt.cjs} +12 -12
  142. package/dist/{utils-DHLPgrHF.js → utils-D2c9kOce.js} +1544 -1541
  143. package/dist/{widget-composer-CSkR-kBh.js → widget-composer-VWvON_Hi.js} +4 -4
  144. package/dist/{widget-composer-BUq7QhlK.cjs → widget-composer-srdW7lV4.cjs} +1 -1
  145. package/package.json +8 -8
  146. package/dist/apply-styled-options-to-query-siyJXPed.cjs +0 -1
  147. package/dist/execute-query-9rwu12er.cjs +0 -1
  148. package/dist/index-BGVJyEgp.cjs +0 -1
  149. package/dist/quota-notification-C49kSTz5.cjs +0 -550
@@ -4,14 +4,14 @@ import { Hierarchy } from './domains/drilldown/hierarchy-model';
4
4
  import { ExecuteQueryParams, QueryByWidgetIdState } from './domains/query-execution';
5
5
  import { ExecuteQueryResult } from './domains/query-execution/types';
6
6
  import { type CustomDataCellFormatter, type CustomHeaderCellFormatter } from './domains/visualizations/components/pivot-table/formatters/types';
7
- import { AreamapChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, CalendarHeatmapChartDataOptions, IndicatorChartDataOptions, PivotTableDataOptions, RangeChartDataOptions, RegularChartDataOptions, SankeyChartDataOptions, ScatterChartDataOptions, ScattermapChartDataOptions, TableDataOptions, TabularChartDataOptions } from './domains/visualizations/core/chart-data-options/types';
7
+ import { AreamapChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, CalendarHeatmapChartDataOptions, IndicatorChartDataOptions, KpiChartDataOptions, PivotTableDataOptions, RangeChartDataOptions, RegularChartDataOptions, SankeyChartDataOptions, ScatterChartDataOptions, ScattermapChartDataOptions, TableDataOptions, TabularChartDataOptions } from './domains/visualizations/core/chart-data-options/types';
8
8
  import { HighchartsOptions } from './domains/visualizations/core/chart-options-processor/chart-options-service';
9
9
  import type { ChartWidgetProps } from './domains/widgets/components/chart-widget/types';
10
10
  import { FiltersMergeStrategy } from './domains/widgets/components/widget-by-id/types';
11
11
  import { type AppConfig } from './infra/app/types';
12
12
  import type { Module } from './infra/modules';
13
13
  import type { Plugin } from './infra/plugins/types';
14
- import { AreamapDataPoint, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, BoxplotDataPoint, BoxplotStyleOptions, CalendarHeatmapDataPoint, CalendarHeatmapStyleOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ChartDataPoints, ChartStyleOptions, ChartType, CustomDrilldownResult, DataPoint, DrilldownOptions, DrilldownSelection, FunnelStyleOptions, IndicatorDataPoint, IndicatorRenderOptions, IndicatorStyleOptions, LineStyleOptions, MenuAlignment, MenuItemSection, MenuPosition, PieStyleOptions, PivotTableDataPoint, PivotTableDrilldownOptions, PivotTableStyleOptions, PolarStyleOptions, RegularChartStyleOptions, RegularChartType, SankeyStyleOptions, ScatterDataPoint, ScattermapDataPoint, ScattermapStyleOptions, ScatterStyleOptions, StackableStyleOptions, StreamgraphStyleOptions, SunburstStyleOptions, TableStyleOptions, TabularChartStyleOptions, TextWidgetDataPoint, ThemeConfig, ThemeOid, ThemeSettings, TreemapStyleOptions, WidgetByIdStyleOptions } from './types';
14
+ import { AreamapDataPoint, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, BoxplotDataPoint, BoxplotStyleOptions, CalendarHeatmapDataPoint, CalendarHeatmapStyleOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ChartDataPoints, ChartStyleOptions, ChartType, CustomDrilldownResult, DataPoint, DrilldownOptions, DrilldownSelection, FunnelStyleOptions, IndicatorDataPoint, IndicatorRenderOptions, IndicatorStyleOptions, KpiBeforeRenderHandler, KpiDataPointEventHandler, KpiStyleOptions, LineStyleOptions, MenuAlignment, MenuItemSection, MenuPosition, PieStyleOptions, PivotTableDataPoint, PivotTableDrilldownOptions, PivotTableStyleOptions, PolarStyleOptions, RegularChartStyleOptions, RegularChartType, SankeyStyleOptions, ScatterDataPoint, ScattermapDataPoint, ScattermapStyleOptions, ScatterStyleOptions, StackableStyleOptions, StreamgraphStyleOptions, SunburstStyleOptions, TableStyleOptions, TabularChartStyleOptions, TextWidgetDataPoint, ThemeConfig, ThemeOid, ThemeSettings, TreemapStyleOptions, WidgetByIdStyleOptions } from './types';
15
15
  export type { TabberButtonsWidgetProps } from './domains/widgets/components/tabber-buttons-widget/types';
16
16
  export type { WidgetProps, WidgetType, WithCommonWidgetProps, } from './domains/widgets/components/widget/types';
17
17
  export type { MenuItemSection, HighchartsOptions };
@@ -414,6 +414,20 @@ interface BaseChartEventProps {
414
414
  * @category Callbacks
415
415
  */
416
416
  onDataReady?: (data: Data) => Data;
417
+ /**
418
+ * Calls the provided callback each time a supported chart finishes painting
419
+ * with fetched data — on initial load and again whenever it re-enters a ready
420
+ * state after a reload (e.g. filter change, refetch). Use this to signal
421
+ * to a host application that the chart content is committed to the DOM.
422
+ *
423
+ * Currently wired for **Sankey** only (Fusion `domready` / PDF export).
424
+ * Empty / no-results Sankey states also fire once the terminal overlay is shown.
425
+ * Other chart types ignore this prop (Fusion widgets use native `domready`).
426
+ *
427
+ * @category Callbacks
428
+ * @internal
429
+ */
430
+ onReady?: () => void;
417
431
  }
418
432
  /**
419
433
  * Event props for regular (non-specific) charts which uses DataPoint type
@@ -669,13 +683,13 @@ export interface ChartEventProps extends BaseChartEventProps {
669
683
  *
670
684
  * @category Callbacks
671
685
  */
672
- onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler | ScattermapDataPointEventHandler | IndicatorDataPointEventHandler | CalendarHeatmapDataPointEventHandler;
686
+ onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler | AreamapDataPointEventHandler | BoxplotDataPointEventHandler | ScattermapDataPointEventHandler | IndicatorDataPointEventHandler | CalendarHeatmapDataPointEventHandler | KpiDataPointEventHandler;
673
687
  /**
674
688
  * Context menu handler callback for a data point
675
689
  *
676
690
  * @category Callbacks
677
691
  */
678
- onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler | BoxplotDataPointEventHandler | CalendarHeatmapDataPointEventHandler;
692
+ onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler | BoxplotDataPointEventHandler | CalendarHeatmapDataPointEventHandler | KpiDataPointEventHandler;
679
693
  /**
680
694
  * Handler callback for selection of multiple data points
681
695
  *
@@ -689,7 +703,7 @@ export interface ChartEventProps extends BaseChartEventProps {
689
703
  *
690
704
  * @category Callbacks
691
705
  */
692
- onBeforeRender?: HighchartsBasedChartEventProps['onBeforeRender'] | IndicatorChartEventProps['onBeforeRender'];
706
+ onBeforeRender?: HighchartsBasedChartEventProps['onBeforeRender'] | IndicatorChartEventProps['onBeforeRender'] | KpiChartEventProps['onBeforeRender'];
693
707
  }
694
708
  /**
695
709
  * Props shared across {@link Chart} components.
@@ -1485,3 +1499,61 @@ export interface CalendarHeatmapChartProps extends BaseChartProps, CalendarHeatm
1485
1499
  */
1486
1500
  styleOptions?: CalendarHeatmapStyleOptions;
1487
1501
  }
1502
+ /**
1503
+ * Event props for the {@link KpiChart} component.
1504
+ *
1505
+ * @beta
1506
+ */
1507
+ export interface KpiChartEventProps extends BaseChartEventProps {
1508
+ /**
1509
+ * Click handler callback for the KPI card.
1510
+ *
1511
+ * @category Callbacks
1512
+ */
1513
+ onDataPointClick?: KpiDataPointEventHandler;
1514
+ /**
1515
+ * Context menu handler callback for the KPI card.
1516
+ *
1517
+ * @category Callbacks
1518
+ */
1519
+ onDataPointContextMenu?: KpiDataPointEventHandler;
1520
+ /**
1521
+ * A callback that allows you to customize the computed KPI render options
1522
+ * before the card is rendered. The returned options are used for painting.
1523
+ *
1524
+ * @category Callbacks
1525
+ */
1526
+ onBeforeRender?: KpiBeforeRenderHandler;
1527
+ }
1528
+ /**
1529
+ * Props of the {@link KpiChart} component.
1530
+ *
1531
+ * @beta
1532
+ *
1533
+ * @example
1534
+ * ```tsx
1535
+ * <KpiChart
1536
+ * dataSet={DM.DataSource}
1537
+ * dataOptions={{
1538
+ * value: measureFactory.sum(DM.Commerce.Revenue),
1539
+ * trend: DM.Commerce.Date.Months,
1540
+ * comparison: { type: 'previous-period' },
1541
+ * }}
1542
+ * styleOptions={{ title: { text: 'Total Revenue' } }}
1543
+ * />
1544
+ * ```
1545
+ */
1546
+ export interface KpiChartProps extends BaseChartProps, KpiChartEventProps {
1547
+ /**
1548
+ * Configurations for how to interpret and present the data passed to the chart
1549
+ *
1550
+ * @category Chart
1551
+ */
1552
+ dataOptions: KpiChartDataOptions;
1553
+ /**
1554
+ * Configurations for how to style and present a chart's data.
1555
+ *
1556
+ * @category Chart
1557
+ */
1558
+ styleOptions?: KpiStyleOptions;
1559
+ }
@@ -13,4 +13,8 @@ export { SankeyChart } from '../domains/visualizations/components/sankey-chart';
13
13
  export type { SankeyChartProps } from '../props';
14
14
  export type { SankeyChartDataOptions } from '../domains/visualizations/core/chart-data-options/types';
15
15
  export type { SankeyStyleOptions, SankeyChartType } from '../types';
16
+ export { KpiChart } from '../domains/visualizations/components/kpi-chart';
17
+ export type { KpiChartProps, KpiChartEventProps } from '../props';
18
+ export type { KpiChartDataOptions, KpiComparison, KpiValueMode, } from '../domains/visualizations/core/chart-data-options/types';
19
+ export type { KpiStyleOptions, KpiValueStyleOptions, KpiTitleStyleOptions, KpiComparisonStyleOptions, KpiSparklineStyleOptions, KpiSparklineType, KpiCardStyleOptions, KpiTextSize, KpiIconCondition, KpiComparisonInfo, KpiRenderOptions, KpiBeforeRenderHandler, KpiDataPoint, KpiDataPointEventHandler, KpiChartType, } from '../types';
16
20
  export type { FilterWidgetProps, FilterWidgetFilterType, } from '../domains/widgets/components/filter-widget/index.js';
@@ -6,13 +6,14 @@ import { Coordinates } from './domains/visualizations/components/chart/component
6
6
  import { Hierarchy, HierarchyId, StyledColumn, StyledMeasureColumn } from '.';
7
7
  import { GeoDataElement } from './domains/visualizations/components/chart/restructured-charts/areamap-chart/types';
8
8
  import { CalendarDayOfWeek } from './domains/visualizations/components/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils';
9
+ import type { DataColorCondition, DataColorOptions } from './domains/visualizations/core/chart-data/data-coloring/types';
9
10
  import { HighchartsOptionsInternal } from './domains/visualizations/core/chart-options-processor/chart-options-service';
10
11
  import { AreaRangeSubtype, AreaSubtype, BoxplotSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype } from './domains/visualizations/core/chart-options-processor/subtype-to-design-options';
11
12
  import { IndicatorComponents, TableColorOptions } from './domains/visualizations/core/chart-options-processor/translations/design-options';
12
13
  import { FunnelDirection, FunnelSize, FunnelType } from './domains/visualizations/core/chart-options-processor/translations/funnel-plot-options';
13
14
  import { LegendPosition } from './domains/visualizations/core/chart-options-processor/translations/legend-section';
14
15
  import { ScatterMarkerSize } from './domains/visualizations/core/chart-options-processor/translations/scatter-plot-options';
15
- import { AreamapChartType, BoxplotChartType, CalendarHeatmapChartType, CartesianChartType, CategoricalChartType, IndicatorChartType, RangeChartType, SankeyChartType, ScatterChartType, ScattermapChartType, TableChartType, TextStyle } from './domains/visualizations/core/chart-options-processor/translations/types';
16
+ import { AreamapChartType, BoxplotChartType, CalendarHeatmapChartType, CartesianChartType, CategoricalChartType, IndicatorChartType, KpiChartType, RangeChartType, SankeyChartType, ScatterChartType, ScattermapChartType, TableChartType, TextStyle } from './domains/visualizations/core/chart-options-processor/translations/types';
16
17
  import { DataPointsEventHandler } from './props';
17
18
  import { GradientColor } from './shared/utils/gradient';
18
19
  import { SoftUnion } from './shared/utils/utility-types';
@@ -20,9 +21,9 @@ export type { SortDirection, PivotRowsSort } from '@sisense/sdk-data';
20
21
  export type { AppConfig } from './infra/app/types';
21
22
  export type { DateConfig } from './domains/query-execution/core/date-formats';
22
23
  export type { CalendarDayOfWeek } from './domains/visualizations/components/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils';
23
- export type { CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, CalendarHeatmapChartDataOptions, SankeyChartDataOptions, StyledColumn, StyledMeasureColumn, } from './domains/visualizations/core/chart-data-options/types';
24
+ export type { CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, CalendarHeatmapChartDataOptions, SankeyChartDataOptions, KpiChartDataOptions, KpiComparison, KpiValueMode, StyledColumn, StyledMeasureColumn, } from './domains/visualizations/core/chart-data-options/types';
24
25
  export type { DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, } from './domains/visualizations/core/chart-data/data-coloring/types';
25
- export type { CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, CalendarHeatmapChartType, TableType, TableChartType, RangeChartType, SankeyChartType, TextStyle, } from './domains/visualizations/core/chart-options-processor/translations/types';
26
+ export type { CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, CalendarHeatmapChartType, KpiChartType, TableType, TableChartType, RangeChartType, SankeyChartType, TextStyle, } from './domains/visualizations/core/chart-options-processor/translations/types';
26
27
  export type { IndicatorComponents } from './domains/visualizations/core/chart-options-processor/translations/design-options';
27
28
  export type { ScatterMarkerSize } from './domains/visualizations/core/chart-options-processor/translations/scatter-plot-options';
28
29
  export type { LegendPosition } from './domains/visualizations/core/chart-options-processor/translations/legend-section';
@@ -1423,18 +1424,308 @@ export interface SankeyStyleOptions extends BaseStyleOptions {
1423
1424
  * @default 10
1424
1425
  */
1425
1426
  nodePadding?: number;
1427
+ /**
1428
+ * Minimum link width in pixels.
1429
+ * @default 1
1430
+ */
1431
+ minLinkWidth?: number;
1426
1432
  /**
1427
1433
  * Determines which side of the chart the nodes are aligned to.
1428
1434
  * In vertical mode `'top'` aligns to the left and `'bottom'` to the right.
1429
1435
  */
1430
1436
  nodeAlignment?: 'top' | 'center' | 'bottom';
1431
1437
  }
1438
+ /**
1439
+ * Chart type of the sparkline embedded in a KPI chart.
1440
+ *
1441
+ * @beta
1442
+ */
1443
+ export type KpiSparklineType = 'line' | 'spline' | 'area' | 'column';
1444
+ /**
1445
+ * Configuration that defines styling of the KPI chart sparkline.
1446
+ * The sparkline is rendered only when {@link KpiChartDataOptions.trend} is set.
1447
+ *
1448
+ * @beta
1449
+ */
1450
+ export type KpiSparklineStyleOptions = {
1451
+ /**
1452
+ * Boolean flag that defines whether the sparkline is shown.
1453
+ *
1454
+ * @defaultValue true when `KpiChartDataOptions.trend` is set
1455
+ */
1456
+ enabled?: boolean;
1457
+ /**
1458
+ * Chart type of the sparkline.
1459
+ *
1460
+ * @defaultValue 'area'
1461
+ */
1462
+ chartType?: KpiSparklineType;
1463
+ };
1464
+ /**
1465
+ * Computed comparison shown on a KPI card. Mirrors the {@link KpiComparison} input,
1466
+ * with all math resolved.
1467
+ *
1468
+ * @beta
1469
+ */
1470
+ export type KpiComparisonInfo = {
1471
+ type: 'previous-period';
1472
+ baseline: number;
1473
+ deltaValue: number;
1474
+ deltaPercent?: number;
1475
+ label: string;
1476
+ } | {
1477
+ type: 'delta';
1478
+ baseline: number;
1479
+ deltaValue: number;
1480
+ deltaPercent?: number;
1481
+ label: string;
1482
+ } | {
1483
+ type: 'target';
1484
+ target: number;
1485
+ percentOfTarget?: number;
1486
+ toGo: number;
1487
+ label: string;
1488
+ } | {
1489
+ type: 'value';
1490
+ value: number;
1491
+ label: string;
1492
+ };
1493
+ /**
1494
+ * Data point in a KPI chart — the card represents a single aggregated point.
1495
+ *
1496
+ * @beta
1497
+ */
1498
+ export type KpiDataPoint = {
1499
+ /** Headline value. */
1500
+ value?: number;
1501
+ /** Last trend bucket as epoch milliseconds, when a trend dimension is set. */
1502
+ date?: number;
1503
+ /** Resolved comparison shown on the card, when a comparison is active. */
1504
+ comparison?: KpiComparisonInfo;
1505
+ };
1506
+ /**
1507
+ * A handler function that allows to customize what happens when a KPI chart is clicked.
1508
+ *
1509
+ * @beta
1510
+ */
1511
+ export type KpiDataPointEventHandler = (
1512
+ /** Data point that was clicked */
1513
+ point: KpiDataPoint,
1514
+ /** Native MouseEvent */
1515
+ nativeEvent: MouseEvent) => void;
1516
+ /**
1517
+ * Render options of a KPI chart, as computed from the query result.
1518
+ * Passed to {@link KpiBeforeRenderHandler} for customization before painting.
1519
+ *
1520
+ * @beta
1521
+ */
1522
+ export type KpiRenderOptions = {
1523
+ value?: number;
1524
+ valueTitle: string;
1525
+ valueColor?: string;
1526
+ valuePeriodMs?: number;
1527
+ comparison?: KpiComparisonInfo;
1528
+ sparklinePoints?: {
1529
+ x: number;
1530
+ y: number | null;
1531
+ }[];
1532
+ };
1533
+ /**
1534
+ * A handler function that allows to customize the computed KPI render options
1535
+ * before the card is rendered. The returned options are then used when painting the card.
1536
+ *
1537
+ * @beta
1538
+ */
1539
+ export type KpiBeforeRenderHandler = (
1540
+ /** KPI render options */
1541
+ renderOptions: KpiRenderOptions) => KpiRenderOptions;
1542
+ /**
1543
+ * Icon shown next to the KPI headline value when its condition matches.
1544
+ * Conditions are evaluated in order; the first match wins.
1545
+ *
1546
+ * @beta
1547
+ */
1548
+ export type KpiIconCondition = {
1549
+ /** Unicode symbol or short text rendered when the condition matches, for example '⚠' or '✓'. */
1550
+ icon: string;
1551
+ /** Icon color. Defaults to the headline value color. */
1552
+ color?: string;
1553
+ /** Value to compare against, expressed as a string. */
1554
+ expression: string;
1555
+ /** Comparison operator, same convention as {@link DataColorCondition}. */
1556
+ operator: DataColorCondition['operator'];
1557
+ };
1558
+ /**
1559
+ * Text size of the KPI headline value: `'auto'` scales the number to fit the card, or a fixed
1560
+ * font size in pixels (must be a positive number).
1561
+ *
1562
+ * @beta
1563
+ */
1564
+ export type KpiTextSize = 'auto' | number;
1565
+ /**
1566
+ * Configuration that defines styling of the KPI headline value.
1567
+ *
1568
+ * To color the headline value, set a color (uniform or conditional) on the value measure in
1569
+ * {@link KpiChartDataOptions.value} -- the standard measure-coloring mechanism used across the
1570
+ * SDK.
1571
+ *
1572
+ * @beta
1573
+ */
1574
+ export type KpiValueStyleOptions = {
1575
+ /**
1576
+ * Text size of the headline value: `'auto'` to scale it to the card, or a fixed size in px.
1577
+ *
1578
+ * @defaultValue 'auto'
1579
+ */
1580
+ textSize?: KpiTextSize;
1581
+ /**
1582
+ * Text shown in place of the headline when the value is null,
1583
+ * keeping the card title and styling. When omitted, the standard
1584
+ * no-results overlay is shown instead.
1585
+ */
1586
+ noDataText?: string;
1587
+ /**
1588
+ * Condition-driven icons shown next to the headline value;
1589
+ * the first matching condition wins.
1590
+ */
1591
+ conditionalIcons?: KpiIconCondition[];
1592
+ };
1593
+ /**
1594
+ * Configuration that defines styling of the KPI card title.
1595
+ *
1596
+ * @beta
1597
+ */
1598
+ export type KpiTitleStyleOptions = {
1599
+ /**
1600
+ * Boolean flag that defines whether the title is shown.
1601
+ *
1602
+ * @defaultValue true
1603
+ */
1604
+ enabled?: boolean;
1605
+ /** Title text. Defaults to the value measure title. */
1606
+ text?: string;
1607
+ };
1608
+ /**
1609
+ * Configuration that defines styling of the KPI comparison readout.
1610
+ *
1611
+ * @beta
1612
+ */
1613
+ export type KpiComparisonStyleOptions = {
1614
+ /**
1615
+ * Which numeric form(s) of the comparison to render.
1616
+ *
1617
+ * For delta-shaped comparisons ('delta' / 'previous-period'): percent change, absolute
1618
+ * difference, or both in one line.
1619
+ *
1620
+ * For 'target' comparisons: 'percent' shows only the percent-of-goal line
1621
+ * (`percentOfTarget`), 'value' shows only the amount-to-go line (`toGo`), and 'both' shows
1622
+ * the percent line with the amount-to-go beneath it.
1623
+ *
1624
+ * @defaultValue 'percent'
1625
+ */
1626
+ display?: 'percent' | 'value' | 'both';
1627
+ /** Caption next to the delta, e.g. 'vs last year'. Defaults to an i18n label inferred from context. */
1628
+ label?: string;
1629
+ /**
1630
+ * Color of the delta readout. Conditions evaluate against `deltaPercent`
1631
+ * ('delta' / 'previous-period' comparisons) or `percentOfTarget` ('target').
1632
+ * Not applicable to the 'value' comparison (colored by its own measure).
1633
+ *
1634
+ * @defaultValue sign-based: positive delta green, negative red
1635
+ *
1636
+ * @example “down is good” metric (churn, cost):
1637
+ * ```ts
1638
+ * color: {
1639
+ * type: 'conditional',
1640
+ * conditions: [
1641
+ * { color: '#2ecc71', expression: '0', operator: '<' },
1642
+ * { color: '#e74c3c', expression: '0', operator: '>' },
1643
+ * ],
1644
+ * }
1645
+ * ```
1646
+ */
1647
+ color?: DataColorOptions;
1648
+ /**
1649
+ * Whether the up/down arrow is shown next to the delta.
1650
+ *
1651
+ * @defaultValue true
1652
+ */
1653
+ showIcon?: boolean;
1654
+ /** Condition-driven icons next to the comparison readout; first match wins. */
1655
+ conditionalIcons?: KpiIconCondition[];
1656
+ };
1657
+ /**
1658
+ * Configuration that defines styling of the KPI card container.
1659
+ *
1660
+ * @beta
1661
+ */
1662
+ export type KpiCardStyleOptions = {
1663
+ /** Card background color. Text and sparkline switch to white for contrast on dark backgrounds. */
1664
+ backgroundColor?: string;
1665
+ /**
1666
+ * Horizontal alignment of the card text.
1667
+ *
1668
+ * @defaultValue 'left'
1669
+ */
1670
+ textAlign?: 'left' | 'center' | 'right';
1671
+ /**
1672
+ * Boolean flag that defines whether the card border is shown.
1673
+ *
1674
+ * @defaultValue false
1675
+ */
1676
+ showBorder?: boolean;
1677
+ /**
1678
+ * Corner radius of the card in pixels.
1679
+ *
1680
+ * @defaultValue 8
1681
+ */
1682
+ cornerRadius?: number;
1683
+ };
1684
+ /**
1685
+ * Configuration options that define functional style of the various elements of a KPI chart.
1686
+ *
1687
+ * @beta
1688
+ *
1689
+ * @example
1690
+ * ```tsx
1691
+ * <KpiChart
1692
+ * dataSet={DM.DataSource}
1693
+ * dataOptions={{
1694
+ * value: measureFactory.sum(DM.Commerce.Revenue),
1695
+ * trend: DM.Commerce.Date.Months,
1696
+ * }}
1697
+ * styleOptions={{
1698
+ * title: { text: 'Monthly Revenue' },
1699
+ * sparkline: { chartType: 'line' },
1700
+ * card: { textAlign: 'center', cornerRadius: 12 },
1701
+ * }}
1702
+ * />
1703
+ * ```
1704
+ */
1705
+ export interface KpiStyleOptions extends Pick<BaseStyleOptions, 'width' | 'height'> {
1706
+ /**
1707
+ * Card layout mode.
1708
+ *
1709
+ * @defaultValue 'standard'
1710
+ */
1711
+ layout?: 'standard' | 'big-comparison';
1712
+ /** Headline value styling. */
1713
+ value?: KpiValueStyleOptions;
1714
+ /** Card title styling (defaults to the value measure title). */
1715
+ title?: KpiTitleStyleOptions;
1716
+ /** Comparison readout styling (polarity, icon, colors). */
1717
+ comparison?: KpiComparisonStyleOptions;
1718
+ /** Sparkline styling; rendered only when {@link KpiChartDataOptions.trend} is set. */
1719
+ sparkline?: KpiSparklineStyleOptions;
1720
+ /** Card container styling. */
1721
+ card?: KpiCardStyleOptions;
1722
+ }
1432
1723
  /**
1433
1724
  * Configuration options that define functional style of the various elements of chart.
1434
1725
  */
1435
1726
  export type ChartStyleOptions = RegularChartStyleOptions | TabularChartStyleOptions;
1436
1727
  /** Style options for regular chart types */
1437
- export type RegularChartStyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions | BoxplotStyleOptions | AreamapStyleOptions | ScattermapStyleOptions | AreaRangeStyleOptions | CalendarHeatmapStyleOptions | StreamgraphStyleOptions | SankeyStyleOptions;
1728
+ export type RegularChartStyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions | BoxplotStyleOptions | AreamapStyleOptions | ScattermapStyleOptions | AreaRangeStyleOptions | CalendarHeatmapStyleOptions | KpiStyleOptions | StreamgraphStyleOptions | SankeyStyleOptions;
1438
1729
  /** Mapping of each of the chart value series to colors. */
1439
1730
  export type ValueToColorMap = {
1440
1731
  [value: string]: string;
@@ -1446,7 +1737,7 @@ export type MultiColumnValueToColorMap = {
1446
1737
  /**
1447
1738
  * Chart type of one of the supported chart families
1448
1739
  */
1449
- export type ChartType = CartesianChartType | CategoricalChartType | ScatterChartType | IndicatorChartType | AreamapChartType | BoxplotChartType | ScattermapChartType | CalendarHeatmapChartType | RangeChartType | SankeyChartType | TableChartType;
1740
+ export type ChartType = CartesianChartType | CategoricalChartType | ScatterChartType | IndicatorChartType | AreamapChartType | BoxplotChartType | ScattermapChartType | CalendarHeatmapChartType | KpiChartType | RangeChartType | SankeyChartType | TableChartType;
1450
1741
  /** Chart type of the regular charts */
1451
1742
  export type RegularChartType = Exclude<ChartType, TableChartType>;
1452
1743
  /**
package/dist/query.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGVJyEgp.cjs"),u=require("./use-execute-csv-query-DnTVUxCj.cjs"),t=require("./execute-query-9rwu12er.cjs");exports.ExecuteQuery=e.ExecuteQuery;exports.QUERY_MODULE_NAME=e.QUERY_MODULE_NAME;exports.QueryModule=e.QueryModule;exports.queryStateReducer=e.queryStateReducer;exports.useExecuteQuery=e.useExecuteQuery;exports.useQueryCache=e.useQueryCache;exports.useExecuteCsvQuery=u.useExecuteCsvQuery;exports.useExecuteCsvQueryInternal=u.useExecuteCsvQueryInternal;exports.useExecutePivotQuery=u.useExecutePivotQuery;exports.useExecutePivotQueryInternal=u.useExecutePivotQueryInternal;exports.executeCsvQuery=t.executeCsvQuery;exports.executePivotQuery=t.executePivotQuery;exports.executeQuery=t.executeQuery;exports.executeQueryWithRowCount=t.executeQueryWithRowCount;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Boixy7N4.cjs"),u=require("./use-execute-csv-query-DAJqBzR5.cjs"),t=require("./execute-query-CZOWu-Fh.cjs");exports.ExecuteQuery=e.ExecuteQuery;exports.QUERY_MODULE_NAME=e.QUERY_MODULE_NAME;exports.QueryModule=e.QueryModule;exports.queryStateReducer=e.queryStateReducer;exports.useExecuteQuery=e.useExecuteQuery;exports.useQueryCache=e.useQueryCache;exports.useExecuteCsvQuery=u.useExecuteCsvQuery;exports.useExecuteCsvQueryInternal=u.useExecuteCsvQueryInternal;exports.useExecutePivotQuery=u.useExecutePivotQuery;exports.useExecutePivotQueryInternal=u.useExecutePivotQueryInternal;exports.executeCsvQuery=t.executeCsvQuery;exports.executePivotQuery=t.executePivotQuery;exports.executeQuery=t.executeQuery;exports.executeQueryWithRowCount=t.executeQueryWithRowCount;
package/dist/query.js CHANGED
@@ -1,6 +1,6 @@
1
- import { E as a, c as r, Q as s, q as t, u as y, b as Q } from "./index-CyVSfJ-B.js";
2
- import { ay as x, aA as o, az as E, aB as v } from "./use-execute-csv-query-LtQrd2A4.js";
3
- import { a3 as C, a2 as i, ar as f, b5 as l } from "./execute-query-4_76L7Ax.js";
1
+ import { E as a, c as r, Q as s, q as t, u as y, b as Q } from "./index-D3DsBxkp.js";
2
+ import { ay as x, aA as o, az as E, aB as v } from "./use-execute-csv-query-tLJmsnwg.js";
3
+ import { a3 as C, a2 as i, ar as f, b5 as l } from "./execute-query-D-gXk-LI.js";
4
4
  export {
5
5
  a as ExecuteQuery,
6
6
  r as QUERY_MODULE_NAME,