@hhgtech/hhg-components 1.18.60 → 1.18.62

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.
Files changed (76) hide show
  1. package/build/cache/core.d.ts +7 -0
  2. package/build/cache/index.d.ts +1 -0
  3. package/build/cache.js +2 -0
  4. package/build/cache.js.map +1 -0
  5. package/build/care/components/organisms/bookingSearchBar/mobileTopbar/index.styled.d.ts +1 -1
  6. package/build/care/components/organisms/bookingSearchBar/resultSection/index.styled.d.ts +1 -1
  7. package/build/care/components/organisms/bookingSearchBar/resultSectionItem/index.styled.d.ts +1 -1
  8. package/build/care.js +1 -1
  9. package/build/components/atoms/text/index.d.ts +4 -1
  10. package/build/components/organisms/index.d.ts +1 -1
  11. package/build/components/organisms/navigationV2/index.d.ts +1 -0
  12. package/build/components.js +1 -1
  13. package/build/cookieHelper-d9cedc66.js +2 -0
  14. package/build/cookieHelper-d9cedc66.js.map +1 -0
  15. package/build/core-8fcc56eb.js +2 -0
  16. package/build/core-8fcc56eb.js.map +1 -0
  17. package/build/esm/cache/core.d.ts +7 -0
  18. package/build/esm/cache/index.d.ts +1 -0
  19. package/build/esm/cache.js +2 -0
  20. package/build/esm/cache.js.map +1 -0
  21. package/build/esm/care/components/organisms/bookingSearchBar/mobileTopbar/index.styled.d.ts +1 -1
  22. package/build/esm/care/components/organisms/bookingSearchBar/resultSection/index.styled.d.ts +1 -1
  23. package/build/esm/care/components/organisms/bookingSearchBar/resultSectionItem/index.styled.d.ts +1 -1
  24. package/build/esm/care.js +1 -1
  25. package/build/esm/components/atoms/text/index.d.ts +4 -1
  26. package/build/esm/components/organisms/index.d.ts +1 -1
  27. package/build/esm/components/organisms/navigationV2/index.d.ts +1 -0
  28. package/build/esm/components.js +1 -1
  29. package/build/esm/cookieHelper-9743f6dd.js +2 -0
  30. package/build/esm/cookieHelper-9743f6dd.js.map +1 -0
  31. package/build/esm/core-3d8a3f90.js +2 -0
  32. package/build/esm/core-3d8a3f90.js.map +1 -0
  33. package/build/esm/index-1582383d.js +2 -0
  34. package/build/esm/{index-80bd7a1a.js.map → index-1582383d.js.map} +1 -1
  35. package/build/esm/{index-6f3f75e7.js → index-24e1621c.js} +2 -2
  36. package/build/esm/{index-6f3f75e7.js.map → index-24e1621c.js.map} +1 -1
  37. package/build/esm/index-8155bbaf.js +2 -0
  38. package/build/esm/{index-283a39de.js.map → index-8155bbaf.js.map} +1 -1
  39. package/build/esm/{index-9d13187e.js → index-c905e326.js} +2 -2
  40. package/build/esm/{index-9d13187e.js.map → index-c905e326.js.map} +1 -1
  41. package/build/esm/index.js +1 -1
  42. package/build/esm/{index.styled-6a37c4e2.js → index.styled-00c7c3b5.js} +2 -2
  43. package/build/esm/{index.styled-6a37c4e2.js.map → index.styled-00c7c3b5.js.map} +1 -1
  44. package/build/esm/navigation.js +1 -1
  45. package/build/esm/together/components/atoms/cardReactions/index.styled.d.ts +1 -1
  46. package/build/esm/together.js +1 -1
  47. package/build/esm/{types-b27e67ea.js → types-6320767b.js} +2 -2
  48. package/build/esm/{types-b27e67ea.js.map → types-6320767b.js.map} +1 -1
  49. package/build/esm/{types-f30bb23e.js → types-cf21f773.js} +2 -2
  50. package/build/esm/{types-f30bb23e.js.map → types-cf21f773.js.map} +1 -1
  51. package/build/index-17dcee19.js +2 -0
  52. package/build/{index-a8a8583a.js.map → index-17dcee19.js.map} +1 -1
  53. package/build/{index-44221dad.js → index-329a9e3c.js} +2 -2
  54. package/build/{index-44221dad.js.map → index-329a9e3c.js.map} +1 -1
  55. package/build/{index-bc92ff85.js → index-4c2c8cce.js} +2 -2
  56. package/build/{index-bc92ff85.js.map → index-4c2c8cce.js.map} +1 -1
  57. package/build/{index-fdf894ed.js → index-aa743579.js} +2 -2
  58. package/build/{index-fdf894ed.js.map → index-aa743579.js.map} +1 -1
  59. package/build/index.js +1 -1
  60. package/build/{index.styled-22a0a8fe.js → index.styled-4b2cda82.js} +2 -2
  61. package/build/{index.styled-22a0a8fe.js.map → index.styled-4b2cda82.js.map} +1 -1
  62. package/build/navigation.js +1 -1
  63. package/build/together/components/atoms/cardReactions/index.styled.d.ts +1 -1
  64. package/build/together.js +1 -1
  65. package/build/{types-6d50fb9d.js → types-4ac7c027.js} +2 -2
  66. package/build/{types-6d50fb9d.js.map → types-4ac7c027.js.map} +1 -1
  67. package/build/{types-9c347f2f.js → types-da66dc60.js} +2 -2
  68. package/build/{types-9c347f2f.js.map → types-da66dc60.js.map} +1 -1
  69. package/package.json +1 -1
  70. package/build/cookieHelper-ed78a7f1.js +0 -2
  71. package/build/cookieHelper-ed78a7f1.js.map +0 -1
  72. package/build/esm/cookieHelper-00386d56.js +0 -2
  73. package/build/esm/cookieHelper-00386d56.js.map +0 -1
  74. package/build/esm/index-283a39de.js +0 -2
  75. package/build/esm/index-80bd7a1a.js +0 -2
  76. package/build/index-a8a8583a.js +0 -2
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f7929e76.js"),t={},a=function(e){if("undefined"!=typeof window){var a=void 0;try{a=JSON.parse(localStorage.getItem("hhg-cache-"+e)||"{}")}catch(e){}return a||{}}return t[e]},r=function(e,a){try{"undefined"!=typeof window?localStorage.setItem("hhg-cache-"+e,JSON.stringify({data:a,time:Date.now()})):t[e]={data:a,time:Date.now()}}catch(e){}};exports.getCachedItem=a,exports.getDataWithCache=function(t,n,i,o){return void 0===o&&(o=9e5),e.__awaiter(void 0,void 0,void 0,(function(){var c,s;return e.__generator(this,(function(e){switch(e.label){case 0:return(c=a(t))&&c.data&&c.time&&Date.now()-c.time<o?[2,c.data]:[3,1];case 1:return n?[4,n()]:[3,3];case 2:return s=e.sent(),i&&!i(s)||r(t,s),[2,s];case 3:return[2,null]}}))}))},exports.setCachedItem=r;
2
+ //# sourceMappingURL=core-8fcc56eb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-8fcc56eb.js","sources":["../src/cache/core.ts"],"sourcesContent":["export type CacheItem<T = any> = {\n data: T\n time: number\n}\n\nconst ServerCache: { [key: string]: CacheItem } = {}\nexport const getCachedItem = <T>(key: string): CacheItem<T> => {\n if (typeof window !== 'undefined') {\n let res\n try {\n res = JSON.parse(localStorage.getItem('hhg-cache-' + key) || '{}')\n } catch {}\n return res || {}\n } else {\n return ServerCache[key]\n }\n}\nexport const setCachedItem = (key: string, value: any) => {\n try {\n if (typeof window !== 'undefined') {\n localStorage.setItem(\n 'hhg-cache-' + key,\n JSON.stringify({ data: value, time: Date.now() }),\n )\n } else {\n ServerCache[key] = { data: value, time: Date.now() }\n }\n } catch {}\n}\nexport const getDataWithCache = async <T>(\n key: string,\n dataGetter?: () => Promise<T> | T,\n validator?: (data: T) => boolean,\n cacheTime = 1000 * 60 * 15,\n): Promise<T | null | undefined> => {\n const persistData = getCachedItem<T>(key)\n if (\n persistData &&\n persistData.data &&\n persistData.time &&\n Date.now() - persistData.time < cacheTime\n ) {\n return persistData.data\n } else if (dataGetter) {\n const data = await dataGetter()\n if (!validator || validator(data)) {\n setCachedItem(key, data)\n }\n return data\n }\n return null\n}\n"],"names":["ServerCache","getCachedItem","key","window","res","JSON","parse","localStorage","getItem","_a","setCachedItem","value","setItem","stringify","data","time","Date","now","dataGetter","validator","cacheTime","persistData","sent"],"mappings":"sDAKMA,EAA4C,GACrCC,EAAgB,SAAIC,GAC/B,GAAsB,oBAAXC,OAAwB,CACjC,IAAIC,SACJ,IACEA,EAAMC,KAAKC,MAAMC,aAAaC,QAAQ,aAAeN,IAAQ,MAC7D,MAAAO,IACF,OAAOL,GAAO,GAEd,OAAOJ,EAAYE,IAGVQ,EAAgB,SAACR,EAAaS,GACzC,IACwB,oBAAXR,OACTI,aAAaK,QACX,aAAeV,EACfG,KAAKQ,UAAU,CAAEC,KAAMH,EAAOI,KAAMC,KAAKC,SAG3CjB,EAAYE,GAAO,CAAEY,KAAMH,EAAOI,KAAMC,KAAKC,OAE/C,MAAAR,uDAE4B,SAC9BP,EACAgB,EACAC,EACAC,eAAA,IAAAA,IAAAA,EAAY,wHAIV,OAFIC,EAAcpB,EAAiBC,KAGnCmB,EAAYP,MACZO,EAAYN,MACZC,KAAKC,MAAQI,EAAYN,KAAOK,EAEzB,CAAA,EAAAC,EAAYP,MAFsB,CAAA,EAAA,UAGhC,OAAAI,EACU,CAAA,EAAAA,KADA,CAAA,EAAA,UAKnB,OAJMJ,EAAOL,EAAkBa,OAC1BH,IAAaA,EAAUL,IAC1BJ,EAAcR,EAAKY,GAErB,CAAA,EAAOA,GAET,KAAA,EAAA,MAAA,CAAA,EAAO"}
@@ -0,0 +1,7 @@
1
+ export declare type CacheItem<T = any> = {
2
+ data: T;
3
+ time: number;
4
+ };
5
+ export declare const getCachedItem: <T>(key: string) => CacheItem<T>;
6
+ export declare const setCachedItem: (key: string, value: any) => void;
7
+ export declare const getDataWithCache: <T>(key: string, dataGetter?: () => T | Promise<T>, validator?: (data: T) => boolean, cacheTime?: number) => Promise<T>;
@@ -0,0 +1 @@
1
+ export * from './core';
@@ -0,0 +1,2 @@
1
+ export{a as getCachedItem,g as getDataWithCache,s as setCachedItem}from"./core-3d8a3f90.js";import"./tslib.es6-fd0a5c98.js";
2
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -3,4 +3,4 @@ export declare const StyledTopBar: import("styled-components").StyledComponent<"
3
3
  export declare const StyledTopBarHeaderRight: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const StyledTopBarIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const StyledTopbarHeading: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const StyledTopbarHeadingText: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, }: import("components/atoms/text").Props) => JSX.Element, any, {}, never>;
