@iris.interactive/handcook 8.0.0-alpha.2 → 8.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "8.0.0-alpha.2",
3
+ "version": "8.0.0-alpha.3",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
package/public/index.js CHANGED
@@ -54,7 +54,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
54
54
  * @author Lucas ROCHE
55
55
  * @date 21/02/2022 10:14
56
56
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
57
- */class tU{static hideAll(){if(void 0!==window.hc_dropdown)for(let e of window.hc_dropdown)e.hide()}createEvent(){this.showEvent=new Event("show.hc.dropdown"),this.shownEvent=new Event("shown.hc.dropdown"),this.hideEvent=new Event("hide.hc.dropdown"),this.hiddenEvent=new Event("hidden.hc.dropdown")}constructor(i=t.dropdown){for(let t of(e(this,"showEvent",void 0),e(this,"shownEvent",void 0),e(this,"hideEvent",void 0),e(this,"hiddenEvent",void 0),window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),i)){let e=document.querySelector(t.dataset.hcDropdownMenu),i=tF(t,{trigger:"click",allowHTML:!0,content:e.innerHTML,arrow:!1,placement:"bottom",theme:"dropdown",interactive:!0,onShow:e=>{e.reference.dispatchEvent(this.showEvent)},onShown:e=>{e.reference.dispatchEvent(this.shownEvent)},onHide:e=>{e.reference.dispatchEvent(this.hideEvent)},onHidden:e=>{e.reference.dispatchEvent(this.hiddenEvent)}});window.hc_dropdown.push(i)}}}var tB=i(732),tz=i.n(tB);/*
57
+ */class tU{static hideAll(){if(void 0!==window.hc_dropdown)for(let e of window.hc_dropdown)e.hide()}createEvent(){this.showEvent=new Event("show.hc.dropdown"),this.shownEvent=new Event("shown.hc.dropdown"),this.hideEvent=new Event("hide.hc.dropdown"),this.hiddenEvent=new Event("hidden.hc.dropdown")}constructor(i=t.dropdown){for(let t of(e(this,"showEvent",void 0),e(this,"shownEvent",void 0),e(this,"hideEvent",void 0),e(this,"hiddenEvent",void 0),window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),document.querySelectorAll(i))){let e=document.querySelector(t.dataset.hcDropdownMenu),i=tF(t,{trigger:"click",allowHTML:!0,content:e.innerHTML,arrow:!1,placement:"bottom",theme:"dropdown",interactive:!0,onShow:e=>{e.reference.dispatchEvent(this.showEvent)},onShown:e=>{e.reference.dispatchEvent(this.shownEvent)},onHide:e=>{e.reference.dispatchEvent(this.hideEvent)},onHidden:e=>{e.reference.dispatchEvent(this.hiddenEvent)}});window.hc_dropdown.push(i)}}}var tB=i(732),tz=i.n(tB);/*
58
58
  * IRIS Interactive
59
59
  *
60
60
  * NOTICE OF LICENSE
@@ -93,7 +93,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
93
93
  * @author Lucas ROCHE
94
94
  * @date 01/02/2022 11:01
95
95
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
96
- */class ib{static show(e){ig.show([e])}static close(e){ig.close(e)}initOptions(){this.options={src:"",type:"inline",parentEl:null}}createEvent(){this.showEvent=new Event("show.hc.modal"),this.hideEvent=new Event("hide.hc.modal")}constructor(i=t.modal,r={}){for(let s of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),e(this,"options",{}),this.createEvent(),i)){this.initOptions(),Object.assign(this.options,r),this.options.src=""!==this.options.src?this.options.src:s.hasAttribute("href")?s.getAttribute("href"):s.hasAttribute("data-src")?s.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):s.hasAttribute("data-hc-modal-parent")?document.querySelector(s.getAttribute("data-hc-modal-parent")):"",this.options.autoFocus=!!s.hasAttribute("data-hc-modal-autofocus");let e=`${t.modal}[${s.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;ig.bind(e,Object.assign(this.options,{on:{done:()=>{document.dispatchEvent(this.showEvent)},closing:()=>{document.dispatchEvent(this.hideEvent)}}}))}for(let e of t.modalClose)e.addEventListener("click",e=>{e.preventDefault();let t=""===e.currentTarget.dataset.hcModalClose||e.currentTarget.dataset.hcModalClose;ib.close(t)})}}var iv=i(481);/*
96
+ */class ib{static show(e){ig.show([e])}static close(e){ig.close(e)}initOptions(){this.options={src:"",type:"inline",parentEl:null}}createEvent(){this.showEvent=new Event("show.hc.modal"),this.hideEvent=new Event("hide.hc.modal")}constructor(i=t.modal,r={}){for(let s of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),e(this,"options",{}),this.createEvent(),document.querySelectorAll(i))){this.initOptions(),Object.assign(this.options,r),this.options.src=""!==this.options.src?this.options.src:s.hasAttribute("href")?s.getAttribute("href"):s.hasAttribute("data-src")?s.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):s.hasAttribute("data-hc-modal-parent")?document.querySelector(s.getAttribute("data-hc-modal-parent")):"",this.options.autoFocus=!!s.hasAttribute("data-hc-modal-autofocus");let e=`${t.modal}[${s.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;ig.bind(e,Object.assign(this.options,{on:{done:()=>{document.dispatchEvent(this.showEvent)},closing:()=>{document.dispatchEvent(this.hideEvent)}}}))}for(let e of document.querySelectorAll(t.modalClose))e.addEventListener("click",e=>{e.preventDefault();let t=""===e.currentTarget.dataset.hcModalClose||e.currentTarget.dataset.hcModalClose;ib.close(t)})}}var iv=i(481);/*
97
97
  * IRIS Interactive
98
98
  *
99
99
  * NOTICE OF LICENSE
@@ -106,7 +106,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
106
106
  * @author Nicolas PAYS
107
107
  * @date 10/10/2024 14:30
108
108
  * @copyright Copyright (c) 2002-2024 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
109
- */class iy{static async initialize(){try{window.natsConnection=await (0,iv.wsconnect)({servers:iy.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(e){console.log(`error connecting to ${JSON.stringify(e)}`)}}async publishMessage(e,t){try{void 0===window.natsConnection&&await iy.initialize();let i={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:t};window.natsConnection.publish(e,JSON.stringify(i))}catch(e){console.log(`error messaging to ${JSON.stringify(e)}`)}}}e(iy,"server","wss://nats.iris-interactive.fr:443");class iw{show(e){e.classList.add("hc-overlay-show"),document.body.classList.add("hc-overlay-lock"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-overlay-show"),document.body.classList.remove("hc-overlay-lock"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.overlay",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.overlay",{detail:{element:e}})}constructor(i=t.overlay){for(let r of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),i)){for(let e of(this.createEvent(r),r.classList.add("hc-overlay-init"),r.querySelectorAll("[data-hc-overlay-trigger]")))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("data-hc-overlay-trigger")?e.currentTarget.getAttribute("data-hc-overlay-trigger"):e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href").substring(1):null;this.show(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-close]"))e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.getAttribute("data-hc-overlay-close");t&&this.close(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-background]"))e.addEventListener("click",e=>{for(let i of(console.log("click"),e.preventDefault(),document.querySelectorAll(t.overlay)))this.close(i)});document.onkeyup=e=>{if("Escape"===e.key)for(let e of document.querySelectorAll(t.overlay))this.close(e)}}}}/*
109
+ */class iy{static async initialize(){try{window.natsConnection=await (0,iv.wsconnect)({servers:iy.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(e){console.log(`error connecting to ${JSON.stringify(e)}`)}}async publishMessage(e,t){try{void 0===window.natsConnection&&await iy.initialize();let i={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:t};window.natsConnection.publish(e,JSON.stringify(i))}catch(e){console.log(`error messaging to ${JSON.stringify(e)}`)}}}e(iy,"server","wss://nats.iris-interactive.fr:443");class iw{show(e){e.classList.add("hc-overlay-show"),document.body.classList.add("hc-overlay-lock"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-overlay-show"),document.body.classList.remove("hc-overlay-lock"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.overlay",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.overlay",{detail:{element:e}})}constructor(i=t.overlay){for(let r of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),document.querySelectorAll(i))){for(let e of(this.createEvent(r),r.classList.add("hc-overlay-init"),r.querySelectorAll("[data-hc-overlay-trigger]")))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("data-hc-overlay-trigger")?e.currentTarget.getAttribute("data-hc-overlay-trigger"):e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href").substring(1):null;this.show(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-close]"))e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.getAttribute("data-hc-overlay-close");t&&this.close(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-background]"))e.addEventListener("click",e=>{for(let i of(console.log("click"),e.preventDefault(),document.querySelectorAll(t.overlay)))this.close(i)});document.onkeyup=e=>{if("Escape"===e.key)for(let e of document.querySelectorAll(t.overlay))this.close(e)}}}}/*
110
110
  * IRIS Interactive
111
111
  *
112
112
  * NOTICE OF LICENSE
@@ -119,7 +119,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
119
119
  * @author Stephan JAMBOU
120
120
  * @date 28/01/2022 14:27
121
121
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
122
- */class iE{show(e){e.classList.add("hc-popin-show");let t=e.parentNode;t.hasAttribute("data-hc-popin-overlay-background")&&t.classList.add("hc-popin-overlay-show"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-popin-show");let t=e.parentNode;t.hasAttribute("data-hc-popin-overlay-background")&&t.classList.remove("hc-popin-overlay-show"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.popin",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.popin",{detail:{element:e}})}constructor(i=t.popin){for(let t of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),i)){this.createEvent(t);let e=document.createElement("button");if(e.setAttribute("data-hc-popin-close",""),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"></path></svg>',t.prepend(e),t.hasAttribute("data-hc-popin-overlay")){let e=document.createElement("div");e.setAttribute("data-hc-popin-overlay-background",""),t.prepend(e),t.parentNode.insertBefore(e,t),e.appendChild(t),document.querySelectorAll("[data-hc-popin-overlay-background]")[0].addEventListener("click",e=>{e.composedPath().includes(t)||this.close(t)})}if(t.hasAttribute("data-hc-popin-position-top")&&(t.style.top=t.getAttribute("data-hc-popin-position-top")),t.hasAttribute("data-hc-popin-position-bottom")&&(t.style.bottom=t.getAttribute("data-hc-popin-position-bottom")),t.hasAttribute("data-hc-popin-position-left")&&(t.style.left=t.getAttribute("data-hc-popin-position-left")),t.hasAttribute("data-hc-popin-position-right")&&(t.style.right=t.getAttribute("data-hc-popin-position-right")),t.hasAttribute("data-hc-popin-position-top")||t.hasAttribute("data-hc-popin-position-top")||(t.style.bottom="20px"),t.hasAttribute("data-hc-popin-position-left")||t.hasAttribute("data-hc-popin-position-right")||(t.style.right="20px"),t.hasAttribute("data-hc-popin-mode")&&"trigger"===t.getAttribute("data-hc-popin-mode"))for(let e of document.querySelectorAll("[data-hc-popin-trigger]"))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("href");this.show(document.getElementById(t.substring(1)))});else t.hasAttribute("data-hc-popin-delay")?setTimeout(()=>{this.show(t)},t.getAttribute("data-hc-popin-delay")):this.show(t);t.querySelectorAll("[data-hc-popin-close]")[0].addEventListener("click",e=>{e.preventDefault(),this.close(t)})}}}/*
122
+ */class iE{show(e){e.classList.add("hc-popin-show");let t=e.parentNode;t.hasAttribute("data-hc-popin-overlay-background")&&t.classList.add("hc-popin-overlay-show"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-popin-show");let t=e.parentNode;t.hasAttribute("data-hc-popin-overlay-background")&&t.classList.remove("hc-popin-overlay-show"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.popin",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.popin",{detail:{element:e}})}constructor(i=t.popin){for(let t of(e(this,"showEvent",void 0),e(this,"hideEvent",void 0),document.querySelectorAll(i))){this.createEvent(t);let e=document.createElement("button");if(e.setAttribute("data-hc-popin-close",""),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"></path></svg>',t.prepend(e),t.hasAttribute("data-hc-popin-overlay")){let e=document.createElement("div");e.setAttribute("data-hc-popin-overlay-background",""),t.prepend(e),t.parentNode.insertBefore(e,t),e.appendChild(t),document.querySelectorAll("[data-hc-popin-overlay-background]")[0].addEventListener("click",e=>{e.composedPath().includes(t)||this.close(t)})}if(t.hasAttribute("data-hc-popin-position-top")&&(t.style.top=t.getAttribute("data-hc-popin-position-top")),t.hasAttribute("data-hc-popin-position-bottom")&&(t.style.bottom=t.getAttribute("data-hc-popin-position-bottom")),t.hasAttribute("data-hc-popin-position-left")&&(t.style.left=t.getAttribute("data-hc-popin-position-left")),t.hasAttribute("data-hc-popin-position-right")&&(t.style.right=t.getAttribute("data-hc-popin-position-right")),t.hasAttribute("data-hc-popin-position-top")||t.hasAttribute("data-hc-popin-position-top")||(t.style.bottom="20px"),t.hasAttribute("data-hc-popin-position-left")||t.hasAttribute("data-hc-popin-position-right")||(t.style.right="20px"),t.hasAttribute("data-hc-popin-mode")&&"trigger"===t.getAttribute("data-hc-popin-mode"))for(let e of document.querySelectorAll("[data-hc-popin-trigger]"))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("href");this.show(document.getElementById(t.substring(1)))});else t.hasAttribute("data-hc-popin-delay")?setTimeout(()=>{this.show(t)},t.getAttribute("data-hc-popin-delay")):this.show(t);t.querySelectorAll("[data-hc-popin-close]")[0].addEventListener("click",e=>{e.preventDefault(),this.close(t)})}}}/*
123
123
  * IRIS Interactive
124
124
  *
125
125
  * NOTICE OF LICENSE
@@ -145,7 +145,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
145
145
  * @author Lucas ROCHE
146
146
  * @date 22/02/2022 17:21
147
147
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
148
- */class iS{setOptions(){let e=this.slider.getAttribute("data-hc-slider-autoplay");null!==e&&(this.options.autoplay={delay:e});let t={},i=[{hcKey:"gap",libKey:"spaceBetween",callback:"parseFloat"},{hcKey:"slides-per-view",libKey:"slidesPerView",callback:"parseFloat"},{hcKey:"no-swipe",libKey:"allowTouchMove",callback:"parseReverseBool"}];for(let e of(i.map(e=>{let t=this.slider.getAttribute(`data-hc-slider-${e.hcKey}`);null!==t&&("parseReverseBool"===e.callback&&(t="true"!==t),"parseBool"===e.callback&&(t="true"===t),"parseFloat"===e.callback&&(t=Number.parseFloat(t)),this.options[e.libKey]=t)}),this.breakpoints)){let r={};i.map(t=>{let i=this.slider.getAttribute(`data-hc-slider-${t.hcKey}-${e.name}`);null!==i&&("parseReverseBool"===t.callback&&(i="true"!==i),"parseBool"===t.callback&&(i="true"===i),"parseFloat"===t.callback&&(i=Number.parseFloat(i)),r[t.libKey]=i)}),Object.getOwnPropertyNames(r).length>0&&(t[e.value]=r)}if(this.options.breakpoints=t,null!==this.slider.getAttribute("data-hc-slider-free-mode")&&(this.options.freeMode={enabled:!0}),this.slider.hasAttribute("data-hc-slider-pagination")&&(this.options.pagination={el:".hc-slider-pagination",type:"bullets",clickable:!0,dynamicBullets:!1,bulletClass:"hc-slider-pagination-bullet",clickableClass:"hc-slider-pagination-clickable",currentClass:"hc-slider-pagination-current",bulletActiveClass:"hc-slider-pagination-bullet-active"}),this.slider.hasAttribute("data-hc-slider-arrows")){let e=this.slider.getAttribute("data-hc-slider-arrows"),t=this.slider.hasAttribute("data-hc-slider-arrows-wrapper")?".hc-slider-buttons":null,i=this.slider.hasAttribute("data-hc-slider-arrow-prev")?this.slider.getAttribute("data-hc-slider-arrow-prev"):`.hc-slider-button-prev${e}`,r=this.slider.hasAttribute("data-hc-slider-arrow-next")?this.slider.getAttribute("data-hc-slider-arrow-next"):`.hc-slider-button-next${e}`;this.options.navigation={prevEl:i,nextEl:r,wrapperEl:t,disabledClass:`hc-slider-button-disabled${e}`,hiddenClass:`hc-slider-button-hidden${e}`}}this.slider.hasAttribute("data-hc-slider-fade-effect")&&(this.options.effect="fade",this.options.fadeEffect={crossFade:!0}),this.slider.hasAttribute("data-hc-slider-infinite")&&(this.options.loop=!0),this.slider.hasAttribute("data-hc-slider-disable-mousewheel")&&(this.options.mousewheel=!1),this.options.watchOverflow=!0}buildDom(){if(0===this.slider.querySelectorAll(".swiper-wrapper").length){let e=[].slice.call(this.slider.children);for(let t of e)t.classList.add("swiper-slide"),t.setAttribute("aria-roledescription","slide");let t=document.createElement("div");for(let i of(t.classList.add("swiper-wrapper"),e))t.appendChild(i);if(this.slider.appendChild(t),!1!==this.options.pagination&&0===this.slider.querySelectorAll(this.options.pagination.el).length){let e=document.createElement("div");e.classList.add(this.options.pagination.el.substr(1)),this.slider.appendChild(e)}if(!1!==this.options.navigation){let e=this.slider.querySelectorAll(this.options.navigation.prevEl),t=this.slider.querySelectorAll(this.options.navigation.nextEl);if(this.slider.hasAttribute("data-hc-slider-arrows-wrapper")&&0===e.length&&0===t.length){let e=document.createElement("div"),t=document.createElement("div"),i=document.createElement("div");t.classList.add(this.options.navigation.prevEl.substr(1)),i.classList.add(this.options.navigation.nextEl.substr(1)),e.classList.add(this.options.navigation.wrapperEl.substr(1)),e.appendChild(t),e.appendChild(i),this.slider.prepend(e)}else{if(!this.slider.hasAttribute("data-hc-slider-arrow-prev")&&0===e.length){let e=document.createElement("div");e.classList.add(this.options.navigation.prevEl.substr(1)),this.slider.appendChild(e)}if(!this.slider.hasAttribute("data-hc-slider-arrow-next")&&0===t.length){let e=document.createElement("div");e.classList.add(this.options.navigation.nextEl.substr(1)),this.slider.appendChild(e)}}}}}initOptions(){this.options={slidesPerView:"auto",pagination:!1,navigation:!1,mousewheel:{forceToAxis:!0},grabCursor:!0,loop:!1,watchSlidesProgress:!0,a11y:{prevSlideMessage:IRISCollectionTheme.translate.slider.prevSlideMessage??"Slide pr\xe9c\xe9dente",nextSlideMessage:IRISCollectionTheme.translate.slider.nextSlideMessage??"Slide suivante",firstSlideMessage:IRISCollectionTheme.translate.slider.firstSlideMessage??"Vous \xeates sur la premi\xe8re slide",lastSlideMessage:IRISCollectionTheme.translate.slider.lastSlideMessage??"Vous avez atteint la derni\xe8re slide",paginationBulletMessage:IRISCollectionTheme.translate.slider.paginationBulletMessage??"Aller sur la slide {{index}}",slideLabelMessage:IRISCollectionTheme.translate.slider.slideLabelMessage??"Slide {{index}} sur {{slidesLength}}"},on:{init:e=>{$(e.el).find(".swiper-wrapper").addClass("hc-slider-wrapper"),$(e.el).addClass("hc-slider-initialized"),$(e.el).find(".swiper-slide").addClass("hc-slider-slide"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),e.isLocked&&$(e.el).addClass("hc-slider-lock"),this.slider.dispatchEvent(this.initEvent)},afterInit:e=>{this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")},slideChangeTransitionEnd:e=>{$(e.el).find(".swiper-slide").removeClass("hc-slider-slide-active").removeClass("hc-slider-slide-next").removeClass("hc-slider-slide-prev"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")}},breakpoints:{}}}constructor(i=t.slider){for(let t of(e(this,"slider",void 0),e(this,"instances",[]),e(this,"breakpoints",[{name:"medium",value:651},{name:"large",value:1001},{name:"xlarge",value:1454}]),e(this,"options",{}),e(this,"initEvent",void 0),i))this.initEvent=new Event("init.hc.slider"),this.initOptions(),this.slider=t,this.setOptions(),this.buildDom(),iA.create(t,this.options).then(e=>{this.instances.push(e)})}}/*
148
+ */class iS{setOptions(){let e=this.slider.getAttribute("data-hc-slider-autoplay");null!==e&&(this.options.autoplay={delay:e});let t={},i=[{hcKey:"gap",libKey:"spaceBetween",callback:"parseFloat"},{hcKey:"slides-per-view",libKey:"slidesPerView",callback:"parseFloat"},{hcKey:"no-swipe",libKey:"allowTouchMove",callback:"parseReverseBool"}];for(let e of(i.map(e=>{let t=this.slider.getAttribute(`data-hc-slider-${e.hcKey}`);null!==t&&("parseReverseBool"===e.callback&&(t="true"!==t),"parseBool"===e.callback&&(t="true"===t),"parseFloat"===e.callback&&(t=Number.parseFloat(t)),this.options[e.libKey]=t)}),this.breakpoints)){let r={};i.map(t=>{let i=this.slider.getAttribute(`data-hc-slider-${t.hcKey}-${e.name}`);null!==i&&("parseReverseBool"===t.callback&&(i="true"!==i),"parseBool"===t.callback&&(i="true"===i),"parseFloat"===t.callback&&(i=Number.parseFloat(i)),r[t.libKey]=i)}),Object.getOwnPropertyNames(r).length>0&&(t[e.value]=r)}if(this.options.breakpoints=t,null!==this.slider.getAttribute("data-hc-slider-free-mode")&&(this.options.freeMode={enabled:!0}),this.slider.hasAttribute("data-hc-slider-pagination")&&(this.options.pagination={el:".hc-slider-pagination",type:"bullets",clickable:!0,dynamicBullets:!1,bulletClass:"hc-slider-pagination-bullet",clickableClass:"hc-slider-pagination-clickable",currentClass:"hc-slider-pagination-current",bulletActiveClass:"hc-slider-pagination-bullet-active"}),this.slider.hasAttribute("data-hc-slider-arrows")){let e=this.slider.getAttribute("data-hc-slider-arrows"),t=this.slider.hasAttribute("data-hc-slider-arrows-wrapper")?".hc-slider-buttons":null,i=this.slider.hasAttribute("data-hc-slider-arrow-prev")?this.slider.getAttribute("data-hc-slider-arrow-prev"):`.hc-slider-button-prev${e}`,r=this.slider.hasAttribute("data-hc-slider-arrow-next")?this.slider.getAttribute("data-hc-slider-arrow-next"):`.hc-slider-button-next${e}`;this.options.navigation={prevEl:i,nextEl:r,wrapperEl:t,disabledClass:`hc-slider-button-disabled${e}`,hiddenClass:`hc-slider-button-hidden${e}`}}this.slider.hasAttribute("data-hc-slider-fade-effect")&&(this.options.effect="fade",this.options.fadeEffect={crossFade:!0}),this.slider.hasAttribute("data-hc-slider-infinite")&&(this.options.loop=!0),this.slider.hasAttribute("data-hc-slider-disable-mousewheel")&&(this.options.mousewheel=!1),this.options.watchOverflow=!0}buildDom(){if(0===this.slider.querySelectorAll(".swiper-wrapper").length){let e=[].slice.call(this.slider.children);for(let t of e)t.classList.add("swiper-slide"),t.setAttribute("aria-roledescription","slide");let t=document.createElement("div");for(let i of(t.classList.add("swiper-wrapper"),e))t.appendChild(i);if(this.slider.appendChild(t),!1!==this.options.pagination&&0===this.slider.querySelectorAll(this.options.pagination.el).length){let e=document.createElement("div");e.classList.add(this.options.pagination.el.substr(1)),this.slider.appendChild(e)}if(!1!==this.options.navigation){let e=this.slider.querySelectorAll(this.options.navigation.prevEl),t=this.slider.querySelectorAll(this.options.navigation.nextEl);if(this.slider.hasAttribute("data-hc-slider-arrows-wrapper")&&0===e.length&&0===t.length){let e=document.createElement("div"),t=document.createElement("div"),i=document.createElement("div");t.classList.add(this.options.navigation.prevEl.substr(1)),i.classList.add(this.options.navigation.nextEl.substr(1)),e.classList.add(this.options.navigation.wrapperEl.substr(1)),e.appendChild(t),e.appendChild(i),this.slider.prepend(e)}else{if(!this.slider.hasAttribute("data-hc-slider-arrow-prev")&&0===e.length){let e=document.createElement("div");e.classList.add(this.options.navigation.prevEl.substr(1)),this.slider.appendChild(e)}if(!this.slider.hasAttribute("data-hc-slider-arrow-next")&&0===t.length){let e=document.createElement("div");e.classList.add(this.options.navigation.nextEl.substr(1)),this.slider.appendChild(e)}}}}}initOptions(){this.options={slidesPerView:"auto",pagination:!1,navigation:!1,mousewheel:{forceToAxis:!0},grabCursor:!0,loop:!1,watchSlidesProgress:!0,a11y:{prevSlideMessage:IRISCollectionTheme.translate.slider.prevSlideMessage??"Slide pr\xe9c\xe9dente",nextSlideMessage:IRISCollectionTheme.translate.slider.nextSlideMessage??"Slide suivante",firstSlideMessage:IRISCollectionTheme.translate.slider.firstSlideMessage??"Vous \xeates sur la premi\xe8re slide",lastSlideMessage:IRISCollectionTheme.translate.slider.lastSlideMessage??"Vous avez atteint la derni\xe8re slide",paginationBulletMessage:IRISCollectionTheme.translate.slider.paginationBulletMessage??"Aller sur la slide {{index}}",slideLabelMessage:IRISCollectionTheme.translate.slider.slideLabelMessage??"Slide {{index}} sur {{slidesLength}}"},on:{init:e=>{$(e.el).find(".swiper-wrapper").addClass("hc-slider-wrapper"),$(e.el).addClass("hc-slider-initialized"),$(e.el).find(".swiper-slide").addClass("hc-slider-slide"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),e.isLocked&&$(e.el).addClass("hc-slider-lock"),this.slider.dispatchEvent(this.initEvent)},afterInit:e=>{this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")},slideChangeTransitionEnd:e=>{$(e.el).find(".swiper-slide").removeClass("hc-slider-slide-active").removeClass("hc-slider-slide-next").removeClass("hc-slider-slide-prev"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")}},breakpoints:{}}}constructor(i=t.slider){for(let t of(e(this,"slider",void 0),e(this,"instances",[]),e(this,"breakpoints",[{name:"medium",value:651},{name:"large",value:1001},{name:"xlarge",value:1454}]),e(this,"options",{}),e(this,"initEvent",void 0),document.querySelectorAll(i)))this.initEvent=new Event("init.hc.slider"),this.initOptions(),this.slider=t,this.setOptions(),this.buildDom(),iA.create(t,this.options).then(e=>{this.instances.push(e)})}}/*
149
149
  * IRIS Interactive
150
150
  *
151
151
  * NOTICE OF LICENSE
@@ -198,7 +198,7 @@ ${this.ctx.stack}`),this.cancel(e)):(this.callback(null,t),"count"===this.opts.s
198
198
  * @author Lucas ROCHE
199
199
  * @date 22/02/2022 16:50
200
200
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
201
- */class iY{constructor(e=t.toggle){for(let t of e)t.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.dataset.hcToggleAttribute,i=e.currentTarget.dataset.hcToggleValue,r=e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href"):e.currentTarget.dataset.hcToggleTarget;for(let e of document.querySelectorAll(r))null!==e.getAttribute(t)&&-1!==e.getAttribute(t).indexOf(i)?"class"===t?e.classList.remove(i):e.removeAttribute(t):"class"===t?e.classList.add(i):e.setAttribute(t,i)})}}/*
201
+ */class iY{constructor(e=t.toggle){for(let t of document.querySelectorAll(e))t.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.dataset.hcToggleAttribute,i=e.currentTarget.dataset.hcToggleValue,r=e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href"):e.currentTarget.dataset.hcToggleTarget;for(let e of document.querySelectorAll(r))null!==e.getAttribute(t)&&-1!==e.getAttribute(t).indexOf(i)?"class"===t?e.classList.remove(i):e.removeAttribute(t):"class"===t?e.classList.add(i):e.setAttribute(t,i)})}}/*
202
202
  * IRIS Interactive
203
203
  *
204
204
  * NOTICE OF LICENSE
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 21/02/2022 10:14
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import e,{hideAll as n}from"tippy.js";import o from"../../enumerators/element.enum";import"tippy.js/dist/tippy.css";import"./dropdown.component.scss";export class HcDropdown{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(n=o.dropdown){for(let o of(window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),n)){let n=document.querySelector(o.dataset.hcDropdownMenu),t=e(o,{trigger:"click",allowHTML:!0,content:n.innerHTML,arrow:!1,placement:"bottom",theme:"dropdown",interactive:!0,onShow:e=>{e.reference.dispatchEvent(this.showEvent)},onShown:e=>{e.reference.dispatchEvent(this.shownEvent)},onHide:e=>{e.reference.dispatchEvent(this.hideEvent)},onHidden:e=>{e.reference.dispatchEvent(this.hiddenEvent)}});window.hc_dropdown.push(t)}}static hideAll(){if(void 0!==window.hc_dropdown)for(let e of window.hc_dropdown)e.hide()}createEvent(){this.showEvent=new Event("show.hc.dropdown"),this.shownEvent=new Event("shown.hc.dropdown"),this.hideEvent=new Event("hide.hc.dropdown"),this.hiddenEvent=new Event("hidden.hc.dropdown")}}let hc_dropdown=e=>new HcDropdown(e);export default hc_dropdown;
14
+ */import e,{hideAll as n}from"tippy.js";import o from"../../enumerators/element.enum";import"tippy.js/dist/tippy.css";import"./dropdown.component.scss";export class HcDropdown{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(n=o.dropdown){for(let o of(window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),document.querySelectorAll(n))){let n=document.querySelector(o.dataset.hcDropdownMenu),t=e(o,{trigger:"click",allowHTML:!0,content:n.innerHTML,arrow:!1,placement:"bottom",theme:"dropdown",interactive:!0,onShow:e=>{e.reference.dispatchEvent(this.showEvent)},onShown:e=>{e.reference.dispatchEvent(this.shownEvent)},onHide:e=>{e.reference.dispatchEvent(this.hideEvent)},onHidden:e=>{e.reference.dispatchEvent(this.hiddenEvent)}});window.hc_dropdown.push(t)}}static hideAll(){if(void 0!==window.hc_dropdown)for(let e of window.hc_dropdown)e.hide()}createEvent(){this.showEvent=new Event("show.hc.dropdown"),this.shownEvent=new Event("shown.hc.dropdown"),this.hideEvent=new Event("hide.hc.dropdown"),this.hiddenEvent=new Event("hidden.hc.dropdown")}}let hc_dropdown=e=>new HcDropdown(e);export default hc_dropdown;
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 01/02/2022 11:01
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import{Fancybox as t}from"@fancyapps/ui";import e from"../../enumerators/element.enum";import"@fancyapps/ui/dist/fancybox.css";import"./modal.component.scss";export class HcModal{showEvent;hideEvent;options={};constructor(o=e.modal,s={}){for(let a of(this.createEvent(),o)){this.initOptions(),Object.assign(this.options,s),this.options.src=""!==this.options.src?this.options.src:a.hasAttribute("href")?a.getAttribute("href"):a.hasAttribute("data-src")?a.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):a.hasAttribute("data-hc-modal-parent")?document.querySelector(a.getAttribute("data-hc-modal-parent")):"",this.options.autoFocus=!!a.hasAttribute("data-hc-modal-autofocus");let o=`${e.modal}[${a.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;t.bind(o,Object.assign(this.options,{on:{done:()=>{document.dispatchEvent(this.showEvent)},closing:()=>{document.dispatchEvent(this.hideEvent)}}}))}for(let t of e.modalClose)t.addEventListener("click",t=>{t.preventDefault();let e=""===t.currentTarget.dataset.hcModalClose||t.currentTarget.dataset.hcModalClose;HcModal.close(e)})}static show(e){t.show([e])}static close(e){t.close(e)}initOptions(){this.options={src:"",type:"inline",parentEl:null}}createEvent(){this.showEvent=new Event("show.hc.modal"),this.hideEvent=new Event("hide.hc.modal")}}let hc_modal=(t,e)=>new HcModal(t,e);export default hc_modal;
14
+ */import{Fancybox as t}from"@fancyapps/ui";import e from"../../enumerators/element.enum";import"@fancyapps/ui/dist/fancybox.css";import"./modal.component.scss";export class HcModal{showEvent;hideEvent;options={};constructor(o=e.modal,s={}){for(let a of(this.createEvent(),document.querySelectorAll(o))){this.initOptions(),Object.assign(this.options,s),this.options.src=""!==this.options.src?this.options.src:a.hasAttribute("href")?a.getAttribute("href"):a.hasAttribute("data-src")?a.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):a.hasAttribute("data-hc-modal-parent")?document.querySelector(a.getAttribute("data-hc-modal-parent")):"",this.options.autoFocus=!!a.hasAttribute("data-hc-modal-autofocus");let o=`${e.modal}[${a.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;t.bind(o,Object.assign(this.options,{on:{done:()=>{document.dispatchEvent(this.showEvent)},closing:()=>{document.dispatchEvent(this.hideEvent)}}}))}for(let t of document.querySelectorAll(e.modalClose))t.addEventListener("click",t=>{t.preventDefault();let e=""===t.currentTarget.dataset.hcModalClose||t.currentTarget.dataset.hcModalClose;HcModal.close(e)})}static show(e){t.show([e])}static close(e){t.close(e)}initOptions(){this.options={src:"",type:"inline",parentEl:null}}createEvent(){this.showEvent=new Event("show.hc.modal"),this.hideEvent=new Event("hide.hc.modal")}}let hc_modal=(t,e)=>new HcModal(t,e);export default hc_modal;
@@ -1 +1 @@
1
- import e from"../../enumerators/element.enum";import"./overlay.component.scss";export class HcOverlay{showEvent;hideEvent;constructor(t=e.overlay){for(let r of t){for(let e of(this.createEvent(r),r.classList.add("hc-overlay-init"),r.querySelectorAll("[data-hc-overlay-trigger]")))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("data-hc-overlay-trigger")?e.currentTarget.getAttribute("data-hc-overlay-trigger"):e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href").substring(1):null;this.show(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-close]"))e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.getAttribute("data-hc-overlay-close");t&&this.close(document.getElementById(t))});for(let t of r.querySelectorAll("[data-hc-overlay-background]"))t.addEventListener("click",t=>{for(let r of(console.log("click"),t.preventDefault(),document.querySelectorAll(e.overlay)))this.close(r)});document.onkeyup=t=>{if("Escape"===t.key)for(let t of document.querySelectorAll(e.overlay))this.close(t)}}}show(e){e.classList.add("hc-overlay-show"),document.body.classList.add("hc-overlay-lock"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-overlay-show"),document.body.classList.remove("hc-overlay-lock"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.overlay",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.overlay",{detail:{element:e}})}}let hc_overlay=e=>new HcOverlay(e);export default hc_overlay;
1
+ import e from"../../enumerators/element.enum";import"./overlay.component.scss";export class HcOverlay{showEvent;hideEvent;constructor(t=e.overlay){for(let r of document.querySelectorAll(t)){for(let e of(this.createEvent(r),r.classList.add("hc-overlay-init"),r.querySelectorAll("[data-hc-overlay-trigger]")))e.addEventListener("click",e=>{let t=e.currentTarget.getAttribute("data-hc-overlay-trigger")?e.currentTarget.getAttribute("data-hc-overlay-trigger"):e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href").substring(1):null;this.show(document.getElementById(t))});for(let e of r.querySelectorAll("[data-hc-overlay-close]"))e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.getAttribute("data-hc-overlay-close");t&&this.close(document.getElementById(t))});for(let t of r.querySelectorAll("[data-hc-overlay-background]"))t.addEventListener("click",t=>{for(let r of(console.log("click"),t.preventDefault(),document.querySelectorAll(e.overlay)))this.close(r)});document.onkeyup=t=>{if("Escape"===t.key)for(let t of document.querySelectorAll(e.overlay))this.close(t)}}}show(e){e.classList.add("hc-overlay-show"),document.body.classList.add("hc-overlay-lock"),document.dispatchEvent(this.showEvent)}close(e){e.classList.remove("hc-overlay-show"),document.body.classList.remove("hc-overlay-lock"),document.dispatchEvent(this.hideEvent)}createEvent(e){this.showEvent=new CustomEvent("show.hc.overlay",{detail:{element:e}}),this.hideEvent=new CustomEvent("hide.hc.overlay",{detail:{element:e}})}}let hc_overlay=e=>new HcOverlay(e);export default hc_overlay;
@@ -11,4 +11,4 @@
11
11
  * @author Stephan JAMBOU
12
12
  * @date 28/01/2022 14:27
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import t from"../../enumerators/element.enum";import"./popin.component.scss";export class HcPopin{showEvent;hideEvent;constructor(e=t.popin){for(let t of e){this.createEvent(t);let e=document.createElement("button");if(e.setAttribute("data-hc-popin-close",""),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"></path></svg>',t.prepend(e),t.hasAttribute("data-hc-popin-overlay")){let e=document.createElement("div");e.setAttribute("data-hc-popin-overlay-background",""),t.prepend(e),t.parentNode.insertBefore(e,t),e.appendChild(t),document.querySelectorAll("[data-hc-popin-overlay-background]")[0].addEventListener("click",e=>{e.composedPath().includes(t)||this.close(t)})}if(t.hasAttribute("data-hc-popin-position-top")&&(t.style.top=t.getAttribute("data-hc-popin-position-top")),t.hasAttribute("data-hc-popin-position-bottom")&&(t.style.bottom=t.getAttribute("data-hc-popin-position-bottom")),t.hasAttribute("data-hc-popin-position-left")&&(t.style.left=t.getAttribute("data-hc-popin-position-left")),t.hasAttribute("data-hc-popin-position-right")&&(t.style.right=t.getAttribute("data-hc-popin-position-right")),t.hasAttribute("data-hc-popin-position-top")||t.hasAttribute("data-hc-popin-position-top")||(t.style.bottom="20px"),t.hasAttribute("data-hc-popin-position-left")||t.hasAttribute("data-hc-popin-position-right")||(t.style.right="20px"),t.hasAttribute("data-hc-popin-mode")&&"trigger"===t.getAttribute("data-hc-popin-mode"))for(let t of document.querySelectorAll("[data-hc-popin-trigger]"))t.addEventListener("click",t=>{let e=t.currentTarget.getAttribute("href");this.show(document.getElementById(e.substring(1)))});else t.hasAttribute("data-hc-popin-delay")?setTimeout(()=>{this.show(t)},t.getAttribute("data-hc-popin-delay")):this.show(t);t.querySelectorAll("[data-hc-popin-close]")[0].addEventListener("click",e=>{e.preventDefault(),this.close(t)})}}show(t){t.classList.add("hc-popin-show");let e=t.parentNode;e.hasAttribute("data-hc-popin-overlay-background")&&e.classList.add("hc-popin-overlay-show"),document.dispatchEvent(this.showEvent)}close(t){t.classList.remove("hc-popin-show");let e=t.parentNode;e.hasAttribute("data-hc-popin-overlay-background")&&e.classList.remove("hc-popin-overlay-show"),document.dispatchEvent(this.hideEvent)}createEvent(t){this.showEvent=new CustomEvent("show.hc.popin",{detail:{element:t}}),this.hideEvent=new CustomEvent("hide.hc.popin",{detail:{element:t}})}}let hc_popin=t=>{new HcPopin(t)};export default hc_popin;
14
+ */import t from"../../enumerators/element.enum";import"./popin.component.scss";export class HcPopin{showEvent;hideEvent;constructor(e=t.popin){for(let t of document.querySelectorAll(e)){this.createEvent(t);let e=document.createElement("button");if(e.setAttribute("data-hc-popin-close",""),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"></path></svg>',t.prepend(e),t.hasAttribute("data-hc-popin-overlay")){let e=document.createElement("div");e.setAttribute("data-hc-popin-overlay-background",""),t.prepend(e),t.parentNode.insertBefore(e,t),e.appendChild(t),document.querySelectorAll("[data-hc-popin-overlay-background]")[0].addEventListener("click",e=>{e.composedPath().includes(t)||this.close(t)})}if(t.hasAttribute("data-hc-popin-position-top")&&(t.style.top=t.getAttribute("data-hc-popin-position-top")),t.hasAttribute("data-hc-popin-position-bottom")&&(t.style.bottom=t.getAttribute("data-hc-popin-position-bottom")),t.hasAttribute("data-hc-popin-position-left")&&(t.style.left=t.getAttribute("data-hc-popin-position-left")),t.hasAttribute("data-hc-popin-position-right")&&(t.style.right=t.getAttribute("data-hc-popin-position-right")),t.hasAttribute("data-hc-popin-position-top")||t.hasAttribute("data-hc-popin-position-top")||(t.style.bottom="20px"),t.hasAttribute("data-hc-popin-position-left")||t.hasAttribute("data-hc-popin-position-right")||(t.style.right="20px"),t.hasAttribute("data-hc-popin-mode")&&"trigger"===t.getAttribute("data-hc-popin-mode"))for(let t of document.querySelectorAll("[data-hc-popin-trigger]"))t.addEventListener("click",t=>{let e=t.currentTarget.getAttribute("href");this.show(document.getElementById(e.substring(1)))});else t.hasAttribute("data-hc-popin-delay")?setTimeout(()=>{this.show(t)},t.getAttribute("data-hc-popin-delay")):this.show(t);t.querySelectorAll("[data-hc-popin-close]")[0].addEventListener("click",e=>{e.preventDefault(),this.close(t)})}}show(t){t.classList.add("hc-popin-show");let e=t.parentNode;e.hasAttribute("data-hc-popin-overlay-background")&&e.classList.add("hc-popin-overlay-show"),document.dispatchEvent(this.showEvent)}close(t){t.classList.remove("hc-popin-show");let e=t.parentNode;e.hasAttribute("data-hc-popin-overlay-background")&&e.classList.remove("hc-popin-overlay-show"),document.dispatchEvent(this.hideEvent)}createEvent(t){this.showEvent=new CustomEvent("show.hc.popin",{detail:{element:t}}),this.hideEvent=new CustomEvent("hide.hc.popin",{detail:{element:t}})}}let hc_popin=t=>{new HcPopin(t)};export default hc_popin;
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 22/02/2022 17:21
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import e from"../../enumerators/element.enum";import i from"../../libraries/swiper-11";export class HcSlider{slider;instances=[];breakpoints=[{name:"medium",value:651},{name:"large",value:1001},{name:"xlarge",value:1454}];options={};initEvent;constructor(s=e.slider){for(let e of s)this.initEvent=new Event("init.hc.slider"),this.initOptions(),this.slider=e,this.setOptions(),this.buildDom(),i.create(e,this.options).then(e=>{this.instances.push(e)})}setOptions(){let e=this.slider.getAttribute("data-hc-slider-autoplay");null!==e&&(this.options.autoplay={delay:e});let i={},s=[{hcKey:"gap",libKey:"spaceBetween",callback:"parseFloat"},{hcKey:"slides-per-view",libKey:"slidesPerView",callback:"parseFloat"},{hcKey:"no-swipe",libKey:"allowTouchMove",callback:"parseReverseBool"}];for(let e of(s.map(e=>{let i=this.slider.getAttribute(`data-hc-slider-${e.hcKey}`);null!==i&&("parseReverseBool"===e.callback&&(i="true"!==i),"parseBool"===e.callback&&(i="true"===i),"parseFloat"===e.callback&&(i=Number.parseFloat(i)),this.options[e.libKey]=i)}),this.breakpoints)){let t={};s.map(i=>{let s=this.slider.getAttribute(`data-hc-slider-${i.hcKey}-${e.name}`);null!==s&&("parseReverseBool"===i.callback&&(s="true"!==s),"parseBool"===i.callback&&(s="true"===s),"parseFloat"===i.callback&&(s=Number.parseFloat(s)),t[i.libKey]=s)}),Object.getOwnPropertyNames(t).length>0&&(i[e.value]=t)}if(this.options.breakpoints=i,null!==this.slider.getAttribute("data-hc-slider-free-mode")&&(this.options.freeMode={enabled:!0}),this.slider.hasAttribute("data-hc-slider-pagination")&&(this.options.pagination={el:".hc-slider-pagination",type:"bullets",clickable:!0,dynamicBullets:!1,bulletClass:"hc-slider-pagination-bullet",clickableClass:"hc-slider-pagination-clickable",currentClass:"hc-slider-pagination-current",bulletActiveClass:"hc-slider-pagination-bullet-active"}),this.slider.hasAttribute("data-hc-slider-arrows")){let e=this.slider.getAttribute("data-hc-slider-arrows"),i=this.slider.hasAttribute("data-hc-slider-arrows-wrapper")?".hc-slider-buttons":null,s=this.slider.hasAttribute("data-hc-slider-arrow-prev")?this.slider.getAttribute("data-hc-slider-arrow-prev"):`.hc-slider-button-prev${e}`,t=this.slider.hasAttribute("data-hc-slider-arrow-next")?this.slider.getAttribute("data-hc-slider-arrow-next"):`.hc-slider-button-next${e}`;this.options.navigation={prevEl:s,nextEl:t,wrapperEl:i,disabledClass:`hc-slider-button-disabled${e}`,hiddenClass:`hc-slider-button-hidden${e}`}}this.slider.hasAttribute("data-hc-slider-fade-effect")&&(this.options.effect="fade",this.options.fadeEffect={crossFade:!0}),this.slider.hasAttribute("data-hc-slider-infinite")&&(this.options.loop=!0),this.slider.hasAttribute("data-hc-slider-disable-mousewheel")&&(this.options.mousewheel=!1),this.options.watchOverflow=!0}buildDom(){if(0===this.slider.querySelectorAll(".swiper-wrapper").length){let e=[].slice.call(this.slider.children);for(let i of e)i.classList.add("swiper-slide"),i.setAttribute("aria-roledescription","slide");let i=document.createElement("div");for(let s of(i.classList.add("swiper-wrapper"),e))i.appendChild(s);if(this.slider.appendChild(i),!1!==this.options.pagination&&0===this.slider.querySelectorAll(this.options.pagination.el).length){let e=document.createElement("div");e.classList.add(this.options.pagination.el.substr(1)),this.slider.appendChild(e)}if(!1!==this.options.navigation){let e=this.slider.querySelectorAll(this.options.navigation.prevEl),i=this.slider.querySelectorAll(this.options.navigation.nextEl);if(this.slider.hasAttribute("data-hc-slider-arrows-wrapper")&&0===e.length&&0===i.length){let e=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");i.classList.add(this.options.navigation.prevEl.substr(1)),s.classList.add(this.options.navigation.nextEl.substr(1)),e.classList.add(this.options.navigation.wrapperEl.substr(1)),e.appendChild(i),e.appendChild(s),this.slider.prepend(e)}else{if(!this.slider.hasAttribute("data-hc-slider-arrow-prev")&&0===e.length){let e=document.createElement("div");e.classList.add(this.options.navigation.prevEl.substr(1)),this.slider.appendChild(e)}if(!this.slider.hasAttribute("data-hc-slider-arrow-next")&&0===i.length){let e=document.createElement("div");e.classList.add(this.options.navigation.nextEl.substr(1)),this.slider.appendChild(e)}}}}}initOptions(){this.options={slidesPerView:"auto",pagination:!1,navigation:!1,mousewheel:{forceToAxis:!0},grabCursor:!0,loop:!1,watchSlidesProgress:!0,a11y:{prevSlideMessage:IRISCollectionTheme.translate.slider.prevSlideMessage??"Slide pr\xe9c\xe9dente",nextSlideMessage:IRISCollectionTheme.translate.slider.nextSlideMessage??"Slide suivante",firstSlideMessage:IRISCollectionTheme.translate.slider.firstSlideMessage??"Vous \xeates sur la premi\xe8re slide",lastSlideMessage:IRISCollectionTheme.translate.slider.lastSlideMessage??"Vous avez atteint la derni\xe8re slide",paginationBulletMessage:IRISCollectionTheme.translate.slider.paginationBulletMessage??"Aller sur la slide {{index}}",slideLabelMessage:IRISCollectionTheme.translate.slider.slideLabelMessage??"Slide {{index}} sur {{slidesLength}}"},on:{init:e=>{$(e.el).find(".swiper-wrapper").addClass("hc-slider-wrapper"),$(e.el).addClass("hc-slider-initialized"),$(e.el).find(".swiper-slide").addClass("hc-slider-slide"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),e.isLocked&&$(e.el).addClass("hc-slider-lock"),this.slider.dispatchEvent(this.initEvent)},afterInit:e=>{this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")},slideChangeTransitionEnd:e=>{$(e.el).find(".swiper-slide").removeClass("hc-slider-slide-active").removeClass("hc-slider-slide-next").removeClass("hc-slider-slide-prev"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")}},breakpoints:{}}}}let hc_slider=e=>new HcSlider(e);export default hc_slider;
14
+ */import e from"../../enumerators/element.enum";import i from"../../libraries/swiper-11";export class HcSlider{slider;instances=[];breakpoints=[{name:"medium",value:651},{name:"large",value:1001},{name:"xlarge",value:1454}];options={};initEvent;constructor(s=e.slider){for(let e of document.querySelectorAll(s))this.initEvent=new Event("init.hc.slider"),this.initOptions(),this.slider=e,this.setOptions(),this.buildDom(),i.create(e,this.options).then(e=>{this.instances.push(e)})}setOptions(){let e=this.slider.getAttribute("data-hc-slider-autoplay");null!==e&&(this.options.autoplay={delay:e});let i={},s=[{hcKey:"gap",libKey:"spaceBetween",callback:"parseFloat"},{hcKey:"slides-per-view",libKey:"slidesPerView",callback:"parseFloat"},{hcKey:"no-swipe",libKey:"allowTouchMove",callback:"parseReverseBool"}];for(let e of(s.map(e=>{let i=this.slider.getAttribute(`data-hc-slider-${e.hcKey}`);null!==i&&("parseReverseBool"===e.callback&&(i="true"!==i),"parseBool"===e.callback&&(i="true"===i),"parseFloat"===e.callback&&(i=Number.parseFloat(i)),this.options[e.libKey]=i)}),this.breakpoints)){let t={};s.map(i=>{let s=this.slider.getAttribute(`data-hc-slider-${i.hcKey}-${e.name}`);null!==s&&("parseReverseBool"===i.callback&&(s="true"!==s),"parseBool"===i.callback&&(s="true"===s),"parseFloat"===i.callback&&(s=Number.parseFloat(s)),t[i.libKey]=s)}),Object.getOwnPropertyNames(t).length>0&&(i[e.value]=t)}if(this.options.breakpoints=i,null!==this.slider.getAttribute("data-hc-slider-free-mode")&&(this.options.freeMode={enabled:!0}),this.slider.hasAttribute("data-hc-slider-pagination")&&(this.options.pagination={el:".hc-slider-pagination",type:"bullets",clickable:!0,dynamicBullets:!1,bulletClass:"hc-slider-pagination-bullet",clickableClass:"hc-slider-pagination-clickable",currentClass:"hc-slider-pagination-current",bulletActiveClass:"hc-slider-pagination-bullet-active"}),this.slider.hasAttribute("data-hc-slider-arrows")){let e=this.slider.getAttribute("data-hc-slider-arrows"),i=this.slider.hasAttribute("data-hc-slider-arrows-wrapper")?".hc-slider-buttons":null,s=this.slider.hasAttribute("data-hc-slider-arrow-prev")?this.slider.getAttribute("data-hc-slider-arrow-prev"):`.hc-slider-button-prev${e}`,t=this.slider.hasAttribute("data-hc-slider-arrow-next")?this.slider.getAttribute("data-hc-slider-arrow-next"):`.hc-slider-button-next${e}`;this.options.navigation={prevEl:s,nextEl:t,wrapperEl:i,disabledClass:`hc-slider-button-disabled${e}`,hiddenClass:`hc-slider-button-hidden${e}`}}this.slider.hasAttribute("data-hc-slider-fade-effect")&&(this.options.effect="fade",this.options.fadeEffect={crossFade:!0}),this.slider.hasAttribute("data-hc-slider-infinite")&&(this.options.loop=!0),this.slider.hasAttribute("data-hc-slider-disable-mousewheel")&&(this.options.mousewheel=!1),this.options.watchOverflow=!0}buildDom(){if(0===this.slider.querySelectorAll(".swiper-wrapper").length){let e=[].slice.call(this.slider.children);for(let i of e)i.classList.add("swiper-slide"),i.setAttribute("aria-roledescription","slide");let i=document.createElement("div");for(let s of(i.classList.add("swiper-wrapper"),e))i.appendChild(s);if(this.slider.appendChild(i),!1!==this.options.pagination&&0===this.slider.querySelectorAll(this.options.pagination.el).length){let e=document.createElement("div");e.classList.add(this.options.pagination.el.substr(1)),this.slider.appendChild(e)}if(!1!==this.options.navigation){let e=this.slider.querySelectorAll(this.options.navigation.prevEl),i=this.slider.querySelectorAll(this.options.navigation.nextEl);if(this.slider.hasAttribute("data-hc-slider-arrows-wrapper")&&0===e.length&&0===i.length){let e=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");i.classList.add(this.options.navigation.prevEl.substr(1)),s.classList.add(this.options.navigation.nextEl.substr(1)),e.classList.add(this.options.navigation.wrapperEl.substr(1)),e.appendChild(i),e.appendChild(s),this.slider.prepend(e)}else{if(!this.slider.hasAttribute("data-hc-slider-arrow-prev")&&0===e.length){let e=document.createElement("div");e.classList.add(this.options.navigation.prevEl.substr(1)),this.slider.appendChild(e)}if(!this.slider.hasAttribute("data-hc-slider-arrow-next")&&0===i.length){let e=document.createElement("div");e.classList.add(this.options.navigation.nextEl.substr(1)),this.slider.appendChild(e)}}}}}initOptions(){this.options={slidesPerView:"auto",pagination:!1,navigation:!1,mousewheel:{forceToAxis:!0},grabCursor:!0,loop:!1,watchSlidesProgress:!0,a11y:{prevSlideMessage:IRISCollectionTheme.translate.slider.prevSlideMessage??"Slide pr\xe9c\xe9dente",nextSlideMessage:IRISCollectionTheme.translate.slider.nextSlideMessage??"Slide suivante",firstSlideMessage:IRISCollectionTheme.translate.slider.firstSlideMessage??"Vous \xeates sur la premi\xe8re slide",lastSlideMessage:IRISCollectionTheme.translate.slider.lastSlideMessage??"Vous avez atteint la derni\xe8re slide",paginationBulletMessage:IRISCollectionTheme.translate.slider.paginationBulletMessage??"Aller sur la slide {{index}}",slideLabelMessage:IRISCollectionTheme.translate.slider.slideLabelMessage??"Slide {{index}} sur {{slidesLength}}"},on:{init:e=>{$(e.el).find(".swiper-wrapper").addClass("hc-slider-wrapper"),$(e.el).addClass("hc-slider-initialized"),$(e.el).find(".swiper-slide").addClass("hc-slider-slide"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),e.isLocked&&$(e.el).addClass("hc-slider-lock"),this.slider.dispatchEvent(this.initEvent)},afterInit:e=>{this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")},slideChangeTransitionEnd:e=>{$(e.el).find(".swiper-slide").removeClass("hc-slider-slide-active").removeClass("hc-slider-slide-next").removeClass("hc-slider-slide-prev"),$(e.el).find(".swiper-slide-active").addClass("hc-slider-slide-active"),$(e.el).find(".swiper-slide-next").addClass("hc-slider-slide-next"),$(e.el).find(".swiper-slide-prev").addClass("hc-slider-slide-prev"),this.slider.hasAttribute("data-hc-slider-disable-arrows-focus")&&$(e.el).find(".hc-slider-buttons > *").removeAttr("tabindex"),this.slider.hasAttribute("data-hc-slider-disable-pagination-focus")&&$(e.el).find(".hc-slider-pagination > *").removeAttr("tabindex")}},breakpoints:{}}}}let hc_slider=e=>new HcSlider(e);export default hc_slider;
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 22/02/2022 16:50
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import e from"../../enumerators/element.enum";export class HcToggle{constructor(t=e.toggle){for(let e of t)e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.dataset.hcToggleAttribute,r=e.currentTarget.dataset.hcToggleValue,l=e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href"):e.currentTarget.dataset.hcToggleTarget;for(let e of document.querySelectorAll(l))null!==e.getAttribute(t)&&-1!==e.getAttribute(t).indexOf(r)?"class"===t?e.classList.remove(r):e.removeAttribute(t):"class"===t?e.classList.add(r):e.setAttribute(t,r)})}}let hc_toggle=e=>new HcToggle(e);export default hc_toggle;
14
+ */import e from"../../enumerators/element.enum";export class HcToggle{constructor(t=e.toggle){for(let e of document.querySelectorAll(t))e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.dataset.hcToggleAttribute,r=e.currentTarget.dataset.hcToggleValue,l=e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href"):e.currentTarget.dataset.hcToggleTarget;for(let e of document.querySelectorAll(l))null!==e.getAttribute(t)&&-1!==e.getAttribute(t).indexOf(r)?"class"===t?e.classList.remove(r):e.removeAttribute(t):"class"===t?e.classList.add(r):e.setAttribute(t,r)})}}let hc_toggle=e=>new HcToggle(e);export default hc_toggle;