@davi-ai/retorik-framework 3.2.2 → 3.2.4

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 (48) hide show
  1. package/dist/{AttachmentDetail.1e06c2a5.js → AttachmentDetail.cfd86776.js} +2 -3
  2. package/dist/AttachmentDetail.cfd86776.js.map +1 -0
  3. package/dist/{AttachmentDetail.c6c297df.js → AttachmentDetail.fdcd1737.js} +2 -3
  4. package/dist/AttachmentDetail.fdcd1737.js.map +1 -0
  5. package/dist/{CustomView.080c8028.js → CustomView.ba7af9b6.js} +2 -3
  6. package/dist/CustomView.ba7af9b6.js.map +1 -0
  7. package/dist/{CustomView.90d2a13d.js → CustomView.c24a0e74.js} +2 -3
  8. package/dist/CustomView.c24a0e74.js.map +1 -0
  9. package/dist/{Emergency.a21f837c.js → Emergency.0cf005ce.js} +2 -3
  10. package/dist/Emergency.0cf005ce.js.map +1 -0
  11. package/dist/{Emergency.423214ad.js → Emergency.897ee3c7.js} +2 -3
  12. package/dist/Emergency.897ee3c7.js.map +1 -0
  13. package/dist/{HistoryList.5fd6aa12.js → HistoryList.03a56119.js} +3 -7
  14. package/dist/HistoryList.03a56119.js.map +1 -0
  15. package/dist/{HistoryList.50ff0fd9.js → HistoryList.4c303dc6.js} +3 -7
  16. package/dist/HistoryList.4c303dc6.js.map +1 -0
  17. package/dist/{LanguageChoice.61e36c1d.js → LanguageChoice.623ee802.js} +2 -5
  18. package/dist/LanguageChoice.623ee802.js.map +1 -0
  19. package/dist/{LanguageChoice.1579b654.js → LanguageChoice.ff0cd04c.js} +2 -5
  20. package/dist/LanguageChoice.ff0cd04c.js.map +1 -0
  21. package/dist/{NewsContainer.67f04b19.js → NewsContainer.05bb1b19.js} +9 -9
  22. package/dist/NewsContainer.05bb1b19.js.map +1 -0
  23. package/dist/{NewsContainer.932174e9.js → NewsContainer.5e80336b.js} +9 -9
  24. package/dist/NewsContainer.5e80336b.js.map +1 -0
  25. package/dist/{Weather.661c2cac.js → Weather.99917b66.js} +2 -3
  26. package/dist/Weather.99917b66.js.map +1 -0
  27. package/dist/{Weather.fb22fba3.js → Weather.cf58823d.js} +2 -3
  28. package/dist/Weather.cf58823d.js.map +1 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +348 -564
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.modern.js +332 -556
  33. package/dist/index.modern.js.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/AttachmentDetail.1e06c2a5.js.map +0 -1
  36. package/dist/AttachmentDetail.c6c297df.js.map +0 -1
  37. package/dist/CustomView.080c8028.js.map +0 -1
  38. package/dist/CustomView.90d2a13d.js.map +0 -1
  39. package/dist/Emergency.423214ad.js.map +0 -1
  40. package/dist/Emergency.a21f837c.js.map +0 -1
  41. package/dist/HistoryList.50ff0fd9.js.map +0 -1
  42. package/dist/HistoryList.5fd6aa12.js.map +0 -1
  43. package/dist/LanguageChoice.1579b654.js.map +0 -1
  44. package/dist/LanguageChoice.61e36c1d.js.map +0 -1
  45. package/dist/NewsContainer.67f04b19.js.map +0 -1
  46. package/dist/NewsContainer.932174e9.js.map +0 -1
  47. package/dist/Weather.661c2cac.js.map +0 -1
  48. package/dist/Weather.fb22fba3.js.map +0 -1