6
+ export declare const StyledTopbarHeadingText: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, dangerouslySetInnerHTML, }: import("components/atoms/text").Props) => JSX.Element, any, {}, never>;
@@ -8,4 +8,4 @@ export declare const StyledItemsWrapper: import("styled-components").StyledCompo
8
8
  isShown?: boolean;
9
9
  isMore?: boolean;
10
10
  }, never>;
11
- export declare const StyledSeeMore: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, }: import("../../../../../components/atoms/text").Props) => JSX.Element, any, {}, never>;
11
+ export declare const StyledSeeMore: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, dangerouslySetInnerHTML, }: import("../../../../../components/atoms/text").Props) => JSX.Element, any, {}, never>;
@@ -4,7 +4,7 @@ export declare const StyledResult: import("styled-components").StyledComponent<"
4
4
  export declare const StyledRoundedIconWrapper: import("styled-components").StyledComponent<"div", any, {
5
5
  type: SearchBarSectionApi['type'];
6
6
  }, never>;
7
- export declare const StyledText: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, }: import("components/atoms/text").Props) => JSX.Element, any, {}, never>;
7
+ export declare const StyledText: import("styled-components").StyledComponent<({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, dangerouslySetInnerHTML, }: import("components/atoms/text").Props) => JSX.Element, any, {}, never>;
8
8
  export declare const StyledPictureWrapper: import("styled-components").StyledComponent<"figure", any, {}, never>;
