@everymatrix/general-tutorial-slider 1.0.69

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 (44) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/general-tutorial-slider.cjs.entry.js +310 -0
  3. package/dist/cjs/general-tutorial-slider.cjs.js +25 -0
  4. package/dist/cjs/index-42afbd98.js +1243 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/loader.cjs.js +15 -0
  7. package/dist/collection/collection-manifest.json +12 -0
  8. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.css +166 -0
  9. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.js +482 -0
  10. package/dist/collection/components/general-tutorial-slider/index.js +1 -0
  11. package/dist/collection/index.js +1 -0
  12. package/dist/collection/utils/locale.utils.js +40 -0
  13. package/dist/collection/utils/utils.js +39 -0
  14. package/dist/esm/app-globals-0f993ce5.js +3 -0
  15. package/dist/esm/general-tutorial-slider.entry.js +306 -0
  16. package/dist/esm/general-tutorial-slider.js +20 -0
  17. package/dist/esm/index-a6815b2c.js +1216 -0
  18. package/dist/esm/index.js +1 -0
  19. package/dist/esm/loader.js +11 -0
  20. package/dist/general-tutorial-slider/general-tutorial-slider.esm.js +1 -0
  21. package/dist/general-tutorial-slider/index.esm.js +0 -0
  22. package/dist/general-tutorial-slider/p-20615b59.entry.js +1 -0
  23. package/dist/general-tutorial-slider/p-87756a93.js +2 -0
  24. package/dist/general-tutorial-slider/p-e1255160.js +1 -0
  25. package/dist/index.cjs.js +1 -0
  26. package/dist/index.js +1 -0
  27. package/dist/stencil.config.dev.js +17 -0
  28. package/dist/stencil.config.js +17 -0
  29. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/stencil.config.d.ts +2 -0
  30. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-tutorial-slider/.stencil/packages/stencil/general-tutorial-slider/stencil.config.dev.d.ts +2 -0
  31. package/dist/types/components/general-tutorial-slider/general-tutorial-slider.d.ts +90 -0
  32. package/dist/types/components/general-tutorial-slider/index.d.ts +1 -0
  33. package/dist/types/components.d.ts +141 -0
  34. package/dist/types/index.d.ts +1 -0
  35. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  36. package/dist/types/utils/locale.utils.d.ts +1 -0
  37. package/dist/types/utils/utils.d.ts +9 -0
  38. package/loader/cdn.js +1 -0
  39. package/loader/index.cjs.js +1 -0
  40. package/loader/index.d.ts +24 -0
  41. package/loader/index.es2017.js +1 -0
  42. package/loader/index.js +2 -0
  43. package/loader/package.json +11 -0
  44. package/package.json +26 -0
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,11 @@
1
+ import { b as bootstrapLazy } from './index-a6815b2c.js';
2
+ export { s as setNonce } from './index-a6815b2c.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ const defineCustomElements = async (win, options) => {
6
+ if (typeof window === 'undefined') return undefined;
7
+ await globalScripts();
8
+ return bootstrapLazy([["general-tutorial-slider",[[1,"general-tutorial-slider",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}]]]], options);
9
+ };
10
+
11
+ export { defineCustomElements };
@@ -0,0 +1 @@
1
+ import{p as e,b as r}from"./p-87756a93.js";export{s as setNonce}from"./p-87756a93.js";import{g as l}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await l(),r([["p-20615b59",[[1,"general-tutorial-slider",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],showSliderArrowsMobile:[516,"show-slider-arrows-mobile"],enableAutoScroll:[516,"enable-auto-scroll"],intervalPeriod:[514,"interval-period"],scrollItems:[520,"scroll-items"],itemsPerPage:[514,"items-per-page"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],activeIndex:[32],tutorialElementWidth:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}]]]],e))));
File without changes
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as n}from"./p-87756a93.js";const e=["ro","en","fr","ar","hu","hr"],o={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."},"es-mx":{error:"Error",noResults:"Cargando, espere por favor…"},"pt-br":{error:"Erro",noResults:"Carregando, espere por favor…"}},s=class{constructor(i){var n;t(this,i),this.userAgent=window.navigator.userAgent,this.isMobile=!!((n=this.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.allElementsWidth=0,this.xDown=null,this.yDown=null,this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.cmsEndpoint=void 0,this.userRoles="everyone",this.cmsEnv="stage",this.showSliderDots=!0,this.showSliderArrows=!0,this.showSliderArrowsMobile=!1,this.enableAutoScroll=!1,this.intervalPeriod=5e3,this.scrollItems=1,this.itemsPerPage=1,this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.activeIndex=0,this.tutorialElementWidth=0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage(),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidUpdate(){this.recalculateItemsPerPage()}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}getGeneralTutorialSlider(){let t=new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),t.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"})()),new Promise(((i,n)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{i(t)})).catch((t=>{console.error(t),this.hasErrors=!0,n(t)})).finally((()=>{this.isLoading=!1}))}))}move(t){this.setActive(this.activeIndex+t)}recalculateItemsPerPage(){this.tutorialsElement&&(this.tutorialElementWidth=this.tutorialsElement.clientWidth,this.allElementsWidth=(this.tutorialData.length-1)*this.tutorialElementWidth)}goTo(t){let i=this.activeIndex-t;if(i>0)for(let t=0;t<i;t++)this.move(-1);else for(let t=0;t>i;t--)this.move(1)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,n=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(n)&&this.move(i>0?1:-1),this.xDown=null,this.yDown=null}setActive(t){const i=this.tutorialData.length;this.activeIndex=t>=0?t>=i-1?i-1:t:0}renderDots(){const t=[];for(let n=0;n<this.tutorialData.length/this.itemsPerPage;n++)t.push(i("li",{class:n==this.activeIndex?"active":"default",onClick:()=>{this.goTo(n),this.setActive(n)}}));return t}render(){const t={transform:`translate(${this.allElementsWidth/(this.tutorialData.length-1)*this.activeIndex*-1}px, 0px)`},n={width:this.tutorialElementWidth/this.itemsPerPage+"px"};return this.hasErrors?i("div",{class:"GeneralTutorialSliderError"},i("div",{class:"TitleError"},(()=>{const t=this.language;return o[void 0!==t&&e.includes(t)?t:"en"].error})())):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TutorialWrapper"},i("div",{class:"TutorialContent",ref:t=>this.slider=t},(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:0===this.activeIndex?"SliderNavButton DisabledArrow":"SliderNavButton",onClick:()=>this.move(-1)},i("svg",{fill:"none",stroke:"var(--emfe-w-color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("main",null,i("div",{style:t,ref:t=>this.tutorialsElement=t,class:"TutorialItems"},this.tutorialData.map((t=>{var e,o,s,r,l,a,d,h,u,c,p,v,m,f,w,g,x,I;return i("div",{class:"TutorialItem",style:n},i("div",{class:"ItemTitle",innerHTML:null==t?void 0:t.title}),(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.images)?i("div",{class:"ItemImage"},i("img",this.isMobile?{src:null===(l=null===(r=null===(s=null===(o=null==t?void 0:t.media)||void 0===o?void 0:o.images[0])||void 0===s?void 0:s.sources)||void 0===r?void 0:r.find((t=>"mobile"===t.media)))||void 0===l?void 0:l.src,alt:null==t?void 0:t.slug}:{src:null===(u=null===(h=null===(d=null===(a=null==t?void 0:t.media)||void 0===a?void 0:a.images[0])||void 0===d?void 0:d.sources)||void 0===h?void 0:h.find((t=>"desktop"===t.media)))||void 0===u?void 0:u.src,alt:null==t?void 0:t.slug})):(null===(c=null==t?void 0:t.media)||void 0===c?void 0:c.video)?i("div",{class:"ItemImage"},i("video",{controls:!0,loop:!0,autoplay:!0},i("source",this.isMobile?{src:null===(f=null===(m=null===(v=null===(p=null==t?void 0:t.media)||void 0===p?void 0:p.video[0])||void 0===v?void 0:v.sources)||void 0===m?void 0:m.find((t=>"mobile"===t.media)))||void 0===f?void 0:f.src,type:"video/mp4"}:{src:null===(I=null===(x=null===(g=null===(w=null==t?void 0:t.media)||void 0===w?void 0:w.video[0])||void 0===g?void 0:g.sources)||void 0===x?void 0:x.find((t=>"desktop"===t.media)))||void 0===I?void 0:I.src,type:"video/mp4"}))):null,i("div",{class:"ItemDescription",innerHTML:null==t?void 0:t.content}))})))),(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:this.activeIndex===this.tutorialData.length-1?" SliderNavButton DisabledArrow disabled":"SliderNavButton",onClick:()=>this.move(1)},i("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}))),i("div",null)),this.showSliderDots&&i("div",{class:"DotsWrapper"},i("ul",{class:"Dots"},this.renderDots()))))}get el(){return n(this)}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}}};s.style=":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background: var(--emfe-w-color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n .TutorialItems {\n height: inherit;\n }\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";export{s as general_tutorial_slider}
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="undefined"!=typeof window?window:{},u=a.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],w=[],y=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?b($):f.raf($))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},$=()=>{v(m),v(w),(p=m.length>0)&&f.raf($)},b=t=>h().then(t),g=y(w,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>x,unwrapErr:()=>P});var k=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x=t=>{if(t.isOk)return t.value;throw t.value},P=t=>{if(t.isErr)return t.value;throw t.value},D=(t,e,...n)=>{let o=null,l=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&r?s[s.length-1].i+=o:s.push(l?R(null,o):o),r=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=R(t,null);return c.u=e,s.length>0&&(c.h=s),c},R=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},L=t=>n(t).$hostElement$,T=new WeakMap,U=t=>"sc-"+t.v,F=(t,e,n,o,r,s)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=N(n),r=N(o);e.remove(...l.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!r)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(q,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},H=/\s/,N=t=>t?t.split(H):[],W="Capture",q=RegExp(W+"$"),G=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,r=e.u||S;for(const t of V(Object.keys(l)))t in r||F(o,t,l[t],void 0,n,e.o);for(const t of V(Object.keys(r)))F(o,t,l[t],r[t],n,e.o)};function V(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,z=(t,e,n)=>{const o=e.h[n];let l,r,s=0;if(null!==o.i)l=o.m=u.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=u.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),G(null,o,_),l.getRootNode().querySelector("body"),o.h)for(s=0;s<o.h.length;++s)r=z(t,o,s),r&&l.appendChild(r);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=M,l},B=(t,e,n,o,l,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);l<=r;++l)o[l]&&(s=z(null,n,l),s&&(o[l].m=s,X(i,s,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e)=>t.p===e.p,K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,r=e.h,s=e.p,i=e.i;null===i?(G(t,e,_="svg"===s||"foreignObject"!==s&&_),null!==l&&null!==r?((t,e,n,o,l=!1)=>{let r,s=0,i=0,c=e.length-1,a=e[0],u=e[c],f=o.length-1,h=o[0],d=o[f];for(;s<=c&&i<=f;)null==a?a=e[++s]:null==u?u=e[--c]:null==h?h=o[++i]:null==d?d=o[--f]:J(a,h)?(K(a,h,l),a=e[++s],h=o[++i]):J(u,d)?(K(u,d,l),u=e[--c],d=o[--f]):J(a,d)?(K(a,d,l),X(t,a.m,u.m.nextSibling),a=e[++s],d=o[--f]):J(u,h)?(K(u,h,l),X(t,u.m,a.m),u=e[--c],h=o[++i]):(r=z(e&&e[i],n,i),h=o[++i],r&&X(a.m.parentNode,r,a.m));s>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&I(e,s,c)})(o,l,e,r,n):null!==r?(null!==t.i&&(o.textContent=""),B(o,null,e,r,0,r.length-1)):!n&&null!==l&&I(l,0,l.length-1),_&&"svg"===s&&(_=!1)):t.i!==i&&(o.data=i)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{e&&!t.$&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.$=e)))},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.S),g((()=>tt(t,e)));t.o|=512},tt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e&&(o=it(n,"componentWillLoad")),et(o,(()=>ot(t,n,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,r=l["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=U(e),l=i.get(o);if(t=11===t.nodeType?t:u,l)if("string"==typeof l){let r,s=T.get(t=t.head||t);if(s||T.set(t,s=new Set),!s.has(o)){{r=u.createElement("style"),r.innerHTML=l;const o=null!=(n=f.O)?n:O(u);null!=o&&r.setAttribute("nonce",o),(!(1&e.o)||1&e.o&&"HEAD"!==t.nodeName)&&t.insertBefore(r,t.querySelector("link"))}4&e.o&&(r.innerHTML+=c),s&&s.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>rt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.j,r=t.k||R(null,null),s=(t=>t&&t.p===A)(e)?e:D(null,null,e);if(M=o.tagName,l.C&&(s.u=s.u||{},l.C.map((([t,e])=>s.u[e]=o[t]))),n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.p=null,s.o|=4,t.k=s,s.m=r.m=o.shadowRoot||o,K(r,s,n)})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},rt=t=>{const e=t.$hostElement$,n=t.t,o=t.S;it(n,"componentDidRender"),64&t.o?it(n,"componentDidUpdate"):(t.o|=64,ct(e),it(n,"componentDidLoad"),t.M(e),o||st()),t.$&&(t.$(),t.$=void 0),512&t.o&&b((()=>Z(t,!1))),t.o&=-517},st=()=>{ct(u.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-tutorial-slider"}});return t.dispatchEvent(e),e})(a)))},it=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},ct=t=>t.classList.add("hydrated"),at=(t,e,o)=>{var l,s;const i=t.prototype;if(e.P||e.D||t.watchers){t.watchers&&!e.D&&(e.D=t.watchers);const c=Object.entries(null!=(l=e.P)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).R.get(e))(0,t)},set(o){((t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.R.get(e),a=s.o,u=s.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.P[e][0]),(!(8&a)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(s.R.set(e,o),u)){if(l.D&&128&a){const t=l.D[e];t&&t.map((t=>{try{u[t](o,c,e)}catch(t){r(t,i)}}))}2==(18&a)&&Z(s,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,r){f.jmp((()=>{var s;const c=o.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&r!==l){const n=o.t,i=null==(s=e.D)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,l,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.D)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const r=n[1]||t;return o.set(r,t),512&n[0]&&(null==(l=e.C)||l.push([t,r])),r}))]))}}return t},ut=t=>{it(t,"connectedCallback")},ft=t=>{it(t,"disconnectedCallback")},ht=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=a.customElements,w=u.head,y=w.querySelector("meta[charset]"),v=u.createElement("style"),$=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],P:o[2],A:o[3]};4&c.o&&(S=!0),c.P=o[2],c.C=[],c.D=null!=(l=o[4])?l:{};const a=c.v,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,j:n,R:new Map};o.L=new Promise((t=>o.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?$.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.j,l=()=>{};if(1&e.o)(null==e?void 0:e.t)?ut(e.t):(null==e?void 0:e.L)&&e.L.then((()=>ut(e.t)));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.S=n);break}}o.P&&Object.entries(o.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.T){const t=(t=>{const e=t.v.replace(/-/g,"_"),n=t.T;if(!n)return;const o=s.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.v}#${e.U}" was not found`);o.isProxied||(n.D=o.watchers,at(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){r(t)}e.o&=-9,e.o|=128,l(),ut(e.t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=U(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.S,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);(null==t?void 0:t.t)?ft(t.t):(null==t?void 0:t.L)&&t.L.then((()=>ft(t.t)))}})()))}componentOnReady(){return n(this).L}};c.T=t[0],p.includes(a)||m.get(a)||(h.push(a),m.define(a,at(u,c,1)))}))})),h.length>0&&(S&&(v.textContent+=c),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(l=f.O)?l:O(u);null!=t&&v.setAttribute("nonce",t),w.insertBefore(v,y?y.nextSibling:w.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(st,30)))},dt=t=>f.O=t;export{ht as b,L as g,D as h,h as p,o as r,dt as s}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,17 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'general-tutorial-slider',
4
+ taskQueue: 'async',
5
+ sourceMap: true,
6
+ minifyJs: false,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'www',
14
+ serviceWorker: null // disable service workers
15
+ }
16
+ ]
17
+ };
@@ -0,0 +1,17 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'general-tutorial-slider',
4
+ taskQueue: 'async',
5
+ sourceMap: false,
6
+ minifyJs: true,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'dist',
14
+ esmLoaderPath: '../loader'
15
+ }
16
+ ]
17
+ };
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,90 @@
1
+ export declare class GeneralTutorialSlider {
2
+ /**
3
+ * Client custom styling via inline style
4
+ */
5
+ clientStyling: string;
6
+ /**
7
+ * Client custom styling via url
8
+ */
9
+ clientStylingUrl: string;
10
+ /**
11
+ * Language of the widget
12
+ */
13
+ language: string;
14
+ /**
15
+ * Endpoint URL for the source of data
16
+ */
17
+ cmsEndpoint: string;
18
+ /**
19
+ * User roles
20
+ */
21
+ userRoles: string;
22
+ /**
23
+ * CMS Endpoint stage
24
+ */
25
+ cmsEnv: string;
26
+ /**
27
+ * Show slider dots
28
+ */
29
+ showSliderDots: boolean;
30
+ /**
31
+ * Show slider navigate arrows
32
+ */
33
+ showSliderArrows: boolean;
34
+ /**
35
+ * Show slider navigate arrows on mobile
36
+ */
37
+ showSliderArrowsMobile: boolean;
38
+ /**
39
+ * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
40
+ */
41
+ enableAutoScroll: boolean;
42
+ /**
43
+ * Set interval period for slider
44
+ */
45
+ intervalPeriod: number;
46
+ /**
47
+ * Set the number of slides you wish to display.
48
+ */
49
+ scrollItems: any;
50
+ /**
51
+ * Set the number of slides you wish to display.
52
+ */
53
+ itemsPerPage: number;
54
+ el: HTMLElement;
55
+ hasErrors: boolean;
56
+ private limitStylingAppends;
57
+ private isLoading;
58
+ activeIndex: number;
59
+ tutorialElementWidth: number;
60
+ private userAgent;
61
+ private stylingContainer;
62
+ private tutorialData;
63
+ isMobile: boolean;
64
+ allElementsWidth: number;
65
+ tutorialsElement: HTMLElement;
66
+ slider: HTMLElement;
67
+ xDown: any;
68
+ yDown: any;
69
+ watchEndpoint(newValue: string, oldValue: string): void;
70
+ connectedCallback(): void;
71
+ componentWillLoad(): Promise<void>;
72
+ componentDidLoad(): void;
73
+ componentDidRender(): void;
74
+ componentDidUpdate(): void;
75
+ disconnectedCallback(): void;
76
+ getGeneralTutorialSlider(): Promise<any>;
77
+ resizeHandler: () => void;
78
+ move(direction: any): void;
79
+ recalculateItemsPerPage(): void;
80
+ goTo(index: number): void;
81
+ handleTouchStart(evt: any): void;
82
+ getTouches(evt: any): void;
83
+ handleTouchMove(evt: any): void;
84
+ setActive(index: number): void;
85
+ orientationChangeHandler: () => void;
86
+ setClientStyling: () => void;
87
+ setClientStylingURL: () => void;
88
+ renderDots(): Array<HTMLElement>;
89
+ render(): void;
90
+ }
@@ -0,0 +1 @@
1
+ export { GeneralTutorialSlider } from './general-tutorial-slider';
@@ -0,0 +1,141 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface GeneralTutorialSlider {
10
+ /**
11
+ * Client custom styling via inline style
12
+ */
13
+ "clientStyling": string;
14
+ /**
15
+ * Client custom styling via url
16
+ */
17
+ "clientStylingUrl": string;
18
+ /**
19
+ * Endpoint URL for the source of data
20
+ */
21
+ "cmsEndpoint": string;
22
+ /**
23
+ * CMS Endpoint stage
24
+ */
25
+ "cmsEnv": string;
26
+ /**
27
+ * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
28
+ */
29
+ "enableAutoScroll": boolean;
30
+ /**
31
+ * Set interval period for slider
32
+ */
33
+ "intervalPeriod": number;
34
+ /**
35
+ * Set the number of slides you wish to display.
36
+ */
37
+ "itemsPerPage": number;
38
+ /**
39
+ * Language of the widget
40
+ */
41
+ "language": string;
42
+ /**
43
+ * Set the number of slides you wish to display.
44
+ */
45
+ "scrollItems": any;
46
+ /**
47
+ * Show slider navigate arrows
48
+ */
49
+ "showSliderArrows": boolean;
50
+ /**
51
+ * Show slider navigate arrows on mobile
52
+ */
53
+ "showSliderArrowsMobile": boolean;
54
+ /**
55
+ * Show slider dots
56
+ */
57
+ "showSliderDots": boolean;
58
+ /**
59
+ * User roles
60
+ */
61
+ "userRoles": string;
62
+ }
63
+ }
64
+ declare global {
65
+ interface HTMLGeneralTutorialSliderElement extends Components.GeneralTutorialSlider, HTMLStencilElement {
66
+ }
67
+ var HTMLGeneralTutorialSliderElement: {
68
+ prototype: HTMLGeneralTutorialSliderElement;
69
+ new (): HTMLGeneralTutorialSliderElement;
70
+ };
71
+ interface HTMLElementTagNameMap {
72
+ "general-tutorial-slider": HTMLGeneralTutorialSliderElement;
73
+ }
74
+ }
75
+ declare namespace LocalJSX {
76
+ interface GeneralTutorialSlider {
77
+ /**
78
+ * Client custom styling via inline style
79
+ */
80
+ "clientStyling"?: string;
81
+ /**
82
+ * Client custom styling via url
83
+ */
84
+ "clientStylingUrl"?: string;
85
+ /**
86
+ * Endpoint URL for the source of data
87
+ */
88
+ "cmsEndpoint": string;
89
+ /**
90
+ * CMS Endpoint stage
91
+ */
92
+ "cmsEnv"?: string;
93
+ /**
94
+ * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
95
+ */
96
+ "enableAutoScroll"?: boolean;
97
+ /**
98
+ * Set interval period for slider
99
+ */
100
+ "intervalPeriod"?: number;
101
+ /**
102
+ * Set the number of slides you wish to display.
103
+ */
104
+ "itemsPerPage"?: number;
105
+ /**
106
+ * Language of the widget
107
+ */
108
+ "language"?: string;
109
+ /**
110
+ * Set the number of slides you wish to display.
111
+ */
112
+ "scrollItems"?: any;
113
+ /**
114
+ * Show slider navigate arrows
115
+ */
116
+ "showSliderArrows"?: boolean;
117
+ /**
118
+ * Show slider navigate arrows on mobile
119
+ */
120
+ "showSliderArrowsMobile"?: boolean;
121
+ /**
122
+ * Show slider dots
123
+ */
124
+ "showSliderDots"?: boolean;
125
+ /**
126
+ * User roles
127
+ */
128
+ "userRoles"?: string;
129
+ }
130
+ interface IntrinsicElements {
131
+ "general-tutorial-slider": GeneralTutorialSlider;
132
+ }
133
+ }
134
+ export { LocalJSX as JSX };
135
+ declare module "@stencil/core" {
136
+ export namespace JSX {
137
+ interface IntrinsicElements {
138
+ "general-tutorial-slider": LocalJSX.GeneralTutorialSlider & JSXBase.HTMLAttributes<HTMLGeneralTutorialSliderElement>;
139
+ }
140
+ }
141
+ }
@@ -0,0 +1 @@
1
+ export * from './components';