@geotrekce/geotrek-rando-widget 0.7.1 → 0.8.1
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/cjs/grw-common-button_21.cjs.entry.js +60 -51
- package/dist/cjs/grw-common-button_21.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-common-button_21.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-common-button_21.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-information-desk_6.cjs.entry.js +12 -6
- package/dist/cjs/grw-information-desk_6.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-information-desk_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-information-desk_6.cjs.entry.js.map +1 -1
- package/dist/cjs/{pagination-528069db.js → pagination-4342f656.js} +9 -1
- package/dist/cjs/pagination-4342f656.js.br +0 -0
- package/dist/cjs/pagination-4342f656.js.gz +0 -0
- package/dist/cjs/pagination-4342f656.js.map +1 -0
- package/dist/collection/components/grw-switch/grw-switch.js +2 -1
- package/dist/collection/components/grw-switch/grw-switch.js.br +0 -0
- package/dist/collection/components/grw-switch/grw-switch.js.gz +0 -0
- package/dist/collection/components/grw-switch/grw-switch.js.map +1 -1
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.css +2 -0
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.css.br +0 -0
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.css.gz +0 -0
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js +4 -1
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.br +0 -0
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.gz +0 -0
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.map +1 -1
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.css +2 -0
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.css.br +0 -0
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.css.gz +0 -0
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.js +4 -1
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.js.br +0 -0
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.js.gz +0 -0
- package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.js.map +1 -1
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +3 -1
- package/dist/collection/components/grw-trek-card/grw-trek-card.css.br +0 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css.gz +0 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
- package/dist/collection/components/grw-trek-card/grw-trek-card.js.br +0 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +39 -24
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
- package/dist/collection/services/treks.service.js +6 -0
- package/dist/collection/services/treks.service.js.br +0 -0
- package/dist/collection/services/treks.service.js.gz +0 -0
- package/dist/collection/services/treks.service.js.map +1 -1
- package/dist/collection/store/grw-trek-provider.js +22 -28
- package/dist/collection/store/grw-trek-provider.js.br +0 -0
- package/dist/collection/store/grw-trek-provider.js.gz +0 -0
- package/dist/collection/store/grw-trek-provider.js.map +1 -1
- package/dist/collection/types/types.js.map +1 -1
- package/dist/esm/grw-common-button_21.entry.js +60 -51
- package/dist/esm/grw-common-button_21.entry.js.br +0 -0
- package/dist/esm/grw-common-button_21.entry.js.gz +0 -0
- package/dist/esm/grw-common-button_21.entry.js.map +1 -1
- package/dist/esm/grw-information-desk_6.entry.js +12 -6
- package/dist/esm/grw-information-desk_6.entry.js.br +0 -0
- package/dist/esm/grw-information-desk_6.entry.js.gz +0 -0
- package/dist/esm/grw-information-desk_6.entry.js.map +1 -1
- package/dist/esm/{pagination-3428bda5.js → pagination-6a17b295.js} +8 -2
- package/dist/esm/pagination-6a17b295.js.br +0 -0
- package/dist/esm/pagination-6a17b295.js.gz +0 -0
- package/dist/esm/pagination-6a17b295.js.map +1 -0
- package/dist/esm-es5/grw-common-button_21.entry.js +3 -3
- package/dist/esm-es5/grw-common-button_21.entry.js.br +0 -0
- package/dist/esm-es5/grw-common-button_21.entry.js.gz +0 -0
- package/dist/esm-es5/grw-common-button_21.entry.js.map +1 -1
- package/dist/esm-es5/grw-information-desk_6.entry.js +1 -1
- package/dist/esm-es5/grw-information-desk_6.entry.js.br +0 -0
- package/dist/esm-es5/grw-information-desk_6.entry.js.gz +0 -0
- package/dist/esm-es5/grw-information-desk_6.entry.js.map +1 -1
- package/dist/esm-es5/pagination-6a17b295.js +2 -0
- package/dist/esm-es5/pagination-6a17b295.js.br +0 -0
- package/dist/esm-es5/pagination-6a17b295.js.gz +0 -0
- package/dist/esm-es5/pagination-6a17b295.js.map +1 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-4dfdc6d3.js +2 -0
- package/dist/geotrek-rando-widget/p-4dfdc6d3.js.br +0 -0
- package/dist/geotrek-rando-widget/p-4dfdc6d3.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-4dfdc6d3.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-c171e0d7.entry.js → p-59922286.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-59922286.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-59922286.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-59922286.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-607c095f.system.js +2 -0
- package/dist/geotrek-rando-widget/p-607c095f.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-607c095f.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-607c095f.system.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-d2fb6fb4.system.entry.js → p-6967c491.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-6967c491.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-6967c491.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6967c491.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-9d826a4c.entry.js → p-7a381813.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-7a381813.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-7a381813.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7a381813.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-96d7dd37.system.entry.js +11 -0
- package/dist/geotrek-rando-widget/p-96d7dd37.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-96d7dd37.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-96d7dd37.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-b02ae30d.system.js +1 -1
- package/dist/geotrek-rando-widget/p-b02ae30d.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b02ae30d.system.js.gz +0 -0
- package/dist/types/services/treks.service.d.ts +2 -0
- package/dist/types/types/types.d.ts +5 -1
- package/package.json +1 -1
- package/dist/cjs/pagination-528069db.js.br +0 -0
- package/dist/cjs/pagination-528069db.js.gz +0 -0
- package/dist/cjs/pagination-528069db.js.map +0 -1
- package/dist/esm/pagination-3428bda5.js.br +0 -0
- package/dist/esm/pagination-3428bda5.js.gz +0 -0
- package/dist/esm/pagination-3428bda5.js.map +0 -1
- package/dist/esm-es5/pagination-3428bda5.js +0 -2
- package/dist/esm-es5/pagination-3428bda5.js.br +0 -0
- package/dist/esm-es5/pagination-3428bda5.js.gz +0 -0
- package/dist/esm-es5/pagination-3428bda5.js.map +0 -1
- package/dist/geotrek-rando-widget/p-9d826a4c.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-9d826a4c.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-9d826a4c.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-b1f344f9.js +0 -2
- package/dist/geotrek-rando-widget/p-b1f344f9.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b1f344f9.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b1f344f9.js.map +0 -1
- package/dist/geotrek-rando-widget/p-c171e0d7.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c171e0d7.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c171e0d7.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-d2fb6fb4.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d2fb6fb4.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-d2fb6fb4.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-ed66cd9d.system.entry.js +0 -11
- package/dist/geotrek-rando-widget/p-ed66cd9d.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ed66cd9d.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ed66cd9d.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-ff433eba.system.js +0 -2
- package/dist/geotrek-rando-widget/p-ff433eba.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ff433eba.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ff433eba.system.js.map +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-e9166f30.js');
|
|
6
6
|
const i18n = require('./i18n-c8d45caf.js');
|
|
7
7
|
const utils = require('./utils-84828f7f.js');
|
|
8
|
-
const pagination = require('./pagination-
|
|
8
|
+
const pagination = require('./pagination-4342f656.js');
|
|
9
9
|
|
|
10
10
|
const grwCommonButtonCss = ".material-symbols{font-family:\"Material Symbols Outlined\"}.material-symbols-outlined{font-variation-settings:\"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48}.common-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;color:var(--color-on-primary-container);background-color:var(--color-primary-container);padding:12px 24px;border-radius:var(--border-radius, 20px);-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1px;font-family:var(--font-family);font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.common-button .common-button-icon{font-size:18px}";
|
|
11
11
|
|
|
@@ -2904,7 +2904,7 @@ const GrwSwitch = class {
|
|
|
2904
2904
|
render() {
|
|
2905
2905
|
return (index.h(index.Host, { style: {
|
|
2906
2906
|
'--font-family': this.fontFamily,
|
|
2907
|
-
} }, index.h("label", { class: "md3 switch" }, index.h("input", { onChange: () => this.action(), type: "checkbox", id: "darkmode", name: "darkmode" }), index.h("span", { class: "slider" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "done")))));
|
|
2907
|
+
} }, index.h("label", { class: "md3 switch" }, index.h("input", { checked: utils.state.offlineTreks, onChange: () => this.action(), type: "checkbox", id: "darkmode", name: "darkmode" }), index.h("span", { class: "slider" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "done")))));
|
|
2908
2908
|
}
|
|
2909
2909
|
};
|
|
2910
2910
|
GrwSwitch.style = grwSwitchCss;
|
|
@@ -4960,9 +4960,9 @@ const GrwTrekDetail = class {
|
|
|
4960
4960
|
await utils.writeOrUpdateDataInStore('treks', treks);
|
|
4961
4961
|
await utils.writeOrUpdateDataInStore('districts', utils.state.districts);
|
|
4962
4962
|
// download global tiles
|
|
4963
|
-
|
|
4963
|
+
await this.downloadGlobalTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution);
|
|
4964
4964
|
// download trek tiles
|
|
4965
|
-
|
|
4965
|
+
await this.downloadTrekTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution);
|
|
4966
4966
|
// download global medias
|
|
4967
4967
|
await utils.writeOrUpdateFilesInStore(utils.state.difficulties, utils.imagesRegExp);
|
|
4968
4968
|
await utils.writeOrUpdateFilesInStore(utils.state.routes, utils.imagesRegExp);
|
|
@@ -4993,13 +4993,14 @@ const GrwTrekDetail = class {
|
|
|
4993
4993
|
await utils.writeOrUpdateDataInStore('sources', utils.state.sources);
|
|
4994
4994
|
await utils.writeOrUpdateDataInStore('accessibilitiesLevel', utils.state.accessibilitiesLevel);
|
|
4995
4995
|
await utils.writeOrUpdateDataInStore('touristicContentCategories', utils.state.touristicContentCategories);
|
|
4996
|
-
await utils.writeOrUpdateDataInStore('touristicEvents', utils.state.trekTouristicEvents);
|
|
4997
4996
|
await utils.writeOrUpdateDataInStore('touristicEventTypes', utils.state.touristicEventTypes);
|
|
4998
4997
|
await utils.writeOrUpdateDataInStore('networks', utils.state.networks);
|
|
4999
4998
|
await utils.writeOrUpdateDataInStore('pois', utils.state.currentPois);
|
|
5000
4999
|
await utils.writeOrUpdateDataInStore('poiTypes', utils.state.poiTypes);
|
|
5001
5000
|
await utils.writeOrUpdateDataInStore('informationDesks', utils.state.currentInformationDesks);
|
|
5002
|
-
await utils.writeOrUpdateDataInStore('treks', [
|
|
5001
|
+
await utils.writeOrUpdateDataInStore('treks', [
|
|
5002
|
+
Object.assign(Object.assign({}, this.currentTrek), { offline: true, pois: utils.state.currentPois.map(poi => poi.id), touristicContents: utils.state.trekTouristicContents.map(trekTouristicContent => trekTouristicContent.id), touristicEvents: utils.state.trekTouristicEvents.map(trekTouristicEvent => trekTouristicEvent.id), sensitiveAreas: utils.state.currentSensitiveAreas ? utils.state.currentSensitiveAreas.map(currentSensitiveArea => currentSensitiveArea.id) : [] }),
|
|
5003
|
+
]);
|
|
5003
5004
|
await utils.writeOrUpdateFilesInStore(utils.state.currentPois, utils.imagesRegExp, true);
|
|
5004
5005
|
await utils.writeOrUpdateFilesInStore(utils.state.currentInformationDesks, utils.imagesRegExp, true);
|
|
5005
5006
|
// download items data
|
|
@@ -5021,35 +5022,45 @@ const GrwTrekDetail = class {
|
|
|
5021
5022
|
const stepRequests = [];
|
|
5022
5023
|
const stepsTouristicContentsRequests = [];
|
|
5023
5024
|
const stepsTouristicEventsRequests = [];
|
|
5025
|
+
const stepsPoisRequests = [];
|
|
5026
|
+
const stepsSensitiveAreasRequests = [];
|
|
5024
5027
|
steps.forEach(stepId => {
|
|
5025
5028
|
stepRequests.push(pagination.getTrek(utils.state.api, utils.state.language, stepId, init));
|
|
5026
5029
|
stepsTouristicContentsRequests.push(getTouristicContentsNearTrek(utils.state.api, utils.state.language, stepId, init));
|
|
5027
5030
|
stepsTouristicEventsRequests.push(getTouristicEventsNearTrek(utils.state.api, utils.state.language, stepId, init));
|
|
5031
|
+
stepsPoisRequests.push(pagination.getPoisNearTrek(utils.state.api, utils.state.language, stepId, init));
|
|
5032
|
+
stepsSensitiveAreasRequests.push(pagination.getSensitiveAreasNearTrek(utils.state.api, utils.state.language, stepId, init));
|
|
5028
5033
|
});
|
|
5029
5034
|
const trekSteps = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));
|
|
5030
5035
|
const stepsTouristicContentsResponses = await Promise.all([...stepsTouristicContentsRequests]).then(responses => Promise.all(responses.map(response => response.json())));
|
|
5031
5036
|
const stepsTouristicEventsResponses = await Promise.all([...stepsTouristicEventsRequests]).then(responses => Promise.all(responses.map(response => response.json())));
|
|
5037
|
+
const stepsPoisResponses = await Promise.all([...stepsPoisRequests]).then(responses => Promise.all(responses.map(response => response.json())));
|
|
5038
|
+
const stepsSensitiveAreasResponses = await Promise.all([...stepsSensitiveAreasRequests]).then(responses => Promise.all(responses.map(response => response.json())));
|
|
5032
5039
|
for (let index = 0; index < trekSteps.length; index++) {
|
|
5033
5040
|
trekSteps[index].offline = true;
|
|
5041
|
+
trekSteps[index].pois = stepsPoisResponses[index].results.map(poi => poi.id);
|
|
5042
|
+
trekSteps[index].touristicContents = stepsTouristicContentsResponses[index].results.map(trekTouristicContent => trekTouristicContent.id);
|
|
5043
|
+
trekSteps[index].touristicEvents = stepsTouristicEventsResponses[index].results.map(trekTouristicEvent => trekTouristicEvent.id);
|
|
5044
|
+
trekSteps[index].sensitiveAreas = stepsSensitiveAreasResponses[index].results.map(currentSensitiveArea => currentSensitiveArea.id);
|
|
5034
5045
|
await utils.writeOrUpdateDataInStore('treks', [trekSteps[index]]);
|
|
5035
5046
|
await utils.writeOrUpdateFilesInStore(trekSteps[index], utils.imagesRegExp, true);
|
|
5036
5047
|
}
|
|
5037
|
-
for (let index = 0; index < stepsTouristicContentsResponses.length; index++) {
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
}
|
|
5045
|
-
for (let index = 0; index < stepsTouristicEventsResponses.length; index++) {
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
}
|
|
5048
|
+
// for (let index = 0; index < stepsTouristicContentsResponses.length; index++) {
|
|
5049
|
+
// const stepsTouristicContentsResponse = stepsTouristicContentsResponses[index];
|
|
5050
|
+
// for (let index = 0; index < stepsTouristicContentsResponse.results.length; index++) {
|
|
5051
|
+
// stepsTouristicContentsResponse.results[index].offline = true;
|
|
5052
|
+
// await writeOrUpdateDataInStore('touristicContents', [stepsTouristicContentsResponse.results[index]]);
|
|
5053
|
+
// await writeOrUpdateFilesInStore(stepsTouristicContentsResponse.results[index], imagesRegExp, true);
|
|
5054
|
+
// }
|
|
5055
|
+
// }
|
|
5056
|
+
// for (let index = 0; index < stepsTouristicEventsResponses.length; index++) {
|
|
5057
|
+
// const stepsTouristicEventsResponse = stepsTouristicEventsResponses[index];
|
|
5058
|
+
// for (let index = 0; index < stepsTouristicEventsResponse.results.length; index++) {
|
|
5059
|
+
// stepsTouristicEventsResponse[index].offline = true;
|
|
5060
|
+
// await writeOrUpdateDataInStore('touristicEvents', [stepsTouristicEventsResponse[index]]);
|
|
5061
|
+
// await writeOrUpdateFilesInStore(stepsTouristicEventsResponse[index], imagesRegExp, true);
|
|
5062
|
+
// }
|
|
5063
|
+
// }
|
|
5053
5064
|
}
|
|
5054
5065
|
utils.state.treks.find(trek => trek.id === this.currentTrek.id).offline = true;
|
|
5055
5066
|
if (!utils.state.currentTreks) {
|
|
@@ -5133,7 +5144,11 @@ const GrwTrekDetail = class {
|
|
|
5133
5144
|
delete trekInStore.networks;
|
|
5134
5145
|
delete trekInStore.web_links;
|
|
5135
5146
|
delete trekInStore.update_datetime;
|
|
5136
|
-
delete trekInStore.
|
|
5147
|
+
delete trekInStore.information_desks;
|
|
5148
|
+
delete trekInStore.pois;
|
|
5149
|
+
delete trekInStore.touristicContents;
|
|
5150
|
+
delete trekInStore.touristicEvents;
|
|
5151
|
+
delete trekInStore.sensitiveAreas;
|
|
5137
5152
|
}
|
|
5138
5153
|
render() {
|
|
5139
5154
|
var _a, _b, _c, _d, _e;
|
|
@@ -5184,7 +5199,7 @@ const GrwTrekDetail = class {
|
|
|
5184
5199
|
return (index.h("div", { part: "network", class: "network" }, index.h("img", { part: "icon", class: "icon",
|
|
5185
5200
|
/* @ts-ignore */
|
|
5186
5201
|
crossorigin: "anonymous", src: currentNetwork.pictogram }), index.h("span", { part: "label", class: "label" }, currentNetwork.label)));
|
|
5187
|
-
})), this.currentTrek.ratings.map(trekRating => (index.h("div", { part: "row", class: "row" }, `${utils.state.ratingsScale.find(ratingScale => ratingScale.id === utils.state.ratings.find(rating => rating.id === trekRating).scale).name} : ${utils.state.ratings.find(rating => rating.id === trekRating).name}`))), this.currentTrek.ratings_description && this.currentTrek.ratings_description !== '' && (index.h("div", { part: "row", class: "row", innerHTML: this.currentTrek.ratings_description })))), index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "downloads-container", class: "downloads-container" }, index.h("div", { part: "download-title", class: "download-title" }, i18n.translate[utils.state.language].downloads), this.enableOffline && !this.offline && (index.h("button", { part: "offline-button", class: "offline-button", onClick: () => this.displayTrekDownloadModal() }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download_for_offline"), index.h("span", { part: "label", class: "label" }, "RENDRE DISPONIBLE HORS LIGNE"))), this.enableOffline && this.offline && (index.h("button", { part: "offline-button", class: "offline-button", onClick: () => this.displayTrekDeleteModal() }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "delete"), index.h("span", { part: "label", class: "label" }, "SUPPRIMER DU HORS LIGNE"))), index.h("div", { part: "links-container", class: "links-container" }, index.h("a", { href: `${this.currentTrek.gpx}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "GPX")), index.h("a", { href: `${this.currentTrek.kml}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "KML")), index.h("a", { href: `${this.currentTrek.pdf}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "PDF")))), index.h("div", { part: "divider", class: "divider" }), this.currentTrek.description_teaser && index.h("div", { part: "description-teaser", class: "description-teaser", innerHTML: this.currentTrek.description_teaser }), this.currentTrek.ambiance && index.h("div", { part: "ambiance", class: "ambiance", innerHTML: this.currentTrek.ambiance }), utils.state.parentTrekId && utils.state.parentTrek && this.currentTrek.id !== utils.state.parentTrekId && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "parent-trek-container", class: "parent-trek-container" }, index.h("button", { part: "parent-trek-title", class: "parent-trek-title", onClick: () => this.parentTrekPress.emit(utils.state.parentTrekId) }, index.h("div", null, "<"), utils.state.parentTrek.name)))), utils.state.currentTrekSteps && (index.h("div", { part: "step-container", class: "step-container" }, index.h("div", { part: "step-title", class: "step-title", ref: el => (this.stepsRef = el) }, `${utils.state.currentTrekSteps.length} ${i18n.translate[utils.state.language].steps}`), index.h("div", { part: "swiper-step", class: "swiper swiper-step", ref: el => (this.swiperStepRef = el) }, index.h("div", { part: "swiper-wrapper", class: "swiper-wrapper" }, utils.state.currentTrekSteps &&
|
|
5202
|
+
})), this.currentTrek.ratings.map(trekRating => (index.h("div", { part: "row", class: "row" }, `${utils.state.ratingsScale.find(ratingScale => ratingScale.id === utils.state.ratings.find(rating => rating.id === trekRating).scale).name} : ${utils.state.ratings.find(rating => rating.id === trekRating).name}`))), this.currentTrek.ratings_description && this.currentTrek.ratings_description !== '' && (index.h("div", { part: "row", class: "row", innerHTML: this.currentTrek.ratings_description })))), index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "downloads-container", class: "downloads-container" }, index.h("div", { part: "download-title", class: "download-title" }, i18n.translate[utils.state.language].downloads), this.enableOffline && !this.offline && (index.h("button", { part: "offline-button", class: "offline-button", onClick: () => this.displayTrekDownloadModal() }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download_for_offline"), index.h("span", { part: "label", class: "label" }, "RENDRE DISPONIBLE HORS LIGNE"))), this.enableOffline && this.offline && (index.h("button", { part: "offline-button", class: "offline-button", onClick: () => this.displayTrekDeleteModal() }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "delete"), index.h("span", { part: "label", class: "label" }, "SUPPRIMER DU HORS LIGNE"))), index.h("div", { part: "links-container", class: "links-container" }, index.h("a", { href: `${this.currentTrek.gpx}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "GPX")), index.h("a", { href: `${this.currentTrek.kml}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "KML")), index.h("a", { href: `${this.currentTrek.pdf}${utils.state.portalsFromProviders && utils.state.portalsFromProviders.length === 1 ? '?portal=' + utils.state.portalsFromProviders[0] : ''}`, target: "_blank", rel: "noopener noreferrer" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "download"), index.h("span", { part: "label", class: "label" }, "PDF")))), index.h("div", { part: "divider", class: "divider" }), this.currentTrek.description_teaser && index.h("div", { part: "description-teaser", class: "description-teaser", innerHTML: this.currentTrek.description_teaser }), this.currentTrek.ambiance && index.h("div", { part: "ambiance", class: "ambiance", innerHTML: this.currentTrek.ambiance }), utils.state.parentTrekId && utils.state.parentTrek && this.currentTrek.id !== utils.state.parentTrekId && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "parent-trek-container", class: "parent-trek-container" }, index.h("button", { part: "parent-trek-title", class: "parent-trek-title", onClick: () => this.parentTrekPress.emit(utils.state.parentTrekId) }, index.h("div", null, "<"), utils.state.parentTrek.name)))), utils.state.currentTrekSteps && (index.h("div", { part: "step-container", class: "step-container" }, index.h("div", { part: "step-title", class: "step-title", ref: el => (this.stepsRef = el) }, `${utils.state.currentTrekSteps.length} ${i18n.translate[utils.state.language].steps}`), index.h("div", { part: "swiper-step", class: "swiper swiper-step", ref: el => (this.swiperStepRef = el) }, index.h("div", { part: "swiper-wrapper", class: "swiper-wrapper" }, utils.state.currentTrekSteps &&
|
|
5188
5203
|
utils.state.currentTrekSteps.map(trek => {
|
|
5189
5204
|
return (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("grw-trek-card", { exportparts: "trek-card,trek-img-container,trek-img,trek-sub-container,trek-departure,trek-name,trek-themes-container,trek-theme,trek-icons-labels-container,trek-icon-label,trek-icon,trek-label", key: `trek-${trek.id}`, trek: trek, "is-large-view": false, "is-step": true, fontFamily: this.fontFamily, "color-primary-app": this.colorPrimaryApp, "color-on-surface": this.colorOnSurface, "color-secondary-container": this.colorSecondaryContainer, "color-on-secondary-container": this.colorOnSecondaryContainer, "color-surface-container-low": this.colorSurfaceContainerLow })));
|
|
5190
5205
|
})), index.h("div", { part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.stepSwiperScrollbar = el) })))), index.h("div", { part: "divider", class: "divider" }), this.currentTrek.description && (index.h("div", { part: "description-container", class: "description-container" }, index.h("div", { part: "description-title", class: "description-title", ref: el => (this.descriptionRef = el) }, i18n.translate[utils.state.language].description), index.h("div", { part: "description", class: "description", innerHTML: this.currentTrek.description }))), this.currentTrek.departure && (index.h("div", { part: "departure-container", class: "departure-container" }, index.h("div", { part: "departure-title", class: "departure-title" }, i18n.translate[utils.state.language].departure, " :\u00A0"), index.h("div", { part: "departure", innerHTML: this.currentTrek.departure }))), this.currentTrek.arrival && (index.h("div", { part: "arrival-container", class: "arrival-container" }, index.h("div", { part: "arrival-title", class: "arrival-title" }, i18n.translate[utils.state.language].arrival, " :\u00A0"), index.h("div", { part: "arrival", innerHTML: this.currentTrek.arrival }))), this.currentTrek.cities && this.currentTrek.cities.length > 0 && (index.h("div", { part: "cities-container", class: "cities-container" }, index.h("div", { part: "cities-title", class: "cities-title" }, i18n.translate[utils.state.language].crossedCities, " :\u00A0"), index.h("div", { part: "cities", innerHTML: this.cities.join(', ') }))), utils.state.currentPois && utils.state.currentPois.length > 0 && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "pois-container", class: "pois-container" }, index.h("div", { part: "pois-title", class: "pois-title", ref: el => (this.poiRef = el) }, i18n.translate[utils.state.language].pois(utils.state.currentPois.length)), index.h("div", { part: "swiper-pois", class: "swiper swiper-pois", ref: el => (this.swiperPoisRef = el) }, index.h("div", { part: "swiper-wrapper", class: "swiper-wrapper" }, utils.state.currentPois.map(poi => (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("grw-poi", { exportparts: "poi-type-img-container,poi-type,swiper-poi,swiper-wrapper,swiper-slide,poi-img,default-poi-img,swiper-pagination,swiper-button-prev,swiper-button-next,poi-sub-container,poi-name,poi-description,handle-poi-description", poi: poi }))))), index.h("div", { part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.poisSwiperScrollbar = el) }))))), this.weather && this.currentTrek.departure_city && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "weather-container", class: "weather-container" }, index.h("iframe", { height: "150", frameborder: "0", src: `https://meteofrance.com/widget/prevision/${this.currentTrek.departure_city}0#${this.colorPrimaryApp}` })))), this.currentTrek.access && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "access-container", class: "access-container" }, index.h("div", { part: "access-title", class: "access-title" }, i18n.translate[utils.state.language].roadAccessAndParking), index.h("div", { part: "access", class: "access", innerHTML: this.currentTrek.access }), this.currentTrek.advised_parking && (index.h("div", null, index.h("div", { part: "advised-parking-title", class: "advised-parking-title", ref: el => (this.parkingRef = el) }, i18n.translate[utils.state.language].recommendedParking), index.h("div", { part: "advised-parking", class: "advised-parking", innerHTML: this.currentTrek.advised_parking })))))), this.currentTrek.public_transport && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "public-transport-container", class: "public-transport-container" }, index.h("div", { part: "public-transport-title", class: "public-transport-title" }, i18n.translate[utils.state.language].transport), index.h("div", { part: "public-transport", class: "public-transport", innerHTML: this.currentTrek.public_transport })))), (this.currentTrek.advice || this.currentTrek.gear || this.labels.length > 0) && (index.h("div", null, index.h("div", { part: "divider", class: "divider" }), index.h("div", { part: "advice-container", class: "advice-container" }, index.h("div", { part: "advice-title", class: "advice-title", ref: el => (this.recommendationRef = el) }, i18n.translate[utils.state.language].recommendations), this.currentTrek.advice && (index.h("div", { part: "current-advice-container", class: "current-advice-container" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "warning"), index.h("div", { part: "advice", class: "advice", innerHTML: this.currentTrek.advice }))), this.currentTrek.gear && (index.h("div", { part: "gear-container", class: "gear-container" }, index.h("span", { translate: false, part: "icon", class: "material-symbols material-symbols-outlined icon" }, "backpack"), index.h("div", { part: "gear", class: "gear", innerHTML: this.currentTrek.gear }))), this.labels.map(label => (index.h("div", { part: "label-container", class: "label-container" }, index.h("div", { part: "label-sub-container", class: "label-sub-container" }, label.pictogram && (index.h("img", {
|
|
@@ -5310,10 +5325,6 @@ const GrwTrekProvider = class {
|
|
|
5310
5325
|
if (!utils.state.ratingsScale) {
|
|
5311
5326
|
utils.state.ratingsScale = await utils.getAllDataInStore('ratingsScale');
|
|
5312
5327
|
}
|
|
5313
|
-
if (!utils.state.currentSensitiveAreas) {
|
|
5314
|
-
// filter trek items
|
|
5315
|
-
utils.state.currentSensitiveAreas = await utils.getAllDataInStore('sensitiveAreas');
|
|
5316
|
-
}
|
|
5317
5328
|
if (!utils.state.labels) {
|
|
5318
5329
|
utils.state.labels = await utils.getAllDataInStore('labels');
|
|
5319
5330
|
}
|
|
@@ -5323,39 +5334,37 @@ const GrwTrekProvider = class {
|
|
|
5323
5334
|
if (!utils.state.accessibilitiesLevel) {
|
|
5324
5335
|
utils.state.accessibilitiesLevel = await utils.getAllDataInStore('accessibilitiesLevel');
|
|
5325
5336
|
}
|
|
5326
|
-
if (!utils.state.trekTouristicContents) {
|
|
5327
|
-
// filter trek items
|
|
5328
|
-
const touristicContents = await utils.getAllDataInStore('touristicContents');
|
|
5329
|
-
utils.setFilesFromStore(touristicContents, utils.imagesRegExp);
|
|
5330
|
-
utils.state.trekTouristicContents = touristicContents;
|
|
5331
|
-
}
|
|
5332
5337
|
if (!utils.state.touristicContentCategories) {
|
|
5333
5338
|
utils.state.touristicContentCategories = await utils.getAllDataInStore('touristicContentCategories');
|
|
5334
5339
|
}
|
|
5335
|
-
if (!utils.state.trekTouristicEvents) {
|
|
5336
|
-
// filter trek items
|
|
5337
|
-
utils.state.trekTouristicEvents = await utils.getAllDataInStore('touristicEvents');
|
|
5338
|
-
}
|
|
5339
5340
|
if (!utils.state.touristicEventTypes) {
|
|
5340
5341
|
utils.state.touristicEventTypes = await utils.getAllDataInStore('touristicEventTypes');
|
|
5341
5342
|
}
|
|
5342
5343
|
if (!utils.state.networks) {
|
|
5343
5344
|
utils.state.networks = await utils.getAllDataInStore('networks');
|
|
5344
5345
|
}
|
|
5345
|
-
if (!utils.state.currentPois) {
|
|
5346
|
-
// filter trek items
|
|
5347
|
-
const pois = await utils.getAllDataInStore('pois');
|
|
5348
|
-
utils.setFilesFromStore(pois, utils.imagesRegExp);
|
|
5349
|
-
utils.state.currentPois = pois;
|
|
5350
|
-
}
|
|
5351
5346
|
if (!utils.state.poiTypes) {
|
|
5352
5347
|
utils.state.poiTypes = await utils.getAllDataInStore('poiTypes');
|
|
5353
5348
|
}
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5349
|
+
const informationDesksInStore = await utils.getAllDataInStore('informationDesks');
|
|
5350
|
+
const informationDesks = informationDesksInStore.filter(informationDeskInStore => trek.information_desks.some(information_desk => information_desk === informationDeskInStore.id));
|
|
5351
|
+
utils.setFilesFromStore(informationDesks, utils.imagesRegExp);
|
|
5352
|
+
utils.state.currentInformationDesks = informationDesks;
|
|
5353
|
+
const poisInStore = await utils.getAllDataInStore('pois');
|
|
5354
|
+
const pois = poisInStore.filter(poiInStore => trek.pois.some(trekPoi => trekPoi === poiInStore.id));
|
|
5355
|
+
utils.setFilesFromStore(pois, utils.imagesRegExp);
|
|
5356
|
+
utils.state.currentPois = pois;
|
|
5357
|
+
const touristicContentsInStore = await utils.getAllDataInStore('touristicContents');
|
|
5358
|
+
const touristicContents = touristicContentsInStore.filter(touristicContentInStore => trek.touristicContents.some(trekTouristicContent => trekTouristicContent === touristicContentInStore.id));
|
|
5359
|
+
utils.setFilesFromStore(touristicContents, utils.imagesRegExp);
|
|
5360
|
+
utils.state.trekTouristicContents = touristicContents;
|
|
5361
|
+
const touristicEventsInStore = await utils.getAllDataInStore('touristicEvents');
|
|
5362
|
+
const touristicEvents = touristicEventsInStore.filter(touristicEventInStore => trek.touristicEvents.some(trekTouristicEvent => trekTouristicEvent === touristicEventInStore.id));
|
|
5363
|
+
utils.setFilesFromStore(touristicEvents, utils.imagesRegExp);
|
|
5364
|
+
utils.state.trekTouristicEvents = await utils.getAllDataInStore('touristicEvents');
|
|
5365
|
+
const sensitiveAreasInStore = await utils.getAllDataInStore('sensitiveAreas');
|
|
5366
|
+
const sensitiveAreas = sensitiveAreasInStore.filter(sensitiveAreaInStore => trek.sensitiveAreas.some(trekSensitiveArea => trekSensitiveArea === sensitiveAreaInStore.id));
|
|
5367
|
+
utils.state.currentSensitiveAreas = sensitiveAreas;
|
|
5359
5368
|
utils.setFilesFromStore(trek, utils.imagesRegExp);
|
|
5360
5369
|
utils.state.currentTrek = trek;
|
|
5361
5370
|
}
|
|
@@ -5384,7 +5393,7 @@ const GrwTrekProvider = class {
|
|
|
5384
5393
|
try {
|
|
5385
5394
|
Promise.all([
|
|
5386
5395
|
...requests,
|
|
5387
|
-
|
|
5396
|
+
pagination.getSensitiveAreasNearTrek(utils.state.api, utils.state.language, this.trekId, this.init)
|
|
5388
5397
|
.then(response => {
|
|
5389
5398
|
if (response.ok) {
|
|
5390
5399
|
return response;
|
|
@@ -5399,7 +5408,7 @@ const GrwTrekProvider = class {
|
|
|
5399
5408
|
fetch(`${utils.state.api}label/?language=${utils.state.language}&fields=id,name,advice,pictogram`, this.init),
|
|
5400
5409
|
fetch(`${utils.state.api}source/?language=${utils.state.language}&fields=id,name,website,pictogram`, this.init),
|
|
5401
5410
|
fetch(`${utils.state.api}trek_accessibility_level/?language=${utils.state.language}&fields=id,name`, this.init).catch(() => new Response('null')),
|
|
5402
|
-
|
|
5411
|
+
pagination.getPoisNearTrek(utils.state.api, utils.state.language, this.trekId, this.init),
|
|
5403
5412
|
fetch(`${utils.state.api}poi_type/?language=${utils.state.language}&fields=id,pictogram`, this.init),
|
|
5404
5413
|
fetch(`${utils.state.api}informationdesk/?language=${utils.state.language}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`, this.init),
|
|
5405
5414
|
getTouristicContentsNearTrek(utils.state.api, utils.state.language, this.trekId, this.init),
|
|
Binary file
|
|
Binary file
|