9
9
  export declare const StyledLocationPin: import("styled-components").StyledComponent<"svg", any, {}, never>;
10
10
  export declare const StyledImageSkeletonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
package/build/esm/care.js CHANGED
@@ -1,2 +1,2 @@
1
- export{B as BookingSearchBar,t as CareTypes}from"./types-b27e67ea.js";export{c as CareConstants}from"./constants-dc22740c.js";import"./tslib.es6-fd0a5c98.js";import"react";import"./theme-d85b3a33.js";import"./cookieHelper-00386d56.js";import"styled-components";import"./useTranslations-5638eb68.js";import"./translationsContext-977d7bc4.js";import"lodash/debounce";import"react-range";import"react-loading-skeleton";import"react-id-generator";import"lodash/shuffle";
1
+ export{B as BookingSearchBar,t as CareTypes}from"./types-6320767b.js";export{c as CareConstants}from"./constants-dc22740c.js";import"./tslib.es6-fd0a5c98.js";import"react";import"./theme-d85b3a33.js";import"./cookieHelper-9743f6dd.js";import"styled-components";import"./useTranslations-5638eb68.js";import"./translationsContext-977d7bc4.js";import"lodash/debounce";import"react-range";import"react-loading-skeleton";import"react-id-generator";import"lodash/shuffle";
2
2
  //# sourceMappingURL=care.js.map
