@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,5 @@
1
+ import type { DateFormat } from './apply-date-format';
2
+ declare const angularTextDates: readonly ["shortDate", "shortTime", "short", "mediumDate", "mediumTime", "medium", "longDate", "fullDate"];
3
+ export type AngularTextDate = (typeof angularTextDates)[number];
4
+ export declare function newDateFormatWithExpandedAngularTextFormats(oldFormat: DateFormat, locale: Locale): DateFormat;
5
+ export {};
@@ -0,0 +1,65 @@
1
+ import type { Locale } from 'date-fns';
2
+ export type DateFormat = string;
3
+ declare const dateLevels: readonly ["years", "quarters", "months", "weeks", "days", "dateAndTime", "minutes"];
4
+ /** @expandType */
5
+ export type DateLevel = (typeof dateLevels)[number];
6
+ export declare const YEARS: DateLevel;
7
+ export declare const QUARTERS: DateLevel;
8
+ export declare const MONTHS: DateLevel;
9
+ export declare const WEEKS: DateLevel;
10
+ export declare const DAYS: DateLevel;
11
+ export declare const DATE_AND_TIME: DateLevel;
12
+ export declare const MINUTES: DateLevel;
13
+ export type MonthOfYear = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
14
+ export declare const JAN: MonthOfYear;
15
+ export declare const FEB: MonthOfYear;
16
+ export declare const MAR: MonthOfYear;
17
+ export declare const APR: MonthOfYear;
18
+ export declare const MAY: MonthOfYear;
19
+ export declare const JUN: MonthOfYear;
20
+ export declare const JUL: MonthOfYear;
21
+ export declare const AUG: MonthOfYear;
22
+ export declare const SEP: MonthOfYear;
23
+ export declare const OCT: MonthOfYear;
24
+ export declare const NOV: MonthOfYear;
25
+ export declare const DEC: MonthOfYear;
26
+ export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
27
+ export declare const SUN: DayOfWeek;
28
+ export declare const MON: DayOfWeek;
29
+ export declare const TUE: DayOfWeek;
30
+ export declare const WED: DayOfWeek;
31
+ export declare const THU: DayOfWeek;
32
+ export declare const FRI: DayOfWeek;
33
+ export declare const SAT: DayOfWeek;
34
+ /**
35
+ * Date configurations
36
+ */
37
+ export type DateConfig = {
38
+ /** Boolean flag whether fiscal year is enabled */
39
+ isFiscalOn: boolean;
40
+ /** First month of the fiscal year that is configured */
41
+ fiscalMonth: MonthOfYear;
42
+ /**
43
+ * First day of the week
44
+ */
45
+ weekFirstDay: DayOfWeek;
46
+ /**
47
+ * The selected date level for this particular column of data
48
+ */
49
+ selectedDateLevel: DateLevel;
50
+ /**
51
+ * The IANA time zone
52
+ */
53
+ timeZone: string;
54
+ };
55
+ export declare const defaultDateConfig: DateConfig;
56
+ /**
57
+ * Returns a formatted date, according to the provided date format string.
58
+ *
59
+ * @param date -
60
+ * @param format -
61
+ * @param locale -
62
+ * @param cfg -
63
+ */
64
+ export declare function applyDateFormat(date: Date, format: DateFormat, locale?: Locale, cfg?: DateConfig): string;
65
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { DateFormat, DateLevel, MonthOfYear } from './apply-date-format';
2
+ export declare function subtractYearForFiscal(date: Date, selectedDateLevel: DateLevel, fiscalMonth: MonthOfYear): Date;
3
+ export declare function shiftMonthForFiscal(date: Date, fiscalMonth: MonthOfYear): Date;
4
+ /**
5
+ * Substitutes any y, yy, yyyy, yyyp, yp masks with their numeric text and
6
+ * returns a new date format string.
7
+ *
8
+ * Takes into consideration:
9
+ * - the configured start month of the customer's fiscal year
10
+ * - the currently selected date level for this particular column of data
11
+ *
12
+ * @param oldFormat
13
+ * @param date
14
+ * @param timeZone
15
+ * @param selectedDateLevel
16
+ * @param isFiscalOn
17
+ * @param fiscalMonth
18
+ */
19
+ export declare function newDateFormatWithExpandedYearsMasks(oldFormat: DateFormat, date: Date, timeZone: string, selectedDateLevel: DateLevel, isFiscalOn: boolean, fiscalMonth: MonthOfYear): DateFormat;
20
+ /**
21
+ * Substitutes any QQ or Q with their escaped text describing the quarter number and
22
+ * returns a new date format string.
23
+ *
24
+ * Takes into consideration:
25
+ * - the configured start month of the customer's fiscal year
26
+ * - the currently selected date level for this particular column of data
27
+ *
28
+ * @param oldFormat
29
+ * @param date
30
+ * @param selectedDateLevel
31
+ * @param fiscalMonth
32
+ */
33
+ export declare function newDateFormatWithExpandedQuartersMasks(oldFormat: DateFormat, date: Date, selectedDateLevel: DateLevel, fiscalMonth: MonthOfYear): DateFormat;
@@ -0,0 +1,2 @@
1
+ export type { DateFormat, DateConfig } from './apply-date-format';
2
+ export { applyDateFormat, defaultDateConfig } from './apply-date-format';
@@ -0,0 +1,16 @@
1
+ import type { DateFormat } from './apply-date-format';
2
+ type replacement = string;
3
+ type getReplacementFn = (matchForSearchText: string) => replacement;
4
+ /**
5
+ * Returns a new date format string.
6
+ *
7
+ * If `searchText` is found in `oldDateFormat`, then
8
+ * all occurrences of `searchText` are replaced. The replacement text
9
+ * will be whatever is returned by the `getReplacement` function.
10
+ *
11
+ * @param oldDateFormat
12
+ * @param searchText
13
+ * @param getReplacement
14
+ */
15
+ export declare function newDateFormat(oldDateFormat: DateFormat, searchText: string, getReplacement: getReplacementFn): DateFormat;
16
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { DateFormat } from './apply-date-format';
2
+ export declare function newDateFormatWithUnicodeMillisecondsMasks(oldFormat: DateFormat): DateFormat;
3
+ export declare function newDateFormatWithExpandedAMPM(oldFormat: DateFormat, date: Date, timeZone: string): DateFormat;
4
+ export declare function newDateFormatWithExpandedTimezoneOffset(oldFormat: DateFormat, date: Date, timeZone: string, locale: Locale): DateFormat;
@@ -0,0 +1,8 @@
1
+ import { Attribute, DataSource, Filter, Measure, QueryResultData } from '@sisense/sdk-data';
2
+ import { ClientApplication } from '../app/client-application';
3
+ /** @internal */
4
+ export declare const QUERY_DEFAULT_LIMIT = 20000;
5
+ /** @internal */
6
+ export declare const QUERY_DEFAULT_OFFSET = 0;
7
+ /** @internal */
8
+ export declare const executeQuery: (dataSource: DataSource | undefined, dimensions: Attribute[] | undefined, measures: Measure[] | undefined, filters: Filter[] | undefined, highlights: Filter[] | undefined, app: ClientApplication, count?: number, offset?: number) => Promise<QueryResultData>;
@@ -0,0 +1,5 @@
1
+ import type { Locale } from 'date-fns';
2
+ import { Data } from '@sisense/sdk-data';
3
+ import type { DateConfig } from './date-formats';
4
+ import type { QueryResultData } from '@sisense/sdk-data';
5
+ export declare function applyDateFormats(data: QueryResultData | Data, chartDataOptions: any, locale?: Locale, dateConfig?: DateConfig): QueryResultData | Data;
@@ -0,0 +1,29 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { ExecuteQueryByWidgetIdProps } from '../props';
3
+ /**
4
+ * Executes a query over the existing widget and renders a function as child component.
5
+ * The child component is passed the results of the query.
6
+ *
7
+ * This component takes the Children Prop Pattern and
8
+ * offers an alternative approach to the {@link useExecuteQueryByWidgetId} hook.
9
+ *
10
+ * @example
11
+ * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs.
12
+ * ```tsx
13
+ * <ExecuteQueryByWidgetId
14
+ * widgetOid={'64473e07dac1920034bce77f'}
15
+ * dashboardOid={'6441e728dac1920034bce737'}
16
+ * >
17
+ * {
18
+ * (data, query) => {
19
+ * if (data) {
20
+ * return <div>{`Total Rows: ${data.rows.length}`}</div>;
21
+ * }
22
+ * }
23
+ * }
24
+ * </ExecuteQueryByWidgetId>
25
+ * ```
26
+ * @param props - ExecuteQueryByWidgetId properties
27
+ * @returns ExecuteQueryByWidgetId component
28
+ */
29
+ export declare const ExecuteQueryByWidgetId: FunctionComponent<ExecuteQueryByWidgetIdProps>;
@@ -0,0 +1,32 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { ExecuteQueryProps } from '../props';
3
+ /**
4
+ * Executes a query and renders a function as child component. The child
5
+ * component is passed the results of the query.
6
+ *
7
+ * This component takes the Children Prop Pattern and
8
+ * offers an alternative approach to the {@link useExecuteQuery} hook.
9
+ *
10
+ * @example
11
+ * Example of using the component to query the `Sample ECommerce` data source:
12
+ * ```tsx
13
+ * <ExecuteQuery
14
+ * dataSource={DM.DataSource}
15
+ * dimensions={[DM.Commerce.AgeRange]}
16
+ * measures={[measures.sum(DM.Commerce.Revenue)]}
17
+ * filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
18
+ * >
19
+ * {
20
+ * (data) => {
21
+ * if (data) {
22
+ * console.log(data);
23
+ * return <div>{`Total Rows: ${data.rows.length}`}</div>;
24
+ * }
25
+ * }
26
+ * }
27
+ * </ExecuteQuery>
28
+ * ```
29
+ * @param props - ExecuteQuery properties
30
+ * @returns ExecuteQuery component
31
+ */
32
+ export declare const ExecuteQuery: FunctionComponent<ExecuteQueryProps>;
@@ -0,0 +1,5 @@
1
+ export { ExecuteQuery } from './execute-query';
2
+ export { useExecuteQuery, type ExecuteQueryParams } from './use-execute-query';
3
+ export { ExecuteQueryByWidgetId } from './execute-query-by-widget-id';
4
+ export { useExecuteQueryByWidgetId, type ExecuteQueryByWidgetIdParams, type QueryByWidgetIdState, executeQueryByWidgetId, } from './use-execute-query-by-widget-id';
5
+ export type { QueryState, QueryLoadingState, QuerySuccessState, QueryErrorState, } from './query-state-reducer';
@@ -0,0 +1,66 @@
1
+ import { QueryResultData } from '@sisense/sdk-data';
2
+ /**
3
+ * State of a query execution.
4
+ */
5
+ export type QueryState = QueryLoadingState | QueryErrorState | QuerySuccessState;
6
+ /**
7
+ * State of a query execution that is loading.
8
+ */
9
+ export type QueryLoadingState = {
10
+ /** Whether the query is loading */
11
+ isLoading: true;
12
+ /** Whether the query has failed */
13
+ isError: false;
14
+ /** Whether the query has succeeded */
15
+ isSuccess: false;
16
+ /** The error if any occurred */
17
+ error: undefined;
18
+ /** The result data if the query has succeeded */
19
+ data: QueryResultData | undefined;
20
+ /** The status of the query execution */
21
+ status: 'loading';
22
+ };
23
+ /**
24
+ * State of a query execution that has failed.
25
+ */
26
+ export type QueryErrorState = {
27
+ /** Whether the query is loading */
28
+ isLoading: false;
29
+ /** Whether the query has failed */
30
+ isError: true;
31
+ /** Whether the query has succeeded */
32
+ isSuccess: false;
33
+ /** The error if any occurred */
34
+ error: Error;
35
+ /** The result data if the query has succeeded */
36
+ data: undefined;
37
+ /** The status of the query execution */
38
+ status: 'error';
39
+ };
40
+ /**
41
+ * State of a query execution that has succeeded.
42
+ */
43
+ export type QuerySuccessState = {
44
+ /** Whether the query is loading */
45
+ isLoading: false;
46
+ /** Whether the query has failed */
47
+ isError: false;
48
+ /** Whether the query has succeeded */
49
+ isSuccess: true;
50
+ /** The error if any occurred */
51
+ error: undefined;
52
+ /** The result data if the query has succeeded */
53
+ data: QueryResultData;
54
+ /** The status of the query execution */
55
+ status: 'success';
56
+ };
57
+ export type QueryAction = {
58
+ type: 'loading';
59
+ } | {
60
+ type: 'success';
61
+ data: QueryResultData;
62
+ } | {
63
+ type: 'error';
64
+ error: Error;
65
+ };
66
+ export declare function queryStateReducer(state: QueryState, action: QueryAction): QueryState;
@@ -0,0 +1,71 @@
1
+ import { type Filter } from '@sisense/sdk-data';
2
+ import { ExecuteQueryParams } from './index.js';
3
+ import { QueryState } from './query-state-reducer.js';
4
+ import { FiltersMergeStrategy } from '../dashboard-widget/types.js';
5
+ import { ClientApplication } from '../app/client-application.js';
6
+ /**
7
+ * Parameters for {@link useExecuteQueryByWidgetId} hook.
8
+ */
9
+ export interface ExecuteQueryByWidgetIdParams {
10
+ /** {@inheritDoc ExecuteQueryByWidgetIdProps.widgetOid} */
11
+ widgetOid: string;
12
+ /** {@inheritDoc ExecuteQueryByWidgetIdProps.dashboardOid} */
13
+ dashboardOid: string;
14
+ /** {@inheritDoc ExecuteQueryByWidgetIdProps.filters} */
15
+ filters?: Filter[];
16
+ /** {@inheritDoc ExecuteQueryByWidgetIdProps.highlights} */
17
+ highlights?: Filter[];
18
+ /** {@inheritDoc ExecuteQueryProps.count} */
19
+ count?: number;
20
+ /** {@inheritDoc ExecuteQueryProps.offset} */
21
+ offset?: number;
22
+ /** {@inheritDoc ExecuteQueryByWidgetIdProps.filtersMergeStrategy} */
23
+ filtersMergeStrategy?: FiltersMergeStrategy;
24
+ }
25
+ export type QueryByWidgetIdState = QueryState & {
26
+ /** Query parameters constructed over the widget */
27
+ query: ExecuteQueryParams | undefined;
28
+ };
29
+ /**
30
+ * React hook that executes a data query extracted from an existing widget in the Sisense instance.
31
+ *
32
+ * This approach, which offers an alternative to {@link ExecuteQueryByWidgetId} component, is similar to React Query's `useQuery` hook.
33
+ *
34
+ *
35
+ * @example
36
+ * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs.
37
+ ```tsx
38
+ const { data, isLoading, isError } = useExecuteQueryByWidgetId({
39
+ widgetOid: '64473e07dac1920034bce77f'
40
+ dashboardOid: '6441e728dac1920034bce737'
41
+ });
42
+ if (isLoading) {
43
+ return <div>Loading...</div>;
44
+ }
45
+ if (isError) {
46
+ return <div>Error</div>;
47
+ }
48
+ if (data) {
49
+ return <div>{`Total Rows: ${data.rows.length}`}</div>;
50
+ }
51
+ return null;
52
+ ```
53
+ * See also hook {@link useExecuteQuery}, which execute a query specified in code.
54
+ * @param params - Parameters to identify the target widget
55
+ * @returns Query state that contains the status of the query execution, the result data, the constructed query parameters, or the error if any occurred
56
+ */
57
+ export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
58
+ /**
59
+ * Checks if the parameters have changed by deep comparison.
60
+ *
61
+ * @param prevParams - Previous query parameters
62
+ * @param newParams - New query parameters
63
+ */
64
+ export declare function isParamsChanged(prevParams: ExecuteQueryByWidgetIdParams | undefined, newParams: ExecuteQueryByWidgetIdParams): boolean;
65
+ /** @internal */
66
+ export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, app, }: ExecuteQueryByWidgetIdParams & {
67
+ app: ClientApplication;
68
+ }): Promise<{
69
+ data: import("@sisense/sdk-data").QueryResultData;
70
+ query: ExecuteQueryParams;
71
+ }>;
@@ -0,0 +1,70 @@
1
+ import { Attribute, DataSource, Filter, Measure } from '@sisense/sdk-data';
2
+ import { QueryState } from './query-state-reducer';
3
+ /**
4
+ * Parameters for {@link useExecuteQuery} hook.
5
+ */
6
+ export type ExecuteQueryParams = {
7
+ /**
8
+ * Data source the query is run against - e.g. `Sample ECommerce`
9
+ *
10
+ * If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
11
+ */
12
+ dataSource?: DataSource;
13
+ /** Dimensions of the query */
14
+ dimensions?: Attribute[];
15
+ /** Measures of the query */
16
+ measures?: Measure[];
17
+ /** Filters that will slice query results */
18
+ filters?: Filter[];
19
+ /** Highlight filters that will highlight results that pass filter criteria */
20
+ highlights?: Filter[];
21
+ /** {@inheritDoc ExecuteQueryProps.count} */
22
+ count?: number;
23
+ /** {@inheritDoc ExecuteQueryProps.offset} */
24
+ offset?: number;
25
+ /**
26
+ * Boolean flag to control if query is executed
27
+ *
28
+ * If not specified, the default value is `true`
29
+ */
30
+ enabled?: boolean;
31
+ };
32
+ /**
33
+ * React hook that executes a data query.
34
+ * This approach, which offers an alternative to {@link ExecuteQuery} component, is similar to React Query's `useQuery` hook.
35
+ *
36
+ * @example
37
+ ```tsx
38
+ const { data, isLoading, isError } = useExecuteQuery({
39
+ dataSource: DM.DataSource,
40
+ dimensions: [DM.Commerce.AgeRange],
41
+ measures: [measures.sum(DM.Commerce.Revenue)],
42
+ filters: [filters.greaterThan(DM.Commerce.Revenue, 1000)],
43
+ });
44
+ if (isLoading) {
45
+ return <div>Loading...</div>;
46
+ }
47
+ if (isError) {
48
+ return <div>Error</div>;
49
+ }
50
+ if (data) {
51
+ return <div>{`Total Rows: ${data.rows.length}`}</div>;
52
+ }
53
+ return null;
54
+ ```
55
+
56
+ * See also hook {@link useExecuteQueryByWidgetId}, which extracts data from an existing widget in the Sisense instance.
57
+ *
58
+ * See [this blog post]( https://www.sisense.com/blog/take-control-of-your-data-visualizations/) for examples
59
+ * of using the hook to fetch data from Sisense for third-party charts.
60
+ * @param params - Parameters of the query
61
+ * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
62
+ */
63
+ export declare const useExecuteQuery: (params: ExecuteQueryParams) => QueryState;
64
+ /**
65
+ * Hook that returns the value from the previous render.
66
+ *
67
+ * @param value - Value to return from the previous render.
68
+ * @returns Value from the previous render.
69
+ */
70
+ export declare function usePrevious<T>(value: T): T | undefined;
@@ -0,0 +1,9 @@
1
+ import type { ExecuteQueryParams } from './index';
2
+ import type { WidgetDto } from '../dashboard-widget/types';
3
+ /**
4
+ * Extracts query parameters from a widget object.
5
+ *
6
+ * @param {WidgetDto} widget - The widget from which to extract query parameters.
7
+ * @returns {ExecuteQueryParams} An object containing extracted query parameters.
8
+ */
9
+ export declare function extractQueryFromWidget(widget: WidgetDto): ExecuteQueryParams;
@@ -0,0 +1,68 @@
1
+ /// <reference types="react" />
2
+ import { ScatterChartProps } from './props';
3
+ /**
4
+ * A React component displaying the distribution of two variables on an X-Axis, Y-Axis,
5
+ * and two additional fields of data that are shown as colored circles scattered across the chart.
6
+ *
7
+ * **Point**: A field that for each of its members a scatter point is drawn. The maximum amount of data points is 500.
8
+ *
9
+ * **Size**: An optional field represented by the size of the circles.
10
+ * If omitted, all scatter points are equal in size. If used, the circle size is relative to their value.
11
+ *
12
+ * See [Scatter Chart](https://docs.sisense.com/main/SisenseLinux/scatter-chart.htm) for more information.
13
+ *
14
+ * @example
15
+ * An example of using the component to visualize the `Sample ECommerce` data source.
16
+ *
17
+ * The chart shows top Categories by Total Revenue on the x-axis, and Total Quantity on the y-axis in logarithmic scale
18
+ * with Gender breakdown by color and Total Cost encoded by the size of the bubbles.
19
+ * ```tsx
20
+ * <ScatterChart
21
+ * dataSet={DM.DataSource}
22
+ * filters={[filters.greaterThan(DM.Commerce.Revenue, 10)]}
23
+ * dataOptions={{
24
+ * x: measures.sum(DM.Commerce.Revenue),
25
+ * y: measures.sum(DM.Commerce.Quantity),
26
+ * breakByPoint: DM.Category.Category,
27
+ * breakByColor: DM.Commerce.Gender,
28
+ * size: measures.sum(DM.Commerce.Cost),
29
+ * }}
30
+ * styleOptions={{
31
+ * xAxis: {
32
+ * enabled: true,
33
+ * gridLines: true,
34
+ * isIntervalEnabled: false,
35
+ * labels: {
36
+ * enabled: true,
37
+ * },
38
+ * logarithmic: true,
39
+ * title: {
40
+ * enabled: true,
41
+ * text: 'Total Revenue',
42
+ * },
43
+ * },
44
+ * yAxis: {
45
+ * enabled: true,
46
+ * gridLines: true,
47
+ * isIntervalEnabled: false,
48
+ * labels: {
49
+ * enabled: true,
50
+ * },
51
+ * logarithmic: true,
52
+ * title: {
53
+ * enabled: true,
54
+ * text: 'Total Quantity',
55
+ * },
56
+ * },
57
+ * }}
58
+ * onDataPointClick={(point, nativeEvent) => {
59
+ * console.log('clicked', point, nativeEvent);
60
+ * }}
61
+ * />
62
+ * ```
63
+ *
64
+ * <img src="media://scatter-chart-example-1.png" width="800px" />
65
+ * @param props - Scatter chart properties
66
+ * @returns Scatter Chart component
67
+ */
68
+ export declare const ScatterChart: import("react").FunctionComponent<ScatterChartProps>;
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { ChartDataOptionsInternal } from './chart-data-options/types';
3
+ import { ChartData } from './chart-data/types';
4
+ import { DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler } from './chart-options-processor/apply-event-handlers';
5
+ import { BeforeRenderHandler } from './props';
6
+ import { ChartDesignOptions } from './chart-options-processor/translations/types';
7
+ import { ChartType, CompleteThemeSettings } from './types';
8
+ interface Props {
9
+ chartType: ChartType;
10
+ chartData: ChartData;
11
+ chartDataOptions: ChartDataOptionsInternal;
12
+ designOptions: ChartDesignOptions;
13
+ themeSettings?: CompleteThemeSettings;
14
+ onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler;
15
+ onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler;
16
+ onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
17
+ onBeforeRender?: BeforeRenderHandler;
18
+ }
19
+ /**
20
+ * @internal
21
+ */
22
+ export declare const SisenseChart: ({ chartType, chartData, chartDataOptions, designOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: Props) => JSX.Element | null;
23
+ export {};
@@ -0,0 +1,19 @@
1
+ import { PropsWithChildren, type FunctionComponent } from 'react';
2
+ import { SisenseContextPayload } from './sisense-context';
3
+ /** @internal */
4
+ export type CustomSisenseContext = SisenseContextPayload & {
5
+ showRuntimeErrors: boolean;
6
+ };
7
+ /** @internal */
8
+ export type CustomSisenseContextProviderProps = {
9
+ context?: CustomSisenseContext;
10
+ error?: Error;
11
+ };
12
+ /**
13
+ * Custom Sisense Context Provider component that allows passing external context.
14
+ *
15
+ * Note: it specifically designed to serve as a bridge for passing context between an external wrapper and child React components.
16
+ *
17
+ * @internal
18
+ */
19
+ export declare const CustomSisenseContextProvider: FunctionComponent<PropsWithChildren<CustomSisenseContextProviderProps>>;
@@ -0,0 +1,36 @@
1
+ import { PropsWithChildren, type FunctionComponent } from 'react';
2
+ import { SisenseContextProviderProps } from '../props';
3
+ /**
4
+ * Sisense Context Provider Component allowing you to connect to
5
+ * a Sisense instance and provide that context
6
+ * to all Compose SDK components in your application.
7
+ *
8
+ * @example
9
+ * Add SisenseContextProvider to the main component of your app as below and then wrap
10
+ * other SDK components inside this component.
11
+ *
12
+ * ```tsx
13
+ * import { Chart, SisenseContextProvider } from '@sisense/sdk-ui';
14
+ * import * as DM from './sample-ecommerce';
15
+ * import { measures } from '@sisense/sdk-data';
16
+ *
17
+ * function App() {
18
+ * return (
19
+ * <>
20
+ * <SisenseContextProvider
21
+ * url="<instance url>" // replace with the URL of your Sisense instance
22
+ * token="<api token>" // replace with the API token of your user account
23
+ * >
24
+ * <OtherComponent1/>
25
+ * <OtherComponent2/>
26
+ * </SisenseContextProvider>
27
+ * </>
28
+ * );
29
+ * }
30
+ *
31
+ * export default App;
32
+ * ```
33
+ * @param props - Sisense context provider props
34
+ * @returns A Sisense Context Provider Component
35
+ */
36
+ export declare const SisenseContextProvider: FunctionComponent<PropsWithChildren<SisenseContextProviderProps>>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ClientApplication } from '../app/client-application';
3
+ export type SisenseContextPayload = {
4
+ isInitialized: boolean;
5
+ app?: ClientApplication;
6
+ enableTracking: boolean;
7
+ };
8
+ export declare const SisenseContext: import("react").Context<SisenseContextPayload>;
9
+ export declare const useSisenseContext: () => SisenseContextPayload;
@@ -0,0 +1,11 @@
1
+ import { Data, DataSource, Filter } from '@sisense/sdk-data';
2
+ import { TableDataOptionsInternal } from '../../chart-data-options/types';
3
+ type UseDataProps = {
4
+ dataSet: Data | DataSource | undefined;
5
+ dataOptions: TableDataOptionsInternal | null;
6
+ filters: Filter[] | undefined;
7
+ count: number;
8
+ offset: number;
9
+ };
10
+ export declare const useTableData: ({ dataSet, dataOptions, filters, count, offset, }: UseDataProps) => Data | null;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Data } from '@sisense/sdk-data';
2
+ import { TableDataOptionsInternal } from '../../chart-data-options/types';
3
+ import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
4
+ type UseTableDataTableProps = {
5
+ data: null | Data;
6
+ innerDataOptions: TableDataOptionsInternal | null;
7
+ dataColumnNamesMapping: DataColumnNamesMapping;
8
+ needToAggregate?: boolean;
9
+ };
10
+ export declare const useTableDataTable: ({ data, innerDataOptions, dataColumnNamesMapping, needToAggregate, }: UseTableDataTableProps) => import("../../chart-data-processor/table-processor").DataTable | null;
11
+ export {};
@@ -0,0 +1 @@
1
+ export { Table } from './table';
@@ -0,0 +1,10 @@
1
+ import { CompleteThemeSettings } from '../../types';
2
+ export declare const getCustomPaginationStyles: (themeSettings: CompleteThemeSettings) => {
3
+ '& .MuiPaginationItem-circular.Mui-selected': {
4
+ color: string;
5
+ };
6
+ '& .MuiPaginationItem-circular': {
7
+ color: string;
8
+ fontFamily: string;
9
+ };
10
+ };