@hhgtech/hhg-components 1.29.570 → 1.29.571
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.
- package/build/{InputDate-9ebd52ca.js → InputDate-0134dd5e.js} +5 -5
- package/build/{LastPeriod-00b0b47b.js → LastPeriod-90b7a643.js} +1 -1
- package/build/{MobileBottomNavigationIcon-f98b485b.js → MobileBottomNavigationIcon-8588296e.js} +3 -3
- package/build/{SiteWideBanner-fedd8edc.js → SiteWideBanner-d2280262.js} +13 -13
- package/build/{Spinner-18c90fe5.js → Spinner-5a75d294.js} +1 -1
- package/build/{WhatsApp-061da51d.js → WhatsApp-a43f44ed.js} +1 -1
- package/build/adapters.js +20 -20
- package/build/atoms.js +53 -53
- package/build/babyGrowth.js +86 -86
- package/build/cache.js +2 -2
- package/build/care.js +21 -21
- package/build/careBookingSearchBar.js +13 -13
- package/build/careBookingSearchBarV2.js +18 -18
- package/build/components.js +111 -111
- package/build/{constants-b992173e.js → constants-7dddc573.js} +1 -1
- package/build/{constants-25b9497f.js → constants-b42031aa.js} +1 -1
- package/build/constants.js +2 -2
- package/build/constantsRiskScreener.js +1 -1
- package/build/constantsSite.js +1 -1
- package/build/{core-c6026899.js → core-ad058e56.js} +1 -1
- package/build/{dataTransform-02a58a20.js → dataTransform-d94f6406.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-e6e9e3fb.js → editor-2996d0d7.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
- package/build/embeddedHeathToolCards_babyPoop.js +21 -21
- package/build/embeddedHeathToolCards_babyVaccine.js +25 -25
- package/build/embeddedHeathToolCards_bmi_bmi.js +28 -28
- package/build/embeddedHeathToolCards_bmrBmr.js +28 -28
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +25 -25
- package/build/embeddedHeathToolCards_helpers.js +2 -2
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +25 -25
- package/build/embeddedHeathToolCards_pwg_pwg.js +27 -27
- package/build/embeddedHeathToolCards_targetHeartRate.js +30 -30
- package/build/esm/{InputDate-86aca9f1.js → InputDate-ffd11a12.js} +5 -5
- package/build/esm/{LastPeriod-0fa55988.js → LastPeriod-28da644c.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-e8c6487b.js → MobileBottomNavigationIcon-4209ff02.js} +3 -3
- package/build/esm/{SiteWideBanner-584af462.js → SiteWideBanner-2eb85e03.js} +13 -13
- package/build/esm/{Spinner-bf43cb76.js → Spinner-523f63e7.js} +1 -1
- package/build/esm/{WhatsApp-632c14e2.js → WhatsApp-d5000d12.js} +1 -1
- package/build/esm/adapters.js +20 -20
- package/build/esm/atoms.js +53 -53
- package/build/esm/babyGrowth.js +86 -86
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +21 -21
- package/build/esm/careBookingSearchBar.js +13 -13
- package/build/esm/careBookingSearchBarV2.js +18 -18
- package/build/esm/components.js +111 -111
- package/build/esm/{constants-bc837908.js → constants-308ecd2d.js} +1 -1
- package/build/esm/{constants-2e7ee0b3.js → constants-a91494b0.js} +1 -1
- package/build/esm/constants.js +2 -2
- package/build/esm/constantsRiskScreener.js +1 -1
- package/build/esm/constantsSite.js +1 -1
- package/build/esm/{core-b5c06568.js → core-e35878d8.js} +1 -1
- package/build/esm/{dataTransform-20f020cf.js → dataTransform-daef1aed.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-af36c0ee.js → editor-9b8ee830.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
- package/build/esm/embeddedHeathToolCards_babyPoop.js +21 -21
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +25 -25
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +28 -28
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +28 -28
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +25 -25
- package/build/esm/embeddedHeathToolCards_helpers.js +2 -2
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +25 -25
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -27
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +30 -30
- package/build/esm/footer.js +22 -22
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{healthTools-2375f3d7.js → healthTools-8322a02a.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +19 -19
- package/build/esm/healthToolsForm.js +38 -38
- package/build/esm/{helpers-13942d8c.js → helpers-8ee4a495.js} +1 -1
- package/build/esm/hooks.js +14 -14
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-4a538dfc.js → index-0361d336.js} +7 -7
- package/build/esm/{index-8878ebce.js → index-050c541f.js} +4 -4
- package/build/esm/{index-759ff54d.js → index-086dc0bd.js} +2 -2
- package/build/esm/{index-79b6aa9a.js → index-0ba9b38e.js} +13 -13
- package/build/esm/{index-672802ff.js → index-0de70a9d.js} +5 -5
- package/build/esm/{index-21bd6de5.js → index-151773f6.js} +4 -4
- package/build/esm/{index-1f84117b.js → index-156c9e1f.js} +7 -7
- package/build/esm/{index-3bd6d1a3.js → index-158a340a.js} +2 -2
- package/build/esm/{index-cff8f873.js → index-1717678a.js} +1 -1
- package/build/esm/{index-b09d9b2e.js → index-1a11f7cd.js} +6 -6
- package/build/esm/{index-b3cddca0.js → index-27dca3c9.js} +11 -11
- package/build/esm/{index-3cd77063.js → index-29f811a1.js} +13 -13
- package/build/esm/{index-d8c33a6a.js → index-2aeee139.js} +2 -2
- package/build/esm/{index-9acc34a7.js → index-2da91d34.js} +3 -3
- package/build/esm/{index-dc8f650b.js → index-2f146a12.js} +2 -2
- package/build/esm/{index-09409879.js → index-3c5a01e5.js} +3 -3
- package/build/esm/{index-4ff88c7c.js → index-43ee1b10.js} +2 -2
- package/build/esm/{index-56d1537a.js → index-4563845f.js} +18 -18
- package/build/esm/{index-a9accacf.js → index-4667a740.js} +9 -9
- package/build/esm/index-49267fc4.js +50 -0
- package/build/esm/{index-8ea55c3a.js → index-4d819c9d.js} +16 -16
- package/build/esm/{index-0db64b4f.js → index-4d9dba0d.js} +2 -2
- package/build/esm/{index-6ffe8a54.js → index-4ed22cc9.js} +1 -1
- package/build/esm/{index-674ad3f8.js → index-504e1745.js} +16 -16
- package/build/esm/{index-b7f9d0bb.js → index-5425f080.js} +31 -31
- package/build/esm/{index-4726d97a.js → index-584578bb.js} +15 -15
- package/build/esm/{index-98d2d8a9.js → index-5bbf8614.js} +22 -22
- package/build/esm/{index-fa37e9df.js → index-6623864e.js} +5 -5
- package/build/esm/{index-a82b9bdc.js → index-66c68abb.js} +1 -1
- package/build/esm/{index-dd7c098e.js → index-684b7a29.js} +2 -2
- package/build/esm/{index-d52d4fc9.js → index-68c547e5.js} +16 -16
- package/build/esm/{index-4c5be22c.js → index-68e90810.js} +1 -1
- package/build/esm/{index-df2bf85e.js → index-69e4d6d7.js} +24 -24
- package/build/esm/{index-a83d2663.js → index-7082ab0c.js} +17 -17
- package/build/esm/{index-0948e312.js → index-71ae5380.js} +2 -2
- package/build/esm/{index-6ac1e86b.js → index-7336a83b.js} +17 -17
- package/build/esm/{index-17856e46.js → index-76347b6a.js} +3 -3
- package/build/esm/{index-308e99f5.js → index-7b160358.js} +2 -2
- package/build/esm/{index-4fb66ae3.js → index-7defd1a5.js} +3 -3
- package/build/esm/{index-ac17facc.js → index-7e821b91.js} +5 -5
- package/build/esm/{index-e1aa2251.js → index-8085df5b.js} +3 -3
- package/build/esm/{index-ca5f175f.js → index-80e46dbb.js} +6 -6
- package/build/esm/{index-d991925d.js → index-83ddbe1d.js} +31 -31
- package/build/esm/{index-1164f7d4.js → index-8ffb093b.js} +1 -1
- package/build/esm/{index-e7bcd704.js → index-90529afc.js} +2 -2
- package/build/esm/{index-3e9784ab.js → index-90e477ac.js} +1 -1
- package/build/esm/{index-d4975c2a.js → index-91ae2b89.js} +2 -2
- package/build/esm/{index-aac41a30.js → index-934673fa.js} +3 -3
- package/build/esm/{index-d491a5d8.js → index-9783d53c.js} +2 -2
- package/build/esm/{index-f522da5c.js → index-9a0c4dd7.js} +19 -19
- package/build/esm/{index-5237dddb.js → index-9f962532.js} +3 -3
- package/build/esm/{index-33c0d916.js → index-a2ad5836.js} +17 -17
- package/build/esm/{index-690ee4c3.js → index-a6790a1c.js} +2 -2
- package/build/esm/{index-86d17c65.js → index-accb4f5a.js} +3 -3
- package/build/esm/{index-bdbd4403.js → index-ad6c72cf.js} +17 -17
- package/build/esm/{index-1002fab9.js → index-b76d56a0.js} +14 -14
- package/build/esm/{index-0a262faf.js → index-c61b769a.js} +2 -2
- package/build/esm/{index-83ce36b7.js → index-c8565af0.js} +17 -17
- package/build/esm/{index-c98bfa61.js → index-caddfaf0.js} +14 -14
- package/build/esm/{index-1486a6da.js → index-d1c8e33b.js} +20 -20
- package/build/esm/{index-72cc3c82.js → index-d74b7b05.js} +7 -7
- package/build/esm/{index-3895f110.js → index-d83cc816.js} +25 -25
- package/build/esm/{index-a488b4e6.js → index-dace6225.js} +2 -2
- package/build/esm/{index-b0564176.js → index-db87297a.js} +3 -3
- package/build/esm/{index-2e49b6fc.js → index-de8e3e09.js} +2 -2
- package/build/esm/{index-436b58cd.js → index-df4752f4.js} +1 -1
- package/build/esm/{index-b9c6f372.js → index-e5ca601b.js} +6 -6
- package/build/esm/{index-c2dd68b0.js → index-ea0a70bd.js} +2 -2
- package/build/esm/{index-7c58eb2b.js → index-ebe9249d.js} +11 -11
- package/build/esm/{index-22745456.js → index-f0eca3e4.js} +2 -2
- package/build/esm/{index-86256531.js → index-f2da64e0.js} +3 -3
- package/build/esm/{index-c6901973.js → index-f81c49c4.js} +12 -12
- package/build/esm/{index-c28b5511.js → index-fd5737f6.js} +34 -34
- package/build/esm/{index-6bb00382.js → index-fe6ba4b5.js} +21 -21
- package/build/esm/index.js +131 -131
- package/build/esm/{labelSorting-6693dc3b.js → labelSorting-a04db22a.js} +4 -4
- package/build/esm/lead.js +38 -38
- package/build/esm/leadRecaptcha.js +2 -2
- package/build/esm/{logoIcon-26941868.js → logoIcon-afaaecdc.js} +2 -2
- package/build/esm/mantine.js +27 -27
- package/build/esm/misc.js +17 -17
- package/build/esm/miscGetDynamicHealthTool.js +3 -3
- package/build/esm/miscGetSocialList.js +6 -6
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +85 -85
- package/build/esm/moleculesArticleCard.js +5 -5
- package/build/esm/moleculesArticleCardV2.js +17 -17
- package/build/esm/navigation.js +50 -50
- package/build/esm/navigationLogoutPopup.js +10 -10
- package/build/esm/navigationProfileButton.js +26 -26
- package/build/esm/onboardingV2.js +30 -30
- package/build/esm/organisms.js +63 -63
- package/build/esm/{post-6b391944.js → post-ad18b4ce.js} +2 -2
- package/build/esm/profileNavigation.js +19 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -22
- package/build/esm/{recaptchaV3-34684488.js → recaptchaV3-4fbe40dd.js} +1 -1
- package/build/esm/ssoV2.js +31 -31
- package/build/esm/{store-6afbb89f.js → store-fe2e5bb5.js} +3 -3
- package/build/esm/subot/captcha/index.d.ts +10 -7
- package/build/esm/subot.js +44 -91
- package/build/esm/subotRecaptcha.d.ts +1 -0
- package/build/esm/subotRecaptcha.js +3 -0
- package/build/esm/surveyOrPremiumBanner.js +33 -33
- package/build/esm/surveyQuestionCard.js +11 -11
- package/build/esm/{surveyThankyouCard-1b913b92.js → surveyThankyouCard-9098a630.js} +5 -5
- package/build/esm/together.js +57 -57
- package/build/esm/togetherApiUtils.js +6 -6
- package/build/esm/togetherAtoms.js +30 -30
- package/build/esm/togetherComponentGlobalContext.js +6 -6
- package/build/esm/togetherMolecules.js +51 -51
- package/build/esm/togetherMoleculesCardAuthor.js +28 -28
- package/build/esm/togetherMoleculesPostImagePreview.js +13 -13
- package/build/esm/togetherMoleculesProfileDetail.js +39 -39
- package/build/esm/togetherOrganisms.js +50 -50
- package/build/esm/togetherRichTextEditor.js +20 -20
- package/build/esm/togetherShareBox.js +12 -12
- package/build/esm/{transform-3992daea.js → transform-2ef55c90.js} +34 -34
- package/build/esm/{translationsProvider-0a7813b1.js → translationsProvider-232ddebf.js} +1 -1
- package/build/esm/{treePopoverMenu-2b0332f7.js → treePopoverMenu-91080eb1.js} +18 -18
- package/build/esm/{types-be272abe.js → types-fb96b294.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCartCareService-cefb1029.js → useCartCareService-4a770813.js} +1 -1
- package/build/esm/{useHealthToolCache-c49acdf1.js → useHealthToolCache-4841f479.js} +1 -1
- package/build/esm/{usePhoneValidator-784fe823.js → usePhoneValidator-6cab11f6.js} +4 -4
- package/build/esm/{usePlacesAutocomplete-0617aed7.js → usePlacesAutocomplete-883b4070.js} +1 -1
- package/build/esm/{useResolvedCaptureUrls-054899bd.js → useResolvedCaptureUrls-2091521f.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-a15aaf15.js → utils-012ed628.js} +2 -2
- package/build/esm/{utils-51368802.js → utils-089b6a03.js} +1 -1
- package/build/esm/{utils-f1f4f7e8.js → utils-46eff943.js} +5 -5
- package/build/esm/{utils-07ea3389.js → utils-4efb691a.js} +4 -4
- package/build/esm/{utils-dc631f93.js → utils-ca8bcf48.js} +4 -4
- package/build/esm/vaccination.js +22 -22
- package/build/footer.js +22 -22
- package/build/gAssets.js +1 -1
- package/build/{healthTools-2ff3afde.js → healthTools-8fa3f011.js} +1 -1
- package/build/healthToolsCardWrapper.js +19 -19
- package/build/healthToolsForm.js +38 -38
- package/build/{helpers-7c1f5ba2.js → helpers-e34b2001.js} +1 -1
- package/build/hooks.js +14 -14
- package/build/i18n.js +2 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-234d78bb.js → index-011a3f7f.js} +4 -4
- package/build/{index-967076ad.js → index-02fad386.js} +17 -17
- package/build/{index-b5099834.js → index-05b3dad0.js} +2 -2
- package/build/{index-594475ad.js → index-070b6035.js} +21 -21
- package/build/{index-ea09e421.js → index-0a21a617.js} +13 -13
- package/build/{index-74a39817.js → index-0c7ea489.js} +3 -3
- package/build/{index-96c50c61.js → index-0eb45be2.js} +2 -2
- package/build/{index-807fd0e4.js → index-126b7cbb.js} +22 -22
- package/build/{index-0a0cd148.js → index-14eaea73.js} +5 -5
- package/build/{index-7ff1ac74.js → index-18173701.js} +16 -16
- package/build/{index-c4028ca0.js → index-1c3c73b3.js} +2 -2
- package/build/{index-51d01acc.js → index-25ff977f.js} +11 -11
- package/build/{index-93286eef.js → index-2a4e3ca8.js} +2 -2
- package/build/{index-51e0829a.js → index-3264d749.js} +7 -7
- package/build/{index-6ce7e646.js → index-3590355e.js} +6 -6
- package/build/{index-55dac945.js → index-3dc7ea0d.js} +3 -3
- package/build/{index-32d9e76c.js → index-3de4bbbc.js} +1 -1
- package/build/{index-a0ca8856.js → index-3f4588f8.js} +20 -20
- package/build/{index-25c6d5be.js → index-47452f5c.js} +25 -25
- package/build/{index-ba0188a4.js → index-4c3b9332.js} +11 -11
- package/build/{index-862570e8.js → index-4d0d3996.js} +17 -17
- package/build/{index-881501b2.js → index-4eb39d6c.js} +15 -15
- package/build/{index-93cfde25.js → index-50df659f.js} +19 -19
- package/build/{index-70903c8e.js → index-510e5a04.js} +2 -2
- package/build/{index-a2e9b70a.js → index-5225e642.js} +1 -1
- package/build/{index-5d9bbd65.js → index-53d8afe7.js} +2 -2
- package/build/{index-ba967ab3.js → index-5616e03e.js} +1 -1
- package/build/{index-657ed4d4.js → index-5981e67b.js} +2 -2
- package/build/{index-58ad97c9.js → index-5c27cee7.js} +3 -3
- package/build/{index-4187e37c.js → index-5eb3bbb7.js} +3 -3
- package/build/{index-b7ce6c84.js → index-60823b67.js} +3 -3
- package/build/{index-6cd51190.js → index-60d0ca79.js} +1 -1
- package/build/{index-2955fa8d.js → index-61a444d0.js} +9 -9
- package/build/{index-3511e1af.js → index-62ef0d02.js} +16 -16
- package/build/{index-9e2d57d8.js → index-640e1ba8.js} +4 -4
- package/build/{index-5ae0a209.js → index-686493ef.js} +16 -16
- package/build/{index-19bb7271.js → index-74197cc5.js} +31 -31
- package/build/{index-669bebfa.js → index-78a66f78.js} +3 -3
- package/build/{index-6c423f35.js → index-7c0cfac0.js} +14 -14
- package/build/{index-44993a1e.js → index-80be1c3d.js} +2 -2
- package/build/{index-5c94c387.js → index-829f883b.js} +31 -31
- package/build/{index-60bd1fba.js → index-96bf5540.js} +3 -3
- package/build/{index-4cdc2006.js → index-96e5cdec.js} +6 -6
- package/build/{index-f85a4de0.js → index-9907273a.js} +14 -14
- package/build/{index-3230baad.js → index-9dbadd98.js} +2 -2
- package/build/{index-77a042e1.js → index-a669afd2.js} +12 -12
- package/build/{index-e024ff35.js → index-a6ab7f9e.js} +5 -5
- package/build/{index-4157eca3.js → index-a7c0ac1b.js} +2 -2
- package/build/{index-caeeb401.js → index-ab3d2b18.js} +6 -6
- package/build/{index-42f7db47.js → index-b0ea73b9.js} +3 -3
- package/build/{index-4dd08aab.js → index-b161d38e.js} +3 -3
- package/build/{index-1c1dcc52.js → index-ba3a95c9.js} +1 -1
- package/build/{index-ebd0ec02.js → index-bc6ccfac.js} +3 -3
- package/build/{index-b3f5d72d.js → index-bf170778.js} +2 -2
- package/build/{index-dd9b1412.js → index-c19b9819.js} +1 -1
- package/build/{index-0cb355e9.js → index-c1a572b4.js} +2 -2
- package/build/{index-33cdb702.js → index-c3a0064c.js} +17 -17
- package/build/{index-c1b212c8.js → index-cf936f1d.js} +5 -5
- package/build/{index-02a3adbc.js → index-cfb90197.js} +2 -2
- package/build/{index-4f69a48e.js → index-d39e79ff.js} +2 -2
- package/build/{index-2ac112e5.js → index-d600e60a.js} +34 -34
- package/build/{index-d8ef9967.js → index-db8dda61.js} +2 -2
- package/build/{index-177681f5.js → index-dedac172.js} +18 -18
- package/build/{index-ec6c4d5e.js → index-dfa662c2.js} +17 -17
- package/build/{index-83924b73.js → index-e15b3ce0.js} +2 -2
- package/build/{index-7f36de72.js → index-e34911df.js} +2 -2
- package/build/{index-75e14772.js → index-e6bb6882.js} +13 -13
- package/build/{index-7e25b4f3.js → index-e6c06a43.js} +7 -7
- package/build/index-e7d6d098.js +56 -0
- package/build/{index-ebb33f1f.js → index-e8432df1.js} +24 -24
- package/build/{index-ae158063.js → index-ecbe0180.js} +7 -7
- package/build/{index-3ea0608f.js → index-ed16d38c.js} +1 -1
- package/build/{index-548d2ac1.js → index-ef7c27ce.js} +2 -2
- package/build/{index-59658a1f.js → index-f40e77cf.js} +17 -17
- package/build/index.js +131 -131
- package/build/{labelSorting-c4df0590.js → labelSorting-129a0d31.js} +4 -4
- package/build/lead.js +38 -38
- package/build/leadRecaptcha.js +2 -2
- package/build/{logoIcon-55134dc4.js → logoIcon-4ce69251.js} +2 -2
- package/build/mantine.js +25 -25
- package/build/misc.js +17 -17
- package/build/miscGetDynamicHealthTool.js +3 -3
- package/build/miscGetSocialList.js +6 -6
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +85 -85
- package/build/moleculesArticleCard.js +5 -5
- package/build/moleculesArticleCardV2.js +17 -17
- package/build/navigation.js +50 -50
- package/build/navigationLogoutPopup.js +10 -10
- package/build/navigationProfileButton.js +26 -26
- package/build/onboardingV2.js +29 -29
- package/build/organisms.js +63 -63
- package/build/{post-ae6cd5df.js → post-bc8a2549.js} +2 -2
- package/build/profileNavigation.js +19 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -22
- package/build/{recaptchaV3-01aeba64.js → recaptchaV3-8edb6116.js} +1 -1
- package/build/ssoV2.js +29 -29
- package/build/{store-738f12a2.js → store-b1bffd3b.js} +3 -3
- package/build/subot/captcha/index.d.ts +10 -7
- package/build/subot.js +405 -453
- package/build/subotRecaptcha.d.ts +1 -0
- package/build/subotRecaptcha.js +15 -0
- package/build/surveyOrPremiumBanner.js +33 -33
- package/build/surveyQuestionCard.js +11 -11
- package/build/{surveyThankyouCard-c4cc9785.js → surveyThankyouCard-748dffa8.js} +5 -5
- package/build/together.js +57 -57
- package/build/togetherApiUtils.js +6 -6
- package/build/togetherAtoms.js +30 -30
- package/build/togetherComponentGlobalContext.js +6 -6
- package/build/togetherMolecules.js +51 -51
- package/build/togetherMoleculesCardAuthor.js +28 -28
- package/build/togetherMoleculesPostImagePreview.js +13 -13
- package/build/togetherMoleculesProfileDetail.js +39 -39
- package/build/togetherOrganisms.js +50 -50
- package/build/togetherRichTextEditor.js +20 -20
- package/build/togetherShareBox.js +12 -12
- package/build/{transform-bdface58.js → transform-560787f5.js} +34 -34
- package/build/{translationsProvider-8b5cb380.js → translationsProvider-16c02274.js} +1 -1
- package/build/{treePopoverMenu-7978e490.js → treePopoverMenu-dbd0f249.js} +18 -18
- package/build/{types-51ba8d5f.js → types-b18d99dc.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCartCareService-12a23cae.js → useCartCareService-64fdca49.js} +1 -1
- package/build/{useHealthToolCache-a14d6044.js → useHealthToolCache-a7b919b6.js} +1 -1
- package/build/{usePhoneValidator-a940ee56.js → usePhoneValidator-9980c4ae.js} +4 -4
- package/build/{usePlacesAutocomplete-b97e2338.js → usePlacesAutocomplete-d8d78660.js} +1 -1
- package/build/{useResolvedCaptureUrls-b4a7e19a.js → useResolvedCaptureUrls-f5c91aa6.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-c65ca307.js → utils-0e77cf80.js} +1 -1
- package/build/{utils-200a6650.js → utils-63cdcd4a.js} +5 -5
- package/build/{utils-bc439355.js → utils-a8769c9b.js} +2 -2
- package/build/{utils-655fcf34.js → utils-e6b46892.js} +4 -4
- package/build/{utils-39d3f595.js → utils-f03c37c5.js} +4 -4
- package/build/vaccination.js +22 -22
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-7b48264a.js → BMI_BOYS.percentile.monthly-e54d98e1.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-129bbda2.js → BMI_BOYS.percentile.weekly-a221adc7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-5fb02717.js → BMI_BOYS.percentile.yearly-f02a31e1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-0b5978f6.js → BMI_BOYS.zscore.monthly-183b03a1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-711e040a.js → BMI_BOYS.zscore.weekly-c4e0960e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-39ce689a.js → BMI_BOYS.zscore.yearly-105b654d.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-8916f9e9.js → BMI_GIRLS.percentile.monthly-15cec195.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-a5d8d437.js → BMI_GIRLS.percentile.weekly-3e7861ab.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-7db6e19a.js → BMI_GIRLS.percentile.yearly-d606170e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-76f74077.js → BMI_GIRLS.zscore.monthly-883b9904.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-5b8ec1fe.js → BMI_GIRLS.zscore.weekly-9a98e686.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-19b7d20d.js → BMI_GIRLS.zscore.yearly-324819c9.js} +0 -0
- /package/build/{ChevronDown-7aa5239a.js → ChevronDown-4013e2e0.js} +0 -0
- /package/build/{Google-e4c5b102.js → Google-18197f9b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-5f7ab088.js → HEAD CIRCUM_BOYS.percentile.monthly-ea6d6f73.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-4b0643ff.js → HEAD CIRCUM_BOYS.percentile.weekly-b587645c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-38491538.js → HEAD CIRCUM_BOYS.percentile.yearly-57852ab4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-06121ec5.js → HEAD CIRCUM_BOYS.zscore.monthly-1be7cc66.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-14419797.js → HEAD CIRCUM_BOYS.zscore.weekly-cd9ac641.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-2402f1cd.js → HEAD CIRCUM_BOYS.zscore.yearly-1a54c0f8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-e10b9aa6.js → HEAD CIRCUM_GIRLS.percentile.monthly-c4e1be87.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-dfd42fbd.js → HEAD CIRCUM_GIRLS.percentile.weekly-4d7846d2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-570c5749.js → HEAD CIRCUM_GIRLS.percentile.yearly-fea5082d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-1a171872.js → HEAD CIRCUM_GIRLS.zscore.monthly-f4816877.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-ddfe0d95.js → HEAD CIRCUM_GIRLS.zscore.weekly-4c7ffd79.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-7f73fe04.js → HEAD CIRCUM_GIRLS.zscore.yearly-1f20fcea.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-70f949ac.js → HEIGHT_BOYS.percentile.monthly-a4a49014.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-c30b1584.js → HEIGHT_BOYS.percentile.weekly-e871605b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-1d674e57.js → HEIGHT_BOYS.percentile.yearly-3dbf87a0.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-7d9f3790.js → HEIGHT_BOYS.zscore.monthly-d3a6df4e.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-32d669bf.js → HEIGHT_BOYS.zscore.weekly-bce25d44.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-a3d14050.js → HEIGHT_BOYS.zscore.yearly-5849f5ca.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-31599c31.js → HEIGHT_GIRLS.percentile.monthly-68349ce8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-65421db3.js → HEIGHT_GIRLS.percentile.weekly-485b1fd7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-61c1ec90.js → HEIGHT_GIRLS.percentile.yearly-f7659517.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-5c4d0cc1.js → HEIGHT_GIRLS.zscore.monthly-fd14255b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-703e5f92.js → HEIGHT_GIRLS.zscore.weekly-50185872.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-4ec4aece.js → HEIGHT_GIRLS.zscore.yearly-56bf62cf.js} +0 -0
- /package/build/{Visible-3589ecdf.js → Visible-040266bc.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-3fa2caaa.js → WEIGHT_BOYS.percentile.monthly-886c4ed1.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-3f3ab6a6.js → WEIGHT_BOYS.percentile.weekly-b4cef881.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-0e8b97fd.js → WEIGHT_BOYS.percentile.yearly-947b2b05.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-e95a73e4.js → WEIGHT_BOYS.zscore.monthly-75c53b99.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-9fa69332.js → WEIGHT_BOYS.zscore.weekly-b495e6ee.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-a3b3fd37.js → WEIGHT_BOYS.zscore.yearly-2931703b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-a60581dd.js → WEIGHT_GIRLS.percentile.monthly-b428286b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-ce7d59e5.js → WEIGHT_GIRLS.percentile.weekly-79c7cabc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-6c2dcb5b.js → WEIGHT_GIRLS.percentile.yearly-3abd98fc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-ae847d4b.js → WEIGHT_GIRLS.zscore.monthly-c6207e3c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-8fcb8eee.js → WEIGHT_GIRLS.zscore.weekly-df3bf744.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-904f1266.js → WEIGHT_GIRLS.zscore.yearly-9dd0314c.js} +0 -0
- /package/build/{ageGenerate-cb2b7ad3.js → ageGenerate-4100cf2e.js} +0 -0
- /package/build/{animation-116218a5.js → animation-ef36d4d3.js} +0 -0
- /package/build/{appearance-c75af09e.js → appearance-60876e6f.js} +0 -0
- /package/build/{constants-06c26920.js → constants-06a345cc.js} +0 -0
- /package/build/{constants-82549a98.js → constants-80757d67.js} +0 -0
- /package/build/{constants-2b73f764.js → constants-8cfee564.js} +0 -0
- /package/build/{context-b791251e.js → context-792af735.js} +0 -0
- /package/build/{dataTransform-15d1dbe9.js → dataTransform-42307b87.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-3ba45a7b.js → BMI_BOYS.percentile.monthly-2f0ecf77.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-4f198fff.js → BMI_BOYS.percentile.weekly-c8298e61.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-e1c40939.js → BMI_BOYS.percentile.yearly-3c2a67e2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-b723f477.js → BMI_BOYS.zscore.monthly-4681ade6.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-76872082.js → BMI_BOYS.zscore.weekly-def5dc79.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-4c65f9b4.js → BMI_BOYS.zscore.yearly-a68510a6.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-9acc6205.js → BMI_GIRLS.percentile.monthly-61ec84b2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-f59f14ac.js → BMI_GIRLS.percentile.weekly-161fc9e0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-0e3f0688.js → BMI_GIRLS.percentile.yearly-5a8ecd60.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-b4c2b4d3.js → BMI_GIRLS.zscore.monthly-c22a15c5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-a96f7858.js → BMI_GIRLS.zscore.weekly-085fb855.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-a0416fdf.js → BMI_GIRLS.zscore.yearly-bd56f109.js} +0 -0
- /package/build/esm/{ChevronDown-7abc9558.js → ChevronDown-7f509fcb.js} +0 -0
- /package/build/esm/{Google-fbfa5959.js → Google-cb61c6b4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-175d0f0a.js → HEAD CIRCUM_BOYS.percentile.monthly-131a1848.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-6c938980.js → HEAD CIRCUM_BOYS.percentile.weekly-0e3921df.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-2d8e62fd.js → HEAD CIRCUM_BOYS.percentile.yearly-f7ffd75d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-ca7a5051.js → HEAD CIRCUM_BOYS.zscore.monthly-82eb02e8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-65be2ed7.js → HEAD CIRCUM_BOYS.zscore.weekly-3371617e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-c8ba092c.js → HEAD CIRCUM_BOYS.zscore.yearly-94e09853.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-1a1aaf27.js → HEAD CIRCUM_GIRLS.percentile.monthly-faf9e3e6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-e67f1d9c.js → HEAD CIRCUM_GIRLS.percentile.weekly-e9e6e039.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-07489c1f.js → HEAD CIRCUM_GIRLS.percentile.yearly-41bfb385.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-d38a69f2.js → HEAD CIRCUM_GIRLS.zscore.monthly-1164cefd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-659f780b.js → HEAD CIRCUM_GIRLS.zscore.weekly-3bbfc22e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-1b298591.js → HEAD CIRCUM_GIRLS.zscore.yearly-4f133f56.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-b723062c.js → HEIGHT_BOYS.percentile.monthly-94249176.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-04ed64cc.js → HEIGHT_BOYS.percentile.weekly-b67de6ce.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-1c998863.js → HEIGHT_BOYS.percentile.yearly-a42c611a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-c168ec05.js → HEIGHT_BOYS.zscore.monthly-2598ff5d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-02b9f313.js → HEIGHT_BOYS.zscore.weekly-28f1bf9a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-063b9a59.js → HEIGHT_BOYS.zscore.yearly-43e2f566.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-fc2bc0f7.js → HEIGHT_GIRLS.percentile.monthly-61462185.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-aaa0e151.js → HEIGHT_GIRLS.percentile.weekly-3d3f2f42.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-5d318320.js → HEIGHT_GIRLS.percentile.yearly-57493d41.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-37dbee5f.js → HEIGHT_GIRLS.zscore.monthly-cba3a32d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-cb6f65f3.js → HEIGHT_GIRLS.zscore.weekly-755e353d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-41f5ca61.js → HEIGHT_GIRLS.zscore.yearly-be1a086a.js} +0 -0
- /package/build/esm/{Visible-f8dd9574.js → Visible-5fb8ff44.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-aa54e3a0.js → WEIGHT_BOYS.percentile.monthly-63a86f3d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-088b794b.js → WEIGHT_BOYS.percentile.weekly-1de8104e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-213bb8ce.js → WEIGHT_BOYS.percentile.yearly-1698787d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-a73caed2.js → WEIGHT_BOYS.zscore.monthly-92c7fe5c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-f716733a.js → WEIGHT_BOYS.zscore.weekly-3417a368.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-63919d9b.js → WEIGHT_BOYS.zscore.yearly-4d94de25.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-5646fbb1.js → WEIGHT_GIRLS.percentile.monthly-bb20f2f4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-306d88cf.js → WEIGHT_GIRLS.percentile.weekly-cfb58232.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-efa44761.js → WEIGHT_GIRLS.percentile.yearly-9f0266dd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-0eb6c8a3.js → WEIGHT_GIRLS.zscore.monthly-35834800.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-a8058f6d.js → WEIGHT_GIRLS.zscore.weekly-04d5c09a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-4f6015c7.js → WEIGHT_GIRLS.zscore.yearly-eda8c700.js} +0 -0
- /package/build/esm/{ageGenerate-74c2e9c7.js → ageGenerate-49421c0c.js} +0 -0
- /package/build/esm/{animation-e3175d08.js → animation-6aff9c94.js} +0 -0
- /package/build/esm/{appearance-c71018df.js → appearance-0b16584c.js} +0 -0
- /package/build/esm/{constants-c21d8ae3.js → constants-80a43ca1.js} +0 -0
- /package/build/esm/{constants-7a11f46a.js → constants-d4006dbd.js} +0 -0
- /package/build/esm/{constants-d7235689.js → constants-f1525a91.js} +0 -0
- /package/build/esm/{context-d81be133.js → context-34c863a6.js} +0 -0
- /package/build/esm/{dataTransform-c9eeac89.js → dataTransform-c92066fc.js} +0 -0
- /package/build/esm/{index-12e998bf.js → index-13be3a2a.js} +0 -0
- /package/build/esm/{index-e038ce4d.js → index-3acb7878.js} +0 -0
- /package/build/esm/{index-39b9cc52.js → index-669e3d6e.js} +0 -0
- /package/build/esm/{index-1cea02c2.js → index-8ee3c013.js} +0 -0
- /package/build/esm/{index-db6af26b.js → index-90ee0916.js} +0 -0
- /package/build/esm/{index-dfaf91b6.js → index-b0a2824a.js} +0 -0
- /package/build/esm/{index-daa46513.js → index-b8a47113.js} +0 -0
- /package/build/esm/{index-c7cb0101.js → index-dd1e5cfd.js} +0 -0
- /package/build/esm/{index-a96ebb13.js → index-f404e494.js} +0 -0
- /package/build/esm/{index.styles-c9e74348.js → index.styles-93be29ce.js} +0 -0
- /package/build/esm/{localizeNumberFormat-c803156a.js → localizeNumberFormat-74adf22f.js} +0 -0
- /package/build/esm/{number-64a7542e.js → number-1913da86.js} +0 -0
- /package/build/esm/{paths-a3ad6847.js → paths-dbda9451.js} +0 -0
- /package/build/esm/{routing-162621b2.js → routing-1e7d6e89.js} +0 -0
- /package/build/esm/{shared-eb75e8c5.js → shared-29748c0f.js} +0 -0
- /package/build/esm/{translationsContext-2ce23027.js → translationsContext-f899863b.js} +0 -0
- /package/build/esm/{tslib.es6-2430ac70.js → tslib.es6-b9f6872a.js} +0 -0
- /package/build/esm/{types-d127803a.js → types-ee529557.js} +0 -0
- /package/build/esm/{useImageAspectRatio-b39c77ec.js → useImageAspectRatio-bd019481.js} +0 -0
- /package/build/esm/{useOutsideClick-5c34d0ee.js → useOutsideClick-72348444.js} +0 -0
- /package/build/esm/{useScrollbarSize-e81eb6a3.js → useScrollbarSize-c444563d.js} +0 -0
- /package/build/esm/{useUniqueId-39017eb1.js → useUniqueId-423dde83.js} +0 -0
- /package/build/esm/{utils-b8b8ee25.js → utils-78f45300.js} +0 -0
- /package/build/esm/{utils-b29fb220.js → utils-fd542933.js} +0 -0
- /package/build/{index-b0aea26f.js → index-19060c81.js} +0 -0
- /package/build/{index-f6d864a4.js → index-404fa8ef.js} +0 -0
- /package/build/{index-7f972e73.js → index-57272d45.js} +0 -0
- /package/build/{index-b57789f4.js → index-65604660.js} +0 -0
- /package/build/{index-e89c54d4.js → index-6e579bcf.js} +0 -0
- /package/build/{index-11ef464d.js → index-8d44469d.js} +0 -0
- /package/build/{index-6d8bca56.js → index-92279fed.js} +0 -0
- /package/build/{index-06e8844d.js → index-96c94401.js} +0 -0
- /package/build/{index-74946e26.js → index-9b028c7a.js} +0 -0
- /package/build/{index.styles-29a1822e.js → index.styles-ffe69fc9.js} +0 -0
- /package/build/{localizeNumberFormat-e1cc74aa.js → localizeNumberFormat-2190aaf0.js} +0 -0
- /package/build/{number-6fc1dfe4.js → number-7aa90137.js} +0 -0
- /package/build/{paths-af560692.js → paths-210019dc.js} +0 -0
- /package/build/{routing-6a52dd63.js → routing-206a1d9f.js} +0 -0
- /package/build/{shared-2404a68d.js → shared-684bce9f.js} +0 -0
- /package/build/{translationsContext-5889fc15.js → translationsContext-8b52ecd9.js} +0 -0
- /package/build/{tslib.es6-d98fb08d.js → tslib.es6-772b1fa6.js} +0 -0
- /package/build/{types-869ba50a.js → types-bf39af84.js} +0 -0
- /package/build/{useImageAspectRatio-a5dc09c4.js → useImageAspectRatio-73c5a4da.js} +0 -0
- /package/build/{useOutsideClick-567b4a52.js → useOutsideClick-8e47dadb.js} +0 -0
- /package/build/{useScrollbarSize-883050ad.js → useScrollbarSize-bb0dfce3.js} +0 -0
- /package/build/{useUniqueId-ead9ce35.js → useUniqueId-75431d14.js} +0 -0
- /package/build/{utils-6fe31363.js → utils-2624818f.js} +0 -0
- /package/build/{utils-311b8f16.js → utils-8ced8a28.js} +0 -0
package/build/subot.js
CHANGED
|
@@ -3,74 +3,75 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var index$
|
|
7
|
-
var tslib_es6 = require('./tslib.es6-
|
|
8
|
-
var index$
|
|
6
|
+
var index$3 = require('./index-65604660.js');
|
|
7
|
+
var tslib_es6 = require('./tslib.es6-772b1fa6.js');
|
|
8
|
+
var index$4 = require('./index-c19b9819.js');
|
|
9
9
|
var Cookies = require('js-cookie');
|
|
10
10
|
var fd = require('fastdom');
|
|
11
11
|
var fastdomPromised = require('fastdom/extensions/fastdom-promised');
|
|
12
|
-
var togetherComponentGlobalContext = require('./utils-
|
|
12
|
+
var togetherComponentGlobalContext = require('./utils-f03c37c5.js');
|
|
13
13
|
var formatString = require('string-format');
|
|
14
|
-
var
|
|
15
|
-
var index$1 = require('./index-
|
|
14
|
+
var index$2 = require('./index-e7d6d098.js');
|
|
15
|
+
var index$1 = require('./index-0eb45be2.js');
|
|
16
16
|
var dayjs = require('dayjs');
|
|
17
17
|
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
18
18
|
var core = require('@mantine/core');
|
|
19
19
|
var classNames = require('classnames');
|
|
20
|
-
var index$
|
|
21
|
-
var index$
|
|
20
|
+
var index$c = require('./index-9b028c7a.js');
|
|
21
|
+
var index$b = require('./index-db8dda61.js');
|
|
22
22
|
var framerMotion = require('framer-motion');
|
|
23
23
|
var styled = require('@emotion/styled');
|
|
24
|
-
var utils = require('./utils-
|
|
25
|
-
var index$
|
|
24
|
+
var utils = require('./utils-2624818f.js');
|
|
25
|
+
var index$5 = require('./index-5eb3bbb7.js');
|
|
26
26
|
var remarkable = require('remarkable');
|
|
27
27
|
var other = require('@hhgtech/icons/other');
|
|
28
28
|
var reactIntersectionObserver = require('react-intersection-observer');
|
|
29
|
-
var index$
|
|
29
|
+
var index$6 = require('./index-92279fed.js');
|
|
30
30
|
var isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
31
|
-
var constants = require('./constants-
|
|
31
|
+
var constants = require('./constants-7dddc573.js');
|
|
32
32
|
var uuid = require('uuid');
|
|
33
|
-
var
|
|
33
|
+
var recaptchaV3 = require('./recaptchaV3-8edb6116.js');
|
|
34
|
+
var index$7 = require('./index-510e5a04.js');
|
|
34
35
|
var miscTheme = require('./miscTheme.js');
|
|
35
36
|
var constantsIsProduction = require('./constantsIsProduction.js');
|
|
36
|
-
var index$
|
|
37
|
+
var index$8 = require('./index-25ff977f.js');
|
|
37
38
|
require('@mantine/dates');
|
|
38
|
-
require('./index-
|
|
39
|
-
require('./index-
|
|
40
|
-
require('./index.styles-
|
|
41
|
-
require('./translationsContext-
|
|
39
|
+
require('./index-ecbe0180.js');
|
|
40
|
+
require('./index-96c94401.js');
|
|
41
|
+
require('./index.styles-ffe69fc9.js');
|
|
42
|
+
require('./translationsContext-8b52ecd9.js');
|
|
42
43
|
require('@mantine/hooks');
|
|
43
|
-
require('./index-
|
|
44
|
+
require('./index-b161d38e.js');
|
|
44
45
|
var isEmpty = require('lodash/isEmpty');
|
|
45
46
|
var reactHookForm = require('react-hook-form');
|
|
46
47
|
var PhoneInputBase = require('react-phone-number-input');
|
|
47
48
|
var api = require('@react-google-maps/api');
|
|
48
|
-
var usePlacesAutocomplete = require('./usePlacesAutocomplete-
|
|
49
|
+
var usePlacesAutocomplete = require('./usePlacesAutocomplete-d8d78660.js');
|
|
49
50
|
var miscDefaultClassWrapper = require('./miscDefaultClassWrapper.js');
|
|
50
|
-
var InputDate = require('./InputDate-
|
|
51
|
-
var index$
|
|
52
|
-
var index$
|
|
53
|
-
var store = require('./store-
|
|
54
|
-
var utils$1 = require('./utils-
|
|
55
|
-
var index$
|
|
51
|
+
var InputDate = require('./InputDate-0134dd5e.js');
|
|
52
|
+
var index$9 = require('./index-2a4e3ca8.js');
|
|
53
|
+
var index$a = require('./index-57272d45.js');
|
|
54
|
+
var store = require('./store-b1bffd3b.js');
|
|
55
|
+
var utils$1 = require('./utils-e6b46892.js');
|
|
56
|
+
var index$d = require('./index-bc6ccfac.js');
|
|
56
57
|
var StarRatings = require('react-star-ratings');
|
|
57
58
|
var moleculesArticleCard = require('./moleculesArticleCard.js');
|
|
58
|
-
var index$
|
|
59
|
-
var index$
|
|
59
|
+
var index$e = require('./index-e6bb6882.js');
|
|
60
|
+
var index$f = require('./index-ef7c27ce.js');
|
|
60
61
|
require('date-fns/locale');
|
|
61
62
|
require('./constantsSite.js');
|
|
62
63
|
require('./constantsRiskScreener.js');
|
|
63
64
|
require('./miscCookieHelper.js');
|
|
64
65
|
require('slugify');
|
|
65
66
|
require('./togetherApiPaths.js');
|
|
66
|
-
require('./index-
|
|
67
|
-
require('./WhatsApp-
|
|
68
|
-
require('./Spinner-
|
|
69
|
-
require('./index-
|
|
70
|
-
require('./shared-
|
|
71
|
-
require('./index-
|
|
67
|
+
require('./index-60823b67.js');
|
|
68
|
+
require('./WhatsApp-a43f44ed.js');
|
|
69
|
+
require('./Spinner-5a75d294.js');
|
|
70
|
+
require('./index-ba3a95c9.js');
|
|
71
|
+
require('./shared-684bce9f.js');
|
|
72
|
+
require('./index-bf170778.js');
|
|
72
73
|
require('@mantine/carousel');
|
|
73
|
-
require('./useUniqueId-
|
|
74
|
+
require('./useUniqueId-75431d14.js');
|
|
74
75
|
require('@hhgtech/icons/core');
|
|
75
76
|
require('lodash/debounce');
|
|
76
77
|
require('lodash/throttle');
|
|
@@ -79,9 +80,9 @@ require('vaul');
|
|
|
79
80
|
require('@emotion/react');
|
|
80
81
|
require('@mantine/notifications');
|
|
81
82
|
require('zustand');
|
|
82
|
-
require('./index-
|
|
83
|
-
require('./routing-
|
|
84
|
-
require('./healthTools-
|
|
83
|
+
require('./index-011a3f7f.js');
|
|
84
|
+
require('./routing-206a1d9f.js');
|
|
85
|
+
require('./healthTools-8fa3f011.js');
|
|
85
86
|
|
|
86
87
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
87
88
|
|
|
@@ -170,55 +171,6 @@ const CachedSystem = {
|
|
|
170
171
|
}),
|
|
171
172
|
};
|
|
172
173
|
|
|
173
|
-
const SUBOT_CAPTCHA_HEADER = 'X-Recaptcha-Token';
|
|
174
|
-
// One action per endpoint, as agreed with subot-be.
|
|
175
|
-
const ACTIONS = {
|
|
176
|
-
chat: 'subot_chat',
|
|
177
|
-
log: 'subot_log',
|
|
178
|
-
sms_otp: 'subot_sms_otp',
|
|
179
|
-
whatsapp_otp: 'subot_whatsapp_otp',
|
|
180
|
-
sms_verify: 'subot_sms_verify',
|
|
181
|
-
whatsapp_verify: 'subot_whatsapp_verify',
|
|
182
|
-
};
|
|
183
|
-
const SUBOT_CAPTCHA_FAILED_MESSAGE = {
|
|
184
|
-
id: 'subot.captcha.failed',
|
|
185
|
-
defaultMessage: 'We could not verify your request. Please try again.',
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Headers with a fresh reCAPTCHA v3 token from the shared v3 key
|
|
189
|
-
* (`NEXT_PUBLIC_GOOGLE_RECAPTCHA_KEY`). Call it right before the request:
|
|
190
|
-
* tokens are single-use and expire after 2 minutes.
|
|
191
|
-
*
|
|
192
|
-
* Resolves to `{}` when no token is available and lets the backend decide.
|
|
193
|
-
*/
|
|
194
|
-
const getSubotCaptchaHeaders = (kind) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
195
|
-
const token = yield recaptchaV3.getLeadgenRecaptchaToken(ACTIONS[kind]);
|
|
196
|
-
return token ? { [SUBOT_CAPTCHA_HEADER]: token } : {};
|
|
197
|
-
});
|
|
198
|
-
/**
|
|
199
|
-
* POST to a subot-be endpoint protected by reCAPTCHA. subot-be rejects a
|
|
200
|
-
* missing or failed token with HTTP 403, which `callApi` cannot report, so the
|
|
201
|
-
* response is flagged with `_captchaForbidden`.
|
|
202
|
-
*/
|
|
203
|
-
const callSubotProtectedApi = (url, kind, data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
204
|
-
try {
|
|
205
|
-
const res = yield fetch(url, {
|
|
206
|
-
method: 'POST',
|
|
207
|
-
body: JSON.stringify(data),
|
|
208
|
-
headers: yield getSubotCaptchaHeaders(kind),
|
|
209
|
-
});
|
|
210
|
-
const body = yield res.json().catch(() => null);
|
|
211
|
-
if (res.status === 403)
|
|
212
|
-
return Object.assign(Object.assign({}, body), { _captchaForbidden: true });
|
|
213
|
-
return body;
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
console.log(error);
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
const isSubotCaptchaForbidden = (res) => !!(res === null || res === void 0 ? void 0 : res._captchaForbidden);
|
|
221
|
-
|
|
222
174
|
const getSubotApiPath = (path, params) => {
|
|
223
175
|
const { subotApiUrl } = togetherComponentGlobalContext.GlobalData === null || togetherComponentGlobalContext.GlobalData === void 0 ? void 0 : togetherComponentGlobalContext.GlobalData.env;
|
|
224
176
|
const apiUrl = subotApiUrl.endsWith('frontend/api/')
|
|
@@ -229,7 +181,7 @@ const getSubotApiPath = (path, params) => {
|
|
|
229
181
|
/** inline message */
|
|
230
182
|
const subotInlineMessage$1 = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
231
183
|
try {
|
|
232
|
-
return yield callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
184
|
+
return yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
233
185
|
}
|
|
234
186
|
catch (error) { }
|
|
235
187
|
});
|
|
@@ -381,7 +333,7 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
381
333
|
? _formSubmitMeta
|
|
382
334
|
: nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.form_submit_meta;
|
|
383
335
|
if (isNodeWithDynamicScore &&
|
|
384
|
-
node.type === index$
|
|
336
|
+
node.type === index$3.NodeType.FORM &&
|
|
385
337
|
formSubmitMeta) {
|
|
386
338
|
// debugger
|
|
387
339
|
// NodeId hiện tại có trong object "dynamic_score"
|
|
@@ -393,22 +345,22 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
393
345
|
const foundActions = (_b = node.actions) === null || _b === void 0 ? void 0 : _b.filter((act) => actionIdsDynamicScore.includes(act.id));
|
|
394
346
|
const foundFormMetas = formSubmitMeta.filter((f) => foundActions.find((a) => a.key === f.key) &&
|
|
395
347
|
(f.control ===
|
|
396
|
-
index$
|
|
348
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
397
349
|
f.control ===
|
|
398
|
-
index$
|
|
350
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
399
351
|
const formulaWithVariable = actionVarsDynamicScore
|
|
400
352
|
.map((variableName, idx) => {
|
|
401
353
|
const variableMapToActionId = actionIdsDynamicScore[idx];
|
|
402
354
|
const variableMapToAction = foundActions.find((act) => act.id === variableMapToActionId);
|
|
403
355
|
const formValue = foundFormMetas.find((f) => (variableMapToAction === null || variableMapToAction === void 0 ? void 0 : variableMapToAction.key) === f.key &&
|
|
404
356
|
(f.control ===
|
|
405
|
-
index$
|
|
357
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
406
358
|
f.control ===
|
|
407
|
-
index$
|
|
359
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
408
360
|
if (!formValue)
|
|
409
361
|
return '';
|
|
410
362
|
if (formValue.control ===
|
|
411
|
-
index$
|
|
363
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]) {
|
|
412
364
|
const { age } = calcAge(dayjs__default["default"](formValue.value).toDate());
|
|
413
365
|
return `var ${variableName} = ${age};`;
|
|
414
366
|
}
|
|
@@ -430,7 +382,7 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
430
382
|
const replaceTextWithVariables = (label, listNodes) => {
|
|
431
383
|
const dynamicScoreHash = getDynamicScore(listNodes[0]);
|
|
432
384
|
try {
|
|
433
|
-
const listFormNodes = listNodes.filter((node) => node.type === index$
|
|
385
|
+
const listFormNodes = listNodes.filter((node) => node.type === index$3.NodeType.FORM);
|
|
434
386
|
/** Apply for dynamic score */
|
|
435
387
|
Object.keys(dynamicScoreHash).forEach((nodeId) => {
|
|
436
388
|
var _a, _b, _c;
|
|
@@ -441,9 +393,9 @@ const replaceTextWithVariables = (label, listNodes) => {
|
|
|
441
393
|
const foundActions = (_a = foundNode === null || foundNode === void 0 ? void 0 : foundNode.actions) === null || _a === void 0 ? void 0 : _a.filter((act) => actionIdsDynamicScore.includes(act.id));
|
|
442
394
|
const foundFormMetas = (_c = (_b = foundNode === null || foundNode === void 0 ? void 0 : foundNode._message) === null || _b === void 0 ? void 0 : _b.form_submit_meta) === null || _c === void 0 ? void 0 : _c.filter((f) => foundActions.find((a) => a.key === f.key) &&
|
|
443
395
|
(f.control ===
|
|
444
|
-
index$
|
|
396
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
445
397
|
f.control ===
|
|
446
|
-
index$
|
|
398
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
447
399
|
if (dynamicScoreHash[nodeId].formula &&
|
|
448
400
|
dynamicScoreHash[nodeId].formula_result_name &&
|
|
449
401
|
(foundFormMetas === null || foundFormMetas === void 0 ? void 0 : foundFormMetas.length)) {
|
|
@@ -453,9 +405,9 @@ const replaceTextWithVariables = (label, listNodes) => {
|
|
|
453
405
|
const variableMapToAction = foundActions.find((act) => act.id === variableMapToActionId);
|
|
454
406
|
const formValue = foundFormMetas.find((f) => (variableMapToAction === null || variableMapToAction === void 0 ? void 0 : variableMapToAction.key) === f.key &&
|
|
455
407
|
(f.control ===
|
|
456
|
-
index$
|
|
408
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
457
409
|
f.control ===
|
|
458
|
-
index$
|
|
410
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
459
411
|
if (!formValue)
|
|
460
412
|
return '';
|
|
461
413
|
return `var ${variableName} = ${formValue.value};`;
|
|
@@ -611,7 +563,7 @@ const buildSubotInlineSsoReturnUrl = () => {
|
|
|
611
563
|
};
|
|
612
564
|
const isActiveSubotInlineSsoNode = (listNodes, activeId) => {
|
|
613
565
|
const found = listNodes.find((n) => n.id == activeId);
|
|
614
|
-
return (found === null || found === void 0 ? void 0 : found.position) === index$
|
|
566
|
+
return (found === null || found === void 0 ? void 0 : found.position) === index$3.NodePosition.SSO;
|
|
615
567
|
};
|
|
616
568
|
const hasPendingSubotInlineSsoState = (botId) => {
|
|
617
569
|
var _a;
|
|
@@ -627,7 +579,7 @@ const hasPendingSubotInlineSsoState = (botId) => {
|
|
|
627
579
|
json.createdAt + timeToExist <= Date.now()) {
|
|
628
580
|
return false;
|
|
629
581
|
}
|
|
630
|
-
return ((_a = json.listNodes.slice(-1)[0]) === null || _a === void 0 ? void 0 : _a.position) === index$
|
|
582
|
+
return ((_a = json.listNodes.slice(-1)[0]) === null || _a === void 0 ? void 0 : _a.position) === index$3.NodePosition.SSO;
|
|
631
583
|
}
|
|
632
584
|
catch (_b) {
|
|
633
585
|
return false;
|
|
@@ -664,7 +616,7 @@ const getPreviousStateFromStorage = (botId, { getParams }) => {
|
|
|
664
616
|
json.activeId &&
|
|
665
617
|
json.createdAt + timeToExist > Date.now()) {
|
|
666
618
|
localStorage.removeItem(STATE_SUBOT_INLINE_KEY);
|
|
667
|
-
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$
|
|
619
|
+
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$3.NodePosition.SSO;
|
|
668
620
|
if (isSSOAtLast) {
|
|
669
621
|
return {
|
|
670
622
|
listNodes: json.listNodes,
|
|
@@ -736,7 +688,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
736
688
|
((_a = nodeMessage._message) === null || _a === void 0 ? void 0 : _a.action_id) &&
|
|
737
689
|
((_b = nodeMessage._message) === null || _b === void 0 ? void 0 : _b.action_value)) {
|
|
738
690
|
const key = nodeMessage._message.action_value; // submit
|
|
739
|
-
if (nodeMessage.type === index$
|
|
691
|
+
if (nodeMessage.type === index$3.NodeType.FORM) {
|
|
740
692
|
const addressControl = ['address', 'province', 'district', 'commune'];
|
|
741
693
|
const formMetaExceptAddress = (((_c = nodeMessage._message) === null || _c === void 0 ? void 0 : _c.form_submit_meta) || []).filter((formMeta) => !addressControl.includes(formMeta.control));
|
|
742
694
|
/** For address field */
|
|
@@ -772,7 +724,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
772
724
|
});
|
|
773
725
|
}
|
|
774
726
|
}
|
|
775
|
-
if (nodeMessage.type === index$
|
|
727
|
+
if (nodeMessage.type === index$3.NodeType.TEXT) {
|
|
776
728
|
if (nodeMessage.is_multi_select) {
|
|
777
729
|
const actionIds = Object.keys(nodeMessage._message.selected_actions || {});
|
|
778
730
|
const actionLabel = nodeMessage.actions
|
|
@@ -791,7 +743,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
791
743
|
const actionLabel = action === null || action === void 0 ? void 0 : action.label;
|
|
792
744
|
// Select "Other, please provide more detail" -> There is an input below the option is stored in form_submit_meta
|
|
793
745
|
const otherText = (_q = (_p = (_o = nodeMessage._message) === null || _o === void 0 ? void 0 : _o.form_submit_meta) === null || _p === void 0 ? void 0 : _p.find((f) => f.key === KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD)) === null || _q === void 0 ? void 0 : _q.value;
|
|
794
|
-
const isSelectedOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
746
|
+
const isSelectedOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;
|
|
795
747
|
if (actionLabel && actionId) {
|
|
796
748
|
result.push({
|
|
797
749
|
attribute: key,
|
|
@@ -801,7 +753,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
801
753
|
}
|
|
802
754
|
}
|
|
803
755
|
}
|
|
804
|
-
if (nodeMessage.type === index$
|
|
756
|
+
if (nodeMessage.type === index$3.NodeType.POLL) {
|
|
805
757
|
const nodeId = nodeMessage.id;
|
|
806
758
|
const actionIds = ((_u = (_t = nodeMessage._message) === null || _t === void 0 ? void 0 : _t.current_polls) === null || _u === void 0 ? void 0 : _u[nodeId]) || [];
|
|
807
759
|
const actionLabel = nodeMessage.actions
|
|
@@ -846,7 +798,7 @@ const extractVoucherAnswers = (nodes, botItem) => {
|
|
|
846
798
|
else if (submitMessage.action_value === 'voucher_color') {
|
|
847
799
|
voucherColor = (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.label) || '';
|
|
848
800
|
}
|
|
849
|
-
if (nodeMessage.type === index$
|
|
801
|
+
if (nodeMessage.type === index$3.NodeType.FORM) {
|
|
850
802
|
const logicFind = (key) => (formMeta) => {
|
|
851
803
|
return formMeta.key === key;
|
|
852
804
|
};
|
|
@@ -911,7 +863,7 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
911
863
|
let statusFlowBot = 'in_progress';
|
|
912
864
|
const lastNode = nodes[nodes.length - 1];
|
|
913
865
|
// Saving data with status COMPLETE when chatbot go to final node
|
|
914
|
-
if ((lastNode === null || lastNode === void 0 ? void 0 : lastNode.type) && index$
|
|
866
|
+
if ((lastNode === null || lastNode === void 0 ? void 0 : lastNode.type) && index$3.NodeFinalTypes.includes(lastNode.type)) {
|
|
915
867
|
statusFlowBot = 'complete';
|
|
916
868
|
}
|
|
917
869
|
/** Remove the first node and push it later in data fetching step to make sure data is latest */
|
|
@@ -935,7 +887,7 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
935
887
|
type: 'inline',
|
|
936
888
|
market: constantsDomainLocales.domainLocales[togetherComponentGlobalContext.locale],
|
|
937
889
|
};
|
|
938
|
-
yield callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SUBOT_CREATE_LOG), 'log', payload);
|
|
890
|
+
yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SUBOT_CREATE_LOG), 'log', payload);
|
|
939
891
|
}
|
|
940
892
|
catch (err) {
|
|
941
893
|
//
|
|
@@ -1026,7 +978,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
1026
978
|
/** Get Params */
|
|
1027
979
|
const getParams = React.useCallback(() => {
|
|
1028
980
|
const gaData = window.gaData;
|
|
1029
|
-
const url = (customUrl || window.location.origin + index$
|
|
981
|
+
const url = (customUrl || window.location.origin + index$4.basePath) +
|
|
1030
982
|
((togetherComponentGlobalContext.GlobalData === null || togetherComponentGlobalContext.GlobalData === void 0 ? void 0 : togetherComponentGlobalContext.GlobalData.locale) === 'tl-PH'
|
|
1031
983
|
? articleLink.replace('fil/', '')
|
|
1032
984
|
: articleLink);
|
|
@@ -1279,9 +1231,9 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
1279
1231
|
elementScrollIntoView,
|
|
1280
1232
|
]);
|
|
1281
1233
|
React.useEffect(() => {
|
|
1282
|
-
if (!Cookies__default["default"].get(index$
|
|
1234
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
1283
1235
|
index$1.checkUntilFinished({
|
|
1284
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
1236
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
1285
1237
|
finished: () => {
|
|
1286
1238
|
const params = getParams();
|
|
1287
1239
|
getFirstNode(params);
|
|
@@ -1721,7 +1673,7 @@ Container$v.displayName = 'SubotInlineDisclaimer';
|
|
|
1721
1673
|
const useCurrentUrl = () => {
|
|
1722
1674
|
const { data: { locale, router }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1723
1675
|
const { asPath } = router || {};
|
|
1724
|
-
const [currentUrl, setCurrentUrl] = React.useState(() => `${index$1.getHelloSitesUrl(locale, false)}${index$
|
|
1676
|
+
const [currentUrl, setCurrentUrl] = React.useState(() => `${index$1.getHelloSitesUrl(locale, false)}${index$4.basePath}${asPath}`);
|
|
1725
1677
|
React.useEffect(() => {
|
|
1726
1678
|
setCurrentUrl(window.location.href);
|
|
1727
1679
|
}, [asPath]);
|
|
@@ -1732,7 +1684,7 @@ const useCurrentUrl = () => {
|
|
|
1732
1684
|
const useValidationMultiOption = () => {
|
|
1733
1685
|
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1734
1686
|
const validateSelectActions = (activeActions, node, callBack) => {
|
|
1735
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
1687
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.EXACT_NUMBER &&
|
|
1736
1688
|
activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
|
|
1737
1689
|
pushNotifications({
|
|
1738
1690
|
message: f({
|
|
@@ -1745,7 +1697,7 @@ const useValidationMultiOption = () => {
|
|
|
1745
1697
|
});
|
|
1746
1698
|
return;
|
|
1747
1699
|
}
|
|
1748
|
-
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
1700
|
+
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.RANGE &&
|
|
1749
1701
|
(activeActions.length < (node === null || node === void 0 ? void 0 : node.from) ||
|
|
1750
1702
|
activeActions.length > (node === null || node === void 0 ? void 0 : node.to))) {
|
|
1751
1703
|
pushNotifications({
|
|
@@ -1875,12 +1827,12 @@ const NodeContextProvider = ({ children }) => {
|
|
|
1875
1827
|
return (React__default["default"].createElement(NodeContext.Provider, { value: ctxValue }, children));
|
|
1876
1828
|
};
|
|
1877
1829
|
|
|
1878
|
-
const disabledNodeList = [index$
|
|
1879
|
-
const disabledPositionList = [index$
|
|
1830
|
+
const disabledNodeList = [index$3.NodeType.FORM];
|
|
1831
|
+
const disabledPositionList = [index$3.NodePosition.SSO];
|
|
1880
1832
|
const excludeNodeList = [
|
|
1881
|
-
index$
|
|
1882
|
-
index$
|
|
1883
|
-
index$
|
|
1833
|
+
index$3.NodeType.FINAL,
|
|
1834
|
+
index$3.NodeType.FINAL_THANK_YOU,
|
|
1835
|
+
index$3.NodeType.FINAL_STANDARD,
|
|
1884
1836
|
];
|
|
1885
1837
|
// const isSingleChoiceText = (node?: SubotNode) => {
|
|
1886
1838
|
// if (!node) return false
|
|
@@ -1898,9 +1850,9 @@ const Container$u = () => {
|
|
|
1898
1850
|
const validation = useValidationMultiOption();
|
|
1899
1851
|
const botItem = listNodes[0];
|
|
1900
1852
|
const node = listNodes.find((nodeItem) => nodeItem.id == activeId);
|
|
1901
|
-
const actionNextChoice = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$
|
|
1902
|
-
const actionPollSubmit = (_b = node === null || node === void 0 ? void 0 : node.actions) === null || _b === void 0 ? void 0 : _b.find(({ type }) => type == index$
|
|
1903
|
-
const actionMultipleSubmit = (_c = node === null || node === void 0 ? void 0 : node.actions) === null || _c === void 0 ? void 0 : _c.find(({ type }) => type == index$
|
|
1853
|
+
const actionNextChoice = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$3.NodeActionType.USER_CHOICE_NEXT);
|
|
1854
|
+
const actionPollSubmit = (_b = node === null || node === void 0 ? void 0 : node.actions) === null || _b === void 0 ? void 0 : _b.find(({ type }) => type == index$3.NodeActionType.POLL_BUTTON);
|
|
1855
|
+
const actionMultipleSubmit = (_c = node === null || node === void 0 ? void 0 : node.actions) === null || _c === void 0 ? void 0 : _c.find(({ type }) => type == index$3.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
1904
1856
|
// const selectedWithOtherInput =
|
|
1905
1857
|
// node?.actions?.find(({ id }) => id === value.action_id)?.type ===
|
|
1906
1858
|
// NodeActionType.USER_CHOICE_TEXT_BY_INPUT
|
|
@@ -1974,7 +1926,7 @@ const Container$u = () => {
|
|
|
1974
1926
|
defaultMessage: 'Start over',
|
|
1975
1927
|
}))),
|
|
1976
1928
|
isDisplayAction && (React__default["default"].createElement("div", { className: "si-footer-actions" },
|
|
1977
|
-
React__default["default"].createElement(index$
|
|
1929
|
+
React__default["default"].createElement(index$5.Button, { size: "md", variant: "tertiary", onClick: onPrev, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Back", "data-event-label": currentUrl, "data-bot-id": params.bot_id, sx: { paddingLeft: 16, paddingRight: 16, borderRadius: 8 }, styles: {
|
|
1978
1930
|
root: {
|
|
1979
1931
|
':not(:disabled)': {
|
|
1980
1932
|
backgroundColor: 'transparent !important',
|
|
@@ -1990,7 +1942,7 @@ const Container$u = () => {
|
|
|
1990
1942
|
id: 'riskScreener.back',
|
|
1991
1943
|
defaultMessage: 'Back',
|
|
1992
1944
|
})),
|
|
1993
|
-
React__default["default"].createElement(index$
|
|
1945
|
+
React__default["default"].createElement(index$5.Button, { size: "md", onClick: handleClickNext, loading: isDisabled ? false : loading, disabled: isDisabled, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Continue", "data-event-label": currentUrl, "data-bot-id": params.bot_id, sx: { paddingLeft: 16, paddingRight: 16, borderRadius: 8 }, styles: {
|
|
1994
1946
|
root: {
|
|
1995
1947
|
':not(:disabled)': {
|
|
1996
1948
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
@@ -2314,11 +2266,11 @@ const SubotInlineVoucherLeftUI = ({ clientId, voucherAnswers }) => {
|
|
|
2314
2266
|
return null;
|
|
2315
2267
|
}
|
|
2316
2268
|
return (React__default["default"].createElement(StyledWrap$n, { className: "si-voucher-left-ui" },
|
|
2317
|
-
React__default["default"].createElement("img", { src: index$
|
|
2318
|
-
React__default["default"].createElement("img", { src: index$
|
|
2269
|
+
React__default["default"].createElement("img", { src: index$6.CommonGAssets.getAssetPath('subot/voucher_bg.png'), alt: "", loading: "eager", className: "si-voucher-bg" }),
|
|
2270
|
+
React__default["default"].createElement("img", { src: index$6.CommonGAssets.getAssetPath('subot/voucher_icon.png'), alt: "", loading: "eager", className: "si-voucher-item" }),
|
|
2319
2271
|
React__default["default"].createElement(core.Box, { className: "si-voucher-in-stock" },
|
|
2320
2272
|
React__default["default"].createElement("h3", null, quantityInStock),
|
|
2321
|
-
React__default["default"].createElement("img", { src: index$
|
|
2273
|
+
React__default["default"].createElement("img", { src: index$6.CommonGAssets.getAssetPath('subot/voucher_icon_small.png'), alt: "", loading: "eager" })),
|
|
2322
2274
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress" },
|
|
2323
2275
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress--inner", style: { width: `${percentage}%` } }))));
|
|
2324
2276
|
};
|
|
@@ -2359,7 +2311,7 @@ const Container$s = ({ node, onClickStart }) => {
|
|
|
2359
2311
|
email: '',
|
|
2360
2312
|
voucherName: '',
|
|
2361
2313
|
} })),
|
|
2362
|
-
React__default["default"].createElement(index$
|
|
2314
|
+
React__default["default"].createElement(index$5.Button, { onClick: handleClickStart, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Start", "data-event-label": currentUrl, "data-bot-id": params.bot_id, rightIcon: React__default["default"].createElement(other.ArrowRight, { color: "var(--subot-inline-text-button-color, #fff)" }), styles: {
|
|
2363
2315
|
root: {
|
|
2364
2316
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2365
2317
|
'&:hover': {
|
|
@@ -2460,7 +2412,7 @@ const getLeadPath = (path, params) => {
|
|
|
2460
2412
|
const callApiWithLead = (url, method, options) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2461
2413
|
if (options === null || options === void 0 ? void 0 : options.data) {
|
|
2462
2414
|
let cookie = Cookies__default["default"].get(constants.LEAD_TOKEN_COOKIE);
|
|
2463
|
-
const ga = Cookies__default["default"].get(index$
|
|
2415
|
+
const ga = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2464
2416
|
if (!cookie) {
|
|
2465
2417
|
const newCookie = uuid.v4();
|
|
2466
2418
|
cookie = newCookie;
|
|
@@ -2541,15 +2493,15 @@ const checkSyncDataOnFrisoCampaign = (bot, values) => {
|
|
|
2541
2493
|
if (!((_a = bot.extra_settings) === null || _a === void 0 ? void 0 : _a.sync_data_friso_campaign) || !values) {
|
|
2542
2494
|
return;
|
|
2543
2495
|
}
|
|
2544
|
-
const nameControl = index$
|
|
2545
|
-
const emailControl = index$
|
|
2546
|
-
const dateControl = index$
|
|
2547
|
-
const phoneControlOtp = index$
|
|
2548
|
-
const phoneControl = index$
|
|
2549
|
-
const level1Control = index$
|
|
2550
|
-
const level2Control = index$
|
|
2551
|
-
const level3Control = index$
|
|
2552
|
-
const addressControl = index$
|
|
2496
|
+
const nameControl = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NAME];
|
|
2497
|
+
const emailControl = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_EMAIL];
|
|
2498
|
+
const dateControl = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DATE];
|
|
2499
|
+
const phoneControlOtp = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP];
|
|
2500
|
+
const phoneControl = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_PHONE];
|
|
2501
|
+
const level1Control = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE];
|
|
2502
|
+
const level2Control = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT];
|
|
2503
|
+
const level3Control = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE];
|
|
2504
|
+
const addressControl = index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_ADDRESS];
|
|
2553
2505
|
const name = ((_b = values.find((o) => o.control === nameControl)) === null || _b === void 0 ? void 0 : _b.value) || '';
|
|
2554
2506
|
const email = ((_c = values.find((o) => o.control === emailControl)) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2555
2507
|
const date = ((_d = values.find((o) => o.control === dateControl)) === null || _d === void 0 ? void 0 : _d.value) || '';
|
|
@@ -2595,11 +2547,11 @@ const foundNodeFrisoForm = (listNode) => {
|
|
|
2595
2547
|
var _a, _b, _c, _d, _e, _f;
|
|
2596
2548
|
const node = n;
|
|
2597
2549
|
const phone = ((_c = (_b = (_a = node === null || node === void 0 ? void 0 : node._message) === null || _a === void 0 ? void 0 : _a.form_submit_meta) === null || _b === void 0 ? void 0 : _b.find((o) => o.control ===
|
|
2598
|
-
index$
|
|
2550
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP] ||
|
|
2599
2551
|
o.control ===
|
|
2600
|
-
index$
|
|
2552
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_PHONE])) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2601
2553
|
const date = ((_f = (_e = (_d = node === null || node === void 0 ? void 0 : node._message) === null || _d === void 0 ? void 0 : _d.form_submit_meta) === null || _e === void 0 ? void 0 : _e.find((o) => o.control ===
|
|
2602
|
-
index$
|
|
2554
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DATE])) === null || _f === void 0 ? void 0 : _f.value) || '';
|
|
2603
2555
|
if (phone && date) {
|
|
2604
2556
|
foundPhone = phone;
|
|
2605
2557
|
foundDate = date;
|
|
@@ -2638,7 +2590,7 @@ const Container$r = ({ intent }) => {
|
|
|
2638
2590
|
const trackingMainButton = React.useMemo(() => {
|
|
2639
2591
|
if (!intent.url ||
|
|
2640
2592
|
!intent.label ||
|
|
2641
|
-
(intent === null || intent === void 0 ? void 0 : intent.type) !== index$
|
|
2593
|
+
(intent === null || intent === void 0 ? void 0 : intent.type) !== index$3.NodeIntentType.BOT_MAIN_BUTTON)
|
|
2642
2594
|
return {};
|
|
2643
2595
|
return {
|
|
2644
2596
|
'data-event-category': 'Service Connection',
|
|
@@ -2650,7 +2602,7 @@ const Container$r = ({ intent }) => {
|
|
|
2650
2602
|
return null;
|
|
2651
2603
|
const isShowDownloadIcon = (_a = intent.label) === null || _a === void 0 ? void 0 : _a.startsWith(':download:');
|
|
2652
2604
|
return (React__default["default"].createElement(StyledWrap$j, null,
|
|
2653
|
-
React__default["default"].createElement(index$
|
|
2605
|
+
React__default["default"].createElement(index$5.Button, Object.assign({ size: "md", color: "primary", onClick: handleOnClick }, trackingMainButton, { styles: {
|
|
2654
2606
|
root: {
|
|
2655
2607
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2656
2608
|
'&:hover': {
|
|
@@ -2683,20 +2635,20 @@ Container$q.displayName = 'SubotInlineIntentBotImage';
|
|
|
2683
2635
|
|
|
2684
2636
|
const Container$p = ({ intent, indexNumber }) => {
|
|
2685
2637
|
const { listNodes } = React.useContext(SubotInlineContext$1);
|
|
2686
|
-
const isShowLabel = ![index$
|
|
2638
|
+
const isShowLabel = ![index$3.NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2687
2639
|
const isText = [
|
|
2688
|
-
index$
|
|
2689
|
-
index$
|
|
2640
|
+
index$3.NodeIntentType.BOT_TEXT,
|
|
2641
|
+
index$3.NodeIntentType.BOT_MAIN_TITLE,
|
|
2690
2642
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2691
2643
|
const isBtn = [
|
|
2692
|
-
index$
|
|
2693
|
-
index$
|
|
2644
|
+
index$3.NodeIntentType.BOT_BUTTON,
|
|
2645
|
+
index$3.NodeIntentType.BOT_RECALCULATE,
|
|
2694
2646
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2695
2647
|
const isImageNode = [
|
|
2696
|
-
index$
|
|
2697
|
-
index$
|
|
2648
|
+
index$3.NodeIntentType.BOT_IMAGE,
|
|
2649
|
+
index$3.NodeIntentType.BOT_MAIN_IMAGE,
|
|
2698
2650
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2699
|
-
const isMainTitle = (intent === null || intent === void 0 ? void 0 : intent.type) === index$
|
|
2651
|
+
const isMainTitle = (intent === null || intent === void 0 ? void 0 : intent.type) === index$3.NodeIntentType.BOT_MAIN_TITLE;
|
|
2700
2652
|
if (isBtn)
|
|
2701
2653
|
return React__default["default"].createElement(Container$r, { intent: intent });
|
|
2702
2654
|
if (!intent) {
|
|
@@ -2871,11 +2823,11 @@ function useGetEncodedGaId() {
|
|
|
2871
2823
|
const [encodedGaId, setEncodedGaId] = React.useState('');
|
|
2872
2824
|
const [gaId, setGaId] = React.useState('');
|
|
2873
2825
|
React.useEffect(() => {
|
|
2874
|
-
if (!Cookies__default["default"].get(index$
|
|
2826
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
2875
2827
|
index$1.checkUntilFinished({
|
|
2876
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
2828
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
2877
2829
|
finished: () => {
|
|
2878
|
-
const gaClientId = Cookies__default["default"].get(index$
|
|
2830
|
+
const gaClientId = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2879
2831
|
if (gaClientId) {
|
|
2880
2832
|
const base64Encoded = btoa(gaClientId);
|
|
2881
2833
|
setEncodedGaId(base64Encoded);
|
|
@@ -2886,7 +2838,7 @@ function useGetEncodedGaId() {
|
|
|
2886
2838
|
});
|
|
2887
2839
|
}
|
|
2888
2840
|
else {
|
|
2889
|
-
const gaClientId = Cookies__default["default"].get(index$
|
|
2841
|
+
const gaClientId = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2890
2842
|
if (gaClientId) {
|
|
2891
2843
|
const base64Encoded = btoa(gaClientId);
|
|
2892
2844
|
setEncodedGaId(base64Encoded);
|
|
@@ -3027,7 +2979,7 @@ const Container$l = ({ intent }) => {
|
|
|
3027
2979
|
const disclaimerText = (_a = listServices[0]) === null || _a === void 0 ? void 0 : _a.disclaimer;
|
|
3028
2980
|
const sectionTitle = (_b = listServices[0]) === null || _b === void 0 ? void 0 : _b.sectionTitle;
|
|
3029
2981
|
return (React__default["default"].createElement(StyledWrap$g, null,
|
|
3030
|
-
React__default["default"].createElement(index$
|
|
2982
|
+
React__default["default"].createElement(index$7.Text, { size: "lg", weight: "semiBold", className: "si-title", color: "var(--subot-inline-text-color, #262626)" }, ((_c = sectionTitle === null || sectionTitle === void 0 ? void 0 : sectionTitle.trim) === null || _c === void 0 ? void 0 : _c.call(sectionTitle)) ||
|
|
3031
2983
|
f({
|
|
3032
2984
|
id: 'tools.suggestedServices',
|
|
3033
2985
|
defaultMessage: 'Suggested services',
|
|
@@ -3036,7 +2988,7 @@ const Container$l = ({ intent }) => {
|
|
|
3036
2988
|
return (React__default["default"].createElement("div", { onClick: () => handleOnClick(service), key: index, className: "image-wrapper", role: "presentation", "data-event-category": "Service Connection", "data-event-action": "Risk Screener Result Recommended Services", "data-event-label": index$1.formatUrlWithEncrypedGa((service === null || service === void 0 ? void 0 : service.url) || '', encodedGaId) },
|
|
3037
2989
|
React__default["default"].createElement(core.Box, { className: "aspect-square" },
|
|
3038
2990
|
React__default["default"].createElement("img", { loading: "lazy", src: service.feature, alt: service.feature, key: index })),
|
|
3039
|
-
service.title && (React__default["default"].createElement(index$
|
|
2991
|
+
service.title && (React__default["default"].createElement(index$7.Text, { size: "p2", className: "si-service-title", color: "var(--subot-inline-text-color, #262626)" }, service.title))));
|
|
3040
2992
|
})),
|
|
3041
2993
|
disclaimerText && React__default["default"].createElement(Container$m, { text: disclaimerText })));
|
|
3042
2994
|
};
|
|
@@ -3061,7 +3013,7 @@ const Container$k = ({ intent }) => {
|
|
|
3061
3013
|
if (!(intent === null || intent === void 0 ? void 0 : intent.label)) {
|
|
3062
3014
|
return null;
|
|
3063
3015
|
}
|
|
3064
|
-
const isMainBody = (intent === null || intent === void 0 ? void 0 : intent.type) === index$
|
|
3016
|
+
const isMainBody = (intent === null || intent === void 0 ? void 0 : intent.type) === index$3.NodeIntentType.BOT_MAIN_BODY;
|
|
3065
3017
|
return (React__default["default"].createElement(StyledWrap$e, { className: "si-bot-text" },
|
|
3066
3018
|
React__default["default"].createElement(Markdown, null, isMainBody
|
|
3067
3019
|
? replaceTextWithVariables(intent.label, listNodes)
|
|
@@ -3177,30 +3129,30 @@ const Container$i = ({ intent, }) => {
|
|
|
3177
3129
|
Container$i.displayName = 'SubotInlineIntentUrl';
|
|
3178
3130
|
|
|
3179
3131
|
const SubotInlineIntentBaseTarget = {
|
|
3180
|
-
[index$
|
|
3181
|
-
[index$
|
|
3182
|
-
[index$
|
|
3183
|
-
[index$
|
|
3132
|
+
[index$3.NodeIntentType.BOT_TEXT]: Container$k,
|
|
3133
|
+
[index$3.NodeIntentType.BOT_IMAGE]: Container$q,
|
|
3134
|
+
[index$3.NodeIntentType.BOT_BUTTON]: Container$r,
|
|
3135
|
+
[index$3.NodeIntentType.BOT_URL]: Container$i,
|
|
3184
3136
|
// In the revamp UI, recalculate as a normal button
|
|
3185
|
-
[index$
|
|
3186
|
-
[index$
|
|
3187
|
-
[index$
|
|
3188
|
-
[index$
|
|
3189
|
-
[index$
|
|
3190
|
-
[index$
|
|
3191
|
-
[index$
|
|
3137
|
+
[index$3.NodeIntentType.BOT_RECALCULATE]: Container$r,
|
|
3138
|
+
[index$3.NodeIntentType.BOT_MAIN_TITLE]: Container$p,
|
|
3139
|
+
[index$3.NodeIntentType.BOT_MAIN_IMAGE]: Container$q,
|
|
3140
|
+
[index$3.NodeIntentType.BOT_MAIN_BODY]: Container$k,
|
|
3141
|
+
[index$3.NodeIntentType.BOT_MAIN_BUTTON]: Container$r,
|
|
3142
|
+
[index$3.NodeIntentType.BOT_SUB_TITLE]: Container$k,
|
|
3143
|
+
[index$3.NodeIntentType.BOT_SUB_BODY]: Container$k,
|
|
3192
3144
|
// [NodeIntentType.BOT_LANDING_PAGE_URL]: SubotInlineIntentBotText,
|
|
3193
3145
|
// [NodeIntentType.BOT_LANDING_PAGE_BUTTON]: SubotInlineIntentBotText,
|
|
3194
3146
|
// [NodeIntentType.BOT_RISK_SCREEN]: SubotInlineIntentBotRiskScreener,
|
|
3195
|
-
[index$
|
|
3196
|
-
[index$
|
|
3197
|
-
[index$
|
|
3198
|
-
[index$
|
|
3199
|
-
[index$
|
|
3200
|
-
[index$
|
|
3201
|
-
[index$
|
|
3147
|
+
[index$3.NodeIntentType.BOT_RELATED_ARTICLE]: Container$n,
|
|
3148
|
+
[index$3.NodeIntentType.THANK_YOU_IMAGE]: Container$q,
|
|
3149
|
+
[index$3.NodeIntentType.THANK_YOU_TITLE]: Container$k,
|
|
3150
|
+
[index$3.NodeIntentType.THANK_YOU_BODY]: Container$k,
|
|
3151
|
+
[index$3.NodeIntentType.BOT_SUGGESTED_SERVICE]: Container$l,
|
|
3152
|
+
[index$3.NodeIntentType.BOT_BOOKING]: Container$r,
|
|
3153
|
+
[index$3.NodeIntentType.BOT_EVENT_SUBMISSION]: Container$o,
|
|
3202
3154
|
/** intents fake for sso block */
|
|
3203
|
-
[index$
|
|
3155
|
+
[index$3.NodeIntentType.SSO_INTENT]: Container$j,
|
|
3204
3156
|
};
|
|
3205
3157
|
const SubotInlineIntentBase$1 = new Proxy(SubotInlineIntentBaseTarget, {
|
|
3206
3158
|
get(_, prop) {
|
|
@@ -3216,13 +3168,13 @@ const SubotInlineIntentBase$1 = new Proxy(SubotInlineIntentBaseTarget, {
|
|
|
3216
3168
|
});
|
|
3217
3169
|
|
|
3218
3170
|
const excludeIntents = [
|
|
3219
|
-
index$
|
|
3220
|
-
index$
|
|
3171
|
+
index$3.NodeIntentType.BOT_SUBMISSION,
|
|
3172
|
+
index$3.NodeIntentType.BOT_BACKGROUND_IMAGE,
|
|
3221
3173
|
];
|
|
3222
3174
|
const Container$h = ({ intents: intentsProp, indexNumber, }) => {
|
|
3223
3175
|
const filteredIntents = intentsProp.filter((intent) => !excludeIntents.includes(intent.type || ''));
|
|
3224
|
-
const intentTitle = filteredIntents.find((intent) => intent.type === index$
|
|
3225
|
-
const intents = filteredIntents.filter((intent) => intent.type !== index$
|
|
3176
|
+
const intentTitle = filteredIntents.find((intent) => intent.type === index$3.NodeIntentType.BOT_MAIN_TITLE);
|
|
3177
|
+
const intents = filteredIntents.filter((intent) => intent.type !== index$3.NodeIntentType.BOT_MAIN_TITLE);
|
|
3226
3178
|
return (React__default["default"].createElement(StyledWrap$l, { "data-intent-count": intents.length + 1 },
|
|
3227
3179
|
intentTitle && (React__default["default"].createElement(Container$p, { intent: intentTitle, indexNumber: indexNumber })),
|
|
3228
3180
|
!!intents.length && (React__default["default"].createElement("div", { className: "si-intent-list" }, intents.map((intent) => {
|
|
@@ -3472,41 +3424,41 @@ const Container$f = ({ node }) => {
|
|
|
3472
3424
|
let botSubmissionIntent = undefined;
|
|
3473
3425
|
intentsProps.forEach((intent) => {
|
|
3474
3426
|
switch (intent === null || intent === void 0 ? void 0 : intent.type) {
|
|
3475
|
-
case index$
|
|
3427
|
+
case index$3.NodeIntentType.BOT_MAIN_IMAGE:
|
|
3476
3428
|
mainIntents.push(intent);
|
|
3477
3429
|
break;
|
|
3478
|
-
case index$
|
|
3430
|
+
case index$3.NodeIntentType.BOT_MAIN_TITLE:
|
|
3479
3431
|
mainIntents.push(intent);
|
|
3480
3432
|
break;
|
|
3481
|
-
case index$
|
|
3433
|
+
case index$3.NodeIntentType.BOT_MAIN_BODY:
|
|
3482
3434
|
mainIntents.push(intent);
|
|
3483
3435
|
break;
|
|
3484
|
-
case index$
|
|
3436
|
+
case index$3.NodeIntentType.BOT_SUGGESTED_SERVICE:
|
|
3485
3437
|
suggestedServiceIntents.push(intent);
|
|
3486
3438
|
break;
|
|
3487
|
-
case index$
|
|
3439
|
+
case index$3.NodeIntentType.BOT_MAIN_BUTTON:
|
|
3488
3440
|
mainButtonIntents.push(intent);
|
|
3489
3441
|
break;
|
|
3490
|
-
case index$
|
|
3442
|
+
case index$3.NodeIntentType.BOT_BOOKING:
|
|
3491
3443
|
bookingButtonIntents.push(intent);
|
|
3492
3444
|
break;
|
|
3493
|
-
case index$
|
|
3445
|
+
case index$3.NodeIntentType.BOT_RECALCULATE:
|
|
3494
3446
|
// mainIntents.push(intent)
|
|
3495
3447
|
// TODO: Do not apply. Inline Revamp has "Start Over" btn already
|
|
3496
3448
|
break;
|
|
3497
|
-
case index$
|
|
3449
|
+
case index$3.NodeIntentType.BOT_SUB_TITLE:
|
|
3498
3450
|
subIntents.push(intent);
|
|
3499
3451
|
break;
|
|
3500
|
-
case index$
|
|
3452
|
+
case index$3.NodeIntentType.BOT_SUB_BODY:
|
|
3501
3453
|
subIntents.push(intent);
|
|
3502
3454
|
break;
|
|
3503
|
-
case index$
|
|
3455
|
+
case index$3.NodeIntentType.BOT_RELATED_ARTICLE:
|
|
3504
3456
|
relatedArticleIntents.push(intent);
|
|
3505
3457
|
break;
|
|
3506
|
-
case index$
|
|
3458
|
+
case index$3.NodeIntentType.BOT_RISK_SCREEN:
|
|
3507
3459
|
screenerIntents.push(intent);
|
|
3508
3460
|
break;
|
|
3509
|
-
case index$
|
|
3461
|
+
case index$3.NodeIntentType.BOT_SUBMISSION:
|
|
3510
3462
|
botSubmissionIntent = intent;
|
|
3511
3463
|
break;
|
|
3512
3464
|
}
|
|
@@ -3552,7 +3504,7 @@ const Container$f = ({ node }) => {
|
|
|
3552
3504
|
return NodeIntent && React__default["default"].createElement(NodeIntent, { key: intent.id, intent: intent });
|
|
3553
3505
|
}))),
|
|
3554
3506
|
(relatedArticleIntents === null || relatedArticleIntents === void 0 ? void 0 : relatedArticleIntents.length) > 0 && (React__default["default"].createElement("div", { style: { marginTop: 24 } },
|
|
3555
|
-
React__default["default"].createElement(index$
|
|
3507
|
+
React__default["default"].createElement(index$7.Text, { size: "lg", weight: "semiBold", color: "var(--subot-inline-text-color, #262626)" }, f({
|
|
3556
3508
|
id: 'articlePage.relatedPostsSectionTitle',
|
|
3557
3509
|
defaultMessage: 'Related Articles',
|
|
3558
3510
|
})),
|
|
@@ -3577,7 +3529,7 @@ const Container$e = ({ node }) => {
|
|
|
3577
3529
|
}, []);
|
|
3578
3530
|
const resultButton = React.useMemo(() => {
|
|
3579
3531
|
var _a;
|
|
3580
|
-
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$
|
|
3532
|
+
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$3.NodeActionType.RESULT_BUTTON);
|
|
3581
3533
|
if (_resultButton)
|
|
3582
3534
|
return _resultButton;
|
|
3583
3535
|
return null;
|
|
@@ -3591,7 +3543,7 @@ const Container$e = ({ node }) => {
|
|
|
3591
3543
|
return (React__default["default"].createElement(StyledWrap$b, { id: "si-node-final-thank-you" },
|
|
3592
3544
|
React__default["default"].createElement(Container$h, { intents: node.intents || [] }),
|
|
3593
3545
|
resultButton && (React__default["default"].createElement("div", { className: "si-final-thank-action" },
|
|
3594
|
-
React__default["default"].createElement(index$
|
|
3546
|
+
React__default["default"].createElement(index$5.Button, { size: "md", onClick: handleOnNext }, resultButton.label)))));
|
|
3595
3547
|
};
|
|
3596
3548
|
Container$e.displayName = 'SubotinlineNodeFinal';
|
|
3597
3549
|
|
|
@@ -4301,7 +4253,7 @@ function GoogleAddressField({ action, formError, control, initValue, onChange, }
|
|
|
4301
4253
|
}, render: (props) => {
|
|
4302
4254
|
const { address = '' } = (props.field.value || {});
|
|
4303
4255
|
console.log('props', props);
|
|
4304
|
-
return (React__default["default"].createElement(index$
|
|
4256
|
+
return (React__default["default"].createElement(index$8.Select, { data: options, icon: React__default["default"].createElement(Location, null), itemComponent: SelectItem,
|
|
4305
4257
|
// Always display the suggestions
|
|
4306
4258
|
filter: () => true, searchable: true, className: classNames__default["default"]({
|
|
4307
4259
|
isEmpty: options.length === 0 ||
|
|
@@ -4809,57 +4761,57 @@ const StyleWrapperFullAddress = styled__default["default"].div `
|
|
|
4809
4761
|
`;
|
|
4810
4762
|
|
|
4811
4763
|
const getActionEmail = (actions) => {
|
|
4812
|
-
return actions.find(({ type }) => type === index$
|
|
4764
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_EMAIL);
|
|
4813
4765
|
};
|
|
4814
4766
|
const getActionName = (actions) => {
|
|
4815
|
-
return actions.find(({ type }) => type === index$
|
|
4767
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_NAME);
|
|
4816
4768
|
};
|
|
4817
4769
|
const getActionPhone = (actions) => {
|
|
4818
|
-
return actions.find(({ type }) => type === index$
|
|
4770
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_PHONE);
|
|
4819
4771
|
};
|
|
4820
4772
|
const getActionOtp = (actions) => {
|
|
4821
|
-
return actions.find(({ type }) => type === index$
|
|
4773
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_OTP);
|
|
4822
4774
|
};
|
|
4823
4775
|
const getActionOtpWhatsApp = (actions) => {
|
|
4824
|
-
return actions.find(({ type }) => type === index$
|
|
4776
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4825
4777
|
};
|
|
4826
4778
|
const getActionConfirm = (actions) => {
|
|
4827
|
-
return actions.find(({ type }) => type === index$
|
|
4779
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_CONFIRM);
|
|
4828
4780
|
};
|
|
4829
4781
|
const isControlOtp = (control) => {
|
|
4830
|
-
return (control === index$
|
|
4831
|
-
control === index$
|
|
4782
|
+
return (control === index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP] ||
|
|
4783
|
+
control === index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_WHATSAPP]);
|
|
4832
4784
|
};
|
|
4833
4785
|
const isActionTypeOtp = (type) => {
|
|
4834
|
-
return (type === index$
|
|
4835
|
-
type === index$
|
|
4786
|
+
return (type === index$3.NodeActionType.USER_SUBMIT_OTP ||
|
|
4787
|
+
type === index$3.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4836
4788
|
};
|
|
4837
4789
|
const getTranslateVerifiedOtpMessages = () => {
|
|
4838
4790
|
const phoneWasVerifiedMessage = new Map();
|
|
4839
|
-
phoneWasVerifiedMessage.set(index$
|
|
4840
|
-
phoneWasVerifiedMessage.set(index$
|
|
4841
|
-
phoneWasVerifiedMessage.set(index$
|
|
4842
|
-
phoneWasVerifiedMessage.set(index$
|
|
4843
|
-
phoneWasVerifiedMessage.set(index$
|
|
4844
|
-
phoneWasVerifiedMessage.set(index$
|
|
4845
|
-
phoneWasVerifiedMessage.set(index$
|
|
4846
|
-
phoneWasVerifiedMessage.set(index$
|
|
4847
|
-
phoneWasVerifiedMessage.set(index$
|
|
4848
|
-
phoneWasVerifiedMessage.set(index$
|
|
4791
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Vietnam, 'Số điện thoại này đã được xác minh.');
|
|
4792
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.PhilippinesEnglish, 'This phone number has been verified.');
|
|
4793
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Cambodia, 'លេខទូរស័ព្ទនេះត្រូវបានផ្ទៀងផ្ទាត់។');
|
|
4794
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.India, 'इस फ़ोन नंबर की पुष्टि कर दी गई है.');
|
|
4795
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Indonesia, 'Nomor telepon ini telah diverifikasi.');
|
|
4796
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Malaysia, 'Nombor telefon ini telah disahkan.');
|
|
4797
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Myanmar, 'ဤဖုန်းနံပါတ်ကို စစ်ဆေးပြီးပါပြီ။');
|
|
4798
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Taiwan, '該電話號碼已經過驗證。');
|
|
4799
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.Thailand, 'หมายเลขโทรศัพท์นี้ได้รับการตรวจสอบแล้ว');
|
|
4800
|
+
phoneWasVerifiedMessage.set(index$3.LOCALE.PhilippinesTagalog, 'Na-verify na ang numero ng teleponong ito.');
|
|
4849
4801
|
return phoneWasVerifiedMessage;
|
|
4850
4802
|
};
|
|
4851
4803
|
const getTransPleaseVerifiedOtp = () => {
|
|
4852
4804
|
const pleaseVerifiedOtp = new Map();
|
|
4853
|
-
pleaseVerifiedOtp.set(index$
|
|
4854
|
-
pleaseVerifiedOtp.set(index$
|
|
4855
|
-
pleaseVerifiedOtp.set(index$
|
|
4856
|
-
pleaseVerifiedOtp.set(index$
|
|
4857
|
-
pleaseVerifiedOtp.set(index$
|
|
4858
|
-
pleaseVerifiedOtp.set(index$
|
|
4859
|
-
pleaseVerifiedOtp.set(index$
|
|
4860
|
-
pleaseVerifiedOtp.set(index$
|
|
4861
|
-
pleaseVerifiedOtp.set(index$
|
|
4862
|
-
pleaseVerifiedOtp.set(index$
|
|
4805
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Vietnam, 'Vui lòng xác minh số điện thoại');
|
|
4806
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.PhilippinesEnglish, 'Please verify your phone number');
|
|
4807
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Cambodia, 'សូមផ្ទៀងផ្ទាត់លេខទូរស័ព្ទរបស់អ្នក។');
|
|
4808
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.India, 'कृपया अपना फ़ोन नंबर सत्यापित करें');
|
|
4809
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Indonesia, 'Harap verifikasi nomor telepon AndaNomor telepon ini telah diverifikasi.');
|
|
4810
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Malaysia, 'Sila sahkan nombor telefon anda');
|
|
4811
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Myanmar, 'သင့်ဖုန်းနံပါတ်ကို အတည်ပြုပါ။');
|
|
4812
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Taiwan, '請驗證您的電話號碼');
|
|
4813
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.Thailand, 'กรุณาตรวจสอบหมายเลขโทรศัพท์ของคุณ');
|
|
4814
|
+
pleaseVerifiedOtp.set(index$3.LOCALE.PhilippinesTagalog, 'Paki-verify ang iyong numero ng telepono');
|
|
4863
4815
|
return pleaseVerifiedOtp;
|
|
4864
4816
|
};
|
|
4865
4817
|
const validateDateField = (value, isSubmitting, f, cb) => {
|
|
@@ -5138,10 +5090,10 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5138
5090
|
}
|
|
5139
5091
|
data[d.key] = d.value;
|
|
5140
5092
|
if ([
|
|
5141
|
-
index$
|
|
5142
|
-
index$
|
|
5093
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DATE],
|
|
5094
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB],
|
|
5143
5095
|
].includes(d.control)) {
|
|
5144
|
-
data[d.key] = dayjs__default["default"](d.value, index$
|
|
5096
|
+
data[d.key] = dayjs__default["default"](d.value, index$4.API_DATE_FORMAT).toDate();
|
|
5145
5097
|
}
|
|
5146
5098
|
});
|
|
5147
5099
|
if (data['otpPhoneNumber']) {
|
|
@@ -5186,39 +5138,39 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5186
5138
|
}, [botId, nodeId, JSON.stringify(trackingSubmitBtn)]);
|
|
5187
5139
|
const firstActionAddressIndex = React.useMemo(() => {
|
|
5188
5140
|
return actions.findIndex((action) => {
|
|
5189
|
-
return index$
|
|
5141
|
+
return index$3.FULL_KEY_ADDRESS.includes(action.type);
|
|
5190
5142
|
});
|
|
5191
5143
|
}, [actions]);
|
|
5192
5144
|
const actionAddress = React.useMemo(() => {
|
|
5193
5145
|
return actions.find((action) => {
|
|
5194
|
-
return index$
|
|
5146
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS === action.type;
|
|
5195
5147
|
});
|
|
5196
5148
|
}, [actions]);
|
|
5197
5149
|
const actionAddressLever1 = React.useMemo(() => {
|
|
5198
5150
|
return actions.find((action) => {
|
|
5199
|
-
return index$
|
|
5151
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE === action.type;
|
|
5200
5152
|
});
|
|
5201
5153
|
}, [actions]);
|
|
5202
5154
|
const actionAddressLever2 = React.useMemo(() => {
|
|
5203
5155
|
return actions.find((action) => {
|
|
5204
|
-
return index$
|
|
5156
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT === action.type;
|
|
5205
5157
|
});
|
|
5206
5158
|
}, [actions]);
|
|
5207
5159
|
const actionAddressLever3 = React.useMemo(() => {
|
|
5208
5160
|
return actions.find((action) => {
|
|
5209
|
-
return index$
|
|
5161
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE === action.type;
|
|
5210
5162
|
});
|
|
5211
5163
|
}, [actions]);
|
|
5212
5164
|
const { labelInputDate } = React.useMemo(() => {
|
|
5213
|
-
const { dateFormat } = (index$
|
|
5165
|
+
const { dateFormat } = (index$4.ISO_FORMAT === null || index$4.ISO_FORMAT === void 0 ? void 0 : index$4.ISO_FORMAT[locale]) || index$4.ISO_FORMAT['vi-VN'];
|
|
5214
5166
|
return {
|
|
5215
5167
|
dateFormat,
|
|
5216
5168
|
labelInputDate: dateFormat
|
|
5217
5169
|
.split('/')
|
|
5218
|
-
.map((key) => f(index$
|
|
5170
|
+
.map((key) => f(index$3.COMMON_DATE_TRANSLATE_KEY === null || index$3.COMMON_DATE_TRANSLATE_KEY === void 0 ? void 0 : index$3.COMMON_DATE_TRANSLATE_KEY[key])),
|
|
5219
5171
|
};
|
|
5220
5172
|
}, [locale, f]);
|
|
5221
|
-
const inputType = index$
|
|
5173
|
+
const inputType = index$3.ELEMENT_CONTROL_INPUT_TYPE;
|
|
5222
5174
|
const { register, handleSubmit, watch, formState: { errors, isSubmitting }, control, setValue, setError, clearErrors, getValues, trigger, } = reactHookForm.useForm({ defaultValues: defaultFormValues });
|
|
5223
5175
|
const setSubmitData = (data) => {
|
|
5224
5176
|
const submitMeta = [];
|
|
@@ -5226,9 +5178,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5226
5178
|
if (!action.key) {
|
|
5227
5179
|
continue;
|
|
5228
5180
|
}
|
|
5229
|
-
if (action.type !== index$
|
|
5230
|
-
action.type !== index$
|
|
5231
|
-
if (action.type === index$
|
|
5181
|
+
if (action.type !== index$3.NodeActionType.USER_SUBMIT_CONFIRM &&
|
|
5182
|
+
action.type !== index$3.NodeActionType.USER_SUBMIT_TERMS) {
|
|
5183
|
+
if (action.type === index$3.NodeActionType.USER_SUBMIT_GOOGLE_API_ADDRESS) {
|
|
5232
5184
|
/** If it's google api address, admin cannot add address province/district/commune and address freetext */
|
|
5233
5185
|
const googleMapData = data[action.key];
|
|
5234
5186
|
googleMapAddressKeys.forEach((addressKey) => {
|
|
@@ -5241,9 +5193,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5241
5193
|
}
|
|
5242
5194
|
});
|
|
5243
5195
|
}
|
|
5244
|
-
else if (action.type === index$
|
|
5245
|
-
action.type === index$
|
|
5246
|
-
action.type === index$
|
|
5196
|
+
else if (action.type === index$3.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE ||
|
|
5197
|
+
action.type === index$3.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT ||
|
|
5198
|
+
action.type === index$3.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE) {
|
|
5247
5199
|
submitMeta.push({
|
|
5248
5200
|
key: action.key,
|
|
5249
5201
|
control: inputType[action.type] || '',
|
|
@@ -5251,22 +5203,22 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5251
5203
|
value: data[action.key].label || '',
|
|
5252
5204
|
});
|
|
5253
5205
|
}
|
|
5254
|
-
else if (action.type === index$
|
|
5255
|
-
action.type === index$
|
|
5206
|
+
else if (action.type === index$3.NodeActionType.USER_SUBMIT_DOB ||
|
|
5207
|
+
action.type === index$3.NodeActionType.USER_SUBMIT_DATE) {
|
|
5256
5208
|
const dobStr = (data[action.key] || '');
|
|
5257
5209
|
const dayInJS = dayjs__default["default"](dobStr);
|
|
5258
5210
|
if (dayInJS.isValid()) {
|
|
5259
5211
|
submitMeta.push({
|
|
5260
5212
|
key: action.key,
|
|
5261
5213
|
control: inputType[action.type] || '',
|
|
5262
|
-
value: dayInJS.format(index$
|
|
5214
|
+
value: dayInJS.format(index$4.API_DATE_FORMAT),
|
|
5263
5215
|
});
|
|
5264
5216
|
}
|
|
5265
5217
|
}
|
|
5266
5218
|
else if (isActionTypeOtp(action.type)) {
|
|
5267
5219
|
submitMeta.push({
|
|
5268
5220
|
key: action.key,
|
|
5269
|
-
control: index$
|
|
5221
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP],
|
|
5270
5222
|
value: data.otpPhoneNumber,
|
|
5271
5223
|
});
|
|
5272
5224
|
}
|
|
@@ -5292,7 +5244,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5292
5244
|
}
|
|
5293
5245
|
}
|
|
5294
5246
|
}
|
|
5295
|
-
const actionArr = actions.filter((action) => action.type === index$
|
|
5247
|
+
const actionArr = actions.filter((action) => action.type === index$3.NodeActionType.USER_SUBMIT_SEND);
|
|
5296
5248
|
const submitData = {
|
|
5297
5249
|
action_id: actionArr[0].id,
|
|
5298
5250
|
action_value: actionArr[0].key,
|
|
@@ -5354,7 +5306,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5354
5306
|
}
|
|
5355
5307
|
setIsLoading(true);
|
|
5356
5308
|
try {
|
|
5357
|
-
const result = yield callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5309
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5358
5310
|
? PATHS$1.POST_SEND_OTP_WHATSAPP
|
|
5359
5311
|
: PATHS$1.POST_SEND_OTP), actionOtpWhatsApp ? 'whatsapp_otp' : 'sms_otp', actionOtpWhatsApp
|
|
5360
5312
|
? {
|
|
@@ -5366,13 +5318,13 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5366
5318
|
});
|
|
5367
5319
|
setIsLoading(false);
|
|
5368
5320
|
const { _status, _errorCode } = result;
|
|
5369
|
-
if (isSubotCaptchaForbidden(result)) {
|
|
5321
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
5370
5322
|
if (countRef.current) {
|
|
5371
5323
|
countRef.current.cancel();
|
|
5372
5324
|
}
|
|
5373
5325
|
pushNotifications({
|
|
5374
5326
|
title: '',
|
|
5375
|
-
message: f(SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5327
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5376
5328
|
type: 'warning',
|
|
5377
5329
|
});
|
|
5378
5330
|
return;
|
|
@@ -5398,7 +5350,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5398
5350
|
title: '',
|
|
5399
5351
|
message: f(OTP_VERIFIED_MSG_CODE === null || OTP_VERIFIED_MSG_CODE === void 0 ? void 0 : OTP_VERIFIED_MSG_CODE[_errorCode]) ||
|
|
5400
5352
|
messages.get(locale) ||
|
|
5401
|
-
messages.get(index$
|
|
5353
|
+
messages.get(index$3.LOCALE.PhilippinesEnglish),
|
|
5402
5354
|
type: 'success',
|
|
5403
5355
|
});
|
|
5404
5356
|
clearErrors(((_a = getActionOtp(actions)) === null || _a === void 0 ? void 0 : _a.key) || ((_b = getActionOtpWhatsApp(actions)) === null || _b === void 0 ? void 0 : _b.key));
|
|
@@ -5441,7 +5393,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5441
5393
|
const parsedPhone = PhoneInputBase.parsePhoneNumber(data.otpPhoneNumber);
|
|
5442
5394
|
if (action.key && parsedPhone) {
|
|
5443
5395
|
try {
|
|
5444
|
-
const result = yield callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5396
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5445
5397
|
? PATHS$1.POST_VERIFY_OTP_WHATSAPP
|
|
5446
5398
|
: PATHS$1.POST_VERIFY_OTP), actionOtpWhatsApp ? 'whatsapp_verify' : 'sms_verify', actionOtpWhatsApp
|
|
5447
5399
|
? {
|
|
@@ -5470,8 +5422,8 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5470
5422
|
catch (error) {
|
|
5471
5423
|
const errMessage = JSON.parse(error.message);
|
|
5472
5424
|
const { _errorCode } = errMessage || {};
|
|
5473
|
-
const message = f(isSubotCaptchaForbidden(errMessage)
|
|
5474
|
-
? SUBOT_CAPTCHA_FAILED_MESSAGE
|
|
5425
|
+
const message = f(index$2.isSubotCaptchaForbidden(errMessage)
|
|
5426
|
+
? index$2.SUBOT_CAPTCHA_FAILED_MESSAGE
|
|
5475
5427
|
: OTP_VERIFIED_MSG_CODE === null || OTP_VERIFIED_MSG_CODE === void 0 ? void 0 : OTP_VERIFIED_MSG_CODE[_errorCode]) || f({ id: 'validation.error.validOTP' });
|
|
5476
5428
|
pushNotifications({ title: '', message, type: 'danger' });
|
|
5477
5429
|
setError('otpCode', { type: 'custom', message });
|
|
@@ -5503,7 +5455,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5503
5455
|
required: true,
|
|
5504
5456
|
}, render: (props) => {
|
|
5505
5457
|
var _a;
|
|
5506
|
-
return (React__default["default"].createElement(index$
|
|
5458
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever1.id, options: provinceData, onChange: (val) => {
|
|
5507
5459
|
props.field.onChange(val);
|
|
5508
5460
|
handleSelectedProvince(val);
|
|
5509
5461
|
}, value: props.field.value, placeholder: (actionAddressLever1 === null || actionAddressLever1 === void 0 ? void 0 : actionAddressLever1.label) || '', className: `address-dropdown ${((_a = props.field.value) === null || _a === void 0 ? void 0 : _a.value) ? '' : 'show-placeholder'}` }));
|
|
@@ -5519,7 +5471,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5519
5471
|
required: true,
|
|
5520
5472
|
}, render: (props) => {
|
|
5521
5473
|
var _a;
|
|
5522
|
-
return (React__default["default"].createElement(index$
|
|
5474
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever2.id, options: districtData, onChange: (val) => {
|
|
5523
5475
|
props.field.onChange(val);
|
|
5524
5476
|
handleSelectedDistrict(val);
|
|
5525
5477
|
}, value: props.field.value, placeholder: (actionAddressLever2 === null || actionAddressLever2 === void 0 ? void 0 : actionAddressLever2.label) || '', className: `address-dropdown ${((_a = props.field.value) === null || _a === void 0 ? void 0 : _a.value) ? '' : 'show-placeholder'}` }));
|
|
@@ -5535,7 +5487,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5535
5487
|
required: true,
|
|
5536
5488
|
}, render: (props) => {
|
|
5537
5489
|
var _a;
|
|
5538
|
-
return (React__default["default"].createElement(index$
|
|
5490
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever3.id, options: communeData, onChange: (val) => {
|
|
5539
5491
|
props.field.onChange(val);
|
|
5540
5492
|
}, value: props.field.value, placeholder: (actionAddressLever3 === null || actionAddressLever3 === void 0 ? void 0 : actionAddressLever3.label) || '', className: `address-dropdown ${((_a = props.field.value) === null || _a === void 0 ? void 0 : _a.value) ? '' : 'show-placeholder'}` }));
|
|
5541
5493
|
} })),
|
|
@@ -5553,20 +5505,20 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5553
5505
|
return renderFullAddressInput();
|
|
5554
5506
|
}
|
|
5555
5507
|
switch (action.type) {
|
|
5556
|
-
case index$
|
|
5508
|
+
case index$3.NodeActionType.USER_SUBMIT_DROPDOWN:
|
|
5557
5509
|
const options = action.url ? action.url.split('\n') : [];
|
|
5558
5510
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5559
5511
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5560
5512
|
React__default["default"].createElement(reactHookForm.Controller, { key: action.key, control: control, name: action.key, rules: {
|
|
5561
5513
|
required: true,
|
|
5562
5514
|
}, render: ({ field }) => {
|
|
5563
|
-
return (React__default["default"].createElement(index$
|
|
5515
|
+
return (React__default["default"].createElement(index$8.Select, Object.assign({ searchable: true, data: options, placeholder: action.label }, field, { withinPortal: true, zIndex: 1000 })));
|
|
5564
5516
|
} }),
|
|
5565
5517
|
errors[action.key] && (React__default["default"].createElement("p", { className: "error-message" }, f({
|
|
5566
5518
|
id: 'validation.error.requiredField',
|
|
5567
5519
|
defaultMessage: 'This field is required',
|
|
5568
5520
|
})))));
|
|
5569
|
-
case index$
|
|
5521
|
+
case index$3.NodeActionType.USER_SUBMIT_EMAIL:
|
|
5570
5522
|
const emailPattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
5571
5523
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5572
5524
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
@@ -5583,7 +5535,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5583
5535
|
id: 'validation.error.validEmail',
|
|
5584
5536
|
defaultMessage: 'Please enter a valid email address.',
|
|
5585
5537
|
})))));
|
|
5586
|
-
case index$
|
|
5538
|
+
case index$3.NodeActionType.USER_SUBMIT_NAME:
|
|
5587
5539
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5588
5540
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5589
5541
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5591,7 +5543,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5591
5543
|
id: 'validation.error.requiredField',
|
|
5592
5544
|
defaultMessage: 'This field is required',
|
|
5593
5545
|
})))));
|
|
5594
|
-
case index$
|
|
5546
|
+
case index$3.NodeActionType.USER_SUBMIT_PHONE:
|
|
5595
5547
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5596
5548
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5597
5549
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -5602,7 +5554,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5602
5554
|
id: 'validation.error.validNumber',
|
|
5603
5555
|
defaultMessage: 'Please enter a valid number.',
|
|
5604
5556
|
})))));
|
|
5605
|
-
case index$
|
|
5557
|
+
case index$3.NodeActionType.USER_SUBMIT_NUMBER:
|
|
5606
5558
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5607
5559
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5608
5560
|
React__default["default"].createElement("input", Object.assign({ type: "number", id: action.id }, register(action.key, { required: true }))),
|
|
@@ -5610,7 +5562,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5610
5562
|
id: 'validation.error.requiredField',
|
|
5611
5563
|
defaultMessage: 'This field is required',
|
|
5612
5564
|
})))));
|
|
5613
|
-
case index$
|
|
5565
|
+
case index$3.NodeActionType.USER_SUBMIT_DATE:
|
|
5614
5566
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5615
5567
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5616
5568
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -5638,7 +5590,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5638
5590
|
}, labelTuples: labelInputDate, locale: locale, error: isError, className: "subot_input subot_input_date" }))),
|
|
5639
5591
|
isError && (React__default["default"].createElement("p", { className: "error-message" }, error === null || error === void 0 ? void 0 : error.message))));
|
|
5640
5592
|
} })));
|
|
5641
|
-
case index$
|
|
5593
|
+
case index$3.NodeActionType.USER_SUBMIT_BMI:
|
|
5642
5594
|
return (React__default["default"].createElement("div", { key: action.id },
|
|
5643
5595
|
React__default["default"].createElement("div", { className: "input-row", key: `${action.id}-height` },
|
|
5644
5596
|
React__default["default"].createElement("label", { htmlFor: `${action.key}-height` }, f({ id: 'home.bmi.input.height', defaultMessage: 'Height' })),
|
|
@@ -5654,7 +5606,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5654
5606
|
id: 'validation.error.requiredField',
|
|
5655
5607
|
defaultMessage: 'This field is required',
|
|
5656
5608
|
}))))));
|
|
5657
|
-
case index$
|
|
5609
|
+
case index$3.NodeActionType.USER_SUBMIT_GENDER:
|
|
5658
5610
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5659
5611
|
React__default["default"].createElement("label", null, action.label),
|
|
5660
5612
|
React__default["default"].createElement("div", { className: "radio-group" },
|
|
@@ -5678,7 +5630,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5678
5630
|
id: 'validation.error.requiredField',
|
|
5679
5631
|
defaultMessage: 'This field is required',
|
|
5680
5632
|
})))));
|
|
5681
|
-
case index$
|
|
5633
|
+
case index$3.NodeActionType.USER_SUBMIT_TEXT:
|
|
5682
5634
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5683
5635
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5684
5636
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5686,8 +5638,8 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5686
5638
|
id: 'validation.error.requiredField',
|
|
5687
5639
|
defaultMessage: 'This field is required',
|
|
5688
5640
|
})))));
|
|
5689
|
-
case index$
|
|
5690
|
-
case index$
|
|
5641
|
+
case index$3.NodeActionType.USER_SUBMIT_OTP:
|
|
5642
|
+
case index$3.NodeActionType.USER_SUBMIT_WHATSAPP:
|
|
5691
5643
|
return (React__default["default"].createElement("div", null,
|
|
5692
5644
|
React__default["default"].createElement("div", { className: "input-row input-row--otp" },
|
|
5693
5645
|
React__default["default"].createElement("label", { htmlFor: "otpPhoneNumber" }, action.label),
|
|
@@ -5717,7 +5669,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5717
5669
|
id: 'validation.error.validNumber',
|
|
5718
5670
|
defaultMessage: 'Please enter a valid number.',
|
|
5719
5671
|
})))),
|
|
5720
|
-
verifiedOTP ? ('') : (React__default["default"].createElement(index$
|
|
5672
|
+
verifiedOTP ? ('') : (React__default["default"].createElement(index$5.Button, Object.assign({ size: "sm", loading: isLoading, disabled: (!isFinishedCountDown && sentOTP) ||
|
|
5721
5673
|
isLoading ||
|
|
5722
5674
|
!PhoneInputBase.isPossiblePhoneNumber(watchOtp || ''), onClick: handleSendOTP, variant: "ghost", className: "btn-send-otp" }, trackingSendOTP), sentOTP ? (React__default["default"].createElement(CountDown$1, { ref: countRef, isFinished: isFinishedCountDown, onFinish: setIsFinishedCountDown })) : (React__default["default"].createElement("span", null, f({
|
|
5723
5675
|
id: 'subot.sendOTP.button',
|
|
@@ -5740,13 +5692,13 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5740
5692
|
React__default["default"].createElement("span", { className: "verify-success-label" }, f({
|
|
5741
5693
|
id: 'subot.verifyOTP.success.message',
|
|
5742
5694
|
defaultMessage: 'Verified successful',
|
|
5743
|
-
})))) : (React__default["default"].createElement(index$
|
|
5695
|
+
})))) : (React__default["default"].createElement(index$9.Button, Object.assign({ className: "submit-btn", size: isFormRevamp ? 'md' : 'lg', isLoading: isLoadingVerify, isDisabled: !sentOTP, onClick: (e) => handleVerifyOTP(e, action) }, trackingVerifyOTP), f({
|
|
5744
5696
|
id: 'subot.verifyOTP.button',
|
|
5745
5697
|
defaultMessage: 'Verify OTP',
|
|
5746
5698
|
})))))));
|
|
5747
|
-
case index$
|
|
5699
|
+
case index$3.NodeActionType.USER_SUBMIT_GOOGLE_API_ADDRESS:
|
|
5748
5700
|
return (React__default["default"].createElement(GoogleAddressField$1, { action: action, control: control, formError: errors[action.key], key: action.id, initValue: defaultFormValues === null || defaultFormValues === void 0 ? void 0 : defaultFormValues[action.key], onChange: setValue }));
|
|
5749
|
-
case index$
|
|
5701
|
+
case index$3.NodeActionType.USER_SUBMIT_DOB:
|
|
5750
5702
|
return (React__default["default"].createElement(DOB, { key: action.key, action: action, trigger: trigger, control: control, locale: locale, labelTuples: labelInputDate, isSubmitting: isSubmitting }));
|
|
5751
5703
|
default:
|
|
5752
5704
|
return '';
|
|
@@ -5754,17 +5706,17 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5754
5706
|
};
|
|
5755
5707
|
const renderFormSubmitAndTerms = (action) => {
|
|
5756
5708
|
switch (action.type) {
|
|
5757
|
-
case index$
|
|
5709
|
+
case index$3.NodeActionType.USER_SUBMIT_CONFIRM:
|
|
5758
5710
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5759
5711
|
React__default["default"].createElement("label", { className: "subot-checkbox" },
|
|
5760
5712
|
React__default["default"].createElement("input", Object.assign({}, register('confirm'), { type: "checkbox", defaultChecked: true, className: "subot-checkbox__input" })),
|
|
5761
5713
|
React__default["default"].createElement("span", { className: "subot-checkbox__label" },
|
|
5762
5714
|
React__default["default"].createElement(Markdown, null, action.label)))));
|
|
5763
|
-
case index$
|
|
5715
|
+
case index$3.NodeActionType.USER_SUBMIT_SEND:
|
|
5764
5716
|
const disabled = hasConfirm ? !confirm : false;
|
|
5765
5717
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5766
5718
|
React__default["default"].createElement("button", Object.assign({ id: action.id, className: "submit-btn", type: "submit", disabled: disabled }, trackingSubmit, { "data-response-id": action.id }), action.label)));
|
|
5767
|
-
case index$
|
|
5719
|
+
case index$3.NodeActionType.USER_SUBMIT_TERMS:
|
|
5768
5720
|
return (React__default["default"].createElement("div", { className: "form-terms", key: action.id },
|
|
5769
5721
|
React__default["default"].createElement(Markdown, null, action.label)));
|
|
5770
5722
|
default:
|
|
@@ -5795,10 +5747,10 @@ const Container$d = ({ node, indexNumber }) => {
|
|
|
5795
5747
|
checkSyncDataOnFrisoCampaign(listNodes[0], data.form_submit_meta);
|
|
5796
5748
|
const _message = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, params), node._message), data), getCurrentTotalDynamicScore(listNodes, activeId, data.action_id, data.form_submit_meta)), { node_id: node.id });
|
|
5797
5749
|
const res = yield subotInlineMessage$1(_message);
|
|
5798
|
-
if (isSubotCaptchaForbidden(res)) {
|
|
5750
|
+
if (index$2.isSubotCaptchaForbidden(res)) {
|
|
5799
5751
|
pushNotifications({
|
|
5800
5752
|
title: '',
|
|
5801
|
-
message: f(SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5753
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5802
5754
|
type: 'warning',
|
|
5803
5755
|
});
|
|
5804
5756
|
return;
|
|
@@ -5985,7 +5937,7 @@ const Container$b = ({ action, onChange }) => {
|
|
|
5985
5937
|
const currentUrl = useCurrentUrl();
|
|
5986
5938
|
const { params, activeId } = React.useContext(SubotInlineContext$1);
|
|
5987
5939
|
return (React__default["default"].createElement(StyledWrap$6, null,
|
|
5988
|
-
React__default["default"].createElement(index$
|
|
5940
|
+
React__default["default"].createElement(index$5.Button, { onClick: () => onChange && onChange(action), size: "lg", "data-event-category": "Service Connection", "data-event-action": "Risk Screening Sign Up for Result", "data-event-label": currentUrl, "data-bot-id": params.bot_id, "data-event-question-id": activeId, styles: {
|
|
5989
5941
|
root: {
|
|
5990
5942
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
5991
5943
|
'&:hover': {
|
|
@@ -6046,8 +5998,8 @@ const Container$a = ({ action, onChange, active, htmlType, formSubmitMeta, }) =>
|
|
|
6046
5998
|
const inputRef = React.useRef(null);
|
|
6047
5999
|
const [otherText, setOtherText] = React.useState('');
|
|
6048
6000
|
const { params } = React.useContext(SubotInlineContext$1);
|
|
6049
|
-
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6050
|
-
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6001
|
+
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
6002
|
+
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
6051
6003
|
isActionPollWithOther;
|
|
6052
6004
|
React.useEffect(() => {
|
|
6053
6005
|
var _a, _b;
|
|
@@ -6084,7 +6036,7 @@ const Container$9 = ({ action, onChange, active, htmlType, }) => {
|
|
|
6084
6036
|
if (action && onChange) {
|
|
6085
6037
|
onChange({
|
|
6086
6038
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6087
|
-
control: index$
|
|
6039
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
6088
6040
|
value: '',
|
|
6089
6041
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6090
6042
|
});
|
|
@@ -6100,7 +6052,7 @@ const Container$8 = ({ action, onChange, active, htmlType, }) => {
|
|
|
6100
6052
|
if (action && onChange) {
|
|
6101
6053
|
onChange({
|
|
6102
6054
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6103
|
-
control: index$
|
|
6055
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
6104
6056
|
value: '',
|
|
6105
6057
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6106
6058
|
});
|
|
@@ -6112,14 +6064,14 @@ Container$8.displayName = 'SubotInlinePollChoiceImage';
|
|
|
6112
6064
|
|
|
6113
6065
|
const SubotInlineActionBaseTarget = {
|
|
6114
6066
|
// 'user-image': SubotInlineActionImageChoice,
|
|
6115
|
-
[index$
|
|
6116
|
-
[index$
|
|
6117
|
-
[index$
|
|
6118
|
-
[index$
|
|
6119
|
-
[index$
|
|
6120
|
-
[index$
|
|
6121
|
-
[index$
|
|
6122
|
-
[index$
|
|
6067
|
+
[index$3.NodeActionType.USER_CHOICE_TEXT]: Container$a,
|
|
6068
|
+
[index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT]: Container$a,
|
|
6069
|
+
[index$3.NodeActionType.USER_CHOICE_IMAGE]: Container$c,
|
|
6070
|
+
[index$3.NodeActionType.ACTION_SSO_REDIRECT]: Container$b,
|
|
6071
|
+
[index$3.NodeActionType.POLL_CHOICE]: Container$9,
|
|
6072
|
+
[index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT]: Container$a,
|
|
6073
|
+
[index$3.NodeActionType.POLL_BUTTON]: () => null,
|
|
6074
|
+
[index$3.NodeActionType.POLL_CHOICE_IMAGE]: Container$8,
|
|
6123
6075
|
// [NodeActionType.RATING_STAR]: SubotInlineRatingStar,
|
|
6124
6076
|
// [NodeActionType.RATING_DESCRIPTION]: SubotInlineTextArea,
|
|
6125
6077
|
// [NodeActionType.LIKE_CHOICE]: SubotInlineLikeChoice,
|
|
@@ -6142,13 +6094,13 @@ const SubotInlineActionBase$1 = new Proxy(SubotInlineActionBaseTarget, {
|
|
|
6142
6094
|
},
|
|
6143
6095
|
});
|
|
6144
6096
|
|
|
6145
|
-
const excludeActions = [index$
|
|
6097
|
+
const excludeActions = [index$3.NodeActionType.USER_CHOICE_NEXT];
|
|
6146
6098
|
const Container$7 = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
|
|
6147
|
-
const isPollChoiceImage = React.useMemo(() => !!(actions === null || actions === void 0 ? void 0 : actions.find((act) => act.type === index$
|
|
6099
|
+
const isPollChoiceImage = React.useMemo(() => !!(actions === null || actions === void 0 ? void 0 : actions.find((act) => act.type === index$3.NodeActionType.POLL_CHOICE_IMAGE)), [actions]);
|
|
6148
6100
|
const className = React.useMemo(() => {
|
|
6149
6101
|
switch (node_type) {
|
|
6150
|
-
case index$
|
|
6151
|
-
case index$
|
|
6102
|
+
case index$3.NodeType.IMAGE:
|
|
6103
|
+
case index$3.NodeType.REACTION:
|
|
6152
6104
|
return 'si-two-columns';
|
|
6153
6105
|
default:
|
|
6154
6106
|
return isPollChoiceImage ? 'si-two-columns' : '';
|
|
@@ -6222,7 +6174,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6222
6174
|
}, []);
|
|
6223
6175
|
const submitButton = React.useMemo(() => {
|
|
6224
6176
|
var _a;
|
|
6225
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
6177
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
6226
6178
|
if (_submitButton)
|
|
6227
6179
|
return _submitButton;
|
|
6228
6180
|
return null;
|
|
@@ -6237,8 +6189,8 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6237
6189
|
var _b, _c;
|
|
6238
6190
|
if (action) {
|
|
6239
6191
|
const _value = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, selected_actions: Object.assign({}, value === null || value === void 0 ? void 0 : value.selected_actions) })));
|
|
6240
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6241
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6192
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
|
|
6193
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
|
|
6242
6194
|
const isExistedPoll = (_value === null || _value === void 0 ? void 0 : _value.selected_actions) && action.id in _value.selected_actions;
|
|
6243
6195
|
if (isExistedPoll) {
|
|
6244
6196
|
if (formSubmitMeta) {
|
|
@@ -6272,7 +6224,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6272
6224
|
}
|
|
6273
6225
|
}
|
|
6274
6226
|
});
|
|
6275
|
-
const actionsRemoveMultipleBtn = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter((a) => a.type !== index$
|
|
6227
|
+
const actionsRemoveMultipleBtn = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter((a) => a.type !== index$3.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
6276
6228
|
return (React__default["default"].createElement(StyledWrap$3, { id: "si-node-text" },
|
|
6277
6229
|
React__default["default"].createElement(Container$h, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber }),
|
|
6278
6230
|
React__default["default"].createElement(Container$7, { value: activeActions, actions: actionsRemoveMultipleBtn, onChange: handleOnChange, formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta })));
|
|
@@ -6285,13 +6237,13 @@ const useDescriptionPollNode = ({ node }) => {
|
|
|
6285
6237
|
id: 'multiSelectError.required',
|
|
6286
6238
|
defaultMessage: 'You must choose one options',
|
|
6287
6239
|
});
|
|
6288
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
6240
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.UNLIMITED) {
|
|
6289
6241
|
description = f({
|
|
6290
6242
|
id: 'multiSelectError.unlimited',
|
|
6291
6243
|
defaultMessage: 'You must choose at least one options',
|
|
6292
6244
|
});
|
|
6293
6245
|
}
|
|
6294
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
6246
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.RANGE) {
|
|
6295
6247
|
description = f({
|
|
6296
6248
|
id: 'multiSelectError.range',
|
|
6297
6249
|
defaultMessage: 'You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)',
|
|
@@ -6300,7 +6252,7 @@ const useDescriptionPollNode = ({ node }) => {
|
|
|
6300
6252
|
to: node.to,
|
|
6301
6253
|
});
|
|
6302
6254
|
}
|
|
6303
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
6255
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.EXACT_NUMBER) {
|
|
6304
6256
|
description = f({
|
|
6305
6257
|
id: 'multiSelectError.exactNumber',
|
|
6306
6258
|
defaultMessage: 'You must choose {from} answers.',
|
|
@@ -6330,7 +6282,7 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6330
6282
|
}, []);
|
|
6331
6283
|
const submitButton = React.useMemo(() => {
|
|
6332
6284
|
var _a;
|
|
6333
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
6285
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.POLL_BUTTON);
|
|
6334
6286
|
if (_submitButton)
|
|
6335
6287
|
return _submitButton;
|
|
6336
6288
|
return null;
|
|
@@ -6339,8 +6291,8 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6339
6291
|
const handleOnChange = (action, formSubmitMeta) => {
|
|
6340
6292
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
6341
6293
|
const newValue = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: [...((value === null || value === void 0 ? void 0 : value.form_submit_meta) || [])] })));
|
|
6342
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6343
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6294
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
|
|
6295
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
|
|
6344
6296
|
const isExistedPoll = (_a = newValue.form_submit_meta) === null || _a === void 0 ? void 0 : _a.some(({ action_id }) => action_id === action.id);
|
|
6345
6297
|
if (isExistedPoll) {
|
|
6346
6298
|
newValue.form_submit_meta =
|
|
@@ -6352,7 +6304,7 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6352
6304
|
newValue.form_submit_meta = (_d = newValue.form_submit_meta) === null || _d === void 0 ? void 0 : _d.concat([
|
|
6353
6305
|
{
|
|
6354
6306
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6355
|
-
control: index$
|
|
6307
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
6356
6308
|
value: '',
|
|
6357
6309
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6358
6310
|
},
|
|
@@ -6401,7 +6353,7 @@ const Container$3 = ({ node }) => {
|
|
|
6401
6353
|
const handleOnChange = (action) => {
|
|
6402
6354
|
if (params.bot_id &&
|
|
6403
6355
|
action &&
|
|
6404
|
-
action.type === index$
|
|
6356
|
+
action.type === index$3.NodeActionType.ACTION_SSO_REDIRECT) {
|
|
6405
6357
|
const currentState = {
|
|
6406
6358
|
params: Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, mode: 'inline' }),
|
|
6407
6359
|
listNodes,
|
|
@@ -6424,7 +6376,7 @@ const Container$3 = ({ node }) => {
|
|
|
6424
6376
|
urlObj.searchParams.set('mode', 'inline');
|
|
6425
6377
|
urlObj.searchParams.set('source', 'subot-inline');
|
|
6426
6378
|
const returnUrl = urlObj.href;
|
|
6427
|
-
window.location.href = `${index$
|
|
6379
|
+
window.location.href = `${index$4.SSO_URL}?returnUrl=${encodeURIComponent(returnUrl)}`;
|
|
6428
6380
|
}
|
|
6429
6381
|
}
|
|
6430
6382
|
};
|
|
@@ -6474,8 +6426,8 @@ const Container$2 = ({ node, indexNumber }) => {
|
|
|
6474
6426
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6475
6427
|
if (!action)
|
|
6476
6428
|
return;
|
|
6477
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6478
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6429
|
+
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
6430
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
6479
6431
|
const newValue = Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: formSubmitMeta });
|
|
6480
6432
|
if (actionWithOther) {
|
|
6481
6433
|
setValue(newValue);
|
|
@@ -6544,12 +6496,12 @@ const Container$1 = ({ onClickStart }) => {
|
|
|
6544
6496
|
React__default["default"].createElement(Container$s, { node: foundNode, onClickStart: onClickStart })));
|
|
6545
6497
|
}
|
|
6546
6498
|
const node = foundNode;
|
|
6547
|
-
const nodeType = index$
|
|
6548
|
-
const nodeTypeSSO = (_a = index$
|
|
6549
|
-
let NodeComponent = node.position === index$
|
|
6499
|
+
const nodeType = index$3.NodeType[node.type].valueOf();
|
|
6500
|
+
const nodeTypeSSO = (_a = index$3.NodePosition[node.position]) === null || _a === void 0 ? void 0 : _a.valueOf();
|
|
6501
|
+
let NodeComponent = node.position === index$3.NodePosition.SSO
|
|
6550
6502
|
? SubotInlineNodeBase$1[nodeTypeSSO]
|
|
6551
6503
|
: SubotInlineNodeBase$1[nodeType];
|
|
6552
|
-
if (node.is_multi_select && node.type !== index$
|
|
6504
|
+
if (node.is_multi_select && node.type !== index$3.NodeType.POLL) {
|
|
6553
6505
|
NodeComponent = SubotInlineNodeBase$1['MULTIPLE'];
|
|
6554
6506
|
}
|
|
6555
6507
|
return (React__default["default"].createElement(framerMotion.motion.div, { key: node.id, initial: { opacity: 1, y: -300 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
@@ -6620,7 +6572,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6620
6572
|
React__default["default"].createElement(Close, null))),
|
|
6621
6573
|
typeFormProps && locale ? (React__default["default"].createElement(TypeFormView, { locale: locale, typeFormProps: typeFormProps })) : (React__default["default"].createElement(NodeContextProvider, null,
|
|
6622
6574
|
React__default["default"].createElement("div", { className: "subot-inline-revamp-container", "data-show-footer": isShowFooter },
|
|
6623
|
-
loading && !isShowFooter && React__default["default"].createElement(index$
|
|
6575
|
+
loading && !isShowFooter && React__default["default"].createElement(index$b.Loading, { className: "si-loading" }),
|
|
6624
6576
|
React__default["default"].createElement(Container$1, { onClickStart: () => {
|
|
6625
6577
|
setIsDisplayFullMobile(true);
|
|
6626
6578
|
} })),
|
|
@@ -6640,7 +6592,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6640
6592
|
if (isFullContainer) {
|
|
6641
6593
|
const showLeftInfo = hasSubotLeftInfo(subotSettingData);
|
|
6642
6594
|
return (React__default["default"].createElement(StyledContainerFullscreen, { className: "si-container-fs", style: styleFullContainer, "data-has-left-info": showLeftInfo },
|
|
6643
|
-
React__default["default"].createElement(index$
|
|
6595
|
+
React__default["default"].createElement(index$c.Container, { className: core.clsx('si-container', {
|
|
6644
6596
|
'si-typeform-container': Boolean(typeFormProps),
|
|
6645
6597
|
'si-no-left-info': !showLeftInfo,
|
|
6646
6598
|
}) },
|
|
@@ -6665,7 +6617,7 @@ const Container = () => {
|
|
|
6665
6617
|
if (!foundNode)
|
|
6666
6618
|
return '';
|
|
6667
6619
|
return (foundNode.inline_background ||
|
|
6668
|
-
((_b = (_a = foundNode.intents) === null || _a === void 0 ? void 0 : _a.find((i) => i.type === index$
|
|
6620
|
+
((_b = (_a = foundNode.intents) === null || _a === void 0 ? void 0 : _a.find((i) => i.type === index$3.NodeIntentType.BOT_BACKGROUND_IMAGE)) === null || _b === void 0 ? void 0 : _b.url));
|
|
6669
6621
|
}, [listNodes, activeId]);
|
|
6670
6622
|
const subotSettingData = React.useMemo(() => {
|
|
6671
6623
|
const subotInlineSettings = listNodes[0];
|
|
@@ -6718,7 +6670,7 @@ const Root = styled__default["default"](core.Box) `
|
|
|
6718
6670
|
`}
|
|
6719
6671
|
}
|
|
6720
6672
|
`;
|
|
6721
|
-
const Inner = styled__default["default"](index$
|
|
6673
|
+
const Inner = styled__default["default"](index$c.Container) `
|
|
6722
6674
|
display: flex;
|
|
6723
6675
|
gap: 24px;
|
|
6724
6676
|
|
|
@@ -6924,7 +6876,7 @@ const subotInlineImpression = (data) => tslib_es6.__awaiter(void 0, void 0, void
|
|
|
6924
6876
|
/** inline message */
|
|
6925
6877
|
const subotInlineMessage = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6926
6878
|
try {
|
|
6927
|
-
return yield callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
6879
|
+
return yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
6928
6880
|
}
|
|
6929
6881
|
catch (error) { }
|
|
6930
6882
|
});
|
|
@@ -6980,7 +6932,7 @@ const SubotInlineDescription$1 = styled__default["default"].div `
|
|
|
6980
6932
|
color: #595959;
|
|
6981
6933
|
font-style: italic;
|
|
6982
6934
|
`;
|
|
6983
|
-
const SubotInlineFinalButton = styled__default["default"](index$
|
|
6935
|
+
const SubotInlineFinalButton = styled__default["default"](index$9.Button) `
|
|
6984
6936
|
position: relative;
|
|
6985
6937
|
min-width: 180px;
|
|
6986
6938
|
svg {
|
|
@@ -7368,8 +7320,8 @@ const SubotInlineActionListContainer = styled__default["default"].div `
|
|
|
7368
7320
|
const SubotInlineAction = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
|
|
7369
7321
|
const className = React.useMemo(() => {
|
|
7370
7322
|
switch (node_type) {
|
|
7371
|
-
case index$
|
|
7372
|
-
case index$
|
|
7323
|
+
case index$3.NodeType.IMAGE:
|
|
7324
|
+
case index$3.NodeType.REACTION:
|
|
7373
7325
|
return 'list-container';
|
|
7374
7326
|
default:
|
|
7375
7327
|
return '';
|
|
@@ -7381,7 +7333,7 @@ const SubotInlineAction = ({ actions, value, onChange, htmlType, node_type, form
|
|
|
7381
7333
|
})))));
|
|
7382
7334
|
};
|
|
7383
7335
|
|
|
7384
|
-
const ButtonStyled = styled__default["default"](index$
|
|
7336
|
+
const ButtonStyled = styled__default["default"](index$9.Button) `
|
|
7385
7337
|
&:disabled {
|
|
7386
7338
|
background-color: rgb(242, 242, 242);
|
|
7387
7339
|
color: rgb(140, 140, 140);
|
|
@@ -7433,8 +7385,8 @@ const SubotInlineActionTextChoice = ({ action, onChange, active, htmlType, formS
|
|
|
7433
7385
|
const { trackingCommonInline } = React.useContext(SubotInlineContext);
|
|
7434
7386
|
const inputRef = React.useRef(null);
|
|
7435
7387
|
const [otherText, setOtherText] = React.useState('');
|
|
7436
|
-
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
7437
|
-
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
7388
|
+
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
7389
|
+
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
7438
7390
|
isActionPollWithOther;
|
|
7439
7391
|
const onChangeTextArea = (evt) => {
|
|
7440
7392
|
setOtherText(evt.target.value);
|
|
@@ -7442,7 +7394,7 @@ const SubotInlineActionTextChoice = ({ action, onChange, active, htmlType, formS
|
|
|
7442
7394
|
onChange === null || onChange === void 0 ? void 0 : onChange(action, [
|
|
7443
7395
|
{
|
|
7444
7396
|
key: KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD,
|
|
7445
|
-
control: index$
|
|
7397
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
7446
7398
|
value: evt.target.value,
|
|
7447
7399
|
action_id: action.id,
|
|
7448
7400
|
},
|
|
@@ -7493,12 +7445,12 @@ const SubotInlinePollChoice = ({ active, action, onChange, htmlType, node_type,
|
|
|
7493
7445
|
onChange &&
|
|
7494
7446
|
onChange({
|
|
7495
7447
|
key: (action === null || action === void 0 ? void 0 : action.key) || '',
|
|
7496
|
-
control: index$
|
|
7448
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7497
7449
|
value: '',
|
|
7498
7450
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7499
7451
|
});
|
|
7500
7452
|
};
|
|
7501
|
-
if (node_type === index$
|
|
7453
|
+
if (node_type === index$3.NodeType.RESULT_POLL)
|
|
7502
7454
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7503
7455
|
React__default["default"].createElement(SubotInlineActionPollChoiceResult, { percent: (action === null || action === void 0 ? void 0 : action.percent) || 0, is_chosen: action === null || action === void 0 ? void 0 : action.is_chosen },
|
|
7504
7456
|
React__default["default"].createElement("div", { className: "number" }, action === null || action === void 0 ? void 0 :
|
|
@@ -7514,12 +7466,12 @@ const SubotInlinePollChoiceImage = ({ active, action, onChange, htmlType, node_t
|
|
|
7514
7466
|
onChange &&
|
|
7515
7467
|
onChange({
|
|
7516
7468
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7517
|
-
control: index$
|
|
7469
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7518
7470
|
value: '',
|
|
7519
7471
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7520
7472
|
});
|
|
7521
7473
|
};
|
|
7522
|
-
if (node_type === index$
|
|
7474
|
+
if (node_type === index$3.NodeType.RESULT_POLL)
|
|
7523
7475
|
// TODO: Update layout result poll image
|
|
7524
7476
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7525
7477
|
React__default["default"].createElement(SubotInlineActionPollChoiceResult, { percent: (action === null || action === void 0 ? void 0 : action.percent) || 0, is_chosen: action === null || action === void 0 ? void 0 : action.is_chosen },
|
|
@@ -7539,7 +7491,7 @@ const SubotInlineRatingStar = ({ action, value, onChange, }) => {
|
|
|
7539
7491
|
: 0, changeRating: (star) => {
|
|
7540
7492
|
const _value = {
|
|
7541
7493
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7542
|
-
control: index$
|
|
7494
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7543
7495
|
value: star.toString(),
|
|
7544
7496
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7545
7497
|
};
|
|
@@ -7549,12 +7501,12 @@ const SubotInlineRatingStar = ({ action, value, onChange, }) => {
|
|
|
7549
7501
|
const SubotInlineTextArea = ({ action, value, onChange, }) => {
|
|
7550
7502
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7551
7503
|
React__default["default"].createElement(SubotInlineActionRatingDescriptionContainer, null,
|
|
7552
|
-
React__default["default"].createElement(index$
|
|
7504
|
+
React__default["default"].createElement(index$d.TextArea, { placeholder: action === null || action === void 0 ? void 0 : action.label, value: value && typeof value !== 'string' && (value === null || value === void 0 ? void 0 : value.value)
|
|
7553
7505
|
? value === null || value === void 0 ? void 0 : value.value
|
|
7554
7506
|
: '', onChange: (evt) => {
|
|
7555
7507
|
const _value = {
|
|
7556
7508
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7557
|
-
control: index$
|
|
7509
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7558
7510
|
value: evt.target.value,
|
|
7559
7511
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7560
7512
|
};
|
|
@@ -7577,7 +7529,7 @@ const SubotInlineReviewChoice = ({ active, action, onChange, }) => (React__defau
|
|
|
7577
7529
|
React__default["default"].createElement(SubotInlineButtonReview, { className: classNames__default["default"](!!active && 'active'), onClick: () => onChange &&
|
|
7578
7530
|
onChange({
|
|
7579
7531
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7580
|
-
control: index$
|
|
7532
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7581
7533
|
value: '',
|
|
7582
7534
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7583
7535
|
}) },
|
|
@@ -7586,21 +7538,21 @@ const SubotInlinePollResult = ({ action, }) => (React__default["default"].create
|
|
|
7586
7538
|
React__default["default"].createElement(SubotInlineActionPollResult, null, action === null || action === void 0 ? void 0 : action.label)));
|
|
7587
7539
|
const SubotInlineActionBase = {
|
|
7588
7540
|
'user-image': SubotInlineActionImageChoice,
|
|
7589
|
-
[index$
|
|
7590
|
-
[index$
|
|
7591
|
-
[index$
|
|
7592
|
-
[index$
|
|
7593
|
-
[index$
|
|
7594
|
-
[index$
|
|
7595
|
-
[index$
|
|
7596
|
-
[index$
|
|
7597
|
-
[index$
|
|
7598
|
-
[index$
|
|
7599
|
-
[index$
|
|
7600
|
-
[index$
|
|
7601
|
-
[index$
|
|
7602
|
-
[index$
|
|
7603
|
-
[index$
|
|
7541
|
+
[index$3.NodeActionType.USER_CHOICE_TEXT]: SubotInlineActionTextChoice,
|
|
7542
|
+
[index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT]: SubotInlineActionTextChoice,
|
|
7543
|
+
[index$3.NodeActionType.USER_CHOICE_IMAGE]: SubotInlineActionImageChoice,
|
|
7544
|
+
[index$3.NodeActionType.ACTION_SSO_REDIRECT]: SubotInlineActionSSO,
|
|
7545
|
+
[index$3.NodeActionType.POLL_CHOICE]: SubotInlinePollChoice,
|
|
7546
|
+
[index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT]: SubotInlineActionTextChoice,
|
|
7547
|
+
[index$3.NodeActionType.POLL_CHOICE_IMAGE]: SubotInlinePollChoiceImage,
|
|
7548
|
+
[index$3.NodeActionType.RATING_STAR]: SubotInlineRatingStar,
|
|
7549
|
+
[index$3.NodeActionType.RATING_DESCRIPTION]: SubotInlineTextArea,
|
|
7550
|
+
[index$3.NodeActionType.LIKE_CHOICE]: SubotInlineLikeChoice,
|
|
7551
|
+
[index$3.NodeActionType.DISLIKE_CHOICE]: SubotInlineDislikeChoice,
|
|
7552
|
+
[index$3.NodeActionType.REVIEW_CHOICE]: SubotInlineReviewChoice,
|
|
7553
|
+
[index$3.NodeActionType.REVIEW_DESCRIPTION]: SubotInlineTextArea,
|
|
7554
|
+
[index$3.NodeActionType.RESULT_BUTTON]: SubotInlineActionTextChoice,
|
|
7555
|
+
[index$3.NodeActionType.POLL_RESULT]: SubotInlinePollResult,
|
|
7604
7556
|
};
|
|
7605
7557
|
|
|
7606
7558
|
const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextText, backProps, nextProps, }) => {
|
|
@@ -7608,7 +7560,7 @@ const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextT
|
|
|
7608
7560
|
const { formatMessage: f } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
7609
7561
|
const { nodes: listNodes, activeId, params, onNext, trackingCommonInline, } = React.useContext(SubotInlineContext);
|
|
7610
7562
|
const nodeMessage = listNodes.find((nodeItem) => nodeItem.id == activeId);
|
|
7611
|
-
const actionNextChoice = (_a = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$
|
|
7563
|
+
const actionNextChoice = (_a = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$3.NodeActionType.USER_CHOICE_NEXT);
|
|
7612
7564
|
const handleNextChoice = () => {
|
|
7613
7565
|
if (nodeMessage && actionNextChoice) {
|
|
7614
7566
|
const nextValue = {
|
|
@@ -7619,7 +7571,7 @@ const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextT
|
|
|
7619
7571
|
onNext === null || onNext === void 0 ? void 0 : onNext(Object.assign(Object.assign(Object.assign({}, params), nextValue), nodeMessage._message));
|
|
7620
7572
|
}
|
|
7621
7573
|
};
|
|
7622
|
-
const actionSubmitMultiple = (_b = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _b === void 0 ? void 0 : _b.find((act) => act.type === index$
|
|
7574
|
+
const actionSubmitMultiple = (_b = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _b === void 0 ? void 0 : _b.find((act) => act.type === index$3.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
7623
7575
|
return (React__default["default"].createElement(SubotInlineFooterStyled, null,
|
|
7624
7576
|
!hideBack && (React__default["default"].createElement(ButtonBackStyled, Object.assign({ size: "md", color: "secondary", onClick: onBack }, backProps, { className: classNames__default["default"]('pointer-event-child-none', backProps === null || backProps === void 0 ? void 0 : backProps.className) }, trackingCommonInline, { "data-event-action": "Back Click" }),
|
|
7625
7577
|
React__default["default"].createElement(ArrowLeft, { style: { marginRight: 10 } }),
|
|
@@ -7678,7 +7630,7 @@ const SubotInlineIntentTitle = styled__default["default"].h3 `
|
|
|
7678
7630
|
font-size: 20px;
|
|
7679
7631
|
}
|
|
7680
7632
|
`;
|
|
7681
|
-
const SubotInlineRecalculateButton = styled__default["default"](index$
|
|
7633
|
+
const SubotInlineRecalculateButton = styled__default["default"](index$9.Button) `
|
|
7682
7634
|
&.bot-recalculate {
|
|
7683
7635
|
svg {
|
|
7684
7636
|
path {
|
|
@@ -7694,7 +7646,7 @@ const SubotInlineRecalculateButton = styled__default["default"](index$8.Button)
|
|
|
7694
7646
|
}
|
|
7695
7647
|
}
|
|
7696
7648
|
`;
|
|
7697
|
-
const SubotInlineIntentButton = styled__default["default"](index$
|
|
7649
|
+
const SubotInlineIntentButton = styled__default["default"](index$9.Button) `
|
|
7698
7650
|
border: 2px solid transparent;
|
|
7699
7651
|
`;
|
|
7700
7652
|
const SubotInlineItemIcon = styled__default["default"].div `
|
|
@@ -7738,7 +7690,7 @@ const SubotInlineItemIcon = styled__default["default"].div `
|
|
|
7738
7690
|
}
|
|
7739
7691
|
}
|
|
7740
7692
|
`;
|
|
7741
|
-
styled__default["default"](index$
|
|
7693
|
+
styled__default["default"](index$9.Button) ``;
|
|
7742
7694
|
const SubotInlineIntentFirstTextWrapper = styled__default["default"].div `
|
|
7743
7695
|
display: flex;
|
|
7744
7696
|
align-items: flex-start;
|
|
@@ -7974,25 +7926,25 @@ const SubotInlineIntentFinal = ({ intents: intentsProps, }) => {
|
|
|
7974
7926
|
const rest = [];
|
|
7975
7927
|
intentsProps === null || intentsProps === void 0 ? void 0 : intentsProps.map((intent) => {
|
|
7976
7928
|
switch (intent === null || intent === void 0 ? void 0 : intent.type) {
|
|
7977
|
-
case index$
|
|
7929
|
+
case index$3.NodeIntentType.BOT_MAIN_IMAGE:
|
|
7978
7930
|
mainIntents.push(intent);
|
|
7979
7931
|
break;
|
|
7980
|
-
case index$
|
|
7932
|
+
case index$3.NodeIntentType.BOT_MAIN_TITLE:
|
|
7981
7933
|
mainIntents.push(intent);
|
|
7982
7934
|
break;
|
|
7983
|
-
case index$
|
|
7935
|
+
case index$3.NodeIntentType.BOT_MAIN_BODY:
|
|
7984
7936
|
mainIntents.push(intent);
|
|
7985
7937
|
break;
|
|
7986
|
-
case index$
|
|
7938
|
+
case index$3.NodeIntentType.BOT_MAIN_BUTTON:
|
|
7987
7939
|
mainIntents.push(intent);
|
|
7988
7940
|
break;
|
|
7989
|
-
case index$
|
|
7941
|
+
case index$3.NodeIntentType.BOT_RECALCULATE:
|
|
7990
7942
|
mainIntents.push(intent);
|
|
7991
7943
|
break;
|
|
7992
|
-
case index$
|
|
7944
|
+
case index$3.NodeIntentType.BOT_SUB_TITLE:
|
|
7993
7945
|
subIntents.push(intent);
|
|
7994
7946
|
break;
|
|
7995
|
-
case index$
|
|
7947
|
+
case index$3.NodeIntentType.BOT_SUB_BODY:
|
|
7996
7948
|
subIntents.push(intent);
|
|
7997
7949
|
break;
|
|
7998
7950
|
default:
|
|
@@ -8125,7 +8077,7 @@ const SubotInlineIntentSSO = ({ intent, }) => {
|
|
|
8125
8077
|
/*************************** NodeIntentType: 'bot-title' ***********************/
|
|
8126
8078
|
//#region
|
|
8127
8079
|
const SubotInlineIntentBotTitle = ({ intent, indexNumber, }) => {
|
|
8128
|
-
const isShowLabel = ![index$
|
|
8080
|
+
const isShowLabel = ![index$3.NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
8129
8081
|
return (React__default["default"].createElement(SubotInlineIntentFirstTextContainer, null,
|
|
8130
8082
|
React__default["default"].createElement(SubotInlineIntentFirstTextWrapper, null,
|
|
8131
8083
|
indexNumber && (React__default["default"].createElement("div", { className: "number" },
|
|
@@ -8133,9 +8085,9 @@ const SubotInlineIntentBotTitle = ({ intent, indexNumber, }) => {
|
|
|
8133
8085
|
".")),
|
|
8134
8086
|
isShowLabel &&
|
|
8135
8087
|
intent &&
|
|
8136
|
-
[index$
|
|
8088
|
+
[index$3.NodeIntentType.BOT_TEXT, index$3.NodeIntentType.BOT_BUTTON].includes(intent === null || intent === void 0 ? void 0 : intent.type) && React__default["default"].createElement(Markdown, { className: "title" }, intent.label)),
|
|
8137
8089
|
intent &&
|
|
8138
|
-
[index$
|
|
8090
|
+
[index$3.NodeIntentType.BOT_IMAGE].includes(intent === null || intent === void 0 ? void 0 : intent.type) && (React__default["default"].createElement(SubotInlineIntentFirstImageWrapper, null,
|
|
8139
8091
|
React__default["default"].createElement(SubotInlineIntentBotImage, { intent: intent })))));
|
|
8140
8092
|
};
|
|
8141
8093
|
//#endregion
|
|
@@ -8328,26 +8280,26 @@ const SubotInlineIntentThankYouBody = ({ intent, }) => {
|
|
|
8328
8280
|
/*************************** END - NodeIntentType: 'thank-you-body' ************/
|
|
8329
8281
|
/*******************************************************************************/
|
|
8330
8282
|
const SubotInlineIntentBase = {
|
|
8331
|
-
[index$
|
|
8332
|
-
[index$
|
|
8333
|
-
[index$
|
|
8334
|
-
[index$
|
|
8335
|
-
[index$
|
|
8336
|
-
[index$
|
|
8337
|
-
[index$
|
|
8338
|
-
[index$
|
|
8339
|
-
[index$
|
|
8340
|
-
[index$
|
|
8341
|
-
[index$
|
|
8342
|
-
[index$
|
|
8343
|
-
[index$
|
|
8344
|
-
[index$
|
|
8345
|
-
[index$
|
|
8346
|
-
[index$
|
|
8347
|
-
[index$
|
|
8348
|
-
[index$
|
|
8283
|
+
[index$3.NodeIntentType.BOT_TEXT]: SubotInlineIntentBotText,
|
|
8284
|
+
[index$3.NodeIntentType.BOT_IMAGE]: SubotInlineIntentBotImage,
|
|
8285
|
+
[index$3.NodeIntentType.BOT_BUTTON]: SubotInlineIntentBotButton,
|
|
8286
|
+
[index$3.NodeIntentType.BOT_URL]: SubotInlineIntentUrl,
|
|
8287
|
+
[index$3.NodeIntentType.BOT_RECALCULATE]: SubotInlineIntentBotRecalculate,
|
|
8288
|
+
[index$3.NodeIntentType.BOT_MAIN_TITLE]: SubotInlineIntentBotMainTitle,
|
|
8289
|
+
[index$3.NodeIntentType.BOT_MAIN_IMAGE]: SubotInlineIntentBotMainImage,
|
|
8290
|
+
[index$3.NodeIntentType.BOT_MAIN_BODY]: SubotInlineIntentBotMainBody,
|
|
8291
|
+
[index$3.NodeIntentType.BOT_MAIN_BUTTON]: SubotInlineIntentBotMainButton,
|
|
8292
|
+
[index$3.NodeIntentType.BOT_SUB_TITLE]: SubotInlineIntentBotMainTitle,
|
|
8293
|
+
[index$3.NodeIntentType.BOT_SUB_BODY]: SubotInlineIntentBotMainBody,
|
|
8294
|
+
[index$3.NodeIntentType.BOT_LANDING_PAGE_URL]: SubotInlineIntentBotText,
|
|
8295
|
+
[index$3.NodeIntentType.BOT_LANDING_PAGE_BUTTON]: SubotInlineIntentBotText,
|
|
8296
|
+
[index$3.NodeIntentType.BOT_RISK_SCREEN]: SubotInlineIntentBotRiskScreener,
|
|
8297
|
+
[index$3.NodeIntentType.BOT_RELATED_ARTICLE]: SubotInlineIntentBotRelatedArticle,
|
|
8298
|
+
[index$3.NodeIntentType.THANK_YOU_IMAGE]: SubotInlineIntentThankYouImage,
|
|
8299
|
+
[index$3.NodeIntentType.THANK_YOU_TITLE]: SubotInlineIntentThankYouTitle,
|
|
8300
|
+
[index$3.NodeIntentType.THANK_YOU_BODY]: SubotInlineIntentThankYouBody,
|
|
8349
8301
|
/** intents fake for sso block */
|
|
8350
|
-
[index$
|
|
8302
|
+
[index$3.NodeIntentType.SSO_INTENT]: SubotInlineIntentSSO,
|
|
8351
8303
|
};
|
|
8352
8304
|
|
|
8353
8305
|
/***************** type: TEXT, IMAGE ***************/
|
|
@@ -8369,8 +8321,8 @@ const SubotInlineNode = ({ node, indexNumber, }) => {
|
|
|
8369
8321
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
8370
8322
|
if (!action)
|
|
8371
8323
|
return;
|
|
8372
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8373
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8324
|
+
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
8325
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
8374
8326
|
const newValue = Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: formSubmitMeta });
|
|
8375
8327
|
if (actionWithOther) {
|
|
8376
8328
|
setValue(newValue);
|
|
@@ -8463,7 +8415,7 @@ const SubotInlineNodeFinal = ({ node, }) => {
|
|
|
8463
8415
|
const botType = (_a = botItem === null || botItem === void 0 ? void 0 : botItem.extra_settings) === null || _a === void 0 ? void 0 : _a.subot_type;
|
|
8464
8416
|
const suggestedServiceIntents = React.useMemo(() => {
|
|
8465
8417
|
var _a;
|
|
8466
|
-
return (((_a = node === null || node === void 0 ? void 0 : node.intents) === null || _a === void 0 ? void 0 : _a.filter((i) => i.type === index$
|
|
8418
|
+
return (((_a = node === null || node === void 0 ? void 0 : node.intents) === null || _a === void 0 ? void 0 : _a.filter((i) => i.type === index$3.NodeIntentType.BOT_SUGGESTED_SERVICE)) || []);
|
|
8467
8419
|
}, []);
|
|
8468
8420
|
return (React__default["default"].createElement(SubotInlineFinalContainer, null,
|
|
8469
8421
|
React__default["default"].createElement("div", { ref: flag, className: "hhg-flag", style: {
|
|
@@ -8485,7 +8437,7 @@ const SubotInlineNodeFinal = ({ node, }) => {
|
|
|
8485
8437
|
React__default["default"].createElement(ArrowDown, { style: { marginLeft: 10 } }))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
8486
8438
|
f({ id: 'subotInline.showLess', defaultMessage: 'Show less' }),
|
|
8487
8439
|
React__default["default"].createElement(ArrowUp, { style: { marginLeft: 10 } })))))),
|
|
8488
|
-
botType === index$
|
|
8440
|
+
botType === index$3.SubotType.voucherAcuvue && (React__default["default"].createElement(SubotInlineVoucherLeftUI, { clientId: (_b = botItem.extra_settings) === null || _b === void 0 ? void 0 : _b.client_id, voucherAnswers: extractVoucherAnswers(nodes, botItem) }))));
|
|
8489
8441
|
};
|
|
8490
8442
|
|
|
8491
8443
|
const SubotInlineResultButton = styled__default["default"].span `
|
|
@@ -8528,7 +8480,7 @@ const SubotInlineNodeFinalThankYou = ({ node, }) => {
|
|
|
8528
8480
|
const { params, onNext } = React.useContext(SubotInlineContext);
|
|
8529
8481
|
const resultButton = React.useMemo(() => {
|
|
8530
8482
|
var _a;
|
|
8531
|
-
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$
|
|
8483
|
+
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$3.NodeActionType.RESULT_BUTTON);
|
|
8532
8484
|
if (_resultButton)
|
|
8533
8485
|
return _resultButton;
|
|
8534
8486
|
return null;
|
|
@@ -8552,10 +8504,10 @@ const SubotInlineNodeForm = ({ node, indexNumber, }) => {
|
|
|
8552
8504
|
const { params, onPrev, onSubmit, trackingCommonInline, nodes, activeId } = React.useContext(SubotInlineContext);
|
|
8553
8505
|
const handleSubmit = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
8554
8506
|
const res = yield subotInlineMessage(Object.assign(Object.assign(Object.assign(Object.assign({}, params), node._message), data), getCurrentTotalDynamicScore(nodes, activeId, data.action_id, data.form_submit_meta)));
|
|
8555
|
-
if (isSubotCaptchaForbidden(res)) {
|
|
8507
|
+
if (index$2.isSubotCaptchaForbidden(res)) {
|
|
8556
8508
|
pushNotifications({
|
|
8557
8509
|
title: '',
|
|
8558
|
-
message: f(SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8510
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8559
8511
|
type: 'warning',
|
|
8560
8512
|
});
|
|
8561
8513
|
return;
|
|
@@ -8624,7 +8576,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8624
8576
|
const [value, setValue] = React.useState((node === null || node === void 0 ? void 0 : node._message) || {});
|
|
8625
8577
|
const submitButton = React.useMemo(() => {
|
|
8626
8578
|
var _a;
|
|
8627
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
8579
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
8628
8580
|
if (_submitButton)
|
|
8629
8581
|
return _submitButton;
|
|
8630
8582
|
return null;
|
|
@@ -8648,7 +8600,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8648
8600
|
});
|
|
8649
8601
|
return;
|
|
8650
8602
|
}
|
|
8651
|
-
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
8603
|
+
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.RANGE &&
|
|
8652
8604
|
activeActions.length < (node === null || node === void 0 ? void 0 : node.from)) {
|
|
8653
8605
|
pushNotifications({
|
|
8654
8606
|
title: '',
|
|
@@ -8663,7 +8615,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8663
8615
|
});
|
|
8664
8616
|
return;
|
|
8665
8617
|
}
|
|
8666
|
-
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
8618
|
+
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$3.NodeMultipleOptions.EXACT_NUMBER &&
|
|
8667
8619
|
activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
|
|
8668
8620
|
pushNotifications({
|
|
8669
8621
|
message: f({
|
|
@@ -8684,8 +8636,8 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8684
8636
|
var _a, _b;
|
|
8685
8637
|
if (action) {
|
|
8686
8638
|
const _value = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, selected_actions: Object.assign({}, value === null || value === void 0 ? void 0 : value.selected_actions) })));
|
|
8687
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8688
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8639
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
|
|
8640
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
|
|
8689
8641
|
const isExistedPoll = (_value === null || _value === void 0 ? void 0 : _value.selected_actions) && action.id in _value.selected_actions;
|
|
8690
8642
|
if (isExistedPoll) {
|
|
8691
8643
|
if (formSubmitMeta) {
|
|
@@ -8784,18 +8736,18 @@ callBack, }) => {
|
|
|
8784
8736
|
}
|
|
8785
8737
|
setIsLoading(true);
|
|
8786
8738
|
try {
|
|
8787
|
-
const result = yield callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SEND_OTP), 'sms_otp', {
|
|
8739
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SEND_OTP), 'sms_otp', {
|
|
8788
8740
|
phone_number: parsedPhone.nationalNumber,
|
|
8789
8741
|
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
8790
8742
|
});
|
|
8791
8743
|
setIsLoading(false);
|
|
8792
|
-
if (isSubotCaptchaForbidden(result)) {
|
|
8744
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
8793
8745
|
if (countRef.current) {
|
|
8794
8746
|
countRef.current.cancel();
|
|
8795
8747
|
}
|
|
8796
8748
|
pushNotifications({
|
|
8797
8749
|
title: '',
|
|
8798
|
-
message: f(SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8750
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8799
8751
|
type: 'warning',
|
|
8800
8752
|
});
|
|
8801
8753
|
return;
|
|
@@ -8826,7 +8778,7 @@ callBack, }) => {
|
|
|
8826
8778
|
message: 'Số điện thoại này đã được xác minh.',
|
|
8827
8779
|
type: 'success',
|
|
8828
8780
|
});
|
|
8829
|
-
const action = actions.find((action) => action.type === index$
|
|
8781
|
+
const action = actions.find((action) => action.type === index$3.NodeActionType.USER_SUBMIT_SEND);
|
|
8830
8782
|
action && callBack(action, data.phone);
|
|
8831
8783
|
return;
|
|
8832
8784
|
}
|
|
@@ -8852,16 +8804,16 @@ callBack, }) => {
|
|
|
8852
8804
|
return;
|
|
8853
8805
|
}
|
|
8854
8806
|
try {
|
|
8855
|
-
const result = yield callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_VERIFY_OTP), 'sms_verify', {
|
|
8807
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_VERIFY_OTP), 'sms_verify', {
|
|
8856
8808
|
phone_number: parsedPhone.nationalNumber,
|
|
8857
8809
|
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
8858
8810
|
code: number,
|
|
8859
8811
|
});
|
|
8860
8812
|
setIsLoadingVerify(false);
|
|
8861
|
-
if (isSubotCaptchaForbidden(result)) {
|
|
8813
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
8862
8814
|
pushNotifications({
|
|
8863
8815
|
title: '',
|
|
8864
|
-
message: f(SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8816
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8865
8817
|
type: 'warning',
|
|
8866
8818
|
});
|
|
8867
8819
|
return;
|
|
@@ -8902,7 +8854,7 @@ callBack, }) => {
|
|
|
8902
8854
|
return null;
|
|
8903
8855
|
}
|
|
8904
8856
|
switch (action.type) {
|
|
8905
|
-
case index$
|
|
8857
|
+
case index$3.NodeActionType.USER_SUBMIT_PHONE:
|
|
8906
8858
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
8907
8859
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
8908
8860
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -8924,12 +8876,12 @@ callBack, }) => {
|
|
|
8924
8876
|
defaultMessage: 'Please enter a valid number.',
|
|
8925
8877
|
}))),
|
|
8926
8878
|
React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
8927
|
-
React__default["default"].createElement(index$
|
|
8879
|
+
React__default["default"].createElement(index$9.Button, { className: "submit-btn", size: "lg", onClick: handleSendOTP, isDisabled: (!isFinishedCountDown && sentOTP) || isLoading, isLoading: isLoading }, sentOTP ? (React__default["default"].createElement(CountDown$1, { ref: countRef, isFinished: isFinishedCountDown, onFinish: setIsFinishedCountDown })) : (React__default["default"].createElement("span", null, f({
|
|
8928
8880
|
id: 'subot.sendOTP.button',
|
|
8929
8881
|
defaultMessage: 'Send OTP',
|
|
8930
8882
|
})))))));
|
|
8931
8883
|
} })));
|
|
8932
|
-
case index$
|
|
8884
|
+
case index$3.NodeActionType.USER_SUBMIT_NUMBER:
|
|
8933
8885
|
if (!sentOTP) {
|
|
8934
8886
|
return '';
|
|
8935
8887
|
}
|
|
@@ -8949,18 +8901,18 @@ callBack, }) => {
|
|
|
8949
8901
|
};
|
|
8950
8902
|
const renderFormSubmitAndTerms = (action) => {
|
|
8951
8903
|
switch (action.type) {
|
|
8952
|
-
case index$
|
|
8904
|
+
case index$3.NodeActionType.USER_SUBMIT_SEND:
|
|
8953
8905
|
if (!sentOTP)
|
|
8954
8906
|
return '';
|
|
8955
8907
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
8956
|
-
React__default["default"].createElement(index$
|
|
8908
|
+
React__default["default"].createElement(index$9.Button, { className: "submit-btn", size: "lg", isDisabled: isLoadingVerify, isLoading: isLoadingVerify, onClick: (event) => handleOnVerify(event, action) }, action.label)));
|
|
8957
8909
|
default:
|
|
8958
8910
|
return '';
|
|
8959
8911
|
}
|
|
8960
8912
|
};
|
|
8961
8913
|
React.useEffect(() => {
|
|
8962
8914
|
if (phoneNumber) {
|
|
8963
|
-
const action = actions.find((action) => action.type === index$
|
|
8915
|
+
const action = actions.find((action) => action.type === index$3.NodeActionType.USER_SUBMIT_PHONE);
|
|
8964
8916
|
if (action && action.key) {
|
|
8965
8917
|
setValue(action.key, `+${areaCode}${phoneNumber}`);
|
|
8966
8918
|
}
|
|
@@ -8993,14 +8945,14 @@ const SubotInlineNodeOTP = ({ node, indexNumber, }) => {
|
|
|
8993
8945
|
const verifiedPhone = useVerifyPhoneNumber();
|
|
8994
8946
|
const handleOnVerify = (action, phoneNumber) => {
|
|
8995
8947
|
var _a;
|
|
8996
|
-
const actionPhone = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$
|
|
8948
|
+
const actionPhone = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_PHONE);
|
|
8997
8949
|
if (!action || !actionPhone) {
|
|
8998
8950
|
return;
|
|
8999
8951
|
}
|
|
9000
8952
|
const form_submit_meta = [
|
|
9001
8953
|
{
|
|
9002
8954
|
key: String(actionPhone.key),
|
|
9003
|
-
control: index$
|
|
8955
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_PHONE],
|
|
9004
8956
|
value: phoneNumber,
|
|
9005
8957
|
},
|
|
9006
8958
|
];
|
|
@@ -9037,7 +8989,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
9037
8989
|
const descriptionNode = useDescriptionPollNode({ node });
|
|
9038
8990
|
const submitButton = React.useMemo(() => {
|
|
9039
8991
|
var _a;
|
|
9040
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
8992
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.POLL_BUTTON);
|
|
9041
8993
|
if (_submitButton)
|
|
9042
8994
|
return _submitButton;
|
|
9043
8995
|
return null;
|
|
@@ -9045,8 +8997,8 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
9045
8997
|
const handleOnChange = (action, formSubmitMeta) => {
|
|
9046
8998
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
9047
8999
|
const newValue = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: [...((value === null || value === void 0 ? void 0 : value.form_submit_meta) || [])] })));
|
|
9048
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
9049
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
9000
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
|
|
9001
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
|
|
9050
9002
|
const isExistedPoll = (_a = newValue.form_submit_meta) === null || _a === void 0 ? void 0 : _a.some(({ action_id }) => action_id === action.id);
|
|
9051
9003
|
if (isExistedPoll) {
|
|
9052
9004
|
newValue.form_submit_meta =
|
|
@@ -9058,7 +9010,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
9058
9010
|
newValue.form_submit_meta = (_d = newValue.form_submit_meta) === null || _d === void 0 ? void 0 : _d.concat([
|
|
9059
9011
|
{
|
|
9060
9012
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
9061
|
-
control: index$
|
|
9013
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
9062
9014
|
value: '',
|
|
9063
9015
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
9064
9016
|
},
|
|
@@ -9100,7 +9052,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
9100
9052
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9101
9053
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
|
|
9102
9054
|
React__default["default"].createElement(SubotInlineDescription$1, null, descriptionNode),
|
|
9103
|
-
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$
|
|
9055
|
+
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$3.NodeActionType.POLL_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
|
|
9104
9056
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9105
9057
|
return (NodeAction && (React__default["default"].createElement(NodeAction, { key: action.id, active: activeActions.includes(action.id), action: action, onChange: handleOnChange, htmlType: "checkbox", formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta })));
|
|
9106
9058
|
}))))),
|
|
@@ -9124,7 +9076,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9124
9076
|
const [isSubmit, setIsSubmit] = React.useState(false);
|
|
9125
9077
|
const ratingStarValue = React.useMemo(() => {
|
|
9126
9078
|
var _a;
|
|
9127
|
-
const _ratingStar = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$
|
|
9079
|
+
const _ratingStar = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$3.NodeActionType.RATING_STAR);
|
|
9128
9080
|
if (value.form_submit_meta && _ratingStar) {
|
|
9129
9081
|
const formIndex = value === null || value === void 0 ? void 0 : value.form_submit_meta.findIndex(({ action_id }) => action_id === (_ratingStar === null || _ratingStar === void 0 ? void 0 : _ratingStar.id));
|
|
9130
9082
|
if (formIndex !== -1)
|
|
@@ -9134,7 +9086,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9134
9086
|
}, [value === null || value === void 0 ? void 0 : value.form_submit_meta]);
|
|
9135
9087
|
const submitButton = React.useMemo(() => {
|
|
9136
9088
|
var _a;
|
|
9137
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
9089
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.RATING_BUTTON);
|
|
9138
9090
|
if (_submitButton)
|
|
9139
9091
|
return _submitButton;
|
|
9140
9092
|
return null;
|
|
@@ -9188,7 +9140,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9188
9140
|
React__default["default"].createElement(SubotInlineWrapper$1, null,
|
|
9189
9141
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9190
9142
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
|
|
9191
|
-
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$
|
|
9143
|
+
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$3.NodeActionType.RATING_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
|
|
9192
9144
|
var _a;
|
|
9193
9145
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9194
9146
|
return (NodeAction && (React__default["default"].createElement(NodeAction, { key: action.id, action: action, onChange: handleOnChange, value: (value &&
|
|
@@ -9247,7 +9199,7 @@ const SubotInlineNodeResultPoll = ({ node, }) => {
|
|
|
9247
9199
|
React__default["default"].createElement(SubotInlineWrapper$1, null,
|
|
9248
9200
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9249
9201
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [] })),
|
|
9250
|
-
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$
|
|
9202
|
+
React__default["default"].createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default["default"].createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== index$3.NodeActionType.POLL_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
|
|
9251
9203
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9252
9204
|
return (NodeAction && (React__default["default"].createElement(NodeAction, { key: action.id, action: action, htmlType: "checkbox", node_type: node === null || node === void 0 ? void 0 : node.type })));
|
|
9253
9205
|
})))))));
|
|
@@ -9273,15 +9225,15 @@ const SubotInlineNodeReview = ({ node, indexNumber, }) => {
|
|
|
9273
9225
|
const [isSubmit, setIsSubmit] = React.useState(false);
|
|
9274
9226
|
const reviewChoices = React.useMemo(() => {
|
|
9275
9227
|
var _a;
|
|
9276
|
-
return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === index$
|
|
9228
|
+
return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === index$3.NodeActionType.REVIEW_CHOICE)) || [];
|
|
9277
9229
|
}, [node === null || node === void 0 ? void 0 : node.actions]);
|
|
9278
9230
|
const reviewDescriptions = React.useMemo(() => {
|
|
9279
9231
|
var _a;
|
|
9280
|
-
return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === index$
|
|
9232
|
+
return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === index$3.NodeActionType.REVIEW_DESCRIPTION)) || [];
|
|
9281
9233
|
}, [node === null || node === void 0 ? void 0 : node.actions]);
|
|
9282
9234
|
const submitButton = React.useMemo(() => {
|
|
9283
9235
|
var _a;
|
|
9284
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
9236
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$3.NodeActionType.REVIEW_BUTTON);
|
|
9285
9237
|
if (_submitButton)
|
|
9286
9238
|
return _submitButton;
|
|
9287
9239
|
return null;
|
|
@@ -9388,7 +9340,7 @@ const SubotInlineNodeSSO = ({ node, indexNumber, }) => {
|
|
|
9388
9340
|
const { params, onPrev, nodes, activeId } = React.useContext(SubotInlineContext);
|
|
9389
9341
|
const { formatMessage: f } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
9390
9342
|
const handleOnChange = (action) => {
|
|
9391
|
-
if (action && action.type === index$
|
|
9343
|
+
if (action && action.type === index$3.NodeActionType.ACTION_SSO_REDIRECT) {
|
|
9392
9344
|
const currentState = {
|
|
9393
9345
|
params: Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, mode: 'inline' }),
|
|
9394
9346
|
listNodes: nodes,
|
|
@@ -9411,7 +9363,7 @@ const SubotInlineNodeSSO = ({ node, indexNumber, }) => {
|
|
|
9411
9363
|
urlObj.searchParams.set('mode', 'inline');
|
|
9412
9364
|
urlObj.searchParams.set('source', 'subot-inline');
|
|
9413
9365
|
const returnUrl = urlObj.href;
|
|
9414
|
-
window.location.href = `${index$
|
|
9366
|
+
window.location.href = `${index$4.SSO_URL}?returnUrl=${encodeURIComponent(returnUrl)}`;
|
|
9415
9367
|
}
|
|
9416
9368
|
}
|
|
9417
9369
|
};
|
|
@@ -9445,8 +9397,8 @@ const SubotInlineNodeText = ({ node, indexNumber, }) => {
|
|
|
9445
9397
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
9446
9398
|
if (!action)
|
|
9447
9399
|
return;
|
|
9448
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
9449
|
-
(action === null || action === void 0 ? void 0 : action.type) === index$
|
|
9400
|
+
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
9401
|
+
(action === null || action === void 0 ? void 0 : action.type) === index$3.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
9450
9402
|
const newValue = Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: formSubmitMeta });
|
|
9451
9403
|
if (actionWithOther) {
|
|
9452
9404
|
setValue(newValue);
|
|
@@ -9509,7 +9461,7 @@ const SubotInlineNodeBase = {
|
|
|
9509
9461
|
// RESULT_REACTION = 13,
|
|
9510
9462
|
};
|
|
9511
9463
|
|
|
9512
|
-
const SubotInlineButton = styled__default["default"](index$
|
|
9464
|
+
const SubotInlineButton = styled__default["default"](index$9.Button) `
|
|
9513
9465
|
margin-top: 24px;
|
|
9514
9466
|
${utils.MediaQueries.mbUp} {
|
|
9515
9467
|
margin-top: 16px;
|
|
@@ -9518,13 +9470,13 @@ const SubotInlineButton = styled__default["default"](index$8.Button) `
|
|
|
9518
9470
|
const SubotInlineDescription = styled__default["default"].div `
|
|
9519
9471
|
margin-top: 24px;
|
|
9520
9472
|
`;
|
|
9521
|
-
const SubotInlineReview = styled__default["default"](index$
|
|
9473
|
+
const SubotInlineReview = styled__default["default"](index$e.Text) `
|
|
9522
9474
|
text-align: center;
|
|
9523
9475
|
${utils.MediaQueries.mbUp} {
|
|
9524
9476
|
text-align: left;
|
|
9525
9477
|
}
|
|
9526
9478
|
`;
|
|
9527
|
-
const SubotInlineTitle = styled__default["default"](index$
|
|
9479
|
+
const SubotInlineTitle = styled__default["default"](index$f.Heading) `
|
|
9528
9480
|
text-align: center;
|
|
9529
9481
|
margin-bottom: 8px;
|
|
9530
9482
|
|
|
@@ -9746,7 +9698,7 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9746
9698
|
const getParams = React.useCallback(() => {
|
|
9747
9699
|
var _a, _b, _c, _d;
|
|
9748
9700
|
const gaData = window.gaData;
|
|
9749
|
-
const _url = (customUrl || window.location.origin + index$
|
|
9701
|
+
const _url = (customUrl || window.location.origin + index$4.basePath) +
|
|
9750
9702
|
(togetherComponentGlobalContext.GlobalData.locale === 'tl-PH'
|
|
9751
9703
|
? articleLink.replace('fil/', '')
|
|
9752
9704
|
: articleLink);
|
|
@@ -9951,9 +9903,9 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9951
9903
|
if (subotLogs) {
|
|
9952
9904
|
const lastNode = subotLogs.nodes[subotLogs.nodes.length - 1];
|
|
9953
9905
|
const isComplete = [
|
|
9954
|
-
index$
|
|
9955
|
-
index$
|
|
9956
|
-
index$
|
|
9906
|
+
index$3.NodeType.FINAL,
|
|
9907
|
+
index$3.NodeType.FINAL_THANK_YOU,
|
|
9908
|
+
index$3.NodeType.FINAL_STANDARD,
|
|
9957
9909
|
].includes(lastNode.type);
|
|
9958
9910
|
if (!isComplete) {
|
|
9959
9911
|
nodes = subotLogs.nodes;
|
|
@@ -9990,9 +9942,9 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9990
9942
|
console.log('Subot Already Loaded');
|
|
9991
9943
|
return () => undefined;
|
|
9992
9944
|
}
|
|
9993
|
-
if (!Cookies__default["default"].get(index$
|
|
9945
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
9994
9946
|
index$1.checkUntilFinished({
|
|
9995
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
9947
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
9996
9948
|
finished: () => {
|
|
9997
9949
|
const params = getParams();
|
|
9998
9950
|
getFirstAPI(params);
|
|
@@ -10058,23 +10010,23 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
10058
10010
|
pointerEvents: 'none',
|
|
10059
10011
|
} }),
|
|
10060
10012
|
React__default["default"].createElement(SubotInlineLoading, { isLoading: !!loading },
|
|
10061
|
-
React__default["default"].createElement(index$
|
|
10013
|
+
React__default["default"].createElement(index$b.Loading, null),
|
|
10062
10014
|
"Verifying..."),
|
|
10063
10015
|
state.nodes.map((node, index) => {
|
|
10064
10016
|
if (node.id.toString() === (state === null || state === void 0 ? void 0 : state.activeId)) {
|
|
10065
10017
|
if (node.hasOwnProperty('type')) {
|
|
10066
10018
|
let NodeComponent;
|
|
10067
10019
|
switch (node === null || node === void 0 ? void 0 : node.position) {
|
|
10068
|
-
case index$
|
|
10020
|
+
case index$3.NodePosition.SSO:
|
|
10069
10021
|
NodeComponent =
|
|
10070
|
-
SubotInlineNodeBase[index$
|
|
10022
|
+
SubotInlineNodeBase[index$3.NodePosition[node === null || node === void 0 ? void 0 : node.position].valueOf()];
|
|
10071
10023
|
break;
|
|
10072
10024
|
default:
|
|
10073
10025
|
NodeComponent =
|
|
10074
|
-
SubotInlineNodeBase[index$
|
|
10026
|
+
SubotInlineNodeBase[index$3.NodeType[node === null || node === void 0 ? void 0 : node.type].valueOf()];
|
|
10075
10027
|
}
|
|
10076
10028
|
if (node.is_multi_select &&
|
|
10077
|
-
node.type !== index$
|
|
10029
|
+
node.type !== index$3.NodeType.POLL)
|
|
10078
10030
|
NodeComponent = SubotInlineNodeBase['MULTIPLE'];
|
|
10079
10031
|
return (NodeComponent && (React__default["default"].createElement(NodeComponent, { key: index.toString(), indexNumber: index, node: node })));
|
|
10080
10032
|
}
|
|
@@ -10148,11 +10100,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10148
10100
|
subotInlineClick: subotInlineClick$1,
|
|
10149
10101
|
subotInlineImpression: subotInlineImpression$1,
|
|
10150
10102
|
PATHS: PATHS$1,
|
|
10151
|
-
|
|
10152
|
-
SUBOT_CAPTCHA_FAILED_MESSAGE: SUBOT_CAPTCHA_FAILED_MESSAGE,
|
|
10153
|
-
|
|
10154
|
-
callSubotProtectedApi: callSubotProtectedApi,
|
|
10155
|
-
isSubotCaptchaForbidden: isSubotCaptchaForbidden,
|
|
10103
|
+
SUBOT_CAPTCHA_FIELD: index$2.SUBOT_CAPTCHA_FIELD,
|
|
10104
|
+
SUBOT_CAPTCHA_FAILED_MESSAGE: index$2.SUBOT_CAPTCHA_FAILED_MESSAGE,
|
|
10105
|
+
withSubotCaptcha: index$2.withSubotCaptcha,
|
|
10106
|
+
callSubotProtectedApi: index$2.callSubotProtectedApi,
|
|
10107
|
+
isSubotCaptchaForbidden: index$2.isSubotCaptchaForbidden,
|
|
10156
10108
|
SUBOT_INLINE_SSO_QUERY_KEYS: SUBOT_INLINE_SSO_QUERY_KEYS,
|
|
10157
10109
|
stripSubotInlineSsoQueryFromUrl: stripSubotInlineSsoQueryFromUrl,
|
|
10158
10110
|
buildSubotInlineSsoReturnUrl: buildSubotInlineSsoReturnUrl,
|
|
@@ -10176,6 +10128,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10176
10128
|
replaceTextWithVariables: replaceTextWithVariables
|
|
10177
10129
|
});
|
|
10178
10130
|
|
|
10131
|
+
exports.SUBOT_CAPTCHA_FAILED_MESSAGE = index$2.SUBOT_CAPTCHA_FAILED_MESSAGE;
|
|
10132
|
+
exports.SUBOT_CAPTCHA_FIELD = index$2.SUBOT_CAPTCHA_FIELD;
|
|
10133
|
+
exports.callSubotProtectedApi = index$2.callSubotProtectedApi;
|
|
10134
|
+
exports.isSubotCaptchaForbidden = index$2.isSubotCaptchaForbidden;
|
|
10135
|
+
exports.withSubotCaptcha = index$2.withSubotCaptcha;
|
|
10179
10136
|
exports.TIME_RESET_RESEND_OTP = index$1.TIME_RESET_RESEND_OTP;
|
|
10180
10137
|
exports.checkMobile = index$1.checkMobile;
|
|
10181
10138
|
exports.checkUntilFinished = index$1.checkUntilFinished;
|
|
@@ -10193,8 +10150,6 @@ exports.ssoIntents = index$1.ssoIntents;
|
|
|
10193
10150
|
exports.KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD = KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD;
|
|
10194
10151
|
exports.Markdown = Markdown;
|
|
10195
10152
|
exports.PATHS = PATHS$1;
|
|
10196
|
-
exports.SUBOT_CAPTCHA_FAILED_MESSAGE = SUBOT_CAPTCHA_FAILED_MESSAGE;
|
|
10197
|
-
exports.SUBOT_CAPTCHA_HEADER = SUBOT_CAPTCHA_HEADER;
|
|
10198
10153
|
exports.SUBOT_INLINE_SSO_QUERY_KEYS = SUBOT_INLINE_SSO_QUERY_KEYS;
|
|
10199
10154
|
exports.SubotInline = SubotInline;
|
|
10200
10155
|
exports.SubotInlineIntentBase = SubotInlineIntentBase$1;
|
|
@@ -10203,7 +10158,6 @@ exports.SubotInlineRevampWithTheme = SubotInlineRevampWithTheme;
|
|
|
10203
10158
|
exports.SubotInlineVoucherLeftUI = SubotInlineVoucherLeftUI;
|
|
10204
10159
|
exports.UserInfoForm = UserInfoForm;
|
|
10205
10160
|
exports.buildSubotInlineSsoReturnUrl = buildSubotInlineSsoReturnUrl;
|
|
10206
|
-
exports.callSubotProtectedApi = callSubotProtectedApi;
|
|
10207
10161
|
exports.checkSyncDataOnFrisoCampaign = checkSyncDataOnFrisoCampaign;
|
|
10208
10162
|
exports.computeExtraSettingsForBot = computeExtraSettingsForBot$1;
|
|
10209
10163
|
exports["default"] = ContainerWithProvider;
|
|
@@ -10215,13 +10169,11 @@ exports.getCurrentTotalDynamicScore = getCurrentTotalDynamicScore;
|
|
|
10215
10169
|
exports.getDynamicScore = getDynamicScore;
|
|
10216
10170
|
exports.getPreviousStateFromStorage = getPreviousStateFromStorage;
|
|
10217
10171
|
exports.getSubotApiPath = getSubotApiPath;
|
|
10218
|
-
exports.getSubotCaptchaHeaders = getSubotCaptchaHeaders;
|
|
10219
10172
|
exports.getSubotInlineLogs = getSubotInlineLogs;
|
|
10220
10173
|
exports.handleFrisoRedirecition = handleFrisoRedirecition;
|
|
10221
10174
|
exports.hasPendingSubotInlineSsoState = hasPendingSubotInlineSsoState;
|
|
10222
10175
|
exports.hexRgb = hexRgb;
|
|
10223
10176
|
exports.isActiveSubotInlineSsoNode = isActiveSubotInlineSsoNode;
|
|
10224
|
-
exports.isSubotCaptchaForbidden = isSubotCaptchaForbidden;
|
|
10225
10177
|
exports.replaceTextWithVariables = replaceTextWithVariables;
|
|
10226
10178
|
exports.restoreSubotInlineFromSsoStorage = restoreSubotInlineFromSsoStorage;
|
|
10227
10179
|
exports.saveSubotInlineLogs = saveSubotInlineLogs;
|