@bikdotai/bik-component-library 0.0.533-analytics-beta56 → 0.0.533-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 (388) hide show
  1. package/dist/cjs/assets/{bundle-c485438b.css → bundle-0deb4a74.css} +2 -325
  2. package/dist/cjs/assets/icons/emoji.svg.js +1 -1
  3. package/dist/cjs/assets/icons/halfRectangle.svg.js +1 -1
  4. package/dist/cjs/assets/icons/strikeThrough.svg.js +1 -1
  5. package/dist/cjs/assets/icons/{email-channel.svg.js → sub_category.svg.js} +1 -1
  6. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  7. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  8. package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
  9. package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  10. package/dist/cjs/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  11. package/dist/cjs/components/SearchFilter/components/SearchFilterItem.js +1 -1
  12. package/dist/cjs/components/TypographyStyle.d.ts +0 -24
  13. package/dist/cjs/components/TypographyStyle.js +14 -74
  14. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +0 -4
  15. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
  16. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +0 -7
  17. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
  18. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +1 -2
  19. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  20. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMetric.d.ts +0 -1
  21. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  22. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +0 -1
  23. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  24. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +0 -2
  25. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  26. package/dist/cjs/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
  27. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  28. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +0 -1
  29. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +1 -1
  30. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +0 -13
  31. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  32. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +0 -2
  33. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  34. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  35. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  36. package/dist/cjs/components/analytics-chips-and-dropdowns/index.d.ts +0 -1
  37. package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
  38. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -20
  39. package/dist/cjs/components/bik-layout/SidebarStyles.js +1 -1
  40. package/dist/cjs/components/card-selector/CardSelector.d.ts +0 -1
  41. package/dist/cjs/components/card-selector/CardSelector.js +1 -1
  42. package/dist/cjs/components/card-selector/CardSelectorGroup.js +1 -1
  43. package/dist/cjs/components/carousel-preview/CarouselPreview.d.ts +1 -4
  44. package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
  45. package/dist/cjs/components/carousel-preview/CarouselPreview.style.d.ts +2 -4
  46. package/dist/cjs/components/carousel-preview/CarouselPreview.style.js +27 -56
  47. package/dist/cjs/components/carousel-preview/CarouselPreviewCard.js +1 -1
  48. package/dist/cjs/components/checkBox/CheckBox.d.ts +0 -4
  49. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  50. package/dist/cjs/components/checkBox/CheckBox.styled.d.ts +0 -1
  51. package/dist/cjs/components/checkBox/CheckBox.styled.js +3 -4
  52. package/dist/cjs/components/checkList/CheckList.d.ts +0 -1
  53. package/dist/cjs/components/checkList/CheckList.js +1 -1
  54. package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  55. package/dist/cjs/components/datePicker/DatePickerWrapper.d.ts +2 -1
  56. package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
  57. package/dist/cjs/components/datePicker/index.d.ts +0 -1
  58. package/dist/cjs/components/discount-modal/DiscountUtils.js +1 -1
  59. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  60. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  61. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  62. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +0 -1
  63. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  64. package/dist/cjs/components/dropdown/type.d.ts +0 -3
  65. package/dist/cjs/components/dynamic-tabs/DynamicTabs.d.ts +0 -2
  66. package/dist/cjs/components/dynamic-tabs/DynamicTabs.js +1 -1
  67. package/dist/cjs/components/floater/floater.d.ts +1 -2
  68. package/dist/cjs/components/floater/floater.js +1 -1
  69. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  70. package/dist/cjs/components/icon-button/model.d.ts +0 -5
  71. package/dist/cjs/components/input/Input.d.ts +0 -2
  72. package/dist/cjs/components/input/Input.js +1 -1
  73. package/dist/cjs/components/input/Input.styled.d.ts +0 -2
  74. package/dist/cjs/components/input/Input.styled.js +1 -1
  75. package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +0 -1
  76. package/dist/cjs/components/input-with-vars/InputWithVariables.js +2 -2
  77. package/dist/cjs/components/list-item/ListItem.d.ts +1 -0
  78. package/dist/cjs/components/list-item/ListItem.js +1 -1
  79. package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -1
  80. package/dist/cjs/components/plans/SubscriptionPlan.d.ts +0 -1
  81. package/dist/cjs/components/postPicker/postPicker.js +1 -1
  82. package/dist/cjs/components/radioButton/RadioButton.d.ts +0 -3
  83. package/dist/cjs/components/radioButton/RadioButton.js +1 -1
  84. package/dist/cjs/components/radioList/RadioList.d.ts +0 -1
  85. package/dist/cjs/components/radioList/RadioList.js +1 -1
  86. package/dist/cjs/components/side-modal/SideModal.d.ts +1 -3
  87. package/dist/cjs/components/side-modal/SideModal.js +1 -1
  88. package/dist/cjs/components/side-modal/SideModal.style.d.ts +1 -4
  89. package/dist/cjs/components/side-modal/SideModal.style.js +7 -13
  90. package/dist/cjs/components/spinner/Spinner.d.ts +0 -6
  91. package/dist/cjs/components/spinner/Spinner.js +1 -18
  92. package/dist/cjs/components/states/StateComponent.d.ts +0 -2
  93. package/dist/cjs/components/states/StateComponent.js +1 -1
  94. package/dist/cjs/components/states/StateComponent.styled.d.ts +1 -4
  95. package/dist/cjs/components/states/StateComponent.styled.js +6 -6
  96. package/dist/cjs/components/states-modal/StateModalComponent.d.ts +0 -2
  97. package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
  98. package/dist/cjs/components/stepper/Stepper.d.ts +0 -2
  99. package/dist/cjs/components/stepper/Stepper.js +1 -1
  100. package/dist/cjs/components/stepper/Stepper.styled.d.ts +0 -1
  101. package/dist/cjs/components/stepper/Stepper.styled.js +7 -7
  102. package/dist/cjs/components/tabs/Tabs.js +1 -1
  103. package/dist/cjs/components/tabs/Tabs.model.d.ts +0 -1
  104. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
  105. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  106. package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +14 -8
  107. package/dist/cjs/components/template-context-mapper/context/templateModalContext.js +1 -1
  108. package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
  109. package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
  110. package/dist/cjs/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
  111. package/dist/cjs/components/template-context-mapper/modalElements/Body.d.ts +1 -1
  112. package/dist/cjs/components/template-context-mapper/modalElements/Body.js +9 -13
  113. package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
  114. package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.d.ts +0 -2
  115. package/dist/cjs/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  116. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  117. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.style.js +1 -0
  118. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +1 -2
  119. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  120. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +1 -2
  121. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  122. package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +5 -5
  123. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +3 -5
  124. package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
  125. package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  126. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.d.ts +2 -2
  127. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +4 -4
  128. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +1 -3
  129. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  130. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +1 -3
  131. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  132. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +1 -3
  133. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  134. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  135. package/dist/cjs/components/template-preview/EmailTemplatePreview.styled.js +14 -16
  136. package/dist/cjs/components/template-preview/SmsTemplatePreview.d.ts +0 -1
  137. package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
  138. package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
  139. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.js +1 -1
  140. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.d.ts +0 -5
  141. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.js +8 -14
  142. package/dist/cjs/components/template-preview/WhatsApp/ChatUiV2.js +2 -2
  143. package/dist/cjs/components/template-preview/WhatsApp/MediaCard.js +1 -1
  144. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -6
  145. package/dist/cjs/components/template-preview/helpers/SmsTemplateHelper.d.ts +1 -1
  146. package/dist/cjs/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
  147. package/dist/cjs/components/template-preview/helpers/VariableEditorHelper.js +1 -1
  148. package/dist/cjs/components/template-preview/models/SmsTemplate.d.ts +0 -1
  149. package/dist/cjs/components/tooltips/TooltipInternal.d.ts +1 -1
  150. package/dist/cjs/components/variable-picker-v3/Content.d.ts +6 -0
  151. package/dist/cjs/components/variable-picker-v3/Content.js +1 -0
  152. package/dist/cjs/components/variable-picker-v3/NoResult.d.ts +6 -0
  153. package/dist/cjs/components/variable-picker-v3/NoResult.js +17 -0
  154. package/dist/cjs/components/variable-picker-v3/SubHeaderItems.d.ts +14 -0
  155. package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -0
  156. package/dist/cjs/components/variable-picker-v3/VariablePicker.d.ts +5 -0
  157. package/dist/cjs/components/variable-picker-v3/VariablePicker.js +1 -0
  158. package/dist/cjs/components/variable-picker-v3/context.d.ts +21 -0
  159. package/dist/cjs/components/variable-picker-v3/context.js +1 -0
  160. package/dist/cjs/components/variable-picker-v3/index.d.ts +1 -0
  161. package/dist/cjs/components/variable-picker-v3/model.d.ts +57 -0
  162. package/dist/cjs/components/variable-picker-v3/model.js +1 -0
  163. package/dist/cjs/components/variable-picker-v3/recommendVaribles.d.ts +1 -0
  164. package/dist/cjs/components/variable-picker-v3/recommendVaribles.js +1 -0
  165. package/dist/cjs/components/variable-picker-v3/searchVariables.d.ts +2 -0
  166. package/dist/cjs/components/variable-picker-v3/searchVariables.js +1 -0
  167. package/dist/cjs/components/variable-picker-v3/styles.d.ts +6 -0
  168. package/dist/cjs/components/variable-picker-v3/styles.js +40 -0
  169. package/dist/cjs/helpers/index.d.ts +1 -0
  170. package/dist/cjs/hooks/useOutside.d.ts +1 -1
  171. package/dist/cjs/hooks/useOutside.js +1 -1
  172. package/dist/cjs/index.d.ts +1 -2
  173. package/dist/cjs/index.js +1 -1
  174. package/dist/esm/assets/{bundle-c485438b.css → bundle-0deb4a74.css} +2 -325
  175. package/dist/esm/assets/icons/emoji.svg.js +1 -1
  176. package/dist/esm/assets/icons/halfRectangle.svg.js +1 -1
  177. package/dist/esm/assets/icons/strikeThrough.svg.js +1 -1
  178. package/dist/esm/assets/icons/sub_category.svg.js +1 -0
  179. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
  180. package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
  181. package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
  182. package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  183. package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
  184. package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
  185. package/dist/esm/components/TypographyStyle.d.ts +0 -24
  186. package/dist/esm/components/TypographyStyle.js +17 -77
  187. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +0 -4
  188. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +1 -1
  189. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +0 -7
  190. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
  191. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +1 -2
  192. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  193. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.d.ts +0 -1
  194. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +1 -1
  195. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +0 -1
  196. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
  197. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +0 -2
  198. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  199. package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
  200. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
  201. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +0 -1
  202. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +4 -4
  203. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +0 -13
  204. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
  205. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +0 -2
  206. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +1 -1
  207. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  208. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +1 -1
  209. package/dist/esm/components/analytics-chips-and-dropdowns/index.d.ts +0 -1
  210. package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
  211. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -20
  212. package/dist/esm/components/bik-layout/SidebarStyles.js +1 -1
  213. package/dist/esm/components/card-selector/CardSelector.d.ts +0 -1
  214. package/dist/esm/components/card-selector/CardSelector.js +1 -1
  215. package/dist/esm/components/card-selector/CardSelectorGroup.js +1 -1
  216. package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +1 -4
  217. package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
  218. package/dist/esm/components/carousel-preview/CarouselPreview.style.d.ts +2 -4
  219. package/dist/esm/components/carousel-preview/CarouselPreview.style.js +27 -56
  220. package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
  221. package/dist/esm/components/checkBox/CheckBox.d.ts +0 -4
  222. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  223. package/dist/esm/components/checkBox/CheckBox.styled.d.ts +0 -1
  224. package/dist/esm/components/checkBox/CheckBox.styled.js +5 -6
  225. package/dist/esm/components/checkList/CheckList.d.ts +0 -1
  226. package/dist/esm/components/checkList/CheckList.js +1 -1
  227. package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  228. package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +2 -1
  229. package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
  230. package/dist/esm/components/datePicker/index.d.ts +0 -1
  231. package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
  232. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  233. package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
  234. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  235. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +0 -1
  236. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  237. package/dist/esm/components/dropdown/type.d.ts +0 -3
  238. package/dist/esm/components/dynamic-tabs/DynamicTabs.d.ts +0 -2
  239. package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
  240. package/dist/esm/components/floater/floater.d.ts +1 -2
  241. package/dist/esm/components/floater/floater.js +1 -1
  242. package/dist/esm/components/icon-button/IconButton.js +1 -1
  243. package/dist/esm/components/icon-button/model.d.ts +0 -5
  244. package/dist/esm/components/input/Input.d.ts +0 -2
  245. package/dist/esm/components/input/Input.js +1 -1
  246. package/dist/esm/components/input/Input.styled.d.ts +0 -2
  247. package/dist/esm/components/input/Input.styled.js +1 -1
  248. package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +0 -1
  249. package/dist/esm/components/input-with-vars/InputWithVariables.js +3 -3
  250. package/dist/esm/components/list-item/ListItem.d.ts +1 -0
  251. package/dist/esm/components/list-item/ListItem.js +1 -1
  252. package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
  253. package/dist/esm/components/plans/SubscriptionPlan.d.ts +0 -1
  254. package/dist/esm/components/postPicker/postPicker.js +1 -1
  255. package/dist/esm/components/radioButton/RadioButton.d.ts +0 -3
  256. package/dist/esm/components/radioButton/RadioButton.js +1 -1
  257. package/dist/esm/components/radioList/RadioList.d.ts +0 -1
  258. package/dist/esm/components/radioList/RadioList.js +1 -1
  259. package/dist/esm/components/side-modal/SideModal.d.ts +1 -3
  260. package/dist/esm/components/side-modal/SideModal.js +1 -1
  261. package/dist/esm/components/side-modal/SideModal.style.d.ts +1 -4
  262. package/dist/esm/components/side-modal/SideModal.style.js +0 -6
  263. package/dist/esm/components/spinner/Spinner.d.ts +0 -6
  264. package/dist/esm/components/spinner/Spinner.js +1 -18
  265. package/dist/esm/components/states/StateComponent.d.ts +0 -2
  266. package/dist/esm/components/states/StateComponent.js +1 -1
  267. package/dist/esm/components/states/StateComponent.styled.d.ts +1 -4
  268. package/dist/esm/components/states/StateComponent.styled.js +6 -6
  269. package/dist/esm/components/states-modal/StateModalComponent.d.ts +0 -2
  270. package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
  271. package/dist/esm/components/stepper/Stepper.d.ts +0 -2
  272. package/dist/esm/components/stepper/Stepper.js +1 -1
  273. package/dist/esm/components/stepper/Stepper.styled.d.ts +0 -1
  274. package/dist/esm/components/stepper/Stepper.styled.js +6 -6
  275. package/dist/esm/components/tabs/Tabs.js +1 -1
  276. package/dist/esm/components/tabs/Tabs.model.d.ts +0 -1
  277. package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
  278. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  279. package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +14 -8
  280. package/dist/esm/components/template-context-mapper/context/templateModalContext.js +1 -1
  281. package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
  282. package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
  283. package/dist/esm/components/template-context-mapper/modalElements/BackTrackComponent.js +1 -1
  284. package/dist/esm/components/template-context-mapper/modalElements/Body.d.ts +1 -1
  285. package/dist/esm/components/template-context-mapper/modalElements/Body.js +9 -13
  286. package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +2 -2
  287. package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.d.ts +0 -2
  288. package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
  289. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  290. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.style.js +1 -0
  291. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +1 -2
  292. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  293. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +1 -2
  294. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  295. package/dist/esm/components/template-context-mapper/modalElements/Footer.js +5 -5
  296. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +3 -5
  297. package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
  298. package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
  299. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +2 -2
  300. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +4 -4
  301. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +1 -3
  302. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  303. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +1 -3
  304. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  305. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +1 -3
  306. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  307. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  308. package/dist/esm/components/template-preview/EmailTemplatePreview.styled.js +0 -2
  309. package/dist/esm/components/template-preview/SmsTemplatePreview.d.ts +0 -1
  310. package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
  311. package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
  312. package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
  313. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.d.ts +0 -5
  314. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.js +17 -23
  315. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +5 -5
  316. package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
  317. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -6
  318. package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.d.ts +1 -1
  319. package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
  320. package/dist/esm/components/template-preview/helpers/VariableEditorHelper.js +1 -1
  321. package/dist/esm/components/template-preview/models/SmsTemplate.d.ts +0 -1
  322. package/dist/esm/components/tooltips/TooltipInternal.d.ts +1 -1
  323. package/dist/esm/components/variable-picker-v3/Content.d.ts +6 -0
  324. package/dist/esm/components/variable-picker-v3/Content.js +1 -0
  325. package/dist/esm/components/variable-picker-v3/NoResult.d.ts +6 -0
  326. package/dist/esm/components/variable-picker-v3/NoResult.js +17 -0
  327. package/dist/esm/components/variable-picker-v3/SubHeaderItems.d.ts +14 -0
  328. package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -0
  329. package/dist/esm/components/variable-picker-v3/VariablePicker.d.ts +5 -0
  330. package/dist/esm/components/variable-picker-v3/VariablePicker.js +1 -0
  331. package/dist/esm/components/variable-picker-v3/context.d.ts +21 -0
  332. package/dist/esm/components/variable-picker-v3/context.js +1 -0
  333. package/dist/esm/components/variable-picker-v3/index.d.ts +1 -0
  334. package/dist/esm/components/variable-picker-v3/model.d.ts +57 -0
  335. package/dist/esm/components/variable-picker-v3/model.js +1 -0
  336. package/dist/esm/components/variable-picker-v3/recommendVaribles.d.ts +1 -0
  337. package/dist/esm/components/variable-picker-v3/recommendVaribles.js +1 -0
  338. package/dist/esm/components/variable-picker-v3/searchVariables.d.ts +2 -0
  339. package/dist/esm/components/variable-picker-v3/searchVariables.js +1 -0
  340. package/dist/esm/components/variable-picker-v3/styles.d.ts +6 -0
  341. package/dist/esm/components/variable-picker-v3/styles.js +40 -0
  342. package/dist/esm/helpers/index.d.ts +1 -0
  343. package/dist/esm/hooks/useOutside.d.ts +1 -1
  344. package/dist/esm/hooks/useOutside.js +1 -1
  345. package/dist/esm/index.d.ts +1 -2
  346. package/dist/esm/index.js +1 -1
  347. package/package.json +2 -4
  348. package/dist/cjs/assets/icons/chat-channel.svg.js +0 -1
  349. package/dist/cjs/assets/icons/instagram-channel.svg.js +0 -1
  350. package/dist/cjs/assets/icons/similar.svg.js +0 -1
  351. package/dist/cjs/assets/icons/whatsapp-channel.svg.js +0 -1
  352. package/dist/cjs/components/action-button/ActionButton.styled.d.ts +0 -7
  353. package/dist/cjs/components/action-button/ActionButton.styled.js +0 -23
  354. package/dist/cjs/components/action-button/ActionButtons.d.ts +0 -10
  355. package/dist/cjs/components/action-button/ActionButtons.js +0 -1
  356. package/dist/cjs/components/action-button/index.d.ts +0 -1
  357. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +0 -4
  358. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.js +0 -1
  359. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +0 -13
  360. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +0 -1
  361. package/dist/cjs/components/carousel-preview/CustomCarouselArrows.d.ts +0 -7
  362. package/dist/cjs/components/carousel-preview/CustomCarouselArrows.js +0 -1
  363. package/dist/cjs/components/progress-bar-v2/ProgressBarV2.d.ts +0 -21
  364. package/dist/cjs/components/progress-bar-v2/ProgressBarV2.js +0 -1
  365. package/dist/cjs/components/progress-bar-v2/index.d.ts +0 -1
  366. package/dist/cjs/components/template-context-mapper/utils/constants.d.ts +0 -1
  367. package/dist/cjs/components/template-context-mapper/utils/constants.js +0 -1
  368. package/dist/esm/assets/icons/chat-channel.svg.js +0 -1
  369. package/dist/esm/assets/icons/email-channel.svg.js +0 -1
  370. package/dist/esm/assets/icons/instagram-channel.svg.js +0 -1
  371. package/dist/esm/assets/icons/similar.svg.js +0 -1
  372. package/dist/esm/assets/icons/whatsapp-channel.svg.js +0 -1
  373. package/dist/esm/components/action-button/ActionButton.styled.d.ts +0 -7
  374. package/dist/esm/components/action-button/ActionButton.styled.js +0 -23
  375. package/dist/esm/components/action-button/ActionButtons.d.ts +0 -10
  376. package/dist/esm/components/action-button/ActionButtons.js +0 -1
  377. package/dist/esm/components/action-button/index.d.ts +0 -1
  378. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +0 -4
  379. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.js +0 -1
  380. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +0 -13
  381. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +0 -1
  382. package/dist/esm/components/carousel-preview/CustomCarouselArrows.d.ts +0 -7
  383. package/dist/esm/components/carousel-preview/CustomCarouselArrows.js +0 -1
  384. package/dist/esm/components/progress-bar-v2/ProgressBarV2.d.ts +0 -21
  385. package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +0 -1
  386. package/dist/esm/components/progress-bar-v2/index.d.ts +0 -1
  387. package/dist/esm/components/template-context-mapper/utils/constants.d.ts +0 -1
  388. package/dist/esm/components/template-context-mapper/utils/constants.js +0 -1
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as n,useRef as r,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as g}from"../TypographyStyle.js";import{unCamelCase as u}from"../../utils/unCamelCase.js";import{PRIMARY as j}from"../../constants/colors.js";import{COLORS as w}from"../../constants/Theme.js";import v from"../../assets/icons/instagram.svg.js";import f from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as b}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as C}from"../modals/styledModal.js";import{BikShimmer as D}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as T}from"../shimmer-image/ShimmerImage.js";import{StateComponent as O,StateInterface as S}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var k,x;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(k||(k={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(x||(x={}));const B=[{label:"Today",value:"today",key:x.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:x["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:x["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:x.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],I=x=>{var I,V;const[L,P]=n(null!==(I=x.previouslySelected)&&void 0!==I?I:[]),[G,_]=n(""),[E,N]=n(!1),[R,$]=n(x.media),[M,A]=n(!1),[F,H]=n(!1),[U,z]=n(!1),Y=r(null);o((()=>{x.media.length||(N(!0),setTimeout((()=>{N(!1)}),2e3)),P(x.selected||[])}),[]),o((()=>{x.media.length>0&&($(x.media),N(!1))}),[null===(V=null==x?void 0:x.media)||void 0===V?void 0:V.length]),o((()=>{L.length>0&&_("")}),[L.length]),o((()=>{M&&($(x.media),H(!1))}),[M]),o((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||z(!U)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e("div",Object.assign({ref:Y},{children:t(C,Object.assign({zIndex:201,open:x.showModal,headingTitle:x.title,onClose:x.onClose,centralContainerStyles:{width:1071,height:x.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${u(x.mediaType)}`,onClick:()=>{L.length?x.onSelect(L):_(`Please select a ${x.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>x.onClose()},footerLeftCustomElement:G?e(d,{tagText:G,type:"negative",LeadingIcon:f}):L.length?t(g,{children:[L.length," selected"]}):null,id:"post-picker"},{children:[x.showFilter&&t("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e(b,{options:B,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,n=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,n=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],n=e.typeValue[1]);const r=x.media.filter((e=>function(e,t,a){const i=new Date(e),n=new Date(t),r=new Date(a);return i>=n&&i<=r}(e.timestamp,i,n)));$(r),H(!0),A(!1)},closeDropdown:U}),F&&e(c,Object.assign({color:w.content.secondary,onClick:()=>A(!0),style:{cursor:"pointer"}},{children:"Clear"}))]})),E?e("div",Object.assign({style:{padding:"0 24px"}},{children:e(D,{boxes:[{width:(x.mediaType==k.POST?148:104)+"px",height:(x.mediaType==k.POST?148:172)+"px"}]})})):e(a,{children:R&&R.length?e(s,Object.assign({mediaType:x.mediaType},{children:R.map((a=>{return t(l,Object.assign({mediaType:x.mediaType,className:""+(i=a,n=L,n.some((e=>e.id===i.id))?"selected":""),onClick:()=>{return e=a,void P((()=>L.find((t=>t.id===e.id))?L.filter((t=>t.id!==e.id)):!x.limit||L.length<x.limit?[...L,e]:(_(`Only ${x.limit} ${x.mediaType}s can be selected`),L)));var e}},{children:[e(T,{imageUrl:a.imageUrl,width:x.mediaType==k.POST?148:104,height:x.mediaType==k.POST?148:172,alt:a.overlayCaption}),t("div",Object.assign({className:"overlay"},{children:[e("a",Object.assign({target:"_blank",rel:"noreferrer",href:a.redirectionUrl},{children:t("div",Object.assign({className:"overlay__redirection"},{children:[e(v,{height:22,width:22}),e(p,Object.assign({color:j,style:{fontWeight:500}},{children:"View"}))]}))})),e("div",Object.assign({className:"overlay__caption"},{children:e(m,Object.assign({color:w.content.placeholder},{children:a.overlayCaption}))}))]}))]}),a.id);var i,n}))})):e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:x.media.length?R.length?e(a,{}):t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${w.background.inverse}`,borderRadius:"50%"}},{children:e(i,{color:w.content.primaryInverse})})),t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]})),e("div",Object.assign({onClick:()=>{A(!0)},style:{cursor:"pointer"}},{children:e(y,Object.assign({color:`${w.content.brand}`},{children:"Clear Filter"}))}))]})):e(O,{states:S.WARNING,heading:`No ${x.mediaType}s on your account`,subline:`There seems to be no ${x.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))};export{x as DateKeys,k as MEDIA_TYPES,I as PostPicker,B as dateOptions};
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{SearchIcon as i}from"../../assets/icons/searchIcon.js";import{useState as n,useRef as r,useEffect as o}from"react";import{StyledProductGrid as s,StyledProduct as l}from"./PostPicker.styled.js";import{Tag as d}from"../tag/Tag.js";import{ButtonRegular as c,BodyPrimary as p,BodyCaption as m,TitleMedium as h,ButtonLarge as y,BodySecondary as g}from"../TypographyStyle.js";import{unCamelCase as u}from"../../utils/unCamelCase.js";import{PRIMARY as j}from"../../constants/colors.js";import{COLORS as w}from"../../constants/Theme.js";import v from"../../assets/icons/instagram.svg.js";import f from"../../assets/icons/warning.svg.js";import"../tooltips/Tooltip.js";import"../analytics-chips-and-dropdowns/CommonStyles.js";import{AnalyticsDropdown as b}from"../analytics-chips-and-dropdowns/AnalyticsDropdown.js";import"../analytics-chips-and-dropdowns/AnalyticsMetric.js";import"../shimmer/ShimmerComponent/ShimmerStyled.js";import"../../utils/DateUtils.js";import"../analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";import"react-bootstrap";import"../analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";import"../analytics-chips-and-dropdowns/chart/Pie/PieChart.js";import"../analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js";import"../analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";import"../analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js";import"../analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";import{StyledModal as C}from"../modals/styledModal.js";import{BikShimmer as D}from"../shimmer/ShimmerComponent/BikShimmer.js";import{ShimmerImage as T}from"../shimmer-image/ShimmerImage.js";import{StateComponent as O,StateInterface as S}from"../states/StateComponent.js";import"../../_virtual/_tslib.js";var k,x;!function(e){e.STORY="story",e.POST="post",e.REEL="reel"}(k||(k={})),function(e){e.Today="Today",e["7_Days"]="7",e["30_Days"]="30",e.custom="custom",e.Yesterday="Yesterday"}(x||(x={}));const B=[{label:"Today",value:"today",key:x.Today,typeValue:[new Date,new Date]},{label:"Last 7 days",value:"7 days",key:x["7_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-6)),new Date]},{label:"Last 30 days",value:"30 days",key:x["30_Days"],typeValue:[new Date((new Date).setDate((new Date).getDate()-29)),new Date]},{label:"Custom range",value:"calender",key:x.custom,isCustom:!0,dateRangeSelectionOptions:{selectRange:!0,maxDate:new Date((new Date).setMonth((new Date).getMonth()+3))}}],I=x=>{var I,L;const[P,V]=n(null!==(I=x.previouslySelected)&&void 0!==I?I:[]),[_,G]=n(""),[E,N]=n(!1),[R,$]=n(x.media),[M,A]=n(!1),[H,U]=n(!1),[z,F]=n(!1),Y=r(null);o((()=>{x.media.length||(N(!0),setTimeout((()=>{N(!1)}),2e3)),V(x.selected||[])}),[]),o((()=>{x.media.length>0&&($(x.media),N(!1))}),[null===(L=null==x?void 0:x.media)||void 0===L?void 0:L.length]),o((()=>{P.length>0&&G("")}),[P.length]),o((()=>{M&&($(x.media),U(!1))}),[M]),o((()=>{const e=e=>{document.getElementById("analytic-dropdown").contains(e.target)||F(!z)},t=document.getElementById("post-picker");return t&&t.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e)}}));return e("div",Object.assign({ref:Y},{children:t(C,Object.assign({zIndex:201,open:x.showModal,headingTitle:x.title,onClose:x.onClose,centralContainerStyles:{width:1071,height:x.showFilter?650:564},primaryButton:{disabled:!R.length,buttonType:"primary",buttonText:`Select ${u(x.mediaType)}`,onClick:()=>{P.length?x.onSelect(P):G(`Please select a ${x.mediaType} to proceed`)}},secondaryButton:{buttonType:"secondary",buttonText:"Back",onClick:()=>x.onClose()},footerLeftCustomElement:_?e(d,{tagText:_,type:"negative",LeadingIcon:f}):P.length?t(g,{children:[P.length," selected"]}):null,id:"post-picker"},{children:[x.showFilter&&t("div",Object.assign({style:{marginTop:24,marginBottom:24,padding:"0 24px",display:"flex",flexDirection:"row",gap:8,alignItems:"center"}},{children:[e(b,{options:B,placeholder:"posted on",resetDropdown:M,onOptionSelected:e=>{var t,a;let i=null,n=null;"Custom range"===e.label?(i=(null===(t=null==e?void 0:e.selectedRange)||void 0===t?void 0:t[0])||new Date,n=(null===(a=null==e?void 0:e.selectedRange)||void 0===a?void 0:a[1])||new Date):(i=e.typeValue[0],n=e.typeValue[1]);const r=x.media.filter((e=>function(e,t,a){const i=new Date(e),n=new Date(t),r=new Date(a);return i>=n&&i<=r}(e.timestamp,i,n)));$(r),U(!0),A(!1)},closeDropdown:z}),H&&e(c,Object.assign({color:w.content.secondary,onClick:()=>A(!0),style:{cursor:"pointer"}},{children:"Clear"}))]})),E?e("div",Object.assign({style:{padding:"0 24px"}},{children:e(D,{boxes:[{width:(x.mediaType==k.POST?148:104)+"px",height:(x.mediaType==k.POST?148:172)+"px"}]})})):e(a,{children:R&&R.length?e(s,Object.assign({mediaType:x.mediaType},{children:R.map((a=>{return t(l,Object.assign({mediaType:x.mediaType,className:""+(i=a,n=P,n.some((e=>e.id===i.id))?"selected":""),onClick:()=>{return e=a,void V((()=>P.find((t=>t.id===e.id))?P.filter((t=>t.id!==e.id)):!x.limit||P.length<x.limit?[...P,e]:(G(`Only ${x.limit} ${x.mediaType}s can be selected`),P)));var e}},{children:[e(T,{imageUrl:a.imageUrl,width:x.mediaType==k.POST?148:104,height:x.mediaType==k.POST?148:172,alt:a.overlayCaption}),t("div",Object.assign({className:"overlay"},{children:[e("a",Object.assign({target:"_blank",rel:"noreferrer",href:a.redirectionUrl},{children:t("div",Object.assign({className:"overlay__redirection"},{children:[e(v,{height:22,width:22}),e(p,Object.assign({color:j,style:{fontWeight:500}},{children:"View"}))]}))})),e("div",Object.assign({className:"overlay__caption"},{children:e(m,Object.assign({color:w.content.placeholder},{children:a.overlayCaption}))}))]}))]}),a.id);var i,n}))})):e("div",Object.assign({style:{justifyContent:"center",alignItems:"center",display:"flex",height:422}},{children:x.media.length?R.length?e(a,{}):t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"48px",height:"48px",backgroundColor:`${w.background.inverse}`,borderRadius:"50%"}},{children:e(i,{color:w.content.primaryInverse})})),t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px"}},{children:[e(h,{children:"No results found"}),e(p,{children:"Sorry we could not find any results for the selected filter"})]})),e("div",Object.assign({onClick:()=>{A(!0)},style:{cursor:"pointer"}},{children:e(y,Object.assign({color:`${w.content.brand}`},{children:"Clear Filter"}))}))]})):e(O,{states:S.WARNING,heading:`No ${x.mediaType}s on your account`,subline:`There seems to be no ${x.mediaType}s on your account`,isButtonEnabled:!1,width:400})}))})]}))}))};export{x as DateKeys,k as MEDIA_TYPES,I as PostPicker,B as dateOptions};
@@ -7,8 +7,5 @@ export type RadioButtonProps = {
7
7
  onValueChange: (checked: boolean, value?: string) => void;
8
8
  skipHoverState?: boolean;
9
9
  size?: 'DEFAULT' | 'SMALL';
10
- skipSelectingOff?: boolean;
11
- labelSize?: 'DEFAULT' | 'MEDIUM';
12
- boldOnChecked?: boolean;
13
10
  };
