@bikdotai/bik-component-library 0.0.781-beta.0 → 0.0.781

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 (387) hide show
  1. package/dist/cjs/assets/icons/Ai_event_generating.svg.js +1 -1
  2. package/dist/cjs/components/ProgressChecklist/MultiChecklistItem.d.ts +1 -29
  3. package/dist/cjs/components/ProgressChecklist/ProgressChecklist.d.ts +27 -1
  4. package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  6. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  7. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  8. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  9. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  10. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +2 -1
  11. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  12. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +2 -5
  13. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  14. package/dist/cjs/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  15. package/dist/cjs/components/QueryBuilder/constants/connector.d.ts +1 -1
  16. package/dist/cjs/components/QueryBuilder/constants/connector.js +1 -1
  17. package/dist/cjs/components/QueryBuilder/constants/connectorPosition.js +1 -1
  18. package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.d.ts +1 -1
  19. package/dist/cjs/components/QueryBuilder/helpers/Connector.helper.js +1 -1
  20. package/dist/cjs/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +1 -1
  21. package/dist/cjs/components/QueryBuilder/helpers/SegmentValidator.d.ts +15 -3
  22. package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.d.ts +22 -2
  23. package/dist/cjs/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
  24. package/dist/cjs/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +1 -1
  25. package/dist/cjs/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
  26. package/dist/cjs/components/QueryBuilder/types/index.d.ts +1 -2
  27. package/dist/cjs/components/SearchFilter/components/DatePickerButton.d.ts +1 -1
  28. package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.d.ts +1 -1
  29. package/dist/cjs/components/SearchFilter/components/SearchFilterItem.d.ts +1 -1
  30. package/dist/cjs/components/SearchFilter/types/SearchFilter.type.d.ts +1 -1
  31. package/dist/cjs/components/WhatsAppTextEditor/AIRephraseButton.d.ts +1 -4
  32. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +1 -4
  33. package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +4 -1
  34. package/dist/cjs/components/WhatsAppTextEditor/ai/actionRegistry.d.ts +1 -2
  35. package/dist/cjs/components/accordion/Accordion.d.ts +35 -2
  36. package/dist/cjs/components/accordion/Accordion.style.d.ts +1 -1
  37. package/dist/cjs/components/analytics-card/AnalyticsCard.d.ts +1 -1
  38. package/dist/cjs/components/analytics-card/AnalyticsCard.styled.d.ts +1 -1
  39. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +17 -1
  40. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +1 -1
  41. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +1 -1
  42. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  43. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  44. package/dist/cjs/components/avatar/Avatar.js +1 -1
  45. package/dist/cjs/components/bik-layout/BikSidebar.d.ts +1 -1
  46. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  47. package/dist/cjs/components/bik-layout/SidebarPopup.d.ts +1 -1
  48. package/dist/cjs/components/bik-layout/SidebarSkeleton.d.ts +1 -1
  49. package/dist/cjs/components/bik-layout/SidebarStyles.d.ts +1 -1
  50. package/dist/cjs/components/bik-layout/SimpleSidebar.d.ts +27 -1
  51. package/dist/cjs/components/floating-input-dropdown/FloatingInputDropdown.d.ts +1 -1
  52. package/dist/cjs/components/image-cropper/BikImageCropper.d.ts +6 -1
  53. package/dist/cjs/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -1
  54. package/dist/cjs/components/input/ChipInput.js +1 -1
  55. package/dist/cjs/components/input/ChipInput.styled.d.ts +66 -6
  56. package/dist/cjs/components/input/ChipInput.styled.js +1 -1
  57. package/dist/cjs/components/input/Input-helper.d.ts +1 -1
  58. package/dist/cjs/components/input/Input.d.ts +71 -1
  59. package/dist/cjs/components/input/Input.styled.d.ts +1 -1
  60. package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +1 -1
  61. package/dist/cjs/components/list-item/ListItem.d.ts +17 -1
  62. package/dist/cjs/components/list-item/ListItem.styled.d.ts +1 -1
  63. package/dist/cjs/components/list-item/themes.d.ts +1 -1
  64. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -2
  65. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  66. package/dist/cjs/components/multi-level-dropdown/MenuItem.d.ts +1 -2
  67. package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
  68. package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
  69. package/dist/cjs/components/multi-level-dropdown/type.d.ts +1 -2
  70. package/dist/cjs/components/product-picker-v2/ProductPickerTag.d.ts +2 -2
  71. package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +3 -3
  72. package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +4 -3
  73. package/dist/cjs/components/product-picker-v2/index.d.ts +1 -1
  74. package/dist/cjs/components/product-picker-v2/modal.d.ts +58 -2
  75. package/dist/cjs/components/product-picker-v2/product.d.ts +3 -2
  76. package/dist/cjs/components/product-picker-v2/productInfoOverlay.d.ts +2 -1
  77. package/dist/cjs/components/product-picker-v2/productScreen.d.ts +3 -3
  78. package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
  79. package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +4 -3
  80. package/dist/cjs/components/product-picker-v2/reducers.d.ts +1 -1
  81. package/dist/cjs/components/product-picker-v2/reducers.js +1 -1
  82. package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +4 -3
  83. package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +4 -3
  84. package/dist/cjs/components/product-picker-v2/type.d.ts +0 -65
  85. package/dist/cjs/components/product-picker-v2/utility.d.ts +3 -3
  86. package/dist/cjs/components/product-picker-v2/utility.js +1 -1
  87. package/dist/cjs/components/product-picker-v2/variant.d.ts +12 -2
  88. package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +3 -2
  89. package/dist/cjs/components/sample-button/SampleButton.d.ts +16 -1
  90. package/dist/cjs/components/sample-button/SampleButton.styled.d.ts +1 -1
  91. package/dist/cjs/components/sample-button/themes.d.ts +1 -1
  92. package/dist/cjs/components/searchBar/searchBar.d.ts +1 -1
  93. package/dist/cjs/components/slider/slider.js +1 -1
  94. package/dist/cjs/components/stepper/Stepper.d.ts +17 -1
  95. package/dist/cjs/components/stepper/Stepper.styled.d.ts +1 -1
  96. package/dist/cjs/components/stepper/StepperService.d.ts +1 -1
  97. package/dist/cjs/components/stepper/themes.d.ts +1 -1
  98. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  99. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +9 -9
  100. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  101. package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +7 -7
  102. package/dist/cjs/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
  103. package/dist/cjs/components/template-context-mapper/helpers/WebpushTemplateHelper.d.ts +4 -6
  104. package/dist/cjs/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
  105. package/dist/cjs/components/template-context-mapper/modalElements/Body.d.ts +2 -2
  106. package/dist/cjs/components/template-context-mapper/modalElements/Body.js +10 -10
  107. package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +7 -7
  108. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.d.ts +3 -3
  109. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  110. package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.d.ts +2 -2
  111. package/dist/cjs/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  112. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -3
  113. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  114. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +5 -5
  115. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  116. package/dist/cjs/components/template-context-mapper/modalElements/Footer.js +4 -4
  117. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -1
  118. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +3 -3
  119. package/dist/cjs/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +1 -1
  120. package/dist/cjs/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +1 -1
  121. package/dist/cjs/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
  122. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -1
  123. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +4 -4
  124. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +4 -5
  125. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  126. package/dist/cjs/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
  127. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
  128. package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  129. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +1 -1
  130. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  131. package/dist/cjs/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.d.ts +2 -2
  132. package/dist/cjs/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +2 -2
  133. package/dist/cjs/components/template-context-mapper/utils/highlightFor.d.ts +1 -1
  134. package/dist/cjs/components/template-preview/models/TemplateMeta.d.ts +1 -1
  135. package/dist/cjs/components/template-preview/models/WhatsappCarouselTemplate.d.ts +2 -2
  136. package/dist/cjs/components/toaster/Toaster.styled.js +1 -1
  137. package/dist/cjs/components/variable-picker-v3/SubHeaderItems.js +1 -1
  138. package/dist/cjs/index.d.ts +0 -3
  139. package/dist/cjs/index.js +1 -1
  140. package/dist/esm/assets/icons/Ai_event_generating.svg.js +1 -1
  141. package/dist/esm/components/ProgressChecklist/MultiChecklistItem.d.ts +1 -29
  142. package/dist/esm/components/ProgressChecklist/ProgressChecklist.d.ts +27 -1
  143. package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
  144. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  145. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  146. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  147. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  148. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  149. package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.d.ts +2 -1
  150. package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +1 -1
  151. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.d.ts +2 -5
  152. package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
  153. package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
  154. package/dist/esm/components/QueryBuilder/constants/connector.d.ts +1 -1
  155. package/dist/esm/components/QueryBuilder/constants/connector.js +1 -1
  156. package/dist/esm/components/QueryBuilder/constants/connectorPosition.js +1 -1
  157. package/dist/esm/components/QueryBuilder/helpers/Connector.helper.d.ts +1 -1
  158. package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
  159. package/dist/esm/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +1 -1
  160. package/dist/esm/components/QueryBuilder/helpers/SegmentValidator.d.ts +15 -3
  161. package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +22 -2
  162. package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.js +1 -1
  163. package/dist/esm/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +1 -1
  164. package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +1 -1
  165. package/dist/esm/components/QueryBuilder/types/index.d.ts +1 -2
  166. package/dist/esm/components/SearchFilter/components/DatePickerButton.d.ts +1 -1
  167. package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.d.ts +1 -1
  168. package/dist/esm/components/SearchFilter/components/SearchFilterItem.d.ts +1 -1
  169. package/dist/esm/components/SearchFilter/types/SearchFilter.type.d.ts +1 -1
  170. package/dist/esm/components/WhatsAppTextEditor/AIRephraseButton.d.ts +1 -4
  171. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +1 -4
  172. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +4 -1
  173. package/dist/esm/components/WhatsAppTextEditor/ai/actionRegistry.d.ts +1 -2
  174. package/dist/esm/components/accordion/Accordion.d.ts +35 -2
  175. package/dist/esm/components/accordion/Accordion.style.d.ts +1 -1
  176. package/dist/esm/components/analytics-card/AnalyticsCard.d.ts +1 -1
  177. package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +1 -1
  178. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +17 -1
  179. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChipChannelFooter.d.ts +1 -1
  180. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +1 -1
  181. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  182. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
  183. package/dist/esm/components/avatar/Avatar.js +1 -1
  184. package/dist/esm/components/bik-layout/BikSidebar.d.ts +1 -1
  185. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  186. package/dist/esm/components/bik-layout/SidebarPopup.d.ts +1 -1
  187. package/dist/esm/components/bik-layout/SidebarSkeleton.d.ts +1 -1
  188. package/dist/esm/components/bik-layout/SidebarStyles.d.ts +1 -1
  189. package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +27 -1
  190. package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +1 -1
  191. package/dist/esm/components/image-cropper/BikImageCropper.d.ts +6 -1
  192. package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +1 -1
  193. package/dist/esm/components/input/ChipInput.js +1 -1
  194. package/dist/esm/components/input/ChipInput.styled.d.ts +66 -6
  195. package/dist/esm/components/input/ChipInput.styled.js +1 -1
  196. package/dist/esm/components/input/Input-helper.d.ts +1 -1
  197. package/dist/esm/components/input/Input.d.ts +71 -1
  198. package/dist/esm/components/input/Input.styled.d.ts +1 -1
  199. package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +1 -1
  200. package/dist/esm/components/list-item/ListItem.d.ts +17 -1
  201. package/dist/esm/components/list-item/ListItem.styled.d.ts +1 -1
  202. package/dist/esm/components/list-item/themes.d.ts +1 -1
  203. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -2
  204. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  205. package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +1 -2
  206. package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
  207. package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
  208. package/dist/esm/components/multi-level-dropdown/type.d.ts +1 -2
  209. package/dist/esm/components/product-picker-v2/ProductPickerTag.d.ts +2 -2
  210. package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +3 -3
  211. package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +4 -3
  212. package/dist/esm/components/product-picker-v2/index.d.ts +1 -1
  213. package/dist/esm/components/product-picker-v2/modal.d.ts +58 -2
  214. package/dist/esm/components/product-picker-v2/product.d.ts +3 -2
  215. package/dist/esm/components/product-picker-v2/productInfoOverlay.d.ts +2 -1
  216. package/dist/esm/components/product-picker-v2/productScreen.d.ts +3 -3
  217. package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
  218. package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +4 -3
  219. package/dist/esm/components/product-picker-v2/reducers.d.ts +1 -1
  220. package/dist/esm/components/product-picker-v2/reducers.js +1 -1
  221. package/dist/esm/components/product-picker-v2/searchScreen.d.ts +4 -3
  222. package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +4 -3
  223. package/dist/esm/components/product-picker-v2/type.d.ts +0 -65
  224. package/dist/esm/components/product-picker-v2/utility.d.ts +3 -3
  225. package/dist/esm/components/product-picker-v2/utility.js +1 -1
  226. package/dist/esm/components/product-picker-v2/variant.d.ts +12 -2
  227. package/dist/esm/components/product-picker-v2/variantComponents.d.ts +3 -2
  228. package/dist/esm/components/sample-button/SampleButton.d.ts +16 -1
  229. package/dist/esm/components/sample-button/SampleButton.styled.d.ts +1 -1
  230. package/dist/esm/components/sample-button/themes.d.ts +1 -1
  231. package/dist/esm/components/searchBar/searchBar.d.ts +1 -1
  232. package/dist/esm/components/slider/slider.js +1 -1
  233. package/dist/esm/components/stepper/Stepper.d.ts +17 -1
  234. package/dist/esm/components/stepper/Stepper.styled.d.ts +1 -1
  235. package/dist/esm/components/stepper/StepperService.d.ts +1 -1
  236. package/dist/esm/components/stepper/themes.d.ts +1 -1
  237. package/dist/esm/components/tag/Tag.styled.js +1 -1
  238. package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +9 -9
  239. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  240. package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +7 -7
  241. package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.d.ts +1 -1
  242. package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.d.ts +4 -6
  243. package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
  244. package/dist/esm/components/template-context-mapper/modalElements/Body.d.ts +2 -2
  245. package/dist/esm/components/template-context-mapper/modalElements/Body.js +10 -10
  246. package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +6 -6
  247. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.d.ts +3 -3
  248. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  249. package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.d.ts +2 -2
  250. package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
  251. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +14 -3
  252. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
  253. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.d.ts +5 -5
  254. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +1 -1
  255. package/dist/esm/components/template-context-mapper/modalElements/Footer.js +4 -4
  256. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.d.ts +1 -1
  257. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +5 -5
  258. package/dist/esm/components/template-context-mapper/modalElements/QualityWarningModal.d.ts +1 -1
  259. package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +1 -1
  260. package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.d.ts +2 -2
  261. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +1 -1
  262. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
  263. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.d.ts +4 -5
  264. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
  265. package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.d.ts +1 -1
  266. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.d.ts +2 -2
  267. package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
  268. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +1 -1
  269. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
  270. package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.d.ts +2 -2
  271. package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +2 -2
  272. package/dist/esm/components/template-context-mapper/utils/highlightFor.d.ts +1 -1
  273. package/dist/esm/components/template-preview/models/TemplateMeta.d.ts +1 -1
  274. package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +2 -2
  275. package/dist/esm/components/toaster/Toaster.styled.js +1 -1
  276. package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
  277. package/dist/esm/index.d.ts +0 -3
  278. package/dist/esm/index.js +1 -1
  279. package/package.json +8 -8
  280. package/dist/cjs/components/QueryBuilder/types/QueryBuilderEnum.type.d.ts +0 -21
  281. package/dist/cjs/components/QueryBuilder/types/QueryBuilderEnum.type.js +0 -1
  282. package/dist/cjs/components/accordion/Accordion.model.d.ts +0 -35
  283. package/dist/cjs/components/analytics-card/AnalyticsCard.model.d.ts +0 -1
  284. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsChip.model.d.ts +0 -18
  285. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LazyCharts.d.ts +0 -2
  286. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LazyCharts.js +0 -1
  287. package/dist/cjs/components/bik-layout/Sidebar.model.d.ts +0 -27
  288. package/dist/cjs/components/image-cropper/BikImageCropper.model.d.ts +0 -6
  289. package/dist/cjs/components/input/Input.model.d.ts +0 -72
  290. package/dist/cjs/components/list-item/List.model.d.ts +0 -18
  291. package/dist/cjs/components/sample-button/SampleButton.model.d.ts +0 -17
  292. package/dist/cjs/components/stepper/Stepper.model.d.ts +0 -17
  293. package/dist/cjs/components/template-context-mapper/modalElements/modal.d.ts +0 -13
  294. package/dist/cjs/firebase/environment.d.ts +0 -58
  295. package/dist/cjs/firebase/environment.js +0 -1
  296. package/dist/cjs/firebase/firebaseUserFetcher.d.ts +0 -34
  297. package/dist/cjs/firebase/firebaseUserFetcher.js +0 -1
  298. package/dist/cjs/firebase/index.d.ts +0 -7
  299. package/dist/cjs/firebase/lazyFirebaseApp.d.ts +0 -22
  300. package/dist/cjs/firebase/lazyFirebaseApp.js +0 -1
  301. package/dist/cjs/firebase/lazyFirebaseMethods.d.ts +0 -589
  302. package/dist/cjs/firebase/lazyFirebaseMethods.js +0 -1
  303. package/dist/cjs/firebase/lazyFirestore.d.ts +0 -6
  304. package/dist/cjs/firebase/lazyFirestore.js +0 -1
  305. package/dist/cjs/firebase/lazyFirestoreLite.d.ts +0 -6
  306. package/dist/cjs/firebase/lazyFirestoreLite.js +0 -1
  307. package/dist/cjs/firebase/lazyStorage.d.ts +0 -5
  308. package/dist/cjs/firebase/lazyStorage.js +0 -1
  309. package/dist/cjs/request-executor/executor.d.ts +0 -99
  310. package/dist/cjs/request-executor/executor.js +0 -1
  311. package/dist/cjs/request-executor/index.d.ts +0 -2
  312. package/dist/cjs/request-executor/model.d.ts +0 -14
  313. package/dist/cjs/utils/logging/ErrorConstructor/ApiError.d.ts +0 -3
  314. package/dist/cjs/utils/logging/ErrorConstructor/ApiError.js +0 -1
  315. package/dist/cjs/utils/logging/ErrorConstructor/BroadcastFlowError.d.ts +0 -4
  316. package/dist/cjs/utils/logging/ErrorConstructor/BroadcastFlowError.js +0 -1
  317. package/dist/cjs/utils/logging/ErrorConstructor/CohortError.d.ts +0 -4
  318. package/dist/cjs/utils/logging/ErrorConstructor/CohortError.js +0 -1
  319. package/dist/cjs/utils/logging/ErrorConstructor/CustomError.d.ts +0 -3
  320. package/dist/cjs/utils/logging/ErrorConstructor/CustomError.js +0 -1
  321. package/dist/cjs/utils/logging/ErrorConstructor/ExcelUploadError.d.ts +0 -3
  322. package/dist/cjs/utils/logging/ErrorConstructor/ExcelUploadError.js +0 -1
  323. package/dist/cjs/utils/logging/ErrorConstructor/FirebaseCallError.d.ts +0 -3
  324. package/dist/cjs/utils/logging/ErrorConstructor/FirebaseCallError.js +0 -1
  325. package/dist/cjs/utils/logging/ErrorConstructor/FirebaseSubscriptionError.d.ts +0 -3
  326. package/dist/cjs/utils/logging/ErrorConstructor/FirebaseSubscriptionError.js +0 -1
  327. package/dist/cjs/utils/logging/ErrorConstructor/RechargeFailure.d.ts +0 -3
  328. package/dist/cjs/utils/logging/ErrorConstructor/RechargeFailure.js +0 -1
  329. package/dist/cjs/utils/logging/ErrorConstructor/WhatsappIntegrationError.d.ts +0 -3
  330. package/dist/cjs/utils/logging/ErrorConstructor/WhatsappIntegrationError.js +0 -1
  331. package/dist/cjs/utils/logging/Logger.d.ts +0 -24
  332. package/dist/cjs/utils/logging/Logger.js +0 -1
  333. package/dist/cjs/utils/logging/index.d.ts +0 -10
  334. package/dist/esm/components/QueryBuilder/types/QueryBuilderEnum.type.d.ts +0 -21
  335. package/dist/esm/components/QueryBuilder/types/QueryBuilderEnum.type.js +0 -1
  336. package/dist/esm/components/accordion/Accordion.model.d.ts +0 -35
  337. package/dist/esm/components/analytics-card/AnalyticsCard.model.d.ts +0 -1
  338. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.model.d.ts +0 -18
  339. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LazyCharts.d.ts +0 -2
  340. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LazyCharts.js +0 -1
  341. package/dist/esm/components/bik-layout/Sidebar.model.d.ts +0 -27
  342. package/dist/esm/components/image-cropper/BikImageCropper.model.d.ts +0 -6
  343. package/dist/esm/components/input/Input.model.d.ts +0 -72
  344. package/dist/esm/components/list-item/List.model.d.ts +0 -18
  345. package/dist/esm/components/sample-button/SampleButton.model.d.ts +0 -17
  346. package/dist/esm/components/stepper/Stepper.model.d.ts +0 -17
  347. package/dist/esm/components/template-context-mapper/modalElements/modal.d.ts +0 -13
  348. package/dist/esm/firebase/environment.d.ts +0 -58
  349. package/dist/esm/firebase/environment.js +0 -1
  350. package/dist/esm/firebase/firebaseUserFetcher.d.ts +0 -34
  351. package/dist/esm/firebase/firebaseUserFetcher.js +0 -1
  352. package/dist/esm/firebase/index.d.ts +0 -7
  353. package/dist/esm/firebase/lazyFirebaseApp.d.ts +0 -22
  354. package/dist/esm/firebase/lazyFirebaseApp.js +0 -1
  355. package/dist/esm/firebase/lazyFirebaseMethods.d.ts +0 -589
  356. package/dist/esm/firebase/lazyFirebaseMethods.js +0 -1
  357. package/dist/esm/firebase/lazyFirestore.d.ts +0 -6
  358. package/dist/esm/firebase/lazyFirestore.js +0 -1
  359. package/dist/esm/firebase/lazyFirestoreLite.d.ts +0 -6
  360. package/dist/esm/firebase/lazyFirestoreLite.js +0 -1
  361. package/dist/esm/firebase/lazyStorage.d.ts +0 -5
  362. package/dist/esm/firebase/lazyStorage.js +0 -1
  363. package/dist/esm/request-executor/executor.d.ts +0 -99
  364. package/dist/esm/request-executor/executor.js +0 -1
  365. package/dist/esm/request-executor/index.d.ts +0 -2
  366. package/dist/esm/request-executor/model.d.ts +0 -14
  367. package/dist/esm/utils/logging/ErrorConstructor/ApiError.d.ts +0 -3
  368. package/dist/esm/utils/logging/ErrorConstructor/ApiError.js +0 -1
  369. package/dist/esm/utils/logging/ErrorConstructor/BroadcastFlowError.d.ts +0 -4
  370. package/dist/esm/utils/logging/ErrorConstructor/BroadcastFlowError.js +0 -1
  371. package/dist/esm/utils/logging/ErrorConstructor/CohortError.d.ts +0 -4
  372. package/dist/esm/utils/logging/ErrorConstructor/CohortError.js +0 -1
  373. package/dist/esm/utils/logging/ErrorConstructor/CustomError.d.ts +0 -3
  374. package/dist/esm/utils/logging/ErrorConstructor/CustomError.js +0 -1
  375. package/dist/esm/utils/logging/ErrorConstructor/ExcelUploadError.d.ts +0 -3
  376. package/dist/esm/utils/logging/ErrorConstructor/ExcelUploadError.js +0 -1
  377. package/dist/esm/utils/logging/ErrorConstructor/FirebaseCallError.d.ts +0 -3
  378. package/dist/esm/utils/logging/ErrorConstructor/FirebaseCallError.js +0 -1
  379. package/dist/esm/utils/logging/ErrorConstructor/FirebaseSubscriptionError.d.ts +0 -3
  380. package/dist/esm/utils/logging/ErrorConstructor/FirebaseSubscriptionError.js +0 -1
  381. package/dist/esm/utils/logging/ErrorConstructor/RechargeFailure.d.ts +0 -3
  382. package/dist/esm/utils/logging/ErrorConstructor/RechargeFailure.js +0 -1
  383. package/dist/esm/utils/logging/ErrorConstructor/WhatsappIntegrationError.d.ts +0 -3
  384. package/dist/esm/utils/logging/ErrorConstructor/WhatsappIntegrationError.js +0 -1
  385. package/dist/esm/utils/logging/Logger.d.ts +0 -24
  386. package/dist/esm/utils/logging/Logger.js +0 -1
  387. package/dist/esm/utils/logging/index.d.ts +0 -10