@@ -153,8 +153,7 @@ const $d796192f79db347a$var$AttachmentDetails = ()=>{
153
153
  setCloseDetailedPOI(false);
154
154
  setRetorikEvent((0, $7WHA7.RetorikEvent).DetailViewClose);
155
155
  timerRef.current = setTimeout(()=>{
156
- sendEvent('Davi.CloseWindow', null);
157
- sendEvent('Davi.CloseWindowDetailed', null);
156
+ sendEvent('Davi.CloseWindow', null, ()=>sendEvent('Davi.CloseWindowDetailed', null));
158
157
  setContent(undefined);
159
158
  timerRef.current = null;
160
159
  }, $d796192f79db347a$var$springLeaveDuration);
@@ -1754,4 +1753,4 @@ var $bec002e5f7690553$export$2e2bcd8739ae039 = $bec002e5f7690553$var$MapUser;
1754
1753
 
1755
1754
 
1756
1755
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,qCAAe,CAAC,aAAE,SAAS,SAAE,KAAK,EAAoB;IAC1D,qBACE,gCAAC;QACC,OAAM;QACN,SAAQ;QACR,WAAW,aAAa;kBAExB,cAAA,gCAAC;YACC,GAAE;YACF,MAAM,SAAS;;;AAIvB;IAEA,2CAAe;;;;;;;;;;;;;ACPf,MAAM,gCAAU,CAAC,yBACf,qBAAqB,eACrB,WAAW,QACX,IAAI,EACS;IACb,MAAM,MAAM,CAAA,GAAA,0BAAK;IAEjB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,0BAA0B,aAAa;YACzC,MAAM,UAAuB;mBAAI;aAAsB;YACvD,MAAM,UAAuB;mBAAI;aAAY;YAC7C,IAAI,qBAAqB,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,EAC3C,OAAO,CAAC,EAAE,IAAI,AAAC,CAAA,qBAAqB,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,AAAD,IAAK;iBAE5D,OAAO,CAAC,EAAE,IAAI,AAAC,CAAA,WAAW,CAAC,EAAE,GAAG,qBAAqB,CAAC,EAAE,AAAD,IAAK;YAG9D,IAAI,WAAW,CAAC;gBAAC;gBAAS;aAAQ;QACpC,OACE,IAAI,WAAW,CAAC;YAAC;YAAuB;SAAY;IAExD,GAAG;QAAC;KAAK;IAET,qBAAO,gCAAC,CAAA,GAAA,sCAAI,EAAE,QAAQ;AACxB;IAEA,2CAAe","sources":["src/components/Attachments/AttachmentDetail.tsx","src/hooks/useShowPOI.ts","src/utils/mapDetailedDataFromContentItem.ts","src/components/Attachments/DetailedAttachment/DetailedTitle.tsx","src/components/Attachments/DetailedAttachment/CommentsPennant.tsx","src/components/Attachments/DetailedAttachment/DetailedText.tsx","src/components/Attachments/DetailedAttachment/DownloadSheet.tsx","src/components/Attachments/DetailedAttachment/DownloadQR.tsx","src/components/Attachments/DetailedAttachment/PrintingButton.tsx","src/components/Attachments/DetailedAttachment/DetailedMedia.tsx","src/components/Attachments/DetailedAttachment/DetailedAddress.tsx","src/components/Attachments/DetailedAttachment/ShowPhoneNumber.tsx","src/components/Attachments/DetailedAttachment/Map.tsx","src/components/Attachments/DetailedAttachment/Routes.tsx","src/components/Attachments/DetailedAttachment/RoutesItem.tsx","src/utils/getDistanceAsString.ts","src/utils/getTimeAsString.ts","src/components/Icons/MapIcons/index.ts","src/components/Icons/MapIcons/CyclingRegularIcon.tsx","src/components/Icons/MapIcons/DrivingCarIcon.tsx","src/components/Icons/MapIcons/FootWalkingIcon.tsx","src/components/Icons/MapIcons/OpenLocationIcon.tsx","src/components/Icons/MapIcons/TriangleIcon.tsx","src/components/Attachments/DetailedAttachment/MapUser.tsx"],"sourcesContent":["import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'\r\nimport { useSpring, easings } from '@react-spring/web'\r\n\r\nimport { useUtilsStore } from '../Contexts/UtilsContext'\r\nimport { useSpeechStore } from '../Contexts/SpeechContext'\r\nimport { useRetorikStore } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/LocaleContext'\r\nimport { useViewStore } from '../Contexts/ViewContext'\r\nimport { useDirectlineStore } from '../Contexts/DirectlineContext'\r\n\r\nimport useShowPOI from '../../hooks/useShowPOI'\r\n\r\nimport type { POIContentType } from '../../models/attachmentTypes'\r\nimport { getColorFromCategoryId } from '../../utils/getColorFromCategoryId'\r\nimport { Mode, RetorikEvent } from '../../models/enums'\r\nimport preventEvents from '../../utils/preventEvents'\r\n\r\nimport Template from '../Templates/FullScreenRemoteClosing'\r\nimport DetailedTitle from './DetailedAttachment/DetailedTitle'\r\nimport DetailedText from './DetailedAttachment/DetailedText'\r\nimport DetailedMedia from './DetailedAttachment/DetailedMedia'\r\nimport DetailedAddress from './DetailedAttachment/DetailedAddress'\r\nimport DownloadSheet from './DetailedAttachment/DownloadSheet'\r\n\r\nconst springEnterDuration = 1500\r\nconst springLeaveDuration = 2500\r\n\r\nconst AttachmentDetails = (): JSX.Element => {\r\n const detailedItemContent = useShowPOI()\r\n const isRTL = useLocaleStore((state) => state.isRTL)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const isUsedOnBorne = useRetorikStore((state) => state.configuration.isUsedOnBorne)\r\n const baseAddress = useRetorikStore((state) => state.baseAddress)\r\n const mode = useSpeechStore((state) => state.mode)\r\n const useOldRemote = useRetorikStore((state) => state.configuration.useOldRemote)\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isWidget = useViewStore((state) => state.isWidget)\r\n const currentDeviceType = useViewStore((state) => state.currentDeviceType)\r\n const themeColors = useViewStore((state) => state.themeColors)\r\n const closeDetailedPOI = useUtilsStore((state) => state.closeDetailedPOI)\r\n const { setRetorikEvent, setCloseDetailedPOI } = useUtilsStore((state) => state.actions)\r\n const { sendMessage, sendEvent } = useDirectlineStore((state) => state.actions)\r\n\r\n const [content, setContent] = useState<POIContentType | undefined>(undefined)\r\n const [color, setColor] = useState<string>(themeColors.secondary)\r\n const [titleHeight, setTitleHeight] = useState<number>(0)\r\n const [spring, api] = useSpring(() => ({\r\n from: {\r\n transform: 'translateX(0%)'\r\n }\r\n }))\r\n const timerRef = useRef<NodeJS.Timer | null>(null)\r\n const divRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n setContent(detailedItemContent)\r\n if (detailedItemContent) {\r\n setRetorikEvent(RetorikEvent.DetailViewOpen)\r\n }\r\n }, [detailedItemContent])\r\n\r\n useEffect(() => {\r\n closeDetailedPOI && handleClose()\r\n }, [closeDetailedPOI])\r\n\r\n useLayoutEffect(() => {\r\n if (divRef?.current) {\r\n isWidget && preventEvents(null, divRef)\r\n }\r\n })\r\n\r\n useEffect(() => {\r\n if (content) {\r\n if (timerRef.current) {\r\n clearTimeout(timerRef.current)\r\n timerRef.current = null\r\n }\r\n\r\n content.category?.id && setColor(getColorFromCategoryId(content.category.id, themeColors))\r\n api.start({\r\n from: {\r\n transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'\r\n },\r\n to: {\r\n transform: 'translateX(0%)'\r\n },\r\n config: {\r\n duration: springEnterDuration,\r\n easing: easings.easeInBack\r\n }\r\n })\r\n }\r\n }, [content])\r\n\r\n const handleClose = (): void => {\r\n if (!timerRef.current) {\r\n api.start({\r\n from: {\r\n transform: 'translateX(0%)'\r\n },\r\n to: {\r\n transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'\r\n },\r\n config: {\r\n duration: springLeaveDuration,\r\n easing: easings.easeOutExpo\r\n }\r\n })\r\n\r\n setCloseDetailedPOI(false)\r\n setRetorikEvent(RetorikEvent.DetailViewClose)\r\n\r\n timerRef.current = setTimeout(() => {\r\n sendEvent('Davi.CloseWindow', null, () => sendEvent('Davi.CloseWindowDetailed', null))\r\n setContent(undefined)\r\n timerRef.current = null\r\n }, springLeaveDuration)\r\n }\r\n }\r\n\r\n const sendPostBack = (value: any): void => {\r\n sendMessage(undefined, value)\r\n }\r\n\r\n return content ? (\r\n <Template handleClose={handleClose} className={useOldRemote ? 'rf-z-detailedPOI' : 'rf-z-[25]'} closeButtonClassName='rf-z-util' remoteCloseButtonZIndex='rf-z-detailedPOI' animation={spring}>\r\n {/* Window containing data */}\r\n <div ref={divRef} className='rf-relative rf-flex rf-flex-row vertical:rf-flex-col rf-h-full rf-overflow-y-scroll rf-scrollbar-hidden'>\r\n {detailedItemContent?.template ? (\r\n <React.Fragment>\r\n <detailedItemContent.template\r\n props={{\r\n ...content,\r\n locale: locale,\r\n isUsedOnBorne: isUsedOnBorne,\r\n baseAddress: baseAddress,\r\n sendPostBack: sendPostBack\r\n }}\r\n currentDeviceType={currentDeviceType}\r\n handleClose={handleClose}\r\n />\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment>\r\n <div className='rf-px-6 large:rf-px-8 rf-w-2/3 vertical:rf-w-full rf-mb-4 large:rf-mb-0 rf-flex rf-flex-col rf-border-r rf-border-r-silver vertical:rf-border-r-0'>\r\n {/* Title + category */}\r\n <DetailedTitle\r\n category={content.category}\r\n title={content.title}\r\n infoBanner={content.infoBanner}\r\n color={color}\r\n customerReviews={content.customerReviews}\r\n favorite={content.favorite}\r\n handleClose={handleClose}\r\n setTitleHeight={setTitleHeight}\r\n />\r\n <div className='rf-flex rf-flex-col large:rf-flex-row landscape-retorik:rf-h-full'>\r\n {/* Text + other data */}\r\n <DetailedText text={content.text} otherInformations={content.otherInformations} color={color} url={content.downloadUri} titleHeight={titleHeight} />\r\n {/* Media + comment if there is at least one media or comment */}\r\n {(content.media?.length || content.review) && <DetailedMedia media={content.media} review={content.review} color={color} />}\r\n </div>\r\n </div>\r\n <DetailedAddress\r\n address={content.addressStructured}\r\n phoneNumber={content.phoneNumber}\r\n coordinates={content.coordinates}\r\n color={color}\r\n customerReviews={content.customerReviews}\r\n url={content.downloadUri}\r\n />\r\n {isMobile && <div className={mode === Mode.text ? 'rf-mb-28' : 'rf-mb-16'}>{content.downloadUri && <DownloadSheet className='rf-justify-center' url={content.downloadUri} />}</div>}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n </Template>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default AttachmentDetails\r\n","import { useEffect, useState } from 'react'\r\nimport { useActivityStore } from '../components/Contexts/ActivityContext'\r\nimport { useUtilsStore } from '../components/Contexts/UtilsContext'\r\nimport { useLocaleStore } from '../components/Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../components/Contexts/RetorikContext'\r\n\r\nimport type { DetailedAttachmentAction } from '../models/activityTypes'\r\nimport { mapDetailedDataFromContentItem } from '../utils/mapDetailedDataFromContentItem'\r\n\r\nconst useShowPOI = (): any => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const lastBotActivity = useActivityStore((state) => state.lastBotActivity)\r\n const triggers = useUtilsStore((state) => state.detailedAttachmentTriggers)\r\n const baseAddress = useRetorikStore((state) => state.baseAddress)\r\n\r\n const [result, setResult] = useState<any>(undefined)\r\n\r\n useEffect(() => {\r\n let result: any = undefined\r\n\r\n if (lastBotActivity?.value && triggers.length) {\r\n triggers.forEach((trigger: DetailedAttachmentAction) => {\r\n if (lastBotActivity.type === trigger.type) {\r\n if (trigger.name && trigger.name === lastBotActivity.name) {\r\n if (trigger.contentType) {\r\n if (trigger.contentType === lastBotActivity.value?.contentType) {\r\n lastBotActivity.value.content.template = trigger.linkedComponent\r\n result = lastBotActivity.value.content\r\n }\r\n } else {\r\n const data = {\r\n id: lastBotActivity.value?.contentItemId,\r\n content: lastBotActivity.value?.content,\r\n contentType: lastBotActivity.value?.contentType,\r\n baseAddress: baseAddress,\r\n locale: locale\r\n }\r\n const checkData = mapDetailedDataFromContentItem(\r\n data,\r\n translation\r\n )\r\n if (checkData) {\r\n result = { ...checkData, template: trigger.linkedComponent }\r\n } else {\r\n lastBotActivity.value.template = trigger.linkedComponent\r\n result = lastBotActivity.value\r\n }\r\n }\r\n } else if (trigger.label && trigger.label === lastBotActivity.label) {\r\n if (trigger.contentType) {\r\n if (trigger.contentType === lastBotActivity.value?.contentType) {\r\n lastBotActivity.value.content.template = trigger.linkedComponent\r\n result = lastBotActivity.value.content\r\n }\r\n } else {\r\n lastBotActivity.value.template = trigger.linkedComponent\r\n result = lastBotActivity.value\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n setResult(result)\r\n }, [lastBotActivity])\r\n\r\n return result\r\n}\r\n\r\nexport default useShowPOI\r\n","import type {\r\n Coordinates,\r\n POIContentType,\r\n AddressStructured,\r\n Review\r\n} from '../models/attachmentTypes'\r\nimport type { TranslationFile } from '../models/translationsType'\r\n\r\nconst infoBannerContenTypes = ['foodestablishment', 'event']\r\n\r\nconst categoryConversion = {\r\n FoodEstablishment: 'Where to eat',\r\n LodgingBusiness: 'Where to sleep',\r\n TouristDestination: 'What to see',\r\n TouristAttraction: 'What to do',\r\n Product: 'Local products',\r\n Service: 'Services',\r\n Event: 'Events',\r\n City: 'Cities',\r\n Wine: 'Wines'\r\n}\r\n\r\ninterface MappingProps {\r\n id?: string\r\n content: any\r\n contentType?: string\r\n baseAddress: string\r\n locale: string\r\n}\r\n\r\ninterface Category {\r\n id: string\r\n label: string\r\n}\r\n\r\ninterface OtherInformation {\r\n title: string\r\n content: string | Array<string>\r\n}\r\n\r\nconst getCategoryFromContentType = (\r\n contentType: string | undefined,\r\n translation: TranslationFile\r\n): Category | undefined => {\r\n if (contentType) {\r\n if (Object.keys(categoryConversion).includes(contentType)) {\r\n return {\r\n id: categoryConversion[contentType],\r\n label: translation.poi[contentType]\r\n }\r\n }\r\n\r\n return {\r\n id: 'default',\r\n label: contentType\r\n }\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nconst mapDetailedDataFromContentItem = (\r\n data: MappingProps,\r\n translation: TranslationFile\r\n): POIContentType | null => {\r\n if (data.id && data.content) {\r\n try {\r\n const content = data.content\r\n // Process medias\r\n const medias: any = []\r\n content.Thing?.Image?.Paths &&\r\n content.Thing.Image.Paths.length &&\r\n content.Thing?.Image?.Paths?.forEach((path) => {\r\n medias.push({\r\n url: `${data.baseAddress}media/${path}`\r\n })\r\n })\r\n\r\n // Processed address\r\n const address: AddressStructured = {\r\n addressLocality: content.Place?.AddressLocality?.Text || '',\r\n postalCode: content.Place?.PostalCode?.Text || '',\r\n street: content.Place?.StreetAddress?.Text || ''\r\n }\r\n\r\n // Processed coordinates\r\n const coordinates: Coordinates | undefined =\r\n content.Place?.Latitude?.Value && content.Place?.Longitude?.Value\r\n ? {\r\n latitude: content.Place.Latitude.Value,\r\n longitude: content.Place.Longitude.Value\r\n }\r\n : undefined\r\n\r\n // Processed review\r\n const review: Review = {\r\n author:\r\n content.Review?.Author || content.Review?.AuthorCapacity\r\n ? {\r\n name: content.Review?.Author,\r\n capacity: content.Review?.AuthorCapacity\r\n }\r\n : undefined,\r\n comment: content.Review?.ReviewBody || '',\r\n picture: content.Review?.Picture\r\n ? {\r\n url: content.Review.Picture,\r\n description: content.Review.PictureDescription || ''\r\n }\r\n : undefined\r\n }\r\n\r\n // Process other informations\r\n const otherInformations: Array<OtherInformation> = []\r\n // Opening hours\r\n content.LocalBusiness?.OpeningHours?.Text &&\r\n otherInformations.push({\r\n title: translation.poi.openinghours,\r\n content: content.LocalBusiness.OpeningHours.Text\r\n })\r\n // Prices\r\n content.LocalBusiness?.PriceRange?.Text &&\r\n otherInformations.push({\r\n title: translation.poi.prices,\r\n content: content.LocalBusiness.PriceRange.Text\r\n })\r\n // Payment methods\r\n content.LocalBusiness?.PaymentAccepted?.Values &&\r\n content.LocalBusiness.PaymentAccepted.Values.length &&\r\n otherInformations.push({\r\n title: translation.poi.paymentmethods,\r\n content: content.LocalBusiness.PaymentAccepted.Values\r\n })\r\n\r\n // Process information banner\r\n let infoBanner: string | undefined\r\n if (\r\n data.contentType &&\r\n infoBannerContenTypes.includes(data.contentType.toLowerCase())\r\n ) {\r\n switch (data.contentType.toLowerCase()) {\r\n case 'foodestablishment':\r\n content.Place?.MaximumAttendeeCapacity?.Value &&\r\n !isNaN(parseInt(content.Place?.MaximumAttendeeCapacity?.Value)) &&\r\n (infoBanner = `${translation.poi.numberofplaces} ${parseInt(\r\n content.Place?.MaximumAttendeeCapacity?.Value\r\n )}`)\r\n break\r\n case 'event':\r\n if (\r\n content.Event &&\r\n content.Event.StartDate?.Value &&\r\n content.Event.EndDate?.value\r\n ) {\r\n const startDate = new Date(content.Event.StartDate.Value)\r\n const endDate = new Date(content.Event.StartDate.Value)\r\n if (\r\n content.Event.StartDate.Value === content.Event.EndDate.value\r\n ) {\r\n infoBanner = `Le ${startDate.toLocaleDateString(data.locale)}`\r\n } else {\r\n infoBanner = `Du ${startDate.toLocaleDateString(\r\n data.locale\r\n )} au ${endDate.toLocaleDateString(data.locale)}`\r\n }\r\n }\r\n break\r\n }\r\n }\r\n\r\n // Hack for Wines category -> TODO : remove it !\r\n let categoryWineTest = false\r\n const categories = content.Thing?.Categories?.Values\r\n const wineFilters = [\r\n 'Blanc de blanc',\r\n 'Rosé Champagne',\r\n 'Vintages',\r\n 'Cocktail Collection',\r\n 'AUTHIGENE Collection'\r\n ]\r\n\r\n if (categories && categories.length) {\r\n categories.forEach(\r\n (category: string) =>\r\n wineFilters.includes(category) && (categoryWineTest = true)\r\n )\r\n }\r\n\r\n const mappedData: POIContentType = {\r\n identifier: data.id,\r\n title: content.Thing?.Name?.Text?.toString() || '',\r\n text: content.Thing?.Description?.Text?.toString() || '',\r\n addressStructured: address,\r\n contact: content.PointOfInterest?.Contact?.Text?.toString() || '',\r\n phoneNumber: content.Place?.Telephone?.Text\r\n ? content.Place.Telephone.Text.toString()\r\n : '',\r\n category: categoryWineTest\r\n ? {\r\n id: categoryConversion.Wine,\r\n label: translation.poi.Wine\r\n }\r\n : getCategoryFromContentType(content.contentType || data.contentType, translation),\r\n media: medias.length ? medias : undefined,\r\n customerReviews: content.Place?.AggregateRating?.Value,\r\n coordinates: coordinates,\r\n downloadUri: `${data.baseAddress}api/hospitality/${data.id}/pdf`,\r\n favorite: !!content.Thing?.Favorite?.Value,\r\n review: review,\r\n infoBanner: infoBanner,\r\n otherInformations: otherInformations\r\n }\r\n\r\n return mappedData\r\n } catch (e) {\r\n console.log(e)\r\n return null\r\n }\r\n }\r\n\r\n return null\r\n}\r\n\r\nexport { mapDetailedDataFromContentItem }\r\n","import React, { useEffect, useRef } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport { FavoriteIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { BackButton } from '../../Menu/Common'\r\n\r\ntype DetailedTitleProps = {\r\n category?: {\r\n id: string\r\n label: string\r\n }\r\n title?: string\r\n infoBanner?: string\r\n color?: string\r\n customerReviews?: number\r\n favorite?: boolean\r\n handleClose: () => void\r\n setTitleHeight: (x: number) => void\r\n}\r\n\r\nconst DetailedTitle = ({\r\n category,\r\n title,\r\n infoBanner,\r\n color,\r\n customerReviews,\r\n favorite,\r\n handleClose,\r\n setTitleHeight\r\n}: DetailedTitleProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const titleRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n titleRef?.current && setTitleHeight(titleRef.current.clientHeight)\r\n }, [titleRef?.current])\r\n\r\n return (\r\n <div\r\n ref={titleRef}\r\n className='rf-relative rf-pb-4 rf-flex-col rf-items-start rf-justify-center'\r\n >\r\n {/* Category + comments' pennant */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute rf-hidden large-vertical:rf-block rf-top-0 ltr:rf-right-0 rtl:rf-left-0'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n <div className='rf-w-full rf-flex rf-flex-row rf-justify-between ltr:rf-items-start rtl:rf-items-end'>\r\n {isMobile && (\r\n <BackButton\r\n title={translation.common.back}\r\n handleBack={handleClose}\r\n className='rf-relative rf-mt-4 rf-text-size-auto'\r\n />\r\n )}\r\n <div\r\n className='rf-uppercase rf-w-fit rf-py-2 large:rf-py-3 rf-px-4 rf-bg-black rf-text-primary'\r\n style={{ color: color }}\r\n >\r\n {category?.label || 'category'}\r\n </div>\r\n </div>\r\n\r\n {/* 'Favorite' icon + title */}\r\n <div className='rf-py-6 rf-title-large-bold-size-auto large-vertical:rf-pt-[16.67%] rf-flex rf-flex-row rf-items-center rf-font-bold'>\r\n {favorite && (\r\n <FavoriteIcon className='rf-h-16 rf-w-20 ltr:rf-pr-4 rtl:rf-pl-4' />\r\n )}\r\n {title || ''}\r\n </div>\r\n\r\n {/* Informations Banner */}\r\n {infoBanner && (\r\n <div\r\n className='rf-py-1 rf-px-4 rf-subtitle-size-auto rf-bg-primary rf-text-truewhite'\r\n style={{ backgroundColor: color }}\r\n >\r\n {infoBanner}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedTitle\r\n","import React, { useState, useEffect, useRef } from 'react'\r\nimport { CommentsPennantIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\n\r\ntype ComponentsPennantType = {\r\n className?: string\r\n color?: string\r\n customerReviews: number\r\n}\r\n\r\nconst CommentsPennant = ({\r\n className,\r\n color,\r\n customerReviews\r\n}: ComponentsPennantType): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const [widthInPx, setWidthInPx] = useState<number>(0)\r\n const pennantRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (pennantRef.current) {\r\n setWidthInPx(Math.ceil(pennantRef.current.offsetWidth / 2))\r\n }\r\n }, [pennantRef])\r\n\r\n return (\r\n <div\r\n className={`${className} rf-flex rf-flex-col rf-justify-center rf-text-white`}\r\n ref={pennantRef}\r\n >\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-p-2 rf-bg-primary'\r\n style={{ backgroundColor: color }}\r\n >\r\n <CommentsPennantIcon className='rf-w-12 large:rf-w-14 large-vertical:rf-w-16 rf-pb-2' />\r\n <div className='rf-flex-col rf-text-center rf-text-size-auto rf-uppercase'>\r\n {translation.poi.comment.split(' ').map((word, index) => {\r\n return <div key={index}>{word}</div>\r\n })}\r\n </div>\r\n <div className='rf-font-bold rf-subtitle-size-auto'>\r\n {customerReviews}/10\r\n </div>\r\n </div>\r\n <div\r\n className='rf-w-0 rf-h-0 rf-border-t-0 rf-border-x-primary rf-border-b-transparent'\r\n style={{\r\n borderLeftColor: color,\r\n borderRightColor: color,\r\n borderBottomWidth: (widthInPx * 2) / 3,\r\n borderLeftWidth: widthInPx,\r\n borderRightWidth: widthInPx\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CommentsPennant\r\n","import React, { useEffect, useRef, useState, useMemo } from 'react'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\n\r\ntype DetailedTextProps = {\r\n text?: string\r\n otherInformations?: Array<{\r\n title: string\r\n content: string | Array<string>\r\n }>\r\n color?: string\r\n url?: string\r\n titleHeight: number\r\n}\r\n\r\nconst DownloadQRHeight = 200\r\nconst DownloadSheetHeight = 100\r\n\r\nconst DetailedText = ({\r\n text,\r\n otherInformations,\r\n color,\r\n url,\r\n titleHeight\r\n}: DetailedTextProps): JSX.Element => {\r\n const isUsedOnBorne = useRetorikStore(\r\n (state) => state.configuration.isUsedOnBorne\r\n )\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isLandscape = useViewStore((state) => state.isLandscape)\r\n const currentHeight = useViewStore((state) => state.currentHeight)\r\n\r\n const textRef = useRef<HTMLDivElement>(null)\r\n const otherInformationsRef = useRef<HTMLDivElement>(null)\r\n const [opacityStyle, setOpacityStyle] = useState<string | undefined>('')\r\n const [otherOpacityStyle, setOtherOpacityStyle] = useState<\r\n string | undefined\r\n >('')\r\n const processedText = useMemo<string>(() => {\r\n if (text) {\r\n return text.replaceAll('\\n', '<br>')\r\n }\r\n\r\n return ''\r\n }, [text])\r\n\r\n const textContainerMaxHeight = useMemo<number>(() => {\r\n return (\r\n currentHeight -\r\n titleHeight -\r\n (isUsedOnBorne ? DownloadQRHeight : DownloadSheetHeight)\r\n )\r\n }, [titleHeight])\r\n\r\n const [textMaxHeight, setTextMaxHeight] = useState<number>(0)\r\n const [otherInformationsMaxHeight, setOtherInformationsMaxHeight] =\r\n useState<number>(0)\r\n\r\n useEffect(() => {\r\n if (\r\n textRef?.current &&\r\n otherInformationsRef?.current &&\r\n textContainerMaxHeight &&\r\n !isMobile\r\n ) {\r\n const textHeight = isLandscape\r\n ? (textContainerMaxHeight * 58) / 100\r\n : (currentHeight * 30) / 100\r\n\r\n const otherInformationsHeight = isLandscape\r\n ? (textContainerMaxHeight * 40) / 100\r\n : (currentHeight * 18) / 100\r\n\r\n if (textRef.current.scrollHeight > textHeight) {\r\n if (\r\n otherInformationsRef.current.scrollHeight > otherInformationsHeight\r\n ) {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n } else {\r\n setTextMaxHeight(\r\n textContainerMaxHeight - otherInformationsRef.current.scrollHeight\r\n )\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n }\r\n } else if (\r\n otherInformationsRef.current.scrollHeight > otherInformationsHeight\r\n ) {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(\r\n textContainerMaxHeight - textRef.current.scrollHeight\r\n )\r\n } else {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n }\r\n }\r\n }, [textRef?.current, otherInformationsRef?.current, textContainerMaxHeight])\r\n\r\n useEffect(() => {\r\n if (textRef?.current && textMaxHeight) {\r\n if (\r\n !isMobile &&\r\n textRef.current.scrollHeight > textMaxHeight &&\r\n textRef.current.scrollHeight > textRef.current.clientHeight\r\n ) {\r\n handleScroll()\r\n } else {\r\n setOpacityStyle(undefined)\r\n }\r\n }\r\n }, [textRef?.current, textMaxHeight])\r\n\r\n useEffect(() => {\r\n if (otherInformationsRef?.current && otherInformationsMaxHeight) {\r\n if (\r\n !isMobile &&\r\n otherInformationsRef.current.scrollHeight >\r\n otherInformationsMaxHeight &&\r\n otherInformationsRef.current.scrollHeight >\r\n otherInformationsRef.current.clientHeight\r\n ) {\r\n handleOtherScroll()\r\n } else {\r\n setOtherOpacityStyle(undefined)\r\n }\r\n }\r\n }, [otherInformationsRef?.current, otherInformationsMaxHeight])\r\n\r\n /**\r\n * On call :\r\n * - check if textRef.current is defined\r\n * - set opacityStyle state depending on scroll height and current scrolling\r\n */\r\n const handleScroll = (): void => {\r\n if (textRef.current) {\r\n const maxScroll =\r\n textRef.current.scrollHeight - textRef.current.offsetHeight\r\n const percentage = Math.ceil((textRef.current.scrollTop / maxScroll) * 40)\r\n setOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 60 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n const handleOtherScroll = (): void => {\r\n if (otherInformationsRef.current) {\r\n const maxScroll =\r\n otherInformationsRef.current.scrollHeight -\r\n otherInformationsRef.current.offsetHeight\r\n const percentage = Math.ceil(\r\n (otherInformationsRef.current.scrollTop / maxScroll) * 30\r\n )\r\n setOtherOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 70 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div className='rf-flex rf-flex-col large:rf-pr-4 large:rf-min-w-1/2 rf-gap-4'>\r\n <div\r\n className='rf-w-full rf-flex rf-flex-col rf-items-start'\r\n style={{\r\n maxHeight: isLandscape ? textContainerMaxHeight : undefined\r\n }}\r\n >\r\n {processedText && (\r\n <div\r\n ref={textRef}\r\n className='large-vertical:rf-max-h-[30vh] rf-font-medium rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: opacityStyle,\r\n maxHeight: textMaxHeight || undefined\r\n }}\r\n onScroll={handleScroll}\r\n dangerouslySetInnerHTML={{ __html: processedText }}\r\n />\r\n )}\r\n {otherInformations && otherInformations.length > 0 && (\r\n <div\r\n ref={otherInformationsRef}\r\n className='large-vertical:rf-max-h-[18vh] rf-flex rf-flex-col rf-justify-start rf-text-lightgray rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: otherOpacityStyle,\r\n maxHeight: otherInformationsMaxHeight || undefined\r\n }}\r\n onScroll={handleOtherScroll}\r\n >\r\n {otherInformations.map((information, key) => {\r\n const tempContent = Array.isArray(information.content)\r\n ? information.content.join(' | ')\r\n : information.content\r\n const htmlContent = tempContent.replaceAll('\\n', '<br>')\r\n\r\n return (\r\n <React.Fragment key={key}>\r\n <div\r\n className='rf-mt-4'\r\n style={{\r\n color: color || 'rgb(25, 153, 177)'\r\n }}\r\n >\r\n {information.title}\r\n </div>\r\n <div dangerouslySetInnerHTML={{ __html: htmlContent }} />\r\n </React.Fragment>\r\n )\r\n })}\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Downloading button or Qrcode in landscape mode */}\r\n {isLandscape &&\r\n url &&\r\n (isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet url={url} />\r\n ))}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedText\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { DownloadIcon } from '../../Icons/Miscellaneous'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\ninterface DownloadSheetProps {\r\n className?: string\r\n url: string\r\n}\r\n\r\nconst DownloadSheet = ({ className, url }: DownloadSheetProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n\r\n return (\r\n <div className={`${className} rf-w-full rf-flex`}>\r\n <a\r\n href={url}\r\n className='rf-px-5 rf-py-3 rf-h-fit rf-flex rf-flex-row rf-items-center rf-mt-8 rf-mb-16 large:rf-my-0 rf-border-2 rf-border-black rf-rounded-lg hover:rf-bg-truewhite rf-cursor-pointer rf-font-bold'\r\n >\r\n <DownloadIcon className='rf-h-6 rf-w-6 ltr:rf-mr-1 rtl:rf-ml-1' />\r\n {capitalizeFirstLetter(translation.common.downloadsheet, locale)}\r\n </a>\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadSheet\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport QRCode from 'qrcode'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport QRCodeComponent from '../../Utils/QRCodeComponent'\r\nimport PrintingButton from './PrintingButton'\r\nimport { RoundIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface DownloadQRProps {\r\n url: string\r\n}\r\n\r\nconst DownloadQR = ({ url }: DownloadQRProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const enableDocumentPrinting = useRetorikStore(\r\n (state) => state.configuration.enableDocumentPrinting\r\n )\r\n\r\n const [qrCodeData, setQrCodeData] = useState<string | undefined>(undefined)\r\n const imageRef = useRef<HTMLImageElement>(null)\r\n\r\n useEffect(() => {\r\n setQrCodeDataAsync()\r\n }, [])\r\n\r\n const setQrCodeDataAsync = async (): Promise<void> => {\r\n const qrCodeString = await QRCode.toDataURL(url)\r\n setQrCodeData(qrCodeString)\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-flex rf-flex-row rf-items-start'>\r\n {/* Printing button if allowed */}\r\n {enableDocumentPrinting && (\r\n <div className='rf-w-1/2 rf-flex rf-justify-start'>\r\n <PrintingButton url={url} />\r\n </div>\r\n )}\r\n\r\n {/* QR code for download */}\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-text-center rf-gap-2 rf-font-bold rf-text-sm'\r\n style={{\r\n width: enableDocumentPrinting ? '50%' : '100%'\r\n }}\r\n >\r\n <div className='rf-flex rf-flex-row rf-items-start rf-gap-1 rf-italic'>\r\n <RoundIcon />\r\n <div className='rf-w-fit'>\r\n {`${capitalizeFirstLetter(\r\n translation.common.downloadsheetmobile,\r\n locale\r\n )} ${translation.link.scanQR}`}\r\n </div>\r\n </div>\r\n\r\n {qrCodeData && (\r\n <div className='large-vertical:rf-mt-4'>\r\n <QRCodeComponent ref={imageRef} src={qrCodeData} />\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadQR\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useUtilsStore } from '../../Contexts/UtilsContext'\r\nimport { PrintIcon } from '../../Icons/DetailedPOIIcons'\r\nimport PrintingPreview from '../PrintingPreview'\r\n\r\ninterface PrintingButtonProps {\r\n url: string\r\n}\r\n\r\nconst PrintingButton = ({ url }: PrintingButtonProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const setModalFullscreenContent = useUtilsStore(\r\n (state) => state.actions.setModalFullscreenContent\r\n )\r\n\r\n const handleClick = (): void => {\r\n setModalFullscreenContent(\r\n <PrintingPreview url={url} printingAllowed={true} />\r\n )\r\n }\r\n\r\n return (\r\n <button\r\n className='rf-px-4 rf-py-1 rf-flex rf-flex-row rf-items-center rf-gap-2 rf-font-bold rf-text-sm rf-border-2 rf-border-black rf-rounded-lg'\r\n onClick={handleClick}\r\n >\r\n <PrintIcon />\r\n {translation.common.printsheet}\r\n </button>\r\n )\r\n}\r\n\r\nexport default PrintingButton\r\n","import React, { useEffect, useState } from 'react'\r\nimport type { Review } from '../../../models/attachmentTypes'\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { Carousel } from '../../Utils'\r\n\r\ninterface DetailedMediaProps {\r\n media?: [\r\n {\r\n url?: string\r\n title?: string\r\n credits?: string\r\n }\r\n ]\r\n review?: Review\r\n color?: string\r\n}\r\n\r\ninterface Media {\r\n type?: number\r\n url: string\r\n alt?: string\r\n}\r\n\r\nconst DetailedMedia = ({\r\n media,\r\n review,\r\n color\r\n}: DetailedMediaProps): JSX.Element => {\r\n const [landscapeImage, setLandscapeImage] = useState<boolean>(false)\r\n const [carouselMedia, setCarouselMedia] = useState<Array<Media>>([])\r\n\r\n useEffect(() => {\r\n if (media && media.length > 0) {\r\n let tempMedia: Array<Media> = []\r\n media.forEach((med) => {\r\n med.url &&\r\n (tempMedia = [\r\n ...tempMedia,\r\n { url: med.url, alt: med.title || 'media' }\r\n ])\r\n })\r\n setCarouselMedia(tempMedia)\r\n }\r\n }, [media])\r\n\r\n /**\r\n * On review change :\r\n * - check if the review contains a picture url\r\n * - if so, create an Image with this url, and check if its width is larger than its height\r\n * - set landscapeImage state with the result\r\n */\r\n useEffect(() => {\r\n if (review?.picture?.url) {\r\n const getImageData = async (): Promise<void> => {\r\n const image = new Image()\r\n image.onload = (): void => {\r\n setLandscapeImage(image.width > image.height)\r\n }\r\n image.src = review?.picture?.url || ''\r\n }\r\n getImageData()\r\n }\r\n }, [review])\r\n\r\n return (\r\n <div className='large:rf-min-w-1/2 large:rf-pl-4 rf-flex rf-flex-col rf-items-center'>\r\n {/* Image */}\r\n {carouselMedia && carouselMedia.length > 0 && (\r\n <div className='rf-relative rf-flex rf-justify-center rf-align-center rf-w-full rf-aspect-[4/3] rf-mb-4 rf-overflow-hidden'>\r\n <Carousel\r\n className='rf-min-h-full rf-min-w-full rf-object-cover'\r\n medias={carouselMedia}\r\n controls={true}\r\n timer={3000}\r\n color={color}\r\n />\r\n </div>\r\n )}\r\n\r\n {/* Comment data */}\r\n {review && review.comment && (\r\n <div className='rf-w-full rf-p-4 large:rf-mb-4 rf-flex rf-flex-col rf-gap-4 rf-bg-truewhite rf-rounded-lg rf-shadow-[0_3px_6px_#00000029]'>\r\n {/* Comment */}\r\n <div className='rf-text-lightgray'>{review.comment}</div>\r\n\r\n {/* Author image / name / capacity */}\r\n {(review.picture || review.author) && (\r\n <div className='rf-flex rf-flex-row rf-items-center'>\r\n {review.picture && (\r\n <div className='rf-h-12 rf-w-12 rf-min-w-12 large:rf-h-16 large:rf-w-16 large:rf-min-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24 large-vertical:rf-min-w-24 rf-mr-4 rf-flex rf-items-center rf-rounded-half rf-overflow-hidden'>\r\n <img\r\n src={review.picture.url || imageFiles.noimage}\r\n alt={review.picture.description || 'auteur'}\r\n className={\r\n landscapeImage ? 'rf-h-full rf-max-w-none' : 'rf-w-full'\r\n }\r\n />\r\n </div>\r\n )}\r\n {review.author && (\r\n <div className='rf-flex rf-flex-col rf-items-start'>\r\n <p className='rf-font-bold'>\r\n {capitalizeFirstLetter(review.author.name || '')}\r\n </p>\r\n <p className='rf-italic'>\r\n {capitalizeFirstLetter(review.author.capacity || '')}\r\n </p>\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedMedia\r\n","import React from 'react'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\n\r\nimport type {\r\n AddressStructured,\r\n Coordinates\r\n} from '../../../models/attachmentTypes'\r\n\r\nimport ShowPhoneNumber from './ShowPhoneNumber'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport Map from './Map'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\n\r\ntype DetailedAddressProps = {\r\n address?: AddressStructured\r\n phoneNumber?: string\r\n coordinates?: Coordinates\r\n color?: string\r\n customerReviews?: number\r\n url?: string\r\n}\r\n\r\nconst DetailedAddress = ({\r\n address,\r\n phoneNumber,\r\n coordinates,\r\n color,\r\n customerReviews,\r\n url\r\n}: DetailedAddressProps): JSX.Element => {\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isLandscape = useViewStore((state) => state.isLandscape)\r\n const isBorne = useViewStore((state) => state.isBorne)\r\n const currentWidth = useViewStore((state) => state.currentWidth)\r\n const configuration = useRetorikStore((state) => state.configuration)\r\n\r\n return (\r\n <div className='rf-relative rf-w-1/3 vertical:rf-w-full large:rf-bg-truewhite rf-flex rf-flex-col large-vertical:rf-flex-row'>\r\n {/* Pennant with comments */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute large-vertical:rf-hidden rf-top-0 rf-left-1/2 rf--translate-x-1/2'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n\r\n {/* Address + phone number */}\r\n <div\r\n className={`rf-px-6 rf-flex rf-flex-col large-vertical:rf-w-1/2 rf-items-center rf-text-center ${\r\n customerReviews\r\n ? isBorne\r\n ? 'rf-bg-truewhite rf-justify-center'\r\n : 'rf-bg-truewhite rf-justify-start'\r\n : 'rf-justify-center'\r\n }`}\r\n style={{\r\n height: isMobile\r\n ? customerReviews\r\n ? currentWidth\r\n : undefined\r\n : isLandscape\r\n ? coordinates && coordinates.latitude && coordinates.longitude\r\n ? '50%'\r\n : '100%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <div\r\n className={\r\n customerReviews && !isBorne\r\n ? isLandscape\r\n ? 'rf-pt-[26vh] rf-pb-12'\r\n : 'rf-pt-11/20 rf-pb-12'\r\n : 'rf-py-12'\r\n }\r\n >\r\n {address && (\r\n <React.Fragment>\r\n {address.street && <div>{address.street}</div>}\r\n {address.addressLocality && (\r\n <div>\r\n {address.postalCode\r\n ? `${address.postalCode} ${address.addressLocality}`\r\n : address.addressLocality}\r\n </div>\r\n )}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n {phoneNumber && <ShowPhoneNumber phoneNumber={phoneNumber} />}\r\n\r\n {/* QRcode to download data in borne mode */}\r\n {coordinates &&\r\n coordinates.latitude &&\r\n coordinates.longitude &&\r\n isBorne &&\r\n url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n\r\n {/* Map if coordinates are given / download button in borne mode if no coordinate */}\r\n {coordinates && coordinates.latitude && coordinates.longitude ? (\r\n <div\r\n className='rf-relative large-vertical:rf-w-1/2'\r\n style={{\r\n height: isMobile\r\n ? currentWidth\r\n : isLandscape\r\n ? '50%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <Map\r\n latitude={coordinates.latitude}\r\n longitude={coordinates.longitude}\r\n color={color}\r\n />\r\n </div>\r\n ) : isBorne ? (\r\n <div className='rf-flex rf-justify-center rf-items-center rf-h-[calc(50vw-3rem)] rf-w-1/2'>\r\n {url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedAddress\r\n","import React from 'react'\r\nimport { PhoneIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface ShowPhoneNumberPorps {\r\n phoneNumber: string\r\n}\r\n\r\nconst ShowPhoneNumber = ({\r\n phoneNumber\r\n}: ShowPhoneNumberPorps): JSX.Element => {\r\n return (\r\n <div className='rf-px-5 rf-py-3 rf-mb-8 rf-flex rf-flex-row rf-items-center rf-font-bold'>\r\n <PhoneIcon className='rf-h-6 rf-w-6 ltr:rf-mr-2 rtl:rf-ml-2' />\r\n {phoneNumber}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ShowPhoneNumber\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport { useSpring, animated } from '@react-spring/web'\r\nimport { MapContainer, TileLayer, Marker, GeoJSON } from 'react-leaflet'\r\nimport type { FeatureCollection } from 'geojson'\r\nimport type { GeoJSON as GeoJSONType } from 'leaflet'\r\nimport L from 'leaflet'\r\nimport { markerShadow } from '../../../models/urlEncodedImages'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport Routes from './Routes'\r\nimport MapUser from './MapUser'\r\nimport QRCodeComponent from '../../Utils/QRCodeComponent'\r\nimport CloseButton from '../../Common/CloseButton'\r\nimport { RoundIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface MapProps {\r\n latitude: number\r\n longitude: number\r\n color?: string\r\n}\r\n\r\nconst userIcon = L.icon({\r\n iconUrl: `${imageFiles.mapDeparture}`,\r\n shadowUrl: markerShadow,\r\n iconSize: [32, 41],\r\n iconAnchor: [16, 41]\r\n})\r\n\r\nconst springDuration = 500\r\n\r\nconst Map = ({ latitude, longitude, color }: MapProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const configuration = useRetorikStore((state) => state.configuration)\r\n\r\n const [mapLayerData, setMapLayerData] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const geoJsonLayer = useRef<GeoJSONType | null>(null)\r\n const coordinates =\r\n configuration.position?.latitude && configuration.position?.longitude\r\n ? [\r\n [configuration.position.longitude, configuration.position.latitude],\r\n [longitude, latitude]\r\n ]\r\n : undefined\r\n const [qrCodeUrl, setQrCodeUrl] = useState<string | null>()\r\n\r\n const fadeInTimerRef = useRef<NodeJS.Timer | null>(null)\r\n const [spring, api] = useSpring(() => ({\r\n from: {\r\n opacity: 0\r\n }\r\n }))\r\n\r\n useEffect(() => {\r\n if (geoJsonLayer.current) {\r\n mapLayerData && geoJsonLayer.current.clearLayers().addData(mapLayerData)\r\n }\r\n }, [mapLayerData])\r\n\r\n useEffect(() => {\r\n qrCodeUrl &&\r\n api.start({\r\n from: {\r\n opacity: 0\r\n },\r\n to: {\r\n opacity: 1\r\n },\r\n config: {\r\n duration: springDuration\r\n }\r\n })\r\n\r\n return () => {\r\n fadeInTimerRef?.current && clearTimeout(fadeInTimerRef.current)\r\n }\r\n }, [qrCodeUrl])\r\n\r\n const handleCloseQrCode = (): void => {\r\n api.start({\r\n from: {\r\n opacity: 1\r\n },\r\n to: {\r\n opacity: 0\r\n },\r\n config: {\r\n duration: springDuration\r\n }\r\n })\r\n\r\n fadeInTimerRef?.current && clearTimeout(fadeInTimerRef.current)\r\n fadeInTimerRef.current = setTimeout(() => {\r\n setQrCodeUrl(null)\r\n }, springDuration)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <MapContainer\r\n center={[latitude, longitude]}\r\n zoom={12}\r\n scrollWheelZoom={false}\r\n style={{ height: '100%', width: '100%', zIndex: 0 }}\r\n attributionControl={false}\r\n >\r\n <TileLayer url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' />\r\n <Marker position={[latitude, longitude]} />\r\n {configuration.position?.latitude &&\r\n configuration.position?.longitude && (\r\n <Marker\r\n position={[\r\n configuration.position.latitude,\r\n configuration.position.longitude\r\n ]}\r\n icon={userIcon}\r\n />\r\n )}\r\n {mapLayerData && <GeoJSON ref={geoJsonLayer} data={mapLayerData} />}\r\n <MapUser\r\n configurationPosition={[\r\n configuration.position?.latitude || latitude,\r\n configuration.position?.longitude || longitude\r\n ]}\r\n coordinates={[latitude, longitude]}\r\n data={mapLayerData}\r\n />\r\n </MapContainer>\r\n\r\n {/* Available routes if there are origin and destination coordinates */}\r\n {coordinates && (\r\n <Routes\r\n coordinates={coordinates}\r\n setMapLayerData={setMapLayerData}\r\n color={color}\r\n setQrCodeUrl={setQrCodeUrl}\r\n />\r\n )}\r\n\r\n {/* QRcode covering the map in borne mode */}\r\n {qrCodeUrl && (\r\n <animated.div\r\n className='rf-absolute rf-h-full rf-w-full rf-top-0 rf-left-0 rf-z-ui rf-flex rf-flex-col rf-justify-center rf-items-center rf-gap-4 rf-text-truewhite'\r\n style={{\r\n background: 'rgba(18,18,18,0.7)',\r\n ...spring\r\n }}\r\n >\r\n <CloseButton onClick={handleCloseQrCode} showLabel={false} />\r\n <div className='rf-flex rf-flex-row rf-items-start rf-gap-1 rf-text-truewhite rf-italic'>\r\n <RoundIcon className='rf-h-4 rf-mt-[0.2rem]' color='#FFF' />\r\n <div className='rf-w-fit rf-flex rf-flex-col rf-items-center'>\r\n <div>\r\n {capitalizeFirstLetter(translation.poi.openroutemobile, locale)}\r\n </div>\r\n <div>{translation.link.scanQR}</div>\r\n </div>\r\n </div>\r\n <QRCodeComponent src={qrCodeUrl} />\r\n </animated.div>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Map\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport QRCode from 'qrcode'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport {\r\n openRoute,\r\n openRouteAPIKey,\r\n googleMapsAddress\r\n} from '../../../models/constants'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport RoutesItem from './RoutesItem'\r\nimport { OpenLocationIcon } from '../../Icons/MapIcons'\r\n\r\ninterface RoutesProps {\r\n coordinates: number[][]\r\n setMapLayerData: (data: FeatureCollection | undefined) => void\r\n color?: string\r\n setQrCodeUrl: (url: string) => void\r\n}\r\n\r\nconst Routes = ({\r\n coordinates,\r\n setMapLayerData,\r\n color,\r\n setQrCodeUrl\r\n}: RoutesProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const isUsedOnBorne = useRetorikStore(\r\n (state) => state.configuration.isUsedOnBorne\r\n )\r\n\r\n const [drivingCar, setDrivingCar] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [cyclingRegular, setCyclingRegular] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const [footWalking, setFootWalking] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [currentChosen, setCurrentChosen] = useState<string | undefined>(\r\n undefined\r\n )\r\n\r\n const travelModeRef = useRef<string>()\r\n\r\n /**\r\n * On component mount :\r\n * - call methods to retrieve data from openroute API\r\n */\r\n useEffect(() => {\r\n calculateForProfile('driving-car')\r\n calculateForProfile('cycling-regular')\r\n calculateForProfile('foot-walking')\r\n }, [])\r\n\r\n /**\r\n * On currentChosen state change :\r\n * - switch on currentChosen value to display the associated data on the map\r\n */\r\n useEffect(() => {\r\n switch (currentChosen) {\r\n case 'drivingCar':\r\n drivingCar && drivingCar.features && setMapLayerData(drivingCar)\r\n travelModeRef.current = 'driving'\r\n break\r\n case 'cyclingRegular':\r\n cyclingRegular &&\r\n cyclingRegular.features &&\r\n setMapLayerData(cyclingRegular)\r\n travelModeRef.current = 'bicycling'\r\n break\r\n case 'footWalking':\r\n footWalking && footWalking.features && setMapLayerData(footWalking)\r\n travelModeRef.current = 'walking'\r\n break\r\n default:\r\n break\r\n }\r\n }, [currentChosen])\r\n\r\n /**\r\n * On drivingCar state change :\r\n * - if driving car data were retrieved and no course has been chosen, set currentChosen state to 'driving-car'\r\n */\r\n useEffect(() => {\r\n drivingCar && !currentChosen && setCurrentChosen('drivingCar')\r\n }, [drivingCar])\r\n\r\n /**\r\n * On call :\r\n * - call the openroute API to retrieve data for the current course\r\n * @param profile : string\r\n */\r\n const calculateForProfile = async (profile: string): Promise<void> => {\r\n const url = `${openRoute}/${profile}/geojson`\r\n const data = await fetch(url, {\r\n method: 'POST',\r\n headers: {\r\n Authorization: openRouteAPIKey,\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify({ coordinates: coordinates })\r\n })\r\n .then((result) => {\r\n return result.json()\r\n })\r\n .catch(() => {\r\n return null\r\n })\r\n\r\n if (data && !data.error) {\r\n switch (profile) {\r\n case 'driving-car':\r\n setDrivingCar(data)\r\n break\r\n case 'cycling-regular':\r\n setCyclingRegular(data)\r\n break\r\n case 'foot-walking':\r\n setFootWalking(data)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n const handleClick = async (): Promise<void> => {\r\n if (travelModeRef?.current && coordinates.length === 2) {\r\n // Create an URL to Google Maps with coordinates and travelling mode\r\n const coordinatesInUrl = `origin=${coordinates[0][1]},${coordinates[0][0]}&destination=${coordinates[1][1]},${coordinates[1][0]}`\r\n const fullUrl = `${googleMapsAddress}${coordinatesInUrl}&travelmode=${travelModeRef.current}`\r\n\r\n if (isUsedOnBorne) {\r\n const url = await QRCode.toDataURL(fullUrl)\r\n setQrCodeUrl(url)\r\n } else {\r\n // If we are not on a borne, open a new tab in browser\r\n window.open(fullUrl, '_blank')\r\n }\r\n }\r\n }\r\n\r\n return drivingCar || cyclingRegular || footWalking ? (\r\n <div className='rf-absolute rf-bottom-2 rf-w-full rf-flex rf-flex-row rf-gap-4 rf-justify-center'>\r\n {/* Data per choice : Car / Cycle / Foot */}\r\n <div className='rf-grid rf-grid-cols-routes rf-pl-6 rf-pr-4 rf-py-2 rf-gap-4 rf-rounded-lg rf-bg-truewhite ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-shadow-[0_6px_6px_#00000029]'>\r\n <RoutesItem\r\n summary={{\r\n type: 'drivingCar',\r\n distance: drivingCar?.features?.length\r\n ? drivingCar.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: drivingCar?.features?.length\r\n ? drivingCar.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'drivingCar'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'cyclingRegular',\r\n distance: cyclingRegular?.features?.length\r\n ? cyclingRegular.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: cyclingRegular?.features?.length\r\n ? cyclingRegular.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'cyclingRegular'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'footWalking',\r\n distance: footWalking?.features?.length\r\n ? footWalking.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: footWalking?.features?.length\r\n ? footWalking.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'footWalking'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n </div>\r\n\r\n {/* Redirection button */}\r\n <button\r\n className='rf-aspect-square rf-w-3/20 rf-min-w-3/20 rf-max-w-3/20 large:rf-w-1/8 large:rf-min-w-1/8 large:rf-max-w-1/8 rf-overflow-y-hidden rf-p-1 rf-flex rf-flex-col rf-justify-evenly rf-items-center rf-border-2 rf-border-trueblack rf-rounded-lg rf-font-bold ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-bg-truewhite'\r\n onClick={handleClick}\r\n >\r\n <OpenLocationIcon className='rf-w-5 rf-h-5' />\r\n {capitalizeFirstLetter(translation.poi.route, locale)}\r\n </button>\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Routes\r\n","import React from 'react'\r\nimport getDistanceAsString from '../../../utils/getDistanceAsString'\r\nimport getTimeAsString from '../../../utils/getTimeAsString'\r\nimport * as Icons from '../../Icons/MapIcons'\r\n\r\ninterface Summary {\r\n type: string\r\n distance?: number\r\n duration?: number\r\n}\r\n\r\ninterface RoutesItemProps {\r\n summary: Summary\r\n chosen?: boolean\r\n color?: string\r\n onClick: (type: string) => void\r\n}\r\n\r\nconst RoutesItem = ({\r\n summary,\r\n chosen,\r\n color,\r\n onClick\r\n}: RoutesItemProps): JSX.Element => {\r\n return (\r\n <div\r\n className='rf-flex rf-flex-col rf-justify-end hover:rf-cursor-pointer'\r\n onClick={(): void => onClick(summary.type)}\r\n >\r\n <div className='rf-h-full rf-flex rf-flex-row rf-gap-3 rf-items-center'>\r\n <div className='rf-relative rf-flex rf-justify-center rf-items-center'>\r\n {/* Colored circle + triangle atop */}\r\n <div\r\n className='rf-absolute rf-w-9 rf-h-9 rf-rounded-max'\r\n style={{\r\n backgroundColor: chosen ? color : '#EFEDF0'\r\n }}\r\n />\r\n <div className='rf-absolute rf-w-full -rf-top-[1.15rem] rf-flex rf-justify-center'>\r\n <Icons.TriangleIcon\r\n className='rf-w-2 rf-h-2'\r\n color={chosen ? color : 'transparent'}\r\n />\r\n </div>\r\n\r\n {summary.type === 'drivingCar' && (\r\n <Icons.DrivingCarIcon\r\n className='rf-w-5 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n {summary.type === 'cyclingRegular' && (\r\n <Icons.CyclingRegularIcon\r\n className='rf-w-6 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n {summary.type === 'footWalking' && (\r\n <Icons.FootWalkingIcon\r\n className='rf-w-6 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n </div>\r\n <div className='rf-flex rf-flex-col rf-justify-center rf-items-start'>\r\n {/* Duration */}\r\n <div className='rf-whitespace-nowrap rf-font-bold'>\r\n {getTimeAsString(summary?.duration)}\r\n </div>\r\n\r\n {/* Distance */}\r\n <div className='rf-whitespace-nowrap'>\r\n {getDistanceAsString(summary?.distance)}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default RoutesItem\r\n","const getDistanceAsString = (distance: number | undefined): string => {\r\n if (typeof distance !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (distance <= 0) return '0 m'\r\n if (distance < 1) return `${distance * 100} cm`\r\n if (distance < 1000) return `${distance} m`\r\n if (distance >= 1000) return `${(Math.ceil(distance / 1000) * 10) / 10} km`\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getDistanceAsString\r\n","const getTimeAsString = (time: number | undefined): string => {\r\n if (typeof time !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (time < 1) return 'NC'\r\n if (time < 60) return `${time} s`\r\n if (time < 3600) return `${Math.ceil(time / 60)} min`\r\n if (time === 3600) return `1 h`\r\n if (time > 3600) {\r\n const hours = Math.floor(time / 3600)\r\n const minutes = Math.ceil((time - hours * 3600) / 60)\r\n return `${hours} h ${\r\n minutes === 60 ? 59 : minutes < 10 ? `0${minutes}` : minutes\r\n }`\r\n }\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getTimeAsString\r\n","import CyclingRegularIcon from './CyclingRegularIcon'\r\nimport DrivingCarIcon from './DrivingCarIcon'\r\nimport FootWalkingIcon from './FootWalkingIcon'\r\nimport OpenLocationIcon from './OpenLocationIcon'\r\nimport TriangleIcon from './TriangleIcon'\r\n\r\nexport {\r\n CyclingRegularIcon,\r\n DrivingCarIcon,\r\n FootWalkingIcon,\r\n OpenLocationIcon,\r\n TriangleIcon\r\n}\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst CyclingRegularIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <g transform='translate(0.5 -1.484)'>\r\n <path\r\n d='M20.5,6.789a2.645,2.645,0,1,0-2.645-2.645A2.653,2.653,0,0,0,20.5,6.789Zm-13.885,8.6a6.612,6.612,0,1,0,0,13.224,6.612,6.612,0,1,0,0-13.224Zm0,11.24a4.628,4.628,0,1,1,0-9.257,4.628,4.628,0,1,1,0,9.257ZM14.282,13.4l3.174-3.174,1.058,1.058a9.264,9.264,0,0,0,6.744,2.777V11.418A6.57,6.57,0,0,1,20.5,9.434L17.984,6.922a3.242,3.242,0,0,0-2.116-.793,2.219,2.219,0,0,0-1.851.793l-3.7,3.7a2.611,2.611,0,0,0-.793,1.851,2.219,2.219,0,0,0,.793,1.851l4.232,3.7v6.612h2.645v-8.2Zm10.843,1.984A6.612,6.612,0,1,0,31.737,22,6.548,6.548,0,0,0,25.125,15.385Zm0,11.24A4.628,4.628,0,1,1,29.753,22,4.685,4.685,0,0,1,25.125,26.625Z'\r\n transform='translate(0 0.484)'\r\n fill={color || '#fff'}\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default CyclingRegularIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst DrivingCarIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n id='car'\r\n d='M32.385,71.254H28.507L27.43,68.559A7.217,7.217,0,0,0,20.7,64H12.471a7.219,7.219,0,0,0-6.735,4.559L4.658,71.254H.781a.777.777,0,0,0-.754.966l.389,1.554a.777.777,0,0,0,.754.589h1.3a4.116,4.116,0,0,0-1.43,3.109V80.58A4.111,4.111,0,0,0,2.076,83.3v3.5a2.073,2.073,0,0,0,2.072,2.072H6.221A2.073,2.073,0,0,0,8.293,86.8V84.725h16.58V86.8a2.073,2.073,0,0,0,2.072,2.072h2.072A2.073,2.073,0,0,0,31.09,86.8V83.3a4.109,4.109,0,0,0,1.036-2.716V77.471A4.118,4.118,0,0,0,30.7,74.362H32a.777.777,0,0,0,.754-.589l.389-1.554a.778.778,0,0,0-.754-.966ZM9.584,70.1a3.109,3.109,0,0,1,2.887-1.954H20.7A3.109,3.109,0,0,1,23.582,70.1l1.291,3.227H8.293ZM6.221,80.567a2.066,2.066,0,1,1,0-4.132,3.987,3.987,0,0,1,3.109,3.1c0,1.24-1.865,1.033-3.109,1.033Zm20.725,0c-1.243,0-3.109.207-3.109-1.033a3.987,3.987,0,0,1,3.109-3.1,2.066,2.066,0,1,1,0,4.132Z'\r\n transform='translate(0.501 -63.5)'\r\n fill={color || '#fff'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default DrivingCarIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FootWalkingIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='-6 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n d='M11.4,5.249A2.625,2.625,0,1,0,8.772,2.625,2.625,2.625,0,0,0,11.4,5.249ZM16.564,13.4l-1.274-.645-.53-1.608A5.962,5.962,0,0,0,9.171,7c-1.968-.005-3.057.552-5.1,1.378A5.216,5.216,0,0,0,1.352,10.9l-.366.744a1.755,1.755,0,0,0,.776,2.346,1.726,1.726,0,0,0,2.324-.782l.366-.744a1.738,1.738,0,0,1,.9-.842l1.465-.591-.831,3.319A3.512,3.512,0,0,0,6.8,17.568l3.275,3.576a3.529,3.529,0,0,1,.815,1.515l1,4.008a1.75,1.75,0,0,0,3.4-.848l-1.214-4.866a3.5,3.5,0,0,0-.815-1.515l-2.488-2.718.94-3.756.3.9a3.487,3.487,0,0,0,1.733,2.023l1.274.645a1.726,1.726,0,0,0,2.324-.782,1.77,1.77,0,0,0-.782-2.351ZM4.048,21.1a3.393,3.393,0,0,1-.776,1.176L.538,25.01a1.75,1.75,0,1,0,2.472,2.477l3.248-3.248a3.554,3.554,0,0,0,.776-1.176l.738-1.848c-3.024-3.3-2.116-2.286-2.592-2.936L4.048,21.1Z'\r\n transform='translate(0.612 0.5)'\r\n fill={color || '#fff'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FootWalkingIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst OpenLocationIcon = ({ className }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 29.771 29.771'\r\n className={className || 'rf-w-6 rf-h-6'}\r\n >\r\n <path d='M29.771,0,0,14.886l11.164,3.721,3.721,11.164Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default OpenLocationIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst TriangleIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 16 12'\r\n className={className || 'rf-w-3 rf-h-3'}\r\n >\r\n <path\r\n d='M6.336,2.5a2,2,0,0,1,3.328,0l4.263,6.394A2,2,0,0,1,12.263,12H3.737A2,2,0,0,1,2.073,8.891Z'\r\n fill={color || 'transparent'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default TriangleIcon\r\n","import React, { useEffect } from 'react'\r\nimport { useMap } from 'react-leaflet'\r\nimport type { LatLngTuple } from 'leaflet'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\ntype MapUserProps = {\r\n configurationPosition: LatLngTuple\r\n coordinates: LatLngTuple\r\n data: FeatureCollection | undefined\r\n}\r\n\r\nconst MapUser = ({\r\n configurationPosition,\r\n coordinates,\r\n data\r\n}: MapUserProps): JSX.Element => {\r\n const map = useMap()\r\n\r\n useEffect(() => {\r\n if (configurationPosition !== coordinates) {\r\n const coords1: LatLngTuple = [...configurationPosition]\r\n const coords2: LatLngTuple = [...coordinates]\r\n if (configurationPosition[0] > coordinates[0]) {\r\n coords2[0] -= (configurationPosition[0] - coordinates[0]) / 2\r\n } else {\r\n coords1[0] -= (coordinates[0] - configurationPosition[0]) / 2\r\n }\r\n\r\n map.flyToBounds([coords1, coords2])\r\n } else {\r\n map.flyToBounds([configurationPosition, coordinates])\r\n }\r\n }, [data])\r\n\r\n return <React.Fragment />\r\n}\r\n\r\nexport default MapUser\r\n"],"names":[],"version":3,"file":"AttachmentDetail.cfd86776.js.map","sourceRoot":"../"}
@@ -138,8 +138,7 @@ const $cccd6edc9ecbde88$var$AttachmentDetails = ()=>{
138
138
  setCloseDetailedPOI(false);
139
139
  setRetorikEvent((0, $4ucVo.RetorikEvent).DetailViewClose);
140
140
  timerRef.current = setTimeout(()=>{
141
- sendEvent('Davi.CloseWindow', null);
142
- sendEvent('Davi.CloseWindowDetailed', null);
141
+ sendEvent('Davi.CloseWindow', null, ()=>sendEvent('Davi.CloseWindowDetailed', null));
143
142
  setContent(undefined);
144
143
  timerRef.current = null;
145
144
  }, $cccd6edc9ecbde88$var$springLeaveDuration);
@@ -1729,4 +1728,4 @@ var $9333337694b0d9a4$export$2e2bcd8739ae039 = $9333337694b0d9a4$var$MapUser;
1729
1728
 
1730
1729
 
1731
1730
 
1732
- //# sourceMappingURL=AttachmentDetail.c6c297df.js.map
1731
+ //# sourceMappingURL=AttachmentDetail.fdcd1737.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,4CAAsB;AAC5B,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,GAAG,WAAW,CAAC,EAAE,AAAD,IAAK;iBAE5D,OAAO,CAAC,EAAE,IAAI,AAAC,CAAA,WAAW,CAAC,EAAE,GAAG,qBAAqB,CAAC,EAAE,AAAD,IAAK;YAG9D,IAAI,WAAW,CAAC;gBAAC;gBAAS;aAAQ;QACpC,OACE,IAAI,WAAW,CAAC;YAAC;YAAuB;SAAY;IAExD,GAAG;QAAC;KAAK;IAET,qBAAO,gBAAC,CAAA,GAAA,YAAI,EAAE,QAAQ;AACxB;IAEA,2CAAe","sources":["src/components/Attachments/AttachmentDetail.tsx","src/hooks/useShowPOI.ts","src/utils/mapDetailedDataFromContentItem.ts","src/components/Attachments/DetailedAttachment/DetailedTitle.tsx","src/components/Attachments/DetailedAttachment/CommentsPennant.tsx","src/components/Attachments/DetailedAttachment/DetailedText.tsx","src/components/Attachments/DetailedAttachment/DownloadSheet.tsx","src/components/Attachments/DetailedAttachment/DownloadQR.tsx","src/components/Attachments/DetailedAttachment/PrintingButton.tsx","src/components/Attachments/DetailedAttachment/DetailedMedia.tsx","src/components/Attachments/DetailedAttachment/DetailedAddress.tsx","src/components/Attachments/DetailedAttachment/ShowPhoneNumber.tsx","src/components/Attachments/DetailedAttachment/Map.tsx","src/components/Attachments/DetailedAttachment/Routes.tsx","src/components/Attachments/DetailedAttachment/RoutesItem.tsx","src/utils/getDistanceAsString.ts","src/utils/getTimeAsString.ts","src/components/Icons/MapIcons/index.ts","src/components/Icons/MapIcons/CyclingRegularIcon.tsx","src/components/Icons/MapIcons/DrivingCarIcon.tsx","src/components/Icons/MapIcons/FootWalkingIcon.tsx","src/components/Icons/MapIcons/OpenLocationIcon.tsx","src/components/Icons/MapIcons/TriangleIcon.tsx","src/components/Attachments/DetailedAttachment/MapUser.tsx"],"sourcesContent":["import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'\r\nimport { useSpring, easings } from '@react-spring/web'\r\n\r\nimport { useUtilsStore } from '../Contexts/UtilsContext'\r\nimport { useSpeechStore } from '../Contexts/SpeechContext'\r\nimport { useRetorikStore } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/LocaleContext'\r\nimport { useViewStore } from '../Contexts/ViewContext'\r\nimport { useDirectlineStore } from '../Contexts/DirectlineContext'\r\n\r\nimport useShowPOI from '../../hooks/useShowPOI'\r\n\r\nimport type { POIContentType } from '../../models/attachmentTypes'\r\nimport { getColorFromCategoryId } from '../../utils/getColorFromCategoryId'\r\nimport { Mode, RetorikEvent } from '../../models/enums'\r\nimport preventEvents from '../../utils/preventEvents'\r\n\r\nimport Template from '../Templates/FullScreenRemoteClosing'\r\nimport DetailedTitle from './DetailedAttachment/DetailedTitle'\r\nimport DetailedText from './DetailedAttachment/DetailedText'\r\nimport DetailedMedia from './DetailedAttachment/DetailedMedia'\r\nimport DetailedAddress from './DetailedAttachment/DetailedAddress'\r\nimport DownloadSheet from './DetailedAttachment/DownloadSheet'\r\n\r\nconst springEnterDuration = 1500\r\nconst springLeaveDuration = 2500\r\n\r\nconst AttachmentDetails = (): JSX.Element => {\r\n const detailedItemContent = useShowPOI()\r\n const isRTL = useLocaleStore((state) => state.isRTL)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const isUsedOnBorne = useRetorikStore((state) => state.configuration.isUsedOnBorne)\r\n const baseAddress = useRetorikStore((state) => state.baseAddress)\r\n const mode = useSpeechStore((state) => state.mode)\r\n const useOldRemote = useRetorikStore((state) => state.configuration.useOldRemote)\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isWidget = useViewStore((state) => state.isWidget)\r\n const currentDeviceType = useViewStore((state) => state.currentDeviceType)\r\n const themeColors = useViewStore((state) => state.themeColors)\r\n const closeDetailedPOI = useUtilsStore((state) => state.closeDetailedPOI)\r\n const { setRetorikEvent, setCloseDetailedPOI } = useUtilsStore((state) => state.actions)\r\n const { sendMessage, sendEvent } = useDirectlineStore((state) => state.actions)\r\n\r\n const [content, setContent] = useState<POIContentType | undefined>(undefined)\r\n const [color, setColor] = useState<string>(themeColors.secondary)\r\n const [titleHeight, setTitleHeight] = useState<number>(0)\r\n const [spring, api] = useSpring(() => ({\r\n from: {\r\n transform: 'translateX(0%)'\r\n }\r\n }))\r\n const timerRef = useRef<NodeJS.Timer | null>(null)\r\n const divRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n setContent(detailedItemContent)\r\n if (detailedItemContent) {\r\n setRetorikEvent(RetorikEvent.DetailViewOpen)\r\n }\r\n }, [detailedItemContent])\r\n\r\n useEffect(() => {\r\n closeDetailedPOI && handleClose()\r\n }, [closeDetailedPOI])\r\n\r\n useLayoutEffect(() => {\r\n if (divRef?.current) {\r\n isWidget && preventEvents(null, divRef)\r\n }\r\n })\r\n\r\n useEffect(() => {\r\n if (content) {\r\n if (timerRef.current) {\r\n clearTimeout(timerRef.current)\r\n timerRef.current = null\r\n }\r\n\r\n content.category?.id && setColor(getColorFromCategoryId(content.category.id, themeColors))\r\n api.start({\r\n from: {\r\n transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'\r\n },\r\n to: {\r\n transform: 'translateX(0%)'\r\n },\r\n config: {\r\n duration: springEnterDuration,\r\n easing: easings.easeInBack\r\n }\r\n })\r\n }\r\n }, [content])\r\n\r\n const handleClose = (): void => {\r\n if (!timerRef.current) {\r\n api.start({\r\n from: {\r\n transform: 'translateX(0%)'\r\n },\r\n to: {\r\n transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'\r\n },\r\n config: {\r\n duration: springLeaveDuration,\r\n easing: easings.easeOutExpo\r\n }\r\n })\r\n\r\n setCloseDetailedPOI(false)\r\n setRetorikEvent(RetorikEvent.DetailViewClose)\r\n\r\n timerRef.current = setTimeout(() => {\r\n sendEvent('Davi.CloseWindow', null, () => sendEvent('Davi.CloseWindowDetailed', null))\r\n setContent(undefined)\r\n timerRef.current = null\r\n }, springLeaveDuration)\r\n }\r\n }\r\n\r\n const sendPostBack = (value: any): void => {\r\n sendMessage(undefined, value)\r\n }\r\n\r\n return content ? (\r\n <Template handleClose={handleClose} className={useOldRemote ? 'rf-z-detailedPOI' : 'rf-z-[25]'} closeButtonClassName='rf-z-util' remoteCloseButtonZIndex='rf-z-detailedPOI' animation={spring}>\r\n {/* Window containing data */}\r\n <div ref={divRef} className='rf-relative rf-flex rf-flex-row vertical:rf-flex-col rf-h-full rf-overflow-y-scroll rf-scrollbar-hidden'>\r\n {detailedItemContent?.template ? (\r\n <React.Fragment>\r\n <detailedItemContent.template\r\n props={{\r\n ...content,\r\n locale: locale,\r\n isUsedOnBorne: isUsedOnBorne,\r\n baseAddress: baseAddress,\r\n sendPostBack: sendPostBack\r\n }}\r\n currentDeviceType={currentDeviceType}\r\n handleClose={handleClose}\r\n />\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment>\r\n <div className='rf-px-6 large:rf-px-8 rf-w-2/3 vertical:rf-w-full rf-mb-4 large:rf-mb-0 rf-flex rf-flex-col rf-border-r rf-border-r-silver vertical:rf-border-r-0'>\r\n {/* Title + category */}\r\n <DetailedTitle\r\n category={content.category}\r\n title={content.title}\r\n infoBanner={content.infoBanner}\r\n color={color}\r\n customerReviews={content.customerReviews}\r\n favorite={content.favorite}\r\n handleClose={handleClose}\r\n setTitleHeight={setTitleHeight}\r\n />\r\n <div className='rf-flex rf-flex-col large:rf-flex-row landscape-retorik:rf-h-full'>\r\n {/* Text + other data */}\r\n <DetailedText text={content.text} otherInformations={content.otherInformations} color={color} url={content.downloadUri} titleHeight={titleHeight} />\r\n {/* Media + comment if there is at least one media or comment */}\r\n {(content.media?.length || content.review) && <DetailedMedia media={content.media} review={content.review} color={color} />}\r\n </div>\r\n </div>\r\n <DetailedAddress\r\n address={content.addressStructured}\r\n phoneNumber={content.phoneNumber}\r\n coordinates={content.coordinates}\r\n color={color}\r\n customerReviews={content.customerReviews}\r\n url={content.downloadUri}\r\n />\r\n {isMobile && <div className={mode === Mode.text ? 'rf-mb-28' : 'rf-mb-16'}>{content.downloadUri && <DownloadSheet className='rf-justify-center' url={content.downloadUri} />}</div>}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n </Template>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default AttachmentDetails\r\n","import { useEffect, useState } from 'react'\r\nimport { useActivityStore } from '../components/Contexts/ActivityContext'\r\nimport { useUtilsStore } from '../components/Contexts/UtilsContext'\r\nimport { useLocaleStore } from '../components/Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../components/Contexts/RetorikContext'\r\n\r\nimport type { DetailedAttachmentAction } from '../models/activityTypes'\r\nimport { mapDetailedDataFromContentItem } from '../utils/mapDetailedDataFromContentItem'\r\n\r\nconst useShowPOI = (): any => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const lastBotActivity = useActivityStore((state) => state.lastBotActivity)\r\n const triggers = useUtilsStore((state) => state.detailedAttachmentTriggers)\r\n const baseAddress = useRetorikStore((state) => state.baseAddress)\r\n\r\n const [result, setResult] = useState<any>(undefined)\r\n\r\n useEffect(() => {\r\n let result: any = undefined\r\n\r\n if (lastBotActivity?.value && triggers.length) {\r\n triggers.forEach((trigger: DetailedAttachmentAction) => {\r\n if (lastBotActivity.type === trigger.type) {\r\n if (trigger.name && trigger.name === lastBotActivity.name) {\r\n if (trigger.contentType) {\r\n if (trigger.contentType === lastBotActivity.value?.contentType) {\r\n lastBotActivity.value.content.template = trigger.linkedComponent\r\n result = lastBotActivity.value.content\r\n }\r\n } else {\r\n const data = {\r\n id: lastBotActivity.value?.contentItemId,\r\n content: lastBotActivity.value?.content,\r\n contentType: lastBotActivity.value?.contentType,\r\n baseAddress: baseAddress,\r\n locale: locale\r\n }\r\n const checkData = mapDetailedDataFromContentItem(\r\n data,\r\n translation\r\n )\r\n if (checkData) {\r\n result = { ...checkData, template: trigger.linkedComponent }\r\n } else {\r\n lastBotActivity.value.template = trigger.linkedComponent\r\n result = lastBotActivity.value\r\n }\r\n }\r\n } else if (trigger.label && trigger.label === lastBotActivity.label) {\r\n if (trigger.contentType) {\r\n if (trigger.contentType === lastBotActivity.value?.contentType) {\r\n lastBotActivity.value.content.template = trigger.linkedComponent\r\n result = lastBotActivity.value.content\r\n }\r\n } else {\r\n lastBotActivity.value.template = trigger.linkedComponent\r\n result = lastBotActivity.value\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n setResult(result)\r\n }, [lastBotActivity])\r\n\r\n return result\r\n}\r\n\r\nexport default useShowPOI\r\n","import type {\r\n Coordinates,\r\n POIContentType,\r\n AddressStructured,\r\n Review\r\n} from '../models/attachmentTypes'\r\nimport type { TranslationFile } from '../models/translationsType'\r\n\r\nconst infoBannerContenTypes = ['foodestablishment', 'event']\r\n\r\nconst categoryConversion = {\r\n FoodEstablishment: 'Where to eat',\r\n LodgingBusiness: 'Where to sleep',\r\n TouristDestination: 'What to see',\r\n TouristAttraction: 'What to do',\r\n Product: 'Local products',\r\n Service: 'Services',\r\n Event: 'Events',\r\n City: 'Cities',\r\n Wine: 'Wines'\r\n}\r\n\r\ninterface MappingProps {\r\n id?: string\r\n content: any\r\n contentType?: string\r\n baseAddress: string\r\n locale: string\r\n}\r\n\r\ninterface Category {\r\n id: string\r\n label: string\r\n}\r\n\r\ninterface OtherInformation {\r\n title: string\r\n content: string | Array<string>\r\n}\r\n\r\nconst getCategoryFromContentType = (\r\n contentType: string | undefined,\r\n translation: TranslationFile\r\n): Category | undefined => {\r\n if (contentType) {\r\n if (Object.keys(categoryConversion).includes(contentType)) {\r\n return {\r\n id: categoryConversion[contentType],\r\n label: translation.poi[contentType]\r\n }\r\n }\r\n\r\n return {\r\n id: 'default',\r\n label: contentType\r\n }\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nconst mapDetailedDataFromContentItem = (\r\n data: MappingProps,\r\n translation: TranslationFile\r\n): POIContentType | null => {\r\n if (data.id && data.content) {\r\n try {\r\n const content = data.content\r\n // Process medias\r\n const medias: any = []\r\n content.Thing?.Image?.Paths &&\r\n content.Thing.Image.Paths.length &&\r\n content.Thing?.Image?.Paths?.forEach((path) => {\r\n medias.push({\r\n url: `${data.baseAddress}media/${path}`\r\n })\r\n })\r\n\r\n // Processed address\r\n const address: AddressStructured = {\r\n addressLocality: content.Place?.AddressLocality?.Text || '',\r\n postalCode: content.Place?.PostalCode?.Text || '',\r\n street: content.Place?.StreetAddress?.Text || ''\r\n }\r\n\r\n // Processed coordinates\r\n const coordinates: Coordinates | undefined =\r\n content.Place?.Latitude?.Value && content.Place?.Longitude?.Value\r\n ? {\r\n latitude: content.Place.Latitude.Value,\r\n longitude: content.Place.Longitude.Value\r\n }\r\n : undefined\r\n\r\n // Processed review\r\n const review: Review = {\r\n author:\r\n content.Review?.Author || content.Review?.AuthorCapacity\r\n ? {\r\n name: content.Review?.Author,\r\n capacity: content.Review?.AuthorCapacity\r\n }\r\n : undefined,\r\n comment: content.Review?.ReviewBody || '',\r\n picture: content.Review?.Picture\r\n ? {\r\n url: content.Review.Picture,\r\n description: content.Review.PictureDescription || ''\r\n }\r\n : undefined\r\n }\r\n\r\n // Process other informations\r\n const otherInformations: Array<OtherInformation> = []\r\n // Opening hours\r\n content.LocalBusiness?.OpeningHours?.Text &&\r\n otherInformations.push({\r\n title: translation.poi.openinghours,\r\n content: content.LocalBusiness.OpeningHours.Text\r\n })\r\n // Prices\r\n content.LocalBusiness?.PriceRange?.Text &&\r\n otherInformations.push({\r\n title: translation.poi.prices,\r\n content: content.LocalBusiness.PriceRange.Text\r\n })\r\n // Payment methods\r\n content.LocalBusiness?.PaymentAccepted?.Values &&\r\n content.LocalBusiness.PaymentAccepted.Values.length &&\r\n otherInformations.push({\r\n title: translation.poi.paymentmethods,\r\n content: content.LocalBusiness.PaymentAccepted.Values\r\n })\r\n\r\n // Process information banner\r\n let infoBanner: string | undefined\r\n if (\r\n data.contentType &&\r\n infoBannerContenTypes.includes(data.contentType.toLowerCase())\r\n ) {\r\n switch (data.contentType.toLowerCase()) {\r\n case 'foodestablishment':\r\n content.Place?.MaximumAttendeeCapacity?.Value &&\r\n !isNaN(parseInt(content.Place?.MaximumAttendeeCapacity?.Value)) &&\r\n (infoBanner = `${translation.poi.numberofplaces} ${parseInt(\r\n content.Place?.MaximumAttendeeCapacity?.Value\r\n )}`)\r\n break\r\n case 'event':\r\n if (\r\n content.Event &&\r\n content.Event.StartDate?.Value &&\r\n content.Event.EndDate?.value\r\n ) {\r\n const startDate = new Date(content.Event.StartDate.Value)\r\n const endDate = new Date(content.Event.StartDate.Value)\r\n if (\r\n content.Event.StartDate.Value === content.Event.EndDate.value\r\n ) {\r\n infoBanner = `Le ${startDate.toLocaleDateString(data.locale)}`\r\n } else {\r\n infoBanner = `Du ${startDate.toLocaleDateString(\r\n data.locale\r\n )} au ${endDate.toLocaleDateString(data.locale)}`\r\n }\r\n }\r\n break\r\n }\r\n }\r\n\r\n // Hack for Wines category -> TODO : remove it !\r\n let categoryWineTest = false\r\n const categories = content.Thing?.Categories?.Values\r\n const wineFilters = [\r\n 'Blanc de blanc',\r\n 'Rosé Champagne',\r\n 'Vintages',\r\n 'Cocktail Collection',\r\n 'AUTHIGENE Collection'\r\n ]\r\n\r\n if (categories && categories.length) {\r\n categories.forEach(\r\n (category: string) =>\r\n wineFilters.includes(category) && (categoryWineTest = true)\r\n )\r\n }\r\n\r\n const mappedData: POIContentType = {\r\n identifier: data.id,\r\n title: content.Thing?.Name?.Text?.toString() || '',\r\n text: content.Thing?.Description?.Text?.toString() || '',\r\n addressStructured: address,\r\n contact: content.PointOfInterest?.Contact?.Text?.toString() || '',\r\n phoneNumber: content.Place?.Telephone?.Text\r\n ? content.Place.Telephone.Text.toString()\r\n : '',\r\n category: categoryWineTest\r\n ? {\r\n id: categoryConversion.Wine,\r\n label: translation.poi.Wine\r\n }\r\n : getCategoryFromContentType(content.contentType || data.contentType, translation),\r\n media: medias.length ? medias : undefined,\r\n customerReviews: content.Place?.AggregateRating?.Value,\r\n coordinates: coordinates,\r\n downloadUri: `${data.baseAddress}api/hospitality/${data.id}/pdf`,\r\n favorite: !!content.Thing?.Favorite?.Value,\r\n review: review,\r\n infoBanner: infoBanner,\r\n otherInformations: otherInformations\r\n }\r\n\r\n return mappedData\r\n } catch (e) {\r\n console.log(e)\r\n return null\r\n }\r\n }\r\n\r\n return null\r\n}\r\n\r\nexport { mapDetailedDataFromContentItem }\r\n","import React, { useEffect, useRef } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport { FavoriteIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { BackButton } from '../../Menu/Common'\r\n\r\ntype DetailedTitleProps = {\r\n category?: {\r\n id: string\r\n label: string\r\n }\r\n title?: string\r\n infoBanner?: string\r\n color?: string\r\n customerReviews?: number\r\n favorite?: boolean\r\n handleClose: () => void\r\n setTitleHeight: (x: number) => void\r\n}\r\n\r\nconst DetailedTitle = ({\r\n category,\r\n title,\r\n infoBanner,\r\n color,\r\n customerReviews,\r\n favorite,\r\n handleClose,\r\n setTitleHeight\r\n}: DetailedTitleProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const titleRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n titleRef?.current && setTitleHeight(titleRef.current.clientHeight)\r\n }, [titleRef?.current])\r\n\r\n return (\r\n <div\r\n ref={titleRef}\r\n className='rf-relative rf-pb-4 rf-flex-col rf-items-start rf-justify-center'\r\n >\r\n {/* Category + comments' pennant */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute rf-hidden large-vertical:rf-block rf-top-0 ltr:rf-right-0 rtl:rf-left-0'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n <div className='rf-w-full rf-flex rf-flex-row rf-justify-between ltr:rf-items-start rtl:rf-items-end'>\r\n {isMobile && (\r\n <BackButton\r\n title={translation.common.back}\r\n handleBack={handleClose}\r\n className='rf-relative rf-mt-4 rf-text-size-auto'\r\n />\r\n )}\r\n <div\r\n className='rf-uppercase rf-w-fit rf-py-2 large:rf-py-3 rf-px-4 rf-bg-black rf-text-primary'\r\n style={{ color: color }}\r\n >\r\n {category?.label || 'category'}\r\n </div>\r\n </div>\r\n\r\n {/* 'Favorite' icon + title */}\r\n <div className='rf-py-6 rf-title-large-bold-size-auto large-vertical:rf-pt-[16.67%] rf-flex rf-flex-row rf-items-center rf-font-bold'>\r\n {favorite && (\r\n <FavoriteIcon className='rf-h-16 rf-w-20 ltr:rf-pr-4 rtl:rf-pl-4' />\r\n )}\r\n {title || ''}\r\n </div>\r\n\r\n {/* Informations Banner */}\r\n {infoBanner && (\r\n <div\r\n className='rf-py-1 rf-px-4 rf-subtitle-size-auto rf-bg-primary rf-text-truewhite'\r\n style={{ backgroundColor: color }}\r\n >\r\n {infoBanner}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedTitle\r\n","import React, { useState, useEffect, useRef } from 'react'\r\nimport { CommentsPennantIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\n\r\ntype ComponentsPennantType = {\r\n className?: string\r\n color?: string\r\n customerReviews: number\r\n}\r\n\r\nconst CommentsPennant = ({\r\n className,\r\n color,\r\n customerReviews\r\n}: ComponentsPennantType): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const [widthInPx, setWidthInPx] = useState<number>(0)\r\n const pennantRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (pennantRef.current) {\r\n setWidthInPx(Math.ceil(pennantRef.current.offsetWidth / 2))\r\n }\r\n }, [pennantRef])\r\n\r\n return (\r\n <div\r\n className={`${className} rf-flex rf-flex-col rf-justify-center rf-text-white`}\r\n ref={pennantRef}\r\n >\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-p-2 rf-bg-primary'\r\n style={{ backgroundColor: color }}\r\n >\r\n <CommentsPennantIcon className='rf-w-12 large:rf-w-14 large-vertical:rf-w-16 rf-pb-2' />\r\n <div className='rf-flex-col rf-text-center rf-text-size-auto rf-uppercase'>\r\n {translation.poi.comment.split(' ').map((word, index) => {\r\n return <div key={index}>{word}</div>\r\n })}\r\n </div>\r\n <div className='rf-font-bold rf-subtitle-size-auto'>\r\n {customerReviews}/10\r\n </div>\r\n </div>\r\n <div\r\n className='rf-w-0 rf-h-0 rf-border-t-0 rf-border-x-primary rf-border-b-transparent'\r\n style={{\r\n borderLeftColor: color,\r\n borderRightColor: color,\r\n borderBottomWidth: (widthInPx * 2) / 3,\r\n borderLeftWidth: widthInPx,\r\n borderRightWidth: widthInPx\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CommentsPennant\r\n","import React, { useEffect, useRef, useState, useMemo } from 'react'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\n\r\ntype DetailedTextProps = {\r\n text?: string\r\n otherInformations?: Array<{\r\n title: string\r\n content: string | Array<string>\r\n }>\r\n color?: string\r\n url?: string\r\n titleHeight: number\r\n}\r\n\r\nconst DownloadQRHeight = 200\r\nconst DownloadSheetHeight = 100\r\n\r\nconst DetailedText = ({\r\n text,\r\n otherInformations,\r\n color,\r\n url,\r\n titleHeight\r\n}: DetailedTextProps): JSX.Element => {\r\n const isUsedOnBorne = useRetorikStore(\r\n (state) => state.configuration.isUsedOnBorne\r\n )\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isLandscape = useViewStore((state) => state.isLandscape)\r\n const currentHeight = useViewStore((state) => state.currentHeight)\r\n\r\n const textRef = useRef<HTMLDivElement>(null)\r\n const otherInformationsRef = useRef<HTMLDivElement>(null)\r\n const [opacityStyle, setOpacityStyle] = useState<string | undefined>('')\r\n const [otherOpacityStyle, setOtherOpacityStyle] = useState<\r\n string | undefined\r\n >('')\r\n const processedText = useMemo<string>(() => {\r\n if (text) {\r\n return text.replaceAll('\\n', '<br>')\r\n }\r\n\r\n return ''\r\n }, [text])\r\n\r\n const textContainerMaxHeight = useMemo<number>(() => {\r\n return (\r\n currentHeight -\r\n titleHeight -\r\n (isUsedOnBorne ? DownloadQRHeight : DownloadSheetHeight)\r\n )\r\n }, [titleHeight])\r\n\r\n const [textMaxHeight, setTextMaxHeight] = useState<number>(0)\r\n const [otherInformationsMaxHeight, setOtherInformationsMaxHeight] =\r\n useState<number>(0)\r\n\r\n useEffect(() => {\r\n if (\r\n textRef?.current &&\r\n otherInformationsRef?.current &&\r\n textContainerMaxHeight &&\r\n !isMobile\r\n ) {\r\n const textHeight = isLandscape\r\n ? (textContainerMaxHeight * 58) / 100\r\n : (currentHeight * 30) / 100\r\n\r\n const otherInformationsHeight = isLandscape\r\n ? (textContainerMaxHeight * 40) / 100\r\n : (currentHeight * 18) / 100\r\n\r\n if (textRef.current.scrollHeight > textHeight) {\r\n if (\r\n otherInformationsRef.current.scrollHeight > otherInformationsHeight\r\n ) {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n } else {\r\n setTextMaxHeight(\r\n textContainerMaxHeight - otherInformationsRef.current.scrollHeight\r\n )\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n }\r\n } else if (\r\n otherInformationsRef.current.scrollHeight > otherInformationsHeight\r\n ) {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(\r\n textContainerMaxHeight - textRef.current.scrollHeight\r\n )\r\n } else {\r\n setTextMaxHeight(textHeight)\r\n setOtherInformationsMaxHeight(otherInformationsHeight)\r\n }\r\n }\r\n }, [textRef?.current, otherInformationsRef?.current, textContainerMaxHeight])\r\n\r\n useEffect(() => {\r\n if (textRef?.current && textMaxHeight) {\r\n if (\r\n !isMobile &&\r\n textRef.current.scrollHeight > textMaxHeight &&\r\n textRef.current.scrollHeight > textRef.current.clientHeight\r\n ) {\r\n handleScroll()\r\n } else {\r\n setOpacityStyle(undefined)\r\n }\r\n }\r\n }, [textRef?.current, textMaxHeight])\r\n\r\n useEffect(() => {\r\n if (otherInformationsRef?.current && otherInformationsMaxHeight) {\r\n if (\r\n !isMobile &&\r\n otherInformationsRef.current.scrollHeight >\r\n otherInformationsMaxHeight &&\r\n otherInformationsRef.current.scrollHeight >\r\n otherInformationsRef.current.clientHeight\r\n ) {\r\n handleOtherScroll()\r\n } else {\r\n setOtherOpacityStyle(undefined)\r\n }\r\n }\r\n }, [otherInformationsRef?.current, otherInformationsMaxHeight])\r\n\r\n /**\r\n * On call :\r\n * - check if textRef.current is defined\r\n * - set opacityStyle state depending on scroll height and current scrolling\r\n */\r\n const handleScroll = (): void => {\r\n if (textRef.current) {\r\n const maxScroll =\r\n textRef.current.scrollHeight - textRef.current.offsetHeight\r\n const percentage = Math.ceil((textRef.current.scrollTop / maxScroll) * 40)\r\n setOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 60 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n const handleOtherScroll = (): void => {\r\n if (otherInformationsRef.current) {\r\n const maxScroll =\r\n otherInformationsRef.current.scrollHeight -\r\n otherInformationsRef.current.offsetHeight\r\n const percentage = Math.ceil(\r\n (otherInformationsRef.current.scrollTop / maxScroll) * 30\r\n )\r\n setOtherOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 70 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div className='rf-flex rf-flex-col large:rf-pr-4 large:rf-min-w-1/2 rf-gap-4'>\r\n <div\r\n className='rf-w-full rf-flex rf-flex-col rf-items-start'\r\n style={{\r\n maxHeight: isLandscape ? textContainerMaxHeight : undefined\r\n }}\r\n >\r\n {processedText && (\r\n <div\r\n ref={textRef}\r\n className='large-vertical:rf-max-h-[30vh] rf-font-medium rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: opacityStyle,\r\n maxHeight: textMaxHeight || undefined\r\n }}\r\n onScroll={handleScroll}\r\n dangerouslySetInnerHTML={{ __html: processedText }}\r\n />\r\n )}\r\n {otherInformations && otherInformations.length > 0 && (\r\n <div\r\n ref={otherInformationsRef}\r\n className='large-vertical:rf-max-h-[18vh] rf-flex rf-flex-col rf-justify-start rf-text-lightgray rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: otherOpacityStyle,\r\n maxHeight: otherInformationsMaxHeight || undefined\r\n }}\r\n onScroll={handleOtherScroll}\r\n >\r\n {otherInformations.map((information, key) => {\r\n const tempContent = Array.isArray(information.content)\r\n ? information.content.join(' | ')\r\n : information.content\r\n const htmlContent = tempContent.replaceAll('\\n', '<br>')\r\n\r\n return (\r\n <React.Fragment key={key}>\r\n <div\r\n className='rf-mt-4'\r\n style={{\r\n color: color || 'rgb(25, 153, 177)'\r\n }}\r\n >\r\n {information.title}\r\n </div>\r\n <div dangerouslySetInnerHTML={{ __html: htmlContent }} />\r\n </React.Fragment>\r\n )\r\n })}\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Downloading button or Qrcode in landscape mode */}\r\n {isLandscape &&\r\n url &&\r\n (isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet url={url} />\r\n ))}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedText\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { DownloadIcon } from '../../Icons/Miscellaneous'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\ninterface DownloadSheetProps {\r\n className?: string\r\n url: string\r\n}\r\n\r\nconst DownloadSheet = ({ className, url }: DownloadSheetProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n\r\n return (\r\n <div className={`${className} rf-w-full rf-flex`}>\r\n <a\r\n href={url}\r\n className='rf-px-5 rf-py-3 rf-h-fit rf-flex rf-flex-row rf-items-center rf-mt-8 rf-mb-16 large:rf-my-0 rf-border-2 rf-border-black rf-rounded-lg hover:rf-bg-truewhite rf-cursor-pointer rf-font-bold'\r\n >\r\n <DownloadIcon className='rf-h-6 rf-w-6 ltr:rf-mr-1 rtl:rf-ml-1' />\r\n {capitalizeFirstLetter(translation.common.downloadsheet, locale)}\r\n </a>\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadSheet\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport QRCode from 'qrcode'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport QRCodeComponent from '../../Utils/QRCodeComponent'\r\nimport PrintingButton from './PrintingButton'\r\nimport { RoundIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface DownloadQRProps {\r\n url: string\r\n}\r\n\r\nconst DownloadQR = ({ url }: DownloadQRProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const enableDocumentPrinting = useRetorikStore(\r\n (state) => state.configuration.enableDocumentPrinting\r\n )\r\n\r\n const [qrCodeData, setQrCodeData] = useState<string | undefined>(undefined)\r\n const imageRef = useRef<HTMLImageElement>(null)\r\n\r\n useEffect(() => {\r\n setQrCodeDataAsync()\r\n }, [])\r\n\r\n const setQrCodeDataAsync = async (): Promise<void> => {\r\n const qrCodeString = await QRCode.toDataURL(url)\r\n setQrCodeData(qrCodeString)\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-flex rf-flex-row rf-items-start'>\r\n {/* Printing button if allowed */}\r\n {enableDocumentPrinting && (\r\n <div className='rf-w-1/2 rf-flex rf-justify-start'>\r\n <PrintingButton url={url} />\r\n </div>\r\n )}\r\n\r\n {/* QR code for download */}\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-text-center rf-gap-2 rf-font-bold rf-text-sm'\r\n style={{\r\n width: enableDocumentPrinting ? '50%' : '100%'\r\n }}\r\n >\r\n <div className='rf-flex rf-flex-row rf-items-start rf-gap-1 rf-italic'>\r\n <RoundIcon />\r\n <div className='rf-w-fit'>\r\n {`${capitalizeFirstLetter(\r\n translation.common.downloadsheetmobile,\r\n locale\r\n )} ${translation.link.scanQR}`}\r\n </div>\r\n </div>\r\n\r\n {qrCodeData && (\r\n <div className='large-vertical:rf-mt-4'>\r\n <QRCodeComponent ref={imageRef} src={qrCodeData} />\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadQR\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useUtilsStore } from '../../Contexts/UtilsContext'\r\nimport { PrintIcon } from '../../Icons/DetailedPOIIcons'\r\nimport PrintingPreview from '../PrintingPreview'\r\n\r\ninterface PrintingButtonProps {\r\n url: string\r\n}\r\n\r\nconst PrintingButton = ({ url }: PrintingButtonProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const setModalFullscreenContent = useUtilsStore(\r\n (state) => state.actions.setModalFullscreenContent\r\n )\r\n\r\n const handleClick = (): void => {\r\n setModalFullscreenContent(\r\n <PrintingPreview url={url} printingAllowed={true} />\r\n )\r\n }\r\n\r\n return (\r\n <button\r\n className='rf-px-4 rf-py-1 rf-flex rf-flex-row rf-items-center rf-gap-2 rf-font-bold rf-text-sm rf-border-2 rf-border-black rf-rounded-lg'\r\n onClick={handleClick}\r\n >\r\n <PrintIcon />\r\n {translation.common.printsheet}\r\n </button>\r\n )\r\n}\r\n\r\nexport default PrintingButton\r\n","import React, { useEffect, useState } from 'react'\r\nimport type { Review } from '../../../models/attachmentTypes'\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { Carousel } from '../../Utils'\r\n\r\ninterface DetailedMediaProps {\r\n media?: [\r\n {\r\n url?: string\r\n title?: string\r\n credits?: string\r\n }\r\n ]\r\n review?: Review\r\n color?: string\r\n}\r\n\r\ninterface Media {\r\n type?: number\r\n url: string\r\n alt?: string\r\n}\r\n\r\nconst DetailedMedia = ({\r\n media,\r\n review,\r\n color\r\n}: DetailedMediaProps): JSX.Element => {\r\n const [landscapeImage, setLandscapeImage] = useState<boolean>(false)\r\n const [carouselMedia, setCarouselMedia] = useState<Array<Media>>([])\r\n\r\n useEffect(() => {\r\n if (media && media.length > 0) {\r\n let tempMedia: Array<Media> = []\r\n media.forEach((med) => {\r\n med.url &&\r\n (tempMedia = [\r\n ...tempMedia,\r\n { url: med.url, alt: med.title || 'media' }\r\n ])\r\n })\r\n setCarouselMedia(tempMedia)\r\n }\r\n }, [media])\r\n\r\n /**\r\n * On review change :\r\n * - check if the review contains a picture url\r\n * - if so, create an Image with this url, and check if its width is larger than its height\r\n * - set landscapeImage state with the result\r\n */\r\n useEffect(() => {\r\n if (review?.picture?.url) {\r\n const getImageData = async (): Promise<void> => {\r\n const image = new Image()\r\n image.onload = (): void => {\r\n setLandscapeImage(image.width > image.height)\r\n }\r\n image.src = review?.picture?.url || ''\r\n }\r\n getImageData()\r\n }\r\n }, [review])\r\n\r\n return (\r\n <div className='large:rf-min-w-1/2 large:rf-pl-4 rf-flex rf-flex-col rf-items-center'>\r\n {/* Image */}\r\n {carouselMedia && carouselMedia.length > 0 && (\r\n <div className='rf-relative rf-flex rf-justify-center rf-align-center rf-w-full rf-aspect-[4/3] rf-mb-4 rf-overflow-hidden'>\r\n <Carousel\r\n className='rf-min-h-full rf-min-w-full rf-object-cover'\r\n medias={carouselMedia}\r\n controls={true}\r\n timer={3000}\r\n color={color}\r\n />\r\n </div>\r\n )}\r\n\r\n {/* Comment data */}\r\n {review && review.comment && (\r\n <div className='rf-w-full rf-p-4 large:rf-mb-4 rf-flex rf-flex-col rf-gap-4 rf-bg-truewhite rf-rounded-lg rf-shadow-[0_3px_6px_#00000029]'>\r\n {/* Comment */}\r\n <div className='rf-text-lightgray'>{review.comment}</div>\r\n\r\n {/* Author image / name / capacity */}\r\n {(review.picture || review.author) && (\r\n <div className='rf-flex rf-flex-row rf-items-center'>\r\n {review.picture && (\r\n <div className='rf-h-12 rf-w-12 rf-min-w-12 large:rf-h-16 large:rf-w-16 large:rf-min-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24 large-vertical:rf-min-w-24 rf-mr-4 rf-flex rf-items-center rf-rounded-half rf-overflow-hidden'>\r\n <img\r\n src={review.picture.url || imageFiles.noimage}\r\n alt={review.picture.description || 'auteur'}\r\n className={\r\n landscapeImage ? 'rf-h-full rf-max-w-none' : 'rf-w-full'\r\n }\r\n />\r\n </div>\r\n )}\r\n {review.author && (\r\n <div className='rf-flex rf-flex-col rf-items-start'>\r\n <p className='rf-font-bold'>\r\n {capitalizeFirstLetter(review.author.name || '')}\r\n </p>\r\n <p className='rf-italic'>\r\n {capitalizeFirstLetter(review.author.capacity || '')}\r\n </p>\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedMedia\r\n","import React from 'react'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\nimport { useViewStore } from '../../Contexts/ViewContext'\r\n\r\nimport type {\r\n AddressStructured,\r\n Coordinates\r\n} from '../../../models/attachmentTypes'\r\n\r\nimport ShowPhoneNumber from './ShowPhoneNumber'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport Map from './Map'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\n\r\ntype DetailedAddressProps = {\r\n address?: AddressStructured\r\n phoneNumber?: string\r\n coordinates?: Coordinates\r\n color?: string\r\n customerReviews?: number\r\n url?: string\r\n}\r\n\r\nconst DetailedAddress = ({\r\n address,\r\n phoneNumber,\r\n coordinates,\r\n color,\r\n customerReviews,\r\n url\r\n}: DetailedAddressProps): JSX.Element => {\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const isLandscape = useViewStore((state) => state.isLandscape)\r\n const isBorne = useViewStore((state) => state.isBorne)\r\n const currentWidth = useViewStore((state) => state.currentWidth)\r\n const configuration = useRetorikStore((state) => state.configuration)\r\n\r\n return (\r\n <div className='rf-relative rf-w-1/3 vertical:rf-w-full large:rf-bg-truewhite rf-flex rf-flex-col large-vertical:rf-flex-row'>\r\n {/* Pennant with comments */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute large-vertical:rf-hidden rf-top-0 rf-left-1/2 rf--translate-x-1/2'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n\r\n {/* Address + phone number */}\r\n <div\r\n className={`rf-px-6 rf-flex rf-flex-col large-vertical:rf-w-1/2 rf-items-center rf-text-center ${\r\n customerReviews\r\n ? isBorne\r\n ? 'rf-bg-truewhite rf-justify-center'\r\n : 'rf-bg-truewhite rf-justify-start'\r\n : 'rf-justify-center'\r\n }`}\r\n style={{\r\n height: isMobile\r\n ? customerReviews\r\n ? currentWidth\r\n : undefined\r\n : isLandscape\r\n ? coordinates && coordinates.latitude && coordinates.longitude\r\n ? '50%'\r\n : '100%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <div\r\n className={\r\n customerReviews && !isBorne\r\n ? isLandscape\r\n ? 'rf-pt-[26vh] rf-pb-12'\r\n : 'rf-pt-11/20 rf-pb-12'\r\n : 'rf-py-12'\r\n }\r\n >\r\n {address && (\r\n <React.Fragment>\r\n {address.street && <div>{address.street}</div>}\r\n {address.addressLocality && (\r\n <div>\r\n {address.postalCode\r\n ? `${address.postalCode} ${address.addressLocality}`\r\n : address.addressLocality}\r\n </div>\r\n )}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n {phoneNumber && <ShowPhoneNumber phoneNumber={phoneNumber} />}\r\n\r\n {/* QRcode to download data in borne mode */}\r\n {coordinates &&\r\n coordinates.latitude &&\r\n coordinates.longitude &&\r\n isBorne &&\r\n url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n\r\n {/* Map if coordinates are given / download button in borne mode if no coordinate */}\r\n {coordinates && coordinates.latitude && coordinates.longitude ? (\r\n <div\r\n className='rf-relative large-vertical:rf-w-1/2'\r\n style={{\r\n height: isMobile\r\n ? currentWidth\r\n : isLandscape\r\n ? '50%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <Map\r\n latitude={coordinates.latitude}\r\n longitude={coordinates.longitude}\r\n color={color}\r\n />\r\n </div>\r\n ) : isBorne ? (\r\n <div className='rf-flex rf-justify-center rf-items-center rf-h-[calc(50vw-3rem)] rf-w-1/2'>\r\n {url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedAddress\r\n","import React from 'react'\r\nimport { PhoneIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface ShowPhoneNumberPorps {\r\n phoneNumber: string\r\n}\r\n\r\nconst ShowPhoneNumber = ({\r\n phoneNumber\r\n}: ShowPhoneNumberPorps): JSX.Element => {\r\n return (\r\n <div className='rf-px-5 rf-py-3 rf-mb-8 rf-flex rf-flex-row rf-items-center rf-font-bold'>\r\n <PhoneIcon className='rf-h-6 rf-w-6 ltr:rf-mr-2 rtl:rf-ml-2' />\r\n {phoneNumber}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ShowPhoneNumber\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport { useSpring, animated } from '@react-spring/web'\r\nimport { MapContainer, TileLayer, Marker, GeoJSON } from 'react-leaflet'\r\nimport type { FeatureCollection } from 'geojson'\r\nimport type { GeoJSON as GeoJSONType } from 'leaflet'\r\nimport L from 'leaflet'\r\nimport { markerShadow } from '../../../models/urlEncodedImages'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport Routes from './Routes'\r\nimport MapUser from './MapUser'\r\nimport QRCodeComponent from '../../Utils/QRCodeComponent'\r\nimport CloseButton from '../../Common/CloseButton'\r\nimport { RoundIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ninterface MapProps {\r\n latitude: number\r\n longitude: number\r\n color?: string\r\n}\r\n\r\nconst userIcon = L.icon({\r\n iconUrl: `${imageFiles.mapDeparture}`,\r\n shadowUrl: markerShadow,\r\n iconSize: [32, 41],\r\n iconAnchor: [16, 41]\r\n})\r\n\r\nconst springDuration = 500\r\n\r\nconst Map = ({ latitude, longitude, color }: MapProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const configuration = useRetorikStore((state) => state.configuration)\r\n\r\n const [mapLayerData, setMapLayerData] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const geoJsonLayer = useRef<GeoJSONType | null>(null)\r\n const coordinates =\r\n configuration.position?.latitude && configuration.position?.longitude\r\n ? [\r\n [configuration.position.longitude, configuration.position.latitude],\r\n [longitude, latitude]\r\n ]\r\n : undefined\r\n const [qrCodeUrl, setQrCodeUrl] = useState<string | null>()\r\n\r\n const fadeInTimerRef = useRef<NodeJS.Timer | null>(null)\r\n const [spring, api] = useSpring(() => ({\r\n from: {\r\n opacity: 0\r\n }\r\n }))\r\n\r\n useEffect(() => {\r\n if (geoJsonLayer.current) {\r\n mapLayerData && geoJsonLayer.current.clearLayers().addData(mapLayerData)\r\n }\r\n }, [mapLayerData])\r\n\r\n useEffect(() => {\r\n qrCodeUrl &&\r\n api.start({\r\n from: {\r\n opacity: 0\r\n },\r\n to: {\r\n opacity: 1\r\n },\r\n config: {\r\n duration: springDuration\r\n }\r\n })\r\n\r\n return () => {\r\n fadeInTimerRef?.current && clearTimeout(fadeInTimerRef.current)\r\n }\r\n }, [qrCodeUrl])\r\n\r\n const handleCloseQrCode = (): void => {\r\n api.start({\r\n from: {\r\n opacity: 1\r\n },\r\n to: {\r\n opacity: 0\r\n },\r\n config: {\r\n duration: springDuration\r\n }\r\n })\r\n\r\n fadeInTimerRef?.current && clearTimeout(fadeInTimerRef.current)\r\n fadeInTimerRef.current = setTimeout(() => {\r\n setQrCodeUrl(null)\r\n }, springDuration)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <MapContainer\r\n center={[latitude, longitude]}\r\n zoom={12}\r\n scrollWheelZoom={false}\r\n style={{ height: '100%', width: '100%', zIndex: 0 }}\r\n attributionControl={false}\r\n >\r\n <TileLayer url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' />\r\n <Marker position={[latitude, longitude]} />\r\n {configuration.position?.latitude &&\r\n configuration.position?.longitude && (\r\n <Marker\r\n position={[\r\n configuration.position.latitude,\r\n configuration.position.longitude\r\n ]}\r\n icon={userIcon}\r\n />\r\n )}\r\n {mapLayerData && <GeoJSON ref={geoJsonLayer} data={mapLayerData} />}\r\n <MapUser\r\n configurationPosition={[\r\n configuration.position?.latitude || latitude,\r\n configuration.position?.longitude || longitude\r\n ]}\r\n coordinates={[latitude, longitude]}\r\n data={mapLayerData}\r\n />\r\n </MapContainer>\r\n\r\n {/* Available routes if there are origin and destination coordinates */}\r\n {coordinates && (\r\n <Routes\r\n coordinates={coordinates}\r\n setMapLayerData={setMapLayerData}\r\n color={color}\r\n setQrCodeUrl={setQrCodeUrl}\r\n />\r\n )}\r\n\r\n {/* QRcode covering the map in borne mode */}\r\n {qrCodeUrl && (\r\n <animated.div\r\n className='rf-absolute rf-h-full rf-w-full rf-top-0 rf-left-0 rf-z-ui rf-flex rf-flex-col rf-justify-center rf-items-center rf-gap-4 rf-text-truewhite'\r\n style={{\r\n background: 'rgba(18,18,18,0.7)',\r\n ...spring\r\n }}\r\n >\r\n <CloseButton onClick={handleCloseQrCode} showLabel={false} />\r\n <div className='rf-flex rf-flex-row rf-items-start rf-gap-1 rf-text-truewhite rf-italic'>\r\n <RoundIcon className='rf-h-4 rf-mt-[0.2rem]' color='#FFF' />\r\n <div className='rf-w-fit rf-flex rf-flex-col rf-items-center'>\r\n <div>\r\n {capitalizeFirstLetter(translation.poi.openroutemobile, locale)}\r\n </div>\r\n <div>{translation.link.scanQR}</div>\r\n </div>\r\n </div>\r\n <QRCodeComponent src={qrCodeUrl} />\r\n </animated.div>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Map\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport QRCode from 'qrcode'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\nimport { useLocaleStore } from '../../Contexts/LocaleContext'\r\nimport { useRetorikStore } from '../../Contexts/RetorikContext'\r\n\r\nimport {\r\n openRoute,\r\n openRouteAPIKey,\r\n googleMapsAddress\r\n} from '../../../models/constants'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nimport RoutesItem from './RoutesItem'\r\nimport { OpenLocationIcon } from '../../Icons/MapIcons'\r\n\r\ninterface RoutesProps {\r\n coordinates: number[][]\r\n setMapLayerData: (data: FeatureCollection | undefined) => void\r\n color?: string\r\n setQrCodeUrl: (url: string) => void\r\n}\r\n\r\nconst Routes = ({\r\n coordinates,\r\n setMapLayerData,\r\n color,\r\n setQrCodeUrl\r\n}: RoutesProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const isUsedOnBorne = useRetorikStore(\r\n (state) => state.configuration.isUsedOnBorne\r\n )\r\n\r\n const [drivingCar, setDrivingCar] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [cyclingRegular, setCyclingRegular] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const [footWalking, setFootWalking] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [currentChosen, setCurrentChosen] = useState<string | undefined>(\r\n undefined\r\n )\r\n\r\n const travelModeRef = useRef<string>()\r\n\r\n /**\r\n * On component mount :\r\n * - call methods to retrieve data from openroute API\r\n */\r\n useEffect(() => {\r\n calculateForProfile('driving-car')\r\n calculateForProfile('cycling-regular')\r\n calculateForProfile('foot-walking')\r\n }, [])\r\n\r\n /**\r\n * On currentChosen state change :\r\n * - switch on currentChosen value to display the associated data on the map\r\n */\r\n useEffect(() => {\r\n switch (currentChosen) {\r\n case 'drivingCar':\r\n drivingCar && drivingCar.features && setMapLayerData(drivingCar)\r\n travelModeRef.current = 'driving'\r\n break\r\n case 'cyclingRegular':\r\n cyclingRegular &&\r\n cyclingRegular.features &&\r\n setMapLayerData(cyclingRegular)\r\n travelModeRef.current = 'bicycling'\r\n break\r\n case 'footWalking':\r\n footWalking && footWalking.features && setMapLayerData(footWalking)\r\n travelModeRef.current = 'walking'\r\n break\r\n default:\r\n break\r\n }\r\n }, [currentChosen])\r\n\r\n /**\r\n * On drivingCar state change :\r\n * - if driving car data were retrieved and no course has been chosen, set currentChosen state to 'driving-car'\r\n */\r\n useEffect(() => {\r\n drivingCar && !currentChosen && setCurrentChosen('drivingCar')\r\n }, [drivingCar])\r\n\r\n /**\r\n * On call :\r\n * - call the openroute API to retrieve data for the current course\r\n * @param profile : string\r\n */\r\n const calculateForProfile = async (profile: string): Promise<void> => {\r\n const url = `${openRoute}/${profile}/geojson`\r\n const data = await fetch(url, {\r\n method: 'POST',\r\n headers: {\r\n Authorization: openRouteAPIKey,\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify({ coordinates: coordinates })\r\n })\r\n .then((result) => {\r\n return result.json()\r\n })\r\n .catch(() => {\r\n return null\r\n })\r\n\r\n if (data && !data.error) {\r\n switch (profile) {\r\n case 'driving-car':\r\n setDrivingCar(data)\r\n break\r\n case 'cycling-regular':\r\n setCyclingRegular(data)\r\n break\r\n case 'foot-walking':\r\n setFootWalking(data)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n const handleClick = async (): Promise<void> => {\r\n if (travelModeRef?.current && coordinates.length === 2) {\r\n // Create an URL to Google Maps with coordinates and travelling mode\r\n const coordinatesInUrl = `origin=${coordinates[0][1]},${coordinates[0][0]}&destination=${coordinates[1][1]},${coordinates[1][0]}`\r\n const fullUrl = `${googleMapsAddress}${coordinatesInUrl}&travelmode=${travelModeRef.current}`\r\n\r\n if (isUsedOnBorne) {\r\n const url = await QRCode.toDataURL(fullUrl)\r\n setQrCodeUrl(url)\r\n } else {\r\n // If we are not on a borne, open a new tab in browser\r\n window.open(fullUrl, '_blank')\r\n }\r\n }\r\n }\r\n\r\n return drivingCar || cyclingRegular || footWalking ? (\r\n <div className='rf-absolute rf-bottom-2 rf-w-full rf-flex rf-flex-row rf-gap-4 rf-justify-center'>\r\n {/* Data per choice : Car / Cycle / Foot */}\r\n <div className='rf-grid rf-grid-cols-routes rf-pl-6 rf-pr-4 rf-py-2 rf-gap-4 rf-rounded-lg rf-bg-truewhite ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-shadow-[0_6px_6px_#00000029]'>\r\n <RoutesItem\r\n summary={{\r\n type: 'drivingCar',\r\n distance: drivingCar?.features?.length\r\n ? drivingCar.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: drivingCar?.features?.length\r\n ? drivingCar.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'drivingCar'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'cyclingRegular',\r\n distance: cyclingRegular?.features?.length\r\n ? cyclingRegular.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: cyclingRegular?.features?.length\r\n ? cyclingRegular.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'cyclingRegular'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'footWalking',\r\n distance: footWalking?.features?.length\r\n ? footWalking.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration: footWalking?.features?.length\r\n ? footWalking.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'footWalking'}\r\n color={color}\r\n onClick={setCurrentChosen}\r\n />\r\n </div>\r\n\r\n {/* Redirection button */}\r\n <button\r\n className='rf-aspect-square rf-w-3/20 rf-min-w-3/20 rf-max-w-3/20 large:rf-w-1/8 large:rf-min-w-1/8 large:rf-max-w-1/8 rf-overflow-y-hidden rf-p-1 rf-flex rf-flex-col rf-justify-evenly rf-items-center rf-border-2 rf-border-trueblack rf-rounded-lg rf-font-bold ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-bg-truewhite'\r\n onClick={handleClick}\r\n >\r\n <OpenLocationIcon className='rf-w-5 rf-h-5' />\r\n {capitalizeFirstLetter(translation.poi.route, locale)}\r\n </button>\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Routes\r\n","import React from 'react'\r\nimport getDistanceAsString from '../../../utils/getDistanceAsString'\r\nimport getTimeAsString from '../../../utils/getTimeAsString'\r\nimport * as Icons from '../../Icons/MapIcons'\r\n\r\ninterface Summary {\r\n type: string\r\n distance?: number\r\n duration?: number\r\n}\r\n\r\ninterface RoutesItemProps {\r\n summary: Summary\r\n chosen?: boolean\r\n color?: string\r\n onClick: (type: string) => void\r\n}\r\n\r\nconst RoutesItem = ({\r\n summary,\r\n chosen,\r\n color,\r\n onClick\r\n}: RoutesItemProps): JSX.Element => {\r\n return (\r\n <div\r\n className='rf-flex rf-flex-col rf-justify-end hover:rf-cursor-pointer'\r\n onClick={(): void => onClick(summary.type)}\r\n >\r\n <div className='rf-h-full rf-flex rf-flex-row rf-gap-3 rf-items-center'>\r\n <div className='rf-relative rf-flex rf-justify-center rf-items-center'>\r\n {/* Colored circle + triangle atop */}\r\n <div\r\n className='rf-absolute rf-w-9 rf-h-9 rf-rounded-max'\r\n style={{\r\n backgroundColor: chosen ? color : '#EFEDF0'\r\n }}\r\n />\r\n <div className='rf-absolute rf-w-full -rf-top-[1.15rem] rf-flex rf-justify-center'>\r\n <Icons.TriangleIcon\r\n className='rf-w-2 rf-h-2'\r\n color={chosen ? color : 'transparent'}\r\n />\r\n </div>\r\n\r\n {summary.type === 'drivingCar' && (\r\n <Icons.DrivingCarIcon\r\n className='rf-w-5 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n {summary.type === 'cyclingRegular' && (\r\n <Icons.CyclingRegularIcon\r\n className='rf-w-6 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n {summary.type === 'footWalking' && (\r\n <Icons.FootWalkingIcon\r\n className='rf-w-6 rf-z-util'\r\n color={chosen ? '#FFF' : '#535252'}\r\n />\r\n )}\r\n </div>\r\n <div className='rf-flex rf-flex-col rf-justify-center rf-items-start'>\r\n {/* Duration */}\r\n <div className='rf-whitespace-nowrap rf-font-bold'>\r\n {getTimeAsString(summary?.duration)}\r\n </div>\r\n\r\n {/* Distance */}\r\n <div className='rf-whitespace-nowrap'>\r\n {getDistanceAsString(summary?.distance)}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default RoutesItem\r\n","const getDistanceAsString = (distance: number | undefined): string => {\r\n if (typeof distance !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (distance <= 0) return '0 m'\r\n if (distance < 1) return `${distance * 100} cm`\r\n if (distance < 1000) return `${distance} m`\r\n if (distance >= 1000) return `${(Math.ceil(distance / 1000) * 10) / 10} km`\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getDistanceAsString\r\n","const getTimeAsString = (time: number | undefined): string => {\r\n if (typeof time !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (time < 1) return 'NC'\r\n if (time < 60) return `${time} s`\r\n if (time < 3600) return `${Math.ceil(time / 60)} min`\r\n if (time === 3600) return `1 h`\r\n if (time > 3600) {\r\n const hours = Math.floor(time / 3600)\r\n const minutes = Math.ceil((time - hours * 3600) / 60)\r\n return `${hours} h ${\r\n minutes === 60 ? 59 : minutes < 10 ? `0${minutes}` : minutes\r\n }`\r\n }\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getTimeAsString\r\n","import CyclingRegularIcon from './CyclingRegularIcon'\r\nimport DrivingCarIcon from './DrivingCarIcon'\r\nimport FootWalkingIcon from './FootWalkingIcon'\r\nimport OpenLocationIcon from './OpenLocationIcon'\r\nimport TriangleIcon from './TriangleIcon'\r\n\r\nexport {\r\n CyclingRegularIcon,\r\n DrivingCarIcon,\r\n FootWalkingIcon,\r\n OpenLocationIcon,\r\n TriangleIcon\r\n}\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst CyclingRegularIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <g transform='translate(0.5 -1.484)'>\r\n <path\r\n d='M20.5,6.789a2.645,2.645,0,1,0-2.645-2.645A2.653,2.653,0,0,0,20.5,6.789Zm-13.885,8.6a6.612,6.612,0,1,0,0,13.224,6.612,6.612,0,1,0,0-13.224Zm0,11.24a4.628,4.628,0,1,1,0-9.257,4.628,4.628,0,1,1,0,9.257ZM14.282,13.4l3.174-3.174,1.058,1.058a9.264,9.264,0,0,0,6.744,2.777V11.418A6.57,6.57,0,0,1,20.5,9.434L17.984,6.922a3.242,3.242,0,0,0-2.116-.793,2.219,2.219,0,0,0-1.851.793l-3.7,3.7a2.611,2.611,0,0,0-.793,1.851,2.219,2.219,0,0,0,.793,1.851l4.232,3.7v6.612h2.645v-8.2Zm10.843,1.984A6.612,6.612,0,1,0,31.737,22,6.548,6.548,0,0,0,25.125,15.385Zm0,11.24A4.628,4.628,0,1,1,29.753,22,4.685,4.685,0,0,1,25.125,26.625Z'\r\n transform='translate(0 0.484)'\r\n fill={color || '#fff'}\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default CyclingRegularIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst DrivingCarIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n id='car'\r\n d='M32.385,71.254H28.507L27.43,68.559A7.217,7.217,0,0,0,20.7,64H12.471a7.219,7.219,0,0,0-6.735,4.559L4.658,71.254H.781a.777.777,0,0,0-.754.966l.389,1.554a.777.777,0,0,0,.754.589h1.3a4.116,4.116,0,0,0-1.43,3.109V80.58A4.111,4.111,0,0,0,2.076,83.3v3.5a2.073,2.073,0,0,0,2.072,2.072H6.221A2.073,2.073,0,0,0,8.293,86.8V84.725h16.58V86.8a2.073,2.073,0,0,0,2.072,2.072h2.072A2.073,2.073,0,0,0,31.09,86.8V83.3a4.109,4.109,0,0,0,1.036-2.716V77.471A4.118,4.118,0,0,0,30.7,74.362H32a.777.777,0,0,0,.754-.589l.389-1.554a.778.778,0,0,0-.754-.966ZM9.584,70.1a3.109,3.109,0,0,1,2.887-1.954H20.7A3.109,3.109,0,0,1,23.582,70.1l1.291,3.227H8.293ZM6.221,80.567a2.066,2.066,0,1,1,0-4.132,3.987,3.987,0,0,1,3.109,3.1c0,1.24-1.865,1.033-3.109,1.033Zm20.725,0c-1.243,0-3.109.207-3.109-1.033a3.987,3.987,0,0,1,3.109-3.1,2.066,2.066,0,1,1,0,4.132Z'\r\n transform='translate(0.501 -63.5)'\r\n fill={color || '#fff'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default DrivingCarIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FootWalkingIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='-6 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n d='M11.4,5.249A2.625,2.625,0,1,0,8.772,2.625,2.625,2.625,0,0,0,11.4,5.249ZM16.564,13.4l-1.274-.645-.53-1.608A5.962,5.962,0,0,0,9.171,7c-1.968-.005-3.057.552-5.1,1.378A5.216,5.216,0,0,0,1.352,10.9l-.366.744a1.755,1.755,0,0,0,.776,2.346,1.726,1.726,0,0,0,2.324-.782l.366-.744a1.738,1.738,0,0,1,.9-.842l1.465-.591-.831,3.319A3.512,3.512,0,0,0,6.8,17.568l3.275,3.576a3.529,3.529,0,0,1,.815,1.515l1,4.008a1.75,1.75,0,0,0,3.4-.848l-1.214-4.866a3.5,3.5,0,0,0-.815-1.515l-2.488-2.718.94-3.756.3.9a3.487,3.487,0,0,0,1.733,2.023l1.274.645a1.726,1.726,0,0,0,2.324-.782,1.77,1.77,0,0,0-.782-2.351ZM4.048,21.1a3.393,3.393,0,0,1-.776,1.176L.538,25.01a1.75,1.75,0,1,0,2.472,2.477l3.248-3.248a3.554,3.554,0,0,0,.776-1.176l.738-1.848c-3.024-3.3-2.116-2.286-2.592-2.936L4.048,21.1Z'\r\n transform='translate(0.612 0.5)'\r\n fill={color || '#fff'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FootWalkingIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst OpenLocationIcon = ({ className }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 29.771 29.771'\r\n className={className || 'rf-w-6 rf-h-6'}\r\n >\r\n <path d='M29.771,0,0,14.886l11.164,3.721,3.721,11.164Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default OpenLocationIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst TriangleIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 16 12'\r\n className={className || 'rf-w-3 rf-h-3'}\r\n >\r\n <path\r\n d='M6.336,2.5a2,2,0,0,1,3.328,0l4.263,6.394A2,2,0,0,1,12.263,12H3.737A2,2,0,0,1,2.073,8.891Z'\r\n fill={color || 'transparent'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default TriangleIcon\r\n","import React, { useEffect } from 'react'\r\nimport { useMap } from 'react-leaflet'\r\nimport type { LatLngTuple } from 'leaflet'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\ntype MapUserProps = {\r\n configurationPosition: LatLngTuple\r\n coordinates: LatLngTuple\r\n data: FeatureCollection | undefined\r\n}\r\n\r\nconst MapUser = ({\r\n configurationPosition,\r\n coordinates,\r\n data\r\n}: MapUserProps): JSX.Element => {\r\n const map = useMap()\r\n\r\n useEffect(() => {\r\n if (configurationPosition !== coordinates) {\r\n const coords1: LatLngTuple = [...configurationPosition]\r\n const coords2: LatLngTuple = [...coordinates]\r\n if (configurationPosition[0] > coordinates[0]) {\r\n coords2[0] -= (configurationPosition[0] - coordinates[0]) / 2\r\n } else {\r\n coords1[0] -= (coordinates[0] - configurationPosition[0]) / 2\r\n }\r\n\r\n map.flyToBounds([coords1, coords2])\r\n } else {\r\n map.flyToBounds([configurationPosition, coordinates])\r\n }\r\n }, [data])\r\n\r\n return <React.Fragment />\r\n}\r\n\r\nexport default MapUser\r\n"],"names":[],"version":3,"file":"AttachmentDetail.fdcd1737.js.map"}
@@ -57,8 +57,7 @@ const $323612a7bbe80f4b$var$CustomView = ({ customView: customView, title: title
57
57
  const setCurrentSubView = (0, $7eio0.useUtilsStore)((state)=>state.actions.setCurrentSubView);
58
58
  const sendEvent = (0, $6QoTL.useDirectlineStore)((state)=>state.actions.sendEvent);
59
59
  const handleBack = ()=>{
60
- sendEvent('Davi.CloseWindow', null);
61
- sendEvent(title ? `Davi.CloseWindow${title.replace(/\s/g, '')}` : 'Davi.CloseWindowCustom', null);
60
+ sendEvent('Davi.CloseWindow', null, ()=>sendEvent(title ? `Davi.CloseWindow${title.replace(/\s/g, '')}` : 'Davi.CloseWindowCustom', null));
62
61
  setCurrentSubView((0, $7WHA7.CurrentSubView).none);
63
62
  setDisplayCustomComponent(false);
64
63
  };
@@ -140,4 +139,4 @@ var $323612a7bbe80f4b$export$2e2bcd8739ae039 = $323612a7bbe80f4b$var$CustomView;
140
139
  });
141
140
 
142
141
 
143
- //# sourceMappingURL=CustomView.080c8028.js.map
142
+ //# sourceMappingURL=CustomView.ba7af9b6.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,sCAAgB;AACtB,MAAM,4CAAsB;AAE5B,MAAM,mCAAa,CAAC,cAAE,UAAU,SAAE,KAAK,QAAE,IAAI,sBAAE,kBAAkB,WAAE,OAAO,6BAAE,yBAAyB,EAAmB;IACtH,MAAM,cAAc,CAAA,GAAA,qBAAa,EAAE,CAAC,QAAU,MAAM,mBAAmB;IACvE,MAAM,SAAS,CAAA,GAAA,qBAAa,EAAE,CAAC,QAAU,MAAM,MAAM;IACrD,MAAM,WAAW,CAAA,GAAA,mBAAW,EAAE,CAAC,QAAU,MAAM,QAAQ;IACvD,MAAM,kBAAkB,CAAA,GAAA,mBAAW,EAAE,CAAC,QAAU,MAAM,eAAe;IACrE,MAAM,oBAAoB,CAAA,GAAA,oBAAY,EAAE,CAAC,QAAU,MAA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0CAA8D,QAAQ,CAAA,GAAA,4BAAoB,EAAE,OAAO,wBAAU;;;;;;YAI/H;0BAGD,gCAAC,CAAA,GAAA,cAAyB;gBAAE,gBAAgB;gBAAC,iBAAiB;gBAAM,SAAS;;;;AAGnF;IAEA,2CAAe","sources":["src/components/Views/CustomView.tsx"],"sourcesContent":["import React, { useMemo } from 'react'\r\nimport { useViewStore } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/LocaleContext'\r\nimport { useUtilsStore } from '../Contexts/UtilsContext'\r\nimport { useDirectlineStore } from '../Contexts/DirectlineContext'\r\n\r\nimport { CurrentSubView, Depth } from '../../models/enums'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\n\r\nimport { FullScreen } from '../Templates'\r\nimport { BackButton } from '../Menu/Common'\r\nimport AbsoluteLargeClosingButton from '../Utils/SubView/AbsoluteLargeClosingButton'\r\n\r\ninterface CustomViewProps {\r\n customView?: string\r\n title?: string\r\n icon?: JSX.Element\r\n externalComponents?: Array<{ name: string; component: JSX.Element }>\r\n display?: boolean\r\n setDisplayCustomComponent: (value: boolean) => void\r\n}\r\n\r\nconst iconClassname = 'rf-h-16 rf-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24'\r\nconst iconClassnameMobile = 'rf-h-8 rf-w-8'\r\n\r\nconst CustomView = ({ customView, title, icon, externalComponents, display, setDisplayCustomComponent }: CustomViewProps): JSX.Element => {\r\n const translation = useLocaleStore((state) => state.currentTranslations)\r\n const locale = useLocaleStore((state) => state.locale)\r\n const isMobile = useViewStore((state) => state.isMobile)\r\n const displayControls = useViewStore((state) => state.displayControls)\r\n const setCurrentSubView = useUtilsStore((state) => state.actions.setCurrentSubView)\r\n const sendEvent = useDirectlineStore((state) => state.actions.sendEvent)\r\n\r\n const handleBack = (): void => {\r\n sendEvent('Davi.CloseWindow', null, () => sendEvent(title ? `Davi.CloseWindow${title.replace(/\\s/g, '')}` : 'Davi.CloseWindowCustom', null))\r\n setCurrentSubView(CurrentSubView.none)\r\n setDisplayCustomComponent(false)\r\n }\r\n\r\n const componentToDisplay: JSX.Element = useMemo(() => {\r\n if (customView?.length) {\r\n if (externalComponents) {\r\n const component = externalComponents.find((e) => e.name === customView)\r\n if (component?.component) {\r\n return component.component\r\n }\r\n }\r\n }\r\n return <></>\r\n }, [customView])\r\n\r\n return (\r\n <FullScreen className={`${!display && 'rf-hidden'} ${isMobile && displayControls ? 'rf-mb-12' : 'rf-mb-0'}`} depth={Depth.modal} background='#FFFFFF' onClick={handleBack}>\r\n {/* title */}\r\n <div className='rf-absolute rf-z-[1] rf-w-full rf-top-0 ltr:rf-left-0 rtl:rf-right-0'>\r\n {/* Mobile display */}\r\n <div className='large:rf-hidden rf-p-4 rf-flex rf-flex-col'>\r\n <BackButton title={translation.common.back} className='rf-text-sm' handleBack={handleBack} />\r\n <div className='large:rf-hidden rf-py-2 rf-flex rf-flex-row rf-items-end undefined'>\r\n {icon ? <div className={iconClassnameMobile}>{icon} </div> : <></>}\r\n <div className='ltr:rf-ml-2 rtl:rf-mr-2 rf-capitalize rf-subtitle-size-auto'>{title ? capitalizeFirstLetter(title, locale) : <></>}</div>\r\n </div>\r\n </div>\r\n\r\n <div className='rf-hidden large:rf-flex rf-w-full rf-pt-4 large-vertical:rf-pt-8 ltr:rf-pl-4 rtl:rf-pr-4 large-vertical:ltr:rf-pl-0 large-vertical:rtl:rf-pr-0 rf-flex-row rf-justify-start large-vertical:rf-justify-center rf-items-center'>\r\n {icon ? <div className={iconClassname}>{icon} </div> : <></>}\r\n <div className='ltr:rf-ml-2 rtl:rf-mr-2 rf-uppercase rf-subtitle-size-auto'>{title ? capitalizeFirstLetter(title, locale) : <></>}</div>\r\n </div>\r\n </div>\r\n\r\n {componentToDisplay}\r\n\r\n {/* Closing button in large mode */}\r\n <AbsoluteLargeClosingButton dashboardVisible customComponent={true} onClick={handleBack} />\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default CustomView\r\n"],"names":[],"version":3,"file":"CustomView.ba7af9b6.js.map","sourceRoot":"../"}
@@ -48,8 +48,7 @@ const $7d965522966d3c65$var$CustomView = ({ customView: customView, title: title
48
48
  const setCurrentSubView = (0, $j67YK.useUtilsStore)((state)=>state.actions.setCurrentSubView);
49
49
  const sendEvent = (0, $aNpqK.useDirectlineStore)((state)=>state.actions.sendEvent);
50
50
  const handleBack = ()=>{
51
- sendEvent('Davi.CloseWindow', null);
52
- sendEvent(title ? `Davi.CloseWindow${title.replace(/\s/g, '')}` : 'Davi.CloseWindowCustom', null);
51
+ sendEvent('Davi.CloseWindow', null, ()=>sendEvent(title ? `Davi.CloseWindow${title.replace(/\s/g, '')}` : 'Davi.CloseWindowCustom', null));
53
52
  setCurrentSubView((0, $4ucVo.CurrentSubView).none);
54
53
  setDisplayCustomComponent(false);
55
54
  };
@@ -131,4 +130,4 @@ var $7d965522966d3c65$export$2e2bcd8739ae039 = $7d965522966d3c65$var$CustomView;
131
130
  });
132
131
 
133
132
 
134
- //# sourceMappingURL=CustomView.90d2a13d.js.map
133
+ //# sourceMappingURL=CustomView.c24a0e74.js.map