@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,35 @@
1
+ import { IndicatorDataOptions, ConditionalDataColorOptions, DataColorOptions, UniformDataColorOptions } from '../../../types';
2
+ import { LegacyIndicatorChartOptions } from '../types';
3
+ import { IndicatorTypeOptions } from './indicator-legacy-chart-options';
4
+ /**
5
+ * Type that represents allowed color options for an indicator.
6
+ */
7
+ export type AllowedIndicatorColorOptions = string | UniformDataColorOptions | ConditionalDataColorOptions;
8
+ /**
9
+ * Type that represents allowed coloring types for an indicator.
10
+ */
11
+ export type AllowedIndicatorColoringTypes = 'Static' | 'Absolute';
12
+ /**
13
+ * Returns the color options from the indicator data options.
14
+ *
15
+ * @param dataOptions - The indicator data options to extract the color options from.
16
+ * @returns The color options from the indicator data options.
17
+ */
18
+ export declare function getValueColorOptions(dataOptions: IndicatorDataOptions): DataColorOptions | undefined;
19
+ /**
20
+ * Overrides the value color in the legacy indicator chart options with the specified color.
21
+ *
22
+ * @param colorOptions - The color options for the indicator.
23
+ * @param value - The value to determine the color.
24
+ * @param legacyChartOptions - The legacy indicator chart options to modify.
25
+ * @param typeOptions - Describe indicator type and subtype.
26
+ * @returns The modified legacy indicator chart options.
27
+ */
28
+ export declare function overrideWithValueColor(colorOptions: DataColorOptions, value: number, legacyChartOptions: LegacyIndicatorChartOptions, typeOptions: IndicatorTypeOptions): LegacyIndicatorChartOptions;
29
+ /**
30
+ * Checks if the color options are allowed for an indicator.
31
+ *
32
+ * @param colorOptions - The color options to check.
33
+ * @returns True if the color options are allowed, false otherwise.
34
+ */
35
+ export declare function isAllowedIndicatorColorOptions(colorOptions: DataColorOptions): colorOptions is AllowedIndicatorColorOptions;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Overrides the default options with custom settings based on a mapping dictionary.
3
+ *
4
+ * @param customSettings - The custom settings to apply.
5
+ * @param defaultOptionsToCustomSettingsDictionary - The dictionary mapping default options to custom settings keys.
6
+ * @param defaultOptions - The default options to override.
7
+ * @returns The overridden options object.
8
+ * @example
9
+ const customSettings = { a: { b: { c: 'custom_cc' } } };
10
+ const defaultOptions = { aa: { bb: { cc: 'cc' } }, cc: 'cc' };
11
+ const customSettingsToDefaultOptionsDictionary = {
12
+ 'aa.bb.cc': 'a.b.c',
13
+ cc: 'a.b.c',
14
+ };
15
+ const overriddenOptions = overrideWithCustomSettings(
16
+ customSettings,
17
+ customSettingsToDefaultOptionsDictionary,
18
+ defaultOptions,
19
+ );
20
+ // overriddenOptions = { aa: { bb: { cc: 'custom_cc' } }, cc: 'custom_cc' };
21
+ */
22
+ export declare function overrideWithCustomSettings<DefaultOptions extends Record<string, any>>(customSettings: Record<string, any>, defaultOptionsToCustomSettingsDictionary: Record<string, string>, defaultOptions: DefaultOptions): DefaultOptions;
@@ -0,0 +1,118 @@
1
+ export type LegacyIndicatorChartTypes = 'numericSimple' | 'numericBar' | 'gauge' | 'ticker';
2
+ export type BaseMeasure = {
3
+ size: keyof FontSizes;
4
+ value: number;
5
+ maxWidth?: number;
6
+ maxHeight?: number;
7
+ };
8
+ export type FitTitleMeasure = {
9
+ width: number;
10
+ string: string;
11
+ key: string;
12
+ };
13
+ export type FitValueMeasure = {
14
+ width: number;
15
+ string: string;
16
+ key: string;
17
+ };
18
+ export type FitSecondaryMeasure = {
19
+ width: number;
20
+ titleString: string;
21
+ valueString: string;
22
+ key: string;
23
+ };
24
+ type FontSizes = {
25
+ big: number;
26
+ medium: number;
27
+ small: number;
28
+ micro: number;
29
+ };
30
+ type DataKey = 'title' | 'value' | 'secondaryTitle' | 'secondary';
31
+ type CommonOptions = {
32
+ fontFamily: string;
33
+ title: {
34
+ color: string;
35
+ fontSizes: FontSizes;
36
+ };
37
+ value: {
38
+ color?: string;
39
+ fontSizes: FontSizes;
40
+ };
41
+ secondaryTitle: {
42
+ color: string;
43
+ fontSizes: FontSizes;
44
+ };
45
+ secondaryValue: {
46
+ fontWeight: number;
47
+ color: string;
48
+ fontSizes: FontSizes;
49
+ };
50
+ textKeys: string[];
51
+ backgroundColor: string;
52
+ };
53
+ export type NumericSimpleOptions = CommonOptions & {
54
+ borderColor: string;
55
+ borderWidth: number;
56
+ relativeSizes: {
57
+ key: string;
58
+ value: number;
59
+ decimals: number;
60
+ }[];
61
+ measureKeys: string[];
62
+ sizes: {
63
+ size: keyof FontSizes;
64
+ value: number;
65
+ }[];
66
+ fitMeasures: {
67
+ key: string;
68
+ prop: string;
69
+ dataKey: DataKey;
70
+ }[];
71
+ };
72
+ export type NumericBarOptions = CommonOptions & {
73
+ bracketColor: string;
74
+ bracketThickness: number;
75
+ relativeSizes: {
76
+ key: string;
77
+ value: number;
78
+ decimals: number;
79
+ }[];
80
+ measureKeys: string[];
81
+ sizes: {
82
+ size: keyof FontSizes;
83
+ value: number;
84
+ maxWidth?: number;
85
+ maxHeight?: number;
86
+ }[];
87
+ };
88
+ export type GaugeOptions = CommonOptions & {
89
+ label: {
90
+ color: string;
91
+ fontSizes: FontSizes;
92
+ };
93
+ textKeys: string[];
94
+ tickColor: string;
95
+ needleColor: string;
96
+ bracketColor: string;
97
+ defaultDialColor: string;
98
+ gaugeOpacity: number;
99
+ startAngle: number;
100
+ endAngle: number;
101
+ overDegrees: number;
102
+ tickDegreesIncrement: number;
103
+ bracketThickness: number;
104
+ relativeSizes: ({
105
+ key: string;
106
+ value: number;
107
+ decimals: number;
108
+ } | {
109
+ key: string;
110
+ dataKey: 'skin';
111
+ values: Record<'1' | '2', number>;
112
+ decimals: number;
113
+ })[];
114
+ gaugeHeights: BaseMeasure[];
115
+ measureKeys: string[];
116
+ };
117
+ export type LegacyIndicatorChartOptions = NumericBarOptions | NumericSimpleOptions | GaugeOptions;
118
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DataTableWrapperProps } from './types';
3
+ export declare const DataTableWrapper: ({ dataTable, dataOptions, isLoading, height, width, customStyles, themeSettings, onSortUpdate, }: DataTableWrapperProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ columnType: string;
4
+ };
5
+ export declare const FieldTypeIcon: ({ columnType }: Props) => JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Column } from '../../../chart-data-processor/table-processor';
3
+ export declare const SortableTableColumnHeader: React.FunctionComponent<{
4
+ column: Column;
5
+ onClick: (column: Column) => void;
6
+ isSelected: boolean;
7
+ children: React.ReactNode;
8
+ showFieldTypeIcon?: boolean;
9
+ sortIcon?: 'caret' | 'standard';
10
+ }>;
@@ -0,0 +1,2 @@
1
+ import { DataTable } from '../../../chart-data-processor/table-processor';
2
+ export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, fontFamily?: string) => number[];
@@ -0,0 +1,3 @@
1
+ import { DataTable } from '../../../chart-data-processor/table-processor';
2
+ import { TableDataOptionsInternal } from '../../../chart-data-options/types';
3
+ export declare const formatNumbers: (table: DataTable, chartDataOptions: TableDataOptionsInternal) => DataTable;
@@ -0,0 +1,13 @@
1
+ import { CompleteThemeSettings } from '../../../types';
2
+ import { TableCustomStyles } from '../types';
3
+ export declare const getCellStyles: ({ colIndex, rowIndex, themeSettings, customStyles, isHeaderCell, }: {
4
+ colIndex?: number | undefined;
5
+ rowIndex?: number | undefined;
6
+ themeSettings: CompleteThemeSettings;
7
+ customStyles?: TableCustomStyles | undefined;
8
+ isHeaderCell?: boolean | undefined;
9
+ }) => {
10
+ color: string;
11
+ backgroundColor: string;
12
+ fontFamily: string;
13
+ };
@@ -0,0 +1,3 @@
1
+ export * from './pure-table';
2
+ export type { TableProps } from './types';
3
+ export type { TableDesignOptions } from '../../chart-options-processor/translations/design-options';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TableProps } from './types';
3
+ /**
4
+ * PureTable Component. Table without any data fetch or aggregation logic.
5
+ *
6
+ * @returns Pure Table component
7
+ */
8
+ export declare const PureTable: ({ dataTable, dataOptions, designOptions, onSortUpdate, themeSettings, width, height, }: TableProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ export declare const HEADER_HEIGHT = 26;
2
+ export declare const ROW_HEIGHT = 26;
3
+ export declare const HEADER_PADDING = 60;
4
+ export declare const DATA_PADDING = 24;
5
+ export declare const EXTRA_PIXELS = 8;
6
+ export declare const MAX_WIDTH = 350;
7
+ export declare const MIN_WIDTH = 126;
8
+ export declare const HEADER_ELLIPSIZED_LENGTH = 38;
9
+ export declare const DATA_ELLIPSIZED_LENGTH = 55;
@@ -0,0 +1,83 @@
1
+ import { Column, DataTable } from '../../chart-data-processor/table-processor';
2
+ import { TableDesignOptions } from '../../chart-options-processor/translations/design-options';
3
+ import { CompleteThemeSettings } from '../../types';
4
+ import { TableDataOptionsInternal } from '../../chart-data-options/types';
5
+ /**
6
+ * Properties needed to setup Table
7
+ *
8
+ * @internal
9
+ */
10
+ export type TableProps = {
11
+ /**
12
+ * Explicit Data, which is made up of an array of columns and a two-dimensional array of data cells.
13
+ *
14
+ */
15
+ dataTable: DataTable;
16
+ /**
17
+ * Configurations for how to interpret and present the data passed to the chart
18
+ *
19
+ * @category Chart
20
+ */
21
+ dataOptions: TableDataOptionsInternal;
22
+ /**
23
+ * Configuration that define functional style of the various chart elements
24
+ *
25
+ */
26
+ designOptions?: TableDesignOptions;
27
+ themeSettings: CompleteThemeSettings;
28
+ /**
29
+ * Callback that calls when sort of column triggered
30
+ *
31
+ */
32
+ onSortUpdate: (column: Column) => void;
33
+ /**
34
+ * Define width of table
35
+ *
36
+ */
37
+ width?: number;
38
+ /**
39
+ * Define height of table
40
+ *
41
+ */
42
+ height?: number;
43
+ };
44
+ export type DataTableWrapperProps = {
45
+ dataTable: DataTable;
46
+ dataOptions: TableDataOptionsInternal;
47
+ isLoading: boolean;
48
+ height: number;
49
+ width: number;
50
+ customStyles?: TableCustomStyles;
51
+ themeSettings: CompleteThemeSettings;
52
+ onSortUpdate: (column: Column) => void;
53
+ };
54
+ export type TableCustomStyles = {
55
+ showFieldTypeIcon?: boolean;
56
+ sortIcon?: 'caret' | 'standard';
57
+ headerHeight?: number;
58
+ rowHeight?: number;
59
+ headersColor?: boolean;
60
+ alternatingRowsColor?: boolean;
61
+ alternatingColumnsColor?: boolean;
62
+ };
63
+ export type TableReducerState = {
64
+ sortedDataTable: DataTable;
65
+ sortedColumn: Column | undefined;
66
+ sortColumns: Column[];
67
+ };
68
+ export type TableReducerBaseAction = {
69
+ type: 'sortBy';
70
+ column: Column;
71
+ };
72
+ export type TableReducerResetAction = {
73
+ type: 'reset';
74
+ dataTable: DataTable;
75
+ defaultSortColumn?: Column;
76
+ };
77
+ export type TableReducerAction = TableReducerBaseAction | TableReducerResetAction;
78
+ export type TableReducerStateWithItems = TableReducerState & {
79
+ items: readonly any[];
80
+ };
81
+ export type TableReducerActionWithItems = TableReducerBaseAction | (TableReducerResetAction & {
82
+ items: readonly any[];
83
+ });
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { ColumnChartProps } from './props';
3
+ /**
4
+ * A React component representing categorical data with vertical rectangular bars
5
+ * whose heights are proportional to the values that they represent.
6
+ * See [Column Chart](https://docs.sisense.com/main/SisenseLinux/column-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
+ * <ColumnChart
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://column-chart-example-1.png" width="800"/>
26
+ * @param props - Column chart properties
27
+ * @returns Column Chart component
28
+ */
29
+ export declare const ColumnChart: import("react").FunctionComponent<ColumnChartProps>;
@@ -0,0 +1,16 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { DashboardWidgetProps } from '../props';
3
+ /**
4
+ * The Dashboard Widget component, which is a thin wrapper on the {@link ChartWidget} component,
5
+ * used to render a widget created in the Sisense instance.
6
+ *
7
+ * @example
8
+ * The example below renders a dashboard widget with the specified widget and dashboard OIDs.
9
+ * ```tsx
10
+ * <DashboardWidget
11
+ * widgetOid={'64473e07dac1920034bce77f'}
12
+ * dashboardOid={'6441e728dac1920034bce737'}
13
+ * />
14
+ * ```
15
+ */
16
+ export declare const DashboardWidget: FunctionComponent<DashboardWidgetProps>;
@@ -0,0 +1,11 @@
1
+ import { ClientApplication } from '../app/client-application';
2
+ import { WidgetDto } from './types';
3
+ /**
4
+ * Fetch a dashboard widget from the default Sisense instance using POC
5
+ * authentication code.
6
+ *
7
+ * @param widgetOid - Widget identifier in Sisense instance
8
+ * @param dashboardOid - Dashboard identifier in Sisense instance
9
+ * @param app - Client application
10
+ */
11
+ export declare function fetchWidget(widgetOid: string, dashboardOid: string, app: ClientApplication): Promise<WidgetDto>;
@@ -0,0 +1,5 @@
1
+ import { DataColorOptions } from '../chart-data/series-data-color-service';
2
+ import { CompleteThemeSettings, ValueToColorMap } from '../types';
3
+ import { PanelColorFormat, PanelMembersFormat } from './types';
4
+ export declare const createValueColorOptions: (format?: PanelColorFormat, themeSettings?: CompleteThemeSettings) => DataColorOptions | undefined;
5
+ export declare const createValueToColorMap: (membersFormat: PanelMembersFormat) => ValueToColorMap;
@@ -0,0 +1,7 @@
1
+ import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure } from '@sisense/sdk-data';
2
+ import { CategoricalChartDataOptions, ScatterChartDataOptions, IndicatorDataOptions, StyledMeasureColumn, StyledColumn, CompleteThemeSettings } from '../types';
3
+ import { Panel, PanelItem, Jaql, WidgetType } from './types';
4
+ import { TableDataOptions } from '../chart-data-options/types';
5
+ export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
6
+ export declare function createDataColumn(item: PanelItem, themeSettings?: CompleteThemeSettings): StyledMeasureColumn | StyledColumn;
7
+ export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], themeSettings?: CompleteThemeSettings): CategoricalChartDataOptions | ScatterChartDataOptions | IndicatorDataOptions | TableDataOptions;
@@ -0,0 +1,3 @@
1
+ import { Panel, WidgetType } from './types';
2
+ import { DrilldownOptions } from '../types';
3
+ export declare const extractDrilldownOptions: (widgetType: WidgetType, panels: Panel[]) => DrilldownOptions;
@@ -0,0 +1,16 @@
1
+ import { Filter } from '@sisense/sdk-data';
2
+ import { FilterJaql, Panel } from './types';
3
+ /**
4
+ * Creates a Filter from a FilterJaql object.
5
+ *
6
+ * @param jaql - The filter JAQL object.
7
+ * @returns - The created Filter object.
8
+ */
9
+ export declare function createFilterFromJaql(jaql: FilterJaql): Filter;
10
+ /**
11
+ * Extracts filters from the widget panel.
12
+ *
13
+ * @param {Panel[]} panels - The array of panels.
14
+ * @returns {Filter[]} - The extracted filters.
15
+ */
16
+ export declare function extractFilters(panels: Panel[]): Filter[];
@@ -0,0 +1,5 @@
1
+ import { StyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions } from '../types';
2
+ import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
3
+ export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
4
+ export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
5
+ export declare function extractStyleOptions(widgetType: WidgetType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): StyleOptions | TableStyleOptions;
@@ -0,0 +1,12 @@
1
+ import { CompleteThemeSettings } from '../types';
2
+ import { WidgetDto } from './types';
3
+ import { ChartWidgetProps, TableWidgetProps } from '../props';
4
+ export type TableWidgetExtractedProps = {
5
+ type: 'table';
6
+ props: TableWidgetProps;
7
+ };
8
+ export type ChartWidgetExtractedProps = {
9
+ type: 'chart';
10
+ props: ChartWidgetProps;
11
+ };
12
+ export declare function extractWidgetProps(widget: WidgetDto, themeSettings?: CompleteThemeSettings): TableWidgetExtractedProps | ChartWidgetExtractedProps;