@hhgtech/hhg-components 1.29.526 → 1.29.528

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 (519) hide show
  1. package/build/{InputDate-6a0bb6dc.js → InputDate-e44a5170.js} +5 -5
  2. package/build/{LastPeriod-9da58f22.js → LastPeriod-acd8425a.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-4d3a3cc3.js → MobileBottomNavigationIcon-391275dc.js} +3 -3
  4. package/build/{SiteWideBanner-afcea3ca.js → SiteWideBanner-5f5eef6e.js} +11 -11
  5. package/build/{Spinner-d789e89c.js → Spinner-9cb85a18.js} +1 -1
  6. package/build/{WhatsApp-81e71209.js → WhatsApp-e2be209d.js} +1 -1
  7. package/build/adapters.js +20 -20
  8. package/build/atoms.js +51 -51
  9. package/build/babyGrowth.js +86 -86
  10. package/build/cache.js +2 -2
  11. package/build/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  12. package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  13. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  14. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  15. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  16. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  17. package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  18. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  19. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  20. package/build/care.js +24 -18
  21. package/build/careBookingSearchBar.js +14 -14
  22. package/build/careBookingSearchBarV2.js +559 -260
  23. package/build/components.js +106 -106
  24. package/build/{constants-1b437dff.js → constants-8187e577.js} +2 -2
  25. package/build/{constants-6a5132d0.js → constants-978bec21.js} +1 -1
  26. package/build/constants.js +3 -3
  27. package/build/constantsDomainLocales.js +1 -1
  28. package/build/constantsRiskScreener.js +2 -2
  29. package/build/constantsSite.js +2 -2
  30. package/build/{core-55835439.js → core-df6980aa.js} +1 -1
  31. package/build/{dataTransform-bc021580.js → dataTransform-4e9d4b21.js} +1 -1
  32. package/build/ecom.js +5 -5
  33. package/build/{editor-86b38021.js → editor-1410b123.js} +11 -11
  34. package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
  35. package/build/embeddedHeathToolCards_babyPoop.js +22 -22
  36. package/build/embeddedHeathToolCards_babyVaccine.js +24 -24
  37. package/build/embeddedHeathToolCards_bmi_bmi.js +27 -27
  38. package/build/embeddedHeathToolCards_bmrBmr.js +27 -27
  39. package/build/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  40. package/build/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  41. package/build/embeddedHeathToolCards_pwg_pwg.js +28 -28
  42. package/build/embeddedHeathToolCards_targetHeartRate.js +29 -29
  43. package/build/esm/{InputDate-72508ff3.js → InputDate-8a6cea00.js} +5 -5
  44. package/build/esm/{LastPeriod-56b5ad20.js → LastPeriod-782d7853.js} +1 -1
  45. package/build/esm/{MobileBottomNavigationIcon-c5b237d6.js → MobileBottomNavigationIcon-fd28ef21.js} +3 -3
  46. package/build/esm/{SiteWideBanner-eb7bb7b1.js → SiteWideBanner-93e3d85b.js} +11 -11
  47. package/build/esm/{Spinner-0f69ddaf.js → Spinner-ac3cafdf.js} +1 -1
  48. package/build/esm/{WhatsApp-87db97d1.js → WhatsApp-f00db235.js} +1 -1
  49. package/build/esm/adapters.js +20 -20
  50. package/build/esm/atoms.js +51 -51
  51. package/build/esm/babyGrowth.js +86 -86
  52. package/build/esm/cache.js +2 -2
  53. package/build/esm/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  54. package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  55. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  56. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  57. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  58. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  59. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  60. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  61. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  62. package/build/esm/care.js +24 -18
  63. package/build/esm/careBookingSearchBar.js +14 -14
  64. package/build/esm/careBookingSearchBarV2.js +561 -262
  65. package/build/esm/components.js +106 -106
  66. package/build/esm/{constants-d4a6ef1a.js → constants-1d2564ea.js} +1 -1
  67. package/build/esm/{constants-6bc1faf8.js → constants-ebc698d1.js} +2 -2
  68. package/build/esm/constants.js +3 -3
  69. package/build/esm/constantsDomainLocales.js +1 -1
  70. package/build/esm/constantsRiskScreener.js +2 -2
  71. package/build/esm/constantsSite.js +2 -2
  72. package/build/esm/{core-494e612d.js → core-f02df1ea.js} +1 -1
  73. package/build/esm/{dataTransform-6c8e4266.js → dataTransform-7ec80df6.js} +1 -1
  74. package/build/esm/ecom.js +5 -5
  75. package/build/esm/{editor-435e842b.js → editor-95beb114.js} +11 -11
  76. package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
  77. package/build/esm/embeddedHeathToolCards_babyPoop.js +22 -22
  78. package/build/esm/embeddedHeathToolCards_babyVaccine.js +24 -24
  79. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +27 -27
  80. package/build/esm/embeddedHeathToolCards_bmrBmr.js +27 -27
  81. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  82. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  83. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +28 -28
  84. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +29 -29
  85. package/build/esm/footer.js +22 -22
  86. package/build/esm/gAssets.js +2 -2
  87. package/build/esm/{healthTools-aef05637.js → healthTools-a478793b.js} +1 -1
  88. package/build/esm/healthToolsCardWrapper.js +20 -20
  89. package/build/esm/healthToolsForm.js +35 -35
  90. package/build/esm/hooks.js +14 -14
  91. package/build/esm/i18n.js +2 -2
  92. package/build/esm/i18nV2.js +2 -2
  93. package/build/esm/{index-95db1487.js → index-0aac98d9.js} +32 -32
  94. package/build/esm/{index-509a4f9b.js → index-0c8a796f.js} +2 -2
  95. package/build/esm/{index-e0200f41.js → index-0cf4fb1a.js} +22 -22
  96. package/build/esm/{index-31e471d9.js → index-14c5e5f8.js} +14 -14
  97. package/build/esm/{index-be3fad19.js → index-18597dc3.js} +2 -2
  98. package/build/esm/{index-f369d74e.js → index-19b57024.js} +18 -18
  99. package/build/esm/{index-26ddf501.js → index-1c22f471.js} +2 -2
  100. package/build/esm/{index-b9e6ac73.js → index-1d71825a.js} +3 -3
  101. package/build/esm/{index-1319b4d4.js → index-1e03896e.js} +5 -5
  102. package/build/esm/{index-d642c164.js → index-1ef3bd24.js} +17 -17
  103. package/build/esm/{index-378757ca.js → index-28c3f888.js} +3 -3
  104. package/build/esm/{index-2f680121.js → index-29614899.js} +3 -3
  105. package/build/esm/{index-9acc5d2f.js → index-2fc6abb3.js} +13 -13
  106. package/build/esm/{index-80d05d51.js → index-3699be44.js} +2 -2
  107. package/build/esm/{index-7c74e66b.js → index-3ecee9df.js} +2 -2
  108. package/build/esm/{index-39087e63.js → index-4786dd1b.js} +4 -4
  109. package/build/esm/{index-bb9e70c2.js → index-49993060.js} +2 -2
  110. package/build/esm/{index-24cefd8b.js → index-4e4a4448.js} +2 -2
  111. package/build/esm/{index-69382d4c.js → index-51642785.js} +1 -1
  112. package/build/esm/{index-e0a1e994.js → index-52f5a292.js} +15 -15
  113. package/build/esm/{index-ba89009a.js → index-54a358f7.js} +3 -3
  114. package/build/esm/{index-38cc2d8a.js → index-5a3a3f42.js} +14 -14
  115. package/build/esm/{index-733d6b05.js → index-5c7ecb24.js} +6 -6
  116. package/build/esm/{index-f9b6d35c.js → index-61c5b995.js} +11 -11
  117. package/build/esm/{index-aa96d8bd.js → index-6615252e.js} +2 -2
  118. package/build/esm/{index-878d15f3.js → index-6c9ffea1.js} +6 -6
  119. package/build/esm/{index-761f0180.js → index-7061fdca.js} +2 -2
  120. package/build/esm/{index-00fc5bb9.js → index-729cb32a.js} +18 -18
  121. package/build/esm/{index-8845a76e.js → index-72b972f5.js} +1 -1
  122. package/build/esm/{index-9463d87b.js → index-73b17150.js} +1 -1
  123. package/build/esm/{index-6c0eed37.js → index-75a9c5b3.js} +2 -2
  124. package/build/esm/{index-bc295f3e.js → index-7d3b5c77.js} +2 -2
  125. package/build/esm/{index-db9b3e37.js → index-80102061.js} +3 -3
  126. package/build/esm/{index-eb93aba2.js → index-8347736a.js} +3 -3
  127. package/build/esm/{index-8eb0c307.js → index-873a735a.js} +7 -7
  128. package/build/esm/{index-fbdc45a3.js → index-8828f77d.js} +25 -25
  129. package/build/esm/{index-a25c3908.js → index-8ad71dae.js} +16 -16
  130. package/build/esm/{index-2f8e65ee.js → index-8d70c74a.js} +4 -4
  131. package/build/esm/{index-11772eca.js → index-8ff3d8b9.js} +19 -19
  132. package/build/esm/{index-0c48cc93.js → index-90c6261d.js} +2 -2
  133. package/build/esm/{index-a6c65798.js → index-9313ba10.js} +5 -5
  134. package/build/esm/{index-d46ce284.js → index-969578b1.js} +13 -13
  135. package/build/esm/{index-053a985d.js → index-96cfc6d0.js} +21 -21
  136. package/build/esm/{index-bba4e36a.js → index-997d9afe.js} +14 -14
  137. package/build/esm/{index-81d13e90.js → index-a4fb5c60.js} +16 -16
  138. package/build/esm/{index-b516c828.js → index-a7cbb0b9.js} +1 -1
  139. package/build/esm/{index-f34f455a.js → index-ad0c95a7.js} +9 -9
  140. package/build/esm/{index-1280ff73.js → index-ad9c69f5.js} +15 -15
  141. package/build/esm/{index-96e55cb2.js → index-b07e5ab0.js} +3 -3
  142. package/build/esm/{index-1c9b4d46.js → index-b13dc946.js} +7 -7
  143. package/build/esm/{index-9835138b.js → index-b79948be.js} +6 -6
  144. package/build/esm/{index-ce11954e.js → index-ba4cfc72.js} +2 -2
  145. package/build/esm/{index-603ba8f9.js → index-bf75e23b.js} +2 -2
  146. package/build/esm/{index-3441a2c5.js → index-c3579fb3.js} +2 -2
  147. package/build/esm/{index-66d289a3.js → index-caba5feb.js} +16 -16
  148. package/build/esm/{index-6a7322e8.js → index-cc5f3d4b.js} +9 -9
  149. package/build/esm/{index-1618e42f.js → index-cea40631.js} +33 -33
  150. package/build/esm/{index-ac28c064.js → index-d1643abc.js} +1 -1
  151. package/build/esm/{index-10cb18a4.js → index-d35dccbb.js} +24 -24
  152. package/build/esm/{index-67f13c03.js → index-d5f782eb.js} +2 -2
  153. package/build/esm/{index-e4aabe5a.js → index-d6463809.js} +8 -8
  154. package/build/esm/{index-c2a2a68f.js → index-d957287d.js} +1 -1
  155. package/build/esm/{index-e60704d3.js → index-dc74d2a2.js} +2 -2
  156. package/build/esm/{index-3bdc83e7.js → index-e102e0b2.js} +15 -15
  157. package/build/esm/{index-ff2976e0.js → index-e21fd7e1.js} +3 -3
  158. package/build/esm/{index-f613bbdb.js → index-e29051bf.js} +32 -32
  159. package/build/esm/{index-8c9d1ab1.js → index-e30b89da.js} +16 -16
  160. package/build/esm/{index-ecea25d8.js → index-e670af0e.js} +6 -6
  161. package/build/esm/{index-7a0326c0.js → index-e8e284f7.js} +1 -1
  162. package/build/esm/{index-19f76290.js → index-fdb5c913.js} +3 -3
  163. package/build/esm/{index-ff15f566.js → index-fea9434a.js} +3 -3
  164. package/build/esm/index.js +126 -126
  165. package/build/esm/{labelSorting-59273ef5.js → labelSorting-0ff4b693.js} +4 -4
  166. package/build/esm/lead.js +37 -37
  167. package/build/esm/{logoIcon-91a5a225.js → logoIcon-a24cf073.js} +2 -2
  168. package/build/esm/mantine.js +27 -27
  169. package/build/esm/misc.js +19 -19
  170. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  171. package/build/esm/miscGetSocialList.js +8 -8
  172. package/build/esm/miscScreenSizeContext.js +1 -1
  173. package/build/esm/mobileBottomNavigation.js +5 -5
  174. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  175. package/build/esm/molecules.js +79 -79
  176. package/build/esm/moleculesArticleCard.js +6 -6
  177. package/build/esm/moleculesArticleCardV2.js +17 -17
  178. package/build/esm/navigation.js +49 -49
  179. package/build/esm/navigationLogoutPopup.js +11 -11
  180. package/build/esm/navigationProfileButton.js +27 -27
  181. package/build/esm/onboardingV2.js +30 -30
  182. package/build/esm/organisms.js +62 -62
  183. package/build/esm/{paths-c7dde110.js → paths-57889e7a.js} +2 -2
  184. package/build/esm/{post-14d01dd6.js → post-e85d518d.js} +2 -2
  185. package/build/esm/profileNavigation.js +20 -20
  186. package/build/esm/progressBar.js +1 -1
  187. package/build/esm/pwg.js +23 -23
  188. package/build/esm/ssoV2.js +31 -31
  189. package/build/esm/{store-060e0bee.js → store-58945988.js} +3 -3
  190. package/build/esm/subot.js +40 -40
  191. package/build/esm/surveyOrPremiumBanner.js +34 -34
  192. package/build/esm/surveyQuestionCard.js +11 -11
  193. package/build/esm/{surveyThankyouCard-51a48255.js → surveyThankyouCard-020bd785.js} +5 -5
  194. package/build/esm/together.js +57 -57
  195. package/build/esm/togetherApiUtils.js +6 -6
  196. package/build/esm/togetherAtoms.js +31 -31
  197. package/build/esm/togetherComponentGlobalContext.js +6 -6
  198. package/build/esm/togetherMolecules.js +52 -52
  199. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  200. package/build/esm/togetherMoleculesPostImagePreview.js +13 -13
  201. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  202. package/build/esm/togetherOrganisms.js +51 -51
  203. package/build/esm/togetherRichTextEditor.js +20 -20
  204. package/build/esm/togetherShareBox.js +12 -12
  205. package/build/esm/{transform-1aa2f89b.js → transform-54db313c.js} +27 -27
  206. package/build/esm/{translationsProvider-153307b6.js → translationsProvider-74ef088c.js} +1 -1
  207. package/build/esm/{treePopoverMenu-f0fb6976.js → treePopoverMenu-43e10598.js} +19 -19
  208. package/build/esm/types.js +2 -2
  209. package/build/esm/{useCartCareService-ab4e9d1a.js → useCartCareService-78b0a223.js} +1 -1
  210. package/build/esm/{useHealthToolCache-0b92e5b1.js → useHealthToolCache-a120abd1.js} +1 -1
  211. package/build/esm/{usePhoneValidator-02c5c4be.js → usePhoneValidator-6ac61ebc.js} +5 -5
  212. package/build/esm/{usePlacesAutocomplete-ef907fa7.js → usePlacesAutocomplete-09a0e342.js} +1 -1
  213. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  214. package/build/esm/{utils-461087b5.js → utils-4560ea01.js} +5 -5
  215. package/build/esm/{utils-964b4a52.js → utils-78865776.js} +2 -2
  216. package/build/esm/{utils-489b9656.js → utils-9b4e448e.js} +3 -3
  217. package/build/esm/{utils-6b7b19b2.js → utils-e4a74b46.js} +3 -3
  218. package/build/esm/{utils-fb17cc1d.js → utils-e56045d9.js} +2 -2
  219. package/build/esm/vaccination.js +22 -22
  220. package/build/footer.js +22 -22
  221. package/build/gAssets.js +2 -2
  222. package/build/{healthTools-870f1f71.js → healthTools-4c002c0b.js} +1 -1
  223. package/build/healthToolsCardWrapper.js +20 -20
  224. package/build/healthToolsForm.js +35 -35
  225. package/build/hooks.js +14 -14
  226. package/build/i18n.js +2 -2
  227. package/build/i18nV2.js +1 -1
  228. package/build/{index-9b3fdcf1.js → index-015f890f.js} +6 -6
  229. package/build/{index-254198f0.js → index-034a704f.js} +7 -7
  230. package/build/{index-4f322287.js → index-071fc285.js} +3 -3
  231. package/build/{index-9936fe15.js → index-07443896.js} +2 -2
  232. package/build/{index-206cbf9b.js → index-08ce6245.js} +2 -2
  233. package/build/{index-d8da0677.js → index-0d3129b1.js} +6 -6
  234. package/build/{index-772f6e79.js → index-0e60b5c7.js} +18 -18
  235. package/build/{index-8804911c.js → index-2823f5ed.js} +3 -3
  236. package/build/{index-24936a58.js → index-2a0e7ab6.js} +3 -3
  237. package/build/{index-59201967.js → index-2c0ceb91.js} +3 -3
  238. package/build/{index-82ff9bd8.js → index-2dc73063.js} +18 -18
  239. package/build/{index-b75eae4e.js → index-30398c28.js} +4 -4
  240. package/build/{index-5569562c.js → index-317470d8.js} +13 -13
  241. package/build/{index-1c98e98b.js → index-31a7199d.js} +2 -2
  242. package/build/{index-6de503f6.js → index-3d073609.js} +5 -5
  243. package/build/{index-8bee44d3.js → index-3f93a7ef.js} +32 -32
  244. package/build/{index-7e882f6f.js → index-43597605.js} +9 -9
  245. package/build/{index-56f0815a.js → index-4519c910.js} +2 -2
  246. package/build/{index-16d2b233.js → index-4b4ffab8.js} +22 -22
  247. package/build/{index-d4a9017d.js → index-4f61ac85.js} +32 -32
  248. package/build/{index-ad907fda.js → index-5057d16f.js} +2 -2
  249. package/build/{index-f40b05ed.js → index-54f20948.js} +1 -1
  250. package/build/{index-e30ebcb4.js → index-55741379.js} +1 -1
  251. package/build/{index-c3808acb.js → index-5bc65809.js} +6 -6
  252. package/build/{index-24e492d2.js → index-5fdcef88.js} +2 -2
  253. package/build/{index-c43486db.js → index-626df4e1.js} +21 -21
  254. package/build/{index-567cd600.js → index-6699754e.js} +13 -13
  255. package/build/{index-97ab863a.js → index-68b3b9cc.js} +25 -25
  256. package/build/{index-604c3667.js → index-78d490d2.js} +3 -3
  257. package/build/{index-8af08d9f.js → index-7922e69e.js} +2 -2
  258. package/build/{index-3f1c50de.js → index-7979a7fd.js} +3 -3
  259. package/build/{index-a96ea580.js → index-7dbf4343.js} +1 -1
  260. package/build/{index-72ec51ba.js → index-859d9704.js} +11 -11
  261. package/build/{index-a23127de.js → index-8a641926.js} +1 -1
  262. package/build/{index-af557438.js → index-8d636c5e.js} +15 -15
  263. package/build/{index-f2c83111.js → index-8ed68f29.js} +15 -15
  264. package/build/{index-03d42ee8.js → index-8f89038a.js} +15 -15
  265. package/build/{index-733f1eee.js → index-9175f3dc.js} +1 -1
  266. package/build/{index-7be14791.js → index-9368f4ba.js} +8 -8
  267. package/build/{index-3576a5d6.js → index-94b27427.js} +2 -2
  268. package/build/{index-d4497d89.js → index-99d8372b.js} +2 -2
  269. package/build/{index-c110b1ac.js → index-9a1a2a20.js} +24 -24
  270. package/build/{index-19a14194.js → index-9c06a9f8.js} +6 -6
  271. package/build/{index-3d93c752.js → index-9cdb8ffc.js} +5 -5
  272. package/build/{index-2da6f2c8.js → index-a027ddce.js} +3 -3
  273. package/build/{index-ca161b42.js → index-a0fe3cd0.js} +2 -2
  274. package/build/{index-f7e095c7.js → index-a1138fdb.js} +9 -9
  275. package/build/{index-9e0579e2.js → index-aa442c73.js} +2 -2
  276. package/build/{index-c8d2bcfa.js → index-abacafb1.js} +2 -2
  277. package/build/{index-f1b6f7e3.js → index-abed94ee.js} +7 -7
  278. package/build/{index-5efc55fc.js → index-ac37f6c0.js} +16 -16
  279. package/build/{index-dc484a85.js → index-ad516504.js} +3 -3
  280. package/build/{index-8b66da03.js → index-af18e92c.js} +3 -3
  281. package/build/{index-4f2f29aa.js → index-b919614c.js} +1 -1
  282. package/build/{index-aa6e3958.js → index-bb486b2b.js} +16 -16
  283. package/build/{index-ffbda8e0.js → index-bda9fc0f.js} +14 -14
  284. package/build/{index-c6b82c99.js → index-c037399a.js} +14 -14
  285. package/build/{index-6cc207c2.js → index-c0797540.js} +2 -2
  286. package/build/{index-4698a1f6.js → index-c74a66ef.js} +17 -17
  287. package/build/{index-5dbbd78c.js → index-d0193408.js} +19 -19
  288. package/build/{index-b0aa7c2b.js → index-d08623ad.js} +16 -16
  289. package/build/{index-011a9d47.js → index-dab87a70.js} +2 -2
  290. package/build/{index-be8fcd17.js → index-dd216b8d.js} +2 -2
  291. package/build/{index-9b7c2b51.js → index-de56de6f.js} +14 -14
  292. package/build/{index-58a019a6.js → index-e6ee6bb1.js} +33 -33
  293. package/build/{index-f501f88d.js → index-e72051d3.js} +2 -2
  294. package/build/{index-aeea0680.js → index-ec50dce8.js} +3 -3
  295. package/build/{index-64e656f2.js → index-f104b7d3.js} +1 -1
  296. package/build/{index-ca4efb1c.js → index-f3df57f3.js} +2 -2
  297. package/build/{index-133b98d6.js → index-fc3632d1.js} +16 -16
  298. package/build/{index-4d2d9a57.js → index-fea268f5.js} +4 -4
  299. package/build/index.js +126 -126
  300. package/build/{labelSorting-ea3caac8.js → labelSorting-7fc632e0.js} +4 -4
  301. package/build/lead.js +37 -37
  302. package/build/{logoIcon-99e53646.js → logoIcon-bfcdf2f9.js} +2 -2
  303. package/build/mantine.js +25 -25
  304. package/build/misc.js +19 -19
  305. package/build/miscGetDynamicHealthTool.js +4 -4
  306. package/build/miscGetSocialList.js +8 -8
  307. package/build/miscScreenSizeContext.js +1 -1
  308. package/build/mobileBottomNavigation.js +5 -5
  309. package/build/mobileBottomNavigationIcon.js +5 -5
  310. package/build/molecules.js +79 -79
  311. package/build/moleculesArticleCard.js +6 -6
  312. package/build/moleculesArticleCardV2.js +17 -17
  313. package/build/navigation.js +49 -49
  314. package/build/navigationLogoutPopup.js +11 -11
  315. package/build/navigationProfileButton.js +27 -27
  316. package/build/onboardingV2.js +29 -29
  317. package/build/organisms.js +62 -62
  318. package/build/{paths-5d426fbb.js → paths-60d5e970.js} +2 -2
  319. package/build/{post-5bbc2a6a.js → post-a8461958.js} +2 -2
  320. package/build/profileNavigation.js +20 -20
  321. package/build/progressBar.js +1 -1
  322. package/build/pwg.js +23 -23
  323. package/build/ssoV2.js +29 -29
  324. package/build/{store-cb35db82.js → store-61cad318.js} +3 -3
  325. package/build/subot.js +39 -39
  326. package/build/surveyOrPremiumBanner.js +34 -34
  327. package/build/surveyQuestionCard.js +11 -11
  328. package/build/{surveyThankyouCard-22e90468.js → surveyThankyouCard-896e9d87.js} +5 -5
  329. package/build/together.js +57 -57
  330. package/build/togetherApiUtils.js +6 -6
  331. package/build/togetherAtoms.js +31 -31
  332. package/build/togetherComponentGlobalContext.js +6 -6
  333. package/build/togetherMolecules.js +52 -52
  334. package/build/togetherMoleculesCardAuthor.js +29 -29
  335. package/build/togetherMoleculesPostImagePreview.js +13 -13
  336. package/build/togetherMoleculesProfileDetail.js +40 -40
  337. package/build/togetherOrganisms.js +51 -51
  338. package/build/togetherRichTextEditor.js +20 -20
  339. package/build/togetherShareBox.js +12 -12
  340. package/build/{transform-5943bff7.js → transform-f5678a32.js} +27 -27
  341. package/build/{translationsProvider-4803525e.js → translationsProvider-7e6db534.js} +1 -1
  342. package/build/{treePopoverMenu-4bfadf80.js → treePopoverMenu-d6b74bd6.js} +19 -19
  343. package/build/types.js +2 -2
  344. package/build/{useCartCareService-55252850.js → useCartCareService-202114a6.js} +1 -1
  345. package/build/{useHealthToolCache-f8ff463a.js → useHealthToolCache-25f3cf03.js} +1 -1
  346. package/build/{usePhoneValidator-3516ce5a.js → usePhoneValidator-36d897da.js} +5 -5
  347. package/build/{usePlacesAutocomplete-9cb78bbd.js → usePlacesAutocomplete-437f7caf.js} +1 -1
  348. package/build/useTogetherAuthRequiredAction.js +10 -10
  349. package/build/{utils-dba2b152.js → utils-082f61e1.js} +5 -5
  350. package/build/{utils-84a0b514.js → utils-1aeabb49.js} +2 -2
  351. package/build/{utils-d56a27f3.js → utils-4d304390.js} +3 -3
  352. package/build/{utils-af28474e.js → utils-b3fa920f.js} +2 -2
  353. package/build/{utils-cdb9b788.js → utils-bc652d73.js} +3 -3
  354. package/build/vaccination.js +22 -22
  355. package/package.json +1 -1
  356. /package/build/{BMI_BOYS.percentile.monthly-c99325cf.js → BMI_BOYS.percentile.monthly-c8cb7280.js} +0 -0
  357. /package/build/{BMI_BOYS.percentile.weekly-e644e17a.js → BMI_BOYS.percentile.weekly-55ff6bc1.js} +0 -0
  358. /package/build/{BMI_BOYS.percentile.yearly-125a7f4c.js → BMI_BOYS.percentile.yearly-ae309cc1.js} +0 -0
  359. /package/build/{BMI_BOYS.zscore.monthly-c8311802.js → BMI_BOYS.zscore.monthly-51faa333.js} +0 -0
  360. /package/build/{BMI_BOYS.zscore.weekly-6fce8b3c.js → BMI_BOYS.zscore.weekly-c8bc4567.js} +0 -0
  361. /package/build/{BMI_BOYS.zscore.yearly-7c57ad38.js → BMI_BOYS.zscore.yearly-3e94c386.js} +0 -0
  362. /package/build/{BMI_GIRLS.percentile.monthly-4800ded8.js → BMI_GIRLS.percentile.monthly-2f0f4651.js} +0 -0
  363. /package/build/{BMI_GIRLS.percentile.weekly-a48fa5de.js → BMI_GIRLS.percentile.weekly-f3d8cc3f.js} +0 -0
  364. /package/build/{BMI_GIRLS.percentile.yearly-b6fc7df2.js → BMI_GIRLS.percentile.yearly-ce01bdfd.js} +0 -0
  365. /package/build/{BMI_GIRLS.zscore.monthly-c1b9a8fa.js → BMI_GIRLS.zscore.monthly-c30a5aa7.js} +0 -0
  366. /package/build/{BMI_GIRLS.zscore.weekly-98601380.js → BMI_GIRLS.zscore.weekly-850dcf70.js} +0 -0
  367. /package/build/{BMI_GIRLS.zscore.yearly-b54ddca4.js → BMI_GIRLS.zscore.yearly-c14aaf5e.js} +0 -0
  368. /package/build/{ChevronDown-0ee3917a.js → ChevronDown-bd7697c4.js} +0 -0
  369. /package/build/{Close-87093183.js → Close-d80873df.js} +0 -0
  370. /package/build/{Google-6988d936.js → Google-7f8e4f6e.js} +0 -0
  371. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-2116fda1.js → HEAD CIRCUM_BOYS.percentile.monthly-8faeb896.js} +0 -0
  372. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-859c75a8.js → HEAD CIRCUM_BOYS.percentile.weekly-e070074f.js} +0 -0
  373. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-1555209f.js → HEAD CIRCUM_BOYS.percentile.yearly-820285f4.js} +0 -0
  374. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-2dc3eabb.js → HEAD CIRCUM_BOYS.zscore.monthly-1b0097ec.js} +0 -0
  375. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-ba33c24f.js → HEAD CIRCUM_BOYS.zscore.weekly-5686ddfb.js} +0 -0
  376. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-dcdc6a12.js → HEAD CIRCUM_BOYS.zscore.yearly-ad150e91.js} +0 -0
  377. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-f4d4e31e.js → HEAD CIRCUM_GIRLS.percentile.monthly-076cdb96.js} +0 -0
  378. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-cf0e819a.js → HEAD CIRCUM_GIRLS.percentile.weekly-7ba0f699.js} +0 -0
  379. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-e2793aa3.js → HEAD CIRCUM_GIRLS.percentile.yearly-c64aece9.js} +0 -0
  380. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-da347d23.js → HEAD CIRCUM_GIRLS.zscore.monthly-222ef11f.js} +0 -0
  381. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-cada42d1.js → HEAD CIRCUM_GIRLS.zscore.weekly-bffe1fde.js} +0 -0
  382. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5a9b72b8.js → HEAD CIRCUM_GIRLS.zscore.yearly-65836f4a.js} +0 -0
  383. /package/build/{HEIGHT_BOYS.percentile.monthly-5b314e63.js → HEIGHT_BOYS.percentile.monthly-312b0a78.js} +0 -0
  384. /package/build/{HEIGHT_BOYS.percentile.weekly-21eeab52.js → HEIGHT_BOYS.percentile.weekly-d4a02b3a.js} +0 -0
  385. /package/build/{HEIGHT_BOYS.percentile.yearly-da3b97d6.js → HEIGHT_BOYS.percentile.yearly-4991623c.js} +0 -0
  386. /package/build/{HEIGHT_BOYS.zscore.monthly-c52ba799.js → HEIGHT_BOYS.zscore.monthly-cf943dab.js} +0 -0
  387. /package/build/{HEIGHT_BOYS.zscore.weekly-3aab6f77.js → HEIGHT_BOYS.zscore.weekly-929ee172.js} +0 -0
  388. /package/build/{HEIGHT_BOYS.zscore.yearly-cd51f06a.js → HEIGHT_BOYS.zscore.yearly-1ad495ec.js} +0 -0
  389. /package/build/{HEIGHT_GIRLS.percentile.monthly-04b2f2b2.js → HEIGHT_GIRLS.percentile.monthly-49d5f51f.js} +0 -0
  390. /package/build/{HEIGHT_GIRLS.percentile.weekly-6f7253f5.js → HEIGHT_GIRLS.percentile.weekly-a99518f5.js} +0 -0
  391. /package/build/{HEIGHT_GIRLS.percentile.yearly-9e55c4ff.js → HEIGHT_GIRLS.percentile.yearly-91a3be34.js} +0 -0
  392. /package/build/{HEIGHT_GIRLS.zscore.monthly-e38168f6.js → HEIGHT_GIRLS.zscore.monthly-ba8c8e6e.js} +0 -0
  393. /package/build/{HEIGHT_GIRLS.zscore.weekly-9c7a6ab6.js → HEIGHT_GIRLS.zscore.weekly-50353a52.js} +0 -0
  394. /package/build/{HEIGHT_GIRLS.zscore.yearly-13d3918d.js → HEIGHT_GIRLS.zscore.yearly-d1b5f969.js} +0 -0
  395. /package/build/{Locale-1a92afa7.js → Locale-daf9aa88.js} +0 -0
  396. /package/build/{Visible-48b25365.js → Visible-2b15fba4.js} +0 -0
  397. /package/build/{WEIGHT_BOYS.percentile.monthly-83356d27.js → WEIGHT_BOYS.percentile.monthly-5d6787ce.js} +0 -0
  398. /package/build/{WEIGHT_BOYS.percentile.weekly-0be9ce0e.js → WEIGHT_BOYS.percentile.weekly-1a860b4b.js} +0 -0
  399. /package/build/{WEIGHT_BOYS.percentile.yearly-a15d8e36.js → WEIGHT_BOYS.percentile.yearly-fd57716a.js} +0 -0
  400. /package/build/{WEIGHT_BOYS.zscore.monthly-ee041919.js → WEIGHT_BOYS.zscore.monthly-a0acd992.js} +0 -0
  401. /package/build/{WEIGHT_BOYS.zscore.weekly-f2d83f22.js → WEIGHT_BOYS.zscore.weekly-89ef1904.js} +0 -0
  402. /package/build/{WEIGHT_BOYS.zscore.yearly-89a8ce80.js → WEIGHT_BOYS.zscore.yearly-7da1d40a.js} +0 -0
  403. /package/build/{WEIGHT_GIRLS.percentile.monthly-ed3210d1.js → WEIGHT_GIRLS.percentile.monthly-6f58db3e.js} +0 -0
  404. /package/build/{WEIGHT_GIRLS.percentile.weekly-8f3e0953.js → WEIGHT_GIRLS.percentile.weekly-86271d0c.js} +0 -0
  405. /package/build/{WEIGHT_GIRLS.percentile.yearly-bc0a2247.js → WEIGHT_GIRLS.percentile.yearly-0ef79884.js} +0 -0
  406. /package/build/{WEIGHT_GIRLS.zscore.monthly-1cf63e18.js → WEIGHT_GIRLS.zscore.monthly-b25a4c9b.js} +0 -0
  407. /package/build/{WEIGHT_GIRLS.zscore.weekly-29f3cb86.js → WEIGHT_GIRLS.zscore.weekly-370bd448.js} +0 -0
  408. /package/build/{WEIGHT_GIRLS.zscore.yearly-db3bffe5.js → WEIGHT_GIRLS.zscore.yearly-f9e4eee1.js} +0 -0
  409. /package/build/{ageGenerate-a71d93e7.js → ageGenerate-15148d2a.js} +0 -0
  410. /package/build/{animation-00d77f10.js → animation-2da7465d.js} +0 -0
  411. /package/build/{constants-05ac3c27.js → constants-01227b75.js} +0 -0
  412. /package/build/{constants-b479b430.js → constants-d45110a8.js} +0 -0
  413. /package/build/{context-03f47a7a.js → context-e82deb48.js} +0 -0
  414. /package/build/{dataTransform-3a935fa0.js → dataTransform-88f89c7a.js} +0 -0
  415. /package/build/esm/{BMI_BOYS.percentile.monthly-6a02225d.js → BMI_BOYS.percentile.monthly-59d604f6.js} +0 -0
  416. /package/build/esm/{BMI_BOYS.percentile.weekly-f1ff30ad.js → BMI_BOYS.percentile.weekly-fc44a5b7.js} +0 -0
  417. /package/build/esm/{BMI_BOYS.percentile.yearly-721201b6.js → BMI_BOYS.percentile.yearly-9176e4e1.js} +0 -0
  418. /package/build/esm/{BMI_BOYS.zscore.monthly-7caa98e3.js → BMI_BOYS.zscore.monthly-6e573c0b.js} +0 -0
  419. /package/build/esm/{BMI_BOYS.zscore.weekly-9dd85ef4.js → BMI_BOYS.zscore.weekly-1745ebd4.js} +0 -0
  420. /package/build/esm/{BMI_BOYS.zscore.yearly-29906117.js → BMI_BOYS.zscore.yearly-1476fb3a.js} +0 -0
  421. /package/build/esm/{BMI_GIRLS.percentile.monthly-e6b32cfb.js → BMI_GIRLS.percentile.monthly-d2d35df9.js} +0 -0
  422. /package/build/esm/{BMI_GIRLS.percentile.weekly-d2663f73.js → BMI_GIRLS.percentile.weekly-6c19387b.js} +0 -0
  423. /package/build/esm/{BMI_GIRLS.percentile.yearly-ee656664.js → BMI_GIRLS.percentile.yearly-06cc8ebe.js} +0 -0
  424. /package/build/esm/{BMI_GIRLS.zscore.monthly-a761658f.js → BMI_GIRLS.zscore.monthly-fd5ac2e5.js} +0 -0
  425. /package/build/esm/{BMI_GIRLS.zscore.weekly-efbae20d.js → BMI_GIRLS.zscore.weekly-f68aa046.js} +0 -0
  426. /package/build/esm/{BMI_GIRLS.zscore.yearly-1434aea1.js → BMI_GIRLS.zscore.yearly-0c048503.js} +0 -0
  427. /package/build/esm/{ChevronDown-763f26e3.js → ChevronDown-99190b49.js} +0 -0
  428. /package/build/esm/{Close-ce992b66.js → Close-4c9c5d81.js} +0 -0
  429. /package/build/esm/{Google-377967d6.js → Google-49452371.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-bc0cb48f.js → HEAD CIRCUM_BOYS.percentile.monthly-d369c45c.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-c5a3d7dc.js → HEAD CIRCUM_BOYS.percentile.weekly-2c48fafc.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-e0b6ea9a.js → HEAD CIRCUM_BOYS.percentile.yearly-e794341e.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-531b3d32.js → HEAD CIRCUM_BOYS.zscore.monthly-407b0528.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-4a5e8284.js → HEAD CIRCUM_BOYS.zscore.weekly-771bbb48.js} +0 -0
  435. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-04a119d2.js → HEAD CIRCUM_BOYS.zscore.yearly-623d50eb.js} +0 -0
  436. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-055e66f2.js → HEAD CIRCUM_GIRLS.percentile.monthly-214f1990.js} +0 -0
  437. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-f0e9739e.js → HEAD CIRCUM_GIRLS.percentile.weekly-7cbe6fff.js} +0 -0
  438. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-92908751.js → HEAD CIRCUM_GIRLS.percentile.yearly-28207825.js} +0 -0
  439. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9619eac9.js → HEAD CIRCUM_GIRLS.zscore.monthly-9e25b76a.js} +0 -0
  440. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-7b562585.js → HEAD CIRCUM_GIRLS.zscore.weekly-32881b18.js} +0 -0
  441. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-53cf98e0.js → HEAD CIRCUM_GIRLS.zscore.yearly-4f8e0a2e.js} +0 -0
  442. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-511d0162.js → HEIGHT_BOYS.percentile.monthly-6a5617db.js} +0 -0
  443. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5e459367.js → HEIGHT_BOYS.percentile.weekly-f5400955.js} +0 -0
  444. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-398056a8.js → HEIGHT_BOYS.percentile.yearly-7d0b1c6e.js} +0 -0
  445. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-c8731f31.js → HEIGHT_BOYS.zscore.monthly-d03f1410.js} +0 -0
  446. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-2a3b7198.js → HEIGHT_BOYS.zscore.weekly-54afffac.js} +0 -0
  447. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-15c5d459.js → HEIGHT_BOYS.zscore.yearly-395598e5.js} +0 -0
  448. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-babdd506.js → HEIGHT_GIRLS.percentile.monthly-202e9f0a.js} +0 -0
  449. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-de71ab56.js → HEIGHT_GIRLS.percentile.weekly-0c2d2912.js} +0 -0
  450. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-80296dad.js → HEIGHT_GIRLS.percentile.yearly-edbc48dd.js} +0 -0
  451. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d88c3b57.js → HEIGHT_GIRLS.zscore.monthly-6c102061.js} +0 -0
  452. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-c9c2ba6d.js → HEIGHT_GIRLS.zscore.weekly-c068f6e5.js} +0 -0
  453. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-53a3e348.js → HEIGHT_GIRLS.zscore.yearly-62525f1e.js} +0 -0
  454. /package/build/esm/{Locale-e6368378.js → Locale-dd85e540.js} +0 -0
  455. /package/build/esm/{Visible-cd865f60.js → Visible-ca95870e.js} +0 -0
  456. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-6969290c.js → WEIGHT_BOYS.percentile.monthly-b0ec8b51.js} +0 -0
  457. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-644b182b.js → WEIGHT_BOYS.percentile.weekly-cbace597.js} +0 -0
  458. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-95858418.js → WEIGHT_BOYS.percentile.yearly-bd229dcb.js} +0 -0
  459. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-61f9da0c.js → WEIGHT_BOYS.zscore.monthly-8a2526bd.js} +0 -0
  460. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-9b0f0f21.js → WEIGHT_BOYS.zscore.weekly-010ccb5d.js} +0 -0
  461. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-47eb80f9.js → WEIGHT_BOYS.zscore.yearly-807fb74a.js} +0 -0
  462. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-07e05390.js → WEIGHT_GIRLS.percentile.monthly-188cf1de.js} +0 -0
  463. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-501e7f08.js → WEIGHT_GIRLS.percentile.weekly-edcf30aa.js} +0 -0
  464. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-95b09599.js → WEIGHT_GIRLS.percentile.yearly-11916aa1.js} +0 -0
  465. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c82f2c61.js → WEIGHT_GIRLS.zscore.monthly-02e4f36e.js} +0 -0
  466. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-b3d98444.js → WEIGHT_GIRLS.zscore.weekly-f04180c7.js} +0 -0
  467. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-797976e6.js → WEIGHT_GIRLS.zscore.yearly-b0f6b466.js} +0 -0
  468. /package/build/esm/{ageGenerate-c8f50279.js → ageGenerate-a19ee554.js} +0 -0
  469. /package/build/esm/{animation-1ae89ba2.js → animation-530c8713.js} +0 -0
  470. /package/build/esm/{constants-22df977a.js → constants-2a6f0822.js} +0 -0
  471. /package/build/esm/{constants-7e696ff1.js → constants-ebf82e1d.js} +0 -0
  472. /package/build/esm/{context-8993b379.js → context-adea3929.js} +0 -0
  473. /package/build/esm/{dataTransform-35d0d4b2.js → dataTransform-31b69b1f.js} +0 -0
  474. /package/build/esm/{index-9b504f4d.js → index-10d0027c.js} +0 -0
  475. /package/build/esm/{index-feaac6b0.js → index-22cb52ac.js} +0 -0
  476. /package/build/esm/{index-4f1ab732.js → index-40178353.js} +0 -0
  477. /package/build/esm/{index-454fc2e1.js → index-43a9fa15.js} +0 -0
  478. /package/build/esm/{index-7ac3368b.js → index-52105956.js} +0 -0
  479. /package/build/esm/{index-cf63fb6c.js → index-676cea42.js} +0 -0
  480. /package/build/esm/{index-e44fa0f6.js → index-b2a8a256.js} +0 -0
  481. /package/build/esm/{index-89c4d39a.js → index-edde0d78.js} +0 -0
  482. /package/build/esm/{index-7515cd4e.js → index-f3b9047f.js} +0 -0
  483. /package/build/esm/{index.styles-baaa601d.js → index.styles-fc1f3f4c.js} +0 -0
  484. /package/build/esm/{localizeNumberFormat-0f70f9b6.js → localizeNumberFormat-02aa10d8.js} +0 -0
  485. /package/build/esm/{normalizeLink-1e6807d5.js → normalizeLink-be7f4c29.js} +0 -0
  486. /package/build/esm/{number-511d3f49.js → number-323db2e3.js} +0 -0
  487. /package/build/esm/{shared-86ecf16b.js → shared-ddb4a7c0.js} +0 -0
  488. /package/build/esm/{translationsContext-6b4a5825.js → translationsContext-9ccdd735.js} +0 -0
  489. /package/build/esm/{tslib.es6-a67acee5.js → tslib.es6-eac05ee6.js} +0 -0
  490. /package/build/esm/{types-50fba6d9.js → types-1da79786.js} +0 -0
  491. /package/build/esm/{types-4fe07623.js → types-f3c62b8e.js} +0 -0
  492. /package/build/esm/{useOutsideClick-42fc4cbf.js → useOutsideClick-7b0e73bb.js} +0 -0
  493. /package/build/esm/{useScrollbarSize-6dc27427.js → useScrollbarSize-cbeb3de3.js} +0 -0
  494. /package/build/esm/{useUniqueId-7727a34f.js → useUniqueId-09a9a15d.js} +0 -0
  495. /package/build/esm/{utils-471b07d0.js → utils-8fa947f2.js} +0 -0
  496. /package/build/esm/{utils-8ed90c2a.js → utils-f2c14fb6.js} +0 -0
  497. /package/build/{index-d14e5dcb.js → index-0b65a3e1.js} +0 -0
  498. /package/build/{index-5829bacc.js → index-3658a241.js} +0 -0
  499. /package/build/{index-219b4e7f.js → index-6116f62d.js} +0 -0
  500. /package/build/{index-96ec9686.js → index-6c22e2d3.js} +0 -0
  501. /package/build/{index-04d6a3da.js → index-7305ec62.js} +0 -0
  502. /package/build/{index-9bb90716.js → index-a185e6c8.js} +0 -0
  503. /package/build/{index-358a362b.js → index-cad29f79.js} +0 -0
  504. /package/build/{index-69c92489.js → index-de2e9a33.js} +0 -0
  505. /package/build/{index-5bbe1ffa.js → index-ff0be8db.js} +0 -0
  506. /package/build/{index.styles-479fee08.js → index.styles-7654fb59.js} +0 -0
  507. /package/build/{localizeNumberFormat-f39e4f43.js → localizeNumberFormat-0c6e5858.js} +0 -0
  508. /package/build/{normalizeLink-05e45b7d.js → normalizeLink-9cbdcafa.js} +0 -0
  509. /package/build/{number-7548e11e.js → number-10ca56f4.js} +0 -0
  510. /package/build/{shared-33672620.js → shared-7b7b3f13.js} +0 -0
  511. /package/build/{translationsContext-affdc589.js → translationsContext-9b0d023d.js} +0 -0
  512. /package/build/{tslib.es6-ac1d7f27.js → tslib.es6-7d483fc2.js} +0 -0
  513. /package/build/{types-795dbdd9.js → types-9d499822.js} +0 -0
  514. /package/build/{types-b715cfde.js → types-ed1ecac3.js} +0 -0
  515. /package/build/{useOutsideClick-99f4fe7f.js → useOutsideClick-c0a2806b.js} +0 -0
  516. /package/build/{useScrollbarSize-0ffb5e9f.js → useScrollbarSize-96b32242.js} +0 -0
  517. /package/build/{useUniqueId-aefaaaab.js → useUniqueId-36c15220.js} +0 -0
  518. /package/build/{utils-178e1a76.js → utils-06f796b5.js} +0 -0
  519. /package/build/{utils-4646fe95.js → utils-3b9fef4f.js} +0 -0
