@hhgtech/hhg-components 1.19.22 → 1.19.23

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.
@@ -1 +1 @@
1
- "use strict";var e=require("./useTranslations-a86f0d1c.js"),t=require("./tslib.es6-f7929e76.js"),r=require("react"),n=require("date-fns"),a=Object.freeze({__proto__:null,get Gender(){return e.Gender},get BabyGrowthChartType(){return e.BabyGrowthChartType},get BabyGrowthChartDuration(){return e.BabyGrowthChartDuration},get BabyGrowthResultTab(){return e.BabyGrowthResultTab},get LOCALE(){return e.LOCALE}});function o(e){var t=(new TextEncoder).encode(e.toLowerCase());return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}))}exports.ageGenerate=function(e,t){void 0===t&&(t=new Date);var r=n.differenceInWeeks(t,e,{roundingMethod:"ceil"}),a=n.differenceInMonths(t,e);return{year:Math.floor(a/12),month:a%12,week:r}},exports.index=a,exports.useFbDataLayer=function(e){r.useEffect((function(){var r=null;return(null==e?void 0:e.id)&&t.__awaiter(void 0,void 0,void 0,(function(){var n;return t.__generator(this,(function(a){switch(a.label){case 0:return[4,fetch("https://api.ipify.org").then((function(e){return e.text()})).then((function(e){return e||fetch("https://icanhazip.com").then((function(e){return e.text()}))}))];case 1:return(n=a.sent())&&function a(){return t.__awaiter(this,void 0,void 0,(function(){var i,u,c,s,f;return t.__generator(this,(function(t){switch(t.label){case 0:return window.fbq?(u=(i=window).fbq,c=["track","FB Conversion"],s={action_source:"website",event_source_url:window.location.href},f={},[4,o(e.email||"")]):[3,3];case 1:return f.em=t.sent(),[4,o(e.phone||"")];case 2:return u.apply(i,c.concat([(s.user_data=[(f.ph=t.sent(),f.client_ip_address=n||"",f.client_user_agent=navigator.userAgent||"",f)],s)])),[3,4];case 3:r=setTimeout(a,2e3),t.label=4;case 4:return[2]}}))}))}(),[2]}}))})),function(){r&&clearTimeout(r)}}),[e])};
1
+ "use strict";var e=require("./useTranslations-a86f0d1c.js"),t=require("./tslib.es6-f7929e76.js"),r=require("react"),n=require("date-fns"),a=Object.freeze({__proto__:null,get Gender(){return e.Gender},get BabyGrowthChartType(){return e.BabyGrowthChartType},get BabyGrowthChartDuration(){return e.BabyGrowthChartDuration},get BabyGrowthResultTab(){return e.BabyGrowthResultTab},get LOCALE(){return e.LOCALE}});function o(e){var t=(new TextEncoder).encode(e.toLowerCase());return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}))}exports.ageGenerate=function(e,t){void 0===t&&(t=new Date);var r=n.differenceInWeeks(t,e,{roundingMethod:"ceil"}),a=n.differenceInMonths(t,e);return{year:Math.floor(a/12),month:a%12,week:r}},exports.index=a,exports.useFbDataLayer=function(e){r.useEffect((function(){var r=null;return(null==e?void 0:e.id)&&t.__awaiter(void 0,void 0,void 0,(function(){var n;return t.__generator(this,(function(a){switch(a.label){case 0:return[4,fetch("https://api.ipify.org").then((function(e){return e.text()}))];case 1:return(n=a.sent())?[3,3]:[4,fetch("https://icanhazip.com").then((function(e){return e.text()}))];case 2:n=a.sent(),a.label=3;case 3:return function a(){return t.__awaiter(this,void 0,void 0,(function(){var i,u,s,c,f;return t.__generator(this,(function(t){switch(t.label){case 0:return window.fbq?(u=(i=window).fbq,s=["track","FB Conversion"],c={action_source:"website",event_source_url:window.location.href},f={},[4,o(e.email||"")]):[3,3];case 1:return f.em=t.sent(),[4,o(e.phone||"")];case 2:return u.apply(i,s.concat([(c.user_data=[(f.ph=t.sent(),f.client_ip_address=(null==n?void 0:n.replace("\n",""))||"",f.client_user_agent=navigator.userAgent||"",f)],c)])),[3,4];case 3:r=setTimeout(a,2e3),t.label=4;case 4:return[2]}}))}))}(),[2]}}))})),function(){r&&clearTimeout(r)}}),[e])};
package/build/core.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ageGenerate-0d92367e.js"),r=require("./constants-d4ec4195.js"),t=require("./useTranslations-a86f0d1c.js"),s=require("./useScrollbarSize-586f6706.js"),o=require("./cookieHelper-612b90fa.js"),a=require("./number-95704111.js");require("react"),require("styled-components");var i=require("./theme-6cd33b22.js"),n=require("./routing-3fb6d350.js");require("./tslib.es6-f7929e76.js"),require("date-fns"),require("./translationsContext-f8e45a1a.js"),require("lodash/debounce"),exports.Types=e.index,exports.ageGenerate=e.ageGenerate,exports.useFbDataLayer=e.useFbDataLayer,exports.Constants=r.constants,exports.Breakpoints=t.Breakpoints,exports.MediaQueries=t.MediaQueries,exports.fadeIn=t.fadeIn,exports.formatUrlWithPageParam=t.formatUrlWithPageParam,exports.getBoundariesFromMediaQueryKey=t.getBoundariesFromMediaQueryKey,exports.getPopupWrapperDom=t.getPopupWrapperDom,exports.makeParams=t.makeParams,exports.slideInDown=t.slideInDown,exports.slideInLeft=t.slideInLeft,exports.slideInRight=t.slideInRight,exports.slideInUp=t.slideInUp,exports.slideOutDown=t.slideOutDown,exports.slideOutLeft=t.slideOutLeft,exports.slideOutRight=t.slideOutRight,exports.slideOutUp=t.slideOutUp,exports.toggleNoScroll=t.toggleNoScroll,exports.useTranslations=t.useTranslations,exports.MEASURE_ELEMENT_CLASS=s.MEASURE_ELEMENT_CLASS,exports.useScrollbarSize=s.useScrollbarSize,exports.deleteCookie=o.deleteCookie,exports.getCookie=o.getCookie,exports.setCookie=o.setCookie,exports.abbreviateNumber=a.abbreviateNumber,Object.defineProperty(exports,"lazyLoadInstance",{enumerable:!0,get:function(){return a.lazyLoadInstance}}),exports.theme=i.theme,exports.getCareApiDomain=n.getCareApiDomain,exports.getCurrentBaseUrl=n.getCurrentBaseUrl,exports.getCurrentSsoUrl=n.getCurrentSsoUrl,exports.getDiscoverApiDomain=n.getDiscoverApiDomain,exports.getTogetherApiDomain=n.getTogetherApiDomain;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ageGenerate-09e4dceb.js"),r=require("./constants-d4ec4195.js"),t=require("./useTranslations-a86f0d1c.js"),s=require("./useScrollbarSize-586f6706.js"),o=require("./cookieHelper-612b90fa.js"),a=require("./number-95704111.js");require("react"),require("styled-components");var i=require("./theme-6cd33b22.js"),n=require("./routing-3fb6d350.js");require("./tslib.es6-f7929e76.js"),require("date-fns"),require("./translationsContext-f8e45a1a.js"),require("lodash/debounce"),exports.Types=e.index,exports.ageGenerate=e.ageGenerate,exports.useFbDataLayer=e.useFbDataLayer,exports.Constants=r.constants,exports.Breakpoints=t.Breakpoints,exports.MediaQueries=t.MediaQueries,exports.fadeIn=t.fadeIn,exports.formatUrlWithPageParam=t.formatUrlWithPageParam,exports.getBoundariesFromMediaQueryKey=t.getBoundariesFromMediaQueryKey,exports.getPopupWrapperDom=t.getPopupWrapperDom,exports.makeParams=t.makeParams,exports.slideInDown=t.slideInDown,exports.slideInLeft=t.slideInLeft,exports.slideInRight=t.slideInRight,exports.slideInUp=t.slideInUp,exports.slideOutDown=t.slideOutDown,exports.slideOutLeft=t.slideOutLeft,exports.slideOutRight=t.slideOutRight,exports.slideOutUp=t.slideOutUp,exports.toggleNoScroll=t.toggleNoScroll,exports.useTranslations=t.useTranslations,exports.MEASURE_ELEMENT_CLASS=s.MEASURE_ELEMENT_CLASS,exports.useScrollbarSize=s.useScrollbarSize,exports.deleteCookie=o.deleteCookie,exports.getCookie=o.getCookie,exports.setCookie=o.setCookie,exports.abbreviateNumber=a.abbreviateNumber,Object.defineProperty(exports,"lazyLoadInstance",{enumerable:!0,get:function(){return a.lazyLoadInstance}}),exports.theme=i.theme,exports.getCareApiDomain=n.getCareApiDomain,exports.getCurrentBaseUrl=n.getCurrentBaseUrl,exports.getCurrentSsoUrl=n.getCurrentSsoUrl,exports.getDiscoverApiDomain=n.getDiscoverApiDomain,exports.getTogetherApiDomain=n.getTogetherApiDomain;
@@ -0,0 +1 @@
1
+ import{G as t,l as e,n as r,o as n,L as a}from"./useTranslations-3dbb43bb.js";import{_ as o,a as i}from"./tslib.es6-6ae0d506.js";import{useEffect as u}from"react";import{differenceInWeeks as s,differenceInMonths as c}from"date-fns";var l=Object.freeze({__proto__:null,get Gender(){return t},get BabyGrowthChartType(){return e},get BabyGrowthChartDuration(){return r},get BabyGrowthResultTab(){return n},get LOCALE(){return a}});function f(t){var e=(new TextEncoder).encode(t.toLowerCase());return crypto.subtle.digest("SHA-256",e).then((function(t){return Array.from(new Uint8Array(t)).map((function(t){return t.toString(16).padStart(2,"0")})).join("")}))}var d=function(t){u((function(){var e=null;return(null==t?void 0:t.id)&&o(void 0,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,fetch("https://api.ipify.org").then((function(t){return t.text()}))];case 1:return(r=n.sent())?[3,3]:[4,fetch("https://icanhazip.com").then((function(t){return t.text()}))];case 2:r=n.sent(),n.label=3;case 3:return function n(){return o(this,void 0,void 0,(function(){var a,o,u,s,c;return i(this,(function(i){switch(i.label){case 0:return window.fbq?(o=(a=window).fbq,u=["track","FB Conversion"],s={action_source:"website",event_source_url:window.location.href},c={},[4,f(t.email||"")]):[3,3];case 1:return c.em=i.sent(),[4,f(t.phone||"")];case 2:return o.apply(a,u.concat([(s.user_data=[(c.ph=i.sent(),c.client_ip_address=(null==r?void 0:r.replace("\n",""))||"",c.client_user_agent=navigator.userAgent||"",c)],s)])),[3,4];case 3:e=setTimeout(n,2e3),i.label=4;case 4:return[2]}}))}))}(),[2]}}))})),function(){e&&clearTimeout(e)}}),[t])},h=function(t,e){void 0===e&&(e=new Date);var r=s(e,t,{roundingMethod:"ceil"}),n=c(e,t);return{year:Math.floor(n/12),month:n%12,week:r}};export{h as a,l as i,d as u};
package/build/esm/core.js CHANGED
@@ -1 +1 @@
1
- export{i as Types,a as ageGenerate,u as useFbDataLayer}from"./ageGenerate-374994d3.js";export{c as Constants}from"./constants-17d17987.js";export{B as Breakpoints,M as MediaQueries,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,m as makeParams,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,t as toggleNoScroll,u as useTranslations}from"./useTranslations-3dbb43bb.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{a as abbreviateNumber,l as lazyLoadInstance}from"./number-126ee62e.js";import"react";import"styled-components";export{t as theme}from"./theme-731042bc.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-93ed4dbc.js";import"./tslib.es6-6ae0d506.js";import"date-fns";import"./translationsContext-221a5963.js";import"lodash/debounce";
1
+ export{i as Types,a as ageGenerate,u as useFbDataLayer}from"./ageGenerate-095d2061.js";export{c as Constants}from"./constants-17d17987.js";export{B as Breakpoints,M as MediaQueries,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,m as makeParams,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,t as toggleNoScroll,u as useTranslations}from"./useTranslations-3dbb43bb.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{a as abbreviateNumber,l as lazyLoadInstance}from"./number-126ee62e.js";import"react";import"styled-components";export{t as theme}from"./theme-731042bc.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-93ed4dbc.js";import"./tslib.es6-6ae0d506.js";import"date-fns";import"./translationsContext-221a5963.js";import"lodash/debounce";
@@ -1 +1 @@
1
- export{i as Types,a as ageGenerate,u as useFbDataLayer}from"./ageGenerate-374994d3.js";export{c as Constants}from"./constants-17d17987.js";export{A as Alert,v as AmpNextPage,g as ArticleCard,B as Badge,a as BorderHeading,h as Breadcrumbs,n as Carousel,i as CategoryCard,C as Checkbox,j as CheckboxGroup,t as CookieAcceptConfirm,D as DatePicker,w as DateRangePicker,F as FileDropdown,s as FloatButtonGroup,E as Footer,G as Grid,I as IconText,L as Layout,M as Modal,y as NavigationBar,N as NavigationLayout,P as Pagination,f as Progress,k as ProgressBar,R as Radio,l as RadioGroup,e as RateStars,u as SeoHead,S as Shadow,m as SideMenu,x as SiteWide,b as Slider,o as StatisticCard,z as StickySponsoredBy,r as SurveyThankyouCard,p as Table,q as Tabs,T as Tag,c as Toggle,U as UnderlinedLink,d as Uploader}from"./index-a80796d4.js";export{A as Avatar,f as CardAuthor,C as CardReactions,D as DefaultComponentGlobalContextData,G as GlobalData,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-b3822d90.js";export{d as BabyGrowthSwitch,e as BabyGrowthTooltip,B as Button,C as Container,L as Label,a as Logo,M as Menu,P as PureInput,R as RadioImageGroup,T as Text,b as TextArea,c as TextDivider}from"./index.styled-37563568.js";export{D as Divider,a as Dropdown}from"./index-d6a90885.js";export{D as DoctorInfo,F as Flag,L as LanguageSwitcher,M as MobileBottomNavigation,b as MobileBottomNavigationIcon,h as NavigationLogoutPopup,i as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,S as ScrollList,a as SurveyQuestionCard,U as UserProfileNavigation,e as UserProfileNavigationHeader,f as UserProfileNavigationStats,d as defaultTranslation,g as getNavMenuContent,c as getNavMenuContentWithCache}from"./index-c0caf448.js";export{H as Heading}from"./index-cc1a1d0f.js";export{I as Input}from"./index-6fd83093.js";export{d as BabyGrowthChooseProfileDrawer,B as BabyGrowthGender,a as BabyGrowthLegend,b as BabyGrowthProfileRadio,c as BabyGrowthRecord,C as ChildCard,I as Icon}from"./index-fca2ee63.js";export{D as Drawer}from"./index.styled-ffed6187.js";export{B as Breakpoints,M as MediaQueries,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,m as makeParams,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,t as toggleNoScroll,u as useTranslations}from"./useTranslations-3dbb43bb.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{T as TranslationsProvider,t as translationsMap}from"./translationsProvider-26ce55b2.js";export{T as TranslationsContext,d as defaultTranslations}from"./translationsContext-221a5963.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-bfc0e558.js";export{B as BookingSearchBar,t as CareTypes}from"./types-3bf70bf6.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-2dabe70c.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{a as abbreviateNumber,l as lazyLoadInstance}from"./number-126ee62e.js";import"react";import"styled-components";export{t as theme}from"./theme-731042bc.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-93ed4dbc.js";import"./tslib.es6-6ae0d506.js";import"date-fns";import"react-range";import"react-id-generator";import"react-day-picker/DayPickerInput";import"react-dom";import"lodash";import"./useOutsideClick-6004483a.js";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"lodash/debounce";import"react-loading-skeleton";import"date-fns/locale/hi";import"date-fns/locale/ms";import"date-fns/locale/th";import"./core-286f158c.js";import"smoothscroll-polyfill";import"lodash/shuffle";
1
+ export{i as Types,a as ageGenerate,u as useFbDataLayer}from"./ageGenerate-095d2061.js";export{c as Constants}from"./constants-17d17987.js";export{A as Alert,v as AmpNextPage,g as ArticleCard,B as Badge,a as BorderHeading,h as Breadcrumbs,n as Carousel,i as CategoryCard,C as Checkbox,j as CheckboxGroup,t as CookieAcceptConfirm,D as DatePicker,w as DateRangePicker,F as FileDropdown,s as FloatButtonGroup,E as Footer,G as Grid,I as IconText,L as Layout,M as Modal,y as NavigationBar,N as NavigationLayout,P as Pagination,f as Progress,k as ProgressBar,R as Radio,l as RadioGroup,e as RateStars,u as SeoHead,S as Shadow,m as SideMenu,x as SiteWide,b as Slider,o as StatisticCard,z as StickySponsoredBy,r as SurveyThankyouCard,p as Table,q as Tabs,T as Tag,c as Toggle,U as UnderlinedLink,d as Uploader}from"./index-a80796d4.js";export{A as Avatar,f as CardAuthor,C as CardReactions,D as DefaultComponentGlobalContextData,G as GlobalData,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-b3822d90.js";export{d as BabyGrowthSwitch,e as BabyGrowthTooltip,B as Button,C as Container,L as Label,a as Logo,M as Menu,P as PureInput,R as RadioImageGroup,T as Text,b as TextArea,c as TextDivider}from"./index.styled-37563568.js";export{D as Divider,a as Dropdown}from"./index-d6a90885.js";export{D as DoctorInfo,F as Flag,L as LanguageSwitcher,M as MobileBottomNavigation,b as MobileBottomNavigationIcon,h as NavigationLogoutPopup,i as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,S as ScrollList,a as SurveyQuestionCard,U as UserProfileNavigation,e as UserProfileNavigationHeader,f as UserProfileNavigationStats,d as defaultTranslation,g as getNavMenuContent,c as getNavMenuContentWithCache}from"./index-c0caf448.js";export{H as Heading}from"./index-cc1a1d0f.js";export{I as Input}from"./index-6fd83093.js";export{d as BabyGrowthChooseProfileDrawer,B as BabyGrowthGender,a as BabyGrowthLegend,b as BabyGrowthProfileRadio,c as BabyGrowthRecord,C as ChildCard,I as Icon}from"./index-fca2ee63.js";export{D as Drawer}from"./index.styled-ffed6187.js";export{B as Breakpoints,M as MediaQueries,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,m as makeParams,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,t as toggleNoScroll,u as useTranslations}from"./useTranslations-3dbb43bb.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{T as TranslationsProvider,t as translationsMap}from"./translationsProvider-26ce55b2.js";export{T as TranslationsContext,d as defaultTranslations}from"./translationsContext-221a5963.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-bfc0e558.js";export{B as BookingSearchBar,t as CareTypes}from"./types-3bf70bf6.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-2dabe70c.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{a as abbreviateNumber,l as lazyLoadInstance}from"./number-126ee62e.js";import"react";import"styled-components";export{t as theme}from"./theme-731042bc.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-93ed4dbc.js";import"./tslib.es6-6ae0d506.js";import"date-fns";import"react-range";import"react-id-generator";import"react-day-picker/DayPickerInput";import"react-dom";import"lodash";import"./useOutsideClick-6004483a.js";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"lodash/debounce";import"react-loading-skeleton";import"date-fns/locale/hi";import"date-fns/locale/ms";import"date-fns/locale/th";import"./core-286f158c.js";import"smoothscroll-polyfill";import"lodash/shuffle";
package/build/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ageGenerate-0d92367e.js"),o=require("./constants-d4ec4195.js"),r=require("./index-5d7aac26.js"),t=require("./index.styled-4a3d1b58.js"),a=require("./index.styled-b187cc54.js"),s=require("./index-12a7ec3c.js"),i=require("./index-c8166cee.js"),p=require("./index-aa538c1f.js"),n=require("./index-ea33edba.js"),x=require("./index-c198e6e5.js"),u=require("./index.styled-4b2a8c64.js"),l=require("./useTranslations-a86f0d1c.js"),d=require("./useScrollbarSize-586f6706.js"),g=require("./translationsProvider-72def8c0.js"),c=require("./translationsContext-f8e45a1a.js"),C=require("./types-8f709939.js"),P=require("./types-cf235ee3.js"),h=require("./constants-ea7b35a2.js"),b=require("./types-9555904f.js"),m=require("./cookieHelper-612b90fa.js"),y=require("./number-95704111.js");require("react"),require("styled-components");var T=require("./theme-6cd33b22.js"),f=require("./routing-3fb6d350.js");require("./tslib.es6-f7929e76.js"),require("date-fns"),require("react-range"),require("react-id-generator"),require("react-day-picker/DayPickerInput"),require("react-dom"),require("lodash"),require("./useOutsideClick-528bfd6c.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("lodash/debounce"),require("react-loading-skeleton"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("./core-8fcc56eb.js"),require("smoothscroll-polyfill"),require("lodash/shuffle"),exports.Types=e.index,exports.ageGenerate=e.ageGenerate,exports.useFbDataLayer=e.useFbDataLayer,exports.Constants=o.constants,exports.Alert=r.Alert,exports.AmpNextPage=r.AmpNextPage,exports.ArticleCard=r.ArticleCard,exports.Badge=r.Badge,exports.BorderHeading=r.BorderHeading,exports.Breadcrumbs=r.Breadcrumbs,exports.Carousel=r.Carousel,exports.CategoryCard=r.CategoryCard,exports.Checkbox=r.Checkbox,exports.CheckboxGroup=r.CheckboxGroup,exports.CookieAcceptConfirm=r.CookieAcceptConfirm,exports.DatePicker=r.DatePicker,exports.DateRangePicker=r.DateRangePicker,exports.FileDropdown=r.FileDropdown,exports.FloatButtonGroup=r.FloatButtonGroup,exports.Footer=r.Footer,exports.Grid=r.Grid,exports.IconText=r.IconText,exports.Layout=r.Layout,exports.Modal=r.Modal,exports.NavigationBar=r.NavigationBar,exports.NavigationLayout=r.NavigationLayout,exports.Pagination=r.Pagination,exports.Progress=r.Progress,exports.ProgressBar=r.ProgressBar,exports.Radio=r.Radio,exports.RadioGroup=r.RadioGroup,exports.RateStars=r.RateStars,exports.SeoHead=r.SeoHead,exports.Shadow=r.Shadow,exports.SideMenu=r.index,exports.SiteWide=r.SiteWide,exports.Slider=r.Slider,exports.StatisticCard=r.StatisticCard,exports.StickySponsoredBy=r.StickySponsoredBy,exports.SurveyThankyouCard=r.SurveyThankyouCard,exports.Table=r.index$1,exports.Tabs=r.Tabs,exports.Tag=r.Tag,exports.Toggle=r.Toggle,exports.UnderlinedLink=r.UnderlinedLink,exports.Uploader=r.Uploader,exports.Avatar=t.Avatar,exports.CardAuthor=t.CardAuthor,exports.CardReactions=t.CardReactions,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.LabelSortPin=t.LabelSortPin,exports.LabelSorting=t.LabelSorting,exports.Loading=t.Loading,exports.PopoverMenu=t.PopoverMenu,exports.Popup=t.Popup,exports.PopupDoctor=t.PopupDoctor,exports.PopupExpert=t.PopupExpert,exports.PopupFrame=t.PopupFrame,exports.PopupHospital=t.PopupHospital,exports.ShareBox=t.ShareBox,exports.SharePopup=t.SharePopup,exports.TogetherAuthConfigContext=t.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=t.TogetherAuthConfigContextProvider,exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants,exports.TogetherDataTransforms=t.dataTransform,exports.UserAvatar=t.UserAvatar,exports.useTogetherAuthRequiredAction=t.useTogetherAuthRequiredAction,exports.BabyGrowthSwitch=a.BabyGrowthSwitch,exports.BabyGrowthTooltip=a.BabyGrowthTooltip,exports.Button=a.Button,exports.Container=a.Container,exports.Label=a.Label,exports.Logo=a.Logo,exports.Menu=a.Menu,exports.PureInput=a.PureInput,exports.RadioImageGroup=a.RadioImageGroup,exports.Text=a.Text,exports.TextArea=a.TextArea,exports.TextDivider=a.TextDivider,exports.Divider=s.Divider,exports.Dropdown=s.Dropdown,exports.DoctorInfo=i.DoctorInfo,exports.Flag=i.Flag,exports.LanguageSwitcher=i.LanguageSwitcher,exports.MobileBottomNavigation=i.MobileBottomNavigation,exports.MobileBottomNavigationIcon=i.MobileBottomNavigationIcon,exports.NavigationLogoutPopup=i.NavigationLogoutPopup,exports.NavigationProfileButton=i.NavigationProfileButton,exports.NavigationV2=i.NavigationV2,exports.ProfilePopup=i.ProfilePopup,exports.ScrollList=i.ScrollList,exports.SurveyQuestionCard=i.SurveyQuestionCard,exports.UserProfileNavigation=i.UserProfileNavigation,exports.UserProfileNavigationHeader=i.NavHeader,exports.UserProfileNavigationStats=i.UserStats,exports.defaultTranslation=i.defaultTranslation,exports.getNavMenuContent=i.getNavMenuContent,exports.getNavMenuContentWithCache=i.getNavMenuContentWithCache,exports.Heading=p.Heading,exports.Input=n.Input,exports.BabyGrowthChooseProfileDrawer=x.BabyGrowthChooseProfileDrawer,exports.BabyGrowthGender=x.BabyGrowthGender,exports.BabyGrowthLegend=x.BabyGrowthLegend,exports.BabyGrowthProfileRadio=x.BabyGrowthProfileRadio,exports.BabyGrowthRecord=x.BabyGrowthRecord,exports.ChildCard=x.ChildCard,exports.Icon=x.Icon,exports.Drawer=u.Drawer,exports.Breakpoints=l.Breakpoints,exports.MediaQueries=l.MediaQueries,exports.fadeIn=l.fadeIn,exports.formatUrlWithPageParam=l.formatUrlWithPageParam,exports.getBoundariesFromMediaQueryKey=l.getBoundariesFromMediaQueryKey,exports.getPopupWrapperDom=l.getPopupWrapperDom,exports.makeParams=l.makeParams,exports.slideInDown=l.slideInDown,exports.slideInLeft=l.slideInLeft,exports.slideInRight=l.slideInRight,exports.slideInUp=l.slideInUp,exports.slideOutDown=l.slideOutDown,exports.slideOutLeft=l.slideOutLeft,exports.slideOutRight=l.slideOutRight,exports.slideOutUp=l.slideOutUp,exports.toggleNoScroll=l.toggleNoScroll,exports.useTranslations=l.useTranslations,exports.MEASURE_ELEMENT_CLASS=d.MEASURE_ELEMENT_CLASS,exports.useScrollbarSize=d.useScrollbarSize,exports.TranslationsProvider=g.TranslationsProvider,exports.translationsMap=g.translationsMap,exports.TranslationsContext=c.TranslationsContext,exports.defaultTranslations=c.defaultTranslations,exports.CardLink=C.CardLink,exports.CardPost=C.CardPost,exports.CardPostPopoverMore=C.CardPostPopoverMore,exports.CardReply=C.CardReply,exports.CardReplyPopover=C.CardReplyPopover,exports.CreateNewPostContent=C.CreateNewPostContent,exports.CreatePostDescription=C.CreatePostDescription,exports.CreatePostTitle=C.CreatePostTitle,exports.ImagePreviewPopup=C.ImagePreviewPopup,exports.InputCommentBar=C.InputCommentBar,exports.LabelPin=C.LabelPin,exports.PopupDanger=C.PopupDanger,exports.PostContent=C.PostContent,exports.PostImagePreview=C.PostImagePreview,exports.PostSingleImageViewPopup=C.PostSingleImageViewPopup,exports.SubmitReportForm=C.SubmitReportForm,exports.TagTopic=C.TagTopic,exports.TogetherTypes=C.types,exports.TopicSelectList=C.TopicSelectList,exports.BookingSearchBar=P.BookingSearchBar,exports.CareTypes=P.types,exports.CareConstants=h.constants,exports.EcomApiTypes=b.apiTypes,exports.EcomConstants=b.constants,exports.EcomDataFormatter=b.index,exports.EcomDataTypes=b.dataTypes,exports.EcomTypes=b.types,exports.deleteCookie=m.deleteCookie,exports.getCookie=m.getCookie,exports.setCookie=m.setCookie,exports.abbreviateNumber=y.abbreviateNumber,Object.defineProperty(exports,"lazyLoadInstance",{enumerable:!0,get:function(){return y.lazyLoadInstance}}),exports.theme=T.theme,exports.getCareApiDomain=f.getCareApiDomain,exports.getCurrentBaseUrl=f.getCurrentBaseUrl,exports.getCurrentSsoUrl=f.getCurrentSsoUrl,exports.getDiscoverApiDomain=f.getDiscoverApiDomain,exports.getTogetherApiDomain=f.getTogetherApiDomain;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ageGenerate-09e4dceb.js"),o=require("./constants-d4ec4195.js"),r=require("./index-5d7aac26.js"),t=require("./index.styled-4a3d1b58.js"),a=require("./index.styled-b187cc54.js"),s=require("./index-12a7ec3c.js"),i=require("./index-c8166cee.js"),p=require("./index-aa538c1f.js"),n=require("./index-ea33edba.js"),x=require("./index-c198e6e5.js"),u=require("./index.styled-4b2a8c64.js"),l=require("./useTranslations-a86f0d1c.js"),d=require("./useScrollbarSize-586f6706.js"),g=require("./translationsProvider-72def8c0.js"),c=require("./translationsContext-f8e45a1a.js"),C=require("./types-8f709939.js"),P=require("./types-cf235ee3.js"),h=require("./constants-ea7b35a2.js"),b=require("./types-9555904f.js"),m=require("./cookieHelper-612b90fa.js"),y=require("./number-95704111.js");require("react"),require("styled-components");var T=require("./theme-6cd33b22.js"),f=require("./routing-3fb6d350.js");require("./tslib.es6-f7929e76.js"),require("date-fns"),require("react-range"),require("react-id-generator"),require("react-day-picker/DayPickerInput"),require("react-dom"),require("lodash"),require("./useOutsideClick-528bfd6c.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("lodash/debounce"),require("react-loading-skeleton"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("./core-8fcc56eb.js"),require("smoothscroll-polyfill"),require("lodash/shuffle"),exports.Types=e.index,exports.ageGenerate=e.ageGenerate,exports.useFbDataLayer=e.useFbDataLayer,exports.Constants=o.constants,exports.Alert=r.Alert,exports.AmpNextPage=r.AmpNextPage,exports.ArticleCard=r.ArticleCard,exports.Badge=r.Badge,exports.BorderHeading=r.BorderHeading,exports.Breadcrumbs=r.Breadcrumbs,exports.Carousel=r.Carousel,exports.CategoryCard=r.CategoryCard,exports.Checkbox=r.Checkbox,exports.CheckboxGroup=r.CheckboxGroup,exports.CookieAcceptConfirm=r.CookieAcceptConfirm,exports.DatePicker=r.DatePicker,exports.DateRangePicker=r.DateRangePicker,exports.FileDropdown=r.FileDropdown,exports.FloatButtonGroup=r.FloatButtonGroup,exports.Footer=r.Footer,exports.Grid=r.Grid,exports.IconText=r.IconText,exports.Layout=r.Layout,exports.Modal=r.Modal,exports.NavigationBar=r.NavigationBar,exports.NavigationLayout=r.NavigationLayout,exports.Pagination=r.Pagination,exports.Progress=r.Progress,exports.ProgressBar=r.ProgressBar,exports.Radio=r.Radio,exports.RadioGroup=r.RadioGroup,exports.RateStars=r.RateStars,exports.SeoHead=r.SeoHead,exports.Shadow=r.Shadow,exports.SideMenu=r.index,exports.SiteWide=r.SiteWide,exports.Slider=r.Slider,exports.StatisticCard=r.StatisticCard,exports.StickySponsoredBy=r.StickySponsoredBy,exports.SurveyThankyouCard=r.SurveyThankyouCard,exports.Table=r.index$1,exports.Tabs=r.Tabs,exports.Tag=r.Tag,exports.Toggle=r.Toggle,exports.UnderlinedLink=r.UnderlinedLink,exports.Uploader=r.Uploader,exports.Avatar=t.Avatar,exports.CardAuthor=t.CardAuthor,exports.CardReactions=t.CardReactions,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.LabelSortPin=t.LabelSortPin,exports.LabelSorting=t.LabelSorting,exports.Loading=t.Loading,exports.PopoverMenu=t.PopoverMenu,exports.Popup=t.Popup,exports.PopupDoctor=t.PopupDoctor,exports.PopupExpert=t.PopupExpert,exports.PopupFrame=t.PopupFrame,exports.PopupHospital=t.PopupHospital,exports.ShareBox=t.ShareBox,exports.SharePopup=t.SharePopup,exports.TogetherAuthConfigContext=t.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=t.TogetherAuthConfigContextProvider,exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants,exports.TogetherDataTransforms=t.dataTransform,exports.UserAvatar=t.UserAvatar,exports.useTogetherAuthRequiredAction=t.useTogetherAuthRequiredAction,exports.BabyGrowthSwitch=a.BabyGrowthSwitch,exports.BabyGrowthTooltip=a.BabyGrowthTooltip,exports.Button=a.Button,exports.Container=a.Container,exports.Label=a.Label,exports.Logo=a.Logo,exports.Menu=a.Menu,exports.PureInput=a.PureInput,exports.RadioImageGroup=a.RadioImageGroup,exports.Text=a.Text,exports.TextArea=a.TextArea,exports.TextDivider=a.TextDivider,exports.Divider=s.Divider,exports.Dropdown=s.Dropdown,exports.DoctorInfo=i.DoctorInfo,exports.Flag=i.Flag,exports.LanguageSwitcher=i.LanguageSwitcher,exports.MobileBottomNavigation=i.MobileBottomNavigation,exports.MobileBottomNavigationIcon=i.MobileBottomNavigationIcon,exports.NavigationLogoutPopup=i.NavigationLogoutPopup,exports.NavigationProfileButton=i.NavigationProfileButton,exports.NavigationV2=i.NavigationV2,exports.ProfilePopup=i.ProfilePopup,exports.ScrollList=i.ScrollList,exports.SurveyQuestionCard=i.SurveyQuestionCard,exports.UserProfileNavigation=i.UserProfileNavigation,exports.UserProfileNavigationHeader=i.NavHeader,exports.UserProfileNavigationStats=i.UserStats,exports.defaultTranslation=i.defaultTranslation,exports.getNavMenuContent=i.getNavMenuContent,exports.getNavMenuContentWithCache=i.getNavMenuContentWithCache,exports.Heading=p.Heading,exports.Input=n.Input,exports.BabyGrowthChooseProfileDrawer=x.BabyGrowthChooseProfileDrawer,exports.BabyGrowthGender=x.BabyGrowthGender,exports.BabyGrowthLegend=x.BabyGrowthLegend,exports.BabyGrowthProfileRadio=x.BabyGrowthProfileRadio,exports.BabyGrowthRecord=x.BabyGrowthRecord,exports.ChildCard=x.ChildCard,exports.Icon=x.Icon,exports.Drawer=u.Drawer,exports.Breakpoints=l.Breakpoints,exports.MediaQueries=l.MediaQueries,exports.fadeIn=l.fadeIn,exports.formatUrlWithPageParam=l.formatUrlWithPageParam,exports.getBoundariesFromMediaQueryKey=l.getBoundariesFromMediaQueryKey,exports.getPopupWrapperDom=l.getPopupWrapperDom,exports.makeParams=l.makeParams,exports.slideInDown=l.slideInDown,exports.slideInLeft=l.slideInLeft,exports.slideInRight=l.slideInRight,exports.slideInUp=l.slideInUp,exports.slideOutDown=l.slideOutDown,exports.slideOutLeft=l.slideOutLeft,exports.slideOutRight=l.slideOutRight,exports.slideOutUp=l.slideOutUp,exports.toggleNoScroll=l.toggleNoScroll,exports.useTranslations=l.useTranslations,exports.MEASURE_ELEMENT_CLASS=d.MEASURE_ELEMENT_CLASS,exports.useScrollbarSize=d.useScrollbarSize,exports.TranslationsProvider=g.TranslationsProvider,exports.translationsMap=g.translationsMap,exports.TranslationsContext=c.TranslationsContext,exports.defaultTranslations=c.defaultTranslations,exports.CardLink=C.CardLink,exports.CardPost=C.CardPost,exports.CardPostPopoverMore=C.CardPostPopoverMore,exports.CardReply=C.CardReply,exports.CardReplyPopover=C.CardReplyPopover,exports.CreateNewPostContent=C.CreateNewPostContent,exports.CreatePostDescription=C.CreatePostDescription,exports.CreatePostTitle=C.CreatePostTitle,exports.ImagePreviewPopup=C.ImagePreviewPopup,exports.InputCommentBar=C.InputCommentBar,exports.LabelPin=C.LabelPin,exports.PopupDanger=C.PopupDanger,exports.PostContent=C.PostContent,exports.PostImagePreview=C.PostImagePreview,exports.PostSingleImageViewPopup=C.PostSingleImageViewPopup,exports.SubmitReportForm=C.SubmitReportForm,exports.TagTopic=C.TagTopic,exports.TogetherTypes=C.types,exports.TopicSelectList=C.TopicSelectList,exports.BookingSearchBar=P.BookingSearchBar,exports.CareTypes=P.types,exports.CareConstants=h.constants,exports.EcomApiTypes=b.apiTypes,exports.EcomConstants=b.constants,exports.EcomDataFormatter=b.index,exports.EcomDataTypes=b.dataTypes,exports.EcomTypes=b.types,exports.deleteCookie=m.deleteCookie,exports.getCookie=m.getCookie,exports.setCookie=m.setCookie,exports.abbreviateNumber=y.abbreviateNumber,Object.defineProperty(exports,"lazyLoadInstance",{enumerable:!0,get:function(){return y.lazyLoadInstance}}),exports.theme=T.theme,exports.getCareApiDomain=f.getCareApiDomain,exports.getCurrentBaseUrl=f.getCurrentBaseUrl,exports.getCurrentSsoUrl=f.getCurrentSsoUrl,exports.getDiscoverApiDomain=f.getDiscoverApiDomain,exports.getTogetherApiDomain=f.getTogetherApiDomain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.19.22",
3
+ "version": "1.19.23",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- import{G as t,l as e,n as r,o as n,L as o}from"./useTranslations-3dbb43bb.js";import{_ as a,a as i}from"./tslib.es6-6ae0d506.js";import{useEffect as u}from"react";import{differenceInWeeks as s,differenceInMonths as c}from"date-fns";var f=Object.freeze({__proto__:null,get Gender(){return t},get BabyGrowthChartType(){return e},get BabyGrowthChartDuration(){return r},get BabyGrowthResultTab(){return n},get LOCALE(){return o}});function l(t){var e=(new TextEncoder).encode(t.toLowerCase());return crypto.subtle.digest("SHA-256",e).then((function(t){return Array.from(new Uint8Array(t)).map((function(t){return t.toString(16).padStart(2,"0")})).join("")}))}var h=function(t){u((function(){var e=null;return(null==t?void 0:t.id)&&a(void 0,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,fetch("https://api.ipify.org").then((function(t){return t.text()})).then((function(t){return t||fetch("https://icanhazip.com").then((function(t){return t.text()}))}))];case 1:return(r=n.sent())&&function n(){return a(this,void 0,void 0,(function(){var o,a,u,s,c;return i(this,(function(i){switch(i.label){case 0:return window.fbq?(a=(o=window).fbq,u=["track","FB Conversion"],s={action_source:"website",event_source_url:window.location.href},c={},[4,l(t.email||"")]):[3,3];case 1:return c.em=i.sent(),[4,l(t.phone||"")];case 2:return a.apply(o,u.concat([(s.user_data=[(c.ph=i.sent(),c.client_ip_address=r||"",c.client_user_agent=navigator.userAgent||"",c)],s)])),[3,4];case 3:e=setTimeout(n,2e3),i.label=4;case 4:return[2]}}))}))}(),[2]}}))})),function(){e&&clearTimeout(e)}}),[t])},d=function(t,e){void 0===e&&(e=new Date);var r=s(e,t,{roundingMethod:"ceil"}),n=c(e,t);return{year:Math.floor(n/12),month:n%12,week:r}};export{d as a,f as i,h as u};