@sisense/sdk-ui 0.11.3

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 (241) hide show
  1. package/LICENSE.md +35 -0
  2. package/README.md +2 -0
  3. package/dist/alert-box/alert-box.d.ts +6 -0
  4. package/dist/app/client-application.d.ts +52 -0
  5. package/dist/app/settings/settings.d.ts +23 -0
  6. package/dist/app/settings/types/brand.d.ts +1 -0
  7. package/dist/app/settings/types/deployment-props.d.ts +37 -0
  8. package/dist/app/settings/types/ecm-props.d.ts +11 -0
  9. package/dist/app/settings/types/features.d.ts +124 -0
  10. package/dist/app/settings/types/globalization.d.ts +7 -0
  11. package/dist/app/settings/types/globals.d.ts +33 -0
  12. package/dist/app/settings/types/index.d.ts +1 -0
  13. package/dist/app/settings/types/role-manifest.d.ts +263 -0
  14. package/dist/app/settings/types/user.d.ts +51 -0
  15. package/dist/area-chart.d.ts +30 -0
  16. package/dist/bar-chart.d.ts +29 -0
  17. package/dist/chart-data/cartesian-data.d.ts +5 -0
  18. package/dist/chart-data/categorical-data.d.ts +5 -0
  19. package/dist/chart-data/chart-data-service.d.ts +18 -0
  20. package/dist/chart-data/filter-and-aggregate-chart-data.d.ts +4 -0
  21. package/dist/chart-data/indicator-data.d.ts +4 -0
  22. package/dist/chart-data/scatter-data.d.ts +23 -0
  23. package/dist/chart-data/series-data-color-service/index.d.ts +3 -0
  24. package/dist/chart-data/series-data-color-service/legend-color.d.ts +2 -0
  25. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +4 -0
  26. package/dist/chart-data/series-data-color-service/types.d.ts +143 -0
  27. package/dist/chart-data/table-data.d.ts +6 -0
  28. package/dist/chart-data/types.d.ts +80 -0
  29. package/dist/chart-data/utils.d.ts +7 -0
  30. package/dist/chart-data-options/coloring/coloring-service.d.ts +22 -0
  31. package/dist/chart-data-options/coloring/conditional-coloring.d.ts +9 -0
  32. package/dist/chart-data-options/coloring/consts.d.ts +1 -0
  33. package/dist/chart-data-options/coloring/index.d.ts +1 -0
  34. package/dist/chart-data-options/coloring/range-coloring.d.ts +9 -0
  35. package/dist/chart-data-options/coloring/uniform-coloring.d.ts +4 -0
  36. package/dist/chart-data-options/translate-data-options.d.ts +7 -0
  37. package/dist/chart-data-options/types.d.ts +349 -0
  38. package/dist/chart-data-options/utils.d.ts +11 -0
  39. package/dist/chart-data-options/validate-data-options.d.ts +21 -0
  40. package/dist/chart-data-processor/categorical-distribution.d.ts +10 -0
  41. package/dist/chart-data-processor/data-table-date-period.d.ts +37 -0
  42. package/dist/chart-data-processor/distribution.d.ts +22 -0
  43. package/dist/chart-data-processor/row-comparator.d.ts +24 -0
  44. package/dist/chart-data-processor/table-creators.d.ts +39 -0
  45. package/dist/chart-data-processor/table-processor.d.ts +93 -0
  46. package/dist/chart-options-processor/apply-event-handlers.d.ts +49 -0
  47. package/dist/chart-options-processor/cartesian-chart-options.d.ts +18 -0
  48. package/dist/chart-options-processor/category-chart-options.d.ts +16 -0
  49. package/dist/chart-options-processor/chart-options-service.d.ts +253 -0
  50. package/dist/chart-options-processor/common-highcharts-option-service.d.ts +4 -0
  51. package/dist/chart-options-processor/defaults/cartesian.d.ts +45 -0
  52. package/dist/chart-options-processor/plot-bands.d.ts +23 -0
  53. package/dist/chart-options-processor/scatter-chart-options.d.ts +22 -0
  54. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +4 -0
  55. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +13 -0
  56. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-indicator-options.d.ts +3 -0
  57. package/dist/chart-options-processor/subtype-to-design-options.d.ts +97 -0
  58. package/dist/chart-options-processor/theme-option-service.d.ts +11 -0
  59. package/dist/chart-options-processor/tooltip.d.ts +29 -0
  60. package/dist/chart-options-processor/translations/axis-section.d.ts +105 -0
  61. package/dist/chart-options-processor/translations/base-design-options.d.ts +7 -0
  62. package/dist/chart-options-processor/translations/design-options.d.ts +118 -0
  63. package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +53 -0
  64. package/dist/chart-options-processor/translations/funnel-series.d.ts +15 -0
  65. package/dist/chart-options-processor/translations/legend-section.d.ts +23 -0
  66. package/dist/chart-options-processor/translations/marker-section.d.ts +26 -0
  67. package/dist/chart-options-processor/translations/navigator.d.ts +32 -0
  68. package/dist/chart-options-processor/translations/number-format-config.d.ts +16 -0
  69. package/dist/chart-options-processor/translations/pie-plot-options.d.ts +29 -0
  70. package/dist/chart-options-processor/translations/pie-series.d.ts +19 -0
  71. package/dist/chart-options-processor/translations/scatter-axis.d.ts +7 -0
  72. package/dist/chart-options-processor/translations/scatter-plot-options.d.ts +22 -0
  73. package/dist/chart-options-processor/translations/scatter-series.d.ts +23 -0
  74. package/dist/chart-options-processor/translations/scatter-tooltip.d.ts +21 -0
  75. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +39 -0
  76. package/dist/chart-options-processor/translations/tooltip.d.ts +3 -0
  77. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +73 -0
  78. package/dist/chart-options-processor/translations/treemap/treemap-labels.d.ts +6 -0
  79. package/dist/chart-options-processor/translations/treemap/treemap-options.d.ts +6 -0
  80. package/dist/chart-options-processor/translations/treemap/treemap-series.d.ts +5 -0
  81. package/dist/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +6 -0
  82. package/dist/chart-options-processor/translations/treemap/types.d.ts +19 -0
  83. package/dist/chart-options-processor/translations/types.d.ts +36 -0
  84. package/dist/chart-options-processor/translations/value-label-section.d.ts +28 -0
  85. package/dist/chart.d.ts +80 -0
  86. package/dist/charts/indicator/chart/gauge.d.ts +166 -0
  87. package/dist/charts/indicator/chart/indicator-helper.d.ts +47 -0
  88. package/dist/charts/indicator/chart/indicator.d.ts +39 -0
  89. package/dist/charts/indicator/chart/numeric-bar.d.ts +98 -0
  90. package/dist/charts/indicator/chart/numeric-simple.d.ts +91 -0
  91. package/dist/charts/indicator/chart/ticker.d.ts +65 -0
  92. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +36 -0
  93. package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +4 -0
  94. package/dist/charts/indicator/indicator-legacy-chart-options/index.d.ts +1 -0
  95. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +16 -0
  96. package/dist/charts/indicator/indicator-legacy-chart-options/legacy-chart-options-to-theme-settings-dictionary.d.ts +12 -0
  97. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-theme-settings.d.ts +3 -0
  98. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +35 -0
  99. package/dist/charts/indicator/indicator-legacy-chart-options/utils/override-with-custom-settings.d.ts +22 -0
  100. package/dist/charts/indicator/types.d.ts +118 -0
  101. package/dist/charts/table/data-table-wrapper.d.ts +3 -0
  102. package/dist/charts/table/header/field-type-icon.d.ts +6 -0
  103. package/dist/charts/table/header/sortable-table-column-header.d.ts +10 -0
  104. package/dist/charts/table/helpers/calc-column-widths.d.ts +2 -0
  105. package/dist/charts/table/helpers/format-numbers.d.ts +3 -0
  106. package/dist/charts/table/helpers/get-cell-styles.d.ts +13 -0
  107. package/dist/charts/table/index.d.ts +3 -0
  108. package/dist/charts/table/pure-table.d.ts +8 -0
  109. package/dist/charts/table/styles/style-constants.d.ts +9 -0
  110. package/dist/charts/table/types.d.ts +83 -0
  111. package/dist/column-chart.d.ts +29 -0
  112. package/dist/dashboard-widget/dashboard-widget.d.ts +16 -0
  113. package/dist/dashboard-widget/fetch-widget.d.ts +11 -0
  114. package/dist/dashboard-widget/translate-panel-color-format.d.ts +5 -0
  115. package/dist/dashboard-widget/translate-widget-data-options.d.ts +7 -0
  116. package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +3 -0
  117. package/dist/dashboard-widget/translate-widget-filters.d.ts +16 -0
  118. package/dist/dashboard-widget/translate-widget-style-options.d.ts +5 -0
  119. package/dist/dashboard-widget/translate-widget.d.ts +12 -0
  120. package/dist/dashboard-widget/types.d.ts +336 -0
  121. package/dist/dashboard-widget/utils.d.ts +32 -0
  122. package/dist/decorators/as-sisense-component.d.ts +19 -0
  123. package/dist/decorators/with-error-boundary.d.ts +5 -0
  124. package/dist/decorators/with-sisense-context-validation.d.ts +7 -0
  125. package/dist/decorators/with-tracking/error-tracker.d.ts +20 -0
  126. package/dist/decorators/with-tracking/index.d.ts +1 -0
  127. package/dist/decorators/with-tracking/use-track-component-init.d.ts +5 -0
  128. package/dist/decorators/with-tracking/with-tracking.d.ts +10 -0
  129. package/dist/dynamic-size-container/default-size.d.ts +14 -0
  130. package/dist/dynamic-size-container/dynamic-size-container.d.ts +22 -0
  131. package/dist/dynamic-size-container/index.d.ts +2 -0
  132. package/dist/error-boundary/error-boundary-box.d.ts +13 -0
  133. package/dist/error-boundary/error-boundary.d.ts +34 -0
  134. package/dist/error-boundary/use-set-error.d.ts +2 -0
  135. package/dist/filters/components/common/buttons.d.ts +10 -0
  136. package/dist/filters/components/common/checkbox.d.ts +7 -0
  137. package/dist/filters/components/common/date-range-field-button.d.ts +13 -0
  138. package/dist/filters/components/common/index.d.ts +5 -0
  139. package/dist/filters/components/common/input.d.ts +7 -0
  140. package/dist/filters/components/common/radio.d.ts +6 -0
  141. package/dist/filters/components/common/switch.d.ts +1 -0
  142. package/dist/filters/components/date-filter/consts.d.ts +1 -0
  143. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +20 -0
  144. package/dist/filters/components/date-filter/date-filter/calendar-header.d.ts +12 -0
  145. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +61 -0
  146. package/dist/filters/components/date-filter/date-filter/date-range-calculator.d.ts +8 -0
  147. package/dist/filters/components/date-filter/date-filter/index.d.ts +1 -0
  148. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +13 -0
  149. package/dist/filters/components/date-filter/date-filter/styled-date-picker.d.ts +7 -0
  150. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +63 -0
  151. package/dist/filters/components/date-filter/date-range-filter-tile/index.d.ts +1 -0
  152. package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +7 -0
  153. package/dist/filters/components/date-filter/index.d.ts +2 -0
  154. package/dist/filters/components/date-filter/types.d.ts +14 -0
  155. package/dist/filters/components/filter-tile.d.ts +14 -0
  156. package/dist/filters/components/icons/arrow-down-icon.d.ts +2 -0
  157. package/dist/filters/components/icons/arrow-right-icon.d.ts +2 -0
  158. package/dist/filters/components/icons/date-icon.d.ts +5 -0
  159. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +2 -0
  160. package/dist/filters/components/icons/index.d.ts +7 -0
  161. package/dist/filters/components/icons/menu-icon.d.ts +2 -0
  162. package/dist/filters/components/icons/pencil-icon.d.ts +2 -0
  163. package/dist/filters/components/icons/plus-icon.d.ts +2 -0
  164. package/dist/filters/components/icons/search-icon.d.ts +2 -0
  165. package/dist/filters/components/icons/trash-icon.d.ts +2 -0
  166. package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +50 -0
  167. package/dist/filters/components/member-filter-tile/index.d.ts +3 -0
  168. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +46 -0
  169. package/dist/filters/components/member-filter-tile/member-list.d.ts +11 -0
  170. package/dist/filters/components/member-filter-tile/members-reducer.d.ts +32 -0
  171. package/dist/filters/components/member-filter-tile/pill-section.d.ts +9 -0
  172. package/dist/filters/components/member-filter-tile/use-members.d.ts +14 -0
  173. package/dist/filters/components/member-filter-tile/use-validate-members.d.ts +8 -0
  174. package/dist/filters/index.d.ts +2 -0
  175. package/dist/funnel-chart.d.ts +47 -0
  176. package/dist/index.d.ts +35 -0
  177. package/dist/index.js +71761 -0
  178. package/dist/indicator-canvas.d.ts +21 -0
  179. package/dist/indicator-chart.d.ts +60 -0
  180. package/dist/line-chart.d.ts +28 -0
  181. package/dist/locales/en.d.ts +17 -0
  182. package/dist/no-results-overlay/images/index.d.ts +2 -0
  183. package/dist/no-results-overlay/no-results-overlay.d.ts +13 -0
  184. package/dist/pie-chart.d.ts +28 -0
  185. package/dist/polar-chart.d.ts +28 -0
  186. package/dist/props.d.ts +882 -0
  187. package/dist/query/date-formats/angular-text-date-format-replacers.d.ts +5 -0
  188. package/dist/query/date-formats/apply-date-format.d.ts +65 -0
  189. package/dist/query/date-formats/fiscal-date-format-replacers.d.ts +33 -0
  190. package/dist/query/date-formats/index.d.ts +2 -0
  191. package/dist/query/date-formats/new-date-format.d.ts +16 -0
  192. package/dist/query/date-formats/simple-date-format-replacers.d.ts +4 -0
  193. package/dist/query/execute-query.d.ts +8 -0
  194. package/dist/query/query-result-date-formatting.d.ts +5 -0
  195. package/dist/query-execution/execute-query-by-widget-id.d.ts +29 -0
  196. package/dist/query-execution/execute-query.d.ts +32 -0
  197. package/dist/query-execution/index.d.ts +5 -0
  198. package/dist/query-execution/query-state-reducer.d.ts +66 -0
  199. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +71 -0
  200. package/dist/query-execution/use-execute-query.d.ts +70 -0
  201. package/dist/query-execution/utils.d.ts +9 -0
  202. package/dist/scatter-chart.d.ts +68 -0
  203. package/dist/sisense-chart.d.ts +23 -0
  204. package/dist/sisense-context/custom-sisense-context-provider.d.ts +19 -0
  205. package/dist/sisense-context/sisense-context-provider.d.ts +36 -0
  206. package/dist/sisense-context/sisense-context.d.ts +9 -0
  207. package/dist/table/hooks/use-table-data.d.ts +11 -0
  208. package/dist/table/hooks/use-table-datatable.d.ts +11 -0
  209. package/dist/table/index.d.ts +1 -0
  210. package/dist/table/styles/get-custom-pagination-styles.d.ts +10 -0
  211. package/dist/table/table.d.ts +50 -0
  212. package/dist/theme-provider/custom-theme-provider.d.ts +18 -0
  213. package/dist/theme-provider/index.d.ts +1 -0
  214. package/dist/theme-provider/theme-provider.d.ts +45 -0
  215. package/dist/theme-provider/use-theme-settings.d.ts +12 -0
  216. package/dist/themes/legacy-design-settings.d.ts +84 -0
  217. package/dist/themes/theme-loader.d.ts +14 -0
  218. package/dist/treemap-chart.d.ts +34 -0
  219. package/dist/types.d.ts +692 -0
  220. package/dist/utils/color/color-interpolation.d.ts +37 -0
  221. package/dist/utils/color/index.d.ts +1 -0
  222. package/dist/utils/data-limit-warning.d.ts +2 -0
  223. package/dist/utils/dedupe.d.ts +1 -0
  224. package/dist/utils/filters-comparator.d.ts +11 -0
  225. package/dist/utils/utility-types.d.ts +39 -0
  226. package/dist/vite.svg +1 -0
  227. package/dist/widgets/chart-widget.d.ts +30 -0
  228. package/dist/widgets/common/context-menu.d.ts +3 -0
  229. package/dist/widgets/common/custom-drilldown.d.ts +20 -0
  230. package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +4 -0
  231. package/dist/widgets/common/drilldown-breadcrumbs/index.d.ts +1 -0
  232. package/dist/widgets/common/drilldown-breadcrumbs/use-buttons.d.ts +27 -0
  233. package/dist/widgets/common/drilldown-breadcrumbs/use-popper.d.ts +24 -0
  234. package/dist/widgets/common/drilldown-breadcrumbs/use-theme-for-breadcrumbs.d.ts +11 -0
  235. package/dist/widgets/common/drilldown.d.ts +32 -0
  236. package/dist/widgets/common/use-widget-drilldown.d.ts +2 -0
  237. package/dist/widgets/common/widget-header.d.ts +11 -0
  238. package/dist/widgets/common/widget-style-utils.d.ts +13 -0
  239. package/dist/widgets/drilldown-widget.d.ts +49 -0
  240. package/dist/widgets/table-widget.d.ts +23 -0
  241. package/package.json +110 -0
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { AreaChartProps } from './props';
3
+ /**
4
+ * A React component similar to a {@link LineChart},
5
+ * but with filled in areas under each line and an option to display them as stacked.
6
+ * More info on [Sisense Documentation page](https://docs.sisense.com/main/SisenseLinux/area-chart.htm).
7
+ *
8
+ * @example
9
+ * An example of using the component to visualize the `Sample ECommerce` data source:
10
+ * ```tsx
11
+ * <AreaChart
12
+ * dataSet={DM.DataSource}
13
+ * dataOptions={{
14
+ * category: [DM.Commerce.Date.Years],
15
+ * value: [measures.sum(DM.Commerce.Revenue)],
16
+ * breakBy: [DM.Commerce.Gender],
17
+ * }}
18
+ * styleOptions={{ subtype: 'area/stacked' }}
19
+ * filters={[filters.members(DM.Commerce.Gender, ['Female', 'Male'])]}
20
+ * onDataPointClick={(point, nativeEvent) => {
21
+ * console.log('clicked', point, nativeEvent);
22
+ * }}
23
+ * />
24
+ * ```
25
+ *
26
+ * <img src="media://area-chart-example-1.png" width="800"/>
27
+ * @param props - Area chart properties
28
+ * @returns Area Chart component
29
+ */
30
+ export declare const AreaChart: import("react").FunctionComponent<AreaChartProps>;
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { BarChartProps } from './props';
3
+ /**
4
+ * A React component representing categorical data with horizontal rectangular bars,
5
+ * whose lengths are proportional to the values that they represent.
6
+ * See [Bar Chart](https://docs.sisense.com/main/SisenseLinux/bar-chart.htm) for more information.
7
+ *
8
+ * @example
9
+ * An example of using the component to visualize the `Sample ECommerce` data source:
10
+ * ```tsx
11
+ * <BarChart
12
+ * dataSet={DM.DataSource}
13
+ * dataOptions={{
14
+ * category: [DM.Commerce.AgeRange],
15
+ * value: [measures.sum(DM.Commerce.Revenue)],
16
+ * breakBy: [DM.Commerce.Gender],
17
+ * }}
18
+ * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
19
+ * onDataPointClick={(point, nativeEvent) => {
20
+ * console.log('clicked', point, nativeEvent);
21
+ * }}
22
+ * />
23
+ * ```
24
+ *
25
+ * <img src="media://bar-chart-example-1.png" width="800"/>
26
+ * @param props - Bar chart properties
27
+ * @returns Bar Chart component
28
+ */
29
+ export declare const BarChart: import("react").FunctionComponent<BarChartProps>;
@@ -0,0 +1,5 @@
1
+ import { DataTable } from '../chart-data-processor/table-processor';
2
+ import { CartesianChartData } from './types';
3
+ import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
4
+ export declare const validateCartesianChartDataOptions: (chartDataOptions: CartesianChartDataOptionsInternal) => CartesianChartDataOptionsInternal;
5
+ export declare const cartesianData: (chartDataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable) => CartesianChartData;
@@ -0,0 +1,5 @@
1
+ import { CategoricalChartDataOptionsInternal } from '../chart-data-options/types';
2
+ import { DataTable } from '../chart-data-processor/table-processor';
3
+ import { CategoricalChartData } from './types';
4
+ export declare const validateCategoricalChartDataOptions: (chartDataOptions: CategoricalChartDataOptionsInternal) => CategoricalChartDataOptionsInternal;
5
+ export declare const categoricalData: (chartDataOptions: CategoricalChartDataOptionsInternal, dataTable: DataTable) => CategoricalChartData;
@@ -0,0 +1,18 @@
1
+ import { ChartDataOptionsInternal } from '../chart-data-options/types';
2
+ import { DataTable } from '../chart-data-processor/table-processor';
3
+ import { ChartType, NumberFormatConfig, SeriesChartType } from '../types';
4
+ import { ChartData } from './types';
5
+ export declare const chartDataService: (chartType: ChartType, chartDataOptions: ChartDataOptionsInternal, dataTable: DataTable) => ChartData;
6
+ export type ValueColumn = {
7
+ column: string;
8
+ agg: string;
9
+ columnTitle: string;
10
+ enabled: boolean;
11
+ sort: SortDirection;
12
+ showOnRightAxis?: boolean;
13
+ numberFormatConfig?: NumberFormatConfig;
14
+ chartType?: SeriesChartType;
15
+ color?: string;
16
+ legacyInstanceId?: string;
17
+ };
18
+ export type SortDirection = 'sortAsc' | 'sortDesc' | 'sortNone';
@@ -0,0 +1,4 @@
1
+ import { Category, Value } from '../chart-data-options/types';
2
+ import { DataColumnNamesMapping } from '../chart-data-options/validate-data-options';
3
+ import { DataTable } from '../chart-data-processor/table-processor';
4
+ export declare const filterAndAggregateChartData: (sourceTable: DataTable, attributes: Category[], measures: Value[], dataColumnNamesMapping?: DataColumnNamesMapping) => DataTable;
@@ -0,0 +1,4 @@
1
+ import { DataTable } from '../chart-data-processor/table-processor';
2
+ import { IndicatorDataOptionsInternal } from '../chart-data-options/types';
3
+ import { IndicatorChartData } from './types';
4
+ export declare const indicatorData: (chartDataOptions: IndicatorDataOptionsInternal, dataTable: DataTable) => IndicatorChartData;
@@ -0,0 +1,23 @@
1
+ import { ComparableData, DataTable } from '../chart-data-processor/table-processor';
2
+ import { ScatterCategories, ScatterChartData, ScatterAxisCategoriesMap, ScatterDataTable } from './types';
3
+ import { ScatterChartDataOptionsInternal } from '../chart-data-options/types';
4
+ export declare const defaultScatterDataValue: ComparableData;
5
+ export type AxisColumnName = 'xAxis' | 'yAxis';
6
+ export interface DataOptionsIndexes {
7
+ x: number;
8
+ y: number;
9
+ breakByPoint: number;
10
+ breakByColor: number;
11
+ size: number;
12
+ }
13
+ export declare const buildCategories: (data: ScatterDataTable, axisColumnName: AxisColumnName) => string[];
14
+ export declare const createCategoriesMap: (xCategories?: ScatterCategories, yCategories?: ScatterCategories) => ScatterAxisCategoriesMap;
15
+ export declare const groupData: (chartDataOptions: ScatterChartDataOptionsInternal, dataTable: DataTable) => ScatterDataTable;
16
+ /**
17
+ * Creates data for scatter charts given chart data table and data options,
18
+ *
19
+ * @param chartDataOptions - Data options for scatter chart
20
+ * @param dataTable - Chart data table
21
+ * @returns Scatter chart data
22
+ */
23
+ export declare const scatterData: (chartDataOptions: ScatterChartDataOptionsInternal, dataTable: DataTable) => ScatterChartData;
@@ -0,0 +1,3 @@
1
+ export * from './legend-color';
2
+ export * from './series-data-color-service';
3
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ import { DataColorOptions } from './types';
2
+ export declare const legendColor: (colorOpts?: DataColorOptions) => string | undefined;
@@ -0,0 +1,4 @@
1
+ import { SeriesValueData } from '../types';
2
+ import { DataColorOptions } from './types';
3
+ export declare function seriesDataColorService(seriesValues: SeriesValueData[], colorOpts: DataColorOptions): SeriesValueData[];
4
+ export declare function generateColorsForDataStructures<DataStructure extends {}>(dataStructures: DataStructure[], colorOpts: DataColorOptions, getValueFromDataStructure: (data: DataStructure) => number, applyColorToDataStructure: (data: DataStructure, color: string | undefined) => DataStructure): DataStructure[];
@@ -0,0 +1,143 @@
1
+ /**
2
+ * All possible color options for data.
3
+ *
4
+ * @see {@link https://docs.sisense.com/main/SisenseLinux/selecting-colors-in-widgets.htm | Selecting Colors in Widgets}
5
+ */
6
+ export type DataColorOptions = string | UniformDataColorOptions | RangeDataColorOptions | ConditionalDataColorOptions;
7
+ /**
8
+ * Uniform color options for data similar to the Single Color option in the Sisense UI.
9
+ *
10
+ * @example
11
+ * An example of specifying red as a uniform color for all data values.
12
+ *
13
+ * ```ts
14
+ * {
15
+ * type: 'uniform',
16
+ * color: 'red',
17
+ * }
18
+ * ```
19
+ * @see {@link https://docs.sisense.com/main/SisenseLinux/selecting-colors-in-widgets.htm | Selecting Colors in Widgets}
20
+ */
21
+ export type UniformDataColorOptions = {
22
+ /**
23
+ * Color options type
24
+ */
25
+ type: 'uniform';
26
+ /**
27
+ * Color name, e.g., `red`, or a hexadecimal value, e.g., `#ff0000`.
28
+ */
29
+ color: string;
30
+ };
31
+ /**
32
+ * Range color options for data similar to the Range option in the Sisense UI.
33
+ *
34
+ * Use `minColor` and `maxColor` to define the start and end color of the range.
35
+ * A color name (for example, `red`), or a hexadecimal value (for example, `#ff0000`) can be specified.
36
+ *
37
+ * By default, the color range is set to match the minimum and maximum values of the data.
38
+ * You can also override the default value range by
39
+ * setting the `minValue`, `midValue`, and `maxValue` properties.
40
+ *
41
+ * @example
42
+ * An example of specifying colors for data values ranging
43
+ * from red (for min value) to blue (for max value)
44
+ * with 2 more colors in between for a total of 4 colors:
45
+ *
46
+ * ```ts
47
+ * {
48
+ * type: 'range',
49
+ * steps: 4,
50
+ * minColor: 'red',
51
+ * maxColor: 'blue',
52
+ * }
53
+ * ```
54
+ * @see {@link https://docs.sisense.com/main/SisenseLinux/selecting-colors-in-widgets.htm | Selecting Colors in Widgets}
55
+ */
56
+ export type RangeDataColorOptions = {
57
+ /**
58
+ * Color options type
59
+ */
60
+ type: 'range';
61
+ /**
62
+ * Distinct number of colors in the range
63
+ */
64
+ steps?: number;
65
+ /**
66
+ * Start color of the range
67
+ */
68
+ minColor?: string;
69
+ /**
70
+ * End color of the range
71
+ */
72
+ maxColor?: string;
73
+ /**
74
+ * Minimum value explicitly set to override the minimum value of the data
75
+ */
76
+ minValue?: number;
77
+ /**
78
+ * Middle value explicitly set to override the middle value of the data
79
+ */
80
+ midValue?: number;
81
+ /**
82
+ * Maximum value explicitly set to override the maximum value of the data
83
+ */
84
+ maxValue?: number;
85
+ };
86
+ /**
87
+ * Conditional color options for data similar to the Conditional Color option in the Sisense UI.
88
+ *
89
+ * This option allows you to define color conditions.
90
+ * Each condition is a logical expression that defines how data values are mapped into colors.
91
+ * These conditions are evaluated in the order in which they appear in the array.
92
+ *
93
+ * @example
94
+ * An example of a condition stating that a negative data value is displayed in red
95
+ * and another condition stating that a positive data value is green.
96
+ *
97
+ * ```ts
98
+ * {
99
+ * type: 'conditional',
100
+ * conditions: [
101
+ * { color: 'red', expression: '0', operator: '<' },
102
+ * { color: 'green', expression: '0', operator: '>=' },
103
+ * ],
104
+ * defaultColor: 'red',
105
+ * }
106
+ * ```
107
+ * @see {@link https://docs.sisense.com/main/SisenseLinux/selecting-colors-in-widgets.htm | Selecting Colors in Widgets}
108
+ */
109
+ export type ConditionalDataColorOptions = {
110
+ /**
111
+ * Color options type
112
+ */
113
+ type: 'conditional';
114
+ /**
115
+ * Array of color conditions
116
+ */
117
+ conditions?: DataColorCondition[];
118
+ /**
119
+ * Default color when no condition is met
120
+ */
121
+ defaultColor?: string;
122
+ };
123
+ /**
124
+ * Color condition for {@link ConditionalDataColorOptions} represented as a logical expression.
125
+ *
126
+ * See {@link ConditionalDataColorOptions} for examples.
127
+ *
128
+ * @see {@link https://docs.sisense.com/main/SisenseLinux/selecting-colors-in-widgets.htm | Selecting Colors in Widgets}
129
+ */
130
+ export type DataColorCondition = {
131
+ /**
132
+ * Color for this condition
133
+ */
134
+ color: string;
135
+ /**
136
+ * Expression representing the data value
137
+ */
138
+ expression: string;
139
+ /**
140
+ * Supported operators for `expression`
141
+ */
142
+ operator: '<' | '>' | '≤' | '<=' | '≥' | '>=' | '=' | '≠' | '!=';
143
+ };
@@ -0,0 +1,6 @@
1
+ import { Column as DataTableColumn, DataTable } from '../chart-data-processor/table-processor';
2
+ import { Category, TableDataOptionsInternal, Value } from '../chart-data-options/types';
3
+ export declare const unifySortToDirection: (category: Category | Value) => number;
4
+ export declare const syncDataTableWithDataOptionsSort: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
5
+ export declare const updateInnerDataOptionsSort: (dataOptions: TableDataOptionsInternal, sortColumn: DataTableColumn) => TableDataOptionsInternal;
6
+ export declare const tableData: (chartDataOptions: TableDataOptionsInternal, dataTable: DataTable) => DataTable;
@@ -0,0 +1,80 @@
1
+ import { NumberFormatConfig } from '../types';
2
+ import { IndicatorChartType } from '../chart-options-processor/translations/types';
3
+ import { ComparableData, Value } from '../chart-data-processor/table-processor';
4
+ export type CategoricalXValues = {
5
+ key: string;
6
+ xValues: string[];
7
+ rawValues?: (string | number)[];
8
+ compareValues?: Value[];
9
+ };
10
+ export type SeriesValueData = {
11
+ value: number;
12
+ blur?: boolean;
13
+ color?: string;
14
+ rawValue?: string | number;
15
+ xValue?: (string | number)[];
16
+ xDisplayValue?: string[];
17
+ xCompareValue?: (string | number)[];
18
+ parent?: string;
19
+ };
20
+ export type CategoricalSeriesValues = {
21
+ name: string;
22
+ title?: string;
23
+ data: SeriesValueData[];
24
+ };
25
+ export type Column = {
26
+ name: string;
27
+ type: string;
28
+ enabled: boolean;
29
+ numberFormatConfig?: NumberFormatConfig;
30
+ };
31
+ export type CartesianChartData = {
32
+ type: 'cartesian';
33
+ xAxisCount: number;
34
+ xValues: CategoricalXValues[];
35
+ series: CategoricalSeriesValues[];
36
+ };
37
+ export type CategoricalChartData = {
38
+ type: 'categorical';
39
+ xAxisCount: number;
40
+ xValues: CategoricalXValues[];
41
+ series: CategoricalSeriesValues[];
42
+ };
43
+ export interface ScatterDataRow {
44
+ xAxis: ComparableData;
45
+ yAxis: ComparableData;
46
+ breakByPoint?: ComparableData;
47
+ breakByColor?: ComparableData;
48
+ size?: ComparableData;
49
+ }
50
+ export type ScatterDataTable = ScatterDataRow[];
51
+ export type ScatterCategories = string[] | undefined;
52
+ export type ScatterCategoryMap = Map<string, number>;
53
+ export interface ScatterAxisCategoriesMap {
54
+ xCategoriesMap: ScatterCategoryMap;
55
+ yCategoriesMap: ScatterCategoryMap;
56
+ }
57
+ export type ScatterChartData = {
58
+ type: 'scatter';
59
+ scatterDataTable: ScatterDataTable;
60
+ xCategories: ScatterCategories;
61
+ yCategories: ScatterCategories;
62
+ };
63
+ /**
64
+ * Fact final data that will be passed to chart-component to render
65
+ *
66
+ * @internal
67
+ */
68
+ export type IndicatorChartData = {
69
+ type: IndicatorChartType;
70
+ value?: number;
71
+ secondary?: number;
72
+ min?: number;
73
+ max?: number;
74
+ };
75
+ /**
76
+ * Fact final data that will be passed to chart-component to render
77
+ *
78
+ * @internal
79
+ */
80
+ export type ChartData = CartesianChartData | CategoricalChartData | ScatterChartData | IndicatorChartData;
@@ -0,0 +1,7 @@
1
+ import { CartesianChartDataOptionsInternal } from '../chart-data-options/types';
2
+ export declare const onlyY: ({ x, y, breakBy }: CartesianChartDataOptionsInternal) => boolean;
3
+ export declare const onlyYAndSeries: ({ x, y, breakBy }: CartesianChartDataOptionsInternal) => boolean;
4
+ export declare const isEnabled: (enabled?: boolean) => boolean;
5
+ export declare const fraction: (base: number, percentage: number) => number;
6
+ export declare const fromFraction: (base: number, value: number) => number;
7
+ export declare const withPercentSign: (x: number | string) => string;
@@ -0,0 +1,22 @@
1
+ import { DataColorOptions } from '../../types.js';
2
+ /**
3
+ * Type representing the coloring types.
4
+ * Static - all values have the same color independent of the value.
5
+ * Absolute - each value has a color based on the value.
6
+ * Relative - each value has a color based on the value and the other values.
7
+ */
8
+ export type ColoringType = 'Static' | 'Absolute' | 'Relative';
9
+ export type StaticColoringFunction = () => string | undefined;
10
+ export type AbsoluteColoringFunction = (value: number) => string | undefined;
11
+ export type RelativeColoringFunction = (allValuesForComparison: number[]) => (value: number) => string | undefined;
12
+ export type ColoringService<Type extends ColoringType = ColoringType> = {
13
+ type: Type;
14
+ getColor: Type extends 'Static' ? StaticColoringFunction : Type extends 'Absolute' ? AbsoluteColoringFunction : Type extends 'Relative' ? RelativeColoringFunction : never;
15
+ };
16
+ /**
17
+ * Retrieves the coloring service based on the provided color options.
18
+ *
19
+ * @param colorOptions - The color options to determine the coloring service.
20
+ * @returns The coloring service.
21
+ */
22
+ export declare function getColoringServiceByColorOptions(colorOptions: DataColorOptions): ColoringService;
@@ -0,0 +1,9 @@
1
+ import { AbsoluteColoringFunction } from '.';
2
+ import { ConditionalDataColorOptions } from '../../types';
3
+ /**
4
+ * Retrieves the conditional coloring function based on the provided color options.
5
+ *
6
+ * @param colorOpts - The color options for conditional coloring.
7
+ * @returns The conditional coloring function.
8
+ */
9
+ export declare function getConditionalColoringFunction(colorOpts: ConditionalDataColorOptions): AbsoluteColoringFunction;
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_COLOR = "#dcdcdc";
@@ -0,0 +1 @@
1
+ export * from './coloring-service';
@@ -0,0 +1,9 @@
1
+ import { RelativeColoringFunction } from '.';
2
+ import { RangeDataColorOptions } from '../../types';
3
+ /**
4
+ * Returns a relative coloring function based on the provided color options.
5
+ *
6
+ * @param colorOpts - The color options for range coloring.
7
+ * @returns The relative coloring function.
8
+ */
9
+ export declare function getRangeColoringFunction(colorOpts: RangeDataColorOptions): RelativeColoringFunction;
@@ -0,0 +1,4 @@
1
+ import { StaticColoringFunction } from '.';
2
+ import { UniformDataColorOptions } from '../../types';
3
+ export declare const getUniformColorOptionsFromString: (color: string) => UniformDataColorOptions;
4
+ export declare function getUniformColoringFunction(colorOpts: UniformDataColorOptions): StaticColoringFunction;
@@ -0,0 +1,7 @@
1
+ import { Attribute, Measure } from '@sisense/sdk-data';
2
+ import { ChartType } from '../types';
3
+ import { ChartDataOptions, ChartDataOptionsInternal, TableDataOptionsInternal, TableDataOptions } from './types';
4
+ export declare function translateChartDataOptions(chartType: ChartType, dataOptions: ChartDataOptions): ChartDataOptionsInternal;
5
+ export declare function getAttributes(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Attribute[];
6
+ export declare function getMeasures(dataOptions: ChartDataOptionsInternal, chartType: ChartType): Measure[];
7
+ export declare function translateTableDataOptions(dataOptions: TableDataOptions): TableDataOptionsInternal;