@@ -3,24 +3,29 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var core$1 = require('@hhgtech/icons/core');
6
7
  var core = require('@mantine/core');
7
- var utils$1 = require('./utils-84a0b514.js');
8
- var useOutsideClick = require('./useOutsideClick-99f4fe7f.js');
9
- var index$1 = require('./index-64e656f2.js');
8
+ var hooks = require('@mantine/hooks');
9
+ var utils$1 = require('./utils-1aeabb49.js');
10
+ var useOutsideClick = require('./useOutsideClick-c0a2806b.js');
11
+ var index$1 = require('./index-f104b7d3.js');
10
12
  var debounce = require('lodash/debounce');
11
- var constants = require('./constants-05ac3c27.js');
13
+ var constants = require('./constants-01227b75.js');
12
14
  var styled = require('@emotion/styled');
13
15
  var miscTheme = require('./miscTheme.js');
14
- var utils = require('./utils-4646fe95.js');
15
- var index = require('./index-9bb90716.js');
16
- var core$1 = require('@hhgtech/icons/core');
17
- var index$2 = require('./index-c8d2bcfa.js');
18
- var ChevronDown = require('./ChevronDown-0ee3917a.js');
19
- var paths = require('./paths-5d426fbb.js');
20
- require('./index-011a9d47.js');
16
+ var utils = require('./utils-3b9fef4f.js');
17
+ var index = require('./index-a185e6c8.js');
18
+ var index$2 = require('./index-abacafb1.js');
19
+ var ChevronDown = require('./ChevronDown-bd7697c4.js');
20
+ var tslib_es6 = require('./tslib.es6-7d483fc2.js');
21
+ var arrow = require('@hhgtech/icons/arrow');
22
+ var index$3 = require('./index-99d8372b.js');
23
+ var paths = require('./paths-60d5e970.js');
24
+ var index$4 = require('./index-7979a7fd.js');
25
+ require('./index-dab87a70.js');
21
26
  require('date-fns/locale');
