@hhgtech/hhg-components 1.18.57 → 1.18.59

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.
@@ -5,6 +5,7 @@ export * from './misc/theme';
5
5
  export * from './misc/utils';
6
6
  export * from './hooks/useTranslations';
7
7
  export * from './hooks/useScrollbarSize';
8
+ export * from './hooks/useFbDataLayer';
8
9
  export * from './i18n';
9
10
  export * from './together';
10
11
  export * from './care';
@@ -1,2 +1,2 @@
1
- export{t as Types}from"./types-4a772485.js";export{c as Constants,t as theme}from"./theme-d85b3a33.js";export{A as Alert,w as AmpNextPage,g as ArticleCard,B as Badge,a as BorderHeading,h as Breadcrumbs,o as Carousel,i as CategoryCard,C as Checkbox,j as CheckboxGroup,u as CookieAcceptConfirm,D as DatePicker,F as FileDropdown,t as FloatButtonGroup,E as Footer,G as Grid,I as Icon,k as IconText,L as Layout,M as Modal,y as NavigationBar,N as NavigationLayout,P as Pagination,f as Progress,l as ProgressBar,R as Radio,m as RadioGroup,e as RateStars,v as SeoHead,S as Shadow,n as SideMenu,x as SiteWide,b as Slider,p as StatisticCard,z as StickySponsoredBy,s as SurveyThankyouCard,q as Table,r as Tabs,T as Tag,c as Toggle,U as UnderlinedLink,d as Uploader}from"./index-2017ad6a.js";export{A as Avatar,B as Button,f as CardAuthor,C as CardReactions,D as DefaultComponentGlobalContextData,G as GlobalData,H as Heading,b as LabelSortPin,e as LabelSorting,L as Loading,l as PopoverMenu,P as Popup,h as PopupDoctor,g as PopupExpert,j as PopupFrame,i as PopupHospital,k as ShareBox,S as SharePopup,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,m as TogetherComponentGlobalContext,n as TogetherComponentGlobalContextProvider,c as TogetherConstants,d as TogetherDataTransforms,U as UserAvatar,u as useTogetherAuthRequiredAction}from"./index.styled-6a37c4e2.js";export{D as Divider,a as Dropdown}from"./index-9d13187e.js";export{D as DoctorInfo,F as Flag,L as LanguageSwitcher,M as MobileBottomNavigation,b as MobileBottomNavigationIcon,f as NavigationLogoutPopup,h as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,S as ScrollList,a as SurveyQuestionCard,U as UserProfileNavigation,c as UserProfileNavigationHeader,e as UserProfileNavigationStats,d as defaultTranslation,g as getNavMenuContent}from"./index-3e8dfdf1.js";export{C as Container,I as Input,L as Label,a as Logo,P as PureInput,T as Text,b as TextArea,c as TextDivider}from"./cookieHelper-00386d56.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as makeParams,m as mbLayout,p as pcLayout,s as spLayout,t as tdLayout,b as toggleNoScroll,u as useTranslations}from"./useTranslations-5638eb68.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{T as TranslationsProvider,t as translationsMap}from"./translationsProvider-94e1d5d1.js";export{T as TranslationsContext,d as defaultTranslations}from"./translationsContext-977d7bc4.js";export{C as CardLink,i as CardPost,j as CardPostPopoverMore,k as CardReply,l as CardReplyPopover,a as CreateNewPostContent,b as CreatePostDescription,c as CreatePostTitle,f as ImagePreviewPopup,I as InputCommentBar,L as LabelPin,P as PopupDanger,e as PostContent,h as PostImagePreview,g as PostSingleImageViewPopup,S as SubmitReportForm,T as TagTopic,t as TogetherTypes,d as TopicSelectList}from"./types-f30bb23e.js";export{B as BookingSearchBar,t as CareTypes}from"./types-7b676b4a.js";export{c as CareConstants}from"./constants-dc22740c.js";export{a as EcomApiTypes,c as EcomConstants,i as EcomDataFormatter,d as EcomDataTypes,t as EcomTypes}from"./types-dd4dd7f7.js";import"react";import"./tslib.es6-fd0a5c98.js";import"react-range";import"react-id-generator";import"date-fns";import"react-day-picker/DayPickerInput";import"react-dom";import"lodash";import"styled-components";import"react-loading-skeleton";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"lodash/debounce";import"smoothscroll-polyfill";import"lodash/shuffle";
1
+ export{t as Types,u as useFbDataLayer}from"./useFbDataLayer-58443cc1.js";export{c as Constants,t as theme}from"./theme-d85b3a33.js";export{A as Alert,w as AmpNextPage,g as ArticleCard,B as Badge,a as BorderHeading,h as Breadcrumbs,o as Carousel,i as CategoryCard,C as Checkbox,j as CheckboxGroup,u as CookieAcceptConfirm,D as DatePicker,F as FileDropdown,t as FloatButtonGroup,E as Footer,G as Grid,I as Icon,k as IconText,L as Layout,M as Modal,y as NavigationBar,N as NavigationLayout,P as Pagination,f as Progress,l as ProgressBar,R as Radio,m as RadioGroup,e as RateStars,v as SeoHead,S as Shadow,n as SideMenu,x as SiteWide,b as Slider,p as StatisticCard,z as StickySponsoredBy,s as SurveyThankyouCard,q as Table,r as Tabs,T as Tag,c as Toggle,U as UnderlinedLink,d as Uploader}from"./index-80bd7a1a.js";export{A as Avatar,B as Button,f as CardAuthor,C as CardReactions,D as DefaultComponentGlobalContextData,G as GlobalData,H as Heading,b as LabelSortPin,e as LabelSorting,L as Loading,l as PopoverMenu,P as Popup,h as PopupDoctor,g as PopupExpert,j as PopupFrame,i as PopupHospital,k as ShareBox,S as SharePopup,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,m as TogetherComponentGlobalContext,n as TogetherComponentGlobalContextProvider,c as TogetherConstants,d as TogetherDataTransforms,U as UserAvatar,u as useTogetherAuthRequiredAction}from"./index.styled-6a37c4e2.js";export{D as Divider,a as Dropdown}from"./index-9d13187e.js";export{D as DoctorInfo,F as Flag,L as LanguageSwitcher,M as MobileBottomNavigation,b as MobileBottomNavigationIcon,f as NavigationLogoutPopup,h as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,S as ScrollList,a as SurveyQuestionCard,U as UserProfileNavigation,c as UserProfileNavigationHeader,e as UserProfileNavigationStats,d as defaultTranslation,g as getNavMenuContent}from"./index-283a39de.js";export{C as Container,I as Input,L as Label,a as Logo,P as PureInput,T as Text,b as TextArea,c as TextDivider}from"./cookieHelper-00386d56.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as makeParams,m as mbLayout,p as pcLayout,s as spLayout,t as tdLayout,b as toggleNoScroll,u as useTranslations}from"./useTranslations-5638eb68.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{T as TranslationsProvider,t as translationsMap}from"./translationsProvider-94e1d5d1.js";export{T as TranslationsContext,d as defaultTranslations}from"./translationsContext-977d7bc4.js";export{C as CardLink,i as CardPost,j as CardPostPopoverMore,k as CardReply,l as CardReplyPopover,a as CreateNewPostContent,b as CreatePostDescription,c as CreatePostTitle,f as ImagePreviewPopup,I as InputCommentBar,L as LabelPin,P as PopupDanger,e as PostContent,h as PostImagePreview,g as PostSingleImageViewPopup,S as SubmitReportForm,T as TagTopic,t as TogetherTypes,d as TopicSelectList}from"./types-f30bb23e.js";export{B as BookingSearchBar,t as CareTypes}from"./types-7b676b4a.js";export{c as CareConstants}from"./constants-dc22740c.js";export{a as EcomApiTypes,c as EcomConstants,i as EcomDataFormatter,d as EcomDataTypes,t as EcomTypes}from"./types-dd4dd7f7.js";import"react";import"./tslib.es6-fd0a5c98.js";import"react-range";import"react-id-generator";import"date-fns";import"react-day-picker/DayPickerInput";import"react-dom";import"lodash";import"styled-components";import"react-loading-skeleton";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"lodash/debounce";import"smoothscroll-polyfill";import"lodash/shuffle";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import"./tslib.es6-fd0a5c98.js";import"react";import"./cookieHelper-00386d56.js";export{N as NavigationV2,g as getNavMenuContent}from"./index-3e8dfdf1.js";import"react-id-generator";import"./index.styled-6a37c4e2.js";import"date-fns";import"react-day-picker/DayPickerInput";import"lodash/debounce";import"react-dom";import"lodash";import"./useTranslations-5638eb68.js";import"react-range";import"./theme-d85b3a33.js";import"styled-components";import"smoothscroll-polyfill";import"./constants-dc22740c.js";import"./translationsContext-977d7bc4.js";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";
1
+ import"./tslib.es6-fd0a5c98.js";import"react";import"./cookieHelper-00386d56.js";export{N as NavigationV2,g as getNavMenuContent}from"./index-283a39de.js";import"react-id-generator";import"./index.styled-6a37c4e2.js";import"date-fns";import"react-day-picker/DayPickerInput";import"lodash/debounce";import"react-dom";import"lodash";import"./useTranslations-5638eb68.js";import"react-range";import"./theme-d85b3a33.js";import"styled-components";import"smoothscroll-polyfill";import"./constants-dc22740c.js";import"./translationsContext-977d7bc4.js";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";
2
2
  //# sourceMappingURL=navigation.js.map
