@databrainhq/plugin 0.15.57 → 0.15.59

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 (248) hide show
  1. package/dist/components/Accordion/index.d.ts +34 -0
  2. package/dist/components/AceEditorSql/AceEditorSql.d.ts +11 -0
  3. package/dist/components/Alert/index.d.ts +12 -0
  4. package/dist/components/AutoCompleteDropdown/index.d.ts +20 -0
  5. package/dist/components/Badge/index.d.ts +10 -0
  6. package/dist/components/Button/index.d.ts +14 -0
  7. package/dist/components/ButtonGroup/index.d.ts +16 -0
  8. package/dist/components/Chart/SingleValueChart.d.ts +39 -0
  9. package/dist/components/Chart/index.d.ts +48 -0
  10. package/dist/components/ChartModal/ChartConfig.d.ts +10 -0
  11. package/dist/components/ChartModal/ChartModalOptions.d.ts +14 -0
  12. package/dist/components/ChartModal/index.d.ts +3 -0
  13. package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +15 -0
  14. package/dist/components/ChartPopup/index.d.ts +28 -0
  15. package/dist/components/ChartReportPanel/index.d.ts +10 -0
  16. package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +13 -0
  17. package/dist/components/ChartSettingsPopup/components/ChartConfigure/ComboAxisSettings/AxisSettings.d.ts +10 -0
  18. package/dist/components/ChartSettingsPopup/components/ChartConfigure/ComboAxisSettings/index.d.ts +8 -0
  19. package/dist/components/ChartSettingsPopup/components/ChartConfigure/PositionContainer.d.ts +8 -0
  20. package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +26 -0
  21. package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +14 -0
  22. package/dist/components/ChartSettingsPopup/index.d.ts +3 -0
  23. package/dist/components/ChartTypePanel/index.d.ts +15 -0
  24. package/dist/components/Checkbox/index.d.ts +11 -0
  25. package/dist/components/ColorField/ColorField.d.ts +13 -0
  26. package/dist/components/DataType/index.d.ts +9 -0
  27. package/dist/components/DateRangePicker/index.d.ts +36 -0
  28. package/dist/components/DraggableItem/index.d.ts +7 -0
  29. package/dist/components/DrillBreadCrumb/index.d.ts +16 -0
  30. package/dist/components/Error/index.d.ts +6 -0
  31. package/dist/components/ErrorFallback/index.d.ts +2 -0
  32. package/dist/components/ExternalMetricForm/index.d.ts +11 -0
  33. package/dist/components/FileUploader/index.d.ts +6 -0
  34. package/dist/components/FilterDropDown/index.d.ts +32 -0
  35. package/dist/components/FilterField/index.d.ts +40 -0
  36. package/dist/components/Flex/index.d.ts +13 -0
  37. package/dist/components/FloatingDropDown/index.d.ts +43 -0
  38. package/dist/components/FullScreenChart/index.d.ts +8 -0
  39. package/dist/components/GaugeLegend/index.d.ts +12 -0
  40. package/dist/components/GenerateMetric/index.d.ts +3 -0
  41. package/dist/components/GlobalFilters/AddFilter.d.ts +15 -0
  42. package/dist/components/GlobalFilters/AppliedFilter.d.ts +9 -0
  43. package/dist/components/GlobalFilters/Filters.d.ts +29 -0
  44. package/dist/components/GlobalFilters/HorizontalFilters.d.ts +36 -0
  45. package/dist/components/GlobalFilters/NumberFilterField.d.ts +23 -0
  46. package/dist/components/GlobalFilters/SearchField.d.ts +10 -0
  47. package/dist/components/GlobalFilters/index.d.ts +82 -0
  48. package/dist/components/HorizontalStackTable/DebouncedInput.d.ts +6 -0
  49. package/dist/components/HorizontalStackTable/index.d.ts +18 -0
  50. package/dist/components/Icons/Logos/index.d.ts +33 -0
  51. package/dist/components/Icons/index.d.ts +9 -0
  52. package/dist/components/InfoTooltip/index.d.ts +31 -0
  53. package/dist/components/InputField/index.d.ts +20 -0
  54. package/dist/components/List/index.d.ts +43 -0
  55. package/dist/components/Loader/index.d.ts +6 -0
  56. package/dist/components/Menu/index.d.ts +32 -0
  57. package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +13 -0
  58. package/dist/components/MetricChart/CsvDownloadButton.d.ts +12 -0
  59. package/dist/components/MetricChart/PivotCsvDownloadButton.d.ts +12 -0
  60. package/dist/components/MetricChart/RawCsvDownloadButton.d.ts +39 -0
  61. package/dist/components/MetricChart/index.d.ts +5 -0
  62. package/dist/components/MetricCreation/MetricCreation.d.ts +3 -0
  63. package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +3 -0
  64. package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +3 -0
  65. package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +2 -0
  66. package/dist/components/MetricCreation/components/Dataset/index.d.ts +3 -0
  67. package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
  68. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +3 -0
  69. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +33 -0
  70. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
  71. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/index.d.ts +1 -0
  72. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +11 -0
  73. package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +3 -0
  74. package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +2 -0
  75. package/dist/components/MetricCreation/components/Panels/ChartActionPanel.d.ts +13 -0
  76. package/dist/components/MetricCreation/components/Panels/ChartAppearancePanel.d.ts +22 -0
  77. package/dist/components/MetricCreation/components/Panels/FiltersPanel.d.ts +21 -0
  78. package/dist/components/MetricCreation/components/Panels/SortPanel.d.ts +15 -0
  79. package/dist/components/MetricCreation/index.d.ts +5 -0
  80. package/dist/components/MetricFilterDropDown/components/OldMetricFilterComponents.d.ts +18 -0
  81. package/dist/components/MetricFilterDropDown/components/SearchField.d.ts +7 -0
  82. package/dist/components/MetricFilterDropDown/components/StringAutoCustomFilterField.d.ts +19 -0
  83. package/dist/components/MetricFilterDropDown/components/StringManualFilterField.d.ts +11 -0
  84. package/dist/components/MetricFilterDropDown/components/TimeFilterField.d.ts +12 -0
  85. package/dist/components/MetricFilterDropDown/components/VariableTimeFilterField.d.ts +12 -0
  86. package/dist/components/MetricFilterDropDown/index.d.ts +25 -0
  87. package/dist/components/MetricList/MetricList.d.ts +79 -0
  88. package/dist/components/MetricList/components/ArchiveMetricModal/index.d.ts +7 -0
  89. package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +13 -0
  90. package/dist/components/MetricList/components/FullScreenView/AddMetricFilter.d.ts +8 -0
  91. package/dist/components/MetricList/components/FullScreenView/ChartPropertiesPanel.d.ts +12 -0
  92. package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +20 -0
  93. package/dist/components/MetricList/components/FullScreenView/index.d.ts +49 -0
  94. package/dist/components/MetricList/components/LayoutAlert/index.d.ts +7 -0
  95. package/dist/components/MetricList/components/ManageMetricMenu/ManageMetricCard.d.ts +16 -0
  96. package/dist/components/MetricList/components/ManageMetricMenu/index.d.ts +19 -0
  97. package/dist/components/MetricList/components/MetricCards/CreateElementPanel.d.ts +14 -0
  98. package/dist/components/MetricList/components/MetricCards/ElementCard.d.ts +17 -0
  99. package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +107 -0
  100. package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +11 -0
  101. package/dist/components/MetricList/components/TableViewModal/index.d.ts +9 -0
  102. package/dist/components/MetricList/components/index.d.ts +7 -0
  103. package/dist/components/MetricList/index.d.ts +2 -0
  104. package/dist/components/MetricTable/index.d.ts +7 -0
  105. package/dist/components/Modal/Modal.d.ts +14 -0
  106. package/dist/components/Modal/ModalFooter.d.ts +5 -0
  107. package/dist/components/Modal/index.d.ts +2 -0
  108. package/dist/components/MultiSelectDropdown/index.d.ts +45 -0
  109. package/dist/components/Panel/index.d.ts +17 -0
  110. package/dist/components/PivotTable/PivotTableV2.d.ts +23 -0
  111. package/dist/components/PivotTable/index.d.ts +8 -0
  112. package/dist/components/PivotTable/transformData.d.ts +7 -0
  113. package/dist/components/PopoverMenu/index.d.ts +39 -0
  114. package/dist/components/Portal/index.d.ts +2 -0
  115. package/dist/components/RadioButton/index.d.ts +16 -0
  116. package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +17 -0
  117. package/dist/components/ScheduleEmail/index.d.ts +18 -0
  118. package/dist/components/SearchDropdown/index.d.ts +14 -0
  119. package/dist/components/SearchMetricData/ChatMode/ChatAppearancePanel.d.ts +19 -0
  120. package/dist/components/SearchMetricData/ChatMode/ChatMode.d.ts +44 -0
  121. package/dist/components/SearchMetricData/ChatMode/ChatModeHeader.d.ts +8 -0
  122. package/dist/components/SearchMetricData/ChatMode/ChatReportPanel.d.ts +9 -0
  123. package/dist/components/SearchMetricData/ChatMode/ChatSqlPanel.d.ts +7 -0
  124. package/dist/components/SearchMetricData/ChatMode/NoChatData.d.ts +3 -0
  125. package/dist/components/SearchMetricData/ChatMode/NoDataFound.d.ts +16 -0
  126. package/dist/components/SearchMetricData/ChatMode/Results.d.ts +23 -0
  127. package/dist/components/SearchMetricData/LoaderWithStates/index.d.ts +7 -0
  128. package/dist/components/SearchMetricData/SearchMetricData.d.ts +5 -0
  129. package/dist/components/SearchMetricData/index.d.ts +1 -0
  130. package/dist/components/SearchTab/index.d.ts +13 -0
  131. package/dist/components/Select/index.d.ts +47 -0
  132. package/dist/components/SelfHostControl/index.d.ts +4 -0
  133. package/dist/components/SkeletonLoader/index.d.ts +9 -0
  134. package/dist/components/SpinningLoader/index.d.ts +2 -0
  135. package/dist/components/Switch/SwitchInput.d.ts +10 -0
  136. package/dist/components/Switch/index.d.ts +11 -0
  137. package/dist/components/Tab/index.d.ts +14 -0
  138. package/dist/components/Table/DebouncedInput.d.ts +6 -0
  139. package/dist/components/Table/Filter.d.ts +7 -0
  140. package/dist/components/Table/index.d.ts +40 -0
  141. package/dist/components/Tabs/index.d.ts +41 -0
  142. package/dist/components/TagInputField/index.d.ts +33 -0
  143. package/dist/components/Text/index.d.ts +15 -0
  144. package/dist/components/TextAreaField/index.d.ts +24 -0
  145. package/dist/components/ThemeBlock/index.d.ts +8 -0
  146. package/dist/components/TimeGrainField/index.d.ts +17 -0
  147. package/dist/components/TimeSeriesSettings/index.d.ts +8 -0
  148. package/dist/components/ToggleIconBtn/index.d.ts +14 -0
  149. package/dist/components/index.d.ts +67 -0
  150. package/dist/consts/api.d.ts +81 -0
  151. package/dist/consts/app.d.ts +157 -0
  152. package/dist/consts/index.d.ts +2 -0
  153. package/dist/consts/metricOptions.d.ts +209 -0
  154. package/dist/consts/validations.d.ts +24 -0
  155. package/dist/containers/Dashboard/Dashboard.d.ts +85 -0
  156. package/dist/containers/Dashboard/DashboardProvider.d.ts +7 -0
  157. package/dist/containers/Dashboard/EmbededDashboard.d.ts +54 -0
  158. package/dist/containers/Dashboard/index.d.ts +2 -0
  159. package/dist/containers/DbnStyles.d.ts +14 -0
  160. package/dist/containers/Metric/EmbeddedMetric.d.ts +55 -0
  161. package/dist/containers/Metric/MergedMetric.d.ts +54 -0
  162. package/dist/containers/Metric/index.d.ts +97 -0
  163. package/dist/containers/PluginProvider.d.ts +7 -0
  164. package/dist/containers/index.d.ts +3 -0
  165. package/dist/helpers/adaptiveFormatter.d.ts +6 -0
  166. package/dist/helpers/areArraysEqual.d.ts +1 -0
  167. package/dist/helpers/autoCompleteHelpers.d.ts +95 -0
  168. package/dist/helpers/cardActions.d.ts +5 -0
  169. package/dist/helpers/chartOptions.d.ts +93 -0
  170. package/dist/helpers/checkIsElementInViewport.d.ts +1 -0
  171. package/dist/helpers/conditionalFormatting.d.ts +3 -0
  172. package/dist/helpers/copyToClipboard.d.ts +4 -0
  173. package/dist/helpers/createMetric.d.ts +35 -0
  174. package/dist/helpers/darkColorIdentifier.d.ts +2 -0
  175. package/dist/helpers/dateFormatter.d.ts +1 -0
  176. package/dist/helpers/generateColorPalette.d.ts +1 -0
  177. package/dist/helpers/generateTimeRangeWhereClause.d.ts +13 -0
  178. package/dist/helpers/getColumnType.d.ts +2 -0
  179. package/dist/helpers/getComboRangeLabel.d.ts +5 -0
  180. package/dist/helpers/getFilterAppliedQuery.d.ts +71 -0
  181. package/dist/helpers/getModifiedQuery.d.ts +78 -0
  182. package/dist/helpers/getNextScheduledTime.d.ts +13 -0
  183. package/dist/helpers/getTimeFilterValue.d.ts +12 -0
  184. package/dist/helpers/getValidRlsConditionOptions.d.ts +16 -0
  185. package/dist/helpers/groupArray.d.ts +1 -0
  186. package/dist/helpers/groupBy.d.ts +25 -0
  187. package/dist/helpers/index.d.ts +16 -0
  188. package/dist/helpers/numberFormatter.d.ts +1 -0
  189. package/dist/helpers/setOnDateChange.d.ts +11 -0
  190. package/dist/helpers/sqlMetadata.d.ts +7 -0
  191. package/dist/helpers/timeseries.d.ts +35 -0
  192. package/dist/helpers/timeseriesOption.d.ts +72 -0
  193. package/dist/helpers/tooltipFormatter.d.ts +27 -0
  194. package/dist/helpers/treeMap.d.ts +6 -0
  195. package/dist/hooks/index.d.ts +12 -0
  196. package/dist/hooks/useArchiveMetric.d.ts +10 -0
  197. package/dist/hooks/useAutoCompleteOptions.d.ts +4 -0
  198. package/dist/hooks/useClientDashboardLayout.d.ts +21 -0
  199. package/dist/hooks/useDashboardContext.d.ts +39 -0
  200. package/dist/hooks/useDatasetMetric.d.ts +50 -0
  201. package/dist/hooks/useDebounce.d.ts +2 -0
  202. package/dist/hooks/useDownloadRawCsv.d.ts +21 -0
  203. package/dist/hooks/useDrag.d.ts +10 -0
  204. package/dist/hooks/useDragAndDropState.d.ts +10 -0
  205. package/dist/hooks/useDrop.d.ts +13 -0
  206. package/dist/hooks/useEmbeddedMetric.d.ts +27 -0
  207. package/dist/hooks/useExternalMetric.d.ts +55 -0
  208. package/dist/hooks/useGenerateDatasetMetrics.d.ts +16 -0
  209. package/dist/hooks/useGenerateMetric.d.ts +64 -0
  210. package/dist/hooks/useMetricCard.d.ts +130 -0
  211. package/dist/hooks/useMetricConfig.d.ts +63 -0
  212. package/dist/hooks/useNewEmbeddedDashboard.d.ts +37 -0
  213. package/dist/hooks/useOutsideAlerter.d.ts +14 -0
  214. package/dist/hooks/usePublishArchivedMetrics.d.ts +5 -0
  215. package/dist/hooks/usePythonResults.d.ts +17 -0
  216. package/dist/hooks/useScheduleEmail.d.ts +38 -0
  217. package/dist/hooks/useSearch.d.ts +55 -0
  218. package/dist/hooks/useUnderlyingData.d.ts +32 -0
  219. package/dist/index.d.ts +8 -0
  220. package/dist/queries/externalDashboard.mutation.d.ts +61 -0
  221. package/dist/queries/externalDashboard.query.d.ts +20 -0
  222. package/dist/queries/index.d.ts +1 -0
  223. package/dist/queries/metric.mutation.d.ts +57 -0
  224. package/dist/queries/metric.query.d.ts +12 -0
  225. package/dist/types/app.d.ts +964 -0
  226. package/dist/types/dragAndDropProps.d.ts +70 -0
  227. package/dist/types/index.d.ts +3 -0
  228. package/dist/types/metricCreate.d.ts +768 -0
  229. package/dist/types/queryTypes.d.ts +350 -0
  230. package/dist/usa-c14e93e4.mjs +15112 -0
  231. package/dist/utils/arrayToCsvString.d.ts +6 -0
  232. package/dist/utils/colors.d.ts +2 -0
  233. package/dist/utils/fetcher.d.ts +13 -0
  234. package/dist/utils/getChartAttributes.d.ts +98 -0
  235. package/dist/utils/getChartImage.d.ts +3 -0
  236. package/dist/utils/getChartOptions.d.ts +42 -0
  237. package/dist/utils/getFormattedDataType.d.ts +1 -0
  238. package/dist/utils/getNoAxisChartOptions.d.ts +25 -0
  239. package/dist/utils/getValidJson.d.ts +1 -0
  240. package/dist/utils/index.d.ts +9 -0
  241. package/dist/utils/pivotDataTransform.d.ts +7 -0
  242. package/dist/utils/popoverPosition.d.ts +2 -0
  243. package/dist/utils/theme.d.ts +42 -0
  244. package/dist/webcomponents.d.ts +11 -0
  245. package/dist/webcomponents.es.js +224001 -0
  246. package/dist/webcomponents.umd.js +4436 -0
  247. package/dist/world-8db01cf5.mjs +45896 -0
  248. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { ThemeType } from '@/utils/theme';
