@bikdotai/bik-component-library 0.0.736-beta.5 → 0.0.736-beta.7

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 (819) hide show
  1. package/dist/cjs/_virtual/_tslib.js +1 -1
  2. package/dist/cjs/amplitude/index.js +1 -1
  3. package/dist/cjs/assets/icons/AiEdit.svg.js +1 -1
  4. package/dist/cjs/assets/icons/Ai_event_generating.svg.js +1 -1
  5. package/dist/cjs/assets/icons/Bik_logo.svg.js +1 -1
  6. package/dist/cjs/assets/icons/ChartBar.svg.js +1 -1
  7. package/dist/cjs/assets/icons/ChartPie.svg.js +1 -1
  8. package/dist/cjs/assets/icons/HelpIcon.svg.js +1 -1
  9. package/dist/cjs/assets/icons/Idea.svg.js +1 -1
  10. package/dist/cjs/assets/icons/RCS_PDF.svg.js +1 -1
  11. package/dist/cjs/assets/icons/RedirectToNew.svg.js +1 -1
  12. package/dist/cjs/assets/icons/WhiteStarFilled.svg.js +1 -1
  13. package/dist/cjs/assets/icons/aiContentIcon.svg.js +1 -1
  14. package/dist/cjs/assets/icons/alert.svg.js +1 -1
  15. package/dist/cjs/assets/icons/alert_triangle.svg.js +1 -1
  16. package/dist/cjs/assets/icons/arrow_back.svg.js +1 -1
  17. package/dist/cjs/assets/icons/arrow_down.svg.js +1 -1
  18. package/dist/cjs/assets/icons/arrow_left.svg.js +1 -1
  19. package/dist/cjs/assets/icons/arrow_up.svg.js +1 -1
  20. package/dist/cjs/assets/icons/back_icon.svg.js +1 -1
  21. package/dist/cjs/assets/icons/bik_livechat.svg.js +1 -1
  22. package/dist/cjs/assets/icons/bold.svg.js +1 -1
  23. package/dist/cjs/assets/icons/box.svg.js +1 -1
  24. package/dist/cjs/assets/icons/boxV2.svg.js +1 -1
  25. package/dist/cjs/assets/icons/box_round.svg.js +1 -1
  26. package/dist/cjs/assets/icons/box_search.svg.js +1 -1
  27. package/dist/cjs/assets/icons/broken_media_image.svg.js +1 -1
  28. package/dist/cjs/assets/icons/calendar.svg.js +1 -1
  29. package/dist/cjs/assets/icons/card_footer_arraw.svg.js +1 -1
  30. package/dist/cjs/assets/icons/chat-channel.svg.js +1 -1
  31. package/dist/cjs/assets/icons/check.svg.js +1 -1
  32. package/dist/cjs/assets/icons/checkCircle.svg.js +1 -1
  33. package/dist/cjs/assets/icons/checklistIcon.svg.js +1 -1
  34. package/dist/cjs/assets/icons/chevronDown.svg.js +1 -1
  35. package/dist/cjs/assets/icons/chevronDownOutline.svg.js +1 -1
  36. package/dist/cjs/assets/icons/chevronLeft.svg.js +1 -1
  37. package/dist/cjs/assets/icons/chevronLeft2.svg.js +1 -1
  38. package/dist/cjs/assets/icons/chevronRight.svg.js +1 -1
  39. package/dist/cjs/assets/icons/chevronRight2.svg.js +1 -1
  40. package/dist/cjs/assets/icons/chevronRightAlt.svg.js +1 -1
  41. package/dist/cjs/assets/icons/chevronUpOutline.svg.js +1 -1
  42. package/dist/cjs/assets/icons/click.svg.js +1 -1
  43. package/dist/cjs/assets/icons/clock.svg.js +1 -1
  44. package/dist/cjs/assets/icons/copy-code-icon.svg.js +1 -1
  45. package/dist/cjs/assets/icons/cross.svg.js +1 -1
  46. package/dist/cjs/assets/icons/cubeIcon.svg.js +1 -1
  47. package/dist/cjs/assets/icons/cursor.svg.js +1 -1
  48. package/dist/cjs/assets/icons/delete.svg.js +1 -1
  49. package/dist/cjs/assets/icons/desktop_custom.svg.js +1 -1
  50. package/dist/cjs/assets/icons/document_pdf.svg.js +1 -1
  51. package/dist/cjs/assets/icons/drag_handle.svg.js +1 -1
  52. package/dist/cjs/assets/icons/edit.svg.js +1 -1
  53. package/dist/cjs/assets/icons/email-channel.svg.js +1 -1
  54. package/dist/cjs/assets/icons/emoji.svg.js +1 -1
  55. package/dist/cjs/assets/icons/errorIcon.svg.js +1 -1
  56. package/dist/cjs/assets/icons/errorInfo.svg.js +1 -1
  57. package/dist/cjs/assets/icons/expressionless_emoji.svg.js +1 -1
  58. package/dist/cjs/assets/icons/facebook_channel.svg.js +1 -1
  59. package/dist/cjs/assets/icons/file.svg.js +1 -1
  60. package/dist/cjs/assets/icons/filePdf.svg.js +1 -1
  61. package/dist/cjs/assets/icons/gift_icon.svg.js +1 -1
  62. package/dist/cjs/assets/icons/gmail.svg.js +1 -1
  63. package/dist/cjs/assets/icons/graph.svg.js +1 -1
  64. package/dist/cjs/assets/icons/halfRectangle.svg.js +1 -1
  65. package/dist/cjs/assets/icons/help.svg.js +1 -1
  66. package/dist/cjs/assets/icons/horizontal_dots.svg.js +1 -1
  67. package/dist/cjs/assets/icons/image.svg.js +1 -1
  68. package/dist/cjs/assets/icons/info.svg.js +1 -1
  69. package/dist/cjs/assets/icons/instagram-channel.svg.js +1 -1
  70. package/dist/cjs/assets/icons/instagram.svg.js +1 -1
  71. package/dist/cjs/assets/icons/italic.svg.js +1 -1
  72. package/dist/cjs/assets/icons/locked.svg.js +1 -1
  73. package/dist/cjs/assets/icons/log_out.svg.js +1 -1
  74. package/dist/cjs/assets/icons/lto_icon.svg.js +1 -1
  75. package/dist/cjs/assets/icons/maximize.svg.js +1 -1
  76. package/dist/cjs/assets/icons/mobile_custom.svg.js +1 -1
  77. package/dist/cjs/assets/icons/more_vertical.svg.js +1 -1
  78. package/dist/cjs/assets/icons/openai.svg.js +1 -1
  79. package/dist/cjs/assets/icons/percentage_icon.svg.js +1 -1
  80. package/dist/cjs/assets/icons/phone.svg.js +1 -1
  81. package/dist/cjs/assets/icons/phone_round.svg.js +1 -1
  82. package/dist/cjs/assets/icons/plus.svg.js +1 -1
  83. package/dist/cjs/assets/icons/qrb.svg.js +1 -1
  84. package/dist/cjs/assets/icons/question-mark.svg.js +1 -1
  85. package/dist/cjs/assets/icons/quotes.svg.js +1 -1
  86. package/dist/cjs/assets/icons/redirect.svg.js +1 -1
  87. package/dist/cjs/assets/icons/refresh.svg.js +1 -1
  88. package/dist/cjs/assets/icons/retryIcon.svg.js +1 -1
  89. package/dist/cjs/assets/icons/sad_emoji.svg.js +1 -1
  90. package/dist/cjs/assets/icons/search.svg.js +1 -1
  91. package/dist/cjs/assets/icons/searchIcon.svg.js +1 -1
  92. package/dist/cjs/assets/icons/send_template.svg.js +1 -1
  93. package/dist/cjs/assets/icons/shipping_icon.svg.js +1 -1
  94. package/dist/cjs/assets/icons/similar.svg.js +1 -1
  95. package/dist/cjs/assets/icons/smiley_emoji.svg.js +1 -1
  96. package/dist/cjs/assets/icons/sparkle.svg.js +1 -1
  97. package/dist/cjs/assets/icons/speedometer.svg.js +1 -1
  98. package/dist/cjs/assets/icons/starEmpty.svg.js +1 -1
  99. package/dist/cjs/assets/icons/starFilled.svg.js +1 -1
  100. package/dist/cjs/assets/icons/starFilledV2.svg.js +1 -1
  101. package/dist/cjs/assets/icons/state_icon.svg.js +1 -1
  102. package/dist/cjs/assets/icons/strikeThrough.svg.js +1 -1
  103. package/dist/cjs/assets/icons/sub_category.svg.js +1 -1
  104. package/dist/cjs/assets/icons/successIcon.svg.js +1 -1
  105. package/dist/cjs/assets/icons/sync.svg.js +1 -1
  106. package/dist/cjs/assets/icons/task.svg.js +1 -1
  107. package/dist/cjs/assets/icons/text_t9.svg.js +1 -1
  108. package/dist/cjs/assets/icons/tick.svg.js +1 -1
  109. package/dist/cjs/assets/icons/tick_double.svg.js +1 -1
  110. package/dist/cjs/assets/icons/triangle_error.svg.js +1 -1
  111. package/dist/cjs/assets/icons/undo.svg.js +1 -1
  112. package/dist/cjs/assets/icons/union.svg.js +1 -1
  113. package/dist/cjs/assets/icons/upload.svg.js +1 -1
  114. package/dist/cjs/assets/icons/user_icon.svg.js +1 -1
  115. package/dist/cjs/assets/icons/vertical_dots.svg.js +1 -1
  116. package/dist/cjs/assets/icons/videoRecorder.svg.js +1 -1
  117. package/dist/cjs/assets/icons/warning.svg.js +1 -1
  118. package/dist/cjs/assets/icons/warningIcon.svg.js +1 -1
  119. package/dist/cjs/assets/icons/website.svg.js +1 -1
  120. package/dist/cjs/assets/icons/whatsNew.svg.js +1 -1
  121. package/dist/cjs/assets/icons/whatsapp-channel.svg.js +1 -1
  122. package/dist/cjs/assets/icons/whatsapp_color.svg.js +1 -1
  123. package/dist/cjs/components/InfiniteScroll/InfiniteScroll.js +1 -1
  124. package/dist/cjs/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
  125. package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  126. package/dist/cjs/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
  127. package/dist/cjs/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
  128. package/dist/cjs/components/QueryBuilder/QueryBuilder.js +1 -1
  129. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
  130. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
  131. package/dist/cjs/components/QueryBuilder/components/AddNodeButton.js +1 -1
  132. package/dist/cjs/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
  133. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  134. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
  135. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +1 -1
  136. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IgPicker.js +1 -1
  137. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
  138. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -1
  139. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
  140. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
  141. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
  142. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
  143. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  144. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  145. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
  146. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  147. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
  148. package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  149. package/dist/cjs/components/QueryBuilder/components/DeleteButton.js +1 -1
  150. package/dist/cjs/components/QueryBuilder/components/DropdownWrapper.js +1 -1
  151. package/dist/cjs/components/QueryBuilder/components/InputLoader.js +1 -1
  152. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
  153. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
  154. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
  155. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
  156. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
  157. package/dist/cjs/components/QueryBuilder/helpers/ApiResponse.helper.js +1 -1
  158. package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.js +1 -1
  159. package/dist/cjs/components/QueryBuilder/hooks/useQueryBuilderCache.js +1 -1
  160. package/dist/cjs/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
  161. package/dist/cjs/components/QueryBuilder/redux/selectors/useQueryBuilderCacheSelector.js +1 -1
  162. package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
  163. package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  164. package/dist/cjs/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  165. package/dist/cjs/components/SearchFilter/index.js +1 -1
  166. package/dist/cjs/components/TablePagination/TablePagination.js +1 -1
  167. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  168. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +2 -2
  169. package/dist/cjs/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
  170. package/dist/cjs/components/accordion/Accordion.js +1 -1
  171. package/dist/cjs/components/accordion/AccordionArrow.js +1 -1
  172. package/dist/cjs/components/action-button/ActionButtons.js +1 -1
  173. package/dist/cjs/components/add-variableV2/AddVariableV2.js +1 -1
  174. package/dist/cjs/components/ai-modals/ActivateBikAI.js +1 -1
  175. package/dist/cjs/components/ai-modals/AiCreditsExhausted.js +1 -1
  176. package/dist/cjs/components/ai-modals/AiCreditsLow.js +1 -1
  177. package/dist/cjs/components/ai-modals/AiSyncProgress.js +1 -1
  178. package/dist/cjs/components/analytics-card/AnalyticsCard.js +1 -1
  179. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  180. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  181. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  182. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  183. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  184. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +2 -2
  185. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  186. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +1 -1
  187. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +2 -2
  188. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  189. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
  190. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  191. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
  192. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  193. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
  194. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  195. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
  196. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/Chip.js +1 -1
  197. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/HorizontalBar.js +1 -1
  198. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.js +1 -1
  199. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js +1 -1
  200. package/dist/cjs/components/avatar/Avatar.js +1 -1
  201. package/dist/cjs/components/banner/BannerInline.js +1 -1
  202. package/dist/cjs/components/banner/CardBanner.js +1 -1
  203. package/dist/cjs/components/bik-chatbot/components/AIChat.js +1 -1
  204. package/dist/cjs/components/bik-chatbot/components/BIKChatbot.js +1 -1
  205. package/dist/cjs/components/bik-chatbot/components/ChatLoadingState.js +1 -1
  206. package/dist/cjs/components/bik-chatbot/components/ChatWindow.js +1 -1
  207. package/dist/cjs/components/bik-chatbot/components/ThinkingIndicator.js +1 -1
  208. package/dist/cjs/components/bik-chatbot/contexts/AIContext.js +1 -1
  209. package/dist/cjs/components/bik-chatbot/services/aiService.js +1 -1
  210. package/dist/cjs/components/bik-chatbot/services/callToChatbot.js +1 -1
  211. package/dist/cjs/components/bik-chatbot/services/db.js +1 -1
  212. package/dist/cjs/components/bik-chatbot/services/useAIChat.js +1 -1
  213. package/dist/cjs/components/bik-chatbot/utils/markdown.js +1 -1
  214. package/dist/cjs/components/bik-layout/BikProfile.js +1 -1
  215. package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
  216. package/dist/cjs/components/bik-layout/SidebarPopup.js +1 -1
  217. package/dist/cjs/components/bik-layout/SidebarSkeleton.js +1 -1
  218. package/dist/cjs/components/bik-layout/SimpleSidebar.js +1 -1
  219. package/dist/cjs/components/button/Button.js +1 -1
  220. package/dist/cjs/components/button/Button.styled.js +1 -1
  221. package/dist/cjs/components/button/themes.js +1 -1
  222. package/dist/cjs/components/buttonGroup/ButtonGroup.js +1 -1
  223. package/dist/cjs/components/card-selection-modal/CardSelectionModal.js +1 -1
  224. package/dist/cjs/components/card-selector/CardSelectorGroup.js +1 -1
  225. package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
  226. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +1 -1
  227. package/dist/cjs/components/carousel-secondary/CarouselSecondary.js +1 -1
  228. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  229. package/dist/cjs/components/checkList/CheckList.js +1 -1
  230. package/dist/cjs/components/code-block/CodeBlock.js +1 -1
  231. package/dist/cjs/components/code-block/CodeBlock.styled.js +33 -33
  232. package/dist/cjs/components/code-block/CodeBlockHelper.js +1 -1
  233. package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
  234. package/dist/cjs/components/custom-date-time/CustomDateTime.js +1 -1
  235. package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  236. package/dist/cjs/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
  237. package/dist/cjs/components/dashboard-review-popup/components/FiveStar.js +1 -1
  238. package/dist/cjs/components/dashboard-review-popup/components/Form.js +1 -1
  239. package/dist/cjs/components/dashboard-review-popup/components/ZeroState.js +1 -1
  240. package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +1 -1
  241. package/dist/cjs/components/data-source-panel/DataSourcePanel.js +1 -1
  242. package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.js +1 -1
  243. package/dist/cjs/components/datePicker/DatePicker.js +1 -1
  244. package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
  245. package/dist/cjs/components/datePicker/TimePicker.js +1 -1
  246. package/dist/cjs/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
  247. package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
  248. package/dist/cjs/components/discount-modal/DiscountUtils.js +1 -1
  249. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  250. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.js +6 -6
  251. package/dist/cjs/components/dot-pulse/DotPulse.js +2 -2
  252. package/dist/cjs/components/dropShadow/DropShadow.js +1 -1
  253. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  254. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  255. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  256. package/dist/cjs/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
  257. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  258. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
  259. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
  260. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +5 -5
  261. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  262. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  263. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  264. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  265. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  266. package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
  267. package/dist/cjs/components/dropdown/hooks/useDropdown.js +1 -1
  268. package/dist/cjs/components/dynamic-tabs/DynamicTabs.js +1 -1
  269. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  270. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
  271. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
  272. package/dist/cjs/components/feature-announcements/VideoModal.js +1 -1
  273. package/dist/cjs/components/feature-announcements/hooks/useFeatureAnnouncements.js +1 -1
  274. package/dist/cjs/components/feature-announcements/utils/animationHelpers.js +1 -1
  275. package/dist/cjs/components/feature-announcements/utils/elementHelpers.js +1 -1
  276. package/dist/cjs/components/file-uploader/FileUploader.js +1 -1
  277. package/dist/cjs/components/floater/floater.js +1 -1
  278. package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.js +4 -4
  279. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  280. package/dist/cjs/components/image-compress/ImageCompress.js +1 -1
  281. package/dist/cjs/components/image-cropper/BikImageCropper.js +1 -1
  282. package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
  283. package/dist/cjs/components/input/ChipInput.js +1 -1
  284. package/dist/cjs/components/input/Input-helper.js +1 -1
  285. package/dist/cjs/components/input/Input.js +1 -1
  286. package/dist/cjs/components/input/Input.styled.js +1 -1
  287. package/dist/cjs/components/input-with-vars/InputWithVariables.js +1 -1
  288. package/dist/cjs/components/keywords-input/KeywordsInput.js +1 -1
  289. package/dist/cjs/components/list-item/ListItem.js +1 -1
  290. package/dist/cjs/components/markdown/index.js +1 -1
  291. package/dist/cjs/components/modals/Modal.js +1 -1
  292. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  293. package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
  294. package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
  295. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  296. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +20 -20
  297. package/dist/cjs/components/pagination/Pagination.js +1 -1
  298. package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -1
  299. package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
  300. package/dist/cjs/components/plans/SubscriptionPlanSelector.js +1 -1
  301. package/dist/cjs/components/plans/SubscriptionPlansCollected.js +1 -1
  302. package/dist/cjs/components/postPicker/postPicker.js +1 -1
  303. package/dist/cjs/components/product-picker/ProductPickerModal.js +1 -1
  304. package/dist/cjs/components/product-picker-v2/ProductPickerShimmer.js +1 -1
  305. package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
  306. package/dist/cjs/components/product-picker-v2/emptyState.js +1 -1
  307. package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.js +1 -1
  308. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  309. package/dist/cjs/components/product-picker-v2/product.js +1 -1
  310. package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
  311. package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -1
  312. package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
  313. package/dist/cjs/components/product-picker-v2/selectedScreen.js +1 -1
  314. package/dist/cjs/components/product-picker-v2/utility.js +1 -1
  315. package/dist/cjs/components/product-picker-v2/variantComponents.js +1 -1
  316. package/dist/cjs/components/progress-bar/CircularProgressBar.js +1 -1
  317. package/dist/cjs/components/radioButton/RadioButton.js +1 -1
  318. package/dist/cjs/components/radioList/RadioList.js +1 -1
  319. package/dist/cjs/components/resizeImage/index.js +1 -1
  320. package/dist/cjs/components/searchBar/searchBar.js +1 -1
  321. package/dist/cjs/components/shimmer/ShimmerComponent/BikShimmer.js +1 -1
  322. package/dist/cjs/components/shimmer-image/ShimmerImage.js +1 -1
  323. package/dist/cjs/components/side-modal/SideModal.style.js +16 -16
  324. package/dist/cjs/components/slider/slider.js +1 -1
  325. package/dist/cjs/components/spinner/Spinner.js +1 -1
  326. package/dist/cjs/components/star-rating/Star.js +1 -1
  327. package/dist/cjs/components/star-rating/StarRating.js +1 -1
  328. package/dist/cjs/components/states/ShopifyScopeWrapper.js +1 -1
  329. package/dist/cjs/components/stepper/Stepper.js +1 -1
  330. package/dist/cjs/components/switch/Switch.js +1 -1
  331. package/dist/cjs/components/tabs/Tabs.js +1 -1
  332. package/dist/cjs/components/tag/Tag.js +1 -1
  333. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  334. package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
  335. package/dist/cjs/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
  336. package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
  337. package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  338. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  339. package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  340. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  341. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
  342. package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +1 -1
  343. package/dist/cjs/components/template-context-mapper/modalElements/Header.js +1 -1
  344. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +1 -1
  345. package/dist/cjs/components/template-context-mapper/modalElements/QueryParamsComponent.js +1 -1
  346. package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
  347. package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js +1 -1
  348. package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  349. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
  350. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  351. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +1 -1
  352. package/dist/cjs/components/template-context-mapper/modalElements/VariableEditorHeader.js +2 -2
  353. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  354. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  355. package/dist/cjs/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.js +1 -1
  356. package/dist/cjs/components/template-context-mapper/utils/getDataFromTemplateComponent.js +1 -1
  357. package/dist/cjs/components/template-context-mapper/utils/highlightFor.js +1 -1
  358. package/dist/cjs/components/template-context-mapper/utils/validateName.js +1 -1
  359. package/dist/cjs/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
  360. package/dist/cjs/components/template-preview/RCS/RCSButtons.js +1 -1
  361. package/dist/cjs/components/template-preview/RCS/RCSChatPreview.js +1 -1
  362. package/dist/cjs/components/template-preview/RCS/RCSMediaCard.js +1 -1
  363. package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
  364. package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
  365. package/dist/cjs/components/template-preview/WhatsApp/ChatBtn.js +1 -1
  366. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.js +1 -1
  367. package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +1 -1
  368. package/dist/cjs/components/template-preview/WhatsApp/MediaCard.js +1 -1
  369. package/dist/cjs/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +1 -1
  370. package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  371. package/dist/cjs/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
  372. package/dist/cjs/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
  373. package/dist/cjs/components/template-preview/helpers/VariableEditorHelper.js +1 -1
  374. package/dist/cjs/components/template-preview/utils/TemplateHelperUtils.js +1 -1
  375. package/dist/cjs/components/template-preview/utils/getPreviewPropLen.js +1 -1
  376. package/dist/cjs/components/template-preview/webpush/WebpushPreview.js +1 -1
  377. package/dist/cjs/components/text-picker/TextPickerCategoryCard.js +5 -5
  378. package/dist/cjs/components/text-picker/TextPickerFooter.js +3 -3
  379. package/dist/cjs/components/text-picker/TextPickerItemRow.js +4 -4
  380. package/dist/cjs/components/text-picker/TextPickerModal.js +1 -1
  381. package/dist/cjs/components/text-picker/TextPickerSelectAllRow.js +5 -5
  382. package/dist/cjs/components/toaster/Toaster.js +1 -1
  383. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
  384. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
  385. package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
  386. package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -1
  387. package/dist/cjs/components/variable-picker-v3/recommendVaribles.js +1 -1
  388. package/dist/cjs/components/variable-picker-v3/searchVariables.js +1 -1
  389. package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
  390. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
  391. package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
  392. package/dist/cjs/components/whats-new/WhatsNewProvider.js +1 -1
  393. package/dist/cjs/components/whats-new/useWhatsNew.js +1 -1
  394. package/dist/cjs/helpers/BaseWhatsappContentLang.helper.js +1 -1
  395. package/dist/cjs/hooks/useCurreny.js +1 -1
  396. package/dist/cjs/hooks/useOutside.js +1 -1
  397. package/dist/cjs/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs.js +1 -1
  398. package/dist/cjs/node_modules/immer/dist/immer.mjs.js +1 -1
  399. package/dist/cjs/node_modules/lodash.debounce/index.js +1 -1
  400. package/dist/cjs/src/amplitude/Track.stories.d.ts +5 -3
  401. package/dist/cjs/src/components/banner/Banner.stories.d.ts +9 -6
  402. package/dist/cjs/src/components/shimmer-image/ShimmerImage.stories.d.ts +6 -5
  403. package/dist/cjs/src/components/tag/Tag.stories.d.ts +34 -19
  404. package/dist/cjs/utils/DateUtils.js +1 -1
  405. package/dist/cjs/utils/StringUtils.js +1 -1
  406. package/dist/cjs/utils/resizeImage.js +1 -1
  407. package/dist/cjs/utils/unCamelCase.js +1 -1
  408. package/dist/esm/_virtual/_tslib.js +1 -1
  409. package/dist/esm/amplitude/index.js +1 -1
  410. package/dist/esm/assets/icons/AiEdit.svg.js +1 -1
  411. package/dist/esm/assets/icons/Ai_event_generating.svg.js +1 -1
  412. package/dist/esm/assets/icons/Bik_logo.svg.js +1 -1
  413. package/dist/esm/assets/icons/ChartBar.svg.js +1 -1
  414. package/dist/esm/assets/icons/ChartPie.svg.js +1 -1
  415. package/dist/esm/assets/icons/HelpIcon.svg.js +1 -1
  416. package/dist/esm/assets/icons/Idea.svg.js +1 -1
  417. package/dist/esm/assets/icons/RCS_PDF.svg.js +1 -1
  418. package/dist/esm/assets/icons/RedirectToNew.svg.js +1 -1
  419. package/dist/esm/assets/icons/WhiteStarFilled.svg.js +1 -1
  420. package/dist/esm/assets/icons/aiContentIcon.svg.js +1 -1
  421. package/dist/esm/assets/icons/alert.svg.js +1 -1
  422. package/dist/esm/assets/icons/alert_triangle.svg.js +1 -1
  423. package/dist/esm/assets/icons/arrow_back.svg.js +1 -1
  424. package/dist/esm/assets/icons/arrow_down.svg.js +1 -1
  425. package/dist/esm/assets/icons/arrow_left.svg.js +1 -1
  426. package/dist/esm/assets/icons/arrow_up.svg.js +1 -1
  427. package/dist/esm/assets/icons/back_icon.svg.js +1 -1
  428. package/dist/esm/assets/icons/bik_livechat.svg.js +1 -1
  429. package/dist/esm/assets/icons/bold.svg.js +1 -1
  430. package/dist/esm/assets/icons/box.svg.js +1 -1
  431. package/dist/esm/assets/icons/boxV2.svg.js +1 -1
  432. package/dist/esm/assets/icons/box_round.svg.js +1 -1
  433. package/dist/esm/assets/icons/box_search.svg.js +1 -1
  434. package/dist/esm/assets/icons/broken_media_image.svg.js +1 -1
  435. package/dist/esm/assets/icons/calendar.svg.js +1 -1
  436. package/dist/esm/assets/icons/card_footer_arraw.svg.js +1 -1
  437. package/dist/esm/assets/icons/chat-channel.svg.js +1 -1
  438. package/dist/esm/assets/icons/check.svg.js +1 -1
  439. package/dist/esm/assets/icons/checkCircle.svg.js +1 -1
  440. package/dist/esm/assets/icons/checklistIcon.svg.js +1 -1
  441. package/dist/esm/assets/icons/chevronDown.svg.js +1 -1
  442. package/dist/esm/assets/icons/chevronDownOutline.svg.js +1 -1
  443. package/dist/esm/assets/icons/chevronLeft.svg.js +1 -1
  444. package/dist/esm/assets/icons/chevronLeft2.svg.js +1 -1
  445. package/dist/esm/assets/icons/chevronRight.svg.js +1 -1
  446. package/dist/esm/assets/icons/chevronRight2.svg.js +1 -1
  447. package/dist/esm/assets/icons/chevronRightAlt.svg.js +1 -1
  448. package/dist/esm/assets/icons/chevronUpOutline.svg.js +1 -1
  449. package/dist/esm/assets/icons/click.svg.js +1 -1
  450. package/dist/esm/assets/icons/clock.svg.js +1 -1
  451. package/dist/esm/assets/icons/copy-code-icon.svg.js +1 -1
  452. package/dist/esm/assets/icons/cross.svg.js +1 -1
  453. package/dist/esm/assets/icons/cubeIcon.svg.js +1 -1
  454. package/dist/esm/assets/icons/cursor.svg.js +1 -1
  455. package/dist/esm/assets/icons/delete.svg.js +1 -1
  456. package/dist/esm/assets/icons/desktop_custom.svg.js +1 -1
  457. package/dist/esm/assets/icons/document_pdf.svg.js +1 -1
  458. package/dist/esm/assets/icons/drag_handle.svg.js +1 -1
  459. package/dist/esm/assets/icons/edit.svg.js +1 -1
  460. package/dist/esm/assets/icons/email-channel.svg.js +1 -1
  461. package/dist/esm/assets/icons/emoji.svg.js +1 -1
  462. package/dist/esm/assets/icons/errorIcon.svg.js +1 -1
  463. package/dist/esm/assets/icons/errorInfo.svg.js +1 -1
  464. package/dist/esm/assets/icons/expressionless_emoji.svg.js +1 -1
  465. package/dist/esm/assets/icons/facebook_channel.svg.js +1 -1
  466. package/dist/esm/assets/icons/file.svg.js +1 -1
  467. package/dist/esm/assets/icons/filePdf.svg.js +1 -1
  468. package/dist/esm/assets/icons/gift_icon.svg.js +1 -1
  469. package/dist/esm/assets/icons/gmail.svg.js +1 -1
  470. package/dist/esm/assets/icons/graph.svg.js +1 -1
  471. package/dist/esm/assets/icons/halfRectangle.svg.js +1 -1
  472. package/dist/esm/assets/icons/help.svg.js +1 -1
  473. package/dist/esm/assets/icons/horizontal_dots.svg.js +1 -1
  474. package/dist/esm/assets/icons/image.svg.js +1 -1
  475. package/dist/esm/assets/icons/info.svg.js +1 -1
  476. package/dist/esm/assets/icons/instagram-channel.svg.js +1 -1
  477. package/dist/esm/assets/icons/instagram.svg.js +1 -1
  478. package/dist/esm/assets/icons/italic.svg.js +1 -1
  479. package/dist/esm/assets/icons/locked.svg.js +1 -1
  480. package/dist/esm/assets/icons/log_out.svg.js +1 -1
  481. package/dist/esm/assets/icons/lto_icon.svg.js +1 -1
  482. package/dist/esm/assets/icons/maximize.svg.js +1 -1
  483. package/dist/esm/assets/icons/mobile_custom.svg.js +1 -1
  484. package/dist/esm/assets/icons/more_vertical.svg.js +1 -1
  485. package/dist/esm/assets/icons/openai.svg.js +1 -1
  486. package/dist/esm/assets/icons/percentage_icon.svg.js +1 -1
  487. package/dist/esm/assets/icons/phone.svg.js +1 -1
  488. package/dist/esm/assets/icons/phone_round.svg.js +1 -1
  489. package/dist/esm/assets/icons/plus.svg.js +1 -1
  490. package/dist/esm/assets/icons/qrb.svg.js +1 -1
  491. package/dist/esm/assets/icons/question-mark.svg.js +1 -1
  492. package/dist/esm/assets/icons/quotes.svg.js +1 -1
  493. package/dist/esm/assets/icons/redirect.svg.js +1 -1
  494. package/dist/esm/assets/icons/refresh.svg.js +1 -1
  495. package/dist/esm/assets/icons/retryIcon.svg.js +1 -1
  496. package/dist/esm/assets/icons/sad_emoji.svg.js +1 -1
  497. package/dist/esm/assets/icons/search.svg.js +1 -1
  498. package/dist/esm/assets/icons/searchIcon.svg.js +1 -1
  499. package/dist/esm/assets/icons/send_template.svg.js +1 -1
  500. package/dist/esm/assets/icons/shipping_icon.svg.js +1 -1
  501. package/dist/esm/assets/icons/similar.svg.js +1 -1
  502. package/dist/esm/assets/icons/smiley_emoji.svg.js +1 -1
  503. package/dist/esm/assets/icons/sparkle.svg.js +1 -1
  504. package/dist/esm/assets/icons/speedometer.svg.js +1 -1
  505. package/dist/esm/assets/icons/starEmpty.svg.js +1 -1
  506. package/dist/esm/assets/icons/starFilled.svg.js +1 -1
  507. package/dist/esm/assets/icons/starFilledV2.svg.js +1 -1
  508. package/dist/esm/assets/icons/state_icon.svg.js +1 -1
  509. package/dist/esm/assets/icons/strikeThrough.svg.js +1 -1
  510. package/dist/esm/assets/icons/sub_category.svg.js +1 -1
  511. package/dist/esm/assets/icons/successIcon.svg.js +1 -1
  512. package/dist/esm/assets/icons/sync.svg.js +1 -1
  513. package/dist/esm/assets/icons/task.svg.js +1 -1
  514. package/dist/esm/assets/icons/text_t9.svg.js +1 -1
  515. package/dist/esm/assets/icons/tick.svg.js +1 -1
  516. package/dist/esm/assets/icons/tick_double.svg.js +1 -1
  517. package/dist/esm/assets/icons/triangle_error.svg.js +1 -1
  518. package/dist/esm/assets/icons/undo.svg.js +1 -1
  519. package/dist/esm/assets/icons/union.svg.js +1 -1
  520. package/dist/esm/assets/icons/upload.svg.js +1 -1
  521. package/dist/esm/assets/icons/user_icon.svg.js +1 -1
  522. package/dist/esm/assets/icons/vertical_dots.svg.js +1 -1
  523. package/dist/esm/assets/icons/videoRecorder.svg.js +1 -1
  524. package/dist/esm/assets/icons/warning.svg.js +1 -1
  525. package/dist/esm/assets/icons/warningIcon.svg.js +1 -1
  526. package/dist/esm/assets/icons/website.svg.js +1 -1
  527. package/dist/esm/assets/icons/whatsNew.svg.js +1 -1
  528. package/dist/esm/assets/icons/whatsapp-channel.svg.js +1 -1
  529. package/dist/esm/assets/icons/whatsapp_color.svg.js +1 -1
  530. package/dist/esm/components/InfiniteScroll/InfiniteScroll.js +1 -1
  531. package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
  532. package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  533. package/dist/esm/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
  534. package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
  535. package/dist/esm/components/QueryBuilder/QueryBuilder.js +1 -1
  536. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
  537. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
  538. package/dist/esm/components/QueryBuilder/components/AddNodeButton.js +1 -1
  539. package/dist/esm/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
  540. package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  541. package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
  542. package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
  543. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.js +1 -1
  544. package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
  545. package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -1
  546. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
  547. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
  548. package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
  549. package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
  550. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  551. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  552. package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
  553. package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  554. package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
  555. package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  556. package/dist/esm/components/QueryBuilder/components/DeleteButton.js +1 -1
  557. package/dist/esm/components/QueryBuilder/components/DropdownWrapper.js +1 -1
  558. package/dist/esm/components/QueryBuilder/components/InputLoader.js +4 -4
  559. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
  560. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
  561. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
  562. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
  563. package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
  564. package/dist/esm/components/QueryBuilder/helpers/ApiResponse.helper.js +1 -1
  565. package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
  566. package/dist/esm/components/QueryBuilder/hooks/useQueryBuilderCache.js +1 -1
  567. package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
  568. package/dist/esm/components/QueryBuilder/redux/selectors/useQueryBuilderCacheSelector.js +1 -1
  569. package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
  570. package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  571. package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  572. package/dist/esm/components/SearchFilter/index.js +1 -1
  573. package/dist/esm/components/TablePagination/TablePagination.js +1 -1
  574. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  575. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +2 -2
  576. package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
  577. package/dist/esm/components/accordion/Accordion.js +1 -1
  578. package/dist/esm/components/accordion/AccordionArrow.js +1 -1
  579. package/dist/esm/components/action-button/ActionButtons.js +1 -1
  580. package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
  581. package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -1
  582. package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -1
  583. package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -1
  584. package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -1
  585. package/dist/esm/components/analytics-card/AnalyticsCard.js +1 -1
  586. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  587. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  588. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  589. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  590. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  591. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +2 -2
  592. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  593. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +1 -1
  594. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +2 -2
  595. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  596. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
  597. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  598. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
  599. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  600. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
  601. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  602. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
  603. package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/Chip.js +1 -1
  604. package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/HorizontalBar.js +1 -1
  605. package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.js +1 -1
  606. package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js +1 -1
  607. package/dist/esm/components/avatar/Avatar.js +1 -1
  608. package/dist/esm/components/banner/BannerInline.js +1 -1
  609. package/dist/esm/components/banner/CardBanner.js +1 -1
  610. package/dist/esm/components/bik-chatbot/components/AIChat.js +1 -1
  611. package/dist/esm/components/bik-chatbot/components/BIKChatbot.js +1 -1
  612. package/dist/esm/components/bik-chatbot/components/ChatLoadingState.js +1 -1
  613. package/dist/esm/components/bik-chatbot/components/ChatWindow.js +1 -1
  614. package/dist/esm/components/bik-chatbot/components/ThinkingIndicator.js +1 -1
  615. package/dist/esm/components/bik-chatbot/contexts/AIContext.js +1 -1
  616. package/dist/esm/components/bik-chatbot/services/aiService.js +1 -1
  617. package/dist/esm/components/bik-chatbot/services/callToChatbot.js +1 -1
  618. package/dist/esm/components/bik-chatbot/services/db.js +1 -1
  619. package/dist/esm/components/bik-chatbot/services/useAIChat.js +1 -1
  620. package/dist/esm/components/bik-chatbot/utils/markdown.js +1 -1
  621. package/dist/esm/components/bik-layout/BikProfile.js +1 -1
  622. package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
  623. package/dist/esm/components/bik-layout/SidebarPopup.js +1 -1
  624. package/dist/esm/components/bik-layout/SidebarSkeleton.js +1 -1
  625. package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
  626. package/dist/esm/components/button/Button.js +1 -1
  627. package/dist/esm/components/button/Button.styled.js +1 -1
  628. package/dist/esm/components/button/themes.js +1 -1
  629. package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
  630. package/dist/esm/components/card-selection-modal/CardSelectionModal.js +1 -1
  631. package/dist/esm/components/card-selector/CardSelectorGroup.js +1 -1
  632. package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
  633. package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
  634. package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
  635. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  636. package/dist/esm/components/checkList/CheckList.js +1 -1
  637. package/dist/esm/components/code-block/CodeBlock.js +1 -1
  638. package/dist/esm/components/code-block/CodeBlock.styled.js +31 -31
  639. package/dist/esm/components/code-block/CodeBlockHelper.js +1 -1
  640. package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
  641. package/dist/esm/components/custom-date-time/CustomDateTime.js +1 -1
  642. package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  643. package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
  644. package/dist/esm/components/dashboard-review-popup/components/FiveStar.js +1 -1
  645. package/dist/esm/components/dashboard-review-popup/components/Form.js +1 -1
  646. package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +2 -2
  647. package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
  648. package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
  649. package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +1 -1
  650. package/dist/esm/components/datePicker/DatePicker.js +1 -1
  651. package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
  652. package/dist/esm/components/datePicker/TimePicker.js +1 -1
  653. package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
  654. package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
  655. package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
  656. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  657. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.js +8 -8
  658. package/dist/esm/components/dot-pulse/DotPulse.js +2 -2
  659. package/dist/esm/components/dropShadow/DropShadow.js +1 -1
  660. package/dist/esm/components/dropdown/ChipInput.js +1 -1
  661. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  662. package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
  663. package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
  664. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  665. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
  666. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
  667. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +5 -5
  668. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  669. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  670. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  671. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  672. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  673. package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
  674. package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
  675. package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
  676. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  677. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
  678. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -1
  679. package/dist/esm/components/feature-announcements/VideoModal.js +1 -1
  680. package/dist/esm/components/feature-announcements/hooks/useFeatureAnnouncements.js +1 -1
  681. package/dist/esm/components/feature-announcements/utils/animationHelpers.js +1 -1
  682. package/dist/esm/components/feature-announcements/utils/elementHelpers.js +1 -1
  683. package/dist/esm/components/file-uploader/FileUploader.js +1 -1
  684. package/dist/esm/components/floater/floater.js +1 -1
  685. package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +3 -3
  686. package/dist/esm/components/icon-button/IconButton.js +1 -1
  687. package/dist/esm/components/image-compress/ImageCompress.js +1 -1
  688. package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
  689. package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
  690. package/dist/esm/components/input/ChipInput.js +1 -1
  691. package/dist/esm/components/input/Input-helper.js +1 -1
  692. package/dist/esm/components/input/Input.js +1 -1
  693. package/dist/esm/components/input/Input.styled.js +1 -1
  694. package/dist/esm/components/input-with-vars/InputWithVariables.js +1 -1
  695. package/dist/esm/components/keywords-input/KeywordsInput.js +1 -1
  696. package/dist/esm/components/list-item/ListItem.js +1 -1
  697. package/dist/esm/components/markdown/index.js +1 -1
  698. package/dist/esm/components/modals/Modal.js +1 -1
  699. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  700. package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
  701. package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
  702. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  703. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +25 -25
  704. package/dist/esm/components/pagination/Pagination.js +1 -1
  705. package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
  706. package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
  707. package/dist/esm/components/plans/SubscriptionPlanSelector.js +1 -1
  708. package/dist/esm/components/plans/SubscriptionPlansCollected.js +1 -1
  709. package/dist/esm/components/postPicker/postPicker.js +1 -1
  710. package/dist/esm/components/product-picker/ProductPickerModal.js +1 -1
  711. package/dist/esm/components/product-picker-v2/ProductPickerShimmer.js +1 -1
  712. package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
  713. package/dist/esm/components/product-picker-v2/emptyState.js +1 -1
  714. package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
  715. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  716. package/dist/esm/components/product-picker-v2/product.js +1 -1
  717. package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
  718. package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
  719. package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
  720. package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
  721. package/dist/esm/components/product-picker-v2/utility.js +1 -1
  722. package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
  723. package/dist/esm/components/progress-bar/CircularProgressBar.js +1 -1
  724. package/dist/esm/components/radioButton/RadioButton.js +1 -1
  725. package/dist/esm/components/radioList/RadioList.js +1 -1
  726. package/dist/esm/components/resizeImage/index.js +1 -1
  727. package/dist/esm/components/searchBar/searchBar.js +1 -1
  728. package/dist/esm/components/shimmer/ShimmerComponent/BikShimmer.js +1 -1
  729. package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
  730. package/dist/esm/components/side-modal/SideModal.style.js +9 -9
  731. package/dist/esm/components/slider/slider.js +1 -1
  732. package/dist/esm/components/spinner/Spinner.js +1 -1
  733. package/dist/esm/components/star-rating/Star.js +1 -1
  734. package/dist/esm/components/star-rating/StarRating.js +2 -2
  735. package/dist/esm/components/states/ShopifyScopeWrapper.js +1 -1
  736. package/dist/esm/components/stepper/Stepper.js +1 -1
  737. package/dist/esm/components/switch/Switch.js +1 -1
  738. package/dist/esm/components/tabs/Tabs.js +1 -1
  739. package/dist/esm/components/tag/Tag.js +1 -1
  740. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  741. package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
  742. package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
  743. package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +3 -3
  744. package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  745. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  746. package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  747. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  748. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
  749. package/dist/esm/components/template-context-mapper/modalElements/Footer.js +1 -1
  750. package/dist/esm/components/template-context-mapper/modalElements/Header.js +1 -1
  751. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +1 -1
  752. package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +1 -1
  753. package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
  754. package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js +1 -1
  755. package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  756. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
  757. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  758. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +2 -2
  759. package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.js +1 -1
  760. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  761. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  762. package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.js +1 -1
  763. package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.js +1 -1
  764. package/dist/esm/components/template-context-mapper/utils/highlightFor.js +1 -1
  765. package/dist/esm/components/template-context-mapper/utils/validateName.js +1 -1
  766. package/dist/esm/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
  767. package/dist/esm/components/template-preview/RCS/RCSButtons.js +1 -1
  768. package/dist/esm/components/template-preview/RCS/RCSChatPreview.js +1 -1
  769. package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
  770. package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
  771. package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
  772. package/dist/esm/components/template-preview/WhatsApp/ChatBtn.js +1 -1
  773. package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +1 -1
  774. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +1 -1
  775. package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
  776. package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +1 -1
  777. package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  778. package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
  779. package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
  780. package/dist/esm/components/template-preview/helpers/VariableEditorHelper.js +1 -1
  781. package/dist/esm/components/template-preview/utils/TemplateHelperUtils.js +1 -1
  782. package/dist/esm/components/template-preview/utils/getPreviewPropLen.js +1 -1
  783. package/dist/esm/components/template-preview/webpush/WebpushPreview.js +1 -1
  784. package/dist/esm/components/text-picker/TextPickerCategoryCard.js +4 -4
  785. package/dist/esm/components/text-picker/TextPickerFooter.js +4 -4
  786. package/dist/esm/components/text-picker/TextPickerItemRow.js +6 -6
  787. package/dist/esm/components/text-picker/TextPickerModal.js +1 -1
  788. package/dist/esm/components/text-picker/TextPickerSelectAllRow.js +5 -5
  789. package/dist/esm/components/toaster/Toaster.js +1 -1
  790. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
  791. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
  792. package/dist/esm/components/variable-picker-v3/Content.js +1 -1
  793. package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
  794. package/dist/esm/components/variable-picker-v3/recommendVaribles.js +1 -1
  795. package/dist/esm/components/variable-picker-v3/searchVariables.js +1 -1
  796. package/dist/esm/components/whats-new/WhatsNew.js +1 -1
  797. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
  798. package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
  799. package/dist/esm/components/whats-new/WhatsNewProvider.js +1 -1
  800. package/dist/esm/components/whats-new/useWhatsNew.js +1 -1
  801. package/dist/esm/helpers/BaseWhatsappContentLang.helper.js +1 -1
  802. package/dist/esm/hooks/useCurreny.js +1 -1
  803. package/dist/esm/hooks/useOutside.js +1 -1
  804. package/dist/esm/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs.js +1 -1
  805. package/dist/esm/node_modules/immer/dist/immer.mjs.js +1 -1
  806. package/dist/esm/node_modules/lodash.debounce/index.js +1 -1
  807. package/dist/esm/src/amplitude/Track.stories.d.ts +5 -3
  808. package/dist/esm/src/components/banner/Banner.stories.d.ts +9 -6
  809. package/dist/esm/src/components/shimmer-image/ShimmerImage.stories.d.ts +6 -5
  810. package/dist/esm/src/components/tag/Tag.stories.d.ts +34 -19
  811. package/dist/esm/utils/DateUtils.js +1 -1
  812. package/dist/esm/utils/StringUtils.js +1 -1
  813. package/dist/esm/utils/resizeImage.js +1 -1
  814. package/dist/esm/utils/unCamelCase.js +1 -1
  815. package/package.json +31 -14
  816. /package/dist/cjs/{src/components → components}/QueryBuilder/QueryBuilder.d.ts +0 -0
  817. /package/dist/cjs/{amplitude → src/amplitude}/index.d.ts +0 -0
  818. /package/dist/esm/{src/components → components}/QueryBuilder/QueryBuilder.d.ts +0 -0
  819. /package/dist/esm/{amplitude → src/amplitude}/index.d.ts +0 -0
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import n from"../../assets/icons/alert_triangle.svg.js";import{Button as i}from"../button/Button.js";import{Modal as r}from"../modals/Modal.js";import{ProgressBarComponent as l}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as s,TitleRegular as d,BodySecondary as c,BodyPrimary as a}from"../TypographyStyle.js";const p=p=>{let{open:h,onModalClose:x,body:m,onRightBtnClick:y,onLeftBtnClick:g}=p;return e(r,{open:h,centralContainerStyles:{width:"498px",height:"312px",borderRadius:"12px"},onClose:x,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column"},children:[e("div",{style:{display:"flex",justifyContent:"center"},children:e(s,{children:"Free AI Credits Exhausted"})}),e("div",{style:{height:"24px"}}),t("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e(n,{color:o.content.negative,width:20,height:20}),e("div",{style:{width:"8px"}}),e(d,{children:"0/100"}),e(c,{color:o.content.secondary,children:"Free Credits left"})]}),e(l,{completed:100,isAnimated:!1,height:16,color:o.content.negative})]}),e("div",{style:{height:"24px"}}),e(a,{color:o.content.secondary,children:m||"Contact support to add credits to generate replies using AI, and enjoy continued AI assistance!"}),e("div",{style:{height:"44px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(i,{buttonText:"Learn More",buttonType:"text",size:"small",onClick:g}),e(i,{buttonText:"Contact Support",size:"small",style:{backgroundColor:o.background.brand},onClick:y})]})]})})};export{p as AiCreditsExhausted};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import n from"../../assets/icons/alert_triangle.svg.js";import{Button as i}from"../button/Button.js";import{Modal as r}from"../modals/Modal.js";import{ProgressBarComponent as l}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as s,TitleRegular as d,BodySecondary as c,BodyPrimary as a}from"../TypographyStyle.js";const p=({open:p,onModalClose:h,body:x,onRightBtnClick:m,onLeftBtnClick:y})=>e(r,{open:p,centralContainerStyles:{width:"498px",height:"312px",borderRadius:"12px"},onClose:h,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column"},children:[e("div",{style:{display:"flex",justifyContent:"center"},children:e(s,{children:"Free AI Credits Exhausted"})}),e("div",{style:{height:"24px"}}),t("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e(n,{color:o.content.negative,width:20,height:20}),e("div",{style:{width:"8px"}}),e(d,{children:"0/100"}),e(c,{color:o.content.secondary,children:"Free Credits left"})]}),e(l,{completed:100,isAnimated:!1,height:16,color:o.content.negative})]}),e("div",{style:{height:"24px"}}),e(a,{color:o.content.secondary,children:x||"Contact support to add credits to generate replies using AI, and enjoy continued AI assistance!"}),e("div",{style:{height:"44px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(i,{buttonText:"Learn More",buttonType:"text",size:"small",onClick:y}),e(i,{buttonText:"Contact Support",size:"small",style:{backgroundColor:o.background.brand},onClick:m})]})]})});export{p as AiCreditsExhausted};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import n from"../../assets/icons/alert_triangle.svg.js";import{Button as i}from"../button/Button.js";import{Modal as r}from"../modals/Modal.js";import{TitleLarge as l,BodyPrimary as d}from"../TypographyStyle.js";const s=s=>{let{open:c,onModalClose:a,onLeftBtnClick:p,onRightBtnClick:h}=s;return e(r,{open:c,centralContainerStyles:{width:"498px",borderRadius:"12px"},onClose:a,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column",width:"100%"},children:[e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:e("div",{style:{backgroundColor:o.background.negative.light,width:"64px",height:"64px",padding:"12px",borderRadius:"40px"},children:e(n,{width:40,height:40,color:o.content.negative})})}),e("div",{style:{height:"32px"}}),e(l,{children:"Your AI Credits are running low"}),e("div",{style:{height:"24px"}}),e(d,{color:o.content.secondary,children:"Recharge your credits now to ensure uninterrupted service."}),e("div",{style:{height:"12px"}}),e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:e(d,{color:o.content.secondary,children:"Don’t let the growth stop. Add AI Credits"})}),e("div",{style:{height:"32px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(i,{buttonText:"Close",buttonType:"text",size:"small",onClick:p}),e(i,{buttonText:"Contact Support",size:"small",style:{backgroundColor:o.background.brand},onClick:h})]})]})})};export{s as AiCreditsLow};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import n from"../../assets/icons/alert_triangle.svg.js";import{Button as i}from"../button/Button.js";import{Modal as r}from"../modals/Modal.js";import{TitleLarge as l,BodyPrimary as d}from"../TypographyStyle.js";const s=({open:s,onModalClose:c,onLeftBtnClick:a,onRightBtnClick:p})=>e(r,{open:s,centralContainerStyles:{width:"498px",borderRadius:"12px"},onClose:c,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column",width:"100%"},children:[e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:e("div",{style:{backgroundColor:o.background.negative.light,width:"64px",height:"64px",padding:"12px",borderRadius:"40px"},children:e(n,{width:40,height:40,color:o.content.negative})})}),e("div",{style:{height:"32px"}}),e(l,{children:"Your AI Credits are running low"}),e("div",{style:{height:"24px"}}),e(d,{color:o.content.secondary,children:"Recharge your credits now to ensure uninterrupted service."}),e("div",{style:{height:"12px"}}),e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:e(d,{color:o.content.secondary,children:"Don’t let the growth stop. Add AI Credits"})}),e("div",{style:{height:"32px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(i,{buttonText:"Close",buttonType:"text",size:"small",onClick:a}),e(i,{buttonText:"Contact Support",size:"small",style:{backgroundColor:o.background.brand},onClick:p})]})]})});export{s as AiCreditsLow};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import i from"../../assets/icons/sync.svg.js";import{Button as n}from"../button/Button.js";import{Modal as l}from"../modals/Modal.js";import{ProgressBarComponent as r}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as s,BodyPrimary as c}from"../TypographyStyle.js";const a=a=>{let{open:d,onModalClose:p,completedPercent:m,onLeftBtnClick:h,onRightBtnClick:y}=a;return e(l,{open:d,centralContainerStyles:{width:"498px",height:"324px",borderRadius:"12px"},onClose:p,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column"},children:[e("div",{style:{display:"flex",justifyContent:"center"},children:e(s,{children:"Wait for Sync to complete"})}),e("div",{style:{height:"24px"}}),t("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t("div",{style:{display:"flex",flexDirection:"row",gap:"12px"},children:[e(i,{width:24,height:24}),e(c,{color:"#616161",children:"Syncing Shopify Store Data..."})]}),e(r,{completed:m,isAnimated:!1,height:16,color:o.background.positive.vibrant})]}),e("div",{style:{height:"24px"}}),e(c,{color:o.content.secondary,children:"You can start replying with AI after sync is complete. In the meanwhile, learn how to leverage AI for maximum efficiency"}),e("div",{style:{height:"32px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(n,{buttonText:"Close",buttonType:"text",size:"small",onClick:h}),e(n,{buttonText:"Explore Bik.ai",size:"small",style:{backgroundColor:o.background.brand},onClick:y})]})]})})};export{a as AiSyncProgress};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import i from"../../assets/icons/sync.svg.js";import{Button as n}from"../button/Button.js";import{Modal as l}from"../modals/Modal.js";import{ProgressBarComponent as r}from"../progress-bar/ProgressBarComponent.js";import{TitleLarge as s,BodyPrimary as c}from"../TypographyStyle.js";const a=({open:a,onModalClose:d,completedPercent:p,onLeftBtnClick:m,onRightBtnClick:h})=>e(l,{open:a,centralContainerStyles:{width:"498px",height:"324px",borderRadius:"12px"},onClose:d,closeOnOutsideClick:!0,zIndex:40,children:t("div",{style:{padding:"24px",display:"flex",flexDirection:"column"},children:[e("div",{style:{display:"flex",justifyContent:"center"},children:e(s,{children:"Wait for Sync to complete"})}),e("div",{style:{height:"24px"}}),t("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t("div",{style:{display:"flex",flexDirection:"row",gap:"12px"},children:[e(i,{width:24,height:24}),e(c,{color:"#616161",children:"Syncing Shopify Store Data..."})]}),e(r,{completed:p,isAnimated:!1,height:16,color:o.background.positive.vibrant})]}),e("div",{style:{height:"24px"}}),e(c,{color:o.content.secondary,children:"You can start replying with AI after sync is complete. In the meanwhile, learn how to leverage AI for maximum efficiency"}),e("div",{style:{height:"32px"}}),t("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",gap:"12px"},children:[e(n,{buttonText:"Close",buttonType:"text",size:"small",onClick:m}),e(n,{buttonText:"Explore Bik.ai",size:"small",style:{backgroundColor:o.background.brand},onClick:h})]})]})});export{a as AiSyncProgress};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{BASE_COLORS as i,COLORS as r}from"../../constants/Theme.js";import{BikShimmer as o}from"../shimmer/ShimmerComponent/BikShimmer.js";import{TitleSmall as s,BodyCaption as h}from"../TypographyStyle.js";import{AnalyticsContainer as m,CardDataContainer as n}from"./AnalyticsCard.styled.js";const c=c=>{const{cardInfo:a,width:d,mode:l}=c;return e(m,{width:d,mode:l,count:Object.keys(a).length,children:c.isLoading?t("div",{className:"shimmers",children:[e(o,{isBrand:"light"!=c.mode,boxes:[{height:"18px",width:"120px"},{height:"18px",width:"120px"}]}),e(o,{isBrand:"light"!=c.mode,boxes:[{height:"18px",width:"120px"},{height:"18px",width:"120px"}]})]}):Object.keys(a).map((o=>{const m=a[o],d=o;return t(n,{className:"analytics__card",count:Object.keys(a).length,children:[e(s,{className:"statistic",color:"light"==c.mode?i.brand[900]:i.grayscale.white,children:m}),e(h,{className:"category",color:"light"==c.mode?i.brand[900]:r.content.secondaryInverse,children:d})]},d)}))})};export{c as AnalyticsCard};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{BASE_COLORS as i,COLORS as r}from"../../constants/Theme.js";import{BikShimmer as o}from"../shimmer/ShimmerComponent/BikShimmer.js";import{TitleSmall as s,BodyCaption as h}from"../TypographyStyle.js";import{AnalyticsContainer as m,CardDataContainer as n}from"./AnalyticsCard.styled.js";const c=c=>{const{cardInfo:a,width:d,mode:l}=c;return e(m,{width:d,mode:l,count:Object.keys(a).length,children:c.isLoading?t("div",{className:"shimmers",children:[e(o,{isBrand:"light"!=c.mode,boxes:[{height:"18px",width:"120px"},{height:"18px",width:"120px"}]}),e(o,{isBrand:"light"!=c.mode,boxes:[{height:"18px",width:"120px"},{height:"18px",width:"120px"}]})]}):Object.keys(a).map(o=>{const m=a[o],d=o;return t(n,{className:"analytics__card",count:Object.keys(a).length,children:[e(s,{className:"statistic",color:"light"==c.mode?i.brand[900]:i.grayscale.white,children:m}),e(h,{className:"category",color:"light"==c.mode?i.brand[900]:r.content.secondaryInverse,children:d})]},d)})})};export{c as AnalyticsCard};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as l}from"react";import{Dropdown as r}from"react-bootstrap";import s from"react-dom";import{DEFAULT_THEME as d,BASE_COLORS as a}from"../../constants/Theme.js";import{DatePicker as c}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as p,BodyCaption as m,Caption as u}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import"../datePicker/model.js";import"../dropdown/DropdownPopover/index.js";import"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"../zeroState/ZeroState.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import"../datePicker/DatePicker.styled.js";import{MainDropdown as g,ItemMenuContainer as v}from"./CommonStyles.js";const w=a=>{let{options:m,placeholder:v="Select an option",selected:w,onOptionSelected:D,resetDropdown:k,maxHeight:O,backgroundcolor:j,calendarPopperConfig:f,variant:b="default",datePickerPlacement:S,closeDropdown:I,labelColor:P,styleProps:R,showTimePicker:C=!1}=a;var x,L,T;const[F,$]=n(!1),[M,B]=n(w),[E,A]=n(),[N,H]=n(!1),[V,z]=n(w),U=i(null),W="small"===b?u:p;l((()=>{k&&B(void 0)}),[k]),l((()=>{var e;(null==w?void 0:w.isCustom)&&(null===(e=w.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?A(w.dateRangeSelectionOptions.selectedDates):A(void 0),B(w)}),[w]),l((()=>{H(!1),$(!1)}),[I]);const Y=e=>{void 0!==e?(H(e),F&&$(!1)):H((e=>!e))},Z=e=>{U.current&&!U.current.contains(e.target)&&(F&&$(!1),Y(!1))};return l((()=>(N&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)})),[N]),e(o,{children:t(g,{drop:"down",show:N,onToggle:Y,bgColor:j,id:"analytic-dropdown",children:[e(r.Toggle,{id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===b?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${d.colorsV2.stroke.primary}`}:R||void 0,children:e(W,{style:"small"===b||P?{color:P||d.colorsV2.content.secondary}:void 0,children:(null==M?void 0:M.isCustom)?E?y(E[0],C)===y(E[1],C)?`${y(E[0],C)}`:`${y(E[0],C)} to ${y(E[1],C)}`:(null==V?void 0:V.label)?null==V?void 0:V.label:v:M?null==M?void 0:M.label:v})}),s.createPortal(e(r.Menu,{className:"main--dropdown",style:{padding:0},ref:U,children:t(g,{drop:null!=S?S:"end",id:"sub--dropdown",show:F,onToggle:e=>{!e&&H(!1),$(!F)},children:[e("div",{style:{maxHeight:O||"auto",overflowY:"scroll"},children:m.map(((o,t)=>{var n;return e("div",{children:(null==o?void 0:o.isCustom)?e(r.Toggle,{className:"sub--dropdown",children:e(h,{isFirstItem:0===t,isLastItem:t===m.length-1,eachOption:o,selectedOption:M,selectedDate:E,onClickingEachItem:e=>{B(e),$(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange),showTimePicker:C})}):e(h,{isFirstItem:0===t,isLastItem:t===m.length-1,eachOption:o,selectedOption:M,selectedDate:E,onClickingEachItem:e=>{if(A(void 0),B(e),z(e),Y(),!e.noOfDays)return void D(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),D(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))},showTimePicker:C})},null==o?void 0:o.key)}))}),e(r.Menu,{className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==f?void 0:f.offsetSkid)||0,(null==f?void 0:f.offsetDistance)||0]}}]},children:e(c,{selectRange:(null===(x=null==M?void 0:M.dateRangeSelectionOptions)||void 0===x?void 0:x.selectRange)||!1,showTimePicker:C,maxDate:null===(L=null==M?void 0:M.dateRangeSelectionOptions)||void 0===L?void 0:L.maxDate,minDate:null===(T=null==M?void 0:M.dateRangeSelectionOptions)||void 0===T?void 0:T.minDate,selectedDates:E,onSelectRange:(e,o)=>{const t=[e,o];(null==M?void 0:M.dateRangeSelectionOptions)&&(M.dateRangeSelectionOptions.selectedDates=t,D(Object.assign(Object.assign({},M),{selectedRange:[e,o]}))),z(M),$(!1),A(t),H(!N)},onSelectDate:e=>{(null==M?void 0:M.dateRangeSelectionOptions)&&(M.dateRangeSelectionOptions.selectedDates=[e,e],D(Object.assign(Object.assign({},M),{selectedRange:[e,e]}))),z(M),$(!1),A([e,e]),H(!N)}})})]})}),document.body)]})})},h=n=>{let{eachOption:i,selectedOption:l,selectedDate:r,onClickingEachItem:s,rangeSelection:d,isLastItem:c,isFirstItem:u,showTimePicker:g}=n;return t(v,{isFirstItem:u,isLastItem:c,onClick:()=>s(i),isSelected:i.isCustom?i.key==(null==l?void 0:l.key)&&!!r:i.key==(null==l?void 0:l.key),children:[e(p,{color:i.key==(null==l?void 0:l.key)?a.positive[900]:a.grayscale[900],children:i.label}),i.subLabel?e(m,{style:{color:a.grayscale[700]},children:i.subLabel}):e(o,{}),r&&(null==l?void 0:l.isCustom)&&i.key==(null==l?void 0:l.key)&&e(m,{style:{whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:d?`${y(r[0],g)} to ${y(r[1],g)}`:`${y(r[0],g)}`})]},i.key)},y=(e,o)=>{const t=e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});if(o){return`${t} (${e.toLocaleString("default",{hour:"numeric",minute:"2-digit",hour12:!0})})`}return t};export{w as AnalyticsDropdown,h as EachItem,y as formatDate};
1
+ import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as l}from"react";import{Dropdown as r}from"react-bootstrap";import s from"react-dom";import{DEFAULT_THEME as d,BASE_COLORS as a}from"../../constants/Theme.js";import{DatePicker as c}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as p,BodyCaption as m,Caption as u}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import"../datePicker/model.js";import"../dropdown/DropdownPopover/index.js";import"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"../zeroState/ZeroState.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import"../datePicker/DatePicker.styled.js";import{MainDropdown as g,ItemMenuContainer as v}from"./CommonStyles.js";const w=({options:a,placeholder:m="Select an option",selected:v,onOptionSelected:w,resetDropdown:D,maxHeight:k,backgroundcolor:O,calendarPopperConfig:j,variant:f="default",datePickerPlacement:b,closeDropdown:S,labelColor:I,styleProps:P,showTimePicker:R=!1})=>{var C,x,L;const[T,F]=n(!1),[$,M]=n(v),[B,E]=n(),[A,N]=n(!1),[H,V]=n(v),z=i(null),U="small"===f?u:p;l(()=>{D&&M(void 0)},[D]),l(()=>{var e;(null==v?void 0:v.isCustom)&&(null===(e=v.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?E(v.dateRangeSelectionOptions.selectedDates):E(void 0),M(v)},[v]),l(()=>{N(!1),F(!1)},[S]);const W=e=>{void 0!==e?(N(e),T&&F(!1)):N(e=>!e)},Y=e=>{z.current&&!z.current.contains(e.target)&&(T&&F(!1),W(!1))};return l(()=>(A&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}),[A]),e(o,{children:t(g,{drop:"down",show:A,onToggle:W,bgColor:O,id:"analytic-dropdown",children:[e(r.Toggle,{id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===f?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${d.colorsV2.stroke.primary}`}:P||void 0,children:e(U,{style:"small"===f||I?{color:I||d.colorsV2.content.secondary}:void 0,children:(null==$?void 0:$.isCustom)?B?y(B[0],R)===y(B[1],R)?`${y(B[0],R)}`:`${y(B[0],R)} to ${y(B[1],R)}`:(null==H?void 0:H.label)?null==H?void 0:H.label:m:$?null==$?void 0:$.label:m})}),s.createPortal(e(r.Menu,{className:"main--dropdown",style:{padding:0},ref:z,children:t(g,{drop:null!=b?b:"end",id:"sub--dropdown",show:T,onToggle:e=>{!e&&N(!1),F(!T)},children:[e("div",{style:{maxHeight:k||"auto",overflowY:"scroll"},children:a.map((o,t)=>{var n;return e("div",{children:(null==o?void 0:o.isCustom)?e(r.Toggle,{className:"sub--dropdown",children:e(h,{isFirstItem:0===t,isLastItem:t===a.length-1,eachOption:o,selectedOption:$,selectedDate:B,onClickingEachItem:e=>{M(e),F(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange),showTimePicker:R})}):e(h,{isFirstItem:0===t,isLastItem:t===a.length-1,eachOption:o,selectedOption:$,selectedDate:B,onClickingEachItem:e=>{if(E(void 0),M(e),V(e),W(),!e.noOfDays)return void w(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),w(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))},showTimePicker:R})},null==o?void 0:o.key)})}),e(r.Menu,{className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}}]},children:e(c,{selectRange:(null===(C=null==$?void 0:$.dateRangeSelectionOptions)||void 0===C?void 0:C.selectRange)||!1,showTimePicker:R,maxDate:null===(x=null==$?void 0:$.dateRangeSelectionOptions)||void 0===x?void 0:x.maxDate,minDate:null===(L=null==$?void 0:$.dateRangeSelectionOptions)||void 0===L?void 0:L.minDate,selectedDates:B,onSelectRange:(e,o)=>{const t=[e,o];(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=t,w(Object.assign(Object.assign({},$),{selectedRange:[e,o]}))),V($),F(!1),E(t),N(!A)},onSelectDate:e=>{(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=[e,e],w(Object.assign(Object.assign({},$),{selectedRange:[e,e]}))),V($),F(!1),E([e,e]),N(!A)}})})]})}),document.body)]})})},h=({eachOption:n,selectedOption:i,selectedDate:l,onClickingEachItem:r,rangeSelection:s,isLastItem:d,isFirstItem:c,showTimePicker:u})=>t(v,{isFirstItem:c,isLastItem:d,onClick:()=>r(n),isSelected:n.isCustom?n.key==(null==i?void 0:i.key)&&!!l:n.key==(null==i?void 0:i.key),children:[e(p,{color:n.key==(null==i?void 0:i.key)?a.positive[900]:a.grayscale[900],children:n.label}),n.subLabel?e(m,{style:{color:a.grayscale[700]},children:n.subLabel}):e(o,{}),l&&(null==i?void 0:i.isCustom)&&n.key==(null==i?void 0:i.key)&&e(m,{style:{whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:s?`${y(l[0],u)} to ${y(l[1],u)}`:`${y(l[0],u)}`})]},n.key),y=(e,o)=>{const t=e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});if(o){return`${t} (${e.toLocaleString("default",{hour:"numeric",minute:"2-digit",hour12:!0})})`}return t};export{w as AnalyticsDropdown,h as EachItem,y as formatDate};
@@ -2,4 +2,4 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import i from"st
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  flex-wrap: wrap;
5
- `,s=i=>{let{title:s,trends:c,RightHeaderComponent:p,containerStyle:h,titleSize:m,titleColor:y,perRow:g,isLoading:f,trendStyle:S,trendContainerStyle:x,trendIconStyle:v,hideHeaderDiv:j,isInternationalStore:u}=i;const w="large"===m?l:o,C=g||(c.length<=4?c.length:c.length%3==0?3:4),T=Math.ceil(c.length/C);return e("div",{style:Object.assign({paddingTop:24,paddingBottom:24},null!=h?h:{}),children:[e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",paddingBottom:j?0:12},children:[s&&t(w,{color:null!=y?y:r.content.secondary,style:{paddingLeft:24,paddingRight:24},children:s}),p]}),t(a,{children:Array.from({length:T}).map(((e,i)=>t(n,{children:t("div",{style:{display:"flex",width:"100%",marginTop:0===i?0:16},children:c.slice(i*C,(i+1)*C).map(((e,n)=>{var r;return t("div",{style:{flex:1,maxWidth:1===c.length?"100%":"50%"},children:t(d,Object.assign({},e,{isLoading:f,card:!1,size:null!==(r=e.size)&&void 0!==r?r:"small",rightSeparator:n+i*C<Math.min((i+1)*C-1,c.length-1),trendStyle:S,trendIconStyle:v,trendContainerStyle:x,isInternationalStore:u}))},n)}))},i)})))})]})};export{s as AnalyticsMetric};
5
+ `,s=({title:i,trends:s,RightHeaderComponent:c,containerStyle:p,titleSize:h,titleColor:m,perRow:y,isLoading:g,trendStyle:f,trendContainerStyle:S,trendIconStyle:x,hideHeaderDiv:v,isInternationalStore:j})=>{const u="large"===h?l:o,w=y||(s.length<=4?s.length:s.length%3==0?3:4),C=Math.ceil(s.length/w);return e("div",{style:Object.assign({paddingTop:24,paddingBottom:24},null!=p?p:{}),children:[e("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",paddingBottom:v?0:12},children:[i&&t(u,{color:null!=m?m:r.content.secondary,style:{paddingLeft:24,paddingRight:24},children:i}),c]}),t(a,{children:Array.from({length:C}).map((e,i)=>t(n,{children:t("div",{style:{display:"flex",width:"100%",marginTop:0===i?0:16},children:s.slice(i*w,(i+1)*w).map((e,n)=>{var r;return t("div",{style:{flex:1,maxWidth:1===s.length?"100%":"50%"},children:t(d,Object.assign({},e,{isLoading:g,card:!1,size:null!==(r=e.size)&&void 0!==r?r:"small",rightSeparator:n+i*w<Math.min((i+1)*w-1,s.length-1),trendStyle:f,trendIconStyle:x,trendContainerStyle:S,isInternationalStore:j}))},n)})},i)}))})]})};export{s as AnalyticsMetric};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{createElement as t}from"react";import{AnalyticsChip as e}from"./AnalyticsChip.js";import{AnalyticsMultiWrapper as i}from"./CommonStyles.js";const m=m=>{let{chipDetails:o,wrapperStyle:p}=m;return r(i,{style:null!=p?p:{},children:o.map(((r,i)=>t(e,Object.assign({},r,{key:i+"_chip"}))))})};export{m as AnalyticsMultiChip};
1
+ import{jsx as r}from"react/jsx-runtime";import{createElement as t}from"react";import{AnalyticsChip as e}from"./AnalyticsChip.js";import{AnalyticsMultiWrapper as i}from"./CommonStyles.js";const m=({chipDetails:m,wrapperStyle:o})=>r(i,{style:null!=o?o:{},children:m.map((r,i)=>t(e,Object.assign({},r,{key:i+"_chip"})))});export{m as AnalyticsMultiChip};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{useState as r,useEffect as o}from"react";import{ShimmerComponentStyled as l}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import a from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import c from"../../assets/icons/arrow_down.svg.js";import d from"../../assets/icons/arrow_up.svg.js";import m from"../../assets/icons/info.svg.js";import{Tag as h}from"../tag/Tag.js";import{Tooltip as g}from"../tooltips/Tooltip.js";import{BodyCaption as p,Caption as y,TitleLarge as u,TitleMedium as f}from"../TypographyStyle.js";import{truncateValueForInternationalStore as v,truncateValueForIndianStore as x}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b,IconContainer as T}from"./CommonStyles.js";const S=r=>{let{title:o,value:a,trendPercent:c,type:d="horizontal",timeline:y,customRange:S,tooltip:$,card:j=!0,rightSeparator:I=!1,size:R="big",share:C=!1,formatVal:D,prefixSymbol:L,trailingIcon:M,onTrailIconClick:O,iconTooltipBody:k,funnelPercent:z,isLoading:P,trendRaw:F,trendRawString:N,suffixText:W,trendStyle:_,trendContainerStyle:A,trendIconStyle:B,containerStyle:E,prevTrendDiff:U,relativePercentageDiff:V,isInternationalStore:q,Icon:G,iconContainerStyle:H,tooltipTimelineText:J,customTimelineText:K}=r;const Q="big"===R?u:f,X=void 0!==c?c<0?"negative":0===c?"neutral":"positive":void 0,Y=void 0!==c?C?Math.round(c):Math.abs(Math.round(c)):void 0;return e(b,{card:j,style:Object.assign({},E),children:t("div",{style:Object.assign({display:"flex",flexDirection:"row",gap:G?12:4,borderRightWidth:I?1:0,borderRightColor:s.stroke.primary,borderRightStyle:"solid",paddingLeft:j?0:24,paddingRight:j?0:24,height:"100%",justifyContent:G?"flex-start":"space-between",alignItems:"center"},null!=A?A:{}),children:[!!G&&e(T,{style:Object.assign({},H),children:e(G,{})}),t("div",{style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=_?_:{}),children:[t("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[e(p,{style:{color:s.content.secondary},children:o}),$&&e(g,{body:$,placement:"right",width:300,children:e("div",{style:{display:"flex",cursor:"pointer",height:"100%"},children:e(m,{color:s.content.primary,height:16,width:16})})})]}),t("div",{style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},C?{justifyContent:"space-between"}:{}),children:[P&&e(l,{width:108,height:26}),!P&&e(Q,{style:{color:s.content.primary},children:void 0===a?"--":"number"==typeof a&&D?a>999?q?`${null!=L?L:""}${v(a)} ${null!=W?W:""}`:`${null!=L?L:""}${x(a)} ${null!=W?W:""}`:`${null!=L?L:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(a)} ${null!=W?W:""}`:`${null!=L?L:""}${a} ${null!=W?W:""}`}),"number"==typeof V&&e(h,{tagText:`${V}%`,theme:"light",type:"neutral"}),"horizontal"===d&&!P&&!C&&e(w,{timeline:y,customRange:S,percent:Y,direction:X,trendRaw:F,trendRawString:N,prefixSymbol:L,trendIconStyle:B,isInternationalStore:q,tooltipTimelineText:J,customTimelineText:K}),P&&!C&&"horizontal"===d&&e(l,{height:20,width:141,marginTop:6}),"vertical"===d&&!P&&void 0!==z&&e(h,{tagText:`${z} %`,theme:"light",type:"neutral"}),C&&!P&&void 0!==Y&&e(h,{tagText:`${Y} %`,theme:"light",type:"neutral"}),C||P||!U||0==U?e(i,{}):e(h,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(U),theme:"light",type:"neutral"})]}),"vertical"===d&&!P&&!C&&e("div",{style:{marginTop:10},children:e(w,{timeline:y,customRange:S,percent:Y,direction:X,trendRaw:F,trendRawString:N,prefixSymbol:L,trendIconStyle:B,isInternationalStore:q,tooltipTimelineText:J,customTimelineText:K})}),P&&"vertical"===d&&e(l,{height:20,width:141,marginTop:6})]}),k&&!P&&e(g,{body:k,placement:"right",children:M&&e("div",{className:"icon--holder",onClick:O,children:n.createElement(M,{height:20,width:20,color:s.content.secondary})})})]})})},w=i=>{let{percent:n,direction:l,timeline:m,customRange:h,trendRaw:p,trendRawString:u,prefixSymbol:f,trendIconStyle:b,isInternationalStore:T,tooltipTimelineText:S,customTimelineText:w}=i;const $=()=>{const e=((null!=p?p:0)>0?"+":"")+(null!=f?f:"");return void 0===p?"--":`${null!=e?e:""}${(()=>{let e="--";if(p)return e=String(T?v(Math.abs(p)):x(Math.abs(p))),p<0?"-"+e:e})()}`},[j,I]=r($()),[R,C]=r(w||"");o((()=>{w||C("today"===m?"vs yesterday":"yesterday"===m?"vs 1 day before":"7 days"===m?"vs last 7 days":"30 days"===m?"vs last 30 days":"custom"===m&&h?a.getAnalyticsCustomDateTimelineText(h):"")}),[m,h]),o((()=>{I($())}),[p]);const D="negative"===l?c:d,L="negative"===l?s.background.negative.vibrant:"positive"===l?s.background.positive.vibrant:s.content.placeholder;return t("div",{style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"},children:["number"==typeof n&&e(D,{color:L,height:16,width:16,style:Object.assign({marginRight:2},null!=b?b:{})}),"number"==typeof n&&l&&t(y,{style:{color:L},children:["neutral"===l?0:n<1e3?n:">999","%"]}),!!p&&e(y,{style:{marginLeft:4,color:s.content.placeholder},children:`(${j})`}),!p&&((null==u?void 0:u.length)||0)>0&&e(y,{style:{marginLeft:4,color:s.content.placeholder},children:`${u}`}),m&&(S?e(g,{body:S,placement:"bottom",children:e(y,{style:{marginLeft:4,color:s.content.placeholder},children:w||R})}):e(y,{style:{marginLeft:4,color:s.content.placeholder},children:w||R}))]})};export{S as AnalyticsTrend};
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{useState as r,useEffect as o}from"react";import{ShimmerComponentStyled as l}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import a from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import c from"../../assets/icons/arrow_down.svg.js";import d from"../../assets/icons/arrow_up.svg.js";import m from"../../assets/icons/info.svg.js";import{Tag as h}from"../tag/Tag.js";import{Tooltip as g}from"../tooltips/Tooltip.js";import{BodyCaption as p,Caption as y,TitleLarge as u,TitleMedium as f}from"../TypographyStyle.js";import{truncateValueForInternationalStore as v,truncateValueForIndianStore as x}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b,IconContainer as T}from"./CommonStyles.js";const S=({title:r,value:o,trendPercent:a,type:c="horizontal",timeline:d,customRange:y,tooltip:S,card:$=!0,rightSeparator:j=!1,size:I="big",share:R=!1,formatVal:C,prefixSymbol:D,trailingIcon:L,onTrailIconClick:M,iconTooltipBody:O,funnelPercent:k,isLoading:z,trendRaw:P,trendRawString:F,suffixText:N,trendStyle:W,trendContainerStyle:_,trendIconStyle:A,containerStyle:B,prevTrendDiff:E,relativePercentageDiff:U,isInternationalStore:V,Icon:q,iconContainerStyle:G,tooltipTimelineText:H,customTimelineText:J})=>{const K="big"===I?u:f,Q=void 0!==a?a<0?"negative":0===a?"neutral":"positive":void 0,X=void 0!==a?R?Math.round(a):Math.abs(Math.round(a)):void 0;return e(b,{card:$,style:Object.assign({},B),children:t("div",{style:Object.assign({display:"flex",flexDirection:"row",gap:q?12:4,borderRightWidth:j?1:0,borderRightColor:s.stroke.primary,borderRightStyle:"solid",paddingLeft:$?0:24,paddingRight:$?0:24,height:"100%",justifyContent:q?"flex-start":"space-between",alignItems:"center"},null!=_?_:{}),children:[!!q&&e(T,{style:Object.assign({},G),children:e(q,{})}),t("div",{style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=W?W:{}),children:[t("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[e(p,{style:{color:s.content.secondary},children:r}),S&&e(g,{body:S,placement:"right",width:300,children:e("div",{style:{display:"flex",cursor:"pointer",height:"100%"},children:e(m,{color:s.content.primary,height:16,width:16})})})]}),t("div",{style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},R?{justifyContent:"space-between"}:{}),children:[z&&e(l,{width:108,height:26}),!z&&e(K,{style:{color:s.content.primary},children:void 0===o?"--":"number"==typeof o&&C?o>999?V?`${null!=D?D:""}${v(o)} ${null!=N?N:""}`:`${null!=D?D:""}${x(o)} ${null!=N?N:""}`:`${null!=D?D:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(o)} ${null!=N?N:""}`:`${null!=D?D:""}${o} ${null!=N?N:""}`}),"number"==typeof U&&e(h,{tagText:`${U}%`,theme:"light",type:"neutral"}),"horizontal"===c&&!z&&!R&&e(w,{timeline:d,customRange:y,percent:X,direction:Q,trendRaw:P,trendRawString:F,prefixSymbol:D,trendIconStyle:A,isInternationalStore:V,tooltipTimelineText:H,customTimelineText:J}),z&&!R&&"horizontal"===c&&e(l,{height:20,width:141,marginTop:6}),"vertical"===c&&!z&&void 0!==k&&e(h,{tagText:`${k} %`,theme:"light",type:"neutral"}),R&&!z&&void 0!==X&&e(h,{tagText:`${X} %`,theme:"light",type:"neutral"}),R||z||!E||0==E?e(i,{}):e(h,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(E),theme:"light",type:"neutral"})]}),"vertical"===c&&!z&&!R&&e("div",{style:{marginTop:10},children:e(w,{timeline:d,customRange:y,percent:X,direction:Q,trendRaw:P,trendRawString:F,prefixSymbol:D,trendIconStyle:A,isInternationalStore:V,tooltipTimelineText:H,customTimelineText:J})}),z&&"vertical"===c&&e(l,{height:20,width:141,marginTop:6})]}),O&&!z&&e(g,{body:O,placement:"right",children:L&&e("div",{className:"icon--holder",onClick:M,children:n.createElement(L,{height:20,width:20,color:s.content.secondary})})})]})})},w=({percent:i,direction:n,timeline:l,customRange:m,trendRaw:h,trendRawString:p,prefixSymbol:u,trendIconStyle:f,isInternationalStore:b,tooltipTimelineText:T,customTimelineText:S})=>{const w=()=>{const e=((null!=h?h:0)>0?"+":"")+(null!=u?u:"");return void 0===h?"--":`${null!=e?e:""}${(()=>{let e="--";if(h)return e=String(b?v(Math.abs(h)):x(Math.abs(h))),h<0?"-"+e:e})()}`},[$,j]=r(w()),[I,R]=r(S||"");o(()=>{S||R("today"===l?"vs yesterday":"yesterday"===l?"vs 1 day before":"7 days"===l?"vs last 7 days":"30 days"===l?"vs last 30 days":"custom"===l&&m?a.getAnalyticsCustomDateTimelineText(m):"")},[l,m]),o(()=>{j(w())},[h]);const C="negative"===n?c:d,D="negative"===n?s.background.negative.vibrant:"positive"===n?s.background.positive.vibrant:s.content.placeholder;return t("div",{style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"},children:["number"==typeof i&&e(C,{color:D,height:16,width:16,style:Object.assign({marginRight:2},null!=f?f:{})}),"number"==typeof i&&n&&t(y,{style:{color:D},children:["neutral"===n?0:i<1e3?i:">999","%"]}),!!h&&e(y,{style:{marginLeft:4,color:s.content.placeholder},children:`(${$})`}),!h&&((null==p?void 0:p.length)||0)>0&&e(y,{style:{marginLeft:4,color:s.content.placeholder},children:`${p}`}),l&&(T?e(g,{body:T,placement:"bottom",children:e(y,{style:{marginLeft:4,color:s.content.placeholder},children:S||I})}):e(y,{style:{marginLeft:4,color:s.content.placeholder},children:S||I}))]})};export{S as AnalyticsTrend};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as x,truncateValueForIndianStore as g}from"../utils/calcPercentage.js";import{GraphContainerWrapper as b}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const m=a=>{var i,e,r,l,n,m,f,u,y;const h=-1===a.xAxis.data.findIndex((t=>0!==t)),A={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},v={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!h,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!h&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var i;const e=o.datasetIndex,r=o.chart.data.datasets;if(e!==r.length-1)return"";const l=o.dataIndex;let n=0;for(let t=0;t<r.length;t++)n+=null!==(i=r[t].data[l])&&void 0!==i?i:0;return n?a.isInternationalStore?x(n):g(n):""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(m=a.yAxis.labelColor)&&void 0!==m?m:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(f=a.xAxis.labelColor)&&void 0!==f?f:c.content.secondary},h?A:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},C={labels:a.yAxis.data.map((t=>t.toString())),datasets:[{data:h?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(h)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(b,{padding:a.outerPadding,skipOuterLayout:a.skipOuterLayout,children:[a.chartHeading&&o(d,{color:null!==(u=a.chartHeading.color)&&void 0!==u?u:c.content.secondary,children:a.chartHeading.heading}),o("div",{style:{height:a.maintainAspectRatio?void 0:null!==(y=a.graphCanvasHeight)&&void 0!==y?y:500},children:o(s,{options:v,data:C})})]})};export{m as HorizontalGraph};
1
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as x,truncateValueForIndianStore as g}from"../utils/calcPercentage.js";import{GraphContainerWrapper as b}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const m=a=>{var i,e,r,l,n,m,f,u,y;const h=-1===a.xAxis.data.findIndex(t=>0!==t),A={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},v={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!h,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!h&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var i;const e=o.datasetIndex,r=o.chart.data.datasets;if(e!==r.length-1)return"";const l=o.dataIndex;let n=0;for(let t=0;t<r.length;t++)n+=null!==(i=r[t].data[l])&&void 0!==i?i:0;return n?a.isInternationalStore?x(n):g(n):""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(m=a.yAxis.labelColor)&&void 0!==m?m:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(f=a.xAxis.labelColor)&&void 0!==f?f:c.content.secondary},h?A:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},C={labels:a.yAxis.data.map(t=>t.toString()),datasets:[{data:h?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(h)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(b,{padding:a.outerPadding,skipOuterLayout:a.skipOuterLayout,children:[a.chartHeading&&o(d,{color:null!==(u=a.chartHeading.color)&&void 0!==u?u:c.content.secondary,children:a.chartHeading.heading}),o("div",{style:{height:a.maintainAspectRatio?void 0:null!==(y=a.graphCanvasHeight)&&void 0!==y?y:500},children:o(s,{options:v,data:C})})]})};export{m as HorizontalGraph};
@@ -1,4 +1,4 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import t from"styled-components";import{BodyPrimary as o}from"../../../TypographyStyle.js";const l=t.div`
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import t from"styled-components";import{BodyPrimary as o}from"../../../TypographyStyle.js";const i=t.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  flex-direction: row;
@@ -16,4 +16,4 @@ import{jsxs as r,jsx as e}from"react/jsx-runtime";import t from"styled-component
16
16
  margin-right: 12px;
17
17
  flex: 1;
18
18
  }
19
- `,i=t=>{let{color:i,text:c}=t;return r(l,{children:[e("div",{className:"color",style:{backgroundColor:i}}),e(o,{className:"title",children:(a=c,a.charAt(0).toUpperCase()+a.slice(1))})]});var a};export{i as Legend};
19
+ `,l=({color:t,text:l})=>{return r(i,{children:[e("div",{className:"color",style:{backgroundColor:t}}),e(o,{className:"title",children:(c=l,c.charAt(0).toUpperCase()+c.slice(1))})]});var c};export{l as Legend};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{Chart as o,CategoryScale as r,LinearScale as i,PointElement as n,BarElement as a,LineElement as d,ArcElement as s,Filler as c,Title as u,Tooltip as p,Legend as y}from"chart.js";import{useState as g,useRef as m,useEffect as v}from"react";import{Line as b}from"react-chartjs-2";import{BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as f}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as x,truncateValueForIndianStore as C}from"../utils/calcPercentage.js";import{LegendWrapper as k,LegendContainer as w,LegendColor as j}from"./LineChart.styled.js";o.register(r,i,n,a,d,s,c,u,p,y);const S=o=>{let{scaleText:r,labels:i,canvasHeight:n,datas:a,maintainAspectRatio:d=!1,stepSize:s,min:c,max:u,isZeroState:p,tension:y,isNewStyles:S,prefixCurrencyInYAxis:B,pointRadius:$,useKFormat:A,lineThickness:z,ticksLabelCallback:D,labelCallback:I,afterBodyCallBack:O,titleTooltipCallback:F,isInternationalStore:T,customYHeaders:Y,headerIcons:P=[],legendsAndIconDirection:R="row",hasSecondYAxis:q=!1,min2:L,max2:H,stepSize2:Z,prefixCurrencyInY2Axis:E,useKFormat2:K,customY2Headers:W}=o;var G,N,J,M;const[Q,U]=g(null),V=m();v((()=>{var e,t,l,o;if(null===(o=null===(l=null===(t=null===(e=V.current)||void 0===e?void 0:e.scales)||void 0===t?void 0:t.y)||void 0===l?void 0:l.ticks)||void 0===o?void 0:o.length){const e=38*V.current.scales.y.ticks.length;U(e)}}),[V]);const X=a.map((e=>({text:e.legend,color:e.lineColor?e.lineColor:e.dotted?f.content.placeholder:f.background.brand,square:e.squareLegends}))),_={labels:i,datasets:a.map(((e,t)=>{var l,o,r;return Object.assign(Object.assign({tension:null!=y?y:.4,fill:e.gradient?"start":0},((e,t,l)=>{const o={borderColor:e||(t?f.content.placeholder:f.background.brand)};return S?Object.assign({pointStyle:"circle",pointRadius:$||(i&&i.length>10?2.5:4),pointBorderColor:"transparent",pointBackgroundColor:l||e||(t?f.content.placeholder:f.background.brand)},o):Object.assign({pointRadius:null!=$?$:1},o)})(e.lineColor,e.dotted,e.pointColors)),{borderDash:e.dotted?[8,3]:void 0,data:e.data,borderWidth:null!==(o=null!==(l=e.lineWidth)&&void 0!==l?l:z)&&void 0!==o?o:2,backgroundColor:e.gradient?t=>{const l=t.chart.ctx.createLinearGradient(0,0,0,Q?Q-75:150);return e.gradientColor?(l.addColorStop(0,e.gradientColor.start),l.addColorStop(1,e.gradientColor.end),l):(l.addColorStop(0,"#F1EEFB"),l.addColorStop(1,"rgba(127, 86, 217, 0)"),l)}:null!==(r=e.backgroundColor)&&void 0!==r?r:"transparent",legend:e.legend,yAxisID:e.useSecondYAxis?"y1":"y"})}))},ee={maintainAspectRatio:d,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:null!=S&&S,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>f.content.primaryInverse,backgroundColor:f.content.primary,callbacks:{labelTextColor:()=>f.content.primaryInverse,title:F,label:I,afterBody:O},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:p?0:c,max:p?10:u,position:"left",id:"y",ticks:{color:f.content.secondary,callback:e=>{var t,l;return A?`${null!==(t=null==r?void 0:r.yPrefix)&&void 0!==t?t:""}${T?x(e):C(e)}${null!=B?B:""}`:Y&&Object.keys(Y).length>0?Y[e]:`${null!==(l=null==r?void 0:r.yPrefix)&&void 0!==l?l:""}${e}${null!=B?B:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:p?1:s,padding:S?24:0},title:{display:!!(null==r?void 0:r.y),text:null==r?void 0:r.y},grid:{color:f.background.base,drawBorder:null===(G=null==r?void 0:r.yDrawBorder)||void 0===G||G}},y1:{beginAtZero:!0,min:p?0:L,max:p?10:H,position:"right",id:"y1",display:q,ticks:{color:f.content.secondary,callback:e=>{var t,l;return K?`${null!==(t=null==r?void 0:r.y2Prefix)&&void 0!==t?t:""}${T?x(e):C(e)}${null!=E?E:""}`:W&&Object.keys(W).length>0?W[e]:`${null!==(l=null==r?void 0:r.y2Prefix)&&void 0!==l?l:""}${e}${null!=E?E:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:p?1:Z,padding:S?24:0},title:{display:!!(null==r?void 0:r.y2),text:null==r?void 0:r.y2},grid:{color:"transparent",drawBorder:null===(N=null==r?void 0:r.y2DrawBorder)||void 0===N||N}},x:{ticks:{callback:D,color:f.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==r?void 0:r.x),text:null==r?void 0:r.x},grid:{display:!1,drawBorder:null!==(J=null==r?void 0:r.xDrawBorder)&&void 0!==J&&J}}}};return e("div",{style:Object.assign(Object.assign({},d?{}:{height:null!==(M=null!=n?n:Q)&&void 0!==M?M:204}),{display:"flex",flexDirection:"column",gap:2,width:"100%"}),children:[e("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",flexDirection:R},children:[t(k,{children:P.map(((e,l)=>t(w,{children:e},l)))}),t(k,{children:X.map(((o,r)=>{let{text:i,color:n,square:a}=o;return i?e(w,{children:[t(j,{color:n,square:a,newStyle:S}),t(h,{color:"#667085",children:i})]},r):t(l,{})}))})]}),t("div",{style:{flex:1},children:t(b,{ref:V,options:ee,data:_})})]})};export{S as LineChart};
1
+ import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{Chart as o,CategoryScale as i,LinearScale as r,PointElement as n,BarElement as a,LineElement as d,ArcElement as s,Filler as c,Title as u,Tooltip as p,Legend as y}from"chart.js";import{useState as g,useRef as m,useEffect as v}from"react";import{Line as b}from"react-chartjs-2";import{BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as f}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as x,truncateValueForIndianStore as C}from"../utils/calcPercentage.js";import{LegendWrapper as k,LegendContainer as w,LegendColor as j}from"./LineChart.styled.js";o.register(i,r,n,a,d,s,c,u,p,y);const S=({scaleText:o,labels:i,canvasHeight:r,datas:n,maintainAspectRatio:a=!1,stepSize:d,min:s,max:c,isZeroState:u,tension:p,isNewStyles:y,prefixCurrencyInYAxis:S,pointRadius:B,useKFormat:$,lineThickness:A,ticksLabelCallback:z,labelCallback:D,afterBodyCallBack:I,titleTooltipCallback:O,isInternationalStore:F,customYHeaders:T,headerIcons:Y=[],legendsAndIconDirection:P="row",hasSecondYAxis:R=!1,min2:q,max2:L,stepSize2:H,prefixCurrencyInY2Axis:Z,useKFormat2:E,customY2Headers:K})=>{var W,G,N,J;const[M,Q]=g(null),U=m();v(()=>{var e,t,l,o;if(null===(o=null===(l=null===(t=null===(e=U.current)||void 0===e?void 0:e.scales)||void 0===t?void 0:t.y)||void 0===l?void 0:l.ticks)||void 0===o?void 0:o.length){const e=38*U.current.scales.y.ticks.length;Q(e)}},[U]);const V=n.map(e=>({text:e.legend,color:e.lineColor?e.lineColor:e.dotted?f.content.placeholder:f.background.brand,square:e.squareLegends})),X={labels:i,datasets:n.map((e,t)=>{var l,o,r;return Object.assign(Object.assign({tension:null!=p?p:.4,fill:e.gradient?"start":0},((e,t,l)=>{const o={borderColor:e||(t?f.content.placeholder:f.background.brand)};return y?Object.assign({pointStyle:"circle",pointRadius:B||(i&&i.length>10?2.5:4),pointBorderColor:"transparent",pointBackgroundColor:l||e||(t?f.content.placeholder:f.background.brand)},o):Object.assign({pointRadius:null!=B?B:1},o)})(e.lineColor,e.dotted,e.pointColors)),{borderDash:e.dotted?[8,3]:void 0,data:e.data,borderWidth:null!==(o=null!==(l=e.lineWidth)&&void 0!==l?l:A)&&void 0!==o?o:2,backgroundColor:e.gradient?t=>{const l=t.chart.ctx.createLinearGradient(0,0,0,M?M-75:150);return e.gradientColor?(l.addColorStop(0,e.gradientColor.start),l.addColorStop(1,e.gradientColor.end),l):(l.addColorStop(0,"#F1EEFB"),l.addColorStop(1,"rgba(127, 86, 217, 0)"),l)}:null!==(r=e.backgroundColor)&&void 0!==r?r:"transparent",legend:e.legend,yAxisID:e.useSecondYAxis?"y1":"y"})})},_={maintainAspectRatio:a,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:null!=y&&y,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>f.content.primaryInverse,backgroundColor:f.content.primary,callbacks:{labelTextColor:()=>f.content.primaryInverse,title:O,label:D,afterBody:I},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:u?0:s,max:u?10:c,position:"left",id:"y",ticks:{color:f.content.secondary,callback:e=>{var t,l;return $?`${null!==(t=null==o?void 0:o.yPrefix)&&void 0!==t?t:""}${F?x(e):C(e)}${null!=S?S:""}`:T&&Object.keys(T).length>0?T[e]:`${null!==(l=null==o?void 0:o.yPrefix)&&void 0!==l?l:""}${e}${null!=S?S:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:u?1:d,padding:y?24:0},title:{display:!!(null==o?void 0:o.y),text:null==o?void 0:o.y},grid:{color:f.background.base,drawBorder:null===(W=null==o?void 0:o.yDrawBorder)||void 0===W||W}},y1:{beginAtZero:!0,min:u?0:q,max:u?10:L,position:"right",id:"y1",display:R,ticks:{color:f.content.secondary,callback:e=>{var t,l;return E?`${null!==(t=null==o?void 0:o.y2Prefix)&&void 0!==t?t:""}${F?x(e):C(e)}${null!=Z?Z:""}`:K&&Object.keys(K).length>0?K[e]:`${null!==(l=null==o?void 0:o.y2Prefix)&&void 0!==l?l:""}${e}${null!=Z?Z:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:u?1:H,padding:y?24:0},title:{display:!!(null==o?void 0:o.y2),text:null==o?void 0:o.y2},grid:{color:"transparent",drawBorder:null===(G=null==o?void 0:o.y2DrawBorder)||void 0===G||G}},x:{ticks:{callback:z,color:f.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==o?void 0:o.x),text:null==o?void 0:o.x},grid:{display:!1,drawBorder:null!==(N=null==o?void 0:o.xDrawBorder)&&void 0!==N&&N}}}};return e("div",{style:Object.assign(Object.assign({},a?{}:{height:null!==(J=null!=r?r:M)&&void 0!==J?J:204}),{display:"flex",flexDirection:"column",gap:2,width:"100%"}),children:[e("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",flexDirection:P},children:[t(k,{children:Y.map((e,l)=>t(w,{children:e},l))}),t(k,{children:V.map(({text:o,color:i,square:r},n)=>o?e(w,{children:[t(j,{color:i,square:r,newStyle:y}),t(h,{color:"#667085",children:o})]},n):t(l,{}))})]}),t("div",{style:{flex:1},children:t(b,{ref:U,options:_,data:X})})]})};export{S as LineChart};
@@ -25,4 +25,4 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect
25
25
  display: block;
26
26
  width: 8px;
27
27
  }
28
- `,c=l=>{let{slices:c,size:d}=l;const[p,m]=r(0),[u,f]=r(d?{height:`${d}px`}:{});i((()=>{let e=0;c.forEach((t=>{e+=t.count})),m(e),0===c.reduce(((e,t)=>e+t.count),0)&&1===c.length?f((e=>Object.assign(Object.assign({},e),{justifyContent:"center"}))):f((e=>Object.assign(Object.assign({},e),{justifyContent:"flex-start"})))}),[c]);return e(o,{style:u,children:c.map((r=>{return t("div",{className:"slice-row",style:{justifyContent:"space-between",gap:"8px",padding:"0 8px",maxWidth:"400px"},children:[e("div",{style:{width:"fit-content"},children:e(a,{color:r.color,text:r.name},r.name)}),t("div",{style:{display:"flex",alignItems:"center",flexDirection:"column"},children:[t(n,{className:"percentage",children:[(i=r.count,0===p?0:parseFloat((i/p*100).toFixed(1))),"%"]}),r.rawValue&&t(s,{className:"raw-value",children:["(",r.rawValue,")"]})]})]},r.name);var i}))})};export{c as PieChart};
28
+ `,c=({slices:l,size:c})=>{const[d,p]=r(0),[m,u]=r(c?{height:`${c}px`}:{});i(()=>{let e=0;l.forEach(t=>{e+=t.count}),p(e),0===l.reduce((e,t)=>e+t.count,0)&&1===l.length?u(e=>Object.assign(Object.assign({},e),{justifyContent:"center"})):u(e=>Object.assign(Object.assign({},e),{justifyContent:"flex-start"}))},[l]);return e(o,{style:m,children:l.map(r=>{return t("div",{className:"slice-row",style:{justifyContent:"space-between",gap:"8px",padding:"0 8px",maxWidth:"400px"},children:[e("div",{style:{width:"fit-content"},children:e(a,{color:r.color,text:r.name},r.name)}),t("div",{style:{display:"flex",alignItems:"center",flexDirection:"column"},children:[t(n,{className:"percentage",children:[(i=r.count,0===d?0:parseFloat((i/d*100).toFixed(1))),"%"]}),r.rawValue&&t(s,{className:"raw-value",children:["(",r.rawValue,")"]})]})]},r.name);var i})})};export{c as PieChart};
@@ -1,5 +1,5 @@
1
- import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import r from"../../../../assets/icons/ChartBar.svg.js";import l from"../../../../assets/icons/maximize.svg.js";import{Chart as o,ArcElement as a,Legend as s}from"chart.js";import n,{useState as d,useEffect as c,Suspense as h}from"react";import{Doughnut as p}from"react-chartjs-2";import m from"styled-components";import{IconButton as u}from"../../../icon-button/IconButton.js";import{StyledModal as g}from"../../../modals/styledModal.js";import{TitleMedium as b}from"../../../TypographyStyle.js";import f from"../../../../utils/StringUtils.js";import{COLORS as y}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as v,truncateValueForIndianStore as C}from"../utils/calcPercentage.js";import{PieChart as w}from"./PieChart.js";const x=n.lazy((()=>import("../VerticalBarGraph/VerticalGraph.js").then((e=>({default:e.VerticalGraph})))));o.register(a,s);const j=e=>({plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{var i;if(!t.label)return" 0%";const r=t.dataset.data.reduce(((e,t)=>e+t),0),l=parseFloat((t.raw/r*100).toFixed(1)),{label:o,raw:a}=t,s=null!==(i=null==e?void 0:e.symbol)&&void 0!==i?i:"",n=null==e?void 0:e.isInternationalStore;return[` ${o}`,` ${s}${void 0!==n?n?v(a):C(a):a} (${l}% of ${s}${void 0!==n?n?v(r):C(r):r})`]}}}}}),A=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],k=m.div`
1
+ import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import r from"../../../../assets/icons/ChartBar.svg.js";import l from"../../../../assets/icons/maximize.svg.js";import{Chart as o,ArcElement as a,Legend as s}from"chart.js";import n,{useState as d,useEffect as c,Suspense as h}from"react";import{Doughnut as p}from"react-chartjs-2";import m from"styled-components";import{IconButton as u}from"../../../icon-button/IconButton.js";import{StyledModal as g}from"../../../modals/styledModal.js";import{TitleMedium as b}from"../../../TypographyStyle.js";import f from"../../../../utils/StringUtils.js";import{COLORS as y}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as v,truncateValueForIndianStore as C}from"../utils/calcPercentage.js";import{PieChart as w}from"./PieChart.js";const x=n.lazy(()=>import("../VerticalBarGraph/VerticalGraph.js").then(e=>({default:e.VerticalGraph})));o.register(a,s);const j=e=>({plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:t=>{var i;if(!t.label)return" 0%";const r=t.dataset.data.reduce((e,t)=>e+t,0),l=parseFloat((t.raw/r*100).toFixed(1)),{label:o,raw:a}=t,s=null!==(i=null==e?void 0:e.symbol)&&void 0!==i?i:"",n=null==e?void 0:e.isInternationalStore;return[` ${o}`,` ${s}${void 0!==n?n?v(a):C(a):a} (${l}% of ${s}${void 0!==n?n?v(r):C(r):r})`]}}}}}),A=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],k=m.div`
2
2
  background: ${e=>y.surface.standard};
3
3
  border: 1px solid ${e=>y.stroke.primary};
4
4
  border-radius: 4px;
5
- `,O=t=>e(k,{style:{padding:24},children:t.children}),F=o=>{let{title:a,slices:s,size:n,allowChartPopup:m,showConvertToBarChart:y,truncateSlices:v,barChartXAxisTitle:C,barChartYAxisTitle:k,hideTitle:O=!1,currencyProps:F}=o;const[B,T]=d(!1),[$,E]=d(!1),[R,z]=d([]),[G,I]=d(),[D,P]=d(),[S,W]=d([]),[L,N]=d(null);return c((()=>{const e=s.reduce(((e,t)=>e+t.count),0);let t=[];if(t=Object.keys(s).map(((e,t)=>Object.assign({color:A[t%A.length]},s[e]))),z([...t]),0===e){I({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}],labels:[]})}else{const e={labels:s.map((e=>f.capitalizeEachWord(e.name))),datasets:[{data:s.map((e=>e.count)),backgroundColor:s.map(((e,t)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[t%A.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};I(e)}if(v&&s.length>v){const e=s.slice(0,v),t=s.slice(v).reduce(((e,t)=>e+t.count),0);e.push({name:"Other",count:t});const i={labels:e.map((e=>f.capitalize(e.name))),datasets:[{data:e.map((e=>e.count)),backgroundColor:e.map(((e,t)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[t%A.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};P(i);const r=e.map(((e,t)=>Object.assign({color:A[t%A.length]},e)));W(r)}y&&N(((e,t,i)=>({xAxis:{data:e.map((e=>e.name)),title:null!=t?t:""},yAxis:{data:e.map((e=>e.count)),title:null!=i?i:""},barColorRGBA:{r:210,g:174,b:255,a:1}}))(s,C,k))}),[s,v]),G?i(t,{children:[i("div",{style:{display:"flex",justifyContent:O||0===(null==a?void 0:a.length)?"flex-end":"space-between"},children:[!O&&a&&e(b,{style:{marginBottom:16},children:a}),i("div",{children:[y&&e(u,{Icon:r,onClick:()=>{E(!0)}}),m&&e(u,{Icon:l,onClick:()=>{T(!0)}})]})]}),i("div",{className:"row",children:[e("div",{className:"col-6 ",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{style:{width:n,height:n},children:e(p,{data:v?D:G,options:Object.assign(Object.assign({},j(F)),{maintainAspectRatio:!n})})})}),e("div",{className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:e(w,{slices:v?S:R,size:n})})]}),B&&e(g,{open:B,onClose:()=>T(!1),closeOnOutsideClick:!0,headingTitle:a,width:"75%",children:i("div",{style:{padding:24,display:"flex",justifyContent:"space-between",height:"80vh"},children:[e("div",{style:{width:"55%",marginLeft:"4%"},children:e("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:e(p,{data:G,options:Object.assign(Object.assign({},j(F)),{maintainAspectRatio:!n})})})}),e("div",{style:{width:"30%",height:"100%",overflowY:"auto"},children:e(w,{slices:R})})]})}),$&&L&&e(g,{open:$,onClose:()=>E(!1),closeOnOutsideClick:!0,headingTitle:a,width:"85%",children:e("div",{style:{padding:"24px 0"},children:e(h,{fallback:e("div",{children:"Loading..."}),children:e(x,{xAxis:L.xAxis,yAxis:L.yAxis,barColorRGBA:null==L?void 0:L.barColorRGBA})})})})]}):e(t,{})};export{O as Card,F as PieChartAnalytics};
5
+ `,O=t=>e(k,{style:{padding:24},children:t.children}),F=({title:o,slices:a,size:s,allowChartPopup:n,showConvertToBarChart:m,truncateSlices:y,barChartXAxisTitle:v,barChartYAxisTitle:C,hideTitle:k=!1,currencyProps:O})=>{const[F,B]=d(!1),[T,$]=d(!1),[E,R]=d([]),[z,G]=d(),[I,D]=d(),[P,S]=d([]),[W,L]=d(null);return c(()=>{const e=a.reduce((e,t)=>e+t.count,0);let t=[];if(t=Object.keys(a).map((e,t)=>Object.assign({color:A[t%A.length]},a[e])),R([...t]),0===e){G({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}],labels:[]})}else{const e={labels:a.map(e=>f.capitalizeEachWord(e.name)),datasets:[{data:a.map(e=>e.count),backgroundColor:a.map((e,t)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[t%A.length]}),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};G(e)}if(y&&a.length>y){const e=a.slice(0,y),t=a.slice(y).reduce((e,t)=>e+t.count,0);e.push({name:"Other",count:t});const i={labels:e.map(e=>f.capitalize(e.name)),datasets:[{data:e.map(e=>e.count),backgroundColor:e.map((e,t)=>{var i;return null!==(i=e.color)&&void 0!==i?i:A[t%A.length]}),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};D(i);const r=e.map((e,t)=>Object.assign({color:A[t%A.length]},e));S(r)}m&&L(((e,t,i)=>({xAxis:{data:e.map(e=>e.name),title:null!=t?t:""},yAxis:{data:e.map(e=>e.count),title:null!=i?i:""},barColorRGBA:{r:210,g:174,b:255,a:1}}))(a,v,C))},[a,y]),z?i(t,{children:[i("div",{style:{display:"flex",justifyContent:k||0===(null==o?void 0:o.length)?"flex-end":"space-between"},children:[!k&&o&&e(b,{style:{marginBottom:16},children:o}),i("div",{children:[m&&e(u,{Icon:r,onClick:()=>{$(!0)}}),n&&e(u,{Icon:l,onClick:()=>{B(!0)}})]})]}),i("div",{className:"row",children:[e("div",{className:"col-6 ",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{style:{width:s,height:s},children:e(p,{data:y?I:z,options:Object.assign(Object.assign({},j(O)),{maintainAspectRatio:!s})})})}),e("div",{className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:e(w,{slices:y?P:E,size:s})})]}),F&&e(g,{open:F,onClose:()=>B(!1),closeOnOutsideClick:!0,headingTitle:o,width:"75%",children:i("div",{style:{padding:24,display:"flex",justifyContent:"space-between",height:"80vh"},children:[e("div",{style:{width:"55%",marginLeft:"4%"},children:e("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:e(p,{data:z,options:Object.assign(Object.assign({},j(O)),{maintainAspectRatio:!s})})})}),e("div",{style:{width:"30%",height:"100%",overflowY:"auto"},children:e(w,{slices:E})})]})}),T&&W&&e(g,{open:T,onClose:()=>$(!1),closeOnOutsideClick:!0,headingTitle:o,width:"85%",children:e("div",{style:{padding:"24px 0"},children:e(h,{fallback:e("div",{children:"Loading..."}),children:e(x,{xAxis:W.xAxis,yAxis:W.yAxis,barColorRGBA:null==W?void 0:W.barColorRGBA})})})})]}):e(t,{})};export{O as Card,F as PieChartAnalytics};
@@ -1 +1 @@
1
- import{jsxs as o,jsx as i}from"react/jsx-runtime";import t from"../../../../assets/icons/maximize.svg.js";import{Chart as e,CategoryScale as l,LinearScale as a,BarElement as n,Tooltip as d,Legend as r}from"chart.js";import s from"chartjs-plugin-datalabels";import{useState as c,useMemo as u}from"react";import{Bar as v}from"react-chartjs-2";import{IconButton as p}from"../../../icon-button/IconButton.js";import{StyledModal as x}from"../../../modals/styledModal.js";import{TitleRegular as g,BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as m,FONTS as b}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as f,truncateValueForIndianStore as y}from"../utils/calcPercentage.js";import{GRAPH_ORIENTATION as A,COLOR_SCHEMA as C}from"./StackedBarChart.model.js";import{GraphContainerWrapper as O,HeaderIconWrapper as k}from"./StackedBarChart.styles.js";e.register(l,a,n,d,r,s);const S=e=>{var l,a,n,d,r,s,S,L,F,j,H,I,T,R,w,B,E,D,N,Z,z,P,G,$,W,_,M,q,V,Y,J,K,Q,U,X,oo,io,to,eo,lo,ao,no,ro,so,co;const{headerIcons:uo=[],legendsAndIconDirection:vo="row"}=e,[po,xo]=c(!1),go=[250,1e3,800,1500,300,600],ho=0===e.yAxis.data.length,mo=["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],bo=["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"],fo=e.customBarColors?e.customBarColors:e.customColourScaleBrand||e.customColourScalePastel?e.colorSchema===C.PASTEL?e.customColourScalePastel:e.customColourScaleBrand:e.colorSchema===C.PASTEL?bo:mo,yo=e.customHoverColour,Ao=u((()=>{var o,i,t;return Object.assign(Object.assign({barPercentage:(null==e?void 0:e.barPercentage)||.4,categoryPercentage:1,pointStyle:"circle",barWidth:e.barWidth,borderRadius:(null==e?void 0:e.borderRadius)||void 0},"object"==typeof(null==e?void 0:e.borderRadius)?{borderSkipped:!1}:{}),(null===(o=null==e?void 0:e.addBarGap)||void 0===o?void 0:o.flag)?{borderWidth:{top:(null===(i=null==e?void 0:e.addBarGap)||void 0===i?void 0:i.value)||2,bottom:(null===(t=null==e?void 0:e.addBarGap)||void 0===t?void 0:t.value)||2,right:0,left:0},borderColor:"transparent"}:{})}),[e.barWidth,null==e?void 0:e.borderRadius,null==e?void 0:e.barPercentage,null==e?void 0:e.addBarGap]),Co={};e.yAxis.data.map((o=>{o.map((o=>{Co[o.name]?Co[o.name].push(o.value):Co[o.name]=[o.value]}))}));const Oo=Object.keys(Co).map(((o,i)=>Object.assign({label:o,data:Co[o],backgroundColor:null==fo?void 0:fo[i],hoverBackgroundColor:void 0===yo?void 0:yo[i]},Ao)));let ko;ko=e.renderInHeightWiseManner?Oo.map(((o,i)=>Object.assign(Object.assign({},o),{order:o.data.reduce(((o,i)=>o+(i||0)),0)}))).sort(((o,i)=>i.order-o.order)):Oo;let So=e.xAxis.data.map((o=>"string"==typeof o?o:o.name)),Lo=ko;if(e.truncateBars){const o=((o,i,t)=>{if(i.length<=t)return{truncatedData:o,truncatedLabels:i,originalData:o,originalLabels:i};const e=o.map((o=>o.slice(0,t))),l=o.map((o=>o.slice(t).reduce(((o,i)=>o+i),0)));e.forEach(((o,i)=>o.push(l[i])));const a=i.slice(0,t);return a.push("Others"),{truncatedData:e,truncatedLabels:a,originalData:o,originalLabels:i}})(ko.map((o=>o.data)),So,e.truncateBars);ko.forEach(((i,t)=>i.data=o.truncatedData[t])),So=o.truncatedLabels,Lo=o.originalData.map(((o,i)=>Object.assign(Object.assign({},ko[i]),{data:o})))}const Fo={plugins:{legend:{display:!ho&&!e.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!ho,callbacks:{label:null===(l=e.tooltipConfig)||void 0===l?void 0:l.labelCallback,title:null===(a=e.tooltipConfig)||void 0===a?void 0:a.titleCallback,footer:null===(n=e.tooltipConfig)||void 0===n?void 0:n.footerCallback},footerFont:null===(r=null===(d=e.tooltipConfig)||void 0===d?void 0:d.footerStyles)||void 0===r?void 0:r.footerFont},datalabels:{display:null!==(s=e.showTotal)&&void 0!==s&&s,anchor:"end",align:"end",clamp:!0,formatter:(o,i)=>{var t;const e=i.datasetIndex,l=i.chart.data.datasets;if(e!==l.length-1)return"";const a=i.dataIndex;let n=0;for(let o=0;o<l.length;o++)n+=null!==(t=l[o].data[a])&&void 0!==t?t:0;return n?n<1e3?n:(n/1e3).toString().substring(0,4)+"k":""},color:m.content.secondary}},layout:{padding:{right:e.showTotal&&e.orientation===A.HORIZONTAL?50:0,top:e.showTotal&&e.orientation!=A.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!e.customLegend,labels:{usePointStyle:!0}},indexAxis:e.orientation===A.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(e.orientation===A.HORIZONTAL?null===(S=e.yAxis)||void 0===S?void 0:S.title:null===(L=e.xAxis)||void 0===L?void 0:L.title),text:e.orientation===A.HORIZONTAL?null===(F=e.yAxis)||void 0===F?void 0:F.title:null===(j=e.xAxis)||void 0===j?void 0:j.title,color:null!==(T=e.orientation===A.HORIZONTAL?null===(H=e.yAxis)||void 0===H?void 0:H.titleColor:null===(I=e.xAxis)||void 0===I?void 0:I.titleColor)&&void 0!==T?T:m.content.secondary,font:{size:b.caption.fontSize}},grid:{display:e.orientation===A.HORIZONTAL&&(void 0===(null===(R=null==e?void 0:e.showGridLines)||void 0===R?void 0:R.x)||(null===(w=null==e?void 0:e.showGridLines)||void 0===w?void 0:w.x)),color:m.background.base},ticks:{fontSize:b.caption.fontSize,color:null!==(B=e.yAxis.labelColor)&&void 0!==B?B:m.content.secondary,callback:e.orientation===A.HORIZONTAL?o=>{var i;let t;t=e.isInternationalStore?f(o):y(o);return`${t}${(null===(i=e.yAxis)||void 0===i?void 0:i.axisSuffix)||""}`}:(null===(E=e.xAxis)||void 0===E?void 0:E.axisSuffix)?o=>`${o}${e.xAxis.axisSuffix}`:void 0},stacked:e.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(D=e.yAxis)||void 0===D?void 0:D.stacked)||(null===(N=e.yAxis)||void 0===N?void 0:N.stacked):"boolean"!=typeof(null===(Z=e.xAxis)||void 0===Z?void 0:Z.stacked)||(null===(z=e.xAxis)||void 0===z?void 0:z.stacked)},y:Object.assign(Object.assign({},(null===(P=null==e?void 0:e.equalHeight)||void 0===P?void 0:P.flag)?{suggestedMin:-(null==e?void 0:e.equalHeight.max),suggestedMax:null==e?void 0:e.equalHeight.max}:{}),{max:null===(G=null==e?void 0:e.yAxis)||void 0===G?void 0:G.max,title:{display:!!(e.orientation===A.HORIZONTAL?null===($=e.xAxis)||void 0===$?void 0:$.title:null===(W=e.yAxis)||void 0===W?void 0:W.title),text:e.orientation===A.HORIZONTAL?null===(_=e.xAxis)||void 0===_?void 0:_.title:null===(M=e.yAxis)||void 0===M?void 0:M.title,color:null!==(Y=e.orientation===A.HORIZONTAL?null===(q=e.xAxis)||void 0===q?void 0:q.titleColor:null===(V=e.yAxis)||void 0===V?void 0:V.titleColor)&&void 0!==Y?Y:m.content.secondary,font:{size:b.caption.fontSize}},grid:{display:e.orientation!==A.HORIZONTAL&&(void 0===(null===(J=null==e?void 0:e.showGridLines)||void 0===J?void 0:J.y)||(null===(K=null==e?void 0:e.showGridLines)||void 0===K?void 0:K.y)),color:m.background.base},ticks:Object.assign(Object.assign({stepSize:e.orientation===A.HORIZONTAL?null===(Q=e.xAxis)||void 0===Q?void 0:Q.stepSize:null===(U=e.yAxis)||void 0===U?void 0:U.stepSize,fontSize:b.caption.fontSize,color:null!==(X=e.xAxis.labelColor)&&void 0!==X?X:m.content.secondary},ho?{min:0,max:2e3,stepSize:200}:{}),{callback:(null==e?void 0:e.ticksCallback)?null==e?void 0:e.ticksCallback:e.orientation===A.HORIZONTAL?o=>{var i;let t;t=e.isInternationalStore?f(o):y(o);return`${t}${(null===(i=e.xAxis)||void 0===i?void 0:i.axisSuffix)||""}`}:(null===(oo=e.yAxis)||void 0===oo?void 0:oo.axisSuffix)?o=>`${o}${e.yAxis.axisSuffix}`:void 0}),stacked:e.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(io=e.xAxis)||void 0===io?void 0:io.stacked)||(null===(to=e.xAxis)||void 0===to?void 0:to.stacked):"boolean"!=typeof(null===(eo=e.yAxis)||void 0===eo?void 0:eo.stacked)||(null===(lo=e.yAxis)||void 0===lo?void 0:lo.stacked)})},onClick:(o,i)=>{if(!e.onBarClick)return;const t=i[0].datasetIndex,l=i[0].index,a=o.chart.data.datasets[t].label,n=o.chart.data.labels[l];e.onBarClick(n,a)},onHover:(o,i)=>{e.onBarClick&&i.length&&(o.native.target.style.cursor="pointer")}};let jo;e.orientation&&e.orientation!==A.VERTICAL?delete Fo.scales.y.ticks.callback:delete Fo.scales.x.ticks.callback,jo=ho?[{data:go,backgroundColor:"rgba(0,0,0,0)"}]:ko;const Ho={labels:So,datasets:jo};let Io;Io=ho?[{data:go,backgroundColor:"rgba(0,0,0,0)"}]:Lo;const To={labels:e.xAxis.data.map((o=>"string"==typeof o?o:o.name)),datasets:Io},Ro=function(){let t,l=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t=e.allowChartPopup&&!l?"flex-start":"flex-end",i("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:t,flexWrap:"wrap"},children:Oo.map((t=>o("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"},children:[i("div",{style:{backgroundColor:t.backgroundColor,width:"16px",height:"16px",borderRadius:"2px"}}),i(h,{color:m.content.secondary,children:t.label})]},t.label.replace(" ","_"))))})};return o(O,{style:null!==(ao=e.wrapperStyle)&&void 0!==ao?ao:{},padding:e.outerPadding,customLegend:e.customLegend,children:[e.chartHeading&&o("div",{style:{marginBottom:24,display:"flex",justifyContent:e.hideHeading?"flex-end":"space-between"},children:[!0!==e.hideHeading&&i(g,{color:null!==(no=e.chartHeading.color)&&void 0!==no?no:m.content.secondary,children:e.chartHeading.heading}),e.allowChartPopup&&i("div",{style:{display:"flex",justifyContent:"flex-end"},children:i("div",{children:i(p,{Icon:t,onClick:()=>{xo(!0)}})})})]}),e.customLegend&&o("div",{style:{display:"flex",flexDirection:vo,justifyContent:"space-between"},children:[i(k,{children:uo.map(((o,t)=>i("div",{children:i("div",{children:o})},t)))}),Ro()]}),i("div",{className:"graph__wrapper",children:i("div",{style:{height:null!==(ro=e.graphCanvasHeight)&&void 0!==ro?ro:500,width:null!==(so=e.graphCanvasWidth)&&void 0!==so?so:"auto"},children:i(v,{options:Fo,data:Ho})})}),po&&i(x,{open:po,onClose:()=>xo(!1),closeOnOutsideClick:!0,headingTitle:null===(co=e.chartHeading)||void 0===co?void 0:co.heading,width:"85%",children:o("div",{className:"graph__wrapper",style:{padding:"8px"},children:[e.customLegend&&Ro(!0),i("div",{style:{height:"70vh",width:"100%",padding:"16px",borderRadius:"8px"},children:i(v,{options:Fo,data:To})})]})})]})};export{S as StackedBarChart};
1
+ import{jsxs as o,jsx as i}from"react/jsx-runtime";import t from"../../../../assets/icons/maximize.svg.js";import{Chart as e,CategoryScale as l,LinearScale as a,BarElement as n,Tooltip as d,Legend as r}from"chart.js";import s from"chartjs-plugin-datalabels";import{useState as c,useMemo as u}from"react";import{Bar as v}from"react-chartjs-2";import{IconButton as p}from"../../../icon-button/IconButton.js";import{StyledModal as x}from"../../../modals/styledModal.js";import{TitleRegular as g,BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as m,FONTS as b}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as f,truncateValueForIndianStore as y}from"../utils/calcPercentage.js";import{GRAPH_ORIENTATION as A,COLOR_SCHEMA as C}from"./StackedBarChart.model.js";import{GraphContainerWrapper as O,HeaderIconWrapper as k}from"./StackedBarChart.styles.js";e.register(l,a,n,d,r,s);const S=e=>{var l,a,n,d,r,s,S,L,F,j,H,I,T,R,w,B,E,D,N,Z,z,P,G,$,W,_,M,q,V,Y,J,K,Q,U,X,oo,io,to,eo,lo,ao,no,ro,so,co;const{headerIcons:uo=[],legendsAndIconDirection:vo="row"}=e,[po,xo]=c(!1),go=[250,1e3,800,1500,300,600],ho=0===e.yAxis.data.length,mo=["#5E07BB","#9E77ED","#D2AEFF","#F7D7FF","#CDE1FF","#92AFFA","#3935E1"],bo=["#E6C7FF","#FEC6C6","#FEDEF3","#DEEFFF","#FFD8B1","#C7E5FF","#FFD3E6","#C9FFE5","#FFE3C7","#D9D9FF"],fo=e.customBarColors?e.customBarColors:e.customColourScaleBrand||e.customColourScalePastel?e.colorSchema===C.PASTEL?e.customColourScalePastel:e.customColourScaleBrand:e.colorSchema===C.PASTEL?bo:mo,yo=e.customHoverColour,Ao=u(()=>{var o,i,t;return Object.assign(Object.assign({barPercentage:(null==e?void 0:e.barPercentage)||.4,categoryPercentage:1,pointStyle:"circle",barWidth:e.barWidth,borderRadius:(null==e?void 0:e.borderRadius)||void 0},"object"==typeof(null==e?void 0:e.borderRadius)?{borderSkipped:!1}:{}),(null===(o=null==e?void 0:e.addBarGap)||void 0===o?void 0:o.flag)?{borderWidth:{top:(null===(i=null==e?void 0:e.addBarGap)||void 0===i?void 0:i.value)||2,bottom:(null===(t=null==e?void 0:e.addBarGap)||void 0===t?void 0:t.value)||2,right:0,left:0},borderColor:"transparent"}:{})},[e.barWidth,null==e?void 0:e.borderRadius,null==e?void 0:e.barPercentage,null==e?void 0:e.addBarGap]),Co={};e.yAxis.data.map(o=>{o.map(o=>{Co[o.name]?Co[o.name].push(o.value):Co[o.name]=[o.value]})});const Oo=Object.keys(Co).map((o,i)=>Object.assign({label:o,data:Co[o],backgroundColor:null==fo?void 0:fo[i],hoverBackgroundColor:void 0===yo?void 0:yo[i]},Ao));let ko;ko=e.renderInHeightWiseManner?Oo.map((o,i)=>Object.assign(Object.assign({},o),{order:o.data.reduce((o,i)=>o+(i||0),0)})).sort((o,i)=>i.order-o.order):Oo;let So=e.xAxis.data.map(o=>"string"==typeof o?o:o.name),Lo=ko;if(e.truncateBars){const o=((o,i,t)=>{if(i.length<=t)return{truncatedData:o,truncatedLabels:i,originalData:o,originalLabels:i};const e=o.map(o=>o.slice(0,t)),l=o.map(o=>o.slice(t).reduce((o,i)=>o+i,0));e.forEach((o,i)=>o.push(l[i]));const a=i.slice(0,t);return a.push("Others"),{truncatedData:e,truncatedLabels:a,originalData:o,originalLabels:i}})(ko.map(o=>o.data),So,e.truncateBars);ko.forEach((i,t)=>i.data=o.truncatedData[t]),So=o.truncatedLabels,Lo=o.originalData.map((o,i)=>Object.assign(Object.assign({},ko[i]),{data:o}))}const Fo={plugins:{legend:{display:!ho&&!e.customLegend,labels:{usePointStyle:!0,fontSize:2}},tooltip:{enabled:!ho,callbacks:{label:null===(l=e.tooltipConfig)||void 0===l?void 0:l.labelCallback,title:null===(a=e.tooltipConfig)||void 0===a?void 0:a.titleCallback,footer:null===(n=e.tooltipConfig)||void 0===n?void 0:n.footerCallback},footerFont:null===(r=null===(d=e.tooltipConfig)||void 0===d?void 0:d.footerStyles)||void 0===r?void 0:r.footerFont},datalabels:{display:null!==(s=e.showTotal)&&void 0!==s&&s,anchor:"end",align:"end",clamp:!0,formatter:(o,i)=>{var t;const e=i.datasetIndex,l=i.chart.data.datasets;if(e!==l.length-1)return"";const a=i.dataIndex;let n=0;for(let o=0;o<l.length;o++)n+=null!==(t=l[o].data[a])&&void 0!==t?t:0;return n?n<1e3?n:(n/1e3).toString().substring(0,4)+"k":""},color:m.content.secondary}},layout:{padding:{right:e.showTotal&&e.orientation===A.HORIZONTAL?50:0,top:e.showTotal&&e.orientation!=A.HORIZONTAL?50:0}},responsive:!0,maintainAspectRatio:!1,legend:{display:!e.customLegend,labels:{usePointStyle:!0}},indexAxis:e.orientation===A.HORIZONTAL?"y":"x",scales:{x:{title:{display:!!(e.orientation===A.HORIZONTAL?null===(S=e.yAxis)||void 0===S?void 0:S.title:null===(L=e.xAxis)||void 0===L?void 0:L.title),text:e.orientation===A.HORIZONTAL?null===(F=e.yAxis)||void 0===F?void 0:F.title:null===(j=e.xAxis)||void 0===j?void 0:j.title,color:null!==(T=e.orientation===A.HORIZONTAL?null===(H=e.yAxis)||void 0===H?void 0:H.titleColor:null===(I=e.xAxis)||void 0===I?void 0:I.titleColor)&&void 0!==T?T:m.content.secondary,font:{size:b.caption.fontSize}},grid:{display:e.orientation===A.HORIZONTAL&&(void 0===(null===(R=null==e?void 0:e.showGridLines)||void 0===R?void 0:R.x)||(null===(w=null==e?void 0:e.showGridLines)||void 0===w?void 0:w.x)),color:m.background.base},ticks:{fontSize:b.caption.fontSize,color:null!==(B=e.yAxis.labelColor)&&void 0!==B?B:m.content.secondary,callback:e.orientation===A.HORIZONTAL?o=>{var i;let t;t=e.isInternationalStore?f(o):y(o);return`${t}${(null===(i=e.yAxis)||void 0===i?void 0:i.axisSuffix)||""}`}:(null===(E=e.xAxis)||void 0===E?void 0:E.axisSuffix)?o=>`${o}${e.xAxis.axisSuffix}`:void 0},stacked:e.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(D=e.yAxis)||void 0===D?void 0:D.stacked)||(null===(N=e.yAxis)||void 0===N?void 0:N.stacked):"boolean"!=typeof(null===(Z=e.xAxis)||void 0===Z?void 0:Z.stacked)||(null===(z=e.xAxis)||void 0===z?void 0:z.stacked)},y:Object.assign(Object.assign({},(null===(P=null==e?void 0:e.equalHeight)||void 0===P?void 0:P.flag)?{suggestedMin:-(null==e?void 0:e.equalHeight.max),suggestedMax:null==e?void 0:e.equalHeight.max}:{}),{max:null===(G=null==e?void 0:e.yAxis)||void 0===G?void 0:G.max,title:{display:!!(e.orientation===A.HORIZONTAL?null===($=e.xAxis)||void 0===$?void 0:$.title:null===(W=e.yAxis)||void 0===W?void 0:W.title),text:e.orientation===A.HORIZONTAL?null===(_=e.xAxis)||void 0===_?void 0:_.title:null===(M=e.yAxis)||void 0===M?void 0:M.title,color:null!==(Y=e.orientation===A.HORIZONTAL?null===(q=e.xAxis)||void 0===q?void 0:q.titleColor:null===(V=e.yAxis)||void 0===V?void 0:V.titleColor)&&void 0!==Y?Y:m.content.secondary,font:{size:b.caption.fontSize}},grid:{display:e.orientation!==A.HORIZONTAL&&(void 0===(null===(J=null==e?void 0:e.showGridLines)||void 0===J?void 0:J.y)||(null===(K=null==e?void 0:e.showGridLines)||void 0===K?void 0:K.y)),color:m.background.base},ticks:Object.assign(Object.assign({stepSize:e.orientation===A.HORIZONTAL?null===(Q=e.xAxis)||void 0===Q?void 0:Q.stepSize:null===(U=e.yAxis)||void 0===U?void 0:U.stepSize,fontSize:b.caption.fontSize,color:null!==(X=e.xAxis.labelColor)&&void 0!==X?X:m.content.secondary},ho?{min:0,max:2e3,stepSize:200}:{}),{callback:(null==e?void 0:e.ticksCallback)?null==e?void 0:e.ticksCallback:e.orientation===A.HORIZONTAL?o=>{var i;let t;t=e.isInternationalStore?f(o):y(o);return`${t}${(null===(i=e.xAxis)||void 0===i?void 0:i.axisSuffix)||""}`}:(null===(oo=e.yAxis)||void 0===oo?void 0:oo.axisSuffix)?o=>`${o}${e.yAxis.axisSuffix}`:void 0}),stacked:e.orientation===A.HORIZONTAL?"boolean"!=typeof(null===(io=e.xAxis)||void 0===io?void 0:io.stacked)||(null===(to=e.xAxis)||void 0===to?void 0:to.stacked):"boolean"!=typeof(null===(eo=e.yAxis)||void 0===eo?void 0:eo.stacked)||(null===(lo=e.yAxis)||void 0===lo?void 0:lo.stacked)})},onClick:(o,i)=>{if(!e.onBarClick)return;const t=i[0].datasetIndex,l=i[0].index,a=o.chart.data.datasets[t].label,n=o.chart.data.labels[l];e.onBarClick(n,a)},onHover:(o,i)=>{e.onBarClick&&i.length&&(o.native.target.style.cursor="pointer")}};let jo;e.orientation&&e.orientation!==A.VERTICAL?delete Fo.scales.y.ticks.callback:delete Fo.scales.x.ticks.callback,jo=ho?[{data:go,backgroundColor:"rgba(0,0,0,0)"}]:ko;const Ho={labels:So,datasets:jo};let Io;Io=ho?[{data:go,backgroundColor:"rgba(0,0,0,0)"}]:Lo;const To={labels:e.xAxis.data.map(o=>"string"==typeof o?o:o.name),datasets:Io},Ro=(t=!1)=>{let l;return l=e.allowChartPopup&&!t?"flex-start":"flex-end",i("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",padding:"0px 24px 12px 24px",justifyContent:l,flexWrap:"wrap"},children:Oo.map(t=>o("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"},children:[i("div",{style:{backgroundColor:t.backgroundColor,width:"16px",height:"16px",borderRadius:"2px"}}),i(h,{color:m.content.secondary,children:t.label})]},t.label.replace(" ","_")))})};return o(O,{style:null!==(ao=e.wrapperStyle)&&void 0!==ao?ao:{},padding:e.outerPadding,customLegend:e.customLegend,children:[e.chartHeading&&o("div",{style:{marginBottom:24,display:"flex",justifyContent:e.hideHeading?"flex-end":"space-between"},children:[!0!==e.hideHeading&&i(g,{color:null!==(no=e.chartHeading.color)&&void 0!==no?no:m.content.secondary,children:e.chartHeading.heading}),e.allowChartPopup&&i("div",{style:{display:"flex",justifyContent:"flex-end"},children:i("div",{children:i(p,{Icon:t,onClick:()=>{xo(!0)}})})})]}),e.customLegend&&o("div",{style:{display:"flex",flexDirection:vo,justifyContent:"space-between"},children:[i(k,{children:uo.map((o,t)=>i("div",{children:i("div",{children:o})},t))}),Ro()]}),i("div",{className:"graph__wrapper",children:i("div",{style:{height:null!==(ro=e.graphCanvasHeight)&&void 0!==ro?ro:500,width:null!==(so=e.graphCanvasWidth)&&void 0!==so?so:"auto"},children:i(v,{options:Fo,data:Ho})})}),po&&i(x,{open:po,onClose:()=>xo(!1),closeOnOutsideClick:!0,headingTitle:null===(co=e.chartHeading)||void 0===co?void 0:co.heading,width:"85%",children:o("div",{className:"graph__wrapper",style:{padding:"8px"},children:[e.customLegend&&Ro(!0),i("div",{style:{height:"70vh",width:"100%",padding:"16px",borderRadius:"8px"},children:i(v,{options:Fo,data:To})})]})})]})};export{S as StackedBarChart};
@@ -1 +1 @@
1
- import{jsx as l,jsxs as e,Fragment as o}from"react/jsx-runtime";import{Chart as t,CategoryScale as a,LinearScale as i,BarElement as n,Tooltip as r,Legend as d}from"chart.js";import s from"chartjs-plugin-datalabels";import{useState as c,useEffect as v,useCallback as u}from"react";import{Bar as p}from"react-chartjs-2";import{BodyTiny as g,TitleRegular as h}from"../../../TypographyStyle.js";import{COLORS as b,FONTS as f}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as m,truncateValueForIndianStore as y}from"../utils/calcPercentage.js";import{GraphContainerWrapper as F}from"./StackedBarChart.styles.js";import{GRAPH_ORIENTATION as T}from"./StackedBarDistributionChart.model.js";t.register(a,i,n,r,d,s),t.defaults.plugins.datalabels.display=!1;const O=t=>{var a,i,n,r,d,s,O,A,C,k,x,E,H,I,N,S,L,D,R,Z,B,_,j,w,z,P,M,W,V,Y,U,$;const[q,G]=c([]),[J,K]=c(),Q=!t.data.filter((l=>!!l.value)).length,X=t.colorMatrix&&t.colorMatrix.length?t.colorMatrix:[["#09A35B","#33D2A1","#A8E5C0","#075E54","#128C7E","#25D366","#DCF8C6"],["#FC4183","#FCA0C2","#FEE3EF","#F5016C","#F972AD","#FCAACE","#FEE3EF"],["#1B95D6","#74B2E5","#A0D1F1","#0078D5","#55A5E3","#8EC3EC","#C6E1F6"],["#FF4F52","#FFA3A4","#FFD9DA","#FF0012","#FF797D","#FFC4C5","#F9DFDF"],["#4B2E91","#7B1FA2","#A77BCA","#5E07BB","#9E77ED","#D2AEFF","#EBDBFF"]],ll={min:0,max:200,stepSize:20},el={min:t.minValue,max:t.maxValue,stepSize:t.valuesStepSize},ol={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barThickness:Q?0:null!==(a=t.barThickness)&&void 0!==a?a:100},tl={plugins:{legend:{display:!1},tooltip:{enabled:!Q,callbacks:{label:null===(i=t.tooltipConfig)||void 0===i?void 0:i.labelCallback,footer:null===(n=t.tooltipConfig)||void 0===n?void 0:n.footerCallback},footerFont:null===(d=null===(r=t.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===d?void 0:d.footerFont},datalabels:{display:null!==(s=!Q&&t.showTotal)&&void 0!==s&&s,anchor:"end",align:"end",clamp:!0,formatter:(l,e)=>{var o;const a=e.datasetIndex,i=e.chart.data.datasets;if(a!==i.length-1)return"";const n=e.dataIndex;let r=0;for(let l=0;l<i.length;l++)r+=null!==(o=i[l].data[n])&&void 0!==o?o:0;return r?t.isInternationalStore?m(r):y(r):""},color:b.content.secondary}},responsive:!0,maintainAspectRatio:!1,legend:{display:!1},indexAxis:t.orientation===T.HORIZONTAL?"y":"x",layout:{padding:{right:t.showTotal&&t.orientation===T.HORIZONTAL?50:0,top:t.showTotal&&t.orientation!=T.HORIZONTAL?25:0}},scales:{x:{title:{display:!!(t.orientation===T.HORIZONTAL?null===(O=t.valueTitle)||void 0===O?void 0:O.heading:null===(A=t.labelTitle)||void 0===A?void 0:A.heading),text:t.orientation===T.HORIZONTAL?null===(C=t.valueTitle)||void 0===C?void 0:C.heading:null===(k=t.labelTitle)||void 0===k?void 0:k.heading,color:null!==(H=t.orientation===T.HORIZONTAL?null===(x=t.valueTitle)||void 0===x?void 0:x.color:null===(E=t.labelTitle)||void 0===E?void 0:E.color)&&void 0!==H?H:b.content.secondary,font:{size:f.bodySecondary.fontSize}},grid:{display:t.orientation===T.HORIZONTAL,color:b.background.base},ticks:Object.assign(Object.assign({stepSize:30,fontSize:f.caption.fontSize,color:null!==(S=t.orientation===T.HORIZONTAL?null===(I=t.labelTitle)||void 0===I?void 0:I.color:null===(N=t.valueTitle)||void 0===N?void 0:N.color)&&void 0!==S?S:b.content.secondary},t.orientation===T.HORIZONTAL?Q?ll:el:{}),{callback:(l,e)=>{var o,a;return t.orientation!==T.HORIZONTAL?null!==(a=null===(o=null==J?void 0:J.labels)||void 0===o?void 0:o[e])&&void 0!==a?a:"":"number"!=typeof l?l:t.isInternationalStore?m(l):y(l)}}),stacked:!0},y:{title:{display:!!(t.orientation===T.HORIZONTAL?null===(L=t.labelTitle)||void 0===L?void 0:L.heading:null===(D=t.valueTitle)||void 0===D?void 0:D.heading),text:t.orientation===T.HORIZONTAL?null===(R=t.labelTitle)||void 0===R?void 0:R.heading:null===(Z=t.valueTitle)||void 0===Z?void 0:Z.heading,color:null!==(j=t.orientation===T.HORIZONTAL?null===(B=t.labelTitle)||void 0===B?void 0:B.color:null===(_=t.valueTitle)||void 0===_?void 0:_.color)&&void 0!==j?j:b.content.secondary,font:{size:f.bodySecondary.fontSize}},grid:{display:t.orientation!==T.HORIZONTAL,color:b.background.base},ticks:Object.assign(Object.assign({fontSize:f.caption.fontSize,color:null!==(P=t.orientation===T.HORIZONTAL?null===(w=t.valueTitle)||void 0===w?void 0:w.color:null===(z=t.labelTitle)||void 0===z?void 0:z.color)&&void 0!==P?P:b.content.secondary},t.orientation===T.HORIZONTAL?{}:Q?ll:el),{callback:(l,e)=>{var o,a;return t.orientation===T.HORIZONTAL?null!==(a=null===(o=null==J?void 0:J.labels)||void 0===o?void 0:o[e])&&void 0!==a?a:"":"number"!=typeof l?l:t.isInternationalStore?m(l):y(l)}}),stacked:!0}},onClick:(l,e)=>{if(!t.onBarClick)return;const o=e[0].datasetIndex,a=e[0].index,i=l.chart.data.datasets[o].label,n=l.chart.data.labels[a];t.onBarClick(n,i)},onHover:(l,e)=>{t.onBarClick&&e.length&&(l.native.target.style.cursor="pointer")}},al=Array.from(new Set(t.data.map((l=>l.label)))),il={labels:(nl=al,nl.map((l=>l.length>0?l.charAt(0).toUpperCase()+l.slice(1):l))),datasets:Q?[{data:[10,20,30,40,50,60,80,100,120],backgroundColor:"rgba(0,0,0,0)"}]:[]};var nl;v((()=>{const l=[];al.forEach(((e,o)=>{const a=[],i=t.data.filter((l=>l.label===e));t.isFunnel||i.sort(((l,e)=>e.value-l.value)),i.forEach(((l,e)=>{const t=((l,e,o)=>X[l].slice(-o)[e])(o,e,i.length);a.push({color:t,label:l.stackLabel});const n=Object.assign({label:l.stackLabel,backgroundColor:t,data:Array(al.length).fill(0)},ol);n.data[o]=l.value,il.datasets.push(n)})),l.push(a)})),G(l),K(il)}),[t.data]);const rl=u((()=>l("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"flex-end"},children:dl().map((o=>e("div",{className:"legend__row",children:[l("div",{className:"legend__palette",style:{backgroundColor:o.color}}),l(g,{color:b.content.secondary,children:o.label})]},o.label.replace(" ","_"))))})),[q]),dl=()=>{const l=[];return q.forEach(((e,o)=>{l.push({color:e[0].color,label:al[o]})})),l};if(!J)return l(o,{});return e(F,{style:null!==(M=t.wrapperStyle)&&void 0!==M?M:{},padding:t.outerPadding,chartWrapperHeight:t.chartWrapperHeight,isFunnel:t.isFunnel,children:[t.chartHeading&&l("div",{style:{marginBottom:24},children:l(h,{color:null!==(W=t.chartHeading.color)&&void 0!==W?W:b.content.secondary,children:t.chartHeading.heading})}),e("div",{className:"graph__wrapper",children:[(null===(V=t.showLegend)||void 0===V||V)&&t.isFunnel&&rl(),l("div",{style:{height:null!==(Y=t.graphCanvasHeight)&&void 0!==Y?Y:500,width:null!==(U=t.graphCanvasWidth)&&void 0!==U?U:"100%",flex:1},children:l(p,{options:tl,data:J})}),(null===($=t.showLegend)||void 0===$||$)&&!t.isFunnel&&l("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"column"},children:q.map(((o,t)=>l("div",{className:"legend__set",children:o.map((o=>e("div",{className:"legend__row",children:[l("div",{className:"legend__palette",style:{backgroundColor:o.color}}),l(g,{color:b.content.secondary,children:o.label})]},o.label.replace(" ","_"))))},`Legend_set_${t}`)))})]})]})};export{O as StackedBarDistributionChart};
1
+ import{jsx as l,jsxs as e,Fragment as o}from"react/jsx-runtime";import{Chart as t,CategoryScale as a,LinearScale as i,BarElement as n,Tooltip as r,Legend as d}from"chart.js";import s from"chartjs-plugin-datalabels";import{useState as c,useEffect as v,useCallback as u}from"react";import{Bar as p}from"react-chartjs-2";import{BodyTiny as g,TitleRegular as h}from"../../../TypographyStyle.js";import{COLORS as b,FONTS as f}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as m,truncateValueForIndianStore as y}from"../utils/calcPercentage.js";import{GraphContainerWrapper as F}from"./StackedBarChart.styles.js";import{GRAPH_ORIENTATION as T}from"./StackedBarDistributionChart.model.js";t.register(a,i,n,r,d,s),t.defaults.plugins.datalabels.display=!1;const O=t=>{var a,i,n,r,d,s,O,A,C,k,x,E,H,I,N,S,L,D,R,Z,B,_,j,w,z,P,M,W,V,Y,U,$;const[q,G]=c([]),[J,K]=c(),Q=!t.data.filter(l=>!!l.value).length,X=t.colorMatrix&&t.colorMatrix.length?t.colorMatrix:[["#09A35B","#33D2A1","#A8E5C0","#075E54","#128C7E","#25D366","#DCF8C6"],["#FC4183","#FCA0C2","#FEE3EF","#F5016C","#F972AD","#FCAACE","#FEE3EF"],["#1B95D6","#74B2E5","#A0D1F1","#0078D5","#55A5E3","#8EC3EC","#C6E1F6"],["#FF4F52","#FFA3A4","#FFD9DA","#FF0012","#FF797D","#FFC4C5","#F9DFDF"],["#4B2E91","#7B1FA2","#A77BCA","#5E07BB","#9E77ED","#D2AEFF","#EBDBFF"]],ll={min:0,max:200,stepSize:20},el={min:t.minValue,max:t.maxValue,stepSize:t.valuesStepSize},ol={barPercentage:.4,categoryPercentage:1,pointStyle:"circle",barThickness:Q?0:null!==(a=t.barThickness)&&void 0!==a?a:100},tl={plugins:{legend:{display:!1},tooltip:{enabled:!Q,callbacks:{label:null===(i=t.tooltipConfig)||void 0===i?void 0:i.labelCallback,footer:null===(n=t.tooltipConfig)||void 0===n?void 0:n.footerCallback},footerFont:null===(d=null===(r=t.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===d?void 0:d.footerFont},datalabels:{display:null!==(s=!Q&&t.showTotal)&&void 0!==s&&s,anchor:"end",align:"end",clamp:!0,formatter:(l,e)=>{var o;const a=e.datasetIndex,i=e.chart.data.datasets;if(a!==i.length-1)return"";const n=e.dataIndex;let r=0;for(let l=0;l<i.length;l++)r+=null!==(o=i[l].data[n])&&void 0!==o?o:0;return r?t.isInternationalStore?m(r):y(r):""},color:b.content.secondary}},responsive:!0,maintainAspectRatio:!1,legend:{display:!1},indexAxis:t.orientation===T.HORIZONTAL?"y":"x",layout:{padding:{right:t.showTotal&&t.orientation===T.HORIZONTAL?50:0,top:t.showTotal&&t.orientation!=T.HORIZONTAL?25:0}},scales:{x:{title:{display:!!(t.orientation===T.HORIZONTAL?null===(O=t.valueTitle)||void 0===O?void 0:O.heading:null===(A=t.labelTitle)||void 0===A?void 0:A.heading),text:t.orientation===T.HORIZONTAL?null===(C=t.valueTitle)||void 0===C?void 0:C.heading:null===(k=t.labelTitle)||void 0===k?void 0:k.heading,color:null!==(H=t.orientation===T.HORIZONTAL?null===(x=t.valueTitle)||void 0===x?void 0:x.color:null===(E=t.labelTitle)||void 0===E?void 0:E.color)&&void 0!==H?H:b.content.secondary,font:{size:f.bodySecondary.fontSize}},grid:{display:t.orientation===T.HORIZONTAL,color:b.background.base},ticks:Object.assign(Object.assign({stepSize:30,fontSize:f.caption.fontSize,color:null!==(S=t.orientation===T.HORIZONTAL?null===(I=t.labelTitle)||void 0===I?void 0:I.color:null===(N=t.valueTitle)||void 0===N?void 0:N.color)&&void 0!==S?S:b.content.secondary},t.orientation===T.HORIZONTAL?Q?ll:el:{}),{callback:(l,e)=>{var o,a;return t.orientation!==T.HORIZONTAL?null!==(a=null===(o=null==J?void 0:J.labels)||void 0===o?void 0:o[e])&&void 0!==a?a:"":"number"!=typeof l?l:t.isInternationalStore?m(l):y(l)}}),stacked:!0},y:{title:{display:!!(t.orientation===T.HORIZONTAL?null===(L=t.labelTitle)||void 0===L?void 0:L.heading:null===(D=t.valueTitle)||void 0===D?void 0:D.heading),text:t.orientation===T.HORIZONTAL?null===(R=t.labelTitle)||void 0===R?void 0:R.heading:null===(Z=t.valueTitle)||void 0===Z?void 0:Z.heading,color:null!==(j=t.orientation===T.HORIZONTAL?null===(B=t.labelTitle)||void 0===B?void 0:B.color:null===(_=t.valueTitle)||void 0===_?void 0:_.color)&&void 0!==j?j:b.content.secondary,font:{size:f.bodySecondary.fontSize}},grid:{display:t.orientation!==T.HORIZONTAL,color:b.background.base},ticks:Object.assign(Object.assign({fontSize:f.caption.fontSize,color:null!==(P=t.orientation===T.HORIZONTAL?null===(w=t.valueTitle)||void 0===w?void 0:w.color:null===(z=t.labelTitle)||void 0===z?void 0:z.color)&&void 0!==P?P:b.content.secondary},t.orientation===T.HORIZONTAL?{}:Q?ll:el),{callback:(l,e)=>{var o,a;return t.orientation===T.HORIZONTAL?null!==(a=null===(o=null==J?void 0:J.labels)||void 0===o?void 0:o[e])&&void 0!==a?a:"":"number"!=typeof l?l:t.isInternationalStore?m(l):y(l)}}),stacked:!0}},onClick:(l,e)=>{if(!t.onBarClick)return;const o=e[0].datasetIndex,a=e[0].index,i=l.chart.data.datasets[o].label,n=l.chart.data.labels[a];t.onBarClick(n,i)},onHover:(l,e)=>{t.onBarClick&&e.length&&(l.native.target.style.cursor="pointer")}},al=Array.from(new Set(t.data.map(l=>l.label))),il={labels:(nl=al,nl.map(l=>l.length>0?l.charAt(0).toUpperCase()+l.slice(1):l)),datasets:Q?[{data:[10,20,30,40,50,60,80,100,120],backgroundColor:"rgba(0,0,0,0)"}]:[]};var nl;v(()=>{const l=[];al.forEach((e,o)=>{const a=[],i=t.data.filter(l=>l.label===e);t.isFunnel||i.sort((l,e)=>e.value-l.value),i.forEach((l,e)=>{const t=((l,e,o)=>X[l].slice(-o)[e])(o,e,i.length);a.push({color:t,label:l.stackLabel});const n=Object.assign({label:l.stackLabel,backgroundColor:t,data:Array(al.length).fill(0)},ol);n.data[o]=l.value,il.datasets.push(n)}),l.push(a)}),G(l),K(il)},[t.data]);const rl=u(()=>l("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"row",gap:"10px",justifyContent:"flex-end"},children:dl().map(o=>e("div",{className:"legend__row",children:[l("div",{className:"legend__palette",style:{backgroundColor:o.color}}),l(g,{color:b.content.secondary,children:o.label})]},o.label.replace(" ","_")))}),[q]),dl=()=>{const l=[];return q.forEach((e,o)=>{l.push({color:e[0].color,label:al[o]})}),l};if(!J)return l(o,{});return e(F,{style:null!==(M=t.wrapperStyle)&&void 0!==M?M:{},padding:t.outerPadding,chartWrapperHeight:t.chartWrapperHeight,isFunnel:t.isFunnel,children:[t.chartHeading&&l("div",{style:{marginBottom:24},children:l(h,{color:null!==(W=t.chartHeading.color)&&void 0!==W?W:b.content.secondary,children:t.chartHeading.heading})}),e("div",{className:"graph__wrapper",children:[(null===(V=t.showLegend)||void 0===V||V)&&t.isFunnel&&rl(),l("div",{style:{height:null!==(Y=t.graphCanvasHeight)&&void 0!==Y?Y:500,width:null!==(U=t.graphCanvasWidth)&&void 0!==U?U:"100%",flex:1},children:l(p,{options:tl,data:J})}),(null===($=t.showLegend)||void 0===$||$)&&!t.isFunnel&&l("div",{style:{overflowY:"scroll",display:"flex",flexDirection:"column"},children:q.map((o,t)=>l("div",{className:"legend__set",children:o.map(o=>e("div",{className:"legend__row",children:[l("div",{className:"legend__palette",style:{backgroundColor:o.color}}),l(g,{color:b.content.secondary,children:o.label})]},o.label.replace(" ","_")))},`Legend_set_${t}`))})]})]})};export{O as StackedBarDistributionChart};
@@ -1 +1 @@
1
- import{jsxs as i,jsx as o,Fragment as e}from"react/jsx-runtime";import{Chart as l,CategoryScale as a,LinearScale as t,BarElement as r,Tooltip as n}from"chart.js";import{Chart as s}from"react-chartjs-2";import{SmallRegular as d,TitleRegular as x,BodyTiny as c}from"../../../TypographyStyle.js";import{FONTS as A,COLORS as b}from"../../../../constants/Theme.js";import{LegendWrapper as p,LegendContainer as u,LegendColor as f}from"../LineChart/LineChart.styled.js";import{truncateValueForInternationalStore as g,truncateValueForIndianStore as h}from"../utils/calcPercentage.js";import{GraphWrapper as m,GraphContainerWrapper as v,LegendsWrapper as y,LegendMiddleWrapper as S,LegendColorBox as C}from"./VerticalBarAndLinearGraph.styles.js";import{GRAPH_ORIENTATION as k}from"./VerticalBarAndLinearGraphModel.js";l.register(a,t,r,n);const I=l=>{var a,t,r,n,I,j,z,$,O,R;const D=[0,0,0,0,0,0],L=["-","-","-","-","-","-"],H=-1===l.barAxis.data.findIndex((i=>0!==i)),T=-1===l.lineAxis.data.findIndex((i=>0!==i)),V=!l.lineAxis2||-1===l.lineAxis2.data.findIndex((i=>0!==i)),w={min:0,max:2e3,stepSize:200},B=[{legend:l.barAxis.title,color:l.barAxis.graphColor},{legend:l.lineAxis.title,color:l.lineAxis.graphColor},...l.lineAxis2?[{legend:l.lineAxis2.title,color:l.lineAxis2.graphColor}]:[]],N={responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:i=>{var o;const e=i.raw,a=i.dataset;let t="";"bar"===a.yAxisID?t=l.barAxis.axisSuffix||"":"line"===a.yAxisID?t=l.lineAxis.axisSuffix||"":"line2"===a.yAxisID&&(t=(null===(o=l.lineAxis2)||void 0===o?void 0:o.axisSuffix)||"");let r=e;return l.orientation===k.HORIZONTAL&&(r=l.isInternationalStore?g(e):h(e)),`${r}${t}`}}}},scales:{x:{title:{display:!!l.xAxis.title,text:l.xAxis.title,color:l.xAxis.titleColor,font:{size:A.caption.fontSize}},grid:{display:!1,borderColor:b.background.base},ticks:{fontSize:A.caption.fontSize,color:null!==(a=l.xAxis.labelColor)&&void 0!==a?a:b.content.secondary,callback:(null===(t=l.xAxis)||void 0===t?void 0:t.axisSuffix)?i=>`${i}${l.xAxis.axisSuffix}`:void 0}},bar:{position:"left",title:{display:!!l.barAxis.title,text:l.barAxis.title,color:l.barAxis.titleColor,font:{size:A.caption.fontSize}},grid:{borderColor:"white",color:b.background.base},max:null===(r=null==l?void 0:l.barAxis)||void 0===r?void 0:r.max,ticks:Object.assign(Object.assign({fontSize:A.caption.fontSize,color:null!==(n=l.barAxis.labelColor)&&void 0!==n?n:b.content.secondary},H?w:{}),{callback:l.orientation===k.HORIZONTAL?i=>{var o;let e;e=l.isInternationalStore?g(i):h(i);return`${e}${(null===(o=l.barAxis)||void 0===o?void 0:o.axisSuffix)||""}`}:(null===(I=l.barAxis)||void 0===I?void 0:I.axisSuffix)?i=>`${i}${l.barAxis.axisSuffix}`:void 0})},line:{position:"right",title:{display:!!l.lineAxis.title,text:l.lineAxis.title,color:l.lineAxis.titleColor,font:{size:A.caption.fontSize}},max:null===(j=null==l?void 0:l.lineAxis)||void 0===j?void 0:j.max,grid:{display:!1,borderColor:"white",color:b.background.base},ticks:Object.assign(Object.assign({fontSize:A.caption.fontSize,color:null!==(z=l.lineAxis.labelColor)&&void 0!==z?z:b.content.secondary},T?w:{}),{callback:l.orientation===k.HORIZONTAL?i=>{var o;let e;e=l.isInternationalStore?g(i):h(i);return`${e}${(null===(o=l.lineAxis)||void 0===o?void 0:o.axisSuffix)||""}`}:(null===($=l.lineAxis)||void 0===$?void 0:$.axisSuffix)?i=>`${i}${l.lineAxis.axisSuffix}`:void 0}),display:!0}},maintainAspectRatio:!1};let P,Z,G,W;l.orientation&&l.orientation!==k.VERTICAL?(delete N.scales.bar.ticks.callback,delete N.scales.line.ticks.callback):delete N.scales.x.ticks.callback,P=l.xAxis.forceShowXAxis?l.xAxis.data.map((i=>i.toString())):H&&T&&V?L:l.xAxis.data.map((i=>i.toString())),Z=l.noDummyValues?l.lineAxis.data:T?D:l.lineAxis.data,l.lineAxis2&&(G=l.noDummyValues?l.lineAxis2.data:V?D:l.lineAxis2.data),W=l.noDummyValues?l.barAxis.data:H?D:l.barAxis.data;const E={labels:P,datasets:[{yAxisID:"line",type:"line",data:Z,borderColor:l.lineAxis.graphColor||"rgba(0,0,0,0)",backgroundColor:l.lineAxis.graphColor,borderWidth:2,fill:!1,pointRadius:l.pointRadius||1},...l.lineAxis2?[{yAxisID:"line",type:"line",data:G,borderColor:l.lineAxis2.graphColor||"rgba(0,0,0,0)",borderWidth:2,fill:!1,pointRadius:l.pointRadius||1,backgroundColor:l.lineAxis2.graphColor}]:[],{yAxisID:"bar",type:"bar",data:W,backgroundColor:l.barAxis.graphColor||"rgba(0,0,0,0)",barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return i(m,{children:[l.customLegend?o(y,{children:B.map(((e,l)=>{let{legend:a,color:t}=e;return a?i(S,{children:[o(C,{color:t}),o(c,{color:b.content.secondary,children:a})]},l):null}))}):o(p,{position:"center",children:B.map(((l,a)=>{let{legend:t,color:r}=l;return t?i(u,{children:[o(f,{color:r}),o(d,{color:"#667085",children:t})]},a):o(e,{})}))}),i(v,{children:[l.chartHeading&&o("div",{style:{marginBottom:24},children:o(x,{color:null!==(O=l.chartHeading.color)&&void 0!==O?O:b.content.secondary,children:l.chartHeading.heading})}),o("div",{style:{height:null!==(R=l.graphCanvasHeight)&&void 0!==R?R:500},children:o(s,{type:"bar",data:E,options:N})})]})]})};export{I as VerticalBarAndLinearGraph};
1
+ import{jsxs as i,jsx as o,Fragment as e}from"react/jsx-runtime";import{Chart as l,CategoryScale as a,LinearScale as t,BarElement as r,Tooltip as n}from"chart.js";import{Chart as s}from"react-chartjs-2";import{SmallRegular as d,TitleRegular as x,BodyTiny as c}from"../../../TypographyStyle.js";import{FONTS as A,COLORS as b}from"../../../../constants/Theme.js";import{LegendWrapper as p,LegendContainer as u,LegendColor as f}from"../LineChart/LineChart.styled.js";import{truncateValueForInternationalStore as g,truncateValueForIndianStore as h}from"../utils/calcPercentage.js";import{GraphWrapper as m,GraphContainerWrapper as v,LegendsWrapper as y,LegendMiddleWrapper as S,LegendColorBox as C}from"./VerticalBarAndLinearGraph.styles.js";import{GRAPH_ORIENTATION as k}from"./VerticalBarAndLinearGraphModel.js";l.register(a,t,r,n);const I=l=>{var a,t,r,n,I,j,z,$,O,R;const D=[0,0,0,0,0,0],L=["-","-","-","-","-","-"],H=-1===l.barAxis.data.findIndex(i=>0!==i),T=-1===l.lineAxis.data.findIndex(i=>0!==i),V=!l.lineAxis2||-1===l.lineAxis2.data.findIndex(i=>0!==i),w={min:0,max:2e3,stepSize:200},B=[{legend:l.barAxis.title,color:l.barAxis.graphColor},{legend:l.lineAxis.title,color:l.lineAxis.graphColor},...l.lineAxis2?[{legend:l.lineAxis2.title,color:l.lineAxis2.graphColor}]:[]],N={responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:i=>{var o;const e=i.raw,a=i.dataset;let t="";"bar"===a.yAxisID?t=l.barAxis.axisSuffix||"":"line"===a.yAxisID?t=l.lineAxis.axisSuffix||"":"line2"===a.yAxisID&&(t=(null===(o=l.lineAxis2)||void 0===o?void 0:o.axisSuffix)||"");let r=e;return l.orientation===k.HORIZONTAL&&(r=l.isInternationalStore?g(e):h(e)),`${r}${t}`}}}},scales:{x:{title:{display:!!l.xAxis.title,text:l.xAxis.title,color:l.xAxis.titleColor,font:{size:A.caption.fontSize}},grid:{display:!1,borderColor:b.background.base},ticks:{fontSize:A.caption.fontSize,color:null!==(a=l.xAxis.labelColor)&&void 0!==a?a:b.content.secondary,callback:(null===(t=l.xAxis)||void 0===t?void 0:t.axisSuffix)?i=>`${i}${l.xAxis.axisSuffix}`:void 0}},bar:{position:"left",title:{display:!!l.barAxis.title,text:l.barAxis.title,color:l.barAxis.titleColor,font:{size:A.caption.fontSize}},grid:{borderColor:"white",color:b.background.base},max:null===(r=null==l?void 0:l.barAxis)||void 0===r?void 0:r.max,ticks:Object.assign(Object.assign({fontSize:A.caption.fontSize,color:null!==(n=l.barAxis.labelColor)&&void 0!==n?n:b.content.secondary},H?w:{}),{callback:l.orientation===k.HORIZONTAL?i=>{var o;let e;e=l.isInternationalStore?g(i):h(i);return`${e}${(null===(o=l.barAxis)||void 0===o?void 0:o.axisSuffix)||""}`}:(null===(I=l.barAxis)||void 0===I?void 0:I.axisSuffix)?i=>`${i}${l.barAxis.axisSuffix}`:void 0})},line:{position:"right",title:{display:!!l.lineAxis.title,text:l.lineAxis.title,color:l.lineAxis.titleColor,font:{size:A.caption.fontSize}},max:null===(j=null==l?void 0:l.lineAxis)||void 0===j?void 0:j.max,grid:{display:!1,borderColor:"white",color:b.background.base},ticks:Object.assign(Object.assign({fontSize:A.caption.fontSize,color:null!==(z=l.lineAxis.labelColor)&&void 0!==z?z:b.content.secondary},T?w:{}),{callback:l.orientation===k.HORIZONTAL?i=>{var o;let e;e=l.isInternationalStore?g(i):h(i);return`${e}${(null===(o=l.lineAxis)||void 0===o?void 0:o.axisSuffix)||""}`}:(null===($=l.lineAxis)||void 0===$?void 0:$.axisSuffix)?i=>`${i}${l.lineAxis.axisSuffix}`:void 0}),display:!0}},maintainAspectRatio:!1};let P,Z,G,W;l.orientation&&l.orientation!==k.VERTICAL?(delete N.scales.bar.ticks.callback,delete N.scales.line.ticks.callback):delete N.scales.x.ticks.callback,P=l.xAxis.forceShowXAxis?l.xAxis.data.map(i=>i.toString()):H&&T&&V?L:l.xAxis.data.map(i=>i.toString()),Z=l.noDummyValues?l.lineAxis.data:T?D:l.lineAxis.data,l.lineAxis2&&(G=l.noDummyValues?l.lineAxis2.data:V?D:l.lineAxis2.data),W=l.noDummyValues?l.barAxis.data:H?D:l.barAxis.data;const E={labels:P,datasets:[{yAxisID:"line",type:"line",data:Z,borderColor:l.lineAxis.graphColor||"rgba(0,0,0,0)",backgroundColor:l.lineAxis.graphColor,borderWidth:2,fill:!1,pointRadius:l.pointRadius||1},...l.lineAxis2?[{yAxisID:"line",type:"line",data:G,borderColor:l.lineAxis2.graphColor||"rgba(0,0,0,0)",borderWidth:2,fill:!1,pointRadius:l.pointRadius||1,backgroundColor:l.lineAxis2.graphColor}]:[],{yAxisID:"bar",type:"bar",data:W,backgroundColor:l.barAxis.graphColor||"rgba(0,0,0,0)",barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return i(m,{children:[l.customLegend?o(y,{children:B.map(({legend:e,color:l},a)=>e?i(S,{children:[o(C,{color:l}),o(c,{color:b.content.secondary,children:e})]},a):null)}):o(p,{position:"center",children:B.map(({legend:l,color:a},t)=>l?i(u,{children:[o(f,{color:a}),o(d,{color:"#667085",children:l})]},t):o(e,{}))}),i(v,{children:[l.chartHeading&&o("div",{style:{marginBottom:24},children:o(x,{color:null!==(O=l.chartHeading.color)&&void 0!==O?O:b.content.secondary,children:l.chartHeading.heading})}),o("div",{style:{height:null!==(R=l.graphCanvasHeight)&&void 0!==R?R:500},children:o(s,{type:"bar",data:E,options:N})})]})]})};export{I as VerticalBarAndLinearGraph};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{Chart as a,CategoryScale as l,LinearScale as o,BarElement as i,Tooltip as n}from"chart.js";import{Bar as s}from"react-chartjs-2";import{SmallRegular as c}from"../../../TypographyStyle.js";import{LegendWrapper as d,LegendContainer as p,LegendColor as h}from"../LineChart/LineChart.styled.js";a.register(l,o,i,n);const m=["#DEEFFF","#FEDEF3","#FEC6C6","#DBAFFF","#FEDEBC"],b=a=>{let{data:l=[],maintainAspectRatio:o=!1,canvasHeight:i=300,barColors:n=m,titleToolTipCallback:b}=a;0===l.length&&(l=[{label:"",current:0,previousLabel:""}]);const g=l.map((e=>e.label)),u=l.map((e=>e.current||0)),y=l.map((e=>e.previous?Math.max((e.previous||0)-e.current,0):0)),x=l.map((e=>e.previousLabel||"")),C=n,f=l.map((e=>({text:e.label,color:C[l.indexOf(e)]}))),k=[{label:"Current Value",data:u,backgroundColor:C.slice(0,l.length),borderColor:"white",borderWidth:1,stack:"combined"},{label:"Previous Value",data:y.map((e=>e||0)),backgroundColor:C.slice(0,l.length).map((e=>((e,t)=>{let r=0,a=0,l=0;return 4===e.length?(r=parseInt(e[1]+e[1],16),a=parseInt(e[2]+e[2],16),l=parseInt(e[3]+e[3],16)):7===e.length&&(r=parseInt(e[1]+e[2],16),a=parseInt(e[3]+e[4],16),l=parseInt(e[5]+e[6],16)),`rgba(${r}, ${a}, ${l}, ${t})`})(e,.3))),borderColor:"white",borderWidth:1,stack:"combined"}],v={labels:g,datasets:k},F={maintainAspectRatio:o,responsive:!0,scales:{x:{stacked:!0,grid:{display:!1},ticks:{display:l.length>0}},y:{stacked:!0,barPercentage:.6,categoryPercentage:.7,ticks:{display:l.length>0},grid:{drawBorder:l.length>0}}},plugins:{legend:{display:!1},tooltip:{callbacks:{title:b||(e=>{const t=e[0].datasetIndex,r=e[0].dataIndex;if(1===t){return`${x[r]} but not ${g[r]}`}return e[0].label}),label:e=>` ${e.raw}`}}}};return e("div",{style:{height:o?void 0:i,display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[t(d,{children:f.map(((a,l)=>{let{text:o,color:i}=a;return o?e(p,{children:[t(h,{color:i,newStyle:!0}),t(c,{color:"#667085",children:o})]},l):t(r,{})}))}),t("div",{style:{flex:1},children:t(s,{data:v,options:F})})]})};export{b as FunnelVerticalBarGraph};
1
+ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{Chart as a,CategoryScale as l,LinearScale as o,BarElement as i,Tooltip as n}from"chart.js";import{Bar as s}from"react-chartjs-2";import{SmallRegular as c}from"../../../TypographyStyle.js";import{LegendWrapper as d,LegendContainer as p,LegendColor as h}from"../LineChart/LineChart.styled.js";a.register(l,o,i,n);const m=["#DEEFFF","#FEDEF3","#FEC6C6","#DBAFFF","#FEDEBC"],b=({data:a=[],maintainAspectRatio:l=!1,canvasHeight:o=300,barColors:i=m,titleToolTipCallback:n})=>{0===a.length&&(a=[{label:"",current:0,previousLabel:""}]);const b=a.map(e=>e.label),g=a.map(e=>e.current||0),u=a.map(e=>e.previous?Math.max((e.previous||0)-e.current,0):0),y=a.map(e=>e.previousLabel||""),x=i,C=a.map(e=>({text:e.label,color:x[a.indexOf(e)]})),f=[{label:"Current Value",data:g,backgroundColor:x.slice(0,a.length),borderColor:"white",borderWidth:1,stack:"combined"},{label:"Previous Value",data:u.map(e=>e||0),backgroundColor:x.slice(0,a.length).map(e=>((e,t)=>{let r=0,a=0,l=0;return 4===e.length?(r=parseInt(e[1]+e[1],16),a=parseInt(e[2]+e[2],16),l=parseInt(e[3]+e[3],16)):7===e.length&&(r=parseInt(e[1]+e[2],16),a=parseInt(e[3]+e[4],16),l=parseInt(e[5]+e[6],16)),`rgba(${r}, ${a}, ${l}, ${t})`})(e,.3)),borderColor:"white",borderWidth:1,stack:"combined"}],k={labels:b,datasets:f},v={maintainAspectRatio:l,responsive:!0,scales:{x:{stacked:!0,grid:{display:!1},ticks:{display:a.length>0}},y:{stacked:!0,barPercentage:.6,categoryPercentage:.7,ticks:{display:a.length>0},grid:{drawBorder:a.length>0}}},plugins:{legend:{display:!1},tooltip:{callbacks:{title:n||(e=>{const t=e[0].datasetIndex,r=e[0].dataIndex;if(1===t){return`${y[r]} but not ${b[r]}`}return e[0].label}),label:e=>` ${e.raw}`}}}};return e("div",{style:{height:l?void 0:o,display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[t(d,{children:C.map(({text:a,color:l},o)=>a?e(p,{children:[t(h,{color:l,newStyle:!0}),t(c,{color:"#667085",children:a})]},o):t(r,{}))}),t("div",{style:{flex:1},children:t(s,{data:k,options:v})})]})};export{b as FunnelVerticalBarGraph};
@@ -1 +1 @@
1
- import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"../../../../assets/icons/ChartBar.svg.js";import a from"../../../../assets/icons/ChartPie.svg.js";import l from"../../../../assets/icons/maximize.svg.js";import{Chart as e,CategoryScale as n,LinearScale as r,BarElement as s,Tooltip as d}from"chart.js";import c from"chartjs-plugin-datalabels";import p,{useState as u,useEffect as v,Suspense as g}from"react";import{Bar as h}from"react-chartjs-2";import{IconButton as x}from"../../../icon-button/IconButton.js";import{StyledModal as y}from"../../../modals/styledModal.js";import{TitleMedium as b}from"../../../TypographyStyle.js";import{COLORS as m,FONTS as f}from"../../../../constants/Theme.js";import{GraphContainerWrapper as C}from"./VerticalGraph.styles.js";e.register(n,r,s,d,c);const A=p.lazy((()=>import("../Pie/PieChartAnalytics.js").then((o=>({default:o.PieChartAnalytics}))))),k=e=>{var n,r,s,d,c,p,k,z,$,D,S,j,P,T,w,H,I,R,B,E,F,O,G,L,M,N;const[V,q]=u(!1),[J,K]=u(!1),[Q,U]=u();v((()=>{var o;const t=[];J&&(null===(o=e.popupData)||void 0===o||o.xAxis.data.forEach(((o,i)=>{var a;t.push({name:o.toString(),count:Number(null===(a=e.popupData)||void 0===a?void 0:a.yAxis.data[i])||0})})),U(t))}),[J,null===(n=e.popupData)||void 0===n?void 0:n.xAxis.data,null===(r=e.popupData)||void 0===r?void 0:r.yAxis.data]);const W=[250,1e3,800,1500,300,600],X=-1===e.yAxis.data.findIndex((o=>0!==o)),Y=-1===(null===(s=e.popupData)||void 0===s?void 0:s.yAxis.data.findIndex((o=>0!==o))),Z={min:0,max:2e3,stepSize:200},_={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!X,callbacks:{label:e.yAxis.toolTipCallback}},datalabels:{display:null!==(d=e.showTotal)&&void 0!==d&&d,anchor:"end",align:"end",clamp:!0,color:m.content.secondary}},scales:{x:{title:{display:!!e.xAxis.title,text:e.xAxis.title,color:e.xAxis.titleColor,font:{size:f.caption.fontSize}},grid:{display:!1,borderColor:m.background.base},ticks:{fontSize:f.caption.fontSize,color:null!==(c=e.yAxis.labelColor)&&void 0!==c?c:m.content.secondary}},y:{title:{display:!!e.yAxis.title,text:e.yAxis.title,color:e.yAxis.titleColor,font:{size:f.caption.fontSize}},grid:{borderColor:"white",color:m.background.base},ticks:Object.assign({callback:e.yAxis.ticksCallback,fontSize:f.caption.fontSize,color:null!==(p=e.xAxis.labelColor)&&void 0!==p?p:m.content.secondary},X?Z:{})}},maintainAspectRatio:!1},oo={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!Y,callbacks:{label:e.yAxis.toolTipCallback}},datalabels:{display:null!==(k=e.showTotal)&&void 0!==k&&k,anchor:"end",align:"end",clamp:!0,color:m.content.secondary}},scales:{x:{title:{display:!!(null===(z=e.popupData)||void 0===z?void 0:z.xAxis.title),text:null===($=e.popupData)||void 0===$?void 0:$.xAxis.title,color:null===(D=e.popupData)||void 0===D?void 0:D.xAxis.titleColor,font:{size:f.caption.fontSize}},grid:{display:!1,borderColor:m.background.base},ticks:{fontSize:f.caption.fontSize,color:null!==(j=null===(S=e.popupData)||void 0===S?void 0:S.yAxis.labelColor)&&void 0!==j?j:m.content.secondary}},y:{title:{display:!!(null===(P=e.popupData)||void 0===P?void 0:P.yAxis.title),text:null===(T=e.popupData)||void 0===T?void 0:T.yAxis.title,color:null===(w=e.popupData)||void 0===w?void 0:w.yAxis.titleColor,font:{size:f.caption.fontSize}},grid:{borderColor:"white",color:m.background.base},ticks:Object.assign({callback:null===(H=e.popupData)||void 0===H?void 0:H.yAxis.ticksCallback,fontSize:f.caption.fontSize,color:null!==(R=null===(I=e.popupData)||void 0===I?void 0:I.xAxis.labelColor)&&void 0!==R?R:m.content.secondary},Y?Z:{})}},maintainAspectRatio:!1},to={labels:e.xAxis.data.map((o=>o.toString())),datasets:[{data:X?W:e.yAxis.data,backgroundColor:o=>{var t;const i=e.barColorRGBA;let a=[];const l=e.xAxis.data.length;if(X)return"rgba(0,0,0,0)";if(e.isFunnel){let o=+(l>10?.1:(1/l).toFixed(2));const t=`rgba(${i.r}, ${i.g}, ${i.b}`;for(let i=1;i<l+1;i++){let l="";i>10?l=`${t},1)`:(l=`${t},${o})`,o+=.1),a.push(l)}}else{const o=`rgba(${i.r}, ${i.g}, ${i.b}, ${null!==(t=i.a)&&void 0!==t?t:"1"})`;a=Array(l).fill(o)}return a},barPercentage:.4,categoryPercentage:1,borderRadius:4}]},io={labels:null===(B=e.popupData)||void 0===B?void 0:B.xAxis.data.map((o=>o.toString())),datasets:[{data:Y?W:null===(E=e.popupData)||void 0===E?void 0:E.yAxis.data,backgroundColor:o=>{var t,i;const a=e.barColorRGBA;let l=[];const n=(null===(t=e.popupData)||void 0===t?void 0:t.xAxis.data.length)||0;if(X)return"rgba(0,0,0,0)";if(e.isFunnel){let o=+(n>10?.1:(1/n).toFixed(2));const t=`rgba(${a.r}, ${a.g}, ${a.b}`;for(let i=1;i<n+1;i++){let a="";i>10?a=`${t},1)`:(a=`${t},${o})`,o+=.1),l.push(a)}}else{const o=`rgba(${a.r}, ${a.g}, ${a.b}, ${null!==(i=a.a)&&void 0!==i?i:"1"})`;l=Array(n).fill(o)}return l},barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return o(C,{padding:e.outerPadding,children:[e.chartHeading&&t("div",{style:{marginBottom:24},children:t(b,{color:null!==(F=e.chartHeading.color)&&void 0!==F?F:m.content.secondary,children:e.chartHeading.heading})}),o("div",{style:{display:"flex",justifyContent:"flex-end"},children:[e.showConvertToPieChart&&t(x,{Icon:a,onClick:()=>{K(!0),q(!0)}}),e.allowChartPopup&&t(x,{Icon:l,onClick:()=>{q(!0)}})]}),t("div",{style:{height:null!==(O=e.graphCanvasHeight)&&void 0!==O?O:500},children:t(h,{options:_,data:to})}),V&&o(y,{open:V,onClose:()=>{q(!1),K(!1)},closeOnOutsideClick:!0,headingTitle:null===(G=e.popupData)||void 0===G?void 0:G.chartHeading,width:"75%",headerRightCustomElement:e.showConvertToPieChart?t(x,J?{Icon:i,onClick:()=>{K(!1)}}:{Icon:a,onClick:()=>{K(!0)}}):null,headerLeftCustomElement:null===(L=e.popupData)||void 0===L?void 0:L.headerLeftCustomElement,children:[J&&Q&&t("div",{style:{height:null!==(M=e.graphCanvasHeight)&&void 0!==M?M:500,padding:"24px"},children:t(g,{fallback:t("div",{children:"Loading..."}),children:t(A,{slices:Q,size:e.pieChartSize,hideTitle:!0,currencyProps:e.currencyProps})})}),!J&&t("div",{style:{height:null!==(N=e.graphCanvasHeight)&&void 0!==N?N:500},children:t(h,{options:oo,data:io})})]})]})};export{k as VerticalGraph};
1
+ import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"../../../../assets/icons/ChartBar.svg.js";import a from"../../../../assets/icons/ChartPie.svg.js";import l from"../../../../assets/icons/maximize.svg.js";import{Chart as e,CategoryScale as n,LinearScale as r,BarElement as s,Tooltip as d}from"chart.js";import c from"chartjs-plugin-datalabels";import p,{useState as u,useEffect as v,Suspense as g}from"react";import{Bar as h}from"react-chartjs-2";import{IconButton as x}from"../../../icon-button/IconButton.js";import{StyledModal as y}from"../../../modals/styledModal.js";import{TitleMedium as b}from"../../../TypographyStyle.js";import{COLORS as m,FONTS as f}from"../../../../constants/Theme.js";import{GraphContainerWrapper as C}from"./VerticalGraph.styles.js";e.register(n,r,s,d,c);const A=p.lazy(()=>import("../Pie/PieChartAnalytics.js").then(o=>({default:o.PieChartAnalytics}))),k=e=>{var n,r,s,d,c,p,k,z,$,D,S,j,P,T,w,H,I,R,B,E,F,O,G,L,M,N;const[V,q]=u(!1),[J,K]=u(!1),[Q,U]=u();v(()=>{var o;const t=[];J&&(null===(o=e.popupData)||void 0===o||o.xAxis.data.forEach((o,i)=>{var a;t.push({name:o.toString(),count:Number(null===(a=e.popupData)||void 0===a?void 0:a.yAxis.data[i])||0})}),U(t))},[J,null===(n=e.popupData)||void 0===n?void 0:n.xAxis.data,null===(r=e.popupData)||void 0===r?void 0:r.yAxis.data]);const W=[250,1e3,800,1500,300,600],X=-1===e.yAxis.data.findIndex(o=>0!==o),Y=-1===(null===(s=e.popupData)||void 0===s?void 0:s.yAxis.data.findIndex(o=>0!==o)),Z={min:0,max:2e3,stepSize:200},_={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!X,callbacks:{label:e.yAxis.toolTipCallback}},datalabels:{display:null!==(d=e.showTotal)&&void 0!==d&&d,anchor:"end",align:"end",clamp:!0,color:m.content.secondary}},scales:{x:{title:{display:!!e.xAxis.title,text:e.xAxis.title,color:e.xAxis.titleColor,font:{size:f.caption.fontSize}},grid:{display:!1,borderColor:m.background.base},ticks:{fontSize:f.caption.fontSize,color:null!==(c=e.yAxis.labelColor)&&void 0!==c?c:m.content.secondary}},y:{title:{display:!!e.yAxis.title,text:e.yAxis.title,color:e.yAxis.titleColor,font:{size:f.caption.fontSize}},grid:{borderColor:"white",color:m.background.base},ticks:Object.assign({callback:e.yAxis.ticksCallback,fontSize:f.caption.fontSize,color:null!==(p=e.xAxis.labelColor)&&void 0!==p?p:m.content.secondary},X?Z:{})}},maintainAspectRatio:!1},oo={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!Y,callbacks:{label:e.yAxis.toolTipCallback}},datalabels:{display:null!==(k=e.showTotal)&&void 0!==k&&k,anchor:"end",align:"end",clamp:!0,color:m.content.secondary}},scales:{x:{title:{display:!!(null===(z=e.popupData)||void 0===z?void 0:z.xAxis.title),text:null===($=e.popupData)||void 0===$?void 0:$.xAxis.title,color:null===(D=e.popupData)||void 0===D?void 0:D.xAxis.titleColor,font:{size:f.caption.fontSize}},grid:{display:!1,borderColor:m.background.base},ticks:{fontSize:f.caption.fontSize,color:null!==(j=null===(S=e.popupData)||void 0===S?void 0:S.yAxis.labelColor)&&void 0!==j?j:m.content.secondary}},y:{title:{display:!!(null===(P=e.popupData)||void 0===P?void 0:P.yAxis.title),text:null===(T=e.popupData)||void 0===T?void 0:T.yAxis.title,color:null===(w=e.popupData)||void 0===w?void 0:w.yAxis.titleColor,font:{size:f.caption.fontSize}},grid:{borderColor:"white",color:m.background.base},ticks:Object.assign({callback:null===(H=e.popupData)||void 0===H?void 0:H.yAxis.ticksCallback,fontSize:f.caption.fontSize,color:null!==(R=null===(I=e.popupData)||void 0===I?void 0:I.xAxis.labelColor)&&void 0!==R?R:m.content.secondary},Y?Z:{})}},maintainAspectRatio:!1},to={labels:e.xAxis.data.map(o=>o.toString()),datasets:[{data:X?W:e.yAxis.data,backgroundColor:o=>{var t;const i=e.barColorRGBA;let a=[];const l=e.xAxis.data.length;if(X)return"rgba(0,0,0,0)";if(e.isFunnel){let o=+(l>10?.1:(1/l).toFixed(2));const t=`rgba(${i.r}, ${i.g}, ${i.b}`;for(let i=1;i<l+1;i++){let l="";i>10?l=`${t},1)`:(l=`${t},${o})`,o+=.1),a.push(l)}}else{const o=`rgba(${i.r}, ${i.g}, ${i.b}, ${null!==(t=i.a)&&void 0!==t?t:"1"})`;a=Array(l).fill(o)}return a},barPercentage:.4,categoryPercentage:1,borderRadius:4}]},io={labels:null===(B=e.popupData)||void 0===B?void 0:B.xAxis.data.map(o=>o.toString()),datasets:[{data:Y?W:null===(E=e.popupData)||void 0===E?void 0:E.yAxis.data,backgroundColor:o=>{var t,i;const a=e.barColorRGBA;let l=[];const n=(null===(t=e.popupData)||void 0===t?void 0:t.xAxis.data.length)||0;if(X)return"rgba(0,0,0,0)";if(e.isFunnel){let o=+(n>10?.1:(1/n).toFixed(2));const t=`rgba(${a.r}, ${a.g}, ${a.b}`;for(let i=1;i<n+1;i++){let a="";i>10?a=`${t},1)`:(a=`${t},${o})`,o+=.1),l.push(a)}}else{const o=`rgba(${a.r}, ${a.g}, ${a.b}, ${null!==(i=a.a)&&void 0!==i?i:"1"})`;l=Array(n).fill(o)}return l},barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return o(C,{padding:e.outerPadding,children:[e.chartHeading&&t("div",{style:{marginBottom:24},children:t(b,{color:null!==(F=e.chartHeading.color)&&void 0!==F?F:m.content.secondary,children:e.chartHeading.heading})}),o("div",{style:{display:"flex",justifyContent:"flex-end"},children:[e.showConvertToPieChart&&t(x,{Icon:a,onClick:()=>{K(!0),q(!0)}}),e.allowChartPopup&&t(x,{Icon:l,onClick:()=>{q(!0)}})]}),t("div",{style:{height:null!==(O=e.graphCanvasHeight)&&void 0!==O?O:500},children:t(h,{options:_,data:to})}),V&&o(y,{open:V,onClose:()=>{q(!1),K(!1)},closeOnOutsideClick:!0,headingTitle:null===(G=e.popupData)||void 0===G?void 0:G.chartHeading,width:"75%",headerRightCustomElement:e.showConvertToPieChart?t(x,J?{Icon:i,onClick:()=>{K(!1)}}:{Icon:a,onClick:()=>{K(!0)}}):null,headerLeftCustomElement:null===(L=e.popupData)||void 0===L?void 0:L.headerLeftCustomElement,children:[J&&Q&&t("div",{style:{height:null!==(M=e.graphCanvasHeight)&&void 0!==M?M:500,padding:"24px"},children:t(g,{fallback:t("div",{children:"Loading..."}),children:t(A,{slices:Q,size:e.pieChartSize,hideTitle:!0,currencyProps:e.currencyProps})})}),!J&&t("div",{style:{height:null!==(N=e.graphCanvasHeight)&&void 0!==N?N:500},children:t(h,{options:oo,data:io})})]})]})};export{k as VerticalGraph};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect as n}from"react";import{Tooltip as l}from"../../../tooltips/Tooltip.js";import{TitleMedium as c,BodyCaption as i,Caption as d,BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as a}from"../../../../constants/Theme.js";import{HeatBoxStyled as s,LegendContainer as H,LegendItem as m,HeatBoxLegend as p,LegendValue as E,LegendLabels as I,LegendCaption as L,HeatBox as y}from"./HeatMapStyled.js";var M,T;!function(e){e[e.ABSOLUTE=0]="ABSOLUTE",e[e.RELATIVE=1]="RELATIVE"}(M||(M={})),function(e){e[e.LOW=0]="LOW",e[e.MEDIUM=1]="MEDIUM",e[e.HIGH=2]="HIGH",e[e.HIGHEST=3]="HIGHEST"}(T||(T={}));const u={[T.LOW]:"#EBDBFF",[T.MEDIUM]:"#D2AEFF",[T.HIGH]:"#9E77ED",[T.HIGHEST]:"#5E07BB"},f=e=>{if(e>=1e3){const o=e/1e3;return`${Math.round(10*o)/10}K`}return e.toString()},G=G=>{let{title:S,xLabels:B,yLabels:O,values:U,heatType:D,absolutHeatValues:b,showAbsoluteValuesOnLegend:g,hideXLabels:x,customComponent:W,heatBoxWidth:A,heatBoxHeight:j,isLooseFit:F}=G;const[v,V]=r(),_=F?{display:"flex",justifyContent:"center",alignItems:"center"}:{};return n((()=>{const e=Math.max(...U.flat()),o=Math.min(...U.flat());V(U.map((t=>t.map((t=>((e,o,t,r,n)=>{if(o===M.ABSOLUTE)return e<=t[0]?T.LOW:e<=t[1]?T.MEDIUM:e<=t[2]?T.HIGH:T.HIGHEST;{const o=(n-r)/4;return e<=r+o?T.LOW:e<=r+2*o?T.MEDIUM:e<=r+3*o?T.HIGH:T.HIGHEST}})(t,D,b||[],o,e))))))}),[U,b,D]),v?t(s,{isLooseFit:F,children:[t("div",{className:"top-container",children:[t("div",{className:"top-container__heading",children:[e(c,{style:{color:a.content.primary},children:S}),W]}),e("div",{className:"top-container__legend",children:e(H,{children:D===M.ABSOLUTE&&g&&b&&b.length>=3?t(o,{children:[t(m,{children:[e(p,{color:u[T.LOW]}),e(E,{children:e(i,{color:a.content.secondary,children:f(b[0])})})]}),t(m,{children:[e(p,{color:u[T.MEDIUM]}),e(E,{children:e(i,{color:a.content.secondary,children:f(b[1])})})]}),t(m,{children:[e(p,{color:u[T.HIGH]}),e(E,{children:e(i,{color:a.content.secondary,children:f(b[2])})})]}),t(m,{children:[e(p,{color:u[T.HIGHEST]}),e(E,{children:e(i,{color:a.content.secondary,children:b[3]?f(b[3]):f(b[2])+"+"})})]})]}):t(I,{children:[e(L,{children:e(d,{children:"Less"})}),e(p,{color:u[T.LOW]}),e(p,{color:u[T.MEDIUM]}),e(p,{color:u[T.HIGH]}),e(p,{color:u[T.HIGHEST]}),e(L,{children:e(d,{children:"More"})})]})})})]}),e("table",{style:_,children:t("tbody",{children:[O.map(((o,r)=>t("tr",{children:[e("td",{children:e(h,{style:{color:a.content.placeholder},children:o})}),B.map(((o,t)=>e("td",{children:e(l,{body:f(U[r][t]),placement:"bottom",children:e(y,{color:u[v[r][t]],heatBoxWidth:A,heatBoxHeight:j})})},o)))]},o))),!x&&t("tr",{children:[e("th",{}),B.map((o=>e("th",{children:e(h,{style:{color:a.content.placeholder},children:o})},o)))]})]})})]}):e(o,{})};export{T as HEAT,u as HEAT_COLORS,M as HEAT_GRADING_TYPE,G as HeatMap};
1
+ import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect as n}from"react";import{Tooltip as c}from"../../../tooltips/Tooltip.js";import{TitleMedium as l,BodyCaption as i,Caption as d,BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as a}from"../../../../constants/Theme.js";import{HeatBoxStyled as s,LegendContainer as H,LegendItem as m,HeatBoxLegend as p,LegendValue as E,LegendLabels as I,LegendCaption as L,HeatBox as y}from"./HeatMapStyled.js";var M,T;!function(e){e[e.ABSOLUTE=0]="ABSOLUTE",e[e.RELATIVE=1]="RELATIVE"}(M||(M={})),function(e){e[e.LOW=0]="LOW",e[e.MEDIUM=1]="MEDIUM",e[e.HIGH=2]="HIGH",e[e.HIGHEST=3]="HIGHEST"}(T||(T={}));const u={[T.LOW]:"#EBDBFF",[T.MEDIUM]:"#D2AEFF",[T.HIGH]:"#9E77ED",[T.HIGHEST]:"#5E07BB"},f=e=>{if(e>=1e3){const o=e/1e3;return`${Math.round(10*o)/10}K`}return e.toString()},G=({title:G,xLabels:S,yLabels:B,values:O,heatType:U,absolutHeatValues:D,showAbsoluteValuesOnLegend:b,hideXLabels:g,customComponent:x,heatBoxWidth:W,heatBoxHeight:A,isLooseFit:j})=>{const[F,v]=r(),V=j?{display:"flex",justifyContent:"center",alignItems:"center"}:{};return n(()=>{const e=Math.max(...O.flat()),o=Math.min(...O.flat());v(O.map(t=>t.map(t=>((e,o,t,r,n)=>{if(o===M.ABSOLUTE)return e<=t[0]?T.LOW:e<=t[1]?T.MEDIUM:e<=t[2]?T.HIGH:T.HIGHEST;{const o=(n-r)/4;return e<=r+o?T.LOW:e<=r+2*o?T.MEDIUM:e<=r+3*o?T.HIGH:T.HIGHEST}})(t,U,D||[],o,e))))},[O,D,U]),F?t(s,{isLooseFit:j,children:[t("div",{className:"top-container",children:[t("div",{className:"top-container__heading",children:[e(l,{style:{color:a.content.primary},children:G}),x]}),e("div",{className:"top-container__legend",children:e(H,{children:U===M.ABSOLUTE&&b&&D&&D.length>=3?t(o,{children:[t(m,{children:[e(p,{color:u[T.LOW]}),e(E,{children:e(i,{color:a.content.secondary,children:f(D[0])})})]}),t(m,{children:[e(p,{color:u[T.MEDIUM]}),e(E,{children:e(i,{color:a.content.secondary,children:f(D[1])})})]}),t(m,{children:[e(p,{color:u[T.HIGH]}),e(E,{children:e(i,{color:a.content.secondary,children:f(D[2])})})]}),t(m,{children:[e(p,{color:u[T.HIGHEST]}),e(E,{children:e(i,{color:a.content.secondary,children:D[3]?f(D[3]):f(D[2])+"+"})})]})]}):t(I,{children:[e(L,{children:e(d,{children:"Less"})}),e(p,{color:u[T.LOW]}),e(p,{color:u[T.MEDIUM]}),e(p,{color:u[T.HIGH]}),e(p,{color:u[T.HIGHEST]}),e(L,{children:e(d,{children:"More"})})]})})})]}),e("table",{style:V,children:t("tbody",{children:[B.map((o,r)=>t("tr",{children:[e("td",{children:e(h,{style:{color:a.content.placeholder},children:o})}),S.map((o,t)=>e("td",{children:e(c,{body:f(O[r][t]),placement:"bottom",children:e(y,{color:u[F[r][t]],heatBoxWidth:W,heatBoxHeight:A})})},o))]},o)),!g&&t("tr",{children:[e("th",{}),S.map(o=>e("th",{children:e(h,{style:{color:a.content.placeholder},children:o})},o))]})]})})]}):e(o,{})};export{T as HEAT,u as HEAT_COLORS,M as HEAT_GRADING_TYPE,G as HeatMap};
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as i}from"react";import l from"styled-components";import{Tooltip as n}from"../../../tooltips/Tooltip.js";import{BodyCaption as c,BodyTiny as a}from"../../../TypographyStyle.js";import{COLORS as d}from"../../../../constants/Theme.js";import{HeatBoxLegend as s}from"./HeatMapStyled.js";var h;!function(e){e[e.LOW=0]="LOW",e[e.MEDIUM=1]="MEDIUM",e[e.HIGH=2]="HIGH",e[e.HIGHEST=3]="HIGHEST"}(h||(h={}));const m={[h.LOW]:"#EBDBFF",[h.MEDIUM]:"#D2AEFF",[h.HIGH]:"#9E77ED",[h.HIGHEST]:"#5E07BB"},p=l=>{let{xLabels:p,yLabels:x,values:H,absolutHeatValues:f}=l;const[v,E]=r();return i((()=>{E(H.map((e=>e.map((e=>((e,t)=>e<=t[0]?h.LOW:e<=t[1]?h.MEDIUM:e<=t[2]?h.HIGH:h.HIGHEST)(e,f||[]))))))}),[H,f]),v?o(y,{children:[e("div",{className:"top-container",children:o("div",{children:[o("div",{className:"top-container__legend",children:[e(s,{color:m[h.LOW]}),e(s,{color:m[h.MEDIUM]}),e(s,{color:m[h.HIGH]}),e(s,{color:m[h.HIGHEST]})]}),o("div",{className:"top-container__legend",children:[e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:f[0]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:f[1]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:f[2]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:`${f[2]}+`})]})]})}),o("div",{style:{width:"100%"},children:[x.map(((t,r)=>o("div",{className:"heat-row",children:[e("div",{style:{flex:.5},children:e(a,{style:{color:d.content.secondary,textAlign:"right",marginRight:8},children:t})}),p.map(((t,o)=>e("div",{style:{flex:1},children:e(n,{body:H[r][o].toString(),placement:"bottom",children:e(g,{color:m[v[r][o]]})})},t)))]},t))),o("div",{className:"heat-row",style:{marginTop:12},children:[e("div",{style:{flex:.5}}),p.map((t=>e("div",{style:{flex:1},children:e(a,{style:{color:d.content.secondary,textAlign:"center"},children:t})},t)))]})]})]}):e(t,{})},g=l.div`
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as i}from"react";import l from"styled-components";import{Tooltip as n}from"../../../tooltips/Tooltip.js";import{BodyCaption as c,BodyTiny as a}from"../../../TypographyStyle.js";import{COLORS as d}from"../../../../constants/Theme.js";import{HeatBoxLegend as s}from"./HeatMapStyled.js";var h;!function(e){e[e.LOW=0]="LOW",e[e.MEDIUM=1]="MEDIUM",e[e.HIGH=2]="HIGH",e[e.HIGHEST=3]="HIGHEST"}(h||(h={}));const m={[h.LOW]:"#EBDBFF",[h.MEDIUM]:"#D2AEFF",[h.HIGH]:"#9E77ED",[h.HIGHEST]:"#5E07BB"},p=({xLabels:l,yLabels:p,values:x,absolutHeatValues:H})=>{const[f,v]=r();return i(()=>{v(x.map(e=>e.map(e=>((e,t)=>e<=t[0]?h.LOW:e<=t[1]?h.MEDIUM:e<=t[2]?h.HIGH:h.HIGHEST)(e,H||[]))))},[x,H]),f?o(y,{children:[e("div",{className:"top-container",children:o("div",{children:[o("div",{className:"top-container__legend",children:[e(s,{color:m[h.LOW]}),e(s,{color:m[h.MEDIUM]}),e(s,{color:m[h.HIGH]}),e(s,{color:m[h.HIGHEST]})]}),o("div",{className:"top-container__legend",children:[e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:H[0]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:H[1]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:H[2]}),e(c,{color:d.content.secondary,style:{width:56,margin:3,textAlign:"right"},children:`${H[2]}+`})]})]})}),o("div",{style:{width:"100%"},children:[p.map((t,r)=>o("div",{className:"heat-row",children:[e("div",{style:{flex:.5},children:e(a,{style:{color:d.content.secondary,textAlign:"right",marginRight:8},children:t})}),l.map((t,o)=>e("div",{style:{flex:1},children:e(n,{body:x[r][o].toString(),placement:"bottom",children:e(g,{color:m[f[r][o]]})})},t))]},t)),o("div",{className:"heat-row",style:{marginTop:12},children:[e("div",{style:{flex:.5}}),l.map(t=>e("div",{style:{flex:1},children:e(a,{style:{color:d.content.secondary,textAlign:"center"},children:t})},t))]})]})]}):e(t,{})},g=l.div`
2
2
  height: 7px;
3
3
  border-radius: 1px;
4
4
  background-color: ${e=>e.color};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react-bootstrap";import{TitleRegular as r,TitleLarge as o,BodySecondary as n}from"../../../TypographyStyle.js";import{COLORS as s}from"../../../../constants/Theme.js";import{LineChart as i}from"../LineChart/LineChart.js";import{ScoreBlock as a}from"../scoreBlock/ScoreBlock.js";import{Container as c,Row as l,Column as m,StyledChip as p}from"./LinearChipGroupedChart.styled.js";const d=d=>{let{separator:h,name:y,overallValue:f,requestSent:u,responses:j,chipValues:C,lineChartOption:g,formatVal:v}=d;return e(c,{separator:h,children:[e(l,{style:{alignItems:"center",justifyContent:"space-between"},children:[e("div",{children:[t(r,{color:s.content.secondary,children:y}),t(o,{color:void 0===f||0===f?s.content.secondary:f<0?s.content.negative:s.content.positive,children:v?new Intl.NumberFormat("en-IN",{}).format(f):f})]}),e(m,{style:{alignItems:"flex-end"},children:[e(n,{color:s.content.secondary,style:{marginBottom:2},children:["Requests sent: ",u]}),e(n,{color:s.content.secondary,children:["Responses: ",j]})]})]}),t(a,{chipValues:C,formatVal:v,CustomStyledChip:p}),t("div",{style:{marginTop:28,width:"100%"},children:t(i,Object.assign({},g,{maintainAspectRatio:!0}))})]})};export{d as LinearChipGroupedChart};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react-bootstrap";import{TitleRegular as o,TitleLarge as r,BodySecondary as n}from"../../../TypographyStyle.js";import{COLORS as s}from"../../../../constants/Theme.js";import{LineChart as i}from"../LineChart/LineChart.js";import{ScoreBlock as a}from"../scoreBlock/ScoreBlock.js";import{Container as c,Row as l,Column as m,StyledChip as p}from"./LinearChipGroupedChart.styled.js";const d=({separator:d,name:h,overallValue:y,requestSent:f,responses:u,chipValues:j,lineChartOption:C,formatVal:g})=>e(c,{separator:d,children:[e(l,{style:{alignItems:"center",justifyContent:"space-between"},children:[e("div",{children:[t(o,{color:s.content.secondary,children:h}),t(r,{color:void 0===y||0===y?s.content.secondary:y<0?s.content.negative:s.content.positive,children:g?new Intl.NumberFormat("en-IN",{}).format(y):y})]}),e(m,{style:{alignItems:"flex-end"},children:[e(n,{color:s.content.secondary,style:{marginBottom:2},children:["Requests sent: ",f]}),e(n,{color:s.content.secondary,children:["Responses: ",u]})]})]}),t(a,{chipValues:j,formatVal:g,CustomStyledChip:p}),t("div",{style:{marginTop:28,width:"100%"},children:t(i,Object.assign({},C,{maintainAspectRatio:!0}))})]});export{d as LinearChipGroupedChart};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e,Fragment as o}from"react/jsx-runtime";import{BodyCaption as s,TitleMedium as i}from"../../../TypographyStyle.js";import{COLORS as r}from"../../../../constants/Theme.js";import n from"../../../../assets/icons/arrow_down.svg.js";import l from"../../../../assets/icons/arrow_up.svg.js";import a from"../../../../assets/icons/expressionless_emoji.svg.js";import c from"../../../../assets/icons/sad_emoji.svg.js";import m from"../../../../assets/icons/smiley_emoji.svg.js";import{StyledChip as p}from"./ScoreBlock.styled.js";const d=d=>{let{type:g,text:v,value:u,formatVal:y,progress:f,durationValue:j,durationUnit:w,plainText:x,showEmojiIcon:I,customTrailingIcon:_,CustomStyledChip:T=p}=d;const S="positive"===g?r.content.positive:"negative"===g?r.content.negative:r.content.warning,$=f&&f<0?n:l,b="positive"===g?m:"neutral"===g?a:c,C=f&&f<0?r.content.negative:f&&f>0?r.content.positive:r.content.placeholder;return t(T,{type:g,children:[e(s,{color:S,children:v}),t("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e(i,{color:x?r.content.primary:S,children:y?new Intl.NumberFormat("en-IN",{}).format(u):u}),_||(I?e(b,{width:22,height:22}):null)]}),t("div",{style:{display:"flex",gap:4},children:[j&&w?e($,{color:C,height:16,width:16,style:{marginRight:2}}):null,j&&w?t(o,{children:[t(s,{color:C,children:[Math.abs(f||0),"%"]}),t(s,{color:r.content.placeholder,children:["vs last ",h(j,w)]})]}):null]})]})},h=(t,e)=>`${t} ${e}${t>1?"s":""}`;export{d as Chip};
1
+ import{jsxs as t,jsx as e,Fragment as o}from"react/jsx-runtime";import{BodyCaption as s,TitleMedium as i}from"../../../TypographyStyle.js";import{COLORS as r}from"../../../../constants/Theme.js";import n from"../../../../assets/icons/arrow_down.svg.js";import l from"../../../../assets/icons/arrow_up.svg.js";import a from"../../../../assets/icons/expressionless_emoji.svg.js";import c from"../../../../assets/icons/sad_emoji.svg.js";import m from"../../../../assets/icons/smiley_emoji.svg.js";import{StyledChip as p}from"./ScoreBlock.styled.js";const d=({type:d,text:g,value:v,formatVal:u,progress:y,durationValue:f,durationUnit:j,plainText:w,showEmojiIcon:x,customTrailingIcon:I,CustomStyledChip:_=p})=>{const T="positive"===d?r.content.positive:"negative"===d?r.content.negative:r.content.warning,S=y&&y<0?n:l,$="positive"===d?m:"neutral"===d?a:c,b=y&&y<0?r.content.negative:y&&y>0?r.content.positive:r.content.placeholder;return t(_,{type:d,children:[e(s,{color:T,children:g}),t("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e(i,{color:w?r.content.primary:T,children:u?new Intl.NumberFormat("en-IN",{}).format(v):v}),I||(x?e($,{width:22,height:22}):null)]}),t("div",{style:{display:"flex",gap:4},children:[f&&j?e(S,{color:b,height:16,width:16,style:{marginRight:2}}):null,f&&j?t(o,{children:[t(s,{color:b,children:[Math.abs(y||0),"%"]}),t(s,{color:r.content.placeholder,children:["vs last ",h(f,j)]})]}):null]})]})},h=(t,e)=>`${t} ${e}${t>1?"s":""}`;export{d as Chip};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{BodyTiny as n}from"../../../TypographyStyle.js";import{COLORS as r}from"../../../../constants/Theme.js";import{calculatePercentage as l}from"../utils/calcPercentage.js";import{StyledBarContainer as o}from"./ScoreBlock.styled.js";const c=c=>{let{showPercentage:d,positive:s,negative:a,neutral:h}=c;const[g,p,v]=l(s,h,a),y={height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"};return e("div",{children:[e(o,{children:[t("div",{style:Object.assign(Object.assign({},y),{width:`${g}%`,backgroundColor:r.background.positive.vibrant})}),t("div",{style:Object.assign(Object.assign({},y),{width:`${p}%`,backgroundColor:r.background.warning.vibrant})}),t("div",{style:Object.assign(Object.assign({},y),{width:`${v}%`,backgroundColor:r.background.negative.vibrant})})]}),d&&t("div",{style:{display:"flex",width:"100%"},children:t("div",{style:{display:"flex",width:"100%",marginTop:8},children:0===g&&0===p&&0===v?t("div",{style:{width:"100%",textAlign:"left"},children:t(n,{color:r.content.placeholder,children:"0%"})}):e(i,{children:[t("div",{style:{width:`${g}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:g>0&&`${Math.round(g)}%`})}),t("div",{style:{width:`${p}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:p>0&&`${Math.round(p)}%`})}),t("div",{style:{width:`${v}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:v>0&&`${Math.round(v)}%`})})]})})})]})};export{c as HorinzontalBar};
1
+ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{BodyTiny as n}from"../../../TypographyStyle.js";import{COLORS as r}from"../../../../constants/Theme.js";import{calculatePercentage as l}from"../utils/calcPercentage.js";import{StyledBarContainer as o}from"./ScoreBlock.styled.js";const c=({showPercentage:c,positive:d,negative:s,neutral:a})=>{const[h,g,p]=l(d,a,s),v={height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"};return e("div",{children:[e(o,{children:[t("div",{style:Object.assign(Object.assign({},v),{width:`${h}%`,backgroundColor:r.background.positive.vibrant})}),t("div",{style:Object.assign(Object.assign({},v),{width:`${g}%`,backgroundColor:r.background.warning.vibrant})}),t("div",{style:Object.assign(Object.assign({},v),{width:`${p}%`,backgroundColor:r.background.negative.vibrant})})]}),c&&t("div",{style:{display:"flex",width:"100%"},children:t("div",{style:{display:"flex",width:"100%",marginTop:8},children:0===h&&0===g&&0===p?t("div",{style:{width:"100%",textAlign:"left"},children:t(n,{color:r.content.placeholder,children:"0%"})}):e(i,{children:[t("div",{style:{width:`${h}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:h>0&&`${Math.round(h)}%`})}),t("div",{style:{width:`${g}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:g>0&&`${Math.round(g)}%`})}),t("div",{style:{width:`${p}%`,textAlign:"center"},children:t(n,{color:r.content.placeholder,children:p>0&&`${Math.round(p)}%`})})]})})})]})};export{c as HorinzontalBar};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react-bootstrap";import{Chip as i}from"./Chip.js";import{HorinzontalBar as o}from"./HorizontalBar.js";import{Container as a,Row as r}from"./ScoreBlock.styled.js";const n=n=>{let{customTrailingIcon:l,showEmojiIcon:s,plainText:u,showPercentage:p,separator:m,CustomStyledChip:v,chipValues:c,formatVal:g}=n;return t(a,{separator:m,children:[t(r,{style:{marginTop:8,gap:16},children:[e(i,{formatVal:g,type:"positive",text:c.positive.text,value:c.positive.val,durationValue:c.positive.durationValue,durationUnit:c.positive.durationUnit,progress:c.positive.progress,plainText:u,showEmojiIcon:s,CustomStyledChip:v,customTrailingIcon:l}),e(i,{formatVal:g,type:"neutral",text:c.neutral.text,value:c.neutral.val,durationValue:c.neutral.durationValue,durationUnit:c.neutral.durationUnit,progress:c.neutral.progress,plainText:u,showEmojiIcon:s,CustomStyledChip:v,customTrailingIcon:l}),e(i,{formatVal:g,type:"negative",text:c.negative.text,value:c.negative.val,durationValue:c.negative.durationValue,durationUnit:c.negative.durationUnit,progress:c.negative.progress,plainText:u,showEmojiIcon:s,CustomStyledChip:v,customTrailingIcon:l})]}),e("div",{style:{marginTop:24,width:"100%"},children:e(o,{showPercentage:p,positive:c.positive.val,neutral:c.neutral.val,negative:c.negative.val})})]})};export{n as ScoreBlock};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react-bootstrap";import{Chip as i}from"./Chip.js";import{HorinzontalBar as o}from"./HorizontalBar.js";import{Container as a,Row as r}from"./ScoreBlock.styled.js";const n=({customTrailingIcon:n,showEmojiIcon:l,plainText:s,showPercentage:p,separator:u,CustomStyledChip:m,chipValues:v,formatVal:c})=>t(a,{separator:u,children:[t(r,{style:{marginTop:8,gap:16},children:[e(i,{formatVal:c,type:"positive",text:v.positive.text,value:v.positive.val,durationValue:v.positive.durationValue,durationUnit:v.positive.durationUnit,progress:v.positive.progress,plainText:s,showEmojiIcon:l,CustomStyledChip:m,customTrailingIcon:n}),e(i,{formatVal:c,type:"neutral",text:v.neutral.text,value:v.neutral.val,durationValue:v.neutral.durationValue,durationUnit:v.neutral.durationUnit,progress:v.neutral.progress,plainText:s,showEmojiIcon:l,CustomStyledChip:m,customTrailingIcon:n}),e(i,{formatVal:c,type:"negative",text:v.negative.text,value:v.negative.val,durationValue:v.negative.durationValue,durationUnit:v.negative.durationUnit,progress:v.negative.progress,plainText:s,showEmojiIcon:l,CustomStyledChip:m,customTrailingIcon:n})]}),e("div",{style:{marginTop:24,width:"100%"},children:e(o,{showPercentage:p,positive:v.positive.val,neutral:v.neutral.val,negative:v.negative.val})})]});export{n as ScoreBlock};
@@ -1 +1 @@
1
- function N(N,O,L){const E=N+O+L;return[N/E*100||0,O/E*100||0,L/E*100||0]}const O=N=>{if(Math.abs(N)<1e3)return n(N).toString();return n(N/1e3)+"K"},L=N=>{if(Math.abs(N)<1e4)return n(N).toString();return n(Number(N)/1e3)+"K"},E=N=>n(Number(N)/A.ONE_LAKH)+"L",e=N=>n(Number(N)/A.ONE_CRORE)+"C",r=N=>n(Number(N)/A.ONE_ARAB)+"A",I=N=>n(Number(N)/A.ONE_MILLION)+"M",_=N=>n(Number(N)/A.ONE_BILLION)+"B",t=N=>n(Number(N)/A.ONE_TRILLION)+"T",n=function(N){const O=10*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:2);return Math.round((N+Number.EPSILON)*O)/O},u=N=>N<1e3?n(N):N>999&&N<A.ONE_MILLION?O(N):N>999999&&N<A.ONE_BILLION?I(N):N>999999999&&N<A.ONE_TRILLION?_(N):t(N),R=N=>N<1e3?n(N):N>999&&N<A.ONE_LAKH?O(N):N>99999&&N<A.ONE_CRORE?E(N):N>9999999&&N<A.ONE_ARAB?e(N):r(N);var A;!function(N){N[N.ONE_LAKH=1e5]="ONE_LAKH",N[N.ONE_CRORE=1e7]="ONE_CRORE",N[N.ONE_ARAB=1e9]="ONE_ARAB",N[N.ONE_MILLION=1e6]="ONE_MILLION",N[N.ONE_BILLION=1e9]="ONE_BILLION",N[N.ONE_TRILLION=1e12]="ONE_TRILLION"}(A||(A={}));export{A as TruncateValue,N as calculatePercentage,n as roundNumber,R as truncateValueForIndianStore,u as truncateValueForInternationalStore,L as truncateValueTo10K,r as truncateValueToA,_ as truncateValueToB,e as truncateValueToC,O as truncateValueToK,E as truncateValueToL,I as truncateValueToM,t as truncateValueToT};
1
+ function N(N,O,L){const E=N+O+L;return[N/E*100||0,O/E*100||0,L/E*100||0]}const O=N=>{if(Math.abs(N)<1e3)return u(N).toString();return u(N/1e3)+"K"},L=N=>{if(Math.abs(N)<1e4)return u(N).toString();return u(Number(N)/1e3)+"K"},E=N=>u(Number(N)/A.ONE_LAKH)+"L",e=N=>u(Number(N)/A.ONE_CRORE)+"C",r=N=>u(Number(N)/A.ONE_ARAB)+"A",I=N=>u(Number(N)/A.ONE_MILLION)+"M",_=N=>u(Number(N)/A.ONE_BILLION)+"B",t=N=>u(Number(N)/A.ONE_TRILLION)+"T",u=(N,O=2)=>{const L=10*O;return Math.round((N+Number.EPSILON)*L)/L},n=N=>N<1e3?u(N):N>999&&N<A.ONE_MILLION?O(N):N>999999&&N<A.ONE_BILLION?I(N):N>999999999&&N<A.ONE_TRILLION?_(N):t(N),R=N=>N<1e3?u(N):N>999&&N<A.ONE_LAKH?O(N):N>99999&&N<A.ONE_CRORE?E(N):N>9999999&&N<A.ONE_ARAB?e(N):r(N);var A;!function(N){N[N.ONE_LAKH=1e5]="ONE_LAKH",N[N.ONE_CRORE=1e7]="ONE_CRORE",N[N.ONE_ARAB=1e9]="ONE_ARAB",N[N.ONE_MILLION=1e6]="ONE_MILLION",N[N.ONE_BILLION=1e9]="ONE_BILLION",N[N.ONE_TRILLION=1e12]="ONE_TRILLION"}(A||(A={}));export{A as TruncateValue,N as calculatePercentage,u as roundNumber,R as truncateValueForIndianStore,n as truncateValueForInternationalStore,L as truncateValueTo10K,r as truncateValueToA,_ as truncateValueToB,e as truncateValueToC,O as truncateValueToK,E as truncateValueToL,I as truncateValueToM,t as truncateValueToT};