@iris.interactive/handcook 8.0.0-alpha.1 → 8.0.0-alpha.10

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.
Files changed (43) hide show
  1. package/.stylelintrc +89 -0
  2. package/README.md +1 -1
  3. package/biome.json +43 -0
  4. package/package.json +33 -34
  5. package/public/index.css +1 -0
  6. package/public/index.html +1 -1
  7. package/public/index.js +227 -0
  8. package/public/scripts/components/collapse/collapse.component.js +14 -1
  9. package/public/scripts/components/dropdown/dropdown.component.js +14 -1
  10. package/public/scripts/components/lazyload/lazyload.component.js +1 -1
  11. package/public/scripts/components/lightbox/lightbox.component.js +14 -1
  12. package/public/scripts/components/modal/modal.component.js +14 -1
  13. package/public/scripts/components/nats/nats.component.js +14 -1
  14. package/public/scripts/components/overlay/overlay.component.js +1 -1
  15. package/public/scripts/components/popin/popin.component.js +14 -1
  16. package/public/scripts/components/scroll-reveal/scroll-reveal.component.js +14 -1
  17. package/public/scripts/components/scrollspy/scrollspy.component.js +1 -1
  18. package/public/scripts/components/share/share.component.js +1 -1
  19. package/public/scripts/components/slider/slider.component.js +14 -1
  20. package/public/scripts/components/smooth-scroll/smooth-scroll.component.js +15 -1
  21. package/public/scripts/components/tab/tab.component.js +14 -1
  22. package/public/scripts/components/toggle/toggle.component.js +14 -1
  23. package/public/scripts/components/tooltip/tooltip.component.js +14 -1
  24. package/public/scripts/enumerators/element.enum.js +14 -1
  25. package/public/scripts/enumerators/smooth-scroll.enum.js +14 -1
  26. package/public/scripts/enumerators/tooltip.enum.js +14 -1
  27. package/public/scripts/handcook.js +14 -1
  28. package/public/scripts/hc_swiper_v11.js +5 -0
  29. package/public/scripts/libraries/swiper-11/index.js +7 -0
  30. package/public/scripts/support/cookie.support.js +1 -1
  31. package/public/scripts/support/hash.support.js +1 -1
  32. package/public/scripts/support/toggle-html.support.js +1 -1
  33. package/public/styles/hc_swiper_v11.css +1 -0
  34. package/public/styles/hc_swiper_v11.js +1 -0
  35. package/public/styles/scss/_utils.scss +11 -4
  36. package/public/styles/scss/_variables.scss +11 -3
  37. package/public/styles/scss/mixins/_mixin-font.scss +14 -3
  38. package/public/styles/scss/mixins/_mixin-style.scss +5 -9
  39. package/public/static/css/989.b832cc44.css +0 -1
  40. package/public/static/css/index.0ac21166.css +0 -1
  41. package/public/static/js/989.a4a97e0e.js +0 -23
  42. package/public/static/js/989.a4a97e0e.js.LICENSE.txt +0 -5
  43. package/public/static/js/index.67977b9b.js +0 -1
