@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,336 @@
1
+ export declare const enum WidgetType {
2
+ PieChart = "chart/pie",
3
+ ColumnChart = "chart/column",
4
+ BarChart = "chart/bar",
5
+ LineChart = "chart/line",
6
+ AreaChart = "chart/area",
7
+ FunnelChart = "chart/funnel",
8
+ TreemapChart = "treemap",
9
+ ScatterChart = "chart/scatter",
10
+ IndicatorChart = "indicator",
11
+ PolarChart = "chart/polar",
12
+ Table = "tablewidget",
13
+ TableWithAggregation = "tablewidgetagg"
14
+ }
15
+ export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap';
16
+ /**
17
+ * The data transfer object (DTO) containing info of a widget on a dashboard.
18
+ *
19
+ * This is the (not-comprehensive) structure of the response from the
20
+ * `/api/v1/dashboards/${dashboardOid}/widgets/${widgetOid}` endpoint.
21
+ */
22
+ export interface WidgetDto {
23
+ oid: string;
24
+ type: WidgetType | string;
25
+ subtype: WidgetSubtype | string;
26
+ datasource: {
27
+ title: string;
28
+ id: string;
29
+ fullname: string;
30
+ live: boolean;
31
+ };
32
+ metadata: {
33
+ panels: Panel[];
34
+ };
35
+ style: WidgetStyle;
36
+ title: string;
37
+ desc: string;
38
+ }
39
+ export declare const enum DataType {
40
+ TEXT = "text",
41
+ NUMERIC = "numeric",
42
+ DATETIME = "datetime"
43
+ }
44
+ export type Panel = {
45
+ name: string;
46
+ items: PanelItem[];
47
+ };
48
+ export declare enum SortDirection {
49
+ ASC = "asc",
50
+ DESC = "desc"
51
+ }
52
+ export type BaseJaql = {
53
+ agg?: string;
54
+ datatype: DataType;
55
+ dim: string;
56
+ table: string;
57
+ column: string;
58
+ title: string;
59
+ level?: 'years' | 'quarters' | 'months' | 'weeks' | 'minutes' | 'days';
60
+ sort?: SortDirection;
61
+ };
62
+ type FormulaID = string;
63
+ type FormulaContext = BaseJaql | FilterJaql;
64
+ export type FormulaJaql = {
65
+ type?: 'measure';
66
+ sort?: SortDirection;
67
+ title: string;
68
+ formula: string;
69
+ context?: Record<FormulaID, FormulaContext>;
70
+ };
71
+ type IncludeAllFilter = {
72
+ all: true;
73
+ };
74
+ export type IncludeMembersFilter = {
75
+ members: string[];
76
+ };
77
+ type ExcludeMembersFilter = {
78
+ exclude: {
79
+ members: string[];
80
+ };
81
+ };
82
+ export type MembersFilter = IncludeMembersFilter | ExcludeMembersFilter;
83
+ type BaseFilter = IncludeAllFilter | MembersFilter;
84
+ type BackgroundFilter = BaseFilter;
85
+ type TurnOffMembersFilter = ExcludeMembersFilter & {
86
+ turnedOff: boolean;
87
+ };
88
+ type Filter = BaseFilter & {
89
+ filter?: BackgroundFilter | TurnOffMembersFilter;
90
+ };
91
+ export type FilterJaql = BaseJaql & {
92
+ filter: Filter;
93
+ };
94
+ export type Jaql = BaseJaql | FormulaJaql | FilterJaql;
95
+ type SeriesType = 'auto' | 'line' | 'spline' | 'areaspline' | 'bar' | 'area' | 'column';
96
+ interface DecimalAbbreviations {
97
+ k: boolean;
98
+ m: boolean;
99
+ b: boolean;
100
+ t: boolean;
101
+ }
102
+ export declare enum CurrencyPosition {
103
+ PRE = "pre",
104
+ POST = "post"
105
+ }
106
+ export type NumericMask = {
107
+ isdefault?: boolean;
108
+ abbreviations?: DecimalAbbreviations;
109
+ decimals?: 'auto' | number;
110
+ currency?: {
111
+ symbol: string;
112
+ position: CurrencyPosition;
113
+ };
114
+ percent?: boolean;
115
+ number?: {
116
+ separated: boolean;
117
+ };
118
+ separated?: boolean;
119
+ type?: string;
120
+ };
121
+ export type DatetimeMask = {
122
+ isdefault?: boolean;
123
+ years: string;
124
+ quarters: string;
125
+ months: string;
126
+ weeks: string;
127
+ minutes: string;
128
+ days: string;
129
+ type: string;
130
+ dateAndTime?: string;
131
+ };
132
+ export type PanelItem = {
133
+ format?: {
134
+ color?: PanelColorFormat;
135
+ mask?: DatetimeMask | NumericMask;
136
+ members?: PanelMembersFormat;
137
+ };
138
+ jaql: Jaql;
139
+ disabled?: boolean;
140
+ y2?: boolean;
141
+ parent?: PanelItem;
142
+ through?: PanelItem;
143
+ singleSeriesType?: SeriesType;
144
+ categoriesSorting?: SortDirection;
145
+ isColored?: boolean;
146
+ };
147
+ export type PanelColorFormat = PanelColorFormatSingle | PanelColorFormatRange | PanelColorFormatConditional;
148
+ export type PanelMembersFormat = Record<string, {
149
+ color: string;
150
+ }>;
151
+ export type PanelColorFormatSingle = {
152
+ type: 'color';
153
+ color?: string;
154
+ colorIndex?: number;
155
+ };
156
+ export type PanelColorFormatRange = {
157
+ type: 'range';
158
+ steps: number;
159
+ rangeMode: 'min' | 'max' | 'both' | 'auto';
160
+ min?: string;
161
+ max?: string;
162
+ minvalue?: string | null;
163
+ midvalue?: string | null;
164
+ maxvalue?: string | null;
165
+ };
166
+ export type PanelColorFormatConditional = {
167
+ type: 'condition';
168
+ conditions: PanelColorFormatCondition[];
169
+ };
170
+ export type PanelColorFormatCondition = PanelColorFormatConditionSimple | PanelColorFormatConditionJaql;
171
+ export type PanelColorFormatConditionSimple = {
172
+ color: string;
173
+ expression: string;
174
+ operator: PanelColorFormatConditionOperator;
175
+ };
176
+ export type PanelColorFormatConditionJaql = {
177
+ color: string;
178
+ expression: {
179
+ jaql: unknown;
180
+ };
181
+ operator: PanelColorFormatConditionOperator;
182
+ };
183
+ export type PanelColorFormatConditionOperator = '<' | '>' | '≤' | '<=' | '≥' | '>=' | '=' | '≠' | '!=';
184
+ type LabelsStyle = {
185
+ enabled: boolean;
186
+ rotation: number;
187
+ };
188
+ type AxisTitleStyle = {
189
+ enabled: boolean;
190
+ text?: string;
191
+ };
192
+ export type AxisStyle = {
193
+ enabled: boolean;
194
+ ticks: boolean;
195
+ labels: LabelsStyle;
196
+ title?: AxisTitleStyle;
197
+ gridLines: boolean;
198
+ isIntervalEnabled: boolean;
199
+ logarithmic?: boolean;
200
+ min?: number | null;
201
+ max?: number | null;
202
+ };
203
+ type BaseWidgetStyle = {
204
+ legend: {
205
+ position: string;
206
+ enabled: boolean;
207
+ };
208
+ navigator: {
209
+ enabled: boolean;
210
+ };
211
+ };
212
+ export type CartesianWidgetStyle = BaseWidgetStyle & {
213
+ seriesLabels: LabelsStyle;
214
+ xAxis: AxisStyle & {
215
+ x2Title?: AxisTitleStyle;
216
+ };
217
+ yAxis: AxisStyle;
218
+ y2Axis?: AxisStyle;
219
+ lineWidth?: {
220
+ width: string;
221
+ };
222
+ markers?: {
223
+ enabled: boolean;
224
+ size: number;
225
+ fill: string;
226
+ };
227
+ };
228
+ export type PolarWidgetStyle = BaseWidgetStyle & {
229
+ categories?: AxisStyle;
230
+ axis?: AxisStyle;
231
+ };
232
+ type ScatterMarkerSize = {
233
+ defaultSize: number;
234
+ min: number;
235
+ max: number;
236
+ };
237
+ export type ScatterWidgetStyle = BaseWidgetStyle & {
238
+ xAxis: AxisStyle;
239
+ yAxis: AxisStyle;
240
+ markerSize?: ScatterMarkerSize;
241
+ };
242
+ export type FunnelWidgetStyle = BaseWidgetStyle & {
243
+ size: string;
244
+ type: string;
245
+ direction: string;
246
+ labels: {
247
+ enabled: boolean;
248
+ categories: boolean;
249
+ percent: boolean;
250
+ value: boolean;
251
+ decimals: boolean;
252
+ };
253
+ };
254
+ export type TableWidgetStyle = {
255
+ 'colors/columns': boolean;
256
+ 'colors/headers': boolean;
257
+ 'colors/rows': boolean;
258
+ };
259
+ export type IndicatorWidgetStyle = {
260
+ 'indicator/gauge': {
261
+ subtype: string;
262
+ skin: string;
263
+ components: {
264
+ ticks: {
265
+ inactive: boolean;
266
+ enabled: boolean;
267
+ };
268
+ labels: {
269
+ inactive: boolean;
270
+ enabled: boolean;
271
+ };
272
+ title: {
273
+ inactive: boolean;
274
+ enabled: boolean;
275
+ };
276
+ secondaryTitle: {
277
+ inactive: boolean;
278
+ enabled: boolean;
279
+ };
280
+ };
281
+ };
282
+ 'indicator/numeric': {
283
+ subtype: string;
284
+ skin: '1' | '2';
285
+ components: {
286
+ title: {
287
+ inactive: boolean;
288
+ enabled: boolean;
289
+ };
290
+ icon: {
291
+ inactive: boolean;
292
+ enabled: boolean;
293
+ };
294
+ secondaryTitle: {
295
+ inactive: boolean;
296
+ enabled: boolean;
297
+ };
298
+ };
299
+ };
300
+ skin: '1' | '2' | 'vertical' | 'horizontal';
301
+ subtype: 'simple' | 'bar' | 'round';
302
+ 'indicator/pictogram': {};
303
+ components: {
304
+ ticks: {
305
+ inactive: boolean;
306
+ enabled: boolean;
307
+ };
308
+ labels: {
309
+ inactive: boolean;
310
+ enabled: boolean;
311
+ };
312
+ title: {
313
+ inactive: boolean;
314
+ enabled: boolean;
315
+ };
316
+ secondaryTitle: {
317
+ inactive: boolean;
318
+ enabled: boolean;
319
+ };
320
+ };
321
+ };
322
+ export type TreemapWidgetStyle = {
323
+ 'title/1': boolean;
324
+ 'title/2': boolean;
325
+ 'title/3': boolean;
326
+ 'tooltip/contribution': boolean;
327
+ 'tooltip/value': boolean;
328
+ };
329
+ export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle;
330
+ export declare enum FiltersMergeStrategyEnum {
331
+ WIDGET_FIRST = "widgetFirst",
332
+ CODE_FIRST = "codeFirst",
333
+ CODE_ONLY = "codeOnly"
334
+ }
335
+ export type FiltersMergeStrategy = `${FiltersMergeStrategyEnum}`;
336
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type Filter } from '@sisense/sdk-data';
2
+ import { ChartSubtype } from '../chart-options-processor/subtype-to-design-options';
3
+ import { ChartType, SortDirection } from '../types';
4
+ import { FiltersMergeStrategy, Panel, PanelItem, SortDirection as JaqlSortDirection, WidgetSubtype, WidgetType } from './types';
5
+ export declare function getChartType(widgetType: WidgetType): ChartType;
6
+ export declare function getChartSubtype(widgetSubtype: WidgetSubtype): ChartSubtype | undefined;
7
+ type WidgetTypeOrString = string | WidgetType;
8
+ export declare function isSupportedWidgetType(widgetType: WidgetTypeOrString): widgetType is WidgetType;
9
+ export declare function isTableWidget(widgetType: WidgetTypeOrString): boolean;
10
+ export declare function getEnabledPanelItems(panels: Panel[], panelName: string): PanelItem[];
11
+ export declare function getRootPanelItem(item: PanelItem): PanelItem;
12
+ export declare function getSortType(jaqlSort: JaqlSortDirection | undefined): SortDirection;
13
+ /**
14
+ * Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
15
+ * and removes duplicates based on filter attribute expression (dim)
16
+ *
17
+ * @param {Filter[]} [sourceFilters=[]] - The source array of filter objects.
18
+ * @param {Filter[]} [targetFilters=[]] - The target array of filter objects.
19
+ * @returns {Filter[]} - The merged array of filter objects.
20
+ */
21
+ export declare function mergeFilters(sourceFilters?: Filter[], targetFilters?: Filter[]): Filter[];
22
+ /**
23
+ * Merge two arrays of filters using the specified merge strategy.
24
+ *
25
+ * @param {Filter[]} widgetFilters - The filters from the widget.
26
+ * @param {Filter[]} codeFilters - The filters from the code.
27
+ * @param {FiltersMergeStrategy} [mergeStrategy] - The strategy to use for merging filters.
28
+ *
29
+ * @returns {Filter[]} The merged filters based on the selected strategy.
30
+ */
31
+ export declare function mergeFiltersByStrategy(widgetFilters?: Filter[], codeFilters?: Filter[], mergeStrategy?: FiltersMergeStrategy): Filter[];
32
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { FunctionComponent } from 'react';
2
+ /**
3
+ * Configuration for the {@link asSisenseComponent} decorator
4
+ */
5
+ export type SisenseComponentConfig = {
6
+ /** The name of the component to be used in the tracking events and error messages */
7
+ componentName: string;
8
+ /** If set to true (or function returns true), the component will not wait for the Sisense context to be initialized */
9
+ shouldSkipSisenseContextWaiting?: boolean | ((props: any) => boolean);
10
+ /** If set to true (or function returns true), the component will not be tracked */
11
+ shouldSkipTracking?: boolean | ((props: any) => boolean);
12
+ };
13
+ export type ComponentDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <ComponentProps extends Record<string, any>>(Component: FunctionComponent<ComponentProps>) => FunctionComponent<ComponentProps>;
14
+ /**
15
+ * Decorator that adds sisense-specific functionality to a component
16
+ * @param componentConfig - component configuration
17
+ * @returns A component with sisense-specific functionality
18
+ */
19
+ export declare const asSisenseComponent: ComponentDecorator<SisenseComponentConfig>;
@@ -0,0 +1,5 @@
1
+ import { ComponentDecorator } from './as-sisense-component';
2
+ /**
3
+ * Adds error boundary to the component
4
+ */
5
+ export declare const withErrorBoundary: ComponentDecorator<void>;
@@ -0,0 +1,7 @@
1
+ import { ComponentDecorator, SisenseComponentConfig } from './as-sisense-component';
2
+ type SisenseContextValidationConfig = Pick<SisenseComponentConfig, 'shouldSkipSisenseContextWaiting'>;
3
+ /**
4
+ * Adds waiting for the Sisense context to be initialized
5
+ */
6
+ export declare const withSisenseContextValidation: ComponentDecorator<SisenseContextValidationConfig>;
7
+ export {};
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { Component, ReactNode } from 'react';
3
+ import { SisenseContextPayload } from '../../sisense-context/sisense-context';
4
+ type ErrorTrackerProps = {
5
+ children: ReactNode;
6
+ componentName: string;
7
+ };
8
+ export declare class ErrorTracker extends Component<ErrorTrackerProps, {
9
+ error: Error | string | null;
10
+ }> {
11
+ componentName: string;
12
+ context: SisenseContextPayload;
13
+ httpClient?: HttpClient;
14
+ constructor(props: ErrorTrackerProps);
15
+ static contextType: import("react").Context<SisenseContextPayload>;
16
+ componentDidMount(): void;
17
+ componentDidCatch(error: Error): void;
18
+ render(): ReactNode;
19
+ }
20
+ export {};
@@ -0,0 +1 @@
1
+ export { withTracking } from './with-tracking';
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const TrackingContextProvider: ({ children }: {
3
+ children: ReactNode;
4
+ }) => JSX.Element;
5
+ export declare const useTrackComponentInit: <P extends {}>(componentName: string, props: P) => void;
@@ -0,0 +1,10 @@
1
+ import { ComponentDecorator } from '../as-sisense-component';
2
+ type TrackingDecoratorConfig = {
3
+ componentName: string;
4
+ shouldSkipTracking?: boolean | ((props: any) => boolean);
5
+ };
6
+ /**
7
+ * Adds tracking to the component
8
+ */
9
+ export declare const withTracking: ComponentDecorator<TrackingDecoratorConfig>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { TableType } from '../chart-options-processor/translations/types';
2
+ import { ChartType } from '../types';
3
+ export declare const getChartDefaultSize: (chartType: ChartType | TableType) => {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ type WidgetSizeOptions = {
8
+ hasHeader?: boolean;
9
+ };
10
+ export declare const getWidgetDefaultSize: (chartType: ChartType | TableType, { hasHeader }?: WidgetSizeOptions) => {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ export {};
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ type ContainerSize = {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ export type DynamicSizeContainerProps = {
7
+ children: React.ReactNode | ((size: ContainerSize) => React.ReactNode);
8
+ defaultSize: ContainerSize;
9
+ size?: Partial<ContainerSize>;
10
+ };
11
+ /**
12
+ * A container component that adjusts its content size according to provided sizes
13
+ * or dynamically based on inherited size from the parent/containing element.
14
+ *
15
+ * Priorities: If a "size" is provided, it takes the highest priority.
16
+ * If not, the container's size is used, otherwise the "defaultSize" is used.
17
+ *
18
+ * @param {DynamicSizeContainerProps} props - DynamicSizeContainer properties.
19
+ * @returns {JSX.Element} The DynamicSizeContainer component.
20
+ */
21
+ export declare const DynamicSizeContainer: ({ children, defaultSize, size, }: DynamicSizeContainerProps) => JSX.Element;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ export { DynamicSizeContainer, type DynamicSizeContainerProps } from './dynamic-size-container';
2
+ export * from './default-size';
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * This component is used to display an error message when a component fails to render.
4
+ * It is used by the ErrorBoundary component.
5
+ *
6
+ * @param props - component properties
7
+ * @param props.errorText - The error message to display
8
+ * @returns A component which will replace the component when it fails to render
9
+ */
10
+ declare const ErrorBoundaryBox: ({ errorText }: {
11
+ errorText?: string | undefined;
12
+ }) => JSX.Element;
13
+ export default ErrorBoundaryBox;
@@ -0,0 +1,34 @@
1
+ import { Component, ReactNode } from 'react';
2
+ import { SisenseContextPayload } from '../sisense-context/sisense-context';
3
+ /**
4
+ * @internal
5
+ */
6
+ interface ErrorBoundaryProps {
7
+ showErrorBox?: boolean;
8
+ error?: Error | string;
9
+ children: ReactNode;
10
+ resetKeys?: any[];
11
+ }
12
+ type ErrorBoundaryState = {
13
+ error: Error | string | null;
14
+ };
15
+ /**
16
+ * This component is used to catch errors thrown by the UI component and display an error message
17
+ *
18
+ * @param props - component properties
19
+ * @param props.children - The chart to render
20
+ * @returns A ErrorBoundaryBox component with specific error message
21
+ * @internal
22
+ */
23
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
24
+ showErrorBox: boolean;
25
+ context: SisenseContextPayload;
26
+ constructor(props: ErrorBoundaryProps);
27
+ static getDerivedStateFromError(error: Error): {
28
+ error: Error;
29
+ };
30
+ componentDidCatch(error: Error): void;
31
+ componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
32
+ render(): string | number | boolean | JSX.Element | import("react").ReactFragment | null | undefined;
33
+ }
34
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const useSetError: () => import("react").Dispatch<import("react").SetStateAction<Error | undefined>>;
@@ -0,0 +1,10 @@
1
+ import { type ButtonHTMLAttributes, type FunctionComponent } from 'react';
2
+ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement>;
3
+ export declare const PrimaryButton: FunctionComponent<ButtonProps>;
4
+ export declare const SecondaryButton: FunctionComponent<ButtonProps>;
5
+ export type ButtonWithTooltipProps = ButtonProps & {
6
+ tooltipTitle: string;
7
+ disableTooltip: boolean;
8
+ };
9
+ export declare const SecondaryButtonWithTooltip: FunctionComponent<ButtonWithTooltipProps>;
10
+ export declare const LinkButton: FunctionComponent<ButtonProps>;
@@ -0,0 +1,7 @@
1
+ import type { FunctionComponent, InputHTMLAttributes } from 'react';
2
+ type CheckboxProps = {
3
+ label?: string;
4
+ wrapperClassName?: string;
5
+ } & InputHTMLAttributes<HTMLInputElement>;
6
+ export declare const Checkbox: FunctionComponent<CheckboxProps>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import { CompleteThemeSettings } from '../../../types';
2
+ import { type FunctionComponent, type ButtonHTMLAttributes } from 'react';
3
+ type InputProps = {
4
+ variant?: 'white' | 'grey';
5
+ label: string;
6
+ isActive?: boolean;
7
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
8
+ type ThemeMixin = {
9
+ theme: CompleteThemeSettings;
10
+ };
11
+ export type DateRangeFieldButtonProps = InputProps & ThemeMixin;
12
+ export declare const DateRangeFieldButton: FunctionComponent<DateRangeFieldButtonProps>;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export { LinkButton, PrimaryButton, SecondaryButton } from './buttons';
2
+ export { Checkbox } from './checkbox';
3
+ export { Input } from './input';
4
+ export { Radio } from './radio';
5
+ export { SisenseSwitchButton } from './switch';
@@ -0,0 +1,7 @@
1
+ import { type FunctionComponent, type InputHTMLAttributes } from 'react';
2
+ type InputProps = {
3
+ variant?: 'white' | 'grey';
4
+ label: string;
5
+ } & InputHTMLAttributes<HTMLInputElement>;
6
+ export declare const Input: FunctionComponent<InputProps>;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { FunctionComponent, InputHTMLAttributes } from 'react';
2
+ type RadioProps = {
3
+ label?: string;
4
+ } & InputHTMLAttributes<HTMLInputElement>;
5
+ export declare const Radio: FunctionComponent<RadioProps>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const SisenseSwitchButton: import("@emotion/styled").StyledComponent<import("@mui/material/Switch").SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_FORMAT = "YYYY-MM-DD";
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import dayjs from 'dayjs';
3
+ export type SelectorMode = 'fromSelector' | 'toSelector';
4
+ export type DateRangeLimits = {
5
+ maxDate: dayjs.Dayjs;
6
+ minDate: dayjs.Dayjs;
7
+ };
8
+ type DayjsDateRange = {
9
+ from: dayjs.Dayjs;
10
+ to: dayjs.Dayjs;
11
+ };
12
+ export type CalendarDateSelectorProps = {
13
+ selectorMode: SelectorMode;
14
+ limit: DateRangeLimits;
15
+ onDateRangeChanged: (dateRange: DayjsDateRange) => void;
16
+ onSelectorModeChanged: (newSelectorMode: SelectorMode) => void;
17
+ selectedDateRange: DayjsDateRange;
18
+ };
19
+ export declare function CalendarDateSelector({ selectedDateRange, limit, onDateRangeChanged, selectorMode, onSelectorModeChanged, }: CalendarDateSelectorProps): JSX.Element;
20
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ type HeaderProps = {
3
+ date: Date;
4
+ changeYear: (value: number) => void;
5
+ changeMonth: (value: number) => void;
6
+ decreaseMonth: () => void;
7
+ increaseMonth: () => void;
8
+ prevMonthButtonDisabled: boolean;
9
+ nextMonthButtonDisabled: boolean;
10
+ };
11
+ export declare const CalendarHeader: (props: HeaderProps) => JSX.Element;
12
+ export {};