@davi-ai/retorik-map 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +132 -104
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +132 -104
- package/dist/index.modern.js.map +1 -1
- package/package.json +8 -3
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./index.modern.css";
|
|
2
|
+
import {_ as $7jQCS$_} from "@swc/helpers/_/_object_spread";
|
|
2
3
|
import {jsx as $7jQCS$jsx, Fragment as $7jQCS$Fragment, jsxs as $7jQCS$jsxs} from "react/jsx-runtime";
|
|
3
4
|
import $7jQCS$react, {useEffect as $7jQCS$useEffect, useState as $7jQCS$useState, useRef as $7jQCS$useRef, useMemo as $7jQCS$useMemo} from "react";
|
|
4
5
|
import {Provider as $7jQCS$Provider, useDispatch as $7jQCS$useDispatch, useSelector as $7jQCS$useSelector} from "react-redux";
|
|
@@ -14,6 +15,7 @@ import {gql as $7jQCS$gql} from "graphql-request";
|
|
|
14
15
|
import {WhatToDoIcon as $7jQCS$WhatToDoIcon, WhereToEatIcon as $7jQCS$WhereToEatIcon, WhereToSleepIcon as $7jQCS$WhereToSleepIcon, WhatToSeeIcon as $7jQCS$WhatToSeeIcon, LocalProductsIcon as $7jQCS$LocalProductsIcon, ServicesIcon as $7jQCS$ServicesIcon} from "@davi-ai/retorik-framework-hospitality";
|
|
15
16
|
import $7jQCS$markdownit from "markdown-it";
|
|
16
17
|
import $7jQCS$qrcode from "qrcode";
|
|
18
|
+
import {_ as $7jQCS$_1} from "@swc/helpers/_/_object_spread_props";
|
|
17
19
|
import {createApi as $7jQCS$createApi, fetchBaseQuery as $7jQCS$fetchBaseQuery} from "@reduxjs/toolkit/query/react";
|
|
18
20
|
|
|
19
21
|
|
|
@@ -28,6 +30,7 @@ function $parcel$interopDefault(a) {
|
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
|
|
33
|
+
|
|
31
34
|
/* eslint-disable react/self-closing-comp */
|
|
32
35
|
|
|
33
36
|
const $54855172f26b6a76$var$MapIcon = ()=>{
|
|
@@ -307,6 +310,7 @@ var $25b1a6a10c3e381e$export$2e2bcd8739ae039 = $25b1a6a10c3e381e$var$slice.reduc
|
|
|
307
310
|
|
|
308
311
|
|
|
309
312
|
|
|
313
|
+
let $b04760f2f518180c$var$_ = (t)=>t, $b04760f2f518180c$var$t, $b04760f2f518180c$var$t1, $b04760f2f518180c$var$t2, $b04760f2f518180c$var$t3, $b04760f2f518180c$var$t4, $b04760f2f518180c$var$t5;
|
|
310
314
|
const $b04760f2f518180c$export$e9e19ceca2b11d3c = [
|
|
311
315
|
{
|
|
312
316
|
name: 'Resto 1',
|
|
@@ -401,67 +405,67 @@ const $b04760f2f518180c$var$commonFields = `
|
|
|
401
405
|
${$b04760f2f518180c$var$thing}
|
|
402
406
|
`;
|
|
403
407
|
const $b04760f2f518180c$var$createFoodEstablishmentQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
404
|
-
return (0, $7jQCS$gql)`
|
|
408
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t || ($b04760f2f518180c$var$t = $b04760f2f518180c$var$_`
|
|
405
409
|
query GetFoodEtablishment {
|
|
406
|
-
geoDistanceSortedFoodEstablishment(parameters: "{ from: ${
|
|
407
|
-
${
|
|
410
|
+
geoDistanceSortedFoodEstablishment(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
411
|
+
${0}
|
|
408
412
|
starRating
|
|
409
413
|
servesCuisine
|
|
410
414
|
owner
|
|
411
415
|
}
|
|
412
416
|
}
|
|
413
|
-
|
|
417
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
414
418
|
};
|
|
415
419
|
const $b04760f2f518180c$var$createLodgingBusinessQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
416
|
-
return (0, $7jQCS$gql)`
|
|
420
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t1 || ($b04760f2f518180c$var$t1 = $b04760f2f518180c$var$_`
|
|
417
421
|
query GetLodgingBusiness {
|
|
418
|
-
geoDistanceSortedLodgingBusiness(parameters: "{ from: ${
|
|
419
|
-
${
|
|
422
|
+
geoDistanceSortedLodgingBusiness(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
423
|
+
${0}
|
|
420
424
|
checkinTime
|
|
421
425
|
checkoutTime
|
|
422
426
|
numberOfRooms
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
|
-
|
|
429
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
426
430
|
};
|
|
427
431
|
const $b04760f2f518180c$var$createServicesQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
428
|
-
return (0, $7jQCS$gql)`
|
|
432
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t2 || ($b04760f2f518180c$var$t2 = $b04760f2f518180c$var$_`
|
|
429
433
|
query GetService {
|
|
430
|
-
geoDistanceSortedService(parameters: "{ from: ${
|
|
431
|
-
${
|
|
434
|
+
geoDistanceSortedService(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
435
|
+
${0}
|
|
432
436
|
serviceType
|
|
433
437
|
}
|
|
434
438
|
}
|
|
435
|
-
|
|
439
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
436
440
|
};
|
|
437
441
|
const $b04760f2f518180c$var$createTouristAttractionQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
438
|
-
return (0, $7jQCS$gql)`
|
|
442
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t3 || ($b04760f2f518180c$var$t3 = $b04760f2f518180c$var$_`
|
|
439
443
|
query GetTouristAttraction {
|
|
440
|
-
geoDistanceSortedTouristAttraction(parameters: "{ from: ${
|
|
441
|
-
${
|
|
444
|
+
geoDistanceSortedTouristAttraction(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
445
|
+
${0}
|
|
442
446
|
touristType
|
|
443
447
|
}
|
|
444
448
|
}
|
|
445
|
-
|
|
449
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
446
450
|
};
|
|
447
451
|
const $b04760f2f518180c$var$createTouristDestinationQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
448
|
-
return (0, $7jQCS$gql)`
|
|
452
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t4 || ($b04760f2f518180c$var$t4 = $b04760f2f518180c$var$_`
|
|
449
453
|
query GetTouristDestination {
|
|
450
|
-
geoDistanceSortedTouristDestination(parameters: "{ from: ${
|
|
451
|
-
${
|
|
454
|
+
geoDistanceSortedTouristDestination(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
455
|
+
${0}
|
|
452
456
|
touristType
|
|
453
457
|
}
|
|
454
458
|
}
|
|
455
|
-
|
|
459
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
456
460
|
};
|
|
457
461
|
const $b04760f2f518180c$var$createProductQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
458
|
-
return (0, $7jQCS$gql)`
|
|
462
|
+
return (0, $7jQCS$gql)($b04760f2f518180c$var$t5 || ($b04760f2f518180c$var$t5 = $b04760f2f518180c$var$_`
|
|
459
463
|
query GetProduct {
|
|
460
|
-
geoDistanceSortedProduct(parameters: "{ from: ${
|
|
461
|
-
${
|
|
464
|
+
geoDistanceSortedProduct(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
465
|
+
${0}
|
|
462
466
|
}
|
|
463
467
|
}
|
|
464
|
-
|
|
468
|
+
`), from, size, locale, latitude, longitude, $b04760f2f518180c$var$commonFields);
|
|
465
469
|
};
|
|
466
470
|
const $b04760f2f518180c$export$eb4a40790fd3bf4c = ({ type: type, locale: locale, from: from, size: size, latitude: latitude, longitude: longitude })=>{
|
|
467
471
|
const data = {
|
|
@@ -699,6 +703,7 @@ const $6b20232aef97af36$var$typeConversion = {
|
|
|
699
703
|
[(0, $bb862b2ef6568c15$export$55e6fd7564320b53).service]: 'services'
|
|
700
704
|
};
|
|
701
705
|
const $6b20232aef97af36$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
706
|
+
var _labelTranslated_locale;
|
|
702
707
|
const dispatch = (0, $7jQCS$useDispatch)();
|
|
703
708
|
const locale = (0, $7jQCS$useLocaleStore)((state)=>state.locale);
|
|
704
709
|
const [toggle, setToggle] = (0, $7jQCS$useState)(true);
|
|
@@ -714,9 +719,9 @@ const $6b20232aef97af36$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
714
719
|
]);
|
|
715
720
|
const [labelTranslated, setLabelTranslated] = (0, $7jQCS$useState)((0, (/*@__PURE__*/$parcel$interopDefault($62040f4564221a7b$exports))));
|
|
716
721
|
(0, $7jQCS$useEffect)(()=>{
|
|
717
|
-
settings
|
|
722
|
+
(settings === null || settings === void 0 ? void 0 : settings.showFilter) && setShowFilters(settings === null || settings === void 0 ? void 0 : settings.showFilter);
|
|
718
723
|
// Handle translation
|
|
719
|
-
if (settings
|
|
724
|
+
if ((settings === null || settings === void 0 ? void 0 : settings.labelFilter) && Object.keys(settings.labelFilter).length) setLabelTranslated(settings.labelFilter);
|
|
720
725
|
else setLabelTranslated((0, (/*@__PURE__*/$parcel$interopDefault($62040f4564221a7b$exports))));
|
|
721
726
|
}, [
|
|
722
727
|
settings
|
|
@@ -740,7 +745,7 @@ const $6b20232aef97af36$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
740
745
|
className: "filterToggler",
|
|
741
746
|
onClick: ()=>setToggle(!toggle),
|
|
742
747
|
children: [
|
|
743
|
-
labelTranslated[locale]
|
|
748
|
+
((_labelTranslated_locale = labelTranslated[locale]) === null || _labelTranslated_locale === void 0 ? void 0 : _labelTranslated_locale.title) || labelTranslated['fr-FR'].title,
|
|
744
749
|
/*#__PURE__*/ (0, $7jQCS$jsx)("span", {
|
|
745
750
|
className: `arrow ${toggle ? 'active' : ''}`
|
|
746
751
|
})
|
|
@@ -749,9 +754,10 @@ const $6b20232aef97af36$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
749
754
|
/*#__PURE__*/ (0, $7jQCS$jsx)("div", {
|
|
750
755
|
className: "filterMenu",
|
|
751
756
|
children: showFilters.map((type, key)=>{
|
|
757
|
+
var _labelTranslated_locale;
|
|
752
758
|
return /*#__PURE__*/ (0, $7jQCS$jsx)((0, $0f266cba364a0ed4$export$2e2bcd8739ae039), {
|
|
753
759
|
type: type,
|
|
754
|
-
label: labelTranslated[locale]
|
|
760
|
+
label: (_labelTranslated_locale = labelTranslated[locale]) === null || _labelTranslated_locale === void 0 ? void 0 : _labelTranslated_locale[$6b20232aef97af36$var$typeConversion[type]],
|
|
755
761
|
selected: selectedFilters.includes(type),
|
|
756
762
|
onClick: onFilterClick
|
|
757
763
|
}, key);
|
|
@@ -1046,11 +1052,11 @@ const $9ff79049785ec09f$var$RoutesItem = ({ summary: summary, chosen: chosen, co
|
|
|
1046
1052
|
children: [
|
|
1047
1053
|
/*#__PURE__*/ (0, $7jQCS$jsx)("div", {
|
|
1048
1054
|
className: "route-item-duration",
|
|
1049
|
-
children: (0, $e7e6fa01b8713f6a$export$a8fb05107cd01f03)(summary
|
|
1055
|
+
children: (0, $e7e6fa01b8713f6a$export$a8fb05107cd01f03)(summary === null || summary === void 0 ? void 0 : summary.duration)
|
|
1050
1056
|
}),
|
|
1051
1057
|
/*#__PURE__*/ (0, $7jQCS$jsx)("div", {
|
|
1052
1058
|
className: "route-item-distance",
|
|
1053
|
-
children: (0, $e7e6fa01b8713f6a$export$98fa73d0d16cf821)(summary
|
|
1059
|
+
children: (0, $e7e6fa01b8713f6a$export$98fa73d0d16cf821)(summary === null || summary === void 0 ? void 0 : summary.distance)
|
|
1054
1060
|
})
|
|
1055
1061
|
]
|
|
1056
1062
|
})
|
|
@@ -1066,6 +1072,7 @@ const $94ecf50180ed178d$var$openRoute = 'https://api.openrouteservice.org/v2/dir
|
|
|
1066
1072
|
const $94ecf50180ed178d$var$openRouteAPIKey = '5b3ce3597851110001cf62483cfd6bd46f934b7d96f108a35e0f08b8';
|
|
1067
1073
|
const $94ecf50180ed178d$var$googleMapsAddress = 'https://www.google.com/maps/dir/?api=1&';
|
|
1068
1074
|
const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerData: setMapLayerData, color: color, setQrCodeUrl: setQrCodeUrl })=>{
|
|
1075
|
+
var _drivingCar_features, _drivingCar_features__properties_summary, _drivingCar_features__properties, _drivingCar_features1, _drivingCar_features__properties_summary1, _drivingCar_features__properties1, _cyclingRegular_features, _cyclingRegular_features__properties_summary, _cyclingRegular_features__properties, _cyclingRegular_features1, _cyclingRegular_features__properties_summary1, _cyclingRegular_features__properties1, _footWalking_features, _footWalking_features__properties_summary, _footWalking_features__properties, _footWalking_features1, _footWalking_features__properties_summary1, _footWalking_features__properties1, _translation_locale;
|
|
1069
1076
|
const isUsedOnBorne = (0, $7jQCS$useRetorikStore)((state)=>state.configuration.isUsedOnBorne);
|
|
1070
1077
|
const locale = (0, $7jQCS$useLocaleStore)((state)=>state.locale);
|
|
1071
1078
|
const [drivingCar, setDrivingCar] = (0, $7jQCS$useState)(undefined);
|
|
@@ -1154,7 +1161,7 @@ const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1154
1161
|
}
|
|
1155
1162
|
};
|
|
1156
1163
|
const handleClick = async ()=>{
|
|
1157
|
-
if (travelModeRef
|
|
1164
|
+
if ((travelModeRef === null || travelModeRef === void 0 ? void 0 : travelModeRef.current) && coordinates.length === 2) {
|
|
1158
1165
|
// Create an URL to Google Maps with coordinates and travelling mode
|
|
1159
1166
|
const coordinatesInUrl = `origin=${coordinates[0][1]},${coordinates[0][0]}&destination=${coordinates[1][1]},${coordinates[1][0]}`;
|
|
1160
1167
|
const fullUrl = `${$94ecf50180ed178d$var$googleMapsAddress}${coordinatesInUrl}&travelmode=${travelModeRef.current}`;
|
|
@@ -1174,8 +1181,8 @@ const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1174
1181
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $9ff79049785ec09f$export$2e2bcd8739ae039), {
|
|
1175
1182
|
summary: {
|
|
1176
1183
|
type: 'drivingCar',
|
|
1177
|
-
distance: drivingCar
|
|
1178
|
-
duration: drivingCar
|
|
1184
|
+
distance: (drivingCar === null || drivingCar === void 0 ? void 0 : (_drivingCar_features = drivingCar.features) === null || _drivingCar_features === void 0 ? void 0 : _drivingCar_features.length) ? (_drivingCar_features__properties = drivingCar.features[0].properties) === null || _drivingCar_features__properties === void 0 ? void 0 : (_drivingCar_features__properties_summary = _drivingCar_features__properties.summary) === null || _drivingCar_features__properties_summary === void 0 ? void 0 : _drivingCar_features__properties_summary.distance : undefined,
|
|
1185
|
+
duration: (drivingCar === null || drivingCar === void 0 ? void 0 : (_drivingCar_features1 = drivingCar.features) === null || _drivingCar_features1 === void 0 ? void 0 : _drivingCar_features1.length) ? (_drivingCar_features__properties1 = drivingCar.features[0].properties) === null || _drivingCar_features__properties1 === void 0 ? void 0 : (_drivingCar_features__properties_summary1 = _drivingCar_features__properties1.summary) === null || _drivingCar_features__properties_summary1 === void 0 ? void 0 : _drivingCar_features__properties_summary1.duration : undefined
|
|
1179
1186
|
},
|
|
1180
1187
|
chosen: currentChosen === 'drivingCar',
|
|
1181
1188
|
color: color,
|
|
@@ -1184,8 +1191,8 @@ const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1184
1191
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $9ff79049785ec09f$export$2e2bcd8739ae039), {
|
|
1185
1192
|
summary: {
|
|
1186
1193
|
type: 'cyclingRegular',
|
|
1187
|
-
distance: cyclingRegular
|
|
1188
|
-
duration: cyclingRegular
|
|
1194
|
+
distance: (cyclingRegular === null || cyclingRegular === void 0 ? void 0 : (_cyclingRegular_features = cyclingRegular.features) === null || _cyclingRegular_features === void 0 ? void 0 : _cyclingRegular_features.length) ? (_cyclingRegular_features__properties = cyclingRegular.features[0].properties) === null || _cyclingRegular_features__properties === void 0 ? void 0 : (_cyclingRegular_features__properties_summary = _cyclingRegular_features__properties.summary) === null || _cyclingRegular_features__properties_summary === void 0 ? void 0 : _cyclingRegular_features__properties_summary.distance : undefined,
|
|
1195
|
+
duration: (cyclingRegular === null || cyclingRegular === void 0 ? void 0 : (_cyclingRegular_features1 = cyclingRegular.features) === null || _cyclingRegular_features1 === void 0 ? void 0 : _cyclingRegular_features1.length) ? (_cyclingRegular_features__properties1 = cyclingRegular.features[0].properties) === null || _cyclingRegular_features__properties1 === void 0 ? void 0 : (_cyclingRegular_features__properties_summary1 = _cyclingRegular_features__properties1.summary) === null || _cyclingRegular_features__properties_summary1 === void 0 ? void 0 : _cyclingRegular_features__properties_summary1.duration : undefined
|
|
1189
1196
|
},
|
|
1190
1197
|
chosen: currentChosen === 'cyclingRegular',
|
|
1191
1198
|
color: color,
|
|
@@ -1194,8 +1201,8 @@ const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1194
1201
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $9ff79049785ec09f$export$2e2bcd8739ae039), {
|
|
1195
1202
|
summary: {
|
|
1196
1203
|
type: 'footWalking',
|
|
1197
|
-
distance: footWalking
|
|
1198
|
-
duration: footWalking
|
|
1204
|
+
distance: (footWalking === null || footWalking === void 0 ? void 0 : (_footWalking_features = footWalking.features) === null || _footWalking_features === void 0 ? void 0 : _footWalking_features.length) ? (_footWalking_features__properties = footWalking.features[0].properties) === null || _footWalking_features__properties === void 0 ? void 0 : (_footWalking_features__properties_summary = _footWalking_features__properties.summary) === null || _footWalking_features__properties_summary === void 0 ? void 0 : _footWalking_features__properties_summary.distance : undefined,
|
|
1205
|
+
duration: (footWalking === null || footWalking === void 0 ? void 0 : (_footWalking_features1 = footWalking.features) === null || _footWalking_features1 === void 0 ? void 0 : _footWalking_features1.length) ? (_footWalking_features__properties1 = footWalking.features[0].properties) === null || _footWalking_features__properties1 === void 0 ? void 0 : (_footWalking_features__properties_summary1 = _footWalking_features__properties1.summary) === null || _footWalking_features__properties_summary1 === void 0 ? void 0 : _footWalking_features__properties_summary1.duration : undefined
|
|
1199
1206
|
},
|
|
1200
1207
|
chosen: currentChosen === 'footWalking',
|
|
1201
1208
|
color: color,
|
|
@@ -1210,7 +1217,7 @@ const $94ecf50180ed178d$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1210
1217
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $1cdf2b2c103e8066$export$2e2bcd8739ae039), {
|
|
1211
1218
|
className: "route-icon-medium"
|
|
1212
1219
|
}),
|
|
1213
|
-
(0, $d0a8b8dddc00dc67$export$d07f57595c356899)((0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]
|
|
1220
|
+
(0, $d0a8b8dddc00dc67$export$d07f57595c356899)(((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.route) || (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))['fr-FR'].route, locale)
|
|
1214
1221
|
]
|
|
1215
1222
|
})
|
|
1216
1223
|
]
|
|
@@ -1245,6 +1252,7 @@ const $518bba7b5ecd13db$var$md = new (0, $7jQCS$markdownit)({
|
|
|
1245
1252
|
});
|
|
1246
1253
|
const $518bba7b5ecd13db$var$fadeDuration = 500;
|
|
1247
1254
|
const $518bba7b5ecd13db$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClose, setMapLayerData: setMapLayerData })=>{
|
|
1255
|
+
var _translation_locale, _translation_locale1, _translation_locale2;
|
|
1248
1256
|
const dispatch = (0, $7jQCS$useDispatch)();
|
|
1249
1257
|
const currentUserPos = (0, $7jQCS$useSelector)((state)=>state.map.currentUserLocation);
|
|
1250
1258
|
const locale = (0, $7jQCS$useLocaleStore)((state)=>state.locale);
|
|
@@ -1332,8 +1340,8 @@ const $518bba7b5ecd13db$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1332
1340
|
};
|
|
1333
1341
|
const handlePoiClose = ()=>{
|
|
1334
1342
|
setMainFadingOut(true);
|
|
1335
|
-
mainFadeOutTimerRef
|
|
1336
|
-
mainSecondFadeOutTimerRef
|
|
1343
|
+
(mainFadeOutTimerRef === null || mainFadeOutTimerRef === void 0 ? void 0 : mainFadeOutTimerRef.current) && clearTimeout(mainFadeOutTimerRef.current);
|
|
1344
|
+
(mainSecondFadeOutTimerRef === null || mainSecondFadeOutTimerRef === void 0 ? void 0 : mainSecondFadeOutTimerRef.current) && clearTimeout(mainSecondFadeOutTimerRef.current);
|
|
1337
1345
|
mainFadeOutTimerRef.current = setTimeout(()=>{
|
|
1338
1346
|
setMainFadingOut(false);
|
|
1339
1347
|
}, $518bba7b5ecd13db$var$fadeDuration);
|
|
@@ -1343,7 +1351,7 @@ const $518bba7b5ecd13db$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1343
1351
|
};
|
|
1344
1352
|
const handleCloseQrCode = ()=>{
|
|
1345
1353
|
setFadingOut(true);
|
|
1346
|
-
fadeOutTimerRef
|
|
1354
|
+
(fadeOutTimerRef === null || fadeOutTimerRef === void 0 ? void 0 : fadeOutTimerRef.current) && clearTimeout(fadeOutTimerRef.current);
|
|
1347
1355
|
fadeOutTimerRef.current = setTimeout(()=>{
|
|
1348
1356
|
setQrCodeUrl(null);
|
|
1349
1357
|
setFadingOut(false);
|
|
@@ -1396,7 +1404,7 @@ const $518bba7b5ecd13db$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1396
1404
|
/*#__PURE__*/ (0, $7jQCS$jsx)("button", {
|
|
1397
1405
|
onClick: ()=>showMoreHandler(poi),
|
|
1398
1406
|
className: `button_${(0, $b04760f2f518180c$export$7f9d623abbd2d21d)(poi.type)} poiButton`,
|
|
1399
|
-
children: (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]
|
|
1407
|
+
children: ((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.showmore) || (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))['fr-FR'].showmore
|
|
1400
1408
|
})
|
|
1401
1409
|
]
|
|
1402
1410
|
})
|
|
@@ -1426,10 +1434,10 @@ const $518bba7b5ecd13db$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1426
1434
|
className: "qrcode-text",
|
|
1427
1435
|
children: [
|
|
1428
1436
|
/*#__PURE__*/ (0, $7jQCS$jsx)("div", {
|
|
1429
|
-
children: (0, $d0a8b8dddc00dc67$export$d07f57595c356899)((0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]
|
|
1437
|
+
children: (0, $d0a8b8dddc00dc67$export$d07f57595c356899)(((_translation_locale1 = (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]) === null || _translation_locale1 === void 0 ? void 0 : _translation_locale1.openroutemobile) || (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))['fr-FR'].openroutemobile, locale)
|
|
1430
1438
|
}),
|
|
1431
1439
|
/*#__PURE__*/ (0, $7jQCS$jsx)("div", {
|
|
1432
|
-
children: (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]
|
|
1440
|
+
children: ((_translation_locale2 = (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))[locale]) === null || _translation_locale2 === void 0 ? void 0 : _translation_locale2.scanQR) || (0, (/*@__PURE__*/$parcel$interopDefault($e0b5ca5abbe23cc4$exports)))['fr-FR'].scanQR
|
|
1433
1441
|
})
|
|
1434
1442
|
]
|
|
1435
1443
|
})
|
|
@@ -1452,12 +1460,12 @@ const $ccc136e0899bcc71$var$CustomLoader = ()=>{
|
|
|
1452
1460
|
const [visible, setVisible] = (0, $7jQCS$useState)(false);
|
|
1453
1461
|
const timerRef = (0, $7jQCS$useRef)(null);
|
|
1454
1462
|
(0, $7jQCS$useEffect)(()=>{
|
|
1455
|
-
timerRef
|
|
1463
|
+
(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current) && clearTimeout(timerRef.current);
|
|
1456
1464
|
timerRef.current = setTimeout(()=>{
|
|
1457
1465
|
setVisible(true);
|
|
1458
1466
|
}, 4000);
|
|
1459
1467
|
return ()=>{
|
|
1460
|
-
timerRef
|
|
1468
|
+
(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current) && clearTimeout(timerRef.current);
|
|
1461
1469
|
};
|
|
1462
1470
|
}, []);
|
|
1463
1471
|
return /*#__PURE__*/ (0, $7jQCS$jsxs)("div", {
|
|
@@ -1485,6 +1493,7 @@ var $ccc136e0899bcc71$export$2e2bcd8739ae039 = $ccc136e0899bcc71$var$CustomLoade
|
|
|
1485
1493
|
shadowUrl: (0, $62095fbd4f1402e1$export$1524746c49eeef2b)
|
|
1486
1494
|
});
|
|
1487
1495
|
const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
1496
|
+
var _translation_locale, _translation_locale1, _translation_locale2, _translation_locale3;
|
|
1488
1497
|
const pois = (0, $7jQCS$useSelector)((state)=>state.poi.poiList);
|
|
1489
1498
|
const dispatch = (0, $7jQCS$useDispatch)();
|
|
1490
1499
|
const locale = (0, $7jQCS$useLocaleStore)((state)=>state.locale);
|
|
@@ -1513,7 +1522,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1513
1522
|
service: (0, $fe9dc2e14d235aa8$export$d60d82aee240d483)
|
|
1514
1523
|
};
|
|
1515
1524
|
const poisToDisplay = (0, $7jQCS$useMemo)(()=>{
|
|
1516
|
-
if (pois && Array.isArray(pois) && pois.length && selectedFilters) return pois
|
|
1525
|
+
if (pois && Array.isArray(pois) && pois.length && selectedFilters) return pois === null || pois === void 0 ? void 0 : pois.filter((p)=>selectedFilters.some((f)=>f === p.type));
|
|
1517
1526
|
return [];
|
|
1518
1527
|
}, [
|
|
1519
1528
|
pois,
|
|
@@ -1525,13 +1534,13 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1525
1534
|
}));
|
|
1526
1535
|
};
|
|
1527
1536
|
(0, $7jQCS$useEffect)(()=>{
|
|
1528
|
-
props
|
|
1537
|
+
(props === null || props === void 0 ? void 0 : props.activeTenant) && dispatch((0, $9aea58248450db30$export$2cb53dffb4e7523f)({
|
|
1529
1538
|
activeTenant: props.activeTenant
|
|
1530
1539
|
}));
|
|
1531
|
-
props
|
|
1540
|
+
(props === null || props === void 0 ? void 0 : props.tenantList) && dispatch((0, $9aea58248450db30$export$4afb5402acd283a1)({
|
|
1532
1541
|
tenantList: props.tenantList
|
|
1533
1542
|
}));
|
|
1534
|
-
props
|
|
1543
|
+
(props === null || props === void 0 ? void 0 : props.userLocation) && dispatch((0, $ecd3e22cabc096ed$export$9e7828c0c29d5e97)({
|
|
1535
1544
|
currentUserLocation: props.userLocation
|
|
1536
1545
|
}));
|
|
1537
1546
|
}, [
|
|
@@ -1569,7 +1578,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1569
1578
|
CSSInjected: true
|
|
1570
1579
|
}));
|
|
1571
1580
|
}
|
|
1572
|
-
if (!props
|
|
1581
|
+
if (!(props === null || props === void 0 ? void 0 : props.userLocation)) navigator.geolocation.getCurrentPosition((res)=>{
|
|
1573
1582
|
if (res) {
|
|
1574
1583
|
if (mapRef.current) {
|
|
1575
1584
|
const center = {
|
|
@@ -1590,9 +1599,10 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1590
1599
|
console.log('Retorik Map > Destroy map component');
|
|
1591
1600
|
// save map state
|
|
1592
1601
|
if (markersRef.current && botCSSInjected) {
|
|
1602
|
+
var _mapRef_current, _mapRef_current1;
|
|
1593
1603
|
const saveMapState = {
|
|
1594
|
-
zoom: mapRef.current
|
|
1595
|
-
location: mapRef.current
|
|
1604
|
+
zoom: (_mapRef_current = mapRef.current) === null || _mapRef_current === void 0 ? void 0 : _mapRef_current.getZoom(),
|
|
1605
|
+
location: (_mapRef_current1 = mapRef.current) === null || _mapRef_current1 === void 0 ? void 0 : _mapRef_current1.getCenter()
|
|
1596
1606
|
};
|
|
1597
1607
|
dispatch((0, $ecd3e22cabc096ed$export$99750ab96d7881ba)({
|
|
1598
1608
|
mapState: saveMapState
|
|
@@ -1628,9 +1638,10 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1628
1638
|
}
|
|
1629
1639
|
if (retorikEvent === (0, $7jQCS$RetorikEvent).DetailViewClose && currentSubView === (0, $7jQCS$CurrentSubView).none) {
|
|
1630
1640
|
if (markersRef.current) {
|
|
1641
|
+
var _mapRef_current, _mapRef_current1;
|
|
1631
1642
|
const saveMapState = {
|
|
1632
|
-
zoom: mapRef.current
|
|
1633
|
-
location: mapRef.current
|
|
1643
|
+
zoom: (_mapRef_current = mapRef.current) === null || _mapRef_current === void 0 ? void 0 : _mapRef_current.getZoom(),
|
|
1644
|
+
location: (_mapRef_current1 = mapRef.current) === null || _mapRef_current1 === void 0 ? void 0 : _mapRef_current1.getCenter()
|
|
1634
1645
|
};
|
|
1635
1646
|
if (saveMapState.zoom !== undefined && saveMapState.location !== undefined) dispatch((0, $ecd3e22cabc096ed$export$99750ab96d7881ba)({
|
|
1636
1647
|
mapState: saveMapState
|
|
@@ -1641,7 +1652,8 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1641
1652
|
retorikEvent
|
|
1642
1653
|
]);
|
|
1643
1654
|
(0, $7jQCS$useEffect)(()=>{
|
|
1644
|
-
|
|
1655
|
+
var _tenantList_activeTenant;
|
|
1656
|
+
const aroundMeDistance = (_tenantList_activeTenant = tenantList[activeTenant]) === null || _tenantList_activeTenant === void 0 ? void 0 : _tenantList_activeTenant.aroundMeDistance;
|
|
1645
1657
|
if (aroundMeDistance) setAroundMeDistance(aroundMeDistance);
|
|
1646
1658
|
}, [
|
|
1647
1659
|
tenantList,
|
|
@@ -1688,7 +1700,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1688
1700
|
if (selectedPOIIdentifier !== '') {
|
|
1689
1701
|
const selectedPOIObj = pois.find((p)=>p.contentItemId === selectedPOIIdentifier);
|
|
1690
1702
|
const selectedMarker = markersRef.current.find((m)=>m.id === selectedPOIIdentifier);
|
|
1691
|
-
if (selectedMarker && selectedPOIObj
|
|
1703
|
+
if (selectedMarker && (selectedPOIObj === null || selectedPOIObj === void 0 ? void 0 : selectedPOIObj.location) && mapRef.current) {
|
|
1692
1704
|
dispatch((0, $ecd3e22cabc096ed$export$99750ab96d7881ba)({
|
|
1693
1705
|
mapState: {
|
|
1694
1706
|
location: undefined,
|
|
@@ -1698,7 +1710,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1698
1710
|
mapRef.current.flyTo(selectedPOIObj.location, 18);
|
|
1699
1711
|
mapRef.current.on('zoomend', function() {
|
|
1700
1712
|
setSelectedPOI(selectedPOIObj);
|
|
1701
|
-
selectedMarker.marker.openPopup(selectedPOIObj
|
|
1713
|
+
selectedMarker.marker.openPopup(selectedPOIObj === null || selectedPOIObj === void 0 ? void 0 : selectedPOIObj.location);
|
|
1702
1714
|
dispatch((0, $ecd3e22cabc096ed$export$79507451adbe6af3)({
|
|
1703
1715
|
selectedPOIIdentifier: ''
|
|
1704
1716
|
}));
|
|
@@ -1721,7 +1733,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1721
1733
|
setSelectedPOI(undefined);
|
|
1722
1734
|
};
|
|
1723
1735
|
const aroundMe = ()=>{
|
|
1724
|
-
if (props
|
|
1736
|
+
if ((props === null || props === void 0 ? void 0 : props.userLocation) && (props.tenantList && props.activeTenant || tenantList && tenantList[activeTenant])) {
|
|
1725
1737
|
handlerAroundMe(props.userLocation);
|
|
1726
1738
|
return;
|
|
1727
1739
|
}
|
|
@@ -1743,8 +1755,8 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1743
1755
|
currentUserLocation: center
|
|
1744
1756
|
}));
|
|
1745
1757
|
// Calculez les coordonnées des coins du rectangle de la zone de 10km autour du centre
|
|
1746
|
-
const southWest = (0, $7jQCS$leaflet).latLng(center).toBounds(aroundMeDistance
|
|
1747
|
-
const northEast = (0, $7jQCS$leaflet).latLng(center).toBounds(aroundMeDistance
|
|
1758
|
+
const southWest = (0, $7jQCS$leaflet).latLng(center).toBounds(aroundMeDistance !== null && aroundMeDistance !== void 0 ? aroundMeDistance : 5000).getSouthWest();
|
|
1759
|
+
const northEast = (0, $7jQCS$leaflet).latLng(center).toBounds(aroundMeDistance !== null && aroundMeDistance !== void 0 ? aroundMeDistance : 5000).getNorthEast();
|
|
1748
1760
|
const bounds = (0, $7jQCS$leaflet).latLngBounds(southWest, northEast);
|
|
1749
1761
|
// Utilisez la méthode fitBounds() pour ajuster la vue de la carte à la zone de 10km autour du centre
|
|
1750
1762
|
mapRef.current.fitBounds(bounds);
|
|
@@ -1752,7 +1764,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1752
1764
|
if (l instanceof (0, $7jQCS$leaflet).MarkerClusterGroup && mapRef.current !== undefined) l.disableClustering();
|
|
1753
1765
|
});
|
|
1754
1766
|
mapRef.current.on('zoomend', function() {
|
|
1755
|
-
if (mapRef
|
|
1767
|
+
if ((mapRef === null || mapRef === void 0 ? void 0 : mapRef.current) && mapRef.current.getZoom() < 12) {
|
|
1756
1768
|
if (mapRef.current !== undefined) mapRef.current.eachLayer((l)=>{
|
|
1757
1769
|
if (l instanceof (0, $7jQCS$leaflet).MarkerClusterGroup && mapRef.current !== undefined) l.enableClustering();
|
|
1758
1770
|
});
|
|
@@ -1827,8 +1839,8 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1827
1839
|
}),
|
|
1828
1840
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $7jQCS$ZoomControl), {
|
|
1829
1841
|
position: "bottomright",
|
|
1830
|
-
zoomInTitle: (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]
|
|
1831
|
-
zoomOutTitle: (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]
|
|
1842
|
+
zoomInTitle: ((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.zoomintitle) || (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))['fr-FR'].zoomintitle,
|
|
1843
|
+
zoomOutTitle: ((_translation_locale1 = (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]) === null || _translation_locale1 === void 0 ? void 0 : _translation_locale1.zoomouttitle) || (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))['fr-FR'].zoomouttitle
|
|
1832
1844
|
}, Date.now()),
|
|
1833
1845
|
currentUserPos !== undefined && /*#__PURE__*/ (0, $7jQCS$jsx)((0, $c4bfef1c219035db$export$b42842b40b0e9990), {
|
|
1834
1846
|
currentUserPos: currentUserPos
|
|
@@ -1842,7 +1854,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1842
1854
|
/*#__PURE__*/ (0, $7jQCS$jsx)("button", {
|
|
1843
1855
|
id: "around-me",
|
|
1844
1856
|
onClick: ()=>aroundMe(),
|
|
1845
|
-
title: `${(0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]
|
|
1857
|
+
title: `${((_translation_locale2 = (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]) === null || _translation_locale2 === void 0 ? void 0 : _translation_locale2.aroundme1) || (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))['fr-FR'].aroundme1} ${aroundMeDistance / 1000} ${((_translation_locale3 = (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))[locale]) === null || _translation_locale3 === void 0 ? void 0 : _translation_locale3.aroundme2) || (0, (/*@__PURE__*/$parcel$interopDefault($562fd381b633906a$exports)))['fr-FR'].aroundme2}`,
|
|
1846
1858
|
children: /*#__PURE__*/ (0, $7jQCS$jsx)("img", {
|
|
1847
1859
|
id: "map-target",
|
|
1848
1860
|
src: (0, $62095fbd4f1402e1$export$44271b4f0c6a3563),
|
|
@@ -1850,7 +1862,7 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1850
1862
|
})
|
|
1851
1863
|
}),
|
|
1852
1864
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $6b20232aef97af36$export$e2d78e54e91e6990), {
|
|
1853
|
-
settings: props
|
|
1865
|
+
settings: props === null || props === void 0 ? void 0 : props.settings
|
|
1854
1866
|
})
|
|
1855
1867
|
]
|
|
1856
1868
|
});
|
|
@@ -1862,6 +1874,9 @@ const $ccf1a8cf083c5878$export$ddd638f4963d1957 = (props)=>{
|
|
|
1862
1874
|
|
|
1863
1875
|
|
|
1864
1876
|
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
|
|
1865
1880
|
/* eslint-disable @typescript-eslint/camelcase */ const $4efcf2180e2badfa$export$da40755304d3143 = {
|
|
1866
1881
|
asklea_lesbertranges: {
|
|
1867
1882
|
name: 'lesbertranges',
|
|
@@ -30536,12 +30551,16 @@ const $bb64f8611bc3f5a1$export$1f0060b11c07d31 = (0, $7jQCS$createApi)({
|
|
|
30536
30551
|
transformResponse: (response)=>{
|
|
30537
30552
|
const res = {};
|
|
30538
30553
|
if (response && response.length > 0) {
|
|
30539
|
-
const filteredData = response.filter((a)=>
|
|
30554
|
+
const filteredData = response.filter((a)=>{
|
|
30555
|
+
var _a_agentZone;
|
|
30556
|
+
return (_a_agentZone = a.agentZone) === null || _a_agentZone === void 0 ? void 0 : _a_agentZone.zone;
|
|
30557
|
+
});
|
|
30540
30558
|
filteredData.forEach((agent)=>{
|
|
30559
|
+
var _agent_agentZone;
|
|
30541
30560
|
res[agent.name] = {
|
|
30542
30561
|
name: agent.name,
|
|
30543
30562
|
retorikName: agent.name,
|
|
30544
|
-
areaLocation: agent.agentZone
|
|
30563
|
+
areaLocation: (_agent_agentZone = agent.agentZone) === null || _agent_agentZone === void 0 ? void 0 : _agent_agentZone.zone
|
|
30545
30564
|
};
|
|
30546
30565
|
});
|
|
30547
30566
|
}
|
|
@@ -30570,15 +30589,13 @@ const $bb64f8611bc3f5a1$export$7867c88f1bb2065 = async ({ token: token, useDevTe
|
|
|
30570
30589
|
callBack: callBack
|
|
30571
30590
|
};
|
|
30572
30591
|
// If categories are provided, load only these. Otherwise load all of them.
|
|
30573
|
-
if (categoriesToShow
|
|
30574
|
-
type: category
|
|
30575
|
-
|
|
30576
|
-
}));
|
|
30592
|
+
if (categoriesToShow === null || categoriesToShow === void 0 ? void 0 : categoriesToShow.length) categoriesToShow.forEach((category)=>$bb64f8611bc3f5a1$var$fetchPoiType((0, $7jQCS$_)({
|
|
30593
|
+
type: category
|
|
30594
|
+
}, commonData)));
|
|
30577
30595
|
else Object.keys((0, $bb862b2ef6568c15$export$55e6fd7564320b53)).forEach((key)=>{
|
|
30578
|
-
$bb64f8611bc3f5a1$var$fetchPoiType({
|
|
30579
|
-
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53)[key]
|
|
30580
|
-
|
|
30581
|
-
});
|
|
30596
|
+
$bb64f8611bc3f5a1$var$fetchPoiType((0, $7jQCS$_)({
|
|
30597
|
+
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53)[key]
|
|
30598
|
+
}, commonData));
|
|
30582
30599
|
});
|
|
30583
30600
|
}
|
|
30584
30601
|
};
|
|
@@ -30600,16 +30617,18 @@ const $bb64f8611bc3f5a1$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30600
30617
|
'Content-type': 'application/graphql; charset=UTF-8'
|
|
30601
30618
|
}
|
|
30602
30619
|
}).then((response)=>response.json()).catch((error)=>console.warn(error));
|
|
30603
|
-
if (data
|
|
30620
|
+
if (data === null || data === void 0 ? void 0 : data.data) switch(type){
|
|
30604
30621
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).afaire:
|
|
30605
|
-
|
|
30606
|
-
|
|
30622
|
+
var _data_data_geoDistanceSortedTouristAttraction;
|
|
30623
|
+
if ((_data_data_geoDistanceSortedTouristAttraction = data.data.geoDistanceSortedTouristAttraction) === null || _data_data_geoDistanceSortedTouristAttraction === void 0 ? void 0 : _data_data_geoDistanceSortedTouristAttraction.length) data.data.geoDistanceSortedTouristAttraction.forEach((e)=>{
|
|
30624
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30625
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30607
30626
|
location: {
|
|
30608
30627
|
lat: e.place.latitude,
|
|
30609
30628
|
lng: e.place.longitude
|
|
30610
30629
|
},
|
|
30611
30630
|
name: e.displayText,
|
|
30612
|
-
imageURL: e.thing.image
|
|
30631
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30613
30632
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).afaire,
|
|
30614
30633
|
description: e.thing.description,
|
|
30615
30634
|
address: $bb64f8611bc3f5a1$var$getAddressFromPlaceData(e.place),
|
|
@@ -30619,14 +30638,16 @@ const $bb64f8611bc3f5a1$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30619
30638
|
});
|
|
30620
30639
|
break;
|
|
30621
30640
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).avoir:
|
|
30622
|
-
|
|
30623
|
-
|
|
30641
|
+
var _data_data_geoDistanceSortedTouristDestination;
|
|
30642
|
+
if ((_data_data_geoDistanceSortedTouristDestination = data.data.geoDistanceSortedTouristDestination) === null || _data_data_geoDistanceSortedTouristDestination === void 0 ? void 0 : _data_data_geoDistanceSortedTouristDestination.length) data.data.geoDistanceSortedTouristDestination.forEach((e)=>{
|
|
30643
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30644
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30624
30645
|
location: {
|
|
30625
30646
|
lat: e.place.latitude,
|
|
30626
30647
|
lng: e.place.longitude
|
|
30627
30648
|
},
|
|
30628
30649
|
name: e.displayText,
|
|
30629
|
-
imageURL: e.thing.image
|
|
30650
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30630
30651
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).avoir,
|
|
30631
30652
|
description: e.thing.description,
|
|
30632
30653
|
address: $bb64f8611bc3f5a1$var$getAddressFromPlaceData(e.place),
|
|
@@ -30636,14 +30657,16 @@ const $bb64f8611bc3f5a1$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30636
30657
|
});
|
|
30637
30658
|
break;
|
|
30638
30659
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).hebergement:
|
|
30639
|
-
|
|
30640
|
-
|
|
30660
|
+
var _data_data_geoDistanceSortedLodgingBusiness;
|
|
30661
|
+
if ((_data_data_geoDistanceSortedLodgingBusiness = data.data.geoDistanceSortedLodgingBusiness) === null || _data_data_geoDistanceSortedLodgingBusiness === void 0 ? void 0 : _data_data_geoDistanceSortedLodgingBusiness.length) data.data.geoDistanceSortedLodgingBusiness.forEach((e)=>{
|
|
30662
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30663
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30641
30664
|
location: {
|
|
30642
30665
|
lat: e.place.latitude,
|
|
30643
30666
|
lng: e.place.longitude
|
|
30644
30667
|
},
|
|
30645
30668
|
name: e.displayText,
|
|
30646
|
-
imageURL: e.thing.image
|
|
30669
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30647
30670
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).hebergement,
|
|
30648
30671
|
description: e.thing.description,
|
|
30649
30672
|
address: $bb64f8611bc3f5a1$var$getAddressFromPlaceData(e.place),
|
|
@@ -30653,28 +30676,32 @@ const $bb64f8611bc3f5a1$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30653
30676
|
});
|
|
30654
30677
|
break;
|
|
30655
30678
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).produit:
|
|
30656
|
-
|
|
30657
|
-
|
|
30679
|
+
var _data_data_geoDistanceSortedProduct;
|
|
30680
|
+
if ((_data_data_geoDistanceSortedProduct = data.data.geoDistanceSortedProduct) === null || _data_data_geoDistanceSortedProduct === void 0 ? void 0 : _data_data_geoDistanceSortedProduct.length) data.data.geoDistanceSortedProduct.forEach((e)=>{
|
|
30681
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30682
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30658
30683
|
location: {
|
|
30659
30684
|
lat: e.place.latitude,
|
|
30660
30685
|
lng: e.place.longitude
|
|
30661
30686
|
},
|
|
30662
30687
|
name: e.displayText,
|
|
30663
|
-
imageURL: e.thing.image
|
|
30688
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30664
30689
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).produit,
|
|
30665
30690
|
contentItemId: e.contentItemId
|
|
30666
30691
|
});
|
|
30667
30692
|
});
|
|
30668
30693
|
break;
|
|
30669
30694
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).restaurant:
|
|
30670
|
-
|
|
30671
|
-
|
|
30695
|
+
var _data_data_geoDistanceSortedFoodEstablishment;
|
|
30696
|
+
if ((_data_data_geoDistanceSortedFoodEstablishment = data.data.geoDistanceSortedFoodEstablishment) === null || _data_data_geoDistanceSortedFoodEstablishment === void 0 ? void 0 : _data_data_geoDistanceSortedFoodEstablishment.length) data.data.geoDistanceSortedFoodEstablishment.forEach((e)=>{
|
|
30697
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30698
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30672
30699
|
location: {
|
|
30673
30700
|
lat: e.place.latitude,
|
|
30674
30701
|
lng: e.place.longitude
|
|
30675
30702
|
},
|
|
30676
30703
|
name: e.displayText,
|
|
30677
|
-
imageURL: e.thing.image
|
|
30704
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30678
30705
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).restaurant,
|
|
30679
30706
|
description: e.thing.description,
|
|
30680
30707
|
address: $bb64f8611bc3f5a1$var$getAddressFromPlaceData(e.place),
|
|
@@ -30684,14 +30711,16 @@ const $bb64f8611bc3f5a1$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30684
30711
|
});
|
|
30685
30712
|
break;
|
|
30686
30713
|
case (0, $bb862b2ef6568c15$export$55e6fd7564320b53).service:
|
|
30687
|
-
|
|
30688
|
-
|
|
30714
|
+
var _data_data_geoDistanceSortedService;
|
|
30715
|
+
if ((_data_data_geoDistanceSortedService = data.data.geoDistanceSortedService) === null || _data_data_geoDistanceSortedService === void 0 ? void 0 : _data_data_geoDistanceSortedService.length) data.data.geoDistanceSortedService.forEach((e)=>{
|
|
30716
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30717
|
+
((_e_place = e.place) === null || _e_place === void 0 ? void 0 : _e_place.latitude) && ((_e_place1 = e.place) === null || _e_place1 === void 0 ? void 0 : _e_place1.longitude) && result.push({
|
|
30689
30718
|
location: {
|
|
30690
30719
|
lat: e.place.latitude,
|
|
30691
30720
|
lng: e.place.longitude
|
|
30692
30721
|
},
|
|
30693
30722
|
name: e.displayText,
|
|
30694
|
-
imageURL: e.thing.image
|
|
30723
|
+
imageURL: ((_e_thing_image = e.thing.image) === null || _e_thing_image === void 0 ? void 0 : (_e_thing_image_urls = _e_thing_image.urls) === null || _e_thing_image_urls === void 0 ? void 0 : _e_thing_image_urls.length) ? e.thing.image.urls[0] : undefined,
|
|
30695
30724
|
type: (0, $bb862b2ef6568c15$export$55e6fd7564320b53).service,
|
|
30696
30725
|
contentItemId: e.contentItemId
|
|
30697
30726
|
});
|
|
@@ -30755,15 +30784,15 @@ const $73efd853987d4bec$export$5e65d2e7602ac78d = ({ retorikName: retorikName, u
|
|
|
30755
30784
|
position.latitude = currentUserLocation.lat;
|
|
30756
30785
|
position.longitude = currentUserLocation.lng;
|
|
30757
30786
|
}
|
|
30758
|
-
(0, $bb64f8611bc3f5a1$export$7867c88f1bb2065)({
|
|
30787
|
+
(0, $bb64f8611bc3f5a1$export$7867c88f1bb2065)((0, $7jQCS$_1)((0, $7jQCS$_)({
|
|
30759
30788
|
token: token,
|
|
30760
30789
|
useDevTenant: useDevTenant,
|
|
30761
30790
|
locale: locale.toLowerCase(),
|
|
30762
|
-
tenant: retorikName
|
|
30763
|
-
|
|
30791
|
+
tenant: retorikName
|
|
30792
|
+
}, position), {
|
|
30764
30793
|
categoriesToShow: categoriesToShow,
|
|
30765
30794
|
callBack: setPoiList
|
|
30766
|
-
});
|
|
30795
|
+
}));
|
|
30767
30796
|
}
|
|
30768
30797
|
}, [
|
|
30769
30798
|
token,
|
|
@@ -30885,17 +30914,16 @@ const $afc3b063d0f5522c$export$a6b9c7133f02bfd8 = ()=>{
|
|
|
30885
30914
|
|
|
30886
30915
|
const $c2806d4ce3815b78$var$store = (0, $d6025a90a38b0ae3$export$281a42ec42dc777b)();
|
|
30887
30916
|
const $c2806d4ce3815b78$export$a5c7b93649eaf8f8 = (props)=>{
|
|
30917
|
+
var _props_settings;
|
|
30888
30918
|
return /*#__PURE__*/ (0, $7jQCS$jsx)((0, $7jQCS$Fragment), {
|
|
30889
|
-
children: props
|
|
30919
|
+
children: (props === null || props === void 0 ? void 0 : props.activeTenant) && /*#__PURE__*/ (0, $7jQCS$jsxs)((0, $7jQCS$Provider), {
|
|
30890
30920
|
store: $c2806d4ce3815b78$var$store,
|
|
30891
30921
|
children: [
|
|
30892
|
-
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $ccf1a8cf083c5878$export$ddd638f4963d1957), {
|
|
30893
|
-
...props
|
|
30894
|
-
}),
|
|
30922
|
+
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $ccf1a8cf083c5878$export$ddd638f4963d1957), (0, $7jQCS$_)({}, props)),
|
|
30895
30923
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $73efd853987d4bec$export$5e65d2e7602ac78d), {
|
|
30896
30924
|
retorikName: props.tenantList[props.activeTenant].retorikName,
|
|
30897
30925
|
useDevTenant: !!props.isDevTenant,
|
|
30898
|
-
categoriesToShow: props.settings
|
|
30926
|
+
categoriesToShow: (_props_settings = props.settings) === null || _props_settings === void 0 ? void 0 : _props_settings.showFilter
|
|
30899
30927
|
}),
|
|
30900
30928
|
/*#__PURE__*/ (0, $7jQCS$jsx)((0, $36a2ff8f1941466d$export$e370d38831f5792a), {})
|
|
30901
30929
|
]
|