3
+ import { AdminThemeOptionsType, ChartAppearanceType, GlobalFilterOptionsType } from '@/types';
4
+ /**
5
+ * token - The client based guest token (required).
6
+ * dashboardId - The id of the dashboard you want to see.
7
+ * options - Access permissions and customization.
8
+ * disableMetricCreation - boolean value to enable or disable metric creation
9
+ * disableMetricUpdation - boolean value to enable or disable metric updation
10
+ * disableMetricDeletion - boolean value to enable or disable metric deletion
11
+ * disableManageMetrics - boolean value to enable or disable metric manage
12
+ * disableScheduleEmailReports - boolean value to enable or disable schedule email reports
13
+ * disableLayoutCustomization - boolean value to enable or disable dashboard layout customization
14
+ * disableSaveLayout - boolean value to enable or disable to save layout
15
+ * chartColors - array of colors where each color should be a valid color string e.g. color name, rgb value, hex value, etc.
16
+ * theme - Theme customization.
17
+ * isHideChartSettings - Whether to hide chart settings in full screen view.
18
+ * isHideTablePreview - Whether to hide table preview in full screen view.
19
+ */
20
+ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
21
+ token: string;
22
+ dashboardId?: string;
23
+ options?: {
24
+ disableMetricCreation?: boolean;
25
+ disableMetricUpdation?: boolean;
26
+ disableMetricDeletion?: boolean;
27
+ disableManageMetrics?: boolean;
28
+ disableLayoutCustomization?: boolean;
29
+ disableSaveLayout?: boolean;
30
+ disableScheduleEmailReports?: boolean;
31
+ disableUnderlyingData?: boolean;
32
+ showDashboardActions?: boolean;
33
+ hideDashboardName?: boolean;
34
+ chartColors?: string[];
35
+ hideDatePickerOptions?: string[];
36
+ chartAppearance?: ChartAppearanceType;
37
+ disableMainLoader?: boolean;
38
+ disableMetricLoader?: boolean;
39
+ hideMetricCardShadow?: boolean;
40
+ shouldFitFullScreen?: boolean;
41
+ disableMetricCardBorder?: boolean;
42
+ };
43
+ theme?: ThemeType;
44
+ isHideChartSettings?: boolean;
45
+ isHideTablePreview?: boolean;
46
+ enableDownloadCsv?: boolean;
47
+ disableDownloadPng?: boolean;
48
+ enableEmailCsv?: boolean;
49
+ enableMultiMetricFilters?: boolean;
50
+ disableFullscreen?: boolean;
51
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
52
+ adminThemeOptions?: AdminThemeOptionsType;
53
+ customMessages?: {
54
+ tokenExpiry?: string;
55
+ tokenAbsent?: string;
56
+ };
57
+ themeName?: string;
58
+ globalFilterOptions?: GlobalFilterOptionsType;
59
+ handleServerEvent?: any;
60
+ noDataImg?: string;
61
+ manageMetricsBtnContent?: any;
62
+ longDescriptionConfig?: {
63
+ width?: string;
64
+ fontColor?: string;
65
+ };
66
+ chartColumns?: {
67
+ dimensions?: string[];
68
+ measures?: string[];
69
+ isEnabled?: boolean;
70
+ metricId?: string;
71
+ }[];
72
+ }
73
+ /**
74
+ * @name Dashboard - A react component to display the dashboard.
75
+ * @prop {string} token - A client based guest token.
76
+ * @prop {string} dashboardId (optional) - A dashboard id (one which you have provided at the time of creating it) of the dashboard you want to see.
77
+ * @prop {object} options (optional) - Additional options like access permissions e.g. metric creation, updation, archiving and layout customization.
78
+ * @prop {boolean} isHideChartSettings (optional) - Whether to hide chart settings in full screen view.
79
+ * @prop {boolean} isHideChartSettings (optional) - Whether to hide chart settings in full screen view.
80
+ * @prop {boolean} enableDownloadCsv (optional) - Whether to show download csv option in metric card.
81
+ * @prop {boolean} enableEmailCsv (optional) - Whether to show email csv option in metric card.
82
+ * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
83
+ * @prop {object} theme (optional) - A theme object to customize the theme.
84
+ */
85
+ export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, adminThemeOptions, customMessages, themeName, globalFilterOptions, handleServerEvent, noDataImg, manageMetricsBtnContent, disableDownloadPng, longDescriptionConfig, chartColumns, }: DashboardProps) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ type DashboardProviderProps = PropsWithChildren & {
3
+ token: string;
4
+ dashboardId?: string;
5
+ };
6
+ declare const DashboardProvider: ({ token, dashboardId, children, }: DashboardProviderProps) => React.JSX.Element;
7
+ export default DashboardProvider;
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { ThemeType } from '@/utils';
3
+ import { AdminThemeOptionsType, ChartAppearanceType, GlobalFilterOptionsType } from '@/types';
4
+ export interface EmbeddedDashboardProps {
5
+ options?: {
6
+ disableMetricCreation?: boolean;
7
+ disableMetricUpdation?: boolean;
8
+ disableMetricDeletion?: boolean;
9
+ disableManageMetrics?: boolean;
10
+ disableLayoutCustomization?: boolean;
11
+ disableSaveLayout?: boolean;
12
+ disableScheduleEmailReports?: boolean;
13
+ disableFullscreen?: boolean;
14
+ chartColors?: string[];
15
+ isHideChartSettings?: boolean;
16
+ isHideTablePreview?: boolean;
17
+ enableDownloadCsv?: boolean;
18
+ disableDownloadPng?: boolean;
19
+ enableEmailCsv?: boolean;
20
+ enableMultiMetricFilters?: boolean;
21
+ hideDashboardName?: boolean;
22
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
23
+ hideDatePickerOptions?: string[];
24
+ chartAppearance?: ChartAppearanceType;
25
+ disableMainLoader?: boolean;
26
+ disableMetricLoader?: boolean;
27
+ hideMetricCardShadow?: boolean;
28
+ disableUnderlyingData?: boolean;
29
+ shouldFitFullScreen?: boolean;
30
+ showDashboardActions?: boolean;
31
+ disableMetricCardBorder?: boolean;
32
+ };
33
+ theme?: ThemeType;
34
+ adminThemeOption?: AdminThemeOptionsType;
35
+ customMessages?: {
36
+ tokenExpiry?: string;
37
+ tokenAbsent?: string;
38
+ };
39
+ themeName?: string;
40
+ setAdminTheme: (theme?: AdminThemeOptionsType) => void;
41
+ token: string;
42
+ dashboardId?: string;
43
+ globalFilterOptions?: GlobalFilterOptionsType;
44
+ onServerEvent?: any;
45
+ noDataImg?: string;
46
+ customContent?: any;
47
+ chartColumns?: {
48
+ dimensions?: string[];
49
+ measures?: string[];
50
+ isEnabled?: boolean;
51
+ metricId?: string;
52
+ }[];
53
+ }
54
+ export declare const EmbeddedDashboard: React.MemoExoticComponent<({ options, theme, adminThemeOption, customMessages, themeName, setAdminTheme, token, dashboardId, globalFilterOptions, onServerEvent, noDataImg, customContent, chartColumns, }: EmbeddedDashboardProps) => React.JSX.Element>;
@@ -0,0 +1,2 @@
1
+ export * from './Dashboard';
2
+ export * from './EmbededDashboard';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { AdminThemeOptionsType } from '@/types';
3
+ import { ThemeType } from '@/utils';
4
+ declare const DbnStyles: ({ componentName, adminTheme, isDisableCardShadow, theme, longDescriptionConfig, }: {
5
+ componentName: string;
6
+ adminTheme?: AdminThemeOptionsType | undefined;
7
+ isDisableCardShadow?: boolean | undefined;
8
+ theme?: ThemeType | undefined;
9
+ longDescriptionConfig?: {
10
+ width?: string | undefined;
11
+ fontColor?: string | undefined;
12
+ } | undefined;
13
+ }) => React.JSX.Element;
14
+ export default DbnStyles;
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import { AdminThemeOptionsType, ChartAppearanceType, MetricFilterOptionsType } from '@/types';
3
+ export interface EmbeddedMetricProps {
4
+ token: string;
5
+ chartColors?: string[];
6
+ metricId: string;
7
+ chartRendererType?: 'svg' | 'canvas';
8
+ variant?: 'card' | 'fullscreen';
9
+ onMinimize?: () => void;
10
+ isHideChartSettings?: boolean;
11
+ isHideTablePreview?: boolean;
12
+ enableDownloadCsv?: boolean;
13
+ enableEmailCsv?: boolean;
14
+ disableDownloadPng?: boolean;
15
+ enableMultiMetricFilters?: boolean;
16
+ metricFilterOptions?: MetricFilterOptionsType;
17
+ metricFilterPosition?: 'outside' | 'inside';
18
+ isDisableCardTitle?: boolean;
19
+ disableFullscreen?: boolean;
20
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
21
+ customMessages?: {
22
+ tokenExpiry?: string;
23
+ tokenAbsent?: string;
24
+ };
25
+ themeName?: string;
26
+ setAdminTheme: (theme?: AdminThemeOptionsType) => void;
27
+ appearanceOptions?: {
28
+ appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
29
+ dynamicBehaviour?: {
30
+ isEnabled?: boolean;
31
+ label?: string | undefined;
32
+ };
33
+ cumulativeBar?: {
34
+ isEnabled?: boolean;
35
+ label?: string | undefined;
36
+ };
37
+ stackedBars?: {
38
+ isEnabled?: boolean;
39
+ label?: string;
40
+ };
41
+ };
42
+ hideDatePickerOptions?: string[];
43
+ chartAppearance?: ChartAppearanceType;
44
+ hideMetricCardShadow?: boolean;
45
+ disableUnderlyingData?: boolean;
46
+ noDataImg?: string;
47
+ disableMetricCardBorder?: boolean;
48
+ isMergedCard?: boolean;
49
+ chartColumns?: {
50
+ dimensions?: string[];
51
+ measures?: string[];
52
+ isEnabled?: boolean;
53
+ };
54
+ }
55
+ export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, customMessages, themeName, setAdminTheme, appearanceOptions, isDisableCardTitle, hideDatePickerOptions, chartAppearance, hideMetricCardShadow, disableUnderlyingData, noDataImg, disableDownloadPng, disableMetricCardBorder, isMergedCard, chartColumns, }: EmbeddedMetricProps) => React.JSX.Element>;
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { ChartAppearanceType, MetricFilterOptionsType } from '@/types';
3
+ type MergedMetricProps = {
4
+ token: string;
5
+ metricId: string;
6
+ disableMetricCardBorder?: boolean;
7
+ noDataImg?: string;
8
+ hideMetricCardShadow?: boolean;
9
+ isEnableUnderlyingData?: boolean;
10
+ chartAppearance?: ChartAppearanceType;
11
+ hideDatePickerOptions?: string[];
12
+ appearanceOptions?: {
13
+ appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
14
+ dynamicBehaviour?: {
15
+ isEnabled?: boolean;
16
+ label?: string | undefined;
17
+ };
18
+ cumulativeBar?: {
19
+ isEnabled?: boolean;
20
+ label?: string | undefined;
21
+ };
22
+ stackedBars?: {
23
+ isEnabled?: boolean;
24
+ label?: string;
25
+ };
26
+ };
27
+ dropdownTheme: {
28
+ width: string;
29
+ variant: 'static' | 'floating';
30
+ radius: string;
31
+ };
32
+ adminColors?: string[];
33
+ chartColors?: string[];
34
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
35
+ disableFullscreen?: boolean;
36
+ chartRendererType?: 'svg' | 'canvas';
37
+ metricFilterOptions?: MetricFilterOptionsType;
38
+ enableDownloadCsv?: boolean;
39
+ enableMultiMetricFilters?: boolean;
40
+ metricFilterPosition?: 'outside' | 'inside';
41
+ enableEmailCsv?: boolean;
42
+ isDisableCardTitle?: boolean;
43
+ disableDownloadPng?: boolean;
44
+ onMinimize?: () => void;
45
+ isHideChartSettings?: boolean;
46
+ isHideTablePreview?: boolean;
47
+ dataMartRelationships?: any;
48
+ isEnableCumulative?: boolean;
49
+ isEnableDynamic?: boolean;
50
+ isEnableStack?: boolean;
51
+ metricCardColor?: string;
52
+ };
53
+ declare const MergedMetric: ({ token, metricId, disableMetricCardBorder, noDataImg, hideMetricCardShadow, isEnableUnderlyingData, chartAppearance, hideDatePickerOptions, appearanceOptions, dropdownTheme, adminColors, chartColors, optionsIcon, disableFullscreen, chartRendererType, metricFilterOptions, enableDownloadCsv, enableMultiMetricFilters, metricFilterPosition, enableEmailCsv, isDisableCardTitle, disableDownloadPng, onMinimize, isHideChartSettings, isHideTablePreview, dataMartRelationships, isEnableCumulative, isEnableDynamic, isEnableStack, metricCardColor, }: MergedMetricProps) => React.JSX.Element;
54
+ export default MergedMetric;
@@ -0,0 +1,97 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { ThemeType } from '@/utils';
3
+ import { ChartAppearanceType, MetricFilterOptionsType } from '@/types';
4
+ /**
5
+ * token - The client based guest token (required).
6
+ * metricId - The id of the dashboard you want to see.
7
+ * width - The width of the metric card in number.
8
+ * height - The height of the metric card in number.
9
+ * isHideChartSettings - Whether to hide the chart settings in full screen view.
10
+ * isHideTablePreview - Whether to hide the table preview in full screen view.
11
+ * className - The usual className attribute to provide styles.
12
+ * style - The usual style attribute to provide inline styles.
13
+ * chartColors - array of colors where each color should be a valid color string e.g. color name, rgb value, hex value, etc.
14
+ * theme - Theme customization.
15
+ */
16
+ export interface MetricProps extends HTMLAttributes<HTMLElement> {
17
+ token: string;
18
+ chartColors?: string[];
19
+ metricId: string;
20
+ variant?: 'card' | 'fullscreen';
21
+ isHideChartSettings?: boolean;
22
+ isHideTablePreview?: boolean;
23
+ enableDownloadCsv?: boolean;
24
+ enableEmailCsv?: boolean;
25
+ disableDownloadPng?: boolean;
26
+ onMinimize?: () => void;
27
+ chartRendererType?: 'svg' | 'canvas';
28
+ theme?: ThemeType;
29
+ width?: number;
30
+ height?: number;
31
+ className?: string;
32
+ style?: React.CSSProperties;
33
+ metricFilterOptions?: MetricFilterOptionsType;
34
+ enableMultiMetricFilters?: boolean;
35
+ metricFilterPosition?: 'outside' | 'inside';
36
+ isDisableCardTitle?: boolean;
37
+ disableFullscreen?: boolean;
38
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
39
+ customMessages?: {
40
+ tokenExpiry?: string;
41
+ tokenAbsent?: string;
42
+ };
43
+ themeName?: string;
44
+ appearanceOptions?: {
45
+ appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
46
+ dynamicBehaviour?: {
47
+ isEnabled?: boolean;
48
+ label?: string;
49
+ };
50
+ cumulativeBar?: {
51
+ isEnabled?: boolean;
52
+ label?: string;
53
+ };
54
+ stackedBars?: {
55
+ isEnabled?: boolean;
56
+ label?: string;
57
+ };
58
+ };
59
+ hideDatePickerOptions?: string[];
60
+ chartAppearance?: ChartAppearanceType;
61
+ hideMetricCardShadow?: boolean;
62
+ disableUnderlyingData?: boolean;
63
+ noDataImg?: string;
64
+ disableMetricCardBorder?: boolean;
65
+ longDescriptionConfig?: {
66
+ width?: string;
67
+ fontColor?: string;
68
+ };
69
+ isMergedCard?: boolean;
70
+ chartColumns?: {
71
+ dimensions?: string[];
72
+ measures?: string[];
73
+ isEnabled?: boolean;
74
+ };
75
+ }
76
+ /**
77
+ * @name Metric - A react component to display a single metric card.
78
+ * @prop {string} token - A client based guest token.
79
+ * @prop {string} metricId - A metric id (one which you have provided at the time of it's creation) of the metric you want to display.
80
+ * @prop {boolean} isHideChartSettings - Whether to hide the chart settings in full screen view.
81
+ * @prop {boolean} isHideTablePreview - Whether to hide the table preview in full screen view.
82
+ * @prop {boolean} enableDownloadCsv (optional) - Whether to show download csv option in metric card.
83
+ * @prop {boolean} enableEmailCsv (optional) - Whether to show email csv option in metric card.
84
+ * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
85
+ * @prop {string} variant (optional) - The variant to render the metric it can be card (fullscreen included) or fullscreen.
86
+ * @prop {object} metricFilterOptions (optional) - An optional metric filter options to be displayed in the metric filters.
87
+ * @prop {function} onMinimize (optional) - An optional callback when minimize button is clicked.
88
+ * @prop {array} chartColors (optional) - An array of colors to be used to visualize the chart.
89
+ * @prop {string} chartRendererType (optional) - Whether to display chart as svg or canvas. In case of low end devices or in general svg is better and in case of frequent data changes or high size data visualization canvas is better. Defaults to canvas.
90
+ * @prop {number} width (optional) - The width of the metric card e.g. 500, 200 etc. will be treated as pixel value.
91
+ * @prop {number} height (optional) - The height of the metric card e.g. 500, 200 etc. will be treated as pixel value.
92
+ * @prop {string} className (optional) - The usual className prop to provide styles.
93
+ * @prop {object} style (optional) - The usual css style prop to provide inline styles.
94
+ * @prop {object} theme (optional) - Theme config object to apply to the UI.
95
+ * @prop {object} isDisableCardTitle (optional) - An optional to hide card title.
96
+ */
97
+ export declare const Metric: React.MemoExoticComponent<({ theme, width, height, style, className, metricFilterOptions, appearanceOptions, hideMetricCardShadow, longDescriptionConfig, chartColumns, ...metricProps }: MetricProps) => React.JSX.Element>;
@@ -0,0 +1,7 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { ThemeType } from '@/utils';
3
+ type PluginProviderProps = PropsWithChildren & {
4
+ theme?: ThemeType;
5
+ };
6
+ export declare const PluginProvider: ({ children, theme }: PluginProviderProps) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './Dashboard';
2
+ export * from './PluginProvider';
3
+ export * from './Metric';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @name adaptiveFormatter - helps in formatting the data in adaptive format (eg. k, M, B etc)
3
+ * @params - takes the value that needs to be formatted and a flag that tells if the value is in decimals or not
4
+ * @returns - value in adaptive format
5
+ */
6
+ export declare const adaptiveFormatter: (val: any, isDecimal: boolean, hasDecimalNums?: boolean) => string;
@@ -0,0 +1 @@
1
+ export declare const areArraysEqual: (arr1: any, arr2: any) => any;
@@ -0,0 +1,95 @@
1
+ import { ChartSettingsType, FilteredOptionResult, FloatingDropDownOption, KeywordFilteredResult, SearchColumn, SelectedColumn, SqlColumns, TableObjectType } from '@/types';
2
+ export declare const getSearchKeywordList: (searchString: string) => string[];
3
+ export declare const getFilteredKeywords: (keywordList: string[], isNumberFilter: boolean) => KeywordFilteredResult;
4
+ export declare const parseNumberName: (keywords: string[]) => number;
5
+ export declare const isLikeFilterColumn: (column: SelectedColumn) => boolean;
6
+ export declare const getOptionLabel: ({ column, keywords, likeOperationMatch, }: {
7
+ column: SelectedColumn;
8
+ keywords: string[];
9
+ likeOperationMatch: RegExpMatchArray | null;
10
+ }) => string;
11
+ export declare const getSortLimitAppliedColumnOptions: ({ columnOptions, limit, sortType, }: {
12
+ columnOptions: SelectedColumn[];
13
+ sortType: string | undefined;
14
+ limit: number;
15
+ }) => SelectedColumn[];
16
+ export declare const isSynonymPatternMatching: (opt: SelectedColumn, searchString: string, isLike: boolean) => boolean;
17
+ export declare const getPrimaryFilteredOptions: (options: SelectedColumn[], searchString: string, isLike: boolean) => FilteredOptionResult;
18
+ export declare const getRemainingFilterOption: ({ isLike, isQuestion, keywordList, options, isGroupBy, }: {
19
+ options: SelectedColumn[];
20
+ keywordList: string[];
21
+ isLike: boolean;
22
+ isQuestion: boolean;
23
+ isGroupBy: boolean;
24
+ }) => SelectedColumn[];
25
+ export declare const getFinalFilteredList: ({ keywordList, limit, options, isLikeFilter, isLikeOperation, isNumberFilter, isEnforceLikeFilter, isEndWith, isStartWith, sortType, }: {
26
+ options: SelectedColumn[];
27
+ limit: number;
28
+ keywordList: string[];
29
+ isLikeOperation: RegExpMatchArray | null;
30
+ isLikeFilter: RegExpMatchArray | null;
31
+ isNumberFilter: RegExpMatchArray | null;
32
+ isEnforceLikeFilter: boolean;
33
+ isStartWith: boolean;
34
+ isEndWith: boolean;
35
+ sortType: string | undefined;
36
+ }) => SelectedColumn[];
37
+ export declare const getColumnDataType: (datatype: string) => "NUMBER" | "STRING" | "DATE" | "ARRAY" | "BOOLEAN" | undefined;
38
+ export declare const getHelperFunctions: (datatype: 'NUMBER' | 'STRING' | 'DATE' | 'ARRAY' | 'BOOLEAN' | undefined, isElasticSearch: boolean) => FloatingDropDownOption[];
39
+ export declare const getLastWordBeforeSpace: (value: string) => string;
40
+ export declare const isSearchKeywordIncluded: (field: keyof SearchColumn, opt: SearchColumn, keyword: string) => boolean;
41
+ export declare const isValidOption: (options: SearchColumn[], keyword: string) => boolean;
42
+ export declare const getEnableCharts: (data: Record<string, any>[], groupByList: string[]) => string[];
43
+ export declare const chartDimensions: (data: Record<string, any>[], groupByColumnList: string[], chartType: string) => {
44
+ yAxisList: string[];
45
+ xAxis: string;
46
+ singleValue: string;
47
+ };
48
+ export declare const getChartDimensions: (columns: SqlColumns, chartType: string) => {
49
+ yAxisList: string[];
50
+ xAxis: string;
51
+ singleValue: string;
52
+ progressData: string;
53
+ progressMaxData: string;
54
+ progressMinData: string;
55
+ };
56
+ export declare const getEnabledCharts: (data: Record<string, any>[], columns: SqlColumns) => string[];
57
+ export declare const getColumns: ({ columns, data, dbName, }: {
58
+ data: Record<string, any>[];
59
+ columns: SqlColumns;
60
+ dbName: string;
61
+ }) => {
62
+ resDataColumns: string[];
63
+ dimensions: string[];
64
+ measures: string[];
65
+ };
66
+ export declare const combineFollowUpQuestions: (searchState: any) => string[];
67
+ export declare const determineChartType: ({ isProgressiveDimension, orderBy, dimensionCount, measureCount, dataLength, isCountryDimension, isDifferentMeasureScales, isNullValue, questionType, }: {
68
+ orderBy?: "ASC" | "DESC" | undefined;
69
+ isTimeSeries?: boolean | undefined;
70
+ isProgressiveDimension?: boolean | undefined;
71
+ dimensionCount?: number | undefined;
72
+ measureCount?: number | undefined;
73
+ dataLength?: number | undefined;
74
+ isCountryDimension?: boolean | undefined;
75
+ isDifferentMeasureScales?: boolean | undefined;
76
+ isNullValue?: boolean | undefined;
77
+ questionType?: string | undefined;
78
+ }) => string;
79
+ export declare const getChartSettings: ({ chartType, dimensions, measures, chartSettings, columns, displayText, sqlMetadata, tableList, isRepeatedValue, dimensionMetadata, measureMetadata, isMultiSeries, }: {
80
+ chartType: ChartSettingsType['chartType'];
81
+ dimensions: string[];
82
+ measures: string[];
83
+ chartSettings: ChartSettingsType;
84
+ columns: string[];
85
+ displayText?: string | undefined;
86
+ sqlMetadata: Record<string, any>[];
87
+ dimensionMetadata: Record<string, any>[];
88
+ measureMetadata: Record<string, any>[];
89
+ tableList: TableObjectType[];
90
+ isRepeatedValue: boolean;
91
+ isMultiSeries: boolean;
92
+ }) => ChartSettingsType;
93
+ export declare const hasRepeatedValue: (arr: Record<string, any>[], key: string) => boolean;
94
+ export declare const getValidJsonArray: (json: string) => any[];
95
+ export declare const getValidJsonObject: (json: string) => any;
@@ -0,0 +1,5 @@
1
+ import { ClickActionsConfig } from '@/types';
2
+ export declare const handleChartRoute: (route: string, isOpenInNewTab?: boolean) => void;
3
+ export declare const handleRoute: (routeType: string, route: string) => void;
4
+ export declare const handleCardClick: (clickActionsConfig: ClickActionsConfig, metricId: string, id: string) => void;
5
+ export declare const handleChartClickRouting: (clickActionsConfig: ClickActionsConfig['chart'], value: string | number) => void;
@@ -0,0 +1,93 @@
1
+ import { CustomSettings, LabelSettings } from '@/types';
2
+ type DataRow = Record<string, any>;
3
+ type GetXaxisDataParams = {
4
+ data: DataRow[];
5
+ xAxis: string;
6
+ isGroupBy: boolean;
7
+ isGroupXAxis: boolean;
8
+ };
9
+ type GetDatasetParams = {
10
+ data: DataRow[];
11
+ yAxisList: string[];
12
+ seriesField: string;
13
+ xAxisData: string[];
14
+ isGroupBy: boolean;
15
+ xAxis: string;
16
+ groupByColumnUniqueValue: string[];
17
+ isShowPercentageFullStack: boolean;
18
+ groupXAxis: {
19
+ isGroupXAxis: boolean;
20
+ Aggregate: 'SUM' | 'AVG' | 'MAX' | 'MIN';
21
+ };
22
+ };
23
+ export type Dataset = {
24
+ label: string;
25
+ data: (number | null)[];
26
+ };
27
+ type GetSeriesDataParams = {
28
+ labelSettings: LabelSettings;
29
+ customSettings: CustomSettings;
30
+ datasets: Dataset[];
31
+ isShowPercentageFullStack: boolean;
32
+ type: string;
33
+ isShowSymbol: boolean;
34
+ barChartSettings?: Record<string, any>;
35
+ lineChartSettings?: Record<string, any>;
36
+ isShowCumulativeBar: boolean;
37
+ stackChartSettings?: Record<string, any>;
38
+ isEnableValueSummation?: boolean;
39
+ colorPalette?: string[];
40
+ axisPosition?: string;
41
+ chartLabelPosition?: 'hidden' | 'top' | 'left' | 'right' | 'bottom' | 'outside' | 'inside';
42
+ };
43
+ type GetChartLengendDataParams = {
44
+ isGroupBy: boolean;
45
+ yAxisList: string[];
46
+ groupByColumnUniqueValue: string[];
47
+ isShowPercentageFullStack: boolean;
48
+ };
49
+ export declare const getXaxisData: ({ data, isGroupBy, xAxis, isGroupXAxis, }: GetXaxisDataParams) => string[];
50
+ export declare const getChartDataset: ({ data, isGroupBy, seriesField, xAxis, xAxisData, yAxisList, groupByColumnUniqueValue, isShowPercentageFullStack, groupXAxis, }: GetDatasetParams) => Dataset[];
51
+ export declare const getPercentageData: (datasets: Dataset[]) => Record<string, (string | null)[]>;
52
+ export declare const getCumulativeBarData: (datasets: Dataset[], isShowCumulativeBar: boolean) => Dataset[];
53
+ export declare const getSummationLabelValue: (datasets: Dataset[], isShowPercentageFullStack: boolean) => any[];
54
+ export declare const getChartSeriesData: ({ labelSettings, customSettings, datasets, isShowPercentageFullStack, type, isShowSymbol, barChartSettings, isShowCumulativeBar, stackChartSettings, isEnableValueSummation, lineChartSettings, colorPalette, axisPosition, chartLabelPosition, }: GetSeriesDataParams) => {
55
+ emphasis: {
56
+ focus: string;
57
+ };
58
+ type: string;
59
+ showSymbol: boolean;
60
+ markArea?: {
61
+ silent: boolean;
62
+ label: {
63
+ position: string;
64
+ };
65
+ data: ({
66
+ name: string;
67
+ yAxis: number;
68
+ itemStyle: {
69
+ borderColor: string | undefined;
70
+ borderWidth: number;
71
+ color: string;
72
+ };
73
+ } | {
74
+ yAxis: number;
75
+ name?: undefined;
76
+ itemStyle?: undefined;
77
+ })[][];
78
+ } | undefined;
79
+ data: (number | null)[] | (string | null)[];
80
+ name: string;
81
+ label: {
82
+ show: boolean | undefined;
83
+ position: string | undefined;
84
+ formatter(d: {
85
+ data: any;
86
+ name: string;
87
+ seriesIndex: number;
88
+ dataIndex: number;
89
+ }): string;
90
+ };
91
+ }[];
92
+ export declare const getChartLengendData: ({ groupByColumnUniqueValue, isGroupBy, isShowPercentageFullStack, yAxisList, }: GetChartLengendDataParams) => string[];
93
+ export {};
@@ -0,0 +1 @@
1
+ export declare const isInViewport: (element: any) => boolean;
@@ -0,0 +1,3 @@
1
+ import { ConditionalFormattingParam } from '@/types';
2
+ declare const conditionalFormattingStyles: ({ rules, value: columnValue, }: ConditionalFormattingParam) => any;
3
+ export default conditionalFormattingStyles;
@@ -0,0 +1,4 @@
1
+ declare const copyToClipboard: (textToCopy: string) => void;
2
+ export default copyToClipboard;
3
+ export declare const onCopy: (text: string) => void;
4
+ export declare const copyTextAndCallback: (text: string, onComplete: () => void) => void;
@@ -0,0 +1,35 @@
1
+ import { Aggregate, ChartSettingsType, DatasetMetricCreationConfiguration, DateRange, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn, SetChartFieldParams } from '@/types';
2
+ export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
3
+ export declare const getColumnType: (column: SelectedColumn) => "custom" | "default" | "arithmetic_column";
4
+ export declare const getGroupedColumnList: (data: any[]) => string[];
5
+ export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
6
+ dimensions: Dimension[];
7
+ aggregates: Aggregate[];
8
+ };
9
+ export declare const getChartFields: (colList: SelectedColumn[], dbName: string) => string[];
10
+ export declare const getAppliedFilters: (filterList: RlsCondition[], companyTenancyType: string, clientId: string) => RlsCondition[];
11
+ export declare const getChartType: ({ aggregates, dimensions, }: DatasetMetricCreationConfiguration) => ChartSettingsType['chartType'];
12
+ export declare const getSchemaNameAlias: (schemaName: string, dbName: string) => string;
13
+ export declare const isDateStringValid: (dateString: string) => boolean;
14
+ export declare const getSavedChartFields: (optionList: string[], newData?: any[]) => string[];
15
+ export declare const setChartFields: ({ chartType, chartDimensions, chartMetrics, chartAggregateColumns, resultData, configAggregates, pivotHeaderColumns, chartTimeColumns, setChartSettings, chartSettings, configuration, }: SetChartFieldParams) => void;
16
+ export declare const getDatabaseName: (name: string) => "bigquery" | "mysql" | "postgresql";
17
+ export declare const getWordCount: (text: string) => number;
18
+ export declare const generateRandomId: (length?: number) => string;
19
+ export declare const enableSaveToDashboardButton: ({ chartSettings, dimensions, isCustomTable, metrics, }: {
20
+ chartSettings: ChartSettingsType;
21
+ dimensions: SelectedColumn[];
22
+ metrics: SelectedColumn[];
23
+ isCustomTable: boolean;
24
+ }) => number | undefined;
25
+ export declare const deepEqual: (obj1: Record<string, any> | undefined, obj2: Record<string, any> | undefined) => boolean;
26
+ export declare const sqlGuideLines: (dbName: string, isDatabaseTenancy: boolean) => string[];
27
+ export declare const replaceKeysWithValues: (str: string, obj: Record<string, any>) => string;
28
+ export declare const getRangeDate: (range?: DateRange, isFrom?: boolean) => Date | undefined;
29
+ export declare const getMinMaxDate: ({ from, to, }: {
30
+ from?: DateRange | undefined;
31
+ to?: DateRange | undefined;
32
+ }) => {
33
+ min: Date | undefined;
34
+ max: Date | undefined;
35
+ } | undefined;
@@ -0,0 +1,2 @@
1
+ export declare const darkColorIdentifier: (color: string) => boolean;
2
+ export declare const adjustColor: (hexColor: string) => string;
@@ -0,0 +1 @@
1
+ export declare const dateFormatter: (date: string, timeFormat: string) => string;
@@ -0,0 +1 @@
1
+ export declare const generateColorPalette: (originalColors: string[], numberOfRecords: number) => string[];