22
- require('./index-e30ebcb4.js');
23
- require('./Locale-1a92afa7.js');
27
+ require('./index-55741379.js');
28
+ require('./Locale-daf9aa88.js');
24
29
  require('./constantsSite.js');
25
30
  require('./constantsDomainLocales.js');
26
31
  require('./constantsRiskScreener.js');
@@ -28,9 +33,10 @@ require('./constantsIsProduction.js');
28
33
  require('./miscCookieHelper.js');
29
34
  require('react-loading-skeleton');
30
35
  require('string-format');
31
- require('./translationsContext-affdc589.js');
32
- require('./tslib.es6-ac1d7f27.js');
33
- require('./index-04d6a3da.js');
36
+ require('./translationsContext-9b0d023d.js');
37
+ require('./index-7305ec62.js');
38
+ require('./index.styles-7654fb59.js');
39
+ require('./shared-7b7b3f13.js');
34
40
 
35
41
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
36
42
 
@@ -225,9 +231,9 @@ function reducer(state, action) {
225
231
  case ActionTypes.ClearInputSearch:
226
232
  return Object.assign(Object.assign({}, state), { focused: 'search', searchKeywords: '' });
227
233
  case ActionTypes.SelectLocation:
228
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name });
234
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name, searchResults: {} });
229
235
  case ActionTypes.SelectSpecialty:
230
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload });
236
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload, searchResults: {} });
231
237
  case ActionTypes.SelectSearchResult:
232
238
  return Object.assign(Object.assign({}, state), { searchKeywords: action.payload.name, isMobileModalOpened: false, focused: 'none', navigateTo: action.payload.url });
233
239
  case ActionTypes.FetchCitiesStart:
@@ -265,8 +271,12 @@ function reducer(state, action) {
265
271
  return Object.assign(Object.assign({}, state), { cities: action.payload });
266
272
  case ActionTypes.DisplayInitialCities:
267
273
  return Object.assign(Object.assign({}, state), { cities: state.initialCities });
268
- case ActionTypes.DisplayInitialSearchResults:
269
- return Object.assign(Object.assign({}, state), { searchResults: state.initialSearchResults, isLoadingSearchResults: false });
274
+ case ActionTypes.DisplayInitialSearchResults: {
275
+ const trimmed = state.searchKeywords.trim();
276
+ const minLen = SEARCH_KEYWORD_MIN_LENGTH[state.locale];
277
+ const shouldShowEmpty = trimmed.length > 0 && trimmed.length <= minLen;
278
+ return Object.assign(Object.assign({}, state), { searchResults: shouldShowEmpty ? {} : state.initialSearchResults, isLoadingSearchResults: false });
279
+ }
270
280
  case ActionTypes.UpdateInitialSearchResults:
271
281
  return Object.assign(Object.assign({}, state), { initialSearchResults: Object.assign(Object.assign({}, state.initialSearchResults), { [action.payload.key]: action.payload.searches }) });
272
282
  case ActionTypes.GrantGeoLocationPermission:
@@ -301,7 +311,7 @@ const StyleSearchInputsWrapper = styled__default["default"].div `
301
311
  gap: 12px;
302
312
  }
303
313
  `;
304
- const StyleResultWrapper$2 = styled__default["default"].div `
314
+ const StyleResultWrapper = styled__default["default"].div `
305
315
  position: absolute;
306
316
  top: calc(100% + 2px);
307
317
  width: 100%;
@@ -317,7 +327,7 @@ const StyleResultWrapper$2 = styled__default["default"].div `
317
327
  `;
318
328
 
319
329
  const StyledSearchResultWrapper = styled__default["default"].div ``;
320
- const StyleResultHeader = styled__default["default"].div `
330
+ styled__default["default"].div `
321
331
  display: flex;
322
332
  justify-content: space-between;
323
333
  align-item: center;
@@ -349,9 +359,12 @@ const StyleResultItem = styled__default["default"].div `
349
359
  align-items: center;
350
360
  cursor: pointer;
351
361
 
352
- &:hover {
353
- background-color: ${miscTheme.theme.colors.blue50};
362
+ ${utils.MediaQueries.mbUp} {
363
+ &:hover {
364
+ background-color: ${miscTheme.theme.colors.blue50};
365
+ }
354
366
  }
367
+
355
368
  .image-item {
356
369
  flex: 0 0 48px;
357
370
  width: 48px;
@@ -418,8 +431,12 @@ styled__default["default"].div `
418
431
  }
