@geotrekce/geotrek-rando-widget 0.27.2 → 0.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/grw-common-button_23.cjs.entry.js +4 -4
- package/dist/cjs/grw-common-button_23.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-common-button_23.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-common-button_23.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-toggle-slot-visibility.cjs.entry.js +3 -4
- package/dist/cjs/grw-toggle-slot-visibility.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-toggle-slot-visibility.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-toggle-slot-visibility.cjs.entry.js.map +1 -1
- package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js +3 -4
- package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.br +0 -0
- package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.gz +0 -0
- package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.map +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +4 -4
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
- package/dist/esm/grw-common-button_23.entry.js +4 -4
- package/dist/esm/grw-common-button_23.entry.js.br +0 -0
- package/dist/esm/grw-common-button_23.entry.js.gz +0 -0
- package/dist/esm/grw-common-button_23.entry.js.map +1 -1
- package/dist/esm/grw-toggle-slot-visibility.entry.js +3 -4
- package/dist/esm/grw-toggle-slot-visibility.entry.js.br +0 -0
- package/dist/esm/grw-toggle-slot-visibility.entry.js.gz +0 -0
- package/dist/esm/grw-toggle-slot-visibility.entry.js.map +1 -1
- package/dist/esm-es5/grw-common-button_23.entry.js +2 -2
- package/dist/esm-es5/grw-common-button_23.entry.js.br +0 -0
- package/dist/esm-es5/grw-common-button_23.entry.js.gz +0 -0
- package/dist/esm-es5/grw-common-button_23.entry.js.map +1 -1
- package/dist/esm-es5/grw-toggle-slot-visibility.entry.js +1 -1
- package/dist/esm-es5/grw-toggle-slot-visibility.entry.js.br +0 -0
- package/dist/esm-es5/grw-toggle-slot-visibility.entry.js.gz +0 -0
- package/dist/esm-es5/grw-toggle-slot-visibility.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-49677f8e.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-49677f8e.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-49677f8e.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-49677f8e.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-5517eb99.system.js +1 -1
- package/dist/geotrek-rando-widget/p-5517eb99.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-5517eb99.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-641e709b.system.entry.js → p-88c476f7.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-88c476f7.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/{p-641e709b.system.entry.js.gz → p-88c476f7.system.entry.js.gz} +0 -0
- package/dist/geotrek-rando-widget/{p-641e709b.system.entry.js.map → p-88c476f7.system.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/p-cceddf58.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-cceddf58.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-cceddf58.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-cceddf58.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-201a8fe8.entry.js → p-f5f253b4.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-f5f253b4.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/{p-201a8fe8.entry.js.gz → p-f5f253b4.entry.js.gz} +0 -0
- package/dist/geotrek-rando-widget/{p-201a8fe8.entry.js.map → p-f5f253b4.entry.js.map} +1 -1
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-201a8fe8.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-25b77183.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-25b77183.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-25b77183.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-25b77183.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-521a05b1.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-521a05b1.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-521a05b1.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-521a05b1.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-641e709b.system.entry.js.br +0 -0
|
@@ -25,8 +25,7 @@ const GrwToggleSlotVisibility = class {
|
|
|
25
25
|
this.handleView();
|
|
26
26
|
}
|
|
27
27
|
handleView() {
|
|
28
|
-
if (
|
|
29
|
-
(typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize)) {
|
|
28
|
+
if (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize) {
|
|
30
29
|
this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;
|
|
31
30
|
this.showStartSlot = true;
|
|
32
31
|
this.showEndSlot = this.isLargeView;
|
|
@@ -100,7 +99,7 @@ const GrwToggleSlotVisibility = class {
|
|
|
100
99
|
return mapLabelButton;
|
|
101
100
|
}
|
|
102
101
|
render() {
|
|
103
|
-
return (index.h(index.Host, { key: '
|
|
102
|
+
return (index.h(index.Host, { key: '99af131c196db6759876be1787fd07333c0e037a' }, index.h("div", { key: '5b8156a9f8bc84864f91be603ef115c26c1d5884', class: "grw-toggle-slot-visibility-container" }, index.h("div", { key: '3440255510ac35395fa1d889576218ab1995b16f', class: "grw-slot-start-container", style: { height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' } }, index.h("slot", { key: 'e1b5533ed9b1eade3e72242b4fb2bbf3e1bdb77b', name: "start" }, " ")), index.h("div", { key: '3ac3901b37c1ff3ad143af6d88d8790f9da89585', id: "grw-slot-end-container", style: {
|
|
104
103
|
width: '100%',
|
|
105
104
|
height: this.slotEndHeight,
|
|
106
105
|
visibility: !this.isLargeView ? 'hidden' : 'visible',
|
|
@@ -108,7 +107,7 @@ const GrwToggleSlotVisibility = class {
|
|
|
108
107
|
top: !this.isLargeView ? '0px' : 'none',
|
|
109
108
|
left: !this.isLargeView ? '0px' : 'none',
|
|
110
109
|
zIndex: !this.isLargeView ? '0' : '1',
|
|
111
|
-
} }, index.h("slot", { key: '
|
|
110
|
+
} }, index.h("slot", { key: '0b9e2b1e5aec2390cd135f08943d05787c75fedf', name: "end" }, " ")))));
|
|
112
111
|
}
|
|
113
112
|
get toggleSlotElement() { return index.getElement(this); }
|
|
114
113
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"grw-toggle-slot-visibility.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,2UAA2U,CAAC;AAC/W,sCAAe,0BAA0B;;MCQ5B,uBAAuB;IALpC;;QAOW,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,IAAI,CAAC;QACrB,gBAAW,GAAG,KAAK,CAAC;QAErB,kBAAa,GAAG,IAAI,CAAC;QACrB,eAAU,GAAG,QAAQ,CAAC;QACtB,uBAAkB,GAAG,SAAS,CAAC;QAC/B,aAAQ,GAAG,SAA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AAS,CAACD,WAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,GAAGC,cAAS,CAACD,WAAK,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC;QAChH,OAAO,cAAc,CAAC;KACvB;IAED,MAAM;QACJ,QACEE,QAACC,UAAI,uDACF,CAACH,WAAK,CAAC,WAAW,IAAIA,WAAK,CAAC,kBAAkB,MAC7CE,kEAAK,KAAK,EAAC,sCAAsC,IAC/CA,kEACE,KAAK,EAAC,0BAA0B,EAChC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,GAAG,MAAM,GAAG,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,aAAa,GAAG,SAAS,GAAG,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,GAAG,EAAE,IAEvJA,mEAAM,IAAI,EAAC,OAAO,QAAS,CACvB,EAENA,kEACE,EAAE,EAAC,wBAAwB,EAC3B,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,UAAU,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS;gBACpD,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,UAAU,GAAG,UAAU;gBACrD,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,GAAG,MAAM;gBACvC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,GAAG,MAAM;gBACxC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,GAAG,GAAG;aACtC,IAEDA,mEAAM,IAAI,EAAC,KAAK,QAAS,CACrB,CACF,CACP,CACI,EACP;KACH;;;;;;;","names":["state","translate","h","Host"],"sources":["src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.scss?tag=grw-toggle-slot-visibility","src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.tsx"],"sourcesContent":["grw-toggle-slot-visibility {\n display: block;\n position: relative;\n width: 100%;\n overflow: hidden;\n max-width: 100dvw;\n}\n\n.grw-map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: fixed;\n bottom: 24px;\n z-index: 4001;\n pointer-events: none;\n}\n","import { Component, Host, h, State, Prop, Listen, Element } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-toggle-slot-visibility',\n styleUrl: 'grw-toggle-slot-visibility.scss',\n shadow: false,\n})\nexport class GrwToggleSlotVisibility {\n @Element() toggleSlotElement: HTMLElement;\n @State() isLargeView = undefined;\n @State() showStartSlot = true;\n @State() showEndSlot = false;\n\n @Prop() largeViewSize = 1024;\n @Prop() fontFamily = 'Roboto';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n @Prop() slotEndHeight = '100vh';\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n handleView() {\n if (\n (state.currentTrek || state.currentOutdoorSite) &&\n (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize)\n ) {\n this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showStartSlot = true;\n this.showEndSlot = this.isLargeView;\n if (!this.isLargeView) {\n const mapVisibilityButtonContainer = document.createElement('div');\n mapVisibilityButtonContainer.className = 'grw-map-visibility-button-container';\n const mapVisibilityButton = document.createElement('grw-extended-fab');\n mapVisibilityButton.setAttribute('exportparts', 'map-visibility-button,map-visibility-button-icon,map-visibility-button-label');\n mapVisibilityButton.setAttribute('font-family', this.fontFamily);\n mapVisibilityButton.action = () => this.toggleShowSlot();\n mapVisibilityButton.icon = () => this.getMapVisibilityIconButton();\n mapVisibilityButton.name = () => this.getMapVisibilityLabelButton();\n mapVisibilityButton.setAttribute('fab-background-color', this.fabBackgroundColor);\n mapVisibilityButton.setAttribute('fab-color', this.fabColor);\n\n mapVisibilityButton.setAttribute('display', this.isLargeView ? 'none' : 'flex');\n mapVisibilityButtonContainer.append(mapVisibilityButton);\n document.body.append(mapVisibilityButtonContainer);\n\n const slotEnd: any = document.querySelector('#grw-slot-end-container');\n\n const slotEndClone = slotEnd.cloneNode(true);\n slotEndClone.id = 'grw-slot-end-container-clone';\n slotEndClone.style.visibility = 'hidden';\n slotEndClone.style.position = 'fixed';\n slotEndClone.style.top = '0px';\n slotEndClone.style.left = '0px';\n slotEndClone.style['z-index'] = '0';\n slotEndClone.style.height = '100vh';\n slotEndClone.style['background-color'] = '#ffffff';\n document.body.append(slotEndClone);\n } else {\n const mapVisibilityButtonContainer = document.body.getElementsByClassName('grw-map-visibility-button-container')[0];\n if (mapVisibilityButtonContainer) {\n mapVisibilityButtonContainer.remove();\n }\n const slotEndClone = document.body.querySelector('#grw-slot-end-container-clone');\n if (slotEndClone) {\n slotEndClone.remove();\n }\n }\n }\n }\n\n toggleShowSlot() {\n this.showStartSlot = !this.showStartSlot;\n this.showEndSlot = !this.showStartSlot;\n const grwSlotEndContainerClone: any = document.querySelector('#grw-slot-end-container-clone');\n if (grwSlotEndContainerClone && this.showEndSlot) {\n grwSlotEndContainerClone.style.visibility = 'visible';\n document.body.style.overflow = `hidden`;\n grwSlotEndContainerClone.style['z-index'] = '4000';\n } else {\n grwSlotEndContainerClone.style.visibility = 'hidden';\n document.body.style.overflow = `visible`;\n grwSlotEndContainerClone.style['z-index'] = '0';\n }\n const grwExtendedFab: any = document.getElementsByTagName('grw-extended-fab')[0];\n grwExtendedFab.icon = () => this.getMapVisibilityIconButton();\n grwExtendedFab.name = () => this.getMapVisibilityLabelButton();\n }\n\n componentDidRender() {\n this.handleView();\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n mapIconButton = this.showStartSlot ? 'map' : 'summarize';\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n mapLabelButton = this.showStartSlot ? translate[state.language].showMap : translate[state.language].showDetails;\n return mapLabelButton;\n }\n\n render() {\n return (\n <Host>\n {(state.currentTrek || state.currentOutdoorSite) && (\n <div class=\"grw-toggle-slot-visibility-container\">\n <div\n class=\"grw-slot-start-container\"\n style={{ height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' }}\n >\n <slot name=\"start\"> </slot>\n </div>\n\n <div\n id=\"grw-slot-end-container\"\n style={{\n width: '100%',\n height: this.slotEndHeight,\n visibility: !this.isLargeView ? 'hidden' : 'visible',\n position: !this.isLargeView ? 'absolute' : 'relative',\n top: !this.isLargeView ? '0px' : 'none',\n left: !this.isLargeView ? '0px' : 'none',\n zIndex: !this.isLargeView ? '0' : '1',\n }}\n >\n <slot name=\"end\"> </slot>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"grw-toggle-slot-visibility.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,2UAA2U,CAAC;AAC/W,sCAAe,0BAA0B;;MCQ5B,uBAAuB;IALpC;;QAOW,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,IAAI,CAAC;QACrB,gBAAW,GAAG,KAAK,CAAC;QAErB,kBAAa,GAAG,IAAI,CAAC;QACrB,eAAU,GAAG,QAAQ,CAAC;QACtB,uBAAkB,GAAG,SAAS,CAAC;QAC/B,aAAQ,GAAG,SAAS,CAAC;QACrB,kBAAa,GAAG,OAAO,CAAC;KAoHjC;IAjHC,cAAc;QACZ,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB;IAED,UAAU;QACR,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,EAAE;YAC5I,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,iBA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,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,GAAG,EAAE,IAEvJA,mEAAM,IAAI,EAAC,OAAO,QAAS,CACvB,EAENA,kEACE,EAAE,EAAC,wBAAwB,EAC3B,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,UAAU,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS;gBACpD,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,UAAU,GAAG,UAAU;gBACrD,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,GAAG,MAAM;gBACvC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,GAAG,MAAM;gBACxC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,GAAG,GAAG;aACtC,IAEDA,mEAAM,IAAI,EAAC,KAAK,QAAS,CACrB,CACF,CACD,EACP;KACH;;;;;;;","names":["translate","state","h","Host"],"sources":["src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.scss?tag=grw-toggle-slot-visibility","src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.tsx"],"sourcesContent":["grw-toggle-slot-visibility {\n display: block;\n position: relative;\n width: 100%;\n overflow: hidden;\n max-width: 100dvw;\n}\n\n.grw-map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: fixed;\n bottom: 24px;\n z-index: 4001;\n pointer-events: none;\n}\n","import { Component, Host, h, State, Prop, Listen, Element } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-toggle-slot-visibility',\n styleUrl: 'grw-toggle-slot-visibility.scss',\n shadow: false,\n})\nexport class GrwToggleSlotVisibility {\n @Element() toggleSlotElement: HTMLElement;\n @State() isLargeView = undefined;\n @State() showStartSlot = true;\n @State() showEndSlot = false;\n\n @Prop() largeViewSize = 1024;\n @Prop() fontFamily = 'Roboto';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n @Prop() slotEndHeight = '100vh';\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n handleView() {\n if (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize) {\n this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showStartSlot = true;\n this.showEndSlot = this.isLargeView;\n if (!this.isLargeView) {\n const mapVisibilityButtonContainer = document.createElement('div');\n mapVisibilityButtonContainer.className = 'grw-map-visibility-button-container';\n const mapVisibilityButton = document.createElement('grw-extended-fab');\n mapVisibilityButton.setAttribute('exportparts', 'map-visibility-button,map-visibility-button-icon,map-visibility-button-label');\n mapVisibilityButton.setAttribute('font-family', this.fontFamily);\n mapVisibilityButton.action = () => this.toggleShowSlot();\n mapVisibilityButton.icon = () => this.getMapVisibilityIconButton();\n mapVisibilityButton.name = () => this.getMapVisibilityLabelButton();\n mapVisibilityButton.setAttribute('fab-background-color', this.fabBackgroundColor);\n mapVisibilityButton.setAttribute('fab-color', this.fabColor);\n\n mapVisibilityButton.setAttribute('display', this.isLargeView ? 'none' : 'flex');\n mapVisibilityButtonContainer.append(mapVisibilityButton);\n document.body.append(mapVisibilityButtonContainer);\n\n const slotEnd: any = document.querySelector('#grw-slot-end-container');\n\n const slotEndClone = slotEnd.cloneNode(true);\n slotEndClone.id = 'grw-slot-end-container-clone';\n slotEndClone.style.visibility = 'hidden';\n slotEndClone.style.position = 'fixed';\n slotEndClone.style.top = '0px';\n slotEndClone.style.left = '0px';\n slotEndClone.style['z-index'] = '0';\n slotEndClone.style.height = '100vh';\n slotEndClone.style['background-color'] = '#ffffff';\n document.body.append(slotEndClone);\n } else {\n const mapVisibilityButtonContainer = document.body.getElementsByClassName('grw-map-visibility-button-container')[0];\n if (mapVisibilityButtonContainer) {\n mapVisibilityButtonContainer.remove();\n }\n const slotEndClone = document.body.querySelector('#grw-slot-end-container-clone');\n if (slotEndClone) {\n slotEndClone.remove();\n }\n }\n }\n }\n\n toggleShowSlot() {\n this.showStartSlot = !this.showStartSlot;\n this.showEndSlot = !this.showStartSlot;\n const grwSlotEndContainerClone: any = document.querySelector('#grw-slot-end-container-clone');\n if (grwSlotEndContainerClone && this.showEndSlot) {\n grwSlotEndContainerClone.style.visibility = 'visible';\n document.body.style.overflow = `hidden`;\n grwSlotEndContainerClone.style['z-index'] = '4000';\n } else {\n grwSlotEndContainerClone.style.visibility = 'hidden';\n document.body.style.overflow = `visible`;\n grwSlotEndContainerClone.style['z-index'] = '0';\n }\n const grwExtendedFab: any = document.getElementsByTagName('grw-extended-fab')[0];\n grwExtendedFab.icon = () => this.getMapVisibilityIconButton();\n grwExtendedFab.name = () => this.getMapVisibilityLabelButton();\n }\n\n componentDidRender() {\n this.handleView();\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n mapIconButton = this.showStartSlot ? 'map' : 'summarize';\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n mapLabelButton = this.showStartSlot ? translate[state.language].showMap : translate[state.language].showDetails;\n return mapLabelButton;\n }\n\n render() {\n return (\n <Host>\n <div class=\"grw-toggle-slot-visibility-container\">\n <div\n class=\"grw-slot-start-container\"\n style={{ height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' }}\n >\n <slot name=\"start\"> </slot>\n </div>\n\n <div\n id=\"grw-slot-end-container\"\n style={{\n width: '100%',\n height: this.slotEndHeight,\n visibility: !this.isLargeView ? 'hidden' : 'visible',\n position: !this.isLargeView ? 'absolute' : 'relative',\n top: !this.isLargeView ? '0px' : 'none',\n left: !this.isLargeView ? '0px' : 'none',\n zIndex: !this.isLargeView ? '0' : '1',\n }}\n >\n <slot name=\"end\"> </slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -16,8 +16,7 @@ export class GrwToggleSlotVisibility {
|
|
|
16
16
|
this.handleView();
|
|
17
17
|
}
|
|
18
18
|
handleView() {
|
|
19
|
-
if (
|
|
20
|
-
(typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize)) {
|
|
19
|
+
if (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize) {
|
|
21
20
|
this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;
|
|
22
21
|
this.showStartSlot = true;
|
|
23
22
|
this.showEndSlot = this.isLargeView;
|
|
@@ -91,7 +90,7 @@ export class GrwToggleSlotVisibility {
|
|
|
91
90
|
return mapLabelButton;
|
|
92
91
|
}
|
|
93
92
|
render() {
|
|
94
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '99af131c196db6759876be1787fd07333c0e037a' }, h("div", { key: '5b8156a9f8bc84864f91be603ef115c26c1d5884', class: "grw-toggle-slot-visibility-container" }, h("div", { key: '3440255510ac35395fa1d889576218ab1995b16f', class: "grw-slot-start-container", style: { height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' } }, h("slot", { key: 'e1b5533ed9b1eade3e72242b4fb2bbf3e1bdb77b', name: "start" }, " ")), h("div", { key: '3ac3901b37c1ff3ad143af6d88d8790f9da89585', id: "grw-slot-end-container", style: {
|
|
95
94
|
width: '100%',
|
|
96
95
|
height: this.slotEndHeight,
|
|
97
96
|
visibility: !this.isLargeView ? 'hidden' : 'visible',
|
|
@@ -99,7 +98,7 @@ export class GrwToggleSlotVisibility {
|
|
|
99
98
|
top: !this.isLargeView ? '0px' : 'none',
|
|
100
99
|
left: !this.isLargeView ? '0px' : 'none',
|
|
101
100
|
zIndex: !this.isLargeView ? '0' : '1',
|
|
102
|
-
} }, h("slot", { key: '
|
|
101
|
+
} }, h("slot", { key: '0b9e2b1e5aec2390cd135f08943d05787c75fedf', name: "end" }, " ")))));
|
|
103
102
|
}
|
|
104
103
|
static get is() { return "grw-toggle-slot-visibility"; }
|
|
105
104
|
static get originalStyleUrls() {
|
package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.br
CHANGED
|
Binary file
|
package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.gz
CHANGED
|
Binary file
|
package/dist/collection/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grw-toggle-slot-visibility.js","sourceRoot":"","sources":["../../../src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,MAAM,aAAa,CAAC;AAOhC,MAAM,OAAO,uBAAuB;IALpC;QAOW,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,IAAI,CAAC;QACrB,gBAAW,GAAG,KAAK,CAAC;QAErB,kBAAa,GAAG,IAAI,CAAC;QACrB,eAAU,GAAG,QAAQ,CAAC;QACtB,uBAAkB,GAAG,SAAS,CAAC;QAC/B,aAAQ,GAAG,SAAS,CAAC;QACrB,kBAAa,GAAG,OAAO,CAAC;KAyHjC;IAtHC,cAAc;QACZ,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,UAAU;QACR,IACE,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,kBAAkB,CAAC;YAC/C,CAAC,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,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AC,KAAK,QAAS,CACrB,CACF,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, State, Prop, Listen, Element } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-toggle-slot-visibility',\n styleUrl: 'grw-toggle-slot-visibility.scss',\n shadow: false,\n})\nexport class GrwToggleSlotVisibility {\n @Element() toggleSlotElement: HTMLElement;\n @State() isLargeView = undefined;\n @State() showStartSlot = true;\n @State() showEndSlot = false;\n\n @Prop() largeViewSize = 1024;\n @Prop() fontFamily = 'Roboto';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n @Prop() slotEndHeight = '100vh';\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n handleView() {\n if (\n (state.currentTrek || state.currentOutdoorSite) &&\n (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize)\n ) {\n this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showStartSlot = true;\n this.showEndSlot = this.isLargeView;\n if (!this.isLargeView) {\n const mapVisibilityButtonContainer = document.createElement('div');\n mapVisibilityButtonContainer.className = 'grw-map-visibility-button-container';\n const mapVisibilityButton = document.createElement('grw-extended-fab');\n mapVisibilityButton.setAttribute('exportparts', 'map-visibility-button,map-visibility-button-icon,map-visibility-button-label');\n mapVisibilityButton.setAttribute('font-family', this.fontFamily);\n mapVisibilityButton.action = () => this.toggleShowSlot();\n mapVisibilityButton.icon = () => this.getMapVisibilityIconButton();\n mapVisibilityButton.name = () => this.getMapVisibilityLabelButton();\n mapVisibilityButton.setAttribute('fab-background-color', this.fabBackgroundColor);\n mapVisibilityButton.setAttribute('fab-color', this.fabColor);\n\n mapVisibilityButton.setAttribute('display', this.isLargeView ? 'none' : 'flex');\n mapVisibilityButtonContainer.append(mapVisibilityButton);\n document.body.append(mapVisibilityButtonContainer);\n\n const slotEnd: any = document.querySelector('#grw-slot-end-container');\n\n const slotEndClone = slotEnd.cloneNode(true);\n slotEndClone.id = 'grw-slot-end-container-clone';\n slotEndClone.style.visibility = 'hidden';\n slotEndClone.style.position = 'fixed';\n slotEndClone.style.top = '0px';\n slotEndClone.style.left = '0px';\n slotEndClone.style['z-index'] = '0';\n slotEndClone.style.height = '100vh';\n slotEndClone.style['background-color'] = '#ffffff';\n document.body.append(slotEndClone);\n } else {\n const mapVisibilityButtonContainer = document.body.getElementsByClassName('grw-map-visibility-button-container')[0];\n if (mapVisibilityButtonContainer) {\n mapVisibilityButtonContainer.remove();\n }\n const slotEndClone = document.body.querySelector('#grw-slot-end-container-clone');\n if (slotEndClone) {\n slotEndClone.remove();\n }\n }\n }\n }\n\n toggleShowSlot() {\n this.showStartSlot = !this.showStartSlot;\n this.showEndSlot = !this.showStartSlot;\n const grwSlotEndContainerClone: any = document.querySelector('#grw-slot-end-container-clone');\n if (grwSlotEndContainerClone && this.showEndSlot) {\n grwSlotEndContainerClone.style.visibility = 'visible';\n document.body.style.overflow = `hidden`;\n grwSlotEndContainerClone.style['z-index'] = '4000';\n } else {\n grwSlotEndContainerClone.style.visibility = 'hidden';\n document.body.style.overflow = `visible`;\n grwSlotEndContainerClone.style['z-index'] = '0';\n }\n const grwExtendedFab: any = document.getElementsByTagName('grw-extended-fab')[0];\n grwExtendedFab.icon = () => this.getMapVisibilityIconButton();\n grwExtendedFab.name = () => this.getMapVisibilityLabelButton();\n }\n\n componentDidRender() {\n this.handleView();\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n mapIconButton = this.showStartSlot ? 'map' : 'summarize';\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n mapLabelButton = this.showStartSlot ? translate[state.language].showMap : translate[state.language].showDetails;\n return mapLabelButton;\n }\n\n render() {\n return (\n <Host>\n {(state.currentTrek || state.currentOutdoorSite) && (\n <div class=\"grw-toggle-slot-visibility-container\">\n <div\n class=\"grw-slot-start-container\"\n style={{ height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' }}\n >\n <slot name=\"start\"> </slot>\n </div>\n\n <div\n id=\"grw-slot-end-container\"\n style={{\n width: '100%',\n height: this.slotEndHeight,\n visibility: !this.isLargeView ? 'hidden' : 'visible',\n position: !this.isLargeView ? 'absolute' : 'relative',\n top: !this.isLargeView ? '0px' : 'none',\n left: !this.isLargeView ? '0px' : 'none',\n zIndex: !this.isLargeView ? '0' : '1',\n }}\n >\n <slot name=\"end\"> </slot>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grw-toggle-slot-visibility.js","sourceRoot":"","sources":["../../../src/components/grw-toggle-slot-visibility/grw-toggle-slot-visibility.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,MAAM,aAAa,CAAC;AAOhC,MAAM,OAAO,uBAAuB;IALpC;QAOW,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,IAAI,CAAC;QACrB,gBAAW,GAAG,KAAK,CAAC;QAErB,kBAAa,GAAG,IAAI,CAAC;QACrB,eAAU,GAAG,QAAQ,CAAC;QACtB,uBAAkB,GAAG,SAAS,CAAC;QAC/B,aAAQ,GAAG,SAAS,CAAC;QACrB,kBAAa,GAAG,OAAO,CAAC;KAoHjC;IAjHC,cAAc;QACZ,IAAI,CAAC,UA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C,CAAC,CAAC,GAAG;qBACtC;oBAED,6DAAM,IAAI,EAAC,KAAK,QAAS,CACrB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, State, Prop, Listen, Element } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-toggle-slot-visibility',\n styleUrl: 'grw-toggle-slot-visibility.scss',\n shadow: false,\n})\nexport class GrwToggleSlotVisibility {\n @Element() toggleSlotElement: HTMLElement;\n @State() isLargeView = undefined;\n @State() showStartSlot = true;\n @State() showEndSlot = false;\n\n @Prop() largeViewSize = 1024;\n @Prop() fontFamily = 'Roboto';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n @Prop() slotEndHeight = '100vh';\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n handleView() {\n if (typeof this.isLargeView === undefined || this.isLargeView !== this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize) {\n this.isLargeView = this.toggleSlotElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showStartSlot = true;\n this.showEndSlot = this.isLargeView;\n if (!this.isLargeView) {\n const mapVisibilityButtonContainer = document.createElement('div');\n mapVisibilityButtonContainer.className = 'grw-map-visibility-button-container';\n const mapVisibilityButton = document.createElement('grw-extended-fab');\n mapVisibilityButton.setAttribute('exportparts', 'map-visibility-button,map-visibility-button-icon,map-visibility-button-label');\n mapVisibilityButton.setAttribute('font-family', this.fontFamily);\n mapVisibilityButton.action = () => this.toggleShowSlot();\n mapVisibilityButton.icon = () => this.getMapVisibilityIconButton();\n mapVisibilityButton.name = () => this.getMapVisibilityLabelButton();\n mapVisibilityButton.setAttribute('fab-background-color', this.fabBackgroundColor);\n mapVisibilityButton.setAttribute('fab-color', this.fabColor);\n\n mapVisibilityButton.setAttribute('display', this.isLargeView ? 'none' : 'flex');\n mapVisibilityButtonContainer.append(mapVisibilityButton);\n document.body.append(mapVisibilityButtonContainer);\n\n const slotEnd: any = document.querySelector('#grw-slot-end-container');\n\n const slotEndClone = slotEnd.cloneNode(true);\n slotEndClone.id = 'grw-slot-end-container-clone';\n slotEndClone.style.visibility = 'hidden';\n slotEndClone.style.position = 'fixed';\n slotEndClone.style.top = '0px';\n slotEndClone.style.left = '0px';\n slotEndClone.style['z-index'] = '0';\n slotEndClone.style.height = '100vh';\n slotEndClone.style['background-color'] = '#ffffff';\n document.body.append(slotEndClone);\n } else {\n const mapVisibilityButtonContainer = document.body.getElementsByClassName('grw-map-visibility-button-container')[0];\n if (mapVisibilityButtonContainer) {\n mapVisibilityButtonContainer.remove();\n }\n const slotEndClone = document.body.querySelector('#grw-slot-end-container-clone');\n if (slotEndClone) {\n slotEndClone.remove();\n }\n }\n }\n }\n\n toggleShowSlot() {\n this.showStartSlot = !this.showStartSlot;\n this.showEndSlot = !this.showStartSlot;\n const grwSlotEndContainerClone: any = document.querySelector('#grw-slot-end-container-clone');\n if (grwSlotEndContainerClone && this.showEndSlot) {\n grwSlotEndContainerClone.style.visibility = 'visible';\n document.body.style.overflow = `hidden`;\n grwSlotEndContainerClone.style['z-index'] = '4000';\n } else {\n grwSlotEndContainerClone.style.visibility = 'hidden';\n document.body.style.overflow = `visible`;\n grwSlotEndContainerClone.style['z-index'] = '0';\n }\n const grwExtendedFab: any = document.getElementsByTagName('grw-extended-fab')[0];\n grwExtendedFab.icon = () => this.getMapVisibilityIconButton();\n grwExtendedFab.name = () => this.getMapVisibilityLabelButton();\n }\n\n componentDidRender() {\n this.handleView();\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n mapIconButton = this.showStartSlot ? 'map' : 'summarize';\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n mapLabelButton = this.showStartSlot ? translate[state.language].showMap : translate[state.language].showDetails;\n return mapLabelButton;\n }\n\n render() {\n return (\n <Host>\n <div class=\"grw-toggle-slot-visibility-container\">\n <div\n class=\"grw-slot-start-container\"\n style={{ height: this.showStartSlot ? '100%' : '100vh', visibility: this.showStartSlot ? 'visible' : 'hidden', zIndex: this.showStartSlot ? '1' : '0' }}\n >\n <slot name=\"start\"> </slot>\n </div>\n\n <div\n id=\"grw-slot-end-container\"\n style={{\n width: '100%',\n height: this.slotEndHeight,\n visibility: !this.isLargeView ? 'hidden' : 'visible',\n position: !this.isLargeView ? 'absolute' : 'relative',\n top: !this.isLargeView ? '0px' : 'none',\n left: !this.isLargeView ? '0px' : 'none',\n zIndex: !this.isLargeView ? '0' : '1',\n }}\n >\n <slot name=\"end\"> </slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -813,10 +813,10 @@ export class GrwTrekDetail {
|
|
|
813
813
|
})), this.currentTrek.ratings.map(trekRating => (h("div", { part: "row", class: "row" }, `${state.ratingsScale.find(ratingScale => ratingScale.id === state.ratings.find(rating => rating.id === trekRating).scale).name} : ${state.ratings.find(rating => rating.id === trekRating).name}`))), this.currentTrek.ratings_description && this.currentTrek.ratings_description !== '' && (h("div", { key: 'e20c4d9f3e26b5990bc617dc932bd3dad29427f5', part: "row", class: "row", innerHTML: this.currentTrek.ratings_description })))), h("div", { key: '24094426e5c091e1a584a880ac9a5ff6eedb181a', part: "divider", class: "divider" }), h("div", { key: '6bdebdaf8de29994440dc5f852550377e32675a9', part: "downloads-container", class: "downloads-container" }, h("div", { key: 'cd5ee6cfc7f4e0475bd2ad6b39c538e4472ef9eb', part: "download-title", class: "download-title" }, translate[state.language].downloads), this.enableOffline && !this.offline && (!this.currentTrek.parents || this.currentTrek.parents.length === 0) && (h("button", { key: '3039f7157cc90dde8b87bda9a14eedc7f3274890', part: "offline-button", class: "offline-button", onClick: () => this.displayDownloadModal() }, h("span", { key: '0c790f0bc5deed518c57b3159bd8b74120699219', part: "icon", class: "icon", innerHTML: DownloadForOfflineIcon }), h("span", { key: 'cb5c79c473f1f4ed019ed5ab3d5d98dc819db4de', part: "label", class: "label" }, translate[state.language].offline.downloadOffline))), this.enableOffline && this.offline && (!this.currentTrek.parents || this.currentTrek.parents.length === 0) && (h("button", { key: '1a9f7eae01e5b0ee05510fc5b1b7b046e28bb764', part: "offline-button", class: "offline-button", onClick: () => this.displayDeleteModal() }, h("span", { key: '4534596147e85d76e8c181d687122fb34d744fe2', part: "icon", class: "icon", innerHTML: DeleteIcon }), h("span", { key: '43daaab3b77d890ae67ee46d4151cff83bb9e8be', part: "label", class: "label" }, translate[state.language].offline.deleteOffline))), h("div", { key: '0fcbc7301d436a00366ff7a537404a96b70f79a3', part: "links-container", class: "links-container" }, h("a", { key: '3ddcf5352a270fe13b75e119f142b5f77309b3fd', part: "download-gpx-button", href: `${this.currentTrek.gpx}`, target: "_blank", rel: "noopener noreferrer" }, h("span", { key: '181cc11e51f2591e2908f0f14e4195224f40c699', part: "icon", class: " icon", innerHTML: DownloadIcon }), h("span", { key: '4745a6de0c0282198ae1c0cc36dddc4bcf427cd8', part: "label", class: "label" }, "GPX")), h("a", { key: '6560bdff845f321546f7251687ffe49ab17c3584', part: "download-kml-button", href: `${this.currentTrek.kml}`, target: "_blank", rel: "noopener noreferrer" }, h("span", { key: 'ed3f1bd14f868a8ef3c89d920afa353b565d0cb3', part: "icon", class: "icon", innerHTML: DownloadIcon }), h("span", { key: 'f15f218d4df2bf0d40b2a9cd2abecd25fd76d98a', part: "label", class: "label" }, "KML")), h("a", { key: 'f1b016c291b391e44c20cd25110290c6dd9febc9', part: "download-pdf-button", href: `${this.currentTrek.pdf}${state.portalsFromProviders && state.portalsFromProviders.length === 1 ? '?portal=' + state.portalsFromProviders[0] : ''}`, target: "_blank", rel: "noopener noreferrer" }, h("span", { key: '8dea6a2c04516fd9bd735e8b5353dbc58490dfe8', part: "icon", class: "icon", innerHTML: DownloadIcon }), h("span", { key: '0bccbf3a808f544053d7e4109a5a0f4589b40b63', part: "label", class: "label" }, "PDF")))), h("div", { key: '8b8cb270cc4524cb9fc635a3c0e757ec0e94871a', part: "divider", class: "divider" }), this.currentTrek.description_teaser && h("div", { key: '03900333c632387ec4b97782aa152cd189ff3121', part: "description-teaser", class: "description-teaser", innerHTML: this.currentTrek.description_teaser }), this.currentTrek.ambiance && h("div", { key: '2f43184759e23f17b1d2fbaf53dc935775fb08be', part: "ambiance", class: "ambiance", innerHTML: this.currentTrek.ambiance }), state.parentTrekId && state.parentTrek && this.currentTrek.id !== state.parentTrekId && (h("div", { key: '67bd5f6684de5f4792577c9bc73092d79d4284c7' }, h("div", { key: '8afe65fd4f9cad01db83f36278e49593e2e9d210', part: "divider", class: "divider" }), h("div", { key: 'b42493f652b24b1ab2b396e705b70b49612f51f6', part: "parent-trek-container", class: "parent-trek-container" }, h("button", { key: '63a008325af19c8ec32b4e1fec21014b0ae42edf', part: "parent-trek-title", class: "parent-trek-title", onClick: () => this.parentTrekPress.emit(state.parentTrekId) }, h("div", { key: '5286c492a1487b82ea7fd54f1844f346769305f1' }, "<"), state.parentTrek.name)))), state.currentTrekSteps && (h("div", { key: 'de7343e58c280e66758135679a64dd02eeb0c723', part: "step-container", class: "step-container" }, h("div", { key: '184c45cc5cc7e402c6ab3e250af201ecc949f6b5', part: "step-title", class: "step-title", ref: el => (this.stepsRef = el) }, `${state.currentTrekSteps.length} ${translate[state.language].steps}`), h("div", { key: '6488057e00af9dada7e5cb598af2f19b3aa3914c', part: "swiper-step", class: "swiper swiper-step", ref: el => (this.swiperStepRef = el) }, h("div", { key: '5a9a880d4818206ce325888429e4aee67fed30b7', part: "swiper-wrapper", class: "swiper-wrapper" }, state.currentTrekSteps &&
|
|
814
814
|
state.currentTrekSteps.map(trek => {
|
|
815
815
|
return (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-trek-card", { exportparts: "trek-card,trek-img-container,trek-img,trek-sub-container,trek-departure,trek-name,trek-themes-container,trek-theme,trek-icons-labels-container,trek-icon-label,trek-icon,trek-label", key: `trek-${trek.id}`, trek: trek, "is-large-view": false, "is-step": true, fontFamily: this.fontFamily, "color-primary-app": this.colorPrimaryApp, "color-on-surface": this.colorOnSurface, "color-secondary-container": this.colorSecondaryContainer, "color-on-secondary-container": this.colorOnSecondaryContainer, "color-surface-container-low": this.colorSurfaceContainerLow, "grw-app": this.grwApp })));
|
|
816
|
-
})), h("div", { key: '11480922162c42dcd7f6ba8b2154ae5ef1187d83', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.stepSwiperScrollbar = el) })))), h("div", { key: 'eb3c94be63f7f7624d9ecf40500a691601b50bcd', part: "divider", class: "divider" }), this.currentTrek.description && (h("div", { key: '57256238db0af71a64faa87da70e71a3de0c585d', part: "description-container", class: "description-container" }, h("div", { key: 'ca0e8abb90a62e644c575c3685eaf9418173ce60', part: "description-title", class: "description-title", ref: el => (this.descriptionRef = el) }, translate[state.language].description), h("div", { key: '4825d7e2c0d290bd4b7062d2df4ffb7b1197fd6d', part: "description", class: "description", innerHTML: this.currentTrek.description }))), this.currentTrek.departure && (h("div", { key: '560400e4bf5010ff87e369ade4f58b51897e36a1', part: "departure-container", class: "departure-container" }, h("div", { key: '6885d32d83701cfd14837c709fc2f14a77111960', part: "departure-title", class: "departure-title" }, translate[state.language].departure, " :\u00A0"), h("div", { key: '7d4eb11f7aa03d7a8b754f4e9f8ffec039f55ed4', part: "departure", innerHTML: this.currentTrek.departure }))), this.currentTrek.arrival && (h("div", { key: '66800137ed48684b3683be8f351092e23110c418', part: "arrival-container", class: "arrival-container" }, h("div", { key: '7fa1ee06539764942f352f65546669d94175b42c', part: "arrival-title", class: "arrival-title" }, translate[state.language].arrival, " :\u00A0"), h("div", { key: 'c856fb25a098a9717d30aa1452600cdcdb82ecef', part: "arrival", innerHTML: this.currentTrek.arrival }))), this.currentTrek.cities && this.currentTrek.cities.length > 0 && (h("div", { key: 'a9ccdffa4d7b6a38c553206a72dbafa3006b41eb', part: "cities-container", class: "cities-container" }, h("div", { key: '1f4af2ed8180d434421e6d1ab11a62c67e3c3b71', part: "cities-title", class: "cities-title" }, translate[state.language].crossedCities, " :\u00A0"), h("div", { key: '4d117093226994ad282ab497364b537f10e79295', part: "cities", innerHTML: this.cities.join(', ') }))), state.currentPois && state.currentPois.length > 0 && (h("div", { key: '
|
|
817
|
-
state.currentInformationDesks.filter(currentInformationDesks => this.currentTrek.information_desks.includes(currentInformationDesks.id)).length > 0 && (h("div", { key: '
|
|
816
|
+
})), h("div", { key: '11480922162c42dcd7f6ba8b2154ae5ef1187d83', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.stepSwiperScrollbar = el) })))), h("div", { key: 'eb3c94be63f7f7624d9ecf40500a691601b50bcd', part: "divider", class: "divider" }), this.currentTrek.description && (h("div", { key: '57256238db0af71a64faa87da70e71a3de0c585d', part: "description-container", class: "description-container" }, h("div", { key: 'ca0e8abb90a62e644c575c3685eaf9418173ce60', part: "description-title", class: "description-title", ref: el => (this.descriptionRef = el) }, translate[state.language].description), h("div", { key: '4825d7e2c0d290bd4b7062d2df4ffb7b1197fd6d', part: "description", class: "description", innerHTML: this.currentTrek.description }))), this.currentTrek.departure && (h("div", { key: '560400e4bf5010ff87e369ade4f58b51897e36a1', part: "departure-container", class: "departure-container" }, h("div", { key: '6885d32d83701cfd14837c709fc2f14a77111960', part: "departure-title", class: "departure-title" }, translate[state.language].departure, " :\u00A0"), h("div", { key: '7d4eb11f7aa03d7a8b754f4e9f8ffec039f55ed4', part: "departure", innerHTML: this.currentTrek.departure }))), this.currentTrek.arrival && (h("div", { key: '66800137ed48684b3683be8f351092e23110c418', part: "arrival-container", class: "arrival-container" }, h("div", { key: '7fa1ee06539764942f352f65546669d94175b42c', part: "arrival-title", class: "arrival-title" }, translate[state.language].arrival, " :\u00A0"), h("div", { key: 'c856fb25a098a9717d30aa1452600cdcdb82ecef', part: "arrival", innerHTML: this.currentTrek.arrival }))), this.currentTrek.cities && this.currentTrek.cities.length > 0 && (h("div", { key: 'a9ccdffa4d7b6a38c553206a72dbafa3006b41eb', part: "cities-container", class: "cities-container" }, h("div", { key: '1f4af2ed8180d434421e6d1ab11a62c67e3c3b71', part: "cities-title", class: "cities-title" }, translate[state.language].crossedCities, " :\u00A0"), h("div", { key: '4d117093226994ad282ab497364b537f10e79295', part: "cities", innerHTML: this.cities.join(', ') }))), state.currentPois && state.currentPois.length > 0 && (h("div", { key: 'faafab7570f3d0781db18f434840a7ce749e80e2', part: "divider-and-pois-container", class: "divider-and-pois-container" }, h("div", { key: '788b32f00b27ad86a7ef4af19b9e3cd8c46fb90f', part: "divider", class: "divider" }), h("div", { key: 'e86eb39fa2d1313e70052502f28744ccb8746c29', part: "pois-container", class: "pois-container" }, h("div", { key: 'e0bd0f7056c64a65e22e05e1ae4de90d1a2446ad', part: "pois-title", class: "pois-title", ref: el => (this.poiRef = el) }, translate[state.language].pois(state.currentPois.length)), h("div", { key: '01f38a00db04329feb73f0e070ede2497f3e2379', part: "swiper-pois", class: "swiper swiper-pois", ref: el => (this.swiperPoisRef = el) }, h("div", { key: '1300436ba5b52624cfeca0df288afd65b3acb5d3', part: "swiper-wrapper", class: "swiper-wrapper" }, state.currentPois.map(poi => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-poi", { exportparts: "poi-type-img-container,poi-type,swiper-poi,swiper-wrapper,swiper-slide,poi-img,default-poi-img,swiper-pagination,swiper-button-prev,swiper-button-next,poi-sub-container,poi-name,poi-description,handle-poi-description", poi: poi, colorSurfaceContainerLow: this.colorSurfaceContainerLow }))))), h("div", { key: '181d5ec068bd073879217f4fe3ce58a08216b281', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.poisSwiperScrollbar = el) }))))), this.weather && this.currentTrek.departure_city && !this.offline && (h("div", { key: 'becd77c8cfced4e9671b55dd80a4457514a8627a', part: "divider-and-weather-container", class: "divider-and-weather-container" }, h("div", { key: '822522a59b96a6e10595991b9eac6ccb0fb87290', part: "divider", class: "divider" }), h("div", { key: '22bc81563f6619b71593f228626359c677ec1c0d', part: "weather-container", class: "weather-container" }, h("iframe", { key: 'ba3527b33c9cee403fd9f80bc9b0fc8d479bcbd9', height: "150", frameborder: "0", src: `https://meteofrance.com/widget/prevision/${this.currentTrek.departure_city}0#${this.colorPrimaryApp}` })))), this.currentTrek.access && (h("div", { key: 'c62929cbb0841643aa76ca92912a910bf0d5adf3', part: "divider-and-access-container", class: "divider-and-access-container" }, h("div", { key: '87ba02d4b4edc0af56614bf422ec62b1ea2550bd', part: "divider", class: "divider" }), h("div", { key: '332e03e36479c82f66bfd7332db9d8c6cd63d231', part: "access-container", class: "access-container" }, h("div", { key: '09a35909b151a2a39173bb8cb83f138c83fc8de1', part: "access-title", class: "access-title" }, translate[state.language].roadAccessAndParking), h("div", { key: '9f0d2ebd7534f7de4a46b7b732dadfcfbe49641d', part: "access", class: "access", innerHTML: this.currentTrek.access }), this.currentTrek.advised_parking && (h("div", { key: 'eae618e26d4cf905b0bd7e8407de98057eb7d6ad' }, h("div", { key: 'f7074e5c020dcabdaa033bdbde7a7140d6a43c0c', part: "advised-parking-title", class: "advised-parking-title", ref: el => (this.parkingRef = el) }, translate[state.language].recommendedParking), h("div", { key: '7a75a4c84c6bd905d1a0c25a572b7669de1b80cd', part: "advised-parking", class: "advised-parking", innerHTML: this.currentTrek.advised_parking })))))), this.currentTrek.public_transport && (h("div", { key: '26872b11c69cd07219fb766d42b61d72901bdb1e', part: "divider-and-public-transport-container", class: "divider-and-public-transport-container" }, h("div", { key: '87a83b2d20f3d33aeb3d49efbd687f305aa77bd7', part: "divider", class: "divider" }), h("div", { key: 'b0458c8ae0e3aa408a5c954450975abcc1b2587c', part: "public-transport-container", class: "public-transport-container" }, h("div", { key: '71c7488e14c3b356cb70a54c475b795b667961ff', part: "public-transport-title", class: "public-transport-title" }, translate[state.language].transport), h("div", { key: '637f7b7a969eba38c7deb157e10651bdaafeb0e1', part: "public-transport", class: "public-transport", innerHTML: this.currentTrek.public_transport })))), (this.currentTrek.advice || this.currentTrek.gear || this.labels.length > 0) && (h("div", { key: 'c307925cc0f38fbd53821d72af28fc8bbe93b94d', part: "divider-and-advice-container", class: "divider-and-advice-container" }, h("div", { key: '8cce6454bd00657bc20c1d9d87d2734c205478e0', part: "divider", class: "divider" }), h("div", { key: '6b8da36f9fd6681e4071d93eaee1939eb8f39b75', part: "advice-container", class: "advice-container" }, h("div", { key: '3e109f274a9476f28a99f2bf906f764600292bd8', part: "advice-title", class: "advice-title", ref: el => (this.recommendationRef = el) }, translate[state.language].recommendations), this.currentTrek.advice && (h("div", { key: 'a2b4e2c42acda704a9baa45dc2d0912c3558fe46', part: "current-advice-container", class: "current-advice-container" }, h("span", { key: 'ec5511deec0a21c70c9fc0e8182c4024ab106acd', part: "icon", class: "icon", innerHTML: WarningIcon }), h("div", { key: 'b140ec804e09c60269fb481b5447b2ab130c7b17', part: "advice", class: "advice", innerHTML: this.currentTrek.advice }))), this.currentTrek.gear && (h("div", { key: '4f03098e7fff6e53c050a062bad6a2d84b310a58', part: "gear-container", class: "gear-container" }, h("span", { key: 'f6627f9731a6bfe02adf2f599b9a1c1d8a243710', part: "icon", class: "icon", innerHTML: BackpackIcon }), h("div", { key: '32f67cc01d6c3925e18950e6e8f2599e97bf31b0', part: "gear", class: "gear", innerHTML: this.currentTrek.gear }))), this.labels.map(label => (h("div", { part: "label-container", class: "label-container" }, h("div", { part: "label-sub-container", class: "label-sub-container" }, label.pictogram && h("img", { src: label.pictogram, alt: "" }), h("div", { part: "label-name", class: "label-name", innerHTML: label.name })), h("div", { part: "label-advice", class: "label-advice", innerHTML: label.advice }))))))), state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0 && (h("div", { key: 'f20e0e2ded0f88f13c0997adf443ab00b8266dfb', part: "divider-and-sensitive-areas-container", class: "divider-and-sensitive-areas-container" }, h("div", { key: 'f5c83619b9fa5153e9e4aa87f5b8235bdc861c71', part: "divider", class: "divider" }), h("div", { key: '0a798aff960e4fc28d6e5b046b12e6cd9bd04981', part: "sensitive-areas-container", class: "sensitive-areas-container" }, h("div", { key: '5062d956ac3903dba2402f9429fe3de1d88f5781', part: "ensitive-areas-title", class: "sensitive-areas-title", ref: el => (this.sensitiveAreaRef = el) }, translate[state.language].environmentalSensitiveAreas), h("div", { key: 'fc2d28bbc0cf0c8cf1080e50363222eb96e0b035', part: "sensitive-areas-description", class: "sensitive-areas-description" }, translate[state.language].sensitiveAreasDescription), state.currentSensitiveAreas.map(sensitiveArea => (h("grw-sensitive-area-detail", { exportparts: "sensitive-area-title-container,sensitive-area-color-container,sensitive-area-title,sensitive-area-description,sensitive-area-practice-container,sensitive-area-practice-title,sensitive-area-practices,sensitive-area-practice,sensitive-area-period-container,sensitive-area-period-title,sensitive-area-periods,sensitive-area-period,sensitive-area-contact-container,sensitive-area-contact-title,sensitive-area-contact-value", sensitiveArea: sensitiveArea })))))), state.currentInformationDesks &&
|
|
817
|
+
state.currentInformationDesks.filter(currentInformationDesks => this.currentTrek.information_desks.includes(currentInformationDesks.id)).length > 0 && (h("div", { key: '58a9711a50dff3cc03b63c96109c06434cb6ca98', part: "divider-and-information-desks-container", class: "divider-and-information-desks-container" }, h("div", { key: '448cc593d768edcdffc04c598b6217130c30218c', part: "divider", class: "divider" }), h("div", { key: 'fcd0c21269805f2698b904f5db38e301ec42c162', part: "information-desks-container", class: "information-desks-container" }, h("div", { key: 'e92de70975c369d52fc5b881e1428899558d4754', part: "information-desks-title", class: "information-desks-title", ref: el => (this.informationPlacesRef = el) }, translate[state.language].informationPlaces), h("div", { key: 'c90359771ec01d9be37d470f3d0a1a67a52854b7', part: "swiper-information-desks", class: "swiper swiper-information-desks", ref: el => (this.swiperInformationDesksRef = el) }, h("div", { key: '91bba5d9dd3be95639832d9d7044a53739e32d19', part: "swiper-wrapper", class: "swiper-wrapper" }, state.currentInformationDesks
|
|
818
818
|
.filter(currentInformationDesks => this.currentTrek.information_desks.includes(currentInformationDesks.id))
|
|
819
|
-
.map(informationDesk => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-information-desk", { exportparts: "information-desk-img-container,information-desk-img,information-desk-sub-container,information-desk-name,center-on-map-button,icon,label,information-desk-informations,phone-container,mail-container,link-container,information-desk-description-container,information-desk-description,handle-information-desk-description", informationDesk: informationDesk, colorSurfaceContainerLow: this.colorSurfaceContainerLow }))))), h("div", { key: '
|
|
819
|
+
.map(informationDesk => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-information-desk", { exportparts: "information-desk-img-container,information-desk-img,information-desk-sub-container,information-desk-name,center-on-map-button,icon,label,information-desk-informations,phone-container,mail-container,link-container,information-desk-description-container,information-desk-description,handle-information-desk-description", informationDesk: informationDesk, colorSurfaceContainerLow: this.colorSurfaceContainerLow }))))), h("div", { key: '0ffb0fbf624f81413040e0d225896bfbb385b906', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.informationDesksContentsSwiperScrollbar = el) }))))), (this.currentTrek.disabled_infrastructure ||
|
|
820
820
|
(this.accessibilities && this.accessibilities.length > 0) ||
|
|
821
821
|
this.currentTrek.accessibility_level ||
|
|
822
822
|
this.currentTrek.accessibility_slope ||
|
|
@@ -825,7 +825,7 @@ export class GrwTrekDetail {
|
|
|
825
825
|
this.currentTrek.accessibility_covering ||
|
|
826
826
|
this.currentTrek.accessibility_exposure ||
|
|
827
827
|
this.currentTrek.accessibility_advice ||
|
|
828
|
-
this.emergencyNumber) && (h("div", { key: 'd8628a8598d9d424a412c32f2f230600f94b1795' }, h("div", { key: 'f897604e0a3aa22c8a3b50fe2844f58494895557', part: "divider", class: "divider" }), h("div", { key: 'cba7432b967f73ad8a0493c8bc2db95aaf4c7017', part: "accessibilities-container", class: "accessibilities-container" }, h("div", { key: '7c553ba444ca47d6503ff3b36f65e583bfd199a1', part: "accessibilities-title", class: "accessibilities-title", ref: el => (this.accessibilityRef = el) }, translate[state.language].accessibility), this.currentTrek.disabled_infrastructure && h("div", { key: 'd5df1e2971db5b2a2d6ddb5eb39607992a9afaf6', part: "disabled-infrastructure", innerHTML: this.currentTrek.disabled_infrastructure }), this.accessibilities && this.accessibilities.length > 0 && (h("div", { key: '74819355bc3d7998d8a959e5b998e9f08692f41e', part: "accessibilities-content-container", class: "accessibilities-content-container" }, this.accessibilities.map(accessibility => (h("div", { part: "accessibility-content-container", class: "accessibility-content-container" }, h("img", { src: accessibility.pictogram, alt: "" }), h("div", { part: "accessibility-name", innerHTML: accessibility.name })))))), this.emergencyNumber && (h("div", { key: 'e75c55e7138ea3c7d25d6c6141618203d8334109', part: "accessibility-emergency-number-container", class: "accessibility-emergency-number-container" }, h("div", { key: '418758b7b0a51b6a9feac99a1ccfa7fd257dc030', part: "accessibility-emergency-number-title", class: "accessibility-emergency-number-title" }, translate[state.language].emergencyNumber), h("div", { key: '75a3f0e3c2676bf9c18db78aec3f16b355c19f7b', part: "accessibility-emergency-number-content", class: "accessibility-emergency-number-content" }, h("a", { key: '1d4db54aa44754a8e56eaa28e1beaf67ec79a175', href: `tel:${this.emergencyNumber.toString()}` }, h("span", { key: '022bac8cfc6cfec5a6b9444fa3ff52b434158087', part: "icon", class: "icon", innerHTML: CallIcon }), h("span", { key: '943a5d286788ba20f5f7817f1b4304a3165c8a26', part: "emergency-number", class: "emergency-number" }, this.emergencyNumber.toString()))))), this.currentTrek.accessibility_level && (h("div", { key: '29de6dddeb76dfc3b50a98685e29d9ad09ff7be8', part: "accessibility-level-container", class: "accessibility-level-container" }, h("div", { key: '976130236a8361cfa5bcd8c0e8bc2c4fab794d25', part: "accessibility-level-title", class: "accessibility-level-title" }, translate[state.language].accessibilityLevel), h("div", { key: '70759f27d6e8617291a98afed9fcda9aebcf7028', part: "accessibility-level-name", innerHTML: this.accessibilityLevel.name }))), this.currentTrek.accessibility_slope && (h("div", { key: 'c996c359f461f6224b75757946e9c23f9b2280a5', part: "accessibility-slope-container", class: "accessibility-slope-container" }, h("div", { key: 'babce6ace86ec78cc23740d2db0898edcbcf45bb', part: "accessibility-slope-title", class: "accessibility-slope-title" }, translate[state.language].accessibilitySlope), h("div", { key: '311a8505e4e3630dcc383eb43323f862475ebd25', part: "accessibility-slope", innerHTML: this.currentTrek.accessibility_slope }))), this.currentTrek.accessibility_width && (h("div", { key: '1aabd859b714e7cb7655861495748026681ad6a5', part: "accessibility-width-container", class: "accessibility-width-container" }, h("div", { key: '9f016368ce02a21a3d1f5b129ca3c097d77fcd11', part: "accessibility-width-title", class: "accessibility-width-title" }, translate[state.language].accessibilityWidth), h("div", { key: '969d1c02474e91c6b8984bed4ea367340d14bdf5', part: "accessibility-width", innerHTML: this.currentTrek.accessibility_width }))), this.currentTrek.accessibility_signage && (h("div", { key: '070827d789bf167f7c4e2abd17f9b71a20fe49a1', part: "accessibility-signage-container", class: "accessibility-signage-container" }, h("div", { key: '7a46cc13d5ffe97a8723acfad74c682a2c4348b8', part: "accessibility-signage-title", class: "accessibility-signage-title" }, translate[state.language].accessibilitySignage), h("div", { key: 'b5e133c4f9b2e55f73497271e5ec3354331cc8a6', part: "accessibility-signage", innerHTML: this.currentTrek.accessibility_signage }))), this.currentTrek.accessibility_covering && (h("div", { key: '18b94c150e638cb054c49acaa48ad1b343bfed7c', part: "accessibility-covering-container", class: "accessibility-covering-container" }, h("div", { key: '4d7fb47e3b2160527455988c97d775a1019aff93', part: "accessibility-covering-title", class: "accessibility-covering-title" }, translate[state.language].accessibilityCovering), h("div", { key: 'cf3164aa3f83ddc351288e40727e95ce50fbf579', part: "accessibility-covering", innerHTML: this.currentTrek.accessibility_covering }))), this.currentTrek.accessibility_exposure && (h("div", { key: '949fec54d542262a7d7961e77fceab7e1d2f7152', part: "accessibility-exposure-container", class: "accessibility-exposure-container" }, h("div", { key: '0aea1bdfc38a33c70f0f0f4206a7fa3407e9c361', part: "accessibility-exposure-title", class: "accessibility-exposure-title" }, translate[state.language].accessibilityExposure), h("div", { key: 'a15ee3a41242b7f16e03ab6231bb59a90ae1dc8b', part: "accessibility-exposure", innerHTML: this.currentTrek.accessibility_exposure }))), this.currentTrek.accessibility_advice && (h("div", { key: '98eae0c17a7fc55500324461aabcc835b8e37e9d', part: "accessibility-advice-container", class: "accessibility-advice-container" }, h("div", { key: '1e001059de4bcbc9ba0a898692ea4c90636fb9e4', part: "accessibility-advice-title", class: "accessibility-advice-title" }, translate[state.language].accessibilityAdvices), h("div", { key: '000f065f45be8a7a47d0edb1a64288c7d1c3298e', part: "accessibility-advice", innerHTML: this.currentTrek.accessibility_advice })))))), state.trekTouristicContents && state.trekTouristicContents.length > 0 && (h("div", { key: 'ef6742ef0b89a8639047532484c8fc69544f8bef' }, h("div", { key: '178234118359bfe8a05640edf7857bd66630a8a9', part: "divider", class: "divider" }), h("div", { key: 'db21d1880aaa5d0e11862602cc8b02f376ff625e', part: "touristic-content-container", class: "touristic-content-container" }, h("div", { key: 'c6e837bceb8d40664fcb0eefb7180c97358e695f', part: "touristic-content-title", class: "touristic-content-title", ref: el => (this.touristicContentsRef = el) }, translate[state.language].touristicContents(state.trekTouristicContents.length)), h("div", { key: '1644f3076085379d5f9407f43ce7059a8501c891', part: "swiper-touristic-content", class: "swiper swiper-touristic-content", ref: el => (this.swiperTouristicContentsRef = el) }, h("div", { key: '22e04a3464b28b6f0e4c321150c79a64a949d3a7', part: "swiper-wrapper", class: "swiper-wrapper" }, state.trekTouristicContents.map(touristicContent => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-touristic-content-card", { exportparts: "touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button", fontFamily: this.fontFamily, touristicContent: touristicContent, isInsideHorizontalList: true, "color-surface-container-low": this.colorSurfaceContainerLow }))))), h("div", { key: 'dc1f7f965afe9c8cb712d8b888db5bf28989f49f', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.touristicContentsSwiperScrollbar = el) }))))), state.trekTouristicEvents && state.trekTouristicEvents.length > 0 && (h("div", { key: '762a3101299ac6022b731cadaece2b660a810d80' }, h("div", { key: 'a1b952ae449af9739ff446c871e38d1c17682ab5', part: "divider", class: "divider" }), h("div", { key: 'e36b3e5376246d6b46c6c06d6c35262d701e809b', part: "touristic-event-container", class: "touristic-event-container" }, h("div", { key: '9766cd8bd5c7f65cd5ab047a4e4050f95a4809d2', part: "touristic-event-title", class: "touristic-event-title", ref: el => (this.touristicEventsRef = el) }, translate[state.language].touristicEvents(state.trekTouristicEvents.length)), h("div", { key: '5f36f398cbb8d189de8e9dbabf8de5060b65b1a3', part: "swiper-touristic-event", class: "swiper swiper-touristic-event", ref: el => (this.swiperTouristicEventsRef = el) }, h("div", { key: '1572baafdf6dd370a74e853c01c296b470ec8d9c', part: "swiper-wrapper", class: "swiper-wrapper" }, state.trekTouristicEvents.map(touristicEvent => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-touristic-event-card", { exportparts: "touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button", fontFamily: this.fontFamily, touristicEvent: touristicEvent, isInsideHorizontalList: true, colorSurfaceContainerLow: this.colorSurfaceContainerLow }))))), h("div", { key: '5ebdd37e537a063e631fb6f86ac143ccaa6d0485', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.touristicEventsSwiperScrollbar = el) }))))), this.currentTrek.web_links && this.currentTrek.web_links.length > 0 && (h("div", { key: 'f3caa944cc52abfd9bec89fe54135349f1b01ca4' }, h("div", { key: '5d86b95ee6404d6c0458edafbe1386d7d46f8f42', part: "divider", class: "divider" }), h("div", { key: '05adcf93fcc58594df9caf01c92e7aa378f6eb8c', part: "weblinks-container", class: "weblinks-container" }, h("div", { key: '3d865c2da5a17fa9520271253d29414210495f77', part: "weblinks-title", class: "weblinks-title" }, translate[state.language].learnMore), this.currentTrek.web_links.map(weblink => (h("a", { part: "weblink-container", class: "weblink-container", href: weblink.url, target: "_blank", rel: "noopener noreferrer" }, weblink.category && weblink.category.pictogram && h("img", { src: weblink.category.pictogram, alt: weblink.category.label }), weblink.name)))))), this.currentTrek.source && this.currentTrek.source.length > 0 && (h("div", { key: '20b7b37d0ba476aa79bbf4e0d47c2e6c05b5765a' }, h("div", { key: 'd6c9b9a4ec84b767eeeea63411e7258a566234b7', part: "divider", class: "divider" }), h("div", { key: 'd50d1f20ec6b86fdba54da746a20328c5c274c80', part: "source-container", class: "source-container" }, h("div", { key: 'fabe70c534120c3affddcf8ded9a7dfddae99f22', part: "source-title", class: "source-title" }, translate[state.language].sources), this.sources.map(source => (h("div", { part: "source-sub-container", class: "source-sub-container" }, source.pictogram && h("img", { src: source.pictogram, alt: "" }), h("div", null, h("div", { part: "source-name", class: "source-name", innerHTML: source.name }), h("a", { part: "source-advice", class: "source-advice", href: source.website, innerHTML: source.website })))))))), this.grwApp && h("div", { key: '9dbfd36ba5891c008f17cc1d1332160c84d7d674', part: "detail-bottom-space", class: "detail-bottom-space" }))), this.modalDetailsId && (h(Fragment, { key: 'e0220dbb0f1877ac1e3ec6cfccf17831a8b352d9' }, this.showTouristicContentDetailsModal && h("grw-touristic-content-provider", { key: '17b148fa628d6836bf07e2d54ec6ad8bf04cbf7f', api: state.api, "touristic-content-id": this.modalDetailsId }), this.showTouristicEventDetailsModal && h("grw-touristic-event-provider", { key: 'bb3402337b53d47c8371765ba895a012e03c5f48', api: state.api, "touristic-event-id": this.modalDetailsId })))));
|
|
828
|
+
this.emergencyNumber) && (h("div", { key: 'c38f6c180304140c0d946fb3f6963446619e90f1', part: "divider-and-accessibilities-container", class: "divider-and-accessibilities-container" }, h("div", { key: '35162b0f88aa58183f8028247382dd42f9bc96c6', part: "divider", class: "divider" }), h("div", { key: 'c2ac8638718e447d94a6243b8b20e0b8225a26ae', part: "accessibilities-container", class: "accessibilities-container" }, h("div", { key: '250a1f8cd2766e1d92f090e7cbd8c3fec50b3d6b', part: "accessibilities-title", class: "accessibilities-title", ref: el => (this.accessibilityRef = el) }, translate[state.language].accessibility), this.currentTrek.disabled_infrastructure && h("div", { key: 'aa31b6f3e026df650d2c291563423de8a3ad18cc', part: "disabled-infrastructure", innerHTML: this.currentTrek.disabled_infrastructure }), this.accessibilities && this.accessibilities.length > 0 && (h("div", { key: 'e9ce559beaa093a2dc23c7013e4575faefd0dd82', part: "accessibilities-content-container", class: "accessibilities-content-container" }, this.accessibilities.map(accessibility => (h("div", { part: "accessibility-content-container", class: "accessibility-content-container" }, h("img", { src: accessibility.pictogram, alt: "" }), h("div", { part: "accessibility-name", innerHTML: accessibility.name })))))), this.emergencyNumber && (h("div", { key: 'd434f39a7e18d0a3105d558875fc9d1dc21c8ca8', part: "accessibility-emergency-number-container", class: "accessibility-emergency-number-container" }, h("div", { key: 'fd6d5e977250989e7bec47c6fdc8411652c04923', part: "accessibility-emergency-number-title", class: "accessibility-emergency-number-title" }, translate[state.language].emergencyNumber), h("div", { key: '4b647f2745ab364494641de8c0b8665fa1b4badf', part: "accessibility-emergency-number-content", class: "accessibility-emergency-number-content" }, h("a", { key: '1392e915a17171bcf997695b9c35db76c188441d', href: `tel:${this.emergencyNumber.toString()}` }, h("span", { key: '87fd6bc2d87a9b61d2892d27fe3fa07b8612d49f', part: "icon", class: "icon", innerHTML: CallIcon }), h("span", { key: 'e55d2986391f5facc6bed2d939a23c751869d219', part: "emergency-number", class: "emergency-number" }, this.emergencyNumber.toString()))))), this.currentTrek.accessibility_level && (h("div", { key: '92b377b7207240abab2d9b02ccc13c5e76ff423c', part: "accessibility-level-container", class: "accessibility-level-container" }, h("div", { key: '5615b4cd79225c88fa3d0165657b5fabbee7f7af', part: "accessibility-level-title", class: "accessibility-level-title" }, translate[state.language].accessibilityLevel), h("div", { key: 'eedc756a44362a26192bab819d47a1c2389e4ed2', part: "accessibility-level-name", innerHTML: this.accessibilityLevel.name }))), this.currentTrek.accessibility_slope && (h("div", { key: 'cde799bb2c70443baab868c56f5a6e77f0b80526', part: "accessibility-slope-container", class: "accessibility-slope-container" }, h("div", { key: '00ab24374cc764721be448a6d543ac6a6c5ea756', part: "accessibility-slope-title", class: "accessibility-slope-title" }, translate[state.language].accessibilitySlope), h("div", { key: 'b188579cd1051507cd0c76e3439475a94ed53d27', part: "accessibility-slope", innerHTML: this.currentTrek.accessibility_slope }))), this.currentTrek.accessibility_width && (h("div", { key: '413939ecbfbadfce335f8f3938bd61ca75c8d3ca', part: "accessibility-width-container", class: "accessibility-width-container" }, h("div", { key: '85cf0c1f67f2a63dbd2081c5e05834200f380d55', part: "accessibility-width-title", class: "accessibility-width-title" }, translate[state.language].accessibilityWidth), h("div", { key: 'c9bd8da7fd4fefeebf3b1e88f3932ea0676fa690', part: "accessibility-width", innerHTML: this.currentTrek.accessibility_width }))), this.currentTrek.accessibility_signage && (h("div", { key: 'cc9e1d5928a4cf9396cd7750373435193b658bad', part: "accessibility-signage-container", class: "accessibility-signage-container" }, h("div", { key: '3762984e5af0b95da40f7e57b930528ff399911b', part: "accessibility-signage-title", class: "accessibility-signage-title" }, translate[state.language].accessibilitySignage), h("div", { key: 'c4dc4b7fff981cdcd4d5f53e18666196d9e6244a', part: "accessibility-signage", innerHTML: this.currentTrek.accessibility_signage }))), this.currentTrek.accessibility_covering && (h("div", { key: '0de38d66dd64607d32caee7853f58919c21b1b38', part: "accessibility-covering-container", class: "accessibility-covering-container" }, h("div", { key: 'af34edd1bd1e0fa767c28c1bb1e250b792f8cc40', part: "accessibility-covering-title", class: "accessibility-covering-title" }, translate[state.language].accessibilityCovering), h("div", { key: '42bd6971391a4bf733c628a017d663a208a48ee0', part: "accessibility-covering", innerHTML: this.currentTrek.accessibility_covering }))), this.currentTrek.accessibility_exposure && (h("div", { key: '23eb81c5b5d1b93f9261d6060bfa9c9500fabf90', part: "accessibility-exposure-container", class: "accessibility-exposure-container" }, h("div", { key: '8cc8dc798d27a65e35e3828263d784ed55e5d1c4', part: "accessibility-exposure-title", class: "accessibility-exposure-title" }, translate[state.language].accessibilityExposure), h("div", { key: '906e4b85aa77868266fbf57ea8b2edacda8dde43', part: "accessibility-exposure", innerHTML: this.currentTrek.accessibility_exposure }))), this.currentTrek.accessibility_advice && (h("div", { key: '3dbae00f258726e9e1ea5bf71b28f15eb49b1314', part: "accessibility-advice-container", class: "accessibility-advice-container" }, h("div", { key: 'b4684f7d5020c9651bf6b8f1a3d17dfe5b0f1015', part: "accessibility-advice-title", class: "accessibility-advice-title" }, translate[state.language].accessibilityAdvices), h("div", { key: '4222103a1f4614d76df4ff7791103d6a7d077cb7', part: "accessibility-advice", innerHTML: this.currentTrek.accessibility_advice })))))), state.trekTouristicContents && state.trekTouristicContents.length > 0 && (h("div", { key: 'f86b43bd97e24878c59d3864b4082a0570dffccb', part: "divider-and-touristic-content-container", class: "divider-and-touristic-content-container" }, h("div", { key: '220503c82ab5bd987754f2b07499d898a27ba543', part: "divider", class: "divider" }), h("div", { key: '6f58cb86b5ed986861b79629d2f2724e4458f2b0', part: "touristic-content-container", class: "touristic-content-container" }, h("div", { key: '05ca14e71e50fb4bbd786ee7928703eb5e069238', part: "touristic-content-title", class: "touristic-content-title", ref: el => (this.touristicContentsRef = el) }, translate[state.language].touristicContents(state.trekTouristicContents.length)), h("div", { key: '819cea9dc4d7b9613dce03dad9245c84d1636b15', part: "swiper-touristic-content", class: "swiper swiper-touristic-content", ref: el => (this.swiperTouristicContentsRef = el) }, h("div", { key: '708de5a6f2552d711821129064199334c272b1e9', part: "swiper-wrapper", class: "swiper-wrapper" }, state.trekTouristicContents.map(touristicContent => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-touristic-content-card", { exportparts: "touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button", fontFamily: this.fontFamily, touristicContent: touristicContent, isInsideHorizontalList: true, "color-surface-container-low": this.colorSurfaceContainerLow }))))), h("div", { key: 'b90745d93d0d95354f831a09c626634a2c65b6a1', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.touristicContentsSwiperScrollbar = el) }))))), state.trekTouristicEvents && state.trekTouristicEvents.length > 0 && (h("div", { key: '6cfd35f9a6a0757918827b8527a247e8fd6bd4bb', part: "divider-and-touristic-event-container", class: "divider-and-touristic-event-container" }, h("div", { key: 'c541f1d92d10d394bbbba7eac37f5a5fd5e75d5e', part: "divider", class: "divider" }), h("div", { key: 'b5a28e17a9a1f52f136fbdb6a8d19adea7cbdfee', part: "touristic-event-container", class: "touristic-event-container" }, h("div", { key: '626dea15fe5f26816dcbe195d67e70d7b3954635', part: "touristic-event-title", class: "touristic-event-title", ref: el => (this.touristicEventsRef = el) }, translate[state.language].touristicEvents(state.trekTouristicEvents.length)), h("div", { key: '1a51460ff27283df9b12f571ec63b1ab7e8db37a', part: "swiper-touristic-event", class: "swiper swiper-touristic-event", ref: el => (this.swiperTouristicEventsRef = el) }, h("div", { key: '42d1c9ece02ce877901e174fb760e3ef2081d920', part: "swiper-wrapper", class: "swiper-wrapper" }, state.trekTouristicEvents.map(touristicEvent => (h("div", { part: "swiper-slide", class: "swiper-slide" }, h("grw-touristic-event-card", { exportparts: "touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button", fontFamily: this.fontFamily, touristicEvent: touristicEvent, isInsideHorizontalList: true, colorSurfaceContainerLow: this.colorSurfaceContainerLow }))))), h("div", { key: 'eb989ff52c8c06fdb3302b5d39fc6301e60660c4', part: "swiper-scrollbar", class: "swiper-scrollbar", ref: el => (this.touristicEventsSwiperScrollbar = el) }))))), this.currentTrek.web_links && this.currentTrek.web_links.length > 0 && (h("div", { key: '02f2f242260a279a1c6c83797910176e09675e62', part: "divider-and-weblinks-container", class: "divider-and-weblinks-container" }, h("div", { key: '457cd416435565aee652457893056318599a9c48', part: "divider", class: "divider" }), h("div", { key: '7ce7d47d46dbb23135d838406a55fa87b1db964a', part: "weblinks-container", class: "weblinks-container" }, h("div", { key: '419431857a41ca1271e1702cc06c60df29379952', part: "weblinks-title", class: "weblinks-title" }, translate[state.language].learnMore), this.currentTrek.web_links.map(weblink => (h("a", { part: "weblink-container", class: "weblink-container", href: weblink.url, target: "_blank", rel: "noopener noreferrer" }, weblink.category && weblink.category.pictogram && h("img", { src: weblink.category.pictogram, alt: weblink.category.label }), weblink.name)))))), this.currentTrek.source && this.currentTrek.source.length > 0 && (h("div", { key: '35d26e6b7efc3582ba28d0e4a68d77a9a85019c8', part: "divider-and-source-container", class: "divider-and-source-container" }, h("div", { key: 'ccb2e2a7d7452e425cd766c00c44ccec79eee9c2', part: "divider", class: "divider" }), h("div", { key: '9973b0a39a3cbcd9a2ee776fc03adefd4abdb365', part: "source-container", class: "source-container" }, h("div", { key: 'ad8c421d0d03977da31d005acf5d856f4d6eda73', part: "source-title", class: "source-title" }, translate[state.language].sources), this.sources.map(source => (h("div", { part: "source-sub-container", class: "source-sub-container" }, source.pictogram && h("img", { src: source.pictogram, alt: "" }), h("div", null, h("div", { part: "source-name", class: "source-name", innerHTML: source.name }), h("a", { part: "source-advice", class: "source-advice", href: source.website, innerHTML: source.website })))))))), this.grwApp && h("div", { key: 'e967956c920c7b6658c8e5c1ce64bed925fe6eb2', part: "detail-bottom-space", class: "detail-bottom-space" }))), this.modalDetailsId && (h(Fragment, { key: '177ac07c86031198d270663ac5fc6b81fc6e5be6' }, this.showTouristicContentDetailsModal && h("grw-touristic-content-provider", { key: 'a629456a9e0473e1371510eae1a32331781413b3', api: state.api, "touristic-content-id": this.modalDetailsId }), this.showTouristicEventDetailsModal && h("grw-touristic-event-provider", { key: '031bc974bcf6bbe6071934e526d87cd6935c9a91', api: state.api, "touristic-event-id": this.modalDetailsId })))));
|
|
829
829
|
}
|
|
830
830
|
static get is() { return "grw-trek-detail"; }
|
|
831
831
|
static get encapsulation() { return "shadow"; }
|
|
Binary file
|
|
Binary file
|