@@ -0,0 +1,2 @@
1
+ import{useState as t,useEffect as n}from"react";var e=Object.freeze({__proto__:null}),i=function(e){var i=t(""),o=i[0],r=i[1];n((function(){fetch("https://api.ipify.org").then((function(t){return t.text()})).then((function(t){t?r(t):fetch("https://icanhazip.com").then((function(t){return t.text()})).then((function(t){t&&r(t)}))}))}),[]),n((function(){var t=null;return e&&o&&function n(){window.fbq?window.fbq("track","FB Conversion",{user_data:[{em:e.email||"",fn:"",ln:"",ph:e.phone||"",client_ip_address:o||""}]}):t=setTimeout(n,2e3)}(),function(){t&&clearTimeout(t)}}),[e,o])};export{e as t,i as u};
2
+ //# sourceMappingURL=useFbDataLayer-58443cc1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFbDataLayer-58443cc1.js","sources":["../../src/hooks/useFbDataLayer.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nimport { UserInfo } from 'interfaces/types'\n\nexport const useFbDataLayer = (userInfo?: UserInfo | null) => {\n const [userIp, setUserIp] = useState('')\n useEffect(() => {\n fetch('https://api.ipify.org')\n .then((res) => res.text())\n .then((ip) => {\n if (ip) setUserIp(ip)\n else\n fetch('https://icanhazip.com')\n .then((res) => res.text())\n .then((ip) => {\n if (ip) setUserIp(ip)\n })\n })\n }, [])\n useEffect(() => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n if (userInfo && userIp) {\n ;(function waitFbq() {\n // check for the generic script\n // easiest check to prevent race condition\n if (window.fbq) {\n window.fbq('track', 'FB Conversion', {\n user_data: [\n {\n em: userInfo.email || '',\n fn: '',\n ln: '',\n ph: userInfo.phone || '',\n client_ip_address: userIp || '',\n },\n ],\n })\n } else {\n timeout = setTimeout(waitFbq, 2000)\n }\n })()\n }\n return () => {\n if (timeout) {\n clearTimeout(timeout)\n }\n }\n }, [userInfo, userIp])\n}\n"],"names":["useFbDataLayer","userInfo","_a","useState","userIp","setUserIp","useEffect","fetch","then","res","text","ip","timeout","waitFbq","window","fbq","user_data","em","email","fn","ln","ph","phone","client_ip_address","setTimeout","clearTimeout"],"mappings":"sFAIaA,EAAiB,SAACC,GACvB,IAAAC,EAAsBC,EAAS,IAA9BC,EAAMF,EAAA,GAAEG,EAASH,EAAA,GACxBI,GAAU,WACRC,MAAM,yBACHC,MAAK,SAACC,GAAQ,OAAAA,EAAIC,UAClBF,MAAK,SAACG,GACDA,EAAIN,EAAUM,GAEhBJ,MAAM,yBACHC,MAAK,SAACC,GAAQ,OAAAA,EAAIC,UAClBF,MAAK,SAACG,GACDA,GAAIN,EAAUM,WAG3B,IACHL,GAAU,WACR,IAAIM,EAAgD,KAsBpD,OArBIX,GAAYG,GACb,SAAUS,IAGLC,OAAOC,IACTD,OAAOC,IAAI,QAAS,gBAAiB,CACnCC,UAAW,CACT,CACEC,GAAIhB,EAASiB,OAAS,GACtBC,GAAI,GACJC,GAAI,GACJC,GAAIpB,EAASqB,OAAS,GACtBC,kBAAmBnB,GAAU,OAKnCQ,EAAUY,WAAWX,EAAS,KAhBjC,GAoBI,WACDD,GACFa,aAAab,MAGhB,CAACX,EAAUG"}
@@ -0,0 +1,2 @@
1
+ import { UserInfo } from 'interfaces/types';
2
+ export declare const useFbDataLayer: (userInfo?: UserInfo | null) => void;