419
432
  `;
420
433
 
421
- const SearchResult = ({ state, type, results, location, isLoading, typeInformation, clientSlug = '', dispatch, }) => {
422
- const { locale, t } = index$1.useTranslations();
434
+ const SearchResult = ({ state, type, results,
435
+ // location,
436
+ isLoading, typeInformation,
437
+ // clientSlug = '',
438
+ dispatch, }) => {
439
+ const { t } = index$1.useTranslations();
423
440
  const { selectedLocation } = state;
424
441
  const typeSlug = React.useMemo(() => typeInformation[type].slug, [typeInformation, type]);
425
442
  const handleOnClick = (item) => {
@@ -440,40 +457,37 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
440
457
  });
441
458
  }
442
459
  };
443
- const handleSeeAll = () => {
444
- let url = `/${selectedLocation.slug}/${typeSlug}`;
445
- const slugClientUrl = constants.MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
446
- if (slugClientUrl) {
447
- url += `/${slugClientUrl}`;
448
- }
449
- if ((type === 'doctor' || type === 'hospital') &&
450
- state.selectedSpecialty.id > 0) {
451
- url += `?specialtyId=${state.selectedSpecialty.id}`;
452
- }
453
- if (url) {
454
- dispatch({ type: ActionTypes.NavigateTo, payload: url });
455
- }
456
- };
460
+ // const handleSeeAll = () => {
461
+ // let url = `/${selectedLocation.slug}/${typeSlug}`
462
+ // const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug]
463
+ // if (slugClientUrl) {
464
+ // url += `/${slugClientUrl}`
465
+ // }
466
+ // if (
467
+ // (type === 'doctor' || type === 'hospital') &&
468
+ // state.selectedSpecialty.id > 0
469
+ // ) {
470
+ // url += `?specialtyId=${state.selectedSpecialty.id}`
471
+ // }
472
+ // if (url) {
473
+ // dispatch({ type: ActionTypes.NavigateTo, payload: url })
474
+ // }
475
+ // }
476
+ if (results === null)
477
+ return null;
457
478
  return (React__default["default"].createElement(StyledSearchResultWrapper, null,
458
- React__default["default"].createElement(StyleResultHeader, null,
459
- React__default["default"].createElement("div", { className: "title" }, t('booking.searchResult.description', {
460
- search_type: typeInformation[type].name,
461
- search_location: location,
462
- })),
463
- results.length > 0 && (React__default["default"].createElement("div", { className: "btn-see-all", onClick: handleSeeAll }, t('home.seeAll')))),
464
- React__default["default"].createElement(StyleResultBody, null,
465
- isLoading &&
466
- Array(3)
467
- .fill(undefined)
468
- .map((_, i) => (React__default["default"].createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
469
- React__default["default"].createElement("div", { className: "image-item" },
470
- React__default["default"].createElement(core.Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
471
- React__default["default"].createElement("div", { className: "infor" },
472
- React__default["default"].createElement("div", { className: "title" },
473
- React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
474
- React__default["default"].createElement("div", { className: "description" },
475
- React__default["default"].createElement("div", { className: "sub-description" },
476
- React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))),
479
+ React__default["default"].createElement(StyleResultBody, { className: "search-results__body" },
480
+ isLoading && (React__default["default"].createElement("div", { className: "skeleton-result" }, Array(3)
481
+ .fill(undefined)
482
+ .map((_, i) => (React__default["default"].createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
483
+ React__default["default"].createElement("div", { className: "image-item" },
484
+ React__default["default"].createElement(core.Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
485
+ React__default["default"].createElement("div", { className: "infor" },
486
+ React__default["default"].createElement("div", { className: "title" },
487
+ React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
488
+ React__default["default"].createElement("div", { className: "description" },
489
+ React__default["default"].createElement("div", { className: "sub-description" },
490
+ React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))))),
477
491
  !isLoading && results && results.length > 0 && (React__default["default"].createElement(React__default["default"].Fragment, null, results.map((item, index) => {
478
492
  var _a, _b;
479
493
  const isLastItem = (results.length > 4 && index === 3) ||
@@ -491,7 +505,7 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
491
505
  if (index >= 4) {
492
506
  return React__default["default"].createElement(React__default["default"].Fragment, null);
493
507
  }
494
- return (React__default["default"].createElement(StyleResultItem, { key: item.id, className: isLastItem ? 'last-item' : '', onClick: () => handleOnClick(item) },
508
+ return (React__default["default"].createElement(StyleResultItem, { key: item.id, className: core.clsx(isLastItem ? 'last-item' : '', 'result-item'), onClick: () => handleOnClick(item) },
495
509
  React__default["default"].createElement("div", { className: "image-item" },
496
510
  React__default["default"].createElement("img", { src: item.logo || item.avatar, alt: item.name })),
497
511
  React__default["default"].createElement("div", { className: "infor" },
@@ -500,7 +514,14 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
500
514
  typeInformation[type].icon,
501
515
  React__default["default"].createElement("div", { className: "sub-description" }, subDescription)))));
502
516
  }))),
503
- !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default["default"].createElement(index$2.Text, { size: "sm", color: miscTheme.theme.colors.gray400 }, t('booking.searchBar.noResults'))))));
517
+ !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default["default"].createElement(index$2.Text, { size: "sm", color: miscTheme.theme.colors.gray400, className: "noresult-block" }, t('booking.searchBar.noResults'))))));
518
+ };
519
+
520
+ const SearchResultContent = ({ state, type, isLoading, clientSlug, typeInformation, dispatch, }) => {
521
+ var _a;
522
+ if (state.focused !== 'search')
523
+ return null;
524
+ return (React__default["default"].createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || null, location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug }));
504
525
  };
505
526
 
506
527
  const StyleSearchSpecialtyWrapper = styled__default["default"].div `
@@ -513,7 +534,7 @@ const StyleSearchSpecialtyWrapper = styled__default["default"].div `
513
534
  gap: 12px;
514
535
  }
515
536
  `;
516
- const StyleResultWrapper$1 = styled__default["default"].div `
537
+ styled__default["default"].div `
517
538
  position: absolute;
518
539
  top: calc(100% + 2px);
519
540
  width: calc(100% + 100px);
@@ -595,97 +616,182 @@ const StyledSpecialtyItem = styled__default["default"].li `
595
616
  }
596
617
  `;
597
618
 
