@geotrekce/geotrek-rando-widget 0.18.1 → 0.18.2
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-poi_3.cjs.entry.js +3 -3
- package/dist/cjs/grw-poi_3.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-poi_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-poi_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/grw-poi-detail/grw-poi.js +1 -1
- package/dist/collection/components/grw-poi-detail/grw-poi.js.br +0 -0
- package/dist/collection/components/grw-poi-detail/grw-poi.js.gz +0 -0
- package/dist/collection/components/grw-poi-detail/grw-poi.js.map +1 -1
- package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js +1 -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.js +1 -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/esm/grw-poi_3.entry.js +3 -3
- package/dist/esm/grw-poi_3.entry.js.br +0 -0
- package/dist/esm/grw-poi_3.entry.js.gz +0 -0
- package/dist/esm/grw-poi_3.entry.js.map +1 -1
- package/dist/esm-es5/grw-poi_3.entry.js +1 -1
- package/dist/esm-es5/grw-poi_3.entry.js.br +0 -0
- package/dist/esm-es5/grw-poi_3.entry.js.gz +0 -0
- package/dist/esm-es5/grw-poi_3.entry.js.map +1 -1
- 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-76e3667f.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-76e3667f.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-76e3667f.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-76e3667f.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-775aaaa7.system.js +1 -1
- package/dist/geotrek-rando-widget/p-775aaaa7.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-775aaaa7.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c61ad2b7.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-c61ad2b7.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c61ad2b7.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c61ad2b7.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-2f5e420a.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-2f5e420a.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-2f5e420a.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-2f5e420a.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-3530a258.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-3530a258.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-3530a258.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-3530a258.system.entry.js.map +0 -1
|
@@ -96,7 +96,7 @@ const GrwPoiDetail = class {
|
|
|
96
96
|
event.target.onerror = null;
|
|
97
97
|
event.target.className = 'default-poi-img';
|
|
98
98
|
event.target.src = defaultImageSrc;
|
|
99
|
-
}, onClick: () => this.handleFullscreen() }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-poi-img", class: "default-poi-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), index.h("div", { key: '
|
|
99
|
+
}, onClick: () => this.handleFullscreen() }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-poi-img", class: "default-poi-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), index.h("div", { key: 'ad45324ca7b75a831dcc1ef67c8c39393bce78ca', style: { display: this.offline ? 'none' : 'block' }, part: "swiper-pagination", class: "swiper-pagination", ref: el => (this.paginationElPoiRef = el) }), index.h("div", { key: 'c0932197c3580e9cbb412c050afa271ade756192', style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-prev", class: "swiper-button-prev", ref: el => (this.prevElPoiRef = el) }), index.h("div", { key: 'b66ddb0cd5880f5895eac6ea024ee71048a319a2', style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-next", class: "swiper-button-next", ref: el => (this.nextElPoiRef = el) }))), index.h("div", { key: '049b2849529671a31da1ed75976b519d2f42bc90', part: "poi-sub-container", class: "poi-sub-container" }, index.h("div", { key: 'b34bfcbc2533bab1c21910c4e860823e3892dba6', part: "poi-name", class: "poi-name" }, this.poi.name), index.h("div", { key: 'cd65421b578819cdd7ee5bde4af57981da625628', part: "poi-description", class: this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description', innerHTML: this.poi.description, ref: el => (this.descriptionRef = el) }), index.h("div", { key: '32d0afd9faf442cf3a6fc6cb6d77f71eec33ae18', part: "handle-poi-description", class: "handle-poi-description", onClick: () => this.handlePoiDescription() }, this.showPoiDescriptionButton && (this.displayShortDescription ? i18n.translate[utils.state.language].readMore : i18n.translate[utils.state.language].readLess)))));
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
GrwPoiDetail.style = GrwPoiStyle0;
|
|
@@ -204,7 +204,7 @@ const GrwTouristicContentCard = class {
|
|
|
204
204
|
event.target.onerror = null;
|
|
205
205
|
event.target.className = 'default-touristic-content-img';
|
|
206
206
|
event.target.src = defaultImageSrc;
|
|
207
|
-
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-touristic-content-img", src: defaultImageSrc, class: "default-touristic-content-img", alt: "", loading: "lazy" })))), index.h("div", { style: { display: this.offline
|
|
207
|
+
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-touristic-content-img", src: defaultImageSrc, class: "default-touristic-content-img", alt: "", loading: "lazy" })))), index.h("div", { style: { display: this.offline ? 'none' : 'block' }, part: "swiper-pagination", class: "swiper-pagination", ref: el => (this.paginationElTouristicContentRef = el) }), index.h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-prev", class: "swiper-button-prev", ref: el => (this.prevElTouristicContentRef = el) }), index.h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-next", class: "swiper-button-next", ref: el => (this.nextElTouristicContentRef = el) }))) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (index.h("img", { part: "touristic-content-img", class: "touristic-content-img", src: `${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`, alt: `${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`, loading: "lazy" })) : (index.h("img", { class: "image default-touristic-content-img", src: defaultImageSrc, loading: "lazy", alt: "" }))), index.h("div", { key: 'f9238be9feb7faff38f04d4a367ebaf7df83522e', part: "touristic-content-sub-container", class: "touristic-content-sub-container" }, index.h("div", { key: '9eada8f244529c1fa64b9162185a315b89634802', part: "touristic-content-category-container", class: "touristic-content-category-container" }, touristicContentCategory && touristicContentCategory.pictogram && (index.h("img", { part: "touristic-content-category-img", class: "touristic-content-category-img", src: touristicContentCategory.pictogram, alt: "" })), index.h("div", { key: '7f371b852730cddde844e5c7255c67a84b43e2aa', part: "touristic-content-category-name", class: "touristic-content-category-name" }, touristicContentCategory.label)), index.h("div", { key: 'ac31930c2f67b4f4f253e02da4db8e43188fe1bb', part: "touristic-content-name", class: "touristic-content-name" }, this.touristicContent.name)), this.isInsideHorizontalList && (index.h("div", { part: "touristic-content-more-detail-container", class: "touristic-content-more-detail-container" }, index.h("button", { part: "more-details-button", class: "more-details-button", onClick: () => this.touristicContentCardPress.emit(this.touristicContent.id) }, "Plus de d\u00E9tails"))))));
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
GrwTouristicContentCard.style = GrwTouristicContentCardStyle0;
|
|
@@ -312,7 +312,7 @@ const GrwTouristicEvent = class {
|
|
|
312
312
|
event.target.onerror = null;
|
|
313
313
|
event.target.className = 'default-touristic-event-img';
|
|
314
314
|
event.target.src = defaultImageSrc;
|
|
315
|
-
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-touristic-event-img", class: "default-touristic-event-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), index.h("div", { style: { display: this.offline
|
|
315
|
+
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (index.h("div", { part: "swiper-slide", class: "swiper-slide" }, index.h("img", { part: "default-touristic-event-img", class: "default-touristic-event-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), index.h("div", { style: { display: this.offline ? 'none' : 'block' }, part: "swiper-pagination", class: "swiper-pagination", ref: el => (this.paginationElTouristicEventRef = el) }), index.h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-prev", class: "swiper-button-prev", ref: el => (this.prevElTouristicEventRef = el) }), index.h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-next", class: "swiper-button-next", ref: el => (this.nextElTouristicEventRef = el) }))) : this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (index.h("img", { part: "touristic-event-img", class: "touristic-event-img", src: `${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`, alt: `${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`, loading: "lazy" })) : (index.h("img", { class: "image default-touristic-event-img", src: defaultImageSrc, alt: "", loading: "lazy" }))), index.h("div", { key: '2c8301acd32a3b4d39fa0fa979afdffd1b8c9376', part: "touristic-event-sub-container", class: "touristic-event-sub-container" }, index.h("div", { key: 'f8a15aa9cd7f2682cc91065a2a486425d5c68f1f', part: "touristic-event-type-container", class: "touristic-event-type-container" }, touristicEventType && touristicEventType.pictogram && (index.h("img", { part: "touristic-event-type-img", class: "touristic-event-type-img", src: touristicEventType.pictogram, alt: "" })), touristicEventType && touristicEventType.type && (index.h("div", { part: "touristic-event-type-name", class: "touristic-event-type-name" }, touristicEventType.type))), index.h("div", { key: '86ebde91c4e37899e74b30549cc0721ea49706fb', part: "touristic-event-name", class: "touristic-event-name" }, this.touristicEvent.name), (this.touristicEvent.begin_date || this.touristicEvent.end_date) && (index.h("div", { part: "touristic-event-date-container", class: "touristic-event-date-container" }, this.touristicEvent.begin_date === this.touristicEvent.end_date && (index.h("div", { part: "touristic-event-date", class: "touristic-event-date" }, i18n.translate[utils.state.language].date, " : ", this.touristicEvent.begin_date)), this.touristicEvent.begin_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (index.h("div", { part: "touristic-event-date", class: "touristic-event-date" }, i18n.translate[utils.state.language].startDate, " : ", this.touristicEvent.begin_date)), this.touristicEvent.end_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (index.h("div", { part: "touristic-event-date", class: "touristic-event-date" }, i18n.translate[utils.state.language].endDate, " : ", this.touristicEvent.end_date))))), this.isInsideHorizontalList && (index.h("div", { part: "touristic-event-more-detail-container", class: "touristic-event-more-detail-container" }, index.h("button", { part: "more-details-button", class: "more-details-button", onClick: () => this.touristicEventCardPress.emit(this.touristicEvent.id) }, "Plus de d\u00E9tails"))))));
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
318
|
GrwTouristicEvent.style = GrwTouristicEventCardStyle0;
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"grw-poi.grw-touristic-content-card.grw-touristic-event-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IAAI,SAAK,IAAI,CAAC,cAAc,CAAC,UAAU,CAC9D,CACP,EACA,IAAI,CAAC,cAAc,CAAC,UAAU,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,KAAK,IAAI,CAAC,cAAc,CAAC,QAAQ,KAChGG,iBAAK,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAC,sBAAsB,IAC1DE,cAAS,CAACL,WAAK,CAAC,QAAQ,CAAC,CAAC,SAAS,SAAK,IAAI,CAAC,cAAc,CAAC,UAAU,CACnE,CACP,EACA,IAAI,CAAC,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,UAAU,KAAK,IAAI,CAAC,cAAc,CAAC,QAAQ,KAC9FG,iBAAK,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAC,sBAAsB,IAC1DE,cAAS,CAACL,WAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,SAAK,IAAI,CAAC,cAAc,CAAC,QAAQ,CAC/D,CACP,CACG,CACP,CACG,EAEL,IAAI,CAAC,sBAAsB,KAC1BG,iBAAK,IAAI,EAAC,uCAAuC,EAAC,KAAK,EAAC,uCAAuC,IAC7FA,oBAAQ,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,2BAE9H,CACL,CACP,CACG,CACD,EACP;KACH;;;;;;;;","names":["Swiper","Navigation","Pagination","Keyboard","state","getDataInStore","getAssetPath","h","Host","translate"],"sources":["src/components/grw-poi-detail/grw-poi.scss?tag=grw-poi&encapsulation=shadow","src/components/grw-poi-detail/grw-poi.tsx","src/components/grw-touristic-content-card/grw-touristic-content-card.scss?tag=grw-touristic-content-card&encapsulation=shadow","src/components/grw-touristic-content-card/grw-touristic-content-card.tsx","src/components/grw-touristic-event-card/grw-touristic-event-card.scss?tag=grw-touristic-event-card&encapsulation=shadow","src/components/grw-touristic-event-card/grw-touristic-event-card.tsx"],"sourcesContent":["@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid gray;\n border-radius: var(--border-radius, 12px);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.poi-type-img-container {\n position: relative;\n .poi-img,\n .default-poi-img {\n width: 100%;\n height: 100%;\n height: 200px;\n object-fit: cover;\n }\n .poi-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-poi-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .poi-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.poi-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n}\n\n.poi-name {\n font-size: 16px;\n line-height: 24px;\n height: 64px;\n}\n\n.poi-description {\n font-size: 14px;\n line-height: 20px;\n}\n\n.poi-description-short {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 4;\n overflow: hidden;\n}\n\n.handle-poi-description {\n cursor: pointer;\n color: var(--color-primary-app);\n text-decoration: underline;\n margin-top: 12px;\n height: 22px;\n}\n\np {\n margin: 0;\n}\n","import { Component, Host, h, Prop, State, Build, getAssetPath, Listen } from '@stencil/core';\nimport Swiper, { Navigation, Pagination, Keyboard } from 'swiper';\nimport state from 'store/store';\nimport { OutdoorSite, Poi, Trek } from 'types/types';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\n\n@Component({\n tag: 'grw-poi',\n styleUrl: 'grw-poi.scss',\n shadow: true,\n})\nexport class GrwPoiDetail {\n swiperPoi?: Swiper;\n swiperPoiRef?: HTMLDivElement;\n prevElPoiRef?: HTMLDivElement;\n nextElPoiRef?: HTMLDivElement;\n paginationElPoiRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n\n @Prop() poi: Poi;\n @State() displayShortDescription = true;\n @State() showPoiDescriptionButton = false;\n @State() displayFullscreen = false;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperPoi) {\n this.swiperPoi.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperPoiRef && !this.swiperPoi) {\n this.swiperPoi = new Swiper(this.swiperPoiRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElPoiRef,\n nextEl: this.nextElPoiRef,\n },\n pagination: { el: this.paginationElPoiRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperPoiRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperPoi.keyboard.enable();\n } else {\n this.swiperPoi.keyboard.disable();\n }\n };\n this.showPoiDescriptionButton = this.descriptionRef.clientHeight < this.descriptionRef.scrollHeight;\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n handlePoiDescription() {\n this.displayShortDescription = !this.displayShortDescription;\n }\n\n handleFullscreen() {\n if (this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].url) {\n this.swiperPoiRef.requestFullscreen();\n }\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n if (trekInStore && trekInStore.offline) {\n this.offline = Boolean(poiInStore);\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n this.offline = Boolean(poiInStore);\n }\n }\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n return (\n <Host>\n <div part=\"poi-type-img-container\" class=\"poi-type-img-container\">\n <img part=\"poi-type\" class=\"poi-type\" src={`${state.poiTypes.find(poiType => poiType.id === this.poi.type)?.pictogram}`} alt=\"\" />\n <div part=\"swiper-poi\" class=\"swiper swiper-poi\" ref={el => (this.swiperPoiRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.poi.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.poi.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"poi-iamg\"\n class={`poi-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? attachment.url : attachment.thumbnail}\n alt={attachment.legend}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-poi-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-poi-img\" class=\"default-poi-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElPoiRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElPoiRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElPoiRef = el)}\n ></div>\n </div>\n </div>\n <div part=\"poi-sub-container\" class=\"poi-sub-container\">\n <div part=\"poi-name\" class=\"poi-name\">\n {this.poi.name}\n </div>\n <div\n part=\"poi-description\"\n class={this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description'}\n innerHTML={this.poi.description}\n ref={el => (this.descriptionRef = el)}\n ></div>\n <div part=\"handle-poi-description\" class=\"handle-poi-description\" onClick={() => this.handlePoiDescription()}>\n {this.showPoiDescriptionButton && (this.displayShortDescription ? translate[state.language].readMore : translate[state.language].readLess)}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper {\n height: 200px;\n }\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.touristic-content-img-container {\n position: relative;\n height: 200px;\n .touristic-content-img,\n .default-touristic-content-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .touristic-content-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-touristic-content-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .touristic-content-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.touristic-content-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n .touristic-content-category-container {\n display: flex;\n align-items: center;\n margin-bottom: 12px;\n .touristic-content-category-name {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n }\n img {\n font-size: 24px;\n width: 24px;\n height: 24px;\n margin-right: 8px;\n background-color: var(--color-primary-app);\n }\n }\n .touristic-content-name {\n font-size: 16px;\n line-height: 24px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n height: 48px;\n }\n}\n\n.touristic-content-more-detail-container {\n padding: 0px 12px 12px 12px;\n .more-details-button {\n cursor: pointer;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n width: 100%;\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n border: none;\n font-size: 14px;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n span {\n font-size: 18px;\n }\n }\n}\n\n.touristic-content-card-container,\n.touristic-content-card-large-view-container {\n font-family: var(--font-family);\n border-radius: var(--border-radius, 12px);\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n .touristic-content-img {\n height: 100%;\n object-fit: cover;\n border-top-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 12px);\n }\n}\n\n.touristic-content-card-container {\n width: 100%;\n max-width: 350px;\n .touristic-content-img {\n width: 100%;\n height: 100%;\n }\n}\n\n.touristic-content-card-large-view-container {\n width: 100%;\n display: flex;\n flex-direction: row;\n .touristic-content-img {\n width: 250px;\n height: 100%;\n border-bottom-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 0px);\n }\n}\n\n.is-inside-vertical-list {\n cursor: pointer;\n border: none;\n .touristic-event-img,\n .default-touristic-event-img {\n height: 100%;\n }\n}\n\n.selected-touristic-content-card {\n box-shadow: var(--elevation-2);\n}\n\n.touristic-content-category-img {\n border-radius: 100%;\n padding: 2px;\n max-height: 20px;\n max-width: 20px;\n}\n","import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicContent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-content-card',\n styleUrl: 'grw-touristic-content-card.scss',\n shadow: true,\n})\nexport class GrwTouristicContentCard {\n @Event() touristicContentCardPress: EventEmitter<number>;\n swiperTouristicContent?: Swiper;\n swiperTouristicContentRef?: HTMLDivElement;\n prevElTouristicContentRef?: HTMLDivElement;\n nextElTouristicContentRef?: HTMLDivElement;\n paginationElTouristicContentRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicContent: TouristicContent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicContentMouseOver: EventEmitter<number>;\n @Event() cardTouristicContentMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicContent) {\n this.swiperTouristicContent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicContentRef && !this.swiperTouristicContent) {\n this.swiperTouristicContent = new Swiper(this.swiperTouristicContentRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicContentRef,\n nextEl: this.nextElTouristicContentRef,\n },\n pagination: { el: this.paginationElTouristicContentRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicContentRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicContent.keyboard.enable();\n } else {\n this.swiperTouristicContent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicContent.attachments && this.touristicContent.attachments[0] && this.touristicContent.attachments[0].url) {\n this.swiperTouristicContentRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicContentMouseOver.emit(this.touristicContent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicContentMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicContentCategory = state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === this.touristicContent.category);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-content-card\"\n class={\n this.isLargeView\n ? `touristic-content-card touristic-content-card-large-view-container${\n state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : `touristic-content-card touristic-content-card-container${state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicContentCardPress.emit(this.touristicContent.id);\n }\n }}\n >\n <div part=\"touristic-content-img-container\" class=\"touristic-content-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicContent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-content-img\"\n class={`touristic-content-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-content-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-content-img\" src={defaultImageSrc} class=\"default-touristic-content-img\" alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElTouristicContentRef = el)}\n ></div>\n </div>\n ) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-content-img\"\n class=\"touristic-content-img\"\n src={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-content-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div part=\"touristic-content-sub-container\" class=\"touristic-content-sub-container\">\n <div part=\"touristic-content-category-container\" class=\"touristic-content-category-container\">\n {touristicContentCategory && touristicContentCategory.pictogram && (\n <img part=\"touristic-content-category-img\" class=\"touristic-content-category-img\" src={touristicContentCategory.pictogram} alt=\"\" />\n )}\n <div part=\"touristic-content-category-name\" class=\"touristic-content-category-name\">\n {touristicContentCategory.label}\n </div>\n </div>\n <div part=\"touristic-content-name\" class=\"touristic-content-name\">\n {this.touristicContent.name}\n </div>\n </div>\n {this.isInsideHorizontalList && (\n <div part=\"touristic-content-more-detail-container\" class=\"touristic-content-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicContentCardPress.emit(this.touristicContent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper {\n height: 200px;\n }\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.touristic-event-img-container {\n position: relative;\n height: 200px;\n .touristic-event-img,\n .default-touristic-event-img {\n width: 100%;\n height: 100%;\n max-height: 200px;\n object-fit: cover;\n }\n .touristic-event-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-touristic-event-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .touristic-event-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.touristic-event-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n .touristic-event-type-container {\n display: flex;\n align-items: center;\n margin-bottom: 12px;\n .touristic-event-type-name {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n }\n img {\n font-size: 24px;\n width: 24px;\n height: 24px;\n margin-right: 8px;\n background-color: var(--color-primary-app);\n }\n }\n .touristic-event-name {\n font-size: 16px;\n line-height: 24px;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n height: 48px;\n }\n}\n\n.touristic-event-more-detail-container {\n padding: 0px 12px 12px 12px;\n .more-details-button {\n cursor: pointer;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n width: 100%;\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n border: none;\n font-size: 14px;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n span {\n font-size: 18px;\n }\n }\n}\n\n.touristic-event-card-container,\n.touristic-event-card-large-view-container {\n font-family: var(--font-family);\n border-radius: var(--border-radius, 12px);\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n .touristic-event-img {\n height: 100%;\n object-fit: cover;\n border-top-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 12px);\n }\n}\n\n.touristic-event-card-container {\n width: 100%;\n max-width: 350px;\n .touristic-event-img {\n width: 100%;\n height: 100%;\n }\n}\n\n.touristic-event-card-large-view-container {\n width: 100%;\n display: flex;\n flex-direction: row;\n .touristic-event-img {\n width: 250px;\n height: 100%;\n border-bottom-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 0px);\n }\n}\n\n.is-inside-vertical-list {\n cursor: pointer;\n border: none;\n .touristic-content-img,\n .default-touristic-event-img {\n height: 100%;\n }\n}\n\n.selected-touristic-event-card {\n box-shadow: var(--elevation-2);\n}\n\n.touristic-event-date-container {\n margin-top: 12px;\n}\n","import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicEvent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-event-card',\n styleUrl: 'grw-touristic-event-card.scss',\n shadow: true,\n})\nexport class GrwTouristicEvent {\n @Event() touristicEventCardPress: EventEmitter<number>;\n swiperTouristicEvent?: Swiper;\n swiperTouristicEventRef?: HTMLDivElement;\n prevElTouristicEventRef?: HTMLDivElement;\n nextElTouristicEventRef?: HTMLDivElement;\n paginationElTouristicEventRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicEvent: TouristicEvent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicEventMouseOver: EventEmitter<number>;\n @Event() cardTouristicEventMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicEvent) {\n this.swiperTouristicEvent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicEventRef && !this.swiperTouristicEvent) {\n this.swiperTouristicEvent = new Swiper(this.swiperTouristicEventRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicEventRef,\n nextEl: this.nextElTouristicEventRef,\n },\n pagination: { el: this.paginationElTouristicEventRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicEventRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicEvent.keyboard.enable();\n } else {\n this.swiperTouristicEvent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicEventInStore: TouristicEvent = await getDataInStore('touristicEvents', this.touristicEvent.id);\n this.offline = trekInStore && trekInStore.offline && touristicEventInStore && touristicEventInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicEventInStore: TouristicEvent = await getDataInStore('touristicEvents', this.touristicEvent.id);\n this.offline = touristicEventInStore && touristicEventInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicEvent.attachments && this.touristicEvent.attachments[0] && this.touristicEvent.attachments[0].url) {\n this.swiperTouristicEventRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicEventMouseOver.emit(this.touristicEvent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicEventMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicEventType = state.touristicEventTypes.find(touristicEventType => touristicEventType.id === this.touristicEvent.type);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-event-card\"\n class={\n this.isLargeView\n ? `touristic-event-card touristic-event-card-large-view-container${\n state.selectedTouristicEventId === this.touristicEvent.id ? ' selected-touristic-event-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : ` touristic-event-card touristic-event-card-container${state.selectedTouristicEventId === this.touristicEvent.id ? ' selected-touristic-event-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicEventCardPress.emit(this.touristicEvent.id);\n }\n }}\n >\n <div part=\"touristic-event-img-container\" class=\"touristic-event-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-event\" class=\"swiper swiper-touristic-event\" ref={el => (this.swiperTouristicEventRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicEvent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-event-img\"\n class={`touristic-event-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-event-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-event-img\" class=\"default-touristic-event-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicEventRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElTouristicEventRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElTouristicEventRef = el)}\n ></div>\n </div>\n ) : this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-event-img\"\n class=\"touristic-event-img\"\n src={`${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-event-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n )}\n </div>\n <div part=\"touristic-event-sub-container\" class=\"touristic-event-sub-container\">\n <div part=\"touristic-event-type-container\" class=\"touristic-event-type-container\">\n {touristicEventType && touristicEventType.pictogram && (\n <img part=\"touristic-event-type-img\" class=\"touristic-event-type-img\" src={touristicEventType.pictogram} alt=\"\" />\n )}\n {touristicEventType && touristicEventType.type && (\n <div part=\"touristic-event-type-name\" class=\"touristic-event-type-name\">\n {touristicEventType.type}\n </div>\n )}\n </div>\n <div part=\"touristic-event-name\" class=\"touristic-event-name\">\n {this.touristicEvent.name}\n </div>\n {(this.touristicEvent.begin_date || this.touristicEvent.end_date) && (\n <div part=\"touristic-event-date-container\" class=\"touristic-event-date-container\">\n {this.touristicEvent.begin_date === this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].date} : {this.touristicEvent.begin_date}\n </div>\n )}\n {this.touristicEvent.begin_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].startDate} : {this.touristicEvent.begin_date}\n </div>\n )}\n {this.touristicEvent.end_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].endDate} : {this.touristicEvent.end_date}\n </div>\n )}\n </div>\n )}\n </div>\n\n {this.isInsideHorizontalList && (\n <div part=\"touristic-event-more-detail-container\" class=\"touristic-event-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicEventCardPress.emit(this.touristicEvent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"grw-poi.grw-touristic-content-card.grw-touristic-event-card.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,SAAS,GAAG,skkBAAskkB,CAAC;AACzlkB,qBAAe,SAAS;;MCWX,YAAY;;;;uCASY,IAAI;wCACH,KAAK;iCACZ,KAAK;uBAEf,KAAK;;IAGxB,8BAA8B;QAC5B,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;IAGD,0BAA0B;QACxB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;IAED,aAAa;QACX,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACxC,IAAI,CAAC,SAAS,GAAG,IAAIA,iBAAM,CAAC,IAAI,CAAC,YAAY,EAAE;gBAC7C,OAAO,EAAE,CAACC,qBAAU,EAAEC,qBAAU,EAAEC,mBAAQ,CAAC;gBAC3C,UAAU,EAAE;oBACV,MAAM,EAAE,IAAI,CAAC,YAAY;oBACzB,MAAM,EAAE,IAAI,CAAC,YAAY;iBAC1B;gBACD,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,kBAAkB,EAAE;gBAC3C,cAAc,EAAE,KAAK;gBACrB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,CAAC,kBAAkB,GAAG;gBACrC,IAAI,CAAC,iBAAiB,GAAG,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACl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names":["Swiper","Navigation","Pagination","Keyboard","state","getDataInStore","getAssetPath","h","Host","translate"],"sources":["src/components/grw-poi-detail/grw-poi.scss?tag=grw-poi&encapsulation=shadow","src/components/grw-poi-detail/grw-poi.tsx","src/components/grw-touristic-content-card/grw-touristic-content-card.scss?tag=grw-touristic-content-card&encapsulation=shadow","src/components/grw-touristic-content-card/grw-touristic-content-card.tsx","src/components/grw-touristic-event-card/grw-touristic-event-card.scss?tag=grw-touristic-event-card&encapsulation=shadow","src/components/grw-touristic-event-card/grw-touristic-event-card.tsx"],"sourcesContent":["@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid gray;\n border-radius: var(--border-radius, 12px);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.poi-type-img-container {\n position: relative;\n .poi-img,\n .default-poi-img {\n width: 100%;\n height: 100%;\n height: 200px;\n object-fit: cover;\n }\n .poi-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-poi-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .poi-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.poi-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n}\n\n.poi-name {\n font-size: 16px;\n line-height: 24px;\n height: 64px;\n}\n\n.poi-description {\n font-size: 14px;\n line-height: 20px;\n}\n\n.poi-description-short {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 4;\n overflow: hidden;\n}\n\n.handle-poi-description {\n cursor: pointer;\n color: var(--color-primary-app);\n text-decoration: underline;\n margin-top: 12px;\n height: 22px;\n}\n\np {\n margin: 0;\n}\n","import { Component, Host, h, Prop, State, Build, getAssetPath, Listen } from '@stencil/core';\nimport Swiper, { Navigation, Pagination, Keyboard } from 'swiper';\nimport state from 'store/store';\nimport { OutdoorSite, Poi, Trek } from 'types/types';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\n\n@Component({\n tag: 'grw-poi',\n styleUrl: 'grw-poi.scss',\n shadow: true,\n})\nexport class GrwPoiDetail {\n swiperPoi?: Swiper;\n swiperPoiRef?: HTMLDivElement;\n prevElPoiRef?: HTMLDivElement;\n nextElPoiRef?: HTMLDivElement;\n paginationElPoiRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n\n @Prop() poi: Poi;\n @State() displayShortDescription = true;\n @State() showPoiDescriptionButton = false;\n @State() displayFullscreen = false;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperPoi) {\n this.swiperPoi.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperPoiRef && !this.swiperPoi) {\n this.swiperPoi = new Swiper(this.swiperPoiRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElPoiRef,\n nextEl: this.nextElPoiRef,\n },\n pagination: { el: this.paginationElPoiRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperPoiRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperPoi.keyboard.enable();\n } else {\n this.swiperPoi.keyboard.disable();\n }\n };\n this.showPoiDescriptionButton = this.descriptionRef.clientHeight < this.descriptionRef.scrollHeight;\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n handlePoiDescription() {\n this.displayShortDescription = !this.displayShortDescription;\n }\n\n handleFullscreen() {\n if (this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].url) {\n this.swiperPoiRef.requestFullscreen();\n }\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n if (trekInStore && trekInStore.offline) {\n this.offline = Boolean(poiInStore);\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n this.offline = Boolean(poiInStore);\n }\n }\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n return (\n <Host>\n <div part=\"poi-type-img-container\" class=\"poi-type-img-container\">\n <img part=\"poi-type\" class=\"poi-type\" src={`${state.poiTypes.find(poiType => poiType.id === this.poi.type)?.pictogram}`} alt=\"\" />\n <div part=\"swiper-poi\" class=\"swiper swiper-poi\" ref={el => (this.swiperPoiRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.poi.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.poi.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"poi-iamg\"\n class={`poi-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? attachment.url : attachment.thumbnail}\n alt={attachment.legend}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-poi-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-poi-img\" class=\"default-poi-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div style={{ display: this.offline ? 'none' : 'block' }} part=\"swiper-pagination\" class=\"swiper-pagination\" ref={el => (this.paginationElPoiRef = el)}></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-prev\" class=\"swiper-button-prev\" ref={el => (this.prevElPoiRef = el)}></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-next\" class=\"swiper-button-next\" ref={el => (this.nextElPoiRef = el)}></div>\n </div>\n </div>\n <div part=\"poi-sub-container\" class=\"poi-sub-container\">\n <div part=\"poi-name\" class=\"poi-name\">\n {this.poi.name}\n </div>\n <div\n part=\"poi-description\"\n class={this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description'}\n innerHTML={this.poi.description}\n ref={el => (this.descriptionRef = el)}\n ></div>\n <div part=\"handle-poi-description\" class=\"handle-poi-description\" onClick={() => this.handlePoiDescription()}>\n {this.showPoiDescriptionButton && (this.displayShortDescription ? translate[state.language].readMore : translate[state.language].readLess)}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper {\n height: 200px;\n }\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.touristic-content-img-container {\n position: relative;\n height: 200px;\n .touristic-content-img,\n .default-touristic-content-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .touristic-content-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-touristic-content-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .touristic-content-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.touristic-content-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n .touristic-content-category-container {\n display: flex;\n align-items: center;\n margin-bottom: 12px;\n .touristic-content-category-name {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n }\n img {\n font-size: 24px;\n width: 24px;\n height: 24px;\n margin-right: 8px;\n background-color: var(--color-primary-app);\n }\n }\n .touristic-content-name {\n font-size: 16px;\n line-height: 24px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n height: 48px;\n }\n}\n\n.touristic-content-more-detail-container {\n padding: 0px 12px 12px 12px;\n .more-details-button {\n cursor: pointer;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n width: 100%;\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n border: none;\n font-size: 14px;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n span {\n font-size: 18px;\n }\n }\n}\n\n.touristic-content-card-container,\n.touristic-content-card-large-view-container {\n font-family: var(--font-family);\n border-radius: var(--border-radius, 12px);\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n .touristic-content-img {\n height: 100%;\n object-fit: cover;\n border-top-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 12px);\n }\n}\n\n.touristic-content-card-container {\n width: 100%;\n max-width: 350px;\n .touristic-content-img {\n width: 100%;\n height: 100%;\n }\n}\n\n.touristic-content-card-large-view-container {\n width: 100%;\n display: flex;\n flex-direction: row;\n .touristic-content-img {\n width: 250px;\n height: 100%;\n border-bottom-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 0px);\n }\n}\n\n.is-inside-vertical-list {\n cursor: pointer;\n border: none;\n .touristic-event-img,\n .default-touristic-event-img {\n height: 100%;\n }\n}\n\n.selected-touristic-content-card {\n box-shadow: var(--elevation-2);\n}\n\n.touristic-content-category-img {\n border-radius: 100%;\n padding: 2px;\n max-height: 20px;\n max-width: 20px;\n}\n","import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicContent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-content-card',\n styleUrl: 'grw-touristic-content-card.scss',\n shadow: true,\n})\nexport class GrwTouristicContentCard {\n @Event() touristicContentCardPress: EventEmitter<number>;\n swiperTouristicContent?: Swiper;\n swiperTouristicContentRef?: HTMLDivElement;\n prevElTouristicContentRef?: HTMLDivElement;\n nextElTouristicContentRef?: HTMLDivElement;\n paginationElTouristicContentRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicContent: TouristicContent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicContentMouseOver: EventEmitter<number>;\n @Event() cardTouristicContentMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicContent) {\n this.swiperTouristicContent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicContentRef && !this.swiperTouristicContent) {\n this.swiperTouristicContent = new Swiper(this.swiperTouristicContentRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicContentRef,\n nextEl: this.nextElTouristicContentRef,\n },\n pagination: { el: this.paginationElTouristicContentRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicContentRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicContent.keyboard.enable();\n } else {\n this.swiperTouristicContent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicContent.attachments && this.touristicContent.attachments[0] && this.touristicContent.attachments[0].url) {\n this.swiperTouristicContentRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicContentMouseOver.emit(this.touristicContent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicContentMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicContentCategory = state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === this.touristicContent.category);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-content-card\"\n class={\n this.isLargeView\n ? `touristic-content-card touristic-content-card-large-view-container${\n state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : `touristic-content-card touristic-content-card-container${state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicContentCardPress.emit(this.touristicContent.id);\n }\n }}\n >\n <div part=\"touristic-content-img-container\" class=\"touristic-content-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicContent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-content-img\"\n class={`touristic-content-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-content-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-content-img\" src={defaultImageSrc} class=\"default-touristic-content-img\" alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline ? 'none' : 'flex' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline ? 'none' : 'flex' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElTouristicContentRef = el)}\n ></div>\n </div>\n ) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-content-img\"\n class=\"touristic-content-img\"\n src={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-content-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div part=\"touristic-content-sub-container\" class=\"touristic-content-sub-container\">\n <div part=\"touristic-content-category-container\" class=\"touristic-content-category-container\">\n {touristicContentCategory && touristicContentCategory.pictogram && (\n <img part=\"touristic-content-category-img\" class=\"touristic-content-category-img\" src={touristicContentCategory.pictogram} alt=\"\" />\n )}\n <div part=\"touristic-content-category-name\" class=\"touristic-content-category-name\">\n {touristicContentCategory.label}\n </div>\n </div>\n <div part=\"touristic-content-name\" class=\"touristic-content-name\">\n {this.touristicContent.name}\n </div>\n </div>\n {this.isInsideHorizontalList && (\n <div part=\"touristic-content-more-detail-container\" class=\"touristic-content-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicContentCardPress.emit(this.touristicContent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n a {\n color: var(--color-primary-app);\n }\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper {\n height: 200px;\n }\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\n.touristic-event-img-container {\n position: relative;\n height: 200px;\n .touristic-event-img,\n .default-touristic-event-img {\n width: 100%;\n height: 100%;\n max-height: 200px;\n object-fit: cover;\n }\n .touristic-event-img {\n cursor: pointer;\n object-fit: cover;\n }\n .default-touristic-event-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .img-fullscreen {\n max-height: none;\n object-fit: contain;\n }\n .touristic-event-type {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 2px solid #ffffff;\n border-radius: var(--border-radius, 50%);\n background-color: var(--color-on-surface);\n position: absolute;\n top: 8px;\n left: 8px;\n z-index: 200;\n }\n}\n\n.touristic-event-sub-container {\n display: flex;\n flex-direction: column;\n padding: 12px;\n .touristic-event-type-container {\n display: flex;\n align-items: center;\n margin-bottom: 12px;\n .touristic-event-type-name {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n }\n img {\n font-size: 24px;\n width: 24px;\n height: 24px;\n margin-right: 8px;\n background-color: var(--color-primary-app);\n }\n }\n .touristic-event-name {\n font-size: 16px;\n line-height: 24px;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n height: 48px;\n }\n}\n\n.touristic-event-more-detail-container {\n padding: 0px 12px 12px 12px;\n .more-details-button {\n cursor: pointer;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n width: 100%;\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n border: none;\n font-size: 14px;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n span {\n font-size: 18px;\n }\n }\n}\n\n.touristic-event-card-container,\n.touristic-event-card-large-view-container {\n font-family: var(--font-family);\n border-radius: var(--border-radius, 12px);\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n color: var(--color-on-surface);\n .touristic-event-img {\n height: 100%;\n object-fit: cover;\n border-top-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 12px);\n }\n}\n\n.touristic-event-card-container {\n width: 100%;\n max-width: 350px;\n .touristic-event-img {\n width: 100%;\n height: 100%;\n }\n}\n\n.touristic-event-card-large-view-container {\n width: 100%;\n display: flex;\n flex-direction: row;\n .touristic-event-img {\n width: 250px;\n height: 100%;\n border-bottom-left-radius: var(--border-radius, 12px);\n border-top-right-radius: var(--border-radius, 0px);\n }\n}\n\n.is-inside-vertical-list {\n cursor: pointer;\n border: none;\n .touristic-content-img,\n .default-touristic-event-img {\n height: 100%;\n }\n}\n\n.selected-touristic-event-card {\n box-shadow: var(--elevation-2);\n}\n\n.touristic-event-date-container {\n margin-top: 12px;\n}\n","import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicEvent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-event-card',\n styleUrl: 'grw-touristic-event-card.scss',\n shadow: true,\n})\nexport class GrwTouristicEvent {\n @Event() touristicEventCardPress: EventEmitter<number>;\n swiperTouristicEvent?: Swiper;\n swiperTouristicEventRef?: HTMLDivElement;\n prevElTouristicEventRef?: HTMLDivElement;\n nextElTouristicEventRef?: HTMLDivElement;\n paginationElTouristicEventRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicEvent: TouristicEvent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicEventMouseOver: EventEmitter<number>;\n @Event() cardTouristicEventMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicEvent) {\n this.swiperTouristicEvent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicEventRef && !this.swiperTouristicEvent) {\n this.swiperTouristicEvent = new Swiper(this.swiperTouristicEventRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicEventRef,\n nextEl: this.nextElTouristicEventRef,\n },\n pagination: { el: this.paginationElTouristicEventRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicEventRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicEvent.keyboard.enable();\n } else {\n this.swiperTouristicEvent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicEventInStore: TouristicEvent = await getDataInStore('touristicEvents', this.touristicEvent.id);\n this.offline = trekInStore && trekInStore.offline && touristicEventInStore && touristicEventInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicEventInStore: TouristicEvent = await getDataInStore('touristicEvents', this.touristicEvent.id);\n this.offline = touristicEventInStore && touristicEventInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicEvent.attachments && this.touristicEvent.attachments[0] && this.touristicEvent.attachments[0].url) {\n this.swiperTouristicEventRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicEventMouseOver.emit(this.touristicEvent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicEventMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicEventType = state.touristicEventTypes.find(touristicEventType => touristicEventType.id === this.touristicEvent.type);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-event-card\"\n class={\n this.isLargeView\n ? `touristic-event-card touristic-event-card-large-view-container${\n state.selectedTouristicEventId === this.touristicEvent.id ? ' selected-touristic-event-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : ` touristic-event-card touristic-event-card-container${state.selectedTouristicEventId === this.touristicEvent.id ? ' selected-touristic-event-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicEventCardPress.emit(this.touristicEvent.id);\n }\n }}\n >\n <div part=\"touristic-event-img-container\" class=\"touristic-event-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-event\" class=\"swiper swiper-touristic-event\" ref={el => (this.swiperTouristicEventRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicEvent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-event-img\"\n class={`touristic-event-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-event-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-event-img\" class=\"default-touristic-event-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicEventRef = el)}\n ></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-prev\" class=\"swiper-button-prev\" ref={el => (this.prevElTouristicEventRef = el)}></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-next\" class=\"swiper-button-next\" ref={el => (this.nextElTouristicEventRef = el)}></div>\n </div>\n ) : this.touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-event-img\"\n class=\"touristic-event-img\"\n src={`${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicEvent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-event-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n )}\n </div>\n <div part=\"touristic-event-sub-container\" class=\"touristic-event-sub-container\">\n <div part=\"touristic-event-type-container\" class=\"touristic-event-type-container\">\n {touristicEventType && touristicEventType.pictogram && (\n <img part=\"touristic-event-type-img\" class=\"touristic-event-type-img\" src={touristicEventType.pictogram} alt=\"\" />\n )}\n {touristicEventType && touristicEventType.type && (\n <div part=\"touristic-event-type-name\" class=\"touristic-event-type-name\">\n {touristicEventType.type}\n </div>\n )}\n </div>\n <div part=\"touristic-event-name\" class=\"touristic-event-name\">\n {this.touristicEvent.name}\n </div>\n {(this.touristicEvent.begin_date || this.touristicEvent.end_date) && (\n <div part=\"touristic-event-date-container\" class=\"touristic-event-date-container\">\n {this.touristicEvent.begin_date === this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].date} : {this.touristicEvent.begin_date}\n </div>\n )}\n {this.touristicEvent.begin_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].startDate} : {this.touristicEvent.begin_date}\n </div>\n )}\n {this.touristicEvent.end_date && this.touristicEvent.begin_date !== this.touristicEvent.end_date && (\n <div part=\"touristic-event-date\" class=\"touristic-event-date\">\n {translate[state.language].endDate} : {this.touristicEvent.end_date}\n </div>\n )}\n </div>\n )}\n </div>\n\n {this.isInsideHorizontalList && (\n <div part=\"touristic-event-more-detail-container\" class=\"touristic-event-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicEventCardPress.emit(this.touristicEvent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -87,7 +87,7 @@ export class GrwPoiDetail {
|
|
|
87
87
|
event.target.onerror = null;
|
|
88
88
|
event.target.className = 'default-poi-img';
|
|
89
89
|
event.target.src = defaultImageSrc;
|
|
90
|
-
}, onClick: () => this.handleFullscreen() }))))) : (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("img", { part: "default-poi-img", class: "default-poi-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), h("div", { key: '
|
|
90
|
+
}, onClick: () => this.handleFullscreen() }))))) : (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("img", { part: "default-poi-img", class: "default-poi-img", src: defaultImageSrc, alt: "", loading: "lazy" })))), h("div", { key: 'ad45324ca7b75a831dcc1ef67c8c39393bce78ca', style: { display: this.offline ? 'none' : 'block' }, part: "swiper-pagination", class: "swiper-pagination", ref: el => (this.paginationElPoiRef = el) }), h("div", { key: 'c0932197c3580e9cbb412c050afa271ade756192', style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-prev", class: "swiper-button-prev", ref: el => (this.prevElPoiRef = el) }), h("div", { key: 'b66ddb0cd5880f5895eac6ea024ee71048a319a2', style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-next", class: "swiper-button-next", ref: el => (this.nextElPoiRef = el) }))), h("div", { key: '049b2849529671a31da1ed75976b519d2f42bc90', part: "poi-sub-container", class: "poi-sub-container" }, h("div", { key: 'b34bfcbc2533bab1c21910c4e860823e3892dba6', part: "poi-name", class: "poi-name" }, this.poi.name), h("div", { key: 'cd65421b578819cdd7ee5bde4af57981da625628', part: "poi-description", class: this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description', innerHTML: this.poi.description, ref: el => (this.descriptionRef = el) }), h("div", { key: '32d0afd9faf442cf3a6fc6cb6d77f71eec33ae18', part: "handle-poi-description", class: "handle-poi-description", onClick: () => this.handlePoiDescription() }, this.showPoiDescriptionButton && (this.displayShortDescription ? translate[state.language].readMore : translate[state.language].readLess)))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "grw-poi"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grw-poi.js","sourceRoot":"","sources":["../../../src/components/grw-poi-detail/grw-poi.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,MAAM,OAAO,YAAY;;;uCASY,IAAI;wCACH,KAAK;iCACZ,KAAK;uBAEf,KAAK;;IAGxB,8BAA8B;QAC5B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAGD,0BAA0B;QACxB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACzC,IAAI,CAAC,SAAS,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE;gBAC7C,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;gBAC3C,UAAU,EAAE;oBACV,MAAM,EAAE,IAAI,CAAC,YAAY;oBACzB,MAAM,EAAE,IAAI,CAAC,YAAY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AAC,MAAM,EAAE,EACxI,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAC,oBAAoB,EAC1B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAC9B,CACH,CACF;YACN,4DAAK,IAAI,EAAC,mBAAmB,EAAC,KAAK,EAAC,mBAAmB;gBACrD,4DAAK,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,UAAU,IAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CACV;gBACN,4DACE,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,iBAAiB,EACjG,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,EAC/B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,GAChC;gBACP,4DAAK,IAAI,EAAC,wBAAwB,EAAC,KAAK,EAAC,wBAAwB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IACzG,IAAI,CAAC,wBAAwB,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACtI,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Build, getAssetPath, Listen } from '@stencil/core';\nimport Swiper, { Navigation, Pagination, Keyboard } from 'swiper';\nimport state from 'store/store';\nimport { OutdoorSite, Poi, Trek } from 'types/types';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\n\n@Component({\n tag: 'grw-poi',\n styleUrl: 'grw-poi.scss',\n shadow: true,\n})\nexport class GrwPoiDetail {\n swiperPoi?: Swiper;\n swiperPoiRef?: HTMLDivElement;\n prevElPoiRef?: HTMLDivElement;\n nextElPoiRef?: HTMLDivElement;\n paginationElPoiRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n\n @Prop() poi: Poi;\n @State() displayShortDescription = true;\n @State() showPoiDescriptionButton = false;\n @State() displayFullscreen = false;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperPoi) {\n this.swiperPoi.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperPoiRef && !this.swiperPoi) {\n this.swiperPoi = new Swiper(this.swiperPoiRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElPoiRef,\n nextEl: this.nextElPoiRef,\n },\n pagination: { el: this.paginationElPoiRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperPoiRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperPoi.keyboard.enable();\n } else {\n this.swiperPoi.keyboard.disable();\n }\n };\n this.showPoiDescriptionButton = this.descriptionRef.clientHeight < this.descriptionRef.scrollHeight;\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n handlePoiDescription() {\n this.displayShortDescription = !this.displayShortDescription;\n }\n\n handleFullscreen() {\n if (this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].url) {\n this.swiperPoiRef.requestFullscreen();\n }\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n if (trekInStore && trekInStore.offline) {\n this.offline = Boolean(poiInStore);\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n this.offline = Boolean(poiInStore);\n }\n }\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n return (\n <Host>\n <div part=\"poi-type-img-container\" class=\"poi-type-img-container\">\n <img part=\"poi-type\" class=\"poi-type\" src={`${state.poiTypes.find(poiType => poiType.id === this.poi.type)?.pictogram}`} alt=\"\" />\n <div part=\"swiper-poi\" class=\"swiper swiper-poi\" ref={el => (this.swiperPoiRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.poi.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.poi.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"poi-iamg\"\n class={`poi-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? attachment.url : attachment.thumbnail}\n alt={attachment.legend}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-poi-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-poi-img\" class=\"default-poi-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElPoiRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElPoiRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.poi.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'flex' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElPoiRef = el)}\n ></div>\n </div>\n </div>\n <div part=\"poi-sub-container\" class=\"poi-sub-container\">\n <div part=\"poi-name\" class=\"poi-name\">\n {this.poi.name}\n </div>\n <div\n part=\"poi-description\"\n class={this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description'}\n innerHTML={this.poi.description}\n ref={el => (this.descriptionRef = el)}\n ></div>\n <div part=\"handle-poi-description\" class=\"handle-poi-description\" onClick={() => this.handlePoiDescription()}>\n {this.showPoiDescriptionButton && (this.displayShortDescription ? translate[state.language].readMore : translate[state.language].readLess)}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grw-poi.js","sourceRoot":"","sources":["../../../src/components/grw-poi-detail/grw-poi.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,MAAM,OAAO,YAAY;;;uCASY,IAAI;wCACH,KAAK;iCACZ,KAAK;uBAEf,KAAK;;IAGxB,8BAA8B;QAC5B,IAAI,IAAI,CAAC,SAAS,EAA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AAQ;oBACzJ,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAQ,CACrJ,CACF;YACN,4DAAK,IAAI,EAAC,mBAAmB,EAAC,KAAK,EAAC,mBAAmB;gBACrD,4DAAK,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,UAAU,IAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CACV;gBACN,4DACE,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,iBAAiB,EACjG,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,EAC/B,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,GAChC;gBACP,4DAAK,IAAI,EAAC,wBAAwB,EAAC,KAAK,EAAC,wBAAwB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IACzG,IAAI,CAAC,wBAAwB,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACtI,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Build, getAssetPath, Listen } from '@stencil/core';\nimport Swiper, { Navigation, Pagination, Keyboard } from 'swiper';\nimport state from 'store/store';\nimport { OutdoorSite, Poi, Trek } from 'types/types';\nimport { translate } from 'i18n/i18n';\nimport { getDataInStore } from 'services/grw-db.service';\n\n@Component({\n tag: 'grw-poi',\n styleUrl: 'grw-poi.scss',\n shadow: true,\n})\nexport class GrwPoiDetail {\n swiperPoi?: Swiper;\n swiperPoiRef?: HTMLDivElement;\n prevElPoiRef?: HTMLDivElement;\n nextElPoiRef?: HTMLDivElement;\n paginationElPoiRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n\n @Prop() poi: Poi;\n @State() displayShortDescription = true;\n @State() showPoiDescriptionButton = false;\n @State() displayFullscreen = false;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperPoi) {\n this.swiperPoi.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperPoiRef && !this.swiperPoi) {\n this.swiperPoi = new Swiper(this.swiperPoiRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElPoiRef,\n nextEl: this.nextElPoiRef,\n },\n pagination: { el: this.paginationElPoiRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperPoiRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperPoi.keyboard.enable();\n } else {\n this.swiperPoi.keyboard.disable();\n }\n };\n this.showPoiDescriptionButton = this.descriptionRef.clientHeight < this.descriptionRef.scrollHeight;\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n handlePoiDescription() {\n this.displayShortDescription = !this.displayShortDescription;\n }\n\n handleFullscreen() {\n if (this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].url) {\n this.swiperPoiRef.requestFullscreen();\n }\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n if (trekInStore && trekInStore.offline) {\n this.offline = Boolean(poiInStore);\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const poiInStore: Poi = await getDataInStore('pois', this.poi.id);\n this.offline = Boolean(poiInStore);\n }\n }\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n return (\n <Host>\n <div part=\"poi-type-img-container\" class=\"poi-type-img-container\">\n <img part=\"poi-type\" class=\"poi-type\" src={`${state.poiTypes.find(poiType => poiType.id === this.poi.type)?.pictogram}`} alt=\"\" />\n <div part=\"swiper-poi\" class=\"swiper swiper-poi\" ref={el => (this.swiperPoiRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.poi.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.poi.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"poi-iamg\"\n class={`poi-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? attachment.url : attachment.thumbnail}\n alt={attachment.legend}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-poi-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-poi-img\" class=\"default-poi-img\" src={defaultImageSrc} alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div style={{ display: this.offline ? 'none' : 'block' }} part=\"swiper-pagination\" class=\"swiper-pagination\" ref={el => (this.paginationElPoiRef = el)}></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-prev\" class=\"swiper-button-prev\" ref={el => (this.prevElPoiRef = el)}></div>\n <div style={{ display: this.offline ? 'none' : 'flex' }} part=\"swiper-button-next\" class=\"swiper-button-next\" ref={el => (this.nextElPoiRef = el)}></div>\n </div>\n </div>\n <div part=\"poi-sub-container\" class=\"poi-sub-container\">\n <div part=\"poi-name\" class=\"poi-name\">\n {this.poi.name}\n </div>\n <div\n part=\"poi-description\"\n class={this.displayShortDescription ? 'poi-description poi-description-short' : 'poi-description'}\n innerHTML={this.poi.description}\n ref={el => (this.descriptionRef = el)}\n ></div>\n <div part=\"handle-poi-description\" class=\"handle-poi-description\" onClick={() => this.handlePoiDescription()}>\n {this.showPoiDescriptionButton && (this.displayShortDescription ? translate[state.language].readMore : translate[state.language].readLess)}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -98,7 +98,7 @@ export class GrwTouristicContentCard {
|
|
|
98
98
|
event.target.onerror = null;
|
|
99
99
|
event.target.className = 'default-touristic-content-img';
|
|
100
100
|
event.target.src = defaultImageSrc;
|
|
101
|
-
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("img", { part: "default-touristic-content-img", src: defaultImageSrc, class: "default-touristic-content-img", alt: "", loading: "lazy" })))), h("div", { style: { display: this.offline
|
|
101
|
+
}, onClick: () => this.handleFullscreen(), alt: attachment.legend }))))) : (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("img", { part: "default-touristic-content-img", src: defaultImageSrc, class: "default-touristic-content-img", alt: "", loading: "lazy" })))), h("div", { style: { display: this.offline ? 'none' : 'block' }, part: "swiper-pagination", class: "swiper-pagination", ref: el => (this.paginationElTouristicContentRef = el) }), h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-prev", class: "swiper-button-prev", ref: el => (this.prevElTouristicContentRef = el) }), h("div", { style: { display: this.offline ? 'none' : 'flex' }, part: "swiper-button-next", class: "swiper-button-next", ref: el => (this.nextElTouristicContentRef = el) }))) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (h("img", { part: "touristic-content-img", class: "touristic-content-img", src: `${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`, alt: `${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`, loading: "lazy" })) : (h("img", { class: "image default-touristic-content-img", src: defaultImageSrc, loading: "lazy", alt: "" }))), h("div", { key: 'f9238be9feb7faff38f04d4a367ebaf7df83522e', part: "touristic-content-sub-container", class: "touristic-content-sub-container" }, h("div", { key: '9eada8f244529c1fa64b9162185a315b89634802', part: "touristic-content-category-container", class: "touristic-content-category-container" }, touristicContentCategory && touristicContentCategory.pictogram && (h("img", { part: "touristic-content-category-img", class: "touristic-content-category-img", src: touristicContentCategory.pictogram, alt: "" })), h("div", { key: '7f371b852730cddde844e5c7255c67a84b43e2aa', part: "touristic-content-category-name", class: "touristic-content-category-name" }, touristicContentCategory.label)), h("div", { key: 'ac31930c2f67b4f4f253e02da4db8e43188fe1bb', part: "touristic-content-name", class: "touristic-content-name" }, this.touristicContent.name)), this.isInsideHorizontalList && (h("div", { part: "touristic-content-more-detail-container", class: "touristic-content-more-detail-container" }, h("button", { part: "more-details-button", class: "more-details-button", onClick: () => this.touristicContentCardPress.emit(this.touristicContent.id) }, "Plus de d\u00E9tails"))))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "grw-touristic-content-card"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.br
CHANGED
|
Binary file
|
package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.gz
CHANGED
|
Binary file
|
package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grw-touristic-content-card.js","sourceRoot":"","sources":["../../../src/components/grw-touristic-content-card/grw-touristic-content-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,MAAM,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAQlE,MAAM,OAAO,uBAAuB;;0BAQb,QAAQ;;2BAGP,KAAK;sCACM,KAAK;iCACT,KAAK;uBAKf,KAAK;;IAGxB,8BAA8B;QAC5B,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAChC,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAGD,0BAA0B;QACxB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,yBAAyB,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACnE,IAAI,CAAC,sBAAsB,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,yBAAyB,EAAE;gBACvE,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;gBAC3C,UAAU,EAAE;oBACV,MAAM,EAAE,IAAI,CAAC,yBAAyB;oBACtC,MAAM,EAAE,IAAI,CAAC,yBAAyB;iBACvC;gBACD,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,+BAA+B,EAAE;gBACxD,cAAc,EAAE,KAAK;gBACrB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,IAAI;a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B,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,2BAElI,CACL,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicContent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-content-card',\n styleUrl: 'grw-touristic-content-card.scss',\n shadow: true,\n})\nexport class GrwTouristicContentCard {\n @Event() touristicContentCardPress: EventEmitter<number>;\n swiperTouristicContent?: Swiper;\n swiperTouristicContentRef?: HTMLDivElement;\n prevElTouristicContentRef?: HTMLDivElement;\n nextElTouristicContentRef?: HTMLDivElement;\n paginationElTouristicContentRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicContent: TouristicContent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicContentMouseOver: EventEmitter<number>;\n @Event() cardTouristicContentMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicContent) {\n this.swiperTouristicContent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicContentRef && !this.swiperTouristicContent) {\n this.swiperTouristicContent = new Swiper(this.swiperTouristicContentRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicContentRef,\n nextEl: this.nextElTouristicContentRef,\n },\n pagination: { el: this.paginationElTouristicContentRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicContentRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicContent.keyboard.enable();\n } else {\n this.swiperTouristicContent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicContent.attachments && this.touristicContent.attachments[0] && this.touristicContent.attachments[0].url) {\n this.swiperTouristicContentRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicContentMouseOver.emit(this.touristicContent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicContentMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicContentCategory = state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === this.touristicContent.category);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-content-card\"\n class={\n this.isLargeView\n ? `touristic-content-card touristic-content-card-large-view-container${\n state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : `touristic-content-card touristic-content-card-container${state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicContentCardPress.emit(this.touristicContent.id);\n }\n }}\n >\n <div part=\"touristic-content-img-container\" class=\"touristic-content-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicContent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-content-img\"\n class={`touristic-content-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-content-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-content-img\" src={defaultImageSrc} class=\"default-touristic-content-img\" alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline || this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length <= 1 ? 'none' : 'block' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElTouristicContentRef = el)}\n ></div>\n </div>\n ) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-content-img\"\n class=\"touristic-content-img\"\n src={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-content-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div part=\"touristic-content-sub-container\" class=\"touristic-content-sub-container\">\n <div part=\"touristic-content-category-container\" class=\"touristic-content-category-container\">\n {touristicContentCategory && touristicContentCategory.pictogram && (\n <img part=\"touristic-content-category-img\" class=\"touristic-content-category-img\" src={touristicContentCategory.pictogram} alt=\"\" />\n )}\n <div part=\"touristic-content-category-name\" class=\"touristic-content-category-name\">\n {touristicContentCategory.label}\n </div>\n </div>\n <div part=\"touristic-content-name\" class=\"touristic-content-name\">\n {this.touristicContent.name}\n </div>\n </div>\n {this.isInsideHorizontalList && (\n <div part=\"touristic-content-more-detail-container\" class=\"touristic-content-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicContentCardPress.emit(this.touristicContent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grw-touristic-content-card.js","sourceRoot":"","s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,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,GAAG,CAChG,CACG;gBACN,4DAAK,IAAI,EAAC,iCAAiC,EAAC,KAAK,EAAC,iCAAiC;oBACjF,4DAAK,IAAI,EAAC,sCAAsC,EAAC,KAAK,EAAC,sCAAsC;wBAC1F,wBAAwB,IAAI,wBAAwB,CAAC,SAAS,IAAI,CACjE,WAAK,IAAI,EAAC,gCAAgC,EAAC,KAAK,EAAC,gCAAgC,EAAC,GAAG,EAAE,wBAAwB,CAAC,SAAS,EAAE,GAAG,EAAC,EAAE,GAAG,CACrI;wBACD,4DAAK,IAAI,EAAC,iCAAiC,EAAC,KAAK,EAAC,iCAAiC,IAChF,wBAAwB,CAAC,KAAK,CAC3B,CACF;oBACN,4DAAK,IAAI,EAAC,wBAAwB,EAAC,KAAK,EAAC,wBAAwB,IAC9D,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACvB,CACF;gBACL,IAAI,CAAC,sBAAsB,IAAI,CAC9B,WAAK,IAAI,EAAC,yCAAyC,EAAC,KAAK,EAAC,yCAAyC;oBACjG,cAAQ,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,2BAElI,CACL,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Build, Component, Host, getAssetPath, h, State, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { getDataInStore } from 'services/grw-db.service';\nimport state from 'store/store';\nimport Swiper, { Keyboard, Navigation, Pagination } from 'swiper';\nimport { OutdoorSite, TouristicContent, Trek } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-content-card',\n styleUrl: 'grw-touristic-content-card.scss',\n shadow: true,\n})\nexport class GrwTouristicContentCard {\n @Event() touristicContentCardPress: EventEmitter<number>;\n swiperTouristicContent?: Swiper;\n swiperTouristicContentRef?: HTMLDivElement;\n prevElTouristicContentRef?: HTMLDivElement;\n nextElTouristicContentRef?: HTMLDivElement;\n paginationElTouristicContentRef?: HTMLDivElement;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() touristicContent: TouristicContent;\n @Prop() isLargeView = false;\n @Prop() isInsideHorizontalList = false;\n @State() displayFullscreen = false;\n\n @Event() cardTouristicContentMouseOver: EventEmitter<number>;\n @Event() cardTouristicContentMouseLeave: EventEmitter;\n\n @State() offline = false;\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n if (this.swiperTouristicContent) {\n this.swiperTouristicContent.slideTo(0);\n }\n this.offline = true;\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.offline = false;\n }\n\n handleSwipers() {\n if (this.swiperTouristicContentRef && !this.swiperTouristicContent) {\n this.swiperTouristicContent = new Swiper(this.swiperTouristicContentRef, {\n modules: [Navigation, Pagination, Keyboard],\n navigation: {\n prevEl: this.prevElTouristicContentRef,\n nextEl: this.nextElTouristicContentRef,\n },\n pagination: { el: this.paginationElTouristicContentRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperTouristicContentRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen && !this.offline;\n if (this.displayFullscreen) {\n this.swiperTouristicContent.keyboard.enable();\n } else {\n this.swiperTouristicContent.keyboard.disable();\n }\n };\n }\n }\n\n componentDidUpdate() {\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleOffline();\n this.handleSwipers();\n }\n\n async handleOffline() {\n if (state.currentTrek) {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore && trekInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n } else if (state.currentOutdoorSite) {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', state.currentOutdoorSite.id);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n const touristicContentInStore: TouristicContent = await getDataInStore('touristicContents', this.touristicContent.id);\n this.offline = touristicContentInStore && touristicContentInStore.offline;\n }\n }\n }\n\n handleFullscreen() {\n if (this.touristicContent.attachments && this.touristicContent.attachments[0] && this.touristicContent.attachments[0].url) {\n this.swiperTouristicContentRef.requestFullscreen();\n }\n }\n\n @Listen('mouseover')\n handleMouseOver() {\n this.cardTouristicContentMouseOver.emit(this.touristicContent.id);\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.cardTouristicContentMouseLeave.emit();\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const touristicContentCategory = state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === this.touristicContent.category);\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n 'width': this.isLargeView ? '100%' : 'auto',\n }}\n >\n <div\n part=\"touristic-content-card\"\n class={\n this.isLargeView\n ? `touristic-content-card touristic-content-card-large-view-container${\n state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''\n }${!this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''}`\n : `touristic-content-card touristic-content-card-container${state.selectedTouristicContentId === this.touristicContent.id ? ' selected-touristic-content-card' : ''}${\n !this.isInsideHorizontalList ? ' is-inside-vertical-list' : ''\n }`\n }\n onClick={() => {\n if (!this.isInsideHorizontalList) {\n this.touristicContentCardPress.emit(this.touristicContent.id);\n }\n }}\n >\n <div part=\"touristic-content-img-container\" class=\"touristic-content-img-container\">\n {this.isInsideHorizontalList ? (\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.touristicContent.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img\n part=\"touristic-content-img\"\n class={`touristic-content-img${this.displayFullscreen ? ' img-fullscreen' : ''}`}\n src={this.displayFullscreen ? (this.offline ? attachment.thumbnail : attachment.url) : attachment.thumbnail}\n loading=\"lazy\"\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'default-touristic-content-img';\n event.target.src = defaultImageSrc;\n }}\n onClick={() => this.handleFullscreen()}\n alt={attachment.legend}\n />\n </div>\n ))\n ) : (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <img part=\"default-touristic-content-img\" src={defaultImageSrc} class=\"default-touristic-content-img\" alt=\"\" loading=\"lazy\" />\n </div>\n )}\n </div>\n <div\n style={{ display: this.offline ? 'none' : 'block' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline ? 'none' : 'flex' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElTouristicContentRef = el)}\n ></div>\n <div\n style={{ display: this.offline ? 'none' : 'flex' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElTouristicContentRef = el)}\n ></div>\n </div>\n ) : this.touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n <img\n part=\"touristic-content-img\"\n class=\"touristic-content-img\"\n src={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`}\n alt={`${this.touristicContent.attachments.filter(attachment => attachment.type === 'image')[0].legend}`}\n loading=\"lazy\"\n />\n ) : (\n <img class=\"image default-touristic-content-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div part=\"touristic-content-sub-container\" class=\"touristic-content-sub-container\">\n <div part=\"touristic-content-category-container\" class=\"touristic-content-category-container\">\n {touristicContentCategory && touristicContentCategory.pictogram && (\n <img part=\"touristic-content-category-img\" class=\"touristic-content-category-img\" src={touristicContentCategory.pictogram} alt=\"\" />\n )}\n <div part=\"touristic-content-category-name\" class=\"touristic-content-category-name\">\n {touristicContentCategory.label}\n </div>\n </div>\n <div part=\"touristic-content-name\" class=\"touristic-content-name\">\n {this.touristicContent.name}\n </div>\n </div>\n {this.isInsideHorizontalList && (\n <div part=\"touristic-content-more-detail-container\" class=\"touristic-content-more-detail-container\">\n <button part=\"more-details-button\" class=\"more-details-button\" onClick={() => this.touristicContentCardPress.emit(this.touristicContent.id)}>\n Plus de détails\n </button>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|