@bikdotai/bik-component-library 0.0.728-beta.9 → 0.0.729-beta.0

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 (711) hide show
  1. package/dist/cjs/_virtual/jsx-runtime.js +1 -0
  2. package/dist/cjs/_virtual/react-jsx-runtime.development.js +1 -0
  3. package/dist/cjs/_virtual/react-jsx-runtime.production.min.js +1 -0
  4. package/dist/cjs/assets/bundle-c485438b.css +333 -0
  5. package/dist/cjs/assets/icons/PlusIcon.js +1 -1
  6. package/dist/cjs/assets/icons/searchIcon.js +1 -1
  7. package/dist/cjs/components/InfiniteScroll/InfiniteScroll.js +1 -1
  8. package/dist/cjs/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
  9. package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  10. package/dist/cjs/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
  11. package/dist/cjs/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
  12. package/dist/cjs/components/QueryBuilder/QueryBuilder.js +1 -1
  13. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
  14. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.js +1 -1
  15. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
  16. package/dist/cjs/components/QueryBuilder/components/AddNodeButton.js +1 -1
  17. package/dist/cjs/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
  18. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  19. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
  20. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
  21. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IgPicker.js +1 -1
  22. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
  23. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -1
  24. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -1
  25. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
  26. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
  27. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
  28. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/NoInput.js +1 -1
  29. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
  30. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  31. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  32. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
  33. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  34. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
  35. package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  36. package/dist/cjs/components/QueryBuilder/components/DeleteButton.js +1 -1
  37. package/dist/cjs/components/QueryBuilder/components/DropdownWrapper.js +1 -1
  38. package/dist/cjs/components/QueryBuilder/components/InputLoader.js +4 -4
  39. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js +2 -2
  40. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
  41. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
  42. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
  43. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
  44. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNode/QueryBuilderNode.js +1 -1
  45. package/dist/cjs/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
  46. package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
  47. package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  48. package/dist/cjs/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  49. package/dist/cjs/components/SearchFilter/components/SearchFilterItem.js +1 -1
  50. package/dist/cjs/components/SearchFilter/index.js +1 -1
  51. package/dist/cjs/components/TablePagination/TablePagination.js +1 -1
  52. package/dist/cjs/components/TablePagination/TablePaginationCard.js +1 -1
  53. package/dist/cjs/components/WhatsAppTextEditor/CustomEditor.styled.js +1 -1
  54. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  55. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
  56. package/dist/cjs/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
  57. package/dist/cjs/components/accordion/Accordion.js +1 -1
  58. package/dist/cjs/components/accordion/AccordionArrow.js +1 -1
  59. package/dist/cjs/components/action-button/ActionButtons.js +1 -1
  60. package/dist/cjs/components/add-variableV2/AddVariableV2.js +1 -1
  61. package/dist/cjs/components/add-variableV2/AddVariableV2SideModal.js +1 -1
  62. package/dist/cjs/components/ai-modals/ActivateBikAI.js +1 -1
  63. package/dist/cjs/components/ai-modals/AiCreditsExhausted.js +1 -1
  64. package/dist/cjs/components/ai-modals/AiCreditsLow.js +1 -1
  65. package/dist/cjs/components/ai-modals/AiSyncProgress.js +1 -1
  66. package/dist/cjs/components/alerts/Alert.js +1 -1
  67. package/dist/cjs/components/analytics-card/AnalyticsCard.js +1 -1
  68. package/dist/cjs/components/analytics-card/AnalyticsCard.styled.js +1 -1
  69. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
  70. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.js +1 -1
  71. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  72. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  73. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  74. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  75. package/dist/cjs/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
  76. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  77. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +1 -1
  78. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  79. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  80. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +2 -2
  81. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  82. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  83. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
  84. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  85. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
  86. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  87. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
  88. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.js +1 -1
  89. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  90. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/Chip.js +1 -1
  91. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/HorinzontalBar.js +1 -1
  92. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
  93. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js +1 -1
  94. package/dist/cjs/components/avatar/Avatar.js +1 -1
  95. package/dist/cjs/components/banner/AdBanner.js +1 -1
  96. package/dist/cjs/components/banner/Banner.styled.js +1 -1
  97. package/dist/cjs/components/banner/BannerInline.js +1 -1
  98. package/dist/cjs/components/banner/BannerWithImage.js +1 -1
  99. package/dist/cjs/components/banner/CardBanner.js +1 -1
  100. package/dist/cjs/components/banner/CardBannerWithImage.js +1 -1
  101. package/dist/cjs/components/bik-chatbot/components/AIChat.js +1 -1
  102. package/dist/cjs/components/bik-chatbot/components/BIKChatbot.js +1 -1
  103. package/dist/cjs/components/bik-chatbot/components/ChatLoadingState.js +13 -13
  104. package/dist/cjs/components/bik-chatbot/components/ChatWindow.js +21 -21
  105. package/dist/cjs/components/bik-chatbot/components/ThinkingIndicator.js +2 -2
  106. package/dist/cjs/components/bik-chatbot/contexts/AIContext.js +1 -1
  107. package/dist/cjs/components/bik-layout/BikHeader.js +1 -1
  108. package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
  109. package/dist/cjs/components/bik-layout/BikProfile.js +1 -1
  110. package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
  111. package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
  112. package/dist/cjs/components/bik-layout/FeatureModal.js +1 -1
  113. package/dist/cjs/components/bik-layout/FeatureModalV2.js +1 -1
  114. package/dist/cjs/components/bik-layout/PageLoader.js +1 -1
  115. package/dist/cjs/components/bik-layout/ShowShopifyRestrictedModal.js +1 -1
  116. package/dist/cjs/components/bik-layout/SidebarPopup.js +1 -1
  117. package/dist/cjs/components/bik-layout/SidebarSkeleton.js +1 -1
  118. package/dist/cjs/components/bik-layout/SimpleSidebar.js +1 -1
  119. package/dist/cjs/components/button/Button.js +1 -1
  120. package/dist/cjs/components/button/Button.styled.js +1 -1
  121. package/dist/cjs/components/buttonGroup/ButtonGroup.js +1 -1
  122. package/dist/cjs/components/card-selection-modal/CardSelectionModal.js +1 -1
  123. package/dist/cjs/components/card-selection-modal/CardSelectionModal.styled.js +1 -1
  124. package/dist/cjs/components/card-selector/CardSelector.js +1 -1
  125. package/dist/cjs/components/card-selector/CardSelectorGroup.js +1 -1
  126. package/dist/cjs/components/carousel/carousel.js +2 -2
  127. package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
  128. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +1 -1
  129. package/dist/cjs/components/carousel-preview/CustomCarouselArrows.js +1 -1
  130. package/dist/cjs/components/carousel-secondary/CarouselSecondary.js +1 -1
  131. package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.js +1 -1
  132. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  133. package/dist/cjs/components/checkList/CheckList.js +1 -1
  134. package/dist/cjs/components/checkList/CheckList.styled.js +1 -1
  135. package/dist/cjs/components/code-block/CodeBlock.js +1 -1
  136. package/dist/cjs/components/colourInput/ColourInput.js +1 -1
  137. package/dist/cjs/components/colourInput/ColourInput.styled.js +1 -1
  138. package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
  139. package/dist/cjs/components/country-code-picker/CountryCodePicker.styled.js +1 -1
  140. package/dist/cjs/components/curtain/Curtain.js +1 -1
  141. package/dist/cjs/components/custom-date-time/CustomDateTime.js +1 -1
  142. package/dist/cjs/components/custom-date-time/CustomDateTime.styled.js +1 -1
  143. package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  144. package/dist/cjs/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
  145. package/dist/cjs/components/dashboard-review-popup/DashboardReviewPopUp.styled.js +1 -1
  146. package/dist/cjs/components/dashboard-review-popup/components/FiveStar.js +1 -1
  147. package/dist/cjs/components/dashboard-review-popup/components/FiveStar.styled.js +1 -1
  148. package/dist/cjs/components/dashboard-review-popup/components/Form.js +1 -1
  149. package/dist/cjs/components/dashboard-review-popup/components/Form.styled.js +1 -1
  150. package/dist/cjs/components/dashboard-review-popup/components/ZeroState.js +1 -1
  151. package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +1 -1
  152. package/dist/cjs/components/data-source-panel/DataSourcePanel.js +1 -1
  153. package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.js +7 -7
  154. package/dist/cjs/components/datePicker/DatePicker.js +1 -1
  155. package/dist/cjs/components/datePicker/DatePicker.styled.d.ts +4 -4
  156. package/dist/cjs/components/datePicker/DatePicker.styled.js +1 -1
  157. package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
  158. package/dist/cjs/components/datePicker/TimePicker.js +1 -1
  159. package/dist/cjs/components/discount-modal/CouponExpiration/CouponExpiration.d.ts +1 -0
  160. package/dist/cjs/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
  161. package/dist/cjs/components/discount-modal/DiscountModal.d.ts +1 -0
  162. package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
  163. package/dist/cjs/components/discount-modal/DiscountModal.styled.js +1 -1
  164. package/dist/cjs/components/discount-modal/DiscountUtils.d.ts +1 -1
  165. package/dist/cjs/components/discount-modal/DiscountUtils.js +1 -1
  166. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +2 -0
  167. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  168. package/dist/cjs/components/discount-modal/DynamicCoupon/MinimumRequirementComponent.js +1 -1
  169. package/dist/cjs/components/discount-modal/DynamicCoupon/ZeroState.js +3 -3
  170. package/dist/cjs/components/discount-modal/StaticCoupon/StaticCoupon.d.ts +51 -1
  171. package/dist/cjs/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  172. package/dist/cjs/components/dot-pulse/DotPulse.js +3 -3
  173. package/dist/cjs/components/dropShadow/DropShadow.js +1 -1
  174. package/dist/cjs/components/dropdown/ChipDropdown.js +1 -1
  175. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  176. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  177. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  178. package/dist/cjs/components/dropdown/MenuItem/MenuItem.js +2 -2
  179. package/dist/cjs/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
  180. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  181. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
  182. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
  183. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -0
  184. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +3 -3
  185. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  186. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  187. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  188. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  189. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  190. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  191. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  192. package/dist/cjs/components/dynamic-tabs/DynamicTabs.js +1 -1
  193. package/dist/cjs/components/fab-menu/FABMenu.js +1 -1
  194. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  195. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
  196. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
  197. package/dist/cjs/components/feature-announcements/VideoModal.js +1 -1
  198. package/dist/cjs/components/file-uploader/FileUploader.js +1 -1
  199. package/dist/cjs/components/floater/floater.js +1 -1
  200. package/dist/cjs/components/floating-action-button/FloatingActionButton.js +1 -1
  201. package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.js +2 -2
  202. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  203. package/dist/cjs/components/image-cropper/BikImageCropper.js +1 -1
  204. package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
  205. package/dist/cjs/components/input/ChipInput.js +1 -1
  206. package/dist/cjs/components/input/Input.js +1 -1
  207. package/dist/cjs/components/input/Input.styled.d.ts +4 -4
  208. package/dist/cjs/components/input/Input.styled.js +1 -1
  209. package/dist/cjs/components/input-with-vars/InputWithVariables.js +2 -2
  210. package/dist/cjs/components/input-with-vars/customPortal.js +1 -1
  211. package/dist/cjs/components/keywords-input/KeywordsInput.js +1 -1
  212. package/dist/cjs/components/keywords-input/KeywordsInput.styled.d.ts +1 -1
  213. package/dist/cjs/components/list-item/ListItem.js +1 -1
  214. package/dist/cjs/components/list-item/ListItem.styled.js +1 -1
  215. package/dist/cjs/components/modals/Modal.js +1 -1
  216. package/dist/cjs/components/modals/modal.styled.js +1 -1
  217. package/dist/cjs/components/modals/styledModal.js +1 -1
  218. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  219. package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
  220. package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
  221. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  222. package/dist/cjs/components/navigation-hyperlink/NavigationHyperlink.js +2 -2
  223. package/dist/cjs/components/pagination/Pagination.js +1 -1
  224. package/dist/cjs/components/pagination/Pagination.styled.js +1 -1
  225. package/dist/cjs/components/plans/DurationSelectorStyles.d.ts +1 -1
  226. package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -1
  227. package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
  228. package/dist/cjs/components/plans/SubscriptionPlanSelector.js +1 -1
  229. package/dist/cjs/components/plans/SubscriptionPlanStyled.js +1 -1
  230. package/dist/cjs/components/plans/SubscriptionPlansCollected.js +2 -2
  231. package/dist/cjs/components/postPicker/postPicker.js +1 -1
  232. package/dist/cjs/components/product-picker/ProductPicker.styled.js +1 -1
  233. package/dist/cjs/components/product-picker/ProductPickerModal.js +1 -1
  234. package/dist/cjs/components/product-picker-v2/ProductPickerShimmer.js +1 -1
  235. package/dist/cjs/components/product-picker-v2/ProductPickerTag.js +1 -1
  236. package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
  237. package/dist/cjs/components/product-picker-v2/emptyState.js +2 -2
  238. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  239. package/dist/cjs/components/product-picker-v2/product.js +1 -1
  240. package/dist/cjs/components/product-picker-v2/productInfoOverlay.js +7 -7
  241. package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
  242. package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -1
  243. package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
  244. package/dist/cjs/components/product-picker-v2/selectedScreen.js +1 -1
  245. package/dist/cjs/components/product-picker-v2/variant.js +1 -1
  246. package/dist/cjs/components/product-picker-v2/variantComponents.js +1 -1
  247. package/dist/cjs/components/progress-bar/CircularProgressBar.js +1 -1
  248. package/dist/cjs/components/progress-bar/ProgressBarComponent.js +1 -1
  249. package/dist/cjs/components/progress-bar-v2/ProgressBarV2.js +1 -1
  250. package/dist/cjs/components/radioButton/RadioButton.js +1 -1
  251. package/dist/cjs/components/radioList/RadioList.js +1 -1
  252. package/dist/cjs/components/radioList/RadioList.styled.js +1 -1
  253. package/dist/cjs/components/resizeImage/index.js +1 -1
  254. package/dist/cjs/components/sample-button/SampleButton.styled.d.ts +1 -1
  255. package/dist/cjs/components/searchBar/searchBar.js +1 -1
  256. package/dist/cjs/components/shimmer/ShimmerComponent/BikShimmer.js +1 -1
  257. package/dist/cjs/components/shimmer/ShimmerComponent/ShimmerStyled.js +2 -2
  258. package/dist/cjs/components/shimmer-image/ShimmerImage.js +1 -1
  259. package/dist/cjs/components/side-modal/SideModal.js +1 -1
  260. package/dist/cjs/components/slider/slider.js +1 -1
  261. package/dist/cjs/components/spinner/Spinner.js +1 -1
  262. package/dist/cjs/components/star-rating/Star.js +1 -1
  263. package/dist/cjs/components/star-rating/StarRating.js +1 -1
  264. package/dist/cjs/components/states/ShopifyScopeWrapper.js +1 -1
  265. package/dist/cjs/components/states/StateComponent.js +1 -1
  266. package/dist/cjs/components/states-modal/DeleteConfirmationModal.js +1 -1
  267. package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
  268. package/dist/cjs/components/stepper/Stepper.js +1 -1
  269. package/dist/cjs/components/switch/Switch.js +1 -1
  270. package/dist/cjs/components/tabs/Tabs.js +1 -1
  271. package/dist/cjs/components/tabs/Tabs.styles.js +1 -1
  272. package/dist/cjs/components/tag/Tag.js +1 -1
  273. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  274. package/dist/cjs/components/template-context-mapper/Badge/index.js +4 -4
  275. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  276. package/dist/cjs/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
  277. package/dist/cjs/components/template-context-mapper/modalElements/Body.js +4 -4
  278. package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +7 -7
  279. package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  280. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  281. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.js +3 -3
  282. package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  283. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  284. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  285. package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +2 -2
  286. package/dist/cjs/components/template-context-mapper/modalElements/Header.js +8 -8
  287. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +5 -5
  288. package/dist/cjs/components/template-context-mapper/modalElements/ProductBox.js +2 -2
  289. package/dist/cjs/components/template-context-mapper/modalElements/QueryParamsComponent.js +2 -2
  290. package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
  291. package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js +1 -1
  292. package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  293. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +3 -3
  294. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  295. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  296. package/dist/cjs/components/template-context-mapper/modalElements/VariableEditorHeader.js +2 -2
  297. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  298. package/dist/cjs/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
  299. package/dist/cjs/components/template-preview/RCS/RCSButtons.js +1 -1
  300. package/dist/cjs/components/template-preview/RCS/RCSChatHeader.js +1 -1
  301. package/dist/cjs/components/template-preview/RCS/RCSChatPreview.js +1 -1
  302. package/dist/cjs/components/template-preview/RCS/RCSMediaCard.js +1 -1
  303. package/dist/cjs/components/template-preview/RCS/RCSTemplateLikePreview.js +4 -4
  304. package/dist/cjs/components/template-preview/SMS/SMSBubble.js +4 -4
  305. package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
  306. package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
  307. package/dist/cjs/components/template-preview/WhatsApp/ChatBtn.js +1 -1
  308. package/dist/cjs/components/template-preview/WhatsApp/ChatHeader.js +1 -1
  309. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.js +2 -2
  310. package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  311. package/dist/cjs/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.js +3 -3
  312. package/dist/cjs/components/template-preview/WhatsApp/MediaCard.js +1 -1
  313. package/dist/cjs/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +2 -2
  314. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreview.js +3 -3
  315. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
  316. package/dist/cjs/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  317. package/dist/cjs/components/template-preview/webpush/WebpushPreview.js +1 -1
  318. package/dist/cjs/components/testimonial-card/TestimonialCard.js +1 -1
  319. package/dist/cjs/components/testimonial-card/TestimonialCard.style.js +1 -1
  320. package/dist/cjs/components/text-picker/TextPickerCategoryCard.js +5 -5
  321. package/dist/cjs/components/text-picker/TextPickerFooter.js +4 -4
  322. package/dist/cjs/components/text-picker/TextPickerItemRow.js +6 -6
  323. package/dist/cjs/components/text-picker/TextPickerModal.js +6 -6
  324. package/dist/cjs/components/text-picker/TextPickerSelectAllRow.js +6 -6
  325. package/dist/cjs/components/thumbnail/Thumbnail.js +1 -1
  326. package/dist/cjs/components/toaster/Toaster.js +1 -1
  327. package/dist/cjs/components/toaster/Toaster.styled.js +1 -1
  328. package/dist/cjs/components/tooltips/Tooltip.js +1 -1
  329. package/dist/cjs/components/tooltips/TooltipInternal.js +1 -1
  330. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
  331. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
  332. package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
  333. package/dist/cjs/components/variable-picker-v3/DefaultVariableContent.js +1 -1
  334. package/dist/cjs/components/variable-picker-v3/NoResult.js +3 -3
  335. package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -1
  336. package/dist/cjs/components/variable-picker-v3/VariablePicker.js +1 -1
  337. package/dist/cjs/components/variable-picker-v3/highlightSearchText.js +1 -1
  338. package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
  339. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
  340. package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
  341. package/dist/cjs/components/whats-new/WhatsNewProvider.js +1 -1
  342. package/dist/cjs/components/zeroState/ZeroState.js +5 -5
  343. package/dist/cjs/index.js +1 -1
  344. package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +1 -0
  345. package/dist/cjs/node_modules/@emotion/hash/dist/emotion-hash.esm.js +1 -0
  346. package/dist/cjs/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +1 -0
  347. package/dist/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +1 -0
  348. package/dist/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +1 -0
  349. package/dist/cjs/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js +1 -0
  350. package/dist/cjs/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +1 -0
  351. package/dist/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +1 -0
  352. package/dist/cjs/node_modules/@emotion/utils/dist/emotion-utils.esm.js +1 -0
  353. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.development.js +10 -0
  354. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
  355. package/dist/cjs/node_modules/react/jsx-runtime.js +1 -0
  356. package/dist/esm/_virtual/jsx-runtime.js +1 -0
  357. package/dist/esm/_virtual/react-jsx-runtime.development.js +1 -0
  358. package/dist/esm/_virtual/react-jsx-runtime.production.min.js +1 -0
  359. package/dist/esm/assets/bundle-c485438b.css +333 -0
  360. package/dist/esm/assets/icons/PlusIcon.js +1 -1
  361. package/dist/esm/assets/icons/searchIcon.js +1 -1
  362. package/dist/esm/components/InfiniteScroll/InfiniteScroll.js +1 -1
  363. package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
  364. package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  365. package/dist/esm/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
  366. package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
  367. package/dist/esm/components/QueryBuilder/QueryBuilder.js +1 -1
  368. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
  369. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.js +1 -1
  370. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
  371. package/dist/esm/components/QueryBuilder/components/AddNodeButton.js +1 -1
  372. package/dist/esm/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
  373. package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  374. package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
  375. package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
  376. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.js +1 -1
  377. package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +1 -1
  378. package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -1
  379. package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +1 -1
  380. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
  381. package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
  382. package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
  383. package/dist/esm/components/QueryBuilder/components/Connectors/Components/NoInput.js +1 -1
  384. package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
  385. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  386. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  387. package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
  388. package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  389. package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
  390. package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  391. package/dist/esm/components/QueryBuilder/components/DeleteButton.js +1 -1
  392. package/dist/esm/components/QueryBuilder/components/DropdownWrapper.js +1 -1
  393. package/dist/esm/components/QueryBuilder/components/InputLoader.js +4 -4
  394. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js +4 -4
  395. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
  396. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
  397. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
  398. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
  399. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/QueryBuilderNode.js +1 -1
  400. package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
  401. package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
  402. package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  403. package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  404. package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
  405. package/dist/esm/components/SearchFilter/index.js +1 -1
  406. package/dist/esm/components/TablePagination/TablePagination.js +1 -1
  407. package/dist/esm/components/TablePagination/TablePaginationCard.js +1 -1
  408. package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.js +1 -1
  409. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
  410. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
  411. package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
  412. package/dist/esm/components/accordion/Accordion.js +1 -1
  413. package/dist/esm/components/accordion/AccordionArrow.js +1 -1
  414. package/dist/esm/components/action-button/ActionButtons.js +1 -1
  415. package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
  416. package/dist/esm/components/add-variableV2/AddVariableV2SideModal.js +1 -1
  417. package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -1
  418. package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -1
  419. package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -1
  420. package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -1
  421. package/dist/esm/components/alerts/Alert.js +1 -1
  422. package/dist/esm/components/analytics-card/AnalyticsCard.js +1 -1
  423. package/dist/esm/components/analytics-card/AnalyticsCard.styled.js +1 -1
  424. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
  425. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.js +1 -1
  426. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  427. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  428. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  429. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  430. package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
  431. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  432. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +1 -1
  433. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  434. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  435. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +2 -2
  436. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  437. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
  438. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
  439. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
  440. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
  441. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  442. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
  443. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.js +1 -1
  444. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  445. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/Chip.js +1 -1
  446. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/HorinzontalBar.js +1 -1
  447. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
  448. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js +1 -1
  449. package/dist/esm/components/avatar/Avatar.js +1 -1
  450. package/dist/esm/components/banner/AdBanner.js +1 -1
  451. package/dist/esm/components/banner/Banner.styled.js +1 -1
  452. package/dist/esm/components/banner/BannerInline.js +1 -1
  453. package/dist/esm/components/banner/BannerWithImage.js +1 -1
  454. package/dist/esm/components/banner/CardBanner.js +1 -1
  455. package/dist/esm/components/banner/CardBannerWithImage.js +1 -1
  456. package/dist/esm/components/bik-chatbot/components/AIChat.js +1 -1
  457. package/dist/esm/components/bik-chatbot/components/BIKChatbot.js +1 -1
  458. package/dist/esm/components/bik-chatbot/components/ChatLoadingState.js +23 -23
  459. package/dist/esm/components/bik-chatbot/components/ChatWindow.js +21 -21
  460. package/dist/esm/components/bik-chatbot/components/ThinkingIndicator.js +2 -2
  461. package/dist/esm/components/bik-chatbot/contexts/AIContext.js +1 -1
  462. package/dist/esm/components/bik-layout/BikHeader.js +1 -1
  463. package/dist/esm/components/bik-layout/BikLayout.js +1 -1
  464. package/dist/esm/components/bik-layout/BikProfile.js +1 -1
  465. package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
  466. package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
  467. package/dist/esm/components/bik-layout/FeatureModal.js +1 -1
  468. package/dist/esm/components/bik-layout/FeatureModalV2.js +1 -1
  469. package/dist/esm/components/bik-layout/PageLoader.js +1 -1
  470. package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.js +1 -1
  471. package/dist/esm/components/bik-layout/SidebarPopup.js +1 -1
  472. package/dist/esm/components/bik-layout/SidebarSkeleton.js +1 -1
  473. package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
  474. package/dist/esm/components/button/Button.js +1 -1
  475. package/dist/esm/components/button/Button.styled.js +1 -1
  476. package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
  477. package/dist/esm/components/card-selection-modal/CardSelectionModal.js +1 -1
  478. package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.js +1 -1
  479. package/dist/esm/components/card-selector/CardSelector.js +1 -1
  480. package/dist/esm/components/card-selector/CardSelectorGroup.js +1 -1
  481. package/dist/esm/components/carousel/carousel.js +2 -2
  482. package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
  483. package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
  484. package/dist/esm/components/carousel-preview/CustomCarouselArrows.js +1 -1
  485. package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
  486. package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +1 -1
  487. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  488. package/dist/esm/components/checkList/CheckList.js +1 -1
  489. package/dist/esm/components/checkList/CheckList.styled.js +1 -1
  490. package/dist/esm/components/code-block/CodeBlock.js +1 -1
  491. package/dist/esm/components/colourInput/ColourInput.js +1 -1
  492. package/dist/esm/components/colourInput/ColourInput.styled.js +1 -1
  493. package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
  494. package/dist/esm/components/country-code-picker/CountryCodePicker.styled.js +1 -1
  495. package/dist/esm/components/curtain/Curtain.js +1 -1
  496. package/dist/esm/components/custom-date-time/CustomDateTime.js +1 -1
  497. package/dist/esm/components/custom-date-time/CustomDateTime.styled.js +1 -1
  498. package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  499. package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
  500. package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.js +1 -1
  501. package/dist/esm/components/dashboard-review-popup/components/FiveStar.js +1 -1
  502. package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.js +1 -1
  503. package/dist/esm/components/dashboard-review-popup/components/Form.js +1 -1
  504. package/dist/esm/components/dashboard-review-popup/components/Form.styled.js +1 -1
  505. package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +1 -1
  506. package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
  507. package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
  508. package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +7 -7
  509. package/dist/esm/components/datePicker/DatePicker.js +1 -1
  510. package/dist/esm/components/datePicker/DatePicker.styled.d.ts +4 -4
  511. package/dist/esm/components/datePicker/DatePicker.styled.js +1 -1
  512. package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
  513. package/dist/esm/components/datePicker/TimePicker.js +1 -1
  514. package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.d.ts +1 -0
  515. package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
  516. package/dist/esm/components/discount-modal/DiscountModal.d.ts +1 -0
  517. package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
  518. package/dist/esm/components/discount-modal/DiscountModal.styled.js +1 -1
  519. package/dist/esm/components/discount-modal/DiscountUtils.d.ts +1 -1
  520. package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
  521. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +2 -0
  522. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  523. package/dist/esm/components/discount-modal/DynamicCoupon/MinimumRequirementComponent.js +1 -1
  524. package/dist/esm/components/discount-modal/DynamicCoupon/ZeroState.js +4 -4
  525. package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.d.ts +51 -1
  526. package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  527. package/dist/esm/components/dot-pulse/DotPulse.js +3 -3
  528. package/dist/esm/components/dropShadow/DropShadow.js +1 -1
  529. package/dist/esm/components/dropdown/ChipDropdown.js +3 -3
  530. package/dist/esm/components/dropdown/ChipInput.js +1 -1
  531. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  532. package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
  533. package/dist/esm/components/dropdown/MenuItem/MenuItem.js +5 -5
  534. package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
  535. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  536. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
  537. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
  538. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -0
  539. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +4 -4
  540. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  541. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  542. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  543. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  544. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  545. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  546. package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
  547. package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
  548. package/dist/esm/components/fab-menu/FABMenu.js +1 -1
  549. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  550. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
  551. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -1
  552. package/dist/esm/components/feature-announcements/VideoModal.js +1 -1
  553. package/dist/esm/components/file-uploader/FileUploader.js +1 -1
  554. package/dist/esm/components/floater/floater.js +1 -1
  555. package/dist/esm/components/floating-action-button/FloatingActionButton.js +1 -1
  556. package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +2 -2
  557. package/dist/esm/components/icon-button/IconButton.js +1 -1
  558. package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
  559. package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
  560. package/dist/esm/components/input/ChipInput.js +1 -1
  561. package/dist/esm/components/input/Input.js +1 -1
  562. package/dist/esm/components/input/Input.styled.d.ts +4 -4
  563. package/dist/esm/components/input/Input.styled.js +1 -1
  564. package/dist/esm/components/input-with-vars/InputWithVariables.js +3 -3
  565. package/dist/esm/components/input-with-vars/customPortal.js +1 -1
  566. package/dist/esm/components/keywords-input/KeywordsInput.js +1 -1
  567. package/dist/esm/components/keywords-input/KeywordsInput.styled.d.ts +1 -1
  568. package/dist/esm/components/list-item/ListItem.js +1 -1
  569. package/dist/esm/components/list-item/ListItem.styled.js +1 -1
  570. package/dist/esm/components/modals/Modal.js +1 -1
  571. package/dist/esm/components/modals/modal.styled.js +1 -1
  572. package/dist/esm/components/modals/styledModal.js +1 -1
  573. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  574. package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
  575. package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
  576. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  577. package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.js +1 -1
  578. package/dist/esm/components/pagination/Pagination.js +1 -1
  579. package/dist/esm/components/pagination/Pagination.styled.js +1 -1
  580. package/dist/esm/components/plans/DurationSelectorStyles.d.ts +1 -1
  581. package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
  582. package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
  583. package/dist/esm/components/plans/SubscriptionPlanSelector.js +1 -1
  584. package/dist/esm/components/plans/SubscriptionPlanStyled.js +1 -1
  585. package/dist/esm/components/plans/SubscriptionPlansCollected.js +3 -3
  586. package/dist/esm/components/postPicker/postPicker.js +1 -1
  587. package/dist/esm/components/product-picker/ProductPicker.styled.js +1 -1
  588. package/dist/esm/components/product-picker/ProductPickerModal.js +1 -1
  589. package/dist/esm/components/product-picker-v2/ProductPickerShimmer.js +1 -1
  590. package/dist/esm/components/product-picker-v2/ProductPickerTag.js +1 -1
  591. package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
  592. package/dist/esm/components/product-picker-v2/emptyState.js +2 -2
  593. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  594. package/dist/esm/components/product-picker-v2/product.js +1 -1
  595. package/dist/esm/components/product-picker-v2/productInfoOverlay.js +8 -8
  596. package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
  597. package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
  598. package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
  599. package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
  600. package/dist/esm/components/product-picker-v2/variant.js +1 -1
  601. package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
  602. package/dist/esm/components/progress-bar/CircularProgressBar.js +1 -1
  603. package/dist/esm/components/progress-bar/ProgressBarComponent.js +1 -1
  604. package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +1 -1
  605. package/dist/esm/components/radioButton/RadioButton.js +1 -1
  606. package/dist/esm/components/radioList/RadioList.js +1 -1
  607. package/dist/esm/components/radioList/RadioList.styled.js +1 -1
  608. package/dist/esm/components/resizeImage/index.js +1 -1
  609. package/dist/esm/components/sample-button/SampleButton.styled.d.ts +1 -1
  610. package/dist/esm/components/searchBar/searchBar.js +1 -1
  611. package/dist/esm/components/shimmer/ShimmerComponent/BikShimmer.js +1 -1
  612. package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.js +2 -2
  613. package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
  614. package/dist/esm/components/side-modal/SideModal.js +1 -1
  615. package/dist/esm/components/slider/slider.js +1 -1
  616. package/dist/esm/components/spinner/Spinner.js +6 -6
  617. package/dist/esm/components/star-rating/Star.js +1 -1
  618. package/dist/esm/components/star-rating/StarRating.js +1 -1
  619. package/dist/esm/components/states/ShopifyScopeWrapper.js +1 -1
  620. package/dist/esm/components/states/StateComponent.js +1 -1
  621. package/dist/esm/components/states-modal/DeleteConfirmationModal.js +1 -1
  622. package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
  623. package/dist/esm/components/stepper/Stepper.js +1 -1
  624. package/dist/esm/components/switch/Switch.js +1 -1
  625. package/dist/esm/components/tabs/Tabs.js +1 -1
  626. package/dist/esm/components/tabs/Tabs.styles.js +1 -1
  627. package/dist/esm/components/tag/Tag.js +1 -1
  628. package/dist/esm/components/tag/Tag.styled.js +1 -1
  629. package/dist/esm/components/template-context-mapper/Badge/index.js +4 -4
  630. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  631. package/dist/esm/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
  632. package/dist/esm/components/template-context-mapper/modalElements/Body.js +10 -10
  633. package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +7 -7
  634. package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  635. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  636. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +3 -3
  637. package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  638. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  639. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  640. package/dist/esm/components/template-context-mapper/modalElements/Footer.js +4 -4
  641. package/dist/esm/components/template-context-mapper/modalElements/Header.js +9 -9
  642. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +5 -5
  643. package/dist/esm/components/template-context-mapper/modalElements/ProductBox.js +2 -2
  644. package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +2 -2
  645. package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
  646. package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.js +1 -1
  647. package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  648. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +5 -5
  649. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  650. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  651. package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.js +3 -3
  652. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  653. package/dist/esm/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
  654. package/dist/esm/components/template-preview/RCS/RCSButtons.js +1 -1
  655. package/dist/esm/components/template-preview/RCS/RCSChatHeader.js +1 -1
  656. package/dist/esm/components/template-preview/RCS/RCSChatPreview.js +1 -1
  657. package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
  658. package/dist/esm/components/template-preview/RCS/RCSTemplateLikePreview.js +4 -4
  659. package/dist/esm/components/template-preview/SMS/SMSBubble.js +4 -4
  660. package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
  661. package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
  662. package/dist/esm/components/template-preview/WhatsApp/ChatBtn.js +1 -1
  663. package/dist/esm/components/template-preview/WhatsApp/ChatHeader.js +1 -1
  664. package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
  665. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  666. package/dist/esm/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.js +4 -4
  667. package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
  668. package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +2 -2
  669. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.js +5 -5
  670. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +7 -7
  671. package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
  672. package/dist/esm/components/template-preview/webpush/WebpushPreview.js +1 -1
  673. package/dist/esm/components/testimonial-card/TestimonialCard.js +1 -1
  674. package/dist/esm/components/testimonial-card/TestimonialCard.style.js +1 -1
  675. package/dist/esm/components/text-picker/TextPickerCategoryCard.js +5 -5
  676. package/dist/esm/components/text-picker/TextPickerFooter.js +4 -4
  677. package/dist/esm/components/text-picker/TextPickerItemRow.js +6 -6
  678. package/dist/esm/components/text-picker/TextPickerModal.js +10 -10
  679. package/dist/esm/components/text-picker/TextPickerSelectAllRow.js +6 -6
  680. package/dist/esm/components/thumbnail/Thumbnail.js +1 -1
  681. package/dist/esm/components/toaster/Toaster.js +1 -1
  682. package/dist/esm/components/toaster/Toaster.styled.js +1 -1
  683. package/dist/esm/components/tooltips/Tooltip.js +1 -1
  684. package/dist/esm/components/tooltips/TooltipInternal.js +1 -1
  685. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
  686. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
  687. package/dist/esm/components/variable-picker-v3/Content.js +1 -1
  688. package/dist/esm/components/variable-picker-v3/DefaultVariableContent.js +1 -1
  689. package/dist/esm/components/variable-picker-v3/NoResult.js +4 -4
  690. package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
  691. package/dist/esm/components/variable-picker-v3/VariablePicker.js +1 -1
  692. package/dist/esm/components/variable-picker-v3/highlightSearchText.js +1 -1
  693. package/dist/esm/components/whats-new/WhatsNew.js +1 -1
  694. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
  695. package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
  696. package/dist/esm/components/whats-new/WhatsNewProvider.js +1 -1
  697. package/dist/esm/components/zeroState/ZeroState.js +5 -5
  698. package/dist/esm/index.js +1 -1
  699. package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.js +1 -0
  700. package/dist/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +1 -0
  701. package/dist/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +1 -0
  702. package/dist/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +1 -0
  703. package/dist/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +1 -0
  704. package/dist/esm/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js +1 -0
  705. package/dist/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +1 -0
  706. package/dist/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +1 -0
  707. package/dist/esm/node_modules/@emotion/utils/dist/emotion-utils.esm.js +1 -0
  708. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.development.js +10 -0
  709. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
  710. package/dist/esm/node_modules/react/jsx-runtime.js +1 -0
  711. package/package.json +4 -3