598
- const DoctorIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
599
- React__default["default"].createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
600
- const ServiceIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
601
- React__default["default"].createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
602
- const HospitalIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
603
- React__default["default"].createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
604
- const SpecialtyIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
605
- React__default["default"].createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
606
-
607
- const SearchSpecialty = ({ state, isMobile, debouncedFetchSearchResults, selectedLocation, onSpecialtyClick, dispatch, }) => {
608
- var _a;
619
+ const CustomSelectItem$1 = React.forwardRef((_a, ref) => {
620
+ var { label, value, specialty } = _a, others = tslib_es6.__rest(_a, ["label", "value", "specialty"]);
621
+ return (React__default["default"].createElement("div", Object.assign({ ref: ref }, others),
622
+ React__default["default"].createElement(StyledSpecialtyItem, { key: value,
623
+ // onClick={(evt) => {
624
+ // evt.nativeEvent.stopImmediatePropagation()
625
+ // if (onSpecialtyClick) {
626
+ // onSpecialtyClick({
627
+ // ...specialty,
628
+ // total_doctor: 0,
629
+ // })
630
+ // }
631
+ // }}
632
+ role: "button", tabIndex: 0, "aria-label": `Select ${label} as location` },
633
+ React__default["default"].createElement("div", { className: "image-item" },
634
+ React__default["default"].createElement("img", { src: specialty.thumbnail, alt: label })),
635
+ React__default["default"].createElement(core.Text, { size: "md" }, label))));
636
+ });
637
+
638
+ const SearchSpecialty = ({ state,
639
+ // debouncedFetchSearchResults,
640
+ onSpecialtyClick, dispatch, }) => {
609
641
  const { t, locale } = index$1.useTranslations();
610
642
  const inputSpecialtyWrapperRef = React.useRef(null);
611
643
  const slugs = React.useMemo(() => constants.LOCALIZED_SLUGS[locale], [locale]);
612
- const styleSpecialties = React.useMemo(() => {
613
- return {
614
- wrapper: {
615
- '&:after': {
616
- content: '""',
617
- width: '1px',
618
- height: '20px',
619
- backgroundColor: '#E4E8EC',
620
- position: 'absolute',
621
- right: 0,
622
- top: '13px',
623
- },
624
- },
625
- input: {
626
- border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
627
- height: isMobile ? '40px' : '46px !important',
628
- paddingRight: '30px',
629
- '&:focus': {
630
- boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
631
- },
632
- },
633
- rightSection: {
634
- width: '30px',
635
- svg: {
636
- fontSize: '20px',
637
- },
638
- },
639
- };
640
- }, [isMobile]);
641
- const handleSearchSpecialtyInputChange = React.useCallback(function handleSearchSpecialtyInputChange(value) {
642
- // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
643
- // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
644
- // debouncedFetchSearchResults(value.trim())
645
- // } else {
646
- // debouncedFetchSearchResults.cancel()
647
- // dispatch({ type: ActionTypes.DisplayInitialCities })
648
- // }
649
- console.log(value);
650
- }, [debouncedFetchSearchResults, dispatch]);
644
+ // const styleSpecialties = useMemo(() => {
645
+ // return {
646
+ // wrapper: {
647
+ // '&:after': {
648
+ // content: '""',
649
+ // width: '1px',
650
+ // height: '20px',
651
+ // backgroundColor: '#E4E8EC',
652
+ // position: 'absolute',
653
+ // right: 0,
654
+ // top: '13px',
655
+ // },
656
+ // },
657
+ // input: {
658
+ // border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
659
+ // height: isMobile ? '40px' : '46px !important',
660
+ // paddingRight: '30px',
661
+ // '&:focus': {
662
+ // boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
663
+ // },
664
+ // },
665
+ // rightSection: {
666
+ // width: '30px',
667
+ // svg: {
668
+ // fontSize: '20px',
669
+ // },
670
+ // },
671
+ // } as any
672
+ // }, [isMobile])
673
+ // const handleSearchSpecialtyInputChange = useCallback(
674
+ // function handleSearchSpecialtyInputChange(value: string) {
675
+ // // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
676
+ // // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
677
+ // // debouncedFetchSearchResults(value.trim())
678
+ // // } else {
679
+ // // debouncedFetchSearchResults.cancel()
680
+ // // dispatch({ type: ActionTypes.DisplayInitialCities })
681
+ // // }
682
+ // console.log(value)
683
+ // },
684
+ // [debouncedFetchSearchResults, dispatch],
685
+ // )
651
686
  useOutsideClick.useOutsideClick(inputSpecialtyWrapperRef, () => {
652
687
  dispatch({ type: ActionTypes.ClickOutsideInputSpecialty });
653
688
  });
689
+ const specialtyData = [
690
+ {
691
+ name: t('booking.searchBar.allSpecialties'),
692
+ id: -1,
693
+ thumbnail: '',
694
+ total_doctor: 0,
695
+ slug: slugs.SPECIALTIES,
696
+ },
697
+ ...state.allSpecialties,
698
+ ];
699
+ const selectValue = state.selectedSpecialty && typeof state.selectedSpecialty.id === 'number'
700
+ ? String(state.selectedSpecialty.id)
701
+ : null;
654
702
  return (React__default["default"].createElement(StyleSearchSpecialtyWrapper, { ref: inputSpecialtyWrapperRef },
655
- React__default["default"].createElement(core.Input.Wrapper, null,
656
- React__default["default"].createElement(core.Input, { size: isMobile ? 'md' : 'lg', placeholder: t('booking.searchPopup.specialties'), value: ((_a = state === null || state === void 0 ? void 0 : state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.name) || '', rightSection: React__default["default"].createElement(ChevronDown.ChevronDown, null), styles: styleSpecialties, onFocus: () => dispatch({ type: ActionTypes.FocusInputSpecialty }), onChange: (event) => {
657
- handleSearchSpecialtyInputChange(event.target.value);
658
- } })),
659
- state.focused === 'specialty' && (React__default["default"].createElement(StyleResultWrapper$1, null,
660
- React__default["default"].createElement(StyledSpecialtyItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
661
- if (onSpecialtyClick) {
662
- onSpecialtyClick({
663
- name: t('booking.searchBar.allSpecialties'),
664
- id: -1,
665
- thumbnail: '',
666
- total_doctor: 0,
667
- slug: slugs.SPECIALTIES,
668
- });
669
- }
670
- } },
671
- React__default["default"].createElement("div", { className: "image-item" },
672
- React__default["default"].createElement(SpecialtyIcon, null)),
673
- React__default["default"].createElement(index$2.Text, { size: "md" }, t('booking.searchBar.allSpecialties'))),
674
- state.allSpecialties.map((specialty) => (React__default["default"].createElement(StyledSpecialtyItem, { key: specialty.id, onClick: (evt) => {
675
- evt.nativeEvent.stopImmediatePropagation();
676
- if (onSpecialtyClick) {
677
- onSpecialtyClick(Object.assign(Object.assign({}, specialty), { total_doctor: 0 }));
678
- }
679
- }, role: "button", tabIndex: 0, "aria-label": `Select ${specialty.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === specialty.id },
680
- React__default["default"].createElement("div", { className: "image-item" },
681
- React__default["default"].createElement("img", { src: specialty.thumbnail, alt: specialty.name })),
682
- React__default["default"].createElement(index$2.Text, { size: "md" }, specialty.name))))))));
703
+ React__default["default"].createElement(core.Select, { value: selectValue, placeholder: t('booking.searchPopup.specialties'), searchable: true, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: specialtyData.map((specialty) => ({
704
+ value: String(specialty.id),
705
+ label: specialty.name,
706
+ specialty,
707
+ })), rightSection: React__default["default"].createElement(ChevronDown.ChevronDown, { style: { width: 20, height: 20 } }), styles: (theme) => ({
708
+ dropdown: {
709
+ left: '0 !important',
710
+ border: 0,
711
+ marginTop: -7,
712
+ borderRadius: 0,
713
+ '& [data-mantine-scrollbar]': {
714
+ '&[data-orientation="vertical"]': {
715
+ width: '6px',
716
+ },
717
+ },
718
+ [theme.fn.largerThan('sm')]: {
719
+ minWidth: 264,
720
+ width: `264px !important`,
721
+ },
722
+ },
723
+ item: {
724
+ padding: 0,
725
+ '&[data-selected]': {
726
+ '&, &:hover': {
727
+ backgroundColor: 'transparent',
728
+ color: 'inherit',
729
+ },
730
+ },
731
+ '&[data-hovered]': {
732
+ backgroundColor: 'transparent',
733
+ },
734
+ },
735
+ input: {
736
+ '&:not(.mantine-Textarea-input)': {
737
+ height: 40,
738
+ fontSize: core.rem(14),
739
+ paddingLeft: 14,
740
+ paddingRight: 14,
741
+ [theme.fn.largerThan('sm')]: {
742
+ height: 46,
743
+ fontSize: core.rem(16),
744
+ paddingLeft: 16,
745
+ paddingRight: 16,
746
+ borderColor: 'transparent',
747
+ },
748
+ '&:focus, &:focus-within': {
749
+ outline: 'none',
750
+ boxShadow: 'none',
751
+ },
752
+ },
753
+ },
754
+ itemsWrapper: {
755
+ padding: 0,
756
+ },
757
+ wrapper: {
758
+ [theme.fn.largerThan('sm')]: {
759
+ position: 'relative',
760
+ '&:after': {
761
+ content: '""',
762
+ width: '1px',
763
+ height: '20px',
764
+ backgroundColor: '#E4E8EC',
765
+ position: 'absolute',
766
+ right: 0,
767
+ top: '13px',
768
+ },
769
+ },
770
+ },
771
+ }), itemComponent: CustomSelectItem$1, filter: (value, item) => item.label.toLowerCase().includes(value.toLowerCase().trim()), onChange: (value) => {
772
+ if (value == null)
773
+ return;
774
+ const specialty = specialtyData.find((i) => String(i.id) === value);
775
+ if (!specialty)
776
+ return;
777
+ onSpecialtyClick(Object.assign(Object.assign(Object.assign({}, specialty), { thumbnail: specialty.thumbnail || '' }), (Number(value) !== -1 && {
778
+ total_doctor: 0,
779
+ })));
780
+ } })));
683
781
  };
684
782
 
685
- const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', focusSearchInput, onSearch, onEnterSearch, dispatch, }) => {
686
- var _a;
783
+ const SearchInputs = React.forwardRef(({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', onSearch, onFocusInput, onEnterSearch, dispatch, onlyShowSearchBox, onChangeSpecialty, }, ref) => {
687
784
  const { t } = index$1.useTranslations();
785
+ const theme = core.useMantineTheme();
688
786
  const inputSearchWrapperRef = React.useRef(null);
787
+ const internalInputRef = React.useRef(null);
788
+ React.useImperativeHandle(ref, () => ({
789
+ focus: () => {
790
+ var _a;
791
+ (_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
792
+ },
793
+ }));
794
+ const hasSearchIcon = !onlyShowSearchBox;
689
795
  const gaAttributes = React.useMemo(() => {
690
796
  if (trackingAttributes) {
691
797
  return {
@@ -699,20 +805,16 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
699
805
  }
700
806
  }, [trackingAttributes]);
701
807
  const placeholderSearch = React.useMemo(() => {
702
- if (type === 'doctor') {
808
+ if (type === 'doctor')
703
809
  return t('booking.searchBar.placeholder.doctor');
704
- }
705
- if (type === 'service') {
810
+ if (type === 'service')
706
811
  return t('booking.searchBar.placeholder.service');
707
- }
708
- if (type === 'hospital') {
812
+ if (type === 'hospital')
709
813
  return t('booking.searchBar.placeholder.hospital');
710
- }
711
- if (type === 'specialty') {
814
+ if (type === 'specialty')
712
815
  return t('booking.searchBar.placeholder.specialty');
713
- }
714
816
  return '';
715
- }, [type]);
817
+ }, [type, t]);
716
818
  const styleInputWrapper = React.useMemo(() => {
717
819
  return {
718
820
  root: {
@@ -722,7 +824,11 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
722
824
  display: 'none',
723
825
  },
724
826
  input: {
725
- paddingLeft: '48px',
827
+ paddingLeft: hasSearchIcon ? 48 : 16,
828
+ [theme.fn.smallerThan('sm')]: {
829
+ height: 40,
830
+ fontSize: core.rem(14),
831
+ },
726
832
  },
727
833
  '.mantine-Input-icon': {
728
834
  left: '0',
@@ -730,22 +836,22 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
730
836
  },
731
837
  },
732
838
  };
733
- }, []);
839
+ }, [hasSearchIcon, theme]);
734
840
  const styleInput = React.useMemo(() => {
735
841
  return {
736
842
  icon: {
737
- left: '165px',
843
+ left: '205px',
738
844
  },
739
845
  input: {
740
846
  color: '#262626',
741
847
  '&[data-with-icon="true"]': {
742
- paddingLeft: '205px',
848
+ paddingLeft: '245px',
743
849
  paddingRight: '16px',
744
850
  },
745
851
  },
746
852
  rightSection: {
747
853
  left: 0,
748
- width: '165px',
854
+ width: '205px',
749
855
  padding: '1px',
750
856
  },
751
857
  };
@@ -758,7 +864,7 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
758
864
  };
759
865
  }, []);
760
866
  useOutsideClick.useOutsideClick(inputSearchWrapperRef, () => {
761
- dispatch({ type: ActionTypes.ClickOutsideInputSearch });
867
+ !isMobile && dispatch({ type: ActionTypes.ClickOutsideInputSearch });
762
868
  });
763
869
  const handleSearchInputChange = React.useCallback(function handleSearchInputChange(value) {
764
870
  dispatch({ type: ActionTypes.ChangeInputSearch, payload: value });
@@ -770,40 +876,84 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
770
876
  value.trim().length === 0) {
771
877
  debouncedFetchSearchResults(value.trim(), state, type, clientSlug);
772
878
  }
773
- else {
774
- debouncedFetchSearchResults.cancel();
775
- dispatch({ type: ActionTypes.DisplayInitialSearchResults });
776
- }
777
- }, [dispatch, state, type]);
879
+ }, [
880
+ dispatch,
881
+ state,
882
+ type,
883
+ initalSearchValue,
884
+ debouncedFetchSearchResults,
885
+ clientSlug,
886
+ onSearch,
887
+ ]);
778
888
  const handleSpecialtyClick = React.useCallback(function handleSpecialtyClick(specialty) {
889
+ var _a;
779
890
  dispatch({ type: ActionTypes.SelectSpecialty, payload: specialty });
780
- focusSearchInput();
781
- }, [dispatch]);
891
+ onChangeSpecialty === null || onChangeSpecialty === void 0 ? void 0 : onChangeSpecialty(specialty);
892
+ !isMobile && ((_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus());
893
+ }, [dispatch, onChangeSpecialty]);
782
894
  const inputOnKeyDown = React.useCallback((e) => {
783
- if (e.keyCode === 13) {
895
+ if (e.key === 'Enter') {
784
896
  e.stopPropagation();
785
897
  e.preventDefault();
786
898
  onEnterSearch && onEnterSearch();
787
899
  }
788
900
  }, [onEnterSearch]);
789
901
  return (React__default["default"].createElement(StyleSearchInputsWrapper, { ref: inputSearchWrapperRef }, type === 'specialty' ? (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
790
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
902
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
791
903
  handleSearchInputChange(event.target.value);
792
904
  }, onKeyDown: inputOnKeyDown }))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
793
905
  type === 'service' ? (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
794
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), value: state.searchKeywords, onChange: (event) => {
906
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => {
907
+ dispatch({ type: ActionTypes.FocusInputSearch });
908
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
909
+ }, value: state.searchKeywords, onChange: (event) => {
795
910
  handleSearchInputChange(event.target.value);
796
911
  }, onKeyDown: inputOnKeyDown }))) : (React__default["default"].createElement(React__default["default"].Fragment, null, isMobile && !hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null,
797
- React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }),
912
+ !onlyShowSearchBox && (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })),
798
913
  React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
799
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onChange: (event) => {
914
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => {
915
+ dispatch({ type: ActionTypes.FocusInputSearch });
916
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
917
+ }, onChange: (event) => {
800
918
  handleSearchInputChange(event.target.value);
801
919
  }, onKeyDown: inputOnKeyDown })))) : (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper, className: hideSpecialtySelection ? 'hide-specialty-selection' : '' },
802
- React__default["default"].createElement(core.Input, Object.assign({ icon: React__default["default"].createElement(core$1.Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
920
+ React__default["default"].createElement(core.Input, Object.assign({ ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
803
921
  handleSearchInputChange(event.target.value);
804
- }, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null)) : (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })) })))))),
805
- state.focused === 'search' && (React__default["default"].createElement(StyleResultWrapper$2, null,
806
- React__default["default"].createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || [], location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
922
+ }, onFocus: () => {
923
+ dispatch({ type: ActionTypes.FocusInputSearch });
924
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
925
+ }, onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null)) : (!onlyShowSearchBox && (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }))) })))))),
926
+ !isMobile && (React__default["default"].createElement(StyleResultWrapper, null,
927
+ React__default["default"].createElement(SearchResultContent, { type: type, state: state, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
928
+ });
929
+ SearchInputs.displayName = 'SearchInputs';
930
+
931
+ const ModalSearchResult = (_a) => {
932
+ var { searchInputEle, closeModal, children } = _a, props = tslib_es6.__rest(_a, ["searchInputEle", "closeModal", "children"]);
933
+ const theme = core.useMantineTheme();
934
+ return (React__default["default"].createElement(index$3.Modal, Object.assign({}, props, { zIndex: 310, fullScreen: true, styles: {
935
+ content: {
936
+ borderRadius: 0,
937
+ height: '100%',
938
+ '.search-results__body': { padding: 0 },
939
+ '.result-item': {
940
+ paddingLeft: 16,
941
+ paddingRight: 16,
942
+ },
943
+ '.noresult-block': {
944
+ padding: 16,
945
+ },
946
+ '.skeleton-result': {
947
+ padding: 16,
948
+ },
949
+ },
950
+ header: { display: 'none' },
951
+ } }),
952
+ React__default["default"].createElement(core.Stack, { spacing: 16, sx: { paddingTop: 16 } },
953
+ React__default["default"].createElement(core.Flex, { align: 'center', gap: 12 },
954
+ React__default["default"].createElement(arrow.ArrowLeft, { size: 28, onClick: closeModal, color: theme.fn.primaryColor() }),
955
+ React__default["default"].createElement(core.Box, { sx: { width: '100%' } }, searchInputEle)),
956
+ children)));
807
957
  };
808
958
 
809
959
  const StyleSearchLocationWrapper = styled__default["default"].div `
@@ -816,7 +966,7 @@ const StyleSearchLocationWrapper = styled__default["default"].div `
816
966
  gap: 12px;
817
967
  }
818
968
  `;
819
- const StyleResultWrapper = styled__default["default"].div `
969
+ styled__default["default"].div `
820
970
  position: absolute;
821
971
  top: calc(100% + 2px);
822
972
  width: 100%;
@@ -839,17 +989,6 @@ const StyledLocationItem = styled__default["default"].div `
839
989
  gap: 14px;
840
990
  overflow: hidden;
841
991
 
842
- ${({ isSelected }) => isSelected &&
843
- `
844
- &::after {
845
- content: ${utils$1.checkMarkIconUrl};
846
- top: 50%;
847
- right: 18px;
848
- position: absolute;
849
- transform: translateY(-50%);
850
- }
851
- `}
852
-
853
992
  & + li::before {
854
993
  content: '';
855
994
  position: absolute;
@@ -884,9 +1023,29 @@ const StyledPinIcon = styled__default["default"](utils$1.PinIcon) `
884
1023
  flex: 0 0 12px;
885
1024
  `;
886
1025
 
887
- const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1026
+ const CustomSelectItem = React.forwardRef((_a, ref) => {
1027
+ var { label, value } = _a, others = tslib_es6.__rest(_a, ["label", "value"]);
1028
+ return (React__default["default"].createElement("div", Object.assign({ ref: ref }, others),
1029
+ React__default["default"].createElement(StyledLocationItem, { key: value, role: "button", tabIndex: 0, "aria-label": `Select ${label} as location`, className: "location-item" },
1030
+ React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
1031
+ React__default["default"].createElement(core.Text, { size: "md" }, label))));
1032
+ });
1033
+
1034
+ const SearchLocation = ({ state, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1035
+ var _a;
888
1036
  const { t, locale } = index$1.useTranslations();
889
1037
  const inputLocationWrapperRef = React.useRef(null);
1038
+ const citiesData = React.useMemo(() => {
1039
+ var _a;
1040
+ return [
1041
+ {
1042
+ name: t('booking.searchBar.allLocations'),
1043
+ id: constants.ID_OPTION_ALL_LOCATION,
1044
+ slug: (_a = constants.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
1045
+ },
1046
+ ...state.cities,
1047
+ ];
1048
+ }, [state.cities, t, locale]);
890
1049
  const gaAttributes = React.useMemo(() => {
891
1050
  if (trackingAttributes) {
892
1051
  return {
@@ -895,9 +1054,7 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
895
1054
  'data-event-label': trackingAttributes.dataEventLabel,
896
1055
  };
897
1056
  }
898
- else {
899
- return {};
900
- }
1057
+ return {};
901
1058
  }, [trackingAttributes]);
902
1059
  const handleSearchLocationInputChange = React.useCallback(function handleSearchLocationInputChange(value) {
903
1060
  dispatch({ type: ActionTypes.ChangeInputLocation, payload: value });
@@ -908,39 +1065,101 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
908
1065
  debouncedFetchCitiesByKeyword.cancel();
909
1066
  dispatch({ type: ActionTypes.DisplayInitialCities });
910
1067
  }
911
- }, [debouncedFetchCitiesByKeyword, dispatch]);
1068
+ }, [debouncedFetchCitiesByKeyword, dispatch, state.locale]);
912
1069
  useOutsideClick.useOutsideClick(inputLocationWrapperRef, () => {
913
1070
  dispatch({ type: ActionTypes.ClickOutsideInputLocation });
914
1071
  });
1072
+ const stateValue = (_a = selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) !== null && _a !== void 0 ? _a : null;
1073
+ const defaultValue = stateValue === null ? undefined : String(stateValue);
915
1074
  return (React__default["default"].createElement(StyleSearchLocationWrapper, { ref: inputLocationWrapperRef },
916
- React__default["default"].createElement(core.Input.Wrapper, null,
917
- React__default["default"].createElement(core.Input, Object.assign({ size: isMobile ? 'md' : 'lg', placeholder: "Search location", value: state.searchLocationKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputLocation }), onChange: (event) => {
918
- handleSearchLocationInputChange(event.target.value);
919
- } }, gaAttributes))),
920
- state.focused === 'location' && (React__default["default"].createElement(StyleResultWrapper, null,
921
- React__default["default"].createElement(core.ScrollArea, { scrollbarSize: 6, styles: { viewport: { maxHeight: 400 } } },
922
- React__default["default"].createElement(StyledLocationItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
923
- var _a;
924
- if (onLocationClick) {
925
- onLocationClick({
926
- name: t('booking.searchBar.allLocations'),
927
- id: constants.ID_OPTION_ALL_LOCATION,
928
- slug: (_a = constants.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
929
- });
930
- }
931
- } },
932
- React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
933
- React__default["default"].createElement(index$2.Text, { size: "md" }, t('booking.searchBar.allLocations'))),
934
- state.cities.map((city) => (React__default["default"].createElement(StyledLocationItem, { key: city.id, onClick: (evt) => {
935
- evt.nativeEvent.stopImmediatePropagation();
936
- if (onLocationClick) {
937
- onLocationClick(city);
938
- }
939
- }, role: "button", tabIndex: 0, "aria-label": `Select ${city.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === city.id },
940
- React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
941
- React__default["default"].createElement(index$2.Text, { size: "md" }, city.name)))))))));
1075
+ React__default["default"].createElement(core.Select, Object.assign({ key: defaultValue !== null && defaultValue !== void 0 ? defaultValue : 'no-selected-location', defaultValue: defaultValue, placeholder: t('booking.searchBar.allLocations'), searchable: true, onSearchChange: (value) => {
1076
+ handleSearchLocationInputChange(value);
1077
+ }, onFocus: () => {
1078
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1079
+ }, onDropdownClose: () => {
1080
+ debouncedFetchCitiesByKeyword.cancel();
1081
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1082
+ }, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: citiesData.map((city) => ({
1083
+ value: String(city.id),
1084
+ label: city.name,
1085
+ city,
1086
+ })), rightSection: React__default["default"].createElement(React__default["default"].Fragment, null) }, gaAttributes, { styles: (theme) => ({
1087
+ item: {
1088
+ padding: 0,
1089
+ '&[data-selected]': {
1090
+ '&, &:hover': {
1091
+ backgroundColor: 'transparent',
1092
+ color: 'inherit',
1093
+ },
1094
+ '.location-item': {
1095
+ '&::after': {
1096
+ content: utils$1.checkMarkIconUrl,
1097
+ top: '50%',
1098
+ right: 19,
1099
+ position: 'absolute',
1100
+ transform: 'translateY(-50%)',
1101
+ },
1102
+ },
1103
+ },
1104
+ '&[data-hovered]': {
1105
+ backgroundColor: 'transparent',
1106
+ },
1107
+ },
1108
+ input: {
1109
+ '&:not(.mantine-Textarea-input)': {
1110
+ height: 48,
1111
+ fontSize: core.rem(16),
1112
+ paddingLeft: 16,
1113
+ paddingRight: 16,
1114
+ [theme.fn.smallerThan('sm')]: {
1115
+ height: 40,
1116
+ fontSize: core.rem(14),
1117
+ paddingLeft: 14,
1118
+ paddingRight: 14,
1119
+ },
1120
+ },
1121
+ },
1122
+ itemsWrapper: {
1123
+ padding: 0,
1124
+ },
1125
+ dropdown: {
1126
+ left: '0 !important',
1127
+ border: 0,
1128
+ marginTop: -7,
1129
+ borderRadius: 0,
1130
+ '& ::-webkit-scrollbar': {
1131
+ width: '6px',
1132
+ height: '6px',
1133
+ },
1134
+ },
1135
+ }), itemComponent: CustomSelectItem,
1136
+ // 3. Logic quan trọng nhất: Luôn trả về true để bỏ qua bộ lọc mặc định của Mantine
1137
+ // Vì chúng ta fetch data từ API hoặc dùng toàn bộ list ban đầu
1138
+ filter: () => true, onChange: (value) => {
1139
+ if (value == null)
1140
+ return;
1141
+ const city = citiesData.find((i) => String(i.id) === value);
1142
+ if (!city)
1143
+ return;
1144
+ onLocationClick(city);
1145
+ debouncedFetchCitiesByKeyword.cancel();
1146
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1147
+ setTimeout(() => {
1148
+ var _a, _b;
1149
+ (_b = (_a = inputLocationWrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === null || _b === void 0 ? void 0 : _b.blur();
1150
+ }, 0);
1151
+ } }))));
942
1152
  };
