@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.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require("./index.css");
|
|
2
|
+
var $1FYMx$swchelperscjs_object_spreadcjs = require("@swc/helpers/cjs/_object_spread.cjs");
|
|
2
3
|
var $1FYMx$reactjsxruntime = require("react/jsx-runtime");
|
|
3
4
|
var $1FYMx$react = require("react");
|
|
4
5
|
var $1FYMx$reactredux = require("react-redux");
|
|
@@ -14,6 +15,7 @@ var $1FYMx$graphqlrequest = require("graphql-request");
|
|
|
14
15
|
var $1FYMx$daviairetorikframeworkhospitality = require("@davi-ai/retorik-framework-hospitality");
|
|
15
16
|
var $1FYMx$markdownit = require("markdown-it");
|
|
16
17
|
var $1FYMx$qrcode = require("qrcode");
|
|
18
|
+
var $1FYMx$swchelperscjs_object_spread_propscjs = require("@swc/helpers/cjs/_object_spread_props.cjs");
|
|
17
19
|
var $1FYMx$reduxjstoolkitqueryreact = require("@reduxjs/toolkit/query/react");
|
|
18
20
|
|
|
19
21
|
|
|
@@ -37,6 +39,7 @@ $parcel$export(module.exports, "labels", function () { return $adc358f1cbdc29a7$
|
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
|
|
42
|
+
|
|
40
43
|
/* eslint-disable react/self-closing-comp */
|
|
41
44
|
|
|
42
45
|
const $5501b30ed9987357$var$MapIcon = ()=>{
|
|
@@ -316,6 +319,7 @@ var $37e9e4b124edfaf2$export$2e2bcd8739ae039 = $37e9e4b124edfaf2$var$slice.reduc
|
|
|
316
319
|
|
|
317
320
|
|
|
318
321
|
|
|
322
|
+
let $f786cfa56b95c86f$var$_ = (t)=>t, $f786cfa56b95c86f$var$t, $f786cfa56b95c86f$var$t1, $f786cfa56b95c86f$var$t2, $f786cfa56b95c86f$var$t3, $f786cfa56b95c86f$var$t4, $f786cfa56b95c86f$var$t5;
|
|
319
323
|
const $f786cfa56b95c86f$export$e9e19ceca2b11d3c = [
|
|
320
324
|
{
|
|
321
325
|
name: 'Resto 1',
|
|
@@ -410,67 +414,67 @@ const $f786cfa56b95c86f$var$commonFields = `
|
|
|
410
414
|
${$f786cfa56b95c86f$var$thing}
|
|
411
415
|
`;
|
|
412
416
|
const $f786cfa56b95c86f$var$createFoodEstablishmentQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
413
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
417
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t || ($f786cfa56b95c86f$var$t = $f786cfa56b95c86f$var$_`
|
|
414
418
|
query GetFoodEtablishment {
|
|
415
|
-
geoDistanceSortedFoodEstablishment(parameters: "{ from: ${
|
|
416
|
-
${
|
|
419
|
+
geoDistanceSortedFoodEstablishment(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
420
|
+
${0}
|
|
417
421
|
starRating
|
|
418
422
|
servesCuisine
|
|
419
423
|
owner
|
|
420
424
|
}
|
|
421
425
|
}
|
|
422
|
-
|
|
426
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
423
427
|
};
|
|
424
428
|
const $f786cfa56b95c86f$var$createLodgingBusinessQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
425
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
429
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t1 || ($f786cfa56b95c86f$var$t1 = $f786cfa56b95c86f$var$_`
|
|
426
430
|
query GetLodgingBusiness {
|
|
427
|
-
geoDistanceSortedLodgingBusiness(parameters: "{ from: ${
|
|
428
|
-
${
|
|
431
|
+
geoDistanceSortedLodgingBusiness(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
432
|
+
${0}
|
|
429
433
|
checkinTime
|
|
430
434
|
checkoutTime
|
|
431
435
|
numberOfRooms
|
|
432
436
|
}
|
|
433
437
|
}
|
|
434
|
-
|
|
438
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
435
439
|
};
|
|
436
440
|
const $f786cfa56b95c86f$var$createServicesQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
437
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
441
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t2 || ($f786cfa56b95c86f$var$t2 = $f786cfa56b95c86f$var$_`
|
|
438
442
|
query GetService {
|
|
439
|
-
geoDistanceSortedService(parameters: "{ from: ${
|
|
440
|
-
${
|
|
443
|
+
geoDistanceSortedService(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
444
|
+
${0}
|
|
441
445
|
serviceType
|
|
442
446
|
}
|
|
443
447
|
}
|
|
444
|
-
|
|
448
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
445
449
|
};
|
|
446
450
|
const $f786cfa56b95c86f$var$createTouristAttractionQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
447
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
451
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t3 || ($f786cfa56b95c86f$var$t3 = $f786cfa56b95c86f$var$_`
|
|
448
452
|
query GetTouristAttraction {
|
|
449
|
-
geoDistanceSortedTouristAttraction(parameters: "{ from: ${
|
|
450
|
-
${
|
|
453
|
+
geoDistanceSortedTouristAttraction(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
454
|
+
${0}
|
|
451
455
|
touristType
|
|
452
456
|
}
|
|
453
457
|
}
|
|
454
|
-
|
|
458
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
455
459
|
};
|
|
456
460
|
const $f786cfa56b95c86f$var$createTouristDestinationQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
457
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
461
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t4 || ($f786cfa56b95c86f$var$t4 = $f786cfa56b95c86f$var$_`
|
|
458
462
|
query GetTouristDestination {
|
|
459
|
-
geoDistanceSortedTouristDestination(parameters: "{ from: ${
|
|
460
|
-
${
|
|
463
|
+
geoDistanceSortedTouristDestination(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
464
|
+
${0}
|
|
461
465
|
touristType
|
|
462
466
|
}
|
|
463
467
|
}
|
|
464
|
-
|
|
468
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
465
469
|
};
|
|
466
470
|
const $f786cfa56b95c86f$var$createProductQuery = ({ from: from, size: size, locale: locale, latitude: latitude, longitude: longitude })=>{
|
|
467
|
-
return (0, $1FYMx$graphqlrequest.gql)`
|
|
471
|
+
return (0, $1FYMx$graphqlrequest.gql)($f786cfa56b95c86f$var$t5 || ($f786cfa56b95c86f$var$t5 = $f786cfa56b95c86f$var$_`
|
|
468
472
|
query GetProduct {
|
|
469
|
-
geoDistanceSortedProduct(parameters: "{ from: ${
|
|
470
|
-
${
|
|
473
|
+
geoDistanceSortedProduct(parameters: "{ from: ${0}, size: ${0}, culture: \\"${0}\\", lat: \\"${0}\\", lon: \\"${0}\\" }") {
|
|
474
|
+
${0}
|
|
471
475
|
}
|
|
472
476
|
}
|
|
473
|
-
|
|
477
|
+
`), from, size, locale, latitude, longitude, $f786cfa56b95c86f$var$commonFields);
|
|
474
478
|
};
|
|
475
479
|
const $f786cfa56b95c86f$export$eb4a40790fd3bf4c = ({ type: type, locale: locale, from: from, size: size, latitude: latitude, longitude: longitude })=>{
|
|
476
480
|
const data = {
|
|
@@ -708,6 +712,7 @@ const $4e61b315bd882780$var$typeConversion = {
|
|
|
708
712
|
[(0, $8f1a6adc86e47827$export$55e6fd7564320b53).service]: 'services'
|
|
709
713
|
};
|
|
710
714
|
const $4e61b315bd882780$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
715
|
+
var _labelTranslated_locale;
|
|
711
716
|
const dispatch = (0, $1FYMx$reactredux.useDispatch)();
|
|
712
717
|
const locale = (0, $1FYMx$daviairetorikframework.useLocaleStore)((state)=>state.locale);
|
|
713
718
|
const [toggle, setToggle] = (0, $1FYMx$react.useState)(true);
|
|
@@ -723,9 +728,9 @@ const $4e61b315bd882780$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
723
728
|
]);
|
|
724
729
|
const [labelTranslated, setLabelTranslated] = (0, $1FYMx$react.useState)((0, (/*@__PURE__*/$parcel$interopDefault($4cc9bd889f71fcc5$exports))));
|
|
725
730
|
(0, $1FYMx$react.useEffect)(()=>{
|
|
726
|
-
settings
|
|
731
|
+
(settings === null || settings === void 0 ? void 0 : settings.showFilter) && setShowFilters(settings === null || settings === void 0 ? void 0 : settings.showFilter);
|
|
727
732
|
// Handle translation
|
|
728
|
-
if (settings
|
|
733
|
+
if ((settings === null || settings === void 0 ? void 0 : settings.labelFilter) && Object.keys(settings.labelFilter).length) setLabelTranslated(settings.labelFilter);
|
|
729
734
|
else setLabelTranslated((0, (/*@__PURE__*/$parcel$interopDefault($4cc9bd889f71fcc5$exports))));
|
|
730
735
|
}, [
|
|
731
736
|
settings
|
|
@@ -749,7 +754,7 @@ const $4e61b315bd882780$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
749
754
|
className: "filterToggler",
|
|
750
755
|
onClick: ()=>setToggle(!toggle),
|
|
751
756
|
children: [
|
|
752
|
-
labelTranslated[locale]
|
|
757
|
+
((_labelTranslated_locale = labelTranslated[locale]) === null || _labelTranslated_locale === void 0 ? void 0 : _labelTranslated_locale.title) || labelTranslated['fr-FR'].title,
|
|
753
758
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("span", {
|
|
754
759
|
className: `arrow ${toggle ? 'active' : ''}`
|
|
755
760
|
})
|
|
@@ -758,9 +763,10 @@ const $4e61b315bd882780$export$e2d78e54e91e6990 = ({ settings: settings })=>{
|
|
|
758
763
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("div", {
|
|
759
764
|
className: "filterMenu",
|
|
760
765
|
children: showFilters.map((type, key)=>{
|
|
766
|
+
var _labelTranslated_locale;
|
|
761
767
|
return /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $32ba0b314b0299cb$export$2e2bcd8739ae039), {
|
|
762
768
|
type: type,
|
|
763
|
-
label: labelTranslated[locale]
|
|
769
|
+
label: (_labelTranslated_locale = labelTranslated[locale]) === null || _labelTranslated_locale === void 0 ? void 0 : _labelTranslated_locale[$4e61b315bd882780$var$typeConversion[type]],
|
|
764
770
|
selected: selectedFilters.includes(type),
|
|
765
771
|
onClick: onFilterClick
|
|
766
772
|
}, key);
|
|
@@ -1055,11 +1061,11 @@ const $394b25b73dc47897$var$RoutesItem = ({ summary: summary, chosen: chosen, co
|
|
|
1055
1061
|
children: [
|
|
1056
1062
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("div", {
|
|
1057
1063
|
className: "route-item-duration",
|
|
1058
|
-
children: (0, $ae41d7dfb5e97738$export$a8fb05107cd01f03)(summary
|
|
1064
|
+
children: (0, $ae41d7dfb5e97738$export$a8fb05107cd01f03)(summary === null || summary === void 0 ? void 0 : summary.duration)
|
|
1059
1065
|
}),
|
|
1060
1066
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("div", {
|
|
1061
1067
|
className: "route-item-distance",
|
|
1062
|
-
children: (0, $ae41d7dfb5e97738$export$98fa73d0d16cf821)(summary
|
|
1068
|
+
children: (0, $ae41d7dfb5e97738$export$98fa73d0d16cf821)(summary === null || summary === void 0 ? void 0 : summary.distance)
|
|
1063
1069
|
})
|
|
1064
1070
|
]
|
|
1065
1071
|
})
|
|
@@ -1075,6 +1081,7 @@ const $189a2791d8070fe0$var$openRoute = 'https://api.openrouteservice.org/v2/dir
|
|
|
1075
1081
|
const $189a2791d8070fe0$var$openRouteAPIKey = '5b3ce3597851110001cf62483cfd6bd46f934b7d96f108a35e0f08b8';
|
|
1076
1082
|
const $189a2791d8070fe0$var$googleMapsAddress = 'https://www.google.com/maps/dir/?api=1&';
|
|
1077
1083
|
const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerData: setMapLayerData, color: color, setQrCodeUrl: setQrCodeUrl })=>{
|
|
1084
|
+
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;
|
|
1078
1085
|
const isUsedOnBorne = (0, $1FYMx$daviairetorikframework.useRetorikStore)((state)=>state.configuration.isUsedOnBorne);
|
|
1079
1086
|
const locale = (0, $1FYMx$daviairetorikframework.useLocaleStore)((state)=>state.locale);
|
|
1080
1087
|
const [drivingCar, setDrivingCar] = (0, $1FYMx$react.useState)(undefined);
|
|
@@ -1163,7 +1170,7 @@ const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1163
1170
|
}
|
|
1164
1171
|
};
|
|
1165
1172
|
const handleClick = async ()=>{
|
|
1166
|
-
if (travelModeRef
|
|
1173
|
+
if ((travelModeRef === null || travelModeRef === void 0 ? void 0 : travelModeRef.current) && coordinates.length === 2) {
|
|
1167
1174
|
// Create an URL to Google Maps with coordinates and travelling mode
|
|
1168
1175
|
const coordinatesInUrl = `origin=${coordinates[0][1]},${coordinates[0][0]}&destination=${coordinates[1][1]},${coordinates[1][0]}`;
|
|
1169
1176
|
const fullUrl = `${$189a2791d8070fe0$var$googleMapsAddress}${coordinatesInUrl}&travelmode=${travelModeRef.current}`;
|
|
@@ -1183,8 +1190,8 @@ const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1183
1190
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $394b25b73dc47897$export$2e2bcd8739ae039), {
|
|
1184
1191
|
summary: {
|
|
1185
1192
|
type: 'drivingCar',
|
|
1186
|
-
distance: drivingCar
|
|
1187
|
-
duration: drivingCar
|
|
1193
|
+
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,
|
|
1194
|
+
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
|
|
1188
1195
|
},
|
|
1189
1196
|
chosen: currentChosen === 'drivingCar',
|
|
1190
1197
|
color: color,
|
|
@@ -1193,8 +1200,8 @@ const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1193
1200
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $394b25b73dc47897$export$2e2bcd8739ae039), {
|
|
1194
1201
|
summary: {
|
|
1195
1202
|
type: 'cyclingRegular',
|
|
1196
|
-
distance: cyclingRegular
|
|
1197
|
-
duration: cyclingRegular
|
|
1203
|
+
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,
|
|
1204
|
+
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
|
|
1198
1205
|
},
|
|
1199
1206
|
chosen: currentChosen === 'cyclingRegular',
|
|
1200
1207
|
color: color,
|
|
@@ -1203,8 +1210,8 @@ const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1203
1210
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $394b25b73dc47897$export$2e2bcd8739ae039), {
|
|
1204
1211
|
summary: {
|
|
1205
1212
|
type: 'footWalking',
|
|
1206
|
-
distance: footWalking
|
|
1207
|
-
duration: footWalking
|
|
1213
|
+
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,
|
|
1214
|
+
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
|
|
1208
1215
|
},
|
|
1209
1216
|
chosen: currentChosen === 'footWalking',
|
|
1210
1217
|
color: color,
|
|
@@ -1219,7 +1226,7 @@ const $189a2791d8070fe0$var$Routes = ({ coordinates: coordinates, setMapLayerDat
|
|
|
1219
1226
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $c8e8fe537b18dad0$export$2e2bcd8739ae039), {
|
|
1220
1227
|
className: "route-icon-medium"
|
|
1221
1228
|
}),
|
|
1222
|
-
(0, $017145711b309a2f$export$d07f57595c356899)((0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]
|
|
1229
|
+
(0, $017145711b309a2f$export$d07f57595c356899)(((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.route) || (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))['fr-FR'].route, locale)
|
|
1223
1230
|
]
|
|
1224
1231
|
})
|
|
1225
1232
|
]
|
|
@@ -1254,6 +1261,7 @@ const $2ed5971e4d4df7a9$var$md = new (0, ($parcel$interopDefault($1FYMx$markdown
|
|
|
1254
1261
|
});
|
|
1255
1262
|
const $2ed5971e4d4df7a9$var$fadeDuration = 500;
|
|
1256
1263
|
const $2ed5971e4d4df7a9$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClose, setMapLayerData: setMapLayerData })=>{
|
|
1264
|
+
var _translation_locale, _translation_locale1, _translation_locale2;
|
|
1257
1265
|
const dispatch = (0, $1FYMx$reactredux.useDispatch)();
|
|
1258
1266
|
const currentUserPos = (0, $1FYMx$reactredux.useSelector)((state)=>state.map.currentUserLocation);
|
|
1259
1267
|
const locale = (0, $1FYMx$daviairetorikframework.useLocaleStore)((state)=>state.locale);
|
|
@@ -1341,8 +1349,8 @@ const $2ed5971e4d4df7a9$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1341
1349
|
};
|
|
1342
1350
|
const handlePoiClose = ()=>{
|
|
1343
1351
|
setMainFadingOut(true);
|
|
1344
|
-
mainFadeOutTimerRef
|
|
1345
|
-
mainSecondFadeOutTimerRef
|
|
1352
|
+
(mainFadeOutTimerRef === null || mainFadeOutTimerRef === void 0 ? void 0 : mainFadeOutTimerRef.current) && clearTimeout(mainFadeOutTimerRef.current);
|
|
1353
|
+
(mainSecondFadeOutTimerRef === null || mainSecondFadeOutTimerRef === void 0 ? void 0 : mainSecondFadeOutTimerRef.current) && clearTimeout(mainSecondFadeOutTimerRef.current);
|
|
1346
1354
|
mainFadeOutTimerRef.current = setTimeout(()=>{
|
|
1347
1355
|
setMainFadingOut(false);
|
|
1348
1356
|
}, $2ed5971e4d4df7a9$var$fadeDuration);
|
|
@@ -1352,7 +1360,7 @@ const $2ed5971e4d4df7a9$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1352
1360
|
};
|
|
1353
1361
|
const handleCloseQrCode = ()=>{
|
|
1354
1362
|
setFadingOut(true);
|
|
1355
|
-
fadeOutTimerRef
|
|
1363
|
+
(fadeOutTimerRef === null || fadeOutTimerRef === void 0 ? void 0 : fadeOutTimerRef.current) && clearTimeout(fadeOutTimerRef.current);
|
|
1356
1364
|
fadeOutTimerRef.current = setTimeout(()=>{
|
|
1357
1365
|
setQrCodeUrl(null);
|
|
1358
1366
|
setFadingOut(false);
|
|
@@ -1405,7 +1413,7 @@ const $2ed5971e4d4df7a9$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1405
1413
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("button", {
|
|
1406
1414
|
onClick: ()=>showMoreHandler(poi),
|
|
1407
1415
|
className: `button_${(0, $f786cfa56b95c86f$export$7f9d623abbd2d21d)(poi.type)} poiButton`,
|
|
1408
|
-
children: (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]
|
|
1416
|
+
children: ((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.showmore) || (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))['fr-FR'].showmore
|
|
1409
1417
|
})
|
|
1410
1418
|
]
|
|
1411
1419
|
})
|
|
@@ -1435,10 +1443,10 @@ const $2ed5971e4d4df7a9$export$b79ff28f7aa330b0 = ({ poi: poi, poiClose: poiClos
|
|
|
1435
1443
|
className: "qrcode-text",
|
|
1436
1444
|
children: [
|
|
1437
1445
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("div", {
|
|
1438
|
-
children: (0, $017145711b309a2f$export$d07f57595c356899)((0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]
|
|
1446
|
+
children: (0, $017145711b309a2f$export$d07f57595c356899)(((_translation_locale1 = (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]) === null || _translation_locale1 === void 0 ? void 0 : _translation_locale1.openroutemobile) || (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))['fr-FR'].openroutemobile, locale)
|
|
1439
1447
|
}),
|
|
1440
1448
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("div", {
|
|
1441
|
-
children: (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]
|
|
1449
|
+
children: ((_translation_locale2 = (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))[locale]) === null || _translation_locale2 === void 0 ? void 0 : _translation_locale2.scanQR) || (0, (/*@__PURE__*/$parcel$interopDefault($cab9619c0e8788ed$exports)))['fr-FR'].scanQR
|
|
1442
1450
|
})
|
|
1443
1451
|
]
|
|
1444
1452
|
})
|
|
@@ -1461,12 +1469,12 @@ const $b28bc26c8207bfe2$var$CustomLoader = ()=>{
|
|
|
1461
1469
|
const [visible, setVisible] = (0, $1FYMx$react.useState)(false);
|
|
1462
1470
|
const timerRef = (0, $1FYMx$react.useRef)(null);
|
|
1463
1471
|
(0, $1FYMx$react.useEffect)(()=>{
|
|
1464
|
-
timerRef
|
|
1472
|
+
(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current) && clearTimeout(timerRef.current);
|
|
1465
1473
|
timerRef.current = setTimeout(()=>{
|
|
1466
1474
|
setVisible(true);
|
|
1467
1475
|
}, 4000);
|
|
1468
1476
|
return ()=>{
|
|
1469
|
-
timerRef
|
|
1477
|
+
(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current) && clearTimeout(timerRef.current);
|
|
1470
1478
|
};
|
|
1471
1479
|
}, []);
|
|
1472
1480
|
return /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsxs)("div", {
|
|
@@ -1494,6 +1502,7 @@ var $b28bc26c8207bfe2$export$2e2bcd8739ae039 = $b28bc26c8207bfe2$var$CustomLoade
|
|
|
1494
1502
|
shadowUrl: (0, $e2ff17f76333d89e$export$1524746c49eeef2b)
|
|
1495
1503
|
});
|
|
1496
1504
|
const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
1505
|
+
var _translation_locale, _translation_locale1, _translation_locale2, _translation_locale3;
|
|
1497
1506
|
const pois = (0, $1FYMx$reactredux.useSelector)((state)=>state.poi.poiList);
|
|
1498
1507
|
const dispatch = (0, $1FYMx$reactredux.useDispatch)();
|
|
1499
1508
|
const locale = (0, $1FYMx$daviairetorikframework.useLocaleStore)((state)=>state.locale);
|
|
@@ -1522,7 +1531,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1522
1531
|
service: (0, $162f921bccd57232$export$d60d82aee240d483)
|
|
1523
1532
|
};
|
|
1524
1533
|
const poisToDisplay = (0, $1FYMx$react.useMemo)(()=>{
|
|
1525
|
-
if (pois && Array.isArray(pois) && pois.length && selectedFilters) return pois
|
|
1534
|
+
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));
|
|
1526
1535
|
return [];
|
|
1527
1536
|
}, [
|
|
1528
1537
|
pois,
|
|
@@ -1534,13 +1543,13 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1534
1543
|
}));
|
|
1535
1544
|
};
|
|
1536
1545
|
(0, $1FYMx$react.useEffect)(()=>{
|
|
1537
|
-
props
|
|
1546
|
+
(props === null || props === void 0 ? void 0 : props.activeTenant) && dispatch((0, $0f413ce9a9101064$export$2cb53dffb4e7523f)({
|
|
1538
1547
|
activeTenant: props.activeTenant
|
|
1539
1548
|
}));
|
|
1540
|
-
props
|
|
1549
|
+
(props === null || props === void 0 ? void 0 : props.tenantList) && dispatch((0, $0f413ce9a9101064$export$4afb5402acd283a1)({
|
|
1541
1550
|
tenantList: props.tenantList
|
|
1542
1551
|
}));
|
|
1543
|
-
props
|
|
1552
|
+
(props === null || props === void 0 ? void 0 : props.userLocation) && dispatch((0, $42ee6246860dbbfc$export$9e7828c0c29d5e97)({
|
|
1544
1553
|
currentUserLocation: props.userLocation
|
|
1545
1554
|
}));
|
|
1546
1555
|
}, [
|
|
@@ -1578,7 +1587,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1578
1587
|
CSSInjected: true
|
|
1579
1588
|
}));
|
|
1580
1589
|
}
|
|
1581
|
-
if (!props
|
|
1590
|
+
if (!(props === null || props === void 0 ? void 0 : props.userLocation)) navigator.geolocation.getCurrentPosition((res)=>{
|
|
1582
1591
|
if (res) {
|
|
1583
1592
|
if (mapRef.current) {
|
|
1584
1593
|
const center = {
|
|
@@ -1599,9 +1608,10 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1599
1608
|
console.log('Retorik Map > Destroy map component');
|
|
1600
1609
|
// save map state
|
|
1601
1610
|
if (markersRef.current && botCSSInjected) {
|
|
1611
|
+
var _mapRef_current, _mapRef_current1;
|
|
1602
1612
|
const saveMapState = {
|
|
1603
|
-
zoom: mapRef.current
|
|
1604
|
-
location: mapRef.current
|
|
1613
|
+
zoom: (_mapRef_current = mapRef.current) === null || _mapRef_current === void 0 ? void 0 : _mapRef_current.getZoom(),
|
|
1614
|
+
location: (_mapRef_current1 = mapRef.current) === null || _mapRef_current1 === void 0 ? void 0 : _mapRef_current1.getCenter()
|
|
1605
1615
|
};
|
|
1606
1616
|
dispatch((0, $42ee6246860dbbfc$export$99750ab96d7881ba)({
|
|
1607
1617
|
mapState: saveMapState
|
|
@@ -1637,9 +1647,10 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1637
1647
|
}
|
|
1638
1648
|
if (retorikEvent === (0, $1FYMx$daviairetorikframework.RetorikEvent).DetailViewClose && currentSubView === (0, $1FYMx$daviairetorikframework.CurrentSubView).none) {
|
|
1639
1649
|
if (markersRef.current) {
|
|
1650
|
+
var _mapRef_current, _mapRef_current1;
|
|
1640
1651
|
const saveMapState = {
|
|
1641
|
-
zoom: mapRef.current
|
|
1642
|
-
location: mapRef.current
|
|
1652
|
+
zoom: (_mapRef_current = mapRef.current) === null || _mapRef_current === void 0 ? void 0 : _mapRef_current.getZoom(),
|
|
1653
|
+
location: (_mapRef_current1 = mapRef.current) === null || _mapRef_current1 === void 0 ? void 0 : _mapRef_current1.getCenter()
|
|
1643
1654
|
};
|
|
1644
1655
|
if (saveMapState.zoom !== undefined && saveMapState.location !== undefined) dispatch((0, $42ee6246860dbbfc$export$99750ab96d7881ba)({
|
|
1645
1656
|
mapState: saveMapState
|
|
@@ -1650,7 +1661,8 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1650
1661
|
retorikEvent
|
|
1651
1662
|
]);
|
|
1652
1663
|
(0, $1FYMx$react.useEffect)(()=>{
|
|
1653
|
-
|
|
1664
|
+
var _tenantList_activeTenant;
|
|
1665
|
+
const aroundMeDistance = (_tenantList_activeTenant = tenantList[activeTenant]) === null || _tenantList_activeTenant === void 0 ? void 0 : _tenantList_activeTenant.aroundMeDistance;
|
|
1654
1666
|
if (aroundMeDistance) setAroundMeDistance(aroundMeDistance);
|
|
1655
1667
|
}, [
|
|
1656
1668
|
tenantList,
|
|
@@ -1697,7 +1709,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1697
1709
|
if (selectedPOIIdentifier !== '') {
|
|
1698
1710
|
const selectedPOIObj = pois.find((p)=>p.contentItemId === selectedPOIIdentifier);
|
|
1699
1711
|
const selectedMarker = markersRef.current.find((m)=>m.id === selectedPOIIdentifier);
|
|
1700
|
-
if (selectedMarker && selectedPOIObj
|
|
1712
|
+
if (selectedMarker && (selectedPOIObj === null || selectedPOIObj === void 0 ? void 0 : selectedPOIObj.location) && mapRef.current) {
|
|
1701
1713
|
dispatch((0, $42ee6246860dbbfc$export$99750ab96d7881ba)({
|
|
1702
1714
|
mapState: {
|
|
1703
1715
|
location: undefined,
|
|
@@ -1707,7 +1719,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1707
1719
|
mapRef.current.flyTo(selectedPOIObj.location, 18);
|
|
1708
1720
|
mapRef.current.on('zoomend', function() {
|
|
1709
1721
|
setSelectedPOI(selectedPOIObj);
|
|
1710
|
-
selectedMarker.marker.openPopup(selectedPOIObj
|
|
1722
|
+
selectedMarker.marker.openPopup(selectedPOIObj === null || selectedPOIObj === void 0 ? void 0 : selectedPOIObj.location);
|
|
1711
1723
|
dispatch((0, $42ee6246860dbbfc$export$79507451adbe6af3)({
|
|
1712
1724
|
selectedPOIIdentifier: ''
|
|
1713
1725
|
}));
|
|
@@ -1730,7 +1742,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1730
1742
|
setSelectedPOI(undefined);
|
|
1731
1743
|
};
|
|
1732
1744
|
const aroundMe = ()=>{
|
|
1733
|
-
if (props
|
|
1745
|
+
if ((props === null || props === void 0 ? void 0 : props.userLocation) && (props.tenantList && props.activeTenant || tenantList && tenantList[activeTenant])) {
|
|
1734
1746
|
handlerAroundMe(props.userLocation);
|
|
1735
1747
|
return;
|
|
1736
1748
|
}
|
|
@@ -1752,8 +1764,8 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1752
1764
|
currentUserLocation: center
|
|
1753
1765
|
}));
|
|
1754
1766
|
// Calculez les coordonnées des coins du rectangle de la zone de 10km autour du centre
|
|
1755
|
-
const southWest = (0, ($parcel$interopDefault($1FYMx$leaflet))).latLng(center).toBounds(aroundMeDistance
|
|
1756
|
-
const northEast = (0, ($parcel$interopDefault($1FYMx$leaflet))).latLng(center).toBounds(aroundMeDistance
|
|
1767
|
+
const southWest = (0, ($parcel$interopDefault($1FYMx$leaflet))).latLng(center).toBounds(aroundMeDistance !== null && aroundMeDistance !== void 0 ? aroundMeDistance : 5000).getSouthWest();
|
|
1768
|
+
const northEast = (0, ($parcel$interopDefault($1FYMx$leaflet))).latLng(center).toBounds(aroundMeDistance !== null && aroundMeDistance !== void 0 ? aroundMeDistance : 5000).getNorthEast();
|
|
1757
1769
|
const bounds = (0, ($parcel$interopDefault($1FYMx$leaflet))).latLngBounds(southWest, northEast);
|
|
1758
1770
|
// Utilisez la méthode fitBounds() pour ajuster la vue de la carte à la zone de 10km autour du centre
|
|
1759
1771
|
mapRef.current.fitBounds(bounds);
|
|
@@ -1761,7 +1773,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1761
1773
|
if (l instanceof (0, ($parcel$interopDefault($1FYMx$leaflet))).MarkerClusterGroup && mapRef.current !== undefined) l.disableClustering();
|
|
1762
1774
|
});
|
|
1763
1775
|
mapRef.current.on('zoomend', function() {
|
|
1764
|
-
if (mapRef
|
|
1776
|
+
if ((mapRef === null || mapRef === void 0 ? void 0 : mapRef.current) && mapRef.current.getZoom() < 12) {
|
|
1765
1777
|
if (mapRef.current !== undefined) mapRef.current.eachLayer((l)=>{
|
|
1766
1778
|
if (l instanceof (0, ($parcel$interopDefault($1FYMx$leaflet))).MarkerClusterGroup && mapRef.current !== undefined) l.enableClustering();
|
|
1767
1779
|
});
|
|
@@ -1836,8 +1848,8 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1836
1848
|
}),
|
|
1837
1849
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $1FYMx$reactleaflet.ZoomControl), {
|
|
1838
1850
|
position: "bottomright",
|
|
1839
|
-
zoomInTitle: (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]
|
|
1840
|
-
zoomOutTitle: (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]
|
|
1851
|
+
zoomInTitle: ((_translation_locale = (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]) === null || _translation_locale === void 0 ? void 0 : _translation_locale.zoomintitle) || (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))['fr-FR'].zoomintitle,
|
|
1852
|
+
zoomOutTitle: ((_translation_locale1 = (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]) === null || _translation_locale1 === void 0 ? void 0 : _translation_locale1.zoomouttitle) || (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))['fr-FR'].zoomouttitle
|
|
1841
1853
|
}, Date.now()),
|
|
1842
1854
|
currentUserPos !== undefined && /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $bc6ce4136a207b98$export$b42842b40b0e9990), {
|
|
1843
1855
|
currentUserPos: currentUserPos
|
|
@@ -1851,7 +1863,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1851
1863
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("button", {
|
|
1852
1864
|
id: "around-me",
|
|
1853
1865
|
onClick: ()=>aroundMe(),
|
|
1854
|
-
title: `${(0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]
|
|
1866
|
+
title: `${((_translation_locale2 = (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]) === null || _translation_locale2 === void 0 ? void 0 : _translation_locale2.aroundme1) || (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))['fr-FR'].aroundme1} ${aroundMeDistance / 1000} ${((_translation_locale3 = (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))[locale]) === null || _translation_locale3 === void 0 ? void 0 : _translation_locale3.aroundme2) || (0, (/*@__PURE__*/$parcel$interopDefault($9e62f3c02c5f7d6f$exports)))['fr-FR'].aroundme2}`,
|
|
1855
1867
|
children: /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)("img", {
|
|
1856
1868
|
id: "map-target",
|
|
1857
1869
|
src: (0, $e2ff17f76333d89e$export$44271b4f0c6a3563),
|
|
@@ -1859,7 +1871,7 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1859
1871
|
})
|
|
1860
1872
|
}),
|
|
1861
1873
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $4e61b315bd882780$export$e2d78e54e91e6990), {
|
|
1862
|
-
settings: props
|
|
1874
|
+
settings: props === null || props === void 0 ? void 0 : props.settings
|
|
1863
1875
|
})
|
|
1864
1876
|
]
|
|
1865
1877
|
});
|
|
@@ -1871,6 +1883,9 @@ const $42234972a9a1d113$export$ddd638f4963d1957 = (props)=>{
|
|
|
1871
1883
|
|
|
1872
1884
|
|
|
1873
1885
|
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
|
|
1874
1889
|
/* eslint-disable @typescript-eslint/camelcase */ const $60765c4b3ee8c963$export$da40755304d3143 = {
|
|
1875
1890
|
asklea_lesbertranges: {
|
|
1876
1891
|
name: 'lesbertranges',
|
|
@@ -30545,12 +30560,16 @@ const $a33b51f1656f8bb9$export$1f0060b11c07d31 = (0, $1FYMx$reduxjstoolkitqueryr
|
|
|
30545
30560
|
transformResponse: (response)=>{
|
|
30546
30561
|
const res = {};
|
|
30547
30562
|
if (response && response.length > 0) {
|
|
30548
|
-
const filteredData = response.filter((a)=>
|
|
30563
|
+
const filteredData = response.filter((a)=>{
|
|
30564
|
+
var _a_agentZone;
|
|
30565
|
+
return (_a_agentZone = a.agentZone) === null || _a_agentZone === void 0 ? void 0 : _a_agentZone.zone;
|
|
30566
|
+
});
|
|
30549
30567
|
filteredData.forEach((agent)=>{
|
|
30568
|
+
var _agent_agentZone;
|
|
30550
30569
|
res[agent.name] = {
|
|
30551
30570
|
name: agent.name,
|
|
30552
30571
|
retorikName: agent.name,
|
|
30553
|
-
areaLocation: agent.agentZone
|
|
30572
|
+
areaLocation: (_agent_agentZone = agent.agentZone) === null || _agent_agentZone === void 0 ? void 0 : _agent_agentZone.zone
|
|
30554
30573
|
};
|
|
30555
30574
|
});
|
|
30556
30575
|
}
|
|
@@ -30579,15 +30598,13 @@ const $a33b51f1656f8bb9$export$7867c88f1bb2065 = async ({ token: token, useDevTe
|
|
|
30579
30598
|
callBack: callBack
|
|
30580
30599
|
};
|
|
30581
30600
|
// If categories are provided, load only these. Otherwise load all of them.
|
|
30582
|
-
if (categoriesToShow
|
|
30583
|
-
type: category
|
|
30584
|
-
|
|
30585
|
-
}));
|
|
30601
|
+
if (categoriesToShow === null || categoriesToShow === void 0 ? void 0 : categoriesToShow.length) categoriesToShow.forEach((category)=>$a33b51f1656f8bb9$var$fetchPoiType((0, $1FYMx$swchelperscjs_object_spreadcjs._)({
|
|
30602
|
+
type: category
|
|
30603
|
+
}, commonData)));
|
|
30586
30604
|
else Object.keys((0, $8f1a6adc86e47827$export$55e6fd7564320b53)).forEach((key)=>{
|
|
30587
|
-
$a33b51f1656f8bb9$var$fetchPoiType({
|
|
30588
|
-
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53)[key]
|
|
30589
|
-
|
|
30590
|
-
});
|
|
30605
|
+
$a33b51f1656f8bb9$var$fetchPoiType((0, $1FYMx$swchelperscjs_object_spreadcjs._)({
|
|
30606
|
+
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53)[key]
|
|
30607
|
+
}, commonData));
|
|
30591
30608
|
});
|
|
30592
30609
|
}
|
|
30593
30610
|
};
|
|
@@ -30609,16 +30626,18 @@ const $a33b51f1656f8bb9$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30609
30626
|
'Content-type': 'application/graphql; charset=UTF-8'
|
|
30610
30627
|
}
|
|
30611
30628
|
}).then((response)=>response.json()).catch((error)=>console.warn(error));
|
|
30612
|
-
if (data
|
|
30629
|
+
if (data === null || data === void 0 ? void 0 : data.data) switch(type){
|
|
30613
30630
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).afaire:
|
|
30614
|
-
|
|
30615
|
-
|
|
30631
|
+
var _data_data_geoDistanceSortedTouristAttraction;
|
|
30632
|
+
if ((_data_data_geoDistanceSortedTouristAttraction = data.data.geoDistanceSortedTouristAttraction) === null || _data_data_geoDistanceSortedTouristAttraction === void 0 ? void 0 : _data_data_geoDistanceSortedTouristAttraction.length) data.data.geoDistanceSortedTouristAttraction.forEach((e)=>{
|
|
30633
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30634
|
+
((_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({
|
|
30616
30635
|
location: {
|
|
30617
30636
|
lat: e.place.latitude,
|
|
30618
30637
|
lng: e.place.longitude
|
|
30619
30638
|
},
|
|
30620
30639
|
name: e.displayText,
|
|
30621
|
-
imageURL: e.thing.image
|
|
30640
|
+
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,
|
|
30622
30641
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).afaire,
|
|
30623
30642
|
description: e.thing.description,
|
|
30624
30643
|
address: $a33b51f1656f8bb9$var$getAddressFromPlaceData(e.place),
|
|
@@ -30628,14 +30647,16 @@ const $a33b51f1656f8bb9$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30628
30647
|
});
|
|
30629
30648
|
break;
|
|
30630
30649
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).avoir:
|
|
30631
|
-
|
|
30632
|
-
|
|
30650
|
+
var _data_data_geoDistanceSortedTouristDestination;
|
|
30651
|
+
if ((_data_data_geoDistanceSortedTouristDestination = data.data.geoDistanceSortedTouristDestination) === null || _data_data_geoDistanceSortedTouristDestination === void 0 ? void 0 : _data_data_geoDistanceSortedTouristDestination.length) data.data.geoDistanceSortedTouristDestination.forEach((e)=>{
|
|
30652
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30653
|
+
((_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({
|
|
30633
30654
|
location: {
|
|
30634
30655
|
lat: e.place.latitude,
|
|
30635
30656
|
lng: e.place.longitude
|
|
30636
30657
|
},
|
|
30637
30658
|
name: e.displayText,
|
|
30638
|
-
imageURL: e.thing.image
|
|
30659
|
+
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,
|
|
30639
30660
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).avoir,
|
|
30640
30661
|
description: e.thing.description,
|
|
30641
30662
|
address: $a33b51f1656f8bb9$var$getAddressFromPlaceData(e.place),
|
|
@@ -30645,14 +30666,16 @@ const $a33b51f1656f8bb9$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30645
30666
|
});
|
|
30646
30667
|
break;
|
|
30647
30668
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).hebergement:
|
|
30648
|
-
|
|
30649
|
-
|
|
30669
|
+
var _data_data_geoDistanceSortedLodgingBusiness;
|
|
30670
|
+
if ((_data_data_geoDistanceSortedLodgingBusiness = data.data.geoDistanceSortedLodgingBusiness) === null || _data_data_geoDistanceSortedLodgingBusiness === void 0 ? void 0 : _data_data_geoDistanceSortedLodgingBusiness.length) data.data.geoDistanceSortedLodgingBusiness.forEach((e)=>{
|
|
30671
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30672
|
+
((_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({
|
|
30650
30673
|
location: {
|
|
30651
30674
|
lat: e.place.latitude,
|
|
30652
30675
|
lng: e.place.longitude
|
|
30653
30676
|
},
|
|
30654
30677
|
name: e.displayText,
|
|
30655
|
-
imageURL: e.thing.image
|
|
30678
|
+
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,
|
|
30656
30679
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).hebergement,
|
|
30657
30680
|
description: e.thing.description,
|
|
30658
30681
|
address: $a33b51f1656f8bb9$var$getAddressFromPlaceData(e.place),
|
|
@@ -30662,28 +30685,32 @@ const $a33b51f1656f8bb9$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30662
30685
|
});
|
|
30663
30686
|
break;
|
|
30664
30687
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).produit:
|
|
30665
|
-
|
|
30666
|
-
|
|
30688
|
+
var _data_data_geoDistanceSortedProduct;
|
|
30689
|
+
if ((_data_data_geoDistanceSortedProduct = data.data.geoDistanceSortedProduct) === null || _data_data_geoDistanceSortedProduct === void 0 ? void 0 : _data_data_geoDistanceSortedProduct.length) data.data.geoDistanceSortedProduct.forEach((e)=>{
|
|
30690
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30691
|
+
((_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({
|
|
30667
30692
|
location: {
|
|
30668
30693
|
lat: e.place.latitude,
|
|
30669
30694
|
lng: e.place.longitude
|
|
30670
30695
|
},
|
|
30671
30696
|
name: e.displayText,
|
|
30672
|
-
imageURL: e.thing.image
|
|
30697
|
+
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,
|
|
30673
30698
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).produit,
|
|
30674
30699
|
contentItemId: e.contentItemId
|
|
30675
30700
|
});
|
|
30676
30701
|
});
|
|
30677
30702
|
break;
|
|
30678
30703
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).restaurant:
|
|
30679
|
-
|
|
30680
|
-
|
|
30704
|
+
var _data_data_geoDistanceSortedFoodEstablishment;
|
|
30705
|
+
if ((_data_data_geoDistanceSortedFoodEstablishment = data.data.geoDistanceSortedFoodEstablishment) === null || _data_data_geoDistanceSortedFoodEstablishment === void 0 ? void 0 : _data_data_geoDistanceSortedFoodEstablishment.length) data.data.geoDistanceSortedFoodEstablishment.forEach((e)=>{
|
|
30706
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30707
|
+
((_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({
|
|
30681
30708
|
location: {
|
|
30682
30709
|
lat: e.place.latitude,
|
|
30683
30710
|
lng: e.place.longitude
|
|
30684
30711
|
},
|
|
30685
30712
|
name: e.displayText,
|
|
30686
|
-
imageURL: e.thing.image
|
|
30713
|
+
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,
|
|
30687
30714
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).restaurant,
|
|
30688
30715
|
description: e.thing.description,
|
|
30689
30716
|
address: $a33b51f1656f8bb9$var$getAddressFromPlaceData(e.place),
|
|
@@ -30693,14 +30720,16 @@ const $a33b51f1656f8bb9$var$fetchPoiType = async ({ type: type, url: url, token:
|
|
|
30693
30720
|
});
|
|
30694
30721
|
break;
|
|
30695
30722
|
case (0, $8f1a6adc86e47827$export$55e6fd7564320b53).service:
|
|
30696
|
-
|
|
30697
|
-
|
|
30723
|
+
var _data_data_geoDistanceSortedService;
|
|
30724
|
+
if ((_data_data_geoDistanceSortedService = data.data.geoDistanceSortedService) === null || _data_data_geoDistanceSortedService === void 0 ? void 0 : _data_data_geoDistanceSortedService.length) data.data.geoDistanceSortedService.forEach((e)=>{
|
|
30725
|
+
var _e_place, _e_place1, _e_thing_image_urls, _e_thing_image;
|
|
30726
|
+
((_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({
|
|
30698
30727
|
location: {
|
|
30699
30728
|
lat: e.place.latitude,
|
|
30700
30729
|
lng: e.place.longitude
|
|
30701
30730
|
},
|
|
30702
30731
|
name: e.displayText,
|
|
30703
|
-
imageURL: e.thing.image
|
|
30732
|
+
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,
|
|
30704
30733
|
type: (0, $8f1a6adc86e47827$export$55e6fd7564320b53).service,
|
|
30705
30734
|
contentItemId: e.contentItemId
|
|
30706
30735
|
});
|
|
@@ -30764,15 +30793,15 @@ const $65ff319993503e5c$export$5e65d2e7602ac78d = ({ retorikName: retorikName, u
|
|
|
30764
30793
|
position.latitude = currentUserLocation.lat;
|
|
30765
30794
|
position.longitude = currentUserLocation.lng;
|
|
30766
30795
|
}
|
|
30767
|
-
(0, $a33b51f1656f8bb9$export$7867c88f1bb2065)({
|
|
30796
|
+
(0, $a33b51f1656f8bb9$export$7867c88f1bb2065)((0, $1FYMx$swchelperscjs_object_spread_propscjs._)((0, $1FYMx$swchelperscjs_object_spreadcjs._)({
|
|
30768
30797
|
token: token,
|
|
30769
30798
|
useDevTenant: useDevTenant,
|
|
30770
30799
|
locale: locale.toLowerCase(),
|
|
30771
|
-
tenant: retorikName
|
|
30772
|
-
|
|
30800
|
+
tenant: retorikName
|
|
30801
|
+
}, position), {
|
|
30773
30802
|
categoriesToShow: categoriesToShow,
|
|
30774
30803
|
callBack: setPoiList
|
|
30775
|
-
});
|
|
30804
|
+
}));
|
|
30776
30805
|
}
|
|
30777
30806
|
}, [
|
|
30778
30807
|
token,
|
|
@@ -30894,17 +30923,16 @@ const $299c386797307d91$export$a6b9c7133f02bfd8 = ()=>{
|
|
|
30894
30923
|
|
|
30895
30924
|
const $cf1d789e346df3b2$var$store = (0, $8a94f80ea85e1dca$export$281a42ec42dc777b)();
|
|
30896
30925
|
const $cf1d789e346df3b2$export$a5c7b93649eaf8f8 = (props)=>{
|
|
30926
|
+
var _props_settings;
|
|
30897
30927
|
return /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $1FYMx$reactjsxruntime.Fragment), {
|
|
30898
|
-
children: props
|
|
30928
|
+
children: (props === null || props === void 0 ? void 0 : props.activeTenant) && /*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsxs)((0, $1FYMx$reactredux.Provider), {
|
|
30899
30929
|
store: $cf1d789e346df3b2$var$store,
|
|
30900
30930
|
children: [
|
|
30901
|
-
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $42234972a9a1d113$export$ddd638f4963d1957), {
|
|
30902
|
-
...props
|
|
30903
|
-
}),
|
|
30931
|
+
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $42234972a9a1d113$export$ddd638f4963d1957), (0, $1FYMx$swchelperscjs_object_spreadcjs._)({}, props)),
|
|
30904
30932
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $65ff319993503e5c$export$5e65d2e7602ac78d), {
|
|
30905
30933
|
retorikName: props.tenantList[props.activeTenant].retorikName,
|
|
30906
30934
|
useDevTenant: !!props.isDevTenant,
|
|
30907
|
-
categoriesToShow: props.settings
|
|
30935
|
+
categoriesToShow: (_props_settings = props.settings) === null || _props_settings === void 0 ? void 0 : _props_settings.showFilter
|
|
30908
30936
|
}),
|
|
30909
30937
|
/*#__PURE__*/ (0, $1FYMx$reactjsxruntime.jsx)((0, $10cac9979b1967c1$export$e370d38831f5792a), {})
|
|
30910
30938
|
]
|