@@ -24,6 +24,9 @@ export declare type Props = {
24
24
  * upcase
25
25
  */
26
26
  isUppercase?: boolean;
27
+ dangerouslySetInnerHTML?: {
28
+ __html: string;
29
+ };
27
30
  };
28
- declare const Text: ({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, }: Props) => JSX.Element;
31
+ declare const Text: ({ size, type, title, className, style, children, color, dataEventCategory, dataEventAction, dataEventLabel, as, wordWrap, isUppercase, dangerouslySetInnerHTML, }: Props) => JSX.Element;
29
32
  export { Text };
@@ -1,5 +1,5 @@
1
1
  export { NavigationLayout } from './navigationLayout/languageWrapper';
2
- export { NavigationV2, Props as NavigationV2Props, getNavMenuContent, NavMenuContentType, } from './navigationV2';
2
+ export { NavigationV2, Props as NavigationV2Props, getNavMenuContent, getNavMenuContentWithCache, NavMenuContentType, } from './navigationV2';
3
3
  export { Layout } from './navigationLayout/layout';
4
4
  export { SiteWide } from './navigationLayout/siteWide';
5
5
  export { NavigationBar } from './navigationLayout/navigationBar';
@@ -55,4 +55,5 @@ export declare type Props = {
55
55
  };
56
56
  declare const NavigationV2: (props: Props) => JSX.Element;
57
57
  export declare const getNavMenuContent: (locale: any) => Promise<NavMenuContentType>;
58
+ export declare const getNavMenuContentWithCache: (locale?: string) => Promise<NavMenuContentType>;
58
59
  export { NavigationV2 };
@@ -1,2 +1,2 @@
1
- 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,H as Heading,P as Popup}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";import"react";import"./tslib.es6-fd0a5c98.js";import"./useTranslations-5638eb68.js";import"styled-components";import"./translationsContext-977d7bc4.js";import"react-range";import"./theme-d85b3a33.js";import"react-id-generator";import"date-fns";import"react-day-picker/DayPickerInput";import"./useScrollbarSize-99db33e1.js";import"lodash/debounce";import"react-dom";import"lodash";import"./constants-dc22740c.js";import"react-loading-skeleton";import"./translationsProvider-94e1d5d1.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";import"smoothscroll-polyfill";
1
+ 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-1582383d.js";export{A as Avatar,B as Button,H as Heading,P as Popup}from"./index.styled-00c7c3b5.js";export{D as Divider,a as Dropdown}from"./index-c905e326.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-8155bbaf.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-9743f6dd.js";import"react";import"./tslib.es6-fd0a5c98.js";import"./useTranslations-5638eb68.js";import"styled-components";import"./translationsContext-977d7bc4.js";import"react-range";import"./theme-d85b3a33.js";import"react-id-generator";import"date-fns";import"react-day-picker/DayPickerInput";import"./useScrollbarSize-99db33e1.js";import"lodash/debounce";import"react-dom";import"lodash";import"./constants-dc22740c.js";import"react-loading-skeleton";import"./translationsProvider-94e1d5d1.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";import"./core-3d8a3f90.js";import"smoothscroll-polyfill";
2
2
  //# sourceMappingURL=components.js.map