943
1153
 
1154
+ const DoctorIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1155
+ React__default["default"].createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
1156
+ const ServiceIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1157
+ React__default["default"].createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
1158
+ const HospitalIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1159
+ React__default["default"].createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
1160
+ const SpecialtyIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
1161
+ React__default["default"].createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
1162
+
944
1163
  const StyleSpecialtiesWrapper = styled__default["default"].div `
945
1164
  display: flex;
946
1165
  flex-wrap: wrap;
@@ -1314,16 +1533,20 @@ function useSearchBarApi({ dispatch, careApiDomain, locale = 'vi-VN', client = '
1314
1533
  moreParams.noPaging = 1;
1315
1534
  }
1316
1535
  const requests = [
1317
- fetchCitiesApi(paths.PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { client: constants.CLIENT_KEY.MSD === client ? '' : client })),
1536
+ fetchCitiesApi(paths.PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { hospitalActive: 1, client: constants.CLIENT_KEY.MSD === client ? '' : client })),
1318
1537
  ];
1319
1538
  if (locale === 'zh-TW') {
1320
1539
  requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST, {
1321
1540
  noPaging: 1,
1541
+ hospitalActive: 1,
1322
1542
  client: constants.CLIENT_KEY.MSD === client ? '' : client,
1323
1543
  }));
1324
1544
  }
1325
1545
  else {
1326
- requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST));
1546
+ requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST, {
1547
+ noPaging: 1,
1548
+ hospitalActive: 1,
1549
+ }));
1327
1550
  }
1328
1551
  return Promise.all(requests)
1329
1552
  .then(([data1, data2]) => {
@@ -1503,11 +1726,14 @@ gaTrackingSearchBar, gaTrackingLocationSearch, autoCompleteDisabled = false, inp
1503
1726
  // isOptionAllLocation = false,
1504
1727
  // hideResults = [],
1505
1728
  // isNavResultItem = true,
1506
- routerPush, onGeoLocationPermissionChange,
1729
+ triggerSearchWhenChangeFilter, routerPush, onGeoLocationPermissionChange,
1507
1730
  // onSearch,
1508
1731
  onChangeLocation, }) => {
1732
+ var _a;
1509
1733
  const { locale, t } = index$1.useTranslations();
1510
1734
  const wrapperRef = React.useRef(null);
1735
+ const searchInputDesktopRef = React.useRef(null);
1736
+ const searchInputMobileRef = React.useRef(null);
1511
1737
  const inputSearchSpecialtyWrapperRef = React.useRef(null);
1512
1738
  const [currentTab, setCurrentTab] = React.useState(initTypeSearch);
1513
1739
  const { geoLocationPermission: geoLocationPermissionFromHook, geoLocationCoordinates: geoLocationCoordinatesFromHook, } = utils$1.useGeolocation();
@@ -1522,7 +1748,9 @@ onChangeLocation, }) => {
1522
1748
  const { navigateTo, focusedSpecialty,
1523
1749
  // isLoadingCities,
1524
1750
  // cities,
1525
- searchKeywords, geoLocationPermission, selectedLocation, selectedSpecialty, initialSelectedCity,
1751
+ searchKeywords, geoLocationPermission, selectedLocation,
1752
+ // selectedSpecialty,
1753
+ initialSelectedCity,
1526
1754
  // defaultCity,
1527
1755
  searchResults, isLoadingSearchResults,
1528
1756
  // isMobileModalOpened,
@@ -1536,6 +1764,7 @@ onChangeLocation, }) => {
1536
1764
  client: clientSlug,
1537
1765
  });
1538
1766
  const slugs = React.useMemo(() => constants.LOCALIZED_SLUGS[locale], [locale]);
1767
+ const [opened, { close, open }] = hooks.useDisclosure(false);
1539
1768
  const typeInformation = React.useMemo(() => {
1540
1769
  return Object.assign({ doctor: {
1541
1770
  name: t('booking.searchPopup.doctors'),
@@ -1559,34 +1788,31 @@ onChangeLocation, }) => {
1559
1788
  }, [currentTab]);
1560
1789
  const debouncedFetchCitiesByKeyword = React.useMemo(() => debounce__default["default"](fetchCitiesByKeyword, 400), [fetchCitiesByKeyword]);
1561
1790
  const debouncedFetchSearchResults = React.useMemo(() => debounce__default["default"](fetchSearchResults, 400), [fetchSearchResults]);
1562
- const handleLocationClick = React.useCallback(function handleLocationClick(city) {
1563
- dispatch({ type: ActionTypes.SelectLocation, payload: city });
1564
- focusSearchInput();
1565
- if (onChangeLocation) {
1566
- onChangeLocation(city);
1567
- }
1568
- }, [t, dispatch]);
1569
- function focusSearchInput() {
1791
+ // function focusSearchInput() {
1792
+ // if (wrapperRef.current) {
1793
+ // wrapperRef.current
1794
+ // .querySelector<HTMLInputElement>('input[name="search-results"]')
1795
+ // ?.focus()
1796
+ // }
1797
+ // }
1798
+ const onClickSearchByKeyword = React.useCallback(function onClickSearchByKeyword({ locationSlug, specialtyId, } = {}) {
1570
1799
  var _a;
1571
- if (wrapperRef.current) {
1572
- (_a = wrapperRef.current
1573
- .querySelector('input[name="search-results"]')) === null || _a === void 0 ? void 0 : _a.focus();
1574
- }
1575
- }
1576
- function onClickSearchByKeyword() {
1800
+ close();
1577
1801
  let url = '';
1578
1802
  const { slug: typeSlug } = typeInformation[currentTab];
1579
1803
  let moreParams = '';
1580
1804
  const slugClientUrl = constants.MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
1805
+ const selectedSpecialtyId = specialtyId || ((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) || -1;
1806
+ const selectedLocationSlug = locationSlug || (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug) || '';
1581
1807
  if ((currentTab === 'doctor' || currentTab === 'hospital') &&
1582
- state.selectedSpecialty.id > 0) {
1583
- moreParams = `&specialtyId=${state.selectedSpecialty.id}`;
1808
+ selectedSpecialtyId > 0) {
1809
+ moreParams = `&specialtyId=${selectedSpecialtyId}`;
1584
1810
  }
1585
1811
  if (currentTab === 'specialty') {
1586
1812
  url = `/${typeSlug}`;
1587
1813
  }
1588
1814
  else {
1589
- url = `/${selectedLocation.slug}/${typeSlug}`;
1815
+ url = `/${selectedLocationSlug}/${typeSlug}`;
1590
1816
  }
1591
1817
  if (slugClientUrl) {
1592
1818
  url += `/${slugClientUrl}`;
@@ -1595,9 +1821,34 @@ onChangeLocation, }) => {
1595
1821
  if (url) {
1596
1822
  dispatch({ type: ActionTypes.NavigateTo, payload: url });
1597
1823
  }
1598
- }
1824
+ }, [
1825
+ clientSlug,
1826
+ close,
1827
+ currentTab,
1828
+ dispatch,
1829
+ locale,
1830
+ searchKeywords,
1831
+ selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug,
1832
+ (_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id,
1833
+ typeInformation,
1834
+ ]);
1835
+ const handleLocationClick = React.useCallback(function handleLocationClick(city) {
1836
+ triggerSearchWhenChangeFilter &&
1837
+ onClickSearchByKeyword({ locationSlug: city.slug });
1838
+ dispatch({ type: ActionTypes.SelectLocation, payload: city });
1839
+ if (onChangeLocation) {
1840
+ onChangeLocation(city);
1841
+ }
1842
+ }, [
1843
+ dispatch,
1844
+ isMobile,
1845
+ onChangeLocation,
1846
+ onClickSearchByKeyword,
1847
+ triggerSearchWhenChangeFilter,
1848
+ ]);
1599
1849
  useOutsideClick.useOutsideClick(inputSearchSpecialtyWrapperRef, () => {
1600
- dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1850
+ !isMobile &&
1851
+ dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1601
1852
  });
1602
1853
  React.useEffect(() => {
1603
1854
  var _a;
@@ -1620,6 +1871,7 @@ onChangeLocation, }) => {
1620
1871
  fetchCitiesByLocation({ coordinates: state.geoLocationCoordinates });
1621
1872
  }, [geoLocationPermission]);
1622
1873
  React.useEffect(() => {
1874
+ var _a;
1623
1875
  const defaultSpecialty = initSpecialty
1624
1876
  ? initSpecialty
1625
1877
  : {
@@ -1629,13 +1881,23 @@ onChangeLocation, }) => {
1629
1881
  total_doctor: 0,
1630
1882
  slug: slugs.SPECIALTIES,
1631
1883
  };
1632
- if (!state.selectedSpecialty) {
1884
+ if (initSpecialty) {
1885
+ if (((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) !== initSpecialty.id) {
1886
+ dispatch({
1887
+ type: ActionTypes.SelectSpecialty,
1888
+ payload: initSpecialty,
1889
+ });
1890
+ }
1891
+ return;
1892
+ }
1893
+ if (!state.selectedSpecialty ||
1894
+ state.selectedSpecialty.id !== defaultSpecialty.id) {
1633
1895
  dispatch({
1634
1896
  type: ActionTypes.SelectSpecialty,
1635
1897
  payload: defaultSpecialty,
1636
1898
  });
1637
1899
  }
1638
- }, [initSpecialty, state.selectedSpecialty]);
1900
+ }, [initSpecialty, slugs.SPECIALTIES, t]);
1639
1901
  React.useEffect(() => {
1640
1902
  fetchAllSpecialties();
1641
1903
  }, []);
@@ -1654,25 +1916,62 @@ onChangeLocation, }) => {
1654
1916
  }, [navigateTo]);
1655
1917
  React.useEffect(() => {
1656
1918
  fetchSearchResults(state.searchKeywords, state, currentTab, clientSlug, true);
1657
- }, [selectedLocation, selectedSpecialty, currentTab]);
1658
- return (React__default["default"].createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1659
- React__default["default"].createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1660
- React__default["default"].createElement(StyleWrapperContainer, { className: "booking-search-container" },
1661
- React__default["default"].createElement(StyleSearchInputContainer, null,
1662
- React__default["default"].createElement(StyleSearchContent, { className: "booking-search-content" },
1663
- React__default["default"].createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1664
- React__default["default"].createElement(core.Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1665
- currentTab !== 'specialty' && (React__default["default"].createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1666
- React__default["default"].createElement(SearchInputs, { type: currentTab, isMobile: isMobile, state: state, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, initalSearchValue: initialSearchValue, focusSearchInput: focusSearchInput, onEnterSearch: onClickSearchByKeyword, typeInformation: typeInformation, trackingAttributes: gaTrackingSearchBar, isLoading: isLoadingSearchResults, hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab, clientSlug: clientSlug }),
1667
- React__default["default"].createElement(core.Button, { size: isMobile ? 'md' : 'lg', color: "#2D87F3", fullWidth: isMobile, variant: "filled", onClick: onClickSearchByKeyword, styles: {
1668
- root: {
1669
- height: isMobile ? '40px' : '48px',
1670
- },
1671
- } }, t('booking.searchBar.searchButton'))),
1672
- !hidePopularSearchKeys &&
1673
- currentTab !== 'specialty' &&
1674
- state.popularKeys.length > 0 && (React__default["default"].createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1675
- currentTab === 'specialty' && focusedSpecialty === 'search' && (React__default["default"].createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))));
1919
+ }, [currentTab]);
1920
+ React.useEffect(() => {
1921
+ if (opened && isMobile) {
1922
+ const timer = setTimeout(() => {
1923
+ var _a;
1924
+ (_a = searchInputMobileRef.current) === null || _a === void 0 ? void 0 : _a.focus();
1925
+ }, 150);
1926
+ return () => clearTimeout(timer);
1927
+ }
1928
+ }, [opened, isMobile]);
1929
+ const searchInputsProps = {
1930
+ type: currentTab,
1931
+ isMobile: isMobile,
1932
+ state: state,
1933
+ dispatch: dispatch,
1934
+ debouncedFetchSearchResults: debouncedFetchSearchResults,
1935
+ initalSearchValue: initialSearchValue,
1936
+ // focusSearchInput: focusSearchInput,
1937
+ onEnterSearch: onClickSearchByKeyword,
1938
+ typeInformation: typeInformation,
1939
+ trackingAttributes: gaTrackingSearchBar,
1940
+ isLoading: isLoadingSearchResults,
1941
+ hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab,
1942
+ clientSlug: clientSlug,
1943
+ triggerSearchWhenChangeFilter,
1944
+ onChangeSpecialty: (specialty) => triggerSearchWhenChangeFilter &&
1945
+ onClickSearchByKeyword({ specialtyId: specialty.id }),
1946
+ };
1947
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
1948
+ React__default["default"].createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1949
+ React__default["default"].createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1950
+ React__default["default"].createElement(StyleWrapperContainer, { className: "booking-search-container" },
1951
+ React__default["default"].createElement(StyleSearchInputContainer, null,
1952
+ React__default["default"].createElement(StyleSearchContent, { className: "booking-search-content" },
1953
+ React__default["default"].createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1954
+ React__default["default"].createElement(core.Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1955
+ currentTab !== 'specialty' && (React__default["default"].createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1956
+ React__default["default"].createElement(SearchInputs, Object.assign({}, searchInputsProps, { ref: searchInputDesktopRef, onFocusInput: () => isMobile && open() })),
1957
+ React__default["default"].createElement(index$4.Button, { size: isMobile ? 'md' : 'lg', fullWidth: isMobile, variant: "primary", onClick: () => onClickSearchByKeyword(), styles: {
1958
+ root: {
1959
+ height: isMobile ? '40px' : '48px',
1960
+ },
1961
+ } }, t('booking.searchBar.searchButton'))),
1962
+ !hidePopularSearchKeys &&
1963
+ currentTab !== 'specialty' &&
1964
+ state.popularKeys.length > 0 && (React__default["default"].createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1965
+ currentTab === 'specialty' &&
1966
+ focusedSpecialty === 'search' && (React__default["default"].createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))),
1967
+ isMobile && (React__default["default"].createElement(ModalSearchResult, { keepMounted: true, opened: opened, onClose: close, closeModal: close, searchInputEle: React__default["default"].createElement(core.Flex, { align: 'center', gap: 8 },
1968
+ React__default["default"].createElement(SearchInputs, Object.assign({}, searchInputsProps, { onlyShowSearchBox: true, ref: searchInputMobileRef })),
1969
+ React__default["default"].createElement(index$4.Button, { variant: "primary", leftIcon: React__default["default"].createElement(core$1.Search, { size: 20, color: '#fff' }), onClick: () => onClickSearchByKeyword() })) },
1970
+ React__default["default"].createElement(core.Box, { sx: {
1971
+ marginLeft: -16,
1972
+ marginRight: -16,
1973
+ } },
1974
+ React__default["default"].createElement(SearchResultContent, { type: currentTab, state: state, dispatch: dispatch, isLoading: isLoadingSearchResults, typeInformation: typeInformation, clientSlug: clientSlug }))))));
1676
1975
  };
1677
1976
 
1678
1977
  exports.BookingSearchBarV2 = BookingSearchBarV2;