@bikdotai/bik-component-library 0.0.736-beta.6 → 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 (821) 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 +6 -0
  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 +6 -0
  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 +34 -16
  816. package/dist/cjs/amplitude/Track.stories.d.ts +0 -4
  817. package/dist/esm/amplitude/Track.stories.d.ts +0 -4
  818. /package/dist/cjs/{src/components → components}/QueryBuilder/QueryBuilder.d.ts +0 -0
  819. /package/dist/cjs/{amplitude → src/amplitude}/index.d.ts +0 -0
  820. /package/dist/esm/{src/components → components}/QueryBuilder/QueryBuilder.d.ts +0 -0
  821. /package/dist/esm/{amplitude → src/amplitude}/index.d.ts +0 -0
@@ -1,10 +1,10 @@
1
- import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";const t=e.div`
1
+ import i from"styled-components";import{COLORS as e}from"../../constants/Theme.js";const t=i.div`
2
2
  position: relative;
3
3
  border-radius: 8px;
4
4
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
5
5
  padding-bottom: 4px;
6
- `,r=e.div`
7
- width: ${e=>{let{width:i}=e;return i||"200px"}};
6
+ `,d=i.div`
7
+ width: ${({width:i})=>i||"200px"};
8
8
  max-width: 300px;
9
9
  max-height: 280px;
10
10
  overflow-y: scroll;
@@ -12,24 +12,24 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
12
12
  &::-webkit-scrollbar {
13
13
  width: 0px;
14
14
  }
15
- `,n=e.div`
15
+ `,o=i.div`
16
16
  margin-top: 64px;
17
17
  height: 200px;
18
- width: ${e=>{let{width:i}=e;return i||"200px"}};
19
- `,d=e.div`
18
+ width: ${({width:i})=>i||"200px"};
19
+ `,r=i.div`
20
20
  width: 100%;
21
21
  justify-content: center;
22
22
  cursor: pointer;
23
23
  align-items: center;
24
24
  justify-content: space-between;
25
25
  margin: 4px 0;
26
- `,o=e.div`
26
+ `,n=i.div`
27
27
  z-index: 1000;
28
28
  position: relative;
29
29
  margin: 0px;
30
30
  padding: 0px;
31
31
  width: 100%;
32
- `,p=e.div`
32
+ `,p=i.div`
33
33
  position: relative;
34
34
  padding: 1px 4px;
35
35
  cursor: pointer;
@@ -38,33 +38,33 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
38
38
  &:focus-within > .submenu {
39
39
  display: block;
40
40
  }
41
- `,s=e.div`
41
+ `,s=i.div`
42
42
  position: relative;
43
43
  padding: 4px 8px 4px 8px;
44
44
  transition: background-color 0.2s;
45
45
  width: 100%;
46
46
  border-radius: 8px;
47
47
  justify-content: center;
48
- background-color: ${e=>{let{isSelected:t,isHovered:r,isSubMenuOpen:n,isDisabled:d}=e;return d?i.surface.standard:t||n?i.background.positive.light:r?i.surface.hovered:i.surface.standard}};
49
- color: ${e=>{let{isSelected:t,isSubMenuOpen:r}=e;return t||r?i.content.positive:i.content.primary}};
48
+ background-color: ${({isSelected:i,isHovered:t,isSubMenuOpen:d,isDisabled:o})=>o?e.surface.standard:i||d?e.background.positive.light:t?e.surface.hovered:e.surface.standard};
49
+ color: ${({isSelected:i,isSubMenuOpen:t})=>i||t?e.content.positive:e.content.primary};
50
50
  display: flex;
51
51
  align-items: center;
52
52
  justify-content: space-between;
53
53
 
54
54
  &:hover {
55
- background-color: ${e=>{let{isSelected:t,isDisabled:r}=e;return r?i.surface.standard:t?i.background.positive.light:i.surface.hovered}};
55
+ background-color: ${({isSelected:i,isDisabled:t})=>t?e.surface.standard:i?e.background.positive.light:e.surface.hovered};
56
56
  }
57
- `,a=e.div`
57
+ `,a=i.div`
58
58
  display: flex;
59
59
  align-items: center;
60
60
  gap: 8px;
61
- `,x=e.div`
61
+ `,x=i.div`
62
62
  z-index: 1001;
63
63
  position: fixed;
64
64
  border-left: 4px solid transparent;
65
- `,l=e.div`
65
+ `,c=i.div`
66
66
  margin: 4px;
67
- background-color: ${i.surface.standard};
67
+ background-color: ${e.surface.standard};
68
68
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
69
69
  border-radius: 8px;
70
70
  padding-top: 4px;
@@ -75,24 +75,24 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
75
75
  &::-webkit-scrollbar {
76
76
  display: none;
77
77
  }
78
- `,c=e.div`
78
+ `,l=i.div`
79
79
  width: 16px;
80
80
  height: 16px;
81
81
  display: flex;
82
82
  align-items: center;
83
83
  justify-content: center;
84
84
  margin-right: 4px;
85
- `,h=e.div`
85
+ `,h=i.div`
86
86
  width: 16px;
87
87
  height: 16px;
88
88
  display: flex;
89
89
  align-items: center;
90
90
  justify-content: center;
91
91
  margin-left: 4px;
92
- `,u=e.div`
93
- width: ${e=>e.width};
94
- `,g=e(x)`
95
- width: ${e=>e.width};
96
- top: ${e=>e.top}px;
97
- left: ${e=>e.left}px;
98
- `;export{a as ContentContainer,t as DropdownContainer,d as GroupedMenuListContainer,c as LeadingIconContainer,s as MenuItemContainer,p as MenuItemWrapper,n as NoResultsContainer,r as OptionsContainer,o as StyledMenuList,g as StyledSubMenuWrapper,u as SubMenuContainer,l as SubMenuListContainer,x as SubMenuWrapper,h as TrailingIconContainer};
92
+ `,g=i.div`
93
+ width: ${i=>i.width};
94
+ `,u=i(x)`
95
+ width: ${i=>i.width};
96
+ top: ${i=>i.top}px;
97
+ left: ${i=>i.left}px;
98
+ `;export{a as ContentContainer,t as DropdownContainer,r as GroupedMenuListContainer,l as LeadingIconContainer,s as MenuItemContainer,p as MenuItemWrapper,o as NoResultsContainer,d as OptionsContainer,n as StyledMenuList,u as StyledSubMenuWrapper,g as SubMenuContainer,c as SubMenuListContainer,x as SubMenuWrapper,h as TrailingIconContainer};
@@ -1 +1 @@
1
- import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as r,Fragment as e,jsxs as t}from"react/jsx-runtime";import{forwardRef as n}from"react";import{BodySecondary as i,ButtonRegular as s}from"../TypographyStyle.js";import{COLORS as a}from"../../constants/Theme.js";import{Pagination as l}from"./Pagination.styled.js";const d=n((n=>{var{id:d,onShowMore:m,isLoading:c,numberOfItemsLoaded:h,totalNumberOfItems:f}=n,p=o(n,["id","onShowMore","isLoading","numberOfItemsLoaded","totalNumberOfItems"]);return r(l,Object.assign({id:d},p,{children:c?r(e,{children:"loading..."}):r("div",{children:h<f?t(l,{children:[t(i,{style:{color:a.content.secondary},children:["Showing ",h," out of ",f," ","results"]}),r(s,{style:{color:a.content.brand,cursor:"pointer"},onClick:()=>m&&m(),children:"Show more"})]}):r(l,{children:t(i,{style:{color:a.content.secondary},children:["Showing all ",f," results"]})})})}))}));d.displayName="Pagination";export{d as Pagination};
1
+ import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as r,Fragment as e,jsxs as t}from"react/jsx-runtime";import{forwardRef as n}from"react";import{BodySecondary as i,ButtonRegular as s}from"../TypographyStyle.js";import{COLORS as a}from"../../constants/Theme.js";import{Pagination as l}from"./Pagination.styled.js";const d=n(n=>{var{id:d,onShowMore:m,isLoading:c,numberOfItemsLoaded:h,totalNumberOfItems:f}=n,p=o(n,["id","onShowMore","isLoading","numberOfItemsLoaded","totalNumberOfItems"]);return r(l,Object.assign({id:d},p,{children:c?r(e,{children:"loading..."}):r("div",{children:h<f?t(l,{children:[t(i,{style:{color:a.content.secondary},children:["Showing ",h," out of ",f," ","results"]}),r(s,{style:{color:a.content.brand,cursor:"pointer"},onClick:()=>m&&m(),children:"Show more"})]}):r(l,{children:t(i,{style:{color:a.content.secondary},children:["Showing all ",f," results"]})})})}))});d.displayName="Pagination";export{d as Pagination};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import o from"../../assets/icons/check.svg.js";import s from"../../assets/icons/checkCircle.svg.js";import a from"../../assets/icons/quotes.svg.js";import n from"../../assets/icons/WhiteStarFilled.svg.js";import{Button as r}from"../button/Button.js";import{NewSubscriptionStyled as l}from"./SubscriptionPlanStyled.js";import{Caption as c,TitleRegular as d,BodyCaption as h,TitleLarge as m,TitleSmall as p}from"../TypographyStyle.js";import{useCurrency as u}from"../../hooks/useCurreny.js";import{COLORS as y}from"../../constants/Theme.js";import{Tag as g}from"../tag/Tag.js";import{Tooltip as b}from"../tooltips/Tooltip.js";const f=f=>{var v;const{formatCurrency:T}=u(),N=f.showMonthlyOptions?f.features:f.annualFeatures||[],x=f.showMonthlyOptions?f.monthlyPlan:f.yearlyPlan,P=!f.isDisabled&&f.isMostPopular,k=f.showMonthlyOptions?f.code:null!==(v=f.yearlyCode)&&void 0!==v?v:f.code,{planName:S,isSelected:C=!1,isDisabled:M=!1,onPlanSelect:w,oldPrice:j,hideMonthYearTag:D,planDescription:L,planDescriptionDiscount:F,showTrialOptions:O,freeTrialMessages:B,extraBlockMessage:$,isLoading:z,buttonText:H,bottomDescription:W,showMonthlyOptions:_,popularTestimony:I,skipRadioSelection:U=!1,includeText:Y,height:q,showFeaturesButton:A,businessDescription:R,isPlanSelected:E=!1,onClickShowAllFeatures:G,showSelectedPlanChip:J=!1,perMonthForYearly:K=!1,minHeightOfFeatures:Q,hoverTooltip:V,hidePriceBlock:X=!1}=f,Z=e=>K&&!_?0==e?"$0":T(Math.round(e/12),"USD"):0==e?"$0":T(e,"USD");return e(b,{body:V,children:t(l,{height:q,showMostPopularChip:P||!1,onClick:()=>w(k),children:[P&&t("div",{className:"most-popular-chip",children:[e(c,{className:"popular-text",children:"Most popular "}),e(n,{height:12,width:12})]}),t("div",{className:`box ${M?"disabled":""} \n\t\t\t\t`,children:[t("div",{className:"radio-flex",children:[!U&&e("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=M&&M,onChange:()=>w(k),className:"radio-button",checked:E}),e(d,{style:{color:y.content.secondary,marginBottom:4},children:S}),J&&e("div",{style:{marginLeft:"auto"},children:e(g,{tagText:"Current plan",type:"positive",theme:"dark"})})]}),X?e(i,{}):t("div",{className:"price-block",children:[j?e(h,{className:"old--price",children:Z(x.price)}):e(i,{}),e(m,{style:{color:y.content.primary},children:Z(j||x.price)}),e(c,{style:{color:y.content.secondary,marginLeft:4},children:D?"":"/ "+(_?"month":K?"month billed annually":"year")})]}),L&&t("div",{className:"per-message-price",children:[e(h,{style:{color:y.content.secondary},children:L}),F&&e(h,{style:{color:y.background.positive.vibrant,marginLeft:4},children:F})]}),R&&R.length&&e("div",{style:{marginTop:4},children:R.map(((t,i)=>e(h,{style:{color:y.content.secondary},dangerouslySetInnerHTML:{__html:t}},i)))}),O&&t(c,{className:"trial "+(C?"selected":""),children:["7 day free trial with ",B," messages"]}),$&&e(c,{className:"trial "+(C?"selected":""),children:$}),e(p,{className:"extra-include-margin",style:{height:Y?"":"20px"},children:Y||""}),e("div",{className:"features",style:{minHeight:Q},children:N.map(((i,o)=>t("div",{className:"feature",children:[e("div",{children:e(s,{height:20,width:20,color:y.content.primary})}),e(h,{className:"feature-text",children:i.detail},o)]},i.detail)))}),A&&e(r,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),G&&G()}}),U&&e("div",{className:"button-box",children:z?e(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):t(i,{children:[C&&e(r,{disabled:M,LeadingIcon:o,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:H||"Selected Plan"}),!C&&!M&&e(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),w(k)},matchParentWidth:!0,buttonText:H||"Choose plan"})]})}),I&&t("div",{className:"popular-testimony",children:[e(a,{height:26,width:70}),e("div",{className:"testimony-text",children:e("i",{children:I})})]})]}),W&&e("div",{className:`plan-bottom-information\n\t\t\t\t\t${M?"disabled":""}\n\t\t\t\t\t${C?"selected":""}\n\t\t\t\t`,children:e(c,{className:"text",style:{color:y.background.inverse},children:W})})]})})};export{f as NewSubscriptionPlan};
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import o from"../../assets/icons/check.svg.js";import s from"../../assets/icons/checkCircle.svg.js";import a from"../../assets/icons/quotes.svg.js";import n from"../../assets/icons/WhiteStarFilled.svg.js";import{Button as r}from"../button/Button.js";import{NewSubscriptionStyled as l}from"./SubscriptionPlanStyled.js";import{Caption as c,TitleRegular as d,BodyCaption as h,TitleLarge as m,TitleSmall as p}from"../TypographyStyle.js";import{useCurrency as u}from"../../hooks/useCurreny.js";import{COLORS as y}from"../../constants/Theme.js";import{Tag as g}from"../tag/Tag.js";import{Tooltip as b}from"../tooltips/Tooltip.js";const f=f=>{var v;const{formatCurrency:T}=u(),N=f.showMonthlyOptions?f.features:f.annualFeatures||[],x=f.showMonthlyOptions?f.monthlyPlan:f.yearlyPlan,P=!f.isDisabled&&f.isMostPopular,k=f.showMonthlyOptions?f.code:null!==(v=f.yearlyCode)&&void 0!==v?v:f.code,{planName:S,isSelected:C=!1,isDisabled:M=!1,onPlanSelect:w,oldPrice:j,hideMonthYearTag:D,planDescription:L,planDescriptionDiscount:F,showTrialOptions:O,freeTrialMessages:B,extraBlockMessage:$,isLoading:z,buttonText:H,bottomDescription:W,showMonthlyOptions:_,popularTestimony:I,skipRadioSelection:U=!1,includeText:Y,height:q,showFeaturesButton:A,businessDescription:R,isPlanSelected:E=!1,onClickShowAllFeatures:G,showSelectedPlanChip:J=!1,perMonthForYearly:K=!1,minHeightOfFeatures:Q,hoverTooltip:V,hidePriceBlock:X=!1}=f,Z=e=>K&&!_?0==e?"$0":T(Math.round(e/12),"USD"):0==e?"$0":T(e,"USD");return e(b,{body:V,children:t(l,{height:q,showMostPopularChip:P||!1,onClick:()=>w(k),children:[P&&t("div",{className:"most-popular-chip",children:[e(c,{className:"popular-text",children:"Most popular "}),e(n,{height:12,width:12})]}),t("div",{className:`box ${M?"disabled":""} \n\t\t\t\t`,children:[t("div",{className:"radio-flex",children:[!U&&e("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=M&&M,onChange:()=>w(k),className:"radio-button",checked:E}),e(d,{style:{color:y.content.secondary,marginBottom:4},children:S}),J&&e("div",{style:{marginLeft:"auto"},children:e(g,{tagText:"Current plan",type:"positive",theme:"dark"})})]}),X?e(i,{}):t("div",{className:"price-block",children:[j?e(h,{className:"old--price",children:Z(x.price)}):e(i,{}),e(m,{style:{color:y.content.primary},children:Z(j||x.price)}),e(c,{style:{color:y.content.secondary,marginLeft:4},children:D?"":"/ "+(_?"month":K?"month billed annually":"year")})]}),L&&t("div",{className:"per-message-price",children:[e(h,{style:{color:y.content.secondary},children:L}),F&&e(h,{style:{color:y.background.positive.vibrant,marginLeft:4},children:F})]}),R&&R.length&&e("div",{style:{marginTop:4},children:R.map((t,i)=>e(h,{style:{color:y.content.secondary},dangerouslySetInnerHTML:{__html:t}},i))}),O&&t(c,{className:"trial "+(C?"selected":""),children:["7 day free trial with ",B," messages"]}),$&&e(c,{className:"trial "+(C?"selected":""),children:$}),e(p,{className:"extra-include-margin",style:{height:Y?"":"20px"},children:Y||""}),e("div",{className:"features",style:{minHeight:Q},children:N.map((i,o)=>t("div",{className:"feature",children:[e("div",{children:e(s,{height:20,width:20,color:y.content.primary})}),e(h,{className:"feature-text",children:i.detail},o)]},i.detail))}),A&&e(r,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),G&&G()}}),U&&e("div",{className:"button-box",children:z?e(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):t(i,{children:[C&&e(r,{disabled:M,LeadingIcon:o,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:H||"Selected Plan"}),!C&&!M&&e(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),w(k)},matchParentWidth:!0,buttonText:H||"Choose plan"})]})}),I&&t("div",{className:"popular-testimony",children:[e(a,{height:26,width:70}),e("div",{className:"testimony-text",children:e("i",{children:I})})]})]}),W&&e("div",{className:`plan-bottom-information\n\t\t\t\t\t${M?"disabled":""}\n\t\t\t\t\t${C?"selected":""}\n\t\t\t\t`,children:e(c,{className:"text",style:{color:y.background.inverse},children:W})})]})})};export{f as NewSubscriptionPlan};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import s from"../../assets/icons/check.svg.js";import{Button as o}from"../button/Button.js";import{SubscriptionPlanStyled as r}from"./SubscriptionPlanStyled.js";import{Caption as n,TitleRegular as l,BodyCaption as a,TitleMedium as c,BodyPrimary as d}from"../TypographyStyle.js";import{useCurrency as m}from"../../hooks/useCurreny.js";import{COLORS as h}from"../../constants/Theme.js";const p=p=>{const{formatCurrency:u}=m(),y=p.showMonthlyOptions?p.features:p.annualFeatures||[],b=p.showMonthlyOptions?p.monthlyPlan:p.yearlyPlan,f=!p.isDisabled&&p.isMostPopular,g=e=>0==e?"$0":u(e,"USD");return e(r,{isManifestPlan:!0,isSelected:p.isSelected||!1,style:{marginTop:f?0:24},children:[f&&t("div",{className:"most-popular",children:t(n,{className:"text",children:"Most popular ⭐️"})}),e("div",{className:`box ${p.isSelected?"selected":""} ${p.isDisabled?"disabled":""} ${f?"":"rounded-corners"}\n\t\t\t\t`,children:[e("div",{children:[t(l,{style:{color:h.content.secondary,marginBottom:4},children:p.planName}),(null==p?void 0:p.hidePriceBlock)?t(i,{}):e("div",{className:"price-block",children:[p.oldPrice?t(a,{className:"old--price",children:g(b.price)}):t(i,{}),t(c,{style:{color:h.content.primary},children:p.oldPrice?g(p.oldPrice):g(b.price)}),t(d,{style:{color:h.content.secondary,marginLeft:4},children:p.hideMonthYearTag?"":"/ "+(p.showMonthlyOptions?"month":"year")})]}),e("div",{className:"per-message-price",children:[p.planDescription&&t(a,{style:{color:h.content.secondary},children:p.planDescription}),p.planDescriptionDiscount&&t(a,{style:{color:h.background.positive.vibrant,marginLeft:4},children:p.planDescriptionDiscount})]}),p.showTrialOptions&&e(n,{className:"trial "+(p.isSelected?"selected":""),children:["7 day free trial with ",p.freeTrialMessages," messages"]}),p.extraBlockMessage&&t(n,{className:"trial "+(p.isSelected?"selected":""),children:p.extraBlockMessage}),t("div",{className:"features",children:y.map(((i,o)=>e("div",{className:"feature",children:[t("div",{children:t(s,{height:12,width:12,color:h.content.primary})}),t(a,{className:"feature-text",children:i.detail},o)]},i.detail)))})]}),t("div",{className:"button-box",children:p.isLoading?t(o,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(i,{children:[p.isSelected&&t(o,{disabled:p.isDisabled,LeadingIcon:s,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:p.buttonText||"Selected Plan"}),!p.isSelected&&!p.isDisabled&&t(o,{buttonType:"primary",size:"medium",onClick:()=>p.onPlanSelect(p.code),matchParentWidth:!0,buttonText:p.buttonText||"Choose plan"})]})})]}),p.bottomDescription&&t("div",{className:`plan-bottom-information\n\t\t\t\t\t${p.isDisabled?"disabled":""}\n\t\t\t\t\t${p.isSelected?"selected":""}\n\t\t\t\t`,children:t(n,{className:"text",style:{color:h.background.inverse},children:p.bottomDescription})})]})};export{p as SubscriptionPlan};
1
+ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import s from"../../assets/icons/check.svg.js";import{Button as o}from"../button/Button.js";import{SubscriptionPlanStyled as r}from"./SubscriptionPlanStyled.js";import{Caption as n,TitleRegular as l,BodyCaption as a,TitleMedium as c,BodyPrimary as d}from"../TypographyStyle.js";import{useCurrency as m}from"../../hooks/useCurreny.js";import{COLORS as h}from"../../constants/Theme.js";const p=p=>{const{formatCurrency:u}=m(),y=p.showMonthlyOptions?p.features:p.annualFeatures||[],b=p.showMonthlyOptions?p.monthlyPlan:p.yearlyPlan,f=!p.isDisabled&&p.isMostPopular,g=e=>0==e?"$0":u(e,"USD");return e(r,{isManifestPlan:!0,isSelected:p.isSelected||!1,style:{marginTop:f?0:24},children:[f&&t("div",{className:"most-popular",children:t(n,{className:"text",children:"Most popular ⭐️"})}),e("div",{className:`box ${p.isSelected?"selected":""} ${p.isDisabled?"disabled":""} ${f?"":"rounded-corners"}\n\t\t\t\t`,children:[e("div",{children:[t(l,{style:{color:h.content.secondary,marginBottom:4},children:p.planName}),(null==p?void 0:p.hidePriceBlock)?t(i,{}):e("div",{className:"price-block",children:[p.oldPrice?t(a,{className:"old--price",children:g(b.price)}):t(i,{}),t(c,{style:{color:h.content.primary},children:p.oldPrice?g(p.oldPrice):g(b.price)}),t(d,{style:{color:h.content.secondary,marginLeft:4},children:p.hideMonthYearTag?"":"/ "+(p.showMonthlyOptions?"month":"year")})]}),e("div",{className:"per-message-price",children:[p.planDescription&&t(a,{style:{color:h.content.secondary},children:p.planDescription}),p.planDescriptionDiscount&&t(a,{style:{color:h.background.positive.vibrant,marginLeft:4},children:p.planDescriptionDiscount})]}),p.showTrialOptions&&e(n,{className:"trial "+(p.isSelected?"selected":""),children:["7 day free trial with ",p.freeTrialMessages," messages"]}),p.extraBlockMessage&&t(n,{className:"trial "+(p.isSelected?"selected":""),children:p.extraBlockMessage}),t("div",{className:"features",children:y.map((i,o)=>e("div",{className:"feature",children:[t("div",{children:t(s,{height:12,width:12,color:h.content.primary})}),t(a,{className:"feature-text",children:i.detail},o)]},i.detail))})]}),t("div",{className:"button-box",children:p.isLoading?t(o,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(i,{children:[p.isSelected&&t(o,{disabled:p.isDisabled,LeadingIcon:s,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:p.buttonText||"Selected Plan"}),!p.isSelected&&!p.isDisabled&&t(o,{buttonType:"primary",size:"medium",onClick:()=>p.onPlanSelect(p.code),matchParentWidth:!0,buttonText:p.buttonText||"Choose plan"})]})})]}),p.bottomDescription&&t("div",{className:`plan-bottom-information\n\t\t\t\t\t${p.isDisabled?"disabled":""}\n\t\t\t\t\t${p.isSelected?"selected":""}\n\t\t\t\t`,children:t(n,{className:"text",style:{color:h.background.inverse},children:p.bottomDescription})})]})};export{p as SubscriptionPlan};
@@ -98,4 +98,4 @@ import{useState as e,createElement as o}from"react";import{jsxs as n,jsx as i,Fr
98
98
  justify-content: flex-start;
99
99
  gap: 8px;
100
100
  }
101
- `,w=[{key:"Monthly",title:"Monthly"},{key:"yearly",title:"Yearly"}],k=p=>{var k,P,C,j,I,T,N,M,A,S,L,O,$,B;const[D,W]=e(null===(k=p.discountInputProperties)||void 0===k?void 0:k.defaultValue),E=p.staticWidthMultiplier?p.staticWidthMultiplier:275;return n(l,{centralContainerStyles:{width:p.plans.length*E},open:!0,closeOnOutsideClick:!0,onClose:p.onClose,children:[n(y,{children:[n("div",{children:[i(h,{children:p.header||"Select a plan to proceed"}),i(v,{className:"sub--header",children:p.subHeader||""})]}),p.showMonthlyTabs?i(m,{tabs:p.tabProperties&&p.tabProperties.tabs?p.tabProperties.tabs:w,onTabSelected:e=>{var o,n;return(null===(o=p.tabProperties)||void 0===o?void 0:o.onTabSelected)?null===(n=p.tabProperties)||void 0===n?void 0:n.onTabSelected(e):""},isSquared:!0}):i(t,{})]}),p.warningDescription&&i(b,{children:p.warningDescription}),i(x,{children:p.plans.map((e=>o(a,Object.assign({},e,{showMonthly:!0,showMonthlyOptions:p.showMonthlyOptions||!1,showTrialOptions:p.showTrialOptions||!1,onPlanSelect:p.onPlanSelect,key:e.planName}))))}),(p.showCouponApplicationCode||p.showBookAdemo)&&n(f,{children:[i("div",{children:p.showCouponApplicationCode&&n("div",{className:"coupon-code",children:[n("div",{className:"coupon-input",children:[i(v,{style:{color:(null===(P=p.discountInputProperties)||void 0===P?void 0:P.errorMessage)?c.content.negative:""},children:"Apply coupon code"}),n("div",{className:"button--wrapper",children:[n("div",{className:(null===(C=p.discountInputProperties)||void 0===C?void 0:C.errorMessage)?"error--border dotted--border":"dotted--border",children:[i("input",{className:"input--class",onChange:e=>{var o;W(e.target.value),null===(o=p.discountInputProperties)||void 0===o||o.onChangeText(e.target.value)},value:D,placeholder:"eg:PLAN20",disabled:null===(j=p.discountInputProperties)||void 0===j?void 0:j.isLoading}),(null===(I=p.discountInputProperties)||void 0===I?void 0:I.successText)&&n("div",{className:"success--inside--chip",children:[i(r,{height:16,width:16,color:c.content.primaryInverse}),i(g,{style:{color:c.content.primaryInverse},children:"Coupon applied"})]})]}),!(null===(T=p.discountInputProperties)||void 0===T?void 0:T.successText)&&i(u,{buttonText:"Apply",buttonType:"primary",onClick:null===(N=null==p?void 0:p.discountInputProperties)||void 0===N?void 0:N.onCouponApply,isLoading:null===(M=p.discountInputProperties)||void 0===M?void 0:M.isLoading})]}),(null===(A=p.discountInputProperties)||void 0===A?void 0:A.errorMessage)&&n("div",{className:"d-flex",style:{gap:8},children:[i(s,{height:16,width:16,color:c.content.negative}),i(g,{style:{color:c.content.negative},children:null!==(L=null===(S=p.discountInputProperties)||void 0===S?void 0:S.errorMessage)&&void 0!==L?L:"Enter a valid code"})]}),(null===(O=p.discountInputProperties)||void 0===O?void 0:O.showRemoveCoupon)&&i("div",{className:"demo--input",onClick:()=>{var e,o;W(""),(null===(e=p.discountInputProperties)||void 0===e?void 0:e.removeCoupon)&&(null===(o=p.discountInputProperties)||void 0===o||o.removeCoupon())},children:"Remove coupon"})]}),(null===($=p.discountInputProperties)||void 0===$?void 0:$.successText)&&i("div",{className:"coupon--success--chip",children:i(g,{style:{color:"#00580E",maxWidth:180},children:null===(B=p.discountInputProperties)||void 0===B?void 0:B.successText})})]})}),p.showBookAdemo&&n("div",{className:"demo--wrapper",children:[i("div",{className:"demo--phone",children:i(d,{height:16,width:16,color:c.background.brand})}),i(v,{className:"demo--input",onClick:()=>p.demoLink?window.open(p.demoLink,"_blank"):p.onClickingBookADemo?p.onClickingBookADemo():"",children:"Book a demo with the team"})]})]})]})};export{f as BottomWrapper,y as HeaderWrapper,k as SubscriptionPlanSelector,w as defaultTabs};
101
+ `,w=[{key:"Monthly",title:"Monthly"},{key:"yearly",title:"Yearly"}],k=p=>{var k,P,C,j,I,T,N,M,A,S,L,O,$,B;const[D,W]=e(null===(k=p.discountInputProperties)||void 0===k?void 0:k.defaultValue),E=p.staticWidthMultiplier?p.staticWidthMultiplier:275;return n(l,{centralContainerStyles:{width:p.plans.length*E},open:!0,closeOnOutsideClick:!0,onClose:p.onClose,children:[n(y,{children:[n("div",{children:[i(h,{children:p.header||"Select a plan to proceed"}),i(v,{className:"sub--header",children:p.subHeader||""})]}),p.showMonthlyTabs?i(m,{tabs:p.tabProperties&&p.tabProperties.tabs?p.tabProperties.tabs:w,onTabSelected:e=>{var o,n;return(null===(o=p.tabProperties)||void 0===o?void 0:o.onTabSelected)?null===(n=p.tabProperties)||void 0===n?void 0:n.onTabSelected(e):""},isSquared:!0}):i(t,{})]}),p.warningDescription&&i(b,{children:p.warningDescription}),i(x,{children:p.plans.map(e=>o(a,Object.assign({},e,{showMonthly:!0,showMonthlyOptions:p.showMonthlyOptions||!1,showTrialOptions:p.showTrialOptions||!1,onPlanSelect:p.onPlanSelect,key:e.planName})))}),(p.showCouponApplicationCode||p.showBookAdemo)&&n(f,{children:[i("div",{children:p.showCouponApplicationCode&&n("div",{className:"coupon-code",children:[n("div",{className:"coupon-input",children:[i(v,{style:{color:(null===(P=p.discountInputProperties)||void 0===P?void 0:P.errorMessage)?c.content.negative:""},children:"Apply coupon code"}),n("div",{className:"button--wrapper",children:[n("div",{className:(null===(C=p.discountInputProperties)||void 0===C?void 0:C.errorMessage)?"error--border dotted--border":"dotted--border",children:[i("input",{className:"input--class",onChange:e=>{var o;W(e.target.value),null===(o=p.discountInputProperties)||void 0===o||o.onChangeText(e.target.value)},value:D,placeholder:"eg:PLAN20",disabled:null===(j=p.discountInputProperties)||void 0===j?void 0:j.isLoading}),(null===(I=p.discountInputProperties)||void 0===I?void 0:I.successText)&&n("div",{className:"success--inside--chip",children:[i(r,{height:16,width:16,color:c.content.primaryInverse}),i(g,{style:{color:c.content.primaryInverse},children:"Coupon applied"})]})]}),!(null===(T=p.discountInputProperties)||void 0===T?void 0:T.successText)&&i(u,{buttonText:"Apply",buttonType:"primary",onClick:null===(N=null==p?void 0:p.discountInputProperties)||void 0===N?void 0:N.onCouponApply,isLoading:null===(M=p.discountInputProperties)||void 0===M?void 0:M.isLoading})]}),(null===(A=p.discountInputProperties)||void 0===A?void 0:A.errorMessage)&&n("div",{className:"d-flex",style:{gap:8},children:[i(s,{height:16,width:16,color:c.content.negative}),i(g,{style:{color:c.content.negative},children:null!==(L=null===(S=p.discountInputProperties)||void 0===S?void 0:S.errorMessage)&&void 0!==L?L:"Enter a valid code"})]}),(null===(O=p.discountInputProperties)||void 0===O?void 0:O.showRemoveCoupon)&&i("div",{className:"demo--input",onClick:()=>{var e,o;W(""),(null===(e=p.discountInputProperties)||void 0===e?void 0:e.removeCoupon)&&(null===(o=p.discountInputProperties)||void 0===o||o.removeCoupon())},children:"Remove coupon"})]}),(null===($=p.discountInputProperties)||void 0===$?void 0:$.successText)&&i("div",{className:"coupon--success--chip",children:i(g,{style:{color:"#00580E",maxWidth:180},children:null===(B=p.discountInputProperties)||void 0===B?void 0:B.successText})})]})}),p.showBookAdemo&&n("div",{className:"demo--wrapper",children:[i("div",{className:"demo--phone",children:i(d,{height:16,width:16,color:c.background.brand})}),i(v,{className:"demo--input",onClick:()=>p.demoLink?window.open(p.demoLink,"_blank"):p.onClickingBookADemo?p.onClickingBookADemo():"",children:"Book a demo with the team"})]})]})]})};export{f as BottomWrapper,y as HeaderWrapper,k as SubscriptionPlanSelector,w as defaultTabs};
@@ -16,4 +16,4 @@ import{jsx as t}from"react/jsx-runtime";import{useState as e,createElement as l}
16
16
  &::-webkit-scrollbar-thumb:horizontal {
17
17
  width: 8px;
18
18
  }
19
- `,n=i=>{var n;const[a,s]=e(null!==(n=i.selectedPlan)&&void 0!==n?n:"");return t(r,{style:{padding:"28px 0px 5px 0px"},maxWidth:i.maxWidth,children:i.plans.map(((e,r)=>{var n,d,h;return t("div",{style:{minWidth:null!==(n=i.staticWidth)&&void 0!==n?n:280,maxWidth:null!==(d=i.staticWidth)&&void 0!==d?d:280},children:l(o,Object.assign({},e,{showMonthly:!0,showMonthlyOptions:null!==(h="monthly"==i.selectedTab)&&void 0!==h&&h,showTrialOptions:i.showTrialOptions||!1,onPlanSelect:t=>{i.onPlanSelect(t),s(t)},key:e.planName,isPlanSelected:a==("monthly"==i.selectedTab?e.code:e.yearlyCode),onClickShowAllFeatures:i.onClickShowAllFeatures,showSelectedPlanChip:i.currentPlan==("monthly"==i.selectedTab?e.code:e.yearlyCode),minHeightOfFeatures:i.minHeightOfFeatures}))},r)}))})};export{n as SubscriptionPlansCollected};
19
+ `,n=i=>{var n;const[a,s]=e(null!==(n=i.selectedPlan)&&void 0!==n?n:"");return t(r,{style:{padding:"28px 0px 5px 0px"},maxWidth:i.maxWidth,children:i.plans.map((e,r)=>{var n,d,h;return t("div",{style:{minWidth:null!==(n=i.staticWidth)&&void 0!==n?n:280,maxWidth:null!==(d=i.staticWidth)&&void 0!==d?d:280},children:l(o,Object.assign({},e,{showMonthly:!0,showMonthlyOptions:null!==(h="monthly"==i.selectedTab)&&void 0!==h&&h,showTrialOptions:i.showTrialOptions||!1,onPlanSelect:t=>{i.onPlanSelect(t),s(t)},key:e.planName,isPlanSelected:a==("monthly"==i.selectedTab?e.code:e.yearlyCode),onClickShowAllFeatures:i.onClickShowAllFeatures,showSelectedPlanChip:i.currentPlan==("monthly"==i.selectedTab?e.code:e.yearlyCode),minHeightOfFeatures:i.minHeightOfFeatures}))},r)})})};export{n as SubscriptionPlansCollected};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as r,useRef as n,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as u}from"../TypographyStyle.js";import{unCamelCase as g}from"../../utils/unCamelCase.js";import{PRIMARY as w}from"../../constants/colors.js";import{COLORS as v}from"../../constants/Theme.js";import f from"../../assets/icons/instagram.svg.js";import C from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as j}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/utils/calcPercentage.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.js";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as D}from"../modals/styledModal.js";import{BikShimmer as T}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as S}from"../shimmer-image/ShimmerImage.js";import{StateComponent as k,StateInterface as x}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var b,B;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(b||(b={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(B||(B={}));const I=[{label:"Today",value:"today",key:B.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:B["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:B["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:B.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],P=B=>{var P,V;const[L,G]=r(null!==(P=B.previouslySelected)&&void 0!==P?P:[]),[_,O]=r(""),[E,N]=r(!1),[R,$]=r(B.media),[M,A]=r(!1),[F,H]=r(!1),[U,z]=r(!1),Y=n(null);o((()=>{B.media.length||(N(!0),setTimeout((()=>{N(!1)}),2e3)),G(B.selected||[])}),[]),o((()=>{B.media.length>0&&($(B.media),N(!1))}),[null===(V=null==B?void 0:B.media)||void 0===V?void 0:V.length]),o((()=>{L.length>0&&O("")}),[L.length]),o((()=>{M&&($(B.media),H(!1))}),[M]),o((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||z(!U)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e("div",{ref:Y,children:t(D,{zIndex:201,open:B.showModal,headingTitle:B.title,onClose:B.onClose,centralContainerStyles:{width:1071,height:B.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${g(B.mediaType)}`,onClick:()=>{L.length?B.onSelect(L):O(`Please select a ${B.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>B.onClose()},footerLeftCustomElement:_?e(d,{tagText:_,type:"negative",LeadingIcon:C}):L.length?t(u,{children:[L.length," selected"]}):null,id:"post-picker",children:[B.showFilter&&t("div",{style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[e(j,{options:I,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,r=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,r=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],r=e.typeValue[1]);const n=B.media.filter((e=>function(e,t,a){const i=new Date(e),r=new Date(t),n=new Date(a);return i>=r&&i<=n}(e.timestamp,i,r)));$(n),H(!0),A(!1)},closeDropdown:U}),F&&e(c,{color:v.content.secondary,onClick:()=>A(!0),style:{cursor:"pointer"},children:"Clear"})]}),E?e("div",{style:{padding:"0 24px"},children:e(T,{boxes:[{width:(B.mediaType==b.POST?148:104)+"px",height:(B.mediaType==b.POST?148:172)+"px"}]})}):e(a,{children:R&&R.length?e(s,{mediaType:B.mediaType,children:R.map((a=>{return t(l,{mediaType:B.mediaType,className:""+(i=a,r=L,r.some((e=>e.id===i.id))?"selected":""),onClick:()=>{return e=a,void G((()=>L.find((t=>t.id===e.id))?L.filter((t=>t.id!==e.id)):!B.limit||L.length<B.limit?[...L,e]:(O(`Only ${B.limit} ${B.mediaType}s can be selected`),L)));var e},children:[e(S,{imageUrl:a.imageUrl,width:B.mediaType==b.POST?148:104,height:B.mediaType==b.POST?148:172,alt:a.overlayCaption}),t("div",{className:"overlay",children:[e("a",{target:"_blank",rel:"noreferrer",href:a.redirectionUrl,children:t("div",{className:"overlay__redirection",children:[e(f,{height:22,width:22}),e(p,{color:w,style:{fontWeight:500},children:"View"})]})}),e("div",{className:"overlay__caption",children:e(m,{color:v.content.placeholder,children:a.overlayCaption})})]})]},a.id);var i,r}))}):e("div",{style:{justifyContent:"center",alignItems:"center",display:"flex",height:422},children:B.media.length?R.length?e(a,{}):t("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${v.background.inverse}`,borderRadius:"50%"},children:e(i,{color:v.content.primaryInverse})}),t("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"},children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]}),e("div",{onClick:()=>{A(!0)},style:{cursor:"pointer"},children:e(y,{color:`${v.content.brand}`,children:"Clear Filter"})})]}):e(k,{states:x.WARNING,heading:`No ${B.mediaType}s on your account`,subline:`There seems to be no ${B.mediaType}s on your account`,isButtonEnabled:!1,width:400})})})]})})};export{B as DateKeys,b as MEDIA_TYPES,P as PostPicker,I as dateOptions};
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as r,useRef as n,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as u}from"../TypographyStyle.js";import{unCamelCase as g}from"../../utils/unCamelCase.js";import{PRIMARY as w}from"../../constants/colors.js";import{COLORS as v}from"../../constants/Theme.js";import f from"../../assets/icons/instagram.svg.js";import C from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as j}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/utils/calcPercentage.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.js";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as D}from"../modals/styledModal.js";import{BikShimmer as T}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as S}from"../shimmer-image/ShimmerImage.js";import{StateComponent as k,StateInterface as x}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var b,B;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(b||(b={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(B||(B={}));const I=[{label:"Today",value:"today",key:B.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:B["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:B["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:B.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],P=B=>{var P,V;const[L,G]=r(null!==(P=B.previouslySelected)&&void 0!==P?P:[]),[_,O]=r(""),[E,N]=r(!1),[R,$]=r(B.media),[M,A]=r(!1),[F,H]=r(!1),[U,z]=r(!1),Y=n(null);o(()=>{B.media.length||(N(!0),setTimeout(()=>{N(!1)},2e3)),G(B.selected||[])},[]),o(()=>{B.media.length>0&&($(B.media),N(!1))},[null===(V=null==B?void 0:B.media)||void 0===V?void 0:V.length]),o(()=>{L.length>0&&O("")},[L.length]),o(()=>{M&&($(B.media),H(!1))},[M]),o(()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||z(!U)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}});return e("div",{ref:Y,children:t(D,{zIndex:201,open:B.showModal,headingTitle:B.title,onClose:B.onClose,centralContainerStyles:{width:1071,height:B.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${g(B.mediaType)}`,onClick:()=>{L.length?B.onSelect(L):O(`Please select a ${B.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>B.onClose()},footerLeftCustomElement:_?e(d,{tagText:_,type:"negative",LeadingIcon:C}):L.length?t(u,{children:[L.length," selected"]}):null,id:"post-picker",children:[B.showFilter&&t("div",{style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[e(j,{options:I,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,r=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,r=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],r=e.typeValue[1]);const n=B.media.filter(e=>function(e,t,a){const i=new Date(e),r=new Date(t),n=new Date(a);return i>=r&&i<=n}(e.timestamp,i,r));$(n),H(!0),A(!1)},closeDropdown:U}),F&&e(c,{color:v.content.secondary,onClick:()=>A(!0),style:{cursor:"pointer"},children:"Clear"})]}),E?e("div",{style:{padding:"0 24px"},children:e(T,{boxes:[{width:(B.mediaType==b.POST?148:104)+"px",height:(B.mediaType==b.POST?148:172)+"px"}]})}):e(a,{children:R&&R.length?e(s,{mediaType:B.mediaType,children:R.map(a=>{return t(l,{mediaType:B.mediaType,className:""+(i=a,r=L,r.some(e=>e.id===i.id)?"selected":""),onClick:()=>{return e=a,void G(()=>L.find(t=>t.id===e.id)?L.filter(t=>t.id!==e.id):!B.limit||L.length<B.limit?[...L,e]:(O(`Only ${B.limit} ${B.mediaType}s can be selected`),L));var e},children:[e(S,{imageUrl:a.imageUrl,width:B.mediaType==b.POST?148:104,height:B.mediaType==b.POST?148:172,alt:a.overlayCaption}),t("div",{className:"overlay",children:[e("a",{target:"_blank",rel:"noreferrer",href:a.redirectionUrl,children:t("div",{className:"overlay__redirection",children:[e(f,{height:22,width:22}),e(p,{color:w,style:{fontWeight:500},children:"View"})]})}),e("div",{className:"overlay__caption",children:e(m,{color:v.content.placeholder,children:a.overlayCaption})})]})]},a.id);var i,r})}):e("div",{style:{justifyContent:"center",alignItems:"center",display:"flex",height:422},children:B.media.length?R.length?e(a,{}):t("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${v.background.inverse}`,borderRadius:"50%"},children:e(i,{color:v.content.primaryInverse})}),t("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"},children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]}),e("div",{onClick:()=>{A(!0)},style:{cursor:"pointer"},children:e(y,{color:`${v.content.brand}`,children:"Clear Filter"})})]}):e(k,{states:x.WARNING,heading:`No ${B.mediaType}s on your account`,subline:`There seems to be no ${B.mediaType}s on your account`,isButtonEnabled:!1,width:400})})})]})})};export{B as DateKeys,b as MEDIA_TYPES,P as PostPicker,I as dateOptions};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../node_modules/lodash.debounce/index.js";import{useState as r,useCallback as s,useEffect as l}from"react";import{PageLoader as n}from"../bik-layout/PageLoader.js";import{CheckBox as c}from"../checkBox/CheckBox.js";import{Input as i}from"../input/Input.js";import{StyledModal as d}from"../modals/styledModal.js";import{StyledProductPickerContainer as a,StyledZeroState as p}from"./ProductPicker.styled.js";import{BodyPrimary as m,Caption as h,TitleSmall as u,BodySecondary as g}from"../TypographyStyle.js";import v from"../../utils/DateUtils.js";import{DEFAULT_THEME as f}from"../../constants/Theme.js";import y from"../../assets/icons/alert_triangle.svg.js";import P from"../../assets/icons/search.svg.js";const x="https://jkfenner.com/wp-content/uploads/2019/11/default.jpg",_=t=>{let{text:r,styleProps:s}=t;return e(p,{children:[o("div",{className:"icon__container",style:Object.assign({},s),children:o(y,{width:24,height:24,color:f.colorsV2.content.secondary})}),o(u,{children:"No results found"}),o(g,{style:{color:f.colorsV2.content.secondary,textAlign:"center"},children:`Sorry we could not find any results for "${r}"`})]})},j=l=>{var d,p,g,y;const j=l.instaPost?v.dateFormat(new Date(l.instaPost.timestamp),"•",!0):"",[w,C]=r(l.products),[S,b]=r(!1),[N,V]=r(""),k=s(t((e=>{e?(C([]),l.onSearchKeyChange(e).then((e=>{C(e),b(!1)}))):(C(l.products),b(!1))}),700),[]);return e(a,{children:[l.instaPost&&e("div",{className:"post__wrapper",children:[o("img",{alt:"Ig Media",onError:e=>{e.target.onerror=null,e.target.src=x},src:null===(d=l.instaPost)||void 0===d?void 0:d.media_url,className:"post__thumbnail"}),e("div",{className:"post__info-wrapper",children:[o(m,{style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",color:l.instaPost.caption?f.colorsV2.content.primary:f.colorsV2.content.secondary},children:(null===(p=l.instaPost)||void 0===p?void 0:p.caption)?null===(g=l.instaPost)||void 0===g?void 0:g.caption:"No caption"}),o(h,{style:{color:f.colorsV2.content.placeholder},children:j})]})]}),o("div",{style:{borderTop:l.instaPost?`1px solid ${f.colorsV2.stroke.primary}`:"none",borderBottom:`1px solid ${f.colorsV2.stroke.primary}`,padding:l.instaPost?"16px 24px":"0px 24px 16px 24px"},children:o(i,{placeholder:null!==(y=l.searchPlaceholder)&&void 0!==y?y:"Search products..",onChangeText:e=>{var o;V(e),(null===(o=e.trim())||void 0===o?void 0:o.length)>0?(b(!0),k(e)):(b(!1),C(l.products))},rightIcon:{icon:P}})}),e("div",{style:{maxHeight:350,overflowY:"scroll"},children:[S&&o("div",{className:"loader__wrapper",children:o(n,{})}),0!==w.length||S?w.map((t=>{var r;const s=l.selectedProducts.find((e=>e.id===t.id));return e("div",{className:"product__wrapper",children:[e("div",{className:"product__info-wrapper",children:[o("img",{alt:"Product",onError:e=>{e.target.onerror=null,e.target.src=x},src:null!==(r=t.image)&&void 0!==r?r:x,className:"product__image"}),o(u,{children:t.name})]}),o("div",{style:{order:1},children:o(c,{isChecked:void 0!==s,onValueChange:e=>{((e,o)=>{const t=l.selectedProducts.find((e=>e.id===o.id));if(e&&!t){const e=[...l.selectedProducts,o];l.setSelectedProducts(e)}else if(t){const e=[...l.selectedProducts];let t=-1;l.selectedProducts.forEach(((e,r)=>{e.id===o.id&&(t=r)})),e.splice(t,1),l.setSelectedProducts(e)}})(e,t)}})})]},t.id)})):o(_,{text:N})]})]})},w=e=>{var t;const[s,n]=r([]);return l((()=>{var o;n(null!==(o=e.selectedProducts)&&void 0!==o?o:[])}),[null===(t=e.selectedProducts)||void 0===t?void 0:t.length]),o(d,{open:e.show,onClose:()=>{e.onClose()},footerLeftCustomElement:s.length>10?o(h,{style:{color:f.colorsV2.content.negative},children:"Can't add more than 10 products"}):o(h,{style:{color:f.colorsV2.content.placeholder},children:s?`${s.length} selected`:""}),headingTitle:e.title,primaryButton:{disabled:s.length>10||0===s.length,buttonType:"primary",buttonText:"Select",size:"small",onClick:()=>{e.setSelectedProducts(s),e.onClose()}},secondaryButton:e.secondaryButtonProps,footerShadow:!0,children:o(j,Object.assign({},e,{selectedProducts:s,setSelectedProducts:n}))})};export{w as PricePleaseProductPicker,j as ProductPickerContent};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../node_modules/lodash.debounce/index.js";import{useState as r,useCallback as s,useEffect as l}from"react";import{PageLoader as n}from"../bik-layout/PageLoader.js";import{CheckBox as c}from"../checkBox/CheckBox.js";import{Input as i}from"../input/Input.js";import{StyledModal as d}from"../modals/styledModal.js";import{StyledProductPickerContainer as a,StyledZeroState as p}from"./ProductPicker.styled.js";import{BodyPrimary as m,Caption as h,TitleSmall as u,BodySecondary as g}from"../TypographyStyle.js";import v from"../../utils/DateUtils.js";import{DEFAULT_THEME as f}from"../../constants/Theme.js";import y from"../../assets/icons/alert_triangle.svg.js";import P from"../../assets/icons/search.svg.js";const x="https://jkfenner.com/wp-content/uploads/2019/11/default.jpg",_=({text:t,styleProps:r})=>e(p,{children:[o("div",{className:"icon__container",style:Object.assign({},r),children:o(y,{width:24,height:24,color:f.colorsV2.content.secondary})}),o(u,{children:"No results found"}),o(g,{style:{color:f.colorsV2.content.secondary,textAlign:"center"},children:`Sorry we could not find any results for "${t}"`})]}),j=l=>{var d,p,g,y;const j=l.instaPost?v.dateFormat(new Date(l.instaPost.timestamp),"•",!0):"",[w,C]=r(l.products),[S,b]=r(!1),[N,V]=r(""),k=s(t(e=>{e?(C([]),l.onSearchKeyChange(e).then(e=>{C(e),b(!1)})):(C(l.products),b(!1))},700),[]);return e(a,{children:[l.instaPost&&e("div",{className:"post__wrapper",children:[o("img",{alt:"Ig Media",onError:e=>{e.target.onerror=null,e.target.src=x},src:null===(d=l.instaPost)||void 0===d?void 0:d.media_url,className:"post__thumbnail"}),e("div",{className:"post__info-wrapper",children:[o(m,{style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",color:l.instaPost.caption?f.colorsV2.content.primary:f.colorsV2.content.secondary},children:(null===(p=l.instaPost)||void 0===p?void 0:p.caption)?null===(g=l.instaPost)||void 0===g?void 0:g.caption:"No caption"}),o(h,{style:{color:f.colorsV2.content.placeholder},children:j})]})]}),o("div",{style:{borderTop:l.instaPost?`1px solid ${f.colorsV2.stroke.primary}`:"none",borderBottom:`1px solid ${f.colorsV2.stroke.primary}`,padding:l.instaPost?"16px 24px":"0px 24px 16px 24px"},children:o(i,{placeholder:null!==(y=l.searchPlaceholder)&&void 0!==y?y:"Search products..",onChangeText:e=>{var o;V(e),(null===(o=e.trim())||void 0===o?void 0:o.length)>0?(b(!0),k(e)):(b(!1),C(l.products))},rightIcon:{icon:P}})}),e("div",{style:{maxHeight:350,overflowY:"scroll"},children:[S&&o("div",{className:"loader__wrapper",children:o(n,{})}),0!==w.length||S?w.map(t=>{var r;const s=l.selectedProducts.find(e=>e.id===t.id);return e("div",{className:"product__wrapper",children:[e("div",{className:"product__info-wrapper",children:[o("img",{alt:"Product",onError:e=>{e.target.onerror=null,e.target.src=x},src:null!==(r=t.image)&&void 0!==r?r:x,className:"product__image"}),o(u,{children:t.name})]}),o("div",{style:{order:1},children:o(c,{isChecked:void 0!==s,onValueChange:e=>{((e,o)=>{const t=l.selectedProducts.find(e=>e.id===o.id);if(e&&!t){const e=[...l.selectedProducts,o];l.setSelectedProducts(e)}else if(t){const e=[...l.selectedProducts];let t=-1;l.selectedProducts.forEach((e,r)=>{e.id===o.id&&(t=r)}),e.splice(t,1),l.setSelectedProducts(e)}})(e,t)}})})]},t.id)}):o(_,{text:N})]})]})},w=e=>{var t;const[s,n]=r([]);return l(()=>{var o;n(null!==(o=e.selectedProducts)&&void 0!==o?o:[])},[null===(t=e.selectedProducts)||void 0===t?void 0:t.length]),o(d,{open:e.show,onClose:()=>{e.onClose()},footerLeftCustomElement:s.length>10?o(h,{style:{color:f.colorsV2.content.negative},children:"Can't add more than 10 products"}):o(h,{style:{color:f.colorsV2.content.placeholder},children:s?`${s.length} selected`:""}),headingTitle:e.title,primaryButton:{disabled:s.length>10||0===s.length,buttonType:"primary",buttonText:"Select",size:"small",onClick:()=>{e.setSelectedProducts(s),e.onClose()}},secondaryButton:e.secondaryButtonProps,footerShadow:!0,children:o(j,Object.assign({},e,{selectedProducts:s,setSelectedProducts:n}))})};export{w as PricePleaseProductPicker,j as ProductPickerContent};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as m}from"react/jsx-runtime";import{BikShimmer as i}from"../shimmer/ShimmerComponent/BikShimmer.js";const o=o=>{const{limit:t}=o;return r(m,{children:Array.from({length:null!=t?t:5}).map(((m,o)=>r("div",{style:{borderBottom:"1px solid #E0E0E0"},children:r(i,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})},o)))})};export{o as ProductPickerShimmer};
1
+ import{jsx as r,Fragment as m}from"react/jsx-runtime";import{BikShimmer as i}from"../shimmer/ShimmerComponent/BikShimmer.js";const o=o=>{const{limit:t}=o;return r(m,{children:Array.from({length:null!=t?t:5}).map((m,o)=>r("div",{style:{borderBottom:"1px solid #E0E0E0"},children:r(i,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})},o))})};export{o as ProductPickerShimmer};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import i from"../../assets/icons/chevronRight.svg.js";import{useRef as l,useState as c,useEffect as n}from"react";import{CheckBox as r}from"../checkBox/CheckBox.js";import{IconButton as s}from"../icon-button/IconButton.js";import{Tag as d}from"../tag/Tag.js";import{Tooltip as a}from"../tooltips/Tooltip.js";import{TitleRegular as u,BodyPrimary as h}from"../TypographyStyle.js";import{EmptyState as p}from"./emptyState.js";import{ProductPickerShimmer as m}from"./ProductPickerShimmer.js";import{CollectionCardStyle as C,CollectionCardInfoStyle as v,CollectionCardDetailStyle as y,CollectionNameHolder as g}from"./style.js";import{isCollectionPartiallyChecked as f}from"./utility.js";const k=(e,t,o)=>{if(!e)return"";if(e.length<=t)return e;const i=e.slice(0,t-1);return(o?i.slice(0,i.lastIndexOf(" ")):i)+"..."},b=o=>{var i;const{customCollectionRestriction:r,dataLoading:s,collections:d,selectedCollectionsDispatch:a,setCollectionId:u,setSelectedCollectionId:h,selectedCollections:C,setScreen:v,collectionFetcher:y,collectionsDispatch:g,pagingControls:k,storeId:b,setSaveDisabled:I,hideCollectionCheckbox:O,renderWithoutModal:S,pickerType:T,scrollContainerRef:P,appType:x,limit:L,exactLimit:D}=o,R=l(k.curPage),E=!!r&&(null==C?void 0:C.isCustom),[N,w]=c(!1),B=l(!1),W=l(!1),H=()=>{if(!P||!(null==P?void 0:P.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:o}=P.current;e+t>=o-20&&!B.current&&!W.current&&(I(!0),w(!0),W.current=!0,I(!0),w(!0),y(R.current,b,x).then((e=>{g({type:"paged",data:(null==e?void 0:e.collections)||{}}),k.setCurPage(R.current+1),w(!1),I(!1),W.current=!1,Object.keys(null==e?void 0:e.collections).length||(B.current=!0)})).catch())};n((()=>{var e;return null===(e=null==P?void 0:P.current)||void 0===e||e.addEventListener("scroll",H),()=>{var e;null===(e=null==P?void 0:P.current)||void 0===e||e.removeEventListener("scroll",H)}}),[]),n((()=>{R.current=k.curPage}),[k.curPage]);const M=Object.keys(C||{}).filter((e=>"isCustom"!==e)).length;return e("div",{children:[(null===(i=Object.keys(null!=d?d:{}))||void 0===i?void 0:i.length)?Object.keys(d).map((e=>{var o,i;const l=!!(null==C?void 0:C[e])&&("PRODUCT"!==T||!!Object.keys(null!==(i=null===(o=null==C?void 0:C[e])||void 0===o?void 0:o.products)&&void 0!==i?i:{}).length),c="COLLECTION"===T&&!l&&(!!D&&M>=D||!!L&&M>=L);return t(j,{customCollectionRestriction:r,data:d[e],isDisabled:E&&!(null==C?void 0:C[e])||c,isChecked:l,isPartiallyChecked:f(e,null==d?void 0:d[e],C),selectedCollectionsDispatch:a,setCollectionId:u,setSelectedCollectionId:h,setScreen:v,id:e,hideCollectionCheckbox:O||"-1"===e,selectedCollections:C,renderWithoutModal:S,pickerType:T},e)})):s?t(m,{}):t(p,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),N&&t(m,{})]})},j=l=>{const{customCollectionRestriction:c,data:n,selectedCollectionsDispatch:p,setCollectionId:m,setSelectedCollectionId:f,isPartiallyChecked:k,setScreen:b,id:j,isChecked:I,isDisabled:O,hideCollectionCheckbox:S,pickerType:T,usedInSearch:P}=l;return n?e(C,{isDisabled:O,onClick:e=>{if(!O){if("COLLECTION"===T)return e.stopPropagation(),p({type:"reset",data:{}}),p({type:"selected",data:{id:j,val:n,isRestricted:c}}),m(j),void f(j);m(j),f(j),b("products")}},isActive:I,usedInSearch:null!=P&&P,children:[e(v,{children:[!S&&t(r,{isDisabled:O,isChecked:I,isPartiallyChecked:k,onValueChange:function(e,t,o){null==o||o.stopPropagation(),p(e?{type:"selected",data:{id:j,val:n,isRestricted:c}}:{type:"unselected",data:{id:j}}),f(e?j:"")}}),t(y,{children:t(a,{body:n.name,placement:"bottom",delay:400,variant:"light",children:e(g,{children:[t(P?h:u,{numberOfLines:1,children:n.name}),n.isSmartCollection?t("div",{style:{display:"flex"},children:t(d,{tagText:"Smart Collection",type:"warning"})}):t(o,{})]})})})]}),"COLLECTION"!==T&&t(s,{height:12,width:12,disabled:O,Icon:i})]}):t(o,{})};export{j as CollectionCard,b as CollectionsScreen,k as truncate};
1
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import i from"../../assets/icons/chevronRight.svg.js";import{useRef as l,useState as c,useEffect as n}from"react";import{CheckBox as r}from"../checkBox/CheckBox.js";import{IconButton as s}from"../icon-button/IconButton.js";import{Tag as d}from"../tag/Tag.js";import{Tooltip as a}from"../tooltips/Tooltip.js";import{TitleRegular as u,BodyPrimary as h}from"../TypographyStyle.js";import{EmptyState as p}from"./emptyState.js";import{ProductPickerShimmer as m}from"./ProductPickerShimmer.js";import{CollectionCardStyle as C,CollectionCardInfoStyle as v,CollectionCardDetailStyle as y,CollectionNameHolder as g}from"./style.js";import{isCollectionPartiallyChecked as f}from"./utility.js";const k=(e,t,o)=>{if(!e)return"";if(e.length<=t)return e;const i=e.slice(0,t-1);return(o?i.slice(0,i.lastIndexOf(" ")):i)+"..."},b=o=>{var i;const{customCollectionRestriction:r,dataLoading:s,collections:d,selectedCollectionsDispatch:a,setCollectionId:u,setSelectedCollectionId:h,selectedCollections:C,setScreen:v,collectionFetcher:y,collectionsDispatch:g,pagingControls:k,storeId:b,setSaveDisabled:I,hideCollectionCheckbox:O,renderWithoutModal:S,pickerType:T,scrollContainerRef:P,appType:x,limit:L,exactLimit:D}=o,R=l(k.curPage),E=!!r&&(null==C?void 0:C.isCustom),[N,w]=c(!1),B=l(!1),W=l(!1),H=()=>{if(!P||!(null==P?void 0:P.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:o}=P.current;e+t>=o-20&&!B.current&&!W.current&&(I(!0),w(!0),W.current=!0,I(!0),w(!0),y(R.current,b,x).then(e=>{g({type:"paged",data:(null==e?void 0:e.collections)||{}}),k.setCurPage(R.current+1),w(!1),I(!1),W.current=!1,Object.keys(null==e?void 0:e.collections).length||(B.current=!0)}).catch())};n(()=>{var e;return null===(e=null==P?void 0:P.current)||void 0===e||e.addEventListener("scroll",H),()=>{var e;null===(e=null==P?void 0:P.current)||void 0===e||e.removeEventListener("scroll",H)}},[]),n(()=>{R.current=k.curPage},[k.curPage]);const M=Object.keys(C||{}).filter(e=>"isCustom"!==e).length;return e("div",{children:[(null===(i=Object.keys(null!=d?d:{}))||void 0===i?void 0:i.length)?Object.keys(d).map(e=>{var o,i;const l=!!(null==C?void 0:C[e])&&("PRODUCT"!==T||!!Object.keys(null!==(i=null===(o=null==C?void 0:C[e])||void 0===o?void 0:o.products)&&void 0!==i?i:{}).length),c="COLLECTION"===T&&!l&&(!!D&&M>=D||!!L&&M>=L);return t(j,{customCollectionRestriction:r,data:d[e],isDisabled:E&&!(null==C?void 0:C[e])||c,isChecked:l,isPartiallyChecked:f(e,null==d?void 0:d[e],C),selectedCollectionsDispatch:a,setCollectionId:u,setSelectedCollectionId:h,setScreen:v,id:e,hideCollectionCheckbox:O||"-1"===e,selectedCollections:C,renderWithoutModal:S,pickerType:T},e)}):s?t(m,{}):t(p,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),N&&t(m,{})]})},j=l=>{const{customCollectionRestriction:c,data:n,selectedCollectionsDispatch:p,setCollectionId:m,setSelectedCollectionId:f,isPartiallyChecked:k,setScreen:b,id:j,isChecked:I,isDisabled:O,hideCollectionCheckbox:S,pickerType:T,usedInSearch:P}=l;return n?e(C,{isDisabled:O,onClick:e=>{if(!O){if("COLLECTION"===T)return e.stopPropagation(),p({type:"reset",data:{}}),p({type:"selected",data:{id:j,val:n,isRestricted:c}}),m(j),void f(j);m(j),f(j),b("products")}},isActive:I,usedInSearch:null!=P&&P,children:[e(v,{children:[!S&&t(r,{isDisabled:O,isChecked:I,isPartiallyChecked:k,onValueChange:function(e,t,o){null==o||o.stopPropagation(),p(e?{type:"selected",data:{id:j,val:n,isRestricted:c}}:{type:"unselected",data:{id:j}}),f(e?j:"")}}),t(y,{children:t(a,{body:n.name,placement:"bottom",delay:400,variant:"light",children:e(g,{children:[t(P?h:u,{numberOfLines:1,children:n.name}),n.isSmartCollection?t("div",{style:{display:"flex"},children:t(d,{tagText:"Smart Collection",type:"warning"})}):t(o,{})]})})})]}),"COLLECTION"!==T&&t(s,{height:12,width:12,disabled:O,Icon:i})]}):t(o,{})};export{j as CollectionCard,b as CollectionsScreen,k as truncate};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/box_round.svg.js";import r from"styled-components";import{COLORS as n}from"../../constants/Theme.js";import{TitleRegular as i,BodySecondary as s}from"../TypographyStyle.js";const c=r=>{let{title:c,subtitle:m}=r;return t(l,{children:[e(o,{width:48,height:48}),e(i,{style:{marginTop:8},children:c}),e(s,{style:{color:n.content.secondary,marginTop:4},children:m})]})},l=r.div`
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/box_round.svg.js";import r from"styled-components";import{COLORS as i}from"../../constants/Theme.js";import{TitleRegular as n,BodySecondary as s}from"../TypographyStyle.js";const c=({title:r,subtitle:c})=>t(m,{children:[e(o,{width:48,height:48}),e(n,{style:{marginTop:8},children:r}),e(s,{style:{color:i.content.secondary,marginTop:4},children:c})]}),m=r.div`
2
2
  height: 400px;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{OUT_OF_STOCK_ACTION as t}from"../type.js";const n={NORMAL:null,NOT_SYNCED:"Hidden",OUT_OF_STOCK:"Out of Stock",FB_REJECTED:"Rejected on FB catalog"};class l{static getProductLabels(l){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.NORMAL,u="NORMAL";if(l.variants)return n[u];const a=l;return"REJECTED"===(null==a?void 0:a.fbStatus)?n.FB_REJECTED:(i===t.HIDE&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),i===t.BLUR&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="OUT_OF_STOCK"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),i===t.NORMAL&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NORMAL"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),n[u])}}Object.defineProperty(l,"getTagType",{enumerable:!0,configurable:!0,writable:!0,value:t=>n.FB_REJECTED===t?"negative":"warning"}),Object.defineProperty(l,"getDataForProductPickerTag",{enumerable:!0,configurable:!0,writable:!0,value:(t,n,i)=>{var u,a;let e=t,o=n;1===Object.keys(null!==(u=null==t?void 0:t.variants)&&void 0!==u?u:{}).length&&(e=Object.values(null!==(a=null==t?void 0:t.variants)&&void 0!==a?a:{})[0],o=!0);const r=l.getProductLabels(e,i);return{isVariantForProductPickerTag:o,dataForProductPickerTag:e,tagText:null!=r?r:void 0,tagType:l.getTagType(null!=r?r:"")}}});const i=t=>{let n=[];Object.keys(t).forEach((l=>{var i;return Object.keys((null===(i=null==t?void 0:t[l])||void 0===i?void 0:i.products)||[]).forEach((i=>{var u,a;const e=null!==(u=t[l].products)&&void 0!==u?u:[],o=null!==(a=e[i].variants)&&void 0!==a?a:[];return Object.keys(o).map((t=>{const n=o[t];n.currency=e[i].currency,n.variantId=t,n.productId=i,n.collectionId=l,n.productName=e[i].name})),n=[...n,...Object.values(o)],n}))}));const l=n.sort(((t,n)=>null==t.displayOrder&&null==n.displayOrder?0:null==t.displayOrder?1:null==n.displayOrder?-1:t.displayOrder-n.displayOrder));return l.forEach(((t,n)=>{t.displayOrder=n})),l};export{l as ProductHelper,i as parseSelectedVariantsToArray};
1
+ import{OUT_OF_STOCK_ACTION as t}from"../type.js";const n={NORMAL:null,NOT_SYNCED:"Hidden",OUT_OF_STOCK:"Out of Stock",FB_REJECTED:"Rejected on FB catalog"};class l{static getProductLabels(l,i=t.NORMAL){let u="NORMAL";if(l.variants)return n[u];const a=l;return"REJECTED"===(null==a?void 0:a.fbStatus)?n.FB_REJECTED:(i===t.HIDE&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),i===t.BLUR&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="OUT_OF_STOCK"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),i===t.NORMAL&&(!a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NOT_SYNCED"),a.skipSync&&0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)&&(u="NOT_SYNCED"),a.skipSync||0!==(null==a?void 0:a.quantity)&&-2!==(null==a?void 0:a.quantity)||(u="NORMAL"),a.skipSync||0===(null==a?void 0:a.quantity)||-2===(null==a?void 0:a.quantity)||(u="NORMAL")),n[u])}}Object.defineProperty(l,"getTagType",{enumerable:!0,configurable:!0,writable:!0,value:t=>n.FB_REJECTED===t?"negative":"warning"}),Object.defineProperty(l,"getDataForProductPickerTag",{enumerable:!0,configurable:!0,writable:!0,value:(t,n,i)=>{var u,a;let e=t,r=n;1===Object.keys(null!==(u=null==t?void 0:t.variants)&&void 0!==u?u:{}).length&&(e=Object.values(null!==(a=null==t?void 0:t.variants)&&void 0!==a?a:{})[0],r=!0);const o=l.getProductLabels(e,i);return{isVariantForProductPickerTag:r,dataForProductPickerTag:e,tagText:null!=o?o:void 0,tagType:l.getTagType(null!=o?o:"")}}});const i=t=>{let n=[];Object.keys(t).forEach(l=>{var i;return Object.keys((null===(i=null==t?void 0:t[l])||void 0===i?void 0:i.products)||[]).forEach(i=>{var u,a;const e=null!==(u=t[l].products)&&void 0!==u?u:[],r=null!==(a=e[i].variants)&&void 0!==a?a:[];return Object.keys(r).map(t=>{const n=r[t];n.currency=e[i].currency,n.variantId=t,n.productId=i,n.collectionId=l,n.productName=e[i].name}),n=[...n,...Object.values(r)],n})});const l=n.sort((t,n)=>null==t.displayOrder&&null==n.displayOrder?0:null==t.displayOrder?1:null==n.displayOrder?-1:t.displayOrder-n.displayOrder);return l.forEach((t,n)=>{t.displayOrder=n}),l};export{l as ProductHelper,i as parseSelectedVariantsToArray};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{ApplicationType as c}from"@bikdotai/bik-models/growth/models/bik-store";import r from"../../assets/icons/search.svg.js";import{useReducer as i,useState as s,useRef as n,useEffect as l}from"react";import{COLORS as a}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as u}from"../button/Button.js";import{Input as h}from"../input/Input.js";import{StyledModal as p}from"../modals/styledModal.js";import{Spinner as m}from"../spinner/Spinner.js";import{Tag as C}from"../tag/Tag.js";import{CollectionsScreen as y}from"./collectionScreen.js";import{ProductInfoOverlay as g}from"./productInfoOverlay.js";import{ProductsScreen as f}from"./productScreen.js";import{RearrangeScreen as b}from"./rearrangeScreen.js";import{collectionsReducer as S,searchReducer as k,selectedColectionsReducer as v,CollectionIdContext as I}from"./reducers.js";import{SearchScreen as x}from"./searchScreen.js";import{SelectedScreen as j}from"./selectedScreen.js";import{ContainerStyle as P,ScrollContainerStyle as T,StyledFooterForNonModal as D}from"./style.js";import{OUT_OF_STOCK_ACTION as O,ScreenName as F}from"./type.js";import{updateAllVariantsForSelectedProducts as R}from"./utility.js";const w=w=>{const{storeId:L,selectedItems:A,onClose:E,visible:$,zIndex:B,exactLimit:z,limit:V,hideCollectionCheckbox:M,hideProductCheckbox:N,outOfStockAction:H=O.BLUR,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,hideSelectionCount:K,title:U,width:Y,left:q,renderWithoutModal:J,onClickSave:Q,pickerType:X,hideProductVariants:Z=!1,startupScreen:_=F.Collections,rearrangeEnabled:ee,selectSingleItem:te=!1,showProductDetails:oe,containerStyle:ce,crossButtonInsideHeader:re=!1,footerForNonModal:ie={},primaryButton:se,secondaryButton:ne,subtitle:le}=w,ae=w.appType||c.BIK,[de,ue]=i(S,{}),[he,pe]=s([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections),[me,Ce]=s("grid"),[ye,ge]=s(""),[fe,be]=s(""),[Se,ke]=s(0),[ve,Ie]=s(!1),[xe,je]=s(0),[Pe,Te]=s(""),[De,Oe]=s(!1),[Fe,Re]=s(!1),[we,Le]=i(k,{collections:{},products:{}}),[Ae,Ee]=i(v,Object.keys(A).length>0?A:{}),$e=n(null),[Be,ze]=s(!1),[Ve,Me]=s();l((()=>{Ie(!0),Re(!0),w.collectionFetcher(Se,L,ae).then((e=>{ue({type:"fetched",data:(null==e?void 0:e.collections)||{}}),Ie(!1),ke((e=>e+1)),Re(!1)})).catch()}),[]),l((()=>{let e=0;"COLLECTION"===X?e=Object.keys(Ae||{}).filter((e=>"isCustom"!==e)).length:Z?Object.keys(Ae||[]).forEach((t=>{var o;Object.keys((null===(o=Ae[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&Ae[-1]&&(null===(c=Ae[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(Ae||[]).forEach((t=>{var o;Object.keys((null===(o=Ae[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=Ae[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),je(e)}),[de,Ae,Z,X]),l((()=>{fe&&(Ie(!0),w.productFetcher(fe,L,ae).then((e=>{Object.keys(e).length&&ue({type:"productsFetched",data:{collectionId:fe,products:e}}),Ie(!1)})).catch())}),[fe]),l((()=>{const e=setTimeout((()=>{"rearrange"!==he&&(Pe.length||"collections"!==he)&&(Pe.length?(Oe(!0),w.searchFetcher(L,Pe,ae).then((e=>{"collections"in e&&"products"in e?(Le({type:"set",data:e}),ue({type:"searched",data:e.collections}),ue({type:"searched",data:e.products})):(Le({type:"set",data:{collections:{},products:e}}),ue({type:"searched",data:e})),pe("searchProducts"),Ie(!1),Oe(!1)}))):pe("collections"))}),800);return()=>clearTimeout(e)}),[Pe]),l((()=>{Q&&(w.onAdd(Ae,xe),Ne())}),[Q]),l((()=>{te&&Object.keys(Ae||{}).length&&xe&&(w.onAdd(Ae,xe),Ne())}),[te,Ae,xe]);const Ne=()=>{Ee({type:"reset",data:{}})},He=()=>{let e,o;return"COLLECTION"===X?(e="collection",o="collections"):Z?(e="product",o="products"):(e="variant",o="variants"),z&&xe>z?t(C,{tagText:`You can only select ${z} ${1===z?e:o}`,type:"negative"}):V&&xe>V?t(C,{tagText:`You can only select ${V} ${1===V?e:o}`,type:"negative"}):t(u,xe>0?{onClick:()=>{pe(ee?F.RearrangeProducts:F.SelectedProducts)},buttonText:z?`${xe}/${z} ${1===xe?e:o} selected`:`${xe} ${1===xe?e:o} selected`,buttonType:["rearrange","view"].includes(he)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(he)}:{disabled:!0,buttonText:z?`${xe}/${z} ${1===z?e:o} selected`:`${xe} ${1===xe?e:o} selected`,buttonType:"tertiaryGray"})},We=e=>ve?"Loading...":he===F.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",Ge=e(P,{style:null!=ce?ce:{},children:[w.postHeader&&t("div",{style:{padding:"0 24px"},children:w.postHeader}),!w.hideGlobalSearch&&t(o,{children:("collections"===he||"searchProducts"===he)&&t("div",{style:{padding:J?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"},children:t(h,{placeholder:"Search using ID, Name or SKU ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>De?t(m,{size:"small",color:a.content.primary}):t(r,{})},id:"listInput",height:"24px",type:"text",value:Pe,onChangeText:e=>{e.length&&e.trim().length?Te(e):Te("")}})})}),e(T,{ref:$e,screenName:he,children:["collections"===he&&t(y,{customCollectionRestriction:w.customCollectionRestriction,dataLoading:Fe,collections:de,selectedCollectionsDispatch:Ee,setCollectionId:ge,setSelectedCollectionId:be,setScreen:pe,selectedCollections:Ae,collectionFetcher:w.collectionFetcher,storeId:L,appType:ae,collectionsDispatch:ue,setSaveDisabled:Ie,pagingControls:{curPage:Se,setCurPage:ke},hideCollectionCheckbox:M,renderWithoutModal:J,pickerType:X,scrollContainerRef:$e,limit:V,exactLimit:z}),"products"===he&&ye&&t(I.Provider,{value:ye,children:t(f,{hideInCollectionSearch:w.hideInCollectionSearch,customCollectionRestriction:w.customCollectionRestriction,productFetcher:w.productFetcher,setScreen:pe,storeId:L,appType:ae,data:de[ye],collectionsDispatch:ue,selectedCollectionsDispatch:Ee,selectedData:Ae,setSaveDisabled:Ie,searchInCollectionFetcher:w.searchInCollectionFetcher,hideProductCheckbox:N,outOfStockAction:H,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,renderWithoutModal:J,pickerType:X,hideProductVariants:Z,fbStatusFetcher:w.fbStatusFetcher,onProductDetailClick:e=>{ze(!0),Me(e)},showProductDetailInfoIcon:oe,scrollContainerRef:$e})}),"view"===he&&t(j,{selectedCollections:Ae||{},selectedCollectionsDispatch:Ee,setScreen:pe,collections:de,hideProductVariants:Z,outOfStockAction:H,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher}),"rearrange"===he&&t(b,{selectedCollections:Ae||{},selectedCollectionsDispatch:Ee,setScreen:pe,outOfStockAction:H,rearrangeViewType:"grid"===me?"list":"grid",scrollContainerRef:$e,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher}),"searchProducts"===he&&t(x,{customCollectionRestriction:w.customCollectionRestriction,selectedCollections:Ae||{},searchedCollections:we||{},searchedCollectionsDispatch:Le,selectedCollectionsDispatch:Ee,setScreen:pe,collections:de,onBackPress:()=>{Te(""),Le({type:"set",data:{collections:{},products:{}}})},pickerType:X,hideProductCheckbox:N,hideProductVariants:Z,hideVariantCheckbox:W,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher,setCollectionId:ge,setSelectedCollectionId:be,renderWithoutModal:J,hideCollectionCheckbox:M,outOfStockAction:H,limit:V,exactLimit:z})]})]});return t(o,{children:J?e(o,{children:[Ge,ie.renderFooter?e(D,{children:[He(),t(u,{buttonText:We(ie.primaryButtonText),disabled:!ie.isLoading&&(ve||xe<1||z&&xe<z||!z&&V&&xe>V)||ie.primaryButtonDisabled,isLoading:ie.isLoading,onClick:()=>{w.onAdd(Ae,xe),Ne(),pe([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections)}})]}):t(o,{}),Be&&Ve?t(g,{productData:Ve,outOfStockAction:H,useDynamicInfoImageSize:w.useDynamicInfoImageSize,onClose:()=>{ze(!1)}}):t(o,{})]}):e(p,{zIndex:B,open:$,onClose:()=>{null==E||E(),Ne()},headingTitle:U||("collections"===he||"products"===he?"Select Products":"view"===he?"Selected Products":"searchProducts"===he?"Searched Results":"rearrange"===he?"Rearrange Products":void 0),headingSubtitle:le,footerShadow:!0,centralContainerStyles:{width:Y||"600px",left:q||"auto"},headerRightCustomElement:re?t("div",{style:{cursor:"pointer",display:"flex"},onClick:E,children:t(d,{width:20,height:20,color:a.content.secondary})}):t(o,{}),footerContainerStyle:w.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:a.surface.standard}:void 0,primaryButton:se?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(ve||xe<1||z&&xe<z||!z&&V&&xe>V)||e.disabled,onClick:()=>{w.onAdd(Ae,xe),Ne(),pe([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections)}}))(se):{buttonText:We(),disabled:ve||xe<1||z&&xe<z||!z&&V&&xe>V||!1,onClick:()=>{w.onAdd(Ae,xe),Ne()}},secondaryButton:ne?(e=>Object.assign(Object.assign({},e),{disabled:ve||xe<1||z&&xe<z||!z&&V&&xe>V||!1,onClick:()=>{const e=R(Ae,de,we);w.onAdd(e,xe,!0)}}))(ne):void 0,wrapperStyle:w.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:K?t(o,{}):He(),hideCrossButton:Be||re,children:[Ge,Be&&Ve?t(g,{productData:Ve,useDynamicInfoImageSize:w.useDynamicInfoImageSize,outOfStockAction:H,onClose:()=>{ze(!1)}}):t(o,{})]})})};export{w as ProductPickerModal};
1
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{ApplicationType as c}from"@bikdotai/bik-models/growth/models/bik-store";import r from"../../assets/icons/search.svg.js";import{useReducer as i,useState as s,useRef as n,useEffect as l}from"react";import{COLORS as a}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as u}from"../button/Button.js";import{Input as h}from"../input/Input.js";import{StyledModal as p}from"../modals/styledModal.js";import{Spinner as m}from"../spinner/Spinner.js";import{Tag as C}from"../tag/Tag.js";import{CollectionsScreen as y}from"./collectionScreen.js";import{ProductInfoOverlay as g}from"./productInfoOverlay.js";import{ProductsScreen as f}from"./productScreen.js";import{RearrangeScreen as b}from"./rearrangeScreen.js";import{collectionsReducer as S,searchReducer as k,selectedColectionsReducer as v,CollectionIdContext as I}from"./reducers.js";import{SearchScreen as x}from"./searchScreen.js";import{SelectedScreen as j}from"./selectedScreen.js";import{ContainerStyle as P,ScrollContainerStyle as T,StyledFooterForNonModal as D}from"./style.js";import{OUT_OF_STOCK_ACTION as O,ScreenName as F}from"./type.js";import{updateAllVariantsForSelectedProducts as R}from"./utility.js";const w=w=>{const{storeId:L,selectedItems:A,onClose:E,visible:$,zIndex:B,exactLimit:z,limit:V,hideCollectionCheckbox:M,hideProductCheckbox:N,outOfStockAction:H=O.BLUR,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,hideSelectionCount:K,title:U,width:Y,left:q,renderWithoutModal:J,onClickSave:Q,pickerType:X,hideProductVariants:Z=!1,startupScreen:_=F.Collections,rearrangeEnabled:ee,selectSingleItem:te=!1,showProductDetails:oe,containerStyle:ce,crossButtonInsideHeader:re=!1,footerForNonModal:ie={},primaryButton:se,secondaryButton:ne,subtitle:le}=w,ae=w.appType||c.BIK,[de,ue]=i(S,{}),[he,pe]=s([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections),[me,Ce]=s("grid"),[ye,ge]=s(""),[fe,be]=s(""),[Se,ke]=s(0),[ve,Ie]=s(!1),[xe,je]=s(0),[Pe,Te]=s(""),[De,Oe]=s(!1),[Fe,Re]=s(!1),[we,Le]=i(k,{collections:{},products:{}}),[Ae,Ee]=i(v,Object.keys(A).length>0?A:{}),$e=n(null),[Be,ze]=s(!1),[Ve,Me]=s();l(()=>{Ie(!0),Re(!0),w.collectionFetcher(Se,L,ae).then(e=>{ue({type:"fetched",data:(null==e?void 0:e.collections)||{}}),Ie(!1),ke(e=>e+1),Re(!1)}).catch()},[]),l(()=>{let e=0;"COLLECTION"===X?e=Object.keys(Ae||{}).filter(e=>"isCustom"!==e).length:Z?Object.keys(Ae||[]).forEach(t=>{var o;Object.keys((null===(o=Ae[t])||void 0===o?void 0:o.products)||[]).forEach(o=>{var c;"-1"!==t&&Ae[-1]&&(null===(c=Ae[-1].products)||void 0===c?void 0:c[o])||(e+=1)})}):Object.keys(Ae||[]).forEach(t=>{var o;Object.keys((null===(o=Ae[t])||void 0===o?void 0:o.products)||[]).forEach(o=>{var c,r;Object.keys((null===(r=null===(c=Ae[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach(()=>{e+=1})})}),je(e)},[de,Ae,Z,X]),l(()=>{fe&&(Ie(!0),w.productFetcher(fe,L,ae).then(e=>{Object.keys(e).length&&ue({type:"productsFetched",data:{collectionId:fe,products:e}}),Ie(!1)}).catch())},[fe]),l(()=>{const e=setTimeout(()=>{"rearrange"!==he&&(Pe.length||"collections"!==he)&&(Pe.length?(Oe(!0),w.searchFetcher(L,Pe,ae).then(e=>{"collections"in e&&"products"in e?(Le({type:"set",data:e}),ue({type:"searched",data:e.collections}),ue({type:"searched",data:e.products})):(Le({type:"set",data:{collections:{},products:e}}),ue({type:"searched",data:e})),pe("searchProducts"),Ie(!1),Oe(!1)})):pe("collections"))},800);return()=>clearTimeout(e)},[Pe]),l(()=>{Q&&(w.onAdd(Ae,xe),Ne())},[Q]),l(()=>{te&&Object.keys(Ae||{}).length&&xe&&(w.onAdd(Ae,xe),Ne())},[te,Ae,xe]);const Ne=()=>{Ee({type:"reset",data:{}})},He=()=>{let e,o;return"COLLECTION"===X?(e="collection",o="collections"):Z?(e="product",o="products"):(e="variant",o="variants"),z&&xe>z?t(C,{tagText:`You can only select ${z} ${1===z?e:o}`,type:"negative"}):V&&xe>V?t(C,{tagText:`You can only select ${V} ${1===V?e:o}`,type:"negative"}):t(u,xe>0?{onClick:()=>{pe(ee?F.RearrangeProducts:F.SelectedProducts)},buttonText:z?`${xe}/${z} ${1===xe?e:o} selected`:`${xe} ${1===xe?e:o} selected`,buttonType:["rearrange","view"].includes(he)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(he)}:{disabled:!0,buttonText:z?`${xe}/${z} ${1===z?e:o} selected`:`${xe} ${1===xe?e:o} selected`,buttonType:"tertiaryGray"})},We=e=>ve?"Loading...":he===F.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",Ge=e(P,{style:null!=ce?ce:{},children:[w.postHeader&&t("div",{style:{padding:"0 24px"},children:w.postHeader}),!w.hideGlobalSearch&&t(o,{children:("collections"===he||"searchProducts"===he)&&t("div",{style:{padding:J?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"},children:t(h,{placeholder:"Search using ID, Name or SKU ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>De?t(m,{size:"small",color:a.content.primary}):t(r,{})},id:"listInput",height:"24px",type:"text",value:Pe,onChangeText:e=>{e.length&&e.trim().length?Te(e):Te("")}})})}),e(T,{ref:$e,screenName:he,children:["collections"===he&&t(y,{customCollectionRestriction:w.customCollectionRestriction,dataLoading:Fe,collections:de,selectedCollectionsDispatch:Ee,setCollectionId:ge,setSelectedCollectionId:be,setScreen:pe,selectedCollections:Ae,collectionFetcher:w.collectionFetcher,storeId:L,appType:ae,collectionsDispatch:ue,setSaveDisabled:Ie,pagingControls:{curPage:Se,setCurPage:ke},hideCollectionCheckbox:M,renderWithoutModal:J,pickerType:X,scrollContainerRef:$e,limit:V,exactLimit:z}),"products"===he&&ye&&t(I.Provider,{value:ye,children:t(f,{hideInCollectionSearch:w.hideInCollectionSearch,customCollectionRestriction:w.customCollectionRestriction,productFetcher:w.productFetcher,setScreen:pe,storeId:L,appType:ae,data:de[ye],collectionsDispatch:ue,selectedCollectionsDispatch:Ee,selectedData:Ae,setSaveDisabled:Ie,searchInCollectionFetcher:w.searchInCollectionFetcher,hideProductCheckbox:N,outOfStockAction:H,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,renderWithoutModal:J,pickerType:X,hideProductVariants:Z,fbStatusFetcher:w.fbStatusFetcher,onProductDetailClick:e=>{ze(!0),Me(e)},showProductDetailInfoIcon:oe,scrollContainerRef:$e})}),"view"===he&&t(j,{selectedCollections:Ae||{},selectedCollectionsDispatch:Ee,setScreen:pe,collections:de,hideProductVariants:Z,outOfStockAction:H,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher}),"rearrange"===he&&t(b,{selectedCollections:Ae||{},selectedCollectionsDispatch:Ee,setScreen:pe,outOfStockAction:H,rearrangeViewType:"grid"===me?"list":"grid",scrollContainerRef:$e,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher}),"searchProducts"===he&&t(x,{customCollectionRestriction:w.customCollectionRestriction,selectedCollections:Ae||{},searchedCollections:we||{},searchedCollectionsDispatch:Le,selectedCollectionsDispatch:Ee,setScreen:pe,collections:de,onBackPress:()=>{Te(""),Le({type:"set",data:{collections:{},products:{}}})},pickerType:X,hideProductCheckbox:N,hideProductVariants:Z,hideVariantCheckbox:W,storeId:L,appType:ae,fbStatusFetcher:w.fbStatusFetcher,setCollectionId:ge,setSelectedCollectionId:be,renderWithoutModal:J,hideCollectionCheckbox:M,outOfStockAction:H,limit:V,exactLimit:z})]})]});return t(o,{children:J?e(o,{children:[Ge,ie.renderFooter?e(D,{children:[He(),t(u,{buttonText:We(ie.primaryButtonText),disabled:!ie.isLoading&&(ve||xe<1||z&&xe<z||!z&&V&&xe>V)||ie.primaryButtonDisabled,isLoading:ie.isLoading,onClick:()=>{w.onAdd(Ae,xe),Ne(),pe([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections)}})]}):t(o,{}),Be&&Ve?t(g,{productData:Ve,outOfStockAction:H,useDynamicInfoImageSize:w.useDynamicInfoImageSize,onClose:()=>{ze(!1)}}):t(o,{})]}):e(p,{zIndex:B,open:$,onClose:()=>{null==E||E(),Ne()},headingTitle:U||("collections"===he||"products"===he?"Select Products":"view"===he?"Selected Products":"searchProducts"===he?"Searched Results":"rearrange"===he?"Rearrange Products":void 0),headingSubtitle:le,footerShadow:!0,centralContainerStyles:{width:Y||"600px",left:q||"auto"},headerRightCustomElement:re?t("div",{style:{cursor:"pointer",display:"flex"},onClick:E,children:t(d,{width:20,height:20,color:a.content.secondary})}):t(o,{}),footerContainerStyle:w.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:a.surface.standard}:void 0,primaryButton:se?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(ve||xe<1||z&&xe<z||!z&&V&&xe>V)||e.disabled,onClick:()=>{w.onAdd(Ae,xe),Ne(),pe([F.Collections,F.RearrangeProducts].includes(_)?_:F.Collections)}}))(se):{buttonText:We(),disabled:ve||xe<1||z&&xe<z||!z&&V&&xe>V||!1,onClick:()=>{w.onAdd(Ae,xe),Ne()}},secondaryButton:ne?(e=>Object.assign(Object.assign({},e),{disabled:ve||xe<1||z&&xe<z||!z&&V&&xe>V||!1,onClick:()=>{const e=R(Ae,de,we);w.onAdd(e,xe,!0)}}))(ne):void 0,wrapperStyle:w.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:K?t(o,{}):He(),hideCrossButton:Be||re,children:[Ge,Be&&Ve?t(g,{productData:Ve,useDynamicInfoImageSize:w.useDynamicInfoImageSize,outOfStockAction:H,onClose:()=>{ze(!1)}}):t(o,{})]})})};export{w as ProductPickerModal};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as i,Fragment as o}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import c from"../../assets/icons/info.svg.js";import{CheckBox as d}from"../checkBox/CheckBox.js";import{IconButton as r}from"../icon-button/IconButton.js";import{ShimmerImage as l}from"../shimmer-image/ShimmerImage.js";import{Tooltip as n}from"../tooltips/Tooltip.js";import{TitleSmall as a,BodyCaption as u}from"../TypographyStyle.js";import{CurrencySymbols as s}from"./constants.js";import{ProductHelper as v}from"./helpers/ProductHelper.js";import{ProductPickerTag as p}from"./ProductPickerTag.js";import{ProductCardStyle as h,ProductInfo as m,ProductSubTitle as I,SKUIDBadge as y,EllipsedBodyTiny as f}from"./style.js";import{shouldShowVariant as P,getSkuId as k}from"./utility.js";const C=o=>{var e,c,d,r,l,n,a,u,v;const{collectionId:p,productId:h,data:m,selectedData:I,selectedCollectionsDispatch:y,viewOnly:f,upliftAdditions:k,isProductPartiallyChecked:C,hideProductCheckbox:b,outOfStockAction:j,hideVariantCheckbox:x,hideProductVariants:D,pickerType:O,onProductDetailClick:S,showProductDetailInfoIcon:T}=o,V=t=>{var i,o,e,c,d,r;if(!(null===(o=null===(i=null==I?void 0:I[p])||void 0===i?void 0:i.products)||void 0===o?void 0:o[h]))return!1;return!!(null===(r=null===(d=null===(c=null===(e=null==I?void 0:I[p])||void 0===e?void 0:e.products)||void 0===c?void 0:c[h])||void 0===d?void 0:d.variants)||void 0===r?void 0:r[t])},A=D||!P(m)?`${m.currency&&null!==(e=s[m.currency])&&void 0!==e?e:""}${null!==(v=null!==(l=null===(r=null===(d=Object.values(null!==(c=m.variants)&&void 0!==c?c:{}))||void 0===d?void 0:d[0])||void 0===r?void 0:r.price)&&void 0!==l?l:null===(u=null===(a=Object.values(null!==(n=m.variants)&&void 0!==n?n:{}))||void 0===a?void 0:a[0])||void 0===u?void 0:u.actualPrice)&&void 0!==v?v:""}`:"";return t("div",{children:[i(g,{isVariant:!1,data:m,productId:h,collectionId:p,isSelected:(()=>{var t,i;return!!(null===(i=null===(t=null==I?void 0:I[p])||void 0===t?void 0:t.products)||void 0===i?void 0:i[h])})(),isPartiallyChecked:C,selectedCollectionsDispatch:y,upliftAdditions:k,viewOnly:f,hideProductCheckbox:b,hideVariantCheckbox:x,hideProductVariants:D,pickerType:O,outOfStockAction:j,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:A},h),D?null:P(m)&&Object.keys(m.variants||[]).map((t=>{var o,e,c,d,r,l,n;const a=`${m.currency&&null!==(o=s[m.currency])&&void 0!==o?o:""}${null!==(n=null!==(d=null===(c=null===(e=m.variants)||void 0===e?void 0:e[t])||void 0===c?void 0:c.price)&&void 0!==d?d:null===(l=null===(r=m.variants)||void 0===r?void 0:r[t])||void 0===l?void 0:l.actualPrice)&&void 0!==n?n:""}`;return i(g,{isVariant:!0,hideVariantCheckbox:x,data:Object.assign(Object.assign({},m.variants[t]),{currency:m.currency}),variantId:t,productId:h,viewOnly:f,upliftAdditions:k,collectionId:p,isSelected:V(t),selectedCollectionsDispatch:y,outOfStockAction:j,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:a},t)}))]})},g=s=>{const{isVariant:P,data:C,productId:g,collectionId:b,variantId:j,isSelected:x,selectedCollectionsDispatch:D,viewOnly:O,upliftAdditions:S,isPartiallyChecked:T,hideProductCheckbox:V,outOfStockAction:A,hideVariantCheckbox:w,hideProductVariants:U,pickerType:$="PRODUCT",onProductDetailClick:B,showProductDetailInfoIcon:F,currencyAndPrice:R}=s,{isVariantForProductPickerTag:H,dataForProductPickerTag:K,tagText:L,tagType:q}=v.getDataForProductPickerTag(C,P,A),z=k(C,P);return t(h,{isVariant:P,onClick:t=>{if(t.stopPropagation(),"PRODUCT"===$&&(V||w)){const t=Object.keys(C.variants);U?x?D({type:"productUnselected",data:{productId:g,collectionId:b}}):S("productSelected",{productId:g,variantId:j,collectionId:b,product:C}):x?D({type:"variantUnselected",data:{productId:g,variantId:j,collectionId:b}}):S("variantSelected",{productId:g,variantId:j||t[0],collectionId:b,variant:C})}},isActive:x,children:[P&&!O&&!w||!P&&!O&&!V?i(d,{isChecked:x,isPartiallyChecked:T||!1,onValueChange:function(t,i,o){null==o||o.stopPropagation(),P?t?S(U?"productSelected":"variantSelected",{productId:g,variantId:j,collectionId:b,variant:C}):D({type:U?"productUnselected":"variantUnselected",data:{productId:g,variantId:j,collectionId:b}}):t?S("productSelected",{productId:g,collectionId:b,product:C}):D({type:"productUnselected",data:{productId:g,collectionId:b}})}}):i(o,{}),i("div",{children:i(l,{width:40,height:40,imageUrl:C.image,alt:"Item",borderRadius:4})}),t("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[i(n,{variant:"light",body:C.name,placement:"bottom",delay:400,children:i(a,{style:{flex:1},numberOfLines:1,children:C.name})}),t(m,{children:[i(p,{isVariant:H,data:K,tagText:L,tagType:q}),F&&i(r,{onClick:()=>{null==B||B(C)},Icon:()=>i(c,{width:20,height:20,color:e.content.placeholder})})]})]}),t(I,{children:[!(null==K?void 0:K.fbStatus)&&H||L?null:i(u,{color:e.content.secondary,children:R}),z&&i(n,{body:z,placement:"top",children:i(y,{children:i(f,{children:`SKU ID: ${z}`})})})]})]})]})};export{g as ProductCard,C as ProductGroup};
1
+ import{jsxs as t,jsx as i,Fragment as o}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import c from"../../assets/icons/info.svg.js";import{CheckBox as d}from"../checkBox/CheckBox.js";import{IconButton as r}from"../icon-button/IconButton.js";import{ShimmerImage as l}from"../shimmer-image/ShimmerImage.js";import{Tooltip as n}from"../tooltips/Tooltip.js";import{TitleSmall as a,BodyCaption as u}from"../TypographyStyle.js";import{CurrencySymbols as s}from"./constants.js";import{ProductHelper as v}from"./helpers/ProductHelper.js";import{ProductPickerTag as p}from"./ProductPickerTag.js";import{ProductCardStyle as h,ProductInfo as m,ProductSubTitle as I,SKUIDBadge as y,EllipsedBodyTiny as f}from"./style.js";import{shouldShowVariant as P,getSkuId as k}from"./utility.js";const C=o=>{var e,c,d,r,l,n,a,u,v;const{collectionId:p,productId:h,data:m,selectedData:I,selectedCollectionsDispatch:y,viewOnly:f,upliftAdditions:k,isProductPartiallyChecked:C,hideProductCheckbox:b,outOfStockAction:j,hideVariantCheckbox:x,hideProductVariants:D,pickerType:O,onProductDetailClick:S,showProductDetailInfoIcon:T}=o,V=t=>{var i,o,e,c,d,r;if(!(null===(o=null===(i=null==I?void 0:I[p])||void 0===i?void 0:i.products)||void 0===o?void 0:o[h]))return!1;return!!(null===(r=null===(d=null===(c=null===(e=null==I?void 0:I[p])||void 0===e?void 0:e.products)||void 0===c?void 0:c[h])||void 0===d?void 0:d.variants)||void 0===r?void 0:r[t])},A=D||!P(m)?`${m.currency&&null!==(e=s[m.currency])&&void 0!==e?e:""}${null!==(v=null!==(l=null===(r=null===(d=Object.values(null!==(c=m.variants)&&void 0!==c?c:{}))||void 0===d?void 0:d[0])||void 0===r?void 0:r.price)&&void 0!==l?l:null===(u=null===(a=Object.values(null!==(n=m.variants)&&void 0!==n?n:{}))||void 0===a?void 0:a[0])||void 0===u?void 0:u.actualPrice)&&void 0!==v?v:""}`:"";return t("div",{children:[i(g,{isVariant:!1,data:m,productId:h,collectionId:p,isSelected:(()=>{var t,i;return!!(null===(i=null===(t=null==I?void 0:I[p])||void 0===t?void 0:t.products)||void 0===i?void 0:i[h])})(),isPartiallyChecked:C,selectedCollectionsDispatch:y,upliftAdditions:k,viewOnly:f,hideProductCheckbox:b,hideVariantCheckbox:x,hideProductVariants:D,pickerType:O,outOfStockAction:j,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:A},h),D?null:P(m)&&Object.keys(m.variants||[]).map(t=>{var o,e,c,d,r,l,n;const a=`${m.currency&&null!==(o=s[m.currency])&&void 0!==o?o:""}${null!==(n=null!==(d=null===(c=null===(e=m.variants)||void 0===e?void 0:e[t])||void 0===c?void 0:c.price)&&void 0!==d?d:null===(l=null===(r=m.variants)||void 0===r?void 0:r[t])||void 0===l?void 0:l.actualPrice)&&void 0!==n?n:""}`;return i(g,{isVariant:!0,hideVariantCheckbox:x,data:Object.assign(Object.assign({},m.variants[t]),{currency:m.currency}),variantId:t,productId:h,viewOnly:f,upliftAdditions:k,collectionId:p,isSelected:V(t),selectedCollectionsDispatch:y,outOfStockAction:j,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:a},t)})]})},g=s=>{const{isVariant:P,data:C,productId:g,collectionId:b,variantId:j,isSelected:x,selectedCollectionsDispatch:D,viewOnly:O,upliftAdditions:S,isPartiallyChecked:T,hideProductCheckbox:V,outOfStockAction:A,hideVariantCheckbox:w,hideProductVariants:U,pickerType:$="PRODUCT",onProductDetailClick:B,showProductDetailInfoIcon:F,currencyAndPrice:R}=s,{isVariantForProductPickerTag:H,dataForProductPickerTag:K,tagText:L,tagType:q}=v.getDataForProductPickerTag(C,P,A),z=k(C,P);return t(h,{isVariant:P,onClick:t=>{if(t.stopPropagation(),"PRODUCT"===$&&(V||w)){const t=Object.keys(C.variants);U?x?D({type:"productUnselected",data:{productId:g,collectionId:b}}):S("productSelected",{productId:g,variantId:j,collectionId:b,product:C}):x?D({type:"variantUnselected",data:{productId:g,variantId:j,collectionId:b}}):S("variantSelected",{productId:g,variantId:j||t[0],collectionId:b,variant:C})}},isActive:x,children:[P&&!O&&!w||!P&&!O&&!V?i(d,{isChecked:x,isPartiallyChecked:T||!1,onValueChange:function(t,i,o){null==o||o.stopPropagation(),P?t?S(U?"productSelected":"variantSelected",{productId:g,variantId:j,collectionId:b,variant:C}):D({type:U?"productUnselected":"variantUnselected",data:{productId:g,variantId:j,collectionId:b}}):t?S("productSelected",{productId:g,collectionId:b,product:C}):D({type:"productUnselected",data:{productId:g,collectionId:b}})}}):i(o,{}),i("div",{children:i(l,{width:40,height:40,imageUrl:C.image,alt:"Item",borderRadius:4})}),t("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[i(n,{variant:"light",body:C.name,placement:"bottom",delay:400,children:i(a,{style:{flex:1},numberOfLines:1,children:C.name})}),t(m,{children:[i(p,{isVariant:H,data:K,tagText:L,tagType:q}),F&&i(r,{onClick:()=>{null==B||B(C)},Icon:()=>i(c,{width:20,height:20,color:e.content.placeholder})})]})]}),t(I,{children:[!(null==K?void 0:K.fbStatus)&&H||L?null:i(u,{color:e.content.secondary,children:R}),z&&i(n,{body:z,placement:"top",children:i(y,{children:i(f,{children:`SKU ID: ${z}`})})})]})]})]})};export{g as ProductCard,C as ProductGroup};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import c from"../../assets/icons/box.svg.js";import r from"../../assets/icons/search.svg.js";import{cloneDeep as n}from"lodash";import{useContext as i,useRef as s,useState as l,useEffect as d}from"react";import{COLORS as a}from"../../constants/Theme.js";import{CheckBox as u}from"../checkBox/CheckBox.js";import{IconButton as h}from"../icon-button/IconButton.js";import{InfiniteScroll as p}from"../InfiniteScroll/InfiniteScroll.js";import{Input as m}from"../input/Input.js";import{Spinner as g}from"../spinner/Spinner.js";import{BodyCaption as f,TitleRegular as v}from"../TypographyStyle.js";import{EmptyState as j}from"./emptyState.js";import{ProductGroup as y}from"./product.js";import{ProductPickerShimmer as b}from"./ProductPickerShimmer.js";import{CollectionIdContext as k}from"./reducers.js";import{ProductScreenHeader as O,ProductScreenCollectionCardStyle as C}from"./style.js";import{OUT_OF_STOCK_ACTION as P}from"./type.js";import{getVariantIdsToFetchAtProductLevel as I,markVariantsAsApprovedProductsLevel as D,isCollectionPartiallyChecked as S,isProductPartiallyChecked as x,liftTheStateUp as E}from"./utility.js";const T=T=>{var R,w;const{data:V,collectionsDispatch:A,selectedData:B,selectedCollectionsDispatch:F,productFetcher:J,storeId:K,setScreen:M,setSaveDisabled:N,hideInCollectionSearch:U,customCollectionRestriction:W,hideProductCheckbox:z,outOfStockAction:H=P.BLUR,hideVariantCheckbox:L=!1,selectProductsFromCustomCollection:_=!1,pickerType:q,hideProductVariants:G,fbStatusFetcher:Q,onProductDetailClick:X,showProductDetailInfoIcon:Y,scrollContainerRef:Z,appType:$}=T,tt=i(k),et=s(0),ot=s(!1),[ct,rt]=l(""),[nt,it]=l(!1),[st,lt]=l(V),dt=s(!0),at=s(!1);d((()=>{if(dt.current)return void(dt.current=!1);const t=setTimeout((()=>{ct.length?(it(!0),T.searchInCollectionFetcher(K,tt,ct,$).then((t=>{const e=n(V);e.products=t,lt(e);const o=I(null!=t?t:{});ht(o,null!=t?t:{},!0),N(!1),it(!1)}))):lt(V)}),800);return()=>clearTimeout(t)}),[ct]);d((()=>{var t,e,o,c;at.current=!1,et.current=Math.floor((null===(e=Object.keys(null!==(t=V.products)&&void 0!==t?t:{}))||void 0===e?void 0:e.length)/10);const r=I(null!==(o=V.products)&&void 0!==o?o:{});ht(r,null!==(c=V.products)&&void 0!==c?c:{})}),[tt]);const ut=!!W&&V.isSmartCollection;d((()=>{(null==V?void 0:V.products)||pt(10)}),[]);const ht=(t,e,o)=>{Q||(o?D(e,A,tt,st,lt):D(e,A,tt)),t.length>0&&Q&&Q(K,t,$).then((t=>{const c=Object.assign({},e);Object.keys(e).forEach((o=>{var r,n;Object.keys(null!==(n=null===(r=null==e?void 0:e[o])||void 0===r?void 0:r.variants)&&void 0!==n?n:{}).forEach((r=>{var n,i;const s=null===(n=null==e?void 0:e[o].variants)||void 0===n?void 0:n[r];s&&"REJECTED"===t[r]?s.fbStatus="REJECTED":s&&"APPROVED"===t[r]&&(s.fbStatus="APPROVED");const l=null===(i=null==c?void 0:c[o])||void 0===i?void 0:i.variants;l&&l[r]&&(l[r]=s)}))})),o?(lt((t=>{const e=Object.assign({},t);return e.products=c,e})),A({type:"productsPaged",data:{collectionId:tt,products:c}})):A({type:"productsPaged",data:{collectionId:tt,products:c}})})).catch((t=>{o?D(e,A,tt,st,lt):D(e,A,tt)}))},pt=t=>{N(!0),it(!0),J(tt,K,$,t,0).then((e=>{if(Object.keys(e).length||(at.current=!0),Object.keys(e).length){lt(Object.assign(Object.assign({},st),{products:e}));const t=I(e);ht(t,e),et.current=1}t||F({type:"selected",data:{id:tt,val:Object.assign(Object.assign({},V),{products:e})}}),N(!1),it(!1)})).catch()},mt=(t,e)=>{const o=E(e,V);F({type:t,data:Object.assign(Object.assign({},o),{isRestricted:W})})},gt=!!(null==B?void 0:B[tt])&&!!Object.keys(null!==(w=null===(R=null==B?void 0:B[tt])||void 0===R?void 0:R.products)&&void 0!==w?w:{}).length;return t("div",{children:[t(O,{children:[e(h,{Icon:o,height:16,onClick:()=>{M("collections")}}),e(f,{style:{color:a.content.secondary},children:V.name})]}),!U&&e("div",{style:{padding:16,height:"76px",borderBottom:"1px solid #E0E0E0"},children:e(m,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>nt&&ct.length?e(g,{size:"small",color:a.content.primary}):e(r,{})},id:"listInput",height:"24px",type:"text",value:ct,onChangeText:t=>{t.length&&t.trim().length?rt(t):rt("")},placeholder:"Search using ID, Name or SKU ID"})}),Object.keys((null==st?void 0:st.products)||[]).length>0&&!ut&&!ct.length&&!z&&"-1"!==tt&&t(C,{children:[e(u,{isChecked:gt,isPartiallyChecked:S(tt,st,B,G),onValueChange:function(t){t?pt():F({type:"unselected",data:{id:tt}})}}),e("div",{style:{width:40,height:40},children:e(c,{})}),e(v,{children:"All Products"})]}),e(p,{hasData:!(Object.keys((null==st?void 0:st.products)||[]).length<10)&&!!Object.keys((null==st?void 0:st.products)||[]).length,fetchMore:()=>(ot.current=!0,J(tt,K,$,10,et.current).then((t=>{let e=!1;if(Object.keys(t).length||(e=!0),Object.keys(t).length){const e=st;e.products=Object.assign(Object.assign({},st.products),t),lt(Object.assign({},e));const o=I(t);ht(o,t)}return N(!1),ot.current=!1,et.current+=1,e}))),containerRef:Z,children:Object.keys((null==st?void 0:st.products)||[]).length?Object.keys(st.products||[]).map((t=>e(y,{outOfStockAction:H,collectionId:tt,isProductPartiallyChecked:x(tt,t,B,st,G),productId:t,data:st.products[t],selectedData:B,selectedCollectionsDispatch:F,viewOnly:!_&&!!ut,upliftAdditions:mt,hideProductCheckbox:z,hideVariantCheckbox:L,hideProductVariants:G,pickerType:q,onProductDetailClick:X,showProductDetailInfoIcon:Y},t))):nt?e(b,{limit:10}):e(j,{title:"No products to show",subtitle:ct.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})})]})};export{T as ProductsScreen};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import c from"../../assets/icons/box.svg.js";import r from"../../assets/icons/search.svg.js";import{cloneDeep as n}from"lodash";import{useContext as i,useRef as s,useState as l,useEffect as d}from"react";import{COLORS as a}from"../../constants/Theme.js";import{CheckBox as u}from"../checkBox/CheckBox.js";import{IconButton as h}from"../icon-button/IconButton.js";import{InfiniteScroll as p}from"../InfiniteScroll/InfiniteScroll.js";import{Input as m}from"../input/Input.js";import{Spinner as g}from"../spinner/Spinner.js";import{BodyCaption as f,TitleRegular as v}from"../TypographyStyle.js";import{EmptyState as j}from"./emptyState.js";import{ProductGroup as y}from"./product.js";import{ProductPickerShimmer as b}from"./ProductPickerShimmer.js";import{CollectionIdContext as k}from"./reducers.js";import{ProductScreenHeader as O,ProductScreenCollectionCardStyle as C}from"./style.js";import{OUT_OF_STOCK_ACTION as P}from"./type.js";import{getVariantIdsToFetchAtProductLevel as I,markVariantsAsApprovedProductsLevel as D,isCollectionPartiallyChecked as S,isProductPartiallyChecked as x,liftTheStateUp as E}from"./utility.js";const T=T=>{var R,w;const{data:V,collectionsDispatch:A,selectedData:B,selectedCollectionsDispatch:F,productFetcher:J,storeId:K,setScreen:M,setSaveDisabled:N,hideInCollectionSearch:U,customCollectionRestriction:W,hideProductCheckbox:z,outOfStockAction:H=P.BLUR,hideVariantCheckbox:L=!1,selectProductsFromCustomCollection:_=!1,pickerType:q,hideProductVariants:G,fbStatusFetcher:Q,onProductDetailClick:X,showProductDetailInfoIcon:Y,scrollContainerRef:Z,appType:$}=T,tt=i(k),et=s(0),ot=s(!1),[ct,rt]=l(""),[nt,it]=l(!1),[st,lt]=l(V),dt=s(!0),at=s(!1);d(()=>{if(dt.current)return void(dt.current=!1);const t=setTimeout(()=>{ct.length?(it(!0),T.searchInCollectionFetcher(K,tt,ct,$).then(t=>{const e=n(V);e.products=t,lt(e);const o=I(null!=t?t:{});ht(o,null!=t?t:{},!0),N(!1),it(!1)})):lt(V)},800);return()=>clearTimeout(t)},[ct]);d(()=>{var t,e,o,c;at.current=!1,et.current=Math.floor((null===(e=Object.keys(null!==(t=V.products)&&void 0!==t?t:{}))||void 0===e?void 0:e.length)/10);const r=I(null!==(o=V.products)&&void 0!==o?o:{});ht(r,null!==(c=V.products)&&void 0!==c?c:{})},[tt]);const ut=!!W&&V.isSmartCollection;d(()=>{(null==V?void 0:V.products)||pt(10)},[]);const ht=(t,e,o)=>{Q||(o?D(e,A,tt,st,lt):D(e,A,tt)),t.length>0&&Q&&Q(K,t,$).then(t=>{const c=Object.assign({},e);Object.keys(e).forEach(o=>{var r,n;Object.keys(null!==(n=null===(r=null==e?void 0:e[o])||void 0===r?void 0:r.variants)&&void 0!==n?n:{}).forEach(r=>{var n,i;const s=null===(n=null==e?void 0:e[o].variants)||void 0===n?void 0:n[r];s&&"REJECTED"===t[r]?s.fbStatus="REJECTED":s&&"APPROVED"===t[r]&&(s.fbStatus="APPROVED");const l=null===(i=null==c?void 0:c[o])||void 0===i?void 0:i.variants;l&&l[r]&&(l[r]=s)})}),o?(lt(t=>{const e=Object.assign({},t);return e.products=c,e}),A({type:"productsPaged",data:{collectionId:tt,products:c}})):A({type:"productsPaged",data:{collectionId:tt,products:c}})}).catch(t=>{o?D(e,A,tt,st,lt):D(e,A,tt)})},pt=t=>{N(!0),it(!0),J(tt,K,$,t,0).then(e=>{if(Object.keys(e).length||(at.current=!0),Object.keys(e).length){lt(Object.assign(Object.assign({},st),{products:e}));const t=I(e);ht(t,e),et.current=1}t||F({type:"selected",data:{id:tt,val:Object.assign(Object.assign({},V),{products:e})}}),N(!1),it(!1)}).catch()},mt=(t,e)=>{const o=E(e,V);F({type:t,data:Object.assign(Object.assign({},o),{isRestricted:W})})},gt=!!(null==B?void 0:B[tt])&&!!Object.keys(null!==(w=null===(R=null==B?void 0:B[tt])||void 0===R?void 0:R.products)&&void 0!==w?w:{}).length;return t("div",{children:[t(O,{children:[e(h,{Icon:o,height:16,onClick:()=>{M("collections")}}),e(f,{style:{color:a.content.secondary},children:V.name})]}),!U&&e("div",{style:{padding:16,height:"76px",borderBottom:"1px solid #E0E0E0"},children:e(m,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>nt&&ct.length?e(g,{size:"small",color:a.content.primary}):e(r,{})},id:"listInput",height:"24px",type:"text",value:ct,onChangeText:t=>{t.length&&t.trim().length?rt(t):rt("")},placeholder:"Search using ID, Name or SKU ID"})}),Object.keys((null==st?void 0:st.products)||[]).length>0&&!ut&&!ct.length&&!z&&"-1"!==tt&&t(C,{children:[e(u,{isChecked:gt,isPartiallyChecked:S(tt,st,B,G),onValueChange:function(t){t?pt():F({type:"unselected",data:{id:tt}})}}),e("div",{style:{width:40,height:40},children:e(c,{})}),e(v,{children:"All Products"})]}),e(p,{hasData:!(Object.keys((null==st?void 0:st.products)||[]).length<10)&&!!Object.keys((null==st?void 0:st.products)||[]).length,fetchMore:()=>(ot.current=!0,J(tt,K,$,10,et.current).then(t=>{let e=!1;if(Object.keys(t).length||(e=!0),Object.keys(t).length){const e=st;e.products=Object.assign(Object.assign({},st.products),t),lt(Object.assign({},e));const o=I(t);ht(o,t)}return N(!1),ot.current=!1,et.current+=1,e})),containerRef:Z,children:Object.keys((null==st?void 0:st.products)||[]).length?Object.keys(st.products||[]).map(t=>e(y,{outOfStockAction:H,collectionId:tt,isProductPartiallyChecked:x(tt,t,B,st,G),productId:t,data:st.products[t],selectedData:B,selectedCollectionsDispatch:F,viewOnly:!_&&!!ut,upliftAdditions:mt,hideProductCheckbox:z,hideVariantCheckbox:L,hideProductVariants:G,pickerType:q,onProductDetailClick:X,showProductDetailInfoIcon:Y},t)):nt?e(b,{limit:10}):e(j,{title:"No products to show",subtitle:ct.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})})]})};export{T as ProductsScreen};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r,useEffect as s}from"react";import{DragDropContext as c}from"react-beautiful-dnd";import{COLORS as i}from"../../constants/Theme.js";import{IconButton as n}from"../icon-button/IconButton.js";import{BodyCaption as l}from"../TypographyStyle.js";import{EmptyState as a}from"./emptyState.js";import{parseSelectedVariantsToArray as p}from"./helpers/ProductHelper.js";import{SelectedScreenHeader as d}from"./style.js";import{fetchFbStatusCollection as m}from"./utility.js";import{VariantsList as u,VariantsGrid as f}from"./variantComponents.js";const h=h=>{const{selectedCollections:y,selectedCollectionsDispatch:j,setScreen:S,rearrangeViewType:C,outOfStockAction:g,scrollContainerRef:b,storeId:v,fbStatusFetcher:T,appType:V}=h,[k,w]=r(p(y));s((()=>{w(p(y))}),[y]),s((()=>{var t;null===(t=null==b?void 0:b.current)||void 0===t||t.scrollTo({top:0}),m(y,v,V,j,T,"update")}),[]);return t(c,{onDragEnd:t=>{if(!t.destination)return;const e=k,[o]=e.splice(t.source.index,1);e.splice(t.destination.index,0,o),e.forEach(((t,e)=>{t.displayOrder=e})),w(e)},children:[t(d,{children:[e(n,{Icon:o,width:16,height:16,color:i.content.secondary,onClick:()=>{S("collections")}}),e(l,{color:i.content.secondary,children:"All Products"})]}),Object.keys(y).length>0?"list"===C?e(u,{selectedVariants:k,setSelectedVariants:w,selectedCollectionsDispatch:j,outOfStockAction:g}):e(f,{selectedVariants:k,setSelectedVariants:w,selectedCollectionsDispatch:j}):e(a,{title:"No Products Selected",subtitle:"Selected products will appear here"})]})};export{h as RearrangeScreen};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r,useEffect as s}from"react";import{DragDropContext as c}from"react-beautiful-dnd";import{COLORS as i}from"../../constants/Theme.js";import{IconButton as n}from"../icon-button/IconButton.js";import{BodyCaption as l}from"../TypographyStyle.js";import{EmptyState as a}from"./emptyState.js";import{parseSelectedVariantsToArray as p}from"./helpers/ProductHelper.js";import{SelectedScreenHeader as d}from"./style.js";import{fetchFbStatusCollection as m}from"./utility.js";import{VariantsList as u,VariantsGrid as f}from"./variantComponents.js";const h=h=>{const{selectedCollections:y,selectedCollectionsDispatch:j,setScreen:S,rearrangeViewType:C,outOfStockAction:g,scrollContainerRef:b,storeId:v,fbStatusFetcher:T,appType:V}=h,[k,w]=r(p(y));s(()=>{w(p(y))},[y]),s(()=>{var t;null===(t=null==b?void 0:b.current)||void 0===t||t.scrollTo({top:0}),m(y,v,V,j,T,"update")},[]);return t(c,{onDragEnd:t=>{if(!t.destination)return;const e=k,[o]=e.splice(t.source.index,1);e.splice(t.destination.index,0,o),e.forEach((t,e)=>{t.displayOrder=e}),w(e)},children:[t(d,{children:[e(n,{Icon:o,width:16,height:16,color:i.content.secondary,onClick:()=>{S("collections")}}),e(l,{color:i.content.secondary,children:"All Products"})]}),Object.keys(y).length>0?"list"===C?e(u,{selectedVariants:k,setSelectedVariants:w,selectedCollectionsDispatch:j,outOfStockAction:g}):e(f,{selectedVariants:k,setSelectedVariants:w,selectedCollectionsDispatch:j}):e(a,{title:"No Products Selected",subtitle:"Selected products will appear here"})]})};export{h as RearrangeScreen};
@@ -1 +1 @@
1
- import{jsxs as o,jsx as e,Fragment as t}from"react/jsx-runtime";import i from"../../assets/icons/arrow_left.svg.js";import{useEffect as l}from"react";import{IconButton as c}from"../icon-button/IconButton.js";import{BodyCaption as d}from"../TypographyStyle.js";import{CollectionCard as s}from"./collectionScreen.js";import{EmptyState as r}from"./emptyState.js";import{ProductGroup as n}from"./product.js";import{SelectedScreenHeader as u}from"./style.js";import{fetchFbStatusCollection as a,isCollectionPartiallyChecked as p,isProductPartiallyChecked as h,liftTheStateUp as v}from"./utility.js";const m=m=>{var C;const{customCollectionRestriction:k,selectedCollections:y,searchedCollections:b,searchedCollectionsDispatch:f,selectedCollectionsDispatch:j,setScreen:O,collections:S,onBackPress:I,hideVariantCheckbox:P,pickerType:g,hideProductVariants:x,hideProductCheckbox:D,storeId:T,fbStatusFetcher:V,setCollectionId:w,setSelectedCollectionId:A,hideCollectionCheckbox:L,renderWithoutModal:R,outOfStockAction:W,appType:B,limit:M,exactLimit:N}=m;l((()=>{var o;a(null!==(o=b.products)&&void 0!==o?o:{},T,B,f,V,"setProducts")}),[null==b?void 0:b.products]);const E=!!k&&(null==y?void 0:y.isCustom),F=Object.keys(y||{}).filter((o=>"isCustom"!==o)).length;return o("div",{children:[o(u,{children:[e(c,{Icon:i,onClick:()=>{O("collections"),I()}}),e(d,{children:(null===(C=Object.keys(null==b?void 0:b.collections))||void 0===C?void 0:C.length)?"Searched Collections & Products":"Searched Products"})]}),e("div",{children:Object.keys(null==b?void 0:b.products).length||Object.keys(null==b?void 0:b.collections).length?o(t,{children:[e(t,{children:Object.keys(null==b?void 0:b.collections).map((o=>{const t=!!(null==y?void 0:y[o]),i="COLLECTION"===g&&!t&&(!!N&&F>=N||!!M&&F>=M);return e(s,{customCollectionRestriction:k,data:null==S?void 0:S[o],isDisabled:E&&!(null==y?void 0:y[o])||i,isChecked:t,isPartiallyChecked:p(o,null==S?void 0:S[o],y,x),selectedCollectionsDispatch:j,setCollectionId:w,setSelectedCollectionId:A,setScreen:O,id:o,hideCollectionCheckbox:L||"-1"===o,selectedCollections:y,renderWithoutModal:R,pickerType:g,usedInSearch:!0},o)}))}),e(t,{children:Object.keys(null==b?void 0:b.products).map((o=>{var t,i;return Object.keys((null===(i=null===(t=null==b?void 0:b.products)||void 0===t?void 0:t[o])||void 0===i?void 0:i.products)||[]).map((t=>{var i,l,c;let d=!1;return(null===(i=null==b?void 0:b.products)||void 0===i?void 0:i.isCustom)&&(d=!0),e(n,{collectionId:o,upliftAdditions:(e,t)=>((o,e,t)=>{var i;const l=v(t,null===(i=null==b?void 0:b.products)||void 0===i?void 0:i[o]);j({type:e,data:Object.assign(Object.assign({},l),{isRestricted:k})})})(o,e,t),productId:t,data:(null===(l=null==b?void 0:b.products)||void 0===l?void 0:l[o].products)[t],isProductPartiallyChecked:h(o,t,y,null===(c=b.products)||void 0===c?void 0:c[o],x),selectedData:y,selectedCollectionsDispatch:j,viewOnly:d,hideProductCheckbox:D,hideVariantCheckbox:P,hideProductVariants:x,pickerType:g,outOfStockAction:W},t)}))}))})]}):e(r,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};export{m as SearchScreen};
1
+ import{jsxs as o,jsx as e,Fragment as t}from"react/jsx-runtime";import i from"../../assets/icons/arrow_left.svg.js";import{useEffect as l}from"react";import{IconButton as c}from"../icon-button/IconButton.js";import{BodyCaption as d}from"../TypographyStyle.js";import{CollectionCard as s}from"./collectionScreen.js";import{EmptyState as r}from"./emptyState.js";import{ProductGroup as n}from"./product.js";import{SelectedScreenHeader as u}from"./style.js";import{fetchFbStatusCollection as a,isCollectionPartiallyChecked as p,isProductPartiallyChecked as h,liftTheStateUp as v}from"./utility.js";const m=m=>{var C;const{customCollectionRestriction:k,selectedCollections:y,searchedCollections:b,searchedCollectionsDispatch:f,selectedCollectionsDispatch:j,setScreen:O,collections:S,onBackPress:I,hideVariantCheckbox:P,pickerType:g,hideProductVariants:x,hideProductCheckbox:D,storeId:T,fbStatusFetcher:V,setCollectionId:w,setSelectedCollectionId:A,hideCollectionCheckbox:L,renderWithoutModal:R,outOfStockAction:W,appType:B,limit:M,exactLimit:N}=m;l(()=>{var o;a(null!==(o=b.products)&&void 0!==o?o:{},T,B,f,V,"setProducts")},[null==b?void 0:b.products]);const E=!!k&&(null==y?void 0:y.isCustom),F=Object.keys(y||{}).filter(o=>"isCustom"!==o).length;return o("div",{children:[o(u,{children:[e(c,{Icon:i,onClick:()=>{O("collections"),I()}}),e(d,{children:(null===(C=Object.keys(null==b?void 0:b.collections))||void 0===C?void 0:C.length)?"Searched Collections & Products":"Searched Products"})]}),e("div",{children:Object.keys(null==b?void 0:b.products).length||Object.keys(null==b?void 0:b.collections).length?o(t,{children:[e(t,{children:Object.keys(null==b?void 0:b.collections).map(o=>{const t=!!(null==y?void 0:y[o]),i="COLLECTION"===g&&!t&&(!!N&&F>=N||!!M&&F>=M);return e(s,{customCollectionRestriction:k,data:null==S?void 0:S[o],isDisabled:E&&!(null==y?void 0:y[o])||i,isChecked:t,isPartiallyChecked:p(o,null==S?void 0:S[o],y,x),selectedCollectionsDispatch:j,setCollectionId:w,setSelectedCollectionId:A,setScreen:O,id:o,hideCollectionCheckbox:L||"-1"===o,selectedCollections:y,renderWithoutModal:R,pickerType:g,usedInSearch:!0},o)})}),e(t,{children:Object.keys(null==b?void 0:b.products).map(o=>{var t,i;return Object.keys((null===(i=null===(t=null==b?void 0:b.products)||void 0===t?void 0:t[o])||void 0===i?void 0:i.products)||[]).map(t=>{var i,l,c;let d=!1;return(null===(i=null==b?void 0:b.products)||void 0===i?void 0:i.isCustom)&&(d=!0),e(n,{collectionId:o,upliftAdditions:(e,t)=>((o,e,t)=>{var i;const l=v(t,null===(i=null==b?void 0:b.products)||void 0===i?void 0:i[o]);j({type:e,data:Object.assign(Object.assign({},l),{isRestricted:k})})})(o,e,t),productId:t,data:(null===(l=null==b?void 0:b.products)||void 0===l?void 0:l[o].products)[t],isProductPartiallyChecked:h(o,t,y,null===(c=b.products)||void 0===c?void 0:c[o],x),selectedData:y,selectedCollectionsDispatch:j,viewOnly:d,hideProductCheckbox:D,hideVariantCheckbox:P,hideProductVariants:x,pickerType:g,outOfStockAction:W},t)})})})]}):e(r,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};export{m as SearchScreen};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e,Fragment as r}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useRef as c,useReducer as i,useEffect as n}from"react";import{IconButton as s}from"../icon-button/IconButton.js";import{BodyCaption as l}from"../TypographyStyle.js";import{EmptyState as d}from"./emptyState.js";import{ProductGroup as u}from"./product.js";import{paginationReducer as a}from"./reducers.js";import{SelectedScreenHeader as p}from"./style.js";import{paginateSelectedItems as m,fetchFbStatusCollection as f,isProductPartiallyChecked as h}from"./utility.js";const y=y=>{const{selectedCollections:v,selectedCollectionsDispatch:j,setScreen:b,collections:S,hideProductVariants:k=!1,outOfStockAction:I,storeId:O,fbStatusFetcher:g,appType:C}=y,P=c(0),w=c(null),[A,D]=i(a,{});n((()=>{P.current=0;const t=m(v,10,0);D({type:"paginate",data:t}),f(t,O,C,D,g,"set"),P.current+=1}),[]),n((()=>{D({type:"filter",data:v})}),[v]),n((()=>{const t=new IntersectionObserver((t=>{if(t[0].isIntersecting&&P.current>0){const t=m(v,10,P.current);D({type:"paginate",data:t}),f(t,O,C,D,g,"update"),P.current+=1}}),{threshold:1});return w.current&&t.observe(w.current),()=>{w.current&&t.unobserve(w.current)}}),[w,v]);const x=v;return t("div",{children:[t(p,{children:[e(s,{Icon:o,onClick:()=>{b("collections")}}),e(l,{children:"Selected Products"})]}),t("div",{children:[Object.keys(A).length>0?e(r,{children:Object.keys(A).map((t=>{var r;return Object.keys((null===(r=null==A?void 0:A[t])||void 0===r?void 0:r.products)||[]).map((r=>{let o=!1;return(null==x?void 0:x.isCustom)&&(o=!0),e(u,{upliftAdditions:null,collectionId:t,productId:r,data:A[t].products[r],isProductPartiallyChecked:h(t,r,x,null==S?void 0:S[t],k),selectedData:x,selectedCollectionsDispatch:j,viewOnly:o,hideProductVariants:k,outOfStockAction:I},r)}))}))}):e(d,{title:"No Products Selected",subtitle:"Select products will appear here"}),e("div",{ref:w})]})]})};export{y as SelectedScreen};
1
+ import{jsxs as t,jsx as e,Fragment as r}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useRef as c,useReducer as i,useEffect as n}from"react";import{IconButton as s}from"../icon-button/IconButton.js";import{BodyCaption as l}from"../TypographyStyle.js";import{EmptyState as d}from"./emptyState.js";import{ProductGroup as u}from"./product.js";import{paginationReducer as a}from"./reducers.js";import{SelectedScreenHeader as p}from"./style.js";import{paginateSelectedItems as m,fetchFbStatusCollection as f,isProductPartiallyChecked as h}from"./utility.js";const y=y=>{const{selectedCollections:v,selectedCollectionsDispatch:j,setScreen:b,collections:S,hideProductVariants:k=!1,outOfStockAction:I,storeId:O,fbStatusFetcher:g,appType:C}=y,P=c(0),w=c(null),[A,D]=i(a,{});n(()=>{P.current=0;const t=m(v,10,0);D({type:"paginate",data:t}),f(t,O,C,D,g,"set"),P.current+=1},[]),n(()=>{D({type:"filter",data:v})},[v]),n(()=>{const t=new IntersectionObserver(t=>{if(t[0].isIntersecting&&P.current>0){const t=m(v,10,P.current);D({type:"paginate",data:t}),f(t,O,C,D,g,"update"),P.current+=1}},{threshold:1});return w.current&&t.observe(w.current),()=>{w.current&&t.unobserve(w.current)}},[w,v]);const x=v;return t("div",{children:[t(p,{children:[e(s,{Icon:o,onClick:()=>{b("collections")}}),e(l,{children:"Selected Products"})]}),t("div",{children:[Object.keys(A).length>0?e(r,{children:Object.keys(A).map(t=>{var r;return Object.keys((null===(r=null==A?void 0:A[t])||void 0===r?void 0:r.products)||[]).map(r=>{let o=!1;return(null==x?void 0:x.isCustom)&&(o=!0),e(u,{upliftAdditions:null,collectionId:t,productId:r,data:A[t].products[r],isProductPartiallyChecked:h(t,r,x,null==S?void 0:S[t],k),selectedData:x,selectedCollectionsDispatch:j,viewOnly:o,hideProductVariants:k,outOfStockAction:I},r)})})}):e(d,{title:"No Products Selected",subtitle:"Select products will appear here"}),e("div",{ref:w})]})]})};export{y as SelectedScreen};
@@ -1 +1 @@
1
- import{cloneDeep as o}from"lodash";const l=(l,i)=>{const n=o(i);if(delete n.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:n})).productId&&i.products){const t=o(i.products[l.productId]);(null==t?void 0:t.variants)&&delete t.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:n,productOnlyData:t})}return l};function i(o,l,i){var t;const d={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const u=o[s],c=n(u.products,l,i-v);c&&Object.keys(c).length>0&&(d[s]=Object.assign(Object.assign({},u),{products:c})),v+=Object.keys(null!==(t=u.products)&&void 0!==t?t:{}).length}return d}function n(o,l,i){if(!o)return{};const n=Object.keys(o).slice(i,i+l),t={};return n.forEach((l=>{t[l]=o[l]})),t}const t=(o,l,i)=>{Object.keys(o).forEach((l=>{var i,n;const t=null!==(n=null===(i=o[l])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(t).forEach((i=>{var n,t,d,v;const s=null!==(v=null===(d=null===(t=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===t?void 0:t[i])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((n=>{var t,d,v,s;const u=null===(s=null===(v=null===(d=null===(t=o[l])||void 0===t?void 0:t.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n];u&&!u.fbStatus&&(u.fbStatus="APPROVED")}))}))})),l({type:i,data:o})},d=function(o,l,i,n,d){let v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"paged";d||t(o,n,v);const s=(o=>{const l=[];return Object.keys(o).forEach((i=>{var n,t;const d=null!==(t=null===(n=o[i])||void 0===n?void 0:n.products)&&void 0!==t?t:{};Object.keys(d).forEach((n=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=o[i])||void 0===t?void 0:t.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=o[i])||void 0===d?void 0:d.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];(null==c?void 0:c.fbStatus)||l.push(t)}))}))})),l})(o);s.length>0&&d&&d(l,s,i).then((l=>{const i=Object.assign({},o);Object.keys(i).forEach((o=>{var n,t;const d=null!==(t=null===(n=i[o])||void 0===n?void 0:n.products)&&void 0!==t?t:{};Object.keys(d).forEach((n=>{var t,d,v,s;const u=null!==(s=null===(v=null===(d=null===(t=i[o])||void 0===t?void 0:t.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach((t=>{var d,v,s,u;const c=null===(u=null===(s=null===(v=null===(d=i[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[t];c&&"REJECTED"===l[t]?c.fbStatus="REJECTED":c&&"APPROVED"===l[t]&&(c.fbStatus="APPROVED")}))}))})),n({type:v,data:i})})).catch((l=>{console.error("Error in fbStatusFetcher",l),t(o,n,v)}))},v=(o,l)=>{const i=[];return Object.keys(null!=o?o:{}).forEach((n=>{var t,d;const v=null!==(d=null===(t=null==o?void 0:o[n])||void 0===t?void 0:t.variants)&&void 0!==d?d:{};Object.keys(v).forEach((t=>{var d,v,s,u,c;let r;r=l?null===(s=null===(v=null===(d=null==l?void 0:l.products)||void 0===d?void 0:d[n])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[t]:null===(c=null===(u=null==o?void 0:o[n])||void 0===u?void 0:u.variants)||void 0===c?void 0:c[t],(null==r?void 0:r.fbStatus)||i.push(t)}))})),i},s=(o,l,i,n,t)=>{const d=Object.assign({},o);if(Object.keys(o).forEach((l=>{var i,n;Object.keys(null!==(n=null===(i=null==o?void 0:o[l])||void 0===i?void 0:i.variants)&&void 0!==n?n:{}).forEach((i=>{var n,t;const v=null===(n=null==o?void 0:o[l].variants)||void 0===n?void 0:n[i];v&&(v.fbStatus="APPROVED");const s=null===(t=null==d?void 0:d[l])||void 0===t?void 0:t.variants;s&&s[i]&&(s[i]=v)}))})),n&&t){const o=Object.assign({},n);o.products=d,t(o),l({type:"productsPaged",data:{collectionId:i,products:d}})}else l({type:"productsPaged",data:{collectionId:i,products:d}})},u=o=>{const l=Object.keys(o.variants||[]);let i=!1;return!(l.length<=1)||(l.forEach((l=>{var n,t;i=null!==(t=null===(n=o.variants)||void 0===n?void 0:n[l].name.includes(o.name))&&void 0!==t&&t})),!i)},c=(o,l,i,n,t)=>{var d,v,s,u,c,r,a,e,p,b,O,f,j,h,y,g,E,k,P;let D=0,V=0;if(null===(v=null===(d=null==i?void 0:i[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[l]){if(t)return!1;const d=(null===(c=null===(u=null===(s=null==i?void 0:i[o])||void 0===s?void 0:s.products)||void 0===u?void 0:u[l])||void 0===c?void 0:c.variants)||[];if(1===Object.keys(d).length)for(const n in d){const t=null===(a=null===(r=null==i?void 0:i[o])||void 0===r?void 0:r.products)||void 0===a?void 0:a[l],d=null===(O=null===(b=null===(p=null===(e=null==i?void 0:i[o])||void 0===e?void 0:e.products)||void 0===p?void 0:p[l])||void 0===b?void 0:b.variants)||void 0===O?void 0:O[n];if(null===(f=null==d?void 0:d.name)||void 0===f?void 0:f.includes(null!==(j=null==t?void 0:t.name)&&void 0!==j?j:""))return!1}if(null===(g=Object.keys((null===(y=null===(h=null==n?void 0:n.products)||void 0===h?void 0:h[l])||void 0===y?void 0:y.variants)||[]))||void 0===g||g.forEach((()=>V++)),Object.keys((null===(P=null===(k=null===(E=null==i?void 0:i[o])||void 0===E?void 0:E.products)||void 0===k?void 0:k[l])||void 0===P?void 0:P.variants)||[]).forEach((()=>D++)),D>0&&V!==D)return!0}return!1},r=function(o,l,i){var n,t,d,v;let s=0,u=0;if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]){const v=null!==(n=null==l?void 0:l.products)&&void 0!==n?n:{};s=Object.keys(v).length;const c=null!==(d=null===(t=i[o])||void 0===t?void 0:t.products)&&void 0!==d?d:{};u=Object.keys(c).length}else if(i[o]){const n=null==l?void 0:l.products;n&&Object.keys(n).forEach((o=>{var l;const i=null===(l=n[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach((o=>s+=1))}));const t=null===(v=i[o])||void 0===v?void 0:v.products;if(t&&Object.keys(t).forEach((o=>{var l;const i=null===(l=t[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach((o=>u+=1))})),s<=0&&u>0)return!1}return u>0&&s!==u},a=(l,i,n)=>Object.keys(l).reduce(((t,d)=>{var v;return d in i?(t[d]=Object.assign(Object.assign({},l[d]),{products:Object.keys(null!==(v=l[d].products)&&void 0!==v?v:{}).reduce(((t,v)=>{var s,u,c,r,a,e,p,b,O,f;const j=null===(s=i[d].products)||void 0===s?void 0:s[v],h=null===(r=null===(c=null===(u=null==n?void 0:n.products)||void 0===u?void 0:u[d])||void 0===c?void 0:c.products)||void 0===r?void 0:r[v];return j?t[v]=Object.assign(Object.assign({},(null===(a=l[d].products)||void 0===a?void 0:a[v])||{}),{allVariants:o(j.variants)}):h?t[v]=Object.assign(Object.assign({},(null===(e=l[d].products)||void 0===e?void 0:e[v])||{}),{allVariants:o(h.variants)}):(null===(b=null===(p=l[d].products)||void 0===p?void 0:p[v])||void 0===b?void 0:b.allVariants)&&(t[v]=Object.assign(Object.assign({},(null===(O=l[d].products)||void 0===O?void 0:O[v])||{}),{allVariants:o(null===(f=l[d].products)||void 0===f?void 0:f[v].allVariants)})),t}),{})}),t):t}),{}),e=(o,l)=>{var i;if(l)return o.skuId;const n=Object.values(null!==(i=null==o?void 0:o.variants)&&void 0!==i?i:{});return 1===n.length&&n[0].name.includes(o.name)?n[0].skuId:""};export{d as fetchFbStatusCollection,e as getSkuId,v as getVariantIdsToFetchAtProductLevel,r as isCollectionPartiallyChecked,c as isProductPartiallyChecked,l as liftTheStateUp,s as markVariantsAsApprovedProductsLevel,i as paginateSelectedItems,u as shouldShowVariant,a as updateAllVariantsForSelectedProducts};
1
+ import{cloneDeep as o}from"lodash";const l=(l,i)=>{const n=o(i);if(delete n.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:n})).productId&&i.products){const d=o(i.products[l.productId]);(null==d?void 0:d.variants)&&delete d.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:n,productOnlyData:d})}return l};function i(o,l,i){var d;const t={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const u=o[s],c=n(u.products,l,i-v);c&&Object.keys(c).length>0&&(t[s]=Object.assign(Object.assign({},u),{products:c})),v+=Object.keys(null!==(d=u.products)&&void 0!==d?d:{}).length}return t}function n(o,l,i){if(!o)return{};const n=Object.keys(o).slice(i,i+l),d={};return n.forEach(l=>{d[l]=o[l]}),d}const d=(o,l,i)=>{Object.keys(o).forEach(l=>{var i,n;const d=null!==(n=null===(i=o[l])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(d).forEach(i=>{var n,d,t,v;const s=null!==(v=null===(t=null===(d=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===d?void 0:d[i])||void 0===t?void 0:t.variants)&&void 0!==v?v:{};Object.keys(s).forEach(n=>{var d,t,v,s;const u=null===(s=null===(v=null===(t=null===(d=o[l])||void 0===d?void 0:d.products)||void 0===t?void 0:t[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n];u&&!u.fbStatus&&(u.fbStatus="APPROVED")})})}),l({type:i,data:o})},t=(o,l,i,n,t,v="paged")=>{t||d(o,n,v);const s=(o=>{const l=[];return Object.keys(o).forEach(i=>{var n,d;const t=null!==(d=null===(n=o[i])||void 0===n?void 0:n.products)&&void 0!==d?d:{};Object.keys(t).forEach(n=>{var d,t,v,s;const u=null!==(s=null===(v=null===(t=null===(d=o[i])||void 0===d?void 0:d.products)||void 0===t?void 0:t[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach(d=>{var t,v,s,u;const c=null===(u=null===(s=null===(v=null===(t=o[i])||void 0===t?void 0:t.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[d];(null==c?void 0:c.fbStatus)||l.push(d)})})}),l})(o);s.length>0&&t&&t(l,s,i).then(l=>{const i=Object.assign({},o);Object.keys(i).forEach(o=>{var n,d;const t=null!==(d=null===(n=i[o])||void 0===n?void 0:n.products)&&void 0!==d?d:{};Object.keys(t).forEach(n=>{var d,t,v,s;const u=null!==(s=null===(v=null===(t=null===(d=i[o])||void 0===d?void 0:d.products)||void 0===t?void 0:t[n])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(u).forEach(d=>{var t,v,s,u;const c=null===(u=null===(s=null===(v=null===(t=i[o])||void 0===t?void 0:t.products)||void 0===v?void 0:v[n])||void 0===s?void 0:s.variants)||void 0===u?void 0:u[d];c&&"REJECTED"===l[d]?c.fbStatus="REJECTED":c&&"APPROVED"===l[d]&&(c.fbStatus="APPROVED")})})}),n({type:v,data:i})}).catch(l=>{console.error("Error in fbStatusFetcher",l),d(o,n,v)})},v=(o,l)=>{const i=[];return Object.keys(null!=o?o:{}).forEach(n=>{var d,t;const v=null!==(t=null===(d=null==o?void 0:o[n])||void 0===d?void 0:d.variants)&&void 0!==t?t:{};Object.keys(v).forEach(d=>{var t,v,s,u,c;let r;r=l?null===(s=null===(v=null===(t=null==l?void 0:l.products)||void 0===t?void 0:t[n])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[d]:null===(c=null===(u=null==o?void 0:o[n])||void 0===u?void 0:u.variants)||void 0===c?void 0:c[d],(null==r?void 0:r.fbStatus)||i.push(d)})}),i},s=(o,l,i,n,d)=>{const t=Object.assign({},o);if(Object.keys(o).forEach(l=>{var i,n;Object.keys(null!==(n=null===(i=null==o?void 0:o[l])||void 0===i?void 0:i.variants)&&void 0!==n?n:{}).forEach(i=>{var n,d;const v=null===(n=null==o?void 0:o[l].variants)||void 0===n?void 0:n[i];v&&(v.fbStatus="APPROVED");const s=null===(d=null==t?void 0:t[l])||void 0===d?void 0:d.variants;s&&s[i]&&(s[i]=v)})}),n&&d){const o=Object.assign({},n);o.products=t,d(o),l({type:"productsPaged",data:{collectionId:i,products:t}})}else l({type:"productsPaged",data:{collectionId:i,products:t}})},u=o=>{const l=Object.keys(o.variants||[]);let i=!1;return!(l.length<=1)||(l.forEach(l=>{var n,d;i=null!==(d=null===(n=o.variants)||void 0===n?void 0:n[l].name.includes(o.name))&&void 0!==d&&d}),!i)},c=(o,l,i,n,d)=>{var t,v,s,u,c,r,a,e,p,b,O,f,j,y,h,E,g,k,P;let D=0,V=0;if(null===(v=null===(t=null==i?void 0:i[o])||void 0===t?void 0:t.products)||void 0===v?void 0:v[l]){if(d)return!1;const t=(null===(c=null===(u=null===(s=null==i?void 0:i[o])||void 0===s?void 0:s.products)||void 0===u?void 0:u[l])||void 0===c?void 0:c.variants)||[];if(1===Object.keys(t).length)for(const n in t){const d=null===(a=null===(r=null==i?void 0:i[o])||void 0===r?void 0:r.products)||void 0===a?void 0:a[l],t=null===(O=null===(b=null===(p=null===(e=null==i?void 0:i[o])||void 0===e?void 0:e.products)||void 0===p?void 0:p[l])||void 0===b?void 0:b.variants)||void 0===O?void 0:O[n];if(null===(f=null==t?void 0:t.name)||void 0===f?void 0:f.includes(null!==(j=null==d?void 0:d.name)&&void 0!==j?j:""))return!1}if(null===(E=Object.keys((null===(h=null===(y=null==n?void 0:n.products)||void 0===y?void 0:y[l])||void 0===h?void 0:h.variants)||[]))||void 0===E||E.forEach(()=>V++),Object.keys((null===(P=null===(k=null===(g=null==i?void 0:i[o])||void 0===g?void 0:g.products)||void 0===k?void 0:k[l])||void 0===P?void 0:P.variants)||[]).forEach(()=>D++),D>0&&V!==D)return!0}return!1},r=(o,l,i,n=!1)=>{var d,t,v,s;let u=0,c=0;if(n){const n=null!==(d=null==l?void 0:l.products)&&void 0!==d?d:{};u=Object.keys(n).length;const s=null!==(v=null===(t=i[o])||void 0===t?void 0:t.products)&&void 0!==v?v:{};c=Object.keys(s).length}else if(i[o]){const n=null==l?void 0:l.products;n&&Object.keys(n).forEach(o=>{var l;const i=null===(l=n[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach(o=>u+=1)});const d=null===(s=i[o])||void 0===s?void 0:s.products;if(d&&Object.keys(d).forEach(o=>{var l;const i=null===(l=d[o])||void 0===l?void 0:l.variants;i&&Object.keys(i).forEach(o=>c+=1)}),u<=0&&c>0)return!1}return c>0&&u!==c},a=(l,i,n)=>Object.keys(l).reduce((d,t)=>{var v;return t in i?(d[t]=Object.assign(Object.assign({},l[t]),{products:Object.keys(null!==(v=l[t].products)&&void 0!==v?v:{}).reduce((d,v)=>{var s,u,c,r,a,e,p,b,O,f;const j=null===(s=i[t].products)||void 0===s?void 0:s[v],y=null===(r=null===(c=null===(u=null==n?void 0:n.products)||void 0===u?void 0:u[t])||void 0===c?void 0:c.products)||void 0===r?void 0:r[v];return j?d[v]=Object.assign(Object.assign({},(null===(a=l[t].products)||void 0===a?void 0:a[v])||{}),{allVariants:o(j.variants)}):y?d[v]=Object.assign(Object.assign({},(null===(e=l[t].products)||void 0===e?void 0:e[v])||{}),{allVariants:o(y.variants)}):(null===(b=null===(p=l[t].products)||void 0===p?void 0:p[v])||void 0===b?void 0:b.allVariants)&&(d[v]=Object.assign(Object.assign({},(null===(O=l[t].products)||void 0===O?void 0:O[v])||{}),{allVariants:o(null===(f=l[t].products)||void 0===f?void 0:f[v].allVariants)})),d},{})}),d):d},{}),e=(o,l)=>{var i;if(l)return o.skuId;const n=Object.values(null!==(i=null==o?void 0:o.variants)&&void 0!==i?i:{});return 1===n.length&&n[0].name.includes(o.name)?n[0].skuId:""};export{t as fetchFbStatusCollection,e as getSkuId,v as getVariantIdsToFetchAtProductLevel,r as isCollectionPartiallyChecked,c as isProductPartiallyChecked,l as liftTheStateUp,s as markVariantsAsApprovedProductsLevel,i as paginateSelectedItems,u as shouldShowVariant,a as updateAllVariantsForSelectedProducts};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as a}from"react";import{Droppable as t,Draggable as d}from"react-beautiful-dnd";import{COLORS as n}from"../../constants/Theme.js";import{VariantCardListView as o,VariantCardGridView as l}from"./variant.js";const s=l=>{let{selectedVariants:s,setSelectedVariants:i,selectedCollectionsDispatch:p,outOfStockAction:c}=l;const[g,b]=a(-1);function f(e){if(null==e?void 0:e.transform){const r=`translate(0px, ${e.transform.split(",").pop()}`;return Object.assign(Object.assign({},e),{transform:r})}return e}return e(t,{droppableId:"droppable-list",children:(a,t)=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign({backgroundColor:n.surface.subdued,padding:"0.05px",height:s.length<8?"550px":"100%",overflow:"auto"},a.droppableProps.style),children:[s.map(((r,a)=>e("div",{style:{background:n.surface.hovered,margin:"5px",boxShadow:a===g?"0px 4px 12px rgba(0, 0, 0, 0.12)":""},onMouseEnter:()=>b(a),onMouseLeave:()=>b(-1),children:e(d,{draggableId:`${r.productId}-${r.variantId}`,index:a,children:(t,d)=>e("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:f(Object.assign(Object.assign({},t.draggableProps.style),t.draggableSnapshot)),children:e(o,{data:r,selectedCollectionsDispatch:p,onDelete:()=>{const e=s.slice();e[a].displayOrder=null,e.splice(a,1),i(e)},outOfStockAction:c},`${r.productId}-${r.variantId}`)}))},`${r.productId}-${r.variantId}`)},`${r.productId}-${r.variantId}`))),a.placeholder&&t.isDraggingOver?e("div",{style:{background:n.surface.hovered,margin:"5px"},children:a.placeholder}):null]}))})},i=a=>{let{selectedVariants:n}=a;return e(t,{droppableId:"droppable-horizontal",children:a=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex"}),children:[e(t,{droppableId:"droppable-vertical",direction:"horizontal",children:a=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"}),children:[n.map(((a,t)=>e(d,{draggableId:`${a.productId}-${a.variantId}`,index:t,children:(t,d)=>r("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{children:[e(l,{data:a}),t.placeholder]}))},`${a.productId}-${a.variantId}`))),a.placeholder]}))}),a.placeholder]}))})};export{i as VariantsGrid,s as VariantsList};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as a}from"react";import{Droppable as t,Draggable as d}from"react-beautiful-dnd";import{COLORS as n}from"../../constants/Theme.js";import{VariantCardListView as o,VariantCardGridView as s}from"./variant.js";const l=({selectedVariants:s,setSelectedVariants:l,selectedCollectionsDispatch:i,outOfStockAction:p})=>{const[c,g]=a(-1);function b(e){if(null==e?void 0:e.transform){const r=`translate(0px, ${e.transform.split(",").pop()}`;return Object.assign(Object.assign({},e),{transform:r})}return e}return e(t,{droppableId:"droppable-list",children:(a,t)=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign({backgroundColor:n.surface.subdued,padding:"0.05px",height:s.length<8?"550px":"100%",overflow:"auto"},a.droppableProps.style),children:[s.map((r,a)=>e("div",{style:{background:n.surface.hovered,margin:"5px",boxShadow:a===c?"0px 4px 12px rgba(0, 0, 0, 0.12)":""},onMouseEnter:()=>g(a),onMouseLeave:()=>g(-1),children:e(d,{draggableId:`${r.productId}-${r.variantId}`,index:a,children:(t,d)=>e("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:b(Object.assign(Object.assign({},t.draggableProps.style),t.draggableSnapshot)),children:e(o,{data:r,selectedCollectionsDispatch:i,onDelete:()=>{const e=s.slice();e[a].displayOrder=null,e.splice(a,1),l(e)},outOfStockAction:p},`${r.productId}-${r.variantId}`)}))},`${r.productId}-${r.variantId}`)},`${r.productId}-${r.variantId}`)),a.placeholder&&t.isDraggingOver?e("div",{style:{background:n.surface.hovered,margin:"5px"},children:a.placeholder}):null]}))})},i=({selectedVariants:a})=>e(t,{droppableId:"droppable-horizontal",children:n=>r("div",Object.assign({},n.droppableProps,{ref:n.innerRef,style:Object.assign(Object.assign({},n.droppableProps.style),{display:"flex"}),children:[e(t,{droppableId:"droppable-vertical",direction:"horizontal",children:t=>r("div",Object.assign({},t.droppableProps,{ref:t.innerRef,style:Object.assign(Object.assign({},t.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"}),children:[a.map((a,t)=>e(d,{draggableId:`${a.productId}-${a.variantId}`,index:t,children:(t,d)=>r("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{children:[e(s,{data:a}),t.placeholder]}))},`${a.productId}-${a.variantId}`)),t.placeholder]}))}),n.placeholder]}))});export{i as VariantsGrid,l as VariantsList};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import r from"../../assets/icons/checklistIcon.svg.js";const o=o=>{let{percentage:s,width:i=200,containerStyle:n}=o;const c=s<0?0:s>100?100:s,l=i/2-i/10,a=l*Math.PI*2,f=a-a*c/100,d=i/10,h=i/3;return t("div",{style:n,children:e("svg",{width:i,height:i,viewBox:`0 0 ${i} ${i}`,children:[t("defs",{children:e("linearGradient",{id:"gradientStroke",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[t("stop",{offset:"0%",stopColor:"#7000FF"}),t("stop",{offset:"100%",stopColor:"#AD00FF"})]})}),t("circle",{cx:i/2,cy:i/2,strokeWidth:d,r:l,strokeOpacity:.8,fill:"none",style:{stroke:"#ffffff"}}),t("circle",{cx:i/2,cy:i/2,strokeWidth:d,r:l,style:{stroke:"url(#gradientStroke)",strokeDasharray:a,strokeDashoffset:f},transform:`rotate(-90 ${i/2} ${i/2})`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),t(r,{x:i/2-h/2,width:h})]})})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import r from"../../assets/icons/checklistIcon.svg.js";const o=({percentage:o,width:s=200,containerStyle:i})=>{const n=o<0?0:o>100?100:o,c=s/2-s/10,l=c*Math.PI*2,a=l-l*n/100,f=s/10,d=s/3;return t("div",{style:i,children:e("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,children:[t("defs",{children:e("linearGradient",{id:"gradientStroke",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[t("stop",{offset:"0%",stopColor:"#7000FF"}),t("stop",{offset:"100%",stopColor:"#AD00FF"})]})}),t("circle",{cx:s/2,cy:s/2,strokeWidth:f,r:c,strokeOpacity:.8,fill:"none",style:{stroke:"#ffffff"}}),t("circle",{cx:s/2,cy:s/2,strokeWidth:f,r:c,style:{stroke:"url(#gradientStroke)",strokeDasharray:l,strokeDashoffset:a},transform:`rotate(-90 ${s/2} ${s/2})`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),t(r,{x:s/2-d/2,width:d})]})})};export{o as default};