@@ -1,7 +1,8 @@
1
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
1
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
2
  import React from 'react';
3
- import type { SelectedCollectionsActions } from './reducers';
4
- import { type FbStatusFetcherReturn, OUT_OF_STOCK_ACTION, type SelectedItems } from './type';
3
+ import { FbStatusFetcherReturn, SelectedItems } from '.';
4
+ import { SelectedCollectionsActions } from './reducers';
5
+ import { OUT_OF_STOCK_ACTION } from './type';
5
6
  interface RearrangeScreenInterface {
6
7
  selectedCollections: SelectedItems;
7
8
  selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { Collection, SearchedItems, SelectedItems } from './type';
2
+ import { Collection, SearchedItems, SelectedItems } from '.';
3
3
  export interface SelectedCollectionsActions {
4
4
  type: string;
5
5
  data: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/cloneDeep"),e=require("react");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=a(t);const d=e.createContext("");exports.CollectionIdContext=d,exports.collectionsReducer=function(t,e){let a={};switch(e.type){case"fetched":return a=Object.assign({},e.data),a;case"productsFetched":return a=Object.assign({},t),a[e.data.collectionId].products=e.data.products,a;case"paged":return a=Object.assign(Object.assign({},t),e.data),a;case"productsPaged":return a=Object.assign({},t),a[e.data.collectionId].products=Object.assign(Object.assign({},a[e.data.collectionId].products),e.data.products),a;case"searched":a=Object.assign({},t);for(const t in e.data)t in a||(a[t]=e.data[t]);return a;default:return{}}},exports.paginationReducer=function(t,e){let a={};switch(e.type){case"paginate":a=Object.assign({},t);for(const t in e.data)if(Object.prototype.hasOwnProperty.call(e.data,t)){const s=e.data[t];if(Object.prototype.hasOwnProperty.call(a,t)){const e=a[t];a[t]=Object.assign(Object.assign({},e),{products:Object.assign(Object.assign({},e.products),s.products)})}else a[t]=s}return a;case"update":return a=Object.assign({},t),a;case"set":return a=Object.assign(Object.assign({},t),e.data),a;case"filter":a={};for(const s in t)if(s in e.data){const d=Object.assign({},t[s]),c=e.data[s],o={};for(const t in d.products)if(t in c.products){const e=Object.assign({},d.products[t]),a=c.products[t],s={};for(const t in e.variants)t in a.variants&&(s[t]=Object.assign({},e.variants[t]));Object.keys(s).length>0&&(e.variants=s,o[t]=e)}Object.keys(o).length>0&&(d.products=o,a[s]=d)}return a;default:return t}},exports.searchReducer=function(t,e){let a={collections:{},products:{}};switch(e.type){case"set":return e.data;case"setProducts":return a=Object.assign({},t),a.products=e.data,a;default:return t}},exports.selectedColectionsReducer=function(t,e){var a,d,c,o,r,n,i,u,l,p,v;let O={},g="",b="",f="";switch(e.type){case"selected":return O=s.default(t),e.data.val.isSmartCollection&&(e.data.isRestricted&&(O={}),O.isCustom=!0),O[e.data.id]=e.data.val,O;case"unselected":return O=s.default(t),(null==O?void 0:O.isCustom)&&(O.isCustom=!1),delete O[e.data.id],O;case"productUnselected":return O=s.default(t),g=e.data.productId,b=e.data.collectionId,delete O[b].products[g],Object.keys(O[b].products).length||((null==O?void 0:O.isCustom)&&(O.isCustom=!1),delete O[b]),O;case"productSelected":return O=s.default(t),g=e.data.productId,b=e.data.collectionId,(null===(a=e.data.catalogOnlyData)||void 0===a?void 0:a.isSmartCollection)&&(e.data.isRestricted&&(O={}),O.isCustom=!0),(null==O?void 0:O[b])||(O[b]=e.data.catalogOnlyData,O[b].products={}),O[b].products[g]=e.data.product,O;case"variantSelected":return O=s.default(t),g=e.data.productId,b=e.data.collectionId,f=e.data.variantId,(null===(d=e.data.catalogOnlyData)||void 0===d?void 0:d.isSmartCollection)&&(e.data.isRestricted&&(O={}),O.isCustom=!0),(null==O?void 0:O[b])||(O[b]=e.data.catalogOnlyData,O[b].products={},O[b].products[g]=e.data.productOnlyData,O[b].products[g].variants={}),(null===(c=null==O?void 0:O[b])||void 0===c?void 0:c.products)||(O[b].products={}),(null===(r=null===(o=null==O?void 0:O[b])||void 0===o?void 0:o.products)||void 0===r?void 0:r[g])||(O[b].products[g]=e.data.productOnlyData,O[b].products[g].variants={}),O[b].products[g].variants||(O[b].products[g].variants={}),O[b].products[g].variants[f]=e.data.variant,O;case"variantUnselected":return O=s.default(t),g=e.data.productId,b=e.data.collectionId,f=e.data.variantId,(null===(i=null===(n=O[b].products[g])||void 0===n?void 0:n.variants)||void 0===i?void 0:i[f])&&delete O[b].products[g].variants[f],Object.keys(null!==(p=null===(l=null===(u=O[b].products)||void 0===u?void 0:u[g])||void 0===l?void 0:l.variants)&&void 0!==p?p:{}).length||(delete O[b].products[g],Object.keys(O[b].products).length||((null===(v=O[b])||void 0===v?void 0:v.isSmartCollection)&&(O.isCustom=!1),delete O[b])),O;case"update":return O=Object.assign({},t),O;case"reset":return{};default:return t}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash");const e=require("react").createContext("");exports.CollectionIdContext=e,exports.collectionsReducer=function(t,e){let a={};switch(e.type){case"fetched":return a=Object.assign({},e.data),a;case"productsFetched":return a=Object.assign({},t),a[e.data.collectionId].products=e.data.products,a;case"paged":return a=Object.assign(Object.assign({},t),e.data),a;case"productsPaged":return a=Object.assign({},t),a[e.data.collectionId].products=Object.assign(Object.assign({},a[e.data.collectionId].products),e.data.products),a;case"searched":a=Object.assign({},t);for(const t in e.data)t in a||(a[t]=e.data[t]);return a;default:return{}}},exports.paginationReducer=function(t,e){let a={};switch(e.type){case"paginate":a=Object.assign({},t);for(const t in e.data)if(Object.prototype.hasOwnProperty.call(e.data,t)){const s=e.data[t];if(Object.prototype.hasOwnProperty.call(a,t)){const e=a[t];a[t]=Object.assign(Object.assign({},e),{products:Object.assign(Object.assign({},e.products),s.products)})}else a[t]=s}return a;case"update":return a=Object.assign({},t),a;case"set":return a=Object.assign(Object.assign({},t),e.data),a;case"filter":a={};for(const s in t)if(s in e.data){const c=Object.assign({},t[s]),d=e.data[s],o={};for(const t in c.products)if(t in d.products){const e=Object.assign({},c.products[t]),a=d.products[t],s={};for(const t in e.variants)t in a.variants&&(s[t]=Object.assign({},e.variants[t]));Object.keys(s).length>0&&(e.variants=s,o[t]=e)}Object.keys(o).length>0&&(c.products=o,a[s]=c)}return a;default:return t}},exports.searchReducer=function(t,e){let a={collections:{},products:{}};switch(e.type){case"set":return e.data;case"setProducts":return a=Object.assign({},t),a.products=e.data,a;default:return t}},exports.selectedColectionsReducer=function(e,a){var s,c,d,o,r,n,i,l,u,p,v;let O={},g="",b="",j="";switch(a.type){case"selected":return O=t.cloneDeep(e),a.data.val.isSmartCollection&&(a.data.isRestricted&&(O={}),O.isCustom=!0),O[a.data.id]=a.data.val,O;case"unselected":return O=t.cloneDeep(e),(null==O?void 0:O.isCustom)&&(O.isCustom=!1),delete O[a.data.id],O;case"productUnselected":return O=t.cloneDeep(e),g=a.data.productId,b=a.data.collectionId,delete O[b].products[g],Object.keys(O[b].products).length||((null==O?void 0:O.isCustom)&&(O.isCustom=!1),delete O[b]),O;case"productSelected":return O=t.cloneDeep(e),g=a.data.productId,b=a.data.collectionId,(null===(s=a.data.catalogOnlyData)||void 0===s?void 0:s.isSmartCollection)&&(a.data.isRestricted&&(O={}),O.isCustom=!0),(null==O?void 0:O[b])||(O[b]=a.data.catalogOnlyData,O[b].products={}),O[b].products[g]=a.data.product,O;case"variantSelected":return O=t.cloneDeep(e),g=a.data.productId,b=a.data.collectionId,j=a.data.variantId,(null===(c=a.data.catalogOnlyData)||void 0===c?void 0:c.isSmartCollection)&&(a.data.isRestricted&&(O={}),O.isCustom=!0),(null==O?void 0:O[b])||(O[b]=a.data.catalogOnlyData,O[b].products={},O[b].products[g]=a.data.productOnlyData,O[b].products[g].variants={}),(null===(d=null==O?void 0:O[b])||void 0===d?void 0:d.products)||(O[b].products={}),(null===(r=null===(o=null==O?void 0:O[b])||void 0===o?void 0:o.products)||void 0===r?void 0:r[g])||(O[b].products[g]=a.data.productOnlyData,O[b].products[g].variants={}),O[b].products[g].variants||(O[b].products[g].variants={}),O[b].products[g].variants[j]=a.data.variant,O;case"variantUnselected":return O=t.cloneDeep(e),g=a.data.productId,b=a.data.collectionId,j=a.data.variantId,(null===(i=null===(n=O[b].products[g])||void 0===n?void 0:n.variants)||void 0===i?void 0:i[j])&&delete O[b].products[g].variants[j],Object.keys(null!==(p=null===(u=null===(l=O[b].products)||void 0===l?void 0:l[g])||void 0===u?void 0:u.variants)&&void 0!==p?p:{}).length||(delete O[b].products[g],Object.keys(O[b].products).length||((null===(v=O[b])||void 0===v?void 0:v.isSmartCollection)&&(O.isCustom=!1),delete O[b])),O;case"update":return O=Object.assign({},e),O;case"reset":return{};default:return e}};
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
3
- import type { SearchReducerActions, SelectedCollectionsActions } from './reducers';
4
- import { type Collection, type FbStatusFetcherReturn, OUT_OF_STOCK_ACTION, type SearchedItems, type SelectedItems } from './type';
2
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
3
+ import { Collection, FbStatusFetcherReturn, SearchedItems, SelectedItems } from '.';
4
+ import { SearchReducerActions, SelectedCollectionsActions } from './reducers';
5
+ import { OUT_OF_STOCK_ACTION } from './type';
5
6
  interface SearchScreenInterface {
6
7
  customCollectionRestriction?: boolean;
7
8
  selectedCollections: SelectedItems;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
3
- import { type SelectedCollectionsActions } from './reducers';
4
- import { type Collection, type FbStatusFetcherReturn, OUT_OF_STOCK_ACTION, type SelectedItems } from './type';
2
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
3
+ import { Collection, FbStatusFetcherReturn, SelectedItems } from '.';
4
+ import { SelectedCollectionsActions } from './reducers';
5
+ import { OUT_OF_STOCK_ACTION } from './type';
5
6
  interface SelectedScreenInterface {
6
7
  selectedCollections: SelectedItems;
7
8
  selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
@@ -17,68 +17,3 @@ export declare enum ScreenName {
17
17
  SearchProducts = "searchProducts",
18
18
  Products = "products"
19
19
  }
20
- export type FbProductStatus = 'APPROVED' | 'REJECTED';
21
- export interface ProductVariant {
22
- name: string;
23
- price: string;
24
- image: string;
25
- quantity: number;
26
- skipSync?: boolean;
27
- displayOrder?: number | null;
28
- fbStatus?: FbProductStatus;
29
- description?: string;
30
- id?: string;
31
- actualPrice?: string;
32
- currency?: string;
33
- skuId?: string;
34
- }
35
- export interface Product {
36
- name: string;
37
- image: string;
38
- description?: string;
39
- variants?: {
40
- [key: string]: ProductVariant;
41
- };
42
- id?: string;
43
- handle?: string;
44
- currency?: string;
45
- }
46
- export interface Collection {
47
- name: string;
48
- image: string;
49
- isSmartCollection: boolean;
50
- products?: {
51
- [key: string]: Product;
52
- };
53
- }
54
- export type SelectedItems = {
55
- [key: string]: Collection;
56
- };
57
- export type SearchedItems = {
58
- collections: SelectedItems;
59
- products: SelectedItems;
60
- };
61
- export type CollectionFetcherReturn = Promise<{
62
- collections: {
63
- [key: string]: {
64
- image: string;
65
- name: string;
66
- isSmartCollection: string;
67
- };
68
- };
69
- }>;
70
- export type ProductFetcherReturn = Promise<{
71
- [key: string]: Product;
72
- }>;
73
- export type FbStatusFetcherReturn = Promise<{
74
- [key: string]: FbProductStatus;
75
- }>;
76
- /**
77
- * Extended type from Product Variant, which contains ids and name.
78
- */
79
- export type ProductVariantForRearrange = ProductVariant & {
80
- variantId: string;
81
- productId: string;
82
- collectionId: string;
83
- productName: string;
84
- };
@@ -1,6 +1,6 @@
1
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
- import type { CollectionsActions } from './reducers';
3
- import type { Collection, FbStatusFetcherReturn, Product, ProductVariant, SearchedItems, SelectedItems } from './type';
1
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
+ import { Collection, FbStatusFetcherReturn, Product, ProductVariant, SearchedItems, SelectedItems } from './modal';
3
+ import { CollectionsActions } from './reducers';
4
4
  export declare const liftTheStateUp: (payload: any, data: any) => any;
5
5
  export declare function paginateSelectedItems(selectedItems: SelectedItems, limit: number, offset: number): {
6
6
  [key: string]: Collection;
@@ -1 +1 @@
1
- "use strict";function o(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}Object.defineProperty(exports,"__esModule",{value:!0});var t=o(require("lodash/cloneDeep"));function l(o,t,l){if(!o)return{};const i=Object.keys(o).slice(l,l+t),d={};return i.forEach((t=>{d[t]=o[t]})),d}const i=(o,t,l)=>{Object.keys(o).forEach((t=>{var l,i;const d=null!==(i=null===(l=o[t])||void 0===l?void 0:l.products)&&void 0!==i?i:{};Object.keys(d).forEach((l=>{var i,d,n,v;const s=null!==(v=null===(n=null===(d=null===(i=o[t])||void 0===i?void 0:i.products)||void 0===d?void 0:d[l])||void 0===n?void 0:n.variants)&&void 0!==v?v:{};Object.keys(s).forEach((i=>{var d,n,v,s;const e=null===(s=null===(v=null===(n=null===(d=o[t])||void 0===d?void 0:d.products)||void 0===n?void 0:n[l])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[i];e&&!e.fbStatus&&(e.fbStatus="APPROVED")}))}))})),t({type:l,data:o})};exports.fetchFbStatusCollection=function(o,t,l,d,n){let v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"paged";n||i(o,d,v);const s=(o=>{const t=[];return Object.keys(o).forEach((l=>{var i,d;const n=null!==(d=null===(i=o[l])||void 0===i?void 0:i.products)&&void 0!==d?d:{};Object.keys(n).forEach((i=>{var d,n,v,s;const e=null!==(s=null===(v=null===(n=null===(d=o[l])||void 0===d?void 0:d.products)||void 0===n?void 0:n[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((d=>{var n,v,s,e;const u=null===(e=null===(s=null===(v=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[d];(null==u?void 0:u.fbStatus)||t.push(d)}))}))})),t})(o);s.length>0&&n&&n(t,s,l).then((t=>{const l=Object.assign({},o);Object.keys(l).forEach((o=>{var i,d;const n=null!==(d=null===(i=l[o])||void 0===i?void 0:i.products)&&void 0!==d?d:{};Object.keys(n).forEach((i=>{var d,n,v,s;const e=null!==(s=null===(v=null===(n=null===(d=l[o])||void 0===d?void 0:d.products)||void 0===n?void 0:n[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((d=>{var n,v,s,e;const u=null===(e=null===(s=null===(v=null===(n=l[o])||void 0===n?void 0:n.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[d];u&&"REJECTED"===t[d]?u.fbStatus="REJECTED":u&&"APPROVED"===t[d]&&(u.fbStatus="APPROVED")}))}))})),d({type:v,data:l})})).catch((t=>{console.error("Error in fbStatusFetcher",t),i(o,d,v)}))},exports.getSkuId=(o,t)=>{var l;if(t)return o.skuId;const i=Object.values(null!==(l=null==o?void 0:o.variants)&&void 0!==l?l:{});return 1===i.length&&i[0].name.includes(o.name)?i[0].skuId:""},exports.getVariantIdsToFetchAtProductLevel=(o,t)=>{const l=[];return Object.keys(null!=o?o:{}).forEach((i=>{var d,n;const v=null!==(n=null===(d=null==o?void 0:o[i])||void 0===d?void 0:d.variants)&&void 0!==n?n:{};Object.keys(v).forEach((d=>{var n,v,s,e,u;let r;r=t?null===(s=null===(v=null===(n=null==t?void 0:t.products)||void 0===n?void 0:n[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[d]:null===(u=null===(e=null==o?void 0:o[i])||void 0===e?void 0:e.variants)||void 0===u?void 0:u[d],(null==r?void 0:r.fbStatus)||l.push(d)}))})),l},exports.isCollectionPartiallyChecked=function(o,t,l){var i,d,n,v;let s=0,e=0;if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]){const v=null!==(i=null==t?void 0:t.products)&&void 0!==i?i:{};s=Object.keys(v).length;const u=null!==(n=null===(d=l[o])||void 0===d?void 0:d.products)&&void 0!==n?n:{};e=Object.keys(u).length}else if(l[o]){const i=null==t?void 0:t.products;i&&Object.keys(i).forEach((o=>{var t;const l=null===(t=i[o])||void 0===t?void 0:t.variants;l&&Object.keys(l).forEach((o=>s+=1))}));const d=null===(v=l[o])||void 0===v?void 0:v.products;if(d&&Object.keys(d).forEach((o=>{var t;const l=null===(t=d[o])||void 0===t?void 0:t.variants;l&&Object.keys(l).forEach((o=>e+=1))})),s<=0&&e>0)return!1}return e>0&&s!==e},exports.isProductPartiallyChecked=(o,t,l,i,d)=>{var n,v,s,e,u,r,a,c,p,f,b,O,j,h,y,g,k,E,P;let S=0,V=0;if(null===(v=null===(n=null==l?void 0:l[o])||void 0===n?void 0:n.products)||void 0===v?void 0:v[t]){if(d)return!1;const n=(null===(u=null===(e=null===(s=null==l?void 0:l[o])||void 0===s?void 0:s.products)||void 0===e?void 0:e[t])||void 0===u?void 0:u.variants)||[];if(1===Object.keys(n).length)for(const i in n){const d=null===(a=null===(r=null==l?void 0:l[o])||void 0===r?void 0:r.products)||void 0===a?void 0:a[t],n=null===(b=null===(f=null===(p=null===(c=null==l?void 0:l[o])||void 0===c?void 0:c.products)||void 0===p?void 0:p[t])||void 0===f?void 0:f.variants)||void 0===b?void 0:b[i];if(null===(O=null==n?void 0:n.name)||void 0===O?void 0:O.includes(null!==(j=null==d?void 0:d.name)&&void 0!==j?j:""))return!1}if(null===(g=Object.keys((null===(y=null===(h=null==i?void 0:i.products)||void 0===h?void 0:h[t])||void 0===y?void 0:y.variants)||[]))||void 0===g||g.forEach((()=>V++)),Object.keys((null===(P=null===(E=null===(k=null==l?void 0:l[o])||void 0===k?void 0:k.products)||void 0===E?void 0:E[t])||void 0===P?void 0:P.variants)||[]).forEach((()=>S++)),S>0&&V!==S)return!0}return!1},exports.liftTheStateUp=(o,l)=>{const i=t.default(l);if(delete i.products,(o=Object.assign(Object.assign({},o),{catalogOnlyData:i})).productId&&l.products){const d=t.default(l.products[o.productId]);(null==d?void 0:d.variants)&&delete d.variants,o=Object.assign(Object.assign({},o),{catalogOnlyData:i,productOnlyData:d})}return o},exports.markVariantsAsApprovedProductsLevel=(o,t,l,i,d)=>{const n=Object.assign({},o);if(Object.keys(o).forEach((t=>{var l,i;Object.keys(null!==(i=null===(l=null==o?void 0:o[t])||void 0===l?void 0:l.variants)&&void 0!==i?i:{}).forEach((l=>{var i,d;const v=null===(i=null==o?void 0:o[t].variants)||void 0===i?void 0:i[l];v&&(v.fbStatus="APPROVED");const s=null===(d=null==n?void 0:n[t])||void 0===d?void 0:d.variants;s&&s[l]&&(s[l]=v)}))})),i&&d){const o=Object.assign({},i);o.products=n,d(o),t({type:"productsPaged",data:{collectionId:l,products:n}})}else t({type:"productsPaged",data:{collectionId:l,products:n}})},exports.paginateSelectedItems=function(o,t,i){var d;const n={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const e=o[s],u=l(e.products,t,i-v);u&&Object.keys(u).length>0&&(n[s]=Object.assign(Object.assign({},e),{products:u})),v+=Object.keys(null!==(d=e.products)&&void 0!==d?d:{}).length}return n},exports.shouldShowVariant=o=>{const t=Object.keys(o.variants||[]);let l=!1;return!(t.length<=1)||(t.forEach((t=>{var i,d;l=null!==(d=null===(i=o.variants)||void 0===i?void 0:i[t].name.includes(o.name))&&void 0!==d&&d})),!l)},exports.updateAllVariantsForSelectedProducts=(o,l,i)=>Object.keys(o).reduce(((d,n)=>{var v;return n in l?(d[n]=Object.assign(Object.assign({},o[n]),{products:Object.keys(null!==(v=o[n].products)&&void 0!==v?v:{}).reduce(((d,v)=>{var s,e,u,r,a,c,p,f,b,O;const j=null===(s=l[n].products)||void 0===s?void 0:s[v],h=null===(r=null===(u=null===(e=null==i?void 0:i.products)||void 0===e?void 0:e[n])||void 0===u?void 0:u.products)||void 0===r?void 0:r[v];return j?d[v]=Object.assign(Object.assign({},(null===(a=o[n].products)||void 0===a?void 0:a[v])||{}),{allVariants:t.default(j.variants)}):h?d[v]=Object.assign(Object.assign({},(null===(c=o[n].products)||void 0===c?void 0:c[v])||{}),{allVariants:t.default(h.variants)}):(null===(f=null===(p=o[n].products)||void 0===p?void 0:p[v])||void 0===f?void 0:f.allVariants)&&(d[v]=Object.assign(Object.assign({},(null===(b=o[n].products)||void 0===b?void 0:b[v])||{}),{allVariants:t.default(null===(O=o[n].products)||void 0===O?void 0:O[v].allVariants)})),d}),{})}),d):d}),{});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("lodash");function l(o,l,t){if(!o)return{};const i=Object.keys(o).slice(t,t+l),n={};return i.forEach((l=>{n[l]=o[l]})),n}const t=(o,l,t)=>{Object.keys(o).forEach((l=>{var t,i;const n=null!==(i=null===(t=o[l])||void 0===t?void 0:t.products)&&void 0!==i?i:{};Object.keys(n).forEach((t=>{var i,n,d,v;const s=null!==(v=null===(d=null===(n=null===(i=o[l])||void 0===i?void 0:i.products)||void 0===n?void 0:n[t])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((i=>{var n,d,v,s;const e=null===(s=null===(v=null===(d=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===d?void 0:d[t])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[i];e&&!e.fbStatus&&(e.fbStatus="APPROVED")}))}))})),l({type:t,data:o})};exports.fetchFbStatusCollection=function(o,l,i,n,d){let v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"paged";d||t(o,n,v);const s=(o=>{const l=[];return Object.keys(o).forEach((t=>{var i,n;const d=null!==(n=null===(i=o[t])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(d).forEach((i=>{var n,d,v,s;const e=null!==(s=null===(v=null===(d=null===(n=o[t])||void 0===n?void 0:n.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((n=>{var d,v,s,e;const u=null===(e=null===(s=null===(v=null===(d=o[t])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[n];(null==u?void 0:u.fbStatus)||l.push(n)}))}))})),l})(o);s.length>0&&d&&d(l,s,i).then((l=>{const t=Object.assign({},o);Object.keys(t).forEach((o=>{var i,n;const d=null!==(n=null===(i=t[o])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(d).forEach((i=>{var n,d,v,s;const e=null!==(s=null===(v=null===(d=null===(n=t[o])||void 0===n?void 0:n.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((n=>{var d,v,s,e;const u=null===(e=null===(s=null===(v=null===(d=t[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[n];u&&"REJECTED"===l[n]?u.fbStatus="REJECTED":u&&"APPROVED"===l[n]&&(u.fbStatus="APPROVED")}))}))})),n({type:v,data:t})})).catch((l=>{console.error("Error in fbStatusFetcher",l),t(o,n,v)}))},exports.getSkuId=(o,l)=>{var t;if(l)return o.skuId;const i=Object.values(null!==(t=null==o?void 0:o.variants)&&void 0!==t?t:{});return 1===i.length&&i[0].name.includes(o.name)?i[0].skuId:""},exports.getVariantIdsToFetchAtProductLevel=(o,l)=>{const t=[];return Object.keys(null!=o?o:{}).forEach((i=>{var n,d;const v=null!==(d=null===(n=null==o?void 0:o[i])||void 0===n?void 0:n.variants)&&void 0!==d?d:{};Object.keys(v).forEach((n=>{var d,v,s,e,u;let r;r=l?null===(s=null===(v=null===(d=null==l?void 0:l.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n]:null===(u=null===(e=null==o?void 0:o[i])||void 0===e?void 0:e.variants)||void 0===u?void 0:u[n],(null==r?void 0:r.fbStatus)||t.push(n)}))})),t},exports.isCollectionPartiallyChecked=function(o,l,t){var i,n,d,v;let s=0,e=0;if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]){const v=null!==(i=null==l?void 0:l.products)&&void 0!==i?i:{};s=Object.keys(v).length;const u=null!==(d=null===(n=t[o])||void 0===n?void 0:n.products)&&void 0!==d?d:{};e=Object.keys(u).length}else if(t[o]){const i=null==l?void 0:l.products;i&&Object.keys(i).forEach((o=>{var l;const t=null===(l=i[o])||void 0===l?void 0:l.variants;t&&Object.keys(t).forEach((o=>s+=1))}));const n=null===(v=t[o])||void 0===v?void 0:v.products;if(n&&Object.keys(n).forEach((o=>{var l;const t=null===(l=n[o])||void 0===l?void 0:l.variants;t&&Object.keys(t).forEach((o=>e+=1))})),s<=0&&e>0)return!1}return e>0&&s!==e},exports.isProductPartiallyChecked=(o,l,t,i,n)=>{var d,v,s,e,u,r,c,a,p,b,O,f,j,h,y,g,k,E,P;let D=0,S=0;if(null===(v=null===(d=null==t?void 0:t[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[l]){if(n)return!1;const d=(null===(u=null===(e=null===(s=null==t?void 0:t[o])||void 0===s?void 0:s.products)||void 0===e?void 0:e[l])||void 0===u?void 0:u.variants)||[];if(1===Object.keys(d).length)for(const i in d){const n=null===(c=null===(r=null==t?void 0:t[o])||void 0===r?void 0:r.products)||void 0===c?void 0:c[l],d=null===(O=null===(b=null===(p=null===(a=null==t?void 0:t[o])||void 0===a?void 0:a.products)||void 0===p?void 0:p[l])||void 0===b?void 0:b.variants)||void 0===O?void 0:O[i];if(null===(f=null==d?void 0:d.name)||void 0===f?void 0:f.includes(null!==(j=null==n?void 0:n.name)&&void 0!==j?j:""))return!1}if(null===(g=Object.keys((null===(y=null===(h=null==i?void 0:i.products)||void 0===h?void 0:h[l])||void 0===y?void 0:y.variants)||[]))||void 0===g||g.forEach((()=>S++)),Object.keys((null===(P=null===(E=null===(k=null==t?void 0:t[o])||void 0===k?void 0:k.products)||void 0===E?void 0:E[l])||void 0===P?void 0:P.variants)||[]).forEach((()=>D++)),D>0&&S!==D)return!0}return!1},exports.liftTheStateUp=(l,t)=>{const i=o.cloneDeep(t);if(delete i.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:i})).productId&&t.products){const n=o.cloneDeep(t.products[l.productId]);(null==n?void 0:n.variants)&&delete n.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:i,productOnlyData:n})}return l},exports.markVariantsAsApprovedProductsLevel=(o,l,t,i,n)=>{const d=Object.assign({},o);if(Object.keys(o).forEach((l=>{var t,i;Object.keys(null!==(i=null===(t=null==o?void 0:o[l])||void 0===t?void 0:t.variants)&&void 0!==i?i:{}).forEach((t=>{var i,n;const v=null===(i=null==o?void 0:o[l].variants)||void 0===i?void 0:i[t];v&&(v.fbStatus="APPROVED");const s=null===(n=null==d?void 0:d[l])||void 0===n?void 0:n.variants;s&&s[t]&&(s[t]=v)}))})),i&&n){const o=Object.assign({},i);o.products=d,n(o),l({type:"productsPaged",data:{collectionId:t,products:d}})}else l({type:"productsPaged",data:{collectionId:t,products:d}})},exports.paginateSelectedItems=function(o,t,i){var n;const d={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const e=o[s],u=l(e.products,t,i-v);u&&Object.keys(u).length>0&&(d[s]=Object.assign(Object.assign({},e),{products:u})),v+=Object.keys(null!==(n=e.products)&&void 0!==n?n:{}).length}return d},exports.shouldShowVariant=o=>{const l=Object.keys(o.variants||[]);let t=!1;return!(l.length<=1)||(l.forEach((l=>{var i,n;t=null!==(n=null===(i=o.variants)||void 0===i?void 0:i[l].name.includes(o.name))&&void 0!==n&&n})),!t)},exports.updateAllVariantsForSelectedProducts=(l,t,i)=>Object.keys(l).reduce(((n,d)=>{var v;return d in t?(n[d]=Object.assign(Object.assign({},l[d]),{products:Object.keys(null!==(v=l[d].products)&&void 0!==v?v:{}).reduce(((n,v)=>{var s,e,u,r,c,a,p,b,O,f;const j=null===(s=t[d].products)||void 0===s?void 0:s[v],h=null===(r=null===(u=null===(e=null==i?void 0:i.products)||void 0===e?void 0:e[d])||void 0===u?void 0:u.products)||void 0===r?void 0:r[v];return j?n[v]=Object.assign(Object.assign({},(null===(c=l[d].products)||void 0===c?void 0:c[v])||{}),{allVariants:o.cloneDeep(j.variants)}):h?n[v]=Object.assign(Object.assign({},(null===(a=l[d].products)||void 0===a?void 0:a[v])||{}),{allVariants:o.cloneDeep(h.variants)}):(null===(b=null===(p=l[d].products)||void 0===p?void 0:p[v])||void 0===b?void 0:b.allVariants)&&(n[v]=Object.assign(Object.assign({},(null===(O=l[d].products)||void 0===O?void 0:O[v])||{}),{allVariants:o.cloneDeep(null===(f=l[d].products)||void 0===f?void 0:f[v].allVariants)})),n}),{})}),n):n}),{});
@@ -1,6 +1,16 @@
1
1
  /// <reference types="react" />
2
- import type { SelectedCollectionsActions } from './reducers';
3
- import { OUT_OF_STOCK_ACTION, type ProductVariantForRearrange } from './type';
2
+ import { ProductVariant } from './modal';
3
+ import { SelectedCollectionsActions } from './reducers';
4
+ import { OUT_OF_STOCK_ACTION } from './type';
5
+ /**
6
+ * Extended type from Product Variant, which contains ids and name.
7
+ */
8
+ export type ProductVariantForRearrange = ProductVariant & {
9
+ variantId: string;
10
+ productId: string;
11
+ collectionId: string;
12
+ productName: string;
13
+ };
4
14
  /**
5
15
  * Props type for variant card in rearrange screen
6
16
  */
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { SelectedCollectionsActions } from './reducers';
3
- import { OUT_OF_STOCK_ACTION, type ProductVariantForRearrange } from './type';
2
+ import { SelectedCollectionsActions } from './reducers';
3
+ import { OUT_OF_STOCK_ACTION } from './type';
4
+ import { ProductVariantForRearrange } from './variant';
4
5
  /**
5
6
  * Props for list of variants - applicable both in list and grid view
6
7
  */
@@ -1,3 +1,18 @@
1
1
  /// <reference types="react" />
2
- import { SampleButtonProps } from './SampleButton.model';
2
+ export type Color = 'primary' | 'secondary' | 'success' | 'error' | 'warn';
3
+ export type Variant = 'solid' | 'outline' | 'text';
4
+ export interface SampleButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ /**
6
+ * The color of the Button.
7
+ *
8
+ * @default 'primary'
9
+ */
10
+ color?: Color;
11
+ /**
12
+ * The visual style of the Button.
13
+ *
14
+ * @default 'solid'
15
+ */
16
+ variant?: Variant;
17
+ }
3
18
  export declare const SampleButton: import("react").ForwardRefExoticComponent<SampleButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { Color, Variant } from './SampleButton.model';
2
+ import type { Color, Variant } from './SampleButton';
3
3
  export declare const SampleButton: import("@emotion/styled").StyledComponent<{
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,2 +1,2 @@
1
- import type { Color, Variant } from './SampleButton.model';
1
+ import type { Color, Variant } from './SampleButton';
2
2
  export declare function getTheme(color: Color, variant: Variant): import("@emotion/utils").SerializedStyles;
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from '../button/model';
2
- import { InputVariant } from '../input/Input.model';
2
+ import { InputVariant } from '../input/Input';
3
3
  export interface SearchBarProps {
4
4
  width: string;
5
5
  isEnabled: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("../../constants/Theme.js");exports.BikSlider=n=>{let{min:r=0,max:o=100,defaultValue:s,onChange:i,step:l=1,disabled:u=!1}=n;const b=void 0!==s?s:r,[c,d]=t.useState(b),[g,h]=t.useState(!1),[m,p]=t.useState(!1),[x,f]=t.useState(!1),v=t.useRef(null),k=t.useRef(null),w=t.useMemo((()=>(e=>({container:{position:"relative",marginTop:"30px",height:"8px",width:"100%",cursor:e?"not-allowed":"pointer",opacity:e?.5:1},track:{position:"absolute",top:0,left:0,right:0,height:"8px",backgroundColor:"#E0E0E0",borderRadius:"4px"},filledTrack:{position:"absolute",top:0,left:0,height:"8px",backgroundColor:a.COLORS.background.brand,borderRadius:"4px",transition:"width 0.1s ease"},filledTrackDragging:{position:"absolute",top:0,left:0,height:"8px",backgroundColor:a.COLORS.background.brand,borderRadius:"4px",transition:"none"},thumb:{position:"absolute",top:"50%",width:"24px",height:"24px",backgroundColor:a.COLORS.background.brand,border:`2px solid ${a.COLORS.background.brand}`,borderRadius:"50%",transform:"translate(-50%, -50%)",cursor:e?"not-allowed":"grab",transition:"box-shadow 0.2s ease",outline:"none",zIndex:1},thumbDisabled:{cursor:"not-allowed"},valueLabel:{position:"absolute",bottom:"100%",left:"50%",marginBottom:"16px",width:"32px",height:"32px",backgroundColor:a.COLORS.background.brand,borderRadius:"50% 50% 50% 0",transform:"translate(0, 0) rotate(-45deg) scale(0)",transformOrigin:"bottom left",transition:"transform 0.2s ease",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},valueLabelVisible:{transform:"translate(0, 0) rotate(-45deg) scale(1)"},valueLabelText:{transform:"rotate(45deg)",color:"white",fontSize:"12px",lineHeight:1.2,fontWeight:500}}))(u)),[u]);t.useEffect((()=>{d(void 0!==s?s:r)}),[s,r]);const O=t.useCallback((e=>{if(!v.current)return r;const t=v.current.getBoundingClientRect(),a=Math.max(0,Math.min(1,(e-t.left)/t.width)),n=r+a*(o-r),s=Math.round(n/l)*l;return Math.max(r,Math.min(o,s))}),[r,o,l]),j=t.useCallback((e=>{if(u)return;e.preventDefault(),h(!0),f(!0);const t=O(e.clientX);d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[u,O,i]),L=t.useCallback((e=>{if(!g||u)return;const t=O(e.clientX);d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[g,u,O,i]),C=t.useCallback((()=>{h(!1),f(!1)}),[]),M=t.useCallback((e=>{if(u)return;let t=c;switch(e.key){case"ArrowLeft":case"ArrowDown":t=Math.max(r,c-l);break;case"ArrowRight":case"ArrowUp":t=Math.min(o,c+l);break;case"Home":t=r;break;case"End":t=o;break;default:return}e.preventDefault(),d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[u,c,r,o,l,i]);t.useEffect((()=>{if(g)return document.addEventListener("mousemove",L),document.addEventListener("mouseup",C),()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",C)}}),[g,L,C]);const E=(c-r)/(o-r)*100,R=isNaN(E)?0:Math.max(0,Math.min(100,E)),S=t.useMemo((()=>{const e=Object.assign({},w.thumb);return u?Object.assign(Object.assign({},e),w.thumbDisabled):(g?(e.boxShadow="0px 0px 0px 8px rgba(115, 29, 207, 0.5)",e.cursor="grabbing"):m&&(e.boxShadow="0px 0px 0px 8px rgba(115, 29, 207, 0.08)"),e.left=`${R}%`,e)}),[w.thumb,w.thumbDisabled,u,g,m,R]),y=t.useMemo((()=>{const e=Object.assign({},w.valueLabel);return x||m?Object.assign(Object.assign({},e),w.valueLabelVisible):e}),[w.valueLabel,w.valueLabelVisible,x,m]);return e.jsxs("div",Object.assign({ref:v,style:w.container,onMouseDown:j,role:"slider","aria-label":"bik slider","aria-valuemin":r,"aria-valuemax":o,"aria-valuenow":c,tabIndex:u?-1:0,onKeyDown:M},{children:[e.jsx("div",{style:w.track}),e.jsx("div",{style:Object.assign(Object.assign({},g?w.filledTrackDragging:w.filledTrack),{width:`${R}%`})}),e.jsx("div",Object.assign({ref:k,style:S,onMouseEnter:()=>!u&&p(!0),onMouseLeave:()=>!u&&p(!1),onFocus:()=>!u&&f(!0),onBlur:()=>!u&&f(!1)},{children:e.jsx("div",Object.assign({style:y},{children:e.jsx("span",Object.assign({style:w.valueLabelText},{children:c}))}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("../../constants/Theme.js");exports.BikSlider=n=>{let{min:r=0,max:s=100,defaultValue:o,onChange:i,step:l=1,disabled:u=!1}=n;const c=void 0!==o?o:r,[b,d]=t.useState(c),[g,h]=t.useState(!1),[p,x]=t.useState(!1),[m,f]=t.useState(!1),v=t.useRef(null),w=t.useRef(null),k=(e=>({container:{position:"relative",marginTop:"30px",height:"8px",width:"100%",cursor:e?"not-allowed":"pointer",opacity:e?.5:1},track:{position:"absolute",top:0,left:0,right:0,height:"8px",backgroundColor:"#E0E0E0",borderRadius:"4px"},filledTrack:{position:"absolute",top:0,left:0,height:"8px",backgroundColor:a.COLORS.background.brand,borderRadius:"4px",transition:"width 0.1s ease"},thumb:{position:"absolute",top:"50%",width:"24px",height:"24px",backgroundColor:a.COLORS.background.brand,border:`2px solid ${a.COLORS.background.brand}`,borderRadius:"50%",transform:"translate(-50%, -50%)",cursor:e?"not-allowed":"grab",transition:"box-shadow 0.2s ease",outline:"none",zIndex:1},thumbDisabled:{cursor:"not-allowed"},valueLabel:{position:"absolute",bottom:"100%",left:"50%",marginBottom:"16px",width:"32px",height:"32px",backgroundColor:a.COLORS.background.brand,borderRadius:"50% 50% 50% 0",transform:"translate(0, 0) rotate(-45deg) scale(0)",transformOrigin:"bottom left",transition:"transform 0.2s ease",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},valueLabelVisible:{transform:"translate(0, 0) rotate(-45deg) scale(1)"},valueLabelText:{transform:"rotate(45deg)",color:"white",fontSize:"12px",lineHeight:1.2,fontWeight:500}}))(u);t.useEffect((()=>{d(void 0!==o?o:r)}),[o,r]);const j=t.useCallback((e=>{if(!v.current)return r;const t=v.current.getBoundingClientRect(),a=Math.max(0,Math.min(1,(e-t.left)/t.width)),n=r+a*(s-r),o=Math.round(n/l)*l;return Math.max(r,Math.min(s,o))}),[r,s,l]),O=t.useCallback((e=>{if(u)return;e.preventDefault(),h(!0),f(!0);const t=j(e.clientX);d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[u,j,i]),C=t.useCallback((e=>{if(!g||u)return;const t=j(e.clientX);d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[g,u,j,i]),L=t.useCallback((()=>{h(!1),f(!1)}),[]),E=t.useCallback((e=>{if(u)return;let t=b;switch(e.key){case"ArrowLeft":case"ArrowDown":t=Math.max(r,b-l);break;case"ArrowRight":case"ArrowUp":t=Math.min(s,b+l);break;case"Home":t=r;break;case"End":t=s;break;default:return}e.preventDefault(),d(t);const a=new Event("change",{bubbles:!0});i(a,t)}),[u,b,r,s,l,i]);t.useEffect((()=>{if(g)return document.addEventListener("mousemove",C),document.addEventListener("mouseup",L),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",L)}}),[g,C,L]);const M=(b-r)/(s-r)*100,y=isNaN(M)?0:Math.max(0,Math.min(100,M));return e.jsxs("div",Object.assign({ref:v,style:k.container,onMouseDown:O,role:"slider","aria-label":"bik slider","aria-valuemin":r,"aria-valuemax":s,"aria-valuenow":b,tabIndex:u?-1:0,onKeyDown:E},{children:[e.jsx("div",{style:k.track}),e.jsx("div",{style:Object.assign(Object.assign({},k.filledTrack),{width:`${y}%`})}),e.jsx("div",Object.assign({ref:w,style:(()=>{const e=Object.assign({},k.thumb);return u?Object.assign(Object.assign({},e),k.thumbDisabled):(g?(e.boxShadow="0px 0px 0px 8px rgba(115, 29, 207, 0.5)",e.cursor="grabbing"):p&&(e.boxShadow="0px 0px 0px 8px rgba(115, 29, 207, 0.08)"),e.left=`${y}%`,e)})(),onMouseEnter:()=>!u&&x(!0),onMouseLeave:()=>!u&&x(!1),onFocus:()=>!u&&f(!0),onBlur:()=>!u&&f(!1)},{children:e.jsx("div",Object.assign({style:(()=>{const e=Object.assign({},k.valueLabel);return m||p?Object.assign(Object.assign({},e),k.valueLabelVisible):e})()},{children:e.jsx("span",Object.assign({style:k.valueLabelText},{children:b}))}))}))]}))};
@@ -1,8 +1,24 @@
1
- import { EachStep } from './Stepper.model';
1
+ export type StepperStates = 'default' | 'completed' | 'error' | 'active' | 'inactive';
2
2
  export interface StepperProps {
3
3
  steps: EachStep[];
4
4
  activeStep: EachStep;
5
5
  onClickingEachStep: (step: EachStep) => void;
6
6
  hideHoverState?: boolean;
7
7
  }
8
+ export interface EachStep {
9
+ stepKey: string;
10
+ stepName: string;
11
+ isCompleted: boolean;
12
+ isError: boolean;
13
+ isInActive: boolean;
14
+ }
15
+ export interface SingleStepperProps {
16
+ index: number;
17
+ isLastElement: boolean;
18
+ eachStep: EachStep;
19
+ isActive: boolean;
20
+ onClickingStep: (step: EachStep) => void;
21
+ stepsCount: number;
22
+ hideHoverState?: boolean;
23
+ }
8
24
  export declare const Stepper: (stepperDetails: StepperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { StepperStates } from './Stepper.model';
1
+ import { StepperStates } from './Stepper';
2
2
  export declare const StepperContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const SingleStepperChildContainer: import("styled-components").StyledComponent<"div", any, {
4
4
  selectedState: StepperStates;
@@ -1,4 +1,4 @@
1
- import { EachStep } from './Stepper.model';
1
+ import { EachStep } from './Stepper';
2
2
  export default class StepperService {
3
3
  updateSteps: (steps: EachStep[], stepToUpdate: EachStep, propertiesToUpdate: Partial<EachStep>) => EachStep[];
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { StepperStates } from './Stepper.model';
1
+ import type { StepperStates } from './Stepper';
2
2
  export declare function getTheme(step: StepperStates): {
3
3
  textColor: string;
4
4
  badgeColor: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),I=require("./themes.js");function l(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const g=l(c).default("div","production"===process.env.NODE_ENV?{target:"e930jd90"}:{target:"e930jd90",label:"Tag"})("cursor:",(c=>{var I;return null!==(I=c.cursor)&&void 0!==I?I:"default"}),";",(c=>"small"!==c.size&&("regular"===c.variant?"display: block;\n\t\t min-height: 26px;\n\t\t":"min-height: 20px;"))," .container{display:flex;align-items:",(c=>c.alignIcon?c.alignIcon:"center"),";gap:6px;",(c=>"small"===c.size?"height: 16px; box-sizing: border-box;":"")," padding:",(c=>"small"===c.size?"2px 6px":c.contentPadding?c.contentPadding:I.getPadding(c.variant)),";background:",(c=>{var l;return null!==(l=c.backgroundColor)&&void 0!==l?l:I.getBackgroundColor(c.theme,c.type)}),";border-radius:",(c=>void 0!==c.borderRadius?"number"==typeof c.borderRadius?`${c.borderRadius}px`:c.borderRadius:"regular"===c.variant?"4px":"12px"),";",(c=>!c.noBorder&&"light"===c.theme&&`border: ${"2.0"===c.version?.5:1}px solid ${I.generateBorder(c.type,c.theme)};`)," .text{color:",(c=>I.getTextColor(c.theme,c.type)),";}.icon-trailing{all:unset;display:flex;}.icon-leading{all:unset;display:flex;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRhZy5zdHlsZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUU4QiIsImZpbGUiOiJUYWcuc3R5bGVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgZ2VuZXJhdGVCb3JkZXIsIGdldEJhY2tncm91bmRDb2xvciwgZ2V0UGFkZGluZywgZ2V0VGV4dENvbG9yLCB9IGZyb20gJy4vdGhlbWVzJztcclxuZXhwb3J0IGNvbnN0IFRhZyA9IHN0eWxlZC5kaXYgYFxuXHRjdXJzb3I6ICR7KHByb3BzKSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHByb3BzLmN1cnNvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJ2RlZmF1bHQnOyB9fTtcblx0JHsocHJvcHMpID0+IHByb3BzLnNpemUgIT09ICdzbWFsbCcgJiZcclxuICAgIChwcm9wcy52YXJpYW50ID09PSAncmVndWxhcidcclxuICAgICAgICA/IGBkaXNwbGF5OiBibG9jaztcblx0XHQgICAgIG1pbi1oZWlnaHQ6IDI2cHg7XG5cdFx0YFxyXG4gICAgICAgIDogYG1pbi1oZWlnaHQ6IDIwcHg7YCl9XG5cdC5jb250YWluZXIge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0YWxpZ24taXRlbXM6ICR7KHByb3BzKSA9PiAocHJvcHMuYWxpZ25JY29uID8gcHJvcHMuYWxpZ25JY29uIDogJ2NlbnRlcicpfTtcblx0XHRnYXA6IDZweDtcblx0XHQkeyhwcm9wcykgPT4gcHJvcHMuc2l6ZSA9PT0gJ3NtYWxsJyA/ICdoZWlnaHQ6IDE2cHg7IGJveC1zaXppbmc6IGJvcmRlci1ib3g7JyA6ICcnfVxuXHRcdHBhZGRpbmc6ICR7KHByb3BzKSA9PiBwcm9wcy5zaXplID09PSAnc21hbGwnXHJcbiAgICA/ICcycHggNnB4J1xyXG4gICAgOiBwcm9wcy5jb250ZW50UGFkZGluZ1xyXG4gICAgICAgID8gcHJvcHMuY29udGVudFBhZGRpbmdcclxuICAgICAgICA6IGdldFBhZGRpbmcocHJvcHMudmFyaWFudCl9O1xuXHRcdGJhY2tncm91bmQ6ICR7KHByb3BzKSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHByb3BzLmJhY2tncm91bmRDb2xvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogZ2V0QmFja2dyb3VuZENvbG9yKHByb3BzLnRoZW1lLCBwcm9wcy50eXBlKTsgfX07XG5cblx0XHRib3JkZXItcmFkaXVzOiAkeyhwcm9wcykgPT4gcHJvcHMuYm9yZGVyUmFkaXVzICE9PSB1bmRlZmluZWRcclxuICAgID8gdHlwZW9mIHByb3BzLmJvcmRlclJhZGl1cyA9PT0gJ251bWJlcidcclxuICAgICAgICA/IGAke3Byb3BzLmJvcmRlclJhZGl1c31weGBcclxuICAgICAgICA6IHByb3BzLmJvcmRlclJhZGl1c1xyXG4gICAgOiBwcm9wcy52YXJpYW50ID09PSAncmVndWxhcidcclxuICAgICAgICA/ICc0cHgnXHJcbiAgICAgICAgOiAnMTJweCd9O1xuXG5cdFx0JHsocHJvcHMpID0+ICFwcm9wcy5ub0JvcmRlciAmJlxyXG4gICAgcHJvcHMudGhlbWUgPT09ICdsaWdodCcgJiZcclxuICAgIGBib3JkZXI6ICR7cHJvcHMudmVyc2lvbiA9PT0gJzIuMCcgPyAwLjUgOiAxfXB4IHNvbGlkICR7Z2VuZXJhdGVCb3JkZXIocHJvcHMudHlwZSwgcHJvcHMudGhlbWUpfTtgfVxuXG5cdFx0LnRleHQge1xuXHRcdFx0Y29sb3I6ICR7KHByb3BzKSA9PiBnZXRUZXh0Q29sb3IocHJvcHMudGhlbWUsIHByb3BzLnR5cGUpfTtcblx0XHR9XG5cblx0XHQuaWNvbi10cmFpbGluZyB7XG5cdFx0XHRhbGw6IHVuc2V0O1xuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHR9XG5cblx0XHQuaWNvbi1sZWFkaW5nIHtcblx0XHRcdGFsbDogdW5zZXQ7XG5cdFx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdH1cblx0fVxuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9VGFnLnN0eWxlZC5qcy5tYXAiXX0= */"));exports.Tag=g;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),g=require("./themes.js");function b(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const I=b(c).default("div","production"===process.env.NODE_ENV?{target:"e930jd90"}:{target:"e930jd90",label:"Tag"})("cursor:",(c=>{var g;return null!==(g=c.cursor)&&void 0!==g?g:"default"}),";",(c=>"small"!==c.size&&("regular"===c.variant?"display: block;\n\t\t min-height: 26px;\n\t\t":"min-height: 20px;"))," .container{display:flex;align-items:",(c=>c.alignIcon?c.alignIcon:"center"),";gap:6px;",(c=>"small"===c.size?"height: 16px; box-sizing: border-box;":"")," padding:",(c=>"small"===c.size?"2px 6px":c.contentPadding?`${c.contentPadding}px`:g.getPadding(c.variant)),";background:",(c=>{var b;return null!==(b=c.backgroundColor)&&void 0!==b?b:g.getBackgroundColor(c.theme,c.type)}),";border-radius:",(c=>void 0!==c.borderRadius?"number"==typeof c.borderRadius?`${c.borderRadius}px`:c.borderRadius:"regular"===c.variant?"4px":"12px"),";",(c=>!c.noBorder&&"light"===c.theme&&`border: ${"2.0"===c.version?.5:1}px solid ${g.generateBorder(c.type,c.theme)};`)," .text{color:",(c=>g.getTextColor(c.theme,c.type)),";}.icon-trailing{all:unset;display:flex;}.icon-leading{all:unset;display:flex;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRhZy5zdHlsZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUU4QiIsImZpbGUiOiJUYWcuc3R5bGVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgZ2VuZXJhdGVCb3JkZXIsIGdldEJhY2tncm91bmRDb2xvciwgZ2V0UGFkZGluZywgZ2V0VGV4dENvbG9yLCB9IGZyb20gJy4vdGhlbWVzJztcclxuZXhwb3J0IGNvbnN0IFRhZyA9IHN0eWxlZC5kaXYgYFxuXHRjdXJzb3I6ICR7KHByb3BzKSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHByb3BzLmN1cnNvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJ2RlZmF1bHQnOyB9fTtcblx0JHsocHJvcHMpID0+IHByb3BzLnNpemUgIT09ICdzbWFsbCcgJiZcclxuICAgIChwcm9wcy52YXJpYW50ID09PSAncmVndWxhcidcclxuICAgICAgICA/IGBkaXNwbGF5OiBibG9jaztcblx0XHQgICAgIG1pbi1oZWlnaHQ6IDI2cHg7XG5cdFx0YFxyXG4gICAgICAgIDogYG1pbi1oZWlnaHQ6IDIwcHg7YCl9XG5cdC5jb250YWluZXIge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0YWxpZ24taXRlbXM6ICR7KHByb3BzKSA9PiAocHJvcHMuYWxpZ25JY29uID8gcHJvcHMuYWxpZ25JY29uIDogJ2NlbnRlcicpfTtcblx0XHRnYXA6IDZweDtcblx0XHQkeyhwcm9wcykgPT4gcHJvcHMuc2l6ZSA9PT0gJ3NtYWxsJyA/ICdoZWlnaHQ6IDE2cHg7IGJveC1zaXppbmc6IGJvcmRlci1ib3g7JyA6ICcnfVxuXHRcdHBhZGRpbmc6ICR7KHByb3BzKSA9PiBwcm9wcy5zaXplID09PSAnc21hbGwnXHJcbiAgICA/ICcycHggNnB4J1xyXG4gICAgOiBwcm9wcy5jb250ZW50UGFkZGluZ1xyXG4gICAgICAgID8gYCR7cHJvcHMuY29udGVudFBhZGRpbmd9cHhgXHJcbiAgICAgICAgOiBnZXRQYWRkaW5nKHByb3BzLnZhcmlhbnQpfTtcblx0XHRiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBwcm9wcy5iYWNrZ3JvdW5kQ29sb3IpICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6IGdldEJhY2tncm91bmRDb2xvcihwcm9wcy50aGVtZSwgcHJvcHMudHlwZSk7IH19O1xuXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsocHJvcHMpID0+IHByb3BzLmJvcmRlclJhZGl1cyAhPT0gdW5kZWZpbmVkXHJcbiAgICA/IHR5cGVvZiBwcm9wcy5ib3JkZXJSYWRpdXMgPT09ICdudW1iZXInXHJcbiAgICAgICAgPyBgJHtwcm9wcy5ib3JkZXJSYWRpdXN9cHhgXHJcbiAgICAgICAgOiBwcm9wcy5ib3JkZXJSYWRpdXNcclxuICAgIDogcHJvcHMudmFyaWFudCA9PT0gJ3JlZ3VsYXInXHJcbiAgICAgICAgPyAnNHB4J1xyXG4gICAgICAgIDogJzEycHgnfTtcblxuXHRcdCR7KHByb3BzKSA9PiAhcHJvcHMubm9Cb3JkZXIgJiZcclxuICAgIHByb3BzLnRoZW1lID09PSAnbGlnaHQnICYmXHJcbiAgICBgYm9yZGVyOiAke3Byb3BzLnZlcnNpb24gPT09ICcyLjAnID8gMC41IDogMX1weCBzb2xpZCAke2dlbmVyYXRlQm9yZGVyKHByb3BzLnR5cGUsIHByb3BzLnRoZW1lKX07YH1cblxuXHRcdC50ZXh0IHtcblx0XHRcdGNvbG9yOiAkeyhwcm9wcykgPT4gZ2V0VGV4dENvbG9yKHByb3BzLnRoZW1lLCBwcm9wcy50eXBlKX07XG5cdFx0fVxuXG5cdFx0Lmljb24tdHJhaWxpbmcge1xuXHRcdFx0YWxsOiB1bnNldDtcblx0XHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0fVxuXG5cdFx0Lmljb24tbGVhZGluZyB7XG5cdFx0XHRhbGw6IHVuc2V0O1xuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHR9XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRhZy5zdHlsZWQuanMubWFwIl19 */"));exports.Tag=I;
@@ -1,13 +1,13 @@
1
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
- import type { VariableListInterfaceV2 } from "../add-variableV2/AddVariableV2";
3
- import type { WhatsAppCarouselTemplateVariables } from "../template-preview/models/WhatsappCarouselTemplate";
1
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
+ import { VariableListInterfaceV2 } from "../add-variableV2/AddVariableV2";
3
+ import { CarouselProduct } from "./modalElements/EditWhatsAppCarouselTemplateV2";
4
+ import { WhatsAppCarouselTemplateVariables } from "../template-preview/models/WhatsappCarouselTemplate";
4
5
  import { CHANNEL_TYPE } from '../template-preview/models/Channels';
5
- import { CUSTOM_VARIABLE, type GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
6
- import type { AllTemplateTypes, AllTemplateVariables, NonNullTemplateTypes } from '../template-preview/models/types';
7
- import type { WebpushTemplateVariables } from '../template-preview/models/WebpushTemplate';
8
- import { type ExtrasWhatsapp, POD, type TemplateAnalyticsI, type WhatsAppPickerMeta, type WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
9
- import type { VariableV3 } from '../variable-picker-v3/model';
10
- import { CarouselProduct } from './modalElements/modal';
6
+ import { CUSTOM_VARIABLE, GlobalPlaceholderType } from '../template-preview/models/TemplateMeta';
7
+ import { AllTemplateTypes, AllTemplateVariables, NonNullTemplateTypes } from '../template-preview/models/types';
8
+ import { WebpushTemplateVariables } from '../template-preview/models/WebpushTemplate';
9
+ import { ExtrasWhatsapp, POD, TemplateAnalyticsI, WhatsAppPickerMeta, WhatsAppTemplateVariables } from '../template-preview/models/WhatsAppTemplate';
10
+ import { VariableV3 } from '../variable-picker-v3/model';
11
11
  export interface TemplateContextMapperProps {
12
12
  selectedTemplate: NonNullTemplateTypes;
13
13
  closeDialog?: () => void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash/cloneDeep"),l=require("react"),a=require("../../utils/StringUtils.js"),o=require("../../constants/Theme.js"),i=require("../modals/styledModal.js"),r=require("../template-preview/helpers/templateMiscHelper.js"),s=require("../template-preview/models/Channels.js"),n=require("../template-preview/models/WhatsAppTemplate.js"),d=require("./context/templateModalContext.js"),u=require("./modalElements/Footer.js"),c=require("./modalElements/TemplateAnalyticsComponent.js"),p=require("./modalElements/TemplateSelectModalContent.js"),v=require("./utils/convertPlaceholdersToBikDropdown.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=m(t);exports.TemplateContextMapper=t=>{var m,h,b,S,f,E,x,T;const{selectedTemplate:P,closeDialog:g,showVariableMapping:y,channel:I,htmlContent:j,templateVariables:D,onTemplateSelect:L,globalPlaceholders:w,showOnlyContent:A,whatsappSpecificPickerMeta:k,zIndex:M,showVariableModal:V,variableList:H,discountCode:N,setDiscountCode:O,onBackPress:q,enabledCustomText:B,variableListForImage:F,showSampleValues:_,disableEditVariable:W,pod:Y,extras:R,pickerConf:$,selectedCarouselProducts:z,disableEditExpiry:Q,cardWidth:U,onDeleteSelectedProducts:G,fileName:J,setFileName:K,hideDeviceContainerInPreview:X,maxCharLimit:Z,onDefaultVariableSelect:ee,skipDefaultVariableContent:te,disableDatePicker:le,disableCopyCode:ae,initialExpiryDateTime:oe,showDiscountCodeExpiryInfo:ie,footerButtonText:re,footerInfoText:se,templateAnalytics:ne}=t;l.useEffect((()=>{be(j)}),[j]);const de=r.determineCardIndex(I),ue=r.isItCarousal(I,P),ce=null==P?void 0:P.isProductCarouselType,[pe,ve]=l.useState(I===s.CHANNEL_TYPE.EMAIL||I==s.CHANNEL_TYPE.WEBPUSH||ue?"desktop":"mobile"),[me,Ce]=l.useState(!1),[he,be]=l.useState(j),[Se,fe]=l.useState(!1),[Ee,xe]=l.useState([]),[Te,Pe]=l.useState({}),[ge,ye]=l.useState(P),[Ie,je]=l.useState([]),[De,Le]=l.useState(null),[we,Ae]=l.useState(!1),[ke,Me]=l.useState(null!=D?D:[]),[Ve,He]=l.useState(!1),[Ne,Oe]=l.useState(ue?(null===(h=null===(m=null==ge?void 0:ge.mapping)||void 0===m?void 0:m.body)||void 0===h?void 0:h.length)?-1:0:-1),[qe,Be]=l.useState([]),[Fe,_e]=l.useState(void 0),We=l.useRef(null),[Ye,Re]=l.useState(!1),[$e,ze]=l.useState(!1),[Qe,Ue]=l.useState(!1),[Ge,Je]=l.useState(!0),[Ke,Xe]=l.useState(!0),[Ze,et]=l.useState({});l.useEffect((()=>{z?Be(z):ce&&Be([])}),[z]),l.useEffect((()=>{var e;if(!we&&ce&&(!z||0===Be.length)){const t=null===(e=null==ge?void 0:ge.components)||void 0===e?void 0:e[de].cards,l=[];null==t||t.forEach((e=>{var t;null===(t=null==e?void 0:e.components)||void 0===t||t.forEach((e=>{var t,a,o;"HEADER"===e.type&&l.push(null!==(o=null===(a=null===(t=e.example)||void 0===t?void 0:t.header_handle)||void 0===a?void 0:a[0])&&void 0!==o?o:"")}))})),je(l),Ae(!0)}}),[we]);const tt=l.useMemo((()=>v.convertPlaceholdersToBikDropdown(w)),[w]);return l.useEffect((()=>{_e(C.default(H))}),[H]),(null==ne?void 0:ne.show)&&Ge&&ne.templateQuality&&Object.values(n.TEMPLATE_QUALITY).find((e=>e===String(ne.templateQuality)))?e.jsx(c.TemplateAnalyticsComponent,{headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===s.CHANNEL_TYPE.WHATSAPP?`${a.default.capitaliseFirstLetterOfString(null!==(b=null==ge?void 0:ge.category)&&void 0!==b?b:"")} • ${null!==(S=null==ge?void 0:ge.templateCategory)&&void 0!==S?S:""}`:"",templateAnalytics:ne,analyticsData:ne.data,onClose:()=>{null==g||g(),Je(!1),Xe(!1)},onCancel:()=>{Je(!1),Xe(!1)},onProceed:()=>{Je(!1),Xe(!0)},templateId:(null==ge?void 0:ge.templateId)||""}):e.jsx(d.TemplateModalContext.Provider,Object.assign({value:{hideFooterButton:Qe,setHideFooterButton:Ue,hideCrossButton:$e,setHideCrossButton:ze,variableList:Fe,setVariableList:_e,variableCallback:De,setVariableCallback:Le,showVariablePicker:me,setShowVariablePicker:Ce,template:ge,setTemplate:ye,device:pe,setDevice:ve,display_content:he,setDisplayContent:be,originalVariableList:ke,setOriginalVariableList:Me,isError:Se,setIsError:fe,channel:I,globalNormalizedPlaceholders:tt,templateSelectionTriggered:Ve,setTemplateSelectionTriggered:He,enabledCustomText:B,disableEditVariable:W,pod:Y,extras:R,isWhatsappCarousel:ue,selectedCarouselIndex:Ne,setSelectedCarouselIndex:Oe,isProductCarouselType:ce,templateErrorIndexes:Te,cardCount:ue?null===(E=null===(f=P.components)||void 0===f?void 0:f[de].cards)||void 0===E?void 0:E.length:void 0,errorIndexes:Ee,setErrorIndexes:xe,pickerConf:$,carouselProducts:qe,setCarouselProducts:Be,disableEditExpiry:Q,cardWidth:U,cardImages:Ie,onDeleteSelectedProducts:G,hideDeviceContainerInPreview:X,sliderRef:We,isCarouselHovered:Ye,setIsCarouselHovered:Re,maxCharLimit:Z,ctaOptionsErrors:Ze,setCtaOptionsErrors:et,onDefaultVariableSelect:ee,disableDatePicker:le,disableCopyCode:ae,initialExpiryDateTime:oe,showDiscountCodeExpiryInfo:ie,cardIndex:de}},{children:A?e.jsx(p.default,{variableListFromProps:H,channel:s.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(i.StyledModal,Object.assign({hideCrossButton:$e,zIndex:M,centralContainerStyles:{width:ue?900:I===s.CHANNEL_TYPE.EMAIL&&y?1e3:800},open:Ke,onClose:()=>{Xe(!1),null==g||g()},headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===s.CHANNEL_TYPE.WHATSAPP||r.isRCSChannel(I)?`${a.default.capitaliseFirstLetterOfString(null!==(x=null==ge?void 0:ge.category)&&void 0!==x?x:"")} • ${null!==(T=null==ge?void 0:ge.templateCategory)&&void 0!==T?T:""}`:"",onBackPress:()=>{if(null==ne?void 0:ne.show)return Je(!0),void Xe(!1);null==q||q()},modalHeaderStyles:{borderBottom:`1px solid ${o.COLORS.stroke.primary}`}},{children:[e.jsx(p.default,{variableListFromProps:H,showSampleValues:_,showVariableMapping:y,channel:I,whatsappSpecificPickerMeta:k,showVariableModal:V,discountCode:N,setDiscountCode:O,variableListForImage:F&&(null==F?void 0:F.length)>0?F:Fe,fileName:J,setFileName:e=>{null==K||K(e)},skipDefaultVariableContent:te}),L?e.jsx(u.default,{isWhatsappCarousel:null!=ue&&ue,onSelect:function(){var e;if((null==qe?void 0:qe.length)<1&&ce)return void fe(!0);if(Object.keys(Ze).length>0&&Y!==n.POD.CHATBOT)return void fe(!0);const t=null==L?void 0:L(ge,ke,null!=he?he:"",qe);Pe(null!==(e=null==t?void 0:t.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==t?void 0:t.errorIndexes)||(null==t?void 0:t.error)?((null==t?void 0:t.errorIndexes)&&xe(t.errorIndexes),(null==t?void 0:t.error)&&fe(!!(null==t?void 0:t.error))):He(!0)},footerButtonText:re,footerInfoText:se}):e.jsx(e.Fragment,{})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lodash"),l=require("react"),a=require("../../utils/StringUtils.js"),o=require("../../constants/Theme.js"),i=require("../modals/styledModal.js"),r=require("../template-preview/helpers/templateMiscHelper.js"),s=require("../template-preview/models/Channels.js"),n=require("../template-preview/models/WhatsAppTemplate.js"),d=require("./context/templateModalContext.js"),u=require("./modalElements/Footer.js"),c=require("./modalElements/TemplateAnalyticsComponent.js"),p=require("./modalElements/TemplateSelectModalContent.js"),v=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=m=>{var C,h,b,S,E,x,f,T;const{selectedTemplate:P,closeDialog:g,showVariableMapping:y,channel:I,htmlContent:D,templateVariables:L,onTemplateSelect:j,globalPlaceholders:w,showOnlyContent:A,whatsappSpecificPickerMeta:k,zIndex:M,showVariableModal:V,variableList:H,discountCode:N,setDiscountCode:O,onBackPress:q,enabledCustomText:B,variableListForImage:F,showSampleValues:_,disableEditVariable:W,pod:Y,extras:R,pickerConf:$,selectedCarouselProducts:z,disableEditExpiry:Q,cardWidth:U,onDeleteSelectedProducts:G,fileName:J,setFileName:K,hideDeviceContainerInPreview:X,maxCharLimit:Z,onDefaultVariableSelect:ee,skipDefaultVariableContent:te,disableDatePicker:le,disableCopyCode:ae,initialExpiryDateTime:oe,showDiscountCodeExpiryInfo:ie,footerButtonText:re,footerInfoText:se,templateAnalytics:ne}=m;l.useEffect((()=>{be(D)}),[D]);const de=r.determineCardIndex(I),ue=r.isItCarousal(I,P),ce=null==P?void 0:P.isProductCarouselType,[pe,ve]=l.useState(I===s.CHANNEL_TYPE.EMAIL||I==s.CHANNEL_TYPE.WEBPUSH||ue?"desktop":"mobile"),[me,Ce]=l.useState(!1),[he,be]=l.useState(D),[Se,Ee]=l.useState(!1),[xe,fe]=l.useState([]),[Te,Pe]=l.useState({}),[ge,ye]=l.useState(P),[Ie,De]=l.useState([]),[Le,je]=l.useState(null),[we,Ae]=l.useState(!1),[ke,Me]=l.useState(null!=L?L:[]),[Ve,He]=l.useState(!1),[Ne,Oe]=l.useState(ue?(null===(h=null===(C=null==ge?void 0:ge.mapping)||void 0===C?void 0:C.body)||void 0===h?void 0:h.length)?-1:0:-1),[qe,Be]=l.useState([]),[Fe,_e]=l.useState(void 0),We=l.useRef(null),[Ye,Re]=l.useState(!1),[$e,ze]=l.useState(!1),[Qe,Ue]=l.useState(!1),[Ge,Je]=l.useState(!0),[Ke,Xe]=l.useState(!0),[Ze,et]=l.useState({});l.useEffect((()=>{z?Be(z):ce&&Be([])}),[z]),l.useEffect((()=>{var e;if(!we&&ce&&(!z||0===Be.length)){const t=null===(e=null==ge?void 0:ge.components)||void 0===e?void 0:e[de].cards,l=[];null==t||t.forEach((e=>{var t;null===(t=null==e?void 0:e.components)||void 0===t||t.forEach((e=>{var t,a,o;"HEADER"===e.type&&l.push(null!==(o=null===(a=null===(t=e.example)||void 0===t?void 0:t.header_handle)||void 0===a?void 0:a[0])&&void 0!==o?o:"")}))})),De(l),Ae(!0)}}),[we]);const tt=l.useMemo((()=>v.convertPlaceholdersToBikDropdown(w)),[w]);return l.useEffect((()=>{_e(t.cloneDeep(H))}),[H]),(null==ne?void 0:ne.show)&&Ge&&ne.templateQuality&&Object.values(n.TEMPLATE_QUALITY).find((e=>e===String(ne.templateQuality)))?e.jsx(c.TemplateAnalyticsComponent,{headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===s.CHANNEL_TYPE.WHATSAPP?`${a.default.capitaliseFirstLetterOfString(null!==(b=null==ge?void 0:ge.category)&&void 0!==b?b:"")} • ${null!==(S=null==ge?void 0:ge.templateCategory)&&void 0!==S?S:""}`:"",templateAnalytics:ne,analyticsData:ne.data,onClose:()=>{null==g||g(),Je(!1),Xe(!1)},onCancel:()=>{Je(!1),Xe(!1)},onProceed:()=>{Je(!1),Xe(!0)},templateId:(null==ge?void 0:ge.templateId)||""}):e.jsx(d.TemplateModalContext.Provider,Object.assign({value:{hideFooterButton:Qe,setHideFooterButton:Ue,hideCrossButton:$e,setHideCrossButton:ze,variableList:Fe,setVariableList:_e,variableCallback:Le,setVariableCallback:je,showVariablePicker:me,setShowVariablePicker:Ce,template:ge,setTemplate:ye,device:pe,setDevice:ve,display_content:he,setDisplayContent:be,originalVariableList:ke,setOriginalVariableList:Me,isError:Se,setIsError:Ee,channel:I,globalNormalizedPlaceholders:tt,templateSelectionTriggered:Ve,setTemplateSelectionTriggered:He,enabledCustomText:B,disableEditVariable:W,pod:Y,extras:R,isWhatsappCarousel:ue,selectedCarouselIndex:Ne,setSelectedCarouselIndex:Oe,isProductCarouselType:ce,templateErrorIndexes:Te,cardCount:ue?null===(x=null===(E=P.components)||void 0===E?void 0:E[de].cards)||void 0===x?void 0:x.length:void 0,errorIndexes:xe,setErrorIndexes:fe,pickerConf:$,carouselProducts:qe,setCarouselProducts:Be,disableEditExpiry:Q,cardWidth:U,cardImages:Ie,onDeleteSelectedProducts:G,hideDeviceContainerInPreview:X,sliderRef:We,isCarouselHovered:Ye,setIsCarouselHovered:Re,maxCharLimit:Z,ctaOptionsErrors:Ze,setCtaOptionsErrors:et,onDefaultVariableSelect:ee,disableDatePicker:le,disableCopyCode:ae,initialExpiryDateTime:oe,showDiscountCodeExpiryInfo:ie,cardIndex:de}},{children:A?e.jsx(p.default,{variableListFromProps:H,channel:s.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(i.StyledModal,Object.assign({hideCrossButton:$e,zIndex:M,centralContainerStyles:{width:ue?900:I===s.CHANNEL_TYPE.EMAIL&&y?1e3:800},open:Ke,onClose:()=>{Xe(!1),null==g||g()},headingTitle:null==ge?void 0:ge.label,headingSubtitle:I===s.CHANNEL_TYPE.WHATSAPP||r.isRCSChannel(I)?`${a.default.capitaliseFirstLetterOfString(null!==(f=null==ge?void 0:ge.category)&&void 0!==f?f:"")} • ${null!==(T=null==ge?void 0:ge.templateCategory)&&void 0!==T?T:""}`:"",onBackPress:()=>{if(null==ne?void 0:ne.show)return Je(!0),void Xe(!1);null==q||q()},modalHeaderStyles:{borderBottom:`1px solid ${o.COLORS.stroke.primary}`}},{children:[e.jsx(p.default,{variableListFromProps:H,showSampleValues:_,showVariableMapping:y,channel:I,whatsappSpecificPickerMeta:k,showVariableModal:V,discountCode:N,setDiscountCode:O,variableListForImage:F&&(null==F?void 0:F.length)>0?F:Fe,fileName:J,setFileName:e=>{null==K||K(e)},skipDefaultVariableContent:te}),j?e.jsx(u.default,{isWhatsappCarousel:null!=ue&&ue,onSelect:function(){var e;if((null==qe?void 0:qe.length)<1&&ce)return void Ee(!0);if(Object.keys(Ze).length>0&&Y!==n.POD.CHATBOT)return void Ee(!0);const t=null==j?void 0:j(ge,ke,null!=he?he:"",qe);Pe(null!==(e=null==t?void 0:t.templateErrorIndexes)&&void 0!==e?e:{body:[],buttons:[]}),(null==t?void 0:t.errorIndexes)||(null==t?void 0:t.error)?((null==t?void 0:t.errorIndexes)&&fe(t.errorIndexes),(null==t?void 0:t.error)&&Ee(!!(null==t?void 0:t.error))):He(!0)},footerButtonText:re,footerInfoText:se}):e.jsx(e.Fragment,{})]}))}))};
@@ -1,13 +1,13 @@
1
- import type { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
- import type { VariableV3 } from "../../../helpers";
1
+ import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
2
+ import { VariableV3 } from "../../../helpers";
3
3
  import React, { LegacyRef } from 'react';
4
4
  import Slider from 'react-slick';
5
- import type { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
5
+ import { VariableListInterfaceV2 } from "../../add-variableV2";
6
+ import { CarouselProduct } from "../modalElements/EditWhatsAppCarouselTemplateV2";
6
7
  import { CHANNEL_TYPE } from "../../template-preview/models/Channels";
7
- import type { globalNormalizedPlaceholdersType } from "../../template-preview/models/TemplateMeta";
8
- import type { AllTemplateTypes, AllTemplateVariables } from "../../template-preview/models/types";
9
- import type { ExtrasWhatsapp } from "../../template-preview/models/WhatsAppTemplate";
10
- import { CarouselProduct } from '../modalElements/modal';
8
+ import { globalNormalizedPlaceholdersType } from "../../template-preview/models/TemplateMeta";
9
+ import { AllTemplateTypes, AllTemplateVariables } from "../../template-preview/models/types";
10
+ import { ExtrasWhatsapp } from "../../template-preview/models/WhatsAppTemplate";
11
11
  export type DEVICE_TYPES = 'desktop' | 'mobile';
12
12
  export declare const TemplateModalContext: React.Context<{
13
13
  showDiscountCodeExpiryInfo?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import type { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
1
+ import { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
2
2
  export type AdditionalVariableProps = {
3
3
  variableList?: VariableListInterfaceV2[];
4
4
  categoryDisplayName: string;
@@ -1,8 +1,6 @@
1
- import type { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
2
- import type { CUSTOM_VARIABLE } from "../../template-preview/models/TemplateMeta";
3
- import type { AllTemplateVariables } from "../../template-preview/models/types";
4
- import type { WebPushTemplateComponent, WebpushTemplateType } from "../../template-preview/models/WebpushTemplate";
5
- import { BUTTON_TYPE } from "../../template-preview/models/WhatsAppTemplate";
1
+ import { VariableListInterfaceV2 } from "../../add-variableV2";
2
+ import { AllTemplateVariables, BUTTON_TYPE, CUSTOM_VARIABLE } from "../../template-preview";
3
+ import { WebPushTemplateComponent, WebpushTemplateType } from "../../template-preview/models/WebpushTemplate";
6
4
  declare const useWebPushTemplate: () => {
7
5
  processWebpushTemplate: (template: WebpushTemplateType, variableList: VariableListInterfaceV2[], originalVar?: AllTemplateVariables, disableEditVariable?: boolean) => Promise<{
8
6
  templateVariableMapping: {
@@ -51,7 +49,7 @@ declare const useWebPushTemplate: () => {
51
49
  redirectionLink?: string[] | undefined;
52
50
  } | undefined;
53
51
  components: WebPushTemplateComponent;
54
- whatsappSpecificPickerMeta?: import("../../template-preview/models/WhatsAppTemplate").WhatsAppPickerMeta | undefined;
52
+ whatsappSpecificPickerMeta?: import("../../template-preview").WhatsAppPickerMeta | undefined;
55
53
  };
56
54
  }>;
57
55
  isValidUrl: (url: string) => boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../_virtual/_tslib.js"),e=require("../../template-preview/constants/TemplateConstants.js"),i=require("../../template-preview/models/WhatsAppTemplate.js"),l=require("../../../utils/variableUtils.js");exports.default=()=>{function n(t,e,i,n){const o=e.map(((e,o)=>{const u=a(e);if(n)return{variableName:e,isEditableVariable:!1,updatedValue:e,index:o,variableValue:e,type:"string"};const s=function(t,e,i){const n=i&&i.length?i:l.extractVariables(t);if(!n||!n.length)return[];const a=[];return n.forEach(((t,i)=>{const l=r(e,`{{${t}}}`);if(l){const{actualValue:t,defaultValue:e}=l,n="{{custom.text}}"===t||"{{custom.url}}"===t;a.push({editable:n,variableVal:e,editableDefaultValues:e,variableName:t,idx:i})}})),a}(u?e:i,t);if(s.length>0){const t=s[0];return{variableName:t.variableName,isEditableVariable:!0,updatedValue:(null==t?void 0:t.updatedValue)?null==t?void 0:t.updatedValue:u?t.variableName:e,index:o,variableValue:t.variableVal,type:"string"}}return null})).filter((t=>null!==t));return o}const a=t=>t.includes("{{")&&t.includes("}}"),o=(t,e)=>t&&t.length?t.flatMap(((t,i)=>{var n;return a(t)?t.includes("editableVariable")?(null===(n=null==e?void 0:e[i])||void 0===n?void 0:n.value)||t:l.extractVariables(t).map((t=>`{{${t}}}`))||[]:t})):[];const r=(t,e)=>{for(const i of t)for(const t in i.variables){const l=i.variables[t];if(l.actualValue===e||e.includes("editableVariable")&&l.actualValue.includes("custom.text"))return l}return null};return{processWebpushTemplate:function(r,u,s,d){var b,c,v,p,f,m,L,V;return t.__awaiter(this,void 0,void 0,(function*(){const t=Object.assign({},r);t.components=function(t){let e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){console.error("Error parsing webpush component JSON:",t),e={}}else e=t;return e}(t.components);const{components:{title:h,body:g,buttons:y,icon:_,image:x},webpushBroadcastConfig:C}=t;let w={title:o(null!==(b=null==C?void 0:C.title)&&void 0!==b?b:[]),body:o(null!==(c=null==C?void 0:C.body)&&void 0!==c?c:[],null==g?void 0:g.variables),buttonsW:null!==(v=null==C?void 0:C.buttons)&&void 0!==v?v:[]};if(!t.webpushBroadcastConfig){const i=null!==(p=null==g?void 0:g.text)&&void 0!==p?p:"string"==typeof g?g:"",n=y&&(null==y?void 0:y.length)?y.map((t=>(null==t?void 0:t.websiteLink)==e.CUSTOM_URL_PLACEHOLDER?null==t?void 0:t.redirectionLink:null==t?void 0:t.websiteLink)).filter((t=>void 0!==t)):[],a=l.extractVariables(i).map(((t,e)=>{var i,l;return t.includes("editableVariable")?(null===(l=null===(i=null==g?void 0:g.variables)||void 0===i?void 0:i[e])||void 0===l?void 0:l.value)||t:`{{${t}}}`}));w={title:l.extractVariables(h).map((t=>`{{${t}}}`)),body:a,buttonsW:[]};const o={title:null!==(f=w.title)&&void 0!==f?f:[],body:null!==(m=w.body)&&void 0!==m?m:[],buttons:n,icon:_?[_]:void 0,image:x?[x]:void 0,redirectionLink:(null==g?void 0:g.redirectionLink)?[null==g?void 0:g.redirectionLink]:[]};t.webpushBroadcastConfig=o}const E=y&&y.length?y.map(((t,l)=>({type:i.BUTTON_TYPE.URL,text:null==t?void 0:t.text,url:"https://d.bik.ai/{{1}}",example:w.buttonsW&&w.buttonsW.length?a(w.buttonsW[l])?[""]:[w.buttonsW[l]]:t.redirectionLink?[t.redirectionLink]:void 0,buttonVariable:w.buttonsW&&w.buttonsW.length?a(w.buttonsW[l])?w.buttonsW[l]:e.CUSTOM_URL_PLACEHOLDER_VAR:t.websiteLink?t.websiteLink==e.CUSTOM_URL_PLACEHOLDER?e.CUSTOM_URL_PLACEHOLDER_VAR:t.websiteLink:e.CUSTOM_URL_PLACEHOLDER_VAR,index:l}))):[],O={title:n(u,w.title,h,d),body:n(u,w.body,(null==g?void 0:g.text)||"",d),buttons:E};return{templateVariableMapping:{title:(null===(L=null==s?void 0:s.title)||void 0===L?void 0:L.length)?s.title:O.title,body:(null===(V=null==s?void 0:s.body)||void 0===V?void 0:V.length)?s.body:O.body,buttons:O.buttons,icon:[],header:[]},webpushBroadcastConfig:t.webpushBroadcastConfig,template:t}}))},isValidUrl:t=>{try{return new URL(t),!0}catch(t){return!1}}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../constants/Theme.js"),require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var t=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var i=require("../../template-preview/constants/TemplateConstants.js"),l=require("../../../utils/variableUtils.js");exports.default=()=>{function n(e,t,i,n){const r=t.map(((t,r)=>{const u=a(t);if(n)return{variableName:t,isEditableVariable:!1,updatedValue:t,index:r,variableValue:t,type:"string"};const s=function(e,t,i){const n=i&&i.length?i:l.extractVariables(e);if(!n||!n.length)return[];const a=[];return n.forEach(((e,i)=>{const l=o(t,`{{${e}}}`);if(l){const{actualValue:e,defaultValue:t}=l,n="{{custom.text}}"===e||"{{custom.url}}"===e;a.push({editable:n,variableVal:t,editableDefaultValues:t,variableName:e,idx:i})}})),a}(u?t:i,e);if(s.length>0){const e=s[0];return{variableName:e.variableName,isEditableVariable:!0,updatedValue:(null==e?void 0:e.updatedValue)?null==e?void 0:e.updatedValue:u?e.variableName:t,index:r,variableValue:e.variableVal,type:"string"}}return null})).filter((e=>null!==e));return r}const a=e=>e.includes("{{")&&e.includes("}}"),r=(e,t)=>e&&e.length?e.flatMap(((e,i)=>{var n;return a(e)?e.includes("editableVariable")?(null===(n=null==t?void 0:t[i])||void 0===n?void 0:n.value)||e:l.extractVariables(e).map((e=>`{{${e}}}`))||[]:e})):[];const o=(e,t)=>{for(const i of e)for(const e in i.variables){const l=i.variables[e];if(l.actualValue===t||t.includes("editableVariable")&&l.actualValue.includes("custom.text"))return l}return null};return{processWebpushTemplate:function(o,u,s,d){var b,v,c,p,m,h,f,L;return e.__awaiter(this,void 0,void 0,(function*(){const e=Object.assign({},o);e.components=function(e){let t;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){console.error("Error parsing webpush component JSON:",e),t={}}else t=e;return t}(e.components);const{components:{title:V,body:g,buttons:w,icon:y,image:_},webpushBroadcastConfig:C}=e;let x={title:r(null!==(b=null==C?void 0:C.title)&&void 0!==b?b:[]),body:r(null!==(v=null==C?void 0:C.body)&&void 0!==v?v:[],null==g?void 0:g.variables),buttonsW:null!==(c=null==C?void 0:C.buttons)&&void 0!==c?c:[]};if(!e.webpushBroadcastConfig){const t=null!==(p=null==g?void 0:g.text)&&void 0!==p?p:"string"==typeof g?g:"",n=w&&(null==w?void 0:w.length)?w.map((e=>(null==e?void 0:e.websiteLink)==i.CUSTOM_URL_PLACEHOLDER?null==e?void 0:e.redirectionLink:null==e?void 0:e.websiteLink)).filter((e=>void 0!==e)):[],a=l.extractVariables(t).map(((e,t)=>{var i,l;return e.includes("editableVariable")?(null===(l=null===(i=null==g?void 0:g.variables)||void 0===i?void 0:i[t])||void 0===l?void 0:l.value)||e:`{{${e}}}`}));x={title:l.extractVariables(V).map((e=>`{{${e}}}`)),body:a,buttonsW:[]};const r={title:null!==(m=x.title)&&void 0!==m?m:[],body:null!==(h=x.body)&&void 0!==h?h:[],buttons:n,icon:y?[y]:void 0,image:_?[_]:void 0,redirectionLink:(null==g?void 0:g.redirectionLink)?[null==g?void 0:g.redirectionLink]:[]};e.webpushBroadcastConfig=r}const W=w&&w.length?w.map(((e,l)=>({type:t.BUTTON_TYPE.URL,text:null==e?void 0:e.text,url:"https://d.bik.ai/{{1}}",example:x.buttonsW&&x.buttonsW.length?a(x.buttonsW[l])?[""]:[x.buttonsW[l]]:e.redirectionLink?[e.redirectionLink]:void 0,buttonVariable:x.buttonsW&&x.buttonsW.length?a(x.buttonsW[l])?x.buttonsW[l]:i.CUSTOM_URL_PLACEHOLDER_VAR:e.websiteLink?e.websiteLink==i.CUSTOM_URL_PLACEHOLDER?i.CUSTOM_URL_PLACEHOLDER_VAR:e.websiteLink:i.CUSTOM_URL_PLACEHOLDER_VAR,index:l}))):[],k={title:n(u,x.title,V,d),body:n(u,x.body,(null==g?void 0:g.text)||"",d),buttons:W};return{templateVariableMapping:{title:(null===(f=null==s?void 0:s.title)||void 0===f?void 0:f.length)?s.title:k.title,body:(null===(L=null==s?void 0:s.body)||void 0===L?void 0:L.length)?s.body:k.body,buttons:k.buttons,icon:[],header:[]},webpushBroadcastConfig:e.webpushBroadcastConfig,template:e}}))},isValidUrl:e=>{try{return new URL(e),!0}catch(e){return!1}}}};
@@ -1,5 +1,5 @@
1
- import type { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
2
- import type { WhatsAppPickerMeta } from "../../template-preview/models/WhatsAppTemplate";
1
+ import { VariableListInterfaceV2 } from "../../add-variableV2/AddVariableV2";
2
+ import { WhatsAppPickerMeta } from "../../template-preview/models/WhatsAppTemplate";
3
3
  export interface BodyProps {
4
4
  showVariableMapping: boolean;
5
5
  showOnlyContent?: boolean;