@@ -1 +1,14 @@
1
- import e from"../../enumerators/element.enum";import"./collapse.component.scss";import t from"bootstrap/js/src/collapse";export class HcCollapse{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(s=e.collapse,n="collapse"){this.createEvent(),[].slice.call(document.querySelectorAll(s)).map(function(e){let s=e.getAttribute("data-hc-collapse-parent"),n={toggle:!1};return null!==s&&(n.parent=s),new t(e,n)}).map(function(e){document.querySelectorAll(`[data-hc-collapse-trigger="${e._element.getAttribute("data-hc-collapse")}"]`).forEach(t=>{t.addEventListener("click",function(t){t.preventDefault(),e.toggle()})})}),document.querySelectorAll("[data-hc-collapse]").forEach(e=>{let t=document.querySelectorAll(`[data-hc-collapse-trigger="${e.getAttribute("id")}"]`);e.addEventListener("hide.bs.collapse",s=>{t.forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")}),e.dispatchEvent(this.hideEvent)}),e.addEventListener("hidden.bs.collapse",t=>{e.dispatchEvent(this.hiddenEvent)}),e.addEventListener("show.bs.collapse",s=>{t.forEach(e=>{!e.classList.contains("active")&&e.classList.add("active")}),e.dispatchEvent(this.showEvent)}),e.addEventListener("shown.bs.collapse",t=>{e.dispatchEvent(this.shownEvent)})})}createEvent(){this.showEvent=new Event("show.hc.collapse"),this.shownEvent=new Event("shown.hc.collapse"),this.hideEvent=new Event("hide.hc.collapse"),this.hiddenEvent=new Event("hidden.hc.collapse")}}let hc_collapse=function(e){return new HcCollapse(e)};export default hc_collapse;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 21/02/2022 17:30
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import e from"../../enumerators/element.enum";import"./collapse.component.scss";import t from"bootstrap/js/src/collapse";export class HcCollapse{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(s=e.collapse,l="collapse"){for(let e of(this.createEvent(),[].slice.call(document.querySelectorAll(s)).map(e=>{let s=e.getAttribute("data-hc-collapse-parent"),l={toggle:!1};return null!==s&&(l.parent=s),new t(e,l)}).map(e=>{for(let t of document.querySelectorAll(`[data-hc-collapse-trigger="${e._element.getAttribute("data-hc-collapse")}"]`)){let s=t=>{t.preventDefault(),e.toggle()};t.addEventListener("click",s),t.addEventListener("keydown",e=>{13===e.which&&s(e)})}}),document.querySelectorAll("[data-hc-collapse]"))){let t=document.querySelectorAll(`[data-hc-collapse-trigger="${e.getAttribute("id")}"]`);e.addEventListener("hide.bs.collapse",s=>{for(let e of t)e.classList.contains("active")&&e.classList.remove("active"),e.setAttribute("aria-expanded","false");e.dispatchEvent(this.hideEvent)}),e.addEventListener("hidden.bs.collapse",t=>{e.dispatchEvent(this.hiddenEvent)}),e.addEventListener("show.bs.collapse",s=>{for(let e of t)e.classList.contains("active")||e.classList.add("active"),e.setAttribute("aria-expanded","true");e.dispatchEvent(this.showEvent)}),e.addEventListener("shown.bs.collapse",t=>{e.dispatchEvent(this.shownEvent)})}}createEvent(){this.showEvent=new Event("show.hc.collapse"),this.shownEvent=new Event("shown.hc.collapse"),this.hideEvent=new Event("hide.hc.collapse"),this.hiddenEvent=new Event("hidden.hc.collapse")}}let hc_collapse=e=>new HcCollapse(e);export default hc_collapse;
@@ -1 +1,14 @@
1
- import e from"../../enumerators/element.enum";import n,{hideAll as o}from"tippy.js";import"tippy.js/dist/tippy.css";import"./dropdown.component.scss";export class HcDropdown{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(o=e.dropdown){window.hc_dropdown=window.hc_dropdown||[],this.createEvent(),document.querySelectorAll(o).forEach(e=>{let o=document.querySelector(e.dataset.hcDropdownMenu),t=n(e,{trigger:"click",allowHTML:!0,content:o.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(){void 0!==window.hc_dropdown&&window.hc_dropdown.forEach(e=>{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=function(e){return new HcDropdown(e)};export default hc_dropdown;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 21/02/2022 10:14
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(),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;
@@ -1 +1 @@
1
- import a from"vanilla-lazyload";export class HcLazyload{static instance;constructor(t={}){t=Object.assign({elements_selector:"[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi], [data-hc-srcset]",data_src:"hc-src",data_bg:"hc-bg",data_bg_hidpi:"hc-bg-hidpi",data_srcset:"hc-srcset"},t),this.lazyLoadInstance=new a(t)}static getInstance(a={}){return!HcLazyload.instance&&(HcLazyload.instance=new HcLazyload(a)),HcLazyload.instance.lazyLoadInstance}static update(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.update&&t.update()}static loadAll(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.loadAll&&t.loadAll()}}let hc_lazyload=function(a={}){return HcLazyload.getInstance(a)};export default hc_lazyload;
1
+ export class HcLazyload{static instance;constructor(){HcLazyload.init()}static init(){for(let t of document.querySelectorAll("[data-hc-src]"))t.setAttribute("loading","lazy"),t.setAttribute("src",t.getAttribute("data-hc-src")),t.removeAttribute("data-hc-src");for(let t of document.querySelectorAll("[data-hc-srcset]"))t.setAttribute("srcset",t.getAttribute("data-hc-srcset")),t.removeAttribute("data-hc-srcset");let t=new IntersectionObserver((t,a)=>{for(let e of t)if(e.isIntersecting){let t=e.target;t.style.backgroundImage=`url(${t.getAttribute("data-hc-bg")})`,a.unobserve(t),t.removeAttribute("data-hc-bg")}},{root:null,rootMargin:"200px"});for(let a of document.querySelectorAll("[data-hc-bg]"))!0!==a.isLazyHandled&&(t.observe(a),a.isLazyHandled=!0)}static getInstance(){HcLazyload.instance||(HcLazyload.instance=new HcLazyload)}static update(){HcLazyload.instance?HcLazyload.init():HcLazyload.instance=new HcLazyload}static loadAll(){HcLazyload.instance?HcLazyload.init():HcLazyload.instance=new HcLazyload}}let hc_lazyload=()=>HcLazyload.getInstance();export default hc_lazyload;
@@ -1 +1,14 @@
1
- import{Fancybox as e}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox.css";import"./lightbox.component.scss";import t from"../../enumerators/element.enum";export class HcLightbox{constructor(o=t.lightbox,r={}){o===t.lightbox&&Object.assign(r,{groupAttr:t.lightboxAttr,l10n:this.getTranslation()}),e.bind(o,r),this.attachEventToShowButton()}attachEventToShowButton(){document.querySelectorAll("[data-hc-lightbox-show]").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),document.querySelector(e.getAttribute("href")+" img").click()})})}getTranslation(){let e=document.querySelector("html")?.getAttribute("lang");return"string"==typeof e&&!1!==e.indexOf("fr-FR")?{CLOSE:"Fermer",NEXT:"Suivant",PREV:"Pr\xe9c\xe9dent",MODAL:"Vous pouvez fermer la modal avec la touche echap",ERROR:"Quelque chose c'est mal pass\xe9. Merci d'essayer plus tard\n",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"\xc9lement HTML introuvable",AJAX_NOT_FOUND:"Erreur de chargement AJAX : Introuvable",AJAX_FORBIDDEN:"Erreur de chargement AJAX : Interdit",IFRAME_ERROR:"Erreur du chargement de la page",TOGGLE_ZOOM:"Zoome/dezoome",TOGGLE_THUMBS:"Affiche/cache les miniatures",TOGGLE_SLIDESHOW:"Active/d\xe9sactive le d\xe9filement automatique",TOGGLE_FULLSCREEN:"Bascule le mode plein \xe9cran",DOWNLOAD:"T\xe9l\xe9charger"}:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}}}let hc_lightbox=function(e=t.lightbox,o={}){return new HcLightbox(e,o)};export default hc_lightbox;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 21/02/2022 09:57
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import{Fancybox as e}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox.css";import"./lightbox.component.scss";import t from"../../enumerators/element.enum";export class HcLightbox{constructor(o=t.lightbox,r={}){o===t.lightbox&&Object.assign(r,{groupAttr:t.lightboxAttr,l10n:this.getTranslation()}),e.bind(o,r),this.attachEventToShowButton()}attachEventToShowButton(){for(let e of document.querySelectorAll("[data-hc-lightbox-show]"))e.addEventListener("click",t=>{t.preventDefault(),document.querySelector(`${e.getAttribute("href")} img`).click()})}getTranslation(){let e=document.querySelector("html")?.getAttribute("lang");return"string"==typeof e&&!1!==e.indexOf("fr-FR")?{CLOSE:"Fermer",NEXT:"Suivant",PREV:"Pr\xe9c\xe9dent",MODAL:"Vous pouvez fermer la modal avec la touche echap",ERROR:"Quelque chose c'est mal pass\xe9. Merci d'essayer plus tard\n",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"\xc9lement HTML introuvable",AJAX_NOT_FOUND:"Erreur de chargement AJAX : Introuvable",AJAX_FORBIDDEN:"Erreur de chargement AJAX : Interdit",IFRAME_ERROR:"Erreur du chargement de la page",TOGGLE_ZOOM:"Zoome/dezoome",TOGGLE_THUMBS:"Affiche/cache les miniatures",TOGGLE_SLIDESHOW:"Active/d\xe9sactive le d\xe9filement automatique",TOGGLE_FULLSCREEN:"Bascule le mode plein \xe9cran",DOWNLOAD:"T\xe9l\xe9charger"}:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}}}let hc_lightbox=(e=t.lightbox,o={})=>new HcLightbox(e,o);export default hc_lightbox;
@@ -1 +1,14 @@
1
- import t from"../../enumerators/element.enum";import{Fancybox as e}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox.css";import"./modal.component.scss";export class HcModal{showEvent;hideEvent;options={};constructor(o=t.modal,s={}){this.createEvent(),document.querySelectorAll(o).forEach(o=>{this.initOptions(),Object.assign(this.options,s),this.options.src=""!=this.options.src?this.options.src:o.hasAttribute("href")?o.getAttribute("href"):o.hasAttribute("data-src")?o.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):o.hasAttribute("data-hc-modal-parent")?document.querySelector(o.getAttribute("data-hc-modal-parent")):"",this.options.autoFocus=!!o.hasAttribute("data-hc-modal-autofocus");let n=`${t.modal}[${o.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;e.bind(n,Object.assign(this.options,{on:{done:()=>{document.dispatchEvent(this.showEvent)},closing:()=>{document.dispatchEvent(this.hideEvent)}}}))}),document.querySelectorAll(t.modalClose).forEach(t=>{t.addEventListener("click",t=>{t.preventDefault();let e=""===t.currentTarget.dataset.hcModalClose||t.currentTarget.dataset.hcModalClose;HcModal.close(e)})})}static show(t){e.show([t])}static close(t){e.close(t)}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=function(t,e){return new HcModal(t,e)};export default hc_modal;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 01/02/2022 11:01
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(),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,14 @@
1
- import{wsconnect as t}from"@nats-io/nats-core";export class HcNats{static server="wss://nats.iris-interactive.fr:443";constructor(){}static async initialize(){try{window.natsConnection=await t({servers:this.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(t){console.log(`error connecting to ${JSON.stringify(t)}`)}}async publishMessage(t,n){try{void 0===window.natsConnection&&await HcNats.initialize();let o={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:n};window.natsConnection.publish(t,JSON.stringify(o))}catch(t){console.log(`error messaging to ${JSON.stringify(t)}`)}}}let hc_nats=function(){return new HcNats};export default hc_nats;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Nicolas PAYS
12
+ * @date 10/10/2024 14:30
13
+ * @copyright Copyright (c) 2002-2024 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import{wsconnect as t}from"@nats-io/nats-core";export class HcNats{static server="wss://nats.iris-interactive.fr:443";static async initialize(){try{window.natsConnection=await t({servers:HcNats.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(t){console.log(`error connecting to ${JSON.stringify(t)}`)}}async publishMessage(t,e){try{void 0===window.natsConnection&&await HcNats.initialize();let n={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:e};window.natsConnection.publish(t,JSON.stringify(n))}catch(t){console.log(`error messaging to ${JSON.stringify(t)}`)}}}let hc_nats=()=>new HcNats;export default hc_nats;
@@ -1 +1 @@
1
- import e from"../../enumerators/element.enum";import"./overlay.component.scss";export class HcOverlay{showEvent;hideEvent;constructor(t=e.overlay){let r=this;document.querySelectorAll(t).forEach(t=>{r.createEvent(t),t.classList.add("hc-overlay-init"),document.querySelectorAll("[data-hc-overlay-trigger]").forEach(e=>{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;r.show(document.getElementById(t))})}),document.querySelectorAll("[data-hc-overlay-close]").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.getAttribute("data-hc-overlay-close");t&&r.close(document.getElementById(t))})}),document.querySelectorAll("[data-hc-overlay-background]").forEach(t=>{t.addEventListener("click",t=>{console.log("click"),t.preventDefault(),document.querySelectorAll(e.overlay).forEach(e=>{r.close(e)})})}),document.onkeyup=function(t){"Escape"===t.key&&document.querySelectorAll(e.overlay).forEach(e=>{r.close(e)})}})}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=function(e){return 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 o of document.querySelectorAll(t)){for(let e of(this.createEvent(o),o.classList.add("hc-overlay-init"),document.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 document.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 document.querySelectorAll("[data-hc-overlay-background]"))t.addEventListener("click",t=>{for(let o of(console.log("click"),t.preventDefault(),document.querySelectorAll(e.overlay)))this.close(o)});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 +1,14 @@
1
- import t from"../../enumerators/element.enum";import"./popin.component.scss";export class HcPopin{showEvent;hideEvent;constructor(e=t.popin){document.querySelectorAll(e).forEach(t=>{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)})}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")?document.querySelectorAll("[data-hc-popin-trigger]").forEach(t=>{t.addEventListener("click",t=>{let e=t.currentTarget.getAttribute("href");this.show(document.getElementById(e.substring(1)))})}):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=function(t){new HcPopin(t)};export default hc_popin;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Stephan JAMBOU
12
+ * @date 28/01/2022 14:27
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 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;
@@ -1 +1,14 @@
1
- import e from"../../enumerators/element.enum";import"./scroll-reveal.component.scss";export class HcScrollReveal{static distanceDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-distance");static delayDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-delay");static durationDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-duration");static intervalDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-interval");static originDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-origin");static timingFunctionDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-timing-function");constructor(){let t=Array.prototype.slice.call(document.querySelectorAll(e.scrollReveal)).concat(Array.prototype.slice.call(document.querySelectorAll(e.scrollRevealChildren)));HcScrollReveal.init(t)}static init(e){let t=0,l=1,r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.classList.contains("hc-sr")&&e.target.classList.add("hc-sr--show"):e.target.classList.add("hc-sr")})},{root:null,rootMargin:"-20px 0px -20px 0px",threshold:0});e.forEach(e=>{let a;let c=!1;if(e.hasAttribute("data-hc-scroll-reveal-parent")||e.hasAttribute("data-hc-scroll-reveal")||e.hasAttribute("data-hc-noscroll-reveal"))a=HcScrollReveal.getOptions(e);else{let t=e.parentElement;c=!0,a=HcScrollReveal.getOptions(t)}if(a.distance!==HcScrollReveal.distanceDefault&&""!==a.distance&&e.style.setProperty("--hc-scroll-reveal-distance",a.distance),a.delay!==HcScrollReveal.delayDefault&&null!==a.delay&&e.style.setProperty("--hc-scroll-reveal-delay",a.delay),a.duration!==HcScrollReveal.durationDefault&&null!==a.duration&&e.style.setProperty("--hc-scroll-reveal-duration",a.duration),a.timing!==HcScrollReveal.timingFunctionDefault&&null!==a.timing&&e.style.setProperty("--hc-scroll-reveal-timing-function",a.timing),null!==a.interval&&null!==a.delay&&c){if(t==e.offsetTop){let e=parseInt(a.delay.replace("ms",""))+parseInt(a.interval.replace("ms",""))*l;a.delay=e+"ms",l++}else t=e.offsetTop,l=1;e.style.setProperty("--hc-scroll-reveal-delay",a.delay)}""!==a.origin&&(e.style.setProperty("--hc-scroll-reveal-origin",a.origin),"top"==a.origin?e.style.setProperty("--hc-scroll-reveal-translate","translateY(calc(var(--hc-scroll-reveal-distance) * -1))"):"left"==a.origin?e.style.setProperty("--hc-scroll-reveal-translate","translateX(calc(var(--hc-scroll-reveal-distance) * -1))"):"right"==a.origin?e.style.setProperty("--hc-scroll-reveal-translate","translateX(var(--hc-scroll-reveal-distance))"):e.style.setProperty("--hc-scroll-reveal-translate","translateY(var(--hc-scroll-reveal-distance))")),r.observe(e)})}static getOptions(e){let t={distance:HcScrollReveal.distanceDefault,delay:HcScrollReveal.delayDefault,duration:HcScrollReveal.durationDefault,interval:HcScrollReveal.intervalDefault,origin:HcScrollReveal.originDefault,timing:HcScrollReveal.timingFunctionDefault};return e.hasAttribute("data-hc-scroll-reveal-distance")&&(t.distance=e.getAttribute("data-hc-scroll-reveal-distance")),e.hasAttribute("data-hc-scroll-reveal-delay")&&(t.delay=e.getAttribute("data-hc-scroll-reveal-delay")+"ms"),e.hasAttribute("data-hc-scroll-reveal-duration")&&(t.duration=e.getAttribute("data-hc-scroll-reveal-duration")+"ms"),e.hasAttribute("data-hc-scroll-reveal-interval")&&(t.interval=e.getAttribute("data-hc-scroll-reveal-interval")+"ms"),e.hasAttribute("data-hc-scroll-reveal-origin")&&(t.origin=e.getAttribute("data-hc-scroll-reveal-origin")),e.hasAttribute("data-hc-scroll-reveal-timing-function")&&(t.timing=e.getAttribute("data-hc-scroll-reveal-timing-function")),t}}let hc_scroll_reveal=function(){return new HcScrollReveal};export default hc_scroll_reveal;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Stephan JAMBOU
12
+ * @date 11/10/2023 18:27
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import e from"../../enumerators/element.enum";import"./scroll-reveal.component.scss";export class HcScrollReveal{static distanceDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-distance");static delayDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-delay");static durationDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-duration");static intervalDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-interval");static originDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-origin");static timingFunctionDefault=getComputedStyle(document.documentElement).getPropertyValue("--hc-scroll-reveal-timing-function");constructor(){let t=Array.prototype.slice.call(document.querySelectorAll(e.scrollReveal)).concat(Array.prototype.slice.call(document.querySelectorAll(e.scrollRevealChildren)));HcScrollReveal.init(t)}static init(e){let t=0,l=1,r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting?t.target.classList.contains("hc-sr")&&t.target.classList.add("hc-sr--show"):t.target.classList.add("hc-sr")},{root:null,rootMargin:"-20px 0px -20px 0px",threshold:0});for(let a of e){let e;if(a.isScrollRevealHandled)continue;let c=!1;if(a.hasAttribute("data-hc-scroll-reveal-parent")||a.hasAttribute("data-hc-scroll-reveal")||a.hasAttribute("data-hc-noscroll-reveal"))e=HcScrollReveal.getOptions(a);else{let t=a.parentElement;c=!0,e=HcScrollReveal.getOptions(t)}if(e.distance!==HcScrollReveal.distanceDefault&&""!==e.distance&&a.style.setProperty("--hc-scroll-reveal-distance",e.distance),e.delay!==HcScrollReveal.delayDefault&&null!==e.delay&&a.style.setProperty("--hc-scroll-reveal-delay",e.delay),e.duration!==HcScrollReveal.durationDefault&&null!==e.duration&&a.style.setProperty("--hc-scroll-reveal-duration",e.duration),e.timing!==HcScrollReveal.timingFunctionDefault&&null!==e.timing&&a.style.setProperty("--hc-scroll-reveal-timing-function",e.timing),null!==e.interval&&null!==e.delay&&c){if(t===a.offsetTop){let t=Number.parseInt(e.delay.replace("ms",""))+Number.parseInt(e.interval.replace("ms",""))*l;e.delay=`${t}ms`,l++}else t=a.offsetTop,l=1;a.style.setProperty("--hc-scroll-reveal-delay",e.delay)}""!==e.origin&&(a.style.setProperty("--hc-scroll-reveal-origin",e.origin),"top"===e.origin?a.style.setProperty("--hc-scroll-reveal-translate","translateY(calc(var(--hc-scroll-reveal-distance) * -1))"):"left"===e.origin?a.style.setProperty("--hc-scroll-reveal-translate","translateX(calc(var(--hc-scroll-reveal-distance) * -1))"):"right"===e.origin?a.style.setProperty("--hc-scroll-reveal-translate","translateX(var(--hc-scroll-reveal-distance))"):a.style.setProperty("--hc-scroll-reveal-translate","translateY(var(--hc-scroll-reveal-distance))")),r.observe(a),a.isScrollRevealHandled=!0}}static getOptions(e){let t={distance:HcScrollReveal.distanceDefault,delay:HcScrollReveal.delayDefault,duration:HcScrollReveal.durationDefault,interval:HcScrollReveal.intervalDefault,origin:HcScrollReveal.originDefault,timing:HcScrollReveal.timingFunctionDefault};return e.hasAttribute("data-hc-scroll-reveal-distance")&&(t.distance=e.getAttribute("data-hc-scroll-reveal-distance")),e.hasAttribute("data-hc-scroll-reveal-delay")&&(t.delay=`${e.getAttribute("data-hc-scroll-reveal-delay")}ms`),e.hasAttribute("data-hc-scroll-reveal-duration")&&(t.duration=`${e.getAttribute("data-hc-scroll-reveal-duration")}ms`),e.hasAttribute("data-hc-scroll-reveal-interval")&&(t.interval=`${e.getAttribute("data-hc-scroll-reveal-interval")}ms`),e.hasAttribute("data-hc-scroll-reveal-origin")&&(t.origin=e.getAttribute("data-hc-scroll-reveal-origin")),e.hasAttribute("data-hc-scroll-reveal-timing-function")&&(t.timing=e.getAttribute("data-hc-scroll-reveal-timing-function")),t}}let hc_scroll_reveal=()=>new HcScrollReveal;export default hc_scroll_reveal;
@@ -1 +1 @@
1
- import t from"../../enumerators/element.enum";export class HcScrollspy{activeEvent;constructor(e=t.scrollspy){document.querySelectorAll(e).forEach(e=>{let l=document.querySelector(e.dataset.hcScrollspy),r=null!==e.getAttribute("data-hc-scrollspy-shift")?parseInt(e.getAttribute("data-hc-scrollspy-shift")):0;null!==l&&this.activeItem(l,t.scrollspyNavItem,r)})}getPartsConfig(e,l){let r=[];return e.querySelectorAll(l).forEach(e=>{let l=null!==e.getAttribute("href")?{id:e.getAttribute("href"),value:0,attribute:"href"}:{id:e.getAttribute(t.scrollspyNavItemHref),value:0,attribute:t.scrollspyNavItemHref};null!==document.querySelector(l.id)&&(l.value=this.getOffset(document.querySelector(l.id)).top,r=[...r,l])}),r}activeItem(t,e,l=0){let r=t.querySelector(`${e}:first-child`);window.addEventListener("scroll",()=>{let s=this.getPartsConfig(t,e),c=window.scrollY;if(s.forEach(e=>{c>e.value-(l+50)&&(r=t.querySelector("["+e.attribute+'="'+e.id+'"]'))}),t.querySelectorAll(e).forEach(e=>{if(e!==r){let l=new CustomEvent("deactive.hc.scrollspy",{detail:{nav:t,item:r}});document.dispatchEvent(l),e.classList.contains("active")&&e.classList.remove("active")}}),!r.classList.contains("active")){let e=new CustomEvent("active.hc.scrollspy",{detail:{nav:t,item:r}});document.dispatchEvent(e),r.classList.add("active")}})}getOffset(t){let e=0,l=0;for(;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,l+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:l,left:e}}}let hc_scrollspy=function(t){return new HcScrollspy(t)};export default hc_scrollspy;
1
+ import t from"../../enumerators/element.enum";export class HcScrollspy{activeEvent;constructor(e=t.scrollspy){for(let l of document.querySelectorAll(e)){let e=document.querySelector(l.dataset.hcScrollspy),r=null!==l.getAttribute("data-hc-scrollspy-shift")?Number.parseInt(l.getAttribute("data-hc-scrollspy-shift")):0;null!==e&&this.activeItem(e,t.scrollspyNavItem,r)}}getPartsConfig(e,l){let r=[];for(let s of e.querySelectorAll(l)){let e=null!==s.getAttribute("href")?{id:s.getAttribute("href"),value:0,attribute:"href"}:{id:s.getAttribute(t.scrollspyNavItemHref),value:0,attribute:t.scrollspyNavItemHref};null!==document.querySelector(e.id)&&(e.value=this.getOffset(document.querySelector(e.id)).top,r=[...r,e])}return r}activeItem(t,e,l=0){let r=t.querySelector(`${e}:first-child`);window.addEventListener("scroll",()=>{let s=this.getPartsConfig(t,e),o=window.scrollY;for(let e of s)o>e.value-(l+50)&&(r=t.querySelector(`[${e.attribute}="${e.id}"]`));for(let l of t.querySelectorAll(e))if(l!==r){let e=new CustomEvent("deactive.hc.scrollspy",{detail:{nav:t,item:r}});document.dispatchEvent(e),l.classList.contains("active")&&l.classList.remove("active")}if(!r.classList.contains("active")){let e=new CustomEvent("active.hc.scrollspy",{detail:{nav:t,item:r}});document.dispatchEvent(e),r.classList.add("active")}})}getOffset(t){let e=0,l=0,r=t;for(;r&&!Number.isNaN(r.offsetLeft)&&!Number.isNaN(r.offsetTop);)e+=r.offsetLeft-r.scrollLeft,l+=r.offsetTop-r.scrollTop,r=r.offsetParent;return{top:l,left:e}}}let hc_scrollspy=t=>new HcScrollspy(t);export default hc_scrollspy;
@@ -1 +1 @@
1
- import e from"../../enumerators/share.enum";export default class a{constructor(){}static manageDisplayOfShareButtons(){navigator.share&&window.matchMedia("(max-width: 1024px)").matches?($(e.shareMobile).removeClass("hidden"),$(e.shareDesktop).addClass("hidden")):($(e.shareMobile).addClass("hidden"),$(e.shareDesktop).removeClass("hidden"))}static sharePage(){$('[data-share="mobile"]').on("click",e=>{e.preventDefault(),navigator.share&&navigator.share({title:document.title,url:window.location.href})})}static shareOnWhatsappWeb(){$(e.shareWhatsappService).on("click",function(e){e.preventDefault(),window.open("https://web.whatsapp.com/send?text="+$(location).attr("href"),"_blank")})}static shareOnMessengerWeb(){$(e.shareMessengerService).on("click",function(e){e.preventDefault(),window.open("http://www.facebook.com/dialog/send?app_id=702473707947207&link="+$(location).attr("href")+"&redirect_uri="+$(location).attr("href"),"_blank")})}}
1
+ import e from"../../enumerators/share.enum";export default class a{static manageDisplayOfShareButtons(){navigator.share&&window.matchMedia("(max-width: 1024px)").matches?($(e.shareMobile).removeClass("hidden"),$(e.shareDesktop).addClass("hidden")):($(e.shareMobile).addClass("hidden"),$(e.shareDesktop).removeClass("hidden"))}static sharePage(){$('[data-share="mobile"]').on("click",e=>{e.preventDefault(),navigator.share&&navigator.share({title:document.title,url:window.location.href})})}static shareOnWhatsappWeb(){$(e.shareWhatsappService).on("click",e=>{e.preventDefault(),window.open(`https://web.whatsapp.com/send?text=${$(location).attr("href")}`,"_blank")})}static shareOnMessengerWeb(){$(e.shareMessengerService).on("click",e=>{e.preventDefault(),window.open(`http://www.facebook.com/dialog/send?app_id=702473707947207&link=${$(location).attr("href")}&redirect_uri=${$(location).attr("href")}`,"_blank")})}}
@@ -1 +1,14 @@
1
- import e from"../../enumerators/element.enum";import i from"swiper/bundle";import"swiper/css";import"swiper/css/effect-fade";export class HcSlider{slider;instances=[];breakpoints=[{name:"medium",value:651},{name:"large",value:1001},{name:"xlarge",value:1454}];options={};initEvent;constructor(s=e.slider){document.querySelectorAll(s).forEach(e=>{this.initEvent=new Event("init.hc.slider"),this.initOptions(),this.slider=e,this.setOptions(),this.buildDom();let s=new i(e,this.options);this.instances.push(s)})}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"}];if(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=parseFloat(i)),this.options[e.libKey]=i)}),this.breakpoints.forEach(e=>{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=parseFloat(s)),t[i.libKey]=s)}),Object.getOwnPropertyNames(t).length>0&&(i[e.value]=t)}),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.slider.hasAttribute("data-hc-slider-lazy")&&(this.options.lazy={enabled:!0,checkInView:!0,loadPrevNext:!0,elementClass:"hc-slider-lazy",loadedClass:"hc-slider-lazy-loaded",loadingClass:"hc-slider-lazy-loading",preloaderClass:"hc-slider-lazy-preloader"}),this.options.watchOverflow=!0}buildDom(){if(0===this.slider.querySelectorAll(".swiper-wrapper").length){let e=[].slice.call(this.slider.children);e.forEach(e=>{e.classList.add("swiper-slide")});let i=document.createElement("div");if(i.classList.add("swiper-wrapper"),e.forEach(e=>{i.appendChild(e)}),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.appendChild(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,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)},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")}},breakpoints:{}}}}let hc_slider=function(e){return new HcSlider(e)};export default hc_slider;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 22/02/2022 17:21
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 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;
@@ -1 +1,15 @@
1
- import e from"../../enumerators/element.enum";import t from"../../enumerators/smooth-scroll.enum";export class HcSmoothScroll{constructor(r=e.scrollSmooth,o=1e3){document.querySelectorAll(r).forEach(e=>{e.addEventListener("click",e=>{e.preventDefault();let r=null!=e.currentTarget.getAttribute("href")?document.querySelector(e.currentTarget.getAttribute("href")):document.querySelector(e.currentTarget.dataset.hcSmoothScrollHref),l=null!==e.currentTarget.getAttribute(t.attrShift)?e.currentTarget.getAttribute(t.attrShift):0;requestAnimationFrame(e=>{let t=e||new Date().getTime(),c=window.pageYOffset,n=r.getBoundingClientRect().top-l;this.scrollToElem(t,t,o,n,c)})})})}easeInCubic(e){return e*e*e}scrollToElem(e,t,r,o,l){let c=t-e,n=c/r;n=Math.min(n,1);let u=this.easeInCubic(n);window.scroll(0,l+o*u),c<r&&requestAnimationFrame(t=>{let c=t||new Date().getTime();this.scrollToElem(e,c,r,o,l)})}}let hc_smooth_scroll=function(e,t){new HcSmoothScroll(e,t)};export default hc_smooth_scroll;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 28/01/2022 14:27
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ * @deprecated 5.0.17
15
+ */import e from"../../enumerators/element.enum";import t from"../../enumerators/smooth-scroll.enum";export class HcSmoothScroll{constructor(r=e.scrollSmooth,o=1e3){for(let e of document.querySelectorAll(r))e.addEventListener("click",e=>{e.preventDefault();let r=null!=e.currentTarget.getAttribute("href")?document.querySelector(e.currentTarget.getAttribute("href")):document.querySelector(e.currentTarget.dataset.hcSmoothScrollHref),l=null!==e.currentTarget.getAttribute(t.attrShift)?e.currentTarget.getAttribute(t.attrShift):0;requestAnimationFrame(e=>{let t=e||new Date().getTime(),c=window.pageYOffset,n=r.getBoundingClientRect().top-l;this.scrollToElem(t,t,o,n,c)})})}easeInCubic(e){return e*e*e}scrollToElem(e,t,r,o,l){let c=t-e,n=c/r;n=Math.min(n,1);let u=this.easeInCubic(n);window.scroll(0,l+o*u),c<r&&requestAnimationFrame(t=>{let c=t||new Date().getTime();this.scrollToElem(e,c,r,o,l)})}}let hc_smooth_scroll=(e,t)=>{new HcSmoothScroll(e,t)};export default hc_smooth_scroll;
@@ -1 +1,14 @@
1
- import t from"../../enumerators/element.enum";import"./tab.component.scss";import e from"bootstrap/js/src/tab";export class HcTab{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(n=t.tab){this.createEvent(),this.buildDOM(),[].slice.call(document.querySelectorAll(n)).forEach(function(t){let n=new e(t);t.addEventListener("click",function(t){t.preventDefault(),n.show()})}),document.querySelectorAll(n).forEach(t=>{t.addEventListener("hide.bs.tab",e=>{t.dispatchEvent(this.hideEvent)}),t.addEventListener("show.bs.tab",e=>{t.dispatchEvent(this.showEvent)}),t.addEventListener("shown.bs.tab",e=>{t.dispatchEvent(this.shownEvent)}),t.addEventListener("hidden.bs.tab",e=>{t.dispatchEvent(this.hiddenEvent)})})}buildDOM(){document.querySelectorAll("[data-hc-tab-wrapper]").forEach(t=>{!t.classList.contains("nav")&&t.classList.add("nav")})}createEvent(){this.showEvent=new Event("show.hc.tab"),this.shownEvent=new Event("shown.hc.tab"),this.hideEvent=new Event("hide.hc.tab"),this.hiddenEvent=new Event("hidden.hc.tab")}static show(t){[].slice.call(document.querySelectorAll(t)).forEach(function(t){new e(t).show()})}}let hc_tab=function(t){return new HcTab(t)};export default hc_tab;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 22/02/2022 14:34
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import t from"../../enumerators/element.enum";import"./tab.component.scss";import e from"bootstrap/js/src/tab";export class HcTab{showEvent;shownEvent;hideEvent;hiddenEvent;constructor(n=t.tab){for(let t of(this.createEvent(),this.buildDOM(),[].slice.call(document.querySelectorAll(n)))){let n=new e(t);t.addEventListener("click",t=>{t.preventDefault(),n.show()})}for(let t of document.querySelectorAll(n))t.addEventListener("hide.bs.tab",e=>{t.dispatchEvent(this.hideEvent)}),t.addEventListener("show.bs.tab",e=>{t.dispatchEvent(this.showEvent)}),t.addEventListener("shown.bs.tab",e=>{t.dispatchEvent(this.shownEvent)}),t.addEventListener("hidden.bs.tab",e=>{t.dispatchEvent(this.hiddenEvent)})}buildDOM(){for(let t of document.querySelectorAll("[data-hc-tab-wrapper]"))t.classList.contains("nav")||t.classList.add("nav")}createEvent(){this.showEvent=new Event("show.hc.tab"),this.shownEvent=new Event("shown.hc.tab"),this.hideEvent=new Event("hide.hc.tab"),this.hiddenEvent=new Event("hidden.hc.tab")}static show(t){for(let n of[].slice.call(document.querySelectorAll(t)))new e(n).show()}}let hc_tab=t=>new HcTab(t);export default hc_tab;
@@ -1 +1,14 @@
1
- import e from"../../enumerators/element.enum";export class HcToggle{constructor(t=e.toggle){document.querySelectorAll(t).forEach(e=>{e.addEventListener("click",e=>{e.preventDefault();let t=e.currentTarget.dataset.hcToggleAttribute,r=e.currentTarget.dataset.hcToggleValue,c=e.currentTarget.getAttribute("href")?e.currentTarget.getAttribute("href"):e.currentTarget.dataset.hcToggleTarget;document.querySelectorAll(c).forEach(e=>{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=function(e){return new HcToggle(e)};export default hc_toggle;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 22/02/2022 16:50
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 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;
@@ -1 +1,14 @@
1
- import t from"tippy.js";import"tippy.js/dist/tippy.css";import e from"../../enumerators/element.enum";import i from"../../enumerators/tooltip.enum";export class HcTooltip{showEvent;shownEvent;hideEvent;hiddenEvent;instances=[];defaultOptions={placement:"",content:"",trigger:"",interactive:!1,allowHTML:!0};constructor(o=e.tooltip,r={}){this.createEvent(),document.querySelectorAll(o).forEach(e=>{let o={};Object.assign(o,this.defaultOptions,r),o.trigger=""!=o.trigger?o.trigger:e.hasAttribute(i.attrPopover)?"click":"mouseenter",o.content=""!=o.content?o.content:e.hasAttribute(i.attrContent)?e.getAttribute(i.attrContent):"",o.placement=""!=o.placement?o.placement:e.hasAttribute(i.attrPlacement)?e.getAttribute(i.attrPlacement):"bottom",o.interactive=""!=o.interactive?o.interactive:!!e.hasAttribute(i.attrInteractive)&&e.getAttribute(i.attrInteractive);let n=e.hasAttribute(i.attrBackgroundColor)?e.getAttribute(i.attrBackgroundColor):"",s=e.hasAttribute(i.attrColor)?e.getAttribute(i.attrColor):"",c=e.hasAttribute(i.attrFontSize)?e.getAttribute(i.attrFontSize):"";"click"===o.trigger?e.addEventListener("click",t=>{t.preventDefault()}):o.touch=!1,o.onShow=t=>{n&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--background-color",n),s&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--color",s),c&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--font-size",c),t.reference.dispatchEvent(this.showEvent)},o.onShown=t=>{t.reference.dispatchEvent(this.shownEvent)},o.onHide=t=>{t.reference.dispatchEvent(this.hideEvent)},o.onHidden=t=>{t.reference.dispatchEvent(this.hiddenEvent)};let a=t(e,o);this.instances.push(a)})}createEvent(){this.showEvent=new Event("show.hc.tooltip"),this.shownEvent=new Event("shown.hc.tooltip"),this.hideEvent=new Event("hide.hc.tooltip"),this.hiddenEvent=new Event("hidden.hc.tooltip")}show(){this.instances.forEach(t=>{t.show()})}hide(){this.instances.forEach(t=>{t.hide()})}disable(){this.instances.forEach(t=>{t.disable()})}enable(){this.instances.forEach(t=>{t.enable()})}}let hc_tooltip=function(t,e){return new HcTooltip(t,e)};export default hc_tooltip;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 28/01/2022 14:52
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import t from"tippy.js";import"tippy.js/dist/tippy.css";import e from"../../enumerators/element.enum";import o from"../../enumerators/tooltip.enum";export class HcTooltip{showEvent;shownEvent;hideEvent;hiddenEvent;instances=[];defaultOptions={placement:"",content:"",trigger:"",interactive:!1,allowHTML:!0};constructor(i=e.tooltip,r={}){for(let e of(this.createEvent(),document.querySelectorAll(i))){let i={};Object.assign(i,this.defaultOptions,r),i.trigger=""!==i.trigger?i.trigger:e.hasAttribute(o.attrPopover)?"click focus":"mouseenter focus",i.content=""!==i.content?i.content:e.hasAttribute(o.attrContent)?e.getAttribute(o.attrContent):"",i.placement=""!==i.placement?i.placement:e.hasAttribute(o.attrPlacement)?e.getAttribute(o.attrPlacement):"bottom",i.interactive=""!==i.interactive?i.interactive:!!e.hasAttribute(o.attrInteractive)&&e.getAttribute(o.attrInteractive);let n=e.hasAttribute(o.attrBackgroundColor)?e.getAttribute(o.attrBackgroundColor):"",s=e.hasAttribute(o.attrColor)?e.getAttribute(o.attrColor):"",c=e.hasAttribute(o.attrFontSize)?e.getAttribute(o.attrFontSize):"";-1!==i.trigger.indexOf("click")?e.addEventListener("click",t=>{t.preventDefault()}):i.touch=!1,i.onShow=t=>{n&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--background-color",n),s&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--color",s),c&&t.popper.querySelector(".tippy-box").style.setProperty("--iris--tooltip--font-size",c),t.reference.dispatchEvent(this.showEvent)},i.onShown=t=>{t.reference.dispatchEvent(this.shownEvent)},i.onHide=t=>{t.reference.dispatchEvent(this.hideEvent)},i.onHidden=t=>{t.reference.dispatchEvent(this.hiddenEvent)};let a=t(e,i);this.instances.push(a)}}createEvent(){this.showEvent=new Event("show.hc.tooltip"),this.shownEvent=new Event("shown.hc.tooltip"),this.hideEvent=new Event("hide.hc.tooltip"),this.hiddenEvent=new Event("hidden.hc.tooltip")}show(){for(let t of this.instances)t.show()}hide(){for(let t of this.instances)t.hide()}disable(){for(let t of this.instances)t.disable()}enable(){for(let t of this.instances)t.enable()}}let hc_tooltip=(t,e)=>new HcTooltip(t,e);export default hc_tooltip;
@@ -1 +1,14 @@
1
- export default class a{static tooltip="[data-hc-tooltip], [data-hc-popover]";static popover="[data-hc-popover]";static scrollSmooth="[data-hc-smooth-scroll]";static modal="[data-hc-modal]";static modalClose="[data-hc-modal-close]";static lightboxAttr="data-hc-lightbox";static lightbox=`[${a.lightboxAttr}]`;static dropdown="[data-hc-dropdown]";static collapse="[data-hc-collapse]";static collapseItem="[data-hc-collapse-item]";static popin="[data-hc-popin]";static tab="[data-hc-tab]";static toggle="[data-hc-toggle]";static slider="[data-hc-slider]";static scrollspy="[data-hc-scrollspy]";static scrollspyNav="[data-hc-scrollspy-nav]";static scrollspyNavItem="[data-hc-scrollspy-nav-item]";static scrollspyNavItemHref="[data-hc-scrollspy-nav-item-href]";static scrollReveal="[data-hc-scroll-reveal]";static scrollRevealDisable="[data-hc-noscroll-reveal]";static scrollRevealParent="[data-hc-scroll-reveal-parent]";static scrollRevealChildren=`${a.scrollRevealParent} > *:not(${a.scrollRevealDisable}):not(${a.scrollRevealParent}):not(${a.scrollReveal})`;static overlay="[data-hc-overlay]"}
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 01/02/2022 10:36
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */export default class a{static tooltip="[data-hc-tooltip], [data-hc-popover]";static popover="[data-hc-popover]";static scrollSmooth="[data-hc-smooth-scroll]";static modal="[data-hc-modal]";static modalClose="[data-hc-modal-close]";static lightboxAttr="data-hc-lightbox";static lightbox=`[${a.lightboxAttr}]`;static dropdown="[data-hc-dropdown]";static collapse="[data-hc-collapse]";static collapseItem="[data-hc-collapse-item]";static popin="[data-hc-popin]";static tab="[data-hc-tab]";static toggle="[data-hc-toggle]";static slider="[data-hc-slider]";static scrollspy="[data-hc-scrollspy]";static scrollspyNav="[data-hc-scrollspy-nav]";static scrollspyNavItem="[data-hc-scrollspy-nav-item]";static scrollspyNavItemHref="[data-hc-scrollspy-nav-item-href]";static scrollReveal="[data-hc-scroll-reveal]";static scrollRevealDisable="[data-hc-noscroll-reveal]";static scrollRevealParent="[data-hc-scroll-reveal-parent]";static scrollRevealChildren=`${a.scrollRevealParent} > *:not(${a.scrollRevealDisable}):not(${a.scrollRevealParent}):not(${a.scrollReveal})`;static overlay="[data-hc-overlay]"}
@@ -1 +1,14 @@
1
- export default class t{static attrHref="data-hc-smooth-scroll-href";static attrShift="data-hc-smooth-scroll-shift"}
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 14/04/2022 11:28
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */export default class t{static attrHref="data-hc-smooth-scroll-href";static attrShift="data-hc-smooth-scroll-shift"}
@@ -1 +1,14 @@
1
- export default class t{static attrPopover="data-hc-popover";static attrContent="data-hc-tooltip-content";static attrPlacement="data-hc-tooltip-placement";static attrInteractive="data-hc-tooltip-interactive";static attrBackgroundColor="data-hc-tooltip-background-color";static attrColor="data-hc-tooltip-color";static attrFontSize="data-hc-tooltip-font-size"}
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 01/02/2022 10:40
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */export default class t{static attrPopover="data-hc-popover";static attrContent="data-hc-tooltip-content";static attrPlacement="data-hc-tooltip-placement";static attrInteractive="data-hc-tooltip-interactive";static attrBackgroundColor="data-hc-tooltip-background-color";static attrColor="data-hc-tooltip-color";static attrFontSize="data-hc-tooltip-font-size"}
@@ -1 +1,14 @@
1
- import o from"./components/tooltip/tooltip.component";import n from"./components/smooth-scroll/smooth-scroll.component";import m from"./components/modal/modal.component";import t from"./components/lightbox/lightbox.component";import p from"./components/dropdown/dropdown.component";import e from"./components/collapse/collapse.component";import r from"./components/lazyload/lazyload.component";import c from"./components/tab/tab.component";import l from"./components/toggle/toggle.component";import s from"./components/slider/slider.component";import i from"./components/scrollspy/scrollspy.component";import a from"./components/popin/popin.component";import f from"./components/scroll-reveal/scroll-reveal.component";import d from"./components/overlay/overlay.component";import g from"./components/nats/nats.component";let Handcook={hc_tooltip:o,hc_smooth_scroll:n,hc_modal:m,hc_lightbox:t,hc_dropdown:p,hc_collapse:e,hc_lazyload:r,hc_tab:c,hc_toggle:l,hc_slider:s,hc_scrollspy:i,hc_popin:a,hc_scroll_reveal:f,hc_overlay:d,hc_nats:g};export default Handcook;
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Fabien SERRA
12
+ * @date 25/02/2022 12:04
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */import o from"./components/collapse/collapse.component";import n from"./components/dropdown/dropdown.component";import m from"./components/lazyload/lazyload.component";import t from"./components/lightbox/lightbox.component";import p from"./components/modal/modal.component";import e from"./components/nats/nats.component";import r from"./components/overlay/overlay.component";import c from"./components/popin/popin.component";import l from"./components/scroll-reveal/scroll-reveal.component";import s from"./components/scrollspy/scrollspy.component";import i from"./components/slider/slider.component";import a from"./components/smooth-scroll/smooth-scroll.component";import f from"./components/tab/tab.component";import d from"./components/toggle/toggle.component";import g from"./components/tooltip/tooltip.component";let Handcook={hc_tooltip:g,hc_smooth_scroll:a,hc_modal:p,hc_lightbox:t,hc_dropdown:n,hc_collapse:o,hc_lazyload:m,hc_tab:f,hc_toggle:d,hc_slider:i,hc_scrollspy:s,hc_popin:c,hc_scroll_reveal:l,hc_overlay:r,hc_nats:e};export default Handcook;