@bikdotai/bik-component-library 0.0.826 → 0.0.828

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 (361) hide show
  1. package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +1 -1
  2. package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
  3. package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
  4. package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
  5. package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
  6. package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
  7. package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
  8. package/dist/cjs/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js.map +1 -1
  9. package/dist/cjs/components/TypographyStyle.js +41 -20
  10. package/dist/cjs/components/TypographyStyle.js.map +1 -1
  11. package/dist/cjs/components/WhatsAppTextEditor/AIRephraseButton.js +16 -5
  12. package/dist/cjs/components/WhatsAppTextEditor/AIRephraseButton.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +17 -1
  14. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  15. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js.map +1 -1
  16. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js.map +1 -1
  17. package/dist/cjs/components/avatar/Avatar.js +1 -1
  18. package/dist/cjs/components/avatar/Avatar.js.map +1 -1
  19. package/dist/cjs/components/avatar/Avatar.styled.js +4 -4
  20. package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
  21. package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
  22. package/dist/cjs/components/avatar/AvatarHelper.js.map +1 -1
  23. package/dist/cjs/components/bik-layout/BikSidebar.js.map +1 -1
  24. package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js +2 -0
  25. package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
  26. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +2 -0
  27. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
  28. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +294 -0
  29. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
  30. package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +2 -0
  31. package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
  32. package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
  33. package/dist/cjs/components/bik-layout/CommonStyles.js.map +1 -1
  34. package/dist/cjs/components/button/Button.js +1 -1
  35. package/dist/cjs/components/button/Button.js.map +1 -1
  36. package/dist/cjs/components/button/Button.styled.js +13 -13
  37. package/dist/cjs/components/button/Button.styled.js.map +1 -1
  38. package/dist/cjs/components/button/themes.js +6 -6
  39. package/dist/cjs/components/button/themes.js.map +1 -1
  40. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  41. package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
  42. package/dist/cjs/components/checkBox/CheckBox.styled.js +21 -20
  43. package/dist/cjs/components/checkBox/CheckBox.styled.js.map +1 -1
  44. package/dist/cjs/components/country-code-picker/CountryCodePicker.js.map +1 -1
  45. package/dist/cjs/components/country-code-picker/CountryPicker.js.map +1 -1
  46. package/dist/cjs/components/datePicker/DatePicker.styled.js +37 -4
  47. package/dist/cjs/components/datePicker/DatePicker.styled.js.map +1 -1
  48. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  49. package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
  50. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  51. package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
  52. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  53. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  54. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +9 -8
  55. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  56. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
  57. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
  58. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
  59. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
  60. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +9 -9
  61. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  62. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  63. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  64. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +6 -2
  65. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
  66. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  67. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  68. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  69. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  70. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  71. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
  72. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  73. package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
  74. package/dist/cjs/components/dropdown-button/DropdownButton.style.js +20 -6
  75. package/dist/cjs/components/dropdown-button/DropdownButton.style.js.map +1 -1
  76. package/dist/cjs/components/dual-icon-button/DualIconButton.js +2 -0
  77. package/dist/cjs/components/dual-icon-button/DualIconButton.js.map +1 -0
  78. package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js +33 -0
  79. package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
  80. package/dist/cjs/components/fab-menu/FABMenu.js.map +1 -1
  81. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  82. package/dist/cjs/components/icon-button/IconButton.js.map +1 -1
  83. package/dist/cjs/components/icon-button/IconButton.styled.js +18 -12
  84. package/dist/cjs/components/icon-button/IconButton.styled.js.map +1 -1
  85. package/dist/cjs/components/icon-button/theme.js +1 -1
  86. package/dist/cjs/components/icon-button/theme.js.map +1 -1
  87. package/dist/cjs/components/input/Input.js +1 -1
  88. package/dist/cjs/components/input/Input.js.map +1 -1
  89. package/dist/cjs/components/input/Input.styled.js +27 -16
  90. package/dist/cjs/components/input/Input.styled.js.map +1 -1
  91. package/dist/cjs/components/list-item/ListItem.js +1 -1
  92. package/dist/cjs/components/list-item/ListItem.js.map +1 -1
  93. package/dist/cjs/components/list-item/ListItem.styled.js +6 -6
  94. package/dist/cjs/components/list-item/ListItem.styled.js.map +1 -1
  95. package/dist/cjs/components/list-item/themes.js +40 -21
  96. package/dist/cjs/components/list-item/themes.js.map +1 -1
  97. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  98. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
  99. package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
  100. package/dist/cjs/components/multi-level-dropdown/MenuItem.js.map +1 -1
  101. package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
  102. package/dist/cjs/components/multi-level-dropdown/MenuList.js.map +1 -1
  103. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  104. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
  105. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +32 -29
  106. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
  107. package/dist/cjs/components/switch/Switch.js.map +1 -1
  108. package/dist/cjs/components/tag/Tag.js +1 -1
  109. package/dist/cjs/components/tag/Tag.js.map +1 -1
  110. package/dist/cjs/components/tag/Tag.styled.js +4 -4
  111. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  112. package/dist/cjs/components/tag/model.js.map +1 -1
  113. package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
  114. package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
  115. package/dist/cjs/components/whats-new/WhatsNew.styles.js +9 -8
  116. package/dist/cjs/components/whats-new/WhatsNew.styles.js.map +1 -1
  117. package/dist/cjs/components/whats-new/WhatsNewButton.js +2 -2
  118. package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
  119. package/dist/cjs/components/whats-new/WhatsNewPanel.js.map +1 -1
  120. package/dist/cjs/constants/Theme.js +1 -1
  121. package/dist/cjs/constants/Theme.js.map +1 -1
  122. package/dist/cjs/editor/BikEditor.js +1 -1
  123. package/dist/cjs/editor/BikEditor.js.map +1 -1
  124. package/dist/cjs/editor/BikEditor.styles.js +18 -6
  125. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  126. package/dist/cjs/editor/BikEditor.types.js.map +1 -1
  127. package/dist/cjs/editor/extensions/buildExtensions.js +2 -2
  128. package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
  129. package/dist/cjs/editor/extensions/characterLimit/CharacterLimitExtension.js +8 -0
  130. package/dist/cjs/editor/extensions/characterLimit/CharacterLimitExtension.js.map +1 -0
  131. package/dist/cjs/editor/extensions/editorDropdown.styles.js +10 -15
  132. package/dist/cjs/editor/extensions/editorDropdown.styles.js.map +1 -1
  133. package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js +1 -1
  134. package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
  135. package/dist/cjs/icons/Media/Visual/{Frame26086263.js → FormkitNeutral.js} +1 -1
  136. package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +1 -0
  137. package/dist/cjs/icons/Media/Visual/{IconTrailing.js → FormkitSad.js} +1 -1
  138. package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +1 -0
  139. package/dist/cjs/icons/index.js +1 -1
  140. package/dist/cjs/index.js +1 -1
  141. package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +61 -59
  142. package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
  143. package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +6 -0
  144. package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +127 -89
  145. package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
  146. package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +232 -129
  147. package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
  148. package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +6 -2
  149. package/dist/esm/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
  150. package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js.map +1 -1
  151. package/dist/esm/components/QueryBuilder/helpers/PropertyCustomProcessor.d.ts +1 -1
  152. package/dist/esm/components/TypographyStyle.d.ts +8 -0
  153. package/dist/esm/components/TypographyStyle.js +63 -40
  154. package/dist/esm/components/TypographyStyle.js.map +1 -1
  155. package/dist/esm/components/WhatsAppTextEditor/AIRephraseButton.js +54 -43
  156. package/dist/esm/components/WhatsAppTextEditor/AIRephraseButton.js.map +1 -1
  157. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +167 -120
  158. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  159. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.d.ts +1 -1
  160. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js.map +1 -1
  161. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.type.d.ts +57 -0
  162. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LazyCharts.d.ts +1 -1
  163. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.d.ts +1 -1
  164. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js.map +1 -1
  165. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.type.d.ts +46 -0
  166. package/dist/esm/components/avatar/Avatar.d.ts +2 -1
  167. package/dist/esm/components/avatar/Avatar.js +54 -76
  168. package/dist/esm/components/avatar/Avatar.js.map +1 -1
  169. package/dist/esm/components/avatar/Avatar.styled.js +8 -8
  170. package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
  171. package/dist/esm/components/avatar/AvatarHelper.d.ts +5 -4
  172. package/dist/esm/components/avatar/AvatarHelper.js +4 -4
  173. package/dist/esm/components/avatar/AvatarHelper.js.map +1 -1
  174. package/dist/esm/components/bik-layout/BikSidebar.js.map +1 -1
  175. package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +33 -0
  176. package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +272 -0
  177. package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +1 -0
  178. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +27 -0
  179. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +12 -0
  180. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +53 -0
  181. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +1 -0
  182. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +44 -0
  183. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +310 -0
  184. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +1 -0
  185. package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +2 -0
  186. package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +107 -0
  187. package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +1 -0
  188. package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
  189. package/dist/esm/components/bik-layout/CommonStyles.js.map +1 -1
  190. package/dist/esm/components/bik-layout/index.d.ts +2 -0
  191. package/dist/esm/components/button/Button.js +31 -31
  192. package/dist/esm/components/button/Button.js.map +1 -1
  193. package/dist/esm/components/button/Button.styled.d.ts +1 -1
  194. package/dist/esm/components/button/Button.styled.js +20 -20
  195. package/dist/esm/components/button/Button.styled.js.map +1 -1
  196. package/dist/esm/components/button/model.d.ts +3 -3
  197. package/dist/esm/components/button/themes.d.ts +2 -2
  198. package/dist/esm/components/button/themes.js +31 -17
  199. package/dist/esm/components/button/themes.js.map +1 -1
  200. package/dist/esm/components/checkBox/CheckBox.d.ts +2 -1
  201. package/dist/esm/components/checkBox/CheckBox.js +124 -87
  202. package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
  203. package/dist/esm/components/checkBox/CheckBox.styled.d.ts +1 -1
  204. package/dist/esm/components/checkBox/CheckBox.styled.js +10 -9
  205. package/dist/esm/components/checkBox/CheckBox.styled.js.map +1 -1
  206. package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +1 -1
  207. package/dist/esm/components/country-code-picker/CountryCodePicker.js.map +1 -1
  208. package/dist/esm/components/country-code-picker/CountryPicker.d.ts +1 -1
  209. package/dist/esm/components/country-code-picker/CountryPicker.js.map +1 -1
  210. package/dist/esm/components/datePicker/DatePicker.styled.js +39 -6
  211. package/dist/esm/components/datePicker/DatePicker.styled.js.map +1 -1
  212. package/dist/esm/components/dropdown/Dropdown.d.ts +2 -0
  213. package/dist/esm/components/dropdown/Dropdown.js +80 -77
  214. package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
  215. package/dist/esm/components/dropdown/DropdownPopover/index.js +69 -56
  216. package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
  217. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +183 -174
  218. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  219. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
  220. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +5 -4
  221. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  222. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
  223. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
  224. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
  225. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
  226. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +3 -1
  227. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +29 -20
  228. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
  229. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +3 -1
  230. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +80 -74
  231. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  232. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +3 -1
  233. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +68 -61
  234. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  235. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +2 -1
  236. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +7 -2
  237. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
  238. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +3 -1
  239. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +18 -10
  240. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  241. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
  242. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +18 -18
  243. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  244. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +1 -0
  245. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +43 -17
  246. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
  247. package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +2 -0
  248. package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +2 -0
  249. package/dist/esm/components/dropdown/type.d.ts +6 -1
  250. package/dist/esm/components/dropdown-button/DropdownButton.d.ts +13 -1
  251. package/dist/esm/components/dropdown-button/DropdownButton.js +83 -20
  252. package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
  253. package/dist/esm/components/dropdown-button/DropdownButton.style.d.ts +9 -2
  254. package/dist/esm/components/dropdown-button/DropdownButton.style.js +35 -9
  255. package/dist/esm/components/dropdown-button/DropdownButton.style.js.map +1 -1
  256. package/dist/esm/components/dual-icon-button/DualIconButton.d.ts +3 -0
  257. package/dist/esm/components/dual-icon-button/DualIconButton.js +53 -0
  258. package/dist/esm/components/dual-icon-button/DualIconButton.js.map +1 -0
  259. package/dist/esm/components/dual-icon-button/DualIconButton.styled.d.ts +7 -0
  260. package/dist/esm/components/dual-icon-button/DualIconButton.styled.js +40 -0
  261. package/dist/esm/components/dual-icon-button/DualIconButton.styled.js.map +1 -0
  262. package/dist/esm/components/dual-icon-button/index.d.ts +2 -0
  263. package/dist/esm/components/dual-icon-button/model.d.ts +12 -0
  264. package/dist/esm/components/fab-menu/FABMenu.d.ts +1 -1
  265. package/dist/esm/components/fab-menu/FABMenu.js.map +1 -1
  266. package/dist/esm/components/icon-button/IconButton.js +36 -32
  267. package/dist/esm/components/icon-button/IconButton.js.map +1 -1
  268. package/dist/esm/components/icon-button/IconButton.styled.d.ts +3 -1
  269. package/dist/esm/components/icon-button/IconButton.styled.js +20 -14
  270. package/dist/esm/components/icon-button/IconButton.styled.js.map +1 -1
  271. package/dist/esm/components/icon-button/model.d.ts +12 -1
  272. package/dist/esm/components/icon-button/theme.js +12 -10
  273. package/dist/esm/components/icon-button/theme.js.map +1 -1
  274. package/dist/esm/components/input/Input.js +130 -125
  275. package/dist/esm/components/input/Input.js.map +1 -1
  276. package/dist/esm/components/input/Input.model.d.ts +2 -1
  277. package/dist/esm/components/input/Input.styled.d.ts +8 -1
  278. package/dist/esm/components/input/Input.styled.js +34 -22
  279. package/dist/esm/components/input/Input.styled.js.map +1 -1
  280. package/dist/esm/components/list-item/List.model.d.ts +3 -2
  281. package/dist/esm/components/list-item/ListItem.js +40 -38
  282. package/dist/esm/components/list-item/ListItem.js.map +1 -1
  283. package/dist/esm/components/list-item/ListItem.styled.d.ts +2 -1
  284. package/dist/esm/components/list-item/ListItem.styled.js +8 -8
  285. package/dist/esm/components/list-item/ListItem.styled.js.map +1 -1
  286. package/dist/esm/components/list-item/themes.d.ts +2 -2
  287. package/dist/esm/components/list-item/themes.js +29 -6
  288. package/dist/esm/components/list-item/themes.js.map +1 -1
  289. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +1 -0
  290. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +30 -28
  291. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
  292. package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +1 -0
  293. package/dist/esm/components/multi-level-dropdown/MenuItem.js +57 -54
  294. package/dist/esm/components/multi-level-dropdown/MenuItem.js.map +1 -1
  295. package/dist/esm/components/multi-level-dropdown/MenuList.d.ts +1 -0
  296. package/dist/esm/components/multi-level-dropdown/MenuList.js +46 -42
  297. package/dist/esm/components/multi-level-dropdown/MenuList.js.map +1 -1
  298. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +95 -59
  299. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
  300. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +13 -3
  301. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +50 -41
  302. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
  303. package/dist/esm/components/multi-level-dropdown/type.d.ts +1 -0
  304. package/dist/esm/components/switch/Switch.d.ts +2 -2
  305. package/dist/esm/components/switch/Switch.js.map +1 -1
  306. package/dist/esm/components/switch/Switch.type.d.ts +19 -0
  307. package/dist/esm/components/tag/Tag.d.ts +1 -1
  308. package/dist/esm/components/tag/Tag.js +22 -18
  309. package/dist/esm/components/tag/Tag.js.map +1 -1
  310. package/dist/esm/components/tag/Tag.styled.d.ts +3 -1
  311. package/dist/esm/components/tag/Tag.styled.js +7 -7
  312. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  313. package/dist/esm/components/tag/model.d.ts +5 -1
  314. package/dist/esm/components/tag/model.js.map +1 -1
  315. package/dist/esm/components/whats-new/WhatsNew.d.ts +2 -0
  316. package/dist/esm/components/whats-new/WhatsNew.js +23 -19
  317. package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
  318. package/dist/esm/components/whats-new/WhatsNew.styles.js +18 -17
  319. package/dist/esm/components/whats-new/WhatsNew.styles.js.map +1 -1
  320. package/dist/esm/components/whats-new/WhatsNew.types.d.ts +2 -0
  321. package/dist/esm/components/whats-new/WhatsNewButton.js +62 -52
  322. package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
  323. package/dist/esm/components/whats-new/WhatsNewPanel.js.map +1 -1
  324. package/dist/esm/constants/Theme.d.ts +36 -0
  325. package/dist/esm/constants/Theme.js +21 -1
  326. package/dist/esm/constants/Theme.js.map +1 -1
  327. package/dist/esm/editor/BikEditor.js +64 -62
  328. package/dist/esm/editor/BikEditor.js.map +1 -1
  329. package/dist/esm/editor/BikEditor.styles.js +20 -8
  330. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  331. package/dist/esm/editor/BikEditor.types.d.ts +8 -0
  332. package/dist/esm/editor/BikEditor.types.js.map +1 -1
  333. package/dist/esm/editor/extensions/buildExtensions.d.ts +8 -1
  334. package/dist/esm/editor/extensions/buildExtensions.js +42 -40
  335. package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
  336. package/dist/esm/editor/extensions/characterLimit/CharacterLimitExtension.d.ts +19 -0
  337. package/dist/esm/editor/extensions/characterLimit/CharacterLimitExtension.js +62 -0
  338. package/dist/esm/editor/extensions/characterLimit/CharacterLimitExtension.js.map +1 -0
  339. package/dist/esm/editor/extensions/editorDropdown.styles.d.ts +8 -2
  340. package/dist/esm/editor/extensions/editorDropdown.styles.js +18 -22
  341. package/dist/esm/editor/extensions/editorDropdown.styles.js.map +1 -1
  342. package/dist/esm/icons/Arrows/Chevron/ChevronUp.d.ts +1 -2
  343. package/dist/esm/icons/Arrows/Chevron/ChevronUp.js +24 -28
  344. package/dist/esm/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
  345. package/dist/esm/icons/Media/Visual/{Frame26086263.js → FormkitNeutral.js} +1 -1
  346. package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +1 -0
  347. package/dist/esm/icons/Media/Visual/{IconTrailing.js → FormkitSad.js} +1 -1
  348. package/dist/esm/icons/Media/Visual/FormkitSad.js.map +1 -0
  349. package/dist/esm/icons/Media/Visual/index.d.ts +2 -2
  350. package/dist/esm/icons/index.d.ts +25 -25
  351. package/dist/esm/icons/index.js +184 -184
  352. package/dist/esm/index.d.ts +2 -0
  353. package/dist/esm/index.js +975 -969
  354. package/dist/esm/index.js.map +1 -1
  355. package/package.json +2 -2
  356. package/dist/cjs/icons/Media/Visual/Frame26086263.js.map +0 -1
  357. package/dist/cjs/icons/Media/Visual/IconTrailing.js.map +0 -1
  358. package/dist/esm/icons/Media/Visual/Frame26086263.js.map +0 -1
  359. package/dist/esm/icons/Media/Visual/IconTrailing.js.map +0 -1
  360. /package/dist/esm/icons/Media/Visual/{Frame26086263.d.ts → FormkitNeutral.d.ts} +0 -0
  361. /package/dist/esm/icons/Media/Visual/{IconTrailing.d.ts → FormkitSad.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),c=require("../../../constants/Theme.js"),G=require("../../../hooks/useWindowSize.js"),g=require("../GiftedChat/types.js"),p=require("../GiftedChat/utils.js"),T=require("./types.js"),R=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},w=R(l),P=t=>{const{currentMessage:d,position:n,renderMessageText:C,renderTicks:v,renderTime:x,renderCustomView:y,isCustomViewBottom:m,isUnsatisfactoryMessageFn:h,messagesGroupedByAiTraceId:M,onPress:I,containerStyle:i,bubbleStyles:r,appType:j=T.GiftedChatAppType.Bik}=t,u=G.useWindowSize(),e=d,s=j===T.GiftedChatAppType.Manifest,S=l.useMemo(()=>e.category===p.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===p.Constants.ChatActivity.Type.PRIVATE_NOTE,[e.category,e.activityType]),A=l.useMemo(()=>{const[b,f]=p.isStringifiedArray(e?.message);return b&&f&&Array.isArray(f)},[e?.message]),E=l.useMemo(()=>{const b={borderRadius:8,minHeight:20,margin:0,flexGrow:u?1:0},f=e?.channelId===g.MESSAGE_CHANNELS.GMAIL||e?.channelName===g.MESSAGE_CHANNELS.GMAIL,k=e?.channelId===g.MESSAGE_CHANNELS.SMTP||e?.channelName===g.MESSAGE_CHANNELS.SMTP;let a={};if(s)return n==="left"?a=r&&typeof r.left=="object"?r.left:{}:a=r&&typeof r.right=="object"?r.right:{},{...a};if(n==="left")a={...u||f||k?{maxWidth:"100%"}:{},...S?{background:e?.meta?.aiUsed?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":c.COLORS.background.warning.light}:{backgroundColor:e?.isPrivateMail?c.COLORS.background.blue.light:c.COLORS.surface.hovered}};else{const N=h&&h({aiTraceId:e.eventProperties?.aiTraceId,messagesGroupedByAiTraceId:M});a={backgroundColor:e.status==="failed"||N?c.COLORS.background.negative.light:c.COLORS.background.brandVeryLight,...S?{background:e?.meta?.aiUsed?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":c.COLORS.background.warning.light}:{},...!u&&A?{maxWidth:500}:{}}}return{...b,...a}},[e?.channelId,e?.channelName,e?.meta?.aiUsed,e?.status,e?.eventProperties?.aiTraceId,n,u,S,A,h,M,e?.isPrivateMail,r,s]),L=l.useCallback(()=>o.jsxs("div",{children:[!m&&y?.(t),C?.(t),m&&y?.(t)]}),[m,y,C,t]),O=l.useMemo(()=>!s||typeof i!="object"?{}:n==="left"&&"left"in i&&i.left&&typeof i.left=="object"?i.left:n==="right"&&"right"in i&&i.right&&typeof i.right=="object"?i.right:{},[s,i,n]);return o.jsx("div",{style:{display:"flex",marginTop:s?0:6,marginBottom:s?0:d?.messageInformation?.reactions?.length>0?24:6,flexGrow:u?1:0,...s?{alignItems:"flex-end",...n==="right"?{cursor:"pointer"}:{}}:{},...O},...s?{onClick:I}:{},children:o.jsx("div",{style:E,children:o.jsxs("div",{children:[o.jsx("div",{id:d.chatActivityId||`message-${d.psqlId}`,children:L()}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"},children:[x?.(t),v?.(d)]})]})})})},q=w.default.memo(P);exports.Bubble=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),l=require("../../../constants/Theme.js"),R=require("../../../hooks/useWindowSize.js"),g=require("../GiftedChat/types.js"),p=require("../GiftedChat/utils.js"),T=require("./types.js"),P=n=>n&&typeof n=="object"&&"default"in n?n:{default:n},q=P(c),B=n=>{const{currentMessage:d,position:s,renderMessageText:C,renderTicks:x,renderTime:v,renderCustomView:y,isCustomViewBottom:h,isUnsatisfactoryMessageFn:b,messagesGroupedByAiTraceId:M,onPress:j,containerStyle:t,bubbleStyles:i,appType:I=T.GiftedChatAppType.Bik}=n,u=R.useWindowSize(),e=d,r=I===T.GiftedChatAppType.Manifest,m=c.useMemo(()=>e.category===p.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===p.Constants.ChatActivity.Type.PRIVATE_NOTE,[e.category,e.activityType]),A=c.useMemo(()=>{const[S,f]=p.isStringifiedArray(e?.message);return S&&f&&Array.isArray(f)},[e?.message]),k=e?.channelId===g.MESSAGE_CHANNELS.SMTP||e?.channelName===g.MESSAGE_CHANNELS.SMTP,E=c.useMemo(()=>{const S={borderRadius:8,minHeight:20,margin:0,flexGrow:u?1:0,width:"100%"},f=e?.channelId===g.MESSAGE_CHANNELS.GMAIL||e?.channelName===g.MESSAGE_CHANNELS.GMAIL;let a={};if(r)return s==="left"?a=i&&typeof i.left=="object"?i.left:{}:a=i&&typeof i.right=="object"?i.right:{},{...a};if(s==="left")a={...u||f||k?{maxWidth:"100%"}:{},...m?{background:l.COLORS.background.warning.light}:{backgroundColor:e?.isPrivateMail?l.COLORS.background.blue.light:l.COLORS.background.base}};else{const w=b&&b({aiTraceId:e.eventProperties?.aiTraceId,messagesGroupedByAiTraceId:M});a={backgroundColor:e.status==="failed"||w?l.COLORS.background.negative.light:l.COLORS.background.brandUltraLight,...m?{background:l.COLORS.background.warning.light}:{},...!u&&A?{maxWidth:500}:{}}}const G=i&&typeof i=="object"?"left"in i||"right"in i?s==="left"?i.left??{}:i.right??{}:i:{};return{...S,...a,...G}},[e?.channelId,e?.channelName,e?.meta?.aiUsed,e?.status,e?.eventProperties?.aiTraceId,s,u,m,A,b,M,e?.isPrivateMail,i,r]),O=c.useCallback(()=>o.jsxs("div",{children:[!h&&y?.(n),C?.(n),h&&y?.(n)]}),[h,y,C,n]),L=c.useMemo(()=>!r||typeof t!="object"?{}:s==="left"&&"left"in t&&t.left&&typeof t.left=="object"?t.left:s==="right"&&"right"in t&&t.right&&typeof t.right=="object"?t.right:{},[r,t,s]),N=!r&&t&&typeof t=="object"?"left"in t||"right"in t?s==="left"?t.left??{}:t.right??{}:t:{};return o.jsx("div",{style:{display:"flex",marginTop:r?0:6,marginBottom:r?0:d?.messageInformation?.reactions?.length>0?24:6,flexGrow:u?1:0,...r?{alignItems:"flex-end",...s==="right"?{cursor:"pointer"}:{}}:{},...L,...N},...r?{onClick:j}:{},children:o.jsx("div",{style:E,children:o.jsxs("div",{children:[o.jsx("div",{id:d.chatActivityId||`message-${d.psqlId}`,children:O()}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:[v?.(n),x?.(d)]})]})})})},_=q.default.memo(B);exports.Bubble=_;
2
2
  //# sourceMappingURL=Bubble.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\t\tconst isSmtp =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: message?.meta?.aiUsed\n\t\t\t\t\t\t\t\t\t? 'linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)'\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.surface.hovered,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandVeryLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: message?.meta?.aiUsed\n\t\t\t\t\t\t\t\t\t? 'linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)'\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn { ...baseStyles, ...dynamicStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\tmarginLeft: '32px',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","wrapperStyles","baseStyles","isGmail","MESSAGE_CHANNELS","isSmtp","dynamicStyles","COLORS","isUnsatisfactory","renderContent","useCallback","manifestContainerStyle","jsx","jsxs","Bubble","React"],"mappings":"6XAQMA,EACLC,GACwB,CACxB,KAAM,CACL,eAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,0BAAAC,EACA,2BAAAC,EACA,QAAAC,EACA,eAAAC,EACA,aAAAC,EACA,QAAAC,EAAUC,EAAAA,kBAAkB,GAAA,EACzBd,EAEEe,EAAWC,EAAAA,cAAA,EACXC,EAAUhB,EACViB,EAAgBL,IAAYC,EAAAA,kBAAkB,SAG9CK,EAAgBC,EAAAA,QACrB,IACCH,EAAQ,WAAaI,EAAAA,UAAU,aAAa,SAAS,UACrDJ,EAAQ,eAAiBI,EAAAA,UAAU,aAAa,KAAK,aACtD,CAACJ,EAAQ,SAAUA,EAAQ,YAAY,CAAA,EAIlCK,EAAoBF,EAAAA,QAAQ,IAAM,CACvC,KAAM,CAACG,EAAoBC,CAAa,EAAIC,EAAAA,mBAC3CR,GAAS,OAAA,EAEV,OAAOM,GAAsBC,GAAiB,MAAM,QAAQA,CAAa,CAC1E,EAAG,CAACP,GAAS,OAAO,CAAC,EAGfS,EAAgBN,EAAAA,QAAQ,IAA2B,CACxD,MAAMO,EAAkC,CACvC,aAAc,EACd,UAAW,GACX,OAAQ,EACR,SAAUZ,EAAW,EAAI,CAAA,EAIpBa,EACLX,GAAS,YAAcY,EAAAA,iBAAiB,OACxCZ,GAAS,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,KAAKzC,CAAe"}
1
+ {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.base,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) — bottom bar, time/ticks\n\t\t\t\t\t right-aligned. The 8px gap above comes from the time/ticks\n\t\t\t\t\t rows' own top padding. */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","isSmtp","MESSAGE_CHANNELS","wrapperStyles","baseStyles","isGmail","dynamicStyles","COLORS","isUnsatisfactory","extraBubbleStyles","renderContent","useCallback","manifestContainerStyle","extraContainerStyle","jsx","jsxs","Bubble","React"],"mappings":"6XAQMA,EACLC,GACwB,CACxB,KAAM,CACL,eAAAC,EACA,SAAAC,EACA,kBAAAC,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AAS,SAExBA,EAAe,KAGtBT,IAAa,SACb,UAAWS,GACXA,EAAe,OACf,OAAOA,EAAe,OAAU,SAEzBA,EAAe,MAEhB,CAAA,EACL,CAACO,EAAeP,EAAgBT,CAAQ,CAAC,EAEtCoC,EACL,CAACpB,GAAiBP,GAAkB,OAAOA,GAAmB,SAC3D,SAAUA,GAAkB,UAAWA,EACtCT,IAAa,OACXS,EAAkD,MAAQ,CAAA,EAC1DA,EAAmD,OAAS,GAC7DA,EACF,CAAA,EAEJ,OACC4B,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,UAAWrB,EAAgB,EAAI,EAC/B,aAAcA,EACX,EACAjB,GAAiB,oBAAuB,WAAW,OAAS,EAC5D,GACA,EACH,SAAUc,EAAW,EAAI,EACzB,GAAIG,EACD,CACA,WAAY,WACZ,GAAIhB,IAAa,QAAU,CAAE,OAAQ,SAAA,EAAc,CAAA,CAAC,EAEpD,CAAA,EACH,GAAGmC,EACH,GAAGC,CAAA,EAEH,GAAIpB,EAAgB,CAAE,QAASR,CAAA,EAAY,CAAA,EAE5C,SAAA6B,EAAAA,IAAC,MAAA,CAAI,MAAOX,EACX,gBAAC,MAAA,CAEA,SAAA,CAAAW,EAAAA,IAAC,MAAA,CACA,GACCtC,EAAe,gBACf,WAAWA,EAAe,MAAS,GAGnC,SAAAkC,EAAA,CAAc,CAAA,EAMhBK,EAAAA,KAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,cAAe,MACf,eAAgB,UAAA,EAGhB,SAAA,CAAAnC,IAAaL,CAAK,EAClBI,IAAcH,CAAc,CAAA,CAAA,CAAA,CAC9B,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CAGH,EAGawC,EAASC,EAAAA,QAAM,KAAK3C,CAAe"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("date-fns"),u=require("react"),i=require("../../../constants/Theme.js"),d=require("../../TypographyStyle.js"),y=require("../Bubble/types.js"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},x=c(u),m=({createdAt:e,dateFormat:p="D MMMM YY",dateFormatCalendar:s,appType:o=y.GiftedChatAppType.Bik})=>{const a=u.useMemo(()=>{if(e==null)return null;let n;if(typeof e=="number")n=t.startOfDay(new Date(e));else if(e instanceof Date)n=t.startOfDay(e);else if(typeof e=="string")n=t.startOfDay(new Date(e));else return null;if(o===y.GiftedChatAppType.Manifest)return t.format(n,"MMM d, yyyy");const f=t.startOfDay(new Date);if(!t.isSameYear(f,n))return t.format(n,"EEEE, d MMMM yy");const l=t.differenceInDays(f,n);return l<1?s?.sameDay?s.sameDay.replace(/\[|\]/g,""):"Today":l===1?"Yesterday":t.format(n,"EEEE, d MMMM yy")},[e,p,s,o]);return a?o===y.GiftedChatAppType.Manifest?r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10},children:r.jsx("span",{style:{background:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px"},children:a})}):r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"12px 0px 12px 8px"},children:[r.jsx("div",{style:{flex:1,height:"1px",backgroundColor:i.COLORS.stroke.primary}}),r.jsx("div",{style:{border:`1px solid ${i.COLORS.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"},children:r.jsx(d.BodyCaption,{style:{color:i.COLORS.content.secondary},children:a})}),r.jsx("div",{style:{flex:1,height:"1px",backgroundColor:i.COLORS.stroke.primary}})]}):null},M=x.default.memo(m);exports.Day=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("date-fns"),a=require("react"),i=require("../../../constants/Theme.js"),M=require("../../TypographyStyle.js"),d=require("../Bubble/types.js"),O=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},D=O(a),C=({createdAt:e,dateFormat:x="D MMMM YY",dateFormatCalendar:c,appType:f=d.GiftedChatAppType.Bik,scrollRootRef:y})=>{const p=a.useRef(null),[l,h]=a.useState(!1),u=a.useMemo(()=>{if(e==null)return null;let n;if(typeof e=="number")n=r.startOfDay(new Date(e));else if(e instanceof Date)n=r.startOfDay(e);else if(typeof e=="string")n=r.startOfDay(new Date(e));else return null;if(f===d.GiftedChatAppType.Manifest)return r.format(n,"MMM d, yyyy");const s=r.startOfDay(new Date);if(!r.isSameYear(s,n))return r.format(n,"EEEE, d MMMM yy");const o=r.differenceInDays(s,n);return o<1?c?.sameDay?c.sameDay.replace(/\[|\]/g,""):"Today":o===1?"Yesterday":r.format(n,"EEEE, d MMMM yy")},[e,x,c,f]);if(a.useEffect(()=>{const n=p.current;if(!n||typeof IntersectionObserver>"u")return;const s=y?.current??null,o=new IntersectionObserver(([m])=>{const b=s?s.getBoundingClientRect().top:0;h(!m.isIntersecting&&m.boundingClientRect.top<=b)},{root:s,threshold:[0,1]});return o.observe(n),()=>o.disconnect()},[y,u]),!u)return null;const g=t.jsx("div",{ref:p,"aria-hidden":!0,style:{height:1,marginBottom:-1}});return f===d.GiftedChatAppType.Manifest?t.jsxs(t.Fragment,{children:[g,t.jsx("div",{style:{position:"sticky",top:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10},children:t.jsx("span",{style:{background:l?i.COLORS.surface.standard:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px",borderRadius:12},children:u})})]}):t.jsxs(t.Fragment,{children:[g,t.jsxs("div",{style:{position:"sticky",top:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",marginTop:8,marginBottom:8},children:[!l&&t.jsx("div",{style:{flex:1,height:"1px",backgroundColor:i.COLORS.stroke.primary}}),t.jsx("div",{style:{border:`1px solid ${i.COLORS.stroke.primary}`,borderRadius:"16px",padding:"4px 12px",background:l?i.COLORS.surface.standard:"transparent"},children:t.jsx(M.BodyCaption,{style:{color:i.COLORS.content.secondary},children:u})}),!l&&t.jsx("div",{style:{flex:1,height:"1px",backgroundColor:i.COLORS.stroke.primary}})]})]})},j=D.default.memo(C);exports.Day=j;
2
2
  //# sourceMappingURL=Day.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Day.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/Day.tsx"],"sourcesContent":["import { differenceInDays, format, isSameYear, startOfDay } from 'date-fns';\nimport React, { useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { BodyCaption } from '../../TypographyStyle';\nimport { GiftedChatAppType } from '../Bubble/types';\n\n// Props for Day component\nexport interface DayProps {\n\tcreatedAt?: Date | number | string;\n\tdateFormat?: string;\n\tdateFormatCalendar?: {\n\t\tsameDay?: string;\n\t\tnextDay?: string;\n\t\tnextWeek?: string;\n\t\tlastDay?: string;\n\t\tlastWeek?: string;\n\t\tsameElse?: string;\n\t};\n\tappType?: GiftedChatAppType;\n}\n\n// Day component - renders date separator in chat\n// Shows formatted date with smart labeling (Today, Yesterday, etc.)\nconst DayComponent: React.FC<DayProps> = ({\n\tcreatedAt,\n\tdateFormat = 'D MMMM YY',\n\tdateFormatCalendar,\n\tappType = GiftedChatAppType.Bik,\n}) => {\n\t// Format date for display with smart labeling\n\tconst dateStr = useMemo(() => {\n\t\tif (createdAt == null) return null;\n\n\t\tlet date: Date;\n\t\tif (typeof createdAt === 'number') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else if (createdAt instanceof Date) {\n\t\t\tdate = startOfDay(createdAt);\n\t\t} else if (typeof createdAt === 'string') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For manifest, always show 'Jan 9, 2026' format\n\t\tif (appType === GiftedChatAppType.Manifest) {\n\t\t\treturn format(date, 'MMM d, yyyy');\n\t\t}\n\n\t\tconst now = startOfDay(new Date());\n\t\t// If not same year, show full date with day of week\n\t\tif (!isSameYear(now, date)) {\n\t\t\treturn format(date, 'EEEE, d MMMM yy');\n\t\t}\n\n\t\tconst daysDiff = differenceInDays(now, date);\n\n\t\t// If today\n\t\tif (daysDiff < 1) {\n\t\t\tif (dateFormatCalendar?.sameDay) {\n\t\t\t\treturn dateFormatCalendar.sameDay.replace(/\\[|\\]/g, '');\n\t\t\t}\n\t\t\treturn 'Today';\n\t\t}\n\n\t\t// If yesterday\n\t\tif (daysDiff === 1) {\n\t\t\treturn 'Yesterday';\n\t\t}\n\n\t\t// Format: \"Friday, 7 November 25\"\n\t\treturn format(date, 'EEEE, d MMMM yy');\n\t}, [createdAt, dateFormat, dateFormatCalendar, appType]);\n\n\tif (!dateStr) return null;\n\n\tif (appType === GiftedChatAppType.Manifest) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tmarginTop: 5,\n\t\t\t\t\tmarginBottom: 10,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t\t\tcolor: '#b2b2b2',\n\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{dateStr}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t\tmargin: '12px 0px 12px 8px',\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tflex: 1,\n\t\t\t\t\theight: '1px',\n\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tborder: `1px solid ${COLORS.stroke.primary}`,\n\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\tpadding: '4px 12px',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<BodyCaption style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t{dateStr}\n\t\t\t\t</BodyCaption>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tflex: 1,\n\t\t\t\t\theight: '1px',\n\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Day = React.memo(DayComponent);\n\nexport default Day;\n"],"names":["DayComponent","createdAt","dateFormat","dateFormatCalendar","appType","GiftedChatAppType","dateStr","useMemo","date","startOfDay","format","now","isSameYear","daysDiff","differenceInDays","jsx","jsxs","COLORS","BodyCaption","Day","React"],"mappings":"4UAuBMA,EAAmC,CAAC,CACzC,UAAAC,EACA,WAAAC,EAAa,YACb,mBAAAC,EACA,QAAAC,EAAUC,EAAAA,kBAAkB,GAC7B,IAAM,CAEL,MAAMC,EAAUC,EAAAA,QAAQ,IAAM,CAC7B,GAAIN,GAAa,KAAM,OAAO,KAE9B,IAAIO,EACJ,GAAI,OAAOP,GAAc,SACxBO,EAAOC,EAAAA,WAAW,IAAI,KAAKR,CAAS,CAAC,UAC3BA,aAAqB,KAC/BO,EAAOC,EAAAA,WAAWR,CAAS,UACjB,OAAOA,GAAc,SAC/BO,EAAOC,EAAAA,WAAW,IAAI,KAAKR,CAAS,CAAC,MAErC,QAAO,KAIR,GAAIG,IAAYC,EAAAA,kBAAkB,SACjC,OAAOK,EAAAA,OAAOF,EAAM,aAAa,EAGlC,MAAMG,EAAMF,EAAAA,WAAW,IAAI,IAAM,EAEjC,GAAI,CAACG,EAAAA,WAAWD,EAAKH,CAAI,EACxB,OAAOE,EAAAA,OAAOF,EAAM,iBAAiB,EAGtC,MAAMK,EAAWC,EAAAA,iBAAiBH,EAAKH,CAAI,EAG3C,OAAIK,EAAW,EACVV,GAAoB,QAChBA,EAAmB,QAAQ,QAAQ,SAAU,EAAE,EAEhD,QAIJU,IAAa,EACT,YAIDH,EAAAA,OAAOF,EAAM,iBAAiB,CACtC,EAAG,CAACP,EAAWC,EAAYC,EAAoBC,CAAO,CAAC,EAEvD,OAAKE,EAEDF,IAAYC,EAAAA,kBAAkB,SAEhCU,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,UAAW,EACX,aAAc,EAAA,EAGf,SAAAA,EAAAA,IAAC,OAAA,CACA,MAAO,CACN,WAAY,cACZ,MAAO,UACP,SAAU,GACV,WAAY,IACZ,QAAS,SAAA,EAGT,SAAAT,CAAA,CAAA,CACF,CAAA,EAMFU,EAAAA,KAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,OAAQ,mBAAA,EAGT,SAAA,CAAAD,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,KAAM,EACN,OAAQ,MACR,gBAAiBE,EAAAA,OAAO,OAAO,OAAA,CAChC,CAAA,EAEDF,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,OAAQ,aAAaE,EAAAA,OAAO,OAAO,OAAO,GAC1C,aAAc,OACd,QAAS,UAAA,EAGV,SAAAF,EAAAA,IAACG,eAAY,MAAO,CAAE,MAAOD,EAAAA,OAAO,QAAQ,WAC1C,SAAAX,CAAA,CACF,CAAA,CAAA,EAEDS,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,KAAM,EACN,OAAQ,MACR,gBAAiBE,EAAAA,OAAO,OAAO,OAAA,CAChC,CAAA,CACD,CAAA,CAAA,EA7DmB,IAgEtB,EAGaE,EAAMC,EAAAA,QAAM,KAAKpB,CAAY"}
1
+ {"version":3,"file":"Day.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/Day.tsx"],"sourcesContent":["import { differenceInDays, format, isSameYear, startOfDay } from 'date-fns';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { BodyCaption } from '../../TypographyStyle';\nimport { GiftedChatAppType } from '../Bubble/types';\n\n// Props for Day component\nexport interface DayProps {\n\tcreatedAt?: Date | number | string;\n\tdateFormat?: string;\n\tdateFormatCalendar?: {\n\t\tsameDay?: string;\n\t\tnextDay?: string;\n\t\tnextWeek?: string;\n\t\tlastDay?: string;\n\t\tlastWeek?: string;\n\t\tsameElse?: string;\n\t};\n\tappType?: GiftedChatAppType;\n\t/**\n\t * Scroll container the separator sticks within. When provided, the\n\t * separator pins to the top while its day's messages scroll past, and the\n\t * divider lines are hidden while pinned (floating-pill look).\n\t */\n\tscrollRootRef?: React.RefObject<HTMLElement | null>;\n}\n\n// Day component - renders date separator in chat\n// Shows formatted date with smart labeling (Today, Yesterday, etc.)\nconst DayComponent: React.FC<DayProps> = ({\n\tcreatedAt,\n\tdateFormat = 'D MMMM YY',\n\tdateFormatCalendar,\n\tappType = GiftedChatAppType.Bik,\n\tscrollRootRef,\n}) => {\n\t// Tracks whether the separator is currently pinned to the top of the\n\t// scroll container. A zero-layout sentinel rendered just above the sticky\n\t// header scrolls normally; once it leaves the top edge the header is pinned.\n\tconst sentinelRef = useRef<HTMLDivElement>(null);\n\tconst [isStuck, setIsStuck] = useState(false);\n\t// Format date for display with smart labeling\n\tconst dateStr = useMemo(() => {\n\t\tif (createdAt == null) return null;\n\n\t\tlet date: Date;\n\t\tif (typeof createdAt === 'number') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else if (createdAt instanceof Date) {\n\t\t\tdate = startOfDay(createdAt);\n\t\t} else if (typeof createdAt === 'string') {\n\t\t\tdate = startOfDay(new Date(createdAt));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For manifest, always show 'Jan 9, 2026' format\n\t\tif (appType === GiftedChatAppType.Manifest) {\n\t\t\treturn format(date, 'MMM d, yyyy');\n\t\t}\n\n\t\tconst now = startOfDay(new Date());\n\t\t// If not same year, show full date with day of week\n\t\tif (!isSameYear(now, date)) {\n\t\t\treturn format(date, 'EEEE, d MMMM yy');\n\t\t}\n\n\t\tconst daysDiff = differenceInDays(now, date);\n\n\t\t// If today\n\t\tif (daysDiff < 1) {\n\t\t\tif (dateFormatCalendar?.sameDay) {\n\t\t\t\treturn dateFormatCalendar.sameDay.replace(/\\[|\\]/g, '');\n\t\t\t}\n\t\t\treturn 'Today';\n\t\t}\n\n\t\t// If yesterday\n\t\tif (daysDiff === 1) {\n\t\t\treturn 'Yesterday';\n\t\t}\n\n\t\t// Format: \"Friday, 7 November 25\"\n\t\treturn format(date, 'EEEE, d MMMM yy');\n\t}, [createdAt, dateFormat, dateFormatCalendar, appType]);\n\n\t// Detect the pinned state. The sentinel scrolls with the content; once it\n\t// crosses above the scroll container's top edge the header is pinned.\n\tuseEffect(() => {\n\t\tconst sentinel = sentinelRef.current;\n\t\tif (!sentinel || typeof IntersectionObserver === 'undefined') return;\n\t\tconst root = scrollRootRef?.current ?? null;\n\t\tconst observer = new IntersectionObserver(\n\t\t\t([entry]) => {\n\t\t\t\tconst rootTop = root ? root.getBoundingClientRect().top : 0;\n\t\t\t\t// Pinned only when the sentinel has left via the TOP edge — not\n\t\t\t\t// when it's simply offscreen below (yet to be scrolled into view).\n\t\t\t\tsetIsStuck(\n\t\t\t\t\t!entry.isIntersecting && entry.boundingClientRect.top <= rootTop,\n\t\t\t\t);\n\t\t\t},\n\t\t\t{ root, threshold: [0, 1] },\n\t\t);\n\t\tobserver.observe(sentinel);\n\t\treturn () => observer.disconnect();\n\t}, [scrollRootRef, dateStr]);\n\n\tif (!dateStr) return null;\n\n\t// Zero-layout sentinel sitting just above the sticky header.\n\tconst sentinel = (\n\t\t<div\n\t\t\tref={sentinelRef}\n\t\t\taria-hidden\n\t\t\tstyle={{ height: 1, marginBottom: -1 }}\n\t\t/>\n\t);\n\n\tif (appType === GiftedChatAppType.Manifest) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{sentinel}\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tposition: 'sticky',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tzIndex: 2,\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\tmarginTop: 5,\n\t\t\t\t\t\tmarginBottom: 10,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: isStuck ? COLORS.surface.standard : 'transparent',\n\t\t\t\t\t\t\tcolor: '#b2b2b2',\n\t\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\t\tfontWeight: 600,\n\t\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t\t\tborderRadius: 12,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{dateStr}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{sentinel}\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tposition: 'sticky',\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tzIndex: 2,\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\tmarginTop: 8,\n\t\t\t\t\tmarginBottom: 8,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!isStuck && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\theight: '1px',\n\t\t\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tborder: `1px solid ${COLORS.stroke.primary}`,\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tpadding: '4px 12px',\n\t\t\t\t\t\tbackground: isStuck ? COLORS.surface.standard : 'transparent',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<BodyCaption style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t\t{dateStr}\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t</div>\n\t\t\t\t{!isStuck && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\theight: '1px',\n\t\t\t\t\t\t\tbackgroundColor: COLORS.stroke.primary,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\n// Export memoized version for performance\nexport const Day = React.memo(DayComponent);\n\nexport default Day;\n"],"names":["DayComponent","createdAt","dateFormat","dateFormatCalendar","appType","GiftedChatAppType","scrollRootRef","sentinelRef","useRef","isStuck","setIsStuck","useState","dateStr","useMemo","date","startOfDay","format","now","isSameYear","daysDiff","differenceInDays","useEffect","sentinel","root","observer","entry","rootTop","jsx","jsxs","Fragment","COLORS","BodyCaption","Day","React"],"mappings":"4UA6BMA,EAAmC,CAAC,CACzC,UAAAC,EACA,WAAAC,EAAa,YACb,mBAAAC,EACA,QAAAC,EAAUC,EAAAA,kBAAkB,IAC5B,cAAAC,CACD,IAAM,CAIL,MAAMC,EAAcC,EAAAA,OAAuB,IAAI,EACzC,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EAEtCC,EAAUC,EAAAA,QAAQ,IAAM,CAC7B,GAAIZ,GAAa,KAAM,OAAO,KAE9B,IAAIa,EACJ,GAAI,OAAOb,GAAc,SACxBa,EAAOC,EAAAA,WAAW,IAAI,KAAKd,CAAS,CAAC,UAC3BA,aAAqB,KAC/Ba,EAAOC,EAAAA,WAAWd,CAAS,UACjB,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,CAAAP,EACDK,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,SAAU,SACV,IAAK,EACL,OAAQ,EACR,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,UAAW,EACX,aAAc,EAAA,EAGf,SAAAA,EAAAA,IAAC,OAAA,CACA,MAAO,CACN,WAAYlB,EAAUqB,EAAAA,OAAO,QAAQ,SAAW,cAChD,MAAO,UACP,SAAU,GACV,WAAY,IACZ,QAAS,UACT,aAAc,EAAA,EAGd,SAAAlB,CAAA,CAAA,CACF,CAAA,CACD,EACD,EAKDgB,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAP,EACDM,EAAAA,KAAC,MAAA,CACA,MAAO,CACN,SAAU,SACV,IAAK,EACL,OAAQ,EACR,QAAS,OACT,WAAY,SACZ,eAAgB,SAChB,UAAW,EACX,aAAc,CAAA,EAGd,SAAA,CAAA,CAACnB,GACDkB,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,KAAM,EACN,OAAQ,MACR,gBAAiBG,EAAAA,OAAO,OAAO,OAAA,CAChC,CAAA,EAGFH,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,OAAQ,aAAaG,EAAAA,OAAO,OAAO,OAAO,GAC1C,aAAc,OACd,QAAS,WACT,WAAYrB,EAAUqB,SAAO,QAAQ,SAAW,aAAA,EAGjD,SAAAH,EAAAA,IAACI,eAAY,MAAO,CAAE,MAAOD,EAAAA,OAAO,QAAQ,WAC1C,SAAAlB,CAAA,CACF,CAAA,CAAA,EAEA,CAACH,GACDkB,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,KAAM,EACN,OAAQ,MACR,gBAAiBG,EAAAA,OAAO,OAAO,OAAA,CAChC,CAAA,CACD,CAAA,CAAA,CAEF,EACD,CAEF,EAGaE,EAAMC,EAAAA,QAAM,KAAKjC,CAAY"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),n=require("react"),C=require("../../../constants/Theme.js"),z=require("../../../hooks/useWindowSize.js"),U=require("../../TypographyStyle.js"),l=require("../Bubble/types.js"),V=require("./Day.js"),q=require("./messageHelpers.js"),f=require("./scrollHooks.js"),B=require("./types.js"),v=require("./utils.js"),Y=c=>c&&typeof c=="object"&&"default"in c?c:{default:c},X=Y(n),J=(c,O)=>{const{messages:o=[],user:d,renderBubble:M,renderAvatar:x,renderDay:w,renderLoading:Q,renderChatEmpty:j,listViewProps:T={},renderAvatarOnTop:_=!1,showUserAvatar:b=!1,showAvatarForEveryMessage:A=!1,inverted:Z=!1,messageIdGenerator:R,topThreshold:D=v.TOP_THRESHOLD,appType:s=l.GiftedChatAppType.Bik,...G}=c||{},h=z.useWindowSize(),H=n.useRef(null),y=v.normalizeRef(T.ref||O,H),u=n.useRef({isInitialMount:!0,isUserScrolling:!1,isLoadingOldMessages:!1,isAtBottom:!0,hasTriggeredEndReached:!1,lastMessagesLength:o?.length??0,previousScrollHeight:0,previousScrollTop:0,scrollTimeout:null}),g=n.useMemo(()=>!o||o.length===0?[]:[...o].reverse(),[o]),m=f.useScrollToBottom(y,u);n.useImperativeHandle(O,()=>y.current),f.useInitialMountScroll(y,u,g.length,m),f.useScrollCleanup(u),f.useRestoreScrollPosition(y,u,g.length),f.useAutoScrollOnNewMessages(y,u,o.length,m),f.useResizeObserverForFirstMessage(o?.[0],u,m,R);const I=f.useScrollHandler(u,T.onEndReached,T.onScroll,D),S=n.useCallback(e=>!!(e&&d&&e.user?._id===d._id),[d]),L=n.useCallback((e,r)=>b?A?!0:!r||r.user._id!==e.user._id:!1,[b,A]),N=n.useCallback((e,r,a)=>{const i=S(e)?"right":"left",p={currentMessage:e,previousMessage:r,nextMessage:a,position:i,user:d,...G};return M?M(p):t.jsx("div",{style:{maxWidth:s===l.GiftedChatAppType.Manifest?"50%":"70%",width:"fit-content",...s===l.GiftedChatAppType.Manifest?{minWidth:"130px"}:{},padding:"8px 12px",borderRadius:s===l.GiftedChatAppType.Manifest?16:4,border:i==="left"&&s===l.GiftedChatAppType.Manifest?"1px solid rgb(224, 224, 224)":"none",backgroundColor:i==="right"?s===l.GiftedChatAppType.Manifest?C.COLORS.background.brandTint:C.COLORS.background.brandLight:s===l.GiftedChatAppType.Manifest?C.COLORS.background.pureWhite:C.COLORS.background.inactive,color:C.COLORS.content.primary,wordBreak:"break-word"},children:t.jsx(U.BodySecondary,{children:e.text})})},[S,d,M,G]),k=n.useCallback((e,r,a)=>{if(!L(e,a))return null;const p=S(e)?"right":"left";return x?x({currentMessage:e,previousMessage:r,nextMessage:a,position:p,user:d,renderAvatarOnTop:_,showUserAvatar:b,showAvatarForEveryMessage:A}):null},[L,S,d,_,b,A,x]);return!o||o.length===0?j?t.jsx(t.Fragment,{children:j()}):null:t.jsxs("div",{ref:y,style:{flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",...T.style},onScroll:I,children:[t.jsx("div",{style:{flex:"1 0 auto"}}),t.jsx("div",{style:{display:"flex",flexDirection:"column",flex:"0 0 auto"},children:g.map((e,r)=>{const a=S(e)?"right":"left",i=g[r-1],p=g[r+1],E=!v.isSameDay(e,i),$=q.getMessagePlacement(e,a),F=q.shouldCenterAlign(e),P=e?.channelId===B.MESSAGE_CHANNELS.SMTP||e?.channelName===B.MESSAGE_CHANNELS.SMTP,W=e.category===v.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===v.Constants.ChatActivity.Type.PRIVATE_NOTE;return t.jsxs(X.default.Fragment,{children:[E&&(w?w({createdAt:e.createdAt}):t.jsx(V.Day,{createdAt:e.createdAt,appType:s})),t.jsxs("div",{style:{...h?{margin:"0 4px"}:{},...F?{}:{display:"flex"},...s!==l.GiftedChatAppType.Manifest?!h&&e?.user?._id===2?{marginLeft:8}:{marginRight:8}:{},...P&&!W&&h?{marginLeft:8,marginRight:8}:{},justifyContent:$,marginBottom:8},children:[!h&&a==="left"&&t.jsx("div",{style:{margin:"0 8px"},children:k(e,i,p)}),t.jsx("div",{id:`message-bubble-${e._id??`${r}-${R?.()??"id"}`}`,style:s===l.GiftedChatAppType.Manifest?{width:"100%"}:h&&P?{display:"flex",flexGrow:1}:{},children:N(e,i,p)}),!h&&a==="right"&&t.jsx("div",{style:{margin:"0 8px"},children:k(e,i,p)})]})]},e._id??`${r}-${R?.()??"id"}`)})})]})},K=n.forwardRef(J);exports.default=K;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),n=require("react"),_=require("../../../constants/Theme.js"),ee=require("../../../hooks/useWindowSize.js"),te=require("../../TypographyStyle.js"),p=require("../Bubble/types.js"),se=require("./Day.js"),W=require("./messageHelpers.js"),v=require("./scrollHooks.js"),V=require("./types.js"),T=require("./utils.js"),re=require("../../button/Button.js"),ne=l=>l&&typeof l=="object"&&"default"in l?l:{default:l},oe=ne(n),I=204,ie=({text:l,isExpanded:g,onToggle:i})=>{const a=n.useRef(null),[b,A]=n.useState(!1);return n.useEffect(()=>{const y=a.current;if(y){y.style.maxHeight="none";const P=y.scrollHeight>I;y.style.maxHeight=g?"none":`${I}px`,A(P)}},[l,g]),s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:a,style:{maxHeight:g?"none":I,overflow:"hidden"},children:s.jsx(te.BodySecondary,{children:l})}),b&&s.jsx(re.Button,{buttonType:"text",size:"xs",buttonText:g?"Show less":"Read more",onClick:i})]})},le=(l,g)=>{const{messages:i=[],user:a,renderBubble:b,renderAvatar:A,renderDay:y,renderLoading:P,renderChatEmpty:q,listViewProps:O={},renderAvatarOnTop:D=!1,showUserAvatar:j=!1,showAvatarForEveryMessage:L=!1,inverted:ce=!1,messageIdGenerator:B,topThreshold:U=T.TOP_THRESHOLD,appType:u=p.GiftedChatAppType.Bik,maxHeight:E,isActivityMessage:R,...N}=l||{},C=ee.useWindowSize(),Y=n.useRef(null),x=T.normalizeRef(O.ref||g,Y),S=n.useRef({isInitialMount:!0,isUserScrolling:!1,isLoadingOldMessages:!1,isAtBottom:!0,hasTriggeredEndReached:!1,lastMessagesLength:i?.length??0,previousScrollHeight:0,previousScrollTop:0,scrollTimeout:null}),[$,X]=n.useState(new Set),f=n.useMemo(()=>!i||i.length===0?[]:[...i].reverse(),[i]),J=n.useMemo(()=>{const e=[];return f.forEach((o,r)=>{const t=f[r-1];r===0||!T.isSameDay(o,t)?e.push({createdAt:o.createdAt,indices:[r]}):e[e.length-1].indices.push(r)}),e},[f]),G=v.useScrollToBottom(x,S);n.useImperativeHandle(g,()=>x.current),v.useInitialMountScroll(x,S,f.length,G),v.useScrollCleanup(S),v.useRestoreScrollPosition(x,S,f.length),v.useAutoScrollOnNewMessages(x,S,i.length,G),v.useResizeObserverForFirstMessage(i?.[0],S,G,B);const K=v.useScrollHandler(S,O.onEndReached,O.onScroll,U),M=n.useCallback(e=>!!(e&&a&&e.user?._id===a._id),[a]),z=n.useCallback((e,o)=>j?L?!0:!o||(R?R(e):!1)||(R?R(o):!1)||o.user._id!==e.user._id:!1,[j,L,R]),Q=n.useCallback((e,o,r)=>{const t=M(e)?"right":"left",c=o?.user?._id!==e?.user?._id,h=r?.user?._id!==e?.user?._id,w={currentMessage:e,previousMessage:o,nextMessage:r,position:t,user:a,...N};if(b)return b(w);const d=e._id,k=$.has(d);return s.jsx("div",{style:{maxWidth:u===p.GiftedChatAppType.Manifest?"50%":"70%",width:"fit-content",...u===p.GiftedChatAppType.Manifest?{minWidth:"130px"}:{},padding:"8px 12px",borderTopLeftRadius:t==="left"?c?12:2:12,borderTopRightRadius:t==="right"?c?12:2:12,borderBottomLeftRadius:t==="left"?h?12:2:12,borderBottomRightRadius:t==="right"?h?12:2:12,border:t==="left"&&u===p.GiftedChatAppType.Manifest?"1px solid rgb(224, 224, 224)":"none",backgroundColor:t==="right"?u===p.GiftedChatAppType.Manifest?_.COLORS.background.brandTint:_.COLORS.background.brandLight:u===p.GiftedChatAppType.Manifest?_.COLORS.background.pureWhite:_.COLORS.background.inactive,color:_.COLORS.content.primary,wordBreak:"break-word"},children:s.jsx(ie,{text:e.text??"",isExpanded:k,onToggle:()=>X(H=>{const m=new Set(H);return k?m.delete(d):m.add(d),m})})})},[M,a,b,N,$]),F=n.useCallback((e,o,r)=>{if(!z(e,o))return null;const c=M(e)?"right":"left";return A?A({currentMessage:e,previousMessage:o,nextMessage:r,position:c,user:a,renderAvatarOnTop:D,showUserAvatar:j,showAvatarForEveryMessage:L}):null},[z,M,a,D,j,L,A]);return!i||i.length===0?q?s.jsx(s.Fragment,{children:q()}):null:s.jsxs("div",{ref:x,style:{flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",...E?{maxHeight:E,height:E}:{},...O.style},onScroll:K,children:[s.jsx("div",{style:{flex:"1 0 auto"}}),s.jsx("div",{style:{display:"flex",flexDirection:"column",flex:"0 0 auto"},children:J.map((e,o)=>s.jsxs("div",{children:[y?s.jsx("div",{style:{position:"sticky",top:0,zIndex:2},children:y({createdAt:e.createdAt})}):s.jsx(se.Day,{createdAt:e.createdAt,appType:u,scrollRootRef:x}),e.indices.map(r=>{const t=f[r],c=t?.channelId===V.MESSAGE_CHANNELS.SMTP||t?.channelName===V.MESSAGE_CHANNELS.SMTP,h=c?"left":M(t)?"right":"left",w=f[r-1],d=f[r+1],k=W.getMessagePlacement(t,h),H=W.shouldCenterAlign(t),m=t.category===T.Constants.ChatActivity.Category.ACTIVITY&&t.activityType===T.Constants.ChatActivity.Type.PRIVATE_NOTE,Z=t.category===T.Constants.ChatActivity.Category.ACTIVITY&&!m;return s.jsx(oe.default.Fragment,{children:s.jsxs("div",{style:{...C?{margin:"0 4px"}:{},...H?{}:{display:"flex",alignItems:"flex-start"},...u!==p.GiftedChatAppType.Manifest?!C&&h==="right"?{marginLeft:8}:{marginRight:8}:{},...c&&!m&&C?{marginLeft:8,marginRight:8}:{},...c&&m?{marginRight:16}:{},justifyContent:k,marginBottom:c?d?24:0:d?d?.user?._id===t?.user?._id?4:20:0,...Z?{marginLeft:0,marginBottom:0}:{}},children:[!C&&h==="left"&&s.jsx("div",{style:{marginRight:"4px",width:"24px",flexShrink:0},children:F(t,w,d)}),s.jsx("div",{id:`message-bubble-${t._id??`${r}-${B?.()??"id"}`}`,style:u===p.GiftedChatAppType.Manifest?{width:"100%"}:C||c?{display:"flex",flexGrow:1,width:"100%"}:{},children:Q(t,w,d)}),!C&&h==="right"&&s.jsx("div",{style:{marginLeft:"4px",width:"24px",flexShrink:0,alignSelf:"flex-start"},children:F(t,w,d)})]})},t._id??`${r}-${B?.()??"id"}`)})]},`day-group-${o}`))})]})},ae=n.forwardRef(le);exports.default=ae;
2
2
  //# sourceMappingURL=GiftedChat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GiftedChat.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/GiftedChat.tsx"],"sourcesContent":["import React, {\n\tforwardRef,\n\tuseCallback,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n} from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { BodySecondary } from '../../TypographyStyle';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage } from '../types';\nimport { Day } from './Day';\nimport { getMessagePlacement, shouldCenterAlign } from './messageHelpers';\nimport {\n\tuseAutoScrollOnNewMessages,\n\tuseInitialMountScroll,\n\tuseResizeObserverForFirstMessage,\n\tuseRestoreScrollPosition,\n\tuseScrollCleanup,\n\tuseScrollHandler,\n\tuseScrollToBottom,\n} from './scrollHooks';\nimport { AvatarProps, GiftedChatProps, MESSAGE_CHANNELS } from './types';\nimport { isSameDay, normalizeRef } from './utils';\nimport { Constants, TOP_THRESHOLD } from './utils';\n\nconst GiftedChatInner = (\n\tprops: Omit<GiftedChatProps<IMessage>, 'ref'>,\n\tforwardedRef: React.Ref<HTMLDivElement>,\n) => {\n\tconst {\n\t\tmessages = [],\n\t\tuser,\n\t\trenderBubble,\n\t\trenderAvatar,\n\t\trenderDay,\n\t\trenderLoading,\n\t\trenderChatEmpty,\n\t\tlistViewProps = {},\n\t\trenderAvatarOnTop = false,\n\t\tshowUserAvatar = false,\n\t\tshowAvatarForEveryMessage = false,\n\t\tinverted = false,\n\t\tmessageIdGenerator,\n\t\ttopThreshold = TOP_THRESHOLD,\n\t\tappType = GiftedChatAppType.Bik,\n\t\t...extraProps\n\t} = props || {};\n\n\tconst isMobile = useWindowSize();\n\n\tconst internalScrollRef = useRef<HTMLDivElement | null>(null);\n\tconst scrollRef = normalizeRef(\n\t\tlistViewProps.ref || forwardedRef,\n\t\tinternalScrollRef,\n\t);\n\n\tconst scrollState = useRef({\n\t\tisInitialMount: true,\n\t\tisUserScrolling: false,\n\t\tisLoadingOldMessages: false,\n\t\tisAtBottom: true,\n\t\thasTriggeredEndReached: false,\n\t\tlastMessagesLength: messages?.length ?? 0,\n\t\tpreviousScrollHeight: 0,\n\t\tpreviousScrollTop: 0,\n\t\tscrollTimeout: null,\n\t});\n\n\t// Reverse messages so newest appears last in DOM (natural reading order)\n\tconst reversedMessages = useMemo(() => {\n\t\tif (!messages || messages.length === 0) return [] as IMessage[];\n\t\treturn [...messages].reverse() as IMessage[];\n\t}, [messages]);\n\n\tconst scrollToBottom = useScrollToBottom(scrollRef, scrollState);\n\n\tuseImperativeHandle(forwardedRef, () => scrollRef.current!);\n\n\tuseInitialMountScroll(\n\t\tscrollRef,\n\t\tscrollState,\n\t\treversedMessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseScrollCleanup(scrollState);\n\n\tuseRestoreScrollPosition(scrollRef, scrollState, reversedMessages.length);\n\n\tuseAutoScrollOnNewMessages(\n\t\tscrollRef,\n\t\tscrollState,\n\t\tmessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseResizeObserverForFirstMessage(\n\t\tmessages?.[0],\n\t\tscrollState,\n\t\tscrollToBottom,\n\t\tmessageIdGenerator,\n\t);\n\n\tconst handleScroll = useScrollHandler(\n\t\tscrollState,\n\t\tlistViewProps.onEndReached,\n\t\tlistViewProps.onScroll,\n\t\ttopThreshold,\n\t);\n\n\t// Check if a message belongs to the current user\n\tconst isUserMessage = useCallback(\n\t\t(message: IMessage) => {\n\t\t\treturn Boolean(message && user && message.user?._id === user._id);\n\t\t},\n\t\t[user],\n\t);\n\n\t// Determine if avatar should be shown for this message\n\tconst shouldShowAvatar = useCallback(\n\t\t(message: IMessage, nextMessage?: IMessage) => {\n\t\t\tif (!showUserAvatar) return false;\n\t\t\tif (showAvatarForEveryMessage) return true;\n\n\t\t\t// Show avatar only when next message is from different user\n\t\t\treturn !nextMessage || nextMessage.user._id !== message.user._id;\n\t\t},\n\t\t[showUserAvatar, showAvatarForEveryMessage],\n\t);\n\n\t// Render a message bubble (or call custom renderBubble)\n\tconst renderMessageBubble = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst bubbleProps: BubbleProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\t...extraProps,\n\t\t\t};\n\n\t\t\t// Use custom render function if provided\n\t\t\tif (renderBubble) {\n\t\t\t\treturn renderBubble(bubbleProps);\n\t\t\t}\n\n\t\t\t// Default bubble rendering\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmaxWidth: appType === GiftedChatAppType.Manifest ? '50%' : '70%',\n\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t...(appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t? { minWidth: '130px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\tpadding: '8px 12px',\n\t\t\t\t\t\tborderRadius: appType === GiftedChatAppType.Manifest ? 16 : 4,\n\t\t\t\t\t\tborder:\n\t\t\t\t\t\t\tposition === 'left' && appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? '1px solid rgb(224, 224, 224)'\n\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t\t? appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t? COLORS.background.brandTint\n\t\t\t\t\t\t\t\t\t: COLORS.background.brandLight\n\t\t\t\t\t\t\t\t: appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? COLORS.background.pureWhite\n\t\t\t\t\t\t\t\t: COLORS.background.inactive,\n\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<BodySecondary>{message.text}</BodySecondary>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\t[isUserMessage, user, renderBubble, extraProps],\n\t);\n\n\t// Render a message avatar (or call custom renderAvatar)\n\tconst renderMessageAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst shouldShow = shouldShowAvatar(message, nextMessage);\n\n\t\t\tif (!shouldShow) return null;\n\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst avatarProps: AvatarProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\trenderAvatarOnTop,\n\t\t\t\tshowUserAvatar,\n\t\t\t\tshowAvatarForEveryMessage,\n\t\t\t};\n\n\t\t\treturn renderAvatar ? renderAvatar(avatarProps) : null;\n\t\t},\n\t\t[\n\t\t\tshouldShowAvatar,\n\t\t\tisUserMessage,\n\t\t\tuser,\n\t\t\trenderAvatarOnTop,\n\t\t\tshowUserAvatar,\n\t\t\tshowAvatarForEveryMessage,\n\t\t\trenderAvatar,\n\t\t],\n\t);\n\n\t// Render: Empty State\n\tif (!messages || messages.length === 0) {\n\t\treturn renderChatEmpty ? <>{renderChatEmpty()}</> : null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={scrollRef as React.RefObject<HTMLDivElement>}\n\t\t\tstyle={{\n\t\t\t\tflex: 1,\n\t\t\t\toverflowY: 'auto',\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\t...listViewProps.style,\n\t\t\t}}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{/* Spacer to push messages to bottom (newest appears last in DOM) */}\n\t\t\t<div style={{ flex: '1 0 auto' }} />\n\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: '0 0 auto',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{reversedMessages.map((message, index) => {\n\t\t\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\t\t\t\t\tconst previousMessage = reversedMessages[index - 1];\n\t\t\t\t\tconst nextMessage = reversedMessages[index + 1];\n\t\t\t\t\tconst shouldShowDay = !isSameDay(message, previousMessage);\n\t\t\t\t\tconst placement = getMessagePlacement(message, position);\n\t\t\t\t\tconst isCentered = shouldCenterAlign(message);\n\t\t\t\t\tconst isSmtp =\n\t\t\t\t\t\tmessage?.['channelId'] === MESSAGE_CHANNELS.SMTP ||\n\t\t\t\t\t\tmessage?.['channelName'] === MESSAGE_CHANNELS.SMTP;\n\t\t\t\t\t// Check if message is a private note\n\t\t\t\t\tconst isPrivateNote =\n\t\t\t\t\t\tmessage['category'] === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\t\t\t\tmessage['activityType'] ===\n\t\t\t\t\t\t\tConstants.ChatActivity.Type.PRIVATE_NOTE;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<React.Fragment\n\t\t\t\t\t\t\tkey={message._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/* Day separator */}\n\t\t\t\t\t\t\t{shouldShowDay &&\n\t\t\t\t\t\t\t\t(renderDay ? (\n\t\t\t\t\t\t\t\t\trenderDay({ createdAt: message.createdAt })\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Day createdAt={message.createdAt} appType={appType} />\n\t\t\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t\t{/* Message container */}\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t...(isMobile ? { margin: '0 4px' } : {}),\n\t\t\t\t\t\t\t\t\t...(isCentered ? {} : { display: 'flex' }),\n\t\t\t\t\t\t\t\t\t...(appType !== GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t? !isMobile && message?.user?._id === 2\n\t\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8 }\n\t\t\t\t\t\t\t\t\t\t\t: { marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t...(isSmtp && !isPrivateNote && isMobile\n\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8, marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\tjustifyContent: placement,\n\t\t\t\t\t\t\t\t\tmarginBottom: 8,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* Left avatar (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'left' && (\n\t\t\t\t\t\t\t\t\t<div style={{ margin: '0 8px' }}>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Message bubble */}\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tid={`message-bubble-${\n\t\t\t\t\t\t\t\t\t\tmessage._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\tappType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t\t? { width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t: isMobile && isSmtp\n\t\t\t\t\t\t\t\t\t\t\t? { display: 'flex', flexGrow: 1 }\n\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderMessageBubble(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{/* Right avatar (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t{!isMobile && position === 'right' && (\n\t\t\t\t\t\t\t\t\t<div style={{ margin: '0 8px' }}>\n\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(message, previousMessage, nextMessage)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default forwardRef<HTMLDivElement, GiftedChatProps<IMessage>>(\n\tGiftedChatInner,\n);\n"],"names":["GiftedChatInner","props","forwardedRef","messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","TOP_THRESHOLD","appType","GiftedChatAppType","extraProps","isMobile","useWindowSize","internalScrollRef","useRef","scrollRef","normalizeRef","scrollState","reversedMessages","useMemo","scrollToBottom","useScrollToBottom","useImperativeHandle","useInitialMountScroll","useScrollCleanup","useRestoreScrollPosition","useAutoScrollOnNewMessages","useResizeObserverForFirstMessage","handleScroll","useScrollHandler","isUserMessage","useCallback","message","shouldShowAvatar","nextMessage","renderMessageBubble","previousMessage","position","bubbleProps","jsx","COLORS","BodySecondary","renderMessageAvatar","Fragment","jsxs","index","shouldShowDay","isSameDay","placement","getMessagePlacement","isCentered","shouldCenterAlign","isSmtp","MESSAGE_CHANNELS","isPrivateNote","Constants","React","Day","GiftedChat","forwardRef"],"mappings":"ogBA2BMA,EAAkB,CACvBC,EACAC,IACI,CACJ,KAAM,CACL,SAAAC,EAAW,CAAA,EACX,KAAAC,EACA,aAAAC,EACA,aAAAC,EACA,UAAAC,EACA,cAAAC,EACA,gBAAAC,EACA,cAAAC,EAAgB,CAAA,EAChB,kBAAAC,EAAoB,GACpB,eAAAC,EAAiB,GACjB,0BAAAC,EAA4B,GAC5B,SAAAC,EAAW,GACX,mBAAAC,EACA,aAAAC,EAAeC,EAAAA,cACf,QAAAC,EAAUC,EAAAA,kBAAkB,IAC5B,GAAGC,CAAA,EACAnB,GAAS,CAAA,EAEPoB,EAAWC,EAAAA,cAAA,EAEXC,EAAoBC,EAAAA,OAA8B,IAAI,EACtDC,EAAYC,EAAAA,aACjBhB,EAAc,KAAOR,EACrBqB,CAAA,EAGKI,EAAcH,EAAAA,OAAO,CAC1B,eAAgB,GAChB,gBAAiB,GACjB,qBAAsB,GACtB,WAAY,GACZ,uBAAwB,GACxB,mBAAoBrB,GAAU,QAAU,EACxC,qBAAsB,EACtB,kBAAmB,EACnB,cAAe,IAAA,CACf,EAGKyB,EAAmBC,EAAAA,QAAQ,IAC5B,CAAC1B,GAAYA,EAAS,SAAW,EAAU,CAAA,EACxC,CAAC,GAAGA,CAAQ,EAAE,QAAA,EACnB,CAACA,CAAQ,CAAC,EAEP2B,EAAiBC,EAAAA,kBAAkBN,EAAWE,CAAW,EAE/DK,EAAAA,oBAAoB9B,EAAc,IAAMuB,EAAU,OAAQ,EAE1DQ,EAAAA,sBACCR,EACAE,EACAC,E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E,QAAS,OAAQ,SAAU,CAAA,EAC7B,CAAA,EAGH,SAAAjB,EAAoBH,EAASI,EAAiBF,CAAW,CAAA,CAAA,EAI1D,CAACvB,GAAY0B,IAAa,eACzB,MAAA,CAAI,MAAO,CAAE,OAAQ,SACpB,SAAAK,EAAoBV,EAASI,EAAiBF,CAAW,CAAA,CAC3D,CAAA,CAAA,CAAA,CAEF,CAAA,EAxDKF,EAAQ,KAAO,GAAGa,CAAK,IAAIxC,IAAA,GAA0B,IAAI,EAAA,CA2DjE,CAAC,CAAA,CAAA,CACF,CAAA,CAAA,CAGH,EAEAqD,EAAeC,EAAAA,WACdrE,CACD"}
1
+ {"version":3,"file":"GiftedChat.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/GiftedChat.tsx"],"sourcesContent":["import React, {\n\tforwardRef,\n\tuseCallback,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { Button } from '../../button';\nimport { BodySecondary } from '../../TypographyStyle';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage } from '../types';\nimport { Day } from './Day';\nimport { getMessagePlacement, shouldCenterAlign } from './messageHelpers';\nimport {\n\tuseAutoScrollOnNewMessages,\n\tuseInitialMountScroll,\n\tuseResizeObserverForFirstMessage,\n\tuseRestoreScrollPosition,\n\tuseScrollCleanup,\n\tuseScrollHandler,\n\tuseScrollToBottom,\n} from './scrollHooks';\nimport { AvatarProps, GiftedChatProps, MESSAGE_CHANNELS } from './types';\nimport { isSameDay, normalizeRef } from './utils';\nimport { Constants, TOP_THRESHOLD } from './utils';\n\nconst COLLAPSED_MAX_HEIGHT = 204;\n\nconst CollapsibleBubbleText: React.FC<{\n\ttext: string;\n\tisExpanded: boolean;\n\tonToggle: () => void;\n}> = ({ text, isExpanded, onToggle }) => {\n\tconst textRef = useRef<HTMLDivElement>(null);\n\tconst [isOverflowing, setIsOverflowing] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst el = textRef.current;\n\t\tif (el) {\n\t\t\t// Temporarily remove max-height to measure true scroll height\n\t\t\tel.style.maxHeight = 'none';\n\t\t\tconst overflows = el.scrollHeight > COLLAPSED_MAX_HEIGHT;\n\t\t\tel.style.maxHeight = isExpanded ? 'none' : `${COLLAPSED_MAX_HEIGHT}px`;\n\t\t\tsetIsOverflowing(overflows);\n\t\t}\n\t}, [text, isExpanded]);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tref={textRef}\n\t\t\t\tstyle={{\n\t\t\t\t\tmaxHeight: isExpanded ? 'none' : COLLAPSED_MAX_HEIGHT,\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<BodySecondary>{text}</BodySecondary>\n\t\t\t</div>\n\t\t\t{isOverflowing && (\n\t\t\t\t<Button\n\t\t\t\t\tbuttonType=\"text\"\n\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\tbuttonText={isExpanded ? 'Show less' : 'Read more'}\n\t\t\t\t\tonClick={onToggle}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst GiftedChatInner = (\n\tprops: Omit<GiftedChatProps<IMessage>, 'ref'>,\n\tforwardedRef: React.Ref<HTMLDivElement>,\n) => {\n\tconst {\n\t\tmessages = [],\n\t\tuser,\n\t\trenderBubble,\n\t\trenderAvatar,\n\t\trenderDay,\n\t\trenderLoading,\n\t\trenderChatEmpty,\n\t\tlistViewProps = {},\n\t\trenderAvatarOnTop = false,\n\t\tshowUserAvatar = false,\n\t\tshowAvatarForEveryMessage = false,\n\t\tinverted = false,\n\t\tmessageIdGenerator,\n\t\ttopThreshold = TOP_THRESHOLD,\n\t\tappType = GiftedChatAppType.Bik,\n\t\tmaxHeight,\n\t\tisActivityMessage,\n\t\t...extraProps\n\t} = props || {};\n\n\tconst isMobile = useWindowSize();\n\n\tconst internalScrollRef = useRef<HTMLDivElement | null>(null);\n\tconst scrollRef = normalizeRef(\n\t\tlistViewProps.ref || forwardedRef,\n\t\tinternalScrollRef,\n\t);\n\n\tconst scrollState = useRef({\n\t\tisInitialMount: true,\n\t\tisUserScrolling: false,\n\t\tisLoadingOldMessages: false,\n\t\tisAtBottom: true,\n\t\thasTriggeredEndReached: false,\n\t\tlastMessagesLength: messages?.length ?? 0,\n\t\tpreviousScrollHeight: 0,\n\t\tpreviousScrollTop: 0,\n\t\tscrollTimeout: null,\n\t});\n\n\tconst [expandedMessages, setExpandedMessages] = useState<\n\t\tSet<string | number>\n\t>(new Set());\n\n\t// Reverse messages so newest appears last in DOM (natural reading order)\n\tconst reversedMessages = useMemo(() => {\n\t\tif (!messages || messages.length === 0) return [] as IMessage[];\n\t\treturn [...messages].reverse() as IMessage[];\n\t}, [messages]);\n\n\t// Group consecutive same-day messages so each day separator can stick\n\t// within its own section and get pushed out by the next day's separator.\n\tconst dayGroups = useMemo(() => {\n\t\tconst groups: { createdAt: IMessage['createdAt']; indices: number[] }[] =\n\t\t\t[];\n\t\treversedMessages.forEach((message, index) => {\n\t\t\tconst previousMessage = reversedMessages[index - 1];\n\t\t\tif (index === 0 || !isSameDay(message, previousMessage)) {\n\t\t\t\tgroups.push({ createdAt: message.createdAt, indices: [index] });\n\t\t\t} else {\n\t\t\t\tgroups[groups.length - 1].indices.push(index);\n\t\t\t}\n\t\t});\n\t\treturn groups;\n\t}, [reversedMessages]);\n\n\tconst scrollToBottom = useScrollToBottom(scrollRef, scrollState);\n\n\tuseImperativeHandle(forwardedRef, () => scrollRef.current!);\n\n\tuseInitialMountScroll(\n\t\tscrollRef,\n\t\tscrollState,\n\t\treversedMessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseScrollCleanup(scrollState);\n\n\tuseRestoreScrollPosition(scrollRef, scrollState, reversedMessages.length);\n\n\tuseAutoScrollOnNewMessages(\n\t\tscrollRef,\n\t\tscrollState,\n\t\tmessages.length,\n\t\tscrollToBottom,\n\t);\n\n\tuseResizeObserverForFirstMessage(\n\t\tmessages?.[0],\n\t\tscrollState,\n\t\tscrollToBottom,\n\t\tmessageIdGenerator,\n\t);\n\n\tconst handleScroll = useScrollHandler(\n\t\tscrollState,\n\t\tlistViewProps.onEndReached,\n\t\tlistViewProps.onScroll,\n\t\ttopThreshold,\n\t);\n\n\t// Check if a message belongs to the current user\n\tconst isUserMessage = useCallback(\n\t\t(message: IMessage) => {\n\t\t\treturn Boolean(message && user && message.user?._id === user._id);\n\t\t},\n\t\t[user],\n\t);\n\n\t// Determine if avatar should be shown for this message\n\tconst shouldShowAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage) => {\n\t\t\tif (!showUserAvatar) return false;\n\t\t\tif (showAvatarForEveryMessage) return true;\n\n\t\t\t// Show avatar on the first message in a consecutive sender stack,\n\t\t\t// or when an activity interrupts the stack, or when the current message itself is an activity\n\t\t\treturn (\n\t\t\t\t!previousMessage ||\n\t\t\t\t(isActivityMessage ? isActivityMessage(message) : false) ||\n\t\t\t\t(isActivityMessage ? isActivityMessage(previousMessage) : false) ||\n\t\t\t\tpreviousMessage.user._id !== message.user._id\n\t\t\t);\n\t\t},\n\t\t[showUserAvatar, showAvatarForEveryMessage, isActivityMessage],\n\t);\n\n\t// Render a message bubble (or call custom renderBubble)\n\tconst renderMessageBubble = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\t\t\tconst isTopOfStack = previousMessage?.user?._id !== message?.user?._id;\n\t\t\tconst isBottomOfStack = nextMessage?.user?._id !== message?.user?._id;\n\n\t\t\tconst bubbleProps: BubbleProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\t...extraProps,\n\t\t\t};\n\n\t\t\t// Use custom render function if provided\n\t\t\tif (renderBubble) {\n\t\t\t\treturn renderBubble(bubbleProps);\n\t\t\t}\n\n\t\t\t// Default bubble rendering\n\t\t\tconst messageId = message._id;\n\t\t\tconst isExpanded = expandedMessages.has(messageId);\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tmaxWidth: appType === GiftedChatAppType.Manifest ? '50%' : '70%',\n\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t...(appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t? { minWidth: '130px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\tpadding: '8px 12px',\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tposition === 'left' ? (isTopOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tposition === 'right' ? (isTopOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tposition === 'left' ? (isBottomOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tposition === 'right' ? (isBottomOfStack ? 12 : 2) : 12,\n\t\t\t\t\t\tborder:\n\t\t\t\t\t\t\tposition === 'left' && appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? '1px solid rgb(224, 224, 224)'\n\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t\t? appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t? COLORS.background.brandTint\n\t\t\t\t\t\t\t\t\t: COLORS.background.brandLight\n\t\t\t\t\t\t\t\t: appType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t? COLORS.background.pureWhite\n\t\t\t\t\t\t\t\t: COLORS.background.inactive,\n\t\t\t\t\t\tcolor: COLORS.content.primary,\n\t\t\t\t\t\twordBreak: 'break-word',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<CollapsibleBubbleText\n\t\t\t\t\t\ttext={message.text ?? ''}\n\t\t\t\t\t\tisExpanded={isExpanded}\n\t\t\t\t\t\tonToggle={() =>\n\t\t\t\t\t\t\tsetExpandedMessages((prev) => {\n\t\t\t\t\t\t\t\tconst next = new Set(prev);\n\t\t\t\t\t\t\t\tif (isExpanded) next.delete(messageId);\n\t\t\t\t\t\t\t\telse next.add(messageId);\n\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\t[isUserMessage, user, renderBubble, extraProps, expandedMessages],\n\t);\n\n\t// Render a message avatar (or call custom renderAvatar)\n\tconst renderMessageAvatar = useCallback(\n\t\t(message: IMessage, previousMessage?: IMessage, nextMessage?: IMessage) => {\n\t\t\tconst shouldShow = shouldShowAvatar(message, previousMessage);\n\n\t\t\tif (!shouldShow) return null;\n\n\t\t\tconst position = isUserMessage(message) ? 'right' : 'left';\n\n\t\t\tconst avatarProps: AvatarProps<IMessage> = {\n\t\t\t\tcurrentMessage: message,\n\t\t\t\tpreviousMessage,\n\t\t\t\tnextMessage,\n\t\t\t\tposition,\n\t\t\t\tuser,\n\t\t\t\trenderAvatarOnTop,\n\t\t\t\tshowUserAvatar,\n\t\t\t\tshowAvatarForEveryMessage,\n\t\t\t};\n\n\t\t\treturn renderAvatar ? renderAvatar(avatarProps) : null;\n\t\t},\n\t\t[\n\t\t\tshouldShowAvatar,\n\t\t\tisUserMessage,\n\t\t\tuser,\n\t\t\trenderAvatarOnTop,\n\t\t\tshowUserAvatar,\n\t\t\tshowAvatarForEveryMessage,\n\t\t\trenderAvatar,\n\t\t],\n\t);\n\n\t// Render: Empty State\n\tif (!messages || messages.length === 0) {\n\t\treturn renderChatEmpty ? <>{renderChatEmpty()}</> : null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={scrollRef as React.RefObject<HTMLDivElement>}\n\t\t\tstyle={{\n\t\t\t\tflex: 1,\n\t\t\t\toverflowY: 'auto',\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\t...(maxHeight ? { maxHeight, height: maxHeight } : {}),\n\t\t\t\t...listViewProps.style,\n\t\t\t}}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{/* Spacer to push messages to bottom (newest appears last in DOM) */}\n\t\t\t<div style={{ flex: '1 0 auto' }} />\n\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tflex: '0 0 auto',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{dayGroups.map((group, groupIndex) => (\n\t\t\t\t\t<div key={`day-group-${groupIndex}`}>\n\t\t\t\t\t\t{/* Day separator — sticks to top while this day scrolls past */}\n\t\t\t\t\t\t{renderDay ? (\n\t\t\t\t\t\t\t<div style={{ position: 'sticky', top: 0, zIndex: 2 }}>\n\t\t\t\t\t\t\t\t{renderDay({ createdAt: group.createdAt })}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Day\n\t\t\t\t\t\t\t\tcreatedAt={group.createdAt}\n\t\t\t\t\t\t\t\tappType={appType}\n\t\t\t\t\t\t\t\tscrollRootRef={scrollRef}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{group.indices.map((index) => {\n\t\t\t\t\t\t\tconst message = reversedMessages[index];\n\t\t\t\t\t\t\tconst isSmtp =\n\t\t\t\t\t\t\t\tmessage?.['channelId'] === MESSAGE_CHANNELS.SMTP ||\n\t\t\t\t\t\t\t\tmessage?.['channelName'] === MESSAGE_CHANNELS.SMTP;\n\t\t\t\t\t\t\tconst position = isSmtp\n\t\t\t\t\t\t\t\t? 'left'\n\t\t\t\t\t\t\t\t: isUserMessage(message)\n\t\t\t\t\t\t\t\t? 'right'\n\t\t\t\t\t\t\t\t: 'left';\n\t\t\t\t\t\t\tconst previousMessage = reversedMessages[index - 1];\n\t\t\t\t\t\t\tconst nextMessage = reversedMessages[index + 1];\n\t\t\t\t\t\t\tconst placement = getMessagePlacement(message, position);\n\t\t\t\t\t\t\tconst isCentered = shouldCenterAlign(message);\n\t\t\t\t\t\t\t// Check if message is a private note\n\t\t\t\t\t\t\tconst isPrivateNote =\n\t\t\t\t\t\t\t\tmessage['category'] ===\n\t\t\t\t\t\t\t\t\tConstants.ChatActivity.Category.ACTIVITY &&\n\t\t\t\t\t\t\t\tmessage['activityType'] ===\n\t\t\t\t\t\t\t\t\tConstants.ChatActivity.Type.PRIVATE_NOTE;\n\t\t\t\t\t\t\tconst isActivity =\n\t\t\t\t\t\t\t\tmessage['category'] ===\n\t\t\t\t\t\t\t\t\tConstants.ChatActivity.Category.ACTIVITY && !isPrivateNote;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<React.Fragment\n\t\t\t\t\t\t\t\t\tkey={\n\t\t\t\t\t\t\t\t\t\tmessage._id ?? `${index}-${messageIdGenerator?.() ?? 'id'}`\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{/* Message container */}\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t...(isMobile ? { margin: '0 4px' } : {}),\n\t\t\t\t\t\t\t\t\t\t\t...(isCentered\n\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t: { display: 'flex', alignItems: 'flex-start' }),\n\t\t\t\t\t\t\t\t\t\t\t...(appType !== GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t\t\t? !isMobile && position === 'right'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8 }\n\t\t\t\t\t\t\t\t\t\t\t\t\t: { marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t\t\t...(isSmtp && !isPrivateNote && isMobile\n\t\t\t\t\t\t\t\t\t\t\t\t? { marginLeft: 8, marginRight: 8 }\n\t\t\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t\t\t...(isSmtp && isPrivateNote\n\t\t\t\t\t\t\t\t\t\t\t\t? { marginRight: 16 }\n\t\t\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t\t\tjustifyContent: placement,\n\t\t\t\t\t\t\t\t\t\t\tmarginBottom: isSmtp\n\t\t\t\t\t\t\t\t\t\t\t\t? // SMTP: flat 24px between mails, no same/different-user split.\n\t\t\t\t\t\t\t\t\t\t\t\t nextMessage\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 24\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 0\n\t\t\t\t\t\t\t\t\t\t\t\t: nextMessage\n\t\t\t\t\t\t\t\t\t\t\t\t? nextMessage?.user?._id === message?.user?._id\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 4\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 20\n\t\t\t\t\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\t\t\t\t\t\t// Activity cards: no left/bottom margin.\n\t\t\t\t\t\t\t\t\t\t\t...(isActivity ? { marginLeft: 0, marginBottom: 0 } : {}),\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{/* Left avatar or placeholder (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t\t\t{!isMobile && position === 'left' && (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tmarginRight: '4px',\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: '24px',\n\t\t\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpreviousMessage,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextMessage,\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{/* Message bubble */}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tid={`message-bubble-${\n\t\t\t\t\t\t\t\t\t\t\t\tmessage._id ??\n\t\t\t\t\t\t\t\t\t\t\t\t`${index}-${messageIdGenerator?.() ?? 'id'}`\n\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\tappType === GiftedChatAppType.Manifest\n\t\t\t\t\t\t\t\t\t\t\t\t\t? { width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t\t\t: isMobile || isSmtp\n\t\t\t\t\t\t\t\t\t\t\t\t\t? { display: 'flex', flexGrow: 1, width: '100%' }\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{renderMessageBubble(\n\t\t\t\t\t\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\t\t\t\t\t\tpreviousMessage,\n\t\t\t\t\t\t\t\t\t\t\t\tnextMessage,\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t{/* Right avatar or placeholder (for mobile, avatar is hidden) */}\n\t\t\t\t\t\t\t\t\t\t{!isMobile && position === 'right' && (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tmarginLeft: '4px',\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: '24px',\n\t\t\t\t\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\talignSelf: 'flex-start',\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{renderMessageAvatar(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\t\t\t\t\t\t\tpreviousMessage,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextMessage,\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default forwardRef<HTMLDivElement, GiftedChatProps<IMessage>>(\n\tGiftedChatInner,\n);\n"],"names":["COLLAPSED_MAX_HEIGHT","CollapsibleBubbleText","text","isExpanded","onToggle","textRef","useRef","isOverflowing","setIsOverflowing","useState","useEffect","el","overflows","jsxs","Fragment","jsx","BodySecondary","Button","GiftedChatInner","props","forwardedRef","messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","TOP_THRESHOLD","appType","GiftedChatAppType","maxHeight","isActivityMessage","extraProps","isMobile","useWindowSize","internalScrollRef","scrollRef","normalizeRef","scrollState","expandedMessages","setExpandedMessages","reversedMessages","useMemo","dayGroups","groups","message","index","previousMessage","isSameDay","scrollToBottom","useScrollToBottom","useImperativeHandle","useInitialMountScroll","useScrollCleanup","useRestoreScrollPosition","useAutoScrollOnNewMessages","useResizeObserverForFirstMessage","handleScroll","useScrollHandler","isUserMessage","useCallback","shouldShowAvatar","renderMessageBubble","nextMessage","position","isTopOfStack","isBottomOfStack","bubbleProps","messageId","COLORS","prev","next","renderMessageAvatar","group","groupIndex","Day","isSmtp","MESSAGE_CHANNELS","placement","getMessagePlacement","isCentered","shouldCenterAlign","isPrivateNote","Constants","isActivity","React","GiftedChat","forwardRef"],"mappings":"+iBA8BMA,EAAuB,IAEvBC,GAID,CAAC,CAAE,KAAAC,EAAM,WAAAC,EAAY,SAAAC,KAAe,CACxC,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrC,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAAS,EAAK,EAExDC,OAAAA,EAAAA,UAAU,IAAM,CACf,MAAMC,EAAKN,EAAQ,QACnB,GAAIM,EAAI,CAEPA,EAAG,MAAM,UAAY,OACrB,MAAMC,EAAYD,EAAG,aAAeX,EACpCW,EAAG,MAAM,UAAYR,EAAa,OAAS,GAAGH,CAAoB,KAClEQ,EAAiBI,CAAS,CAC3B,CACD,EAAG,CAACV,EAAMC,CAAU,CAAC,EAGpBU,EAAAA,KAAAC,WAAA,CACC,SAAA,CAAAC,EAAAA,IAAC,MAAA,CACA,IAAKV,EACL,MAAO,CACN,UAAWF,EAAa,OAASH,EACjC,SAAU,QAAA,EAGX,SAAAe,EAAAA,IAACC,GAAAA,eAAe,SAAAd,CAAA,CAAK,CAAA,CAAA,EAErBK,GACAQ,EAAAA,IAACE,GAAAA,OAAA,CACA,WAAW,OACX,KAAK,KACL,WAAYd,EAAa,YAAc,YACvC,QAASC,CAAA,CAAA,CACV,EAEF,CAEF,EAEMc,GAAkB,CACvBC,EACAC,IACI,CACJ,KAAM,CACL,SAAAC,E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AAd,EACAjB,EACAE,EACAgB,CAAA,CACD,CAAA,EAIA,CAAC9B,GAAY+B,IAAa,SAC1BzD,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,WAAY,MACZ,MAAO,OACP,WAAY,EACZ,UAAW,YAAA,EAGX,SAAAiE,EACA3B,EACAE,EACAgB,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CAEF,EA3FClB,EAAQ,KAAO,GAAGC,CAAK,IAAIrB,IAAA,GAA0B,IAAI,EAAA,CA8F7D,CAAC,CAAA,CAAA,EArIQ,aAAaiD,CAAU,EAsIjC,CACA,CAAA,CAAA,CACF,CAAA,CAAA,CAGH,EAEAY,GAAeC,EAAAA,WACd7E,EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/types.ts"],"sourcesContent":["import React from 'react';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage, LeftRightStyle, User } from '../types';\n\nexport interface ListViewProps {\n\t/** Custom styles for the container. */\n\tstyle?: React.CSSProperties;\n\t/** Callback when end of list is reached. */\n\tonEndReached?: () => void;\n\t/** Threshold for triggering end reached. */\n\tonEndReachedThreshold?: number;\n\t/** Scroll event handler. */\n\tonScroll?: (event: React.UIEvent<HTMLDivElement>) => void;\n\t/** Ref for the scrollable container. */\n\tref?:\n\t\t| React.RefObject<HTMLDivElement>\n\t\t| React.MutableRefObject<HTMLDivElement | null>;\n}\n\nexport interface AvatarProps<TMessage extends IMessage = IMessage> {\n\t/** The current message for the avatar. */\n\tcurrentMessage: TMessage;\n\t/** The previous message. */\n\tpreviousMessage?: TMessage;\n\t/** The next message. */\n\tnextMessage?: TMessage;\n\t/** Position of the avatar ('left' or 'right'). */\n\tposition: 'left' | 'right';\n\t/** The user object. */\n\tuser: User;\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Custom styles for avatar image. */\n\timageStyle?: LeftRightStyle<React.CSSProperties>;\n\t/** Custom styles for avatar container. */\n\tcontainerStyle?: LeftRightStyle<React.CSSProperties>;\n\t[key: string]: any;\n}\n\nexport interface DayProps {\n\t/** Date/time for the separator. */\n\tcreatedAt?: Date | number | string;\n\t/** Format for displaying the date. */\n\tdateFormat?: string;\n\t/** Calendar format options. */\n\tdateFormatCalendar?: {\n\t\t/** Format for same day. */\n\t\tsameDay?: string;\n\t\t/** Format for next day. */\n\t\tnextDay?: string;\n\t\t/** Format for next week. */\n\t\tnextWeek?: string;\n\t\t/** Format for last day. */\n\t\tlastDay?: string;\n\t\t/** Format for last week. */\n\t\tlastWeek?: string;\n\t\t/** Format for other days. */\n\t\tsameElse?: string;\n\t};\n}\n\nexport interface GiftedChatProps<TMessage extends IMessage = IMessage> {\n\t/** Array of chat messages. */\n\tmessages: TMessage[];\n\t/** The current user object. */\n\tuser: User;\n\n\t/** Custom bubble renderer. */\n\trenderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;\n\t/** Custom avatar renderer. */\n\trenderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;\n\t/** Custom day separator renderer. */\n\trenderDay?: (props: DayProps) => React.ReactNode;\n\t/** Custom loading renderer. */\n\trenderLoading?: () => React.ReactNode;\n\t/** Custom empty chat renderer. */\n\trenderChatEmpty?: () => React.ReactNode;\n\n\t/** Props for the scrollable list view. */\n\tlistViewProps?: ListViewProps;\n\n\t/** Scroll threshold for loading old messages. */\n\ttopThreshold?: number;\n\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Whether to invert the message list. */\n\tinverted?: boolean;\n\n\t/** Handler for long press on message. */\n\tonLongPress?: (context?: any, message?: TMessage) => void;\n\t/** Handler for press on message. */\n\tonPress?: (context?: any, message?: TMessage) => void;\n\n\t/** Function to generate message IDs. */\n\tmessageIdGenerator?: (message?: TMessage) => string;\n\tappType?: GiftedChatAppType;\n\n\t[key: string]: any;\n}\n\nexport interface ScrollState {\n\t/** Is initial mount of the component. */\n\tisInitialMount: boolean;\n\t/** Is user currently scrolling. */\n\tisUserScrolling: boolean;\n\t/** Is loading old messages. */\n\tisLoadingOldMessages: boolean;\n\n\t/** Is scroll at bottom. */\n\tisAtBottom: boolean;\n\t/** Has end reached been triggered. */\n\thasTriggeredEndReached: boolean;\n\n\t/** Last known messages length. */\n\tlastMessagesLength: number;\n\n\t/** Previous scroll height. */\n\tpreviousScrollHeight: number;\n\t/** Previous scroll top position. */\n\tpreviousScrollTop: number;\n\n\t/** Debounce timer for scroll events. */\n\tscrollTimeout: number | null;\n}\n\nexport enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {\n\t/** User is calling another user. */\n\tCALLING_CALL = 'CALLING_CALL',\n\t/** Call is ringing for the recipient. */\n\tRINGING_CALL = 'RINGING_CALL',\n\t/** Call is ongoing between users. */\n\tONGOING_CALL = 'ONGOING_CALL',\n\t/** Call has been completed. */\n\tCOMPLETED_CALL = 'COMPLETED_CALL',\n\t/** Call was missed by the recipient. */\n\tMISSED_CALL = 'MISSED_CALL',\n\t/** Callback was requested. */\n\tREQUESTED_CALLBACK = 'REQUESTED_CALLBACK',\n\t/** Call was declined by the recipient. */\n\tDECLINED_CALL = 'DECLINED_CALL',\n\t/** Call was disconnected. */\n\tDISCONNECTED_CALL = 'DISCONNECTED_CALL',\n\t/** Call was unanswered. */\n\tUNANSWERED_CALL = 'UNANSWERED_CALL',\n}\n\nexport const enum MESSAGE_CHANNELS {\n\tINSTAGRAM = 'instagram',\n\tMESSENGER = 'messenger',\n\tWHATSAPP = 'whatsapp',\n\tGMAIL = 'gmail',\n\tLIVECHAT = 'livechat',\n\tGOOGLE_BUSINESS_CHAT = 'gbm',\n\tSHOPIFY = 'shopify',\n\tFACEBOOK = 'facebook',\n\tEMAIL = 'email',\n\tSMTP = 'smtp',\n\tFACEBOOK_CATALOG = 'facebook-catalog',\n\tWHATSAPP_VOICE_CALL = 'whatsapp-voice-call',\n\tCREATE_SIGNATURE = 'create-signature',\n\tEDIT_SIGNATURE = 'edit-signature',\n\tWEBPUSH = 'webpush',\n\tTASKS = 'tasks',\n\tRCS = 'rcs',\n}\n"],"names":["CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE","MESSAGE_CHANNELS"],"mappings":"gFAsIO,IAAKA,GAAAA,IAEXA,EAAA,aAAe,eAEfA,EAAA,aAAe,eAEfA,EAAA,aAAe,eAEfA,EAAA,eAAiB,iBAEjBA,EAAA,YAAc,cAEdA,EAAA,mBAAqB,qBAErBA,EAAA,cAAgB,gBAEhBA,EAAA,kBAAoB,oBAEpBA,EAAA,gBAAkB,kBAlBPA,IAAAA,GAAA,CAAA,CAAA,EAqBMC,GAAAA,IACjBA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,qBAAuB,MACvBA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,iBAAmB,mBACnBA,EAAA,oBAAsB,sBACtBA,EAAA,iBAAmB,mBACnBA,EAAA,eAAiB,iBACjBA,EAAA,QAAU,UACVA,EAAA,MAAQ,QACRA,EAAA,IAAM,MAjBWA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"types.js","sources":["../../../../../src/components/BikGiftedChat/GiftedChat/types.ts"],"sourcesContent":["import React from 'react';\nimport { BubbleProps, GiftedChatAppType } from '../Bubble/types';\nimport { IMessage, LeftRightStyle, User } from '../types';\n\nexport interface ListViewProps {\n\t/** Custom styles for the container. */\n\tstyle?: React.CSSProperties;\n\t/** Callback when end of list is reached. */\n\tonEndReached?: () => void;\n\t/** Threshold for triggering end reached. */\n\tonEndReachedThreshold?: number;\n\t/** Scroll event handler. */\n\tonScroll?: (event: React.UIEvent<HTMLDivElement>) => void;\n\t/** Ref for the scrollable container. */\n\tref?:\n\t\t| React.RefObject<HTMLDivElement>\n\t\t| React.MutableRefObject<HTMLDivElement | null>;\n}\n\nexport interface AvatarProps<TMessage extends IMessage = IMessage> {\n\t/** The current message for the avatar. */\n\tcurrentMessage: TMessage;\n\t/** The previous message. */\n\tpreviousMessage?: TMessage;\n\t/** The next message. */\n\tnextMessage?: TMessage;\n\t/** Position of the avatar ('left' or 'right'). */\n\tposition: 'left' | 'right';\n\t/** The user object. */\n\tuser: User;\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message; when false, show only on the first message of each consecutive sender group. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Custom styles for avatar image. */\n\timageStyle?: LeftRightStyle<React.CSSProperties>;\n\t/** Custom styles for avatar container. */\n\tcontainerStyle?: LeftRightStyle<React.CSSProperties>;\n\t[key: string]: any;\n}\n\nexport interface DayProps {\n\t/** Date/time for the separator. */\n\tcreatedAt?: Date | number | string;\n\t/** Format for displaying the date. */\n\tdateFormat?: string;\n\t/** Calendar format options. */\n\tdateFormatCalendar?: {\n\t\t/** Format for same day. */\n\t\tsameDay?: string;\n\t\t/** Format for next day. */\n\t\tnextDay?: string;\n\t\t/** Format for next week. */\n\t\tnextWeek?: string;\n\t\t/** Format for last day. */\n\t\tlastDay?: string;\n\t\t/** Format for last week. */\n\t\tlastWeek?: string;\n\t\t/** Format for other days. */\n\t\tsameElse?: string;\n\t};\n}\n\nexport interface GiftedChatProps<TMessage extends IMessage = IMessage> {\n\t/** Array of chat messages. */\n\tmessages: TMessage[];\n\t/** The current user object. */\n\tuser: User;\n\n\t/** Custom bubble renderer. */\n\trenderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;\n\t/** Custom avatar renderer. */\n\trenderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;\n\t/** Custom day separator renderer. */\n\trenderDay?: (props: DayProps) => React.ReactNode;\n\t/** Custom loading renderer. */\n\trenderLoading?: () => React.ReactNode;\n\t/** Custom empty chat renderer. */\n\trenderChatEmpty?: () => React.ReactNode;\n\n\t/** Props for the scrollable list view. */\n\tlistViewProps?: ListViewProps;\n\n\t/** Scroll threshold for loading old messages. */\n\ttopThreshold?: number;\n\n\t/** Whether to render avatar on top. */\n\trenderAvatarOnTop?: boolean;\n\t/** Whether to show user avatar. */\n\tshowUserAvatar?: boolean;\n\t/** Show avatar for every message; when false, show only on the first message of each consecutive sender group. */\n\tshowAvatarForEveryMessage?: boolean;\n\t/** Whether to invert the message list. */\n\tinverted?: boolean;\n\n\t/** Handler for long press on message. */\n\tonLongPress?: (context?: any, message?: TMessage) => void;\n\t/** Handler for press on message. */\n\tonPress?: (context?: any, message?: TMessage) => void;\n\n\t/** Function to generate message IDs. */\n\tmessageIdGenerator?: (message?: TMessage) => string;\n\tappType?: GiftedChatAppType;\n\t/** Maximum height of the chat messages container in pixels. When set, the container clips overflow and scrolls within that height. */\n\tmaxHeight?: number;\n\t/** Returns true if a message is a non-chat activity (e.g. assignment, status change). Used to break sender stacks for avatar and border-radius logic. */\n\tisActivityMessage?: (message: TMessage) => boolean;\n\n\t[key: string]: any;\n}\n\nexport interface ScrollState {\n\t/** Is initial mount of the component. */\n\tisInitialMount: boolean;\n\t/** Is user currently scrolling. */\n\tisUserScrolling: boolean;\n\t/** Is loading old messages. */\n\tisLoadingOldMessages: boolean;\n\n\t/** Is scroll at bottom. */\n\tisAtBottom: boolean;\n\t/** Has end reached been triggered. */\n\thasTriggeredEndReached: boolean;\n\n\t/** Last known messages length. */\n\tlastMessagesLength: number;\n\n\t/** Previous scroll height. */\n\tpreviousScrollHeight: number;\n\t/** Previous scroll top position. */\n\tpreviousScrollTop: number;\n\n\t/** Debounce timer for scroll events. */\n\tscrollTimeout: number | null;\n}\n\nexport enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {\n\t/** User is calling another user. */\n\tCALLING_CALL = 'CALLING_CALL',\n\t/** Call is ringing for the recipient. */\n\tRINGING_CALL = 'RINGING_CALL',\n\t/** Call is ongoing between users. */\n\tONGOING_CALL = 'ONGOING_CALL',\n\t/** Call has been completed. */\n\tCOMPLETED_CALL = 'COMPLETED_CALL',\n\t/** Call was missed by the recipient. */\n\tMISSED_CALL = 'MISSED_CALL',\n\t/** Callback was requested. */\n\tREQUESTED_CALLBACK = 'REQUESTED_CALLBACK',\n\t/** Call was declined by the recipient. */\n\tDECLINED_CALL = 'DECLINED_CALL',\n\t/** Call was disconnected. */\n\tDISCONNECTED_CALL = 'DISCONNECTED_CALL',\n\t/** Call was unanswered. */\n\tUNANSWERED_CALL = 'UNANSWERED_CALL',\n}\n\nexport const enum MESSAGE_CHANNELS {\n\tINSTAGRAM = 'instagram',\n\tMESSENGER = 'messenger',\n\tWHATSAPP = 'whatsapp',\n\tGMAIL = 'gmail',\n\tLIVECHAT = 'livechat',\n\tGOOGLE_BUSINESS_CHAT = 'gbm',\n\tSHOPIFY = 'shopify',\n\tFACEBOOK = 'facebook',\n\tEMAIL = 'email',\n\tSMTP = 'smtp',\n\tFACEBOOK_CATALOG = 'facebook-catalog',\n\tWHATSAPP_VOICE_CALL = 'whatsapp-voice-call',\n\tCREATE_SIGNATURE = 'create-signature',\n\tEDIT_SIGNATURE = 'edit-signature',\n\tWEBPUSH = 'webpush',\n\tTASKS = 'tasks',\n\tRCS = 'rcs',\n}\n"],"names":["CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE","MESSAGE_CHANNELS"],"mappings":"gFA0IO,IAAKA,GAAAA,IAEXA,EAAA,aAAe,eAEfA,EAAA,aAAe,eAEfA,EAAA,aAAe,eAEfA,EAAA,eAAiB,iBAEjBA,EAAA,YAAc,cAEdA,EAAA,mBAAqB,qBAErBA,EAAA,cAAgB,gBAEhBA,EAAA,kBAAoB,oBAEpBA,EAAA,gBAAkB,kBAlBPA,IAAAA,GAAA,CAAA,CAAA,EAqBMC,GAAAA,IACjBA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,qBAAuB,MACvBA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,iBAAmB,mBACnBA,EAAA,oBAAsB,sBACtBA,EAAA,iBAAmB,mBACnBA,EAAA,eAAiB,iBACjBA,EAAA,QAAU,UACVA,EAAA,MAAQ,QACRA,EAAA,IAAM,MAjBWA,IAAAA,GAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.js","sources":["../../../../../../../src/components/QueryBuilder/components/Connectors/Components/EmojiPicker.tsx"],"sourcesContent":["import EmojiIcon from '@src/assets/icons/emoji.svg';\nimport React, { LegacyRef, Suspense, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { IconButton } from '@src/components/icon-button';\nimport ChipInput from '@src/components/input/ChipInput';\nimport { CONNECTOR_VALUE_TYPE } from '@src/components/QueryBuilder/types/QueryBuilderConnector';\nimport { ConnectorComponentProps } from '@src/components/QueryBuilder/types/QueryBuilderConnector.type';\nimport { useOutside } from '@src/hooks/useOutside';\n\ntype EmojiClickData = {\n\temoji: string;\n};\n\nconst LazyEmojiPicker = React.lazy(async () => {\n\tconst mod = await import('emoji-picker-react');\n\treturn { default: mod.default };\n});\n\ntype Props = Omit<Omit<ConnectorComponentProps, 'val'>, 'onChange'> & {\n\tval: string[];\n\tonChange: (val: (string | number)[]) => void;\n};\n\nconst EmojiPicker: React.FC<ConnectorComponentProps> = ({\n\tval,\n\tonChange,\n\terrors,\n\tnativeID,\n\tdisabled,\n}) => {\n\tconst [showPicker, setShowPicker] = useState<boolean>(false);\n\tconst valArr = (Array.isArray(val) ? val : []).map((valEl) => {\n\t\treturn valEl;\n\t});\n\tconst ref = useRef();\n\n\tuseOutside(ref, () => {\n\t\tsetShowPicker(false);\n\t});\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{ position: 'relative', opacity: disabled ? 0.5 : 1, width: 300 }}\n\t\t\tid={nativeID}\n\t\t>\n\t\t\t{!!disabled && (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<EmojiInput>\n\t\t\t\t<ChipInput\n\t\t\t\t\terror={errors?.val as string}\n\t\t\t\t\tonChipsChange={onChange as Props['onChange']}\n\t\t\t\t\tchipsContainerCustomStyle={{\n\t\t\t\t\t\tpadding: '0px 32px 0px 8px',\n\t\t\t\t\t}}\n\t\t\t\t\tcreateChipKeys={[13, 188]}\n\t\t\t\t\tplaceholder={'add emojis'}\n\t\t\t\t\tchips={valArr}\n\t\t\t\t/>\n\n\t\t\t\t<EmojiContainer>\n\t\t\t\t\t<IconButton Icon={EmojiIcon} onClick={() => setShowPicker(true)} />\n\t\t\t\t</EmojiContainer>\n\t\t\t\t{showPicker && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ref as unknown as LegacyRef<HTMLDivElement>}\n\t\t\t\t\t\tclassName=\"absolute-picker\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Suspense fallback={null}>\n\t\t\t\t\t\t\t<LazyEmojiPicker\n\t\t\t\t\t\t\t\tpreviewConfig={{ showPreview: false }}\n\t\t\t\t\t\t\t\tskinTonesDisabled\n\t\t\t\t\t\t\t\tsearchDisabled\n\t\t\t\t\t\t\t\ttheme={'dark' as unknown as never}\n\t\t\t\t\t\t\t\temojiStyle={'native' as unknown as never}\n\t\t\t\t\t\t\t\tonEmojiClick={(emoji: EmojiClickData) => {\n\t\t\t\t\t\t\t\t\tconst exists = valArr.find((em) => emoji.emoji === em);\n\t\t\t\t\t\t\t\t\tif (exists) return;\n\t\t\t\t\t\t\t\t\tonChange?.([\n\t\t\t\t\t\t\t\t\t\t...valArr,\n\t\t\t\t\t\t\t\t\t\temoji.emoji,\n\t\t\t\t\t\t\t\t\t] as unknown as CONNECTOR_VALUE_TYPE);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</EmojiInput>\n\t\t</div>\n\t);\n};\n\nexport default function EmojiPickerConnector(props: ConnectorComponentProps) {\n\treturn <EmojiPicker {...props} />;\n}\n\nconst EmojiContainer = styled.div`\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nconst EmojiInput = styled.div`\n\tinput {\n\t\tpointer-events: none;\n\t}\n\t.absolute-picker {\n\t\tposition: absolute;\n\t\ttop: 50px;\n\t\tz-index: 1;\n\t}\n`;\n"],"names":["LazyEmojiPicker","React","EmojiPicker","val","onChange","errors","nativeID","disabled","showPicker","setShowPicker","useState","valArr","valEl","ref","useRef","useOutside","jsxs","jsx","EmojiInput","ChipInput","EmojiContainer","IconButton","EmojiIcon","Suspense","emoji","em","EmojiPickerConnector","props","styled"],"mappings":"y5BAaMA,EAAkBC,EAAAA,QAAM,KAAK,UAE3B,CAAE,SADG,KAAM,QAAO,oBAAoB,GACvB,OAAA,EACtB,EAOKC,EAAiD,CAAC,CACvD,IAAAC,EACA,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,CACD,IAAM,CACL,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAkB,EAAK,EACrDC,GAAU,MAAM,QAAQR,CAAG,EAAIA,EAAM,CAAA,GAAI,IAAKS,GAC5CA,CACP,EACKC,EAAMC,EAAAA,OAAA,EAEZC,OAAAA,EAAAA,WAAWF,EAAK,IAAM,CACrBJ,EAAc,E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AA;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"EmojiPicker.js","sources":["../../../../../../../src/components/QueryBuilder/components/Connectors/Components/EmojiPicker.tsx"],"sourcesContent":["import EmojiIcon from '@src/assets/icons/emoji.svg';\nimport React, { LegacyRef, Suspense, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { IconButton } from '@src/components/icon-button';\nimport ChipInput from '@src/components/input/ChipInput';\nimport { CONNECTOR_VALUE_TYPE } from '@src/components/QueryBuilder/types/QueryBuilderConnector.type';\nimport { ConnectorComponentProps } from '@src/components/QueryBuilder/types/QueryBuilderConnector.type';\nimport { useOutside } from '@src/hooks/useOutside';\n\ntype EmojiClickData = {\n\temoji: string;\n};\n\nconst LazyEmojiPicker = React.lazy(async () => {\n\tconst mod = await import('emoji-picker-react');\n\treturn { default: mod.default };\n});\n\ntype Props = Omit<Omit<ConnectorComponentProps, 'val'>, 'onChange'> & {\n\tval: string[];\n\tonChange: (val: (string | number)[]) => void;\n};\n\nconst EmojiPicker: React.FC<ConnectorComponentProps> = ({\n\tval,\n\tonChange,\n\terrors,\n\tnativeID,\n\tdisabled,\n}) => {\n\tconst [showPicker, setShowPicker] = useState<boolean>(false);\n\tconst valArr = (Array.isArray(val) ? val : []).map((valEl) => {\n\t\treturn valEl;\n\t});\n\tconst ref = useRef();\n\n\tuseOutside(ref, () => {\n\t\tsetShowPicker(false);\n\t});\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{ position: 'relative', opacity: disabled ? 0.5 : 1, width: 300 }}\n\t\t\tid={nativeID}\n\t\t>\n\t\t\t{!!disabled && (\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<EmojiInput>\n\t\t\t\t<ChipInput\n\t\t\t\t\terror={errors?.val as string}\n\t\t\t\t\tonChipsChange={onChange as Props['onChange']}\n\t\t\t\t\tchipsContainerCustomStyle={{\n\t\t\t\t\t\tpadding: '0px 32px 0px 8px',\n\t\t\t\t\t}}\n\t\t\t\t\tcreateChipKeys={[13, 188]}\n\t\t\t\t\tplaceholder={'add emojis'}\n\t\t\t\t\tchips={valArr}\n\t\t\t\t/>\n\n\t\t\t\t<EmojiContainer>\n\t\t\t\t\t<IconButton Icon={EmojiIcon} onClick={() => setShowPicker(true)} />\n\t\t\t\t</EmojiContainer>\n\t\t\t\t{showPicker && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ref as unknown as LegacyRef<HTMLDivElement>}\n\t\t\t\t\t\tclassName=\"absolute-picker\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Suspense fallback={null}>\n\t\t\t\t\t\t\t<LazyEmojiPicker\n\t\t\t\t\t\t\t\tpreviewConfig={{ showPreview: false }}\n\t\t\t\t\t\t\t\tskinTonesDisabled\n\t\t\t\t\t\t\t\tsearchDisabled\n\t\t\t\t\t\t\t\ttheme={'dark' as unknown as never}\n\t\t\t\t\t\t\t\temojiStyle={'native' as unknown as never}\n\t\t\t\t\t\t\t\tonEmojiClick={(emoji: EmojiClickData) => {\n\t\t\t\t\t\t\t\t\tconst exists = valArr.find((em) => emoji.emoji === em);\n\t\t\t\t\t\t\t\t\tif (exists) return;\n\t\t\t\t\t\t\t\t\tonChange?.([\n\t\t\t\t\t\t\t\t\t\t...valArr,\n\t\t\t\t\t\t\t\t\t\temoji.emoji,\n\t\t\t\t\t\t\t\t\t] as unknown as CONNECTOR_VALUE_TYPE);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</EmojiInput>\n\t\t</div>\n\t);\n};\n\nexport default function EmojiPickerConnector(props: ConnectorComponentProps) {\n\treturn <EmojiPicker {...props} />;\n}\n\nconst EmojiContainer = styled.div`\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nconst EmojiInput = styled.div`\n\tinput {\n\t\tpointer-events: none;\n\t}\n\t.absolute-picker {\n\t\tposition: absolute;\n\t\ttop: 50px;\n\t\tz-index: 1;\n\t}\n`;\n"],"names":["LazyEmojiPicker","React","EmojiPicker","val","onChange","errors","nativeID","disabled","showPicker","setShowPicker","useState","valArr","valEl","ref","useRef","useOutside","jsxs","jsx","EmojiInput","ChipInput","EmojiContainer","IconButton","EmojiIcon","Suspense","emoji","em","EmojiPickerConnector","props","styled"],"mappings":"y5BAaMA,EAAkBC,EAAAA,QAAM,KAAK,UAE3B,CAAE,SADG,KAAM,QAAO,oBAAoB,GACvB,OAAA,EACtB,EAOKC,EAAiD,CAAC,CACvD,IAAAC,EACA,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,CACD,IAAM,CACL,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAkB,EAAK,EACrDC,GAAU,MAAM,QAAQR,CAAG,EAAIA,EAAM,CAAA,GAAI,IAAKS,GAC5CA,CACP,EACKC,EAAMC,EAAAA,OAAA,EAEZC,OAAAA,EAAAA,WAAWF,EAAK,IAAM,CACrBJ,EAAc,EAAK,CACpB,CAAC,EAGAO,EAAAA,KAAC,MAAA,CACA,MAAO,CAAE,SAAU,WAAY,QAAST,EAAW,GAAM,EAAG,MAAO,GAAA,EACnE,GAAID,EAEH,SAAA,CAAA,CAAC,CAACC,GACFU,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,SAAU,WACV,MAAO,OACP,OAAQ,OACR,IAAK,EACL,KAAM,EACN,OAAQ,CAAA,CACT,CAAA,SAGDC,EAAA,CACA,SAAA,CAAAD,EAAAA,IAACE,EAAAA,QAAA,CACA,MAAOd,GAAQ,IACf,cAAeD,EACf,0BAA2B,CAC1B,QAAS,kBAAA,EAEV,eAAgB,CAAC,GAAI,GAAG,EACxB,YAAa,aACb,MAAOO,CAAA,CAAA,EAGRM,EAAAA,IAACG,EAAA,CACA,SAAAH,EAAAA,IAACI,EAAAA,WAAA,CAAW,KAAMC,EAAAA,QAAW,QAAS,IAAMb,EAAc,EAAI,CAAA,CAAG,CAAA,CAClE,EACCD,GACAS,EAAAA,IAAC,MAAA,CACA,IAAAJ,EACA,UAAU,kBAEV,SAAAI,EAAAA,IAACM,EAAAA,SAAA,CAAS,SAAU,KACnB,SAAAN,EAAAA,IAACjB,EAAA,CACA,cAAe,CAAE,YAAa,EAAA,EAC9B,kBAAiB,GACjB,eAAc,GACd,MAAO,OACP,WAAY,SACZ,aAAewB,GAA0B,CACzBb,EAAO,KAAMc,GAAOD,EAAM,QAAUC,CAAE,GAErDrB,IAAW,CACV,GAAGO,EACHa,EAAM,KAAA,CAC6B,CACrC,CAAA,CAAA,CACD,CACD,CAAA,CAAA,CACD,CAAA,CAEF,CAAA,CAAA,CAAA,CAGH,EAEA,SAAwBE,EAAqBC,EAAgC,CAC5E,OAAOV,MAACf,EAAA,CAAa,GAAGyB,CAAA,CAAO,CAChC,CAEA,MAAMP,EAAiBQ,EAAAA,QAAO;AAAA;AAAA;AAAA;AAAA,EAMxBV,EAAaU,EAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
@@ -48,7 +48,7 @@
48
48
  overflow: hidden;
49
49
  display: -webkit-box;
50
50
  -webkit-line-clamp: ${t=>t.numberOfLines};
51
- `,h=o.default.div`
51
+ `,y=o.default.div`
52
52
  font-family: Inter;
53
53
  color: ${t=>t.color||e.COLORS.text.primary};
54
54
  font-weight: ${e.FONTS.titleSmall.fontWeight};
@@ -58,7 +58,19 @@
58
58
  overflow: hidden;
59
59
  display: -webkit-box;
60
60
  -webkit-line-clamp: ${t=>t.numberOfLines};
61
- `,O=o.default.div`
61
+ `,S=o.default.div`
62
+ font-family: Inter;
63
+ color: ${t=>t.color||e.COLORS.text.primary};
64
+ font-weight: ${e.FONTS.titleTiny.fontWeight};
65
+ font-size: ${i(e.FONTS.titleTiny.fontSize)};
66
+ line-height: ${i(e.FONTS.titleTiny.lineHeight)};
67
+ font-variant-numeric: lining-nums tabular-nums;
68
+ font-feature-settings: 'case' on;
69
+ -webkit-box-orient: vertical;
70
+ overflow: hidden;
71
+ display: -webkit-box;
72
+ -webkit-line-clamp: ${t=>t.numberOfLines};
73
+ `,h=o.default.div`
62
74
  font-family: Inter;
63
75
  color: ${t=>t.color||e.COLORS.text.primary};
64
76
  font-weight: ${e.FONTS.display.fontWeight};
@@ -68,7 +80,7 @@
68
80
  overflow: hidden;
69
81
  display: -webkit-box;
70
82
  -webkit-line-clamp: ${t=>t.numberOfLines};
71
- `,S=o.default.div`
83
+ `,O=o.default.div`
72
84
  font-family: Inter;
73
85
  color: ${t=>t.color||e.COLORS.text.primary};
74
86
  font-weight: ${e.FONTS.bodyPrimary.fontWeight};
@@ -99,7 +111,7 @@
99
111
  overflow: hidden;
100
112
  display: -webkit-box;
101
113
  -webkit-line-clamp: ${t=>t.numberOfLines};
102
- `,y=o.default.div`
114
+ `,w=o.default.div`
103
115
  font-family: Inter;
104
116
  color: ${t=>t.color||e.COLORS.text.primary};
105
117
  font-weight: ${e.FONTS.bodySecondary.fontWeight};
@@ -115,12 +127,12 @@
115
127
  -webkit-text-fill-color: transparent;
116
128
  background-clip: text;
117
129
  text-fill-color: transparent;
118
- `,w=o.default(n)`
130
+ `,s=o.default(n)`
119
131
  text-decoration: underline;
120
132
  color: ${e.COLORS.content.brand};
121
133
  text-decoration-color: ${e.COLORS.content.brand};
122
134
  cursor: pointer;
123
- `,s=o.default(l)`
135
+ `,m=o.default(l)`
124
136
  text-decoration: underline;
125
137
  color: ${e.COLORS.content.brand};
126
138
  text-decoration-color: ${e.COLORS.content.brand};
@@ -137,7 +149,7 @@
137
149
  -webkit-line-clamp: ${t=>t.numberOfLines};
138
150
  word-break: break-word;
139
151
  overflow-wrap: break-word;
140
- `,m=o.default.div`
152
+ `,u=o.default.div`
141
153
  font-family: Inter;
142
154
  color: ${t=>t.color||e.COLORS.text.primary};
143
155
  font-weight: ${e.FONTS.caption.fontWeight};
@@ -153,7 +165,7 @@
153
165
  -webkit-text-fill-color: transparent;
154
166
  background-clip: text;
155
167
  text-fill-color: transparent;
156
- `,u=o.default.div`
168
+ `,p=o.default.div`
157
169
  color: ${t=>t.color||e.COLORS.text.primary};
158
170
  font-weight: ${e.FONTS.tiny.fontWeight};
159
171
  font-size: ${i(e.FONTS.tiny.fontSize)};
@@ -162,7 +174,16 @@
162
174
  overflow: hidden;
163
175
  display: -webkit-box;
164
176
  -webkit-line-clamp: ${t=>t.numberOfLines};
165
- `,p=o.default.div`
177
+ `,T=o.default.div`
178
+ color: ${t=>t.color||e.COLORS.text.primary};
179
+ font-weight: ${e.FONTS.bodyTinySemiBold.fontWeight};
180
+ font-size: ${i(e.FONTS.bodyTinySemiBold.fontSize)};
181
+ line-height: ${i(e.FONTS.bodyTinySemiBold.lineHeight)};
182
+ -webkit-box-orient: vertical;
183
+ overflow: hidden;
184
+ display: -webkit-box;
185
+ -webkit-line-clamp: ${t=>t.numberOfLines};
186
+ `,x=o.default.div`
166
187
  color: ${t=>t.color||e.COLORS.text.primary};
167
188
  font-weight: ${e.FONTS.tiny.fontWeight};
168
189
  font-size: ${i(e.FONTS.tiny.fontSize)};
@@ -177,7 +198,7 @@
177
198
  -webkit-text-fill-color: transparent;
178
199
  background-clip: text;
179
200
  text-fill-color: transparent;
180
- `,x=o.default.div`
201
+ `,k=o.default.div`
181
202
  font-family: Inter;
182
203
  color: ${t=>t.color||e.COLORS.text.primary};
183
204
  font-weight: ${e.FONTS.buttonLarge.fontWeight};
@@ -187,7 +208,7 @@
187
208
  overflow: hidden;
188
209
  display: -webkit-box;
189
210
  -webkit-line-clamp: ${t=>t.numberOfLines};
190
- `,k=o.default.div`
211
+ `,v=o.default.div`
191
212
  font-family: Inter;
192
213
  color: ${t=>t.color||e.COLORS.text.primary};
193
214
  font-weight: ${e.FONTS.buttonLarge.fontWeight};
@@ -203,7 +224,7 @@
203
224
  -webkit-text-fill-color: transparent;
204
225
  background-clip: text;
205
226
  text-fill-color: transparent;
206
- `,T=o.default.div`
227
+ `,F=o.default.div`
207
228
  font-family: Inter;
208
229
  color: ${t=>t.color||e.COLORS.text.primary};
209
230
  font-weight: ${e.FONTS.buttonRegular.fontWeight};
@@ -223,7 +244,7 @@
223
244
  overflow: hidden;
224
245
  display: -webkit-box;
225
246
  -webkit-line-clamp: ${t=>t.numberOfLines};
226
- `,F=o.default.div`
247
+ `,N=o.default.div`
227
248
  font-family: Inter;
228
249
  color: ${t=>t.color||e.COLORS.text.primary};
229
250
  font-weight: ${e.FONTS.bodyRegular.fontWeight};
@@ -233,7 +254,7 @@
233
254
  overflow: hidden;
234
255
  display: -webkit-box;
235
256
  -webkit-line-clamp: ${t=>t.numberOfLines};
236
- `,v=o.default.div`
257
+ `,z=o.default.div`
237
258
  font-family: Inter;
238
259
  color: ${e.COLORS.text.primary};
239
260
  font-weight: ${e.FONTS.caption.fontWeight};
@@ -243,7 +264,7 @@
243
264
  overflow: hidden;
244
265
  display: -webkit-box;
245
266
  -webkit-line-clamp: ${t=>t.numberOfLines};
246
- `,N=o.default.div`
267
+ `,R=o.default.div`
247
268
  font-family: Inter;
248
269
  color: ${e.COLORS.text.primary};
249
270
  font-weight: ${e.FONTS.textPlaceholder.fontWeight};
@@ -253,7 +274,7 @@
253
274
  overflow: hidden;
254
275
  display: -webkit-box;
255
276
  -webkit-line-clamp: ${t=>t.numberOfLines};
256
- `,z=o.default.div`
277
+ `,B=o.default.div`
257
278
  font-family: Inter;
258
279
  color: ${e.COLORS.text.primary};
259
280
  font-weight: ${e.FONTS.title4.fontWeight};
@@ -263,7 +284,7 @@
263
284
  overflow: hidden;
264
285
  display: -webkit-box;
265
286
  -webkit-line-clamp: ${t=>t.numberOfLines};
266
- `,R=o.default.div`
287
+ `,C=o.default.div`
267
288
  font-family: Inter;
268
289
  color: ${e.COLORS.text.primary};
269
290
  font-weight: ${e.FONTS.bodySmall.fontWeight};
@@ -273,7 +294,7 @@
273
294
  overflow: hidden;
274
295
  display: -webkit-box;
275
296
  -webkit-line-clamp: ${t=>t.numberOfLines};
276
- `,C=o.default.div`
297
+ `,H=o.default.div`
277
298
  font-family: Inter;
278
299
  color: ${e.COLORS.text.primary};
279
300
  font-weight: ${e.FONTS.captionBold.fontWeight};
@@ -283,7 +304,7 @@
283
304
  overflow: hidden;
284
305
  display: -webkit-box;
285
306
  -webkit-line-clamp: ${t=>t.numberOfLines};
286
- `,B=o.default.div`
307
+ `,I=o.default.div`
287
308
  font-family: Inter;
288
309
  color: ${e.COLORS.text.primary};
289
310
  font-weight: ${e.FONTS.tiny.fontWeight};
@@ -293,5 +314,5 @@
293
314
  overflow: hidden;
294
315
  display: -webkit-box;
295
316
  -webkit-line-clamp: ${t=>t.numberOfLines};
296
- `;exports.AiBodyCaption=m;exports.AiBodyTiny=p;exports.BodyCaption=$;exports.BodyLarge=S;exports.BodyPrimary=n;exports.BodyPrimaryLink=w;exports.BodyRegular=F;exports.BodySecondary=l;exports.BodySecondaryLink=s;exports.BodySmall=R;exports.BodyTiny=u;exports.ButtonLarge=x;exports.ButtonLargeAI=k;exports.ButtonRegular=T;exports.ButtonRegularAI=y;exports.Caption=v;exports.CaptionBold=C;exports.Display=O;exports.SmallRegular=c;exports.SubHeading=L;exports.TextPlaceholder=N;exports.Tiny=B;exports.TitleFour=z;exports.TitleLarge=d;exports.TitleMedium=b;exports.TitleRegular=g;exports.TitleSmall=h;exports.TitleXlarge=f;
317
+ `;exports.AiBodyCaption=u;exports.AiBodyTiny=x;exports.BodyCaption=$;exports.BodyLarge=O;exports.BodyPrimary=n;exports.BodyPrimaryLink=s;exports.BodyRegular=N;exports.BodySecondary=l;exports.BodySecondaryLink=m;exports.BodySmall=C;exports.BodyTiny=p;exports.BodyTinySemiBold=T;exports.ButtonLarge=k;exports.ButtonLargeAI=v;exports.ButtonRegular=F;exports.ButtonRegularAI=w;exports.Caption=z;exports.CaptionBold=H;exports.Display=h;exports.SmallRegular=c;exports.SubHeading=L;exports.TextPlaceholder=R;exports.Tiny=I;exports.TitleFour=B;exports.TitleLarge=d;exports.TitleMedium=b;exports.TitleRegular=g;exports.TitleSmall=y;exports.TitleTiny=S;exports.TitleXlarge=f;
297
318
  //# sourceMappingURL=TypographyStyle.js.map