14
11
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1 +1 @@
1
- import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t}from"react";import{RadioButtonContainer as a,RadioButtonIcon as r}from"./RadioButton.styled.js";import{TitleSmall as o,BodyCaption as c,BodySecondary as n,BodyPrimary as d}from"../TypographyStyle.js";import{COLORS as b}from"../../constants/Theme.js";const m=s=>{const l=s.isDisabled?b.content.inactive:s.isActive?b.background.positive.vibrant:b.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?b.content.inactive:b.background.positive.vibrant})]}))},v=v=>{const[p,h]=l(v.isActive||!1),[S,g]=l(!1),[x,u]=l(!1);t((()=>{h(v.isActive)}),[v.isActive]);return i(a,Object.assign({onClick:()=>{var i;if(!v.skipSelectingOff&&!v.isDisabled){const e=!p;h(e),null===(i=v.onValueChange)||void 0===i||i.call(v,e,v.value)}},onMouseEnter:()=>g(!v.skipHoverState),onMouseLeave:()=>g(!1),onMouseDown:()=>u(!v.skipHoverState),onMouseUp:()=>u(!1)},{children:[e(r,Object.assign({checked:p,hovered:S,clicked:x,isDisabled:v.isDisabled||!1,size:v.size},{children:e(m,{isSmall:"SMALL"===v.size,isActive:p,isDisabled:v.isDisabled||!1})})),v.label?v.boldOnChecked&&p?e(o,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):"SMALL"===v.size?e(c,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):"MEDIUM"===v.labelSize?e(n,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):e(d,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):e(s,{})]}))};export{v as RadioButton};
1
+ import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as s,useEffect as l}from"react";import{RadioButtonContainer as t,RadioButtonIcon as a}from"./RadioButton.styled.js";import{BodyPrimary as o,BodyCaption as r}from"../TypographyStyle.js";import{COLORS as c}from"../../constants/Theme.js";const n=s=>{const l=s.isDisabled?c.content.inactive:s.isActive?c.background.positive.vibrant:c.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?c.content.inactive:c.background.positive.vibrant})]}))},d=d=>{const[m,b]=s(d.isActive||!1),[v,p]=s(!1),[S,h]=s(!1);return l((()=>{b(d.isActive)}),[d.isActive]),i(t,Object.assign({onClick:()=>{var i;if(!d.isDisabled){const e=!m;b(e),null===(i=d.onValueChange)||void 0===i||i.call(d,e,d.value)}},onMouseEnter:()=>p(!d.skipHoverState),onMouseLeave:()=>p(!1),onMouseDown:()=>h(!d.skipHoverState),onMouseUp:()=>h(!1)},{children:[e(a,Object.assign({checked:m,hovered:v,clicked:S,isDisabled:d.isDisabled||!1,size:d.size},{children:e(n,{isSmall:"SMALL"===d.size,isActive:m,isDisabled:d.isDisabled||!1})})),d.label&&"SMALL"!==d.size&&e(o,Object.assign({color:d.isDisabled?c.text.disabled:c.text.primary},{children:d.label})),d.label&&"SMALL"===d.size&&e(r,Object.assign({color:d.isDisabled?c.text.disabled:c.text.primary},{children:d.label}))]}))};export{d as RadioButton};
@@ -8,7 +8,6 @@ export type RadioListProps = {
8
8
  subTitle?: string;
9
9
  listItems: RadioListItem[];
10
10
  onChange: (option: RadioListItem) => void;
11
- listContainerStyles?: React.CSSProperties;
12
11
  };
