@hhgtech/hhg-components 1.29.569 → 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-a18bc00c.js → InputDate-0134dd5e.js} +5 -5
- package/build/{LastPeriod-c52146b8.js → LastPeriod-90b7a643.js} +1 -1
- package/build/{MobileBottomNavigationIcon-203f5c0a.js → MobileBottomNavigationIcon-8588296e.js} +3 -3
- package/build/{SiteWideBanner-1efd98f2.js → SiteWideBanner-d2280262.js} +13 -13
- package/build/{Spinner-c69f1111.js → Spinner-5a75d294.js} +1 -1
- package/build/{WhatsApp-e1814aa4.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-a53ed5ac.js → constants-7dddc573.js} +1 -1
- package/build/{constants-9595a529.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-a6aaff5a.js → core-ad058e56.js} +1 -1
- package/build/{dataTransform-a24f3b5d.js → dataTransform-d94f6406.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-20142c20.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-76b2b51e.js → InputDate-ffd11a12.js} +5 -5
- package/build/esm/{LastPeriod-036478e1.js → LastPeriod-28da644c.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-fabfe84a.js → MobileBottomNavigationIcon-4209ff02.js} +3 -3
- package/build/esm/{SiteWideBanner-54900998.js → SiteWideBanner-2eb85e03.js} +13 -13
- package/build/esm/{Spinner-21e6c8cf.js → Spinner-523f63e7.js} +1 -1
- package/build/esm/{WhatsApp-71339b48.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-4651372c.js → constants-308ecd2d.js} +1 -1
- package/build/esm/{constants-dcecefd0.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-ff5a4ff4.js → core-e35878d8.js} +1 -1
- package/build/esm/{dataTransform-21157f08.js → dataTransform-daef1aed.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-6479340e.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-450f8ae5.js → healthTools-8322a02a.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +19 -19
- package/build/esm/healthToolsForm.js +38 -38
- package/build/esm/{helpers-1a34b8e4.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-35ecb2c1.js → index-0361d336.js} +7 -7
- package/build/esm/{index-0194fe12.js → index-050c541f.js} +4 -4
- package/build/esm/{index-7046b3f5.js → index-086dc0bd.js} +2 -2
- package/build/esm/{index-98b44b84.js → index-0ba9b38e.js} +13 -13
- package/build/esm/{index-3b61af7f.js → index-0de70a9d.js} +5 -5
- package/build/esm/{index-b660ef2f.js → index-151773f6.js} +4 -4
- package/build/esm/{index-3ce03de7.js → index-156c9e1f.js} +7 -7
- package/build/esm/{index-f5c18624.js → index-158a340a.js} +2 -2
- package/build/esm/{index-d34c0494.js → index-1717678a.js} +1 -1
- package/build/esm/{index-15a0c0b0.js → index-1a11f7cd.js} +6 -6
- package/build/esm/{index-64666e17.js → index-27dca3c9.js} +11 -11
- package/build/esm/{index-c0373767.js → index-29f811a1.js} +13 -13
- package/build/esm/{index-e8163874.js → index-2aeee139.js} +2 -2
- package/build/esm/{index-85f0c143.js → index-2da91d34.js} +3 -3
- package/build/esm/{index-01559ee6.js → index-2f146a12.js} +2 -2
- package/build/esm/{index-e231e389.js → index-3c5a01e5.js} +3 -3
- package/build/esm/{index-6fce2660.js → index-43ee1b10.js} +2 -2
- package/build/esm/{index-12966283.js → index-4563845f.js} +18 -18
- package/build/esm/{index-23ef0c6e.js → index-4667a740.js} +9 -9
- package/build/esm/index-49267fc4.js +50 -0
- package/build/esm/{index-f40c1a79.js → index-4d819c9d.js} +16 -16
- package/build/esm/{index-d277008f.js → index-4d9dba0d.js} +2 -2
- package/build/esm/{index-79fd7e59.js → index-4ed22cc9.js} +1 -1
- package/build/esm/{index-7e156045.js → index-504e1745.js} +16 -16
- package/build/esm/{index-e9804c5e.js → index-5425f080.js} +31 -31
- package/build/esm/{index-bcc6f323.js → index-584578bb.js} +15 -15
- package/build/esm/{index-a907b725.js → index-5bbf8614.js} +22 -22
- package/build/esm/{index-bd943133.js → index-6623864e.js} +5 -5
- package/build/esm/{index-21de405a.js → index-66c68abb.js} +1 -1
- package/build/esm/{index-fd79ca23.js → index-684b7a29.js} +2 -2
- package/build/esm/{index-672d998e.js → index-68c547e5.js} +16 -16
- package/build/esm/{index-1220f127.js → index-68e90810.js} +1 -1
- package/build/esm/{index-d25e17e6.js → index-69e4d6d7.js} +24 -24
- package/build/esm/{index-0337bc9f.js → index-7082ab0c.js} +17 -17
- package/build/esm/{index-82a5e988.js → index-71ae5380.js} +2 -2
- package/build/esm/{index-52bc257a.js → index-7336a83b.js} +17 -17
- package/build/esm/{index-a0ec9f0c.js → index-76347b6a.js} +3 -3
- package/build/esm/{index-67cffa01.js → index-7b160358.js} +2 -2
- package/build/esm/{index-0bea513d.js → index-7defd1a5.js} +3 -3
- package/build/esm/{index-c6a1fbe6.js → index-7e821b91.js} +5 -5
- package/build/esm/{index-67745539.js → index-8085df5b.js} +3 -3
- package/build/esm/{index-fc7390ca.js → index-80e46dbb.js} +6 -6
- package/build/esm/{index-25e3829f.js → index-83ddbe1d.js} +31 -31
- package/build/esm/{index-a2b0a919.js → index-8ffb093b.js} +1 -1
- package/build/esm/{index-0b19fa38.js → index-90529afc.js} +2 -2
- package/build/esm/{index-15e548b1.js → index-90e477ac.js} +1 -1
- package/build/esm/{index-b44e090c.js → index-91ae2b89.js} +2 -2
- package/build/esm/{index-406c579c.js → index-934673fa.js} +3 -3
- package/build/esm/{index-6ec3e262.js → index-9783d53c.js} +2 -2
- package/build/esm/{index-4e3f7cfe.js → index-9a0c4dd7.js} +19 -19
- package/build/esm/{index-c867d385.js → index-9f962532.js} +3 -3
- package/build/esm/{index-b65ce016.js → index-a2ad5836.js} +17 -17
- package/build/esm/{index-ab8b350c.js → index-a6790a1c.js} +2 -2
- package/build/esm/{index-fc45bb56.js → index-accb4f5a.js} +3 -3
- package/build/esm/{index-1744c0ec.js → index-ad6c72cf.js} +17 -17
- package/build/esm/{index-ec699f0f.js → index-b76d56a0.js} +14 -14
- package/build/esm/{index-9203189b.js → index-c61b769a.js} +2 -2
- package/build/esm/{index-be4c6d29.js → index-c8565af0.js} +17 -17
- package/build/esm/{index-a4c4ea0e.js → index-caddfaf0.js} +14 -14
- package/build/esm/{index-ea6d0c80.js → index-d1c8e33b.js} +20 -20
- package/build/esm/{index-5bd184c7.js → index-d74b7b05.js} +7 -7
- package/build/esm/{index-193f7c90.js → index-d83cc816.js} +25 -25
- package/build/esm/{index-0e93a145.js → index-dace6225.js} +2 -2
- package/build/esm/{index-7eb3a9a5.js → index-db87297a.js} +3 -3
- package/build/esm/{index-6d013daf.js → index-de8e3e09.js} +2 -2
- package/build/esm/{index-65ad453f.js → index-df4752f4.js} +1 -1
- package/build/esm/{index-7bc72b65.js → index-e5ca601b.js} +6 -6
- package/build/esm/{index-057d9669.js → index-ea0a70bd.js} +2 -2
- package/build/esm/{index-18d4c461.js → index-ebe9249d.js} +11 -11
- package/build/esm/{index-c71852e8.js → index-f0eca3e4.js} +2 -2
- package/build/esm/{index-b029598c.js → index-f2da64e0.js} +3 -3
- package/build/esm/{index-fb9d573e.js → index-f81c49c4.js} +12 -12
- package/build/esm/{index-3c97a13a.js → index-fd5737f6.js} +34 -34
- package/build/esm/{index-a32337d7.js → index-fe6ba4b5.js} +21 -21
- package/build/esm/index.js +131 -131
- package/build/esm/{labelSorting-d18fd1cc.js → labelSorting-a04db22a.js} +4 -4
- package/build/esm/lead/utils/recaptchaV3.d.ts +1 -1
- package/build/esm/lead.js +38 -38
- package/build/esm/leadRecaptcha.js +2 -2
- package/build/esm/{logoIcon-92cf4f60.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-8d7d2fa7.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-35dc74db.js → recaptchaV3-4fbe40dd.js} +1 -1
- package/build/esm/ssoV2.js +31 -31
- package/build/esm/{store-3b3ce0f3.js → store-fe2e5bb5.js} +3 -3
- package/build/esm/subot/api/utils.d.ts +1 -1
- package/build/esm/subot/captcha/index.d.ts +31 -0
- package/build/esm/subot/index.d.ts +1 -0
- package/build/esm/subot/subotInline/subotInline.config.d.ts +1 -1
- package/build/esm/subot.js +128 -86
- 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-e13a1288.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-32869213.js → transform-2ef55c90.js} +34 -34
- package/build/esm/{translationsProvider-82f1e3a2.js → translationsProvider-232ddebf.js} +1 -1
- package/build/esm/{treePopoverMenu-b0b5bcec.js → treePopoverMenu-91080eb1.js} +18 -18
- package/build/esm/{types-1411ec49.js → types-fb96b294.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCartCareService-8fd6ec06.js → useCartCareService-4a770813.js} +1 -1
- package/build/esm/{useHealthToolCache-08829731.js → useHealthToolCache-4841f479.js} +1 -1
- package/build/esm/{usePhoneValidator-aa06c6ab.js → usePhoneValidator-6cab11f6.js} +4 -4
- package/build/esm/{usePlacesAutocomplete-6f685be5.js → usePlacesAutocomplete-883b4070.js} +1 -1
- package/build/esm/{useResolvedCaptureUrls-d05c7b00.js → useResolvedCaptureUrls-2091521f.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +9 -9
- package/build/esm/{utils-c3b59ca1.js → utils-012ed628.js} +2 -2
- package/build/esm/{utils-879550af.js → utils-089b6a03.js} +1 -1
- package/build/esm/{utils-e6bd848c.js → utils-46eff943.js} +5 -5
- package/build/esm/{utils-ec0b6893.js → utils-4efb691a.js} +4 -4
- package/build/esm/{utils-a25bf899.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-399058e3.js → healthTools-8fa3f011.js} +1 -1
- package/build/healthToolsCardWrapper.js +19 -19
- package/build/healthToolsForm.js +38 -38
- package/build/{helpers-01f910a0.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-3fee0721.js → index-011a3f7f.js} +4 -4
- package/build/{index-354240f8.js → index-02fad386.js} +17 -17
- package/build/{index-da938539.js → index-05b3dad0.js} +2 -2
- package/build/{index-d885ca83.js → index-070b6035.js} +21 -21
- package/build/{index-43639807.js → index-0a21a617.js} +13 -13
- package/build/{index-ed015e00.js → index-0c7ea489.js} +3 -3
- package/build/{index-06c53ec5.js → index-0eb45be2.js} +2 -2
- package/build/{index-249a0909.js → index-126b7cbb.js} +22 -22
- package/build/{index-e5649179.js → index-14eaea73.js} +5 -5
- package/build/{index-62b6d173.js → index-18173701.js} +16 -16
- package/build/{index-91d4e775.js → index-1c3c73b3.js} +2 -2
- package/build/{index-fe13d458.js → index-25ff977f.js} +11 -11
- package/build/{index-79bc73ba.js → index-2a4e3ca8.js} +2 -2
- package/build/{index-3135c61f.js → index-3264d749.js} +7 -7
- package/build/{index-13878a5c.js → index-3590355e.js} +6 -6
- package/build/{index-121334b4.js → index-3dc7ea0d.js} +3 -3
- package/build/{index-05539371.js → index-3de4bbbc.js} +1 -1
- package/build/{index-3f59afdf.js → index-3f4588f8.js} +20 -20
- package/build/{index-90bdc07d.js → index-47452f5c.js} +25 -25
- package/build/{index-236498dc.js → index-4c3b9332.js} +11 -11
- package/build/{index-e368e43e.js → index-4d0d3996.js} +17 -17
- package/build/{index-f77a42a8.js → index-4eb39d6c.js} +15 -15
- package/build/{index-8f583d88.js → index-50df659f.js} +19 -19
- package/build/{index-0e363f27.js → index-510e5a04.js} +2 -2
- package/build/{index-1e2f428f.js → index-5225e642.js} +1 -1
- package/build/{index-41ce2ea8.js → index-53d8afe7.js} +2 -2
- package/build/{index-da047ba1.js → index-5616e03e.js} +1 -1
- package/build/{index-65a1a00c.js → index-5981e67b.js} +2 -2
- package/build/{index-496ae0b7.js → index-5c27cee7.js} +3 -3
- package/build/{index-f1e5359e.js → index-5eb3bbb7.js} +3 -3
- package/build/{index-ea70c2ed.js → index-60823b67.js} +3 -3
- package/build/{index-8d66ab46.js → index-60d0ca79.js} +1 -1
- package/build/{index-d0375353.js → index-61a444d0.js} +9 -9
- package/build/{index-0591c871.js → index-62ef0d02.js} +16 -16
- package/build/{index-61cbce33.js → index-640e1ba8.js} +4 -4
- package/build/{index-cf8a9b0d.js → index-686493ef.js} +16 -16
- package/build/{index-2ade4162.js → index-74197cc5.js} +31 -31
- package/build/{index-ea399b70.js → index-78a66f78.js} +3 -3
- package/build/{index-33da2fd3.js → index-7c0cfac0.js} +14 -14
- package/build/{index-135c9f35.js → index-80be1c3d.js} +2 -2
- package/build/{index-3ecfd40a.js → index-829f883b.js} +31 -31
- package/build/{index-1d13d856.js → index-96bf5540.js} +3 -3
- package/build/{index-00c9161a.js → index-96e5cdec.js} +6 -6
- package/build/{index-842feb12.js → index-9907273a.js} +14 -14
- package/build/{index-f14e2494.js → index-9dbadd98.js} +2 -2
- package/build/{index-0a40cd17.js → index-a669afd2.js} +12 -12
- package/build/{index-467a4915.js → index-a6ab7f9e.js} +5 -5
- package/build/{index-51585bbc.js → index-a7c0ac1b.js} +2 -2
- package/build/{index-0cd7d5ca.js → index-ab3d2b18.js} +6 -6
- package/build/{index-5cf98c87.js → index-b0ea73b9.js} +3 -3
- package/build/{index-2c5ba22b.js → index-b161d38e.js} +3 -3
- package/build/{index-ac6320ae.js → index-ba3a95c9.js} +1 -1
- package/build/{index-e7ab43c6.js → index-bc6ccfac.js} +3 -3
- package/build/{index-18f21b6b.js → index-bf170778.js} +2 -2
- package/build/{index-cb34e2ad.js → index-c19b9819.js} +1 -1
- package/build/{index-81738a90.js → index-c1a572b4.js} +2 -2
- package/build/{index-9f920700.js → index-c3a0064c.js} +17 -17
- package/build/{index-28529fa8.js → index-cf936f1d.js} +5 -5
- package/build/{index-378d19ee.js → index-cfb90197.js} +2 -2
- package/build/{index-dc368e07.js → index-d39e79ff.js} +2 -2
- package/build/{index-a68463d0.js → index-d600e60a.js} +34 -34
- package/build/{index-28c72d60.js → index-db8dda61.js} +2 -2
- package/build/{index-174ec702.js → index-dedac172.js} +18 -18
- package/build/{index-fdbd90db.js → index-dfa662c2.js} +17 -17
- package/build/{index-b5c1c4b4.js → index-e15b3ce0.js} +2 -2
- package/build/{index-eff0df4d.js → index-e34911df.js} +2 -2
- package/build/{index-6623934d.js → index-e6bb6882.js} +13 -13
- package/build/{index-f63adfb7.js → index-e6c06a43.js} +7 -7
- package/build/index-e7d6d098.js +56 -0
- package/build/{index-fce3e07e.js → index-e8432df1.js} +24 -24
- package/build/{index-476b0037.js → index-ecbe0180.js} +7 -7
- package/build/{index-a7df5bd1.js → index-ed16d38c.js} +1 -1
- package/build/{index-0288501e.js → index-ef7c27ce.js} +2 -2
- package/build/{index-3e918a8d.js → index-f40e77cf.js} +17 -17
- package/build/index.js +131 -131
- package/build/{labelSorting-ea0524c0.js → labelSorting-129a0d31.js} +4 -4
- package/build/lead/utils/recaptchaV3.d.ts +1 -1
- package/build/lead.js +38 -38
- package/build/leadRecaptcha.js +2 -2
- package/build/{logoIcon-e184b529.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-e0bb7e35.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-29bbadd7.js → recaptchaV3-8edb6116.js} +1 -1
- package/build/ssoV2.js +29 -29
- package/build/{store-54417afe.js → store-b1bffd3b.js} +3 -3
- package/build/subot/api/utils.d.ts +1 -1
- package/build/subot/captcha/index.d.ts +31 -0
- package/build/subot/index.d.ts +1 -0
- package/build/subot/subotInline/subotInline.config.d.ts +1 -1
- package/build/subot.js +468 -422
- 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-fd47ee7f.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-67fa7e3a.js → transform-560787f5.js} +34 -34
- package/build/{translationsProvider-dc900334.js → translationsProvider-16c02274.js} +1 -1
- package/build/{treePopoverMenu-1a8181c0.js → treePopoverMenu-dbd0f249.js} +18 -18
- package/build/{types-f81098a2.js → types-b18d99dc.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCartCareService-4848d690.js → useCartCareService-64fdca49.js} +1 -1
- package/build/{useHealthToolCache-8c13b14e.js → useHealthToolCache-a7b919b6.js} +1 -1
- package/build/{usePhoneValidator-ed765294.js → usePhoneValidator-9980c4ae.js} +4 -4
- package/build/{usePlacesAutocomplete-a0067daa.js → usePlacesAutocomplete-d8d78660.js} +1 -1
- package/build/{useResolvedCaptureUrls-3029d8ff.js → useResolvedCaptureUrls-f5c91aa6.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +9 -9
- package/build/{utils-cfc38013.js → utils-0e77cf80.js} +1 -1
- package/build/{utils-672df2af.js → utils-63cdcd4a.js} +5 -5
- package/build/{utils-ffd64494.js → utils-a8769c9b.js} +2 -2
- package/build/{utils-a639b68b.js → utils-e6b46892.js} +4 -4
- package/build/{utils-b20dc3b3.js → utils-f03c37c5.js} +4 -4
- package/build/vaccination.js +22 -22
- package/package.json +1 -1
- /package/build/{BMI_BOYS.percentile.monthly-490159e0.js → BMI_BOYS.percentile.monthly-e54d98e1.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-a5ae1575.js → BMI_BOYS.percentile.weekly-a221adc7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-48286c54.js → BMI_BOYS.percentile.yearly-f02a31e1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-75a9ab73.js → BMI_BOYS.zscore.monthly-183b03a1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-74e5cd78.js → BMI_BOYS.zscore.weekly-c4e0960e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-a65f073b.js → BMI_BOYS.zscore.yearly-105b654d.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-01bda44c.js → BMI_GIRLS.percentile.monthly-15cec195.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-885b53a5.js → BMI_GIRLS.percentile.weekly-3e7861ab.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-717adef0.js → BMI_GIRLS.percentile.yearly-d606170e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-5874cea2.js → BMI_GIRLS.zscore.monthly-883b9904.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-5aaf6a95.js → BMI_GIRLS.zscore.weekly-9a98e686.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-8e8e91b0.js → BMI_GIRLS.zscore.yearly-324819c9.js} +0 -0
- /package/build/{ChevronDown-3ce6252e.js → ChevronDown-4013e2e0.js} +0 -0
- /package/build/{Google-b0c9b786.js → Google-18197f9b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-8a52829b.js → HEAD CIRCUM_BOYS.percentile.monthly-ea6d6f73.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-72e7b444.js → HEAD CIRCUM_BOYS.percentile.weekly-b587645c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-bd214c95.js → HEAD CIRCUM_BOYS.percentile.yearly-57852ab4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-72494fb6.js → HEAD CIRCUM_BOYS.zscore.monthly-1be7cc66.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-7c55e158.js → HEAD CIRCUM_BOYS.zscore.weekly-cd9ac641.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-7259f91f.js → HEAD CIRCUM_BOYS.zscore.yearly-1a54c0f8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-97600069.js → HEAD CIRCUM_GIRLS.percentile.monthly-c4e1be87.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-9666d149.js → HEAD CIRCUM_GIRLS.percentile.weekly-4d7846d2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-05660adf.js → HEAD CIRCUM_GIRLS.percentile.yearly-fea5082d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-73724e53.js → HEAD CIRCUM_GIRLS.zscore.monthly-f4816877.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-aa6e582e.js → HEAD CIRCUM_GIRLS.zscore.weekly-4c7ffd79.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-64708957.js → HEAD CIRCUM_GIRLS.zscore.yearly-1f20fcea.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-832f34bc.js → HEIGHT_BOYS.percentile.monthly-a4a49014.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-51ee8423.js → HEIGHT_BOYS.percentile.weekly-e871605b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-1ba52fab.js → HEIGHT_BOYS.percentile.yearly-3dbf87a0.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-bd09ab5c.js → HEIGHT_BOYS.zscore.monthly-d3a6df4e.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-bc0f03f7.js → HEIGHT_BOYS.zscore.weekly-bce25d44.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-6fdfda26.js → HEIGHT_BOYS.zscore.yearly-5849f5ca.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-d0fca325.js → HEIGHT_GIRLS.percentile.monthly-68349ce8.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-1b15f59b.js → HEIGHT_GIRLS.percentile.weekly-485b1fd7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-2c3de6e3.js → HEIGHT_GIRLS.percentile.yearly-f7659517.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-b74db86d.js → HEIGHT_GIRLS.zscore.monthly-fd14255b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-8d604029.js → HEIGHT_GIRLS.zscore.weekly-50185872.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-19621501.js → HEIGHT_GIRLS.zscore.yearly-56bf62cf.js} +0 -0
- /package/build/{Visible-67eba78f.js → Visible-040266bc.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-6dd1df3c.js → WEIGHT_BOYS.percentile.monthly-886c4ed1.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-c14c8f1d.js → WEIGHT_BOYS.percentile.weekly-b4cef881.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-00641fd3.js → WEIGHT_BOYS.percentile.yearly-947b2b05.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-f7a3a6c7.js → WEIGHT_BOYS.zscore.monthly-75c53b99.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-ff4af183.js → WEIGHT_BOYS.zscore.weekly-b495e6ee.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-e75b22c2.js → WEIGHT_BOYS.zscore.yearly-2931703b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-703d5f33.js → WEIGHT_GIRLS.percentile.monthly-b428286b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-0e72e080.js → WEIGHT_GIRLS.percentile.weekly-79c7cabc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-d6867abc.js → WEIGHT_GIRLS.percentile.yearly-3abd98fc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-4214e10f.js → WEIGHT_GIRLS.zscore.monthly-c6207e3c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-6268865d.js → WEIGHT_GIRLS.zscore.weekly-df3bf744.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-cca12dd8.js → WEIGHT_GIRLS.zscore.yearly-9dd0314c.js} +0 -0
- /package/build/{ageGenerate-0d309a2f.js → ageGenerate-4100cf2e.js} +0 -0
- /package/build/{animation-cda92bee.js → animation-ef36d4d3.js} +0 -0
- /package/build/{appearance-4ff904e1.js → appearance-60876e6f.js} +0 -0
- /package/build/{constants-8a513b11.js → constants-06a345cc.js} +0 -0
- /package/build/{constants-ed51c306.js → constants-80757d67.js} +0 -0
- /package/build/{constants-71115e11.js → constants-8cfee564.js} +0 -0
- /package/build/{context-d91c6f19.js → context-792af735.js} +0 -0
- /package/build/{dataTransform-3623ee6e.js → dataTransform-42307b87.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-a7796536.js → BMI_BOYS.percentile.monthly-2f0ecf77.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-d9b0b1f1.js → BMI_BOYS.percentile.weekly-c8298e61.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-9458b168.js → BMI_BOYS.percentile.yearly-3c2a67e2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-5ffd534e.js → BMI_BOYS.zscore.monthly-4681ade6.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-f84d91f3.js → BMI_BOYS.zscore.weekly-def5dc79.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-52bef3f9.js → BMI_BOYS.zscore.yearly-a68510a6.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-4dd9ecfb.js → BMI_GIRLS.percentile.monthly-61ec84b2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-c07348fd.js → BMI_GIRLS.percentile.weekly-161fc9e0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-460d06d4.js → BMI_GIRLS.percentile.yearly-5a8ecd60.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-4f2e8f6b.js → BMI_GIRLS.zscore.monthly-c22a15c5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-e4ca1cd0.js → BMI_GIRLS.zscore.weekly-085fb855.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-19864a4a.js → BMI_GIRLS.zscore.yearly-bd56f109.js} +0 -0
- /package/build/esm/{ChevronDown-95c95b1b.js → ChevronDown-7f509fcb.js} +0 -0
- /package/build/esm/{Google-f8e1e30a.js → Google-cb61c6b4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-95e01789.js → HEAD CIRCUM_BOYS.percentile.monthly-131a1848.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-50ed0f06.js → HEAD CIRCUM_BOYS.percentile.weekly-0e3921df.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-178f0c90.js → HEAD CIRCUM_BOYS.percentile.yearly-f7ffd75d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-600f4c03.js → HEAD CIRCUM_BOYS.zscore.monthly-82eb02e8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-f86fdd1d.js → HEAD CIRCUM_BOYS.zscore.weekly-3371617e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-7f0a4e4c.js → HEAD CIRCUM_BOYS.zscore.yearly-94e09853.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ae8a6627.js → HEAD CIRCUM_GIRLS.percentile.monthly-faf9e3e6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ecd3bfcc.js → HEAD CIRCUM_GIRLS.percentile.weekly-e9e6e039.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5f8f4dd6.js → HEAD CIRCUM_GIRLS.percentile.yearly-41bfb385.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-6e06fe3b.js → HEAD CIRCUM_GIRLS.zscore.monthly-1164cefd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-28d19a9c.js → HEAD CIRCUM_GIRLS.zscore.weekly-3bbfc22e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b1ee3970.js → HEAD CIRCUM_GIRLS.zscore.yearly-4f133f56.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-7f3cece2.js → HEIGHT_BOYS.percentile.monthly-94249176.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-31a50964.js → HEIGHT_BOYS.percentile.weekly-b67de6ce.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-44c82d42.js → HEIGHT_BOYS.percentile.yearly-a42c611a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-e1dd5549.js → HEIGHT_BOYS.zscore.monthly-2598ff5d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-f68e1a5b.js → HEIGHT_BOYS.zscore.weekly-28f1bf9a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-c696b56a.js → HEIGHT_BOYS.zscore.yearly-43e2f566.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0a86bd6a.js → HEIGHT_GIRLS.percentile.monthly-61462185.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-c3cea51e.js → HEIGHT_GIRLS.percentile.weekly-3d3f2f42.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-0c082848.js → HEIGHT_GIRLS.percentile.yearly-57493d41.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-7ec30ead.js → HEIGHT_GIRLS.zscore.monthly-cba3a32d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-d4d85942.js → HEIGHT_GIRLS.zscore.weekly-755e353d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-beceebaf.js → HEIGHT_GIRLS.zscore.yearly-be1a086a.js} +0 -0
- /package/build/esm/{Visible-8f5b8ec3.js → Visible-5fb8ff44.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-c0e46f21.js → WEIGHT_BOYS.percentile.monthly-63a86f3d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-3415d12b.js → WEIGHT_BOYS.percentile.weekly-1de8104e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-0a996445.js → WEIGHT_BOYS.percentile.yearly-1698787d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-efa39539.js → WEIGHT_BOYS.zscore.monthly-92c7fe5c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-dd4d8482.js → WEIGHT_BOYS.zscore.weekly-3417a368.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-cded3528.js → WEIGHT_BOYS.zscore.yearly-4d94de25.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-ebaef217.js → WEIGHT_GIRLS.percentile.monthly-bb20f2f4.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-f7d756e7.js → WEIGHT_GIRLS.percentile.weekly-cfb58232.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-bcfd11ca.js → WEIGHT_GIRLS.percentile.yearly-9f0266dd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-fc4001e2.js → WEIGHT_GIRLS.zscore.monthly-35834800.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-601fb250.js → WEIGHT_GIRLS.zscore.weekly-04d5c09a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-3fa4d4a4.js → WEIGHT_GIRLS.zscore.yearly-eda8c700.js} +0 -0
- /package/build/esm/{ageGenerate-b399822b.js → ageGenerate-49421c0c.js} +0 -0
- /package/build/esm/{animation-2477269c.js → animation-6aff9c94.js} +0 -0
- /package/build/esm/{appearance-14acda3a.js → appearance-0b16584c.js} +0 -0
- /package/build/esm/{constants-606b0b67.js → constants-80a43ca1.js} +0 -0
- /package/build/esm/{constants-9e424985.js → constants-d4006dbd.js} +0 -0
- /package/build/esm/{constants-e7108c13.js → constants-f1525a91.js} +0 -0
- /package/build/esm/{context-8122f5d0.js → context-34c863a6.js} +0 -0
- /package/build/esm/{dataTransform-1d893887.js → dataTransform-c92066fc.js} +0 -0
- /package/build/esm/{index-57c1ec53.js → index-13be3a2a.js} +0 -0
- /package/build/esm/{index-d8ac5dee.js → index-3acb7878.js} +0 -0
- /package/build/esm/{index-ec03790b.js → index-669e3d6e.js} +0 -0
- /package/build/esm/{index-8441371f.js → index-8ee3c013.js} +0 -0
- /package/build/esm/{index-c22d0971.js → index-90ee0916.js} +0 -0
- /package/build/esm/{index-c2c60a4f.js → index-b0a2824a.js} +0 -0
- /package/build/esm/{index-6f5f100e.js → index-b8a47113.js} +0 -0
- /package/build/esm/{index-5792f9a5.js → index-dd1e5cfd.js} +0 -0
- /package/build/esm/{index-9e84c927.js → index-f404e494.js} +0 -0
- /package/build/esm/{index.styles-db9202ef.js → index.styles-93be29ce.js} +0 -0
- /package/build/esm/{localizeNumberFormat-49759e1e.js → localizeNumberFormat-74adf22f.js} +0 -0
- /package/build/esm/{number-deed8a4d.js → number-1913da86.js} +0 -0
- /package/build/esm/{paths-d496fd35.js → paths-dbda9451.js} +0 -0
- /package/build/esm/{routing-2da43d45.js → routing-1e7d6e89.js} +0 -0
- /package/build/esm/{shared-d5677fb6.js → shared-29748c0f.js} +0 -0
- /package/build/esm/{translationsContext-f816b792.js → translationsContext-f899863b.js} +0 -0
- /package/build/esm/{tslib.es6-a4f8cb90.js → tslib.es6-b9f6872a.js} +0 -0
- /package/build/esm/{types-d0486821.js → types-ee529557.js} +0 -0
- /package/build/esm/{useImageAspectRatio-faa52577.js → useImageAspectRatio-bd019481.js} +0 -0
- /package/build/esm/{useOutsideClick-abfb7835.js → useOutsideClick-72348444.js} +0 -0
- /package/build/esm/{useScrollbarSize-2dbd96f5.js → useScrollbarSize-c444563d.js} +0 -0
- /package/build/esm/{useUniqueId-e52ac41d.js → useUniqueId-423dde83.js} +0 -0
- /package/build/esm/{utils-6cbe2471.js → utils-78f45300.js} +0 -0
- /package/build/esm/{utils-959332eb.js → utils-fd542933.js} +0 -0
- /package/build/{index-a7ef706a.js → index-19060c81.js} +0 -0
- /package/build/{index-d1f1adb7.js → index-404fa8ef.js} +0 -0
- /package/build/{index-39518415.js → index-57272d45.js} +0 -0
- /package/build/{index-b9ed0e7c.js → index-65604660.js} +0 -0
- /package/build/{index-c046af06.js → index-6e579bcf.js} +0 -0
- /package/build/{index-0effc0b1.js → index-8d44469d.js} +0 -0
- /package/build/{index-b9f9b545.js → index-92279fed.js} +0 -0
- /package/build/{index-1174da28.js → index-96c94401.js} +0 -0
- /package/build/{index-bcd14bfe.js → index-9b028c7a.js} +0 -0
- /package/build/{index.styles-6c9c1e0b.js → index.styles-ffe69fc9.js} +0 -0
- /package/build/{localizeNumberFormat-e32271b1.js → localizeNumberFormat-2190aaf0.js} +0 -0
- /package/build/{number-2f72ed70.js → number-7aa90137.js} +0 -0
- /package/build/{paths-d78c072d.js → paths-210019dc.js} +0 -0
- /package/build/{routing-084163fc.js → routing-206a1d9f.js} +0 -0
- /package/build/{shared-e95a8e9a.js → shared-684bce9f.js} +0 -0
- /package/build/{translationsContext-c11386e0.js → translationsContext-8b52ecd9.js} +0 -0
- /package/build/{tslib.es6-74fa88f9.js → tslib.es6-772b1fa6.js} +0 -0
- /package/build/{types-155848b9.js → types-bf39af84.js} +0 -0
- /package/build/{useImageAspectRatio-30c3fb88.js → useImageAspectRatio-73c5a4da.js} +0 -0
- /package/build/{useOutsideClick-0bf15a78.js → useOutsideClick-8e47dadb.js} +0 -0
- /package/build/{useScrollbarSize-3ce9fc39.js → useScrollbarSize-bb0dfce3.js} +0 -0
- /package/build/{useUniqueId-e259d96b.js → useUniqueId-75431d14.js} +0 -0
- /package/build/{utils-24713e42.js → utils-2624818f.js} +0 -0
- /package/build/{utils-dc3dd5c3.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 index$
|
|
14
|
+
var index$2 = require('./index-e7d6d098.js');
|
|
15
|
+
var index$1 = require('./index-0eb45be2.js');
|
|
15
16
|
var dayjs = require('dayjs');
|
|
16
17
|
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
17
18
|
var core = require('@mantine/core');
|
|
18
19
|
var classNames = require('classnames');
|
|
19
|
-
var index$
|
|
20
|
-
var index$
|
|
20
|
+
var index$c = require('./index-9b028c7a.js');
|
|
21
|
+
var index$b = require('./index-db8dda61.js');
|
|
21
22
|
var framerMotion = require('framer-motion');
|
|
22
23
|
var styled = require('@emotion/styled');
|
|
23
|
-
var utils = require('./utils-
|
|
24
|
-
var index$
|
|
24
|
+
var utils = require('./utils-2624818f.js');
|
|
25
|
+
var index$5 = require('./index-5eb3bbb7.js');
|
|
25
26
|
var remarkable = require('remarkable');
|
|
26
27
|
var other = require('@hhgtech/icons/other');
|
|
27
28
|
var reactIntersectionObserver = require('react-intersection-observer');
|
|
28
|
-
var index$
|
|
29
|
+
var index$6 = require('./index-92279fed.js');
|
|
29
30
|
var isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
30
|
-
var constants = require('./constants-
|
|
31
|
+
var constants = require('./constants-7dddc573.js');
|
|
31
32
|
var uuid = require('uuid');
|
|
32
|
-
var recaptchaV3 = require('./recaptchaV3-
|
|
33
|
-
var index$
|
|
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
|
|
|
@@ -180,9 +181,7 @@ const getSubotApiPath = (path, params) => {
|
|
|
180
181
|
/** inline message */
|
|
181
182
|
const subotInlineMessage$1 = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
182
183
|
try {
|
|
183
|
-
return yield
|
|
184
|
-
data,
|
|
185
|
-
});
|
|
184
|
+
return yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
186
185
|
}
|
|
187
186
|
catch (error) { }
|
|
188
187
|
});
|
|
@@ -334,7 +333,7 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
334
333
|
? _formSubmitMeta
|
|
335
334
|
: nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.form_submit_meta;
|
|
336
335
|
if (isNodeWithDynamicScore &&
|
|
337
|
-
node.type === index$
|
|
336
|
+
node.type === index$3.NodeType.FORM &&
|
|
338
337
|
formSubmitMeta) {
|
|
339
338
|
// debugger
|
|
340
339
|
// NodeId hiện tại có trong object "dynamic_score"
|
|
@@ -346,22 +345,22 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
346
345
|
const foundActions = (_b = node.actions) === null || _b === void 0 ? void 0 : _b.filter((act) => actionIdsDynamicScore.includes(act.id));
|
|
347
346
|
const foundFormMetas = formSubmitMeta.filter((f) => foundActions.find((a) => a.key === f.key) &&
|
|
348
347
|
(f.control ===
|
|
349
|
-
index$
|
|
348
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
350
349
|
f.control ===
|
|
351
|
-
index$
|
|
350
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
352
351
|
const formulaWithVariable = actionVarsDynamicScore
|
|
353
352
|
.map((variableName, idx) => {
|
|
354
353
|
const variableMapToActionId = actionIdsDynamicScore[idx];
|
|
355
354
|
const variableMapToAction = foundActions.find((act) => act.id === variableMapToActionId);
|
|
356
355
|
const formValue = foundFormMetas.find((f) => (variableMapToAction === null || variableMapToAction === void 0 ? void 0 : variableMapToAction.key) === f.key &&
|
|
357
356
|
(f.control ===
|
|
358
|
-
index$
|
|
357
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
359
358
|
f.control ===
|
|
360
|
-
index$
|
|
359
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
361
360
|
if (!formValue)
|
|
362
361
|
return '';
|
|
363
362
|
if (formValue.control ===
|
|
364
|
-
index$
|
|
363
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]) {
|
|
365
364
|
const { age } = calcAge(dayjs__default["default"](formValue.value).toDate());
|
|
366
365
|
return `var ${variableName} = ${age};`;
|
|
367
366
|
}
|
|
@@ -383,7 +382,7 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
383
382
|
const replaceTextWithVariables = (label, listNodes) => {
|
|
384
383
|
const dynamicScoreHash = getDynamicScore(listNodes[0]);
|
|
385
384
|
try {
|
|
386
|
-
const listFormNodes = listNodes.filter((node) => node.type === index$
|
|
385
|
+
const listFormNodes = listNodes.filter((node) => node.type === index$3.NodeType.FORM);
|
|
387
386
|
/** Apply for dynamic score */
|
|
388
387
|
Object.keys(dynamicScoreHash).forEach((nodeId) => {
|
|
389
388
|
var _a, _b, _c;
|
|
@@ -394,9 +393,9 @@ const replaceTextWithVariables = (label, listNodes) => {
|
|
|
394
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));
|
|
395
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) &&
|
|
396
395
|
(f.control ===
|
|
397
|
-
index$
|
|
396
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
398
397
|
f.control ===
|
|
399
|
-
index$
|
|
398
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
400
399
|
if (dynamicScoreHash[nodeId].formula &&
|
|
401
400
|
dynamicScoreHash[nodeId].formula_result_name &&
|
|
402
401
|
(foundFormMetas === null || foundFormMetas === void 0 ? void 0 : foundFormMetas.length)) {
|
|
@@ -406,9 +405,9 @@ const replaceTextWithVariables = (label, listNodes) => {
|
|
|
406
405
|
const variableMapToAction = foundActions.find((act) => act.id === variableMapToActionId);
|
|
407
406
|
const formValue = foundFormMetas.find((f) => (variableMapToAction === null || variableMapToAction === void 0 ? void 0 : variableMapToAction.key) === f.key &&
|
|
408
407
|
(f.control ===
|
|
409
|
-
index$
|
|
408
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_NUMBER] ||
|
|
410
409
|
f.control ===
|
|
411
|
-
index$
|
|
410
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DOB]));
|
|
412
411
|
if (!formValue)
|
|
413
412
|
return '';
|
|
414
413
|
return `var ${variableName} = ${formValue.value};`;
|
|
@@ -564,7 +563,7 @@ const buildSubotInlineSsoReturnUrl = () => {
|
|
|
564
563
|
};
|
|
565
564
|
const isActiveSubotInlineSsoNode = (listNodes, activeId) => {
|
|
566
565
|
const found = listNodes.find((n) => n.id == activeId);
|
|
567
|
-
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;
|
|
568
567
|
};
|
|
569
568
|
const hasPendingSubotInlineSsoState = (botId) => {
|
|
570
569
|
var _a;
|
|
@@ -580,7 +579,7 @@ const hasPendingSubotInlineSsoState = (botId) => {
|
|
|
580
579
|
json.createdAt + timeToExist <= Date.now()) {
|
|
581
580
|
return false;
|
|
582
581
|
}
|
|
583
|
-
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;
|
|
584
583
|
}
|
|
585
584
|
catch (_b) {
|
|
586
585
|
return false;
|
|
@@ -617,7 +616,7 @@ const getPreviousStateFromStorage = (botId, { getParams }) => {
|
|
|
617
616
|
json.activeId &&
|
|
618
617
|
json.createdAt + timeToExist > Date.now()) {
|
|
619
618
|
localStorage.removeItem(STATE_SUBOT_INLINE_KEY);
|
|
620
|
-
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$
|
|
619
|
+
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$3.NodePosition.SSO;
|
|
621
620
|
if (isSSOAtLast) {
|
|
622
621
|
return {
|
|
623
622
|
listNodes: json.listNodes,
|
|
@@ -689,7 +688,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
689
688
|
((_a = nodeMessage._message) === null || _a === void 0 ? void 0 : _a.action_id) &&
|
|
690
689
|
((_b = nodeMessage._message) === null || _b === void 0 ? void 0 : _b.action_value)) {
|
|
691
690
|
const key = nodeMessage._message.action_value; // submit
|
|
692
|
-
if (nodeMessage.type === index$
|
|
691
|
+
if (nodeMessage.type === index$3.NodeType.FORM) {
|
|
693
692
|
const addressControl = ['address', 'province', 'district', 'commune'];
|
|
694
693
|
const formMetaExceptAddress = (((_c = nodeMessage._message) === null || _c === void 0 ? void 0 : _c.form_submit_meta) || []).filter((formMeta) => !addressControl.includes(formMeta.control));
|
|
695
694
|
/** For address field */
|
|
@@ -725,7 +724,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
725
724
|
});
|
|
726
725
|
}
|
|
727
726
|
}
|
|
728
|
-
if (nodeMessage.type === index$
|
|
727
|
+
if (nodeMessage.type === index$3.NodeType.TEXT) {
|
|
729
728
|
if (nodeMessage.is_multi_select) {
|
|
730
729
|
const actionIds = Object.keys(nodeMessage._message.selected_actions || {});
|
|
731
730
|
const actionLabel = nodeMessage.actions
|
|
@@ -744,7 +743,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
744
743
|
const actionLabel = action === null || action === void 0 ? void 0 : action.label;
|
|
745
744
|
// Select "Other, please provide more detail" -> There is an input below the option is stored in form_submit_meta
|
|
746
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;
|
|
747
|
-
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;
|
|
748
747
|
if (actionLabel && actionId) {
|
|
749
748
|
result.push({
|
|
750
749
|
attribute: key,
|
|
@@ -754,7 +753,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
754
753
|
}
|
|
755
754
|
}
|
|
756
755
|
}
|
|
757
|
-
if (nodeMessage.type === index$
|
|
756
|
+
if (nodeMessage.type === index$3.NodeType.POLL) {
|
|
758
757
|
const nodeId = nodeMessage.id;
|
|
759
758
|
const actionIds = ((_u = (_t = nodeMessage._message) === null || _t === void 0 ? void 0 : _t.current_polls) === null || _u === void 0 ? void 0 : _u[nodeId]) || [];
|
|
760
759
|
const actionLabel = nodeMessage.actions
|
|
@@ -799,7 +798,7 @@ const extractVoucherAnswers = (nodes, botItem) => {
|
|
|
799
798
|
else if (submitMessage.action_value === 'voucher_color') {
|
|
800
799
|
voucherColor = (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.label) || '';
|
|
801
800
|
}
|
|
802
|
-
if (nodeMessage.type === index$
|
|
801
|
+
if (nodeMessage.type === index$3.NodeType.FORM) {
|
|
803
802
|
const logicFind = (key) => (formMeta) => {
|
|
804
803
|
return formMeta.key === key;
|
|
805
804
|
};
|
|
@@ -864,7 +863,7 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
864
863
|
let statusFlowBot = 'in_progress';
|
|
865
864
|
const lastNode = nodes[nodes.length - 1];
|
|
866
865
|
// Saving data with status COMPLETE when chatbot go to final node
|
|
867
|
-
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)) {
|
|
868
867
|
statusFlowBot = 'complete';
|
|
869
868
|
}
|
|
870
869
|
/** Remove the first node and push it later in data fetching step to make sure data is latest */
|
|
@@ -888,9 +887,7 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
888
887
|
type: 'inline',
|
|
889
888
|
market: constantsDomainLocales.domainLocales[togetherComponentGlobalContext.locale],
|
|
890
889
|
};
|
|
891
|
-
yield
|
|
892
|
-
data: payload,
|
|
893
|
-
});
|
|
890
|
+
yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SUBOT_CREATE_LOG), 'log', payload);
|
|
894
891
|
}
|
|
895
892
|
catch (err) {
|
|
896
893
|
//
|
|
@@ -981,7 +978,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
981
978
|
/** Get Params */
|
|
982
979
|
const getParams = React.useCallback(() => {
|
|
983
980
|
const gaData = window.gaData;
|
|
984
|
-
const url = (customUrl || window.location.origin + index$
|
|
981
|
+
const url = (customUrl || window.location.origin + index$4.basePath) +
|
|
985
982
|
((togetherComponentGlobalContext.GlobalData === null || togetherComponentGlobalContext.GlobalData === void 0 ? void 0 : togetherComponentGlobalContext.GlobalData.locale) === 'tl-PH'
|
|
986
983
|
? articleLink.replace('fil/', '')
|
|
987
984
|
: articleLink);
|
|
@@ -1234,9 +1231,9 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
1234
1231
|
elementScrollIntoView,
|
|
1235
1232
|
]);
|
|
1236
1233
|
React.useEffect(() => {
|
|
1237
|
-
if (!Cookies__default["default"].get(index$
|
|
1234
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
1238
1235
|
index$1.checkUntilFinished({
|
|
1239
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
1236
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
1240
1237
|
finished: () => {
|
|
1241
1238
|
const params = getParams();
|
|
1242
1239
|
getFirstNode(params);
|
|
@@ -1676,7 +1673,7 @@ Container$v.displayName = 'SubotInlineDisclaimer';
|
|
|
1676
1673
|
const useCurrentUrl = () => {
|
|
1677
1674
|
const { data: { locale, router }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1678
1675
|
const { asPath } = router || {};
|
|
1679
|
-
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}`);
|
|
1680
1677
|
React.useEffect(() => {
|
|
1681
1678
|
setCurrentUrl(window.location.href);
|
|
1682
1679
|
}, [asPath]);
|
|
@@ -1687,7 +1684,7 @@ const useCurrentUrl = () => {
|
|
|
1687
1684
|
const useValidationMultiOption = () => {
|
|
1688
1685
|
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
1689
1686
|
const validateSelectActions = (activeActions, node, callBack) => {
|
|
1690
|
-
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 &&
|
|
1691
1688
|
activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
|
|
1692
1689
|
pushNotifications({
|
|
1693
1690
|
message: f({
|
|
@@ -1700,7 +1697,7 @@ const useValidationMultiOption = () => {
|
|
|
1700
1697
|
});
|
|
1701
1698
|
return;
|
|
1702
1699
|
}
|
|
1703
|
-
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 &&
|
|
1704
1701
|
(activeActions.length < (node === null || node === void 0 ? void 0 : node.from) ||
|
|
1705
1702
|
activeActions.length > (node === null || node === void 0 ? void 0 : node.to))) {
|
|
1706
1703
|
pushNotifications({
|
|
@@ -1830,12 +1827,12 @@ const NodeContextProvider = ({ children }) => {
|
|
|
1830
1827
|
return (React__default["default"].createElement(NodeContext.Provider, { value: ctxValue }, children));
|
|
1831
1828
|
};
|
|
1832
1829
|
|
|
1833
|
-
const disabledNodeList = [index$
|
|
1834
|
-
const disabledPositionList = [index$
|
|
1830
|
+
const disabledNodeList = [index$3.NodeType.FORM];
|
|
1831
|
+
const disabledPositionList = [index$3.NodePosition.SSO];
|
|
1835
1832
|
const excludeNodeList = [
|
|
1836
|
-
index$
|
|
1837
|
-
index$
|
|
1838
|
-
index$
|
|
1833
|
+
index$3.NodeType.FINAL,
|
|
1834
|
+
index$3.NodeType.FINAL_THANK_YOU,
|
|
1835
|
+
index$3.NodeType.FINAL_STANDARD,
|
|
1839
1836
|
];
|
|
1840
1837
|
// const isSingleChoiceText = (node?: SubotNode) => {
|
|
1841
1838
|
// if (!node) return false
|
|
@@ -1853,9 +1850,9 @@ const Container$u = () => {
|
|
|
1853
1850
|
const validation = useValidationMultiOption();
|
|
1854
1851
|
const botItem = listNodes[0];
|
|
1855
1852
|
const node = listNodes.find((nodeItem) => nodeItem.id == activeId);
|
|
1856
|
-
const actionNextChoice = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$
|
|
1857
|
-
const actionPollSubmit = (_b = node === null || node === void 0 ? void 0 : node.actions) === null || _b === void 0 ? void 0 : _b.find(({ type }) => type == index$
|
|
1858
|
-
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);
|
|
1859
1856
|
// const selectedWithOtherInput =
|
|
1860
1857
|
// node?.actions?.find(({ id }) => id === value.action_id)?.type ===
|
|
1861
1858
|
// NodeActionType.USER_CHOICE_TEXT_BY_INPUT
|
|
@@ -1929,7 +1926,7 @@ const Container$u = () => {
|
|
|
1929
1926
|
defaultMessage: 'Start over',
|
|
1930
1927
|
}))),
|
|
1931
1928
|
isDisplayAction && (React__default["default"].createElement("div", { className: "si-footer-actions" },
|
|
1932
|
-
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: {
|
|
1933
1930
|
root: {
|
|
1934
1931
|
':not(:disabled)': {
|
|
1935
1932
|
backgroundColor: 'transparent !important',
|
|
@@ -1945,7 +1942,7 @@ const Container$u = () => {
|
|
|
1945
1942
|
id: 'riskScreener.back',
|
|
1946
1943
|
defaultMessage: 'Back',
|
|
1947
1944
|
})),
|
|
1948
|
-
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: {
|
|
1949
1946
|
root: {
|
|
1950
1947
|
':not(:disabled)': {
|
|
1951
1948
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
@@ -2269,11 +2266,11 @@ const SubotInlineVoucherLeftUI = ({ clientId, voucherAnswers }) => {
|
|
|
2269
2266
|
return null;
|
|
2270
2267
|
}
|
|
2271
2268
|
return (React__default["default"].createElement(StyledWrap$n, { className: "si-voucher-left-ui" },
|
|
2272
|
-
React__default["default"].createElement("img", { src: index$
|
|
2273
|
-
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" }),
|
|
2274
2271
|
React__default["default"].createElement(core.Box, { className: "si-voucher-in-stock" },
|
|
2275
2272
|
React__default["default"].createElement("h3", null, quantityInStock),
|
|
2276
|
-
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" })),
|
|
2277
2274
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress" },
|
|
2278
2275
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress--inner", style: { width: `${percentage}%` } }))));
|
|
2279
2276
|
};
|
|
@@ -2314,7 +2311,7 @@ const Container$s = ({ node, onClickStart }) => {
|
|
|
2314
2311
|
email: '',
|
|
2315
2312
|
voucherName: '',
|
|
2316
2313
|
} })),
|
|
2317
|
-
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: {
|
|
2318
2315
|
root: {
|
|
2319
2316
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2320
2317
|
'&:hover': {
|
|
@@ -2415,7 +2412,7 @@ const getLeadPath = (path, params) => {
|
|
|
2415
2412
|
const callApiWithLead = (url, method, options) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2416
2413
|
if (options === null || options === void 0 ? void 0 : options.data) {
|
|
2417
2414
|
let cookie = Cookies__default["default"].get(constants.LEAD_TOKEN_COOKIE);
|
|
2418
|
-
const ga = Cookies__default["default"].get(index$
|
|
2415
|
+
const ga = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2419
2416
|
if (!cookie) {
|
|
2420
2417
|
const newCookie = uuid.v4();
|
|
2421
2418
|
cookie = newCookie;
|
|
@@ -2496,15 +2493,15 @@ const checkSyncDataOnFrisoCampaign = (bot, values) => {
|
|
|
2496
2493
|
if (!((_a = bot.extra_settings) === null || _a === void 0 ? void 0 : _a.sync_data_friso_campaign) || !values) {
|
|
2497
2494
|
return;
|
|
2498
2495
|
}
|
|
2499
|
-
const nameControl = index$
|
|
2500
|
-
const emailControl = index$
|
|
2501
|
-
const dateControl = index$
|
|
2502
|
-
const phoneControlOtp = index$
|
|
2503
|
-
const phoneControl = index$
|
|
2504
|
-
const level1Control = index$
|
|
2505
|
-
const level2Control = index$
|
|
2506
|
-
const level3Control = index$
|
|
2507
|
-
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];
|
|
2508
2505
|
const name = ((_b = values.find((o) => o.control === nameControl)) === null || _b === void 0 ? void 0 : _b.value) || '';
|
|
2509
2506
|
const email = ((_c = values.find((o) => o.control === emailControl)) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2510
2507
|
const date = ((_d = values.find((o) => o.control === dateControl)) === null || _d === void 0 ? void 0 : _d.value) || '';
|
|
@@ -2550,11 +2547,11 @@ const foundNodeFrisoForm = (listNode) => {
|
|
|
2550
2547
|
var _a, _b, _c, _d, _e, _f;
|
|
2551
2548
|
const node = n;
|
|
2552
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 ===
|
|
2553
|
-
index$
|
|
2550
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP] ||
|
|
2554
2551
|
o.control ===
|
|
2555
|
-
index$
|
|
2552
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_PHONE])) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2556
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 ===
|
|
2557
|
-
index$
|
|
2554
|
+
index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_DATE])) === null || _f === void 0 ? void 0 : _f.value) || '';
|
|
2558
2555
|
if (phone && date) {
|
|
2559
2556
|
foundPhone = phone;
|
|
2560
2557
|
foundDate = date;
|
|
@@ -2593,7 +2590,7 @@ const Container$r = ({ intent }) => {
|
|
|
2593
2590
|
const trackingMainButton = React.useMemo(() => {
|
|
2594
2591
|
if (!intent.url ||
|
|
2595
2592
|
!intent.label ||
|
|
2596
|
-
(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)
|
|
2597
2594
|
return {};
|
|
2598
2595
|
return {
|
|
2599
2596
|
'data-event-category': 'Service Connection',
|
|
@@ -2605,7 +2602,7 @@ const Container$r = ({ intent }) => {
|
|
|
2605
2602
|
return null;
|
|
2606
2603
|
const isShowDownloadIcon = (_a = intent.label) === null || _a === void 0 ? void 0 : _a.startsWith(':download:');
|
|
2607
2604
|
return (React__default["default"].createElement(StyledWrap$j, null,
|
|
2608
|
-
React__default["default"].createElement(index$
|
|
2605
|
+
React__default["default"].createElement(index$5.Button, Object.assign({ size: "md", color: "primary", onClick: handleOnClick }, trackingMainButton, { styles: {
|
|
2609
2606
|
root: {
|
|
2610
2607
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2611
2608
|
'&:hover': {
|
|
@@ -2638,20 +2635,20 @@ Container$q.displayName = 'SubotInlineIntentBotImage';
|
|
|
2638
2635
|
|
|
2639
2636
|
const Container$p = ({ intent, indexNumber }) => {
|
|
2640
2637
|
const { listNodes } = React.useContext(SubotInlineContext$1);
|
|
2641
|
-
const isShowLabel = ![index$
|
|
2638
|
+
const isShowLabel = ![index$3.NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2642
2639
|
const isText = [
|
|
2643
|
-
index$
|
|
2644
|
-
index$
|
|
2640
|
+
index$3.NodeIntentType.BOT_TEXT,
|
|
2641
|
+
index$3.NodeIntentType.BOT_MAIN_TITLE,
|
|
2645
2642
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2646
2643
|
const isBtn = [
|
|
2647
|
-
index$
|
|
2648
|
-
index$
|
|
2644
|
+
index$3.NodeIntentType.BOT_BUTTON,
|
|
2645
|
+
index$3.NodeIntentType.BOT_RECALCULATE,
|
|
2649
2646
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2650
2647
|
const isImageNode = [
|
|
2651
|
-
index$
|
|
2652
|
-
index$
|
|
2648
|
+
index$3.NodeIntentType.BOT_IMAGE,
|
|
2649
|
+
index$3.NodeIntentType.BOT_MAIN_IMAGE,
|
|
2653
2650
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2654
|
-
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;
|
|
2655
2652
|
if (isBtn)
|
|
2656
2653
|
return React__default["default"].createElement(Container$r, { intent: intent });
|
|
2657
2654
|
if (!intent) {
|
|
@@ -2826,11 +2823,11 @@ function useGetEncodedGaId() {
|
|
|
2826
2823
|
const [encodedGaId, setEncodedGaId] = React.useState('');
|
|
2827
2824
|
const [gaId, setGaId] = React.useState('');
|
|
2828
2825
|
React.useEffect(() => {
|
|
2829
|
-
if (!Cookies__default["default"].get(index$
|
|
2826
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
2830
2827
|
index$1.checkUntilFinished({
|
|
2831
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
2828
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
2832
2829
|
finished: () => {
|
|
2833
|
-
const gaClientId = Cookies__default["default"].get(index$
|
|
2830
|
+
const gaClientId = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2834
2831
|
if (gaClientId) {
|
|
2835
2832
|
const base64Encoded = btoa(gaClientId);
|
|
2836
2833
|
setEncodedGaId(base64Encoded);
|
|
@@ -2841,7 +2838,7 @@ function useGetEncodedGaId() {
|
|
|
2841
2838
|
});
|
|
2842
2839
|
}
|
|
2843
2840
|
else {
|
|
2844
|
-
const gaClientId = Cookies__default["default"].get(index$
|
|
2841
|
+
const gaClientId = Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE);
|
|
2845
2842
|
if (gaClientId) {
|
|
2846
2843
|
const base64Encoded = btoa(gaClientId);
|
|
2847
2844
|
setEncodedGaId(base64Encoded);
|
|
@@ -2982,7 +2979,7 @@ const Container$l = ({ intent }) => {
|
|
|
2982
2979
|
const disclaimerText = (_a = listServices[0]) === null || _a === void 0 ? void 0 : _a.disclaimer;
|
|
2983
2980
|
const sectionTitle = (_b = listServices[0]) === null || _b === void 0 ? void 0 : _b.sectionTitle;
|
|
2984
2981
|
return (React__default["default"].createElement(StyledWrap$g, null,
|
|
2985
|
-
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)) ||
|
|
2986
2983
|
f({
|
|
2987
2984
|
id: 'tools.suggestedServices',
|
|
2988
2985
|
defaultMessage: 'Suggested services',
|
|
@@ -2991,7 +2988,7 @@ const Container$l = ({ intent }) => {
|
|
|
2991
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) },
|
|
2992
2989
|
React__default["default"].createElement(core.Box, { className: "aspect-square" },
|
|
2993
2990
|
React__default["default"].createElement("img", { loading: "lazy", src: service.feature, alt: service.feature, key: index })),
|
|
2994
|
-
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))));
|
|
2995
2992
|
})),
|
|
2996
2993
|
disclaimerText && React__default["default"].createElement(Container$m, { text: disclaimerText })));
|
|
2997
2994
|
};
|
|
@@ -3016,7 +3013,7 @@ const Container$k = ({ intent }) => {
|
|
|
3016
3013
|
if (!(intent === null || intent === void 0 ? void 0 : intent.label)) {
|
|
3017
3014
|
return null;
|
|
3018
3015
|
}
|
|
3019
|
-
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;
|
|
3020
3017
|
return (React__default["default"].createElement(StyledWrap$e, { className: "si-bot-text" },
|
|
3021
3018
|
React__default["default"].createElement(Markdown, null, isMainBody
|
|
3022
3019
|
? replaceTextWithVariables(intent.label, listNodes)
|
|
@@ -3132,30 +3129,30 @@ const Container$i = ({ intent, }) => {
|
|
|
3132
3129
|
Container$i.displayName = 'SubotInlineIntentUrl';
|
|
3133
3130
|
|
|
3134
3131
|
const SubotInlineIntentBaseTarget = {
|
|
3135
|
-
[index$
|
|
3136
|
-
[index$
|
|
3137
|
-
[index$
|
|
3138
|
-
[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,
|
|
3139
3136
|
// In the revamp UI, recalculate as a normal button
|
|
3140
|
-
[index$
|
|
3141
|
-
[index$
|
|
3142
|
-
[index$
|
|
3143
|
-
[index$
|
|
3144
|
-
[index$
|
|
3145
|
-
[index$
|
|
3146
|
-
[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,
|
|
3147
3144
|
// [NodeIntentType.BOT_LANDING_PAGE_URL]: SubotInlineIntentBotText,
|
|
3148
3145
|
// [NodeIntentType.BOT_LANDING_PAGE_BUTTON]: SubotInlineIntentBotText,
|
|
3149
3146
|
// [NodeIntentType.BOT_RISK_SCREEN]: SubotInlineIntentBotRiskScreener,
|
|
3150
|
-
[index$
|
|
3151
|
-
[index$
|
|
3152
|
-
[index$
|
|
3153
|
-
[index$
|
|
3154
|
-
[index$
|
|
3155
|
-
[index$
|
|
3156
|
-
[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,
|
|
3157
3154
|
/** intents fake for sso block */
|
|
3158
|
-
[index$
|
|
3155
|
+
[index$3.NodeIntentType.SSO_INTENT]: Container$j,
|
|
3159
3156
|
};
|
|
3160
3157
|
const SubotInlineIntentBase$1 = new Proxy(SubotInlineIntentBaseTarget, {
|
|
3161
3158
|
get(_, prop) {
|
|
@@ -3171,13 +3168,13 @@ const SubotInlineIntentBase$1 = new Proxy(SubotInlineIntentBaseTarget, {
|
|
|
3171
3168
|
});
|
|
3172
3169
|
|
|
3173
3170
|
const excludeIntents = [
|
|
3174
|
-
index$
|
|
3175
|
-
index$
|
|
3171
|
+
index$3.NodeIntentType.BOT_SUBMISSION,
|
|
3172
|
+
index$3.NodeIntentType.BOT_BACKGROUND_IMAGE,
|
|
3176
3173
|
];
|
|
3177
3174
|
const Container$h = ({ intents: intentsProp, indexNumber, }) => {
|
|
3178
3175
|
const filteredIntents = intentsProp.filter((intent) => !excludeIntents.includes(intent.type || ''));
|
|
3179
|
-
const intentTitle = filteredIntents.find((intent) => intent.type === index$
|
|
3180
|
-
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);
|
|
3181
3178
|
return (React__default["default"].createElement(StyledWrap$l, { "data-intent-count": intents.length + 1 },
|
|
3182
3179
|
intentTitle && (React__default["default"].createElement(Container$p, { intent: intentTitle, indexNumber: indexNumber })),
|
|
3183
3180
|
!!intents.length && (React__default["default"].createElement("div", { className: "si-intent-list" }, intents.map((intent) => {
|
|
@@ -3427,41 +3424,41 @@ const Container$f = ({ node }) => {
|
|
|
3427
3424
|
let botSubmissionIntent = undefined;
|
|
3428
3425
|
intentsProps.forEach((intent) => {
|
|
3429
3426
|
switch (intent === null || intent === void 0 ? void 0 : intent.type) {
|
|
3430
|
-
case index$
|
|
3427
|
+
case index$3.NodeIntentType.BOT_MAIN_IMAGE:
|
|
3431
3428
|
mainIntents.push(intent);
|
|
3432
3429
|
break;
|
|
3433
|
-
case index$
|
|
3430
|
+
case index$3.NodeIntentType.BOT_MAIN_TITLE:
|
|
3434
3431
|
mainIntents.push(intent);
|
|
3435
3432
|
break;
|
|
3436
|
-
case index$
|
|
3433
|
+
case index$3.NodeIntentType.BOT_MAIN_BODY:
|
|
3437
3434
|
mainIntents.push(intent);
|
|
3438
3435
|
break;
|
|
3439
|
-
case index$
|
|
3436
|
+
case index$3.NodeIntentType.BOT_SUGGESTED_SERVICE:
|
|
3440
3437
|
suggestedServiceIntents.push(intent);
|
|
3441
3438
|
break;
|
|
3442
|
-
case index$
|
|
3439
|
+
case index$3.NodeIntentType.BOT_MAIN_BUTTON:
|
|
3443
3440
|
mainButtonIntents.push(intent);
|
|
3444
3441
|
break;
|
|
3445
|
-
case index$
|
|
3442
|
+
case index$3.NodeIntentType.BOT_BOOKING:
|
|
3446
3443
|
bookingButtonIntents.push(intent);
|
|
3447
3444
|
break;
|
|
3448
|
-
case index$
|
|
3445
|
+
case index$3.NodeIntentType.BOT_RECALCULATE:
|
|
3449
3446
|
// mainIntents.push(intent)
|
|
3450
3447
|
// TODO: Do not apply. Inline Revamp has "Start Over" btn already
|
|
3451
3448
|
break;
|
|
3452
|
-
case index$
|
|
3449
|
+
case index$3.NodeIntentType.BOT_SUB_TITLE:
|
|
3453
3450
|
subIntents.push(intent);
|
|
3454
3451
|
break;
|
|
3455
|
-
case index$
|
|
3452
|
+
case index$3.NodeIntentType.BOT_SUB_BODY:
|
|
3456
3453
|
subIntents.push(intent);
|
|
3457
3454
|
break;
|
|
3458
|
-
case index$
|
|
3455
|
+
case index$3.NodeIntentType.BOT_RELATED_ARTICLE:
|
|
3459
3456
|
relatedArticleIntents.push(intent);
|
|
3460
3457
|
break;
|
|
3461
|
-
case index$
|
|
3458
|
+
case index$3.NodeIntentType.BOT_RISK_SCREEN:
|
|
3462
3459
|
screenerIntents.push(intent);
|
|
3463
3460
|
break;
|
|
3464
|
-
case index$
|
|
3461
|
+
case index$3.NodeIntentType.BOT_SUBMISSION:
|
|
3465
3462
|
botSubmissionIntent = intent;
|
|
3466
3463
|
break;
|
|
3467
3464
|
}
|
|
@@ -3507,7 +3504,7 @@ const Container$f = ({ node }) => {
|
|
|
3507
3504
|
return NodeIntent && React__default["default"].createElement(NodeIntent, { key: intent.id, intent: intent });
|
|
3508
3505
|
}))),
|
|
3509
3506
|
(relatedArticleIntents === null || relatedArticleIntents === void 0 ? void 0 : relatedArticleIntents.length) > 0 && (React__default["default"].createElement("div", { style: { marginTop: 24 } },
|
|
3510
|
-
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({
|
|
3511
3508
|
id: 'articlePage.relatedPostsSectionTitle',
|
|
3512
3509
|
defaultMessage: 'Related Articles',
|
|
3513
3510
|
})),
|
|
@@ -3532,7 +3529,7 @@ const Container$e = ({ node }) => {
|
|
|
3532
3529
|
}, []);
|
|
3533
3530
|
const resultButton = React.useMemo(() => {
|
|
3534
3531
|
var _a;
|
|
3535
|
-
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);
|
|
3536
3533
|
if (_resultButton)
|
|
3537
3534
|
return _resultButton;
|
|
3538
3535
|
return null;
|
|
@@ -3546,7 +3543,7 @@ const Container$e = ({ node }) => {
|
|
|
3546
3543
|
return (React__default["default"].createElement(StyledWrap$b, { id: "si-node-final-thank-you" },
|
|
3547
3544
|
React__default["default"].createElement(Container$h, { intents: node.intents || [] }),
|
|
3548
3545
|
resultButton && (React__default["default"].createElement("div", { className: "si-final-thank-action" },
|
|
3549
|
-
React__default["default"].createElement(index$
|
|
3546
|
+
React__default["default"].createElement(index$5.Button, { size: "md", onClick: handleOnNext }, resultButton.label)))));
|
|
3550
3547
|
};
|
|
3551
3548
|
Container$e.displayName = 'SubotinlineNodeFinal';
|
|
3552
3549
|
|
|
@@ -4256,7 +4253,7 @@ function GoogleAddressField({ action, formError, control, initValue, onChange, }
|
|
|
4256
4253
|
}, render: (props) => {
|
|
4257
4254
|
const { address = '' } = (props.field.value || {});
|
|
4258
4255
|
console.log('props', props);
|
|
4259
|
-
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,
|
|
4260
4257
|
// Always display the suggestions
|
|
4261
4258
|
filter: () => true, searchable: true, className: classNames__default["default"]({
|
|
4262
4259
|
isEmpty: options.length === 0 ||
|
|
@@ -4764,57 +4761,57 @@ const StyleWrapperFullAddress = styled__default["default"].div `
|
|
|
4764
4761
|
`;
|
|
4765
4762
|
|
|
4766
4763
|
const getActionEmail = (actions) => {
|
|
4767
|
-
return actions.find(({ type }) => type === index$
|
|
4764
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_EMAIL);
|
|
4768
4765
|
};
|
|
4769
4766
|
const getActionName = (actions) => {
|
|
4770
|
-
return actions.find(({ type }) => type === index$
|
|
4767
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_NAME);
|
|
4771
4768
|
};
|
|
4772
4769
|
const getActionPhone = (actions) => {
|
|
4773
|
-
return actions.find(({ type }) => type === index$
|
|
4770
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_PHONE);
|
|
4774
4771
|
};
|
|
4775
4772
|
const getActionOtp = (actions) => {
|
|
4776
|
-
return actions.find(({ type }) => type === index$
|
|
4773
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_OTP);
|
|
4777
4774
|
};
|
|
4778
4775
|
const getActionOtpWhatsApp = (actions) => {
|
|
4779
|
-
return actions.find(({ type }) => type === index$
|
|
4776
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4780
4777
|
};
|
|
4781
4778
|
const getActionConfirm = (actions) => {
|
|
4782
|
-
return actions.find(({ type }) => type === index$
|
|
4779
|
+
return actions.find(({ type }) => type === index$3.NodeActionType.USER_SUBMIT_CONFIRM);
|
|
4783
4780
|
};
|
|
4784
4781
|
const isControlOtp = (control) => {
|
|
4785
|
-
return (control === index$
|
|
4786
|
-
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]);
|
|
4787
4784
|
};
|
|
4788
4785
|
const isActionTypeOtp = (type) => {
|
|
4789
|
-
return (type === index$
|
|
4790
|
-
type === index$
|
|
4786
|
+
return (type === index$3.NodeActionType.USER_SUBMIT_OTP ||
|
|
4787
|
+
type === index$3.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4791
4788
|
};
|
|
4792
4789
|
const getTranslateVerifiedOtpMessages = () => {
|
|
4793
4790
|
const phoneWasVerifiedMessage = new Map();
|
|
4794
|
-
phoneWasVerifiedMessage.set(index$
|
|
4795
|
-
phoneWasVerifiedMessage.set(index$
|
|
4796
|
-
phoneWasVerifiedMessage.set(index$
|
|
4797
|
-
phoneWasVerifiedMessage.set(index$
|
|
4798
|
-
phoneWasVerifiedMessage.set(index$
|
|
4799
|
-
phoneWasVerifiedMessage.set(index$
|
|
4800
|
-
phoneWasVerifiedMessage.set(index$
|
|
4801
|
-
phoneWasVerifiedMessage.set(index$
|
|
4802
|
-
phoneWasVerifiedMessage.set(index$
|
|
4803
|
-
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.');
|
|
4804
4801
|
return phoneWasVerifiedMessage;
|
|
4805
4802
|
};
|
|
4806
4803
|
const getTransPleaseVerifiedOtp = () => {
|
|
4807
4804
|
const pleaseVerifiedOtp = new Map();
|
|
4808
|
-
pleaseVerifiedOtp.set(index$
|
|
4809
|
-
pleaseVerifiedOtp.set(index$
|
|
4810
|
-
pleaseVerifiedOtp.set(index$
|
|
4811
|
-
pleaseVerifiedOtp.set(index$
|
|
4812
|
-
pleaseVerifiedOtp.set(index$
|
|
4813
|
-
pleaseVerifiedOtp.set(index$
|
|
4814
|
-
pleaseVerifiedOtp.set(index$
|
|
4815
|
-
pleaseVerifiedOtp.set(index$
|
|
4816
|
-
pleaseVerifiedOtp.set(index$
|
|
4817
|
-
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');
|
|
4818
4815
|
return pleaseVerifiedOtp;
|
|
4819
4816
|
};
|
|
4820
4817
|
const validateDateField = (value, isSubmitting, f, cb) => {
|
|
@@ -5093,10 +5090,10 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5093
5090
|
}
|
|
5094
5091
|
data[d.key] = d.value;
|
|
5095
5092
|
if ([
|
|
5096
|
-
index$
|
|
5097
|
-
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],
|
|
5098
5095
|
].includes(d.control)) {
|
|
5099
|
-
data[d.key] = dayjs__default["default"](d.value, index$
|
|
5096
|
+
data[d.key] = dayjs__default["default"](d.value, index$4.API_DATE_FORMAT).toDate();
|
|
5100
5097
|
}
|
|
5101
5098
|
});
|
|
5102
5099
|
if (data['otpPhoneNumber']) {
|
|
@@ -5141,39 +5138,39 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5141
5138
|
}, [botId, nodeId, JSON.stringify(trackingSubmitBtn)]);
|
|
5142
5139
|
const firstActionAddressIndex = React.useMemo(() => {
|
|
5143
5140
|
return actions.findIndex((action) => {
|
|
5144
|
-
return index$
|
|
5141
|
+
return index$3.FULL_KEY_ADDRESS.includes(action.type);
|
|
5145
5142
|
});
|
|
5146
5143
|
}, [actions]);
|
|
5147
5144
|
const actionAddress = React.useMemo(() => {
|
|
5148
5145
|
return actions.find((action) => {
|
|
5149
|
-
return index$
|
|
5146
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS === action.type;
|
|
5150
5147
|
});
|
|
5151
5148
|
}, [actions]);
|
|
5152
5149
|
const actionAddressLever1 = React.useMemo(() => {
|
|
5153
5150
|
return actions.find((action) => {
|
|
5154
|
-
return index$
|
|
5151
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE === action.type;
|
|
5155
5152
|
});
|
|
5156
5153
|
}, [actions]);
|
|
5157
5154
|
const actionAddressLever2 = React.useMemo(() => {
|
|
5158
5155
|
return actions.find((action) => {
|
|
5159
|
-
return index$
|
|
5156
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT === action.type;
|
|
5160
5157
|
});
|
|
5161
5158
|
}, [actions]);
|
|
5162
5159
|
const actionAddressLever3 = React.useMemo(() => {
|
|
5163
5160
|
return actions.find((action) => {
|
|
5164
|
-
return index$
|
|
5161
|
+
return index$3.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE === action.type;
|
|
5165
5162
|
});
|
|
5166
5163
|
}, [actions]);
|
|
5167
5164
|
const { labelInputDate } = React.useMemo(() => {
|
|
5168
|
-
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'];
|
|
5169
5166
|
return {
|
|
5170
5167
|
dateFormat,
|
|
5171
5168
|
labelInputDate: dateFormat
|
|
5172
5169
|
.split('/')
|
|
5173
|
-
.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])),
|
|
5174
5171
|
};
|
|
5175
5172
|
}, [locale, f]);
|
|
5176
|
-
const inputType = index$
|
|
5173
|
+
const inputType = index$3.ELEMENT_CONTROL_INPUT_TYPE;
|
|
5177
5174
|
const { register, handleSubmit, watch, formState: { errors, isSubmitting }, control, setValue, setError, clearErrors, getValues, trigger, } = reactHookForm.useForm({ defaultValues: defaultFormValues });
|
|
5178
5175
|
const setSubmitData = (data) => {
|
|
5179
5176
|
const submitMeta = [];
|
|
@@ -5181,9 +5178,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5181
5178
|
if (!action.key) {
|
|
5182
5179
|
continue;
|
|
5183
5180
|
}
|
|
5184
|
-
if (action.type !== index$
|
|
5185
|
-
action.type !== index$
|
|
5186
|
-
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) {
|
|
5187
5184
|
/** If it's google api address, admin cannot add address province/district/commune and address freetext */
|
|
5188
5185
|
const googleMapData = data[action.key];
|
|
5189
5186
|
googleMapAddressKeys.forEach((addressKey) => {
|
|
@@ -5196,9 +5193,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5196
5193
|
}
|
|
5197
5194
|
});
|
|
5198
5195
|
}
|
|
5199
|
-
else if (action.type === index$
|
|
5200
|
-
action.type === index$
|
|
5201
|
-
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) {
|
|
5202
5199
|
submitMeta.push({
|
|
5203
5200
|
key: action.key,
|
|
5204
5201
|
control: inputType[action.type] || '',
|
|
@@ -5206,22 +5203,22 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5206
5203
|
value: data[action.key].label || '',
|
|
5207
5204
|
});
|
|
5208
5205
|
}
|
|
5209
|
-
else if (action.type === index$
|
|
5210
|
-
action.type === index$
|
|
5206
|
+
else if (action.type === index$3.NodeActionType.USER_SUBMIT_DOB ||
|
|
5207
|
+
action.type === index$3.NodeActionType.USER_SUBMIT_DATE) {
|
|
5211
5208
|
const dobStr = (data[action.key] || '');
|
|
5212
5209
|
const dayInJS = dayjs__default["default"](dobStr);
|
|
5213
5210
|
if (dayInJS.isValid()) {
|
|
5214
5211
|
submitMeta.push({
|
|
5215
5212
|
key: action.key,
|
|
5216
5213
|
control: inputType[action.type] || '',
|
|
5217
|
-
value: dayInJS.format(index$
|
|
5214
|
+
value: dayInJS.format(index$4.API_DATE_FORMAT),
|
|
5218
5215
|
});
|
|
5219
5216
|
}
|
|
5220
5217
|
}
|
|
5221
5218
|
else if (isActionTypeOtp(action.type)) {
|
|
5222
5219
|
submitMeta.push({
|
|
5223
5220
|
key: action.key,
|
|
5224
|
-
control: index$
|
|
5221
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_OTP],
|
|
5225
5222
|
value: data.otpPhoneNumber,
|
|
5226
5223
|
});
|
|
5227
5224
|
}
|
|
@@ -5247,7 +5244,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5247
5244
|
}
|
|
5248
5245
|
}
|
|
5249
5246
|
}
|
|
5250
|
-
const actionArr = actions.filter((action) => action.type === index$
|
|
5247
|
+
const actionArr = actions.filter((action) => action.type === index$3.NodeActionType.USER_SUBMIT_SEND);
|
|
5251
5248
|
const submitData = {
|
|
5252
5249
|
action_id: actionArr[0].id,
|
|
5253
5250
|
action_value: actionArr[0].key,
|
|
@@ -5309,20 +5306,29 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5309
5306
|
}
|
|
5310
5307
|
setIsLoading(true);
|
|
5311
5308
|
try {
|
|
5312
|
-
const result = yield
|
|
5309
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5313
5310
|
? PATHS$1.POST_SEND_OTP_WHATSAPP
|
|
5314
|
-
: PATHS$1.POST_SEND_OTP), '
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
:
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
},
|
|
5323
|
-
});
|
|
5311
|
+
: PATHS$1.POST_SEND_OTP), actionOtpWhatsApp ? 'whatsapp_otp' : 'sms_otp', actionOtpWhatsApp
|
|
5312
|
+
? {
|
|
5313
|
+
phone_number: `+${parsedPhone.countryCallingCode}${parsedPhone.nationalNumber}`,
|
|
5314
|
+
}
|
|
5315
|
+
: {
|
|
5316
|
+
phone_number: parsedPhone.nationalNumber,
|
|
5317
|
+
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
5318
|
+
});
|
|
5324
5319
|
setIsLoading(false);
|
|
5325
5320
|
const { _status, _errorCode } = result;
|
|
5321
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
5322
|
+
if (countRef.current) {
|
|
5323
|
+
countRef.current.cancel();
|
|
5324
|
+
}
|
|
5325
|
+
pushNotifications({
|
|
5326
|
+
title: '',
|
|
5327
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5328
|
+
type: 'warning',
|
|
5329
|
+
});
|
|
5330
|
+
return;
|
|
5331
|
+
}
|
|
5326
5332
|
if (_status === 1) {
|
|
5327
5333
|
if (sentOTP) {
|
|
5328
5334
|
setIsFinishedCountDown(false);
|
|
@@ -5344,7 +5350,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5344
5350
|
title: '',
|
|
5345
5351
|
message: f(OTP_VERIFIED_MSG_CODE === null || OTP_VERIFIED_MSG_CODE === void 0 ? void 0 : OTP_VERIFIED_MSG_CODE[_errorCode]) ||
|
|
5346
5352
|
messages.get(locale) ||
|
|
5347
|
-
messages.get(index$
|
|
5353
|
+
messages.get(index$3.LOCALE.PhilippinesEnglish),
|
|
5348
5354
|
type: 'success',
|
|
5349
5355
|
});
|
|
5350
5356
|
clearErrors(((_a = getActionOtp(actions)) === null || _a === void 0 ? void 0 : _a.key) || ((_b = getActionOtpWhatsApp(actions)) === null || _b === void 0 ? void 0 : _b.key));
|
|
@@ -5387,20 +5393,18 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5387
5393
|
const parsedPhone = PhoneInputBase.parsePhoneNumber(data.otpPhoneNumber);
|
|
5388
5394
|
if (action.key && parsedPhone) {
|
|
5389
5395
|
try {
|
|
5390
|
-
const result = yield
|
|
5396
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(actionOtpWhatsApp
|
|
5391
5397
|
? PATHS$1.POST_VERIFY_OTP_WHATSAPP
|
|
5392
|
-
: PATHS$1.POST_VERIFY_OTP), '
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
:
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
},
|
|
5403
|
-
});
|
|
5398
|
+
: PATHS$1.POST_VERIFY_OTP), actionOtpWhatsApp ? 'whatsapp_verify' : 'sms_verify', actionOtpWhatsApp
|
|
5399
|
+
? {
|
|
5400
|
+
code: data['otpCode'],
|
|
5401
|
+
phone_number: `+${parsedPhone.countryCallingCode}${parsedPhone.nationalNumber}`,
|
|
5402
|
+
}
|
|
5403
|
+
: {
|
|
5404
|
+
code: data['otpCode'],
|
|
5405
|
+
phone_number: parsedPhone.nationalNumber,
|
|
5406
|
+
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
5407
|
+
});
|
|
5404
5408
|
const { _status, _messages } = result;
|
|
5405
5409
|
if (_status === 1) {
|
|
5406
5410
|
pushNotifications({
|
|
@@ -5418,8 +5422,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5418
5422
|
catch (error) {
|
|
5419
5423
|
const errMessage = JSON.parse(error.message);
|
|
5420
5424
|
const { _errorCode } = errMessage || {};
|
|
5421
|
-
const message = f(
|
|
5422
|
-
|
|
5425
|
+
const message = f(index$2.isSubotCaptchaForbidden(errMessage)
|
|
5426
|
+
? index$2.SUBOT_CAPTCHA_FAILED_MESSAGE
|
|
5427
|
+
: OTP_VERIFIED_MSG_CODE === null || OTP_VERIFIED_MSG_CODE === void 0 ? void 0 : OTP_VERIFIED_MSG_CODE[_errorCode]) || f({ id: 'validation.error.validOTP' });
|
|
5423
5428
|
pushNotifications({ title: '', message, type: 'danger' });
|
|
5424
5429
|
setError('otpCode', { type: 'custom', message });
|
|
5425
5430
|
}
|
|
@@ -5450,7 +5455,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5450
5455
|
required: true,
|
|
5451
5456
|
}, render: (props) => {
|
|
5452
5457
|
var _a;
|
|
5453
|
-
return (React__default["default"].createElement(index$
|
|
5458
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever1.id, options: provinceData, onChange: (val) => {
|
|
5454
5459
|
props.field.onChange(val);
|
|
5455
5460
|
handleSelectedProvince(val);
|
|
5456
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'}` }));
|
|
@@ -5466,7 +5471,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5466
5471
|
required: true,
|
|
5467
5472
|
}, render: (props) => {
|
|
5468
5473
|
var _a;
|
|
5469
|
-
return (React__default["default"].createElement(index$
|
|
5474
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever2.id, options: districtData, onChange: (val) => {
|
|
5470
5475
|
props.field.onChange(val);
|
|
5471
5476
|
handleSelectedDistrict(val);
|
|
5472
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'}` }));
|
|
@@ -5482,7 +5487,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5482
5487
|
required: true,
|
|
5483
5488
|
}, render: (props) => {
|
|
5484
5489
|
var _a;
|
|
5485
|
-
return (React__default["default"].createElement(index$
|
|
5490
|
+
return (React__default["default"].createElement(index$a.Dropdown, { id: actionAddressLever3.id, options: communeData, onChange: (val) => {
|
|
5486
5491
|
props.field.onChange(val);
|
|
5487
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'}` }));
|
|
5488
5493
|
} })),
|
|
@@ -5500,20 +5505,20 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5500
5505
|
return renderFullAddressInput();
|
|
5501
5506
|
}
|
|
5502
5507
|
switch (action.type) {
|
|
5503
|
-
case index$
|
|
5508
|
+
case index$3.NodeActionType.USER_SUBMIT_DROPDOWN:
|
|
5504
5509
|
const options = action.url ? action.url.split('\n') : [];
|
|
5505
5510
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5506
5511
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5507
5512
|
React__default["default"].createElement(reactHookForm.Controller, { key: action.key, control: control, name: action.key, rules: {
|
|
5508
5513
|
required: true,
|
|
5509
5514
|
}, render: ({ field }) => {
|
|
5510
|
-
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 })));
|
|
5511
5516
|
} }),
|
|
5512
5517
|
errors[action.key] && (React__default["default"].createElement("p", { className: "error-message" }, f({
|
|
5513
5518
|
id: 'validation.error.requiredField',
|
|
5514
5519
|
defaultMessage: 'This field is required',
|
|
5515
5520
|
})))));
|
|
5516
|
-
case index$
|
|
5521
|
+
case index$3.NodeActionType.USER_SUBMIT_EMAIL:
|
|
5517
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,}))$/;
|
|
5518
5523
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5519
5524
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
@@ -5530,7 +5535,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5530
5535
|
id: 'validation.error.validEmail',
|
|
5531
5536
|
defaultMessage: 'Please enter a valid email address.',
|
|
5532
5537
|
})))));
|
|
5533
|
-
case index$
|
|
5538
|
+
case index$3.NodeActionType.USER_SUBMIT_NAME:
|
|
5534
5539
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5535
5540
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5536
5541
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5538,7 +5543,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5538
5543
|
id: 'validation.error.requiredField',
|
|
5539
5544
|
defaultMessage: 'This field is required',
|
|
5540
5545
|
})))));
|
|
5541
|
-
case index$
|
|
5546
|
+
case index$3.NodeActionType.USER_SUBMIT_PHONE:
|
|
5542
5547
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5543
5548
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5544
5549
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -5549,7 +5554,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5549
5554
|
id: 'validation.error.validNumber',
|
|
5550
5555
|
defaultMessage: 'Please enter a valid number.',
|
|
5551
5556
|
})))));
|
|
5552
|
-
case index$
|
|
5557
|
+
case index$3.NodeActionType.USER_SUBMIT_NUMBER:
|
|
5553
5558
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5554
5559
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5555
5560
|
React__default["default"].createElement("input", Object.assign({ type: "number", id: action.id }, register(action.key, { required: true }))),
|
|
@@ -5557,7 +5562,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5557
5562
|
id: 'validation.error.requiredField',
|
|
5558
5563
|
defaultMessage: 'This field is required',
|
|
5559
5564
|
})))));
|
|
5560
|
-
case index$
|
|
5565
|
+
case index$3.NodeActionType.USER_SUBMIT_DATE:
|
|
5561
5566
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5562
5567
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5563
5568
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -5585,7 +5590,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5585
5590
|
}, labelTuples: labelInputDate, locale: locale, error: isError, className: "subot_input subot_input_date" }))),
|
|
5586
5591
|
isError && (React__default["default"].createElement("p", { className: "error-message" }, error === null || error === void 0 ? void 0 : error.message))));
|
|
5587
5592
|
} })));
|
|
5588
|
-
case index$
|
|
5593
|
+
case index$3.NodeActionType.USER_SUBMIT_BMI:
|
|
5589
5594
|
return (React__default["default"].createElement("div", { key: action.id },
|
|
5590
5595
|
React__default["default"].createElement("div", { className: "input-row", key: `${action.id}-height` },
|
|
5591
5596
|
React__default["default"].createElement("label", { htmlFor: `${action.key}-height` }, f({ id: 'home.bmi.input.height', defaultMessage: 'Height' })),
|
|
@@ -5601,7 +5606,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5601
5606
|
id: 'validation.error.requiredField',
|
|
5602
5607
|
defaultMessage: 'This field is required',
|
|
5603
5608
|
}))))));
|
|
5604
|
-
case index$
|
|
5609
|
+
case index$3.NodeActionType.USER_SUBMIT_GENDER:
|
|
5605
5610
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5606
5611
|
React__default["default"].createElement("label", null, action.label),
|
|
5607
5612
|
React__default["default"].createElement("div", { className: "radio-group" },
|
|
@@ -5625,7 +5630,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5625
5630
|
id: 'validation.error.requiredField',
|
|
5626
5631
|
defaultMessage: 'This field is required',
|
|
5627
5632
|
})))));
|
|
5628
|
-
case index$
|
|
5633
|
+
case index$3.NodeActionType.USER_SUBMIT_TEXT:
|
|
5629
5634
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5630
5635
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5631
5636
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5633,8 +5638,8 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5633
5638
|
id: 'validation.error.requiredField',
|
|
5634
5639
|
defaultMessage: 'This field is required',
|
|
5635
5640
|
})))));
|
|
5636
|
-
case index$
|
|
5637
|
-
case index$
|
|
5641
|
+
case index$3.NodeActionType.USER_SUBMIT_OTP:
|
|
5642
|
+
case index$3.NodeActionType.USER_SUBMIT_WHATSAPP:
|
|
5638
5643
|
return (React__default["default"].createElement("div", null,
|
|
5639
5644
|
React__default["default"].createElement("div", { className: "input-row input-row--otp" },
|
|
5640
5645
|
React__default["default"].createElement("label", { htmlFor: "otpPhoneNumber" }, action.label),
|
|
@@ -5664,7 +5669,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5664
5669
|
id: 'validation.error.validNumber',
|
|
5665
5670
|
defaultMessage: 'Please enter a valid number.',
|
|
5666
5671
|
})))),
|
|
5667
|
-
verifiedOTP ? ('') : (React__default["default"].createElement(index$
|
|
5672
|
+
verifiedOTP ? ('') : (React__default["default"].createElement(index$5.Button, Object.assign({ size: "sm", loading: isLoading, disabled: (!isFinishedCountDown && sentOTP) ||
|
|
5668
5673
|
isLoading ||
|
|
5669
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({
|
|
5670
5675
|
id: 'subot.sendOTP.button',
|
|
@@ -5687,13 +5692,13 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5687
5692
|
React__default["default"].createElement("span", { className: "verify-success-label" }, f({
|
|
5688
5693
|
id: 'subot.verifyOTP.success.message',
|
|
5689
5694
|
defaultMessage: 'Verified successful',
|
|
5690
|
-
})))) : (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({
|
|
5691
5696
|
id: 'subot.verifyOTP.button',
|
|
5692
5697
|
defaultMessage: 'Verify OTP',
|
|
5693
5698
|
})))))));
|
|
5694
|
-
case index$
|
|
5699
|
+
case index$3.NodeActionType.USER_SUBMIT_GOOGLE_API_ADDRESS:
|
|
5695
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 }));
|
|
5696
|
-
case index$
|
|
5701
|
+
case index$3.NodeActionType.USER_SUBMIT_DOB:
|
|
5697
5702
|
return (React__default["default"].createElement(DOB, { key: action.key, action: action, trigger: trigger, control: control, locale: locale, labelTuples: labelInputDate, isSubmitting: isSubmitting }));
|
|
5698
5703
|
default:
|
|
5699
5704
|
return '';
|
|
@@ -5701,17 +5706,17 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5701
5706
|
};
|
|
5702
5707
|
const renderFormSubmitAndTerms = (action) => {
|
|
5703
5708
|
switch (action.type) {
|
|
5704
|
-
case index$
|
|
5709
|
+
case index$3.NodeActionType.USER_SUBMIT_CONFIRM:
|
|
5705
5710
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5706
5711
|
React__default["default"].createElement("label", { className: "subot-checkbox" },
|
|
5707
5712
|
React__default["default"].createElement("input", Object.assign({}, register('confirm'), { type: "checkbox", defaultChecked: true, className: "subot-checkbox__input" })),
|
|
5708
5713
|
React__default["default"].createElement("span", { className: "subot-checkbox__label" },
|
|
5709
5714
|
React__default["default"].createElement(Markdown, null, action.label)))));
|
|
5710
|
-
case index$
|
|
5715
|
+
case index$3.NodeActionType.USER_SUBMIT_SEND:
|
|
5711
5716
|
const disabled = hasConfirm ? !confirm : false;
|
|
5712
5717
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5713
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)));
|
|
5714
|
-
case index$
|
|
5719
|
+
case index$3.NodeActionType.USER_SUBMIT_TERMS:
|
|
5715
5720
|
return (React__default["default"].createElement("div", { className: "form-terms", key: action.id },
|
|
5716
5721
|
React__default["default"].createElement(Markdown, null, action.label)));
|
|
5717
5722
|
default:
|
|
@@ -5734,6 +5739,7 @@ const Container$d = ({ node, indexNumber }) => {
|
|
|
5734
5739
|
var _a;
|
|
5735
5740
|
const locale = togetherComponentGlobalContext.GlobalData === null || togetherComponentGlobalContext.GlobalData === void 0 ? void 0 : togetherComponentGlobalContext.GlobalData.locale;
|
|
5736
5741
|
const { params, listNodes, activeId, onSubmit, setIsShowFooter } = React.useContext(SubotInlineContext$1);
|
|
5742
|
+
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
5737
5743
|
React.useMemo(() => {
|
|
5738
5744
|
setIsShowFooter(true);
|
|
5739
5745
|
}, []);
|
|
@@ -5741,6 +5747,14 @@ const Container$d = ({ node, indexNumber }) => {
|
|
|
5741
5747
|
checkSyncDataOnFrisoCampaign(listNodes[0], data.form_submit_meta);
|
|
5742
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 });
|
|
5743
5749
|
const res = yield subotInlineMessage$1(_message);
|
|
5750
|
+
if (index$2.isSubotCaptchaForbidden(res)) {
|
|
5751
|
+
pushNotifications({
|
|
5752
|
+
title: '',
|
|
5753
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
5754
|
+
type: 'warning',
|
|
5755
|
+
});
|
|
5756
|
+
return;
|
|
5757
|
+
}
|
|
5744
5758
|
// asking
|
|
5745
5759
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
5746
5760
|
const _b = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _b, restData = tslib_es6.__rest(_b, ["node"]);
|
|
@@ -5923,7 +5937,7 @@ const Container$b = ({ action, onChange }) => {
|
|
|
5923
5937
|
const currentUrl = useCurrentUrl();
|
|
5924
5938
|
const { params, activeId } = React.useContext(SubotInlineContext$1);
|
|
5925
5939
|
return (React__default["default"].createElement(StyledWrap$6, null,
|
|
5926
|
-
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: {
|
|
5927
5941
|
root: {
|
|
5928
5942
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
5929
5943
|
'&:hover': {
|
|
@@ -5984,8 +5998,8 @@ const Container$a = ({ action, onChange, active, htmlType, formSubmitMeta, }) =>
|
|
|
5984
5998
|
const inputRef = React.useRef(null);
|
|
5985
5999
|
const [otherText, setOtherText] = React.useState('');
|
|
5986
6000
|
const { params } = React.useContext(SubotInlineContext$1);
|
|
5987
|
-
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
5988
|
-
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 ||
|
|
5989
6003
|
isActionPollWithOther;
|
|
5990
6004
|
React.useEffect(() => {
|
|
5991
6005
|
var _a, _b;
|
|
@@ -6022,7 +6036,7 @@ const Container$9 = ({ action, onChange, active, htmlType, }) => {
|
|
|
6022
6036
|
if (action && onChange) {
|
|
6023
6037
|
onChange({
|
|
6024
6038
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6025
|
-
control: index$
|
|
6039
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
6026
6040
|
value: '',
|
|
6027
6041
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6028
6042
|
});
|
|
@@ -6038,7 +6052,7 @@ const Container$8 = ({ action, onChange, active, htmlType, }) => {
|
|
|
6038
6052
|
if (action && onChange) {
|
|
6039
6053
|
onChange({
|
|
6040
6054
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6041
|
-
control: index$
|
|
6055
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
6042
6056
|
value: '',
|
|
6043
6057
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6044
6058
|
});
|
|
@@ -6050,14 +6064,14 @@ Container$8.displayName = 'SubotInlinePollChoiceImage';
|
|
|
6050
6064
|
|
|
6051
6065
|
const SubotInlineActionBaseTarget = {
|
|
6052
6066
|
// 'user-image': SubotInlineActionImageChoice,
|
|
6053
|
-
[index$
|
|
6054
|
-
[index$
|
|
6055
|
-
[index$
|
|
6056
|
-
[index$
|
|
6057
|
-
[index$
|
|
6058
|
-
[index$
|
|
6059
|
-
[index$
|
|
6060
|
-
[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,
|
|
6061
6075
|
// [NodeActionType.RATING_STAR]: SubotInlineRatingStar,
|
|
6062
6076
|
// [NodeActionType.RATING_DESCRIPTION]: SubotInlineTextArea,
|
|
6063
6077
|
// [NodeActionType.LIKE_CHOICE]: SubotInlineLikeChoice,
|
|
@@ -6080,13 +6094,13 @@ const SubotInlineActionBase$1 = new Proxy(SubotInlineActionBaseTarget, {
|
|
|
6080
6094
|
},
|
|
6081
6095
|
});
|
|
6082
6096
|
|
|
6083
|
-
const excludeActions = [index$
|
|
6097
|
+
const excludeActions = [index$3.NodeActionType.USER_CHOICE_NEXT];
|
|
6084
6098
|
const Container$7 = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
|
|
6085
|
-
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]);
|
|
6086
6100
|
const className = React.useMemo(() => {
|
|
6087
6101
|
switch (node_type) {
|
|
6088
|
-
case index$
|
|
6089
|
-
case index$
|
|
6102
|
+
case index$3.NodeType.IMAGE:
|
|
6103
|
+
case index$3.NodeType.REACTION:
|
|
6090
6104
|
return 'si-two-columns';
|
|
6091
6105
|
default:
|
|
6092
6106
|
return isPollChoiceImage ? 'si-two-columns' : '';
|
|
@@ -6160,7 +6174,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6160
6174
|
}, []);
|
|
6161
6175
|
const submitButton = React.useMemo(() => {
|
|
6162
6176
|
var _a;
|
|
6163
|
-
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);
|
|
6164
6178
|
if (_submitButton)
|
|
6165
6179
|
return _submitButton;
|
|
6166
6180
|
return null;
|
|
@@ -6175,8 +6189,8 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6175
6189
|
var _b, _c;
|
|
6176
6190
|
if (action) {
|
|
6177
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) })));
|
|
6178
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6179
|
-
(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) {
|
|
6180
6194
|
const isExistedPoll = (_value === null || _value === void 0 ? void 0 : _value.selected_actions) && action.id in _value.selected_actions;
|
|
6181
6195
|
if (isExistedPoll) {
|
|
6182
6196
|
if (formSubmitMeta) {
|
|
@@ -6210,7 +6224,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
6210
6224
|
}
|
|
6211
6225
|
}
|
|
6212
6226
|
});
|
|
6213
|
-
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);
|
|
6214
6228
|
return (React__default["default"].createElement(StyledWrap$3, { id: "si-node-text" },
|
|
6215
6229
|
React__default["default"].createElement(Container$h, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber }),
|
|
6216
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 })));
|
|
@@ -6223,13 +6237,13 @@ const useDescriptionPollNode = ({ node }) => {
|
|
|
6223
6237
|
id: 'multiSelectError.required',
|
|
6224
6238
|
defaultMessage: 'You must choose one options',
|
|
6225
6239
|
});
|
|
6226
|
-
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) {
|
|
6227
6241
|
description = f({
|
|
6228
6242
|
id: 'multiSelectError.unlimited',
|
|
6229
6243
|
defaultMessage: 'You must choose at least one options',
|
|
6230
6244
|
});
|
|
6231
6245
|
}
|
|
6232
|
-
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) {
|
|
6233
6247
|
description = f({
|
|
6234
6248
|
id: 'multiSelectError.range',
|
|
6235
6249
|
defaultMessage: 'You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)',
|
|
@@ -6238,7 +6252,7 @@ const useDescriptionPollNode = ({ node }) => {
|
|
|
6238
6252
|
to: node.to,
|
|
6239
6253
|
});
|
|
6240
6254
|
}
|
|
6241
|
-
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) {
|
|
6242
6256
|
description = f({
|
|
6243
6257
|
id: 'multiSelectError.exactNumber',
|
|
6244
6258
|
defaultMessage: 'You must choose {from} answers.',
|
|
@@ -6268,7 +6282,7 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6268
6282
|
}, []);
|
|
6269
6283
|
const submitButton = React.useMemo(() => {
|
|
6270
6284
|
var _a;
|
|
6271
|
-
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);
|
|
6272
6286
|
if (_submitButton)
|
|
6273
6287
|
return _submitButton;
|
|
6274
6288
|
return null;
|
|
@@ -6277,8 +6291,8 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6277
6291
|
const handleOnChange = (action, formSubmitMeta) => {
|
|
6278
6292
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
6279
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) || [])] })));
|
|
6280
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6281
|
-
(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) {
|
|
6282
6296
|
const isExistedPoll = (_a = newValue.form_submit_meta) === null || _a === void 0 ? void 0 : _a.some(({ action_id }) => action_id === action.id);
|
|
6283
6297
|
if (isExistedPoll) {
|
|
6284
6298
|
newValue.form_submit_meta =
|
|
@@ -6290,7 +6304,7 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
6290
6304
|
newValue.form_submit_meta = (_d = newValue.form_submit_meta) === null || _d === void 0 ? void 0 : _d.concat([
|
|
6291
6305
|
{
|
|
6292
6306
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
6293
|
-
control: index$
|
|
6307
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
6294
6308
|
value: '',
|
|
6295
6309
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
6296
6310
|
},
|
|
@@ -6339,7 +6353,7 @@ const Container$3 = ({ node }) => {
|
|
|
6339
6353
|
const handleOnChange = (action) => {
|
|
6340
6354
|
if (params.bot_id &&
|
|
6341
6355
|
action &&
|
|
6342
|
-
action.type === index$
|
|
6356
|
+
action.type === index$3.NodeActionType.ACTION_SSO_REDIRECT) {
|
|
6343
6357
|
const currentState = {
|
|
6344
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' }),
|
|
6345
6359
|
listNodes,
|
|
@@ -6362,7 +6376,7 @@ const Container$3 = ({ node }) => {
|
|
|
6362
6376
|
urlObj.searchParams.set('mode', 'inline');
|
|
6363
6377
|
urlObj.searchParams.set('source', 'subot-inline');
|
|
6364
6378
|
const returnUrl = urlObj.href;
|
|
6365
|
-
window.location.href = `${index$
|
|
6379
|
+
window.location.href = `${index$4.SSO_URL}?returnUrl=${encodeURIComponent(returnUrl)}`;
|
|
6366
6380
|
}
|
|
6367
6381
|
}
|
|
6368
6382
|
};
|
|
@@ -6412,8 +6426,8 @@ const Container$2 = ({ node, indexNumber }) => {
|
|
|
6412
6426
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6413
6427
|
if (!action)
|
|
6414
6428
|
return;
|
|
6415
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
6416
|
-
(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;
|
|
6417
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 });
|
|
6418
6432
|
if (actionWithOther) {
|
|
6419
6433
|
setValue(newValue);
|
|
@@ -6482,12 +6496,12 @@ const Container$1 = ({ onClickStart }) => {
|
|
|
6482
6496
|
React__default["default"].createElement(Container$s, { node: foundNode, onClickStart: onClickStart })));
|
|
6483
6497
|
}
|
|
6484
6498
|
const node = foundNode;
|
|
6485
|
-
const nodeType = index$
|
|
6486
|
-
const nodeTypeSSO = (_a = index$
|
|
6487
|
-
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
|
|
6488
6502
|
? SubotInlineNodeBase$1[nodeTypeSSO]
|
|
6489
6503
|
: SubotInlineNodeBase$1[nodeType];
|
|
6490
|
-
if (node.is_multi_select && node.type !== index$
|
|
6504
|
+
if (node.is_multi_select && node.type !== index$3.NodeType.POLL) {
|
|
6491
6505
|
NodeComponent = SubotInlineNodeBase$1['MULTIPLE'];
|
|
6492
6506
|
}
|
|
6493
6507
|
return (React__default["default"].createElement(framerMotion.motion.div, { key: node.id, initial: { opacity: 1, y: -300 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
@@ -6558,7 +6572,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6558
6572
|
React__default["default"].createElement(Close, null))),
|
|
6559
6573
|
typeFormProps && locale ? (React__default["default"].createElement(TypeFormView, { locale: locale, typeFormProps: typeFormProps })) : (React__default["default"].createElement(NodeContextProvider, null,
|
|
6560
6574
|
React__default["default"].createElement("div", { className: "subot-inline-revamp-container", "data-show-footer": isShowFooter },
|
|
6561
|
-
loading && !isShowFooter && React__default["default"].createElement(index$
|
|
6575
|
+
loading && !isShowFooter && React__default["default"].createElement(index$b.Loading, { className: "si-loading" }),
|
|
6562
6576
|
React__default["default"].createElement(Container$1, { onClickStart: () => {
|
|
6563
6577
|
setIsDisplayFullMobile(true);
|
|
6564
6578
|
} })),
|
|
@@ -6578,7 +6592,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6578
6592
|
if (isFullContainer) {
|
|
6579
6593
|
const showLeftInfo = hasSubotLeftInfo(subotSettingData);
|
|
6580
6594
|
return (React__default["default"].createElement(StyledContainerFullscreen, { className: "si-container-fs", style: styleFullContainer, "data-has-left-info": showLeftInfo },
|
|
6581
|
-
React__default["default"].createElement(index$
|
|
6595
|
+
React__default["default"].createElement(index$c.Container, { className: core.clsx('si-container', {
|
|
6582
6596
|
'si-typeform-container': Boolean(typeFormProps),
|
|
6583
6597
|
'si-no-left-info': !showLeftInfo,
|
|
6584
6598
|
}) },
|
|
@@ -6603,7 +6617,7 @@ const Container = () => {
|
|
|
6603
6617
|
if (!foundNode)
|
|
6604
6618
|
return '';
|
|
6605
6619
|
return (foundNode.inline_background ||
|
|
6606
|
-
((_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));
|
|
6607
6621
|
}, [listNodes, activeId]);
|
|
6608
6622
|
const subotSettingData = React.useMemo(() => {
|
|
6609
6623
|
const subotInlineSettings = listNodes[0];
|
|
@@ -6656,7 +6670,7 @@ const Root = styled__default["default"](core.Box) `
|
|
|
6656
6670
|
`}
|
|
6657
6671
|
}
|
|
6658
6672
|
`;
|
|
6659
|
-
const Inner = styled__default["default"](index$
|
|
6673
|
+
const Inner = styled__default["default"](index$c.Container) `
|
|
6660
6674
|
display: flex;
|
|
6661
6675
|
gap: 24px;
|
|
6662
6676
|
|
|
@@ -6862,9 +6876,7 @@ const subotInlineImpression = (data) => tslib_es6.__awaiter(void 0, void 0, void
|
|
|
6862
6876
|
/** inline message */
|
|
6863
6877
|
const subotInlineMessage = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
6864
6878
|
try {
|
|
6865
|
-
return yield
|
|
6866
|
-
data,
|
|
6867
|
-
});
|
|
6879
|
+
return yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'chat', data);
|
|
6868
6880
|
}
|
|
6869
6881
|
catch (error) { }
|
|
6870
6882
|
});
|
|
@@ -6920,7 +6932,7 @@ const SubotInlineDescription$1 = styled__default["default"].div `
|
|
|
6920
6932
|
color: #595959;
|
|
6921
6933
|
font-style: italic;
|
|
6922
6934
|
`;
|
|
6923
|
-
const SubotInlineFinalButton = styled__default["default"](index$
|
|
6935
|
+
const SubotInlineFinalButton = styled__default["default"](index$9.Button) `
|
|
6924
6936
|
position: relative;
|
|
6925
6937
|
min-width: 180px;
|
|
6926
6938
|
svg {
|
|
@@ -7308,8 +7320,8 @@ const SubotInlineActionListContainer = styled__default["default"].div `
|
|
|
7308
7320
|
const SubotInlineAction = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
|
|
7309
7321
|
const className = React.useMemo(() => {
|
|
7310
7322
|
switch (node_type) {
|
|
7311
|
-
case index$
|
|
7312
|
-
case index$
|
|
7323
|
+
case index$3.NodeType.IMAGE:
|
|
7324
|
+
case index$3.NodeType.REACTION:
|
|
7313
7325
|
return 'list-container';
|
|
7314
7326
|
default:
|
|
7315
7327
|
return '';
|
|
@@ -7321,7 +7333,7 @@ const SubotInlineAction = ({ actions, value, onChange, htmlType, node_type, form
|
|
|
7321
7333
|
})))));
|
|
7322
7334
|
};
|
|
7323
7335
|
|
|
7324
|
-
const ButtonStyled = styled__default["default"](index$
|
|
7336
|
+
const ButtonStyled = styled__default["default"](index$9.Button) `
|
|
7325
7337
|
&:disabled {
|
|
7326
7338
|
background-color: rgb(242, 242, 242);
|
|
7327
7339
|
color: rgb(140, 140, 140);
|
|
@@ -7373,8 +7385,8 @@ const SubotInlineActionTextChoice = ({ action, onChange, active, htmlType, formS
|
|
|
7373
7385
|
const { trackingCommonInline } = React.useContext(SubotInlineContext);
|
|
7374
7386
|
const inputRef = React.useRef(null);
|
|
7375
7387
|
const [otherText, setOtherText] = React.useState('');
|
|
7376
|
-
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
7377
|
-
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 ||
|
|
7378
7390
|
isActionPollWithOther;
|
|
7379
7391
|
const onChangeTextArea = (evt) => {
|
|
7380
7392
|
setOtherText(evt.target.value);
|
|
@@ -7382,7 +7394,7 @@ const SubotInlineActionTextChoice = ({ action, onChange, active, htmlType, formS
|
|
|
7382
7394
|
onChange === null || onChange === void 0 ? void 0 : onChange(action, [
|
|
7383
7395
|
{
|
|
7384
7396
|
key: KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD,
|
|
7385
|
-
control: index$
|
|
7397
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
7386
7398
|
value: evt.target.value,
|
|
7387
7399
|
action_id: action.id,
|
|
7388
7400
|
},
|
|
@@ -7433,12 +7445,12 @@ const SubotInlinePollChoice = ({ active, action, onChange, htmlType, node_type,
|
|
|
7433
7445
|
onChange &&
|
|
7434
7446
|
onChange({
|
|
7435
7447
|
key: (action === null || action === void 0 ? void 0 : action.key) || '',
|
|
7436
|
-
control: index$
|
|
7448
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7437
7449
|
value: '',
|
|
7438
7450
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7439
7451
|
});
|
|
7440
7452
|
};
|
|
7441
|
-
if (node_type === index$
|
|
7453
|
+
if (node_type === index$3.NodeType.RESULT_POLL)
|
|
7442
7454
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7443
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 },
|
|
7444
7456
|
React__default["default"].createElement("div", { className: "number" }, action === null || action === void 0 ? void 0 :
|
|
@@ -7454,12 +7466,12 @@ const SubotInlinePollChoiceImage = ({ active, action, onChange, htmlType, node_t
|
|
|
7454
7466
|
onChange &&
|
|
7455
7467
|
onChange({
|
|
7456
7468
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7457
|
-
control: index$
|
|
7469
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7458
7470
|
value: '',
|
|
7459
7471
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7460
7472
|
});
|
|
7461
7473
|
};
|
|
7462
|
-
if (node_type === index$
|
|
7474
|
+
if (node_type === index$3.NodeType.RESULT_POLL)
|
|
7463
7475
|
// TODO: Update layout result poll image
|
|
7464
7476
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7465
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 },
|
|
@@ -7479,7 +7491,7 @@ const SubotInlineRatingStar = ({ action, value, onChange, }) => {
|
|
|
7479
7491
|
: 0, changeRating: (star) => {
|
|
7480
7492
|
const _value = {
|
|
7481
7493
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7482
|
-
control: index$
|
|
7494
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7483
7495
|
value: star.toString(),
|
|
7484
7496
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7485
7497
|
};
|
|
@@ -7489,12 +7501,12 @@ const SubotInlineRatingStar = ({ action, value, onChange, }) => {
|
|
|
7489
7501
|
const SubotInlineTextArea = ({ action, value, onChange, }) => {
|
|
7490
7502
|
return (React__default["default"].createElement(SubotInlineActionItemContainer, null,
|
|
7491
7503
|
React__default["default"].createElement(SubotInlineActionRatingDescriptionContainer, null,
|
|
7492
|
-
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)
|
|
7493
7505
|
? value === null || value === void 0 ? void 0 : value.value
|
|
7494
7506
|
: '', onChange: (evt) => {
|
|
7495
7507
|
const _value = {
|
|
7496
7508
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7497
|
-
control: index$
|
|
7509
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7498
7510
|
value: evt.target.value,
|
|
7499
7511
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7500
7512
|
};
|
|
@@ -7517,7 +7529,7 @@ const SubotInlineReviewChoice = ({ active, action, onChange, }) => (React__defau
|
|
|
7517
7529
|
React__default["default"].createElement(SubotInlineButtonReview, { className: classNames__default["default"](!!active && 'active'), onClick: () => onChange &&
|
|
7518
7530
|
onChange({
|
|
7519
7531
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
7520
|
-
control: index$
|
|
7532
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
7521
7533
|
value: '',
|
|
7522
7534
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
7523
7535
|
}) },
|
|
@@ -7526,21 +7538,21 @@ const SubotInlinePollResult = ({ action, }) => (React__default["default"].create
|
|
|
7526
7538
|
React__default["default"].createElement(SubotInlineActionPollResult, null, action === null || action === void 0 ? void 0 : action.label)));
|
|
7527
7539
|
const SubotInlineActionBase = {
|
|
7528
7540
|
'user-image': SubotInlineActionImageChoice,
|
|
7529
|
-
[index$
|
|
7530
|
-
[index$
|
|
7531
|
-
[index$
|
|
7532
|
-
[index$
|
|
7533
|
-
[index$
|
|
7534
|
-
[index$
|
|
7535
|
-
[index$
|
|
7536
|
-
[index$
|
|
7537
|
-
[index$
|
|
7538
|
-
[index$
|
|
7539
|
-
[index$
|
|
7540
|
-
[index$
|
|
7541
|
-
[index$
|
|
7542
|
-
[index$
|
|
7543
|
-
[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,
|
|
7544
7556
|
};
|
|
7545
7557
|
|
|
7546
7558
|
const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextText, backProps, nextProps, }) => {
|
|
@@ -7548,7 +7560,7 @@ const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextT
|
|
|
7548
7560
|
const { formatMessage: f } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
7549
7561
|
const { nodes: listNodes, activeId, params, onNext, trackingCommonInline, } = React.useContext(SubotInlineContext);
|
|
7550
7562
|
const nodeMessage = listNodes.find((nodeItem) => nodeItem.id == activeId);
|
|
7551
|
-
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);
|
|
7552
7564
|
const handleNextChoice = () => {
|
|
7553
7565
|
if (nodeMessage && actionNextChoice) {
|
|
7554
7566
|
const nextValue = {
|
|
@@ -7559,7 +7571,7 @@ const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextT
|
|
|
7559
7571
|
onNext === null || onNext === void 0 ? void 0 : onNext(Object.assign(Object.assign(Object.assign({}, params), nextValue), nodeMessage._message));
|
|
7560
7572
|
}
|
|
7561
7573
|
};
|
|
7562
|
-
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);
|
|
7563
7575
|
return (React__default["default"].createElement(SubotInlineFooterStyled, null,
|
|
7564
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" }),
|
|
7565
7577
|
React__default["default"].createElement(ArrowLeft, { style: { marginRight: 10 } }),
|
|
@@ -7618,7 +7630,7 @@ const SubotInlineIntentTitle = styled__default["default"].h3 `
|
|
|
7618
7630
|
font-size: 20px;
|
|
7619
7631
|
}
|
|
7620
7632
|
`;
|
|
7621
|
-
const SubotInlineRecalculateButton = styled__default["default"](index$
|
|
7633
|
+
const SubotInlineRecalculateButton = styled__default["default"](index$9.Button) `
|
|
7622
7634
|
&.bot-recalculate {
|
|
7623
7635
|
svg {
|
|
7624
7636
|
path {
|
|
@@ -7634,7 +7646,7 @@ const SubotInlineRecalculateButton = styled__default["default"](index$8.Button)
|
|
|
7634
7646
|
}
|
|
7635
7647
|
}
|
|
7636
7648
|
`;
|
|
7637
|
-
const SubotInlineIntentButton = styled__default["default"](index$
|
|
7649
|
+
const SubotInlineIntentButton = styled__default["default"](index$9.Button) `
|
|
7638
7650
|
border: 2px solid transparent;
|
|
7639
7651
|
`;
|
|
7640
7652
|
const SubotInlineItemIcon = styled__default["default"].div `
|
|
@@ -7678,7 +7690,7 @@ const SubotInlineItemIcon = styled__default["default"].div `
|
|
|
7678
7690
|
}
|
|
7679
7691
|
}
|
|
7680
7692
|
`;
|
|
7681
|
-
styled__default["default"](index$
|
|
7693
|
+
styled__default["default"](index$9.Button) ``;
|
|
7682
7694
|
const SubotInlineIntentFirstTextWrapper = styled__default["default"].div `
|
|
7683
7695
|
display: flex;
|
|
7684
7696
|
align-items: flex-start;
|
|
@@ -7914,25 +7926,25 @@ const SubotInlineIntentFinal = ({ intents: intentsProps, }) => {
|
|
|
7914
7926
|
const rest = [];
|
|
7915
7927
|
intentsProps === null || intentsProps === void 0 ? void 0 : intentsProps.map((intent) => {
|
|
7916
7928
|
switch (intent === null || intent === void 0 ? void 0 : intent.type) {
|
|
7917
|
-
case index$
|
|
7929
|
+
case index$3.NodeIntentType.BOT_MAIN_IMAGE:
|
|
7918
7930
|
mainIntents.push(intent);
|
|
7919
7931
|
break;
|
|
7920
|
-
case index$
|
|
7932
|
+
case index$3.NodeIntentType.BOT_MAIN_TITLE:
|
|
7921
7933
|
mainIntents.push(intent);
|
|
7922
7934
|
break;
|
|
7923
|
-
case index$
|
|
7935
|
+
case index$3.NodeIntentType.BOT_MAIN_BODY:
|
|
7924
7936
|
mainIntents.push(intent);
|
|
7925
7937
|
break;
|
|
7926
|
-
case index$
|
|
7938
|
+
case index$3.NodeIntentType.BOT_MAIN_BUTTON:
|
|
7927
7939
|
mainIntents.push(intent);
|
|
7928
7940
|
break;
|
|
7929
|
-
case index$
|
|
7941
|
+
case index$3.NodeIntentType.BOT_RECALCULATE:
|
|
7930
7942
|
mainIntents.push(intent);
|
|
7931
7943
|
break;
|
|
7932
|
-
case index$
|
|
7944
|
+
case index$3.NodeIntentType.BOT_SUB_TITLE:
|
|
7933
7945
|
subIntents.push(intent);
|
|
7934
7946
|
break;
|
|
7935
|
-
case index$
|
|
7947
|
+
case index$3.NodeIntentType.BOT_SUB_BODY:
|
|
7936
7948
|
subIntents.push(intent);
|
|
7937
7949
|
break;
|
|
7938
7950
|
default:
|
|
@@ -8065,7 +8077,7 @@ const SubotInlineIntentSSO = ({ intent, }) => {
|
|
|
8065
8077
|
/*************************** NodeIntentType: 'bot-title' ***********************/
|
|
8066
8078
|
//#region
|
|
8067
8079
|
const SubotInlineIntentBotTitle = ({ intent, indexNumber, }) => {
|
|
8068
|
-
const isShowLabel = ![index$
|
|
8080
|
+
const isShowLabel = ![index$3.NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
8069
8081
|
return (React__default["default"].createElement(SubotInlineIntentFirstTextContainer, null,
|
|
8070
8082
|
React__default["default"].createElement(SubotInlineIntentFirstTextWrapper, null,
|
|
8071
8083
|
indexNumber && (React__default["default"].createElement("div", { className: "number" },
|
|
@@ -8073,9 +8085,9 @@ const SubotInlineIntentBotTitle = ({ intent, indexNumber, }) => {
|
|
|
8073
8085
|
".")),
|
|
8074
8086
|
isShowLabel &&
|
|
8075
8087
|
intent &&
|
|
8076
|
-
[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)),
|
|
8077
8089
|
intent &&
|
|
8078
|
-
[index$
|
|
8090
|
+
[index$3.NodeIntentType.BOT_IMAGE].includes(intent === null || intent === void 0 ? void 0 : intent.type) && (React__default["default"].createElement(SubotInlineIntentFirstImageWrapper, null,
|
|
8079
8091
|
React__default["default"].createElement(SubotInlineIntentBotImage, { intent: intent })))));
|
|
8080
8092
|
};
|
|
8081
8093
|
//#endregion
|
|
@@ -8268,26 +8280,26 @@ const SubotInlineIntentThankYouBody = ({ intent, }) => {
|
|
|
8268
8280
|
/*************************** END - NodeIntentType: 'thank-you-body' ************/
|
|
8269
8281
|
/*******************************************************************************/
|
|
8270
8282
|
const SubotInlineIntentBase = {
|
|
8271
|
-
[index$
|
|
8272
|
-
[index$
|
|
8273
|
-
[index$
|
|
8274
|
-
[index$
|
|
8275
|
-
[index$
|
|
8276
|
-
[index$
|
|
8277
|
-
[index$
|
|
8278
|
-
[index$
|
|
8279
|
-
[index$
|
|
8280
|
-
[index$
|
|
8281
|
-
[index$
|
|
8282
|
-
[index$
|
|
8283
|
-
[index$
|
|
8284
|
-
[index$
|
|
8285
|
-
[index$
|
|
8286
|
-
[index$
|
|
8287
|
-
[index$
|
|
8288
|
-
[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,
|
|
8289
8301
|
/** intents fake for sso block */
|
|
8290
|
-
[index$
|
|
8302
|
+
[index$3.NodeIntentType.SSO_INTENT]: SubotInlineIntentSSO,
|
|
8291
8303
|
};
|
|
8292
8304
|
|
|
8293
8305
|
/***************** type: TEXT, IMAGE ***************/
|
|
@@ -8309,8 +8321,8 @@ const SubotInlineNode = ({ node, indexNumber, }) => {
|
|
|
8309
8321
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
8310
8322
|
if (!action)
|
|
8311
8323
|
return;
|
|
8312
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8313
|
-
(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;
|
|
8314
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 });
|
|
8315
8327
|
if (actionWithOther) {
|
|
8316
8328
|
setValue(newValue);
|
|
@@ -8403,7 +8415,7 @@ const SubotInlineNodeFinal = ({ node, }) => {
|
|
|
8403
8415
|
const botType = (_a = botItem === null || botItem === void 0 ? void 0 : botItem.extra_settings) === null || _a === void 0 ? void 0 : _a.subot_type;
|
|
8404
8416
|
const suggestedServiceIntents = React.useMemo(() => {
|
|
8405
8417
|
var _a;
|
|
8406
|
-
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)) || []);
|
|
8407
8419
|
}, []);
|
|
8408
8420
|
return (React__default["default"].createElement(SubotInlineFinalContainer, null,
|
|
8409
8421
|
React__default["default"].createElement("div", { ref: flag, className: "hhg-flag", style: {
|
|
@@ -8425,7 +8437,7 @@ const SubotInlineNodeFinal = ({ node, }) => {
|
|
|
8425
8437
|
React__default["default"].createElement(ArrowDown, { style: { marginLeft: 10 } }))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
8426
8438
|
f({ id: 'subotInline.showLess', defaultMessage: 'Show less' }),
|
|
8427
8439
|
React__default["default"].createElement(ArrowUp, { style: { marginLeft: 10 } })))))),
|
|
8428
|
-
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) }))));
|
|
8429
8441
|
};
|
|
8430
8442
|
|
|
8431
8443
|
const SubotInlineResultButton = styled__default["default"].span `
|
|
@@ -8468,7 +8480,7 @@ const SubotInlineNodeFinalThankYou = ({ node, }) => {
|
|
|
8468
8480
|
const { params, onNext } = React.useContext(SubotInlineContext);
|
|
8469
8481
|
const resultButton = React.useMemo(() => {
|
|
8470
8482
|
var _a;
|
|
8471
|
-
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);
|
|
8472
8484
|
if (_resultButton)
|
|
8473
8485
|
return _resultButton;
|
|
8474
8486
|
return null;
|
|
@@ -8488,10 +8500,18 @@ const SubotInlineNodeFinalThankYou = ({ node, }) => {
|
|
|
8488
8500
|
|
|
8489
8501
|
const SubotInlineNodeForm = ({ node, indexNumber, }) => {
|
|
8490
8502
|
var _a;
|
|
8491
|
-
const { data: { locale }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
8503
|
+
const { data: { locale }, formatMessage: f, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
8492
8504
|
const { params, onPrev, onSubmit, trackingCommonInline, nodes, activeId } = React.useContext(SubotInlineContext);
|
|
8493
8505
|
const handleSubmit = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
8494
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)));
|
|
8507
|
+
if (index$2.isSubotCaptchaForbidden(res)) {
|
|
8508
|
+
pushNotifications({
|
|
8509
|
+
title: '',
|
|
8510
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8511
|
+
type: 'warning',
|
|
8512
|
+
});
|
|
8513
|
+
return;
|
|
8514
|
+
}
|
|
8495
8515
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
8496
8516
|
const _b = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _b, restData = tslib_es6.__rest(_b, ["node"]);
|
|
8497
8517
|
const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
|
|
@@ -8556,7 +8576,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8556
8576
|
const [value, setValue] = React.useState((node === null || node === void 0 ? void 0 : node._message) || {});
|
|
8557
8577
|
const submitButton = React.useMemo(() => {
|
|
8558
8578
|
var _a;
|
|
8559
|
-
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);
|
|
8560
8580
|
if (_submitButton)
|
|
8561
8581
|
return _submitButton;
|
|
8562
8582
|
return null;
|
|
@@ -8580,7 +8600,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8580
8600
|
});
|
|
8581
8601
|
return;
|
|
8582
8602
|
}
|
|
8583
|
-
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 &&
|
|
8584
8604
|
activeActions.length < (node === null || node === void 0 ? void 0 : node.from)) {
|
|
8585
8605
|
pushNotifications({
|
|
8586
8606
|
title: '',
|
|
@@ -8595,7 +8615,7 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8595
8615
|
});
|
|
8596
8616
|
return;
|
|
8597
8617
|
}
|
|
8598
|
-
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 &&
|
|
8599
8619
|
activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
|
|
8600
8620
|
pushNotifications({
|
|
8601
8621
|
message: f({
|
|
@@ -8616,8 +8636,8 @@ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
|
|
|
8616
8636
|
var _a, _b;
|
|
8617
8637
|
if (action) {
|
|
8618
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) })));
|
|
8619
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8620
|
-
(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) {
|
|
8621
8641
|
const isExistedPoll = (_value === null || _value === void 0 ? void 0 : _value.selected_actions) && action.id in _value.selected_actions;
|
|
8622
8642
|
if (isExistedPoll) {
|
|
8623
8643
|
if (formSubmitMeta) {
|
|
@@ -8716,13 +8736,22 @@ callBack, }) => {
|
|
|
8716
8736
|
}
|
|
8717
8737
|
setIsLoading(true);
|
|
8718
8738
|
try {
|
|
8719
|
-
const result = yield
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
8723
|
-
},
|
|
8739
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_SEND_OTP), 'sms_otp', {
|
|
8740
|
+
phone_number: parsedPhone.nationalNumber,
|
|
8741
|
+
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
8724
8742
|
});
|
|
8725
8743
|
setIsLoading(false);
|
|
8744
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
8745
|
+
if (countRef.current) {
|
|
8746
|
+
countRef.current.cancel();
|
|
8747
|
+
}
|
|
8748
|
+
pushNotifications({
|
|
8749
|
+
title: '',
|
|
8750
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8751
|
+
type: 'warning',
|
|
8752
|
+
});
|
|
8753
|
+
return;
|
|
8754
|
+
}
|
|
8726
8755
|
if ((result === null || result === void 0 ? void 0 : result._status) === 1) {
|
|
8727
8756
|
if (sentOTP) {
|
|
8728
8757
|
setIsFinishedCountDown(false);
|
|
@@ -8749,7 +8778,7 @@ callBack, }) => {
|
|
|
8749
8778
|
message: 'Số điện thoại này đã được xác minh.',
|
|
8750
8779
|
type: 'success',
|
|
8751
8780
|
});
|
|
8752
|
-
const action = actions.find((action) => action.type === index$
|
|
8781
|
+
const action = actions.find((action) => action.type === index$3.NodeActionType.USER_SUBMIT_SEND);
|
|
8753
8782
|
action && callBack(action, data.phone);
|
|
8754
8783
|
return;
|
|
8755
8784
|
}
|
|
@@ -8775,14 +8804,20 @@ callBack, }) => {
|
|
|
8775
8804
|
return;
|
|
8776
8805
|
}
|
|
8777
8806
|
try {
|
|
8778
|
-
const result = yield
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
code: number,
|
|
8783
|
-
},
|
|
8807
|
+
const result = yield index$2.callSubotProtectedApi(getSubotApiPath(PATHS$1.POST_VERIFY_OTP), 'sms_verify', {
|
|
8808
|
+
phone_number: parsedPhone.nationalNumber,
|
|
8809
|
+
area_code: `+${parsedPhone.countryCallingCode}`,
|
|
8810
|
+
code: number,
|
|
8784
8811
|
});
|
|
8785
8812
|
setIsLoadingVerify(false);
|
|
8813
|
+
if (index$2.isSubotCaptchaForbidden(result)) {
|
|
8814
|
+
pushNotifications({
|
|
8815
|
+
title: '',
|
|
8816
|
+
message: f(index$2.SUBOT_CAPTCHA_FAILED_MESSAGE),
|
|
8817
|
+
type: 'warning',
|
|
8818
|
+
});
|
|
8819
|
+
return;
|
|
8820
|
+
}
|
|
8786
8821
|
if ((result === null || result === void 0 ? void 0 : result._status) === 1) {
|
|
8787
8822
|
pushNotifications({
|
|
8788
8823
|
title: '',
|
|
@@ -8819,7 +8854,7 @@ callBack, }) => {
|
|
|
8819
8854
|
return null;
|
|
8820
8855
|
}
|
|
8821
8856
|
switch (action.type) {
|
|
8822
|
-
case index$
|
|
8857
|
+
case index$3.NodeActionType.USER_SUBMIT_PHONE:
|
|
8823
8858
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
8824
8859
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
8825
8860
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -8841,12 +8876,12 @@ callBack, }) => {
|
|
|
8841
8876
|
defaultMessage: 'Please enter a valid number.',
|
|
8842
8877
|
}))),
|
|
8843
8878
|
React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
8844
|
-
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({
|
|
8845
8880
|
id: 'subot.sendOTP.button',
|
|
8846
8881
|
defaultMessage: 'Send OTP',
|
|
8847
8882
|
})))))));
|
|
8848
8883
|
} })));
|
|
8849
|
-
case index$
|
|
8884
|
+
case index$3.NodeActionType.USER_SUBMIT_NUMBER:
|
|
8850
8885
|
if (!sentOTP) {
|
|
8851
8886
|
return '';
|
|
8852
8887
|
}
|
|
@@ -8866,18 +8901,18 @@ callBack, }) => {
|
|
|
8866
8901
|
};
|
|
8867
8902
|
const renderFormSubmitAndTerms = (action) => {
|
|
8868
8903
|
switch (action.type) {
|
|
8869
|
-
case index$
|
|
8904
|
+
case index$3.NodeActionType.USER_SUBMIT_SEND:
|
|
8870
8905
|
if (!sentOTP)
|
|
8871
8906
|
return '';
|
|
8872
8907
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
8873
|
-
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)));
|
|
8874
8909
|
default:
|
|
8875
8910
|
return '';
|
|
8876
8911
|
}
|
|
8877
8912
|
};
|
|
8878
8913
|
React.useEffect(() => {
|
|
8879
8914
|
if (phoneNumber) {
|
|
8880
|
-
const action = actions.find((action) => action.type === index$
|
|
8915
|
+
const action = actions.find((action) => action.type === index$3.NodeActionType.USER_SUBMIT_PHONE);
|
|
8881
8916
|
if (action && action.key) {
|
|
8882
8917
|
setValue(action.key, `+${areaCode}${phoneNumber}`);
|
|
8883
8918
|
}
|
|
@@ -8910,14 +8945,14 @@ const SubotInlineNodeOTP = ({ node, indexNumber, }) => {
|
|
|
8910
8945
|
const verifiedPhone = useVerifyPhoneNumber();
|
|
8911
8946
|
const handleOnVerify = (action, phoneNumber) => {
|
|
8912
8947
|
var _a;
|
|
8913
|
-
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);
|
|
8914
8949
|
if (!action || !actionPhone) {
|
|
8915
8950
|
return;
|
|
8916
8951
|
}
|
|
8917
8952
|
const form_submit_meta = [
|
|
8918
8953
|
{
|
|
8919
8954
|
key: String(actionPhone.key),
|
|
8920
|
-
control: index$
|
|
8955
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[index$3.NodeActionType.USER_SUBMIT_PHONE],
|
|
8921
8956
|
value: phoneNumber,
|
|
8922
8957
|
},
|
|
8923
8958
|
];
|
|
@@ -8954,7 +8989,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
8954
8989
|
const descriptionNode = useDescriptionPollNode({ node });
|
|
8955
8990
|
const submitButton = React.useMemo(() => {
|
|
8956
8991
|
var _a;
|
|
8957
|
-
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);
|
|
8958
8993
|
if (_submitButton)
|
|
8959
8994
|
return _submitButton;
|
|
8960
8995
|
return null;
|
|
@@ -8962,8 +8997,8 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
8962
8997
|
const handleOnChange = (action, formSubmitMeta) => {
|
|
8963
8998
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
8964
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) || [])] })));
|
|
8965
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === index$
|
|
8966
|
-
(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) {
|
|
8967
9002
|
const isExistedPoll = (_a = newValue.form_submit_meta) === null || _a === void 0 ? void 0 : _a.some(({ action_id }) => action_id === action.id);
|
|
8968
9003
|
if (isExistedPoll) {
|
|
8969
9004
|
newValue.form_submit_meta =
|
|
@@ -8975,7 +9010,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
8975
9010
|
newValue.form_submit_meta = (_d = newValue.form_submit_meta) === null || _d === void 0 ? void 0 : _d.concat([
|
|
8976
9011
|
{
|
|
8977
9012
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
8978
|
-
control: index$
|
|
9013
|
+
control: index$3.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
|
|
8979
9014
|
value: '',
|
|
8980
9015
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
8981
9016
|
},
|
|
@@ -9017,7 +9052,7 @@ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
|
|
|
9017
9052
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9018
9053
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
|
|
9019
9054
|
React__default["default"].createElement(SubotInlineDescription$1, null, descriptionNode),
|
|
9020
|
-
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) => {
|
|
9021
9056
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9022
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 })));
|
|
9023
9058
|
}))))),
|
|
@@ -9041,7 +9076,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9041
9076
|
const [isSubmit, setIsSubmit] = React.useState(false);
|
|
9042
9077
|
const ratingStarValue = React.useMemo(() => {
|
|
9043
9078
|
var _a;
|
|
9044
|
-
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);
|
|
9045
9080
|
if (value.form_submit_meta && _ratingStar) {
|
|
9046
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));
|
|
9047
9082
|
if (formIndex !== -1)
|
|
@@ -9051,7 +9086,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9051
9086
|
}, [value === null || value === void 0 ? void 0 : value.form_submit_meta]);
|
|
9052
9087
|
const submitButton = React.useMemo(() => {
|
|
9053
9088
|
var _a;
|
|
9054
|
-
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);
|
|
9055
9090
|
if (_submitButton)
|
|
9056
9091
|
return _submitButton;
|
|
9057
9092
|
return null;
|
|
@@ -9105,7 +9140,7 @@ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
|
|
|
9105
9140
|
React__default["default"].createElement(SubotInlineWrapper$1, null,
|
|
9106
9141
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9107
9142
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
|
|
9108
|
-
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) => {
|
|
9109
9144
|
var _a;
|
|
9110
9145
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9111
9146
|
return (NodeAction && (React__default["default"].createElement(NodeAction, { key: action.id, action: action, onChange: handleOnChange, value: (value &&
|
|
@@ -9164,7 +9199,7 @@ const SubotInlineNodeResultPoll = ({ node, }) => {
|
|
|
9164
9199
|
React__default["default"].createElement(SubotInlineWrapper$1, null,
|
|
9165
9200
|
React__default["default"].createElement(SubotInlineIntentContainer, null,
|
|
9166
9201
|
React__default["default"].createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [] })),
|
|
9167
|
-
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) => {
|
|
9168
9203
|
const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
|
|
9169
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 })));
|
|
9170
9205
|
})))))));
|
|
@@ -9190,15 +9225,15 @@ const SubotInlineNodeReview = ({ node, indexNumber, }) => {
|
|
|
9190
9225
|
const [isSubmit, setIsSubmit] = React.useState(false);
|
|
9191
9226
|
const reviewChoices = React.useMemo(() => {
|
|
9192
9227
|
var _a;
|
|
9193
|
-
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)) || [];
|
|
9194
9229
|
}, [node === null || node === void 0 ? void 0 : node.actions]);
|
|
9195
9230
|
const reviewDescriptions = React.useMemo(() => {
|
|
9196
9231
|
var _a;
|
|
9197
|
-
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)) || [];
|
|
9198
9233
|
}, [node === null || node === void 0 ? void 0 : node.actions]);
|
|
9199
9234
|
const submitButton = React.useMemo(() => {
|
|
9200
9235
|
var _a;
|
|
9201
|
-
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);
|
|
9202
9237
|
if (_submitButton)
|
|
9203
9238
|
return _submitButton;
|
|
9204
9239
|
return null;
|
|
@@ -9305,7 +9340,7 @@ const SubotInlineNodeSSO = ({ node, indexNumber, }) => {
|
|
|
9305
9340
|
const { params, onPrev, nodes, activeId } = React.useContext(SubotInlineContext);
|
|
9306
9341
|
const { formatMessage: f } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
|
|
9307
9342
|
const handleOnChange = (action) => {
|
|
9308
|
-
if (action && action.type === index$
|
|
9343
|
+
if (action && action.type === index$3.NodeActionType.ACTION_SSO_REDIRECT) {
|
|
9309
9344
|
const currentState = {
|
|
9310
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' }),
|
|
9311
9346
|
listNodes: nodes,
|
|
@@ -9328,7 +9363,7 @@ const SubotInlineNodeSSO = ({ node, indexNumber, }) => {
|
|
|
9328
9363
|
urlObj.searchParams.set('mode', 'inline');
|
|
9329
9364
|
urlObj.searchParams.set('source', 'subot-inline');
|
|
9330
9365
|
const returnUrl = urlObj.href;
|
|
9331
|
-
window.location.href = `${index$
|
|
9366
|
+
window.location.href = `${index$4.SSO_URL}?returnUrl=${encodeURIComponent(returnUrl)}`;
|
|
9332
9367
|
}
|
|
9333
9368
|
}
|
|
9334
9369
|
};
|
|
@@ -9362,8 +9397,8 @@ const SubotInlineNodeText = ({ node, indexNumber, }) => {
|
|
|
9362
9397
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
9363
9398
|
if (!action)
|
|
9364
9399
|
return;
|
|
9365
|
-
const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
9366
|
-
(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;
|
|
9367
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 });
|
|
9368
9403
|
if (actionWithOther) {
|
|
9369
9404
|
setValue(newValue);
|
|
@@ -9426,7 +9461,7 @@ const SubotInlineNodeBase = {
|
|
|
9426
9461
|
// RESULT_REACTION = 13,
|
|
9427
9462
|
};
|
|
9428
9463
|
|
|
9429
|
-
const SubotInlineButton = styled__default["default"](index$
|
|
9464
|
+
const SubotInlineButton = styled__default["default"](index$9.Button) `
|
|
9430
9465
|
margin-top: 24px;
|
|
9431
9466
|
${utils.MediaQueries.mbUp} {
|
|
9432
9467
|
margin-top: 16px;
|
|
@@ -9435,13 +9470,13 @@ const SubotInlineButton = styled__default["default"](index$8.Button) `
|
|
|
9435
9470
|
const SubotInlineDescription = styled__default["default"].div `
|
|
9436
9471
|
margin-top: 24px;
|
|
9437
9472
|
`;
|
|
9438
|
-
const SubotInlineReview = styled__default["default"](index$
|
|
9473
|
+
const SubotInlineReview = styled__default["default"](index$e.Text) `
|
|
9439
9474
|
text-align: center;
|
|
9440
9475
|
${utils.MediaQueries.mbUp} {
|
|
9441
9476
|
text-align: left;
|
|
9442
9477
|
}
|
|
9443
9478
|
`;
|
|
9444
|
-
const SubotInlineTitle = styled__default["default"](index$
|
|
9479
|
+
const SubotInlineTitle = styled__default["default"](index$f.Heading) `
|
|
9445
9480
|
text-align: center;
|
|
9446
9481
|
margin-bottom: 8px;
|
|
9447
9482
|
|
|
@@ -9663,7 +9698,7 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9663
9698
|
const getParams = React.useCallback(() => {
|
|
9664
9699
|
var _a, _b, _c, _d;
|
|
9665
9700
|
const gaData = window.gaData;
|
|
9666
|
-
const _url = (customUrl || window.location.origin + index$
|
|
9701
|
+
const _url = (customUrl || window.location.origin + index$4.basePath) +
|
|
9667
9702
|
(togetherComponentGlobalContext.GlobalData.locale === 'tl-PH'
|
|
9668
9703
|
? articleLink.replace('fil/', '')
|
|
9669
9704
|
: articleLink);
|
|
@@ -9868,9 +9903,9 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9868
9903
|
if (subotLogs) {
|
|
9869
9904
|
const lastNode = subotLogs.nodes[subotLogs.nodes.length - 1];
|
|
9870
9905
|
const isComplete = [
|
|
9871
|
-
index$
|
|
9872
|
-
index$
|
|
9873
|
-
index$
|
|
9906
|
+
index$3.NodeType.FINAL,
|
|
9907
|
+
index$3.NodeType.FINAL_THANK_YOU,
|
|
9908
|
+
index$3.NodeType.FINAL_STANDARD,
|
|
9874
9909
|
].includes(lastNode.type);
|
|
9875
9910
|
if (!isComplete) {
|
|
9876
9911
|
nodes = subotLogs.nodes;
|
|
@@ -9907,9 +9942,9 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9907
9942
|
console.log('Subot Already Loaded');
|
|
9908
9943
|
return () => undefined;
|
|
9909
9944
|
}
|
|
9910
|
-
if (!Cookies__default["default"].get(index$
|
|
9945
|
+
if (!Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)) {
|
|
9911
9946
|
index$1.checkUntilFinished({
|
|
9912
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
9947
|
+
condition: () => Boolean(Cookies__default["default"].get(index$4.GA_TOKEN_COOKIE)),
|
|
9913
9948
|
finished: () => {
|
|
9914
9949
|
const params = getParams();
|
|
9915
9950
|
getFirstAPI(params);
|
|
@@ -9975,23 +10010,23 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
9975
10010
|
pointerEvents: 'none',
|
|
9976
10011
|
} }),
|
|
9977
10012
|
React__default["default"].createElement(SubotInlineLoading, { isLoading: !!loading },
|
|
9978
|
-
React__default["default"].createElement(index$
|
|
10013
|
+
React__default["default"].createElement(index$b.Loading, null),
|
|
9979
10014
|
"Verifying..."),
|
|
9980
10015
|
state.nodes.map((node, index) => {
|
|
9981
10016
|
if (node.id.toString() === (state === null || state === void 0 ? void 0 : state.activeId)) {
|
|
9982
10017
|
if (node.hasOwnProperty('type')) {
|
|
9983
10018
|
let NodeComponent;
|
|
9984
10019
|
switch (node === null || node === void 0 ? void 0 : node.position) {
|
|
9985
|
-
case index$
|
|
10020
|
+
case index$3.NodePosition.SSO:
|
|
9986
10021
|
NodeComponent =
|
|
9987
|
-
SubotInlineNodeBase[index$
|
|
10022
|
+
SubotInlineNodeBase[index$3.NodePosition[node === null || node === void 0 ? void 0 : node.position].valueOf()];
|
|
9988
10023
|
break;
|
|
9989
10024
|
default:
|
|
9990
10025
|
NodeComponent =
|
|
9991
|
-
SubotInlineNodeBase[index$
|
|
10026
|
+
SubotInlineNodeBase[index$3.NodeType[node === null || node === void 0 ? void 0 : node.type].valueOf()];
|
|
9992
10027
|
}
|
|
9993
10028
|
if (node.is_multi_select &&
|
|
9994
|
-
node.type !== index$
|
|
10029
|
+
node.type !== index$3.NodeType.POLL)
|
|
9995
10030
|
NodeComponent = SubotInlineNodeBase['MULTIPLE'];
|
|
9996
10031
|
return (NodeComponent && (React__default["default"].createElement(NodeComponent, { key: index.toString(), indexNumber: index, node: node })));
|
|
9997
10032
|
}
|
|
@@ -10008,6 +10043,7 @@ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
|
|
|
10008
10043
|
// subot.verifyOTP.button
|
|
10009
10044
|
// subot.verifyOTP.success.message
|
|
10010
10045
|
// notification.comment.somethingWrong
|
|
10046
|
+
// subot.captcha.failed
|
|
10011
10047
|
// validation.error.validNumber
|
|
10012
10048
|
// validation.error.validOTP
|
|
10013
10049
|
// validation.error.requiredField
|
|
@@ -10064,6 +10100,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10064
10100
|
subotInlineClick: subotInlineClick$1,
|
|
10065
10101
|
subotInlineImpression: subotInlineImpression$1,
|
|
10066
10102
|
PATHS: PATHS$1,
|
|
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,
|
|
10067
10108
|
SUBOT_INLINE_SSO_QUERY_KEYS: SUBOT_INLINE_SSO_QUERY_KEYS,
|
|
10068
10109
|
stripSubotInlineSsoQueryFromUrl: stripSubotInlineSsoQueryFromUrl,
|
|
10069
10110
|
buildSubotInlineSsoReturnUrl: buildSubotInlineSsoReturnUrl,
|
|
@@ -10087,6 +10128,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10087
10128
|
replaceTextWithVariables: replaceTextWithVariables
|
|
10088
10129
|
});
|
|
10089
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;
|
|
10090
10136
|
exports.TIME_RESET_RESEND_OTP = index$1.TIME_RESET_RESEND_OTP;
|
|
10091
10137
|
exports.checkMobile = index$1.checkMobile;
|
|
10092
10138
|
exports.checkUntilFinished = index$1.checkUntilFinished;
|