@@ -1 +1 @@
1
- import{__rest as e}from"../../../_virtual/_tslib.js";import{jsxs as i,jsx as t,Fragment as o}from"react/jsx-runtime";import n from"../../../assets/icons/info.svg.js";import{Alert as l}from"../../alerts/Alert.js";import{ALERT_TYPES as s,CONTENT_POSITION as r}from"../../alerts/AlertHelper.js";import{Button as a}from"../../button/Button.js";import{CheckBox as d}from"../../checkBox/CheckBox.js";import{DISCOUNT_APPLIES_TO as c,OFFER_APPLIES_TO as u,DISCOUNT_TYPES as p,COUPON_EXPIRATION as m,DISCOUNT_VALUE_TYPES as C,DISCOUNT_TARGET_TYPES as v,DISCOUNT_TARGET_SELECTION as E}from"../type.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as D}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"react";import"../../zeroState/ZeroState.js";import{BodySecondary as b,TitleRegular as g,TitleSmall as T}from"../../TypographyStyle.js";import{DEFAULT_THEME as h}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../list-item/ListItem.js";import"../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../icon-button/IconButton.js";import{Input as y}from"../../input/Input.js";import O from"../../../assets/icons/cross.svg.js";import"../../dropdown/MenuItem/MenuItem.js";import{RadioButton as P}from"../../radioButton/RadioButton.js";import I from"../../../assets/icons/cubeIcon.svg.js";import V from"../../../assets/icons/delete.svg.js";import S from"../../../assets/icons/edit.svg.js";import j from"../../../assets/icons/plus.svg.js";import{CouponExpiration as f}from"../CouponExpiration/CouponExpiration.js";import{DynamicCouponContainer as x}from"../DiscountModal.styled.js";import{DiscountOptionsContainer as R,DiscountDetailsOption as _,AddProductButtonsContainer as N,ProductCollectionCard as A,CubeIconContainer as L,IconContainer as F,ProductVariableCard as w}from"./DynamicCoupon.styled.js";import q from"./MinimumRequirementComponent.js";import k from"./ZeroState.js";var U;!function(e){e.ENTITLED="entitled",e.PREREQUISITE="prerequisite"}(U||(U={}));const B=B=>{var M,G,Q,Y,X,$,W,z;const Z=[{selected:B.discountCouponAppliesTo===c.ENTIRE_ORDER,label:"Entire Order",value:c.ENTIRE_ORDER},{selected:B.discountCouponAppliesTo===c.SPECIFIC_PRODUCTS,label:"Specific Product",value:c.SPECIFIC_PRODUCTS},{selected:B.discountCouponAppliesTo===c.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:c.SPECIFIC_COLLECTIONS}],H=[{selected:B.offerAppliesToBuy===u.SPECIFIC_PRODUCTS,label:"Specific Product",value:u.SPECIFIC_PRODUCTS},{selected:B.offerAppliesToBuy===u.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:u.SPECIFIC_COLLECTIONS}],J=[{selected:B.offerAppliesToGet===u.SPECIFIC_PRODUCTS,label:"Specific Product",value:u.SPECIFIC_PRODUCTS},{selected:B.offerAppliesToGet===u.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:u.SPECIFIC_COLLECTIONS}],K=(e,d,u)=>{var p,m,C,v,E,D,g,y,P,f,x,R;let _=[],q=[],k={},M={};B.useNewPicker?(k=d===U.ENTITLED?B.entitledProducts:B.prerequisiteProducts,M=null!==(p=d===U.ENTITLED?B.entitledCollections:B.prerequisiteCollections)&&void 0!==p?p:[],(null==k?void 0:k.isCustom)&&delete k.isCustom,(null==M?void 0:M.isCustom)&&delete M.isCustom,Object.values(k).forEach((e=>{Object.keys(e.products).forEach((i=>{_.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(M).forEach((e=>{"isCustom"!==e&&q.push({id:e,name:M[e].name,image:M[e].image})}))):(_=d===U.ENTITLED?B.entitledProducts:B.prerequisiteProducts,q=null!==(m=d===U.ENTITLED?B.entitledCollections:B.prerequisiteCollections)&&void 0!==m?m:[]);const G=[null===(C=B.dynamicDiscountValidationError)||void 0===C?void 0:C.inValidProductSelection,null===(v=B.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidProductVariableSelection,null===(E=B.dynamicDiscountValidationError)||void 0===E?void 0:E.inValidCollectionSelection],Q=[null===(D=B.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidBuyXCollectionSelection,null===(g=B.dynamicDiscountValidationError)||void 0===g?void 0:g.inValidBuyXProductSelection,null===(y=B.dynamicDiscountValidationError)||void 0===y?void 0:y.inValidBuyXProductVariableSelection],Y=[null===(P=B.dynamicDiscountValidationError)||void 0===P?void 0:P.inValidGetYCollectionSelection,null===(f=B.dynamicDiscountValidationError)||void 0===f?void 0:f.inValidGetYProductSelection,null===(x=B.dynamicDiscountValidationError)||void 0===x?void 0:x.inValidGetYProductVariableSelection];let X=!1;return"couponAppliesTo"===u&&(X=G.some(Boolean)),"buyX"===u&&(X=Q.some(Boolean)),"getY"===u&&(X=Y.some(Boolean)),i(o,{children:[i("div",Object.assign({style:{display:"flex",gap:18}},{children:[e===c.SPECIFIC_PRODUCTS&&0===_.length&&(d===U.ENTITLED&&!B.entitledProductVariable||d===U.PREREQUISITE&&!B.preRequisiteProductVariable)&&!(null==q?void 0:q.length)&&i(N,{children:[t("div",Object.assign({style:{width:B.isProductVariableSupported?"284px":"300px",display:"flex"}},{children:t(a,{buttonText:"Add Product(s)",buttonType:"dashRegular",LeadingIcon:j,matchParentWidth:!0,onClick:()=>{B.setIsProductPickerOpen(d)},error:X})})),B.isProductVariableSupported&&B.productVariableList&&i(o,{children:[t(b,Object.assign({color:h.colorsV2.content.placeholder},{children:"OR"})),t(a,{buttonText:"Add Product(s) Variable",buttonType:"dashRegular",LeadingIcon:j,matchParentWidth:!0,onClick:()=>{B.setIsProductVariablePickerOpen(d)},error:X})]})]}),e===c.SPECIFIC_COLLECTIONS&&0===q.length&&!(null==_?void 0:_.length)&&t("div",Object.assign({style:{width:"300px",display:"flex"}},{children:t(a,{buttonText:"Add collection(s)",buttonType:"dashRegular",LeadingIcon:j,matchParentWidth:!0,onClick:()=>{B.setIsCollectionPickerOpen(d)},style:{marginTop:"16px"},error:X})}))]})),X&&t("div",Object.assign({style:{margin:"8px 0 0"}},{children:t(l,{type:s.NEGATIVE,text:"Required Field",contentPosition:r.START,icon:()=>t(n,{width:16,height:16,color:h.colorsV2.content.negative})})})),_.length||q.length?i("div",{children:[t(b,Object.assign({style:{margin:"8px 0"}},{children:e===c.SPECIFIC_COLLECTIONS?"Collection(s)":"Product(s)"})),i(A,{children:[t(L,{children:t(I,{width:20,height:20,color:h.colorsV2.content.secondary})}),i(T,{children:[e===c.SPECIFIC_PRODUCTS?_.length:q.length," ",e===c.SPECIFIC_PRODUCTS?"Product(s)":"Collection(s)"," ","added"]}),i("div",Object.assign({style:{display:"flex",gap:4}},{children:[t(F,Object.assign({onClick:()=>{e===c.SPECIFIC_PRODUCTS?B.setIsProductPickerOpen(d):B.setIsCollectionPickerOpen(d)}},{children:t(S,{width:24,height:24,color:h.colorsV2.content.placeholder})})),t(F,Object.assign({onClick:()=>{e===c.SPECIFIC_PRODUCTS?d===U.ENTITLED?B.setEntitledProducts([]):B.setPrerequisiteProducts([]):d===U.ENTITLED?B.setEntitledCollections([]):B.setPrerequisiteCollections([])}},{children:t(V,{width:24,height:24,color:h.colorsV2.content.placeholder})}))]}))]})]}):d===U.ENTITLED&&B.entitledProductVariable?i("div",{children:[t(b,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i(w,{children:[t(T,{children:B.entitledProductVariable.displayName}),t("div",Object.assign({style:{display:"flex",gap:4}},{children:t(F,Object.assign({onClick:()=>{B.setEntitledProductVariable(void 0)}},{children:t(O,{width:24,height:24,color:h.colorsV2.content.primary})}))}))]})]}):d===U.PREREQUISITE&&(null===(R=B.preRequisiteProductVariable)||void 0===R?void 0:R.displayName)?i("div",{children:[t(b,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i(w,{children:[t(T,{children:B.preRequisiteProductVariable.displayName}),t("div",Object.assign({style:{display:"flex",gap:4}},{children:t(F,Object.assign({onClick:()=>{B.setPreRequisiteProductVariable(void 0)}},{children:t(O,{width:24,height:24,color:h.colorsV2.content.primary})}))}))]})]}):t(o,{children:" "})]})},ee=(e,o)=>{var n,l,s,r,a,d,p,m,C,v;let E=[],g=[],h={},O={};B.useNewPicker?(h=e===U.ENTITLED?B.entitledProducts:B.prerequisiteProducts,O=null!==(n=e===U.ENTITLED?B.entitledCollections:B.prerequisiteCollections)&&void 0!==n?n:[],(null==h?void 0:h.isCustom)&&delete h.isCustom,(null==O?void 0:O.isCustom)&&delete O.isCustom,Object.values(h).forEach((e=>{Object.keys(e.products).forEach((i=>{E.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(O).forEach((e=>{"isCustom"!==e&&g.push({id:e,name:O[e].name,image:O[e].image})}))):(E=e===U.ENTITLED?B.entitledProducts:B.prerequisiteProducts,g=null!==(l=e===U.ENTITLED?B.entitledCollections:B.prerequisiteCollections)&&void 0!==l?l:[]);const P=e===U.PREREQUISITE?B.offerAppliesToBuy:B.offerAppliesToGet,I=e===U.PREREQUISITE?U.PREREQUISITE:U.ENTITLED,V=P===u.SPECIFIC_PRODUCTS?c.SPECIFIC_PRODUCTS:c.SPECIFIC_COLLECTIONS;return i("div",{children:[t(T,Object.assign({style:{marginBottom:16}},{children:e===U.PREREQUISITE?"Customer buys":"Customer gets"})),i("div",Object.assign({style:{display:"flex"}},{children:[!o&&t("div",{children:i("div",Object.assign({className:"input__rows"},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(y,{value:e===U.ENTITLED?null!==(r=null===(s=B.discountData.entitledQuantity)||void 0===s?void 0:s.toString())&&void 0!==r?r:"":null!==(d=null===(a=B.discountData.prerequisiteQuantity)||void 0===a?void 0:a.toString())&&void 0!==d?d:"",type:"number",onChangeText:i=>{e===U.ENTITLED?B.setDiscountData(Object.assign(Object.assign({},B.discountData),{entitledQuantity:parseInt(i)})):B.setDiscountData(Object.assign(Object.assign({},B.discountData),{prerequisiteQuantity:parseInt(i)}))},labelText:"Quantity of products",placeholder:"Eg. 2",width:"300px",errorMessage:e===U.PREREQUISITE&&(null===(p=B.dynamicDiscountValidationError)||void 0===p?void 0:p.inValidBuyXValue)||e===U.ENTITLED&&(null===(m=B.dynamicDiscountValidationError)||void 0===m?void 0:m.inValidGetYValue)?"Required Field":"",state:e===U.PREREQUISITE&&(null===(C=B.dynamicDiscountValidationError)||void 0===C?void 0:C.inValidBuyXValue)||e===U.ENTITLED&&(null===(v=B.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidGetYValue)?"invalid":"none"})})),t("div",{className:"input__wrapper"})]}))}),i("div",{children:[t(b,Object.assign({style:{marginBottom:8}},{children:"Any items from"})),e===U.PREREQUISITE&&t(D,{width:"244px",options:H,placement:"bottom-start",onSelect:e=>{var i,t,o;B.setOfferAppliesToBuy(e.value),B.setPrerequisiteProducts([]),B.setPrerequisiteCollections([]),B.setPreRequisiteProductVariable(void 0),B.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidBuyXCollectionSelection:!1,inValidBuyXProductSelection:!1,inValidBuyXProductVariableSelection:!1}))),B.setDiscountData(Object.assign(Object.assign({},B.discountData),{prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:null===(i=B.discountData.collectionsConf)||void 0===i?void 0:i.entitledCollections,prerequisiteCollections:{}},productsConf:{entitledProducts:null===(t=B.discountData.productsConf)||void 0===t?void 0:t.entitledProducts,prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:null===(o=B.discountData.productVariableConf)||void 0===o?void 0:o.entitledProductVariable,prerequisiteProductVariable:{}}}))}}),e===U.ENTITLED&&t(D,{width:"244px",options:J,placement:"bottom-start",onSelect:e=>{var i,t,o;B.setOfferAppliesToGet(e.value),B.setEntitledProducts([]),B.setEntitledCollections([]),B.setEntitledProductVariable(void 0),B.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidGetYCollectionSelection:!1,inValidGetYProductSelection:!1,inValidGetYProductVariableSelection:!1}))),B.setDiscountData(Object.assign(Object.assign({},B.discountData),{entitledCollectionIds:[],entitledProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:null===(i=B.discountData.collectionsConf)||void 0===i?void 0:i.prerequisiteCollections},productsConf:{entitledProducts:{},prerequisiteProducts:null===(t=B.discountData.productsConf)||void 0===t?void 0:t.prerequisiteProducts},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:null===(o=B.discountData.productVariableConf)||void 0===o?void 0:o.prerequisiteProductVariable}}))}})]})]})),K(V,I,e===U.PREREQUISITE?"buyX":"getY")]})};return i(x,{children:[i("div",{children:[i("div",Object.assign({style:{display:"flex",gap:16}},{children:[t("div",Object.assign({className:"input__wrapper"},{children:t(y,{value:null!==(M=B.discountData.title)&&void 0!==M?M:"",onChangeText:e=>{var i;B.setDiscountData(Object.assign(Object.assign({},B.discountData),{title:null!==(i=null==e?void 0:e.trim())&&void 0!==i?i:""}))},maxCharLimit:30,labelText:"Discount Coupon Title",placeholder:`Eg. “Flat ${null!==(G=B.currency)&&void 0!==G?G:""} 15 Off”`,hintText:"Will be same for everyone. Can’t be changed later",width:"300px",isRequired:!0,errorMessage:(null===(Q=B.dynamicDiscountValidationError)||void 0===Q?void 0:Q.invalidCouponTitle)?"Required Field":"",state:(null===(Y=B.dynamicDiscountValidationError)||void 0===Y?void 0:Y.invalidCouponTitle)?"invalid":"none"})})),!B.hideProbability&&t(y,{value:null!==($=null===(X=B.discountData.probability)||void 0===X?void 0:X.toString())&&void 0!==$?$:"",type:"number",onChangeText:e=>{B.setDiscountData(Object.assign(Object.assign({},B.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability of getting coupon ",hintText:"Enter a decimal value between 0-1",placeholder:"Eg. 0.5",maxCharLimit:4,width:"300px",isRequired:!0,errorMessage:(null===(W=B.dynamicDiscountValidationError)||void 0===W?void 0:W.inValidProbability)?"Required Field":"",state:(null===(z=B.dynamicDiscountValidationError)||void 0===z?void 0:z.inValidProbability)?"invalid":"none"})]})),t("div",{style:{height:"1px",width:"100%",background:h.colorsV2.stroke.primary,margin:"24px 0 8px"}})]}),B.allowStaticCoupon&&t((()=>i("div",{children:[t(g,{children:"Discount Details"}),t(R,{children:B.discountDetailsOptions.map((t=>{return i(_,Object.assign({selected:B.selectedDiscountDetails.id===t.id,onClick:()=>(i=>{if(B.selectedDiscountDetails.id!==i.id)if(B.resetValidationErrors(),B.setValidationErrorMessage(""),B.setDiscountCouponAppliesTo(c.ENTIRE_ORDER),B.setSelectedDiscountDetails(i),B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:void 0})),B.setPreRequisiteProductVariable(void 0),B.setEntitledProductVariable(void 0),["percentage","amount"].includes(i.value)){B.onChangeCouponType({label:"Amount off on order",selected:!0,value:p.AMOUNT_OFF_ORDER});const t=Object.assign(Object.assign({},B.discountData),{valueType:"percentage"===i.value?C.PERCENTAGE:C.FIXED_AMOUNT,value:void 0,targetType:v.LINE_ITEM,targetSelection:E.ALL,entitledCollectionIds:[],entitledProductIds:[],prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:{}},productsConf:{entitledProducts:{},prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:{}}}),o=e(t,["entitledQuantity","prerequisiteQuantity"]);B.setDiscountData(o)}else B.onChangeCouponType({label:i.label,selected:!0,value:i.value})})(t)},{children:[t.icon((o=t.id,B.selectedDiscountDetails.id===o?h.colorsV2.stroke.brand:h.colorsV2.text.secondary)),t.label]}),t.id);var o}))})]})),{}),(B.selectedCouponType===p.AMOUNT_OFF_ORDER||B.selectedCouponType===p.AMOUNT_OFF_PRODUCTS)&&(()=>{var e,n,l,s,r,a;return i(o,{children:[t("div",Object.assign({className:"input__rows"},{children:t("div",Object.assign({className:"input__wrapper"},{children:t(y,{value:null!==(l=null===(n=null===(e=B.discountData)||void 0===e?void 0:e.value)||void 0===n?void 0:n.toString())&&void 0!==l?l:"",labelText:"Discount amount",type:"number",width:"300px",onChangeText:e=>{B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:parseInt(e)}))},placeholder:"15",prefixText:B.discountData.valueType===C.FIXED_AMOUNT?null!==(s=B.currency)&&void 0!==s?s:"":void 0,suffixText:B.discountData.valueType===C.PERCENTAGE?"%":void 0,errorMessage:(null===(r=B.dynamicDiscountValidationError)||void 0===r?void 0:r.inValidDiscountAmount)?"Required Field":"",state:(null===(a=B.dynamicDiscountValidationError)||void 0===a?void 0:a.inValidDiscountAmount)?"invalid":"none"})}))})),t("div",Object.assign({style:{paddingTop:"24px",marginTop:16,borderTop:`1px solid ${h.colorsV2.stroke.primary}`}},{children:i("div",Object.assign({className:"input__wrapper"},{children:[t(g,Object.assign({style:{marginBottom:10}},{children:"Applies to"})),t("div",Object.assign({style:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto"}},{children:t(D,{width:"300px",options:Z,placement:"bottom-start",onSelect:e=>{const i="value"in e&&e.value===c.ENTIRE_ORDER?{label:"Amount off on order",selected:!0,value:p.AMOUNT_OFF_ORDER}:{label:"Amount off on products",selected:!0,value:p.AMOUNT_OFF_PRODUCTS};B.onChangeCouponType(i),B.setDiscountCouponAppliesTo(e.value),B.setEntitledProductVariable(void 0),B.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidProductVariableSelection:!1,inValidProductSelection:!1,inValidCollectionSelection:!1})))}})})),(B.discountCouponAppliesTo===c.SPECIFIC_PRODUCTS||B.discountCouponAppliesTo===c.SPECIFIC_COLLECTIONS)&&K(B.discountCouponAppliesTo,U.ENTITLED,"couponAppliesTo")]}))}))]})})(),B.selectedCouponType===p.BUY_X_GET_Y&&(()=>{var e,o,n,l,s;return i(x,Object.assign({style:{border:`1px solid ${h.colorsV2.stroke.primary}`,padding:"16px",borderRadius:"4px",margin:0}},{children:[ee(U.PREREQUISITE),t("div",{style:{width:"100%",height:"1px",backgroundColor:h.colorsV2.stroke.primary,margin:"8px 0"}}),ee(U.ENTITLED),t(b,Object.assign({style:{marginTop:"8px"}},{children:"At a discounted value"})),t("div",{children:t(P,{label:"Free",isActive:100===B.discountData.value,onValueChange:e=>{e?B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:100})):B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:void 0}))}})}),i("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[t(P,{label:"Percentage off",isActive:100!==B.discountData.value,onValueChange:()=>{B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:void 0}))}}),100!==B.discountData.value&&t("div",Object.assign({style:{marginTop:8}},{children:t(y,{value:null!==(n=null===(o=null===(e=B.discountData)||void 0===e?void 0:e.value)||void 0===o?void 0:o.toString())&&void 0!==n?n:"",onChangeText:e=>{B.setDiscountData(Object.assign(Object.assign({},B.discountData),{value:parseInt(e)}))},type:"number",placeholder:"Eg. 50",suffixText:"%",width:"300px",errorMessage:(null===(l=B.dynamicDiscountValidationError)||void 0===l?void 0:l.inValidDiscountAmount)?"Required Field":"",state:(null===(s=B.dynamicDiscountValidationError)||void 0===s?void 0:s.inValidDiscountAmount)?"invalid":"none"})}))]}))]}))})(),!B.selectedCouponType&&t(k,{}),B.allowStaticCoupon&&B.selectedCouponType!==p.BUY_X_GET_Y&&t("div",Object.assign({style:{padding:"24px 0 16px",marginTop:16,borderTop:`1px solid ${h.colorsV2.stroke.primary}`}},{children:t(q,{selectedMinimumRequirement:B.selectedMinimumRequirement,setSelectedMinimumRequirement:B.setSelectedMinimumRequirement,discountData:B.discountData,setDiscountData:B.setDiscountData,currency:B.currency,dynamicDiscountValidationError:B.dynamicDiscountValidationError})})),B.selectedCouponType&&!B.hideExpiration&&i("div",Object.assign({style:{padding:B.selectedCouponType!==p.BUY_X_GET_Y?"24px 0 16px":"8px 0",borderTop:B.selectedCouponType!==p.BUY_X_GET_Y?`1px solid ${h.colorsV2.stroke.primary}`:"none"}},{children:[t(d,{label:"Add expiration",isDisabled:!!B.makeExpiryMandatory,isChecked:B.isAddExpirationChecked,onValueChange:e=>{B.setIsAddExpirationChecked(e),B.setDiscountData(Object.assign(Object.assign({},B.discountData),{expireAfter:void 0,expireAt:void 0})),B.setSelectedExpiration(m.DYNAMIC_EXPIRATION)},boldOnChecked:!0,labelSize:"DEFAULT"}),t(b,Object.assign({style:{color:h.colorsV2.text.secondary,marginLeft:28}},{children:"Make coupon only valid till a certain time"})),B.isAddExpirationChecked&&t(f,{discountData:B.discountData,setDiscountData:B.setDiscountData,isAddExpirationChecked:B.isAddExpirationChecked,inValidCouponExpiry:B.dynamicDiscountValidationError.inValidCouponExpiry,selectedExpiration:B.selectedExpiration,setSelectedExpiration:B.setSelectedExpiration})]}))]})};export{U as DISCOUNT_PRODUCTS,B as default};
1
+ import{__rest as e}from"../../../_virtual/_tslib.js";import{j as i}from"../../../node_modules/react/jsx-runtime.js";import t from"../../../assets/icons/info.svg.js";import{Alert as o}from"../../alerts/Alert.js";import{ALERT_TYPES as s,CONTENT_POSITION as n}from"../../alerts/AlertHelper.js";import{Button as l}from"../../button/Button.js";import{CheckBox as r}from"../../checkBox/CheckBox.js";import{DISCOUNT_APPLIES_TO as a,OFFER_APPLIES_TO as d,DISCOUNT_TYPES as c,COUPON_EXPIRATION as u,DISCOUNT_VALUE_TYPES as p,DISCOUNT_TARGET_TYPES as m,DISCOUNT_TARGET_SELECTION as C}from"../type.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as E}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"react";import"../../zeroState/ZeroState.js";import{BodySecondary as v,TitleRegular as j,TitleSmall as x}from"../../TypographyStyle.js";import{DEFAULT_THEME as D}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../list-item/ListItem.js";import"../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../icon-button/IconButton.js";import{Input as b}from"../../input/Input.js";import g from"../../../assets/icons/cross.svg.js";import"../../dropdown/MenuItem/MenuItem.js";import{RadioButton as T}from"../../radioButton/RadioButton.js";import h from"../../../assets/icons/cubeIcon.svg.js";import y from"../../../assets/icons/delete.svg.js";import O from"../../../assets/icons/edit.svg.js";import P from"../../../assets/icons/plus.svg.js";import{CouponExpiration as I}from"../CouponExpiration/CouponExpiration.js";import{DynamicCouponContainer as V}from"../DiscountModal.styled.js";import{DiscountOptionsContainer as S,DiscountDetailsOption as f,AddProductButtonsContainer as R,ProductCollectionCard as _,CubeIconContainer as N,IconContainer as F,ProductVariableCard as A}from"./DynamicCoupon.styled.js";import L from"./MinimumRequirementComponent.js";import w from"./ZeroState.js";var q;!function(e){e.ENTITLED="entitled",e.PREREQUISITE="prerequisite"}(q||(q={}));const U=U=>{var k,B,M,G,Q,X,Y,$;const W=[{selected:U.discountCouponAppliesTo===a.ENTIRE_ORDER,label:"Entire Order",value:a.ENTIRE_ORDER},{selected:U.discountCouponAppliesTo===a.SPECIFIC_PRODUCTS,label:"Specific Product",value:a.SPECIFIC_PRODUCTS},{selected:U.discountCouponAppliesTo===a.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:a.SPECIFIC_COLLECTIONS}],z=[{selected:U.offerAppliesToBuy===d.SPECIFIC_PRODUCTS,label:"Specific Product",value:d.SPECIFIC_PRODUCTS},{selected:U.offerAppliesToBuy===d.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:d.SPECIFIC_COLLECTIONS}],Z=[{selected:U.offerAppliesToGet===d.SPECIFIC_PRODUCTS,label:"Specific Product",value:d.SPECIFIC_PRODUCTS},{selected:U.offerAppliesToGet===d.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:d.SPECIFIC_COLLECTIONS}],H=(e,r,d)=>{var c,u,p,m,C,E,j,b,T,I,V,S;let f=[],L=[],w={},k={};U.useNewPicker?(w=r===q.ENTITLED?U.entitledProducts:U.prerequisiteProducts,k=null!==(c=r===q.ENTITLED?U.entitledCollections:U.prerequisiteCollections)&&void 0!==c?c:[],(null==w?void 0:w.isCustom)&&delete w.isCustom,(null==k?void 0:k.isCustom)&&delete k.isCustom,Object.values(w).forEach((e=>{Object.keys(e.products).forEach((i=>{f.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(k).forEach((e=>{"isCustom"!==e&&L.push({id:e,name:k[e].name,image:k[e].image})}))):(f=r===q.ENTITLED?U.entitledProducts:U.prerequisiteProducts,L=null!==(u=r===q.ENTITLED?U.entitledCollections:U.prerequisiteCollections)&&void 0!==u?u:[]);const B=[null===(p=U.dynamicDiscountValidationError)||void 0===p?void 0:p.inValidProductSelection,null===(m=U.dynamicDiscountValidationError)||void 0===m?void 0:m.inValidProductVariableSelection,null===(C=U.dynamicDiscountValidationError)||void 0===C?void 0:C.inValidCollectionSelection],M=[null===(E=U.dynamicDiscountValidationError)||void 0===E?void 0:E.inValidBuyXCollectionSelection,null===(j=U.dynamicDiscountValidationError)||void 0===j?void 0:j.inValidBuyXProductSelection,null===(b=U.dynamicDiscountValidationError)||void 0===b?void 0:b.inValidBuyXProductVariableSelection],G=[null===(T=U.dynamicDiscountValidationError)||void 0===T?void 0:T.inValidGetYCollectionSelection,null===(I=U.dynamicDiscountValidationError)||void 0===I?void 0:I.inValidGetYProductSelection,null===(V=U.dynamicDiscountValidationError)||void 0===V?void 0:V.inValidGetYProductVariableSelection];let Q=!1;return"couponAppliesTo"===d&&(Q=B.some(Boolean)),"buyX"===d&&(Q=M.some(Boolean)),"getY"===d&&(Q=G.some(Boolean)),i.jsxs(i.Fragment,{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:18}},{children:[e===a.SPECIFIC_PRODUCTS&&0===f.length&&(r===q.ENTITLED&&!U.entitledProductVariable||r===q.PREREQUISITE&&!U.preRequisiteProductVariable)&&!(null==L?void 0:L.length)&&i.jsxs(R,{children:[i.jsx("div",Object.assign({style:{width:U.isProductVariableSupported?"284px":"300px",display:"flex"}},{children:i.jsx(l,{buttonText:"Add Product(s)",buttonType:"dashRegular",LeadingIcon:P,matchParentWidth:!0,onClick:()=>{U.setIsProductPickerOpen(r)},error:Q})})),U.isProductVariableSupported&&U.productVariableList&&i.jsxs(i.Fragment,{children:[i.jsx(v,Object.assign({color:D.colorsV2.content.placeholder},{children:"OR"})),i.jsx(l,{buttonText:"Add Product(s) Variable",buttonType:"dashRegular",LeadingIcon:P,matchParentWidth:!0,onClick:()=>{U.setIsProductVariablePickerOpen(r)},error:Q})]})]}),e===a.SPECIFIC_COLLECTIONS&&0===L.length&&!(null==f?void 0:f.length)&&i.jsx("div",Object.assign({style:{width:"300px",display:"flex"}},{children:i.jsx(l,{buttonText:"Add collection(s)",buttonType:"dashRegular",LeadingIcon:P,matchParentWidth:!0,onClick:()=>{U.setIsCollectionPickerOpen(r)},style:{marginTop:"16px"},error:Q})}))]})),Q&&i.jsx("div",Object.assign({style:{margin:"8px 0 0"}},{children:i.jsx(o,{type:s.NEGATIVE,text:"Required Field",contentPosition:n.START,icon:()=>i.jsx(t,{width:16,height:16,color:D.colorsV2.content.negative})})})),f.length||L.length?i.jsxs("div",{children:[i.jsx(v,Object.assign({style:{margin:"8px 0"}},{children:e===a.SPECIFIC_COLLECTIONS?"Collection(s)":"Product(s)"})),i.jsxs(_,{children:[i.jsx(N,{children:i.jsx(h,{width:20,height:20,color:D.colorsV2.content.secondary})}),i.jsxs(x,{children:[e===a.SPECIFIC_PRODUCTS?f.length:L.length," ",e===a.SPECIFIC_PRODUCTS?"Product(s)":"Collection(s)"," ","added"]}),i.jsxs("div",Object.assign({style:{display:"flex",gap:4}},{children:[i.jsx(F,Object.assign({onClick:()=>{e===a.SPECIFIC_PRODUCTS?U.setIsProductPickerOpen(r):U.setIsCollectionPickerOpen(r)}},{children:i.jsx(O,{width:24,height:24,color:D.colorsV2.content.placeholder})})),i.jsx(F,Object.assign({onClick:()=>{e===a.SPECIFIC_PRODUCTS?r===q.ENTITLED?U.setEntitledProducts([]):U.setPrerequisiteProducts([]):r===q.ENTITLED?U.setEntitledCollections([]):U.setPrerequisiteCollections([])}},{children:i.jsx(y,{width:24,height:24,color:D.colorsV2.content.placeholder})}))]}))]})]}):r===q.ENTITLED&&U.entitledProductVariable?i.jsxs("div",{children:[i.jsx(v,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(A,{children:[i.jsx(x,{children:U.entitledProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(F,Object.assign({onClick:()=>{U.setEntitledProductVariable(void 0)}},{children:i.jsx(g,{width:24,height:24,color:D.colorsV2.content.primary})}))}))]})]}):r===q.PREREQUISITE&&(null===(S=U.preRequisiteProductVariable)||void 0===S?void 0:S.displayName)?i.jsxs("div",{children:[i.jsx(v,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(A,{children:[i.jsx(x,{children:U.preRequisiteProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(F,Object.assign({onClick:()=>{U.setPreRequisiteProductVariable(void 0)}},{children:i.jsx(g,{width:24,height:24,color:D.colorsV2.content.primary})}))}))]})]}):i.jsx(i.Fragment,{children:" "})]})},J=(e,t)=>{var o,s,n,l,r,c,u,p,m,C;let j=[],D=[],g={},T={};U.useNewPicker?(g=e===q.ENTITLED?U.entitledProducts:U.prerequisiteProducts,T=null!==(o=e===q.ENTITLED?U.entitledCollections:U.prerequisiteCollections)&&void 0!==o?o:[],(null==g?void 0:g.isCustom)&&delete g.isCustom,(null==T?void 0:T.isCustom)&&delete T.isCustom,Object.values(g).forEach((e=>{Object.keys(e.products).forEach((i=>{j.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(T).forEach((e=>{"isCustom"!==e&&D.push({id:e,name:T[e].name,image:T[e].image})}))):(j=e===q.ENTITLED?U.entitledProducts:U.prerequisiteProducts,D=null!==(s=e===q.ENTITLED?U.entitledCollections:U.prerequisiteCollections)&&void 0!==s?s:[]);const h=e===q.PREREQUISITE?U.offerAppliesToBuy:U.offerAppliesToGet,y=e===q.PREREQUISITE?q.PREREQUISITE:q.ENTITLED,O=h===d.SPECIFIC_PRODUCTS?a.SPECIFIC_PRODUCTS:a.SPECIFIC_COLLECTIONS;return i.jsxs("div",{children:[i.jsx(x,Object.assign({style:{marginBottom:16}},{children:e===q.PREREQUISITE?"Customer buys":"Customer gets"})),i.jsxs("div",Object.assign({style:{display:"flex"}},{children:[!t&&i.jsx("div",{children:i.jsxs("div",Object.assign({className:"input__rows"},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(b,{value:e===q.ENTITLED?null!==(l=null===(n=U.discountData.entitledQuantity)||void 0===n?void 0:n.toString())&&void 0!==l?l:"":null!==(c=null===(r=U.discountData.prerequisiteQuantity)||void 0===r?void 0:r.toString())&&void 0!==c?c:"",type:"number",onChangeText:i=>{e===q.ENTITLED?U.setDiscountData(Object.assign(Object.assign({},U.discountData),{entitledQuantity:parseInt(i)})):U.setDiscountData(Object.assign(Object.assign({},U.discountData),{prerequisiteQuantity:parseInt(i)}))},labelText:"Quantity of products",placeholder:"Eg. 2",width:"300px",errorMessage:e===q.PREREQUISITE&&(null===(u=U.dynamicDiscountValidationError)||void 0===u?void 0:u.inValidBuyXValue)||e===q.ENTITLED&&(null===(p=U.dynamicDiscountValidationError)||void 0===p?void 0:p.inValidGetYValue)?"Required Field":"",state:e===q.PREREQUISITE&&(null===(m=U.dynamicDiscountValidationError)||void 0===m?void 0:m.inValidBuyXValue)||e===q.ENTITLED&&(null===(C=U.dynamicDiscountValidationError)||void 0===C?void 0:C.inValidGetYValue)?"invalid":"none"})})),i.jsx("div",{className:"input__wrapper"})]}))}),i.jsxs("div",{children:[i.jsx(v,Object.assign({style:{marginBottom:8}},{children:"Any items from"})),e===q.PREREQUISITE&&i.jsx(E,{width:"244px",options:z,placement:"bottom-start",onSelect:e=>{var i,t,o;U.setOfferAppliesToBuy(e.value),U.setPrerequisiteProducts([]),U.setPrerequisiteCollections([]),U.setPreRequisiteProductVariable(void 0),U.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidBuyXCollectionSelection:!1,inValidBuyXProductSelection:!1,inValidBuyXProductVariableSelection:!1}))),U.setDiscountData(Object.assign(Object.assign({},U.discountData),{prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:null===(i=U.discountData.collectionsConf)||void 0===i?void 0:i.entitledCollections,prerequisiteCollections:{}},productsConf:{entitledProducts:null===(t=U.discountData.productsConf)||void 0===t?void 0:t.entitledProducts,prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:null===(o=U.discountData.productVariableConf)||void 0===o?void 0:o.entitledProductVariable,prerequisiteProductVariable:{}}}))}}),e===q.ENTITLED&&i.jsx(E,{width:"244px",options:Z,placement:"bottom-start",onSelect:e=>{var i,t,o;U.setOfferAppliesToGet(e.value),U.setEntitledProducts([]),U.setEntitledCollections([]),U.setEntitledProductVariable(void 0),U.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidGetYCollectionSelection:!1,inValidGetYProductSelection:!1,inValidGetYProductVariableSelection:!1}))),U.setDiscountData(Object.assign(Object.assign({},U.discountData),{entitledCollectionIds:[],entitledProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:null===(i=U.discountData.collectionsConf)||void 0===i?void 0:i.prerequisiteCollections},productsConf:{entitledProducts:{},prerequisiteProducts:null===(t=U.discountData.productsConf)||void 0===t?void 0:t.prerequisiteProducts},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:null===(o=U.discountData.productVariableConf)||void 0===o?void 0:o.prerequisiteProductVariable}}))}})]})]})),H(O,y,e===q.PREREQUISITE?"buyX":"getY")]})};return i.jsxs(V,Object.assign({style:U.noTopMargin?{marginTop:0}:{}},{children:[i.jsxs("div",{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:16}},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(b,{value:null!==(k=U.discountData.title)&&void 0!==k?k:"",onChangeText:e=>{var i;U.setDiscountData(Object.assign(Object.assign({},U.discountData),{title:null!==(i=null==e?void 0:e.trim())&&void 0!==i?i:""}))},maxCharLimit:30,labelText:"Discount Coupon Title",placeholder:`Eg. “Flat ${null!==(B=U.currency)&&void 0!==B?B:""} 15 Off”`,hintText:"Will be same for everyone. Can’t be changed later",width:"300px",isRequired:!0,errorMessage:(null===(M=U.dynamicDiscountValidationError)||void 0===M?void 0:M.invalidCouponTitle)?"Required Field":"",state:(null===(G=U.dynamicDiscountValidationError)||void 0===G?void 0:G.invalidCouponTitle)?"invalid":"none"})})),!U.hideProbability&&i.jsx(b,{value:null!==(X=null===(Q=U.discountData.probability)||void 0===Q?void 0:Q.toString())&&void 0!==X?X:"",type:"number",onChangeText:e=>{U.setDiscountData(Object.assign(Object.assign({},U.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability of getting coupon ",hintText:"Enter a decimal value between 0-1",placeholder:"Eg. 0.5",maxCharLimit:4,width:"300px",isRequired:!0,errorMessage:(null===(Y=U.dynamicDiscountValidationError)||void 0===Y?void 0:Y.inValidProbability)?"Required Field":"",state:(null===($=U.dynamicDiscountValidationError)||void 0===$?void 0:$.inValidProbability)?"invalid":"none"})]})),i.jsx("div",{style:{height:"1px",width:"100%",background:D.colorsV2.stroke.primary,margin:"24px 0 8px"}})]}),U.allowStaticCoupon&&i.jsx((()=>i.jsxs("div",{children:[i.jsx(j,{children:"Discount Details"}),i.jsx(S,{children:U.discountDetailsOptions.map((t=>{return i.jsxs(f,Object.assign({selected:U.selectedDiscountDetails.id===t.id,onClick:()=>(i=>{if(U.selectedDiscountDetails.id!==i.id)if(U.resetValidationErrors(),U.setValidationErrorMessage(""),U.setDiscountCouponAppliesTo(a.ENTIRE_ORDER),U.setSelectedDiscountDetails(i),U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:void 0})),U.setPreRequisiteProductVariable(void 0),U.setEntitledProductVariable(void 0),["percentage","amount"].includes(i.value)){U.onChangeCouponType({label:"Amount off on order",selected:!0,value:c.AMOUNT_OFF_ORDER});const t=Object.assign(Object.assign({},U.discountData),{valueType:"percentage"===i.value?p.PERCENTAGE:p.FIXED_AMOUNT,value:void 0,targetType:m.LINE_ITEM,targetSelection:C.ALL,entitledCollectionIds:[],entitledProductIds:[],prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:{}},productsConf:{entitledProducts:{},prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:{}}}),o=e(t,["entitledQuantity","prerequisiteQuantity"]);U.setDiscountData(o)}else U.onChangeCouponType({label:i.label,selected:!0,value:i.value})})(t)},{children:[t.icon((o=t.id,U.selectedDiscountDetails.id===o?D.colorsV2.stroke.brand:D.colorsV2.text.secondary)),t.label]}),t.id);var o}))})]})),{}),(U.selectedCouponType===c.AMOUNT_OFF_ORDER||U.selectedCouponType===c.AMOUNT_OFF_PRODUCTS)&&(()=>{var e,t,o,s,n,l;return i.jsxs(i.Fragment,{children:[i.jsx("div",Object.assign({className:"input__rows"},{children:i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(b,{value:null!==(o=null===(t=null===(e=U.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",labelText:"Discount amount",type:"number",width:"300px",onChangeText:e=>{U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:parseInt(e)}))},placeholder:"15",prefixText:U.discountData.valueType===p.FIXED_AMOUNT?null!==(s=U.currency)&&void 0!==s?s:"":void 0,suffixText:U.discountData.valueType===p.PERCENTAGE?"%":void 0,errorMessage:(null===(n=U.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"Required Field":"",state:(null===(l=U.dynamicDiscountValidationError)||void 0===l?void 0:l.inValidDiscountAmount)?"invalid":"none"})}))})),i.jsx("div",Object.assign({style:{paddingTop:"24px",marginTop:16,borderTop:`1px solid ${D.colorsV2.stroke.primary}`}},{children:i.jsxs("div",Object.assign({className:"input__wrapper"},{children:[i.jsx(j,Object.assign({style:{marginBottom:10}},{children:"Applies to"})),i.jsx("div",Object.assign({style:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto"}},{children:i.jsx(E,{width:"300px",options:W,placement:"bottom-start",onSelect:e=>{const i="value"in e&&e.value===a.ENTIRE_ORDER?{label:"Amount off on order",selected:!0,value:c.AMOUNT_OFF_ORDER}:{label:"Amount off on products",selected:!0,value:c.AMOUNT_OFF_PRODUCTS};U.onChangeCouponType(i),U.setDiscountCouponAppliesTo(e.value),U.setEntitledProductVariable(void 0),U.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidProductVariableSelection:!1,inValidProductSelection:!1,inValidCollectionSelection:!1})))}})})),(U.discountCouponAppliesTo===a.SPECIFIC_PRODUCTS||U.discountCouponAppliesTo===a.SPECIFIC_COLLECTIONS)&&H(U.discountCouponAppliesTo,q.ENTITLED,"couponAppliesTo")]}))}))]})})(),U.selectedCouponType===c.BUY_X_GET_Y&&(()=>{var e,t,o,s,n;return i.jsxs(V,Object.assign({style:{border:`1px solid ${D.colorsV2.stroke.primary}`,padding:"16px",borderRadius:"4px",margin:0}},{children:[J(q.PREREQUISITE),i.jsx("div",{style:{width:"100%",height:"1px",backgroundColor:D.colorsV2.stroke.primary,margin:"8px 0"}}),J(q.ENTITLED),i.jsx(v,Object.assign({style:{marginTop:"8px"}},{children:"At a discounted value"})),i.jsx("div",{children:i.jsx(T,{label:"Free",isActive:100===U.discountData.value,onValueChange:e=>{e?U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:100})):U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:void 0}))}})}),i.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[i.jsx(T,{label:"Percentage off",isActive:100!==U.discountData.value,onValueChange:()=>{U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:void 0}))}}),100!==U.discountData.value&&i.jsx("div",Object.assign({style:{marginTop:8}},{children:i.jsx(b,{value:null!==(o=null===(t=null===(e=U.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",onChangeText:e=>{U.setDiscountData(Object.assign(Object.assign({},U.discountData),{value:parseInt(e)}))},type:"number",placeholder:"Eg. 50",suffixText:"%",width:"300px",errorMessage:(null===(s=U.dynamicDiscountValidationError)||void 0===s?void 0:s.inValidDiscountAmount)?"Required Field":"",state:(null===(n=U.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"invalid":"none"})}))]}))]}))})(),!U.selectedCouponType&&i.jsx(w,{}),U.allowStaticCoupon&&U.selectedCouponType!==c.BUY_X_GET_Y&&i.jsx("div",Object.assign({style:{padding:"24px 0 16px",marginTop:16,borderTop:`1px solid ${D.colorsV2.stroke.primary}`}},{children:i.jsx(L,{selectedMinimumRequirement:U.selectedMinimumRequirement,setSelectedMinimumRequirement:U.setSelectedMinimumRequirement,discountData:U.discountData,setDiscountData:U.setDiscountData,currency:U.currency,dynamicDiscountValidationError:U.dynamicDiscountValidationError})})),U.selectedCouponType&&!U.hideExpiration&&i.jsxs("div",Object.assign({style:{padding:U.selectedCouponType!==c.BUY_X_GET_Y?"24px 0 16px":"8px 0",borderTop:U.selectedCouponType!==c.BUY_X_GET_Y?`1px solid ${D.colorsV2.stroke.primary}`:"none"}},{children:[i.jsx(r,{label:"Add expiration",isDisabled:!!U.makeExpiryMandatory,isChecked:U.isAddExpirationChecked,onValueChange:e=>{U.setIsAddExpirationChecked(e),U.setDiscountData(Object.assign(Object.assign({},U.discountData),{expireAfter:void 0,expireAt:void 0})),U.setSelectedExpiration(U.isUsageFromStatic?u.FIXED_EXPIRATION:u.DYNAMIC_EXPIRATION)},boldOnChecked:!0,labelSize:"DEFAULT"}),i.jsx(v,Object.assign({style:{color:D.colorsV2.text.secondary,marginLeft:28}},{children:"Make coupon only valid till a certain time"})),U.isAddExpirationChecked&&i.jsx(I,{discountData:U.discountData,setDiscountData:U.setDiscountData,isAddExpirationChecked:U.isAddExpirationChecked,inValidCouponExpiry:U.dynamicDiscountValidationError.inValidCouponExpiry,selectedExpiration:U.selectedExpiration,setSelectedExpiration:U.setSelectedExpiration,hideExpirationOptions:U.isUsageFromStatic})]}))]}))};export{q as DISCOUNT_PRODUCTS,U as default};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as n}from"react/jsx-runtime";import{CheckBox as i}from"../../checkBox/CheckBox.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as o}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"react";import"../../zeroState/ZeroState.js";import{BodySecondary as m}from"../../TypographyStyle.js";import{DEFAULT_THEME as s}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../list-item/ListItem.js";import"../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../button/Button.js";import"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../icon-button/IconButton.js";import{Input as r}from"../../input/Input.js";import"../../dropdown/MenuItem/MenuItem.js";import{MIN_PURCHASE_REQUIREMENT as d}from"../type.js";const u=u=>{var a,c,l,p,M,j,v,D,O;const b=[{selected:u.selectedMinimumRequirement===d.AMOUNT,label:"Minimum order value",value:d.AMOUNT},{selected:u.selectedMinimumRequirement===d.QUANTITY,label:"Minimum number of items",value:d.QUANTITY}];return e(t,{children:[n(i,{label:"Minimum Purchase Requirements",isChecked:u.selectedMinimumRequirement!==d.NA,onValueChange:e=>{e?(u.setSelectedMinimumRequirement(d.AMOUNT),u.setDiscountData(Object.assign(Object.assign({},u.discountData),{minQuantity:void 0,minAmount:void 0}))):(u.setSelectedMinimumRequirement(d.NA),u.setDiscountData(Object.assign(Object.assign({},u.discountData),{minQuantity:void 0,minAmount:void 0})))},boldOnChecked:!0,labelSize:"DEFAULT"}),n(m,Object.assign({style:{color:s.colorsV2.text.secondary,marginLeft:28}},{children:"Enable coupon only after a minimum order value"})),u.selectedMinimumRequirement!==d.NA&&e("div",Object.assign({style:{margin:"16px 0 0 28px"},className:"input__rows"},{children:[e("div",Object.assign({className:"input__wrapper"},{children:[n(m,Object.assign({style:{marginBottom:10}},{children:"Requirements"})),n(o,{options:b,placement:"bottom-start",onSelect:e=>{const t=e.value;u.setSelectedMinimumRequirement(t),u.setDiscountData(Object.assign(Object.assign({},u.discountData),{minQuantity:void 0,minAmount:void 0}))},truncatedText:!1,width:"272px"})]})),n("div",Object.assign({className:"input__wrapper"},{children:n(r,{value:u.selectedMinimumRequirement===d.AMOUNT?null!==(c=null===(a=u.discountData.minAmount)||void 0===a?void 0:a.toString())&&void 0!==c?c:"":null!==(p=null===(l=u.discountData.minQuantity)||void 0===l?void 0:l.toString())&&void 0!==p?p:"",onChangeText:e=>{u.selectedMinimumRequirement===d.AMOUNT?u.setDiscountData(Object.assign(Object.assign({},u.discountData),{minAmount:parseInt(e)})):u.selectedMinimumRequirement===d.QUANTITY&&u.setDiscountData(Object.assign(Object.assign({},u.discountData),{minQuantity:parseInt(e)}))},labelText:u.selectedMinimumRequirement===d.AMOUNT?"Minimum amount":"Minimum no. of items",prefixText:u.selectedMinimumRequirement===d.AMOUNT?null!==(M=u.currency)&&void 0!==M?M:"":void 0,type:"number",placeholder:u.selectedMinimumRequirement===d.AMOUNT?"Eg. 5000":"Eg. 5",errorMessage:(null===(j=u.dynamicDiscountValidationError)||void 0===j?void 0:j.inValidMinimumAmount)||(null===(v=u.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidMinimumQuantity)?"Required Field":"",state:(null===(D=u.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidMinimumAmount)||(null===(O=u.dynamicDiscountValidationError)||void 0===O?void 0:O.inValidMinimumQuantity)?"invalid":"none"})}))]}))]})};export{u as default};
1
+ import{j as e}from"../../../node_modules/react/jsx-runtime.js";import{CheckBox as n}from"../../checkBox/CheckBox.js";import"../../dropdown/DropdownPopover/index.js";import{Dropdown as t}from"../../dropdown/Dropdown.js";import"../../dropdown/ChipDropdown.js";import"react";import"../../zeroState/ZeroState.js";import{BodySecondary as i}from"../../TypographyStyle.js";import{DEFAULT_THEME as o}from"../../../constants/Theme.js";import"../../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../../list-item/ListItem.js";import"../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../../button/Button.js";import"../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../../icon-button/IconButton.js";import{Input as s}from"../../input/Input.js";import"../../dropdown/MenuItem/MenuItem.js";import{MIN_PURCHASE_REQUIREMENT as m}from"../type.js";const r=r=>{var d,u,a,l,c,p,j,M,v;const D=[{selected:r.selectedMinimumRequirement===m.AMOUNT,label:"Minimum order value",value:m.AMOUNT},{selected:r.selectedMinimumRequirement===m.QUANTITY,label:"Minimum number of items",value:m.QUANTITY}];return e.jsxs(e.Fragment,{children:[e.jsx(n,{label:"Minimum Purchase Requirements",isChecked:r.selectedMinimumRequirement!==m.NA,onValueChange:e=>{e?(r.setSelectedMinimumRequirement(m.AMOUNT),r.setDiscountData(Object.assign(Object.assign({},r.discountData),{minQuantity:void 0,minAmount:void 0}))):(r.setSelectedMinimumRequirement(m.NA),r.setDiscountData(Object.assign(Object.assign({},r.discountData),{minQuantity:void 0,minAmount:void 0})))},boldOnChecked:!0,labelSize:"DEFAULT"}),e.jsx(i,Object.assign({style:{color:o.colorsV2.text.secondary,marginLeft:28}},{children:"Enable coupon only after a minimum order value"})),r.selectedMinimumRequirement!==m.NA&&e.jsxs("div",Object.assign({style:{margin:"16px 0 0 28px"},className:"input__rows"},{children:[e.jsxs("div",Object.assign({className:"input__wrapper"},{children:[e.jsx(i,Object.assign({style:{marginBottom:10}},{children:"Requirements"})),e.jsx(t,{options:D,placement:"bottom-start",onSelect:e=>{const n=e.value;r.setSelectedMinimumRequirement(n),r.setDiscountData(Object.assign(Object.assign({},r.discountData),{minQuantity:void 0,minAmount:void 0}))},truncatedText:!1,width:"272px"})]})),e.jsx("div",Object.assign({className:"input__wrapper"},{children:e.jsx(s,{value:r.selectedMinimumRequirement===m.AMOUNT?null!==(u=null===(d=r.discountData.minAmount)||void 0===d?void 0:d.toString())&&void 0!==u?u:"":null!==(l=null===(a=r.discountData.minQuantity)||void 0===a?void 0:a.toString())&&void 0!==l?l:"",onChangeText:e=>{r.selectedMinimumRequirement===m.AMOUNT?r.setDiscountData(Object.assign(Object.assign({},r.discountData),{minAmount:parseInt(e)})):r.selectedMinimumRequirement===m.QUANTITY&&r.setDiscountData(Object.assign(Object.assign({},r.discountData),{minQuantity:parseInt(e)}))},labelText:r.selectedMinimumRequirement===m.AMOUNT?"Minimum amount":"Minimum no. of items",prefixText:r.selectedMinimumRequirement===m.AMOUNT?null!==(c=r.currency)&&void 0!==c?c:"":void 0,type:"number",placeholder:r.selectedMinimumRequirement===m.AMOUNT?"Eg. 5000":"Eg. 5",errorMessage:(null===(p=r.dynamicDiscountValidationError)||void 0===p?void 0:p.inValidMinimumAmount)||(null===(j=r.dynamicDiscountValidationError)||void 0===j?void 0:j.inValidMinimumQuantity)?"Required Field":"",state:(null===(M=r.dynamicDiscountValidationError)||void 0===M?void 0:M.inValidMinimumAmount)||(null===(v=r.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidMinimumQuantity)?"invalid":"none"})}))]}))]})};export{r as default};
@@ -1,16 +1,16 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"styled-components";import{TitleMedium as o,BodyPrimary as n}from"../../TypographyStyle.js";import{DEFAULT_THEME as s}from"../../../constants/Theme.js";import i from"../../../assets/icons/cursor.svg.js";const c=()=>e(d,{children:[t(l,{children:t(i,{width:32,color:s.colorsV2.content.primaryInverse})}),t(o,{children:"No discount has been selected"}),t(n,{children:"Please select a discount type"})]}),d=r.div`
1
+ import{j as e}from"../../../node_modules/react/jsx-runtime.js";import s from"styled-components";import{TitleMedium as o,BodyPrimary as t}from"../../TypographyStyle.js";import{DEFAULT_THEME as r}from"../../../constants/Theme.js";import n from"../../../assets/icons/cursor.svg.js";const i=()=>e.jsxs(c,{children:[e.jsx(d,{children:e.jsx(n,{width:32,color:r.colorsV2.content.primaryInverse})}),e.jsx(o,{children:"No discount has been selected"}),e.jsx(t,{children:"Please select a discount type"})]}),c=s.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 10px;
5
5
  padding: 40px 0;
6
6
  justify-content: center;
7
7
  align-items: center;
8
- `,l=r.div`
8
+ `,d=s.div`
9
9
  height: 52px;
10
10
  width: 52px;
11
- background-color: ${s.colorsV2.background.inverse};
11
+ background-color: ${r.colorsV2.background.inverse};
12
12
  border-radius: 50%;
13
13
  display: flex;
14
14
  justify-content: center;
15
15
  align-items: center;
16
- `;export{c as default};
16
+ `;export{i as default};
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
- import { ICouponData, IStaticDiscountValidationError } from "../type";
2
+ import { COUPON_EXPIRATION, DISCOUNT_APPLIES_TO, DISCOUNT_TYPES, ICouponData, IDynamicDiscountValidationError, IStaticDiscountValidationError, MIN_PURCHASE_REQUIREMENT, OFFER_APPLIES_TO, ProductVariable } from "../type";
3
+ import { SingleOption } from "../../dropdown/type";
4
+ import { Collection, Product } from "../../product-picker/type";
5
+ import { VariableListInterfaceV3 } from "../../variable-picker-v3/model";
6
+ import { DISCOUNT_PRODUCTS } from '../DynamicCoupon/DynamicCoupon';
3
7
  interface StaticCouponI {
4
8
  discountData: ICouponData;
5
9
  setDiscountData: React.Dispatch<React.SetStateAction<ICouponData>>;
@@ -7,6 +11,52 @@ interface StaticCouponI {
7
11
  discountAdminUrl?: string;
8
12
  staticDiscountValidationError?: IStaticDiscountValidationError;
9
13
  currency?: string;
14
+ getDetailedDescription?: boolean;
15
+ selectedCouponType?: DISCOUNT_TYPES;
16
+ setSelectedCouponType?: React.Dispatch<React.SetStateAction<DISCOUNT_TYPES | undefined>>;
17
+ selectedMinimumRequirement?: MIN_PURCHASE_REQUIREMENT;
18
+ setSelectedMinimumRequirement?: React.Dispatch<React.SetStateAction<MIN_PURCHASE_REQUIREMENT>>;
19
+ discountCouponAppliesTo?: DISCOUNT_APPLIES_TO;
20
+ offerAppliesToBuy?: OFFER_APPLIES_TO;
21
+ offerAppliesToGet?: OFFER_APPLIES_TO;
22
+ setDiscountCouponAppliesTo?: React.Dispatch<React.SetStateAction<DISCOUNT_APPLIES_TO>>;
23
+ setOfferAppliesToBuy?: React.Dispatch<React.SetStateAction<OFFER_APPLIES_TO>>;
24
+ setOfferAppliesToGet?: React.Dispatch<React.SetStateAction<OFFER_APPLIES_TO>>;
25
+ hideExpiration?: boolean;
26
+ onChangeCouponType?: (option: SingleOption) => void;
27
+ entitledProducts?: Product[];
28
+ prerequisiteProducts?: Product[];
29
+ setEntitledProducts?: React.Dispatch<React.SetStateAction<Product[] | undefined>>;
30
+ setPrerequisiteProducts?: React.Dispatch<React.SetStateAction<Product[] | undefined>>;
31
+ entitledCollections?: Collection[];
32
+ prerequisiteCollections?: Collection[];
33
+ setEntitledCollections?: React.Dispatch<React.SetStateAction<Collection[] | undefined>>;
34
+ setPrerequisiteCollections?: React.Dispatch<React.SetStateAction<Collection[] | undefined>>;
35
+ setIsProductPickerOpen?: React.Dispatch<React.SetStateAction<DISCOUNT_PRODUCTS | undefined>>;
36
+ setIsProductVariablePickerOpen?: React.Dispatch<React.SetStateAction<DISCOUNT_PRODUCTS | undefined>>;
37
+ setIsCollectionPickerOpen?: React.Dispatch<React.SetStateAction<DISCOUNT_PRODUCTS | undefined>>;
38
+ productPickerOpen?: DISCOUNT_PRODUCTS | undefined;
39
+ productVariablePickerOpen?: DISCOUNT_PRODUCTS | undefined;
40
+ collectionPickerOpen?: DISCOUNT_PRODUCTS | undefined;
41
+ useNewPicker?: boolean;
42
+ selectedDiscountDetails?: any;
43
+ setSelectedDiscountDetails?: React.Dispatch<React.SetStateAction<any>>;
44
+ isProductVariableSupported?: boolean;
45
+ entitledProductVariable?: ProductVariable;
46
+ setEntitledProductVariable?: React.Dispatch<React.SetStateAction<ProductVariable | undefined>>;
47
+ preRequisiteProductVariable?: ProductVariable;
48
+ setPreRequisiteProductVariable?: React.Dispatch<React.SetStateAction<ProductVariable | undefined>>;
49
+ productVariableList?: VariableListInterfaceV3[];
50
+ isAddExpirationChecked?: boolean;
51
+ setIsAddExpirationChecked?: React.Dispatch<React.SetStateAction<boolean>>;
52
+ dynamicDiscountValidationError?: IDynamicDiscountValidationError;
53
+ setDynamicDiscountValidationError?: React.Dispatch<React.SetStateAction<IDynamicDiscountValidationError>>;
54
+ setValidationErrorMessage?: React.Dispatch<React.SetStateAction<string>>;
55
+ resetValidationErrors?: () => void;
56
+ discountDetailsOptions?: any[];
57
+ selectedExpiration?: COUPON_EXPIRATION | undefined;
58
+ setSelectedExpiration?: React.Dispatch<React.SetStateAction<COUPON_EXPIRATION | undefined>>;
59
+ makeExpiryMandatory?: boolean;
10
60
  }
11
61
  declare const StaticCoupon: React.FC<StaticCouponI>;
12
62
  export default StaticCoupon;
@@ -1 +1 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import o from"../../../assets/icons/info.svg.js";import{Alert as e}from"../../alerts/Alert.js";import{ALERT_TYPES as a,CONTENT_POSITION as n}from"../../alerts/AlertHelper.js";import{Input as r}from"../../input/Input.js";import{DEFAULT_THEME as s}from"../../../constants/Theme.js";import{StaticCouponContainerStyled as l}from"../DiscountModal.styled.js";const d=d=>{var c,u,p,v,b,m,D,g,h;return i(l,{children:[i("div",Object.assign({className:"static-coupon__data"},{children:[t("div",Object.assign({className:"static-input__wrapper"},{children:t(r,{maxCharLimit:30,onChangeText:i=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{couponCode:null==i?void 0:i.trim()}))},labelText:"Discount Code",value:d.discountData.couponCode,placeholder:"Eg. FLAT15OFF",isRequired:!0,errorMessage:(null===(c=d.staticDiscountValidationError)||void 0===c?void 0:c.invalidDiscountCode)?"Required Field":"",state:(null===(u=d.staticDiscountValidationError)||void 0===u?void 0:u.invalidDiscountCode)?"invalid":"none",hintText:"Code created on Shopify"})})),t("div",Object.assign({className:"static-input__wrapper"},{children:t(r,{maxCharLimit:30,labelText:"Discount Coupon Title",value:d.discountData.title,onChangeText:i=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{title:null==i?void 0:i.trim()}))},hintText:"Same for everyone. Can’t be changed later",isRequired:!0,placeholder:`Eg. “Flat ${null!==(p=d.currency)&&void 0!==p?p:""}15 Off”`,errorMessage:(null===(v=d.staticDiscountValidationError)||void 0===v?void 0:v.invalidCouponTitle)?"Required Field":"",state:(null===(b=d.staticDiscountValidationError)||void 0===b?void 0:b.invalidCouponTitle)?"invalid":"none"})}))]})),t(r,{maxCharLimit:60,labelText:"Coupon Description",value:d.discountData.description,onChangeText:i=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{description:null==i?void 0:i.trim()}))},placeholder:"Eg. “Get Flat 15% off”",isRequired:!0,errorMessage:(null===(m=d.staticDiscountValidationError)||void 0===m?void 0:m.invalidCouponDescription)?"Required Field":"",state:(null===(D=d.staticDiscountValidationError)||void 0===D?void 0:D.invalidCouponDescription)?"invalid":"none"}),!d.hideProbability&&t(r,{labelText:"Probability of getting coupon",value:null!==d.discountData.probability&&void 0!==d.discountData.probability?d.discountData.probability.toString():"",type:"number",onChangeText:i=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{probability:i.startsWith(".")?parseFloat(parseFloat(`0${i}`).toFixed(2)):parseFloat(parseFloat(i).toFixed(2))}))},placeholder:"Eg. 0.5",width:"288px",hintText:"Enter a decimal value between 0-1",isRequired:!0,errorMessage:(null===(g=d.staticDiscountValidationError)||void 0===g?void 0:g.inValidProbability)?"Enter probability in decimals (0 - 1)":"",state:(null===(h=d.staticDiscountValidationError)||void 0===h?void 0:h.inValidProbability)?"invalid":"none"}),d.discountAdminUrl&&t(e,{type:a.NEUTRAL,text:"To create a discount code on Shopify,",contentPosition:n.START,redirectToText:"click here",redirectTo:d.discountAdminUrl,icon:()=>t(o,{width:16,height:16,color:s.colorsV2.content.secondary})})]})};export{d as default};
1
+ import{j as e}from"../../../node_modules/react/jsx-runtime.js";import i from"../../../assets/icons/info.svg.js";import{Alert as t}from"../../alerts/Alert.js";import{ALERT_TYPES as o,CONTENT_POSITION as s}from"../../alerts/AlertHelper.js";import{Input as n}from"../../input/Input.js";import{DEFAULT_THEME as r}from"../../../constants/Theme.js";import{StaticCouponContainerStyled as a}from"../DiscountModal.styled.js";import l from"../DynamicCoupon/DynamicCoupon.js";const d=d=>{var c,u,p,D,m,b,C,v,x,P,T,h,E,g,y,j;return d.getDetailedDescription?e.jsxs(a,Object.assign({style:{marginTop:0}},{children:[e.jsx(n,{maxCharLimit:30,onChangeText:e=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{couponCode:null==e?void 0:e.trim()}))},labelText:"Discount Code",value:d.discountData.couponCode,placeholder:"Eg. FLAT15OFF",isRequired:!0,errorMessage:(null===(c=d.staticDiscountValidationError)||void 0===c?void 0:c.invalidDiscountCode)?"Required Field":"",state:(null===(u=d.staticDiscountValidationError)||void 0===u?void 0:u.invalidDiscountCode)?"invalid":"none",hintText:"Code created on Shopify",width:"300px"}),e.jsx(l,{currency:d.currency,entitledProducts:null!==(p=d.entitledProducts)&&void 0!==p?p:[],prerequisiteProducts:null!==(D=d.prerequisiteProducts)&&void 0!==D?D:[],setEntitledProducts:d.setEntitledProducts,setPrerequisiteProducts:d.setPrerequisiteProducts,discountData:d.discountData,productPickerOpen:d.productPickerOpen,productVariablePickerOpen:d.productVariablePickerOpen,setIsProductPickerOpen:d.setIsProductPickerOpen,setIsProductVariablePickerOpen:d.setIsProductVariablePickerOpen,setDiscountData:d.setDiscountData,selectedCouponType:d.selectedCouponType,setSelectedCouponType:d.setSelectedCouponType,selectedMinimumRequirement:d.selectedMinimumRequirement,setSelectedMinimumRequirement:d.setSelectedMinimumRequirement,discountCouponAppliesTo:d.discountCouponAppliesTo,offerAppliesToBuy:d.offerAppliesToBuy,offerAppliesToGet:d.offerAppliesToGet,setDiscountCouponAppliesTo:d.setDiscountCouponAppliesTo,setOfferAppliesToBuy:d.setOfferAppliesToBuy,setOfferAppliesToGet:d.setOfferAppliesToGet,hideProbability:!0,hideExpiration:d.hideExpiration||!1,allowStaticCoupon:!0,noTopMargin:!0,onChangeCouponType:d.onChangeCouponType,collectionPickerOpen:d.collectionPickerOpen,entitledCollections:null!==(m=d.entitledCollections)&&void 0!==m?m:[],prerequisiteCollections:null!==(b=d.prerequisiteCollections)&&void 0!==b?b:[],setIsCollectionPickerOpen:d.setIsCollectionPickerOpen,setEntitledCollections:d.setEntitledCollections,setPrerequisiteCollections:d.setPrerequisiteCollections,useNewPicker:d.useNewPicker,setSelectedDiscountDetails:d.setSelectedDiscountDetails,selectedDiscountDetails:d.selectedDiscountDetails,isProductVariableSupported:d.isProductVariableSupported,entitledProductVariable:d.entitledProductVariable,setEntitledProductVariable:d.setEntitledProductVariable,preRequisiteProductVariable:d.preRequisiteProductVariable,setPreRequisiteProductVariable:d.setPreRequisiteProductVariable,productVariableList:d.productVariableList,isAddExpirationChecked:d.isAddExpirationChecked,setIsAddExpirationChecked:d.setIsAddExpirationChecked,dynamicDiscountValidationError:d.dynamicDiscountValidationError,setDynamicDiscountValidationError:d.setDynamicDiscountValidationError,setValidationErrorMessage:d.setValidationErrorMessage,resetValidationErrors:d.resetValidationErrors,discountDetailsOptions:d.discountDetailsOptions,selectedExpiration:d.selectedExpiration,setSelectedExpiration:d.setSelectedExpiration,makeExpiryMandatory:null!==(C=d.makeExpiryMandatory)&&void 0!==C&&C,isUsageFromStatic:!0})]})):e.jsxs(a,{children:[e.jsxs("div",Object.assign({className:"static-coupon__data"},{children:[e.jsx("div",Object.assign({className:"static-input__wrapper"},{children:e.jsx(n,{maxCharLimit:30,onChangeText:e=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{couponCode:null==e?void 0:e.trim()}))},labelText:"Discount Code",value:d.discountData.couponCode,placeholder:"Eg. FLAT15OFF",isRequired:!0,errorMessage:(null===(v=d.staticDiscountValidationError)||void 0===v?void 0:v.invalidDiscountCode)?"Required Field":"",state:(null===(x=d.staticDiscountValidationError)||void 0===x?void 0:x.invalidDiscountCode)?"invalid":"none",hintText:"Code created on Shopify"})})),e.jsx("div",Object.assign({className:"static-input__wrapper"},{children:e.jsx(n,{maxCharLimit:30,labelText:"Discount Coupon Title",value:d.discountData.title,onChangeText:e=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{title:null==e?void 0:e.trim()}))},hintText:"Same for everyone. Can’t be changed later",isRequired:!0,placeholder:`Eg. “Flat ${null!==(P=d.currency)&&void 0!==P?P:""}15 Off”`,errorMessage:(null===(T=d.staticDiscountValidationError)||void 0===T?void 0:T.invalidCouponTitle)?"Required Field":"",state:(null===(h=d.staticDiscountValidationError)||void 0===h?void 0:h.invalidCouponTitle)?"invalid":"none"})}))]})),e.jsx(n,{maxCharLimit:60,labelText:"Coupon Description",value:d.discountData.description,onChangeText:e=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{description:null==e?void 0:e.trim()}))},placeholder:"Eg. “Get Flat 15% off”",isRequired:!0,errorMessage:(null===(E=d.staticDiscountValidationError)||void 0===E?void 0:E.invalidCouponDescription)?"Required Field":"",state:(null===(g=d.staticDiscountValidationError)||void 0===g?void 0:g.invalidCouponDescription)?"invalid":"none"}),!d.hideProbability&&e.jsx(n,{labelText:"Probability of getting coupon",value:null!==d.discountData.probability&&void 0!==d.discountData.probability?d.discountData.probability.toString():"",type:"number",onChangeText:e=>{d.setDiscountData(Object.assign(Object.assign({},d.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},placeholder:"Eg. 0.5",width:"288px",hintText:"Enter a decimal value between 0-1",isRequired:!0,errorMessage:(null===(y=d.staticDiscountValidationError)||void 0===y?void 0:y.inValidProbability)?"Enter probability in decimals (0 - 1)":"",state:(null===(j=d.staticDiscountValidationError)||void 0===j?void 0:j.inValidProbability)?"invalid":"none"}),d.discountAdminUrl&&e.jsx(t,{type:o.NEUTRAL,text:"To create a discount code on Shopify,",contentPosition:s.START,redirectToText:"click here",redirectTo:d.discountAdminUrl,icon:()=>e.jsx(i,{width:16,height:16,color:r.colorsV2.content.secondary})})]})};export{d as default};
@@ -1,7 +1,7 @@
1
- import{jsxs as i,jsx as e}from"react/jsx-runtime";import o from"styled-components";const a=o=>{let{color:a="linear-gradient(90deg, #ff166a 0%, #ff317dff 100%)",size:t=4}=o;return i(n,{children:[e(r,{$color:a,$size:t}),e(r,{$color:a,$size:t}),e(r,{$color:a,$size:t})]})},n=o.span`
1
+ import{j as i}from"../../node_modules/react/jsx-runtime.js";import e from"styled-components";const o=e=>{let{color:o="linear-gradient(90deg, #ff166a 0%, #ff317dff 100%)",size:n=4}=e;return i.jsxs(s,{children:[i.jsx(a,{$color:o,$size:n}),i.jsx(a,{$color:o,$size:n}),i.jsx(a,{$color:o,$size:n})]})},s=e.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
- `,r=o.span`
4
+ `,a=e.span`
5
5
  display: block;
6
6
  width: ${i=>i.$size}px;
7
7
  height: ${i=>i.$size}px;
@@ -32,4 +32,4 @@ import{jsxs as i,jsx as e}from"react/jsx-runtime";import o from"styled-component
32
32
  transform: scale(1.4);
33
33
  }
34
34
  }
35
- `;export{a as DotPulse};
35
+ `;export{o as DotPulse};
@@ -1 +1 @@
1
- import{jsx as p}from"react/jsx-runtime";const x={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}},e=e=>{let{level:n="z1",position:r="down",children:t,style:o}=e;const s=x[n][r];return p("div",Object.assign({style:Object.assign({boxShadow:s},null!=o?o:{})},{children:t}))};export{e as DropShadow};
1
+ import{j as p}from"../../node_modules/react/jsx-runtime.js";const x={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}},e=e=>{let{level:n="z1",position:o="down",children:s,style:r}=e;const t=x[n][o];return p.jsx("div",Object.assign({style:Object.assign({boxShadow:t},null!=r?r:{})},{children:s}))};export{e as DropShadow};
@@ -1,4 +1,4 @@
1
- import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useState as e,useRef as i}from"react";import n from"styled-components";import{Tag as l}from"../tag/Tag.js";import{COLORS as s}from"../../constants/Theme.js";import d from"../../assets/icons/chevronDown.svg.js";import a from"../../assets/icons/chevronDownOutline.svg.js";import p from"../../assets/icons/chevronUpOutline.svg.js";import{BodySecondary as c}from"../TypographyStyle.js";import{DropdownPopover as g}from"./DropdownPopover/index.js";const h=n=>{var h,u,{placeHolder:f,onSelect:v,backgroundColor:y}=n,b=o(n,["placeHolder","onSelect","backgroundColor"]);const[j,w]=e(!1),x=i();return t(g,Object.assign({ref:x,onDropdownVisbilityChange:o=>w(o),onSelect:function(o){null==v||v(o)}},b,{children:"default"==b.inputType?r(m,Object.assign({width:null===(h=null==b?void 0:b.inputStyle)||void 0===h?void 0:h.width,height:null===(u=null==b?void 0:b.inputStyle)||void 0===u?void 0:u.height,backgroundColor:y},{children:[t(c,Object.assign({color:s.content.placeholder},{children:f})),t(d,{style:{transform:j?"rotate(180deg)":"rotate(0deg)"},width:20,height:20,color:s.content.primary})]})):t(l,{tagText:null!=f?f:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:j?p:a})}))};h.displayName="ChipDropdown";const m=n.div`
1
+ import{__rest as o}from"../../_virtual/_tslib.js";import{j as t}from"../../node_modules/react/jsx-runtime.js";import{useState as r,useRef as e}from"react";import i from"styled-components";import{Tag as n}from"../tag/Tag.js";import{COLORS as l}from"../../constants/Theme.js";import s from"../../assets/icons/chevronDown.svg.js";import d from"../../assets/icons/chevronDownOutline.svg.js";import a from"../../assets/icons/chevronUpOutline.svg.js";import{BodySecondary as p}from"../TypographyStyle.js";import{DropdownPopover as c}from"./DropdownPopover/index.js";const g=i=>{var g,m,{placeHolder:u,onSelect:j,backgroundColor:f}=i,v=o(i,["placeHolder","onSelect","backgroundColor"]);const[x,y]=r(!1),b=e();return t.jsx(c,Object.assign({ref:b,onDropdownVisbilityChange:o=>y(o),onSelect:function(o){null==j||j(o)}},v,{children:"default"==v.inputType?t.jsxs(h,Object.assign({width:null===(g=null==v?void 0:v.inputStyle)||void 0===g?void 0:g.width,height:null===(m=null==v?void 0:v.inputStyle)||void 0===m?void 0:m.height,backgroundColor:f},{children:[t.jsx(p,Object.assign({color:l.content.placeholder},{children:u})),t.jsx(s,{style:{transform:x?"rotate(180deg)":"rotate(0deg)"},width:20,height:20,color:l.content.primary})]})):t.jsx(n,{tagText:null!=u?u:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:x?a:d})}))};g.displayName="ChipDropdown";const h=i.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  width: ${o=>(null==o?void 0:o.width)?o.width:"240px"};
@@ -6,10 +6,10 @@ import{__rest as o}from"../../_virtual/_tslib.js";import{jsx as t,jsxs as r}from
6
6
  gap: 8px;
7
7
  justify-content: space-between;
8
8
  align-items: center;
9
- border: 1px solid ${s.stroke.primary};
9
+ border: 1px solid ${l.stroke.primary};
10
10
  border-radius: 4px;
11
11
  padding-left: 8px;
12
12
  padding-right: 8px;
13
13
  cursor: pointer;
14
14
  ${o=>o.backgroundColor&&`background-color: ${o.backgroundColor};`}
15
- `;export{h as ChipDropdown,m as ChipDropdownContainer};
15
+ `;export{g as ChipDropdown,h as ChipDropdownContainer};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import{useState as o,useEffect as l}from"react";import i from"../../utils/StringUtils.js";import{COLORS as r}from"../../constants/Theme.js";import n from"../../assets/icons/chevronDown.svg.js";import c from"../../assets/icons/cross.svg.js";import a from"../../assets/icons/errorInfo.svg.js";import{InputFooter as d}from"../input/Input.styled.js";import{Tag as h}from"../tag/Tag.js";import{Tooltip as m}from"../tooltips/Tooltip.js";import{BodyCaption as p}from"../TypographyStyle.js";import{ChipInputWrapper as g}from"./Common.styled.js";const j=j=>{let{chips:b,onDeleteChip:f,containerStyle:v={},sizeToUse:y="default",isDropdownOpened:O,placeholder:u="Select..",errorMessage:x="",showLabelsOnMoreHover:T=!1}=j;const[w,I]=o(),[C,S]=o(0),[z,D]=o([]);return l((()=>{if(!b)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(b);let s=b.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&b.length>0&&(s=[b[0]]),I(s);const o=b.filter((e=>!s.includes(e))).map((e=>e.label));D(o),S(b.length-s.length)}),[b]),e(t,{children:[e(g,Object.assign({style:Object.assign({},v),error:!!x},{children:[e("div",Object.assign({className:"chips-container"},{children:[null==w?void 0:w.map(((e,t)=>s("div",Object.assign({style:{zIndex:2}},{children:s(h,Object.assign({tagText:i.truncateText(e.selectedLabel||e.label,40),TrailingIcon:()=>s(c,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{f(e)}})},{children:e.selectedLabel||e.label}))}),t))),!!C&&s("div",Object.assign({style:{position:"relative",zIndex:2,pointerEvents:"auto"}},{children:s(m,Object.assign({body:"",placement:"bottom",tooltipContent:T&&z.length>0?s("div",Object.assign({style:{padding:"4px"}},{children:z.map(((e,t)=>s(p,Object.assign({style:{color:r.text.white}},{children:e}),t)))})):void 0},{children:s(p,Object.assign({color:r.content.placeholder},{children:`+${C} more`}))}))})),0===b.length&&s("div",Object.assign({style:{color:r.content.placeholder}},{children:u}))]})),s("div",{children:s(n,{style:{transform:O?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===y?16:"small"===y?20:24,height:"x-small"===y?16:"small"===y?20:24,color:r.content.primary})})]})),!!x&&e(d,Object.assign({invalid:!0},{children:[!!x&&s(a,{width:16,height:16}),x]}))]})};export{j as default};
1
+ import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useEffect as s}from"react";import o from"../../utils/StringUtils.js";import{COLORS as l}from"../../constants/Theme.js";import n from"../../assets/icons/chevronDown.svg.js";import r from"../../assets/icons/cross.svg.js";import i from"../../assets/icons/errorInfo.svg.js";import{InputFooter as c}from"../input/Input.styled.js";import{Tag as a}from"../tag/Tag.js";import{Tooltip as d}from"../tooltips/Tooltip.js";import{BodyCaption as m}from"../TypographyStyle.js";import{ChipInputWrapper as h}from"./Common.styled.js";const j=j=>{let{chips:g,onDeleteChip:p,containerStyle:x={},sizeToUse:b="default",isDropdownOpened:f,placeholder:v="Select..",errorMessage:y="",showLabelsOnMoreHover:u=!1}=j;const[O,T]=t(),[w,I]=t(0),[C,S]=t([]);return s((()=>{if(!g)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(g);let s=g.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&g.length>0&&(s=[g[0]]),T(s);const o=g.filter((e=>!s.includes(e))).map((e=>e.label));S(o),I(g.length-s.length)}),[g]),e.jsxs(e.Fragment,{children:[e.jsxs(h,Object.assign({style:Object.assign({},x),error:!!y},{children:[e.jsxs("div",Object.assign({className:"chips-container"},{children:[null==O?void 0:O.map(((t,s)=>e.jsx("div",Object.assign({style:{zIndex:2}},{children:e.jsx(a,Object.assign({tagText:o.truncateText(t.selectedLabel||t.label,40),TrailingIcon:()=>e.jsx(r,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{p(t)}})},{children:t.selectedLabel||t.label}))}),s))),!!w&&e.jsx("div",Object.assign({style:{position:"relative",zIndex:2,pointerEvents:"auto"}},{children:e.jsx(d,Object.assign({body:"",placement:"bottom",tooltipContent:u&&C.length>0?e.jsx("div",Object.assign({style:{padding:"4px"}},{children:C.map(((t,s)=>e.jsx(m,Object.assign({style:{color:l.text.white}},{children:t}),s)))})):void 0},{children:e.jsx(m,Object.assign({color:l.content.placeholder},{children:`+${w} more`}))}))})),0===g.length&&e.jsx("div",Object.assign({style:{color:l.content.placeholder}},{children:v}))]})),e.jsx("div",{children:e.jsx(n,{style:{transform:f?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===b?16:"small"===b?20:24,height:"x-small"===b?16:"small"===b?20:24,color:l.content.primary})})]})),!!y&&e.jsxs(c,Object.assign({invalid:!0},{children:[!!y&&e.jsx(i,{width:16,height:16}),y]}))]})};export{j as default};
@@ -1 +1 @@
1
- import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as o,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as r,useEffect as i}from"react";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/chevronDown.svg.js";import{Input as d}from"../input/Input.js";import{InputStyleContext as c}from"../input/context/InputStyleProvider.js";import p from"./ChipInput.js";import{DropdownPopover as h}from"./DropdownPopover/index.js";import{getSelectedOptionsAsText as u}from"./OpenedDropdown/utils/iterationOnOptions.js";function m(){}const v=v=>{var g,f,w,b,x,{placeHolder:I,size:j,onSelect:O,defaultOptions:y,disabled:H,noErrorHint:S,placeHolderHeight:T,showPlaceholderWhenSelected:D=!1,inputStyle:P={},inputType:C="default",onDeleteChip:E,truncatedText:L,showLeadingIconInPlaceholder:M=!1,showTrailingIconPlaceholder:z=!1,showLabelsOnMoreHover:W=!1}=v,A=e(v,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[_,k]=l(!1),N=null!=j?j:"default",U=r(),[V,q]=l(null!=y?y:[]);i((()=>{var e;const o=[];null===(e=null==A?void 0:A.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&o.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&o.push(e)})),q([...o])}),[A.options]),i((()=>{y&&q([...y])}),[y]);const B=u(V);return o(c.Provider,Object.assign({value:{InputWrapper:Object.assign({height:T||("x-small"===N?24:"small"===N?32:48),width:null!==(f=null!==(g=A.buttonWidth)&&void 0!==g?g:A.width)&&void 0!==f?f:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===N?"4px 8px":"6px 8px"},P),input:{minHeight:"100%"}}},{children:n(h,Object.assign({"data-test":A["data-test"],ref:U,onSelect:function(e){Array.isArray(e)?q([...e]):q([e]),null==O||O(e)},disabled:H,onDropdownVisbilityChange:e=>k(e)},A,{children:["default"==C&&o(d,{version:A.version,noErrorHint:S,state:H?"disabled":"none",value:D?I:null!=B?B:"",errorMessage:A.error,variant:N,placeholder:null!=I?I:"Select an option",width:null!==(w=A.width)&&void 0!==w?w:"100%",onChangeText:m,leftIcon:M&&(null===(b=V[0])||void 0===b?void 0:b.leadingIcon)?{icon:()=>{var e;return o(t,{children:null===(e=V[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return n("div",Object.assign({style:{display:"flex"}},{children:[z&&(null===(e=V[0])||void 0===e?void 0:e.trailingIcon),o(a,{style:{transform:_?"rotate(180deg)":"rotate(0deg)"},onClick:m,width:"x-small"===N?16:"small"===N?20:24,height:"x-small"===N?16:"small"===N?20:24,color:s.content.primary})]}))}},truncateText:null==L||L}),"chip"==C&&o(p,{placeholder:null!=I?I:"Select options",chips:V,onDeleteChip:e=>{null==E||E(e)},errorMessage:A.error,isDropdownOpened:_,sizeToUse:N,containerStyle:{width:null!==(x=A.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:W})]}))}))};v.displayName="Dropdown";export{v as Dropdown};
1
+ import{__rest as e}from"../../_virtual/_tslib.js";import{j as o}from"../../node_modules/react/jsx-runtime.js";import{useState as n,useRef as t,useEffect as l}from"react";import{COLORS as r}from"../../constants/Theme.js";import i from"../../assets/icons/chevronDown.svg.js";import{Input as s}from"../input/Input.js";import{InputStyleContext as a}from"../input/context/InputStyleProvider.js";import d from"./ChipInput.js";import{DropdownPopover as c}from"./DropdownPopover/index.js";import{getSelectedOptionsAsText as p}from"./OpenedDropdown/utils/iterationOnOptions.js";function h(){}const u=u=>{var m,v,g,x,j,{placeHolder:f,size:w,onSelect:b,defaultOptions:I,disabled:O,noErrorHint:y,placeHolderHeight:H,showPlaceholderWhenSelected:S=!1,inputStyle:T={},inputType:D="default",onDeleteChip:P,truncatedText:C,showLeadingIconInPlaceholder:E=!1,showTrailingIconPlaceholder:L=!1,showLabelsOnMoreHover:M=!1}=u,z=e(u,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[W,_]=n(!1),A=null!=w?w:"default",k=t(),[F,N]=n(null!=I?I:[]);l((()=>{var e;const o=[];null===(e=null==z?void 0:z.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&o.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&o.push(e)})),N([...o])}),[z.options]),l((()=>{I&&N([...I])}),[I]);const U=p(F);return o.jsx(a.Provider,Object.assign({value:{InputWrapper:Object.assign({height:H||("x-small"===A?24:"small"===A?32:48),width:null!==(v=null!==(m=z.buttonWidth)&&void 0!==m?m:z.width)&&void 0!==v?v:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===A?"4px 8px":"6px 8px"},T),input:{minHeight:"100%"}}},{children:o.jsxs(c,Object.assign({"data-test":z["data-test"],ref:k,onSelect:function(e){Array.isArray(e)?N([...e]):N([e]),null==b||b(e)},disabled:O,onDropdownVisbilityChange:e=>_(e)},z,{children:["default"==D&&o.jsx(s,{version:z.version,noErrorHint:y,state:O?"disabled":"none",value:S?f:null!=U?U:"",errorMessage:z.error,variant:A,placeholder:null!=f?f:"Select an option",width:null!==(g=z.width)&&void 0!==g?g:"100%",onChangeText:h,leftIcon:E&&(null===(x=F[0])||void 0===x?void 0:x.leadingIcon)?{icon:()=>{var e;return o.jsx(o.Fragment,{children:null===(e=F[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return o.jsxs("div",Object.assign({style:{display:"flex"}},{children:[L&&(null===(e=F[0])||void 0===e?void 0:e.trailingIcon),o.jsx(i,{style:{transform:W?"rotate(180deg)":"rotate(0deg)"},onClick:h,width:"x-small"===A?16:"small"===A?20:24,height:"x-small"===A?16:"small"===A?20:24,color:r.content.primary})]}))}},truncateText:null==C||C}),"chip"==D&&o.jsx(d,{placeholder:null!=f?f:"Select options",chips:F,onDeleteChip:e=>{null==P||P(e)},errorMessage:z.error,isDropdownOpened:W,sizeToUse:A,containerStyle:{width:null!==(j=z.width)&&void 0!==j?j:"100%",cursor:"pointer"},showLabelsOnMoreHover:M})]}))}))};u.displayName="Dropdown";export{u as Dropdown};
@@ -1 +1 @@
1
- import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as t,jsxs as l}from"react/jsx-runtime";import n,{useState as i,useRef as r,useImperativeHandle as s,useEffect as d}from"react";import{usePopper as a}from"react-popper";import{DropShadow as p}from"../../dropShadow/DropShadow.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{OverLapAbs as v,OpenDropdownContainer as m}from"../Common.styled.js";import{OpenedDropdown as u}from"../OpenedDropdown/components/OpennedDropdown.js";const h=n.forwardRef(((n,h)=>{var{children:w,onDropdownVisbilityChange:b,version:g="1.0",tooltipContent:f,tooltipDirection:j,showTooltipArrow:D,isChildLoading:O}=n,y=o(n,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading"]);const C=h,[S,z]=i(!1),[E,x]=i(null),[A,L]=i(null),R=r(null),{styles:T,attributes:M}=a(E,A,{placement:y.placement,strategy:y.strategy}),V=o=>{var e,t;"2.0"===g&&y.isMultiSelect&&o&&(null===(e=y.onSelect)||void 0===e||e.call(y,[...o])),z(!1),null===(t=null==y?void 0:y.onClose)||void 0===t||t.call(y)};s(C,(()=>({openDropdown:S})),[]),d((()=>{(null==C?void 0:C.current)&&(C.current.openDropdown=S)}),[S]),d((()=>{null==b||b(S)}),[S]);const _=()=>l(t,{children:[l("div",Object.assign({style:{position:"relative"},ref:x},{children:[e(v,Object.assign({ref:R,allowEvents:y.allowEvents,disabled:y.disabled,onClick:o=>{var e;null===(e=y.onDropdownOpen)||void 0===e||e.call(y),S?(z(!1),o.preventDefault()):y.disabled||z(!0)},isChildLoading:O},{children:y.allowEvents?w:null})),y.allowEvents?null:w]})),S&&e(m,Object.assign({ref:L,style:Object.assign(Object.assign({},T.popper),{zIndex:3})},M.popper,{"data-test":y["data-test"]},{children:e(p,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(u,Object.assign({},y,{onSelect:o=>{var e;"2.0"===g&&y.isMultiSelect||(null===(e=y.onSelect)||void 0===e||e.call(y,o),z(!1))},onClose:V,version:g,headerRef:R,zeroState:null==y?void 0:y.zeroState}))}))}))]});return e(t,{children:S||void 0===f?_():e(c,Object.assign({body:f,placement:j,hideArrow:!D},{children:e("div",Object.assign({"data-test":y["data-test"]},{children:_()}))}))})}));h.displayName="DropdownPopover";export{h as DropdownPopover};
1
+ import{__rest as o}from"../../../_virtual/_tslib.js";import{j as e}from"../../../node_modules/react/jsx-runtime.js";import t,{useState as l,useRef as n,useImperativeHandle as i,useEffect as r}from"react";import{usePopper as s}from"react-popper";import{DropShadow as a}from"../../dropShadow/DropShadow.js";import{Tooltip as d}from"../../tooltips/Tooltip.js";import{OverLapAbs as p,OpenDropdownContainer as c}from"../Common.styled.js";import{OpenedDropdown as m}from"../OpenedDropdown/components/OpennedDropdown.js";const j=t.forwardRef(((t,j)=>{var{children:v,onDropdownVisbilityChange:u,version:h="1.0",tooltipContent:w,tooltipDirection:b,showTooltipArrow:g,isChildLoading:f}=t,x=o(t,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading"]);const D=j,[O,y]=l(!1),[C,S]=l(null),[z,E]=l(null),A=n(null),{styles:L,attributes:R}=s(C,z,{placement:x.placement,strategy:x.strategy}),T=o=>{var e,t;"2.0"===h&&x.isMultiSelect&&o&&(null===(e=x.onSelect)||void 0===e||e.call(x,[...o])),y(!1),null===(t=null==x?void 0:x.onClose)||void 0===t||t.call(x)};i(D,(()=>({openDropdown:O})),[]),r((()=>{(null==D?void 0:D.current)&&(D.current.openDropdown=O)}),[O]),r((()=>{null==u||u(O)}),[O]);const _=()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{position:"relative"},ref:S},{children:[e.jsx(p,Object.assign({ref:A,allowEvents:x.allowEvents,disabled:x.disabled,onClick:o=>{var e;null===(e=x.onDropdownOpen)||void 0===e||e.call(x),O?(y(!1),o.preventDefault()):x.disabled||y(!0)},isChildLoading:f},{children:x.allowEvents?v:null})),x.allowEvents?null:v]})),O&&e.jsx(c,Object.assign({ref:E,style:Object.assign(Object.assign({},L.popper),{zIndex:3})},R.popper,{"data-test":x["data-test"]},{children:e.jsx(a,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e.jsx(m,Object.assign({},x,{onSelect:o=>{var e;"2.0"===h&&x.isMultiSelect||(null===(e=x.onSelect)||void 0===e||e.call(x,o),y(!1))},onClose:T,version:h,headerRef:A,zeroState:null==x?void 0:x.zeroState}))}))}))]});return e.jsx(e.Fragment,{children:O||void 0===w?_():e.jsx(d,Object.assign({body:w,placement:b,hideArrow:!g},{children:e.jsx("div",Object.assign({"data-test":x["data-test"]},{children:_()}))}))})}));j.displayName="DropdownPopover";export{j as DropdownPopover};
@@ -1,6 +1,6 @@
1
- import{jsx as o,jsxs as e}from"react/jsx-runtime";import i from"../../../assets/icons/horizontal_dots.svg.js";import r from"../../../assets/icons/vertical_dots.svg.js";import s from"styled-components";import{IconButton as t}from"../../icon-button/IconButton.js";import{COLORS as n}from"../../../constants/Theme.js";import{DropdownPopover as a}from"../DropdownPopover/index.js";const d=s.div`
1
+ import{j as o}from"../../../node_modules/react/jsx-runtime.js";import s from"../../../assets/icons/horizontal_dots.svg.js";import e from"../../../assets/icons/vertical_dots.svg.js";import i from"styled-components";import{IconButton as r}from"../../icon-button/IconButton.js";import{COLORS as t}from"../../../constants/Theme.js";import{DropdownPopover as n}from"../DropdownPopover/index.js";const a=i.div`
2
2
  :hover {
3
- background: ${n.surface.subdued};
3
+ background: ${t.surface.subdued};
4
4
  }
5
5
  position: ${o=>o.isNewTag?"relative":""};
6
6
  .new--tag {
@@ -11,10 +11,10 @@ import{jsx as o,jsxs as e}from"react/jsx-runtime";import i from"../../../assets/
11
11
  border-radius: 50%;
12
12
  width: 14px;
13
13
  height: 14px;
14
- background: ${n.background.negative.vibrant};
15
- border: 1.25px solid ${n.surface.standard};
14
+ background: ${t.background.negative.vibrant};
15
+ border: 1.25px solid ${t.surface.standard};
16
16
  display: flex;
17
17
  justify-content: center;
18
18
  align-items: center;
19
19
  }
20
- `,c=s=>o(d,Object.assign({isNewTag:s.isNewTag},{children:e(a,Object.assign({},s,{children:[o("div",{children:o(t,{Icon:s.isHorizontal?i:r,bordered:!(null==s?void 0:s.hideBorder)})}),s.isNewTag?o("div",{className:"new--tag"}):null]}))}));c.displayName="MenuItemDropdown";export{c as MenuItemDropdown};
20
+ `,d=i=>o.jsx(a,Object.assign({isNewTag:i.isNewTag},{children:o.jsxs(n,Object.assign({},i,{children:[o.jsx("div",{children:o.jsx(r,{Icon:i.isHorizontal?s:e,bordered:!(null==i?void 0:i.hideBorder)})}),i.isNewTag?o.jsx("div",{className:"new--tag"}):null]}))}));d.displayName="MenuItemDropdown";export{d as MenuItemDropdown};
@@ -1 +1 @@
1
- import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as r,jsxs as l}from"react/jsx-runtime";import n,{useState as t,useRef as i,useImperativeHandle as s,useEffect as p}from"react";import{usePopper as d}from"react-popper";import{DropShadow as c}from"../../dropShadow/DropShadow.js";import{Tooltip as a}from"../../tooltips/Tooltip.js";import{OverLapAbs as m,OpenDropdownContainer as v}from"../Common.styled.js";import{OpenedDropdown as u}from"../OpenedDropdown/components/OpennedDropdown.js";const h=n.forwardRef(((n,h)=>{var{children:w,onDropdownVisbilityChange:b,version:f="1.0",tooltipContent:j,tooltipDirection:D,showTooltipArrow:g}=n,y=o(n,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const O=h,[C,S]=t(!1),[x,A]=t(null),[M,R]=t(null),T=i(null),{styles:z,attributes:V}=d(x,M,{placement:y.placement,strategy:y.strategy}),_=o=>{var e,r;y.isMultiSelect&&o&&(null===(e=y.onSelect)||void 0===e||e.call(y,[...o])),S(!1),null===(r=null==y?void 0:y.onClose)||void 0===r||r.call(y)};s(O,(()=>({openDropdown:C})),[]),p((()=>{(null==O?void 0:O.current)&&(O.current.openDropdown=C)}),[C]),p((()=>{null==b||b(C)}),[C]);const k=()=>l(r,{children:[l("div",Object.assign({style:{position:"relative"},ref:A},{children:[e(m,{ref:T,disabled:y.disabled,onClick:o=>{var e;null===(e=y.onDropdownOpen)||void 0===e||e.call(y),C?(S(!1),o.preventDefault()):y.disabled||S(!0)}}),w]})),C&&e(v,Object.assign({ref:R,style:Object.assign(Object.assign({},z.popper),{zIndex:3})},V.popper,{children:e(c,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(u,Object.assign({},y,{onSelect:o=>{var e;"2.0"===f&&y.isMultiSelect||(null===(e=y.onSelect)||void 0===e||e.call(y,o),S(!1))},onClose:_,version:f,headerRef:T}))}))}))]});return e(r,{children:C||void 0===j?k():e(a,Object.assign({body:j,placement:D,hideArrow:!g},{children:e("div",{children:k()})}))})}));h.displayName="MultilevelDropdownPopover";export{h as MultilevelDropdownPopover};
1
+ import{__rest as o}from"../../../_virtual/_tslib.js";import{j as e}from"../../../node_modules/react/jsx-runtime.js";import n,{useState as r,useRef as t,useImperativeHandle as l,useEffect as i}from"react";import{usePopper as s}from"react-popper";import{DropShadow as p}from"../../dropShadow/DropShadow.js";import{Tooltip as d}from"../../tooltips/Tooltip.js";import{OverLapAbs as a,OpenDropdownContainer as c}from"../Common.styled.js";import{OpenedDropdown as m}from"../OpenedDropdown/components/OpennedDropdown.js";const j=n.forwardRef(((n,j)=>{var{children:u,onDropdownVisbilityChange:v,version:h="1.0",tooltipContent:w,tooltipDirection:b,showTooltipArrow:f}=n,g=o(n,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const x=j,[D,y]=r(!1),[O,C]=r(null),[S,A]=r(null),M=t(null),{styles:R,attributes:T}=s(O,S,{placement:g.placement,strategy:g.strategy}),_=o=>{var e,n;g.isMultiSelect&&o&&(null===(e=g.onSelect)||void 0===e||e.call(g,[...o])),y(!1),null===(n=null==g?void 0:g.onClose)||void 0===n||n.call(g)};l(x,(()=>({openDropdown:D})),[]),i((()=>{(null==x?void 0:x.current)&&(x.current.openDropdown=D)}),[D]),i((()=>{null==v||v(D)}),[D]);const z=()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{position:"relative"},ref:C},{children:[e.jsx(a,{ref:M,disabled:g.disabled,onClick:o=>{var e;null===(e=g.onDropdownOpen)||void 0===e||e.call(g),D?(y(!1),o.preventDefault()):g.disabled||y(!0)}}),u]})),D&&e.jsx(c,Object.assign({ref:A,style:Object.assign(Object.assign({},R.popper),{zIndex:3})},T.popper,{children:e.jsx(p,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e.jsx(m,Object.assign({},g,{onSelect:o=>{var e;"2.0"===h&&g.isMultiSelect||(null===(e=g.onSelect)||void 0===e||e.call(g,o),y(!1))},onClose:_,version:h,headerRef:M}))}))}))]});return e.jsx(e.Fragment,{children:D||void 0===w?z():e.jsx(d,Object.assign({body:w,placement:b,hideArrow:!f},{children:e.jsx("div",{children:z()})}))})}));j.displayName="MultilevelDropdownPopover";export{j as MultilevelDropdownPopover};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as i}from"react";import{ZeroState as r}from"../../../zeroState/ZeroState.js";import{useOutside as s}from"../../../../hooks/useOutside.js";import{useDropdown as l}from"../../hooks/useDropdown.js";import{Description as c}from"./description/Description.js";import{FreeFormMenu as a}from"./menu/FreeFormMenu.js";import{MenuList as u}from"./menu/MenuList.js";import{SelectAllMenu as p}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as h,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as S}from"./searchbox/SearchZeroState.js";const b=304,g=290,j=j=>{let{options:O,isSearchable:v,isMultiSelect:w,maxSelections:y,width:C,allowFreeForm:x,height:D,onClose:M,onSelect:L,onSearch:k,version:A,skipSorting:F,headerRef:I,hideSelectAll:B,primaryButtonText:H,onInfiniteScroll:T,onMultiSelectClear:z,onDropdownItemClick:R,buttonOptions:W,isSearchLoading:Z,disableSearchOptions:q,disableSearchedOptionExcept:E,useDefaultCursor:K,containerStyle:N={},zeroState:P}=j;const{dropdownOptions:G,search:J,searchedString:Q,searchedOptions:U,onApplyHandler:V,selectAllHandler:X,onMultiSelectClear:Y,onFreeFormSelect:$,onMultiSelectApply:_,latestDropdownOptionsRef:ee,getSelectedOptions:te,getCurrentSelectionCount:oe}=l(A,O,L,F,w,k,q,E,y),[ne,ie]=o(null!=C?C:g),[re,se]=o(null),le=n(null),ce=n([]);s(le,(()=>{if(se(null),w&&"2.0"===A){const e=te(ee.current);null==M||M(e)}else null==M||M(G)}),[I,ce]);const ae=null!=D?D:b,ue="number"==typeof ae?v&&w?ae-96:v&&!w||!v&&w?ae-48:ae:ae;i((()=>{const e=null!=C?C:g;if(null===re)ie(e);else if("number"==typeof e)ie(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ie(t)}}),[re]);const pe=[],de=(e=>{if(!w||!y&&0!==y)return e;const t=oe(e)>=y;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const o=e;return Object.assign(Object.assign({},o),{disabled:o.disabled||!o.selected&&t})}})):e})((Q&&k?U:G).map((e=>{var t,o;if(Q&&!k){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(Q.toLowerCase()))&&(pe.push(!Q||e.label===Q),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(Q.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(Q.toLowerCase()))?(pe.push(!Q||e.label===Q),e):null}return e})).filter((e=>null!==e))),he=!!v&&Q&&0===de.length;return e(h,Object.assign({version:A,ref:le,style:Object.assign({width:ne},N)},{children:[e("div",Object.assign({style:{width:re?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!v&&t(f,{onSearch:J,version:A}),de.length||Q?e(m,Object.assign({minHeight:ae,maxHeight:ue},{children:[!!w&&!he&&!B&&t(p,{version:A,options:Q&&k?U:G,onSelect:X}),!x&&he&&t(S,{isLoading:Z,height:ue,searchedString:Q,containerWidth:C}),x&&(he||!!pe.length&&pe.every((e=>!1===e)))&&t(a,{version:A,isMultiSelect:w,onSelect:$,searchedString:Q}),t(u,{onInfiniteScroll:T,onDropdownItemClick:R,version:A,onSelect:V,showDescription:function(e,t){se(e&&t?{title:e,description:t}:null)},isMultiSelect:w,options:de,useDefaultCursor:K,ref:ce})]})):t("div",Object.assign({style:{height:ae,display:"flex"}},{children:t(r,Object.assign({},P,{title:(null==P?void 0:P.title)||"No results found",subTitle:(null==P?void 0:P.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!w&&!(!de.length&&!Q)&&"2.0"!==A&&t(d,{onClear:()=>{Y(),null==z||z()},onApply:_,list:Q&&k?U:G,buttonText:H,buttonOptions:W})]})),!!re&&t(c,{title:re.title,description:re.description,version:A})]}))};export{j as OpenedDropdown};
1
+ import{j as e}from"../../../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as o,useEffect as n}from"react";import{ZeroState as s}from"../../../zeroState/ZeroState.js";import{useOutside as i}from"../../../../hooks/useOutside.js";import{useDropdown as r}from"../../hooks/useDropdown.js";import{Description as l}from"./description/Description.js";import{FreeFormMenu as c}from"./menu/FreeFormMenu.js";import{MenuList as a}from"./menu/MenuList.js";import{SelectAllMenu as u}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as p,MenuListContainer as h}from"./OpennedDropdown.styled.js";import{SearchBox as m}from"./searchbox/SearchBox.js";import{SearchZeroState as f}from"./searchbox/SearchZeroState.js";const b=304,j=290,g=g=>{let{options:S,isSearchable:v,isMultiSelect:x,maxSelections:w,width:y,allowFreeForm:O,height:C,onClose:D,onSelect:k,onSearch:L,version:M,skipSorting:A,headerRef:I,hideSelectAll:E,primaryButtonText:F,onInfiniteScroll:T,onMultiSelectClear:B,onDropdownItemClick:H,buttonOptions:q,isSearchLoading:z,disableSearchOptions:R,disableSearchedOptionExcept:V,useDefaultCursor:W,containerStyle:Z={},zeroState:$}=g;const{dropdownOptions:K,search:N,searchedString:P,searchedOptions:U,onApplyHandler:_,selectAllHandler:G,onMultiSelectClear:J,onFreeFormSelect:Q,onMultiSelectApply:X,latestDropdownOptionsRef:Y,getSelectedOptions:ee,getCurrentSelectionCount:te}=r(M,S,k,A,x,L,R,V,w),[oe,ne]=t(null!=y?y:j),[se,ie]=t(null),[re,le]=t(-1),ce=o(null),ae=o([]),ue=o(null);i(ce,(()=>{if(ie(null),x&&"2.0"===M){const e=ee(Y.current);null==D||D(e)}else null==D||D(K)}),[I,ae]);n((()=>{const e=e=>{const t=(e=>{const t=[];return e.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||t.push(e)}));else{const o=e;o.disabled||t.push(o)}})),t})(P&&L?U:K);if(0!==t.length)if("ArrowDown"===e.key)e.preventDefault(),le((e=>{const o=e<t.length-1?e+1:0;return setTimeout((()=>{var e;const t=null===(e=ue.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${o}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),o}));else if("ArrowUp"===e.key)e.preventDefault(),le((e=>{const o=e>0?e-1:t.length-1;return setTimeout((()=>{var e;const t=null===(e=ue.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${o}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),o}));else if("Enter"===e.key&&re>=0){e.preventDefault();const o=t[re];o&&_(Object.assign(Object.assign({},o),{selected:!o.selected}))}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[re,P,U,K,L,_]);const de=null!=C?C:b,pe="number"==typeof de?v&&x?de-96:v&&!x||!v&&x?de-48:de:de;n((()=>{const e=null!=y?y:j;if(null===se)ne(e);else if("number"==typeof e)ne(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ne(t)}}),[se]);const he=[],me=(e=>{if(!x||!w&&0!==w)return e;const t=te(e)>=w;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const o=e;return Object.assign(Object.assign({},o),{disabled:o.disabled||!o.selected&&t})}})):e})((P&&L?U:K).map((e=>{var t,o;if(P&&!L){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))&&(he.push(!P||e.label===P),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(P.toLowerCase()))?(he.push(!P||e.label===P),e):null}return e})).filter((e=>null!==e))),fe=!!v&&P&&0===me.length;return e.jsxs(p,Object.assign({version:M,ref:ce,style:Object.assign({width:oe},Z)},{children:[e.jsxs("div",Object.assign({style:{width:se?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!v&&e.jsx(m,{onSearch:N,version:M}),me.length||P?e.jsxs(h,Object.assign({minHeight:de,maxHeight:pe,ref:ue},{children:[!!x&&!fe&&!E&&e.jsx(u,{version:M,options:P&&L?U:K,onSelect:G}),!O&&fe&&e.jsx(f,{isLoading:z,height:pe,searchedString:P,containerWidth:y}),O&&(fe||!!he.length&&he.every((e=>!1===e)))&&e.jsx(c,{version:M,isMultiSelect:x,onSelect:Q,searchedString:P}),e.jsx(a,{onInfiniteScroll:T,onDropdownItemClick:H,version:M,onSelect:_,showDescription:function(e,t){ie(e&&t?{title:e,description:t}:null)},isMultiSelect:x,options:me,useDefaultCursor:W,ref:ae,focusedIndex:re})]})):e.jsx("div",Object.assign({style:{height:de,display:"flex"}},{children:e.jsx(s,Object.assign({},$,{title:(null==$?void 0:$.title)||"No results found",subTitle:(null==$?void 0:$.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!x&&!(!me.length&&!P)&&"2.0"!==M&&e.jsx(d,{onClear:()=>{J(),null==B||B()},onApply:X,list:P&&L?U:K,buttonText:F,buttonOptions:q})]})),!!se&&e.jsx(l,{title:se.title,description:se.description,version:M})]}))};export{g as OpenedDropdown};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{TitleRegular as r,BodySecondary as o}from"../../../../TypographyStyle.js";import{COLORS as i}from"../../../../../constants/Theme.js";import{DescriptionContainer as n}from"./Description.styled.js";const s=s=>{let{title:c,description:l,version:m}=s;return t(n,Object.assign({version:m},{children:e("div",Object.assign({style:{padding:"2.0"===m?12:24}},{children:[t(r,Object.assign({style:{color:i.content.primary,marginBottom:4}},{children:c})),t(o,Object.assign({style:{color:i.content.secondary}},{children:l}))]}))}))};export{s as Description};
1
+ import{j as s}from"../../../../../node_modules/react/jsx-runtime.js";import{TitleRegular as t,BodySecondary as e}from"../../../../TypographyStyle.js";import{COLORS as r}from"../../../../../constants/Theme.js";import{DescriptionContainer as o}from"./Description.styled.js";const n=n=>{let{title:i,description:c,version:j}=n;return s.jsx(o,Object.assign({version:j},{children:s.jsxs("div",Object.assign({style:{padding:"2.0"===j?12:24}},{children:[s.jsx(t,Object.assign({style:{color:r.content.primary,marginBottom:4}},{children:i})),s.jsx(e,Object.assign({style:{color:r.content.secondary}},{children:c}))]}))}))};export{n as Description};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as o}from"react";import{CheckBox as r}from"../../../../checkBox/CheckBox.js";import{ListItem as i}from"../../../../list-item/ListItem.js";import{BodyCaption as n}from"../../../../TypographyStyle.js";import{COLORS as s}from"../../../../../constants/Theme.js";import{FreeFormContainer as c}from"./FreeFormMenu.styled.js";const m=m=>{let{searchedString:l,onSelect:a,isMultiSelect:p,version:f}=m;const[h,u]=o(!1);function d(){u(!h),a(!h)}return e(i,{version:f,onClick:e=>{e.preventDefault(),d()},listItem:{label:l,value:l},leadingIcon:p?e(r,{size:"2.0"===f?"SMALL":"DEFAULT",isChecked:h,onValueChange:d}):e(t,{}),trailingIcon:e(c,{children:e(n,Object.assign({style:{color:s.content.secondary}},{children:"Freeform"}))})})};export{m as FreeFormMenu};
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import{useState as t}from"react";import{CheckBox as o}from"../../../../checkBox/CheckBox.js";import{ListItem as r}from"../../../../list-item/ListItem.js";import{BodyCaption as s}from"../../../../TypographyStyle.js";import{COLORS as n}from"../../../../../constants/Theme.js";import{FreeFormContainer as i}from"./FreeFormMenu.styled.js";const m=m=>{let{searchedString:c,onSelect:l,isMultiSelect:a,version:j}=m;const[p,f]=t(!1);function d(){f(!p),l(!p)}return e.jsx(r,{version:j,onClick:e=>{e.preventDefault(),d()},listItem:{label:c,value:c},leadingIcon:a?e.jsx(o,{size:"2.0"===j?"SMALL":"DEFAULT",isChecked:p,onValueChange:d}):e.jsx(e.Fragment,{}),trailingIcon:e.jsx(i,{children:e.jsx(s,Object.assign({style:{color:n.content.secondary}},{children:"Freeform"}))})})};export{m as FreeFormMenu};
@@ -9,6 +9,8 @@ interface MenuItemProps {
9
9
  last?: boolean;
10
10
  version?: '1.0' | '2.0';
11
11
  useDefaultCursor?: boolean;
12
+ isFocused?: boolean;
13
+ dataIndex?: number;
12
14
  }
13
15
  export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
14
16
  export {};
@@ -1,13 +1,13 @@
1
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import n from"../../../../../assets/icons/chevronRight.svg.js";import{forwardRef as i,useState as r}from"react";import s from"styled-components";import{CheckBox as l}from"../../../../checkBox/CheckBox.js";import{ListItem as c}from"../../../../list-item/ListItem.js";import{Tooltip as a}from"../../../../tooltips/Tooltip.js";import{BodyCaption as d}from"../../../../TypographyStyle.js";import{DEFAULT_THEME as p,COLORS as m}from"../../../../../constants/Theme.js";import{FreeFormContainer as u}from"./FreeFormMenu.styled.js";const g=s(c)`
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import t from"../../../../../assets/icons/chevronRight.svg.js";import{forwardRef as o,useState as n}from"react";import i from"styled-components";import{CheckBox as s}from"../../../../checkBox/CheckBox.js";import{ListItem as r}from"../../../../list-item/ListItem.js";import{Tooltip as l}from"../../../../tooltips/Tooltip.js";import{BodyCaption as a}from"../../../../TypographyStyle.js";import{DEFAULT_THEME as d,COLORS as c}from"../../../../../constants/Theme.js";import{FreeFormContainer as p}from"./FreeFormMenu.styled.js";const m=i(r)`
2
2
  padding: ${e=>"2.0"===e.version?"8px 12px":"14px 16px"} !important;
3
3
  cursor: pointer;
4
4
  margin-top: ${e=>"2.0"===e.version?"2px":"0"};
5
- `,v=s.div`
5
+ `,u=i.div`
6
6
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
7
7
  border-radius: ${e=>{let{version:t}=e;return"1.0"===t?"0":"8px"}};
8
8
  padding: ${e=>{let{version:t}=e;return"1.0"===t?"0":"4px"}};
9
9
  min-width: 148px;
10
- border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${p.colorsV2.stroke.primary}`:"none"}};
10
+ border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${d.colorsV2.stroke.primary}`:"none"}};
11
11
  max-height: 248px;
12
12
  overflow-y: auto;
13
- `,h=i(((i,s)=>{let{option:c,isMultiSelect:h,showDescription:b,onSelect:x,last:f,version:j,onDropdownItemClick:y,useDefaultCursor:C}=i;var I;const[O,k]=r(c.selected),T=(e,t)=>{if(!e.children){w(!e.selected);const o=t?Object.assign(Object.assign({},e),{parent:t}):e;null==y||y(o)}},w=e=>{c.disabled||x(Object.assign(Object.assign({},c),{selected:e}))},D=C?{cursor:"default"}:{};return e(t,{children:e(a,Object.assign({body:"",tooltipContent:c.children?e("div",Object.assign({style:{backgroundColor:p.colorsV2.surface.standard},ref:s,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1)},{children:e(v,Object.assign({version:null!=j?j:"2.0"},{children:c.children.map((t=>{var o;return e(g,{version:j,style:"1.0"!==j&&(null!==(o=null==c?void 0:c.children)&&void 0!==o?o:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),T(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e(t,{}),placement:"right-start",hideArrow:!0},{children:e(g,{version:j,style:f?Object.assign({borderBottom:0},D):Object.assign({},D),onClick:e=>{e.preventDefault(),T(c)},onMouseOver:()=>{c.description?b(c.label,c.description):b()},listItem:{value:c.value,label:c.label},subText:c.subText,leadingIcon:h?o("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e(l,{size:"2.0"===j?"SMALL":"DEFAULT",isDisabled:null!==(I=c.disabled)&&void 0!==I&&I,isChecked:!!c.selected,onValueChange:w}),e("div",Object.assign({style:{marginRight:"-4px"}},{children:c.leadingIcon}))]})):c.leadingIcon?e(t,{children:c.leadingIcon}):void 0,customComponent:c.customComponent,trailingIcon:c.isFreeForm?e(u,{children:e(d,Object.assign({style:{color:m.content.secondary}},{children:"Freeform"}))}):c.children?e(n,{width:12,height:12}):c.trailingIcon?e(t,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":c.selected||!h&&O?"selected":"default"})}))})}));export{h as MenuItem};
13
+ `,g=o(((o,i)=>{let{option:r,isMultiSelect:g,showDescription:x,onSelect:j,last:v,version:h,onDropdownItemClick:b,useDefaultCursor:f,isFocused:y=!1,dataIndex:I=-1}=o;var C;const[O,F]=n(r.selected),k=(e,t)=>{if(!e.children){w(!e.selected);const o=t?Object.assign(Object.assign({},e),{parent:t}):e;null==b||b(o)}},w=e=>{r.disabled||j(Object.assign(Object.assign({},r),{selected:e}))},T=f?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(l,Object.assign({body:"",tooltipContent:r.children?e.jsx("div",Object.assign({style:{backgroundColor:d.colorsV2.surface.standard},ref:i,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1)},{children:e.jsx(u,Object.assign({version:null!=h?h:"2.0"},{children:r.children.map((t=>{var o;return e.jsx(m,{version:h,style:"1.0"!==h&&(null!==(o=null==r?void 0:r.children)&&void 0!==o?o:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),k(t,r)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:r.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(m,{version:h,style:v?Object.assign({borderBottom:0},T):Object.assign({},T),onClick:e=>{e.preventDefault(),k(r)},onMouseOver:()=>{r.description?x(r.label,r.description):x()},listItem:{value:r.value,label:r.label},subText:r.subText,"data-option-index":I,role:"option",id:`dropdown-option-${I}`,"aria-selected":!!r.selected,leadingIcon:g?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(s,{size:"2.0"===h?"SMALL":"DEFAULT",isDisabled:null!==(C=r.disabled)&&void 0!==C&&C,isChecked:!!r.selected,onValueChange:w}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:r.leadingIcon}))]})):r.leadingIcon?e.jsx(e.Fragment,{children:r.leadingIcon}):void 0,customComponent:r.customComponent,trailingIcon:r.isFreeForm?e.jsx(p,{children:e.jsx(a,Object.assign({style:{color:c.content.secondary}},{children:"Freeform"}))}):r.children?e.jsx(t,{width:12,height:12}):r.trailingIcon?e.jsx(e.Fragment,{children:r.trailingIcon}):void 0,variant:r.disabled?"inactive":y||r.selected||!g&&O?"selected":"default"})}))})}));export{g as MenuItem};
@@ -9,6 +9,7 @@ interface MenuListProps {
9
9
  onInfiniteScroll?: () => void;
10
10
  onDropdownItemClick?: (option: DropdownOption) => void;
11
11
  useDefaultCursor?: boolean;
12
+ focusedIndex?: number;
12
13
  }
13
14
  export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement[]>>;
14
15
  export {};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{forwardRef as r,useRef as o,useCallback as i,useEffect as s}from"react";import{MenuItem as c}from"./MenuItem.js";import{StyledGroupedLabel as l}from"./MenuList.styled.js";const u=r(((r,u)=>{let{options:p,isMultiSelect:a,showDescription:m,onSelect:d,version:f,onInfiniteScroll:g,onDropdownItemClick:h,useDefaultCursor:D}=r;const I=o(null),b=o(null),j=i((()=>{I.current&&I.current.disconnect(),I.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==g||g())})),b.current&&I.current.observe(b.current)}),[g]);return s((()=>(j(),()=>{I.current&&I.current.disconnect()})),[j,p]),e(n,{children:p.map(((n,r)=>{const o=r===p.length-1;if(n.options){const i=n;return t("div",Object.assign({style:{marginTop:"2.0"===f?2:0}},{children:[t(l,Object.assign({version:f},{children:[i.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,t)=>e(c,{version:f,last:t===i.options.length-1,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,useDefaultCursor:D,ref:e=>{u&&"object"==typeof u&&u.current&&e&&e&&e&&e&&(u.current[r]=e)}},`${r}-${t}`))),o?e("span",{ref:b}):null]}),r)}return t("div",{children:[e(c,{version:f,last:o,onSelect:d,showDescription:m,onDropdownItemClick:h,isMultiSelect:a,option:n,useDefaultCursor:D,ref:e=>{u&&"object"==typeof u&&u.current&&e&&(u.current[r]=e)}},r),o?e("span",{ref:b}):null]},r)}))})}));export{u as MenuList};
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import{forwardRef as n,useRef as t,useCallback as s,useEffect as r}from"react";import{MenuItem as o}from"./MenuItem.js";import{StyledGroupedLabel as i}from"./MenuList.styled.js";const c=n(((n,c)=>{let{options:l,isMultiSelect:u,showDescription:a,onSelect:d,version:p,onInfiniteScroll:f,onDropdownItemClick:j,useDefaultCursor:m,focusedIndex:g=-1}=n;const x=t(null),h=t(null),b=s((()=>{x.current&&x.current.disconnect(),x.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==f||f())})),h.current&&x.current.observe(h.current)}),[f]);r((()=>(b(),()=>{x.current&&x.current.disconnect()})),[b,l]);const I=new Map;let D=-1;return l.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(D++,I.set(e,D))}));else{const n=e;n.disabled||(D++,I.set(n,D))}})),e.jsx(e.Fragment,{children:l.map(((n,t)=>{const s=t===l.length-1;if(n.options){const r=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===p?2:0}},{children:[e.jsxs(i,Object.assign({version:p},{children:[r.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:r.leadingIcon})):null,r.label]})),r.options.map(((n,s)=>{const i=I.get(n),l=i===g&&!n.disabled;return e.jsx(o,{version:p,last:s===r.options.length-1,onSelect:d,showDescription:a,onDropdownItemClick:j,isMultiSelect:u,option:n,useDefaultCursor:m,isFocused:l,dataIndex:i,ref:e=>{c&&"object"==typeof c&&c.current&&e&&e&&e&&e&&(c.current[t]=e)}},`${t}-${s}`)})),s?e.jsx("span",{ref:h}):null]}),t)}const r=n,f=I.get(r),x=f===g&&!r.disabled;return e.jsxs("div",{children:[e.jsx(o,{version:p,last:s,onSelect:d,showDescription:a,onDropdownItemClick:j,isMultiSelect:u,option:r,useDefaultCursor:m,isFocused:x,dataIndex:f,ref:e=>{c&&"object"==typeof c&&c.current&&e&&(c.current[t]=e)}},t),s?e.jsx("span",{ref:h}):null]},t)}))})}));export{c as MenuList};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as l}from"react";import{CheckBox as o}from"../../../../checkBox/CheckBox.js";import{ListItem as i}from"../../../../list-item/ListItem.js";const c=c=>{let{options:n,onSelect:r,version:s}=c;const[a,d]=t("notSelected");function p(){"partiallySelected"===a&&r("notSelected"),"selectAll"===a&&r("notSelected"),"notSelected"===a&&r("selectAll")}return l((()=>{const e=[];n.filter((e=>!e.disabled)).forEach((t=>{t.options?t.options.filter((e=>!e.disabled)).forEach((t=>{e.push(t.selected||!1)})):e.push(t.selected||!1)})),e.every(Boolean)?d("selectAll"):e.filter(Boolean).length>0?d("partiallySelected"):d("notSelected")}),[n]),e(i,{version:s,onClick:e=>{e.preventDefault(),p()},listItem:{label:"Select All",value:"All"},leadingIcon:e("div",Object.assign({style:{width:18,height:18}},{children:e(o,{size:"2.0"===s?"SMALL":"DEFAULT",isChecked:"selectAll"===a||"partiallySelected"===a,isPartiallyChecked:"partiallySelected"===a,onValueChange:p})})),variant:"default"})};export{c as SelectAllMenu};
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import{useState as t,useEffect as l}from"react";import{CheckBox as o}from"../../../../checkBox/CheckBox.js";import{ListItem as i}from"../../../../list-item/ListItem.js";const s=s=>{let{options:c,onSelect:n,version:r}=s;const[a,d]=t("notSelected");function p(){"partiallySelected"===a&&n("notSelected"),"selectAll"===a&&n("notSelected"),"notSelected"===a&&n("selectAll")}return l((()=>{const e=[];c.filter((e=>!e.disabled)).forEach((t=>{t.options?t.options.filter((e=>!e.disabled)).forEach((t=>{e.push(t.selected||!1)})):e.push(t.selected||!1)})),e.every(Boolean)?d("selectAll"):e.filter(Boolean).length>0?d("partiallySelected"):d("notSelected")}),[c]),e.jsx(i,{version:r,onClick:e=>{e.preventDefault(),p()},listItem:{label:"Select All",value:"All"},leadingIcon:e.jsx("div",Object.assign({style:{width:18,height:18}},{children:e.jsx(o,{size:"2.0"===r?"SMALL":"DEFAULT",isChecked:"selectAll"===a||"partiallySelected"===a,isPartiallyChecked:"partiallySelected"===a,onValueChange:p})})),variant:"default"})};export{s as SelectAllMenu};