13
12
  export declare const RadioList: React.FC<RadioListProps>;
14
13
  export {};
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useEffect as s}from"react";import{RadioButton as o}from"../radioButton/RadioButton.js";import{RadioListStyled as r}from"./RadioList.styled.js";import{TitleRegular as n,BodySecondary as l}from"../TypographyStyle.js";import{COLORS as a}from"../../constants/Theme.js";const c=c=>{var m;const[d,u]=i(c.listItems);s((()=>{u(c.listItems)}),[c.listItems]);const h=(t,e)=>{let i;const s=[...d];s.forEach((s=>{s.value===e?(i=s,s.isActive=t):s.isActive=!t})),u(s),c.onChange(i)};return t(r,{children:[(c.title||c.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[c.title&&e(n,{children:c.title}),c.subTitle&&e(l,Object.assign({color:a.text.secondary},{children:c.subTitle}))]})),e("div",Object.assign({style:null!==(m=c.listContainerStyles)&&void 0!==m?m:{},className:"list__container"},{children:d.map((t=>e(o,Object.assign({},t,{onValueChange:h}),t.value)))}))]})};export{c as RadioList};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useEffect as s}from"react";import{RadioButton as o}from"../radioButton/RadioButton.js";import{RadioListStyled as r}from"./RadioList.styled.js";import{TitleRegular as n,BodySecondary as a}from"../TypographyStyle.js";import{COLORS as c}from"../../constants/Theme.js";const l=l=>{const[m,d]=i(l.listItems);s((()=>{d(l.listItems)}),[l.listItems]);const h=(t,e)=>{let i;const s=[...m];s.forEach((s=>{s.value===e?(i=s,s.isActive=t):s.isActive=!t})),d(s),l.onChange(i)};return t(r,{children:[(l.title||l.subTitle)&&t("div",Object.assign({className:"title__container"},{children:[l.title&&e(n,{children:l.title}),l.subTitle&&e(a,Object.assign({color:c.text.secondary},{children:l.subTitle}))]})),e("div",Object.assign({className:"list__container"},{children:m.map((t=>e(o,Object.assign({},t,{onValueChange:h}),t.value)))}))]})};export{l as RadioList};
@@ -3,7 +3,6 @@ import { ButtonProps } from '../button/model';
3
3
  export interface SideModalProps {
4
4
  header: string;
5
5
  children: React.ReactNode;
6
- headerCustomComponent?: React.ReactNode;
7
6
  footerCustomComponent?: React.ReactNode;
8
7
  footerDirection?: 'row' | 'row-reverse';
9
8
  hideCrossButton?: boolean;
@@ -14,7 +13,6 @@ export interface SideModalProps {
14
13
  zIndex?: number;
15
14
  hideFooter?: boolean;
16
15
  bodyStyle?: React.CSSProperties;
17
- headerStyle?: React.CSSProperties;
18
- footerStyle?: React.CSSProperties;
16
+ element?: Element | DocumentFragment;
19
17
  }
20
18
  export declare const SideModal: React.FC<SideModalProps>;
@@ -1 +1 @@
1
- import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import r from"react-dom";import n from"../../assets/icons/cross.svg.js";import{Button as s}from"../button/Button.js";import{TitleMedium as i}from"../TypographyStyle.js";import{SideModalStyle as c,SideModalContainer as d,SideModalHeader as a,SideModalBody as l,SideModalFooter as h,FooterButtonWrapper as m}from"./SideModal.style.js";const p=p=>r.createPortal(o(c,Object.assign({zIndex:p.zIndex},{children:t(d,Object.assign({width:p.width},{children:[t(a,Object.assign({headerStyle:Object.assign({},p.headerStyle)},{children:[(null==p?void 0:p.headerCustomComponent)||o(i,{children:p.header}),!p.hideCrossButton&&o(n,{width:24,height:24,onClick:p.onClose})]})),o(l,Object.assign({hideFooter:p.hideFooter,bodyStyle:Object.assign({},p.bodyStyle)},{children:p.children})),!0===p.hideFooter?null:t(h,Object.assign({footerDirection:p.footerDirection,footerStyle:Object.assign({},p.footerStyle)},{children:[(p.saveButtonProps||p.cancelButtonProps)&&t(m,Object.assign({footerDirection:p.footerDirection},{children:[p.saveButtonProps&&o(s,Object.assign({},p.saveButtonProps)),p.cancelButtonProps&&o(s,Object.assign({},p.cancelButtonProps))]})),p.footerCustomComponent?p.footerCustomComponent:o(e,{})]}))]}))})),document.body);export{p as SideModal};
1
+ import{jsx as o,jsxs as e,Fragment as t}from"react/jsx-runtime";import r from"react-dom";import i from"../../assets/icons/cross.svg.js";import{Button as n}from"../button/Button.js";import{TitleMedium as s}from"../TypographyStyle.js";import{SideModalStyle as c,SideModalContainer as d,SideModalHeader as l,SideModalBody as m,SideModalFooter as a,FooterButtonWrapper as h}from"./SideModal.style.js";const j=j=>{var p;return r.createPortal(o(c,Object.assign({zIndex:j.zIndex},{children:e(d,Object.assign({width:j.width},{children:[e(l,{children:[o(s,{children:j.header}),!j.hideCrossButton&&o(i,{width:24,height:24,onClick:j.onClose})]}),o(m,Object.assign({hideFooter:j.hideFooter,bodyStyle:Object.assign({},j.bodyStyle)},{children:j.children})),!0===j.hideFooter?null:e(a,Object.assign({footerDirection:j.footerDirection},{children:[e(h,Object.assign({footerDirection:j.footerDirection},{children:[o(n,Object.assign({},j.saveButtonProps)),o(n,Object.assign({},j.cancelButtonProps))]})),j.footerCustomComponent?j.footerCustomComponent:o(t,{})]}))]}))})),null!==(p=j.element)&&void 0!==p?p:document.body)};export{j as SideModal};
@@ -4,16 +4,13 @@ export declare const SideModalStyle: import("styled-components").StyledComponent
4
4
  export declare const SideModalContainer: import("styled-components").StyledComponent<"div", any, {
5
5
  width?: string | undefined;
6
6
  }, never>;
7
- export declare const SideModalHeader: import("styled-components").StyledComponent<"div", any, {
8
- headerStyle: React.CSSProperties;
9
- }, never>;
7
+ export declare const SideModalHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
10
8
  export declare const SideModalBody: import("styled-components").StyledComponent<"div", any, {
11
9
  hideFooter?: boolean | undefined;
12
10
  bodyStyle: React.CSSProperties;
13
11
  }, never>;
14
12
  export declare const SideModalFooter: import("styled-components").StyledComponent<"div", any, {
15
13
  footerDirection?: "row" | "row-reverse" | undefined;
16
- footerStyle: React.CSSProperties;
17
14
  }, never>;
18
15
  export declare const FooterButtonWrapper: import("styled-components").StyledComponent<"div", any, {
19
16
  footerDirection?: "row" | "row-reverse" | undefined;
@@ -31,9 +31,6 @@ import e,{css as t}from"styled-components";import{COLORS as i}from"../../constan
31
31
  svg:hover {
32
32
  cursor: pointer;
33
33
  }
34
- ${e=>{let{headerStyle:i}=e;return t`
35
- ${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
36
- `}}
37
34
  `,s=e.div`
38
35
  overflow-y: auto;
39
36
  padding: 24px;
@@ -53,9 +50,6 @@ import e,{css as t}from"styled-components";import{COLORS as i}from"../../constan
53
50
  background: ${i.surface.standard};
54
51
  border-top: 1px solid ${i.stroke.primary};
55
52
  padding: 0px 24px;
56
- ${e=>{let{footerStyle:i}=e;return t`
57
- ${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
58
- `}}
59
53
  `,a=e.div`
60
54
  display: flex;
61
55
  flex-direction: ${e=>e.footerDirection||"row"};
@@ -3,9 +3,3 @@ export declare const Spinner: {
3
3
  ({ size, color, className }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export declare const PureSpinner: import("styled-components").StyledComponent<"div", any, {
7
- width: string;
8
- height: string;
9
- color?: string | undefined;
10
- backgroundColor?: string | undefined;
11
- }, never>;
@@ -1,18 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import o from"react-lottie";import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";import*as i from"./lotties/black.json.js";import*as n from"./lotties/brand.json.js";import*as s from"./lotties/red.json.js";import*as a from"./lotties/white.json.js";import{SizeMap as m}from"./themes.js";const l={[e.stroke.brand]:n,[e.content.primary]:i,[e.content.primaryInverse]:a,[e.content.negative]:s},d=r=>{let{size:i,color:n,className:s}=r;const a={loop:!0,autoplay:!0,animationData:l[null!=n?n:e.stroke.brand],rendererSettings:{preserveAspectRatio:"xMidYMid slice"}};return t("div",Object.assign({className:`spinner-container ${s}`},{children:t(o,{options:a,width:m[i],isStopped:!1,isPaused:!1})}))};d.displayName="Spinner";const p=r.div`
2
- width: ${t=>t.width};
3
- height: ${t=>t.height};
4
- border: 5px solid ${t=>{var o;return null!==(o=t.backgroundColor)&&void 0!==o?o:"transparent"}};
5
- border-bottom-color: ${t=>{var o;return null!==(o=t.color)&&void 0!==o?o:e.stroke.brand}};
6
- border-radius: 50%;
7
- display: inline-block;
8
- animation: rotation 1s linear infinite;
9
-
10
- @keyframes rotation {
11
- 0% {
12
- transform: rotate(0deg);
13
- }
14
- 100% {
15
- transform: rotate(360deg);
16
- }
17
- }
18
- `;export{p as PureSpinner,d as Spinner};
1
+ import{jsx as t}from"react/jsx-runtime";import e from"react-lottie";import{COLORS as o}from"../../constants/Theme.js";import*as s from"./lotties/black.json.js";import*as r from"./lotties/brand.json.js";import*as i from"./lotties/red.json.js";import*as n from"./lotties/white.json.js";import{SizeMap as a}from"./themes.js";const m={[o.stroke.brand]:r,[o.content.primary]:s,[o.content.primaryInverse]:n,[o.content.negative]:i},p=s=>{let{size:r,color:i,className:n}=s;const p={loop:!0,autoplay:!0,animationData:m[null!=i?i:o.stroke.brand],rendererSettings:{preserveAspectRatio:"xMidYMid slice"}};return t("div",Object.assign({className:`spinner-container ${n}`},{children:t(e,{options:p,width:a[r],isStopped:!1,isPaused:!1})}))};p.displayName="Spinner";export{p as Spinner};
@@ -30,7 +30,5 @@ export type StateComponentProps = {
30
30
  leadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
31
31
  width: number;
32
32
  size?: 'DEFAULT' | 'SMALL';
33
- iconHeight?: number;
34
- iconWidth?: number;
35
33
  };
36
34
  export declare const StateComponent: React.FC<React.PropsWithChildren<StateComponentProps>>;
@@ -1 +1 @@
1
- import{jsxs as n,jsx as t,Fragment as e}from"react/jsx-runtime";import{COLORS as i}from"../../constants/Theme.js";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import r from"../../assets/icons/warningIcon.svg.js";import{Button as c}from"../button/Button.js";import{Spinner as a}from"../spinner/Spinner.js";import{TitleRegular as l,TitleMedium as d,BodyPrimary as h,BodySecondary as m}from"../TypographyStyle.js";import{StateComponentContainer as g,StateIcon as u,StateHeading as p,StateSubline as L,ButtonContainer as b}from"./StateComponent.styled.js";var j,O,S;!function(n){n.SUCCESS="success",n.ERROR="error",n.WARNING="warning",n.LOADING="loading"}(j||(j={})),function(n){n.CANCEL="cancel",n.OTHER="other"}(O||(O={})),function(n){n.SINGLE="SINGLE",n.DOUBLE="DOUBLE"}(S||(S={}));const E=E=>{var y;const C=()=>f==j.SUCCESS?t(s,{}):f==j.WARNING?t(r,{}):f==j.ERROR?t(o,{}):f===j.LOADING?t(a,{size:"large"}):void 0,{states:f,heading:I,subline:R,icon:A=C(),isButtonEnabled:N,type:T,buttonText:z,buttonType:v,onButtonClick:B,leadingIcon:G,width:W,headerImage:w,iconWidth:x,iconHeight:D}=E;return n(g,Object.assign({width:W},{children:[t(u,Object.assign({iconWidth:x,iconHeight:D},{children:w?t("img",{src:w,width:"100%",height:"auto",alt:""}):A})),n(p,Object.assign({size:E.size},{children:["SMALL"===E.size&&t(l,{children:I}),"SMALL"!==E.size&&t(d,{children:I})]})),n(L,{children:["SMALL"!==E.size&&t(h,Object.assign({color:i.content.secondary},{children:R})),"SMALL"===E.size&&t(m,Object.assign({color:i.content.secondary},{children:R}))]}),null!==(y=E.children)&&void 0!==y?y:t(e,{}),N&&t(e,{children:n(b,Object.assign({size:E.size},{children:[T==S.DOUBLE&&t(c,{onClick:()=>B&&B(O.CANCEL),buttonType:"secondary",buttonText:"Cancel",matchParentWidth:!0}),t(c,{onClick:()=>B&&B(O.OTHER),buttonType:null!=v?v:"primary",LeadingIcon:G,buttonText:null!=z?z:"Retry",matchParentWidth:!0})]}))})]}))};export{O as ButtonActions,S as ButtonTypes,E as StateComponent,j as StateInterface};
1
+ import{jsxs as n,jsx as t,Fragment as e}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import i from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import r from"../../assets/icons/warningIcon.svg.js";import{Button as c}from"../button/Button.js";import{Spinner as a}from"../spinner/Spinner.js";import{TitleRegular as l,TitleMedium as d,BodyPrimary as m,BodySecondary as h}from"../TypographyStyle.js";import{StateComponentContainer as u,StateIcon as p,StateHeading as g,StateSubline as L,ButtonContainer as S}from"./StateComponent.styled.js";var b,j,E;!function(n){n.SUCCESS="success",n.ERROR="error",n.WARNING="warning",n.LOADING="loading"}(b||(b={})),function(n){n.CANCEL="cancel",n.OTHER="other"}(j||(j={})),function(n){n.SINGLE="SINGLE",n.DOUBLE="DOUBLE"}(E||(E={}));const O=O=>{var y;const C=()=>f==b.SUCCESS?t(s,{}):f==b.WARNING?t(r,{}):f==b.ERROR?t(i,{}):f===b.LOADING?t(a,{size:"large"}):void 0,{states:f,heading:I,subline:R,icon:A=C(),isButtonEnabled:N,type:T,buttonText:z,buttonType:v,onButtonClick:B,leadingIcon:G,width:w,headerImage:x}=O;return n(u,Object.assign({width:w},{children:[t(p,{children:x?t("img",{src:x,width:"100%",height:"auto",alt:""}):A}),n(g,Object.assign({size:O.size},{children:["SMALL"===O.size&&t(l,{children:I}),"SMALL"!==O.size&&t(d,{children:I})]})),n(L,{children:["SMALL"!==O.size&&t(m,Object.assign({color:o.content.secondary},{children:R})),"SMALL"===O.size&&t(h,Object.assign({color:o.content.secondary},{children:R}))]}),null!==(y=O.children)&&void 0!==y?y:t(e,{}),N&&t(e,{children:n(S,Object.assign({size:O.size},{children:[T==E.DOUBLE&&t(c,{onClick:()=>B&&B(j.CANCEL),buttonType:"secondary",buttonText:"Cancel",matchParentWidth:!0}),t(c,{onClick:()=>B&&B(j.OTHER),buttonType:null!=v?v:"primary",LeadingIcon:G,buttonText:null!=z?z:"Retry",matchParentWidth:!0})]}))})]}))};export{j as ButtonActions,E as ButtonTypes,O as StateComponent,b as StateInterface};
@@ -1,10 +1,7 @@
1
1
  export declare const StateComponentContainer: import("styled-components").StyledComponent<"div", any, {
2
2
  width: number;
3
3
  }, never>;
4
- export declare const StateIcon: import("styled-components").StyledComponent<"div", any, {
5
- iconWidth?: number | undefined;
6
- iconHeight?: number | undefined;
7
- }, never>;
4
+ export declare const StateIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
8
5
  export declare const StateHeading: import("styled-components").StyledComponent<"div", any, {
9
6
  size?: "SMALL" | "DEFAULT" | undefined;
10
7
  }, never>;
@@ -7,23 +7,23 @@ import i from"styled-components";const t=i.div`
7
7
  flex-direction: column;
8
8
  align-items: center;
9
9
  `,e=i.div`
10
- width: ${i=>i.iconWidth?i.iconWidth:64}px;
11
- height: ${i=>i.iconHeight?i.iconHeight:64}px;
10
+ width: 64px;
11
+ height: 64px;
12
12
  display: flex;
13
13
  justify-content: center;
14
14
  align-items: end;
15
- `,d=i.div`
15
+ `,p=i.div`
16
16
  margin-top: ${i=>"SMALL"===i.size?8:16}px;
17
17
  text-align: center;
18
18
  max-width: 100%;
19
- `,n=i.div`
19
+ `,d=i.div`
20
20
  display: flex;
21
21
  margin-top: ${i=>"SMALL"===i.size?8:24}px;
22
22
  gap: 12px;
23
23
  width: 100%;
24
- `,p=i.div`
24
+ `,x=i.div`
25
25
  margin-top: 4px;
26
26
  max-width: 100%;
27
27
  text-align: center;
28
28
  max-width: 100%;
29
- `;export{n as ButtonContainer,t as StateComponentContainer,d as StateHeading,e as StateIcon,p as StateSubline};
29
+ `;export{d as ButtonContainer,t as StateComponentContainer,p as StateHeading,e as StateIcon,x as StateSubline};
@@ -16,7 +16,5 @@ export type StateModalComponentProps = {
16
16
  onClose?: () => void;
17
17
  zIndex?: number;
18
18
  headerImage?: string;
19
- iconWidth?: number;
20
- iconHeight?: number;
21
19
  };
22
20
  export declare const StateModalComponent: React.FC<React.PropsWithChildren<StateModalComponentProps>>;
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import{ComponentZindex as e}from"../../constants/zindex.js";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import i from"../../assets/icons/warningIcon.svg.js";import{StyledModal as r}from"../modals/styledModal.js";import{Spinner as c}from"../spinner/Spinner.js";import{StateInterface as a,StateComponent as d}from"../states/StateComponent.js";const l=l=>{const m=()=>p==a.SUCCESS?t(s,{}):p==a.WARNING?t(i,{}):p==a.ERROR?t(o,{}):p===a.LOADING?t(c,{size:"large"}):void 0,{states:p,heading:g,subline:h,icon:u=m(),isButtonEnabled:I,type:f,buttonText:C,onButtonClick:j,leadingIcon:O,width:b,zIndex:x,headerImage:S,iconHeight:y,iconWidth:A}=l,[B,E]=n(!0);return t(r,Object.assign({open:B,onClose:function(){l.onClose&&l.onClose(),E(!1)},closeOnOutsideClick:!(p===a.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:b},hideCrossButton:p===a.LOADING,zIndex:x||e.STATE_MODAL},{children:t(d,Object.assign({states:p,heading:g,subline:h,isButtonEnabled:I,leadingIcon:O,type:f,buttonText:C,onButtonClick:j,icon:u,width:b||400,headerImage:S,iconHeight:y,iconWidth:A},{children:l.children}))}))};export{l as StateModalComponent};
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import{ComponentZindex as e}from"../../constants/zindex.js";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import i from"../../assets/icons/warningIcon.svg.js";import{StyledModal as r}from"../modals/styledModal.js";import{Spinner as a}from"../spinner/Spinner.js";import{StateInterface as c,StateComponent as l}from"../states/StateComponent.js";const d=d=>{const m=()=>p==c.SUCCESS?t(s,{}):p==c.WARNING?t(i,{}):p==c.ERROR?t(o,{}):p===c.LOADING?t(a,{size:"large"}):void 0,{states:p,heading:u,subline:g,icon:I=m(),isButtonEnabled:f,type:C,buttonText:h,onButtonClick:j,leadingIcon:O,width:b,zIndex:x,headerImage:S}=d,[y,A]=n(!0);return t(r,Object.assign({open:y,onClose:function(){d.onClose&&d.onClose(),A(!1)},closeOnOutsideClick:!(p===c.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:b},hideCrossButton:p===c.LOADING,zIndex:x||e.STATE_MODAL},{children:t(l,Object.assign({states:p,heading:u,subline:g,isButtonEnabled:f,leadingIcon:O,type:C,buttonText:h,onButtonClick:j,icon:I,width:b||400,headerImage:S},{children:d.children}))}))};export{d as StateModalComponent};
@@ -3,7 +3,6 @@ export interface StepperProps {
3
3
  steps: EachStep[];
4
4
  activeStep: EachStep;
5
5
  onClickingEachStep: (step: EachStep) => void;
6
- hideHoverState?: boolean;
7
6
  }
8
7
  export interface EachStep {
9
8
  stepKey: string;
@@ -19,6 +18,5 @@ export interface SingleStepperProps {
19
18
  isActive: boolean;
20
19
  onClickingStep: (step: EachStep) => void;
21
20
  stepsCount: number;
22
- hideHoverState?: boolean;
23
21
  }
24
22
  export declare const Stepper: (stepperDetails: StepperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as s}from"../../constants/Theme.js";import i from"../../assets/icons/check.svg.js";import o from"../../assets/icons/errorInfo.svg.js";import{BodySecondary as n,BodyPrimary as r}from"../TypographyStyle.js";import{StepperContainer as c,SingleStepperChildContainer as a}from"./Stepper.styled.js";const l=t=>{const{steps:s,activeStep:i,onClickingEachStep:o,hideHoverState:n}=t;return e(c,{children:s.map(((t,r)=>e(p,{stepsCount:s.length,eachStep:t,onClickingStep:e=>{o(e)},isActive:(null==i?void 0:i.stepKey)==(null==t?void 0:t.stepKey),isLastElement:r==s.length-1,index:r,hideHoverState:n},r)))})},p=c=>{const{eachStep:l,isLastElement:p,index:d,isActive:m,onClickingStep:h,hideHoverState:v}=c,{stepName:g,isCompleted:S,isError:j,isInActive:u}=l,b=()=>m?"active":S?"completed":j?"error":u?"inactive":"default";return t(a,Object.assign({stepsCount:c.stepsCount,onClick:()=>{!u&&h(l)},selectedState:b(),isInActive:u||v},{children:[t("div",Object.assign({className:`hover-container ${u?"blocked":"pointer"} `},{children:[e("div",Object.assign({className:"badge"},{children:"completed"==b()?e(i,{height:16,width:16,color:s.content.positive}):"error"==b()?e(o,{height:16,width:16}):e(n,Object.assign({className:"badge-text"},{children:d+1}))})),e(r,Object.assign({className:"step-text",title:g},{children:g}))]})),e("div",{className:p?"":"horizontal-divider"})]}))};export{l as Stepper};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{COLORS as s}from"../../constants/Theme.js";import i from"../../assets/icons/check.svg.js";import n from"../../assets/icons/errorInfo.svg.js";import{BodySecondary as o,BodyPrimary as c}from"../TypographyStyle.js";import{StepperContainer as r,SingleStepperChildContainer as a}from"./Stepper.styled.js";const l=t=>{const{steps:s,activeStep:i,onClickingEachStep:n}=t;return e(r,{children:s.map(((t,o)=>e(p,{stepsCount:s.length,eachStep:t,onClickingStep:e=>{n(e)},isActive:(null==i?void 0:i.stepKey)==(null==t?void 0:t.stepKey),isLastElement:o==s.length-1,index:o},o)))})},p=r=>{const{eachStep:l,isLastElement:p,index:d,isActive:m,onClickingStep:h}=r,{stepName:g,isCompleted:v,isError:j,isInActive:u}=l,S=()=>m?"active":v?"completed":j?"error":u?"inactive":"default";return t(a,Object.assign({stepsCount:r.stepsCount,onClick:()=>{!u&&h(l)},selectedState:S()},{children:[t("div",Object.assign({className:`hover-container ${u?"blocked":"pointer"} `},{children:[e("div",Object.assign({className:"badge"},{children:"completed"==S()?e(i,{height:16,width:16,color:s.content.positive}):"error"==S()?e(n,{height:16,width:16}):e(o,Object.assign({className:"badge-text"},{children:d+1}))})),e(c,Object.assign({className:"step-text",title:g},{children:g}))]})),e("div",{className:p?"":"horizontal-divider"})]}))};export{l as Stepper};
@@ -3,6 +3,5 @@ export declare const StepperContainer: import("styled-components").StyledCompone
3
3
  export declare const SingleStepperChildContainer: import("styled-components").StyledComponent<"div", any, {
4
4
  selectedState: StepperStates;
5
5
  stepsCount: number;
6
- isInActive?: boolean | undefined;
7
6
  }, never>;
8
7
  export declare const WorkingStepperContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,10 +1,10 @@
1
- import e from"styled-components";import{getTheme as t}from"./themes.js";const i=e.div`
1
+ import e from"styled-components";import{getTheme as t}from"./themes.js";const o=e.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  justify-content: center;
5
5
  align-items: center;
6
6
  gap: 16px;
7
- `,o=e.div`
7
+ `,i=e.div`
8
8
  display: flex;
9
9
  flex-direction: row;
10
10
  justify-content: center;
@@ -26,9 +26,9 @@ import e from"styled-components";import{getTheme as t}from"./themes.js";const i=
26
26
  align-items: center;
27
27
  gap: 8px;
28
28
  &:hover {
29
- padding: ${e=>e.isInActive?void 0:"6px 8px 6px 6px"};
30
- background: ${e=>e.isInActive?void 0:"#f0f0f0"};
31
- border-radius: ${e=>e.isInActive?void 0:"30px"};
29
+ padding: 6px 8px 6px 6px;
30
+ background: #f0f0f0;
31
+ border-radius: 30px;
32
32
  }
33
33
  }
34
34
  .badge {
@@ -80,4 +80,4 @@ import e from"styled-components";import{getTheme as t}from"./themes.js";const i=
80
80
  align-items: center;
81
81
  overflow-y: auto;
82
82
  }
83
- `;export{o as SingleStepperChildContainer,i as StepperContainer};
83
+ `;export{i as SingleStepperChildContainer,o as StepperContainer};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useCallback as s}from"react";import{DEFAULT_THEME as n}from"../../constants/Theme.js";import{BodyCaption as l}from"../TypographyStyle.js";import{TabHeader as a,EmptyTab as i,RightComponent as c,TabItem as d,TabItemText as b,TrailingNumberContainer as m}from"./Tabs.styles.js";const p=s=>{var l,d;const{tabs:b,initialTab:m,onTabSelected:p,TabItemStyledProps:g,selectedTab:x,extendedBorder:y,rightComponent:T,size:C="default",isSquared:S=!1,containerStyles:h}=s,[j,f]=o(m||b[0].key),{colorsV2:q}=n;r((()=>{x&&f(x)}),[x]);const k=s.backgroundColor,I=null!==(l=s.selectedTextColor)&&void 0!==l?l:q.background.brand,O=null!==(d=s.textColor)&&void 0!==d?d:q.content.secondary;return e(a,Object.assign({style:null!=h?h:{},bgColor:k},{children:[b.map(((e,o)=>t(u,{hasEqualSpacing:s.hasEqualSpacing,selectedTextColor:I,textColor:O,tab:e,currentTab:j,TabItemStyledProps:g,IconComponent:e.icon,size:C,setCurrentTab:e=>{p(e),f(e)},isSquared:S,isFirstlement:0==o,isLastElement:o==b.length-1},e.key))),y&&t(i,{}),t(c,{children:T})]}))},u=o=>{const{tab:r,currentTab:a,setCurrentTab:i,TabItemStyledProps:c,IconComponent:p,size:u="default",isSquared:g=!1,isFirstlement:x,isLastElement:y}=o,T=r.key===a,{colorsV2:C}=n,S=s((()=>Object.assign(Object.assign({},c),{borderRadius:o.isSquared?x?"4px 0px 0px 4px":y?"0px 4px 4px 0px":"":""})),[]);return e(d,Object.assign({style:S(),selected:T,hasEqualSpacing:o.hasEqualSpacing,onClick:()=>i(o.tab.key),selectedTextColor:o.selectedTextColor,isSquared:g},{children:[p&&t(p,{selected:T?C.background.brand:C.content.secondary}),t(b,Object.assign({style:"small"===u?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:o.textColor,selectedTextColor:o.selectedTextColor,selected:T},{children:r.title})),void 0!==r.trailingNumber&&null!==r.trailingNumber&&t(m,Object.assign({selected:T},{children:t(l,Object.assign({color:C.content.primaryInverse},{children:r.trailingNumber}))}))]}))};p.displayName="Tabs",u.displayName="TabItemComponent";export{u as TabItemComponent,p as Tabs};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useCallback as s}from"react";import{DEFAULT_THEME as n}from"../../constants/Theme.js";import{BodyCaption as a}from"../TypographyStyle.js";import{TabHeader as l,EmptyTab as i,RightComponent as c,TabItem as d,TabItemText as b,TrailingNumberContainer as m}from"./Tabs.styles.js";const p=s=>{var a,d;const{tabs:b,initialTab:m,onTabSelected:p,TabItemStyledProps:g,selectedTab:x,extendedBorder:T,rightComponent:y,size:C="default",isSquared:S=!1}=s,[h,j]=o(m||b[0].key),{colorsV2:f}=n;r((()=>{x&&j(x)}),[x]);const q=s.backgroundColor,k=null!==(a=s.selectedTextColor)&&void 0!==a?a:f.background.brand,I=null!==(d=s.textColor)&&void 0!==d?d:f.content.secondary;return e(l,Object.assign({bgColor:q},{children:[b.map(((e,o)=>t(u,{hasEqualSpacing:s.hasEqualSpacing,selectedTextColor:k,textColor:I,tab:e,currentTab:h,TabItemStyledProps:g,IconComponent:e.icon,size:C,setCurrentTab:e=>{p(e),j(e)},isSquared:S,isFirstlement:0==o,isLastElement:o==b.length-1},e.key))),T&&t(i,{}),t(c,{children:y})]}))},u=o=>{const{tab:r,currentTab:l,setCurrentTab:i,TabItemStyledProps:c,IconComponent:p,size:u="default",isSquared:g=!1,isFirstlement:x,isLastElement:T}=o,y=r.key===l,{colorsV2:C}=n,S=s((()=>Object.assign(Object.assign({},c),{borderRadius:o.isSquared?x?"4px 0px 0px 4px":T?"0px 4px 4px 0px":"":""})),[]);return e(d,Object.assign({style:S(),selected:y,hasEqualSpacing:o.hasEqualSpacing,onClick:()=>i(o.tab.key),selectedTextColor:o.selectedTextColor,isSquared:g},{children:[p&&t(p,{selected:y?C.background.brand:C.content.secondary}),t(b,Object.assign({style:"small"===u?{fontSize:14,fontStyle:"normal",fontWeight:600}:void 0,textColor:o.textColor,selectedTextColor:o.selectedTextColor,selected:y},{children:r.title})),void 0!==r.trailingNumber&&null!==r.trailingNumber&&t(m,Object.assign({selected:y},{children:t(a,Object.assign({color:C.content.primaryInverse},{children:r.trailingNumber}))}))]}))};p.displayName="Tabs",u.displayName="TabItemComponent";export{u as TabItemComponent,p as Tabs};
@@ -36,7 +36,6 @@ export interface TabViewHeaderProps {
36
36
  rightComponent?: JSX.Element;
37
37
  size?: 'small' | 'default';
38
38
  isSquared?: boolean;
39
- containerStyles?: React.CSSProperties;
40
39
  }
41
40
  export interface TabItemComponentProps {
42
41
  hasEqualSpacing?: boolean;
@@ -1,3 +1,4 @@
1
+ import 'pure-react-carousel/dist/react-carousel.es.css';
1
2
  import { VariableListInterfaceV2 } from "../add-variableV2/AddVariableV2";
2
3
  import { CarouselProduct } from "./modalElements/EditWhatsAppCarouselTemplateV2";
3
4
  import { WhatsAppCarouselTemplate, WhatsAppCarouselTemplateVariables } from "../template-preview/models/WhatsappCarouselTemplate";
@@ -53,4 +54,4 @@ export interface TemplateContextMapperProps {
53
54
  setFileName?: (name: string) => void;
54
55
  hideDeviceContainerInPreview?: boolean;
55
56
  }
56
- export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, variableListForImage, showSampleValues, disableEditVariable, pod, extras, pickerConf, selectedCarouselProducts, disableEditExpiry, cardWidth, onDeleteSelectedProducts, fileName, setFileName, hideDeviceContainerInPreview, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
57
+ export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList: variableListFromProps, discountCode, setDiscountCode, onBackPress, enabledCustomText, variableListForImage, showSampleValues, disableEditVariable, pod, extras, pickerConf, selectedCarouselProducts, disableEditExpiry, cardWidth, onDeleteSelectedProducts, fileName, setFileName, hideDeviceContainerInPreview, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as l,Fragment as o}from"react/jsx-runtime";import{useEffect as t,useState as r,useRef as i,useMemo as a}from"react";import n from"../../utils/StringUtils.js";import{COLORS as s}from"../../constants/Theme.js";import{StyledModal as d}from"../modals/styledModal.js";import{CHANNEL_TYPE as c}from"../template-preview/models/Channels.js";import{TemplateModalContext as u}from"./context/templateModalContext.js";import p from"./modalElements/Footer.js";import m from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as v}from"./utils/convertPlaceholdersToBikDropdown.js";const h=h=>{let{selectedTemplate:C,closeDialog:b,showVariableMapping:g,channel:f,htmlContent:x,templateVariables:E,onTemplateSelect:I,globalPlaceholders:P,showOnlyContent:S,whatsappSpecificPickerMeta:y,zIndex:T,showVariableModal:w,variableList:M,discountCode:j,setDiscountCode:D,onBackPress:L,enabledCustomText:V,variableListForImage:k,showSampleValues:A,disableEditVariable:H,pod:F,extras:O,pickerConf:W,selectedCarouselProducts:N,disableEditExpiry:B,cardWidth:z,onDeleteSelectedProducts:R,fileName:$,setFileName:U,hideDeviceContainerInPreview:_}=h;var q,G,J,K,Q,X,Y,Z;t((()=>{ie(x)}),[x]);const ee=f===c.WHATSAPP&&"CAROUSEL"===(null===(G=null===(q=null==C?void 0:C.components)||void 0===q?void 0:q[1])||void 0===G?void 0:G.type),le=null==C?void 0:C.isProductCarouselType,[oe,te]=r(f===c.EMAIL||ee?"desktop":"mobile"),[re,ie]=r(x),[ae,ne]=r(!1),[se,de]=r([]),[ce,ue]=r({}),[pe,me]=r(C),[ve,he]=r([]),[Ce,be]=r(!1),[ge,fe]=r(null!=E?E:[]),[xe,Ee]=r(!1),[Ie,Pe]=r(ee?(null===(K=null===(J=null==pe?void 0:pe.mapping)||void 0===J?void 0:J.body)||void 0===K?void 0:K.length)?-1:0:-1),[Se,ye]=r([]),Te=i(null),[we,Me]=r(!1);t((()=>{N?ye(N):le&&ye([])}),[N]),t((()=>{var e;if(!Ce&&le&&(!N||0===ye.length)){const l=null===(e=null==pe?void 0:pe.components)||void 0===e?void 0:e[1].cards,o=[];null==l||l.forEach((e=>{var l;null===(l=null==e?void 0:e.components)||void 0===l||l.forEach((e=>{var l,t,r;"HEADER"===e.type&&o.push(null!==(r=null===(t=null===(l=e.example)||void 0===l?void 0:l.header_handle)||void 0===t?void 0:t[0])&&void 0!==r?r:"")}))})),he(o),be(!0)}}),[Ce]);const je=a((()=>v(P)),[P]);return e(u.Provider,Object.assign({value:{template:pe,setTemplate:me,device:oe,setDevice:te,display_content:re,setDisplayContent:ie,originalVariableList:ge,setOriginalVariableList:fe,isError:ae,setIsError:ne,channel:f,globalNormalizedPlaceholders:je,templateSelectionTriggered:xe,setTemplateSelectionTriggered:Ee,enabledCustomText:V,disableEditVariable:H,pod:F,extras:O,isWhatsappCarousel:ee,selectedCarouselIndex:Ie,setSelectedCarouselIndex:Pe,isProductCarouselType:le,templateErrorIndexes:ce,cardCount:ee?null===(X=null===(Q=C.components)||void 0===Q?void 0:Q[1].cards)||void 0===X?void 0:X.length:void 0,errorIndexes:se,setErrorIndexes:de,pickerConf:W,carouselProducts:Se,setCarouselProducts:ye,disableEditExpiry:B,cardWidth:z,cardImages:ve,onDeleteSelectedProducts:R,hideDeviceContainerInPreview:_,sliderRef:Te,isCarouselHovered:we,setIsCarouselHovered:Me}},{children:S?e(m,{channel:c.EMAIL,hideHeader:!0}):l(d,Object.assign({zIndex:T,centralContainerStyles:{width:ee?900:f===c.EMAIL&&g?1e3:800},open:!0,onClose:()=>{null==b||b()},headingTitle:null==pe?void 0:pe.label,headingSubtitle:f===c.WHATSAPP?`${n.capitaliseFirstLetterOfString(null!==(Y=null==pe?void 0:pe.category)&&void 0!==Y?Y:"")} • ${null!==(Z=null==pe?void 0:pe.templateCategory)&&void 0!==Z?Z:""}`:"",onBackPress:()=>{null==L||L()},modalHeaderStyles:{borderBottom:`1px solid ${s.stroke.primary}`}},{children:[e(m,{showSampleValues:A,showVariableMapping:g,channel:f,whatsappSpecificPickerMeta:y,showVariableModal:w,variableList:M,discountCode:j,setDiscountCode:D,variableListForImage:k&&(null==k?void 0:k.length)>0?k:M,fileName:$,setFileName:e=>{null==U||U(e)}}),I?e(p,{isWhatsappCarousel:null!=ee&&ee,onSelect:function(){var e;if((null==Se?void 0:Se.length)<1&&le)return void ne(!0);const l=null==I?void 0:I(pe,ge,null!=re?re:"",Se);ue(null!==(e=null==l?void 0:l.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==l?void 0:l.errorIndexes)||(null==l?void 0:l.error)?((null==l?void 0:l.errorIndexes)&&de(l.errorIndexes),(null==l?void 0:l.error)&&ne(!!(null==l?void 0:l.error))):Ee(!0)}}):e(o,{})]}))}))};export{h as TemplateContextMapper};
1
+ import{jsx as e,jsxs as l,Fragment as o}from"react/jsx-runtime";import{cloneDeep as t}from"lodash";import{useEffect as r,useState as i,useMemo as a}from"react";import s from"../../utils/StringUtils.js";import{COLORS as n}from"../../constants/Theme.js";import{StyledModal as d}from"../modals/styledModal.js";import{CHANNEL_TYPE as c}from"../template-preview/models/Channels.js";import{TemplateModalContext as u}from"./context/templateModalContext.js";import p from"./modalElements/Footer.js";import m from"./modalElements/TemplateSelectModalContent.js";import{convertPlaceholdersToBikDropdown as v}from"./utils/convertPlaceholdersToBikDropdown.js";const h=h=>{let{selectedTemplate:b,closeDialog:C,showVariableMapping:g,channel:P,htmlContent:f,templateVariables:x,onTemplateSelect:E,globalPlaceholders:S,showOnlyContent:I,whatsappSpecificPickerMeta:w,zIndex:y,showVariableModal:T,variableList:V,discountCode:L,setDiscountCode:k,onBackPress:M,enabledCustomText:j,variableListForImage:D,showSampleValues:A,disableEditVariable:F,pod:O,extras:W,pickerConf:H,selectedCarouselProducts:N,disableEditExpiry:B,cardWidth:z,onDeleteSelectedProducts:$,fileName:R,setFileName:U,hideDeviceContainerInPreview:_}=h;var q,G,J,K,Q,X;r((()=>{ie(f)}),[f]);const Y=P===c.WHATSAPP&&"CAROUSEL"===(null===(G=null===(q=null==b?void 0:b.components)||void 0===q?void 0:q[1])||void 0===G?void 0:G.type),Z=null==b?void 0:b.isProductCarouselType,[ee,le]=i(P===c.EMAIL||Y?"desktop":"mobile"),[oe,te]=i(!1),[re,ie]=i(f),[ae,se]=i(!1),[ne,de]=i([]),[ce,ue]=i({}),[pe,me]=i(b),[ve,he]=i([]),[be,Ce]=i(null),[ge,Pe]=i(!1),[fe,xe]=i(null!=x?x:[]),[Ee,Se]=i(!1),[Ie,we]=i(-1),[ye,Te]=i([]),[Ve,Le]=i(t(V));r((()=>{N?Te(N):Z&&Te([])}),[N]),r((()=>{var e;if(!ge&&Z&&(!N||0===Te.length)){const l=null===(e=null==pe?void 0:pe.components)||void 0===e?void 0:e[1].cards,o=[];null==l||l.forEach((e=>{var l;null===(l=null==e?void 0:e.components)||void 0===l||l.forEach((e=>{var l,t,r;"HEADER"===e.type&&o.push(null!==(r=null===(t=null===(l=e.example)||void 0===l?void 0:l.header_handle)||void 0===t?void 0:t[0])&&void 0!==r?r:"")}))})),he(o),Pe(!0)}}),[ge]);const ke=a((()=>v(S)),[S]);return e(u.Provider,Object.assign({value:{variableList:Ve,setVariableList:Le,variableCallback:be,setVariableCallback:Ce,showVariablePicker:oe,setShowVariablePicker:te,template:pe,setTemplate:me,device:ee,setDevice:le,display_content:re,setDisplayContent:ie,originalVariableList:fe,setOriginalVariableList:xe,isError:ae,setIsError:se,channel:P,globalNormalizedPlaceholders:ke,templateSelectionTriggered:Ee,setTemplateSelectionTriggered:Se,enabledCustomText:j,disableEditVariable:F,pod:O,extras:W,isWhatsappCarousel:Y,selectedCarouselIndex:Ie,setSelectedCarouselIndex:we,isProductCarouselType:Z,templateErrorIndexes:ce,cardCount:Y?null===(K=null===(J=b.components)||void 0===J?void 0:J[1].cards)||void 0===K?void 0:K.length:void 0,errorIndexes:ne,setErrorIndexes:de,pickerConf:H,carouselProducts:ye,setCarouselProducts:Te,disableEditExpiry:B,cardWidth:z,cardImages:ve,onDeleteSelectedProducts:$,hideDeviceContainerInPreview:_}},{children:I?e(m,{variableListFromProps:V,channel:c.EMAIL,hideHeader:!0}):l(d,Object.assign({zIndex:y,centralContainerStyles:{width:Y?900:P===c.EMAIL&&g?1e3:800},open:!0,onClose:()=>{null==C||C()},headingTitle:null==pe?void 0:pe.label,headingSubtitle:P===c.WHATSAPP?`${s.capitaliseFirstLetterOfString(null!==(Q=null==pe?void 0:pe.category)&&void 0!==Q?Q:"")} • ${null!==(X=null==pe?void 0:pe.templateCategory)&&void 0!==X?X:""}`:"",onBackPress:()=>{null==M||M()},modalHeaderStyles:{borderBottom:`1px solid ${n.stroke.primary}`}},{children:[e(m,{variableListFromProps:V,showSampleValues:A,showVariableMapping:g,channel:P,whatsappSpecificPickerMeta:w,showVariableModal:T,discountCode:L,setDiscountCode:k,variableListForImage:D&&(null==D?void 0:D.length)>0?D:Ve,fileName:R,setFileName:e=>{null==U||U(e)}}),E?e(p,{isWhatsappCarousel:null!=Y&&Y,onSelect:function(){var e;if((null==ye?void 0:ye.length)<1&&Z)return void se(!0);const l=null==E?void 0:E(pe,fe,null!=re?re:"",ye);ue(null!==(e=null==l?void 0:l.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==l?void 0:l.errorIndexes)||(null==l?void 0:l.error)?((null==l?void 0:l.errorIndexes)&&de(l.errorIndexes),(null==l?void 0:l.error)&&se(!!(null==l?void 0:l.error))):Se(!0)}}):e(o,{})]}))}))};export{h as TemplateContextMapper};
@@ -1,5 +1,5 @@
1
- import React, { LegacyRef } from 'react';
2
- import Slider from 'react-slick';
1
+ import React from 'react';
2
+ import { VariableListInterfaceV2 } from "../../add-variableV2";
3
3
  import { CarouselProduct } from "../modalElements/EditWhatsAppCarouselTemplateV2";
4
4
  import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
5
5
  import { EmailTemplateType } from "../../template-preview/models/EmailTemplate";
@@ -9,6 +9,12 @@ import { WhatsAppCarouselTemplate, WhatsAppCarouselTemplateVariables } from "../
9
9
  import { ExtrasWhatsapp, WhatsAppTemplate, WhatsAppTemplateVariables } from "../../template-preview/models/WhatsAppTemplate";
10
10
  export type DEVICE_TYPES = 'desktop' | 'mobile';
11
11
  export declare const TemplateModalContext: React.Context<{
12
+ variableList: VariableListInterfaceV2[] | undefined;
13
+ setVariableList: React.Dispatch<React.SetStateAction<VariableListInterfaceV2[] | undefined>>;
14
+ variableCallback: any;
15
+ setVariableCallback: any;
16
+ showVariablePicker: boolean;
17
+ setShowVariablePicker: React.Dispatch<React.SetStateAction<boolean>>;
12
18
  device: DEVICE_TYPES;
13
19
  setDevice?: React.Dispatch<React.SetStateAction<DEVICE_TYPES>> | undefined;
14
20
  display_content: string | null;
@@ -53,11 +59,14 @@ export declare const TemplateModalContext: React.Context<{
53
59
  body?: number[] | undefined;
54
60
  buttons?: number[] | undefined;
55
61
  } | undefined;
56
- sliderRef?: LegacyRef<Slider> | undefined;
57
- isCarouselHovered?: boolean | undefined;
58
- setIsCarouselHovered?: ((value: boolean) => void) | undefined;
59
62
  }>;
60
63
  export declare const useTemplateModalContext: () => {
64
+ variableList: VariableListInterfaceV2[] | undefined;
65
+ setVariableList: React.Dispatch<React.SetStateAction<VariableListInterfaceV2[] | undefined>>;
66
+ variableCallback: any;
67
+ setVariableCallback: any;
68
+ showVariablePicker: boolean;
69
+ setShowVariablePicker: React.Dispatch<React.SetStateAction<boolean>>;
61
70
  device: DEVICE_TYPES;
62
71
  setDevice?: React.Dispatch<React.SetStateAction<DEVICE_TYPES>> | undefined;
63
72
  display_content: string | null;
@@ -102,7 +111,4 @@ export declare const useTemplateModalContext: () => {
102
111
  body?: number[] | undefined;
103
112
  buttons?: number[] | undefined;
104
113
  } | undefined;
105
- sliderRef?: LegacyRef<Slider> | undefined;
106
- isCarouselHovered?: boolean | undefined;
107
- setIsCarouselHovered?: ((value: boolean) => void) | undefined;
108
114
  };
@@ -1 +1 @@
1
- import e,{useContext as t}from"react";import{CHANNEL_TYPE as i}from"../../template-preview/models/Channels.js";const l=e.createContext({device:"desktop",templateSelectionTriggered:!1,display_content:null,originalVariableList:[],channel:i.EMAIL,template:null,isError:!1,enabledCustomText:!1,disableEditVariable:!1,disableEditExpiry:!1}),r=()=>t(l);export{l as TemplateModalContext,r as useTemplateModalContext};
1
+ import e,{useContext as a}from"react";import{CHANNEL_TYPE as l}from"../../template-preview/models/Channels.js";const i=e.createContext({variableList:[],setVariableList:()=>{},variableCallback:null,setVariableCallback:null,showVariablePicker:!1,setShowVariablePicker:()=>{},device:"desktop",templateSelectionTriggered:!1,display_content:null,originalVariableList:[],channel:l.EMAIL,template:null,isError:!1,enabledCustomText:!1,disableEditVariable:!1,disableEditExpiry:!1}),t=()=>a(i);export{i as TemplateModalContext,t as useTemplateModalContext};
@@ -9,4 +9,4 @@ export type AdditionalVariableProps = {
9
9
  * Takes the previous variable list and adds any custom variable given as prop.
10
10
  * E.g - Custom Text, Custom URL, Static Expiry
11
11
  */
12
- export declare const useAdditionalVariables: (props: AdditionalVariableProps) => VariableListInterfaceV2[] | undefined;
12
+ export declare const updateVariables: (props: AdditionalVariableProps) => VariableListInterfaceV2[] | undefined;
@@ -1 +1 @@
1
- const a=a=>{const{variableList:e,categoryDisplayName:i,variableDisplayName:r,variableValue:l}=a;return e?[...e,{description:i,displayName:i,orderId:1,variables:{variableDisplayName:{description:void 0,displayName:r,actualValue:l,variableType:"any",isAvailable:!0}}}].sort(((a,e)=>a.orderId-e.orderId)):e};export{a as useAdditionalVariables};
1
+ const a=a=>{const{variableList:e,categoryDisplayName:i,variableDisplayName:l,variableValue:r}=a;if(!e)return e;const s={description:i,displayName:i,orderId:1,variables:{[l]:{description:void 0,displayName:l,actualValue:r,variableType:"any",isAvailable:!0}}};return e.find((a=>a.displayName===i))||e.unshift(s),e};export{a as updateVariables};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{CheckBox as a}from"../../checkBox/CheckBox.js";import{TitleSmall as n}from"../../TypographyStyle.js";import{Input as s}from"../../input/Input.js";const c=c=>{const{backTrackMessage:o,setBackTrackMessage:l}=c,[p,m]=i(!!o);return e(r,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8,width:"300px",padding:"20px 0px"}},{children:[t(a,{isChecked:p,onValueChange:()=>{p&&l&&l(""),m(!p)}}),t(n,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),p&&t("div",Object.assign({style:{margin:10}},{children:t(s,{type:"multiline",placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{l&&l(e)},height:"120px",maxCharLimit:1024,value:o,noErrorHint:!0,validate:e=>[!0,""]})}))]})};export{c as BackTrackComponent};
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{CheckBox as a}from"../../checkBox/CheckBox.js";import{TitleSmall as n}from"../../TypographyStyle.js";import{Input as s}from"../../input/Input.js";const c=c=>{const{backTrackMessage:o,setBackTrackMessage:l}=c,[m,g]=i(!!o);return e(r,{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8,width:"300px"}},{children:[t(a,{isChecked:m,onValueChange:()=>{m&&l&&l(""),g(!m)}}),t(n,Object.assign({style:{marginLeft:8}},{children:"Prevent BackTracking"}))]})),m&&t("div",Object.assign({style:{margin:10}},{children:t(s,{type:"multiline",placeholder:"Enter your text here",labelText:"Message if user tries backtracking",onChangeText:e=>{l&&l(e)},height:"120px",maxCharLimit:1024,value:o,noErrorHint:!0,validate:e=>[!0,""]})}))]})};export{c as BackTrackComponent};
@@ -5,13 +5,13 @@ export interface BodyProps {
5
5
  showOnlyContent?: boolean;
6
6
  whatsappSpecificPickerMeta?: WhatsAppPickerMeta;
7
7
  showVariableModal?: boolean;
8
- variableList?: VariableListInterfaceV2[];
9
8
  variableListForImage?: VariableListInterfaceV2[];
10
9
  discountCode?: string;
11
10
  setDiscountCode?: (code: string) => void;
12
11
  showSampleValues?: boolean;
13
12
  fileName?: string;
14
13
  setFileName?: (name: string) => void;
14
+ variableListFromProps?: VariableListInterfaceV2[];
15
15
  }
16
16
  declare const Body: (props: BodyProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export default Body;
@@ -1,22 +1,18 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useRef as i}from"react";import a from"styled-components";import{CarouselPreview as l}from"../../carousel-preview/CarouselPreview.js";import n from"./EditWhatsAppCarouselTemplateV2.js";import{CHANNEL_TYPE as r}from"../../template-preview/models/Channels.js";import{BodySecondary as s}from"../../TypographyStyle.js";import{COLORS as p}from"../../../constants/Theme.js";import{useTemplateModalContext as d}from"../context/templateModalContext.js";import{BACKGROUND_PREVIEW_IMAGE as m}from"../utils/constants.js";import{getVariableNameForEmailByIndex as c}from"../utils/getVariableNameEmail.js";import{highlightFor as h}from"../utils/highlightFor.js";import u from"./DesktopPreview.js";import v from"./EditWhatsAppTemplateV2.js";import f from"./MobilePreview.js";import w from"./VariableConnectorsPanel.js";const g=a.div`
1
+ import{jsxs as e,jsx as o,Fragment as t}from"react/jsx-runtime";import"../../curtain/CurtainHelper.js";import{PickerType as i}from"../../variable-picker-v3/model.js";import{cloneDeep as a}from"lodash";import{useRef as l}from"react";import r from"styled-components";import{CarouselPreview as n}from"../../carousel-preview/CarouselPreview.js";import s from"./EditWhatsAppCarouselTemplateV2.js";import{CHANNEL_TYPE as p}from"../../template-preview/models/Channels.js";import{VariablePicker as d}from"../../variable-picker-v3/VariablePicker.js";import{COLORS as m}from"../../../constants/Theme.js";import{useTemplateModalContext as c}from"../context/templateModalContext.js";import{getVariableNameForEmailByIndex as h}from"../utils/getVariableNameEmail.js";import{highlightFor as u}from"../utils/highlightFor.js";import b from"./DesktopPreview.js";import v from"./EditWhatsAppTemplateV2.js";import f from"./MobilePreview.js";import w from"./VariableConnectorsPanel.js";const g=r.div`
2
2
  display: flex;
3
3
  // height: 100%;
4
- `,b=a.div`
5
- padding: 16px 14px;
6
- max-width: ${e=>e.channel===r.EMAIL?"400px":"450px"};
4
+ `,C=r.div`
5
+ max-width: 450px;
7
6
 
8
- height: ${e=>e.channel===r.WHATSAPP?"500px":"475px"};
7
+ height: ${e=>e.channel===p.WHATSAPP?"500px":"475px"};
9
8
  overflow-y: auto;
10
9
  padding-bottom: 24px;
11
- border-left: ${p.stroke.primary} 1px solid;
12
- border-top: ${e=>e.isWhatsappCarousel?`${p.stroke.primary} 1px solid`:void 0};
13
- ${e=>!e.showVariableMapping&&"width: 340px; height: 500px"};
14
- `,C=a.div`
10
+ border-left: ${m.stroke.primary} 1px solid;
11
+ border-top: ${e=>e.isWhatsappCarousel?`${m.stroke.primary} 1px solid`:void 0};
12
+ `,P=r.div`
15
13
  padding: ${e=>e.isWhatsappCarousel?void 0:e.showOnlyContent?"16px 14px":"16px 32px"};
16
14
  flex: 1;
17
15
  height: ${e=>e.isWhatsappCarousel||e.hideDeviceContainerInPreview?"500px":"475px"};
18
16
  overflow-y: auto;
19
- background-image: ${e=>e.hideDeviceContainerInPreview&&e.channel===r.WHATSAPP?`url(${m});`:"none"};
20
- display: ${e=>e.hideDeviceContainerInPreview&&e.channel===r.WHATSAPP?"flex":"initial"};
21
- align-items: flex-start;
22
- `,P=a=>{const{showVariableMapping:m,showOnlyContent:P,whatsappSpecificPickerMeta:x,showVariableModal:y,variableList:A,discountCode:S,setDiscountCode:W,variableListForImage:j,showSampleValues:M,fileName:T,setFileName:V}=a,I=i(),k=i(),{device:E,display_content:L,channel:$,template:D,setTemplate:F,isWhatsappCarousel:H,isProductCarouselType:_,hideDeviceContainerInPreview:O}=d();const N=e=>{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t};return e(g,{children:[t(C,Object.assign({showOnlyContent:P,showVariableMapping:m,isWhatsappCarousel:H,hideDeviceContainerInPreview:O,channel:$},{children:"mobile"===E?t(f,{ref:k,display_content:null!=L?L:"",channel:$,template:D,showSampleValues:M}):$===r.WHATSAPP&&H?t(l,{ref:I,channel:$,template:D,showSampleValues:M,isPreview:!1,showArrows:!0}):$!==r.MESSAGE?t(u,{ref:I,channel:$,display_content:null!=L?L:"",showSampleValues:M}):t(o,{})})),(_||m)&&t(b,Object.assign({channel:$,isWhatsappCarousel:H,showVariableMapping:!0},{children:$!==r.WHATSAPP?t(w,{onFocus:$===r.EMAIL?function(e){var t,o,i;const a=null===document||void 0===document?void 0:document.getElementById("mobile"===E?"template_html_mobile":"template_html_desktop"),l=c(e+1),n=$===r.EMAIL?null===(t=null==a?void 0:a.contentWindow)||void 0===t?void 0:t.document.getElementById(l):document.getElementById(l),s=N(n),d=null==n?void 0:n.offsetLeft;"desktop"===E?s&&I.current&&(null===(o=null==a?void 0:a.contentWindow)||void 0===o||o.scrollTo(null!=d?d:0,s),h(l,p.background.warning.light,2,$,E)):s&&k.current&&(null===(i=null==a?void 0:a.contentWindow)||void 0===i||i.scrollTo(null!=d?d:0,s),h(l,p.background.warning.light,2,$,E))}:void 0,showVariableModal:y,variableList:A,discountCode:S,setDiscountCode:W}):$===r.WHATSAPP&&H?t(n,{whatsappSpecificPickerMeta:x,template:D,showVariableModal:y,variableList:A,variableListForImage:j,discountCode:S,setDiscountCode:W}):t(v,{whatsappSpecificPickerMeta:x,template:D,onTemplateChange:e=>{null==F||F(e)},showVariableModal:y,variableList:A,variableListForImage:j,discountCode:S,setDiscountCode:W,fileName:T,setFileName:V})})),$===r.WHATSAPP&&!m&&!_&&t(b,{children:t(s,Object.assign({color:p.content.secondary,style:{fontStyle:"italic"}},{children:"Click on ‘Select template’ below to use it"}))})]})};export{P as default};
17
+ background-image: ${e=>e.hideDeviceContainerInPreview?"url('https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F341dba50-e84e-4457-b5b5-d9d8a0b95a73?alt=media&token=6fd32f23-8bb2-4980-bbee-bef39b38fd9f');":"none"};
18
+ `,k=r=>{const{showVariableMapping:k,showOnlyContent:y,whatsappSpecificPickerMeta:x,showVariableModal:j,discountCode:V,setDiscountCode:M,variableListForImage:S,showSampleValues:W,variableListFromProps:A}=r,E=l(),T=l(),{variableList:D,setVariableList:I,variableCallback:L,showVariablePicker:B,setShowVariablePicker:F,device:H,display_content:O,channel:$,template:_,setTemplate:G,isWhatsappCarousel:N,isProductCarouselType:q,hideDeviceContainerInPreview:z}=c();const J=e=>{let o=0;for(;e;)o+=e.offsetTop,e=e.offsetParent;return o};return e(g,{children:[o(P,Object.assign({showOnlyContent:y,showVariableMapping:k,isWhatsappCarousel:N,hideDeviceContainerInPreview:z},{children:"mobile"===H?o(f,{ref:T,display_content:null!=O?O:"",channel:$,template:_,showSampleValues:W}):$===p.WHATSAPP&&N?o(n,{ref:E,channel:$,template:_,showSampleValues:W,isPreview:!1}):$!==p.MESSAGE?o(b,{ref:E,channel:$,display_content:null!=O?O:"",showSampleValues:W}):o(t,{})})),(q||k)&&e(C,Object.assign({channel:$,isWhatsappCarousel:N},{children:[o("div",Object.assign({style:{height:"100%",width:428,display:B?"block":"none"}},{children:o(d,{hideHeaderCross:!0,showHeader:!0,showBackButton:!0,onBackButtonClick:()=>{I(a(A)),F(!1)},onSelect:e=>{L(e),I(a(A)),F(!1)},type:i.EMBEDDED,data:null!=D?D:[]},Math.random())})),o("div",Object.assign({style:{padding:"16px 14px",display:B?"none":"block"}},{children:$!==p.WHATSAPP?o(w,{onFocus:$===p.EMAIL?function(e){var o,t,i;const a=null===document||void 0===document?void 0:document.getElementById("mobile"===H?"template_html_mobile":"template_html_desktop"),l=h(e+1),r=$===p.EMAIL?null===(o=null==a?void 0:a.contentWindow)||void 0===o?void 0:o.document.getElementById(l):document.getElementById(l),n=J(r),s=null==r?void 0:r.offsetLeft;"desktop"===H?n&&E.current&&(null===(t=null==a?void 0:a.contentWindow)||void 0===t||t.scrollTo(null!=s?s:0,n),u(l,m.background.warning.light,2,$,H)):n&&T.current&&(null===(i=null==a?void 0:a.contentWindow)||void 0===i||i.scrollTo(null!=s?s:0,n),u(l,m.background.warning.light,2,$,H))}:void 0,showVariableModal:j,discountCode:V,setDiscountCode:M}):$===p.WHATSAPP&&N?o(s,{whatsappSpecificPickerMeta:x,template:_,showVariableModal:j,variableListForImage:S,discountCode:V,setDiscountCode:M}):o(v,{whatsappSpecificPickerMeta:x,template:_,onTemplateChange:e=>{null==G||G(e)},showVariableModal:j,variableListForImage:S,discountCode:V,setDiscountCode:M})}))]}))]})};export{k as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i from"styled-components";import{Spinner as p}from"../../spinner/Spinner.js";import{TemplatePreview as a}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as o}from"../../../constants/Theme.js";import"../../curtain/CurtainHelper.js";import"../../template-preview/models/TemplateMeta.js";import"../../template-preview/models/WhatsAppTemplate.js";import{CHANNEL_TYPE as s}from"../../template-preview/models/Channels.js";const m=i.div`
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i from"styled-components";import{Spinner as p}from"../../spinner/Spinner.js";import{TemplatePreview as a}from"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as o}from"../../../constants/Theme.js";import"../../curtain/CurtainHelper.js";import"../../variable-picker-v3/model.js";import"../../template-preview/models/TemplateMeta.js";import"../../template-preview/models/WhatsAppTemplate.js";import{CHANNEL_TYPE as m}from"../../template-preview/models/Channels.js";const s=i.div`
2
2
  background: ${o.surface.standard};
3
3
  border: 1px solid ${o.stroke.primary};
4
4
  border-radius: 8px;
@@ -17,4 +17,4 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import r from"react";import i
17
17
  height: 6px;
18
18
  background: #d9d9d9;
19
19
  border-radius: 3px;
20
- `,n=r.forwardRef(((r,i)=>{let{display_content:o,showSampleValues:n}=r;return e(m,Object.assign({ref:i},{children:[e(l,{children:[t(d,{}),t(d,{}),t(d,{})]}),t("div",{children:o?t(a,{showSampleValues:n,channel:s.EMAIL,hideHeader:!0,emailSpecificMeta:{emailDisplayContent:o,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_desktop",containerStyle:{height:441},templateContainerStyles:{height:"100%"}}}):t("div",Object.assign({style:{padding:20}},{children:t(p,{size:"small"})}))})]}))}));n.displayName="DesktopPreview";export{n as default};
20
+ `,n=r.forwardRef(((r,i)=>{let{display_content:o,showSampleValues:n}=r;return e(s,Object.assign({ref:i},{children:[e(l,{children:[t(d,{}),t(d,{}),t(d,{})]}),t("div",{children:o?t(a,{showSampleValues:n,channel:m.EMAIL,hideHeader:!0,emailSpecificMeta:{emailDisplayContent:o,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_desktop",containerStyle:{height:441},templateContainerStyles:{height:"100%"}}}):t("div",Object.assign({style:{padding:20}},{children:t(p,{size:"small"})}))})]}))}));n.displayName="DesktopPreview";export{n as default};
@@ -1,6 +1,4 @@
1
- import { VariableListInterfaceV2 } from "../../add-variableV2";
2
1
  export declare const DiscountCodeComponent: (props: {
3
2
  discountCode?: string | undefined;
4
3
  setDiscountCode?: ((code: string) => void) | undefined;
5
- variableList?: VariableListInterfaceV2[] | undefined;
6
4
  }) => import("react/jsx-runtime").JSX.Element;