@hhgtech/hhg-components 1.29.76 → 1.29.78
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/{Instagram-86b7bc15.js → Instagram-f68f1dae.js} +1 -1
- package/build/adapters.js +15 -15
- package/build/babyGrowth.js +80 -80
- package/build/cache.js +3 -3
- package/build/care.js +18 -18
- package/build/components/navigationV2/components/molecules/navigationBar/index.d.ts +2 -1
- package/build/components/navigationV2/index.d.ts +1 -0
- package/build/components.js +83 -82
- package/build/{constants-719fbb90.js → constants-385d01e7.js} +2 -2
- package/build/constants.js +3 -3
- package/build/{core-f571f62a.js → core-e0799ceb.js} +2 -2
- package/build/{dataTransform-aac3f8cd.js → dataTransform-c8c14a28.js} +1 -1
- package/build/{utils-83337870.js → defaultClassWrapper-8ac3b7f0.js} +118 -392
- package/build/ecom.js +5 -5
- package/build/esm/{Instagram-de0e8d98.js → Instagram-8dd26ac6.js} +1 -1
- package/build/esm/adapters.js +15 -15
- package/build/esm/babyGrowth.js +81 -81
- package/build/esm/cache.js +3 -3
- package/build/esm/care.js +17 -17
- package/build/esm/components/navigationV2/components/molecules/navigationBar/index.d.ts +2 -1
- package/build/esm/components/navigationV2/index.d.ts +1 -0
- package/build/esm/components.js +59 -58
- package/build/esm/{constants-49a4dcdf.js → constants-5d6ab948.js} +2 -2
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-f79180f8.js → core-296015da.js} +2 -2
- package/build/esm/{dataTransform-3807c9d2.js → dataTransform-0066c53b.js} +1 -1
- package/build/esm/{utils-296f6ce0.js → defaultClassWrapper-8112e475.js} +108 -381
- package/build/esm/ecom.js +5 -5
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-10e36e9d.js → getDynamicHealthTool-7cf3f00e.js} +4 -4
- package/build/esm/{getSocialList-a6c786db.js → getSocialList-f797bbe2.js} +31 -12
- package/build/esm/hooks.js +17 -17
- package/build/esm/i18n-values/ms-MY.js +1 -1
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/index-043dfbc3.js +216 -0
- package/build/esm/{index-aee34a48.js → index-09ecd45f.js} +37 -36
- package/build/esm/{index-a570b2ed.js → index-13975e28.js} +4 -4
- package/build/esm/{index-2f4855a8.js → index-25209a23.js} +37 -37
- package/build/esm/{index-53d2876e.js → index-2da84fe8.js} +1 -1
- package/build/esm/{index-cd069a89.js → index-2e13488d.js} +2 -2
- package/build/esm/{index-75509fc3.js → index-30eb73b8.js} +3 -3
- package/build/esm/{index-22423f24.js → index-4e6d8f1c.js} +11 -11
- package/build/esm/{index-efc77575.js → index-5b69b19c.js} +2 -2
- package/build/esm/{index-d0a2f6ec.js → index-5c2abf3a.js} +1052 -1052
- package/build/esm/{index-88b710e3.js → index-62059a85.js} +2 -2
- package/build/esm/{index-450a7d58.js → index-6896ecdf.js} +2 -2
- package/build/esm/{index-707072a0.js → index-6c7832ac.js} +21 -21
- package/build/esm/{index-d5092c27.js → index-70bb6ed3.js} +120 -120
- package/build/esm/{index-9c23f470.js → index-869411be.js} +10 -10
- package/build/esm/{index-413867da.js → index-94f2f772.js} +3 -3
- package/build/esm/{constants-14a25a1f.js → index-9dd8721c.js} +113 -113
- package/build/esm/{index-7d30d2d2.js → index-a2404202.js} +2 -2
- package/build/esm/{index-bc29a2b6.js → index-ad1d81e3.js} +2 -2
- package/build/esm/{index-5d51ace9.js → index-b45321ac.js} +6 -6
- package/build/esm/{index-352d0aa5.js → index-b851beaf.js} +1 -1
- package/build/esm/index-b9666693.js +298 -0
- package/build/esm/{index-caf6722b.js → index-c8e5b7ad.js} +5 -5
- package/build/esm/{index-c79781fb.js → index-dd00700b.js} +2 -2
- package/build/esm/{index-42b1983c.js → index-e80cb404.js} +12 -12
- package/build/esm/{index-f3e72b4d.js → index-ed317f58.js} +62 -62
- package/build/esm/{index-5f3f2d6f.js → index-f160e379.js} +2 -2
- package/build/esm/{index-a3ca59d6.js → index-fc868dc0.js} +5 -5
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +66 -65
- package/build/esm/{index.styled-ce027616.js → index.styled-19fa0003.js} +2 -2
- package/build/esm/{index.styles-82c0faa1.js → index.styles-0693a12e.js} +78 -78
- package/build/esm/lead.js +28 -28
- package/build/esm/mantine.js +20 -20
- package/build/esm/misc.js +23 -20
- package/build/esm/navigation.js +35 -35
- package/build/esm/onboardingV2.js +32 -32
- package/build/esm/pwg.js +19 -19
- package/build/esm/{routing-322eaa4c.js → routing-ddff6eb9.js} +2 -2
- package/build/esm/subot.js +27 -233
- package/build/esm/together.js +35 -35
- package/build/esm/{types-a3ed86c8.js → types-1ab8164a.js} +13 -13
- package/build/esm/{types-44a9ece1.js → types-29a56da4.js} +30 -30
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-948fb6a8.js → useCategory-00116196.js} +5 -5
- package/build/esm/{useHealthToolCache-28a3c4c6.js → useHealthToolCache-298307bc.js} +2 -2
- package/build/esm/{useMantineLocale-9b58b685.js → useMantineLocale-e9d07649.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-dd489ec7.js → usePlacesAutocomplete-3c09ae6c.js} +1 -1
- package/build/esm/{useTranslations-d26d2dd7.js → useTranslations-ee0ed7e4.js} +1 -1
- package/build/esm/{utils-c74c31bf.js → utils-70fb5414.js} +4 -4
- package/build/esm/{utils-4caabcaf.js → utils-98843bdc.js} +1 -1
- package/build/esm/vaccination.js +26 -26
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-cbdcdf15.js → getDynamicHealthTool-fe5aca1c.js} +4 -4
- package/build/{getSocialList-1694e67f.js → getSocialList-717ee974.js} +32 -13
- package/build/hooks.js +17 -17
- package/build/i18n-values/ms-MY.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-ce4f11ef.js → index-172570c5.js} +5 -5
- package/build/{index-159e2660.js → index-266faebd.js} +2 -2
- package/build/{index-0454a0b5.js → index-297519c0.js} +3 -3
- package/build/{index-61367fe0.js → index-2dd62be1.js} +12 -12
- package/build/{index-f6ac4acf.js → index-2ed617c9.js} +6 -6
- package/build/{index-ac45c9ce.js → index-2f39a918.js} +4 -4
- package/build/{index-ff3c5c20.js → index-3f5ce427.js} +11 -11
- package/build/{index-5efec884.js → index-3fea5307.js} +2 -2
- package/build/{index-dba96acd.js → index-50cc6ee0.js} +22 -22
- package/build/{index-33f0bff6.js → index-58d6aa20.js} +10 -10
- package/build/{index-813921ef.js → index-657d308e.js} +2 -2
- package/build/{constants-6781c0a5.js → index-714baad1.js} +113 -113
- package/build/{index-8c0adaed.js → index-888fe1c7.js} +2 -2
- package/build/{index-cafc9574.js → index-896cf1e8.js} +55 -55
- package/build/{index-55261180.js → index-8bbc5f6c.js} +2 -2
- package/build/{index-80b5097a.js → index-a74e681a.js} +1 -1
- package/build/{index-48aca6d7.js → index-bd99a93f.js} +1050 -1050
- package/build/{index-83e3c045.js → index-c6d8ee38.js} +68 -68
- package/build/{index-d911e858.js → index-ca2880f5.js} +48 -47
- package/build/index-d37fb502.js +233 -0
- package/build/{index-909623c9.js → index-d98b6533.js} +2 -2
- package/build/{index-a6ab742a.js → index-de879d05.js} +120 -120
- package/build/{index-b1720522.js → index-e1d386b9.js} +7 -7
- package/build/{index-b71ec348.js → index-e76edc59.js} +8 -8
- package/build/{index-1f765864.js → index-f5c1576f.js} +2 -2
- package/build/{WhatsApp-6b693d67.js → index-fbc4ad0a.js} +276 -1
- package/build/{index-07db6c89.js → index-fd9e9e31.js} +3 -3
- package/build/index.css +1 -1
- package/build/index.js +108 -107
- package/build/{index.styled-50af6497.js → index.styled-cd56f718.js} +2 -2
- package/build/{index.styles-77df1c2b.js → index.styles-15b57fec.js} +83 -83
- package/build/lead.js +28 -28
- package/build/mantine.js +17 -17
- package/build/misc.js +23 -20
- package/build/navigation.js +35 -35
- package/build/onboardingV2.js +31 -31
- package/build/pwg.js +19 -19
- package/build/{routing-19724fda.js → routing-101c464a.js} +2 -2
- package/build/subot.js +338 -545
- package/build/together.js +40 -40
- package/build/{types-841ea0f8.js → types-65270049.js} +49 -49
- package/build/{types-8103df55.js → types-bc9b7ff5.js} +191 -191
- package/build/types.js +1 -1
- package/build/{useCategory-0b2ef197.js → useCategory-99167875.js} +5 -5
- package/build/{useHealthToolCache-3c423143.js → useHealthToolCache-347a7553.js} +2 -2
- package/build/{useMantineLocale-38ffd9ae.js → useMantineLocale-67d093f5.js} +3 -3
- package/build/{usePlacesAutocomplete-646b2b03.js → usePlacesAutocomplete-0d428f7d.js} +1 -1
- package/build/{useTranslations-3da8d23e.js → useTranslations-ddee03e3.js} +1 -1
- package/build/{utils-9a87f8d9.js → utils-bc89f5c8.js} +4 -4
- package/build/{utils-478cfe5d.js → utils-f2b61d2c.js} +1 -1
- package/build/vaccination.js +26 -26
- package/package.json +1 -1
- package/build/esm/WhatsApp-11fc8356.js +0 -24
- /package/build/{BMI_BOYS.percentile.monthly-9b50e52f.js → BMI_BOYS.percentile.monthly-2dbe6dbf.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-4439d476.js → BMI_BOYS.percentile.weekly-68fd0e8a.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-960c0771.js → BMI_BOYS.percentile.yearly-a334f00f.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-4b43250e.js → BMI_BOYS.zscore.monthly-f1f1e40c.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-d4907b9f.js → BMI_BOYS.zscore.weekly-eaadf495.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-9ee69f9d.js → BMI_BOYS.zscore.yearly-ee0a8baa.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-dc2fdf0e.js → BMI_GIRLS.percentile.monthly-2a4322e1.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-1b38bd96.js → BMI_GIRLS.percentile.weekly-8d2160f3.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-02414e20.js → BMI_GIRLS.percentile.yearly-e305a1c3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-22932f64.js → BMI_GIRLS.zscore.monthly-370967e2.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-821fa654.js → BMI_GIRLS.zscore.weekly-82dbdbeb.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-7dbcbb1a.js → BMI_GIRLS.zscore.yearly-b624b0c5.js} +0 -0
- /package/build/{ChevronDown-8960bba8.js → ChevronDown-6a728605.js} +0 -0
- /package/build/{Close-08bd4298.js → Close-6a790433.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-4d93a363.js → HEAD CIRCUM_BOYS.percentile.monthly-2d793b40.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-6ba303fa.js → HEAD CIRCUM_BOYS.percentile.weekly-3ec0fbcd.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-0a4ffaee.js → HEAD CIRCUM_BOYS.percentile.yearly-018cfad7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d8eaa381.js → HEAD CIRCUM_BOYS.zscore.monthly-9a92fc56.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-c87e6af4.js → HEAD CIRCUM_BOYS.zscore.weekly-ec5c1b66.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-d9a52671.js → HEAD CIRCUM_BOYS.zscore.yearly-1bbc9e90.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-4ed7bb97.js → HEAD CIRCUM_GIRLS.percentile.monthly-88bf7054.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6e4b369c.js → HEAD CIRCUM_GIRLS.percentile.weekly-48abc5c8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-a921267b.js → HEAD CIRCUM_GIRLS.percentile.yearly-eb5476be.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-1cae954b.js → HEAD CIRCUM_GIRLS.zscore.monthly-b4908eed.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-5d43456f.js → HEAD CIRCUM_GIRLS.zscore.weekly-bb3b5b73.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-eced20c8.js → HEAD CIRCUM_GIRLS.zscore.yearly-9e459c3a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-07bcd6ca.js → HEIGHT_BOYS.percentile.monthly-de26b886.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-7cdf6993.js → HEIGHT_BOYS.percentile.weekly-2b1a480e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-6c5d943a.js → HEIGHT_BOYS.percentile.yearly-9e11bf8a.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-e46f25fc.js → HEIGHT_BOYS.zscore.monthly-169b72ab.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-6d18339b.js → HEIGHT_BOYS.zscore.weekly-1f51ea7a.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-7886aa48.js → HEIGHT_BOYS.zscore.yearly-2defb1ff.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-800ba66d.js → HEIGHT_GIRLS.percentile.monthly-ff09a166.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-cebd135d.js → HEIGHT_GIRLS.percentile.weekly-bdbad8b3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-bc54e1ee.js → HEIGHT_GIRLS.percentile.yearly-a7cf5de3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-d3160752.js → HEIGHT_GIRLS.zscore.monthly-bc88d68f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-fb8651f4.js → HEIGHT_GIRLS.zscore.weekly-4b1bb4f7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-2ac9b61e.js → HEIGHT_GIRLS.zscore.yearly-6d54fcc8.js} +0 -0
- /package/build/{Visible-f917485e.js → Visible-cf684c77.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-84ec3cf3.js → WEIGHT_BOYS.percentile.monthly-69735b17.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-430407fd.js → WEIGHT_BOYS.percentile.weekly-60881421.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c93ffc92.js → WEIGHT_BOYS.percentile.yearly-bac67ed1.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-071e754c.js → WEIGHT_BOYS.zscore.monthly-e9254299.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-6bad7529.js → WEIGHT_BOYS.zscore.weekly-6b82cd2d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-3388131c.js → WEIGHT_BOYS.zscore.yearly-43cc1986.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-1db18e75.js → WEIGHT_GIRLS.percentile.monthly-38847b2b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-94e4dc5d.js → WEIGHT_GIRLS.percentile.weekly-2ac2ee92.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-8a0d1397.js → WEIGHT_GIRLS.percentile.yearly-3401e100.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-6e81e8eb.js → WEIGHT_GIRLS.zscore.monthly-4f257d09.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-7e09c6b4.js → WEIGHT_GIRLS.zscore.weekly-fe8ea3a5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-48ae8923.js → WEIGHT_GIRLS.zscore.yearly-c780b33b.js} +0 -0
- /package/build/{animation-6a354499.js → animation-6f210c4a.js} +0 -0
- /package/build/{cart-f524d70b.js → cart-d48967a8.js} +0 -0
- /package/build/{cookieHelper-f1270aa8.js → cookieHelper-6fa2ed3a.js} +0 -0
- /package/build/{doctor-460efc4e.js → doctor-d70d0f31.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-c795fa31.js → BMI_BOYS.percentile.monthly-2c7cf81c.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-93d3a2e7.js → BMI_BOYS.percentile.weekly-963d00dc.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-e12d0f93.js → BMI_BOYS.percentile.yearly-4eea698f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-a61cbcb5.js → BMI_BOYS.zscore.monthly-f5544376.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-df28f2de.js → BMI_BOYS.zscore.weekly-4656cd4c.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-1572b3d6.js → BMI_BOYS.zscore.yearly-39ccd0fd.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-afbf7bdd.js → BMI_GIRLS.percentile.monthly-d7501958.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-88afe92e.js → BMI_GIRLS.percentile.weekly-315ba23e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-3f6d0007.js → BMI_GIRLS.percentile.yearly-5afebffb.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-df48ff7e.js → BMI_GIRLS.zscore.monthly-9c659c70.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-c0e3ef01.js → BMI_GIRLS.zscore.weekly-f72193e8.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-adf55dba.js → BMI_GIRLS.zscore.yearly-33a16ebf.js} +0 -0
- /package/build/esm/{ChevronDown-2d0f198a.js → ChevronDown-51088ad9.js} +0 -0
- /package/build/esm/{Close-2ce2f09c.js → Close-851c8b38.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-a67a4012.js → HEAD CIRCUM_BOYS.percentile.monthly-522b5435.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-eef6a2b3.js → HEAD CIRCUM_BOYS.percentile.weekly-72d04552.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-7716a1b1.js → HEAD CIRCUM_BOYS.percentile.yearly-e68e4904.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-976585ad.js → HEAD CIRCUM_BOYS.zscore.monthly-89b9b642.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-4a8efa04.js → HEAD CIRCUM_BOYS.zscore.weekly-c8c2ae6a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-3e6d5418.js → HEAD CIRCUM_BOYS.zscore.yearly-0cf56dc8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-23bf9344.js → HEAD CIRCUM_GIRLS.percentile.monthly-ef9dbfc9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-bef4b766.js → HEAD CIRCUM_GIRLS.percentile.weekly-831567fe.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-3d51ca86.js → HEAD CIRCUM_GIRLS.percentile.yearly-0e89170b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-0e8f2809.js → HEAD CIRCUM_GIRLS.zscore.monthly-82564fb7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-9af76405.js → HEAD CIRCUM_GIRLS.zscore.weekly-6b1845ec.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-8bf900c4.js → HEAD CIRCUM_GIRLS.zscore.yearly-6b65120d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2117581f.js → HEIGHT_BOYS.percentile.monthly-ecfdee13.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-32caad55.js → HEIGHT_BOYS.percentile.weekly-2bae8fa8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-f06a01f4.js → HEIGHT_BOYS.percentile.yearly-4cf5eb0c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-9277aa60.js → HEIGHT_BOYS.zscore.monthly-5978dd63.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-3fce9644.js → HEIGHT_BOYS.zscore.weekly-0e20ae65.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-701cb22d.js → HEIGHT_BOYS.zscore.yearly-9f9ecc92.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-c21f8cfd.js → HEIGHT_GIRLS.percentile.monthly-244b7899.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-9d33aa12.js → HEIGHT_GIRLS.percentile.weekly-867f533c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-6e44423b.js → HEIGHT_GIRLS.percentile.yearly-8334ef62.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-5a00cd96.js → HEIGHT_GIRLS.zscore.monthly-89dc2f92.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-2ff60b7f.js → HEIGHT_GIRLS.zscore.weekly-c37a8e45.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-18664e72.js → HEIGHT_GIRLS.zscore.yearly-d75c7342.js} +0 -0
- /package/build/esm/{Visible-013c4e17.js → Visible-2b82b731.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-9a4ae0e0.js → WEIGHT_BOYS.percentile.monthly-afa954cf.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-d5d70e19.js → WEIGHT_BOYS.percentile.weekly-0ce8ca9d.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-861ab2cd.js → WEIGHT_BOYS.percentile.yearly-9bc9d108.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-e9f591d1.js → WEIGHT_BOYS.zscore.monthly-c41e3c26.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-fb1bd500.js → WEIGHT_BOYS.zscore.weekly-927605d1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-a25ff34d.js → WEIGHT_BOYS.zscore.yearly-10a9c6a3.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-37cf236c.js → WEIGHT_GIRLS.percentile.monthly-c3957e70.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-029e478f.js → WEIGHT_GIRLS.percentile.weekly-5413b078.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-8dce316c.js → WEIGHT_GIRLS.percentile.yearly-fbef8c0c.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-9173160d.js → WEIGHT_GIRLS.zscore.monthly-e89aa92b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-411a046b.js → WEIGHT_GIRLS.zscore.weekly-7a014b5a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c19c7429.js → WEIGHT_GIRLS.zscore.yearly-0cae1bb9.js} +0 -0
- /package/build/esm/{animation-4b187451.js → animation-89cd92dc.js} +0 -0
- /package/build/esm/{cart-1e4e352e.js → cart-b5b2f9c9.js} +0 -0
- /package/build/esm/{cookieHelper-8494dcf1.js → cookieHelper-6839de86.js} +0 -0
- /package/build/esm/{doctor-74fc81b1.js → doctor-a16d5a2a.js} +0 -0
- /package/build/esm/{index-f1b4e4f6.js → index-207e5a99.js} +0 -0
- /package/build/esm/{index-3434140c.js → index-3f16918f.js} +0 -0
- /package/build/esm/{index-5f5297aa.js → index-b1dfbcd9.js} +0 -0
- /package/build/esm/{isProduction-a01c18e3.js → isProduction-6557a7a7.js} +0 -0
- /package/build/esm/{localizeNumberFormat-f924ab7b.js → localizeNumberFormat-1efb07bf.js} +0 -0
- /package/build/esm/{normalizeLink-61ae52b5.js → normalizeLink-9adb98bb.js} +0 -0
- /package/build/esm/{number-c847488a.js → number-7673e170.js} +0 -0
- /package/build/esm/{paths-756efba0.js → paths-1a0405c1.js} +0 -0
- /package/build/esm/{theme-ac1a0e46.js → theme-676e1d3e.js} +0 -0
- /package/build/esm/{translationsContext-a21c43b4.js → translationsContext-b00d46fa.js} +0 -0
- /package/build/esm/{tslib.es6-6d3de7c2.js → tslib.es6-42d35711.js} +0 -0
- /package/build/esm/{useIsInit-4ba52ee9.js → useIsInit-d65429ab.js} +0 -0
- /package/build/esm/{useOutsideClick-d1486166.js → useOutsideClick-3b36c560.js} +0 -0
- /package/build/esm/{useScrollbarSize-f874e0ac.js → useScrollbarSize-7cfe3d07.js} +0 -0
- /package/build/esm/{useUniqueId-a727e698.js → useUniqueId-28b8a8d2.js} +0 -0
- /package/build/esm/{utils-3d823a9f.js → utils-0f3667a8.js} +0 -0
- /package/build/{index-e1ed79b3.js → index-0c11098b.js} +0 -0
- /package/build/{index-4da85d4b.js → index-3d1716ad.js} +0 -0
- /package/build/{index-5e9fdc69.js → index-c4b66929.js} +0 -0
- /package/build/{index-b8cc819b.js → index-d38624f2.js} +0 -0
- /package/build/{isProduction-f7507b6e.js → isProduction-cc2f71e7.js} +0 -0
- /package/build/{localizeNumberFormat-8ccd7c74.js → localizeNumberFormat-72f6c627.js} +0 -0
- /package/build/{normalizeLink-0007c927.js → normalizeLink-37b001e0.js} +0 -0
- /package/build/{number-eb5a9b12.js → number-3c00e9ff.js} +0 -0
- /package/build/{paths-29644364.js → paths-22150d98.js} +0 -0
- /package/build/{theme-4d2a1014.js → theme-040e6fd9.js} +0 -0
- /package/build/{translationsContext-d76a8c6d.js → translationsContext-bece07e0.js} +0 -0
- /package/build/{tslib.es6-6abfcd13.js → tslib.es6-a8c3b1ed.js} +0 -0
- /package/build/{useIsInit-3021c365.js → useIsInit-78fbbf00.js} +0 -0
- /package/build/{useOutsideClick-9e887f30.js → useOutsideClick-f4ac5964.js} +0 -0
- /package/build/{useScrollbarSize-14a9f09a.js → useScrollbarSize-df8fb771.js} +0 -0
- /package/build/{useUniqueId-889c3946.js → useUniqueId-a3ed3f40.js} +0 -0
- /package/build/{utils-526a845c.js → utils-a2ad9aa3.js} +0 -0
package/build/subot.js
CHANGED
|
@@ -3,55 +3,56 @@
|
|
|
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$2 = require('./index-d38624f2.js');
|
|
7
|
+
var tslib_es6 = require('./tslib.es6-a8c3b1ed.js');
|
|
8
|
+
var index$3 = require('./index-fd9e9e31.js');
|
|
9
9
|
var Cookies = require('js-cookie');
|
|
10
10
|
var fd = require('fastdom');
|
|
11
11
|
var fastdomPromised = require('fastdom/extensions/fastdom-promised');
|
|
12
12
|
var formatString = require('string-format');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var isProduction = require('./isProduction-f7507b6e.js');
|
|
13
|
+
var defaultClassWrapper = require('./defaultClassWrapper-8ac3b7f0.js');
|
|
14
|
+
var index$1 = require('./index-d37fb502.js');
|
|
16
15
|
var hexRgb = require('hex-rgb');
|
|
17
16
|
var cn = require('classnames');
|
|
18
|
-
var index$
|
|
19
|
-
var index$
|
|
17
|
+
var index$a = require('./index-3d1716ad.js');
|
|
18
|
+
var index$8 = require('./index-297519c0.js');
|
|
20
19
|
var framerMotion = require('framer-motion');
|
|
21
20
|
var styled = require('@emotion/styled');
|
|
22
|
-
var utils
|
|
23
|
-
var index$
|
|
21
|
+
var utils = require('./utils-a2ad9aa3.js');
|
|
22
|
+
var index$4 = require('./index-bd99a93f.js');
|
|
24
23
|
var remarkable = require('remarkable');
|
|
25
24
|
var other = require('@hhgtech/icons/other');
|
|
26
25
|
var reactIntersectionObserver = require('react-intersection-observer');
|
|
27
26
|
var core = require('@mantine/core');
|
|
28
|
-
var index$
|
|
27
|
+
var index$5 = require('./index-8bbc5f6c.js');
|
|
29
28
|
var dayjs = require('dayjs');
|
|
30
29
|
var isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
31
|
-
var
|
|
32
|
-
var
|
|
30
|
+
var uuid = require('uuid');
|
|
31
|
+
var index$6 = require('./index-657d308e.js');
|
|
32
|
+
var theme = require('./theme-040e6fd9.js');
|
|
33
|
+
var isProduction = require('./isProduction-cc2f71e7.js');
|
|
33
34
|
require('@mantine/dates');
|
|
34
|
-
require('./useMantineLocale-
|
|
35
|
-
require('./translationsContext-
|
|
35
|
+
require('./useMantineLocale-67d093f5.js');
|
|
36
|
+
require('./translationsContext-bece07e0.js');
|
|
36
37
|
require('@mantine/hooks');
|
|
37
38
|
var isEmpty = require('lodash/isEmpty');
|
|
38
39
|
var reactHookForm = require('react-hook-form');
|
|
39
40
|
var PhoneInputBase = require('react-phone-number-input');
|
|
40
41
|
var api = require('@react-google-maps/api');
|
|
41
|
-
var usePlacesAutocomplete = require('./usePlacesAutocomplete-
|
|
42
|
-
var index$
|
|
43
|
-
var index$
|
|
42
|
+
var usePlacesAutocomplete = require('./usePlacesAutocomplete-0d428f7d.js');
|
|
43
|
+
var index$9 = require('./index-a74e681a.js');
|
|
44
|
+
var index$7 = require('./index-266faebd.js');
|
|
44
45
|
require('date-fns/locale');
|
|
45
|
-
require('./
|
|
46
|
+
require('./index-fbc4ad0a.js');
|
|
47
|
+
require('./cookieHelper-6fa2ed3a.js');
|
|
46
48
|
require('slugify');
|
|
47
|
-
require('./index-
|
|
48
|
-
require('./Instagram-
|
|
49
|
-
require('./
|
|
50
|
-
require('./useTranslations-3da8d23e.js');
|
|
49
|
+
require('./index-e76edc59.js');
|
|
50
|
+
require('./Instagram-f68f1dae.js');
|
|
51
|
+
require('./useTranslations-ddee03e3.js');
|
|
51
52
|
require('date-fns');
|
|
52
53
|
require('react-day-picker/DayPickerInput');
|
|
53
54
|
require('@mantine/carousel');
|
|
54
|
-
require('./useUniqueId-
|
|
55
|
+
require('./useUniqueId-a3ed3f40.js');
|
|
55
56
|
require('@hhgtech/icons/core');
|
|
56
57
|
|
|
57
58
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -142,7 +143,7 @@ const CachedSystem = {
|
|
|
142
143
|
};
|
|
143
144
|
|
|
144
145
|
const getSubotApiPath = (path, params) => {
|
|
145
|
-
const { subotApiUrl } =
|
|
146
|
+
const { subotApiUrl } = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.env;
|
|
146
147
|
const apiUrl = subotApiUrl.endsWith('frontend/api/')
|
|
147
148
|
? subotApiUrl
|
|
148
149
|
: subotApiUrl + 'frontend/api/';
|
|
@@ -151,7 +152,7 @@ const getSubotApiPath = (path, params) => {
|
|
|
151
152
|
/** inline message */
|
|
152
153
|
const subotInlineMessage = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
153
154
|
try {
|
|
154
|
-
return yield
|
|
155
|
+
return yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'POST', {
|
|
155
156
|
data,
|
|
156
157
|
});
|
|
157
158
|
}
|
|
@@ -183,7 +184,7 @@ const computeExtraSettingsForBot = (data) => {
|
|
|
183
184
|
const subotInlineFirstNode = (id) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
184
185
|
try {
|
|
185
186
|
const data = yield CachedSystem.withCached('SubotInlineFirstNode/' + id, () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
186
|
-
const response = yield
|
|
187
|
+
const response = yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_INLINE_FIRST_NODE) + `/${id}`, 'GET');
|
|
187
188
|
computeExtraSettingsForBot(response);
|
|
188
189
|
return response;
|
|
189
190
|
}));
|
|
@@ -196,7 +197,7 @@ const subotInlineFirstNode = (id) => tslib_es6.__awaiter(void 0, void 0, void 0,
|
|
|
196
197
|
/** inline click */
|
|
197
198
|
const subotInlineClick = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
198
199
|
try {
|
|
199
|
-
return yield
|
|
200
|
+
return yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_INLINE_CLICK), 'POST', {
|
|
200
201
|
data,
|
|
201
202
|
});
|
|
202
203
|
}
|
|
@@ -205,221 +206,13 @@ const subotInlineClick = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, f
|
|
|
205
206
|
/** inline impression */
|
|
206
207
|
const subotInlineImpression = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
207
208
|
try {
|
|
208
|
-
return yield
|
|
209
|
+
return yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_INLINE_IMPRESSION), 'POST', {
|
|
209
210
|
data,
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
213
|
catch (error) { }
|
|
213
214
|
});
|
|
214
215
|
|
|
215
|
-
const queryKeysJson = [
|
|
216
|
-
'form_submit_meta',
|
|
217
|
-
'selected_actions',
|
|
218
|
-
'current_selected',
|
|
219
|
-
'current_keys',
|
|
220
|
-
'current_polls',
|
|
221
|
-
];
|
|
222
|
-
const queryKeys = [
|
|
223
|
-
'bot_id',
|
|
224
|
-
'node_id',
|
|
225
|
-
// 'account_id',
|
|
226
|
-
'action_id',
|
|
227
|
-
'action_value',
|
|
228
|
-
'current_score',
|
|
229
|
-
'gtm_id',
|
|
230
|
-
'ga_client_id',
|
|
231
|
-
'is_new',
|
|
232
|
-
'title_url',
|
|
233
|
-
'url',
|
|
234
|
-
'window_id',
|
|
235
|
-
...queryKeysJson,
|
|
236
|
-
];
|
|
237
|
-
const overrideParamsByQuery = (params, query) => {
|
|
238
|
-
const keysSubotMessage = Object.keys(query);
|
|
239
|
-
keysSubotMessage.map((key) => {
|
|
240
|
-
const value = query[key];
|
|
241
|
-
if (key === 'source') {
|
|
242
|
-
params.is_new = value === 'first_login';
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (!queryKeys.includes(key)) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
/** Parse String to JSON */
|
|
249
|
-
if (queryKeysJson.includes(key)) {
|
|
250
|
-
try {
|
|
251
|
-
params[key] = JSON.parse(value);
|
|
252
|
-
}
|
|
253
|
-
catch (error) { }
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
/** Parse to number */
|
|
257
|
-
if (key === 'account_id' || key === 'current_score' || key === 'bot_id') {
|
|
258
|
-
params[key] = parseInt(value);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
params[key] = value;
|
|
262
|
-
});
|
|
263
|
-
return params;
|
|
264
|
-
};
|
|
265
|
-
const ssoIntents = (f) => [
|
|
266
|
-
{
|
|
267
|
-
id: uuid.v4(),
|
|
268
|
-
label: JSON.stringify({
|
|
269
|
-
title: '',
|
|
270
|
-
description: '',
|
|
271
|
-
}),
|
|
272
|
-
type: index$1.NodeIntentType.SSO_INTENT,
|
|
273
|
-
url: '',
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
id: uuid.v4(),
|
|
277
|
-
label: JSON.stringify({
|
|
278
|
-
title: f({
|
|
279
|
-
id: 'subot.myHealth.title',
|
|
280
|
-
defaultMessage: 'My Health',
|
|
281
|
-
}),
|
|
282
|
-
description: f({
|
|
283
|
-
id: 'subot.myHealth.description',
|
|
284
|
-
defaultMessage: 'Personal identifiers (like your name) will always be removed to protect your privacy. ',
|
|
285
|
-
}),
|
|
286
|
-
}),
|
|
287
|
-
type: index$1.NodeIntentType.SSO_INTENT,
|
|
288
|
-
url: '/images/subot/my-health.svg',
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
id: uuid.v4(),
|
|
292
|
-
label: JSON.stringify({
|
|
293
|
-
title: f({
|
|
294
|
-
id: 'subot.saveData.title',
|
|
295
|
-
defaultMessage: 'Save Data',
|
|
296
|
-
}),
|
|
297
|
-
description: f({
|
|
298
|
-
id: 'subot.saveData.description',
|
|
299
|
-
defaultMessage: 'Hellobacsi would like to learn from your data to provide better healthcare for you',
|
|
300
|
-
}),
|
|
301
|
-
}),
|
|
302
|
-
type: index$1.NodeIntentType.SSO_INTENT,
|
|
303
|
-
url: '/images/subot/file-storage.svg',
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
id: uuid.v4(),
|
|
307
|
-
label: JSON.stringify({
|
|
308
|
-
title: f({
|
|
309
|
-
id: 'subot.productYourIdentifiers.title',
|
|
310
|
-
defaultMessage: 'Protect your identifiers',
|
|
311
|
-
}),
|
|
312
|
-
description: f({
|
|
313
|
-
id: 'subot.productYourIdentifiers.description',
|
|
314
|
-
defaultMessage: 'Personal identifiers (like your name) will always be removed to protect your privacy. ',
|
|
315
|
-
}),
|
|
316
|
-
}),
|
|
317
|
-
type: index$1.NodeIntentType.SSO_INTENT,
|
|
318
|
-
url: '/images/subot/shield.svg',
|
|
319
|
-
},
|
|
320
|
-
];
|
|
321
|
-
function checkUntilFinished(params) {
|
|
322
|
-
const condition = params.condition;
|
|
323
|
-
const finished = params.finished;
|
|
324
|
-
const timeout = params.timeout || 3000;
|
|
325
|
-
const startTime = new Date().getTime();
|
|
326
|
-
const intervalId = setInterval(() => {
|
|
327
|
-
const endTime = new Date().getTime();
|
|
328
|
-
if (endTime - startTime > timeout || condition()) {
|
|
329
|
-
clearInterval(intervalId);
|
|
330
|
-
finished();
|
|
331
|
-
}
|
|
332
|
-
}, 300);
|
|
333
|
-
}
|
|
334
|
-
const getHhgIdFromCookie = (reqCookie) => {
|
|
335
|
-
const parsedCookie = utils.cookie.parse(reqCookie || '');
|
|
336
|
-
const reqHhgId = parsedCookie['hhg-id'];
|
|
337
|
-
return reqHhgId || Cookies__default["default"].get('hhg-id') || '';
|
|
338
|
-
};
|
|
339
|
-
const getSubotCookieId = (queryCookieId) => {
|
|
340
|
-
if (queryCookieId) {
|
|
341
|
-
Cookies__default["default"].set('hhg-id', queryCookieId);
|
|
342
|
-
return queryCookieId;
|
|
343
|
-
}
|
|
344
|
-
const cookieId = getHhgIdFromCookie();
|
|
345
|
-
if (cookieId) {
|
|
346
|
-
return cookieId;
|
|
347
|
-
}
|
|
348
|
-
const newCookieId = uuid.v4();
|
|
349
|
-
Cookies__default["default"].set('hhg-id', newCookieId);
|
|
350
|
-
return newCookieId;
|
|
351
|
-
};
|
|
352
|
-
const getUserIdFromCookie = (reqCookie) => {
|
|
353
|
-
const parsedCookie = utils.cookie.parse(reqCookie || '');
|
|
354
|
-
const reqToken = parsedCookie[index$2.BEARER_TOKEN_COOKIE];
|
|
355
|
-
const token = reqToken || Cookies__default["default"].get(index$2.BEARER_TOKEN_COOKIE) || '';
|
|
356
|
-
try {
|
|
357
|
-
const base64Url = token.split('.')[1];
|
|
358
|
-
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
359
|
-
const jsonPayload = decodeURIComponent(atob(base64)
|
|
360
|
-
.split('')
|
|
361
|
-
.map(function (c) {
|
|
362
|
-
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
363
|
-
})
|
|
364
|
-
.join(''));
|
|
365
|
-
return JSON.parse(jsonPayload).sub;
|
|
366
|
-
}
|
|
367
|
-
catch (err) {
|
|
368
|
-
return '';
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
const getUserInfoFromCookie = (reqCookie) => {
|
|
372
|
-
const parsedCookie = utils.cookie.parse(reqCookie || '');
|
|
373
|
-
const reqToken = parsedCookie[index$2.BEARER_TOKEN_COOKIE];
|
|
374
|
-
const token = reqToken || Cookies__default["default"].get(index$2.BEARER_TOKEN_COOKIE) || '';
|
|
375
|
-
try {
|
|
376
|
-
const base64Url = token.split('.')[1];
|
|
377
|
-
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
378
|
-
const jsonPayload = decodeURIComponent(atob(base64)
|
|
379
|
-
.split('')
|
|
380
|
-
.map(function (c) {
|
|
381
|
-
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
382
|
-
})
|
|
383
|
-
.join(''));
|
|
384
|
-
const payload = JSON.parse(jsonPayload);
|
|
385
|
-
return { email: payload.email, id: payload.sub };
|
|
386
|
-
}
|
|
387
|
-
catch (err) {
|
|
388
|
-
return { email: '', id: 0 };
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
/** To make sure have the same window id until refresh the page */
|
|
392
|
-
const generateWindowId = uuid.v4();
|
|
393
|
-
const getWindowId = () => {
|
|
394
|
-
return generateWindowId;
|
|
395
|
-
};
|
|
396
|
-
const getHelloSitesUrl = (locale, ignoreLocal) => {
|
|
397
|
-
const isLocalhost = ignoreLocal
|
|
398
|
-
? false
|
|
399
|
-
: typeof window !== 'undefined' &&
|
|
400
|
-
(window.location.hostname === 'localhost' ||
|
|
401
|
-
window.location.hostname === '127.0.0.1');
|
|
402
|
-
if (isLocalhost) {
|
|
403
|
-
return 'http://localhost'; // or any other localhost URL you want to use as fallback
|
|
404
|
-
}
|
|
405
|
-
return `https://${isProduction.isProduction ? '' : 'discover.'}${index$2.domainLocales[locale]}`;
|
|
406
|
-
};
|
|
407
|
-
const checkMobile = (userAgent) => {
|
|
408
|
-
const ua = userAgent || (typeof navigator === 'undefined' ? '' : navigator.userAgent);
|
|
409
|
-
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(ua) ||
|
|
410
|
-
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substring(0, 4))) {
|
|
411
|
-
return true;
|
|
412
|
-
}
|
|
413
|
-
return false;
|
|
414
|
-
};
|
|
415
|
-
const clickAndOpenInNewTab = (url) => {
|
|
416
|
-
const a = document.createElement('a');
|
|
417
|
-
a.href = url;
|
|
418
|
-
a.target = '_blank';
|
|
419
|
-
a.click();
|
|
420
|
-
};
|
|
421
|
-
const TIME_RESET_RESEND_OTP = 30;
|
|
422
|
-
|
|
423
216
|
const getDynamicScore = (node) => {
|
|
424
217
|
try {
|
|
425
218
|
return node.dynamic_score || {};
|
|
@@ -461,7 +254,7 @@ const getCurrentTotalDynamicScore = (listNodes, activeId, nextActionId, _formSub
|
|
|
461
254
|
? _formSubmitMeta
|
|
462
255
|
: nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.form_submit_meta;
|
|
463
256
|
if (isNodeWithDynamicScore &&
|
|
464
|
-
node.type === index$
|
|
257
|
+
node.type === index$2.NodeType.FORM &&
|
|
465
258
|
formSubmitMeta) {
|
|
466
259
|
// debugger
|
|
467
260
|
// NodeId hiện tại có trong object "dynamic_score"
|
|
@@ -501,7 +294,7 @@ const replaceTextWithVariables = (label, listNodes) => {
|
|
|
501
294
|
if (Object.keys(dynamicScoreHash).length === 0) {
|
|
502
295
|
return label;
|
|
503
296
|
}
|
|
504
|
-
const listFormNodes = listNodes.filter((node) => node.type === index$
|
|
297
|
+
const listFormNodes = listNodes.filter((node) => node.type === index$2.NodeType.FORM);
|
|
505
298
|
Object.keys(dynamicScoreHash).forEach((nodeId) => {
|
|
506
299
|
var _a, _b, _c;
|
|
507
300
|
const foundNode = listFormNodes.find((node) => node.id === nodeId);
|
|
@@ -539,7 +332,7 @@ const STATE_SUBOT_INLINE_KEY = 'stateInlineSSO';
|
|
|
539
332
|
|
|
540
333
|
const getPreviousStateFromStorage = (botId, { getParams }) => {
|
|
541
334
|
try {
|
|
542
|
-
if (!getUserIdFromCookie())
|
|
335
|
+
if (!index$1.getUserIdFromCookie())
|
|
543
336
|
return null;
|
|
544
337
|
const json = JSON.parse(localStorage.getItem(STATE_SUBOT_INLINE_KEY) || '');
|
|
545
338
|
const timeToExist = 30 * 60 * 1000; // 30 minutes
|
|
@@ -548,12 +341,12 @@ const getPreviousStateFromStorage = (botId, { getParams }) => {
|
|
|
548
341
|
json.activeId &&
|
|
549
342
|
json.createdAt + timeToExist > Date.now()) {
|
|
550
343
|
localStorage.removeItem(STATE_SUBOT_INLINE_KEY);
|
|
551
|
-
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$
|
|
344
|
+
const isSSOAtLast = json.listNodes.slice(-1)[0].position === index$2.NodePosition.SSO;
|
|
552
345
|
if (isSSOAtLast) {
|
|
553
346
|
return {
|
|
554
347
|
listNodes: json.listNodes,
|
|
555
348
|
activeId: json.activeId,
|
|
556
|
-
params: Object.assign(Object.assign(Object.assign({}, getParams()), json.params), { account_id: getUserIdFromCookie() || null, cookie_id: getSubotCookieId(json.params.cookie_id) }),
|
|
349
|
+
params: Object.assign(Object.assign(Object.assign({}, getParams()), json.params), { account_id: index$1.getUserIdFromCookie() || null, cookie_id: index$1.getSubotCookieId(json.params.cookie_id) }),
|
|
557
350
|
};
|
|
558
351
|
}
|
|
559
352
|
}
|
|
@@ -568,10 +361,10 @@ const getSubotInlineLogs = (botItem) => tslib_es6.__awaiter(void 0, void 0, void
|
|
|
568
361
|
try {
|
|
569
362
|
if (!botItem)
|
|
570
363
|
return null;
|
|
571
|
-
const response = yield
|
|
364
|
+
const response = yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_SUBOT_LOG, {
|
|
572
365
|
botId: botItem.id,
|
|
573
|
-
cookieId: getSubotCookieId(),
|
|
574
|
-
accountId: getUserIdFromCookie() || '',
|
|
366
|
+
cookieId: index$1.getSubotCookieId(),
|
|
367
|
+
accountId: index$1.getUserIdFromCookie() || '',
|
|
575
368
|
type: 'inline',
|
|
576
369
|
}), 'GET');
|
|
577
370
|
if (!((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.data) || ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.type) !== 'inline')
|
|
@@ -584,7 +377,7 @@ const getSubotInlineLogs = (botItem) => tslib_es6.__awaiter(void 0, void 0, void
|
|
|
584
377
|
return {
|
|
585
378
|
nodes: [botItem, ...nodesLogs],
|
|
586
379
|
activeId: subotLogsJson.activeId,
|
|
587
|
-
params: Object.assign(Object.assign({}, subotLogsJson.params), { account_id: getUserIdFromCookie() || subotLogsJson.params.account_id || null }),
|
|
380
|
+
params: Object.assign(Object.assign({}, subotLogsJson.params), { account_id: index$1.getUserIdFromCookie() || subotLogsJson.params.account_id || null }),
|
|
588
381
|
};
|
|
589
382
|
}
|
|
590
383
|
return null;
|
|
@@ -620,7 +413,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
620
413
|
((_a = nodeMessage._message) === null || _a === void 0 ? void 0 : _a.action_id) &&
|
|
621
414
|
((_b = nodeMessage._message) === null || _b === void 0 ? void 0 : _b.action_value)) {
|
|
622
415
|
const key = nodeMessage._message.action_value; // submit
|
|
623
|
-
if (nodeMessage.type === index$
|
|
416
|
+
if (nodeMessage.type === index$2.NodeType.FORM) {
|
|
624
417
|
const addressControl = ['address', 'province', 'district', 'commune'];
|
|
625
418
|
const formMetaExceptAddress = (((_c = nodeMessage._message) === null || _c === void 0 ? void 0 : _c.form_submit_meta) || []).filter((formMeta) => !addressControl.includes(formMeta.control));
|
|
626
419
|
/** For address field */
|
|
@@ -656,7 +449,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
656
449
|
});
|
|
657
450
|
}
|
|
658
451
|
}
|
|
659
|
-
if (nodeMessage.type === index$
|
|
452
|
+
if (nodeMessage.type === index$2.NodeType.TEXT) {
|
|
660
453
|
if (nodeMessage.is_multi_select) {
|
|
661
454
|
const actionIds = Object.keys(nodeMessage._message.selected_actions || {});
|
|
662
455
|
const actionLabel = nodeMessage.actions
|
|
@@ -675,7 +468,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
675
468
|
const actionLabel = action === null || action === void 0 ? void 0 : action.label;
|
|
676
469
|
// Select "Other, please provide more detail" -> There is an input below the option is stored in form_submit_meta
|
|
677
470
|
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;
|
|
678
|
-
const isSelectedOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
471
|
+
const isSelectedOther = (action === null || action === void 0 ? void 0 : action.type) === index$2.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;
|
|
679
472
|
if (actionLabel && actionId) {
|
|
680
473
|
result.push({
|
|
681
474
|
attribute: key,
|
|
@@ -685,7 +478,7 @@ const extractUnifiedAnswers = (nodes) => {
|
|
|
685
478
|
}
|
|
686
479
|
}
|
|
687
480
|
}
|
|
688
|
-
if (nodeMessage.type === index$
|
|
481
|
+
if (nodeMessage.type === index$2.NodeType.POLL) {
|
|
689
482
|
const nodeId = nodeMessage.id;
|
|
690
483
|
const actionIds = ((_u = (_t = nodeMessage._message) === null || _t === void 0 ? void 0 : _t.current_polls) === null || _u === void 0 ? void 0 : _u[nodeId]) || [];
|
|
691
484
|
const actionLabel = nodeMessage.actions
|
|
@@ -716,7 +509,7 @@ const extractVoucherAnswers = (nodes, botItem) => {
|
|
|
716
509
|
let voucherLocation = ''; // Dropdown
|
|
717
510
|
let phone = '';
|
|
718
511
|
const anotherFields = {};
|
|
719
|
-
let emailSubmitted = getUserInfoFromCookie().email;
|
|
512
|
+
let emailSubmitted = index$1.getUserInfoFromCookie().email;
|
|
720
513
|
const nodesWithMessage = (nodes || []);
|
|
721
514
|
nodesWithMessage.forEach((nodeMessage) => {
|
|
722
515
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -730,7 +523,7 @@ const extractVoucherAnswers = (nodes, botItem) => {
|
|
|
730
523
|
else if (submitMessage.action_value === 'voucher_color') {
|
|
731
524
|
voucherColor = (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.label) || '';
|
|
732
525
|
}
|
|
733
|
-
if (nodeMessage.type === index$
|
|
526
|
+
if (nodeMessage.type === index$2.NodeType.FORM) {
|
|
734
527
|
const logicFind = (key) => (formMeta) => {
|
|
735
528
|
return formMeta.key === key;
|
|
736
529
|
};
|
|
@@ -795,7 +588,7 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
795
588
|
let statusFlowBot = 'in_progress';
|
|
796
589
|
const lastNode = nodes[nodes.length - 1];
|
|
797
590
|
// Saving data with status COMPLETE when chatbot go to final node
|
|
798
|
-
if ((lastNode === null || lastNode === void 0 ? void 0 : lastNode.type) && index$
|
|
591
|
+
if ((lastNode === null || lastNode === void 0 ? void 0 : lastNode.type) && index$2.NodeFinalTypes.includes(lastNode.type)) {
|
|
799
592
|
statusFlowBot = 'complete';
|
|
800
593
|
}
|
|
801
594
|
/** Remove the first node and push it later in data fetching step to make sure data is latest */
|
|
@@ -810,16 +603,16 @@ const saveSubotInlineLogs = ({ nodes, activeId, params, accountIdFromLogs, }) =>
|
|
|
810
603
|
};
|
|
811
604
|
console.log('data.voucherAnswers', data.voucherAnswers);
|
|
812
605
|
const payload = {
|
|
813
|
-
cookie_id: getSubotCookieId(),
|
|
814
|
-
account_id: accountIdFromLogs || getUserIdFromCookie() || null,
|
|
606
|
+
cookie_id: index$1.getSubotCookieId(),
|
|
607
|
+
account_id: accountIdFromLogs || index$1.getUserIdFromCookie() || null,
|
|
815
608
|
bot_id: nodes[0].id,
|
|
816
609
|
flow_uuid: nodes[0].flow_uuid,
|
|
817
610
|
data: JSON.stringify(data),
|
|
818
611
|
status: statusFlowBot,
|
|
819
612
|
type: 'inline',
|
|
820
|
-
market: index$
|
|
613
|
+
market: index$3.MAP_DOMAIN_BY_LOCALE[defaultClassWrapper.locale],
|
|
821
614
|
};
|
|
822
|
-
yield
|
|
615
|
+
yield defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.POST_SUBOT_CREATE_LOG), 'POST', {
|
|
823
616
|
data: payload,
|
|
824
617
|
});
|
|
825
618
|
}
|
|
@@ -865,7 +658,7 @@ const SubotInlineContext = React.createContext({
|
|
|
865
658
|
userInfo: null,
|
|
866
659
|
});
|
|
867
660
|
const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer, bgColor: _bgColor, primaryColor: _primaryColor, textColor, textButtonColor, bgContentColor, bgImgFullContainer, isDisabledAnimationOnMobile, onCloseMobile, userInfo, }) => {
|
|
868
|
-
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(
|
|
661
|
+
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
869
662
|
const ref = React.useRef(null);
|
|
870
663
|
// const { formatMessage: f } = useIntl()
|
|
871
664
|
const refAccountIdFromLogs = React.useRef(null);
|
|
@@ -912,16 +705,16 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
912
705
|
const getParams = React.useCallback(() => {
|
|
913
706
|
const gaData = window.gaData;
|
|
914
707
|
const url = window.location.origin +
|
|
915
|
-
index$
|
|
916
|
-
((
|
|
708
|
+
index$3.basePath +
|
|
709
|
+
((defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.locale) === 'tl-PH'
|
|
917
710
|
? articleLink.replace('fil/', '')
|
|
918
711
|
: articleLink);
|
|
919
712
|
const params = {
|
|
920
713
|
bot_id: subotId,
|
|
921
|
-
account_id: getUserIdFromCookie() || null,
|
|
714
|
+
account_id: index$1.getUserIdFromCookie() || null,
|
|
922
715
|
action_id: '',
|
|
923
716
|
action_value: '',
|
|
924
|
-
cookie_id: getSubotCookieId(),
|
|
717
|
+
cookie_id: index$1.getSubotCookieId(),
|
|
925
718
|
current_score: 0,
|
|
926
719
|
current_keys: [],
|
|
927
720
|
current_selected: [],
|
|
@@ -941,9 +734,9 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
941
734
|
.replace('dev.', 'discover.')
|
|
942
735
|
.replace('staging.hellohealthgroup.com', 'discover.hellodoctor.com.ph') // Stagign
|
|
943
736
|
.replace('https://hellohealthgroup.com', 'https://hellodoctor.com.ph'),
|
|
944
|
-
window_id: getWindowId(),
|
|
737
|
+
window_id: index$1.getWindowId(),
|
|
945
738
|
};
|
|
946
|
-
return overrideParamsByQuery(params,
|
|
739
|
+
return index$1.overrideParamsByQuery(params, defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.router.query);
|
|
947
740
|
}, []);
|
|
948
741
|
const elementScrollIntoView = React.useCallback(() => {
|
|
949
742
|
var _a;
|
|
@@ -1126,9 +919,9 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
|
|
|
1126
919
|
});
|
|
1127
920
|
}, [activeId]);
|
|
1128
921
|
React.useEffect(() => {
|
|
1129
|
-
if (!Cookies__default["default"].get(index$
|
|
1130
|
-
checkUntilFinished({
|
|
1131
|
-
condition: () => Boolean(Cookies__default["default"].get(index$
|
|
922
|
+
if (!Cookies__default["default"].get(index$3.GA_TOKEN_COOKIE)) {
|
|
923
|
+
index$1.checkUntilFinished({
|
|
924
|
+
condition: () => Boolean(Cookies__default["default"].get(index$3.GA_TOKEN_COOKIE)),
|
|
1132
925
|
finished: () => {
|
|
1133
926
|
const params = getParams();
|
|
1134
927
|
getFirstNode(params);
|
|
@@ -1229,7 +1022,7 @@ const SubotInlineRevampContainer = styled__default["default"].div `
|
|
|
1229
1022
|
pointer-events: none;
|
|
1230
1023
|
}
|
|
1231
1024
|
|
|
1232
|
-
${utils
|
|
1025
|
+
${utils.MediaQueries.mbUp} {
|
|
1233
1026
|
.si-inline-revamp-container {
|
|
1234
1027
|
padding-right: 12px;
|
|
1235
1028
|
}
|
|
@@ -1257,7 +1050,7 @@ const SubotInlineRevampContainer = styled__default["default"].div `
|
|
|
1257
1050
|
height: calc(100% - 72px);
|
|
1258
1051
|
}
|
|
1259
1052
|
|
|
1260
|
-
${utils
|
|
1053
|
+
${utils.MediaQueries.mbUp} {
|
|
1261
1054
|
&[data-show-footer='true'] {
|
|
1262
1055
|
height: calc(100% - 56px);
|
|
1263
1056
|
}
|
|
@@ -1279,7 +1072,7 @@ const SubotInlineRevampContainer = styled__default["default"].div `
|
|
|
1279
1072
|
}
|
|
1280
1073
|
}
|
|
1281
1074
|
|
|
1282
|
-
${utils
|
|
1075
|
+
${utils.MediaQueries.mbUp} {
|
|
1283
1076
|
.si-container-placeholder {
|
|
1284
1077
|
height: 550px;
|
|
1285
1078
|
max-height: 550px;
|
|
@@ -1307,7 +1100,7 @@ const SubotInlineRevampContainer = styled__default["default"].div `
|
|
|
1307
1100
|
}
|
|
1308
1101
|
}
|
|
1309
1102
|
|
|
1310
|
-
${utils
|
|
1103
|
+
${utils.MediaQueries.mbDown} {
|
|
1311
1104
|
.si-container-open {
|
|
1312
1105
|
position: fixed;
|
|
1313
1106
|
width: auto;
|
|
@@ -1345,7 +1138,7 @@ const StyledContainerFullscreen = styled__default["default"].div `
|
|
|
1345
1138
|
padding: 40px 0;
|
|
1346
1139
|
font-family: Inter;
|
|
1347
1140
|
|
|
1348
|
-
${utils
|
|
1141
|
+
${utils.MediaQueries.mbUp} {
|
|
1349
1142
|
padding: 80px 0;
|
|
1350
1143
|
}
|
|
1351
1144
|
|
|
@@ -1356,7 +1149,7 @@ const StyledContainerFullscreen = styled__default["default"].div `
|
|
|
1356
1149
|
margin: 0 auto;
|
|
1357
1150
|
flex-direction: column;
|
|
1358
1151
|
|
|
1359
|
-
${utils
|
|
1152
|
+
${utils.MediaQueries.mbUp} {
|
|
1360
1153
|
flex-direction: row;
|
|
1361
1154
|
gap: 30px;
|
|
1362
1155
|
}
|
|
@@ -1378,12 +1171,12 @@ const StyledContainerFullscreen = styled__default["default"].div `
|
|
|
1378
1171
|
}
|
|
1379
1172
|
}
|
|
1380
1173
|
|
|
1381
|
-
${utils
|
|
1174
|
+
${utils.MediaQueries.mbUp} {
|
|
1382
1175
|
max-width: ${heightMobile};
|
|
1383
1176
|
min-width: ${heightMobile};
|
|
1384
1177
|
}
|
|
1385
1178
|
|
|
1386
|
-
${utils
|
|
1179
|
+
${utils.MediaQueries.tdUp} {
|
|
1387
1180
|
max-width: 720px;
|
|
1388
1181
|
min-width: 720px;
|
|
1389
1182
|
}
|
|
@@ -1395,7 +1188,7 @@ const StyledContainerFullscreen = styled__default["default"].div `
|
|
|
1395
1188
|
flex-direction: column;
|
|
1396
1189
|
max-width: 490px;
|
|
1397
1190
|
|
|
1398
|
-
${utils
|
|
1191
|
+
${utils.MediaQueries.mbUp} {
|
|
1399
1192
|
padding-top: 48px;
|
|
1400
1193
|
}
|
|
1401
1194
|
|
|
@@ -1411,7 +1204,7 @@ const StyledContainerFullscreen = styled__default["default"].div `
|
|
|
1411
1204
|
line-height: 1.2;
|
|
1412
1205
|
letter-spacing: -0.616px;
|
|
1413
1206
|
|
|
1414
|
-
${utils
|
|
1207
|
+
${utils.MediaQueries.mbUp} {
|
|
1415
1208
|
font-size: 40px;
|
|
1416
1209
|
line-height: 48px;
|
|
1417
1210
|
letter-spacing: -0.88px;
|
|
@@ -1469,7 +1262,7 @@ const Info = (props) => {
|
|
|
1469
1262
|
|
|
1470
1263
|
const Container$v = () => {
|
|
1471
1264
|
const [isShow, setIsShow] = React.useState(false);
|
|
1472
|
-
const { formatMessage: f } = React.useContext(
|
|
1265
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
1473
1266
|
return (React__default["default"].createElement(StyledWrap$q, null,
|
|
1474
1267
|
React__default["default"].createElement("div", { className: "si-disclaimer", onClick: () => setIsShow(!isShow) },
|
|
1475
1268
|
React__default["default"].createElement(Info, { className: "si-disclaimer-info-svg" }),
|
|
@@ -1486,9 +1279,9 @@ const Container$v = () => {
|
|
|
1486
1279
|
Container$v.displayName = 'SubotInlineDisclaimer';
|
|
1487
1280
|
|
|
1488
1281
|
const useCurrentUrl = () => {
|
|
1489
|
-
const { data: { locale, router }, } = React.useContext(
|
|
1282
|
+
const { data: { locale, router }, } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
1490
1283
|
const { asPath } = router || {};
|
|
1491
|
-
const [currentUrl, setCurrentUrl] = React.useState(() => `${getHelloSitesUrl(locale, false)}${index$
|
|
1284
|
+
const [currentUrl, setCurrentUrl] = React.useState(() => `${index$1.getHelloSitesUrl(locale, false)}${index$3.basePath}${asPath}`);
|
|
1492
1285
|
React.useEffect(() => {
|
|
1493
1286
|
setCurrentUrl(window.location.href);
|
|
1494
1287
|
}, [asPath]);
|
|
@@ -1497,9 +1290,9 @@ const useCurrentUrl = () => {
|
|
|
1497
1290
|
|
|
1498
1291
|
// import { useIntl } from 'react-intl'
|
|
1499
1292
|
const useValidationMultiOption = () => {
|
|
1500
|
-
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(
|
|
1293
|
+
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
1501
1294
|
const validateSelectActions = (activeActions, node, callBack) => {
|
|
1502
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
1295
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$2.NodeMultipleOptions.EXACT_NUMBER &&
|
|
1503
1296
|
activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
|
|
1504
1297
|
pushNotifications({
|
|
1505
1298
|
message: f({
|
|
@@ -1512,7 +1305,7 @@ const useValidationMultiOption = () => {
|
|
|
1512
1305
|
});
|
|
1513
1306
|
return;
|
|
1514
1307
|
}
|
|
1515
|
-
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
1308
|
+
else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$2.NodeMultipleOptions.RANGE &&
|
|
1516
1309
|
(activeActions.length < (node === null || node === void 0 ? void 0 : node.from) ||
|
|
1517
1310
|
activeActions.length > (node === null || node === void 0 ? void 0 : node.to))) {
|
|
1518
1311
|
pushNotifications({
|
|
@@ -1581,7 +1374,7 @@ const StyledWrap$p = styled__default["default"].div `
|
|
|
1581
1374
|
display: flex;
|
|
1582
1375
|
}
|
|
1583
1376
|
|
|
1584
|
-
${utils
|
|
1377
|
+
${utils.MediaQueries.mbDown} {
|
|
1585
1378
|
&[data-show-action='false'] {
|
|
1586
1379
|
justify-content: center;
|
|
1587
1380
|
padding: 12px 0;
|
|
@@ -1642,12 +1435,12 @@ const NodeContextProvider = ({ children }) => {
|
|
|
1642
1435
|
return (React__default["default"].createElement(NodeContext.Provider, { value: ctxValue }, children));
|
|
1643
1436
|
};
|
|
1644
1437
|
|
|
1645
|
-
const disabledNodeList = [index$
|
|
1646
|
-
const disabledPositionList = [index$
|
|
1438
|
+
const disabledNodeList = [index$2.NodeType.FORM];
|
|
1439
|
+
const disabledPositionList = [index$2.NodePosition.SSO];
|
|
1647
1440
|
const excludeNodeList = [
|
|
1648
|
-
index$
|
|
1649
|
-
index$
|
|
1650
|
-
index$
|
|
1441
|
+
index$2.NodeType.FINAL,
|
|
1442
|
+
index$2.NodeType.FINAL_THANK_YOU,
|
|
1443
|
+
index$2.NodeType.FINAL_STANDARD,
|
|
1651
1444
|
];
|
|
1652
1445
|
// const isSingleChoiceText = (node?: SubotNode) => {
|
|
1653
1446
|
// if (!node) return false
|
|
@@ -1658,18 +1451,18 @@ const excludeNodeList = [
|
|
|
1658
1451
|
// }
|
|
1659
1452
|
const Container$u = () => {
|
|
1660
1453
|
var _a, _b, _c, _d, _e;
|
|
1661
|
-
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(
|
|
1454
|
+
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
1662
1455
|
const currentUrl = useCurrentUrl();
|
|
1663
1456
|
const { listNodes, activeId, isShowFooter, onNext, onPrev, params, onStartOver, loading, } = React.useContext(SubotInlineContext);
|
|
1664
1457
|
const { value } = React.useContext(NodeContext);
|
|
1665
1458
|
const validation = useValidationMultiOption();
|
|
1666
1459
|
const botItem = listNodes[0];
|
|
1667
1460
|
const node = listNodes.find((nodeItem) => nodeItem.id == activeId);
|
|
1668
|
-
const actionNextChoice = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$
|
|
1669
|
-
const actionPollSubmit = (_b = node === null || node === void 0 ? void 0 : node.actions) === null || _b === void 0 ? void 0 : _b.find(({ type }) => type == index$
|
|
1670
|
-
const actionMultipleSubmit = (_c = node === null || node === void 0 ? void 0 : node.actions) === null || _c === void 0 ? void 0 : _c.find(({ type }) => type == index$
|
|
1461
|
+
const actionNextChoice = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === index$2.NodeActionType.USER_CHOICE_NEXT);
|
|
1462
|
+
const actionPollSubmit = (_b = node === null || node === void 0 ? void 0 : node.actions) === null || _b === void 0 ? void 0 : _b.find(({ type }) => type == index$2.NodeActionType.POLL_BUTTON);
|
|
1463
|
+
const actionMultipleSubmit = (_c = node === null || node === void 0 ? void 0 : node.actions) === null || _c === void 0 ? void 0 : _c.find(({ type }) => type == index$2.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
1671
1464
|
const selectedWithOtherInput = ((_e = (_d = node === null || node === void 0 ? void 0 : node.actions) === null || _d === void 0 ? void 0 : _d.find(({ id }) => id === value.action_id)) === null || _e === void 0 ? void 0 : _e.type) ===
|
|
1672
|
-
index$
|
|
1465
|
+
index$2.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;
|
|
1673
1466
|
const handleNextChoice = () => {
|
|
1674
1467
|
const nextValue = {
|
|
1675
1468
|
node_id: node.id,
|
|
@@ -1740,7 +1533,7 @@ const Container$u = () => {
|
|
|
1740
1533
|
defaultMessage: 'Start over',
|
|
1741
1534
|
}))),
|
|
1742
1535
|
isDisplayAction && (React__default["default"].createElement("div", { className: "si-footer-actions" },
|
|
1743
|
-
React__default["default"].createElement(index$
|
|
1536
|
+
React__default["default"].createElement(index$4.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: {
|
|
1744
1537
|
root: {
|
|
1745
1538
|
':not(:disabled)': {
|
|
1746
1539
|
backgroundColor: 'transparent !important',
|
|
@@ -1756,7 +1549,7 @@ const Container$u = () => {
|
|
|
1756
1549
|
id: 'riskScreener.back',
|
|
1757
1550
|
defaultMessage: 'Back',
|
|
1758
1551
|
})),
|
|
1759
|
-
React__default["default"].createElement(index$
|
|
1552
|
+
React__default["default"].createElement(index$4.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: {
|
|
1760
1553
|
root: {
|
|
1761
1554
|
':not(:disabled)': {
|
|
1762
1555
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
@@ -1917,7 +1710,7 @@ const StyledContainer = styled__default["default"].div `
|
|
|
1917
1710
|
/* color: #262626; */
|
|
1918
1711
|
color: var(--subot-inline-text-color, #262626);
|
|
1919
1712
|
|
|
1920
|
-
${utils
|
|
1713
|
+
${utils.MediaQueries.mbUp} {
|
|
1921
1714
|
font-size: 24px;
|
|
1922
1715
|
line-height: 120%;
|
|
1923
1716
|
letter-spacing: -0.432px;
|
|
@@ -1931,7 +1724,7 @@ const StyledContainer = styled__default["default"].div `
|
|
|
1931
1724
|
line-height: 24px;
|
|
1932
1725
|
font-weight: 400;
|
|
1933
1726
|
|
|
1934
|
-
${utils
|
|
1727
|
+
${utils.MediaQueries.mbUp} {
|
|
1935
1728
|
letter-spacing: -0.16px;
|
|
1936
1729
|
}
|
|
1937
1730
|
}
|
|
@@ -2013,7 +1806,7 @@ const SubotInlineVoucherLeftUI = ({ clientId, voucherAnswers }) => {
|
|
|
2013
1806
|
const [quantityTotal, setQuantityTotal] = React.useState(0);
|
|
2014
1807
|
const [quantityInStock, setQuantityInStock] = React.useState(0);
|
|
2015
1808
|
React.useEffect(() => {
|
|
2016
|
-
|
|
1809
|
+
defaultClassWrapper.callApi(getSubotApiPath(PATHS$1.GET_VOUCHER_QUANTITY, {
|
|
2017
1810
|
search: (voucherAnswers === null || voucherAnswers === void 0 ? void 0 : voucherAnswers.voucherName.split('|')[0]) || '',
|
|
2018
1811
|
clientId: clientId,
|
|
2019
1812
|
}), 'GET').then((res) => {
|
|
@@ -2029,11 +1822,11 @@ const SubotInlineVoucherLeftUI = ({ clientId, voucherAnswers }) => {
|
|
|
2029
1822
|
return null;
|
|
2030
1823
|
}
|
|
2031
1824
|
return (React__default["default"].createElement(StyledWrap$n, { className: "si-voucher-left-ui" },
|
|
2032
|
-
React__default["default"].createElement("img", { src: index$
|
|
2033
|
-
React__default["default"].createElement("img", { src: index$
|
|
1825
|
+
React__default["default"].createElement("img", { src: index$5.CommonGAssets.getAssetPath('subot/voucher_bg.png'), alt: "", loading: "eager", className: "si-voucher-bg" }),
|
|
1826
|
+
React__default["default"].createElement("img", { src: index$5.CommonGAssets.getAssetPath('subot/voucher_icon.png'), alt: "", loading: "eager", className: "si-voucher-item" }),
|
|
2034
1827
|
React__default["default"].createElement(core.Box, { className: "si-voucher-in-stock" },
|
|
2035
1828
|
React__default["default"].createElement("h3", null, quantityInStock),
|
|
2036
|
-
React__default["default"].createElement("img", { src: index$
|
|
1829
|
+
React__default["default"].createElement("img", { src: index$5.CommonGAssets.getAssetPath('subot/voucher_icon_small.png'), alt: "", loading: "eager" })),
|
|
2037
1830
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress" },
|
|
2038
1831
|
React__default["default"].createElement(core.Box, { className: "si-voucher-progress--inner", style: { width: `${percentage}%` } }))));
|
|
2039
1832
|
};
|
|
@@ -2059,7 +1852,7 @@ const Container$s = ({ node, onClickStart }) => {
|
|
|
2059
1852
|
const handleClickStart = () => {
|
|
2060
1853
|
// 1. Tracking Event Click
|
|
2061
1854
|
const params = getParams();
|
|
2062
|
-
params.device_id = checkMobile(window.navigator.userAgent) ? 2 : 1;
|
|
1855
|
+
params.device_id = index$1.checkMobile(window.navigator.userAgent) ? 2 : 1;
|
|
2063
1856
|
subotInlineClick(params);
|
|
2064
1857
|
// 2. Call API to fetch next node
|
|
2065
1858
|
onNext();
|
|
@@ -2074,7 +1867,7 @@ const Container$s = ({ node, onClickStart }) => {
|
|
|
2074
1867
|
email: '',
|
|
2075
1868
|
voucherName: '',
|
|
2076
1869
|
} })),
|
|
2077
|
-
React__default["default"].createElement(index$
|
|
1870
|
+
React__default["default"].createElement(index$4.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: {
|
|
2078
1871
|
root: {
|
|
2079
1872
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2080
1873
|
'&:hover': {
|
|
@@ -2118,7 +1911,7 @@ const StyledWrap$k = styled__default["default"].div `
|
|
|
2118
1911
|
display: block;
|
|
2119
1912
|
}
|
|
2120
1913
|
|
|
2121
|
-
${utils
|
|
1914
|
+
${utils.MediaQueries.mbUp} {
|
|
2122
1915
|
font-size: 22px;
|
|
2123
1916
|
line-height: 32px;
|
|
2124
1917
|
letter-spacing: -0.6px;
|
|
@@ -2155,22 +1948,22 @@ const PATHS = {
|
|
|
2155
1948
|
};
|
|
2156
1949
|
|
|
2157
1950
|
const getLeadPath = (path, params) => {
|
|
2158
|
-
const { leadApiUrl } =
|
|
1951
|
+
const { leadApiUrl } = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.env;
|
|
2159
1952
|
return leadApiUrl + formatString__default["default"](path, Object.assign({}, params));
|
|
2160
1953
|
};
|
|
2161
1954
|
const callApiWithLead = (url, method, options) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2162
1955
|
if (options === null || options === void 0 ? void 0 : options.data) {
|
|
2163
|
-
let cookie = Cookies__default["default"].get(
|
|
2164
|
-
const ga = Cookies__default["default"].get(index$
|
|
1956
|
+
let cookie = Cookies__default["default"].get(defaultClassWrapper.LEAD_TOKEN_COOKIE);
|
|
1957
|
+
const ga = Cookies__default["default"].get(index$3.GA_TOKEN_COOKIE);
|
|
2165
1958
|
if (!cookie) {
|
|
2166
1959
|
const newCookie = uuid.v4();
|
|
2167
1960
|
cookie = newCookie;
|
|
2168
|
-
Cookies__default["default"].set(
|
|
1961
|
+
Cookies__default["default"].set(defaultClassWrapper.LEAD_TOKEN_COOKIE, newCookie);
|
|
2169
1962
|
}
|
|
2170
1963
|
options.data.cookie_id = cookie;
|
|
2171
1964
|
options.data.ga_client_id = ga || '';
|
|
2172
1965
|
}
|
|
2173
|
-
return
|
|
1966
|
+
return defaultClassWrapper.callApi(url, method, options);
|
|
2174
1967
|
});
|
|
2175
1968
|
|
|
2176
1969
|
dayjs__default["default"].extend(isSameOrBefore__default["default"]);
|
|
@@ -2240,15 +2033,15 @@ const checkSyncDataOnFrisoCampaign = (bot, values) => {
|
|
|
2240
2033
|
if (!((_a = bot.extra_settings) === null || _a === void 0 ? void 0 : _a.sync_data_friso_campaign) || !values) {
|
|
2241
2034
|
return;
|
|
2242
2035
|
}
|
|
2243
|
-
const nameControl = index$
|
|
2244
|
-
const emailControl = index$
|
|
2245
|
-
const dateControl = index$
|
|
2246
|
-
const phoneControlOtp = index$
|
|
2247
|
-
const phoneControl = index$
|
|
2248
|
-
const level1Control = index$
|
|
2249
|
-
const level2Control = index$
|
|
2250
|
-
const level3Control = index$
|
|
2251
|
-
const addressControl = index$
|
|
2036
|
+
const nameControl = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_NAME];
|
|
2037
|
+
const emailControl = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_EMAIL];
|
|
2038
|
+
const dateControl = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_DATE];
|
|
2039
|
+
const phoneControlOtp = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_OTP];
|
|
2040
|
+
const phoneControl = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_PHONE];
|
|
2041
|
+
const level1Control = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE];
|
|
2042
|
+
const level2Control = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT];
|
|
2043
|
+
const level3Control = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE];
|
|
2044
|
+
const addressControl = index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_ADDRESS];
|
|
2252
2045
|
const name = ((_b = values.find((o) => o.control === nameControl)) === null || _b === void 0 ? void 0 : _b.value) || '';
|
|
2253
2046
|
const email = ((_c = values.find((o) => o.control === emailControl)) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2254
2047
|
const date = ((_d = values.find((o) => o.control === dateControl)) === null || _d === void 0 ? void 0 : _d.value) || '';
|
|
@@ -2294,11 +2087,11 @@ const foundNodeFrisoForm = (listNode) => {
|
|
|
2294
2087
|
var _a, _b, _c, _d, _e, _f;
|
|
2295
2088
|
const node = n;
|
|
2296
2089
|
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 ===
|
|
2297
|
-
index$
|
|
2090
|
+
index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_OTP] ||
|
|
2298
2091
|
o.control ===
|
|
2299
|
-
index$
|
|
2092
|
+
index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_PHONE])) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
2300
2093
|
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 ===
|
|
2301
|
-
index$
|
|
2094
|
+
index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_DATE])) === null || _f === void 0 ? void 0 : _f.value) || '';
|
|
2302
2095
|
if (phone && date) {
|
|
2303
2096
|
foundPhone = phone;
|
|
2304
2097
|
foundDate = date;
|
|
@@ -2331,12 +2124,12 @@ const Container$r = ({ intent }) => {
|
|
|
2331
2124
|
handleFrisoRedirecition(listNodes);
|
|
2332
2125
|
return;
|
|
2333
2126
|
}
|
|
2334
|
-
intent.url && clickAndOpenInNewTab(intent.url);
|
|
2127
|
+
intent.url && index$1.clickAndOpenInNewTab(intent.url);
|
|
2335
2128
|
};
|
|
2336
2129
|
const trackingMainButton = React.useMemo(() => {
|
|
2337
2130
|
if (!intent.url ||
|
|
2338
2131
|
!intent.label ||
|
|
2339
|
-
(intent === null || intent === void 0 ? void 0 : intent.type) !== index$
|
|
2132
|
+
(intent === null || intent === void 0 ? void 0 : intent.type) !== index$2.NodeIntentType.BOT_MAIN_BUTTON)
|
|
2340
2133
|
return {};
|
|
2341
2134
|
return {
|
|
2342
2135
|
'data-event-category': 'Service Connection',
|
|
@@ -2347,7 +2140,7 @@ const Container$r = ({ intent }) => {
|
|
|
2347
2140
|
if (!(intent === null || intent === void 0 ? void 0 : intent.label))
|
|
2348
2141
|
return null;
|
|
2349
2142
|
return (React__default["default"].createElement(StyledWrap$j, null,
|
|
2350
|
-
React__default["default"].createElement(index$
|
|
2143
|
+
React__default["default"].createElement(index$4.Button, Object.assign({ size: "md", color: "primary", onClick: handleOnClick }, trackingMainButton, { styles: {
|
|
2351
2144
|
root: {
|
|
2352
2145
|
backgroundColor: 'var(--subot-inline-primary-color) !important',
|
|
2353
2146
|
'&:hover': {
|
|
@@ -2379,20 +2172,20 @@ Container$q.displayName = 'SubotInlineIntentBotImage';
|
|
|
2379
2172
|
|
|
2380
2173
|
const Container$p = ({ intent, indexNumber }) => {
|
|
2381
2174
|
const { listNodes } = React.useContext(SubotInlineContext);
|
|
2382
|
-
const isShowLabel = ![index$
|
|
2175
|
+
const isShowLabel = ![index$2.NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2383
2176
|
const isText = [
|
|
2384
|
-
index$
|
|
2385
|
-
index$
|
|
2177
|
+
index$2.NodeIntentType.BOT_TEXT,
|
|
2178
|
+
index$2.NodeIntentType.BOT_MAIN_TITLE,
|
|
2386
2179
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2387
2180
|
const isBtn = [
|
|
2388
|
-
index$
|
|
2389
|
-
index$
|
|
2181
|
+
index$2.NodeIntentType.BOT_BUTTON,
|
|
2182
|
+
index$2.NodeIntentType.BOT_RECALCULATE,
|
|
2390
2183
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2391
2184
|
const isImageNode = [
|
|
2392
|
-
index$
|
|
2393
|
-
index$
|
|
2185
|
+
index$2.NodeIntentType.BOT_IMAGE,
|
|
2186
|
+
index$2.NodeIntentType.BOT_MAIN_IMAGE,
|
|
2394
2187
|
].includes(intent === null || intent === void 0 ? void 0 : intent.type);
|
|
2395
|
-
const isMainTitle = (intent === null || intent === void 0 ? void 0 : intent.type) === index$
|
|
2188
|
+
const isMainTitle = (intent === null || intent === void 0 ? void 0 : intent.type) === index$2.NodeIntentType.BOT_MAIN_TITLE;
|
|
2396
2189
|
if (isBtn)
|
|
2397
2190
|
return React__default["default"].createElement(Container$r, { intent: intent });
|
|
2398
2191
|
if (!intent) {
|
|
@@ -2569,7 +2362,7 @@ const StyledWrap$f = styled__default["default"].div `
|
|
|
2569
2362
|
|
|
2570
2363
|
const Container$m = ({ text }) => {
|
|
2571
2364
|
const [isShow, setIsShow] = React.useState(false);
|
|
2572
|
-
const { formatMessage: f } = React.useContext(
|
|
2365
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
2573
2366
|
if (!text) {
|
|
2574
2367
|
return null;
|
|
2575
2368
|
}
|
|
@@ -2587,12 +2380,12 @@ Container$m.displayName = 'SubotInlineDisclaimer';
|
|
|
2587
2380
|
|
|
2588
2381
|
const Container$l = ({ intent }) => {
|
|
2589
2382
|
var _a;
|
|
2590
|
-
const { formatMessage: f } = React.useContext(
|
|
2383
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
2591
2384
|
const handleOnClick = (service) => {
|
|
2592
2385
|
if (!service.url) {
|
|
2593
2386
|
return;
|
|
2594
2387
|
}
|
|
2595
|
-
service.url && clickAndOpenInNewTab(service.url);
|
|
2388
|
+
service.url && index$1.clickAndOpenInNewTab(service.url);
|
|
2596
2389
|
};
|
|
2597
2390
|
const listServices = React.useMemo(() => {
|
|
2598
2391
|
try {
|
|
@@ -2606,7 +2399,7 @@ const Container$l = ({ intent }) => {
|
|
|
2606
2399
|
if (!intent.label || !listServices.length)
|
|
2607
2400
|
return null;
|
|
2608
2401
|
return (React__default["default"].createElement(StyledWrap$g, null,
|
|
2609
|
-
React__default["default"].createElement(index$
|
|
2402
|
+
React__default["default"].createElement(index$6.Text, { size: "lg", weight: "semiBold", className: "si-title", color: "var(--subot-inline-text-color, #262626)" }, f({
|
|
2610
2403
|
id: 'tools.suggestedServices',
|
|
2611
2404
|
defaultMessage: 'Suggested services',
|
|
2612
2405
|
}) + ':'),
|
|
@@ -2637,7 +2430,7 @@ const Container$k = ({ intent }) => {
|
|
|
2637
2430
|
if (!(intent === null || intent === void 0 ? void 0 : intent.label)) {
|
|
2638
2431
|
return null;
|
|
2639
2432
|
}
|
|
2640
|
-
const isMainBody = (intent === null || intent === void 0 ? void 0 : intent.type) === index$
|
|
2433
|
+
const isMainBody = (intent === null || intent === void 0 ? void 0 : intent.type) === index$2.NodeIntentType.BOT_MAIN_BODY;
|
|
2641
2434
|
return (React__default["default"].createElement(StyledWrap$e, { className: "si-bot-text" },
|
|
2642
2435
|
React__default["default"].createElement(Markdown, null, isMainBody
|
|
2643
2436
|
? replaceTextWithVariables(intent.label, listNodes)
|
|
@@ -2698,7 +2491,7 @@ var _a$1;
|
|
|
2698
2491
|
const SubotInlineIntentCol = styled__default["default"].div `
|
|
2699
2492
|
width: ${({ width }) => width || '100%'};
|
|
2700
2493
|
padding: 4px;
|
|
2701
|
-
${utils
|
|
2494
|
+
${utils.MediaQueries.mbDown} {
|
|
2702
2495
|
width: 100%;
|
|
2703
2496
|
}
|
|
2704
2497
|
`;
|
|
@@ -2753,30 +2546,30 @@ const Container$i = ({ intent, }) => {
|
|
|
2753
2546
|
Container$i.displayName = 'SubotInlineIntentUrl';
|
|
2754
2547
|
|
|
2755
2548
|
const SubotInlineIntentBaseTarget = {
|
|
2756
|
-
[index$
|
|
2757
|
-
[index$
|
|
2758
|
-
[index$
|
|
2759
|
-
[index$
|
|
2549
|
+
[index$2.NodeIntentType.BOT_TEXT]: Container$k,
|
|
2550
|
+
[index$2.NodeIntentType.BOT_IMAGE]: Container$q,
|
|
2551
|
+
[index$2.NodeIntentType.BOT_BUTTON]: Container$r,
|
|
2552
|
+
[index$2.NodeIntentType.BOT_URL]: Container$i,
|
|
2760
2553
|
// In the revamp UI, recalculate as a normal button
|
|
2761
|
-
[index$
|
|
2762
|
-
[index$
|
|
2554
|
+
[index$2.NodeIntentType.BOT_RECALCULATE]: Container$r,
|
|
2555
|
+
[index$2.NodeIntentType.BOT_MAIN_TITLE]: Container$p,
|
|
2763
2556
|
// [NodeIntentType.BOT_MAIN_IMAGE]: SubotInlineIntentBotMainImage,
|
|
2764
|
-
[index$
|
|
2765
|
-
[index$
|
|
2766
|
-
[index$
|
|
2767
|
-
[index$
|
|
2557
|
+
[index$2.NodeIntentType.BOT_MAIN_BODY]: Container$k,
|
|
2558
|
+
[index$2.NodeIntentType.BOT_MAIN_BUTTON]: Container$r,
|
|
2559
|
+
[index$2.NodeIntentType.BOT_SUB_TITLE]: Container$k,
|
|
2560
|
+
[index$2.NodeIntentType.BOT_SUB_BODY]: Container$k,
|
|
2768
2561
|
// [NodeIntentType.BOT_LANDING_PAGE_URL]: SubotInlineIntentBotText,
|
|
2769
2562
|
// [NodeIntentType.BOT_LANDING_PAGE_BUTTON]: SubotInlineIntentBotText,
|
|
2770
2563
|
// [NodeIntentType.BOT_RISK_SCREEN]: SubotInlineIntentBotRiskScreener,
|
|
2771
|
-
[index$
|
|
2772
|
-
[index$
|
|
2773
|
-
[index$
|
|
2774
|
-
[index$
|
|
2775
|
-
[index$
|
|
2776
|
-
[index$
|
|
2777
|
-
[index$
|
|
2564
|
+
[index$2.NodeIntentType.BOT_RELATED_ARTICLE]: Container$n,
|
|
2565
|
+
[index$2.NodeIntentType.THANK_YOU_IMAGE]: Container$q,
|
|
2566
|
+
[index$2.NodeIntentType.THANK_YOU_TITLE]: Container$k,
|
|
2567
|
+
[index$2.NodeIntentType.THANK_YOU_BODY]: Container$k,
|
|
2568
|
+
[index$2.NodeIntentType.BOT_SUGGESTED_SERVICE]: Container$l,
|
|
2569
|
+
[index$2.NodeIntentType.BOT_BOOKING]: Container$r,
|
|
2570
|
+
[index$2.NodeIntentType.BOT_EVENT_SUBMISSION]: Container$o,
|
|
2778
2571
|
/** intents fake for sso block */
|
|
2779
|
-
[index$
|
|
2572
|
+
[index$2.NodeIntentType.SSO_INTENT]: Container$j,
|
|
2780
2573
|
};
|
|
2781
2574
|
const SubotInlineIntentBase = new Proxy(SubotInlineIntentBaseTarget, {
|
|
2782
2575
|
get(_, prop) {
|
|
@@ -2792,8 +2585,8 @@ const SubotInlineIntentBase = new Proxy(SubotInlineIntentBaseTarget, {
|
|
|
2792
2585
|
});
|
|
2793
2586
|
|
|
2794
2587
|
const excludeIntents = [
|
|
2795
|
-
index$
|
|
2796
|
-
index$
|
|
2588
|
+
index$2.NodeIntentType.BOT_SUBMISSION,
|
|
2589
|
+
index$2.NodeIntentType.BOT_BACKGROUND_IMAGE,
|
|
2797
2590
|
];
|
|
2798
2591
|
const Container$h = ({ intents: intentsProp, indexNumber, }) => {
|
|
2799
2592
|
const filteredIntents = intentsProp.filter((intent) => !excludeIntents.includes(intent.type || ''));
|
|
@@ -2900,7 +2693,7 @@ styled__default["default"].div `
|
|
|
2900
2693
|
border: 1px solid #ffecb6;
|
|
2901
2694
|
border-radius: 16px;
|
|
2902
2695
|
|
|
2903
|
-
${utils
|
|
2696
|
+
${utils.MediaQueries.mbUp} {
|
|
2904
2697
|
padding: 0 0 24px 0;
|
|
2905
2698
|
}
|
|
2906
2699
|
|
|
@@ -2972,12 +2765,12 @@ const StyledSubInlineIntent = styled__default["default"].div `
|
|
|
2972
2765
|
+ div {
|
|
2973
2766
|
margin-top: 16px;
|
|
2974
2767
|
|
|
2975
|
-
${utils
|
|
2768
|
+
${utils.MediaQueries.mbUp} {
|
|
2976
2769
|
margin-top: 24px;
|
|
2977
2770
|
}
|
|
2978
2771
|
}
|
|
2979
2772
|
|
|
2980
|
-
${utils
|
|
2773
|
+
${utils.MediaQueries.mbUp} {
|
|
2981
2774
|
font-size: 18px;
|
|
2982
2775
|
}
|
|
2983
2776
|
} */
|
|
@@ -3013,7 +2806,7 @@ const Container$f = ({ node }) => {
|
|
|
3013
2806
|
var _a;
|
|
3014
2807
|
// const isMobile = useGetIsMobile(true)
|
|
3015
2808
|
const refMainIntents = React.useRef(null);
|
|
3016
|
-
const { formatMessage: f } = React.useContext(
|
|
2809
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
3017
2810
|
const { setIsShowFooter, listNodes } = React.useContext(SubotInlineContext);
|
|
3018
2811
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
|
3019
2812
|
React.useEffect(() => {
|
|
@@ -3047,41 +2840,41 @@ const Container$f = ({ node }) => {
|
|
|
3047
2840
|
let botSubmissionIntent = undefined;
|
|
3048
2841
|
intentsProps.forEach((intent) => {
|
|
3049
2842
|
switch (intent === null || intent === void 0 ? void 0 : intent.type) {
|
|
3050
|
-
case index$
|
|
2843
|
+
case index$2.NodeIntentType.BOT_MAIN_IMAGE:
|
|
3051
2844
|
mainIntents.push(intent);
|
|
3052
2845
|
break;
|
|
3053
|
-
case index$
|
|
2846
|
+
case index$2.NodeIntentType.BOT_MAIN_TITLE:
|
|
3054
2847
|
mainIntents.push(intent);
|
|
3055
2848
|
break;
|
|
3056
|
-
case index$
|
|
2849
|
+
case index$2.NodeIntentType.BOT_MAIN_BODY:
|
|
3057
2850
|
mainIntents.push(intent);
|
|
3058
2851
|
break;
|
|
3059
|
-
case index$
|
|
2852
|
+
case index$2.NodeIntentType.BOT_SUGGESTED_SERVICE:
|
|
3060
2853
|
suggestedServiceIntents.push(intent);
|
|
3061
2854
|
break;
|
|
3062
|
-
case index$
|
|
2855
|
+
case index$2.NodeIntentType.BOT_MAIN_BUTTON:
|
|
3063
2856
|
mainButtonIntents.push(intent);
|
|
3064
2857
|
break;
|
|
3065
|
-
case index$
|
|
2858
|
+
case index$2.NodeIntentType.BOT_BOOKING:
|
|
3066
2859
|
bookingButtonIntents.push(intent);
|
|
3067
2860
|
break;
|
|
3068
|
-
case index$
|
|
2861
|
+
case index$2.NodeIntentType.BOT_RECALCULATE:
|
|
3069
2862
|
// mainIntents.push(intent)
|
|
3070
2863
|
// TODO: Do not apply. Inline Revamp has "Start Over" btn already
|
|
3071
2864
|
break;
|
|
3072
|
-
case index$
|
|
2865
|
+
case index$2.NodeIntentType.BOT_SUB_TITLE:
|
|
3073
2866
|
subIntents.push(intent);
|
|
3074
2867
|
break;
|
|
3075
|
-
case index$
|
|
2868
|
+
case index$2.NodeIntentType.BOT_SUB_BODY:
|
|
3076
2869
|
subIntents.push(intent);
|
|
3077
2870
|
break;
|
|
3078
|
-
case index$
|
|
2871
|
+
case index$2.NodeIntentType.BOT_RELATED_ARTICLE:
|
|
3079
2872
|
relatedArticleIntents.push(intent);
|
|
3080
2873
|
break;
|
|
3081
|
-
case index$
|
|
2874
|
+
case index$2.NodeIntentType.BOT_RISK_SCREEN:
|
|
3082
2875
|
screenerIntents.push(intent);
|
|
3083
2876
|
break;
|
|
3084
|
-
case index$
|
|
2877
|
+
case index$2.NodeIntentType.BOT_SUBMISSION:
|
|
3085
2878
|
botSubmissionIntent = intent;
|
|
3086
2879
|
break;
|
|
3087
2880
|
}
|
|
@@ -3127,7 +2920,7 @@ const Container$f = ({ node }) => {
|
|
|
3127
2920
|
return NodeIntent && React__default["default"].createElement(NodeIntent, { key: intent.id, intent: intent });
|
|
3128
2921
|
}))),
|
|
3129
2922
|
(relatedArticleIntents === null || relatedArticleIntents === void 0 ? void 0 : relatedArticleIntents.length) > 0 && (React__default["default"].createElement("div", { style: { marginTop: 24 } },
|
|
3130
|
-
React__default["default"].createElement(index$
|
|
2923
|
+
React__default["default"].createElement(index$6.Text, { size: "lg", weight: "semiBold", color: "var(--subot-inline-text-color, #262626)" }, f({
|
|
3131
2924
|
id: 'articlePage.relatedPostsSectionTitle',
|
|
3132
2925
|
defaultMessage: 'Related Articles',
|
|
3133
2926
|
})),
|
|
@@ -3152,7 +2945,7 @@ const Container$e = ({ node }) => {
|
|
|
3152
2945
|
}, []);
|
|
3153
2946
|
const resultButton = React.useMemo(() => {
|
|
3154
2947
|
var _a;
|
|
3155
|
-
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$
|
|
2948
|
+
const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === index$2.NodeActionType.RESULT_BUTTON);
|
|
3156
2949
|
if (_resultButton)
|
|
3157
2950
|
return _resultButton;
|
|
3158
2951
|
return null;
|
|
@@ -3166,7 +2959,7 @@ const Container$e = ({ node }) => {
|
|
|
3166
2959
|
return (React__default["default"].createElement(StyledWrap$b, { id: "si-node-final-thank-you" },
|
|
3167
2960
|
React__default["default"].createElement(Container$h, { intents: node.intents || [] }),
|
|
3168
2961
|
resultButton && (React__default["default"].createElement("div", { className: "si-final-thank-action" },
|
|
3169
|
-
React__default["default"].createElement(index$
|
|
2962
|
+
React__default["default"].createElement(index$4.Button, { size: "md", onClick: handleOnNext }, resultButton.label)))));
|
|
3170
2963
|
};
|
|
3171
2964
|
Container$e.displayName = 'SubotinlineNodeFinal';
|
|
3172
2965
|
|
|
@@ -3376,7 +3169,7 @@ var schema = {
|
|
|
3376
3169
|
};
|
|
3377
3170
|
|
|
3378
3171
|
// const STORAGE_URL = 'https://storage.googleapis.com/hhg-common'
|
|
3379
|
-
const STORAGE_URL = getHelloSitesUrl(
|
|
3172
|
+
const STORAGE_URL = index$1.getHelloSitesUrl(defaultClassWrapper.locale); // To fix the Cors issue later
|
|
3380
3173
|
function getLevelKey(countryCode, level) {
|
|
3381
3174
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3382
3175
|
const _schema = schema;
|
|
@@ -3550,9 +3343,9 @@ const googleMapsApisPlaceDetailsTypes = {
|
|
|
3550
3343
|
};
|
|
3551
3344
|
const googleMapAddressKeys = Object.keys(googleMapsApisPlaceDetailsTypes).concat(['address']);
|
|
3552
3345
|
function GoogleAddressField({ action, formError, control, initValue, onChange, }) {
|
|
3553
|
-
const locale =
|
|
3346
|
+
const locale = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.locale;
|
|
3554
3347
|
const countryCode = locale.split('-')[1];
|
|
3555
|
-
const { formatMessage: f } = React.useContext(
|
|
3348
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
3556
3349
|
const [searchText, setSearchText] = React.useState('');
|
|
3557
3350
|
const div = React.useRef(null);
|
|
3558
3351
|
const rowRef = React.useRef(null);
|
|
@@ -3643,7 +3436,7 @@ function GoogleAddressField({ action, formError, control, initValue, onChange, }
|
|
|
3643
3436
|
}, render: (props) => {
|
|
3644
3437
|
const { address = '' } = (props.field.value || {});
|
|
3645
3438
|
console.log('props', props);
|
|
3646
|
-
return (React__default["default"].createElement(index$
|
|
3439
|
+
return (React__default["default"].createElement(index$4.Select, { data: options, icon: React__default["default"].createElement(Location, null), itemComponent: SelectItem,
|
|
3647
3440
|
// Always display the suggestions
|
|
3648
3441
|
filter: () => true, searchable: true, className: cn__default["default"]({
|
|
3649
3442
|
isEmpty: options.length === 0 ||
|
|
@@ -3712,7 +3505,7 @@ function GoogleAddressField({ action, formError, control, initValue, onChange, }
|
|
|
3712
3505
|
}
|
|
3713
3506
|
var GoogleAddressField$1 = React.memo(GoogleAddressField);
|
|
3714
3507
|
|
|
3715
|
-
const StyleDatePickerInput =
|
|
3508
|
+
const StyleDatePickerInput = defaultClassWrapper.setDefaultClass(styled__default["default"].div `
|
|
3716
3509
|
position: relative;
|
|
3717
3510
|
.input-date {
|
|
3718
3511
|
display: none;
|
|
@@ -3722,13 +3515,13 @@ const StyledUserInfoFormContainer = styled__default["default"].div `
|
|
|
3722
3515
|
margin: 0 auto;
|
|
3723
3516
|
background: #f7f9fc;
|
|
3724
3517
|
border-radius: ${theme.theme.borderRadius};
|
|
3725
|
-
${utils
|
|
3518
|
+
${utils.MediaQueries.mbDown} {
|
|
3726
3519
|
padding: 16px;
|
|
3727
3520
|
}
|
|
3728
|
-
${utils
|
|
3521
|
+
${utils.MediaQueries.tdDown} {
|
|
3729
3522
|
padding: 24px;
|
|
3730
3523
|
}
|
|
3731
|
-
${utils
|
|
3524
|
+
${utils.MediaQueries.mbUp} {
|
|
3732
3525
|
padding: 32px;
|
|
3733
3526
|
}
|
|
3734
3527
|
.user-info-form {
|
|
@@ -3744,13 +3537,13 @@ const StyledUserInfoFormContainer = styled__default["default"].div `
|
|
|
3744
3537
|
}
|
|
3745
3538
|
}
|
|
3746
3539
|
.input-row {
|
|
3747
|
-
${utils
|
|
3540
|
+
${utils.MediaQueries.mbDown} {
|
|
3748
3541
|
margin-bottom: 16px;
|
|
3749
3542
|
}
|
|
3750
|
-
${utils
|
|
3543
|
+
${utils.MediaQueries.tdDown} {
|
|
3751
3544
|
margin-bottom: 18px;
|
|
3752
3545
|
}
|
|
3753
|
-
${utils
|
|
3546
|
+
${utils.MediaQueries.mbUp} {
|
|
3754
3547
|
margin-bottom: 20px;
|
|
3755
3548
|
}
|
|
3756
3549
|
.address-dropdown > ul {
|
|
@@ -3941,13 +3734,13 @@ const StyledUserInfoFormContainer = styled__default["default"].div `
|
|
|
3941
3734
|
}
|
|
3942
3735
|
}
|
|
3943
3736
|
.submit-btn-row {
|
|
3944
|
-
${utils
|
|
3737
|
+
${utils.MediaQueries.mbUp} {
|
|
3945
3738
|
margin-bottom: 16px;
|
|
3946
3739
|
}
|
|
3947
|
-
${utils
|
|
3740
|
+
${utils.MediaQueries.tdDown} {
|
|
3948
3741
|
margin-bottom: 14px;
|
|
3949
3742
|
}
|
|
3950
|
-
${utils
|
|
3743
|
+
${utils.MediaQueries.mbDown} {
|
|
3951
3744
|
margin-bottom: 12px;
|
|
3952
3745
|
}
|
|
3953
3746
|
.subot-checkbox {
|
|
@@ -4090,7 +3883,7 @@ const StyleWrapperFullAddress = styled__default["default"].div `
|
|
|
4090
3883
|
gap: 16px;
|
|
4091
3884
|
justify-content: space-between;
|
|
4092
3885
|
|
|
4093
|
-
${utils
|
|
3886
|
+
${utils.MediaQueries.mbDown} {
|
|
4094
3887
|
flex-direction: column;
|
|
4095
3888
|
gap: 0;
|
|
4096
3889
|
}
|
|
@@ -4127,57 +3920,57 @@ const StyleWrapperFullAddress = styled__default["default"].div `
|
|
|
4127
3920
|
`;
|
|
4128
3921
|
|
|
4129
3922
|
const getActionEmail = (actions) => {
|
|
4130
|
-
return actions.find(({ type }) => type === index$
|
|
3923
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_EMAIL);
|
|
4131
3924
|
};
|
|
4132
3925
|
const getActionName = (actions) => {
|
|
4133
|
-
return actions.find(({ type }) => type === index$
|
|
3926
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_NAME);
|
|
4134
3927
|
};
|
|
4135
3928
|
const getActionPhone = (actions) => {
|
|
4136
|
-
return actions.find(({ type }) => type === index$
|
|
3929
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_PHONE);
|
|
4137
3930
|
};
|
|
4138
3931
|
const getActionOtp = (actions) => {
|
|
4139
|
-
return actions.find(({ type }) => type === index$
|
|
3932
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_OTP);
|
|
4140
3933
|
};
|
|
4141
3934
|
const getActionOtpWhatsApp = (actions) => {
|
|
4142
|
-
return actions.find(({ type }) => type === index$
|
|
3935
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4143
3936
|
};
|
|
4144
3937
|
const getActionConfirm = (actions) => {
|
|
4145
|
-
return actions.find(({ type }) => type === index$
|
|
3938
|
+
return actions.find(({ type }) => type === index$2.NodeActionType.USER_SUBMIT_CONFIRM);
|
|
4146
3939
|
};
|
|
4147
3940
|
const isControlOtp = (control) => {
|
|
4148
|
-
return (control === index$
|
|
4149
|
-
control === index$
|
|
3941
|
+
return (control === index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_OTP] ||
|
|
3942
|
+
control === index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_WHATSAPP]);
|
|
4150
3943
|
};
|
|
4151
3944
|
const isActionTypeOtp = (type) => {
|
|
4152
|
-
return (type === index$
|
|
4153
|
-
type === index$
|
|
3945
|
+
return (type === index$2.NodeActionType.USER_SUBMIT_OTP ||
|
|
3946
|
+
type === index$2.NodeActionType.USER_SUBMIT_WHATSAPP);
|
|
4154
3947
|
};
|
|
4155
3948
|
const getTranslateVerifiedOtpMessages = () => {
|
|
4156
3949
|
const phoneWasVerifiedMessage = new Map();
|
|
4157
|
-
phoneWasVerifiedMessage.set(index$
|
|
4158
|
-
phoneWasVerifiedMessage.set(index$
|
|
4159
|
-
phoneWasVerifiedMessage.set(index$
|
|
4160
|
-
phoneWasVerifiedMessage.set(index$
|
|
4161
|
-
phoneWasVerifiedMessage.set(index$
|
|
4162
|
-
phoneWasVerifiedMessage.set(index$
|
|
4163
|
-
phoneWasVerifiedMessage.set(index$
|
|
4164
|
-
phoneWasVerifiedMessage.set(index$
|
|
4165
|
-
phoneWasVerifiedMessage.set(index$
|
|
4166
|
-
phoneWasVerifiedMessage.set(index$
|
|
3950
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Vietnam, 'Số điện thoại này đã được xác minh.');
|
|
3951
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.PhilippinesEnglish, 'This phone number has been verified.');
|
|
3952
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Cambodia, 'លេខទូរស័ព្ទនេះត្រូវបានផ្ទៀងផ្ទាត់។');
|
|
3953
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.India, 'इस फ़ोन नंबर की पुष्टि कर दी गई है.');
|
|
3954
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Indonesia, 'Nomor telepon ini telah diverifikasi.');
|
|
3955
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Malaysia, 'Nombor telefon ini telah disahkan.');
|
|
3956
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Myanmar, 'ဤဖုန်းနံပါတ်ကို စစ်ဆေးပြီးပါပြီ။');
|
|
3957
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Taiwan, '該電話號碼已經過驗證。');
|
|
3958
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.Thailand, 'หมายเลขโทรศัพท์นี้ได้รับการตรวจสอบแล้ว');
|
|
3959
|
+
phoneWasVerifiedMessage.set(index$2.LOCALE.PhilippinesTagalog, 'Na-verify na ang numero ng teleponong ito.');
|
|
4167
3960
|
return phoneWasVerifiedMessage;
|
|
4168
3961
|
};
|
|
4169
3962
|
const getTransPleaseVerifiedOtp = () => {
|
|
4170
3963
|
const pleaseVerifiedOtp = new Map();
|
|
4171
|
-
pleaseVerifiedOtp.set(index$
|
|
4172
|
-
pleaseVerifiedOtp.set(index$
|
|
4173
|
-
pleaseVerifiedOtp.set(index$
|
|
4174
|
-
pleaseVerifiedOtp.set(index$
|
|
4175
|
-
pleaseVerifiedOtp.set(index$
|
|
4176
|
-
pleaseVerifiedOtp.set(index$
|
|
4177
|
-
pleaseVerifiedOtp.set(index$
|
|
4178
|
-
pleaseVerifiedOtp.set(index$
|
|
4179
|
-
pleaseVerifiedOtp.set(index$
|
|
4180
|
-
pleaseVerifiedOtp.set(index$
|
|
3964
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Vietnam, 'Vui lòng xác minh số điện thoại');
|
|
3965
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.PhilippinesEnglish, 'Please verify your phone number');
|
|
3966
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Cambodia, 'សូមផ្ទៀងផ្ទាត់លេខទូរស័ព្ទរបស់អ្នក។');
|
|
3967
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.India, 'कृपया अपना फ़ोन नंबर सत्यापित करें');
|
|
3968
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Indonesia, 'Harap verifikasi nomor telepon AndaNomor telepon ini telah diverifikasi.');
|
|
3969
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Malaysia, 'Sila sahkan nombor telefon anda');
|
|
3970
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Myanmar, 'သင့်ဖုန်းနံပါတ်ကို အတည်ပြုပါ။');
|
|
3971
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Taiwan, '請驗證您的電話號碼');
|
|
3972
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.Thailand, 'กรุณาตรวจสอบหมายเลขโทรศัพท์ของคุณ');
|
|
3973
|
+
pleaseVerifiedOtp.set(index$2.LOCALE.PhilippinesTagalog, 'Paki-verify ang iyong numero ng telepono');
|
|
4181
3974
|
return pleaseVerifiedOtp;
|
|
4182
3975
|
};
|
|
4183
3976
|
|
|
@@ -4197,13 +3990,13 @@ const InfoError = (props) => {
|
|
|
4197
3990
|
};
|
|
4198
3991
|
|
|
4199
3992
|
const CountDown = ({ onFinish, onClick, isFinished, resendLabel, className }, ref) => {
|
|
4200
|
-
const [count, setCount] = React.useState(TIME_RESET_RESEND_OTP);
|
|
3993
|
+
const [count, setCount] = React.useState(index$1.TIME_RESET_RESEND_OTP);
|
|
4201
3994
|
const intervalId = React.useRef();
|
|
4202
3995
|
const onFinishLatest = React.useRef();
|
|
4203
|
-
const { formatMessage: f } = React.useContext(
|
|
3996
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
4204
3997
|
onFinishLatest.current = onFinish;
|
|
4205
3998
|
const resetCountDown = React.useCallback(() => {
|
|
4206
|
-
let currentCount = TIME_RESET_RESEND_OTP;
|
|
3999
|
+
let currentCount = index$1.TIME_RESET_RESEND_OTP;
|
|
4207
4000
|
setCount(currentCount);
|
|
4208
4001
|
clearInterval(intervalId.current);
|
|
4209
4002
|
intervalId.current = setInterval(() => {
|
|
@@ -4246,24 +4039,24 @@ styled__default["default"].div `
|
|
|
4246
4039
|
margin: 0 auto;
|
|
4247
4040
|
background: #f7f9fc;
|
|
4248
4041
|
border-radius: ${theme.theme.borderRadius};
|
|
4249
|
-
${utils
|
|
4042
|
+
${utils.MediaQueries.mbDown} {
|
|
4250
4043
|
padding: 16px;
|
|
4251
4044
|
}
|
|
4252
|
-
${utils
|
|
4045
|
+
${utils.MediaQueries.tdDown} {
|
|
4253
4046
|
padding: 24px;
|
|
4254
4047
|
}
|
|
4255
|
-
${utils
|
|
4048
|
+
${utils.MediaQueries.mbUp} {
|
|
4256
4049
|
padding: 32px;
|
|
4257
4050
|
}
|
|
4258
4051
|
.user-info-form {
|
|
4259
4052
|
.input-row {
|
|
4260
|
-
${utils
|
|
4053
|
+
${utils.MediaQueries.mbDown} {
|
|
4261
4054
|
margin-bottom: 16px;
|
|
4262
4055
|
}
|
|
4263
|
-
${utils
|
|
4056
|
+
${utils.MediaQueries.tdDown} {
|
|
4264
4057
|
margin-bottom: 18px;
|
|
4265
4058
|
}
|
|
4266
|
-
${utils
|
|
4059
|
+
${utils.MediaQueries.mbUp} {
|
|
4267
4060
|
margin-bottom: 20px;
|
|
4268
4061
|
}
|
|
4269
4062
|
.address-dropdown > ul {
|
|
@@ -4336,13 +4129,13 @@ styled__default["default"].div `
|
|
|
4336
4129
|
}
|
|
4337
4130
|
}
|
|
4338
4131
|
.submit-btn-row {
|
|
4339
|
-
${utils
|
|
4132
|
+
${utils.MediaQueries.mbUp} {
|
|
4340
4133
|
margin-bottom: 16px;
|
|
4341
4134
|
}
|
|
4342
|
-
${utils
|
|
4135
|
+
${utils.MediaQueries.tdDown} {
|
|
4343
4136
|
margin-bottom: 14px;
|
|
4344
4137
|
}
|
|
4345
|
-
${utils
|
|
4138
|
+
${utils.MediaQueries.mbDown} {
|
|
4346
4139
|
margin-bottom: 12px;
|
|
4347
4140
|
}
|
|
4348
4141
|
.subot-checkbox {
|
|
@@ -4541,10 +4334,10 @@ const PhoneInputWithCode = (props) => {
|
|
|
4541
4334
|
|
|
4542
4335
|
const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSubmitMeta, isFormRevamp, botId, nodeId, trackingSubmitBtn, }) => {
|
|
4543
4336
|
const countRef = React.useRef();
|
|
4544
|
-
const userInfo =
|
|
4545
|
-
const locale =
|
|
4337
|
+
const userInfo = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.userInfo;
|
|
4338
|
+
const locale = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.locale;
|
|
4546
4339
|
const currentUrl = useCurrentUrl();
|
|
4547
|
-
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(
|
|
4340
|
+
const { formatMessage: f, action: { pushNotifications }, } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
4548
4341
|
const addressData = useAddressMultipleLevelData(countryCode);
|
|
4549
4342
|
// Level 1
|
|
4550
4343
|
const provinceData = React.useMemo(() => {
|
|
@@ -4573,7 +4366,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4573
4366
|
const hasOtpField = Boolean(actionPhoneOtp || actionOtpWhatsApp);
|
|
4574
4367
|
const defaultFormValues = React.useMemo(() => {
|
|
4575
4368
|
const data = {};
|
|
4576
|
-
const userData = getUserInfoFromCookie();
|
|
4369
|
+
const userData = index$1.getUserInfoFromCookie();
|
|
4577
4370
|
/** Auto fill email from user profile */
|
|
4578
4371
|
if ((actionEmail === null || actionEmail === void 0 ? void 0 : actionEmail.key) && userData.email) {
|
|
4579
4372
|
data[actionEmail.key] = userData.email;
|
|
@@ -4637,30 +4430,30 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4637
4430
|
}, [botId, nodeId, JSON.stringify(trackingSubmitBtn)]);
|
|
4638
4431
|
const firstActionAddressIndex = React.useMemo(() => {
|
|
4639
4432
|
return actions.findIndex((action) => {
|
|
4640
|
-
return index$
|
|
4433
|
+
return index$2.FULL_KEY_ADDRESS.includes(action.type);
|
|
4641
4434
|
});
|
|
4642
4435
|
}, [actions]);
|
|
4643
4436
|
const actionAddress = React.useMemo(() => {
|
|
4644
4437
|
return actions.find((action) => {
|
|
4645
|
-
return index$
|
|
4438
|
+
return index$2.NodeActionType.USER_SUBMIT_ADDRESS === action.type;
|
|
4646
4439
|
});
|
|
4647
4440
|
}, [actions]);
|
|
4648
4441
|
const actionAddressLever1 = React.useMemo(() => {
|
|
4649
4442
|
return actions.find((action) => {
|
|
4650
|
-
return index$
|
|
4443
|
+
return index$2.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE === action.type;
|
|
4651
4444
|
});
|
|
4652
4445
|
}, [actions]);
|
|
4653
4446
|
const actionAddressLever2 = React.useMemo(() => {
|
|
4654
4447
|
return actions.find((action) => {
|
|
4655
|
-
return index$
|
|
4448
|
+
return index$2.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT === action.type;
|
|
4656
4449
|
});
|
|
4657
4450
|
}, [actions]);
|
|
4658
4451
|
const actionAddressLever3 = React.useMemo(() => {
|
|
4659
4452
|
return actions.find((action) => {
|
|
4660
|
-
return index$
|
|
4453
|
+
return index$2.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE === action.type;
|
|
4661
4454
|
});
|
|
4662
4455
|
}, [actions]);
|
|
4663
|
-
const inputType = index$
|
|
4456
|
+
const inputType = index$2.ELEMENT_CONTROL_INPUT_TYPE;
|
|
4664
4457
|
const { register, handleSubmit, watch, formState: { errors }, control, setValue, setError, clearErrors, getValues, trigger, } = reactHookForm.useForm({ defaultValues: defaultFormValues });
|
|
4665
4458
|
const setSubmitData = (data) => {
|
|
4666
4459
|
const submitMeta = [];
|
|
@@ -4668,9 +4461,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4668
4461
|
if (!action.key) {
|
|
4669
4462
|
continue;
|
|
4670
4463
|
}
|
|
4671
|
-
if (action.type !== index$
|
|
4672
|
-
action.type !== index$
|
|
4673
|
-
if (action.type === index$
|
|
4464
|
+
if (action.type !== index$2.NodeActionType.USER_SUBMIT_CONFIRM &&
|
|
4465
|
+
action.type !== index$2.NodeActionType.USER_SUBMIT_TERMS) {
|
|
4466
|
+
if (action.type === index$2.NodeActionType.USER_SUBMIT_GOOGLE_API_ADDRESS) {
|
|
4674
4467
|
/** If it's google api address, admin cannot add address province/district/commune and address freetext */
|
|
4675
4468
|
const googleMapData = data[action.key];
|
|
4676
4469
|
googleMapAddressKeys.forEach((addressKey) => {
|
|
@@ -4683,9 +4476,9 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4683
4476
|
}
|
|
4684
4477
|
});
|
|
4685
4478
|
}
|
|
4686
|
-
else if (action.type === index$
|
|
4687
|
-
action.type === index$
|
|
4688
|
-
action.type === index$
|
|
4479
|
+
else if (action.type === index$2.NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE ||
|
|
4480
|
+
action.type === index$2.NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT ||
|
|
4481
|
+
action.type === index$2.NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE) {
|
|
4689
4482
|
submitMeta.push({
|
|
4690
4483
|
key: action.key,
|
|
4691
4484
|
control: inputType[action.type] || '',
|
|
@@ -4696,7 +4489,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4696
4489
|
else if (isActionTypeOtp(action.type)) {
|
|
4697
4490
|
submitMeta.push({
|
|
4698
4491
|
key: action.key,
|
|
4699
|
-
control: index$
|
|
4492
|
+
control: index$2.ELEMENT_CONTROL_INPUT_TYPE[index$2.NodeActionType.USER_SUBMIT_OTP],
|
|
4700
4493
|
value: data.otpPhoneNumber,
|
|
4701
4494
|
});
|
|
4702
4495
|
}
|
|
@@ -4722,7 +4515,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4722
4515
|
}
|
|
4723
4516
|
}
|
|
4724
4517
|
}
|
|
4725
|
-
const actionArr = actions.filter((action) => action.type === index$
|
|
4518
|
+
const actionArr = actions.filter((action) => action.type === index$2.NodeActionType.USER_SUBMIT_SEND);
|
|
4726
4519
|
const submitData = {
|
|
4727
4520
|
action_id: actionArr[0].id,
|
|
4728
4521
|
action_value: actionArr[0].key,
|
|
@@ -4774,7 +4567,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4774
4567
|
}
|
|
4775
4568
|
setIsLoading(true);
|
|
4776
4569
|
try {
|
|
4777
|
-
const result = yield
|
|
4570
|
+
const result = yield defaultClassWrapper.callApi(getSubotApiPath(actionOtpWhatsApp
|
|
4778
4571
|
? PATHS$1.POST_SEND_OTP_WHATSAPP
|
|
4779
4572
|
: PATHS$1.POST_SEND_OTP), 'POST', {
|
|
4780
4573
|
data: actionOtpWhatsApp
|
|
@@ -4809,7 +4602,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4809
4602
|
const messages = getTranslateVerifiedOtpMessages();
|
|
4810
4603
|
pushNotifications({
|
|
4811
4604
|
title: '',
|
|
4812
|
-
message: messages.get(locale) || messages.get(index$
|
|
4605
|
+
message: messages.get(locale) || messages.get(index$2.LOCALE.PhilippinesEnglish),
|
|
4813
4606
|
type: 'success',
|
|
4814
4607
|
});
|
|
4815
4608
|
clearErrors(((_c = getActionOtp(actions)) === null || _c === void 0 ? void 0 : _c.key) || ((_d = getActionOtpWhatsApp(actions)) === null || _d === void 0 ? void 0 : _d.key));
|
|
@@ -4852,7 +4645,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4852
4645
|
const parsedPhone = PhoneInputBase.parsePhoneNumber(data.otpPhoneNumber);
|
|
4853
4646
|
if (action.key && parsedPhone) {
|
|
4854
4647
|
try {
|
|
4855
|
-
const result = yield
|
|
4648
|
+
const result = yield defaultClassWrapper.callApi(getSubotApiPath(actionOtpWhatsApp
|
|
4856
4649
|
? PATHS$1.POST_VERIFY_OTP_WHATSAPP
|
|
4857
4650
|
: PATHS$1.POST_VERIFY_OTP), 'POST', {
|
|
4858
4651
|
data: actionOtpWhatsApp
|
|
@@ -4914,7 +4707,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4914
4707
|
required: true,
|
|
4915
4708
|
}, render: (props) => {
|
|
4916
4709
|
var _a;
|
|
4917
|
-
return (React__default["default"].createElement(index$
|
|
4710
|
+
return (React__default["default"].createElement(index$9.Dropdown, { id: actionAddressLever1.id, options: provinceData, onChange: (val) => {
|
|
4918
4711
|
props.field.onChange(val);
|
|
4919
4712
|
handleSelectedProvince(val);
|
|
4920
4713
|
}, 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'}` }));
|
|
@@ -4930,7 +4723,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4930
4723
|
required: true,
|
|
4931
4724
|
}, render: (props) => {
|
|
4932
4725
|
var _a;
|
|
4933
|
-
return (React__default["default"].createElement(index$
|
|
4726
|
+
return (React__default["default"].createElement(index$9.Dropdown, { id: actionAddressLever2.id, options: districtData, onChange: (val) => {
|
|
4934
4727
|
props.field.onChange(val);
|
|
4935
4728
|
handleSelectedDistrict(val);
|
|
4936
4729
|
}, 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'}` }));
|
|
@@ -4946,7 +4739,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4946
4739
|
required: true,
|
|
4947
4740
|
}, render: (props) => {
|
|
4948
4741
|
var _a;
|
|
4949
|
-
return (React__default["default"].createElement(index$
|
|
4742
|
+
return (React__default["default"].createElement(index$9.Dropdown, { id: actionAddressLever3.id, options: communeData, onChange: (val) => {
|
|
4950
4743
|
props.field.onChange(val);
|
|
4951
4744
|
}, 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'}` }));
|
|
4952
4745
|
} })),
|
|
@@ -4964,20 +4757,20 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4964
4757
|
return renderFullAddressInput();
|
|
4965
4758
|
}
|
|
4966
4759
|
switch (action.type) {
|
|
4967
|
-
case index$
|
|
4760
|
+
case index$2.NodeActionType.USER_SUBMIT_DROPDOWN:
|
|
4968
4761
|
const options = action.url ? action.url.split('\n') : [];
|
|
4969
4762
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
4970
4763
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
4971
4764
|
React__default["default"].createElement(reactHookForm.Controller, { key: action.key, control: control, name: action.key, rules: {
|
|
4972
4765
|
required: true,
|
|
4973
4766
|
}, render: ({ field }) => {
|
|
4974
|
-
return (React__default["default"].createElement(index$
|
|
4767
|
+
return (React__default["default"].createElement(index$4.Select, Object.assign({ searchable: true, data: options, placeholder: action.label }, field, { withinPortal: true, zIndex: 1000 })));
|
|
4975
4768
|
} }),
|
|
4976
4769
|
errors[action.key] && (React__default["default"].createElement("p", { className: "error-message" }, f({
|
|
4977
4770
|
id: 'validation.error.requiredField',
|
|
4978
4771
|
defaultMessage: 'This field is required',
|
|
4979
4772
|
})))));
|
|
4980
|
-
case index$
|
|
4773
|
+
case index$2.NodeActionType.USER_SUBMIT_EMAIL:
|
|
4981
4774
|
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,}))$/;
|
|
4982
4775
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
4983
4776
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
@@ -4994,7 +4787,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
4994
4787
|
id: 'validation.error.validEmail',
|
|
4995
4788
|
defaultMessage: 'Please enter a valid email address.',
|
|
4996
4789
|
})))));
|
|
4997
|
-
case index$
|
|
4790
|
+
case index$2.NodeActionType.USER_SUBMIT_NAME:
|
|
4998
4791
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
4999
4792
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5000
4793
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5002,7 +4795,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5002
4795
|
id: 'validation.error.requiredField',
|
|
5003
4796
|
defaultMessage: 'This field is required',
|
|
5004
4797
|
})))));
|
|
5005
|
-
case index$
|
|
4798
|
+
case index$2.NodeActionType.USER_SUBMIT_PHONE:
|
|
5006
4799
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5007
4800
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5008
4801
|
React__default["default"].createElement(reactHookForm.Controller, { name: action.key, control: control, rules: {
|
|
@@ -5013,7 +4806,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5013
4806
|
id: 'validation.error.validNumber',
|
|
5014
4807
|
defaultMessage: 'Please enter a valid number.',
|
|
5015
4808
|
})))));
|
|
5016
|
-
case index$
|
|
4809
|
+
case index$2.NodeActionType.USER_SUBMIT_NUMBER:
|
|
5017
4810
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5018
4811
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5019
4812
|
React__default["default"].createElement("input", Object.assign({ type: "number", id: action.id }, register(action.key, { required: true }))),
|
|
@@ -5021,12 +4814,12 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5021
4814
|
id: 'validation.error.requiredField',
|
|
5022
4815
|
defaultMessage: 'This field is required',
|
|
5023
4816
|
})))));
|
|
5024
|
-
case index$
|
|
4817
|
+
case index$2.NodeActionType.USER_SUBMIT_DATE:
|
|
5025
4818
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5026
4819
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5027
4820
|
React__default["default"].createElement(StyleDatePickerInput, null,
|
|
5028
|
-
React__default["default"].createElement(index$
|
|
5029
|
-
const dateString = dayjs__default["default"](_value).format(index$
|
|
4821
|
+
React__default["default"].createElement(index$8.DatePicker, { locale: locale || 'en-PH', displayDateFormat: index$3.DATE_FNS_DATE_FORMAT, onChange: (_value) => {
|
|
4822
|
+
const dateString = dayjs__default["default"](_value).format(index$3.API_DATE_FORMAT);
|
|
5030
4823
|
setValue(action.key, dateString);
|
|
5031
4824
|
trigger(action.key);
|
|
5032
4825
|
} }),
|
|
@@ -5035,7 +4828,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5035
4828
|
id: 'validation.error.requiredField',
|
|
5036
4829
|
defaultMessage: 'This field is required',
|
|
5037
4830
|
})))));
|
|
5038
|
-
case index$
|
|
4831
|
+
case index$2.NodeActionType.USER_SUBMIT_BMI:
|
|
5039
4832
|
return (React__default["default"].createElement("div", { key: action.id },
|
|
5040
4833
|
React__default["default"].createElement("div", { className: "input-row", key: `${action.id}-weight` },
|
|
5041
4834
|
React__default["default"].createElement("label", { htmlFor: `${action.key}-weight` }, f({ id: 'home.bmi.input.weight', defaultMessage: 'Weight' })),
|
|
@@ -5051,7 +4844,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5051
4844
|
id: 'validation.error.requiredField',
|
|
5052
4845
|
defaultMessage: 'This field is required',
|
|
5053
4846
|
}))))));
|
|
5054
|
-
case index$
|
|
4847
|
+
case index$2.NodeActionType.USER_SUBMIT_GENDER:
|
|
5055
4848
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5056
4849
|
React__default["default"].createElement("label", null, action.label),
|
|
5057
4850
|
React__default["default"].createElement("div", { className: "radio-group" },
|
|
@@ -5087,7 +4880,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5087
4880
|
defaultMessage: 'This field is required',
|
|
5088
4881
|
})))));
|
|
5089
4882
|
// case NodeActionType.USER_SUBMIT_ADDRESS:
|
|
5090
|
-
case index$
|
|
4883
|
+
case index$2.NodeActionType.USER_SUBMIT_TEXT:
|
|
5091
4884
|
return (React__default["default"].createElement("div", { className: "input-row", key: action.id },
|
|
5092
4885
|
React__default["default"].createElement("label", { htmlFor: action.key }, action.label),
|
|
5093
4886
|
React__default["default"].createElement("input", Object.assign({ id: action.id, placeholder: action.label }, register(action.key, { required: true }))),
|
|
@@ -5095,8 +4888,8 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5095
4888
|
id: 'validation.error.requiredField',
|
|
5096
4889
|
defaultMessage: 'This field is required',
|
|
5097
4890
|
})))));
|
|
5098
|
-
case index$
|
|
5099
|
-
case index$
|
|
4891
|
+
case index$2.NodeActionType.USER_SUBMIT_OTP:
|
|
4892
|
+
case index$2.NodeActionType.USER_SUBMIT_WHATSAPP:
|
|
5100
4893
|
return (React__default["default"].createElement("div", null,
|
|
5101
4894
|
React__default["default"].createElement("div", { className: "input-row input-row--otp" },
|
|
5102
4895
|
React__default["default"].createElement("label", { htmlFor: "otpPhoneNumber" }, action.label),
|
|
@@ -5126,7 +4919,7 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5126
4919
|
id: 'validation.error.validNumber',
|
|
5127
4920
|
defaultMessage: 'Please enter a valid number.',
|
|
5128
4921
|
})))),
|
|
5129
|
-
verifiedOTP ? ('') : (React__default["default"].createElement(index$
|
|
4922
|
+
verifiedOTP ? ('') : (React__default["default"].createElement(index$4.Button, Object.assign({ size: "sm", loading: isLoading, disabled: (!isFinishedCountDown && sentOTP) ||
|
|
5130
4923
|
isLoading ||
|
|
5131
4924
|
!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({
|
|
5132
4925
|
id: 'subot.sendOTP.button',
|
|
@@ -5152,11 +4945,11 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5152
4945
|
React__default["default"].createElement("span", { className: "verify-success-label" }, f({
|
|
5153
4946
|
id: 'subot.verifyOTP.success.message',
|
|
5154
4947
|
defaultMessage: 'Verified successful',
|
|
5155
|
-
})))) : (React__default["default"].createElement(index$
|
|
4948
|
+
})))) : (React__default["default"].createElement(index$7.Button, Object.assign({ className: "submit-btn", size: isFormRevamp ? 'md' : 'lg', isLoading: isLoadingVerify, isDisabled: !sentOTP, onClick: (e) => handleVerifyOTP(e, action) }, trackingVerifyOTP), f({
|
|
5156
4949
|
id: 'subot.verifyOTP.button',
|
|
5157
4950
|
defaultMessage: 'Verify OTP',
|
|
5158
4951
|
})))))));
|
|
5159
|
-
case index$
|
|
4952
|
+
case index$2.NodeActionType.USER_SUBMIT_GOOGLE_API_ADDRESS:
|
|
5160
4953
|
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 }));
|
|
5161
4954
|
default:
|
|
5162
4955
|
return '';
|
|
@@ -5164,17 +4957,17 @@ const UserInfoForm = ({ className, style, actions, countryCode, callBack, formSu
|
|
|
5164
4957
|
};
|
|
5165
4958
|
const renderFormSubmitAndTerms = (action) => {
|
|
5166
4959
|
switch (action.type) {
|
|
5167
|
-
case index$
|
|
4960
|
+
case index$2.NodeActionType.USER_SUBMIT_CONFIRM:
|
|
5168
4961
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5169
4962
|
React__default["default"].createElement("label", { className: "subot-checkbox" },
|
|
5170
4963
|
React__default["default"].createElement("input", Object.assign({}, register('confirm'), { type: "checkbox", defaultChecked: true, className: "subot-checkbox__input" })),
|
|
5171
4964
|
React__default["default"].createElement("span", { className: "subot-checkbox__label" },
|
|
5172
4965
|
React__default["default"].createElement(Markdown, null, action.label)))));
|
|
5173
|
-
case index$
|
|
4966
|
+
case index$2.NodeActionType.USER_SUBMIT_SEND:
|
|
5174
4967
|
// const disabledWhenNotVerifyed = hasOtpField ? !verifiedOTP : false
|
|
5175
4968
|
return (React__default["default"].createElement("div", { className: "submit-btn-row", key: action.id },
|
|
5176
4969
|
React__default["default"].createElement("button", Object.assign({ id: action.id, className: "submit-btn", type: "submit", disabled: hasConfirm ? !confirm : false }, trackingSubmit, { "data-response-id": action.id }), action.label)));
|
|
5177
|
-
case index$
|
|
4970
|
+
case index$2.NodeActionType.USER_SUBMIT_TERMS:
|
|
5178
4971
|
return (React__default["default"].createElement("div", { className: "form-terms", key: action.id },
|
|
5179
4972
|
React__default["default"].createElement(Markdown, null, action.label)));
|
|
5180
4973
|
default:
|
|
@@ -5195,7 +4988,7 @@ const StyledWrap$a = styled__default["default"].div `
|
|
|
5195
4988
|
|
|
5196
4989
|
const Container$d = ({ node, indexNumber }) => {
|
|
5197
4990
|
var _a;
|
|
5198
|
-
const locale =
|
|
4991
|
+
const locale = defaultClassWrapper.GlobalData === null || defaultClassWrapper.GlobalData === void 0 ? void 0 : defaultClassWrapper.GlobalData.locale;
|
|
5199
4992
|
const { params, listNodes, activeId, onSubmit, setIsShowFooter } = React.useContext(SubotInlineContext);
|
|
5200
4993
|
React.useMemo(() => {
|
|
5201
4994
|
setIsShowFooter(true);
|
|
@@ -5236,7 +5029,7 @@ const StyledWrap$8 = styled__default["default"].div `
|
|
|
5236
5029
|
width: calc(50% - 8px);
|
|
5237
5030
|
}
|
|
5238
5031
|
|
|
5239
|
-
${utils
|
|
5032
|
+
${utils.MediaQueries.mbUp} {
|
|
5240
5033
|
gap: 32px;
|
|
5241
5034
|
padding: 0 16px;
|
|
5242
5035
|
|
|
@@ -5253,7 +5046,7 @@ const Checkbox = (props) => {
|
|
|
5253
5046
|
React__default["default"].createElement("path", { d: "M15.571 8 9.68 14 7 11.273", stroke: "#fff" })));
|
|
5254
5047
|
};
|
|
5255
5048
|
|
|
5256
|
-
const StyledRadioIcon =
|
|
5049
|
+
const StyledRadioIcon = defaultClassWrapper.setDefaultClass(styled__default["default"].div `
|
|
5257
5050
|
position: relative;
|
|
5258
5051
|
z-index: 1;
|
|
5259
5052
|
display: flex;
|
|
@@ -5385,7 +5178,7 @@ const Container$b = ({ action, onChange }) => {
|
|
|
5385
5178
|
const currentUrl = useCurrentUrl();
|
|
5386
5179
|
const { params, activeId } = React.useContext(SubotInlineContext);
|
|
5387
5180
|
return (React__default["default"].createElement(StyledWrap$6, null,
|
|
5388
|
-
React__default["default"].createElement(index$
|
|
5181
|
+
React__default["default"].createElement(index$4.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 },
|
|
5389
5182
|
React__default["default"].createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))));
|
|
5390
5183
|
};
|
|
5391
5184
|
Container$b.displayName = 'SubotInlineActionSSO';
|
|
@@ -5445,18 +5238,18 @@ const stylesButtonSubmitOther = {
|
|
|
5445
5238
|
|
|
5446
5239
|
const Container$a = ({ action, onChange, active, htmlType, formSubmitMeta, }) => {
|
|
5447
5240
|
const timeoutId = React.useRef(null);
|
|
5448
|
-
const { formatMessage: f } = React.useContext(
|
|
5241
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
5449
5242
|
const currentUrl = useCurrentUrl();
|
|
5450
5243
|
const inputRef = React.useRef(null);
|
|
5451
5244
|
const [otherText, setOtherText] = React.useState('');
|
|
5452
5245
|
const { params } = React.useContext(SubotInlineContext);
|
|
5453
|
-
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
5454
|
-
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$
|
|
5246
|
+
const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$2.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
|
|
5247
|
+
const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === index$2.NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
|
|
5455
5248
|
isActionPollWithOther;
|
|
5456
5249
|
const actionSubmitted = isActionPollWithOther
|
|
5457
5250
|
? {
|
|
5458
5251
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
5459
|
-
control: index$
|
|
5252
|
+
control: index$2.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
5460
5253
|
value: '',
|
|
5461
5254
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
5462
5255
|
}
|
|
@@ -5503,7 +5296,7 @@ const Container$a = ({ action, onChange, active, htmlType, formSubmitMeta, }) =>
|
|
|
5503
5296
|
React__default["default"].createElement("div", { className: "label" }, action === null || action === void 0 ? void 0 : action.label)),
|
|
5504
5297
|
isActionSelectWithOther && active && (React__default["default"].createElement(core.Box, { px: "2px", style: { textAlign: 'right' } },
|
|
5505
5298
|
React__default["default"].createElement(core.Textarea, { ref: inputRef, placeholder: action === null || action === void 0 ? void 0 : action.label, styles: stylesTextarea, value: otherText, onChange: onChangeTextArea, maxLength: 360 }),
|
|
5506
|
-
!isActionPollWithOther && (React__default["default"].createElement(index$
|
|
5299
|
+
!isActionPollWithOther && (React__default["default"].createElement(index$4.Button, { size: "sm", mt: "5px", styles: stylesButtonSubmitOther, disabled: !otherText, onClick: handleClickWithFormMeta }, f({
|
|
5507
5300
|
id: 'feedback.submit',
|
|
5508
5301
|
defaultMessage: 'Submit',
|
|
5509
5302
|
})))))));
|
|
@@ -5517,7 +5310,7 @@ const Container$9 = ({ action, onChange, active, htmlType, }) => {
|
|
|
5517
5310
|
if (action && onChange) {
|
|
5518
5311
|
onChange({
|
|
5519
5312
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
5520
|
-
control: index$
|
|
5313
|
+
control: index$2.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
5521
5314
|
value: '',
|
|
5522
5315
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
5523
5316
|
});
|
|
@@ -5533,7 +5326,7 @@ const Container$8 = ({ action, onChange, active, htmlType, }) => {
|
|
|
5533
5326
|
if (action && onChange) {
|
|
5534
5327
|
onChange({
|
|
5535
5328
|
key: action === null || action === void 0 ? void 0 : action.key,
|
|
5536
|
-
control: index$
|
|
5329
|
+
control: index$2.ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
|
|
5537
5330
|
value: '',
|
|
5538
5331
|
action_id: action === null || action === void 0 ? void 0 : action.id,
|
|
5539
5332
|
});
|
|
@@ -5545,14 +5338,14 @@ Container$8.displayName = 'SubotInlinePollChoiceImage';
|
|
|
5545
5338
|
|
|
5546
5339
|
const SubotInlineActionBaseTarget = {
|
|
5547
5340
|
// 'user-image': SubotInlineActionImageChoice,
|
|
5548
|
-
[index$
|
|
5549
|
-
[index$
|
|
5550
|
-
[index$
|
|
5551
|
-
[index$
|
|
5552
|
-
[index$
|
|
5553
|
-
[index$
|
|
5554
|
-
[index$
|
|
5555
|
-
[index$
|
|
5341
|
+
[index$2.NodeActionType.USER_CHOICE_TEXT]: Container$a,
|
|
5342
|
+
[index$2.NodeActionType.USER_CHOICE_TEXT_BY_INPUT]: Container$a,
|
|
5343
|
+
[index$2.NodeActionType.USER_CHOICE_IMAGE]: Container$c,
|
|
5344
|
+
[index$2.NodeActionType.ACTION_SSO_REDIRECT]: Container$b,
|
|
5345
|
+
[index$2.NodeActionType.POLL_CHOICE]: Container$9,
|
|
5346
|
+
[index$2.NodeActionType.POLL_CHOICE_TEXT_BY_INPUT]: Container$a,
|
|
5347
|
+
[index$2.NodeActionType.POLL_BUTTON]: () => null,
|
|
5348
|
+
[index$2.NodeActionType.POLL_CHOICE_IMAGE]: Container$8,
|
|
5556
5349
|
// [NodeActionType.RATING_STAR]: SubotInlineRatingStar,
|
|
5557
5350
|
// [NodeActionType.RATING_DESCRIPTION]: SubotInlineTextArea,
|
|
5558
5351
|
// [NodeActionType.LIKE_CHOICE]: SubotInlineLikeChoice,
|
|
@@ -5575,13 +5368,13 @@ const SubotInlineActionBase = new Proxy(SubotInlineActionBaseTarget, {
|
|
|
5575
5368
|
},
|
|
5576
5369
|
});
|
|
5577
5370
|
|
|
5578
|
-
const excludeActions = [index$
|
|
5371
|
+
const excludeActions = [index$2.NodeActionType.USER_CHOICE_NEXT];
|
|
5579
5372
|
const Container$7 = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
|
|
5580
|
-
const isPollChoiceImage = React.useMemo(() => !!(actions === null || actions === void 0 ? void 0 : actions.find((act) => act.type === index$
|
|
5373
|
+
const isPollChoiceImage = React.useMemo(() => !!(actions === null || actions === void 0 ? void 0 : actions.find((act) => act.type === index$2.NodeActionType.POLL_CHOICE_IMAGE)), [actions]);
|
|
5581
5374
|
const className = React.useMemo(() => {
|
|
5582
5375
|
switch (node_type) {
|
|
5583
|
-
case index$
|
|
5584
|
-
case index$
|
|
5376
|
+
case index$2.NodeType.IMAGE:
|
|
5377
|
+
case index$2.NodeType.REACTION:
|
|
5585
5378
|
return 'si-two-columns';
|
|
5586
5379
|
default:
|
|
5587
5380
|
return isPollChoiceImage ? 'si-two-columns' : '';
|
|
@@ -5655,7 +5448,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
5655
5448
|
}, []);
|
|
5656
5449
|
const submitButton = React.useMemo(() => {
|
|
5657
5450
|
var _a;
|
|
5658
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
5451
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$2.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
5659
5452
|
if (_submitButton)
|
|
5660
5453
|
return _submitButton;
|
|
5661
5454
|
return null;
|
|
@@ -5690,7 +5483,7 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
5690
5483
|
return;
|
|
5691
5484
|
}
|
|
5692
5485
|
});
|
|
5693
|
-
const actionsRemoveMultipleBtn = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter((a) => a.type !== index$
|
|
5486
|
+
const actionsRemoveMultipleBtn = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter((a) => a.type !== index$2.NodeActionType.ACTION_MULTIPLE_BUTTON);
|
|
5694
5487
|
return (React__default["default"].createElement(StyledWrap$3, { id: "si-node-text" },
|
|
5695
5488
|
React__default["default"].createElement(Container$h, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber }),
|
|
5696
5489
|
React__default["default"].createElement(Container$7, { value: activeActions, actions: actionsRemoveMultipleBtn, onChange: handleOnChange })));
|
|
@@ -5698,18 +5491,18 @@ const Container$5 = ({ node, indexNumber }) => {
|
|
|
5698
5491
|
Container$5.displayName = 'SubotInlineNodeMultipleContainer';
|
|
5699
5492
|
|
|
5700
5493
|
const useDescriptionPollNode = ({ node }) => {
|
|
5701
|
-
const { formatMessage: f } = React.useContext(
|
|
5494
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
5702
5495
|
let description = f({
|
|
5703
5496
|
id: 'multiSelectError.required',
|
|
5704
5497
|
defaultMessage: 'You must choose one options',
|
|
5705
5498
|
});
|
|
5706
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
5499
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$2.NodeMultipleOptions.UNLIMITED) {
|
|
5707
5500
|
description = f({
|
|
5708
5501
|
id: 'multiSelectError.unlimited',
|
|
5709
5502
|
defaultMessage: 'You must choose at least one options',
|
|
5710
5503
|
});
|
|
5711
5504
|
}
|
|
5712
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
5505
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$2.NodeMultipleOptions.RANGE) {
|
|
5713
5506
|
description = f({
|
|
5714
5507
|
id: 'multiSelectError.range',
|
|
5715
5508
|
defaultMessage: 'You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)',
|
|
@@ -5718,7 +5511,7 @@ const useDescriptionPollNode = ({ node }) => {
|
|
|
5718
5511
|
to: node.to,
|
|
5719
5512
|
});
|
|
5720
5513
|
}
|
|
5721
|
-
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$
|
|
5514
|
+
if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === index$2.NodeMultipleOptions.EXACT_NUMBER) {
|
|
5722
5515
|
description = f({
|
|
5723
5516
|
id: 'multiSelectError.exactNumber',
|
|
5724
5517
|
defaultMessage: 'You must choose {from} answers.',
|
|
@@ -5749,7 +5542,7 @@ const Container$4 = ({ node, indexNumber }) => {
|
|
|
5749
5542
|
}, []);
|
|
5750
5543
|
const submitButton = React.useMemo(() => {
|
|
5751
5544
|
var _a;
|
|
5752
|
-
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$
|
|
5545
|
+
const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == index$2.NodeActionType.POLL_BUTTON);
|
|
5753
5546
|
if (_submitButton)
|
|
5754
5547
|
return _submitButton;
|
|
5755
5548
|
return null;
|
|
@@ -5814,7 +5607,7 @@ Container$4.displayName = 'SubotinlineNodePoll';
|
|
|
5814
5607
|
const StyledWrap$1 = styled__default["default"].div ``;
|
|
5815
5608
|
|
|
5816
5609
|
const Container$3 = ({ node }) => {
|
|
5817
|
-
const { formatMessage: f } = React.useContext(
|
|
5610
|
+
const { formatMessage: f } = React.useContext(defaultClassWrapper.TogetherComponentGlobalContext);
|
|
5818
5611
|
const { params, setIsShowFooter, listNodes, activeId } = React.useContext(SubotInlineContext);
|
|
5819
5612
|
React.useMemo(() => {
|
|
5820
5613
|
setIsShowFooter(true);
|
|
@@ -5824,7 +5617,7 @@ const Container$3 = ({ node }) => {
|
|
|
5824
5617
|
const handleOnChange = (action) => {
|
|
5825
5618
|
if (params.bot_id &&
|
|
5826
5619
|
action &&
|
|
5827
|
-
action.type === index$
|
|
5620
|
+
action.type === index$2.NodeActionType.ACTION_SSO_REDIRECT) {
|
|
5828
5621
|
const currentState = {
|
|
5829
5622
|
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' }),
|
|
5830
5623
|
listNodes,
|
|
@@ -5838,13 +5631,13 @@ const Container$3 = ({ node }) => {
|
|
|
5838
5631
|
const returnUrlEncode = encodeURIComponent(returnUrl.includes('?')
|
|
5839
5632
|
? `${returnUrl}&=${extraQueryString}`
|
|
5840
5633
|
: `${returnUrl}?=${extraQueryString}`);
|
|
5841
|
-
window.location.href = `${index$
|
|
5634
|
+
window.location.href = `${index$3.SSO_URL}?returnUrl=${returnUrlEncode}&source=subot-inline`;
|
|
5842
5635
|
}
|
|
5843
5636
|
};
|
|
5844
5637
|
return (React__default["default"].createElement(StyledWrap$1, { id: "si-node-final" },
|
|
5845
5638
|
React__default["default"].createElement(Container$h, { intents: [
|
|
5846
5639
|
...((node === null || node === void 0 ? void 0 : node.intents) || []),
|
|
5847
|
-
...ssoIntents(f),
|
|
5640
|
+
...index$1.ssoIntents(f),
|
|
5848
5641
|
] }),
|
|
5849
5642
|
React__default["default"].createElement(Container$7, { actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnChange })));
|
|
5850
5643
|
};
|
|
@@ -5886,7 +5679,7 @@ const Container$2 = ({ node, indexNumber }) => {
|
|
|
5886
5679
|
const handleOnChange = (action, formSubmitMeta) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
5887
5680
|
if (!action)
|
|
5888
5681
|
return;
|
|
5889
|
-
const isActionSelectWithOther = action.type === index$
|
|
5682
|
+
const isActionSelectWithOther = action.type === index$2.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;
|
|
5890
5683
|
setValue(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 }));
|
|
5891
5684
|
if (!isActionSelectWithOther) {
|
|
5892
5685
|
handleOnChangeNormal(action);
|
|
@@ -5963,12 +5756,12 @@ const Container$1 = ({ onClickStart }) => {
|
|
|
5963
5756
|
React__default["default"].createElement(Container$s, { node: foundNode, onClickStart: onClickStart })));
|
|
5964
5757
|
}
|
|
5965
5758
|
const node = foundNode;
|
|
5966
|
-
const nodeType = index$
|
|
5967
|
-
const nodeTypeSSO = (_a = index$
|
|
5968
|
-
let NodeComponent = node.position === index$
|
|
5759
|
+
const nodeType = index$2.NodeType[node.type].valueOf();
|
|
5760
|
+
const nodeTypeSSO = (_a = index$2.NodePosition[node.position]) === null || _a === void 0 ? void 0 : _a.valueOf();
|
|
5761
|
+
let NodeComponent = node.position === index$2.NodePosition.SSO
|
|
5969
5762
|
? SubotInlineNodeBase[nodeTypeSSO]
|
|
5970
5763
|
: SubotInlineNodeBase[nodeType];
|
|
5971
|
-
if (node.is_multi_select && node.type !== index$
|
|
5764
|
+
if (node.is_multi_select && node.type !== index$2.NodeType.POLL) {
|
|
5972
5765
|
NodeComponent = SubotInlineNodeBase['MULTIPLE'];
|
|
5973
5766
|
}
|
|
5974
5767
|
return (React__default["default"].createElement(framerMotion.motion.div, { key: node.id, initial: { opacity: 1, y: -300 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
@@ -6021,7 +5814,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6021
5814
|
React__default["default"].createElement(Close, null))),
|
|
6022
5815
|
React__default["default"].createElement(NodeContextProvider, null,
|
|
6023
5816
|
React__default["default"].createElement("div", { className: "subot-inline-revamp-container", "data-show-footer": isShowFooter },
|
|
6024
|
-
loading && !isShowFooter && React__default["default"].createElement(index$
|
|
5817
|
+
loading && !isShowFooter && React__default["default"].createElement(index$8.Loading, { className: "si-loading" }),
|
|
6025
5818
|
React__default["default"].createElement(Container$1, { onClickStart: () => {
|
|
6026
5819
|
setIsDisplayFullMobile(true);
|
|
6027
5820
|
} })),
|
|
@@ -6040,7 +5833,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
|
|
|
6040
5833
|
}, [bgImgFullContainer]);
|
|
6041
5834
|
if (isFullContainer) {
|
|
6042
5835
|
return (React__default["default"].createElement(StyledContainerFullscreen, { style: styleFullContainer },
|
|
6043
|
-
React__default["default"].createElement(index$
|
|
5836
|
+
React__default["default"].createElement(index$a.Container, { className: "si-container" },
|
|
6044
5837
|
React__default["default"].createElement("div", { className: "si-revamp-left" },
|
|
6045
5838
|
React__default["default"].createElement(Container$t, { subotSettingData: subotSettingData }),
|
|
6046
5839
|
React__default["default"].createElement(Container$v, null)),
|
|
@@ -6059,7 +5852,7 @@ const Container = () => {
|
|
|
6059
5852
|
if (!foundNode)
|
|
6060
5853
|
return '';
|
|
6061
5854
|
return (foundNode.inline_background ||
|
|
6062
|
-
((_b = (_a = foundNode.intents) === null || _a === void 0 ? void 0 : _a.find((i) => i.type === index$
|
|
5855
|
+
((_b = (_a = foundNode.intents) === null || _a === void 0 ? void 0 : _a.find((i) => i.type === index$2.NodeIntentType.BOT_BACKGROUND_IMAGE)) === null || _b === void 0 ? void 0 : _b.url));
|
|
6063
5856
|
}, [listNodes, activeId]);
|
|
6064
5857
|
const subotSettingData = React.useMemo(() => {
|
|
6065
5858
|
const subotInlineSettings = listNodes[0];
|
|
@@ -6145,18 +5938,18 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
6145
5938
|
'default': ContainerWithProvider,
|
|
6146
5939
|
SubotInlineRevampWithTheme: SubotInlineRevampWithTheme,
|
|
6147
5940
|
UserInfoForm: UserInfoForm,
|
|
6148
|
-
overrideParamsByQuery: overrideParamsByQuery,
|
|
6149
|
-
ssoIntents: ssoIntents,
|
|
6150
|
-
checkUntilFinished: checkUntilFinished,
|
|
6151
|
-
getHhgIdFromCookie: getHhgIdFromCookie,
|
|
6152
|
-
getSubotCookieId: getSubotCookieId,
|
|
6153
|
-
getUserIdFromCookie: getUserIdFromCookie,
|
|
6154
|
-
getUserInfoFromCookie: getUserInfoFromCookie,
|
|
6155
|
-
getWindowId: getWindowId,
|
|
6156
|
-
getHelloSitesUrl: getHelloSitesUrl,
|
|
6157
|
-
checkMobile: checkMobile,
|
|
6158
|
-
clickAndOpenInNewTab: clickAndOpenInNewTab,
|
|
6159
|
-
TIME_RESET_RESEND_OTP: TIME_RESET_RESEND_OTP,
|
|
5941
|
+
overrideParamsByQuery: index$1.overrideParamsByQuery,
|
|
5942
|
+
ssoIntents: index$1.ssoIntents,
|
|
5943
|
+
checkUntilFinished: index$1.checkUntilFinished,
|
|
5944
|
+
getHhgIdFromCookie: index$1.getHhgIdFromCookie,
|
|
5945
|
+
getSubotCookieId: index$1.getSubotCookieId,
|
|
5946
|
+
getUserIdFromCookie: index$1.getUserIdFromCookie,
|
|
5947
|
+
getUserInfoFromCookie: index$1.getUserInfoFromCookie,
|
|
5948
|
+
getWindowId: index$1.getWindowId,
|
|
5949
|
+
getHelloSitesUrl: index$1.getHelloSitesUrl,
|
|
5950
|
+
checkMobile: index$1.checkMobile,
|
|
5951
|
+
clickAndOpenInNewTab: index$1.clickAndOpenInNewTab,
|
|
5952
|
+
TIME_RESET_RESEND_OTP: index$1.TIME_RESET_RESEND_OTP,
|
|
6160
5953
|
getSubotApiPath: getSubotApiPath,
|
|
6161
5954
|
subotInlineMessage: subotInlineMessage,
|
|
6162
5955
|
computeExtraSettingsForBot: computeExtraSettingsForBot,
|
|
@@ -6173,31 +5966,31 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
6173
5966
|
detectToSkipNodeStart: detectToSkipNodeStart
|
|
6174
5967
|
});
|
|
6175
5968
|
|
|
5969
|
+
exports.TIME_RESET_RESEND_OTP = index$1.TIME_RESET_RESEND_OTP;
|
|
5970
|
+
exports.checkMobile = index$1.checkMobile;
|
|
5971
|
+
exports.checkUntilFinished = index$1.checkUntilFinished;
|
|
5972
|
+
exports.clickAndOpenInNewTab = index$1.clickAndOpenInNewTab;
|
|
5973
|
+
exports.getHelloSitesUrl = index$1.getHelloSitesUrl;
|
|
5974
|
+
exports.getHhgIdFromCookie = index$1.getHhgIdFromCookie;
|
|
5975
|
+
exports.getSubotCookieId = index$1.getSubotCookieId;
|
|
5976
|
+
exports.getUserIdFromCookie = index$1.getUserIdFromCookie;
|
|
5977
|
+
exports.getUserInfoFromCookie = index$1.getUserInfoFromCookie;
|
|
5978
|
+
exports.getWindowId = index$1.getWindowId;
|
|
5979
|
+
exports.overrideParamsByQuery = index$1.overrideParamsByQuery;
|
|
5980
|
+
exports.ssoIntents = index$1.ssoIntents;
|
|
6176
5981
|
exports.PATHS = PATHS$1;
|
|
6177
5982
|
exports.SubotInlineRevampWithTheme = SubotInlineRevampWithTheme;
|
|
6178
|
-
exports.TIME_RESET_RESEND_OTP = TIME_RESET_RESEND_OTP;
|
|
6179
5983
|
exports.UserInfoForm = UserInfoForm;
|
|
6180
|
-
exports.checkMobile = checkMobile;
|
|
6181
|
-
exports.checkUntilFinished = checkUntilFinished;
|
|
6182
|
-
exports.clickAndOpenInNewTab = clickAndOpenInNewTab;
|
|
6183
5984
|
exports.computeExtraSettingsForBot = computeExtraSettingsForBot;
|
|
6184
5985
|
exports["default"] = ContainerWithProvider;
|
|
6185
5986
|
exports.detectToSkipNodeStart = detectToSkipNodeStart;
|
|
6186
5987
|
exports.extractUnifiedAnswers = extractUnifiedAnswers;
|
|
6187
5988
|
exports.extractVoucherAnswers = extractVoucherAnswers;
|
|
6188
5989
|
exports.getColorWithOpacity = getColorWithOpacity;
|
|
6189
|
-
exports.getHelloSitesUrl = getHelloSitesUrl;
|
|
6190
|
-
exports.getHhgIdFromCookie = getHhgIdFromCookie;
|
|
6191
5990
|
exports.getPreviousStateFromStorage = getPreviousStateFromStorage;
|
|
6192
5991
|
exports.getSubotApiPath = getSubotApiPath;
|
|
6193
|
-
exports.getSubotCookieId = getSubotCookieId;
|
|
6194
5992
|
exports.getSubotInlineLogs = getSubotInlineLogs;
|
|
6195
|
-
exports.getUserIdFromCookie = getUserIdFromCookie;
|
|
6196
|
-
exports.getUserInfoFromCookie = getUserInfoFromCookie;
|
|
6197
|
-
exports.getWindowId = getWindowId;
|
|
6198
|
-
exports.overrideParamsByQuery = overrideParamsByQuery;
|
|
6199
5993
|
exports.saveSubotInlineLogs = saveSubotInlineLogs;
|
|
6200
|
-
exports.ssoIntents = ssoIntents;
|
|
6201
5994
|
exports.subotInlineClick = subotInlineClick;
|
|
6202
5995
|
exports.subotInlineFirstNode = subotInlineFirstNode;
|
|
6203
5996
|
exports.subotInlineImpression = subotInlineImpression;
|